@hpcc-js/markdown-it-plugins 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,32 +1,32 @@
1
- var la=Object.defineProperty;var gt=(e,t)=>{for(var r in t)la(e,r,{get:t[r],enumerable:!0})};function le(e,t,r){r=r||{};var i=e.ownerDocument,n=i.defaultView.CustomEvent;typeof n=="function"?n=new n(t,{detail:r}):(n=i.createEvent("Event"),n.initEvent(t,!1,!1),n.detail=r),e.dispatchEvent(n)}function bt(e){return Array.isArray(e)||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function vt(e){return e===(e|0)+""}function L(e){let t=document.createElement("span");return t.className="observablehq--cellname",t.textContent=`${e} = `,t}var pa=Symbol.prototype.toString;function Z(e){return pa.call(e)}var{getOwnPropertySymbols:ha,prototype:{hasOwnProperty:fa}}=Object,{toStringTag:da}=Symbol,ar={},xe=ha;function Fe(e,t){return fa.call(e,t)}function He(e){return e[da]||e.constructor&&e.constructor.name||"Object"}function V(e,t){try{let r=e[t];return r&&r.constructor,r}catch{return ar}}var ma=[{symbol:"@@__IMMUTABLE_INDEXED__@@",name:"Indexed",modifier:!0},{symbol:"@@__IMMUTABLE_KEYED__@@",name:"Keyed",modifier:!0},{symbol:"@@__IMMUTABLE_LIST__@@",name:"List",arrayish:!0},{symbol:"@@__IMMUTABLE_MAP__@@",name:"Map"},{symbol:"@@__IMMUTABLE_ORDERED__@@",name:"Ordered",modifier:!0,prefix:!0},{symbol:"@@__IMMUTABLE_RECORD__@@",name:"Record"},{symbol:"@@__IMMUTABLE_SET__@@",name:"Set",arrayish:!0,setish:!0},{symbol:"@@__IMMUTABLE_STACK__@@",name:"Stack",arrayish:!0}];function wt(e){try{let t=ma.filter(({symbol:a})=>e[a]===!0);if(!t.length)return;let r=t.find(a=>!a.modifier),i=r.name==="Map"&&t.find(a=>a.modifier&&a.prefix),n=t.some(a=>a.arrayish),s=t.some(a=>a.setish);return{name:`${i?i.name:""}${r.name}`,symbols:t,arrayish:n&&!s,setish:s}}catch{return null}}var{getPrototypeOf:or,getOwnPropertyDescriptors:xa}=Object,bi=or({});function Ye(e,t,r,i){let n=bt(e),s,a,o,c;e instanceof Map?e instanceof e.constructor?(s=`Map(${e.size})`,a=ya):(s="Map()",a=Ge):e instanceof Set?e instanceof e.constructor?(s=`Set(${e.size})`,a=ga):(s="Set()",a=Ge):n?(s=`${e.constructor.name}(${e.length})`,a=va):(c=wt(e))?(s=`Immutable.${c.name}${c.name==="Record"?"":`(${e.size})`}`,n=c.arrayish,a=c.arrayish?wa:c.setish?ba:_a):i?(s=He(e),a=Ea):(s=He(e),a=Ge);let l=document.createElement("span");l.className="observablehq--expanded",r&&l.appendChild(L(r));let h=l.appendChild(document.createElement("a"));h.innerHTML=`<svg width=8 height=8 class='observablehq--caret'>
1
+ var la=Object.defineProperty;var gt=(e,t)=>{for(var r in t)la(e,r,{get:t[r],enumerable:!0})};function pe(e,t,r){r=r||{};var i=e.ownerDocument,n=i.defaultView.CustomEvent;typeof n=="function"?n=new n(t,{detail:r}):(n=i.createEvent("Event"),n.initEvent(t,!1,!1),n.detail=r),e.dispatchEvent(n)}function bt(e){return Array.isArray(e)||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function vt(e){return e===(e|0)+""}function L(e){let t=document.createElement("span");return t.className="observablehq--cellname",t.textContent=`${e} = `,t}var pa=Symbol.prototype.toString;function Z(e){return pa.call(e)}var{getOwnPropertySymbols:ha,prototype:{hasOwnProperty:fa}}=Object,{toStringTag:da}=Symbol,ar={},xe=ha;function Fe(e,t){return fa.call(e,t)}function Ge(e){return e[da]||e.constructor&&e.constructor.name||"Object"}function V(e,t){try{let r=e[t];return r&&r.constructor,r}catch{return ar}}var ma=[{symbol:"@@__IMMUTABLE_INDEXED__@@",name:"Indexed",modifier:!0},{symbol:"@@__IMMUTABLE_KEYED__@@",name:"Keyed",modifier:!0},{symbol:"@@__IMMUTABLE_LIST__@@",name:"List",arrayish:!0},{symbol:"@@__IMMUTABLE_MAP__@@",name:"Map"},{symbol:"@@__IMMUTABLE_ORDERED__@@",name:"Ordered",modifier:!0,prefix:!0},{symbol:"@@__IMMUTABLE_RECORD__@@",name:"Record"},{symbol:"@@__IMMUTABLE_SET__@@",name:"Set",arrayish:!0,setish:!0},{symbol:"@@__IMMUTABLE_STACK__@@",name:"Stack",arrayish:!0}];function wt(e){try{let t=ma.filter(({symbol:a})=>e[a]===!0);if(!t.length)return;let r=t.find(a=>!a.modifier),i=r.name==="Map"&&t.find(a=>a.modifier&&a.prefix),n=t.some(a=>a.arrayish),s=t.some(a=>a.setish);return{name:`${i?i.name:""}${r.name}`,symbols:t,arrayish:n&&!s,setish:s}}catch{return null}}var{getPrototypeOf:or,getOwnPropertyDescriptors:xa}=Object,bi=or({});function Ke(e,t,r,i){let n=bt(e),s,a,u,c;e instanceof Map?e instanceof e.constructor?(s=`Map(${e.size})`,a=ya):(s="Map()",a=Ye):e instanceof Set?e instanceof e.constructor?(s=`Set(${e.size})`,a=ga):(s="Set()",a=Ye):n?(s=`${e.constructor.name}(${e.length})`,a=va):(c=wt(e))?(s=`Immutable.${c.name}${c.name==="Record"?"":`(${e.size})`}`,n=c.arrayish,a=c.arrayish?wa:c.setish?ba:_a):i?(s=Ge(e),a=Ea):(s=Ge(e),a=Ye);let l=document.createElement("span");l.className="observablehq--expanded",r&&l.appendChild(L(r));let h=l.appendChild(document.createElement("a"));h.innerHTML=`<svg width=8 height=8 class='observablehq--caret'>
2
2
  <path d='M4 7L0 1h8z' fill='currentColor' />
3
- </svg>`,h.appendChild(document.createTextNode(`${s}${n?" [":" {"}`)),h.addEventListener("mouseup",function(p){p.stopPropagation(),ye(l,De(e,null,r,i))}),a=a(e);for(let p=0;!(o=a.next()).done&&p<20;++p)l.appendChild(o.value);if(!o.done){let p=l.appendChild(document.createElement("a"));p.className="observablehq--field",p.style.display="block",p.appendChild(document.createTextNode(" \u2026 more")),p.addEventListener("mouseup",function(f){f.stopPropagation(),l.insertBefore(o.value,l.lastChild.previousSibling);for(let x=0;!(o=a.next()).done&&x<19;++x)l.insertBefore(o.value,l.lastChild.previousSibling);o.done&&l.removeChild(l.lastChild.previousSibling),le(l,"load")})}return l.appendChild(document.createTextNode(n?"]":"}")),l}function*ya(e){for(let[t,r]of e)yield Aa(t,r);yield*Ge(e)}function*ga(e){for(let t of e)yield wi(t);yield*Ge(e)}function*ba(e){for(let t of e)yield wi(t)}function*va(e){for(let t=0,r=e.length;t<r;++t)t in e&&(yield ie(t,V(e,t),"observablehq--index"));for(let t in e)!vt(t)&&Fe(e,t)&&(yield ie(t,V(e,t),"observablehq--key"));for(let t of xe(e))yield ie(Z(t),V(e,t),"observablehq--symbol")}function*wa(e){let t=0;for(let r=e.size;t<r;++t)yield ie(t,e.get(t),!0)}function*Ea(e){for(let r in xa(e))yield ie(r,V(e,r),"observablehq--key");for(let r of xe(e))yield ie(Z(r),V(e,r),"observablehq--symbol");let t=or(e);t&&t!==bi&&(yield vi(t))}function*Ge(e){for(let r in e)Fe(e,r)&&(yield ie(r,V(e,r),"observablehq--key"));for(let r of xe(e))yield ie(Z(r),V(e,r),"observablehq--symbol");let t=or(e);t&&t!==bi&&(yield vi(t))}function*_a(e){for(let[t,r]of e)yield ie(t,r,"observablehq--key")}function vi(e){let t=document.createElement("div"),r=t.appendChild(document.createElement("span"));return t.className="observablehq--field",r.className="observablehq--prototype-key",r.textContent=" <prototype>",t.appendChild(document.createTextNode(": ")),t.appendChild(B(e,void 0,void 0,void 0,!0)),t}function ie(e,t,r){let i=document.createElement("div"),n=i.appendChild(document.createElement("span"));return i.className="observablehq--field",n.className=r,n.textContent=` ${e}`,i.appendChild(document.createTextNode(": ")),i.appendChild(B(t)),i}function Aa(e,t){let r=document.createElement("div");return r.className="observablehq--field",r.appendChild(document.createTextNode(" ")),r.appendChild(B(e)),r.appendChild(document.createTextNode(" => ")),r.appendChild(B(t)),r}function wi(e){let t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode(" ")),t.appendChild(B(e)),t}function Ei(e){let t=window.getSelection();return t.type==="Range"&&(t.containsNode(e,!0)||e.contains(t.anchorNode)||e.contains(t.focusNode))}function De(e,t,r,i){let n=bt(e),s,a,o,c;if(e instanceof Map?e instanceof e.constructor?(s=`Map(${e.size})`,a=Ca):(s="Map()",a=Ke):e instanceof Set?e instanceof e.constructor?(s=`Set(${e.size})`,a=Sa):(s="Set()",a=Ke):n?(s=`${e.constructor.name}(${e.length})`,a=Fa):(c=wt(e))?(s=`Immutable.${c.name}${c.name==="Record"?"":`(${e.size})`}`,n=c.arrayish,a=c.arrayish?Ia:c.setish?ka:Da):(s=He(e),a=Ke),t){let p=document.createElement("span");return p.className="observablehq--shallow",r&&p.appendChild(L(r)),p.appendChild(document.createTextNode(s)),p.addEventListener("mouseup",function(f){Ei(p)||(f.stopPropagation(),ye(p,De(e)))}),p}let l=document.createElement("span");l.className="observablehq--collapsed",r&&l.appendChild(L(r));let h=l.appendChild(document.createElement("a"));h.innerHTML=`<svg width=8 height=8 class='observablehq--caret'>
3
+ </svg>`,h.appendChild(document.createTextNode(`${s}${n?" [":" {"}`)),h.addEventListener("mouseup",function(p){p.stopPropagation(),ye(l,De(e,null,r,i))}),a=a(e);for(let p=0;!(u=a.next()).done&&p<20;++p)l.appendChild(u.value);if(!u.done){let p=l.appendChild(document.createElement("a"));p.className="observablehq--field",p.style.display="block",p.appendChild(document.createTextNode(" \u2026 more")),p.addEventListener("mouseup",function(f){f.stopPropagation(),l.insertBefore(u.value,l.lastChild.previousSibling);for(let x=0;!(u=a.next()).done&&x<19;++x)l.insertBefore(u.value,l.lastChild.previousSibling);u.done&&l.removeChild(l.lastChild.previousSibling),pe(l,"load")})}return l.appendChild(document.createTextNode(n?"]":"}")),l}function*ya(e){for(let[t,r]of e)yield Aa(t,r);yield*Ye(e)}function*ga(e){for(let t of e)yield wi(t);yield*Ye(e)}function*ba(e){for(let t of e)yield wi(t)}function*va(e){for(let t=0,r=e.length;t<r;++t)t in e&&(yield ie(t,V(e,t),"observablehq--index"));for(let t in e)!vt(t)&&Fe(e,t)&&(yield ie(t,V(e,t),"observablehq--key"));for(let t of xe(e))yield ie(Z(t),V(e,t),"observablehq--symbol")}function*wa(e){let t=0;for(let r=e.size;t<r;++t)yield ie(t,e.get(t),!0)}function*Ea(e){for(let r in xa(e))yield ie(r,V(e,r),"observablehq--key");for(let r of xe(e))yield ie(Z(r),V(e,r),"observablehq--symbol");let t=or(e);t&&t!==bi&&(yield vi(t))}function*Ye(e){for(let r in e)Fe(e,r)&&(yield ie(r,V(e,r),"observablehq--key"));for(let r of xe(e))yield ie(Z(r),V(e,r),"observablehq--symbol");let t=or(e);t&&t!==bi&&(yield vi(t))}function*_a(e){for(let[t,r]of e)yield ie(t,r,"observablehq--key")}function vi(e){let t=document.createElement("div"),r=t.appendChild(document.createElement("span"));return t.className="observablehq--field",r.className="observablehq--prototype-key",r.textContent=" <prototype>",t.appendChild(document.createTextNode(": ")),t.appendChild(B(e,void 0,void 0,void 0,!0)),t}function ie(e,t,r){let i=document.createElement("div"),n=i.appendChild(document.createElement("span"));return i.className="observablehq--field",n.className=r,n.textContent=` ${e}`,i.appendChild(document.createTextNode(": ")),i.appendChild(B(t)),i}function Aa(e,t){let r=document.createElement("div");return r.className="observablehq--field",r.appendChild(document.createTextNode(" ")),r.appendChild(B(e)),r.appendChild(document.createTextNode(" => ")),r.appendChild(B(t)),r}function wi(e){let t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode(" ")),t.appendChild(B(e)),t}function Ei(e){let t=window.getSelection();return t.type==="Range"&&(t.containsNode(e,!0)||e.contains(t.anchorNode)||e.contains(t.focusNode))}function De(e,t,r,i){let n=bt(e),s,a,u,c;if(e instanceof Map?e instanceof e.constructor?(s=`Map(${e.size})`,a=Ca):(s="Map()",a=Qe):e instanceof Set?e instanceof e.constructor?(s=`Set(${e.size})`,a=Sa):(s="Set()",a=Qe):n?(s=`${e.constructor.name}(${e.length})`,a=Fa):(c=wt(e))?(s=`Immutable.${c.name}${c.name==="Record"?"":`(${e.size})`}`,n=c.arrayish,a=c.arrayish?Ia:c.setish?ka:Da):(s=Ge(e),a=Qe),t){let p=document.createElement("span");return p.className="observablehq--shallow",r&&p.appendChild(L(r)),p.appendChild(document.createTextNode(s)),p.addEventListener("mouseup",function(f){Ei(p)||(f.stopPropagation(),ye(p,De(e)))}),p}let l=document.createElement("span");l.className="observablehq--collapsed",r&&l.appendChild(L(r));let h=l.appendChild(document.createElement("a"));h.innerHTML=`<svg width=8 height=8 class='observablehq--caret'>
4
4
  <path d='M7 4L1 8V0z' fill='currentColor' />
5
- </svg>`,h.appendChild(document.createTextNode(`${s}${n?" [":" {"}`)),l.addEventListener("mouseup",function(p){Ei(l)||(p.stopPropagation(),ye(l,Ye(e,null,r,i)))},!0),a=a(e);for(let p=0;!(o=a.next()).done&&p<20;++p)p>0&&l.appendChild(document.createTextNode(", ")),l.appendChild(o.value);return o.done||l.appendChild(document.createTextNode(", \u2026")),l.appendChild(document.createTextNode(n?"]":"}")),l}function*Ca(e){for(let[t,r]of e)yield Ta(t,r);yield*Ke(e)}function*Sa(e){for(let t of e)yield B(t,!0);yield*Ke(e)}function*ka(e){for(let t of e)yield B(t,!0)}function*Ia(e){let t=-1,r=0;for(let i=e.size;r<i;++r)r>t+1&&(yield Et(r-t-1)),yield B(e.get(r),!0),t=r;r>t+1&&(yield Et(r-t-1))}function*Fa(e){let t=-1,r=0;for(let i=e.length;r<i;++r)r in e&&(r>t+1&&(yield Et(r-t-1)),yield B(V(e,r),!0),t=r);r>t+1&&(yield Et(r-t-1));for(let i in e)!vt(i)&&Fe(e,i)&&(yield Qe(i,V(e,i),"observablehq--key"));for(let i of xe(e))yield Qe(Z(i),V(e,i),"observablehq--symbol")}function*Ke(e){for(let t in e)Fe(e,t)&&(yield Qe(t,V(e,t),"observablehq--key"));for(let t of xe(e))yield Qe(Z(t),V(e,t),"observablehq--symbol")}function*Da(e){for(let[t,r]of e)yield Qe(t,r,"observablehq--key")}function Et(e){let t=document.createElement("span");return t.className="observablehq--empty",t.textContent=e===1?"empty":`empty \xD7 ${e}`,t}function Qe(e,t,r){let i=document.createDocumentFragment(),n=i.appendChild(document.createElement("span"));return n.className=r,n.textContent=e,i.appendChild(document.createTextNode(": ")),i.appendChild(B(t,!0)),i}function Ta(e,t){let r=document.createDocumentFragment();return r.appendChild(B(e,!0)),r.appendChild(document.createTextNode(" => ")),r.appendChild(B(t,!0)),r}function _t(e,t){if(e instanceof Date||(e=new Date(+e)),isNaN(e))return typeof t=="function"?t(e):t;let r=e.getUTCHours(),i=e.getUTCMinutes(),n=e.getUTCSeconds(),s=e.getUTCMilliseconds();return`${Na(e.getUTCFullYear(),4)}-${ne(e.getUTCMonth()+1,2)}-${ne(e.getUTCDate(),2)}${r||i||n||s?`T${ne(r,2)}:${ne(i,2)}${n||s?`:${ne(n,2)}${s?`.${ne(s,3)}`:""}`:""}Z`:""}`}function Na(e){return e<0?`-${ne(-e,6)}`:e>9999?`+${ne(e,6)}`:ne(e,4)}function ne(e,t){return`${e}`.padStart(t,"0")}function ur(e){return _t(e,"Invalid Date")}var Pa=Error.prototype.toString;function cr(e){return e.stack||Pa.call(e)}var Ba=RegExp.prototype.toString;function lr(e){return Ba.call(e)}var pr=20;function hr(e,t,r,i){if(t===!1){if(Ai(e,/["\n]/g)<=Ai(e,/`|\${/g)){let l=document.createElement("span");i&&l.appendChild(L(i));let h=l.appendChild(document.createElement("span"));return h.className="observablehq--string",h.textContent=JSON.stringify(e),l}let a=e.split(`
5
+ </svg>`,h.appendChild(document.createTextNode(`${s}${n?" [":" {"}`)),l.addEventListener("mouseup",function(p){Ei(l)||(p.stopPropagation(),ye(l,Ke(e,null,r,i)))},!0),a=a(e);for(let p=0;!(u=a.next()).done&&p<20;++p)p>0&&l.appendChild(document.createTextNode(", ")),l.appendChild(u.value);return u.done||l.appendChild(document.createTextNode(", \u2026")),l.appendChild(document.createTextNode(n?"]":"}")),l}function*Ca(e){for(let[t,r]of e)yield Ta(t,r);yield*Qe(e)}function*Sa(e){for(let t of e)yield B(t,!0);yield*Qe(e)}function*ka(e){for(let t of e)yield B(t,!0)}function*Ia(e){let t=-1,r=0;for(let i=e.size;r<i;++r)r>t+1&&(yield Et(r-t-1)),yield B(e.get(r),!0),t=r;r>t+1&&(yield Et(r-t-1))}function*Fa(e){let t=-1,r=0;for(let i=e.length;r<i;++r)r in e&&(r>t+1&&(yield Et(r-t-1)),yield B(V(e,r),!0),t=r);r>t+1&&(yield Et(r-t-1));for(let i in e)!vt(i)&&Fe(e,i)&&(yield Je(i,V(e,i),"observablehq--key"));for(let i of xe(e))yield Je(Z(i),V(e,i),"observablehq--symbol")}function*Qe(e){for(let t in e)Fe(e,t)&&(yield Je(t,V(e,t),"observablehq--key"));for(let t of xe(e))yield Je(Z(t),V(e,t),"observablehq--symbol")}function*Da(e){for(let[t,r]of e)yield Je(t,r,"observablehq--key")}function Et(e){let t=document.createElement("span");return t.className="observablehq--empty",t.textContent=e===1?"empty":`empty \xD7 ${e}`,t}function Je(e,t,r){let i=document.createDocumentFragment(),n=i.appendChild(document.createElement("span"));return n.className=r,n.textContent=e,i.appendChild(document.createTextNode(": ")),i.appendChild(B(t,!0)),i}function Ta(e,t){let r=document.createDocumentFragment();return r.appendChild(B(e,!0)),r.appendChild(document.createTextNode(" => ")),r.appendChild(B(t,!0)),r}function _t(e,t){if(e instanceof Date||(e=new Date(+e)),isNaN(e))return typeof t=="function"?t(e):t;let r=e.getUTCHours(),i=e.getUTCMinutes(),n=e.getUTCSeconds(),s=e.getUTCMilliseconds();return`${Na(e.getUTCFullYear(),4)}-${ne(e.getUTCMonth()+1,2)}-${ne(e.getUTCDate(),2)}${r||i||n||s?`T${ne(r,2)}:${ne(i,2)}${n||s?`:${ne(n,2)}${s?`.${ne(s,3)}`:""}`:""}Z`:""}`}function Na(e){return e<0?`-${ne(-e,6)}`:e>9999?`+${ne(e,6)}`:ne(e,4)}function ne(e,t){return`${e}`.padStart(t,"0")}function ur(e){return _t(e,"Invalid Date")}var Pa=Error.prototype.toString;function cr(e){return e.stack||Pa.call(e)}var Ba=RegExp.prototype.toString;function lr(e){return Ba.call(e)}var pr=20;function hr(e,t,r,i){if(t===!1){if(Ai(e,/["\n]/g)<=Ai(e,/`|\${/g)){let l=document.createElement("span");i&&l.appendChild(L(i));let h=l.appendChild(document.createElement("span"));return h.className="observablehq--string",h.textContent=JSON.stringify(e),l}let a=e.split(`
6
6
  `);if(a.length>pr&&!r){let l=document.createElement("div");i&&l.appendChild(L(i));let h=l.appendChild(document.createElement("span"));h.className="observablehq--string",h.textContent="`"+_i(a.slice(0,pr).join(`
7
- `));let p=l.appendChild(document.createElement("span")),f=a.length-pr;return p.textContent=`Show ${f} truncated line${f>1?"s":""}`,p.className="observablehq--string-expand",p.addEventListener("mouseup",function(x){x.stopPropagation(),ye(l,B(e,t,!0,i))}),l}let o=document.createElement("span");i&&o.appendChild(L(i));let c=o.appendChild(document.createElement("span"));return c.className=`observablehq--string${r?" observablehq--expanded":""}`,c.textContent="`"+_i(e)+"`",o}let n=document.createElement("span");i&&n.appendChild(L(i));let s=n.appendChild(document.createElement("span"));return s.className="observablehq--string",s.textContent=JSON.stringify(e.length>100?`${e.slice(0,50)}\u2026${e.slice(-49)}`:e),n}function _i(e){return e.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,La)}function La(e){var t=e.charCodeAt(0);switch(t){case 8:return"\\b";case 9:return"\\t";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r"}return t<16?"\\x0"+t.toString(16):t<32?"\\x"+t.toString(16):"\\"+e}function Ai(e,t){for(var r=0;t.exec(e);)++r;return r}var Ra=Function.prototype.toString,Oa={prefix:"async \u0192"},Va={prefix:"async \u0192*"},Ci={prefix:"class"},Ma={prefix:"\u0192"},qa={prefix:"\u0192*"};function fr(e,t){var r,i,n=Ra.call(e);switch(e.constructor&&e.constructor.name){case"AsyncFunction":r=Oa;break;case"AsyncGeneratorFunction":r=Va;break;case"GeneratorFunction":r=qa;break;default:r=/^class\b/.test(n)?Ci:Ma;break}return r===Ci?Je(r,"",t):(i=/^(?:async\s*)?(\w+)\s*=>/.exec(n))?Je(r,"("+i[1]+")",t):(i=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(n))?Je(r,i[1]?"("+i[1].replace(/\s*,\s*/g,", ")+")":"()",t):(i=/^(?:async\s*)?function(?:\s*\*)?(?:\s*\w+)?\s*\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(n))?Je(r,i[1]?"("+i[1].replace(/\s*,\s*/g,", ")+")":"()",t):Je(r,"(\u2026)",t)}function Je(e,t,r){var i=document.createElement("span");i.className="observablehq--function",r&&i.appendChild(L(r));var n=i.appendChild(document.createElement("span"));return n.className="observablehq--keyword",n.textContent=e.prefix,i.appendChild(document.createTextNode(t)),i}var{prototype:{toString:ja}}=Object;function B(e,t,r,i,n){let s=typeof e;switch(s){case"boolean":case"undefined":{e+="";break}case"number":{e=e===0&&1/e<0?"-0":e+"";break}case"bigint":{e=e+"n";break}case"symbol":{e=Z(e,i);break}case"function":return fr(e,i);case"string":return hr(e,t,r,i);default:{if(e===null){s=null,e="null";break}if(e instanceof Date){s="date",e=ur(e,i);break}if(e===ar){s="forbidden",e="[forbidden]";break}switch(ja.call(e)){case"[object RegExp]":{s="regexp",e=lr(e,i);break}case"[object Error]":case"[object DOMException]":{s="error",e=cr(e,i);break}default:return(r?Ye:De)(e,t,i,n)}break}}let a=document.createElement("span");i&&a.appendChild(L(i));let o=a.appendChild(document.createElement("span"));return o.className=`observablehq--${s}`,o.textContent=e,a}function ye(e,t){e.classList.contains("observablehq--inspect")&&t.classList.add("observablehq--inspect"),e.parentNode.replaceChild(t,e),le(t,"load")}var Ua=/\s+\(\d+:\d+\)$/m,ge=class{constructor(t){if(!t)throw new Error("invalid node");this._node=t,t.classList.add("observablehq")}pending(){let{_node:t}=this;t.classList.remove("observablehq--error"),t.classList.add("observablehq--running")}fulfilled(t,r){let{_node:i}=this;if((!$a(t)||t.parentNode&&t.parentNode!==i)&&(t=B(t,!1,i.firstChild&&i.firstChild.classList&&i.firstChild.classList.contains("observablehq--expanded"),r),t.classList.add("observablehq--inspect")),i.classList.remove("observablehq--running","observablehq--error"),i.firstChild!==t)if(i.firstChild){for(;i.lastChild!==i.firstChild;)i.removeChild(i.lastChild);i.replaceChild(t,i.firstChild)}else i.appendChild(t);le(i,"update")}rejected(t,r){let{_node:i}=this;for(i.classList.remove("observablehq--running"),i.classList.add("observablehq--error");i.lastChild;)i.removeChild(i.lastChild);var n=document.createElement("div");n.className="observablehq--inspect",r&&n.appendChild(L(r)),n.appendChild(document.createTextNode((t+"").replace(Ua,""))),i.appendChild(n),le(i,"error",{error:t})}};ge.into=function(e){if(typeof e=="string"&&(e=document.querySelector(e),e==null))throw new Error("container not found");return function(){return new ge(e.appendChild(document.createElement("div")))}};function $a(e){return(e instanceof Element||e instanceof Text)&&e instanceof e.constructor}var Si={},dr={},mr=34,Ze=10,xr=13;function Ii(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+'] || ""'}).join(",")+"}")}function za(e,t){var r=Ii(e);return function(i,n){return t(r(i),n,e)}}function ki(e){var t=Object.create(null),r=[];return e.forEach(function(i){for(var n in i)n in t||r.push(t[n]=n)}),r}function M(e,t){var r=e+"",i=r.length;return i<t?new Array(t-i+1).join(0)+r:r}function Wa(e){return e<0?"-"+M(-e,6):e>9999?"+"+M(e,6):M(e,4)}function Ha(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),i=e.getUTCSeconds(),n=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":Wa(e.getUTCFullYear(),4)+"-"+M(e.getUTCMonth()+1,2)+"-"+M(e.getUTCDate(),2)+(n?"T"+M(t,2)+":"+M(r,2)+":"+M(i,2)+"."+M(n,3)+"Z":i?"T"+M(t,2)+":"+M(r,2)+":"+M(i,2)+"Z":r||t?"T"+M(t,2)+":"+M(r,2)+"Z":"")}function At(e){var t=new RegExp('["'+e+`
8
- \r]`),r=e.charCodeAt(0);function i(p,f){var x,y,C=n(p,function(T,m){if(x)return x(T,m-1);y=T,x=f?za(T,f):Ii(T)});return C.columns=y||[],C}function n(p,f){var x=[],y=p.length,C=0,T=0,m,v=y<=0,E=!1;p.charCodeAt(y-1)===Ze&&--y,p.charCodeAt(y-1)===xr&&--y;function k(){if(v)return dr;if(E)return E=!1,Si;var xt,yt=C,We;if(p.charCodeAt(yt)===mr){for(;C++<y&&p.charCodeAt(C)!==mr||p.charCodeAt(++C)===mr;);return(xt=C)>=y?v=!0:(We=p.charCodeAt(C++))===Ze?E=!0:We===xr&&(E=!0,p.charCodeAt(C)===Ze&&++C),p.slice(yt+1,xt-1).replace(/""/g,'"')}for(;C<y;){if((We=p.charCodeAt(xt=C++))===Ze)E=!0;else if(We===xr)E=!0,p.charCodeAt(C)===Ze&&++C;else if(We!==r)continue;return p.slice(yt,xt)}return v=!0,p.slice(yt,y)}for(;(m=k())!==dr;){for(var mt=[];m!==Si&&m!==dr;)mt.push(m),m=k();f&&(mt=f(mt,T++))==null||x.push(mt)}return x}function s(p,f){return p.map(function(x){return f.map(function(y){return h(x[y])}).join(e)})}function a(p,f){return f==null&&(f=ki(p)),[f.map(h).join(e)].concat(s(p,f)).join(`
9
- `)}function o(p,f){return f==null&&(f=ki(p)),s(p,f).join(`
7
+ `));let p=l.appendChild(document.createElement("span")),f=a.length-pr;return p.textContent=`Show ${f} truncated line${f>1?"s":""}`,p.className="observablehq--string-expand",p.addEventListener("mouseup",function(x){x.stopPropagation(),ye(l,B(e,t,!0,i))}),l}let u=document.createElement("span");i&&u.appendChild(L(i));let c=u.appendChild(document.createElement("span"));return c.className=`observablehq--string${r?" observablehq--expanded":""}`,c.textContent="`"+_i(e)+"`",u}let n=document.createElement("span");i&&n.appendChild(L(i));let s=n.appendChild(document.createElement("span"));return s.className="observablehq--string",s.textContent=JSON.stringify(e.length>100?`${e.slice(0,50)}\u2026${e.slice(-49)}`:e),n}function _i(e){return e.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,La)}function La(e){var t=e.charCodeAt(0);switch(t){case 8:return"\\b";case 9:return"\\t";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r"}return t<16?"\\x0"+t.toString(16):t<32?"\\x"+t.toString(16):"\\"+e}function Ai(e,t){for(var r=0;t.exec(e);)++r;return r}var Ra=Function.prototype.toString,Oa={prefix:"async \u0192"},Va={prefix:"async \u0192*"},Ci={prefix:"class"},Ma={prefix:"\u0192"},qa={prefix:"\u0192*"};function fr(e,t){var r,i,n=Ra.call(e);switch(e.constructor&&e.constructor.name){case"AsyncFunction":r=Oa;break;case"AsyncGeneratorFunction":r=Va;break;case"GeneratorFunction":r=qa;break;default:r=/^class\b/.test(n)?Ci:Ma;break}return r===Ci?Ze(r,"",t):(i=/^(?:async\s*)?(\w+)\s*=>/.exec(n))?Ze(r,"("+i[1]+")",t):(i=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(n))?Ze(r,i[1]?"("+i[1].replace(/\s*,\s*/g,", ")+")":"()",t):(i=/^(?:async\s*)?function(?:\s*\*)?(?:\s*\w+)?\s*\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(n))?Ze(r,i[1]?"("+i[1].replace(/\s*,\s*/g,", ")+")":"()",t):Ze(r,"(\u2026)",t)}function Ze(e,t,r){var i=document.createElement("span");i.className="observablehq--function",r&&i.appendChild(L(r));var n=i.appendChild(document.createElement("span"));return n.className="observablehq--keyword",n.textContent=e.prefix,i.appendChild(document.createTextNode(t)),i}var{prototype:{toString:ja}}=Object;function B(e,t,r,i,n){let s=typeof e;switch(s){case"boolean":case"undefined":{e+="";break}case"number":{e=e===0&&1/e<0?"-0":e+"";break}case"bigint":{e=e+"n";break}case"symbol":{e=Z(e,i);break}case"function":return fr(e,i);case"string":return hr(e,t,r,i);default:{if(e===null){s=null,e="null";break}if(e instanceof Date){s="date",e=ur(e,i);break}if(e===ar){s="forbidden",e="[forbidden]";break}switch(ja.call(e)){case"[object RegExp]":{s="regexp",e=lr(e,i);break}case"[object Error]":case"[object DOMException]":{s="error",e=cr(e,i);break}default:return(r?Ke:De)(e,t,i,n)}break}}let a=document.createElement("span");i&&a.appendChild(L(i));let u=a.appendChild(document.createElement("span"));return u.className=`observablehq--${s}`,u.textContent=e,a}function ye(e,t){e.classList.contains("observablehq--inspect")&&t.classList.add("observablehq--inspect"),e.parentNode.replaceChild(t,e),pe(t,"load")}var Ua=/\s+\(\d+:\d+\)$/m,ge=class{constructor(t){if(!t)throw new Error("invalid node");this._node=t,t.classList.add("observablehq")}pending(){let{_node:t}=this;t.classList.remove("observablehq--error"),t.classList.add("observablehq--running")}fulfilled(t,r){let{_node:i}=this;if((!$a(t)||t.parentNode&&t.parentNode!==i)&&(t=B(t,!1,i.firstChild&&i.firstChild.classList&&i.firstChild.classList.contains("observablehq--expanded"),r),t.classList.add("observablehq--inspect")),i.classList.remove("observablehq--running","observablehq--error"),i.firstChild!==t)if(i.firstChild){for(;i.lastChild!==i.firstChild;)i.removeChild(i.lastChild);i.replaceChild(t,i.firstChild)}else i.appendChild(t);pe(i,"update")}rejected(t,r){let{_node:i}=this;for(i.classList.remove("observablehq--running"),i.classList.add("observablehq--error");i.lastChild;)i.removeChild(i.lastChild);var n=document.createElement("div");n.className="observablehq--inspect",r&&n.appendChild(L(r)),n.appendChild(document.createTextNode((t+"").replace(Ua,""))),i.appendChild(n),pe(i,"error",{error:t})}};ge.into=function(e){if(typeof e=="string"&&(e=document.querySelector(e),e==null))throw new Error("container not found");return function(){return new ge(e.appendChild(document.createElement("div")))}};function $a(e){return(e instanceof Element||e instanceof Text)&&e instanceof e.constructor}var Si={},dr={},mr=34,Xe=10,xr=13;function Ii(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+'] || ""'}).join(",")+"}")}function Wa(e,t){var r=Ii(e);return function(i,n){return t(r(i),n,e)}}function ki(e){var t=Object.create(null),r=[];return e.forEach(function(i){for(var n in i)n in t||r.push(t[n]=n)}),r}function M(e,t){var r=e+"",i=r.length;return i<t?new Array(t-i+1).join(0)+r:r}function za(e){return e<0?"-"+M(-e,6):e>9999?"+"+M(e,6):M(e,4)}function Ha(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),i=e.getUTCSeconds(),n=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":za(e.getUTCFullYear(),4)+"-"+M(e.getUTCMonth()+1,2)+"-"+M(e.getUTCDate(),2)+(n?"T"+M(t,2)+":"+M(r,2)+":"+M(i,2)+"."+M(n,3)+"Z":i?"T"+M(t,2)+":"+M(r,2)+":"+M(i,2)+"Z":r||t?"T"+M(t,2)+":"+M(r,2)+"Z":"")}function At(e){var t=new RegExp('["'+e+`
8
+ \r]`),r=e.charCodeAt(0);function i(p,f){var x,y,C=n(p,function(T,m){if(x)return x(T,m-1);y=T,x=f?Wa(T,f):Ii(T)});return C.columns=y||[],C}function n(p,f){var x=[],y=p.length,C=0,T=0,m,v=y<=0,E=!1;p.charCodeAt(y-1)===Xe&&--y,p.charCodeAt(y-1)===xr&&--y;function k(){if(v)return dr;if(E)return E=!1,Si;var xt,yt=C,He;if(p.charCodeAt(yt)===mr){for(;C++<y&&p.charCodeAt(C)!==mr||p.charCodeAt(++C)===mr;);return(xt=C)>=y?v=!0:(He=p.charCodeAt(C++))===Xe?E=!0:He===xr&&(E=!0,p.charCodeAt(C)===Xe&&++C),p.slice(yt+1,xt-1).replace(/""/g,'"')}for(;C<y;){if((He=p.charCodeAt(xt=C++))===Xe)E=!0;else if(He===xr)E=!0,p.charCodeAt(C)===Xe&&++C;else if(He!==r)continue;return p.slice(yt,xt)}return v=!0,p.slice(yt,y)}for(;(m=k())!==dr;){for(var mt=[];m!==Si&&m!==dr;)mt.push(m),m=k();f&&(mt=f(mt,T++))==null||x.push(mt)}return x}function s(p,f){return p.map(function(x){return f.map(function(y){return h(x[y])}).join(e)})}function a(p,f){return f==null&&(f=ki(p)),[f.map(h).join(e)].concat(s(p,f)).join(`
9
+ `)}function u(p,f){return f==null&&(f=ki(p)),s(p,f).join(`
10
10
  `)}function c(p){return p.map(l).join(`
11
- `)}function l(p){return p.map(h).join(e)}function h(p){return p==null?"":p instanceof Date?Ha(p):t.test(p+="")?'"'+p.replace(/"/g,'""')+'"':p}return{parse:i,parseRows:n,format:a,formatBody:o,formatRows:c,formatRow:l,formatValue:h}}var be=At(","),yr=be.parse,gr=be.parseRows,Ga=be.format,Ya=be.formatBody,Ka=be.formatRows,Qa=be.formatRow,Ja=be.formatValue;var ve=At(" "),br=ve.parse,vr=ve.parseRows,Za=ve.format,Xa=ve.formatBody,eo=ve.formatRows,to=ve.formatRow,ro=ve.formatValue;function Ct(e){for(var t in e){var r=e[t].trim(),i,n;if(!r)r=null;else if(r==="true")r=!0;else if(r==="false")r=!1;else if(r==="NaN")r=NaN;else if(!isNaN(i=+r))r=i;else if(n=r.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))io&&n[4]&&!n[7]&&(r=r.replace(/-/g,"/").replace(/T/," ")),r=new Date(r);else continue;e[t]=r}return e}var io=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function F(e,t,r){return{resolve(i=r){return`${e}@${t}/${i}`}}}var Fi=F("d3","7.9.0","dist/d3.min.js"),Di=F("@observablehq/inputs","0.11.0","dist/inputs.min.js"),Ti=F("@observablehq/plot","0.6.16","dist/plot.umd.min.js"),Ni=F("@observablehq/graphviz","0.2.1","dist/graphviz.min.js"),St=F("@observablehq/highlight.js","2.0.0","highlight.min.js"),wr=F("@observablehq/katex","0.11.1","dist/katex.min.js"),Pi=F("lodash","4.17.21","lodash.min.js"),Bi=F("htl","0.3.1","dist/htl.min.js"),Li=F("jszip","3.10.1","dist/jszip.min.js"),Ri=F("marked","0.3.12","marked.min.js"),Er=F("sql.js","1.8.0","dist/sql-wasm.js"),Oi=F("vega","5.22.1","build/vega.min.js"),Vi=F("vega-lite","5.6.0","build/vega-lite.min.js"),Mi=F("vega-lite-api","5.0.0","build/vega-lite-api.min.js"),Xe=F("apache-arrow","4.0.1","Arrow.es2015.min.js"),qi=F("apache-arrow","9.0.0","+esm"),kt=F("apache-arrow","11.0.0","+esm"),ji=F("arquero","4.8.8","dist/arquero.min.js"),Ui=F("topojson-client","3.1.0","dist/topojson-client.min.js"),$i=F("exceljs","4.3.0","dist/exceljs.min.js"),zi=F("mermaid","9.2.2","dist/mermaid.min.js"),_r=F("leaflet","1.9.3","dist/leaflet.js"),Te=F("@duckdb/duckdb-wasm","1.24.0","+esm");var It=new Map,et=[],Ar=et.map,no=et.some,so=et.hasOwnProperty,ao=/^((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?(?:\/(.*))?$/,oo=/^\d+\.\d+\.\d+(-[\w-.+]+)?$/,Wi=/(?:\.[^/]*|\/)$/,pe=class extends Error{constructor(t){super(t)}};pe.prototype.name=pe.name;function Hi(e){let t=ao.exec(e);return t&&{name:t[1],version:t[2],path:t[3]}}function Cr(e="https://cdn.jsdelivr.net/npm/",t=["unpkg","jsdelivr","browser","main"]){if(!/\/$/.test(e))throw new Error("origin lacks trailing slash");function r(n){for(let s of t){let a=n[s];if(typeof a=="string")return a.startsWith("./")&&(a=a.slice(2)),Wi.test(a)?a:`${a}.js`}}function i(n){let s=`${e}${n.name}${n.version?`@${n.version}`:""}/package.json`,a=It.get(s);return a||It.set(s,a=fetch(s).then(o=>{if(!o.ok)throw new pe("unable to load package.json");return o.redirected&&!It.has(o.url)&&It.set(o.url,a),o.json()})),a}return async function(s,a){if(s.startsWith(e)&&(s=s.substring(e.length)),/^(\w+:)|\/\//i.test(s))return s;if(/^[.]{0,2}\//i.test(s))return new URL(s,a??location).href;if(!s.length||/^[\s._]/.test(s)||/\s$/.test(s))throw new pe("illegal name");let o=Hi(s);if(!o)return`${e}${s}`;if(!o.version&&a!=null&&a.startsWith(e)){let l=await i(Hi(a.substring(e.length)));o.version=l.dependencies&&l.dependencies[o.name]||l.peerDependencies&&l.peerDependencies[o.name]}if(o.path&&!Wi.test(o.path)&&(o.path+=".js"),o.path&&o.version&&oo.test(o.version))return`${e}${o.name}@${o.version}/${o.path}`;let c=await i(o);return`${e}${c.name}@${c.version}/${o.path||r(c)||"index.js"}`}}var Gi=Ne(Cr());function Ne(e){let t=new Map,r=n(null);function i(o){if(typeof o!="string")return o;let c=t.get(o);return c||t.set(o,c=new Promise((l,h)=>{let p=document.createElement("script");p.onload=()=>{try{l(et.pop()(n(o)))}catch{h(new pe("invalid module"))}p.remove()},p.onerror=()=>{h(new pe("unable to load module")),p.remove()},p.async=!0,p.src=o,window.define=Yi,document.head.appendChild(p)})),c}function n(o){return c=>Promise.resolve(e(c,o)).then(i)}function s(o){return Ne((c,l)=>c in o&&(c=o[c],l=null,typeof c!="string")?c:e(c,l))}function a(o){return arguments.length>1?Promise.all(Ar.call(arguments,r)).then(uo):r(o)}return a.alias=s,a.resolve=e,a}function uo(e){let t={};for(let r of e)for(let i in r)so.call(r,i)&&(r[i]==null?Object.defineProperty(t,i,{get:co(r,i)}):t[i]=r[i]);return t}function co(e,t){return()=>e[t]}function lo(e){return e=e+"",e==="exports"||e==="module"}function Yi(e,t,r){let i=arguments.length;i<2?(r=e,t=[]):i<3&&(r=t,t=typeof e=="string"?[]:e),et.push(no.call(t,lo)?n=>{let s={},a={exports:s};return Promise.all(Ar.call(t,o=>(o=o+"",o==="exports"?s:o==="module"?a:n(o)))).then(o=>(r.apply(null,o),a.exports))}:n=>Promise.all(Ar.call(t,n)).then(s=>typeof r=="function"?r.apply(null,s):r))}Yi.amd={};var Y="https://cdn.observableusercontent.com/npm/",K=Gi;function Ki(e){K=e}function Qi(e){return e==null?K:Ne(e)}async function Ir(e){let[t,r]=await Promise.all([e(Er.resolve()),e.resolve(Er.resolve("dist/"))]);return t({locateFile:i=>`${r}${i}`})}var we=class e{constructor(t){Object.defineProperties(this,{_db:{value:t}})}static async open(t){let[r,i]=await Promise.all([Ir(K),Promise.resolve(t).then(kr)]);return new e(new r.Database(i))}async query(t,r){return await ho(this._db,t,r)}async queryRow(t,r){return(await this.query(t,r))[0]||null}async explain(t,r){let i=await this.query(`EXPLAIN QUERY PLAN ${t}`,r);return he("pre",{className:"observablehq--inspect"},[Sr(i.map(n=>n.detail).join(`
12
- `))])}async describeTables({schema:t}={}){return this.query(`SELECT NULLIF(schema, 'main') AS schema, name FROM pragma_table_list() WHERE type = 'table'${t==null?"":" AND schema = ?"} AND name NOT LIKE 'sqlite_%' ORDER BY schema, name`,t==null?[]:[t])}async describeColumns({schema:t,table:r}={}){if(r==null)throw new Error("missing table");let i=await this.query(`SELECT name, type, "notnull" FROM pragma_table_info(?${t==null?"":", ?"}) ORDER BY cid`,t==null?[r]:[r,t]);if(!i.length)throw new Error(`table not found: ${r}`);return i.map(({name:n,type:s,notnull:a})=>({name:n,type:po(s),databaseType:s,nullable:!a}))}async describe(t){let r=await(t===void 0?this.query("SELECT name FROM sqlite_master WHERE type = 'table'"):this.query("SELECT * FROM pragma_table_info(?)",[t]));if(!r.length)throw new Error("Not found");let{columns:i}=r;return he("table",{value:r},[he("thead",[he("tr",i.map(n=>he("th",[Sr(n)])))]),he("tbody",r.map(n=>he("tr",i.map(s=>he("td",[Sr(n[s])])))))])}async sql(){return this.query(...this.queryTag.apply(this,arguments))}queryTag(t,...r){return[t.join("?"),r]}};Object.defineProperty(we.prototype,"dialect",{value:"sqlite"});function po(e){switch(e){case"NULL":return"null";case"INT":case"INTEGER":case"TINYINT":case"SMALLINT":case"MEDIUMINT":case"BIGINT":case"UNSIGNED BIG INT":case"INT2":case"INT8":return"integer";case"TEXT":case"CLOB":return"string";case"REAL":case"DOUBLE":case"DOUBLE PRECISION":case"FLOAT":case"NUMERIC":return"number";case"BLOB":return"buffer";case"DATE":case"DATETIME":return"string";default:return/^(?:(?:(?:VARYING|NATIVE) )?CHARACTER|(?:N|VAR|NVAR)CHAR)\(/.test(e)?"string":/^(?:DECIMAL|NUMERIC)\(/.test(e)?"number":"other"}}function kr(e){return typeof e=="string"?fetch(e).then(kr):e instanceof Response||e instanceof Blob?e.arrayBuffer().then(kr):e instanceof ArrayBuffer?new Uint8Array(e):e}async function ho(e,t,r){let[i]=await e.exec(t,r);if(!i)return[];let{columns:n,values:s}=i,a=s.map(o=>Object.fromEntries(o.map((c,l)=>[n[l],c])));return a.columns=n,a}function he(e,t,r){arguments.length===2&&(r=t,t=void 0);let i=document.createElement(e);if(t!==void 0)for(let n in t)i[n]=t[n];if(r!==void 0)for(let n of r)i.appendChild(n);return i}function Sr(e){return document.createTextNode(e)}function tt(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ft(e,t=tt){let r,i=!1;if(t.length===1){let n;for(let s of e){let a=t(s);(i?tt(a,n)>0:tt(a,a)===0)&&(r=s,n=a,i=!0)}}else for(let n of e)(i?t(n,r)>0:t(n,n)===0)&&(r=n,i=!0);return r}function Dt(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(e).reverse()}function Pe(e){return e&&typeof e.toArrowBuffer=="function"}function Ee(e){return e&&typeof e.getChild=="function"&&typeof e.toArray=="function"&&e.schema&&Array.isArray(e.schema.fields)}function Fr(e){return e.schema.fields.map(fo)}function fo(e){return{name:e.name,type:mo(e.type),nullable:e.nullable,databaseType:String(e.type)}}function mo(e){switch(e.typeId){case 2:return"integer";case 3:case 7:return"number";case 4:case 15:return"buffer";case 5:return"string";case 6:return"boolean";case 8:case 9:case 10:return"date";case 12:case 16:return"array";case 13:case 14:return"object";case 11:case 17:default:return"other"}}async function rt(){return await import(`${Y}${kt.resolve()}`)}var Dr,_e=class e{constructor(t){Object.defineProperties(this,{_db:{value:t}})}async queryStream(t,r){let i=await this._db.connect(),n,s;try{if(r?.length>0?n=await(await i.prepare(t)).send(...r):n=await i.send(t),s=await n.next(),s.done)throw new Error("missing first batch")}catch(a){throw await i.close(),a}return{schema:Fr(s.value),async*readRows(){try{for(;!s.done;)yield s.value.toArray(),s=await n.next()}finally{await i.close()}}}}async query(t,r){let i=await this.queryStream(t,r),n=[];for await(let s of i.readRows())for(let a of s)n.push(a);return n.schema=i.schema,n}async queryRow(t,r){let n=(await this.queryStream(t,r)).readRows();try{let{done:s,value:a}=await n.next();return s||!a.length?null:a[0]}finally{await n.return()}}async sql(t,...r){return await this.query(t.join("?"),r)}queryTag(t,...r){return[t.join("?"),r]}escape(t){return`"${t}"`}async describeTables(){return(await this.query("SHOW TABLES")).map(({name:r})=>({name:r}))}async describeColumns({table:t}={}){return(await this.query(`DESCRIBE ${this.escape(t)}`)).map(({column_name:i,column_type:n,null:s})=>({name:i,type:vo(n),nullable:s!=="NO",databaseType:n}))}static async of(t={},r={}){let i=await bo();return r.query?.castTimestampToDate===void 0&&(r={...r,query:{...r.query,castTimestampToDate:!0}}),r.query?.castBigIntToDouble===void 0&&(r={...r,query:{...r.query,castBigIntToDouble:!0}}),await i.open(r),await Promise.all(Object.entries(t).map(async([n,s])=>{if(s instanceof I)await Ji(i,n,s);else if(Ee(s))await Tt(i,n,s);else if(Array.isArray(s))await Zi(i,n,s);else if(Pe(s))await yo(i,n,s);else if("data"in s){let{data:a,...o}=s;Ee(a)?await Tt(i,n,a,o):await Zi(i,n,a,o)}else if("file"in s){let{file:a,...o}=s;await Ji(i,n,a,o)}else throw new Error(`invalid source: ${s}`)})),new e(i)}};Object.defineProperty(_e.prototype,"dialect",{value:"duckdb"});async function Ji(e,t,r,i){let n=await r.url();if(n.startsWith("blob:")){let a=await r.arrayBuffer();await e.registerFileBuffer(r.name,new Uint8Array(a))}else await e.registerFileURL(r.name,new URL(n,location).href,4);let s=await e.connect();try{switch(r.mimeType){case"text/csv":case"text/tab-separated-values":return await s.insertCSVFromPath(r.name,{name:t,schema:"main",...i}).catch(async a=>{if(a.toString().includes("Could not convert"))return await xo(s,r,t);throw a});case"application/json":return await s.insertJSONFromPath(r.name,{name:t,schema:"main",...i});default:if(/\.arrow$/i.test(r.name)){let a=new Uint8Array(await r.arrayBuffer());return await s.insertArrowFromIPCStream(a,{name:t,schema:"main",...i})}if(/\.parquet$/i.test(r.name))return await s.query(`CREATE VIEW '${t}' AS SELECT * FROM parquet_scan('${r.name}')`);throw new Error(`unknown file type: ${r.mimeType}`)}}finally{await s.close()}}async function xo(e,t,r){return await(await e.prepare(`CREATE TABLE '${r}' AS SELECT * FROM read_csv_auto(?, ALL_VARCHAR=TRUE)`)).send(t.name)}async function Tt(e,t,r,i){let n=await e.connect();try{await n.insertArrowTable(r,{name:t,schema:"main",...i})}finally{await n.close()}}async function yo(e,t,r){let n=(await rt()).tableFromIPC(r.toArrowBuffer());return await Tt(e,t,n)}async function Zi(e,t,r,i){let s=(await rt()).tableFromJSON(r);return await Tt(e,t,s,i)}async function go(){let e=await import(`${Y}${Te.resolve()}`),t=await e.selectBundle({mvp:{mainModule:`${Y}${Te.resolve("dist/duckdb-mvp.wasm")}`,mainWorker:`${Y}${Te.resolve("dist/duckdb-browser-mvp.worker.js")}`},eh:{mainModule:`${Y}${Te.resolve("dist/duckdb-eh.wasm")}`,mainWorker:`${Y}${Te.resolve("dist/duckdb-browser-eh.worker.js")}`}}),r=new e.ConsoleLogger;return{module:e,bundle:t,logger:r}}async function bo(){Dr===void 0&&(Dr=go());let{module:e,bundle:t,logger:r}=await Dr,i=await e.createWorker(t.mainWorker),n=new e.AsyncDuckDB(r,i);return await n.instantiate(t.mainModule),n}function vo(e){switch(e){case"BIGINT":case"HUGEINT":case"UBIGINT":return"bigint";case"DOUBLE":case"REAL":case"FLOAT":return"number";case"INTEGER":case"SMALLINT":case"TINYINT":case"USMALLINT":case"UINTEGER":case"UTINYINT":return"integer";case"BOOLEAN":return"boolean";case"DATE":case"TIMESTAMP":case"TIMESTAMP WITH TIME ZONE":return"date";case"VARCHAR":case"UUID":return"string";default:return/^DECIMAL\(/.test(e)?"integer":"other"}}var Nr=20;function nn(e,t){return e&&(typeof e.sql=="function"||typeof e.queryTag=="function"&&(typeof e.query=="function"||typeof e.queryStream=="function"))&&(t!=="table"||typeof e.describeColumns=="function")&&e!==Br}function it(e){return Array.isArray(e)&&(sn(e.schema)||an(e.columns)||wo(e)||on(e)||un(e))||cn(e)}function wo(e){let t=Math.min(Nr,e.length);for(let r=0;r<t;++r){let i=e[r];if(i===null||typeof i!="object")return!1}return t>0&&Eo(e[0])}function Eo(e){for(let t in e)return!0;return!1}function sn(e){return Array.isArray(e)&&e.every(_o)}function an(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function _o(e){return e&&typeof e.name=="string"&&typeof e.type=="string"}function Pr(e){return cn(e)||on(e)||un(e)}function on(e){let t=Math.min(Nr,e.length);if(!(t>0))return!1;let r,i=!1;for(let n=0;n<t;++n){let s=e[n];if(s==null)continue;let a=typeof s;if(r===void 0)switch(a){case"number":case"boolean":case"string":case"bigint":r=a;break;default:return!1}else if(a!==r)return!1;i=!0}return i}function un(e){let t=Math.min(Nr,e.length);if(!(t>0))return!1;let r=!1;for(let i=0;i<t;++i){let n=e[i];if(n!=null){if(!(n instanceof Date))return!1;r=!0}}return r}function cn(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}var Br=Object.assign(async(e,t,r,i)=>{if(e=await Ao(await e,i),nn(e))return Xi(e,ln(t,e),r);if(it(e))return dn(e,t);throw e?new Error("invalid data source"):new Error("missing data source")},{sql(e,t,r){return async function(){return Xi(await Co(await e,r),arguments,t)}}});function Lr(e){let t=new WeakMap;return(r,i)=>{if(!r||typeof r!="object")throw new Error("invalid data source");let n=t.get(r);return(!n||it(r)&&r.length!==n._numRows)&&(n=e(r,i),n._numRows=r.length,t.set(r,n)),n}}var eh=Lr(async e=>{if(e instanceof I){switch(e.mimeType){case"text/csv":return e.csv({typed:"auto"});case"text/tab-separated-values":return e.tsv({typed:"auto"});case"application/json":return e.json()}throw new Error(`unsupported file type: ${e.mimeType}`)}return e}),Ao=Lr(async(e,t)=>{if(e instanceof I){switch(e.mimeType){case"text/csv":return e.csv();case"text/tab-separated-values":return e.tsv();case"application/json":return e.json();case"application/x-sqlite3":return e.sqlite()}if(/\.(arrow|parquet)$/i.test(e.name))return Le(e,t);throw new Error(`unsupported file type: ${e.mimeType}`)}return Ee(e)||Pe(e)?Le(e,t):it(e)&&Pr(e)?Array.from(e,r=>({value:r})):e}),Co=Lr(async(e,t)=>{if(e instanceof I){switch(e.mimeType){case"text/csv":case"text/tab-separated-values":case"application/json":return Le(e,t);case"application/x-sqlite3":return e.sqlite()}if(/\.(arrow|parquet)$/i.test(e.name))return Le(e,t);throw new Error(`unsupported file type: ${e.mimeType}`)}return it(e)?Le(await So(e,t),t):Ee(e)||Pe(e)?Le(e,t):e});async function So(e,t){let r=await rt();return Pr(e)?r.tableFromArrays({[t]:e}):r.tableFromJSON(e)}function Le(e,t=e instanceof I?ko(e):"__table"){return _e.of({[t]:e})}function ko(e){return e.name.replace(/@\d+(?=\.|$)/,"").replace(/\.\w+$/,"")}async function Xi(e,t,r){if(!e)throw new Error("missing data source");if(typeof e.queryTag=="function"){let i=new AbortController,n={signal:i.signal};if(r.then(()=>i.abort("invalidated")),typeof e.queryStream=="function")return Io(e.queryStream(...e.queryTag.apply(e,t),n));if(typeof e.query=="function")return e.query(...e.queryTag.apply(e,t),n)}if(typeof e.sql=="function")return e.sql.apply(e,t);throw new Error("source does not implement query, queryStream, or sql")}async function*Io(e){let t=performance.now(),r=await e,i=[];i.done=!1,i.error=null,i.schema=r.schema;try{for await(let n of r.readRows()){performance.now()-t>150&&i.length>0&&(yield i,t=performance.now());for(let s of n)i.push(s)}i.done=!0,yield i}catch(n){i.error=n,yield i}}function ln(e,t){let r=typeof t.escape=="function"?t.escape:p=>p,{select:i,from:n,filter:s,sort:a,slice:o}=e;if(!n.table)throw new Error("missing from table");if(i.columns&&i.columns.length===0)throw new Error("at least one column must be selected");let c=new Map(e.names?.map(({column:p,name:f})=>[p,f])),h=[[`SELECT ${i.columns?i.columns.map(p=>{let f=c.get(p);return f?`${r(p)} AS ${r(f)}`:r(p)}).join(", "):"*"} FROM ${Fo(n.table,r)}`]];for(let p=0;p<s.length;++p)N(p?`
11
+ `)}function l(p){return p.map(h).join(e)}function h(p){return p==null?"":p instanceof Date?Ha(p):t.test(p+="")?'"'+p.replace(/"/g,'""')+'"':p}return{parse:i,parseRows:n,format:a,formatBody:u,formatRows:c,formatRow:l,formatValue:h}}var be=At(","),yr=be.parse,gr=be.parseRows,Ga=be.format,Ya=be.formatBody,Ka=be.formatRows,Qa=be.formatRow,Ja=be.formatValue;var ve=At(" "),br=ve.parse,vr=ve.parseRows,Za=ve.format,Xa=ve.formatBody,eo=ve.formatRows,to=ve.formatRow,ro=ve.formatValue;function Ct(e){for(var t in e){var r=e[t].trim(),i,n;if(!r)r=null;else if(r==="true")r=!0;else if(r==="false")r=!1;else if(r==="NaN")r=NaN;else if(!isNaN(i=+r))r=i;else if(n=r.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))io&&n[4]&&!n[7]&&(r=r.replace(/-/g,"/").replace(/T/," ")),r=new Date(r);else continue;e[t]=r}return e}var io=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function F(e,t,r){return{resolve(i=r){return`${e}@${t}/${i}`}}}var Fi=F("d3","7.9.0","dist/d3.min.js"),Di=F("@observablehq/inputs","0.11.0","dist/inputs.min.js"),Ti=F("@observablehq/plot","0.6.16","dist/plot.umd.min.js"),Ni=F("@observablehq/graphviz","0.2.1","dist/graphviz.min.js"),St=F("@observablehq/highlight.js","2.0.0","highlight.min.js"),wr=F("@observablehq/katex","0.11.1","dist/katex.min.js"),Pi=F("lodash","4.17.21","lodash.min.js"),Bi=F("htl","0.3.1","dist/htl.min.js"),Li=F("jszip","3.10.1","dist/jszip.min.js"),Ri=F("marked","0.3.12","marked.min.js"),Er=F("sql.js","1.8.0","dist/sql-wasm.js"),Oi=F("vega","5.22.1","build/vega.min.js"),Vi=F("vega-lite","5.6.0","build/vega-lite.min.js"),Mi=F("vega-lite-api","5.0.0","build/vega-lite-api.min.js"),et=F("apache-arrow","4.0.1","Arrow.es2015.min.js"),qi=F("apache-arrow","9.0.0","+esm"),kt=F("apache-arrow","11.0.0","+esm"),ji=F("arquero","4.8.8","dist/arquero.min.js"),Ui=F("topojson-client","3.1.0","dist/topojson-client.min.js"),$i=F("exceljs","4.3.0","dist/exceljs.min.js"),Wi=F("mermaid","9.2.2","dist/mermaid.min.js"),_r=F("leaflet","1.9.3","dist/leaflet.js"),Te=F("@duckdb/duckdb-wasm","1.24.0","+esm");var It=new Map,tt=[],Ar=tt.map,no=tt.some,so=tt.hasOwnProperty,ao=/^((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?(?:\/(.*))?$/,oo=/^\d+\.\d+\.\d+(-[\w-.+]+)?$/,zi=/(?:\.[^/]*|\/)$/,he=class extends Error{constructor(t){super(t)}};he.prototype.name=he.name;function Hi(e){let t=ao.exec(e);return t&&{name:t[1],version:t[2],path:t[3]}}function Cr(e="https://cdn.jsdelivr.net/npm/",t=["unpkg","jsdelivr","browser","main"]){if(!/\/$/.test(e))throw new Error("origin lacks trailing slash");function r(n){for(let s of t){let a=n[s];if(typeof a=="string")return a.startsWith("./")&&(a=a.slice(2)),zi.test(a)?a:`${a}.js`}}function i(n){let s=`${e}${n.name}${n.version?`@${n.version}`:""}/package.json`,a=It.get(s);return a||It.set(s,a=fetch(s).then(u=>{if(!u.ok)throw new he("unable to load package.json");return u.redirected&&!It.has(u.url)&&It.set(u.url,a),u.json()})),a}return async function(s,a){if(s.startsWith(e)&&(s=s.substring(e.length)),/^(\w+:)|\/\//i.test(s))return s;if(/^[.]{0,2}\//i.test(s))return new URL(s,a??location).href;if(!s.length||/^[\s._]/.test(s)||/\s$/.test(s))throw new he("illegal name");let u=Hi(s);if(!u)return`${e}${s}`;if(!u.version&&a!=null&&a.startsWith(e)){let l=await i(Hi(a.substring(e.length)));u.version=l.dependencies&&l.dependencies[u.name]||l.peerDependencies&&l.peerDependencies[u.name]}if(u.path&&!zi.test(u.path)&&(u.path+=".js"),u.path&&u.version&&oo.test(u.version))return`${e}${u.name}@${u.version}/${u.path}`;let c=await i(u);return`${e}${c.name}@${c.version}/${u.path||r(c)||"index.js"}`}}var Gi=Ne(Cr());function Ne(e){let t=new Map,r=n(null);function i(u){if(typeof u!="string")return u;let c=t.get(u);return c||t.set(u,c=new Promise((l,h)=>{let p=document.createElement("script");p.onload=()=>{try{l(tt.pop()(n(u)))}catch{h(new he("invalid module"))}p.remove()},p.onerror=()=>{h(new he("unable to load module")),p.remove()},p.async=!0,p.src=u,window.define=Yi,document.head.appendChild(p)})),c}function n(u){return c=>Promise.resolve(e(c,u)).then(i)}function s(u){return Ne((c,l)=>c in u&&(c=u[c],l=null,typeof c!="string")?c:e(c,l))}function a(u){return arguments.length>1?Promise.all(Ar.call(arguments,r)).then(uo):r(u)}return a.alias=s,a.resolve=e,a}function uo(e){let t={};for(let r of e)for(let i in r)so.call(r,i)&&(r[i]==null?Object.defineProperty(t,i,{get:co(r,i)}):t[i]=r[i]);return t}function co(e,t){return()=>e[t]}function lo(e){return e=e+"",e==="exports"||e==="module"}function Yi(e,t,r){let i=arguments.length;i<2?(r=e,t=[]):i<3&&(r=t,t=typeof e=="string"?[]:e),tt.push(no.call(t,lo)?n=>{let s={},a={exports:s};return Promise.all(Ar.call(t,u=>(u=u+"",u==="exports"?s:u==="module"?a:n(u)))).then(u=>(r.apply(null,u),a.exports))}:n=>Promise.all(Ar.call(t,n)).then(s=>typeof r=="function"?r.apply(null,s):r))}Yi.amd={};var Y="https://cdn.observableusercontent.com/npm/",K=Gi;function Ki(e){K=e}function Qi(e){return e==null?K:Ne(e)}async function Ir(e){let[t,r]=await Promise.all([e(Er.resolve()),e.resolve(Er.resolve("dist/"))]);return t({locateFile:i=>`${r}${i}`})}var we=class e{constructor(t){Object.defineProperties(this,{_db:{value:t}})}static async open(t){let[r,i]=await Promise.all([Ir(K),Promise.resolve(t).then(kr)]);return new e(new r.Database(i))}async query(t,r){return await ho(this._db,t,r)}async queryRow(t,r){return(await this.query(t,r))[0]||null}async explain(t,r){let i=await this.query(`EXPLAIN QUERY PLAN ${t}`,r);return fe("pre",{className:"observablehq--inspect"},[Sr(i.map(n=>n.detail).join(`
12
+ `))])}async describeTables({schema:t}={}){return this.query(`SELECT NULLIF(schema, 'main') AS schema, name FROM pragma_table_list() WHERE type = 'table'${t==null?"":" AND schema = ?"} AND name NOT LIKE 'sqlite_%' ORDER BY schema, name`,t==null?[]:[t])}async describeColumns({schema:t,table:r}={}){if(r==null)throw new Error("missing table");let i=await this.query(`SELECT name, type, "notnull" FROM pragma_table_info(?${t==null?"":", ?"}) ORDER BY cid`,t==null?[r]:[r,t]);if(!i.length)throw new Error(`table not found: ${r}`);return i.map(({name:n,type:s,notnull:a})=>({name:n,type:po(s),databaseType:s,nullable:!a}))}async describe(t){let r=await(t===void 0?this.query("SELECT name FROM sqlite_master WHERE type = 'table'"):this.query("SELECT * FROM pragma_table_info(?)",[t]));if(!r.length)throw new Error("Not found");let{columns:i}=r;return fe("table",{value:r},[fe("thead",[fe("tr",i.map(n=>fe("th",[Sr(n)])))]),fe("tbody",r.map(n=>fe("tr",i.map(s=>fe("td",[Sr(n[s])])))))])}async sql(){return this.query(...this.queryTag.apply(this,arguments))}queryTag(t,...r){return[t.join("?"),r]}};Object.defineProperty(we.prototype,"dialect",{value:"sqlite"});function po(e){switch(e){case"NULL":return"null";case"INT":case"INTEGER":case"TINYINT":case"SMALLINT":case"MEDIUMINT":case"BIGINT":case"UNSIGNED BIG INT":case"INT2":case"INT8":return"integer";case"TEXT":case"CLOB":return"string";case"REAL":case"DOUBLE":case"DOUBLE PRECISION":case"FLOAT":case"NUMERIC":return"number";case"BLOB":return"buffer";case"DATE":case"DATETIME":return"string";default:return/^(?:(?:(?:VARYING|NATIVE) )?CHARACTER|(?:N|VAR|NVAR)CHAR)\(/.test(e)?"string":/^(?:DECIMAL|NUMERIC)\(/.test(e)?"number":"other"}}function kr(e){return typeof e=="string"?fetch(e).then(kr):e instanceof Response||e instanceof Blob?e.arrayBuffer().then(kr):e instanceof ArrayBuffer?new Uint8Array(e):e}async function ho(e,t,r){let[i]=await e.exec(t,r);if(!i)return[];let{columns:n,values:s}=i,a=s.map(u=>Object.fromEntries(u.map((c,l)=>[n[l],c])));return a.columns=n,a}function fe(e,t,r){arguments.length===2&&(r=t,t=void 0);let i=document.createElement(e);if(t!==void 0)for(let n in t)i[n]=t[n];if(r!==void 0)for(let n of r)i.appendChild(n);return i}function Sr(e){return document.createTextNode(e)}function rt(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ft(e,t=rt){let r,i=!1;if(t.length===1){let n;for(let s of e){let a=t(s);(i?rt(a,n)>0:rt(a,a)===0)&&(r=s,n=a,i=!0)}}else for(let n of e)(i?t(n,r)>0:t(n,n)===0)&&(r=n,i=!0);return r}function Dt(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(e).reverse()}function Pe(e){return e&&typeof e.toArrowBuffer=="function"}function Ee(e){return e&&typeof e.getChild=="function"&&typeof e.toArray=="function"&&e.schema&&Array.isArray(e.schema.fields)}function Fr(e){return e.schema.fields.map(fo)}function fo(e){return{name:e.name,type:mo(e.type),nullable:e.nullable,databaseType:String(e.type)}}function mo(e){switch(e.typeId){case 2:return"integer";case 3:case 7:return"number";case 4:case 15:return"buffer";case 5:return"string";case 6:return"boolean";case 8:case 9:case 10:return"date";case 12:case 16:return"array";case 13:case 14:return"object";case 11:case 17:default:return"other"}}async function it(){return await import(`${Y}${kt.resolve()}`)}var Dr,_e=class e{constructor(t){Object.defineProperties(this,{_db:{value:t}})}async queryStream(t,r){let i=await this._db.connect(),n,s;try{if(r?.length>0?n=await(await i.prepare(t)).send(...r):n=await i.send(t),s=await n.next(),s.done)throw new Error("missing first batch")}catch(a){throw await i.close(),a}return{schema:Fr(s.value),async*readRows(){try{for(;!s.done;)yield s.value.toArray(),s=await n.next()}finally{await i.close()}}}}async query(t,r){let i=await this.queryStream(t,r),n=[];for await(let s of i.readRows())for(let a of s)n.push(a);return n.schema=i.schema,n}async queryRow(t,r){let n=(await this.queryStream(t,r)).readRows();try{let{done:s,value:a}=await n.next();return s||!a.length?null:a[0]}finally{await n.return()}}async sql(t,...r){return await this.query(t.join("?"),r)}queryTag(t,...r){return[t.join("?"),r]}escape(t){return`"${t}"`}async describeTables(){return(await this.query("SHOW TABLES")).map(({name:r})=>({name:r}))}async describeColumns({table:t}={}){return(await this.query(`DESCRIBE ${this.escape(t)}`)).map(({column_name:i,column_type:n,null:s})=>({name:i,type:vo(n),nullable:s!=="NO",databaseType:n}))}static async of(t={},r={}){let i=await bo();return r.query?.castTimestampToDate===void 0&&(r={...r,query:{...r.query,castTimestampToDate:!0}}),r.query?.castBigIntToDouble===void 0&&(r={...r,query:{...r.query,castBigIntToDouble:!0}}),await i.open(r),await Promise.all(Object.entries(t).map(async([n,s])=>{if(s instanceof I)await Ji(i,n,s);else if(Ee(s))await Tt(i,n,s);else if(Array.isArray(s))await Zi(i,n,s);else if(Pe(s))await yo(i,n,s);else if("data"in s){let{data:a,...u}=s;Ee(a)?await Tt(i,n,a,u):await Zi(i,n,a,u)}else if("file"in s){let{file:a,...u}=s;await Ji(i,n,a,u)}else throw new Error(`invalid source: ${s}`)})),new e(i)}};Object.defineProperty(_e.prototype,"dialect",{value:"duckdb"});async function Ji(e,t,r,i){let n=await r.url();if(n.startsWith("blob:")){let a=await r.arrayBuffer();await e.registerFileBuffer(r.name,new Uint8Array(a))}else await e.registerFileURL(r.name,new URL(n,location).href,4);let s=await e.connect();try{switch(r.mimeType){case"text/csv":case"text/tab-separated-values":return await s.insertCSVFromPath(r.name,{name:t,schema:"main",...i}).catch(async a=>{if(a.toString().includes("Could not convert"))return await xo(s,r,t);throw a});case"application/json":return await s.insertJSONFromPath(r.name,{name:t,schema:"main",...i});default:if(/\.arrow$/i.test(r.name)){let a=new Uint8Array(await r.arrayBuffer());return await s.insertArrowFromIPCStream(a,{name:t,schema:"main",...i})}if(/\.parquet$/i.test(r.name))return await s.query(`CREATE VIEW '${t}' AS SELECT * FROM parquet_scan('${r.name}')`);throw new Error(`unknown file type: ${r.mimeType}`)}}finally{await s.close()}}async function xo(e,t,r){return await(await e.prepare(`CREATE TABLE '${r}' AS SELECT * FROM read_csv_auto(?, ALL_VARCHAR=TRUE)`)).send(t.name)}async function Tt(e,t,r,i){let n=await e.connect();try{await n.insertArrowTable(r,{name:t,schema:"main",...i})}finally{await n.close()}}async function yo(e,t,r){let n=(await it()).tableFromIPC(r.toArrowBuffer());return await Tt(e,t,n)}async function Zi(e,t,r,i){let s=(await it()).tableFromJSON(r);return await Tt(e,t,s,i)}async function go(){let e=await import(`${Y}${Te.resolve()}`),t=await e.selectBundle({mvp:{mainModule:`${Y}${Te.resolve("dist/duckdb-mvp.wasm")}`,mainWorker:`${Y}${Te.resolve("dist/duckdb-browser-mvp.worker.js")}`},eh:{mainModule:`${Y}${Te.resolve("dist/duckdb-eh.wasm")}`,mainWorker:`${Y}${Te.resolve("dist/duckdb-browser-eh.worker.js")}`}}),r=new e.ConsoleLogger;return{module:e,bundle:t,logger:r}}async function bo(){Dr===void 0&&(Dr=go());let{module:e,bundle:t,logger:r}=await Dr,i=await e.createWorker(t.mainWorker),n=new e.AsyncDuckDB(r,i);return await n.instantiate(t.mainModule),n}function vo(e){switch(e){case"BIGINT":case"HUGEINT":case"UBIGINT":return"bigint";case"DOUBLE":case"REAL":case"FLOAT":return"number";case"INTEGER":case"SMALLINT":case"TINYINT":case"USMALLINT":case"UINTEGER":case"UTINYINT":return"integer";case"BOOLEAN":return"boolean";case"DATE":case"TIMESTAMP":case"TIMESTAMP WITH TIME ZONE":return"date";case"VARCHAR":case"UUID":return"string";default:return/^DECIMAL\(/.test(e)?"integer":"other"}}var Nr=20;function nn(e,t){return e&&(typeof e.sql=="function"||typeof e.queryTag=="function"&&(typeof e.query=="function"||typeof e.queryStream=="function"))&&(t!=="table"||typeof e.describeColumns=="function")&&e!==Br}function nt(e){return Array.isArray(e)&&(sn(e.schema)||an(e.columns)||wo(e)||on(e)||un(e))||cn(e)}function wo(e){let t=Math.min(Nr,e.length);for(let r=0;r<t;++r){let i=e[r];if(i===null||typeof i!="object")return!1}return t>0&&Eo(e[0])}function Eo(e){for(let t in e)return!0;return!1}function sn(e){return Array.isArray(e)&&e.every(_o)}function an(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function _o(e){return e&&typeof e.name=="string"&&typeof e.type=="string"}function Pr(e){return cn(e)||on(e)||un(e)}function on(e){let t=Math.min(Nr,e.length);if(!(t>0))return!1;let r,i=!1;for(let n=0;n<t;++n){let s=e[n];if(s==null)continue;let a=typeof s;if(r===void 0)switch(a){case"number":case"boolean":case"string":case"bigint":r=a;break;default:return!1}else if(a!==r)return!1;i=!0}return i}function un(e){let t=Math.min(Nr,e.length);if(!(t>0))return!1;let r=!1;for(let i=0;i<t;++i){let n=e[i];if(n!=null){if(!(n instanceof Date))return!1;r=!0}}return r}function cn(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}var Br=Object.assign(async(e,t,r,i)=>{if(e=await Ao(await e,i),nn(e))return Xi(e,ln(t,e),r);if(nt(e))return dn(e,t);throw e?new Error("invalid data source"):new Error("missing data source")},{sql(e,t,r){return async function(){return Xi(await Co(await e,r),arguments,t)}}});function Lr(e){let t=new WeakMap;return(r,i)=>{if(!r||typeof r!="object")throw new Error("invalid data source");let n=t.get(r);return(!n||nt(r)&&r.length!==n._numRows)&&(n=e(r,i),n._numRows=r.length,t.set(r,n)),n}}var rh=Lr(async e=>{if(e instanceof I){switch(e.mimeType){case"text/csv":return e.csv({typed:"auto"});case"text/tab-separated-values":return e.tsv({typed:"auto"});case"application/json":return e.json()}throw new Error(`unsupported file type: ${e.mimeType}`)}return e}),Ao=Lr(async(e,t)=>{if(e instanceof I){switch(e.mimeType){case"text/csv":return e.csv();case"text/tab-separated-values":return e.tsv();case"application/json":return e.json();case"application/x-sqlite3":return e.sqlite()}if(/\.(arrow|parquet)$/i.test(e.name))return Le(e,t);throw new Error(`unsupported file type: ${e.mimeType}`)}return Ee(e)||Pe(e)?Le(e,t):nt(e)&&Pr(e)?Array.from(e,r=>({value:r})):e}),Co=Lr(async(e,t)=>{if(e instanceof I){switch(e.mimeType){case"text/csv":case"text/tab-separated-values":case"application/json":return Le(e,t);case"application/x-sqlite3":return e.sqlite()}if(/\.(arrow|parquet)$/i.test(e.name))return Le(e,t);throw new Error(`unsupported file type: ${e.mimeType}`)}return nt(e)?Le(await So(e,t),t):Ee(e)||Pe(e)?Le(e,t):e});async function So(e,t){let r=await it();return Pr(e)?r.tableFromArrays({[t]:e}):r.tableFromJSON(e)}function Le(e,t=e instanceof I?ko(e):"__table"){return _e.of({[t]:e})}function ko(e){return e.name.replace(/@\d+(?=\.|$)/,"").replace(/\.\w+$/,"")}async function Xi(e,t,r){if(!e)throw new Error("missing data source");if(typeof e.queryTag=="function"){let i=new AbortController,n={signal:i.signal};if(r.then(()=>i.abort("invalidated")),typeof e.queryStream=="function")return Io(e.queryStream(...e.queryTag.apply(e,t),n));if(typeof e.query=="function")return e.query(...e.queryTag.apply(e,t),n)}if(typeof e.sql=="function")return e.sql.apply(e,t);throw new Error("source does not implement query, queryStream, or sql")}async function*Io(e){let t=performance.now(),r=await e,i=[];i.done=!1,i.error=null,i.schema=r.schema;try{for await(let n of r.readRows()){performance.now()-t>150&&i.length>0&&(yield i,t=performance.now());for(let s of n)i.push(s)}i.done=!0,yield i}catch(n){i.error=n,yield i}}function ln(e,t){let r=typeof t.escape=="function"?t.escape:p=>p,{select:i,from:n,filter:s,sort:a,slice:u}=e;if(!n.table)throw new Error("missing from table");if(i.columns&&i.columns.length===0)throw new Error("at least one column must be selected");let c=new Map(e.names?.map(({column:p,name:f})=>[p,f])),h=[[`SELECT ${i.columns?i.columns.map(p=>{let f=c.get(p);return f?`${r(p)} AS ${r(f)}`:r(p)}).join(", "):"*"} FROM ${Fo(n.table,r)}`]];for(let p=0;p<s.length;++p)N(p?`
13
13
  AND `:`
14
14
  WHERE `,h),Do(s[p],h,r);for(let p=0;p<a.length;++p)N(p?", ":`
15
- ORDER BY `,h),en(a[p],h,r);if(t.dialect==="mssql"||t.dialect==="oracle"){if(o.to!==null||o.from!==null){if(!a.length){if(!i.columns)throw new Error("at least one column must be explicitly specified. Received '*'.");N(`
15
+ ORDER BY `,h),en(a[p],h,r);if(t.dialect==="mssql"||t.dialect==="oracle"){if(u.to!==null||u.from!==null){if(!a.length){if(!i.columns)throw new Error("at least one column must be explicitly specified. Received '*'.");N(`
16
16
  ORDER BY `,h),en({column:i.columns[0],direction:"ASC"},h,r)}N(`
17
- OFFSET ${o.from||0} ROWS`,h),N(`
18
- FETCH NEXT ${o.to!==null?o.to-(o.from||0):1e9} ROWS ONLY`,h)}}else(o.to!==null||o.from!==null)&&N(`
19
- LIMIT ${o.to!==null?o.to-(o.from||0):1e9}`,h),o.from!==null&&N(` OFFSET ${o.from}`,h);return h}function Fo(e,t){if(typeof e=="object"){let r="";return e.database!=null&&(r+=t(e.database)+"."),e.schema!=null&&(r+=t(e.schema)+"."),r+=t(e.table),r}else return t(e)}function N(e,t){let r=t[0];r[r.length-1]+=e}function en({column:e,direction:t},r,i){N(`${i(e)} ${t.toUpperCase()}`,r)}function Do({type:e,operands:t},r,i){if(t.length<1)throw new Error("Invalid operand length");if(t.length===1||e==="v"||e==="nv")switch(Be(t[0],r,i),e){case"n":case"nv":N(" IS NULL",r);return;case"nn":case"v":N(" IS NOT NULL",r);return;default:throw new Error("Invalid filter operation")}if(t.length===2&&!["in","nin"].includes(e))if(["c","nc"].includes(e)){switch(Be(t[0],r,i),e){case"c":N(" LIKE ",r);break;case"nc":N(" NOT LIKE ",r);break}Be(No(t[1]),r,i);return}else{switch(Be(t[0],r,i),e){case"eq":N(" = ",r);break;case"ne":N(" <> ",r);break;case"gt":N(" > ",r);break;case"lt":N(" < ",r);break;case"gte":N(" >= ",r);break;case"lte":N(" <= ",r);break;default:throw new Error("Invalid filter operation")}Be(t[1],r,i);return}switch(Be(t[0],r,i),e){case"in":N(" IN (",r);break;case"nin":N(" NOT IN (",r);break;default:throw new Error("Invalid filter operation")}To(t.slice(1),r),N(")",r)}function Be(e,t,r){e.type==="column"?N(r(e.value),t):(t.push(e.value),t[0].push(""))}function To(e,t){let r=!0;for(let i of e)r?r=!1:N(",",t),t.push(i.value),t[0].push("")}function No(e){return{...e,value:`%${e.value}%`}}function pn(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))}function Po(e,t){return pn(e,t)||(e<t?-1:e>t?1:0)}function Bo(e,t){return pn(e,t)||(e>t?-1:e<t?1:0)}var Lo=e=>typeof e=="number"&&!Number.isNaN(e),Ro=e=>Number.isInteger(e)&&!Number.isNaN(e),Oo=e=>typeof e=="string",Vo=e=>typeof e=="boolean",Mo=e=>typeof e=="bigint",qo=e=>e instanceof Date&&!isNaN(e),jo=e=>e instanceof ArrayBuffer,Uo=e=>Array.isArray(e),$o=e=>typeof e=="object"&&e!==null,zo=e=>e!=null;function Tr(e){switch(e){case"string":return Oo;case"bigint":return Mo;case"boolean":return Vo;case"number":return Lo;case"integer":return Ro;case"date":return qo;case"buffer":return jo;case"array":return Uo;case"object":return $o;case"other":default:return zo}}var hn=/^(([-+]\d{2})?\d{4}(-\d{2}(-\d{2}))|(\d{1,2})\/(\d{1,2})\/(\d{2,4}))([T ]\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/;function Wo(e,t){switch(t){case"string":return typeof e=="string"||e==null?e:String(e);case"boolean":if(typeof e=="string"){let r=e.trim().toLowerCase();return r==="true"?!0:r==="false"?!1:null}return typeof e=="boolean"||e==null?e:!!e;case"bigint":return typeof e=="bigint"||e==null?e:Number.isInteger(typeof e=="string"&&!e.trim()?NaN:+e)?BigInt(e):void 0;case"integer":case"number":return typeof e=="number"?e:e==null||typeof e=="string"&&!e.trim()?NaN:Number(e);case"date":{if(e instanceof Date||e==null)return e;if(typeof e=="number")return new Date(e);let r=String(e).trim();return typeof e=="string"&&!r?null:new Date(hn.test(r)?r:NaN)}case"array":case"object":case"buffer":case"other":return e;default:throw new Error(`Unable to coerce to type: ${t}`)}}function fn(e){let{columns:t}=e,{schema:r}=e;return sn(r)?{schema:r,inferred:!1}:(r=Pt(e,an(t)?t:void 0),{schema:r,inferred:!0})}function tn(e,t){let r=e,{schema:i,inferred:n}=fn(e),s=new Map(i.map(({name:a,type:o})=>[a,o]));if(t.types){for(let{name:a,type:o}of t.types){s.set(a,o),i===r.schema&&(i=i.slice());let c=i.findIndex(l=>l.name===a);c>-1&&(i[c]={...i[c],type:o})}e=e.map(a=>Nt(a,s,i))}else n&&(e=e.map(a=>Nt(a,s,i)));return{source:e,schema:i}}function rn(e,t){if(!t.names)return e;let r=new Map(t.names.map(i=>[i.column,i]));return e.map(i=>Object.fromEntries(Object.keys(i).map(n=>[r.get(n)?.name??n,i[n]])))}function dn(e,t){let r=new Map,i=e,n=tn(e,t);e=n.source;let s=n.schema;if(t.derive){let l=[];t.derive.map(({name:p,value:f})=>{let x=[];rn(e,t).map((y,C)=>{let T;try{T=f(y)}catch(m){x.push({index:C,error:m}),T=void 0}l[C]?l[C]={...l[C],[p]:T}:l.push({[p]:T})}),x.length&&r.set(p,x)});let h=tn(l,t);e=e.map((p,f)=>({...p,...h.source[f]})),s=[...s,...h.schema]}for(let{type:l,operands:h}of t.filter){let[{value:p}]=h,f=h.slice(1).map(({value:x})=>x);switch(l){case"v":{let[x]=f,y=Tr(x);e=e.filter(C=>y(C[p]));break}case"nv":{let[x]=f,y=Tr(x);e=e.filter(C=>!y(C[p]));break}case"eq":{let[x]=f;if(x instanceof Date){let y=+x;e=e.filter(C=>+C[p]===y)}else e=e.filter(y=>y[p]===x);break}case"ne":{let[x]=f;e=e.filter(y=>y[p]!==x);break}case"c":{let[x]=f;e=e.filter(y=>typeof y[p]=="string"&&y[p].includes(x));break}case"nc":{let[x]=f;e=e.filter(y=>typeof y[p]=="string"&&!y[p].includes(x));break}case"in":{let x=new Set(f);e=e.filter(y=>x.has(y[p]));break}case"nin":{let x=new Set(f);e=e.filter(y=>!x.has(y[p]));break}case"n":{e=e.filter(x=>x[p]==null);break}case"nn":{e=e.filter(x=>x[p]!=null);break}case"lt":{let[x]=f;e=e.filter(y=>y[p]<x);break}case"lte":{let[x]=f;e=e.filter(y=>y[p]<=x);break}case"gt":{let[x]=f;e=e.filter(y=>y[p]>x);break}case"gte":{let[x]=f;e=e.filter(y=>y[p]>=x);break}default:throw new Error(`unknown filter type: ${l}`)}}for(let{column:l,direction:h}of Dt(t.sort)){let p=h==="desc"?Bo:Po;e===i&&(e=e.slice()),e.sort((f,x)=>p(f[l],x[l]))}let{from:a,to:o}=t.slice;a=a==null?0:Math.max(0,a),o=o==null?1/0:Math.max(0,o),(a>0||o<1/0)&&(e=e.slice(Math.max(0,a),Math.max(0,o)));let c=s.slice();if(t.select.columns){if(s){let l=new Map(s.map(h=>[h.name,h]));s=t.select.columns.map(h=>l.get(h))}e=e.map(l=>Object.fromEntries(t.select.columns.map(h=>[h,l[h]])))}if(t.names){let l=new Map(t.names.map(h=>[h.column,h]));s&&(s=s.map(h=>{let p=l.get(h.name);return{...h,...p?{name:p.name}:null}})),c&&(c=c.map(h=>{let p=l.get(h.name);return{...h,...p?{name:p.name}:null}})),e=rn(e,t)}return e!==i&&s&&(e.schema=s),e.fullSchema=c,e.errors=r,e}function Nt(e,t,r){let i={};for(let n of r){let s=t.get(n.name),a=e[n.name];i[n.name]=s==="raw"?a:Wo(a,s)}return i}function Ho(){return{boolean:0,integer:0,number:0,date:0,string:0,array:0,object:0,bigint:0,buffer:0,defined:0}}var Go=["boolean","integer","number","date","bigint","array","object","buffer"];function Yo(e){let t=new Set;for(let r of e)if(r)for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&t.add(i);return Array.from(t)}function Pt(e,t=Yo(e)){let r=[],n=e.slice(0,100),s={};for(let a of t){let o=s[a]=Ho();for(let h of n){let p=h[a];if(p==null)continue;let f=typeof p;if(f!=="string")++o.defined,Array.isArray(p)?++o.array:p instanceof Date?++o.date:p instanceof ArrayBuffer?++o.buffer:f==="number"?(++o.number,Number.isInteger(p)&&++o.integer):f in o&&++o[f];else{if(p=p.trim(),!p)continue;++o.defined,++o.string,/^(true|false)$/i.test(p)?++o.boolean:p&&!isNaN(p)?(++o.number,Number.isInteger(+p)&&++o.integer):hn.test(p)&&++o.date}}let c=Math.max(1,o.defined*.9),l=Ft(Go,h=>o[h]>=c?o[h]:NaN)??(o.string>=c?"string":"other");r.push({name:a,type:l,inferred:l})}return r}var Bt=class{constructor(t){Object.defineProperties(this,{_:{value:t},sheetNames:{value:t.worksheets.map(r=>r.name),enumerable:!0}})}sheet(t,r){let i=typeof t=="number"?this.sheetNames[t]:this.sheetNames.includes(t+="")?t:null;if(i==null)throw new Error(`Sheet not found: ${t}`);let n=this._.getWorksheet(i);return Ko(n,r)}};function Ko(e,{range:t,headers:r}={}){let[[i,n],[s,a]]=Qo(t,e),o=r?e._rows[n++]:null,c=new Set(["#"]);for(let h=i;h<=s;h++){let p=o?mn(o.findCell(h+1)):null,f=p&&p+""||Jo(h);for(;c.has(f);)f+="_";c.add(f)}c=new Array(i).concat(Array.from(c));let l=new Array(a-n+1);for(let h=n;h<=a;h++){let p=l[h-n]=Object.create(null,{"#":{value:h+1}}),f=e.getRow(h+1);if(f.hasValues)for(let x=i;x<=s;x++){let y=mn(f.findCell(x+1));y!=null&&(p[c[x+1]]=y)}}return l.columns=c.filter(()=>!0),l}function mn(e){if(!e)return;let{value:t}=e;if(t&&typeof t=="object"&&!(t instanceof Date)){if(t.formula||t.sharedFormula)return t.result&&t.result.error?NaN:t.result;if(t.richText)return xn(t);if(t.text){let{text:r}=t;return r.richText&&(r=xn(r)),t.hyperlink&&t.hyperlink!==r?`${t.hyperlink} ${r}`:r}return t}return t}function xn(e){return e.richText.map(t=>t.text).join("")}function Qo(e=":",{columnCount:t,rowCount:r}){if(e+="",!e.match(/^[A-Z]*\d*:[A-Z]*\d*$/))throw new Error("Malformed range specifier");let[[i=0,n=0],[s=t-1,a=r-1]]=e.split(":").map(Zo);return[[i,n],[s,a]]}function Jo(e){let t="";e++;do t=String.fromCharCode(64+(e%26||26))+t;while(e=Math.floor((e-1)/26));return t}function Zo(e){let[,t,r]=e.match(/^([A-Z]*)(\d*)$/),i=0;if(t)for(let n=0;n<t.length;n++)i+=Math.pow(26,t.length-n-1)*(t.charCodeAt(n)-64);return[i?i-1:void 0,r?+r-1:void 0]}async function se(e){let t=await fetch(await e.url());if(!t.ok)throw new Error(`Unable to load file: ${e.name}`);return t}function Xo(e,t){let r=new Map(t.map(({name:i,type:n})=>[i,n]));return Object.assign(e.map(i=>Nt(i,r,t)),{schema:t})}async function yn(e,t,{array:r=!1,typed:i=!1}={}){let n=await e.text(),s=t===" "?r?vr:br:r?gr:yr;if(i==="auto"&&!r){let a=s(n);return Xo(a,Pt(a,a.columns))}return s(n,i&&Ct)}var Ae=class{constructor(t,r){Object.defineProperty(this,"name",{value:t,enumerable:!0}),r!==void 0&&Object.defineProperty(this,"mimeType",{value:r+"",enumerable:!0})}async blob(){return(await se(this)).blob()}async arrayBuffer(){return(await se(this)).arrayBuffer()}async text(){return(await se(this)).text()}async json(){return(await se(this)).json()}async stream(){return(await se(this)).body}async csv(t){return yn(this,",",t)}async tsv(t){return yn(this," ",t)}async image(t){let r=await this.url();return new Promise((i,n)=>{let s=new Image;new URL(r,document.baseURI).origin!==new URL(location).origin&&(s.crossOrigin="anonymous"),Object.assign(s,t),s.onload=()=>i(s),s.onerror=()=>n(new Error(`Unable to load file: ${this.name}`)),s.src=r})}async arrow({version:t=4}={}){switch(t){case 4:{let[r,i]=await Promise.all([K(Xe.resolve()),se(this)]);return r.Table.from(i)}case 9:{let[r,i]=await Promise.all([import(`${Y}${qi.resolve()}`),se(this)]);return r.tableFromIPC(i)}case 11:{let[r,i]=await Promise.all([import(`${Y}${kt.resolve()}`),se(this)]);return r.tableFromIPC(i)}default:throw new Error(`unsupported arrow version: ${t}`)}}async sqlite(){return we.open(se(this))}async zip(){let[t,r]=await Promise.all([K(Li.resolve()),this.arrayBuffer()]);return new Rr(await t.loadAsync(r))}async xml(t="application/xml"){return new DOMParser().parseFromString(await this.text(),t)}async html(){return this.xml("text/html")}async xlsx(){let[t,r]=await Promise.all([K($i.resolve()),this.arrayBuffer()]);return new Bt(await new t.Workbook().xlsx.load(r))}},I=class extends Ae{constructor(t,r,i){super(r,i),Object.defineProperty(this,"_url",{value:t})}async url(){return await this._url+""}};function gn(e){throw new Error(`File not found: ${e}`)}function Vr(e){return Object.assign(t=>{let r=e(t+="");if(r==null)throw new Error(`File not found: ${t}`);if(typeof r=="object"&&"url"in r){let{url:i,mimeType:n}=r;return new I(i,t,n)}return new I(r,t)},{prototype:I.prototype})}var Rr=class{constructor(t){Object.defineProperty(this,"_",{value:t}),this.filenames=Object.keys(t.files).filter(r=>!t.files[r].dir)}file(t){let r=this._.file(t+="");if(!r||r.dir)throw new Error(`file not found: ${t}`);return new Or(r)}},Or=class extends Ae{constructor(t){super(t.name),Object.defineProperty(this,"_",{value:t}),Object.defineProperty(this,"_url",{writable:!0})}async url(){return this._url||(this._url=this.blob().then(URL.createObjectURL))}async blob(){return this._.async("blob")}async arrayBuffer(){return this._.async("arraybuffer")}async text(){return this._.async("text")}async json(){return JSON.parse(await this.text())}};var Mr={};gt(Mr,{canvas:()=>bn,context2d:()=>vn,download:()=>wn,element:()=>En,input:()=>_n,range:()=>An,select:()=>Cn,svg:()=>Sn,text:()=>kn,uid:()=>Rt});function bn(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,r}function vn(e,t,r){r==null&&(r=devicePixelRatio);var i=document.createElement("canvas");i.width=e*r,i.height=t*r,i.style.width=e+"px";var n=i.getContext("2d");return n.scale(r,r),n}function wn(e,t="untitled",r="Save"){let i=document.createElement("a"),n=i.appendChild(document.createElement("button"));n.textContent=r,i.download=t;async function s(){await new Promise(requestAnimationFrame),URL.revokeObjectURL(i.href),i.removeAttribute("href"),n.textContent=r,n.disabled=!1}return i.onclick=async a=>{if(n.disabled=!0,i.href)return s();n.textContent="Saving\u2026";try{let o=await(typeof e=="function"?e():e);n.textContent="Download",i.href=URL.createObjectURL(o)}catch{n.textContent=r}if(a.eventPhase)return s();n.disabled=!1},i}var Lt={math:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function En(e,t){var r=e+="",i=r.indexOf(":"),n;i>=0&&(r=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1));var s=Lt.hasOwnProperty(r)?document.createElementNS(Lt[r],e):document.createElement(e);if(t)for(var a in t)r=a,i=r.indexOf(":"),n=t[a],i>=0&&(r=a.slice(0,i))!=="xmlns"&&(a=a.slice(i+1)),Lt.hasOwnProperty(r)?s.setAttributeNS(Lt[r],a,n):s.setAttribute(a,n);return s}function _n(e){var t=document.createElement("input");return e!=null&&(t.type=e),t}function An(e,t,r){arguments.length===1&&(t=e,e=null);var i=document.createElement("input");return i.min=e=e==null?0:+e,i.max=t=t==null?1:+t,i.step=r==null?"any":r=+r,i.type="range",i}function Cn(e){var t=document.createElement("select");return Array.prototype.forEach.call(e,function(r){var i=document.createElement("option");i.value=i.textContent=r,t.appendChild(i)}),t}function Sn(e,t){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("viewBox",[0,0,e,t]),r.setAttribute("width",e),r.setAttribute("height",t),r}function kn(e){return document.createTextNode(e)}var eu=0;function Rt(e){return new In("O-"+(e==null?"":e+"-")+ ++eu)}function In(e){this.id=e,this.href=new URL(`#${e}`,location)+""}In.prototype.toString=function(){return"url("+this.href+")"};var qr={};gt(qr,{buffer:()=>Fn,text:()=>Dn,url:()=>Tn});function Fn(e){return new Promise(function(t,r){var i=new FileReader;i.onload=function(){t(i.result)},i.onerror=r,i.readAsArrayBuffer(e)})}function Dn(e){return new Promise(function(t,r){var i=new FileReader;i.onload=function(){t(i.result)},i.onerror=r,i.readAsText(e)})}function Tn(e){return new Promise(function(t,r){var i=new FileReader;i.onload=function(){t(i.result)},i.onerror=r,i.readAsDataURL(e)})}var jr={};gt(jr,{disposable:()=>Ot,filter:()=>Nn,input:()=>Bn,map:()=>Ln,observe:()=>ae,queue:()=>Rn,range:()=>On,valueAt:()=>Vn,worker:()=>Mn});function Re(){return this}function Ot(e,t){let r=!1;if(typeof t!="function")throw new Error("dispose is not a function");return{[Symbol.iterator]:Re,next:()=>r?{done:!0}:(r=!0,{done:!1,value:e}),return:()=>(r=!0,t(e),{done:!0}),throw:()=>({done:r=!0})}}function*Nn(e,t){for(var r,i=-1;!(r=e.next()).done;)t(r.value,++i)&&(yield r.value)}function ae(e){let t=!1,r,i,n=e(s);if(n!=null&&typeof n!="function")throw new Error(typeof n.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");function s(o){return i?(i(o),i=null):t=!0,r=o}function a(){return{done:!1,value:t?(t=!1,Promise.resolve(r)):new Promise(o=>i=o)}}return{[Symbol.iterator]:Re,throw:()=>({done:!0}),return:()=>(n?.(),{done:!0}),next:a}}function Bn(e){return ae(function(t){var r=tu(e),i=Pn(e);function n(){t(Pn(e))}return e.addEventListener(r,n),i!==void 0&&t(i),function(){e.removeEventListener(r,n)}})}function Pn(e){switch(e.type){case"range":case"number":return e.valueAsNumber;case"date":return e.valueAsDate;case"checkbox":return e.checked;case"file":return e.multiple?e.files:e.files[0];case"select-multiple":return Array.from(e.selectedOptions,t=>t.value);default:return e.value}}function tu(e){switch(e.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}function*Ln(e,t){for(var r,i=-1;!(r=e.next()).done;)yield t(r.value,++i)}function Rn(e){let t,r=[],i=e(n);if(i!=null&&typeof i!="function")throw new Error(typeof i.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");function n(a){return r.push(a),t&&(t(r.shift()),t=null),a}function s(){return{done:!1,value:r.length?Promise.resolve(r.shift()):new Promise(a=>t=a)}}return{[Symbol.iterator]:Re,throw:()=>({done:!0}),return:()=>(i?.(),{done:!0}),next:s}}function*On(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((t-e)/r))|0;++i<n;)yield e+i*r}function Vn(e,t){if(!(!isFinite(t=+t)||t<0||t!==t|0)){for(var r,i=-1;!(r=e.next()).done;)if(++i===t)return r.value}}function Mn(e){let t=URL.createObjectURL(new Blob([e],{type:"text/javascript"})),r=new Worker(t);return Ot(r,()=>{r.terminate(),URL.revokeObjectURL(t)})}function Oe(e,t){return function(r){var i=r[0],n=[],s,a=null,o,c,l,h,p,f,x,y=-1;for(h=1,p=arguments.length;h<p;++h){if(s=arguments[h],s instanceof Node)n[++y]=s,i+="<!--o:"+y+"-->";else if(Array.isArray(s)){for(f=0,x=s.length;f<x;++f)o=s[f],o instanceof Node?(a===null&&(n[++y]=a=document.createDocumentFragment(),i+="<!--o:"+y+"-->"),a.appendChild(o)):(a=null,i+=o);a=null}else i+=s;i+=r[h]}if(a=e(i),++y>0){for(c=new Array(y),l=document.createTreeWalker(a,NodeFilter.SHOW_COMMENT,null,!1);l.nextNode();)o=l.currentNode,/^o:/.test(o.nodeValue)&&(c[+o.nodeValue.slice(2)]=o);for(h=0;h<y;++h)(o=c[h])&&o.parentNode.replaceChild(n[h],o)}return a.childNodes.length===1?a.removeChild(a.firstChild):a.nodeType===11?((o=t()).appendChild(a),o):a}}var qn=Oe(function(e){var t=document.createElement("template");return t.innerHTML=e.trim(),document.importNode(t.content,!0)},function(){return document.createElement("span")});async function jn(e){let t=await e(_r.resolve());if(!t._style){let r=document.createElement("link");r.rel="stylesheet",r.href=await e.resolve(_r.resolve("dist/leaflet.css")),t._style=document.head.appendChild(r)}return t}function Un(e){return e(Ri.resolve()).then(function(t){return Oe(function(r){var i=document.createElement("div");i.innerHTML=t(r,{langPrefix:""}).trim();var n=i.querySelectorAll("pre code[class]");return n.length>0&&e(St.resolve()).then(function(s){n.forEach(function(a){function o(){s.highlightBlock(a),a.parentNode.classList.add("observablehq--md-pre")}s.getLanguage(a.className)?o():e(St.resolve("async-languages/index.js")).then(c=>{if(c.has(a.className))return e(St.resolve("async-languages/"+c.get(a.className))).then(l=>{s.registerLanguage(a.className,l)})}).then(o,o)})}),i},function(){return document.createElement("div")})})}async function $n(e){let t=await e(zi.resolve());return t.initialize({securityLevel:"loose",theme:"neutral"}),function(){let i=document.createElement("div");return i.innerHTML=t.render(Rt().id,String.raw.apply(String,arguments)),i.removeChild(i.firstChild)}}function zn(e){let t;Object.defineProperties(this,{generator:{value:ae(r=>void(t=r))},value:{get:()=>e,set:r=>t(e=r)}}),e!==void 0&&t(e)}function*Wn(){for(;;)yield Date.now()}var $r={};gt($r,{delay:()=>Hn,tick:()=>Gn,when:()=>Vt});function Hn(e,t){return new Promise(function(r){setTimeout(function(){r(t)},e)})}var Ur=new Map;function ru(e,t){var r=new Promise(function(i){Ur.delete(t);var n=t-e;if(!(n>0))throw new Error("invalid time");if(n>2147483647)throw new Error("too long to wait");setTimeout(i,n)});return Ur.set(t,r),r}function Vt(e,t){var r;return(r=Ur.get(e=+e))?r.then(()=>t):(r=Date.now())>=e?Promise.resolve(t):ru(r,e).then(()=>t)}function Gn(e,t){return Vt(Math.ceil((Date.now()+1)/e)*e,t)}function Yn(e,t){if(/^(\w+:)|\/\//i.test(e))return e;if(/^[.]{0,2}\//i.test(e))return new URL(e,t??location).href;if(!e.length||/^[\s._]/.test(e)||/\s$/.test(e))throw new Error("illegal name");return"https://unpkg.com/"+e}var Kn=Oe(function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return t.innerHTML=e.trim(),t},function(){return document.createElementNS("http://www.w3.org/2000/svg","g")});var iu=String.raw;function nu(e){return new Promise(function(t,r){var i=document.createElement("link");i.rel="stylesheet",i.href=e,i.onerror=r,i.onload=t,document.head.appendChild(i)})}function Qn(e){return Promise.all([e(wr.resolve()),e.resolve(wr.resolve("dist/katex.min.css")).then(nu)]).then(function(t){var r=t[0],i=n();function n(s){return function(){var a=document.createElement("div");return r.render(iu.apply(String,arguments),a,s),a.removeChild(a.firstChild)}}return i.options=n,i.block=n({displayMode:!0}),i})}async function Jn(e){let[t,r,i]=await Promise.all([Oi,Vi,Mi].map(n=>e(n.resolve())));return i.register(t,r)}function Zn(){return ae(function(e){var t=e(document.body.clientWidth);function r(){var i=document.body.clientWidth;i!==t&&e(t=i)}return window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}})}var Ve=Object.assign(Object.defineProperties(function(t){let r=Qi(t);Object.defineProperties(this,su({FileAttachment:()=>gn,Mutable:()=>zn,now:Wn,width:Zn,dot:()=>r(Ni.resolve()),htl:()=>r(Bi.resolve()),html:()=>qn,md:()=>Un(r),svg:()=>Kn,tex:()=>Qn(r),_:()=>r(Pi.resolve()),aq:()=>r.alias({"apache-arrow":Xe.resolve()})(ji.resolve()),Arrow:()=>r(Xe.resolve()),d3:()=>r(Fi.resolve()),DuckDBClient:()=>_e,Inputs:()=>r(Di.resolve()).then(i=>({...i,file:i.fileOf(Ae)})),L:()=>jn(r),mermaid:()=>$n(r),Plot:()=>r(Ti.resolve()),__query:()=>Br,require:()=>r,resolve:()=>Yn,SQLite:()=>Ir(r),SQLiteDatabaseClient:()=>we,topojson:()=>r(Ui.resolve()),vl:()=>Jn(r),aapl:()=>new I("https://static.observableusercontent.com/files/3ccff97fd2d93da734e76829b2b066eafdaac6a1fafdec0faf6ebc443271cfc109d29e80dd217468fcb2aff1e6bffdc73f356cc48feb657f35378e6abbbb63b9").csv({typed:!0}),alphabet:()=>new I("https://static.observableusercontent.com/files/75d52e6c3130b1cae83cda89305e17b50f33e7420ef205587a135e8562bcfd22e483cf4fa2fb5df6dff66f9c5d19740be1cfaf47406286e2eb6574b49ffc685d").csv({typed:!0}),cars:()=>new I("https://static.observableusercontent.com/files/048ec3dfd528110c0665dfa363dd28bc516ffb7247231f3ab25005036717f5c4c232a5efc7bb74bc03037155cb72b1abe85a33d86eb9f1a336196030443be4f6").csv({typed:!0}),citywages:()=>new I("https://static.observableusercontent.com/files/39837ec5121fcc163131dbc2fe8c1a2e0b3423a5d1e96b5ce371e2ac2e20a290d78b71a4fb08b9fa6a0107776e17fb78af313b8ea70f4cc6648fad68ddf06f7a").csv({typed:!0}),diamonds:()=>new I("https://static.observableusercontent.com/files/87942b1f5d061a21fa4bb8f2162db44e3ef0f7391301f867ab5ba718b225a63091af20675f0bfe7f922db097b217b377135203a7eab34651e21a8d09f4e37252").csv({typed:!0}),flare:()=>new I("https://static.observableusercontent.com/files/a6b0d94a7f5828fd133765a934f4c9746d2010e2f342d335923991f31b14120de96b5cb4f160d509d8dc627f0107d7f5b5070d2516f01e4c862b5b4867533000").csv({typed:!0}),industries:()=>new I("https://static.observableusercontent.com/files/76f13741128340cc88798c0a0b7fa5a2df8370f57554000774ab8ee9ae785ffa2903010cad670d4939af3e9c17e5e18e7e05ed2b38b848ac2fc1a0066aa0005f").csv({typed:!0}),miserables:()=>new I("https://static.observableusercontent.com/files/31d904f6e21d42d4963ece9c8cc4fbd75efcbdc404bf511bc79906f0a1be68b5a01e935f65123670ed04e35ca8cae3c2b943f82bf8db49c5a67c85cbb58db052").json(),olympians:()=>new I("https://static.observableusercontent.com/files/31ca24545a0603dce099d10ee89ee5ae72d29fa55e8fc7c9ffb5ded87ac83060d80f1d9e21f4ae8eb04c1e8940b7287d179fe8060d887fb1f055f430e210007c").csv({typed:!0}),penguins:()=>new I("https://static.observableusercontent.com/files/715db1223e067f00500780077febc6cebbdd90c151d3d78317c802732252052ab0e367039872ab9c77d6ef99e5f55a0724b35ddc898a1c99cb14c31a379af80a").csv({typed:!0}),pizza:()=>new I("https://static.observableusercontent.com/files/c653108ab176088cacbb338eaf2344c4f5781681702bd6afb55697a3f91b511c6686ff469f3e3a27c75400001a2334dbd39a4499fe46b50a8b3c278b7d2f7fb5").csv({typed:!0}),weather:()=>new I("https://static.observableusercontent.com/files/693a46b22b33db0f042728700e0c73e836fa13d55446df89120682d55339c6db7cc9e574d3d73f24ecc9bc7eb9ac9a1e7e104a1ee52c00aab1e77eb102913c1f").csv({typed:!0}),DOM:Mr,Files:qr,Generators:jr,Promises:$r}))},{resolve:{get:()=>K.resolve,enumerable:!0,configurable:!0},require:{get:()=>K,set:Ki,enumerable:!0,configurable:!0}}),{resolveFrom:Cr,requireFrom:Ne});function su(e){return Object.fromEntries(Object.entries(e).map(au))}function au([e,t]){return[e,{value:t,writable:!0,enumerable:!0}]}var R=class extends Error{constructor(t,r){super(t),this.input=r}};R.prototype.name="RuntimeError";function Xn(e){return e&&typeof e.next=="function"&&typeof e.return=="function"}function nt(e){return()=>e}function Me(e){return e}function es(e){return()=>{throw e}}var ts=Array.prototype,rs=ts.map,md=ts.forEach;function Q(){}var Mt=1,Se=2,st=3,Ce=Symbol("no-observer");function X(e,t,r,i){r||(r=Ce),Object.defineProperties(this,{_observer:{value:r,writable:!0},_definition:{value:zr,writable:!0},_duplicate:{value:void 0,writable:!0},_duplicates:{value:void 0,writable:!0},_indegree:{value:NaN,writable:!0},_inputs:{value:[],writable:!0},_invalidate:{value:Q,writable:!0},_module:{value:t},_name:{value:null,writable:!0},_outputs:{value:new Set,writable:!0},_promise:{value:Promise.resolve(void 0),writable:!0},_reachable:{value:r!==Ce,writable:!0},_rejector:{value:lu(this)},_shadow:{value:ou(t,i)},_type:{value:e},_value:{value:void 0,writable:!0},_version:{value:0,writable:!0}})}Object.defineProperties(X.prototype,{_pending:{value:mu,writable:!0,configurable:!0},_fulfilled:{value:xu,writable:!0,configurable:!0},_rejected:{value:yu,writable:!0,configurable:!0},_resolve:{value:hu,writable:!0,configurable:!0},define:{value:pu,writable:!0,configurable:!0},delete:{value:du,writable:!0,configurable:!0},import:{value:fu,writable:!0,configurable:!0}});function ou(e,t){return t?.shadow?new Map(Object.entries(t.shadow).map(([r,i])=>[r,new X(Se,e).define([],i)])):null}function uu(e){e._module._runtime._dirty.add(e),e._outputs.add(this)}function cu(e){e._module._runtime._dirty.add(e),e._outputs.delete(this)}function zr(){throw zr}function J(){throw J}function lu(e){return t=>{throw t===J?t:t===zr?new R(`${e._name} is not defined`,e._name):t instanceof Error&&t.message?new R(t.message,e._name):new R(`${e._name} could not be resolved`,e._name)}}function is(e){return()=>{throw new R(`${e} is defined more than once`)}}function pu(e,t,r){switch(arguments.length){case 1:{r=e,e=t=null;break}case 2:{r=t,typeof e=="string"?t=null:(t=e,e=null);break}}return Wr.call(this,e==null?null:String(e),t==null?[]:rs.call(t,this._resolve,this),typeof r=="function"?r:nt(r))}function hu(e){return this._shadow?.get(e)??this._module._resolve(e)}function Wr(e,t,r){let i=this._module._scope,n=this._module._runtime;if(this._inputs.forEach(cu,this),t.forEach(uu,this),this._inputs=t,this._definition=r,this._value=void 0,r===Q?n._variables.delete(this):n._variables.add(this),e!==this._name||i.get(e)!==this){let s,a;if(this._name)if(this._outputs.size)i.delete(this._name),a=this._module._resolve(this._name),a._outputs=this._outputs,this._outputs=new Set,a._outputs.forEach(function(o){o._inputs[o._inputs.indexOf(this)]=a},this),a._outputs.forEach(n._updates.add,n._updates),n._dirty.add(a).add(this),i.set(this._name,a);else if((a=i.get(this._name))===this)i.delete(this._name);else if(a._type===st)a._duplicates.delete(this),this._duplicate=void 0,a._duplicates.size===1&&(a=a._duplicates.keys().next().value,s=i.get(this._name),a._outputs=s._outputs,s._outputs=new Set,a._outputs.forEach(function(o){o._inputs[o._inputs.indexOf(s)]=a}),a._definition=a._duplicate,a._duplicate=void 0,n._dirty.add(s).add(a),n._updates.add(a),i.set(this._name,a));else throw new Error;if(this._outputs.size)throw new Error;e&&((a=i.get(e))?a._type===st?(this._definition=is(e),this._duplicate=r,a._duplicates.add(this)):a._type===Se?(this._outputs=a._outputs,a._outputs=new Set,this._outputs.forEach(function(o){o._inputs[o._inputs.indexOf(a)]=this},this),n._dirty.add(a).add(this),i.set(e,this)):(a._duplicate=a._definition,this._duplicate=r,s=new X(st,this._module),s._name=e,s._definition=this._definition=a._definition=is(e),s._outputs=a._outputs,a._outputs=new Set,s._outputs.forEach(function(o){o._inputs[o._inputs.indexOf(a)]=s}),s._duplicates=new Set([this,a]),n._dirty.add(a).add(s),n._updates.add(a).add(s),i.set(e,s)):i.set(e,this)),this._name=e}return this._version>0&&++this._version,n._updates.add(this),n._compute(),this}function fu(e,t,r){return arguments.length<3&&(r=t,t=e),Wr.call(this,String(t),[r._resolve(String(e))],Me)}function du(){return Wr.call(this,null,[],Q)}function mu(){this._observer.pending&&this._observer.pending()}function xu(e){this._observer.fulfilled&&this._observer.fulfilled(e,this._name)}function yu(e){this._observer.rejected&&this._observer.rejected(e,this._name)}var Gr=Symbol("variable"),Yr=Symbol("invalidation"),Kr=Symbol("visibility");function at(e,t=[]){Object.defineProperties(this,{_runtime:{value:e},_scope:{value:new Map},_builtins:{value:new Map([["@variable",Gr],["invalidation",Yr],["visibility",Kr],...t])},_source:{value:null,writable:!0}})}Object.defineProperties(at.prototype,{_resolve:{value:Au,writable:!0,configurable:!0},redefine:{value:gu,writable:!0,configurable:!0},define:{value:bu,writable:!0,configurable:!0},derive:{value:_u,writable:!0,configurable:!0},import:{value:vu,writable:!0,configurable:!0},value:{value:Eu,writable:!0,configurable:!0},variable:{value:wu,writable:!0,configurable:!0},builtin:{value:Cu,writable:!0,configurable:!0}});function gu(e){let t=this._scope.get(e);if(!t)throw new R(`${e} is not defined`);if(t._type===st)throw new R(`${e} is defined more than once`);return t.define.apply(t,arguments)}function bu(){let e=new X(Mt,this);return e.define.apply(e,arguments)}function vu(){let e=new X(Mt,this);return e.import.apply(e,arguments)}function wu(e,t){return new X(Mt,this,e,t)}async function Eu(e){let t=this._scope.get(e);if(!t)throw new R(`${e} is not defined`);if(t._observer===Ce){t=this.variable(!0).define([e],Me);try{return await Hr(this._runtime,t)}finally{t.delete()}}else return Hr(this._runtime,t)}async function Hr(e,t){await e._compute();try{return await t._promise}catch(r){if(r===J)return Hr(e,t);throw r}}function _u(e,t){let r=new Map,i=new Set,n=[];function s(o){let c=r.get(o);return c||(c=new at(o._runtime,o._builtins),c._source=o,r.set(o,c),n.push([c,o]),i.add(o),c)}let a=s(this);for(let o of e){let{alias:c,name:l}=typeof o=="object"?o:{name:o};a.import(l,c??l,t)}for(let o of i)for(let[c,l]of o._scope)if(l._definition===Me){if(o===this&&a._scope.has(c))continue;let h=l._inputs[0]._module;h._source&&s(h)}for(let[o,c]of n)for(let[l,h]of c._scope){let p=o._scope.get(l);if(!(p&&p._type!==Se))if(h._definition===Me){let f=h._inputs[0],x=f._module;o.import(f._name,l,r.get(x)||x)}else o.define(l,h._inputs.map(Su),h._definition)}return a}function Au(e){let t=this._scope.get(e),r;if(!t)if(t=new X(Se,this),this._builtins.has(e))t.define(e,nt(this._builtins.get(e)));else if(this._runtime._builtin._scope.has(e))t.import(e,this._runtime._builtin);else{try{r=this._runtime._global(e)}catch(i){return t.define(e,es(i))}r===void 0?this._scope.set(t._name=e,t):t.define(e,nt(r))}return t}function Cu(e,t){this._builtins.set(e,t)}function Su(e){return e._name}var ku=typeof requestAnimationFrame=="function"?requestAnimationFrame:typeof setImmediate=="function"?setImmediate:e=>setTimeout(e,0);function qt(e=new Ve,t=Wu){let r=this.module();if(Object.defineProperties(this,{_dirty:{value:new Set},_updates:{value:new Set},_precomputes:{value:[],writable:!0},_computing:{value:null,writable:!0},_init:{value:null,writable:!0},_modules:{value:new Map},_variables:{value:new Set},_disposed:{value:!1,writable:!0},_builtin:{value:r},_global:{value:t}}),e)for(let i in e)new X(Se,r).define(i,[],e[i])}Object.defineProperties(qt.prototype,{_precompute:{value:Du,writable:!0,configurable:!0},_compute:{value:Tu,writable:!0,configurable:!0},_computeSoon:{value:Nu,writable:!0,configurable:!0},_computeNow:{value:Pu,writable:!0,configurable:!0},dispose:{value:Iu,writable:!0,configurable:!0},module:{value:Fu,writable:!0,configurable:!0},fileAttachments:{value:Vr,writable:!0,configurable:!0}});function Iu(){this._computing=Promise.resolve(),this._disposed=!0,this._variables.forEach(e=>{e._invalidate(),e._version=NaN})}function Fu(e,t=Q){let r;if(e===void 0)return(r=this._init)?(this._init=null,r):new at(this);if(r=this._modules.get(e),r)return r;this._init=r=new at(this),this._modules.set(e,r);try{e(this,t)}finally{this._init=null}return r}function Du(e){this._precomputes.push(e),this._compute()}function Tu(){return this._computing||(this._computing=this._computeSoon())}function Nu(){return new Promise(ku).then(()=>this._disposed?void 0:this._computeNow())}async function Pu(){let e=[],t,r,i=this._precomputes;if(i.length){this._precomputes=[];for(let s of i)s();await Bu(3)}t=new Set(this._dirty),t.forEach(function(s){s._inputs.forEach(t.add,t);let a=zu(s);a>s._reachable?this._updates.add(s):a<s._reachable&&s._invalidate(),s._reachable=a},this),t=new Set(this._updates),t.forEach(function(s){s._reachable?(s._indegree=0,s._outputs.forEach(t.add,t)):(s._indegree=NaN,t.delete(s))}),this._computing=null,this._updates.clear(),this._dirty.clear(),t.forEach(function(s){s._outputs.forEach(Ru)});do{for(t.forEach(function(s){s._indegree===0&&e.push(s)});r=e.pop();)qu(r),r._outputs.forEach(n),t.delete(r);t.forEach(function(s){Lu(s)&&(Uu(s,new R("circular definition")),s._outputs.forEach(Ou),t.delete(s))})}while(t.size);function n(s){--s._indegree===0&&e.push(s)}}function Bu(e=0){let t=Promise.resolve();for(let r=0;r<e;++r)t=t.then(()=>{});return t}function Lu(e){let t=new Set(e._inputs);for(let r of t){if(r===e)return!0;r._inputs.forEach(t.add,t)}return!1}function Ru(e){++e._indegree}function Ou(e){--e._indegree}function Vu(e){return e._promise.catch(e._rejector)}function Qr(e){return new Promise(function(t){e._invalidate=t})}function Mu(e,t){let r=typeof IntersectionObserver=="function"&&t._observer&&t._observer._node,i=!r,n=Q,s=Q,a,o;return r&&(o=new IntersectionObserver(([c])=>(i=c.isIntersecting)&&(a=null,n())),o.observe(r),e.then(()=>(o.disconnect(),o=null,s()))),function(c){return i?Promise.resolve(c):o?(a||(a=new Promise((l,h)=>(n=l,s=h))),a.then(()=>c)):Promise.reject()}}function qu(e){e._invalidate(),e._invalidate=Q,e._pending();let t=e._value,r=++e._version,i=null,n=e._promise=(e._inputs.length?Promise.all(e._inputs.map(Vu)).then(s):new Promise(o=>o(e._definition.call(t)))).then(a);function s(o){if(e._version!==r)throw J;for(let c=0,l=o.length;c<l;++c)switch(o[c]){case Yr:{o[c]=i=Qr(e);break}case Kr:{i||(i=Qr(e)),o[c]=Mu(i,e);break}case Gr:{o[c]=e;break}}return e._definition.apply(t,o)}function a(o){if(e._version!==r)throw J;return Xn(o)?((i||Qr(e)).then($u(o)),ju(e,r,o)):o}n.then(o=>{e._value=o,e._fulfilled(o)},o=>{o===J||e._version!==r||(e._value=void 0,e._rejected(o))})}function ju(e,t,r){let i=e._module._runtime,n;function s(c){return new Promise(l=>l(r.next(n))).then(({done:l,value:h})=>l?void 0:Promise.resolve(h).then(c))}function a(){let c=s(l=>{if(e._version!==t)throw J;return n=l,o(l,c).then(()=>i._precompute(a)),e._fulfilled(l),l});c.catch(l=>{l===J||e._version!==t||(o(void 0,c),e._rejected(l))})}function o(c,l){return e._value=c,e._promise=l,e._outputs.forEach(i._updates.add,i._updates),i._compute()}return s(c=>{if(e._version!==t)throw J;return n=c,i._precompute(a),c})}function Uu(e,t){e._invalidate(),e._invalidate=Q,e._pending(),++e._version,e._indegree=NaN,(e._promise=Promise.reject(t)).catch(Q),e._value=void 0,e._rejected(t)}function $u(e){return function(){e.return()}}function zu(e){if(e._observer!==Ce)return!0;let t=new Set(e._outputs);for(let r of t){if(r._observer!==Ce)return!0;r._outputs.forEach(t.add,t)}return!1}function Wu(e){return globalThis[e]}var Hu=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],hs=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,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,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Gu="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",fs="\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\u0560-\u0588\u05D0-\u05EA\u05EF-\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\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u09FC\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\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\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\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-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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-\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-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\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-\uAB69\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",Jr={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Zr="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Yu={5:Zr,"5module":Zr+" export import",6:Zr+" const class extends export import super"},Ku=/^in(stanceof)?$/,Qu=new RegExp("["+fs+"]"),Ju=new RegExp("["+fs+Gu+"]");function ei(e,t){for(var r=65536,i=0;i<t.length;i+=2){if(r+=t[i],r>e)return!1;if(r+=t[i+1],r>=e)return!0}return!1}function oe(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Qu.test(String.fromCharCode(e)):t===!1?!1:ei(e,hs)}function je(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ju.test(String.fromCharCode(e)):t===!1?!1:ei(e,hs)||ei(e,Hu)}var S=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function j(e,t){return new S(e,{beforeExpr:!0,binop:t})}var U={beforeExpr:!0},q={startsExpr:!0},ni={};function A(e,t){return t===void 0&&(t={}),t.keyword=e,ni[e]=new S(e,t)}var u={num:new S("num",q),regexp:new S("regexp",q),string:new S("string",q),name:new S("name",q),privateId:new S("privateId",q),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",U),semi:new S(";",U),colon:new S(":",U),dot:new S("."),question:new S("?",U),questionDot:new S("?."),arrow:new S("=>",U),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",U),backQuote:new S("`",q),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:j("||",1),logicalAND:j("&&",2),bitwiseOR:j("|",3),bitwiseXOR:j("^",4),bitwiseAND:j("&",5),equality:j("==/!=/===/!==",6),relational:j("</>/<=/>=",7),bitShift:j("<</>>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:j("%",10),star:j("*",10),slash:j("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:j("??",1),_break:A("break"),_case:A("case",U),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",U),_do:A("do",{isLoop:!0,beforeExpr:!0}),_else:A("else",U),_finally:A("finally"),_for:A("for",{isLoop:!0}),_function:A("function",q),_if:A("if"),_return:A("return",U),_switch:A("switch"),_throw:A("throw",U),_try:A("try"),_var:A("var"),_const:A("const"),_while:A("while",{isLoop:!0}),_with:A("with"),_new:A("new",{beforeExpr:!0,startsExpr:!0}),_this:A("this",q),_super:A("super",q),_class:A("class",q),_extends:A("extends",U),_export:A("export"),_import:A("import",q),_null:A("null",q),_true:A("true",q),_false:A("false",q),_in:A("in",{beforeExpr:!0,binop:7}),_instanceof:A("instanceof",{beforeExpr:!0,binop:7}),_typeof:A("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:A("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:A("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},H=/\r\n?|\n|\u2028|\u2029/,Zu=new RegExp(H.source,"g");function Ue(e){return e===10||e===13||e===8232||e===8233}function ds(e,t,r){r===void 0&&(r=e.length);for(var i=t;i<r;i++){var n=e.charCodeAt(i);if(Ue(n))return i<r-1&&n===13&&e.charCodeAt(i+1)===10?i+2:i+1}return-1}var ms=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,z=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,xs=Object.prototype,Xu=xs.hasOwnProperty,ec=xs.toString,ht=Object.hasOwn||function(e,t){return Xu.call(e,t)},ns=Array.isArray||function(e){return ec.call(e)==="[object Array]"},ss=Object.create(null);function fe(e){return ss[e]||(ss[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function de(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var tc=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,lt=function(e,t){this.line=e,this.column=t};lt.prototype.offset=function(e){return new lt(this.line,this.column+e)};var Qt=function(e,t,r){this.start=t,this.end=r,e.sourceFile!==null&&(this.source=e.sourceFile)};function Jt(e,t){for(var r=1,i=0;;){var n=ds(e,i,t);if(n<0)return new lt(r,t-i);++r,i=n}}var ti={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},as=!1;function rc(e){var t={};for(var r in ti)t[r]=e&&ht(e,r)?e[r]:ti[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!as&&typeof console=="object"&&console.warn&&(as=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
20
- Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ns(t.onToken)){var i=t.onToken;t.onToken=function(n){return i.push(n)}}return ns(t.onComment)&&(t.onComment=ic(t,t.onComment)),t}function ic(e,t){return function(r,i,n,s,a,o){var c={type:r?"Block":"Line",value:i,start:n,end:s};e.locations&&(c.loc=new Qt(this,a,o)),e.ranges&&(c.range=[n,s]),t.push(c)}}var pt=1,$e=2,si=4,ys=8,gs=16,bs=32,ai=64,vs=128,ft=256,oi=pt|$e|ft;function ui(e,t){return $e|(e?si:0)|(t?ys:0)}var Ht=0,ci=1,ce=2,ws=3,Es=4,_s=5,P=function(e,t,r){this.options=e=rc(e),this.sourceFile=e.sourceFile,this.keywords=fe(Yu[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var i="";e.allowReserved!==!0&&(i=Jr[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module"&&(i+=" await")),this.reservedWords=fe(i);var n=(i?i+" ":"")+Jr.strict;this.reservedWordsStrict=fe(n),this.reservedWordsStrictBind=fe(n+" "+Jr.strictBind),this.input=String(t),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
21
- `,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(H).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=u.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=e.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&&e.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(pt),this.regexpState=null,this.privateNameStack=[]},ee={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}};P.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};ee.inFunction.get=function(){return(this.currentVarScope().flags&$e)>0};ee.inGenerator.get=function(){return(this.currentVarScope().flags&ys)>0&&!this.currentVarScope().inClassFieldInit};ee.inAsync.get=function(){return(this.currentVarScope().flags&si)>0&&!this.currentVarScope().inClassFieldInit};ee.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&ft)return!1;if(t.flags&$e)return(t.flags&si)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};ee.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&ai)>0||r||this.options.allowSuperOutsideMethod};ee.allowDirectSuper.get=function(){return(this.currentThisScope().flags&vs)>0};ee.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};ee.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&($e|ft))>0||r};ee.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ft)>0};P.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r=this,i=0;i<e.length;i++)r=e[i](r);return r};P.parse=function(e,t){return new this(t,e).parse()};P.parseExpressionAt=function(e,t,r){var i=new this(r,e,t);return i.nextToken(),i.parseExpression()};P.tokenizer=function(e,t){return new this(t,e)};Object.defineProperties(P.prototype,ee);var O=P.prototype,nc=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;O.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){z.lastIndex=e,e+=z.exec(this.input)[0].length;var t=nc.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){z.lastIndex=e+t[0].length;var r=z.exec(this.input),i=r.index+r[0].length,n=this.input.charAt(i);return n===";"||n==="}"||H.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(i+1)==="=")}e+=t[0].length,z.lastIndex=e,e+=z.exec(this.input)[0].length,this.input[e]===";"&&e++}};O.eat=function(e){return this.type===e?(this.next(),!0):!1};O.isContextual=function(e){return this.type===u.name&&this.value===e&&!this.containsEsc};O.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};O.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};O.canInsertSemicolon=function(){return this.type===u.eof||this.type===u.braceR||H.test(this.input.slice(this.lastTokEnd,this.start))};O.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};O.semicolon=function(){!this.eat(u.semi)&&!this.insertSemicolon()&&this.unexpected()};O.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};O.expect=function(e){this.eat(e)||this.unexpected()};O.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Zt=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};O.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};O.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,i=e.doubleProto;if(!t)return r>=0||i>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")};O.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};O.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var b=P.prototype;b.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==u.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var i=0,n=Object.keys(this.undefinedExports);i<n.length;i+=1){var s=n[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var li={kind:"loop"},sc={kind:"switch"};b.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;z.lastIndex=this.pos;var t=z.exec(this.input),r=this.pos+t[0].length,i=this.input.charCodeAt(r);if(i===91||i===92)return!0;if(e)return!1;if(i===123||i>55295&&i<56320)return!0;if(oe(i,!0)){for(var n=r+1;je(i=this.input.charCodeAt(n),!0);)++n;if(i===92||i>55295&&i<56320)return!0;var s=this.input.slice(r,n);if(!Ku.test(s))return!0}return!1};b.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;z.lastIndex=this.pos;var e=z.exec(this.input),t=this.pos+e[0].length,r;return!H.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(je(r=this.input.charCodeAt(t+8))||r>55295&&r<56320))};b.parseStatement=function(e,t,r){var i=this.type,n=this.startNode(),s;switch(this.isLet(e)&&(i=u._var,s="let"),i){case u._break:case u._continue:return this.parseBreakContinueStatement(n,i.keyword);case u._debugger:return this.parseDebuggerStatement(n);case u._do:return this.parseDoStatement(n);case u._for:return this.parseForStatement(n);case u._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!e);case u._class:return e&&this.unexpected(),this.parseClass(n,!0);case u._if:return this.parseIfStatement(n);case u._return:return this.parseReturnStatement(n);case u._switch:return this.parseSwitchStatement(n);case u._throw:return this.parseThrowStatement(n);case u._try:return this.parseTryStatement(n);case u._const:case u._var:return s=s||this.value,e&&s!=="var"&&this.unexpected(),this.parseVarStatement(n,s);case u._while:return this.parseWhileStatement(n);case u._with:return this.parseWithStatement(n);case u.braceL:return this.parseBlock(!0,n);case u.semi:return this.parseEmptyStatement(n);case u._export:case u._import:if(this.options.ecmaVersion>10&&i===u._import){z.lastIndex=this.pos;var a=z.exec(this.input),o=this.pos+a[0].length,c=this.input.charCodeAt(o);if(c===40||c===46)return this.parseExpressionStatement(n,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||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'")),i===u._import?this.parseImport(n):this.parseExport(n,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(n,!0,!e);var l=this.value,h=this.parseExpression();return i===u.name&&h.type==="Identifier"&&this.eat(u.colon)?this.parseLabeledStatement(n,l,h,e):this.parseExpressionStatement(n,h)}};b.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(u.semi)||this.insertSemicolon()?e.label=null:this.type!==u.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var n=this.labels[i];if((e.label==null||n.name===e.label.name)&&(n.kind!=null&&(r||n.kind==="loop")||e.label&&r))break}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")};b.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};b.parseDoStatement=function(e){return this.next(),this.labels.push(li),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(u._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(u.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};b.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(li),this.enterScope(0),this.expect(u.parenL),this.type===u.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===u._var||this.type===u._const||r){var i=this.startNode(),n=r?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&i.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===u._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var s=this.isContextual("let"),a=!1,o=this.containsEsc,c=new Zt,l=this.start,h=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===u._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===u._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(h.start===l&&!o&&h.type==="Identifier"&&h.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),s&&a&&this.raise(h.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(h,!1,c),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(c,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))};b.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,ut|(r?0:ri),!1,t)};b.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(u._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};b.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(u.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};b.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(u.braceL),this.labels.push(sc),this.enterScope(0);for(var t,r=!1;this.type!==u.braceR;)if(this.type===u._case||this.type===u._default){var i=this.type===u._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(u.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};b.parseThrowStatement=function(e){return this.next(),H.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ac=[];b.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?bs:0),this.checkLValPattern(e,t?Es:ce),this.expect(u.parenR),e};b.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===u._catch){var t=this.startNode();this.next(),this.eat(u.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(u._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};b.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};b.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(li),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};b.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};b.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};b.parseLabeledStatement=function(e,t,r,i){for(var n=0,s=this.labels;n<s.length;n+=1){var a=s[n];a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.type.isLoop?"loop":this.type===u._switch?"switch":null,c=this.labels.length-1;c>=0;c--){var l=this.labels[c];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};b.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};b.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(u.braceL),e&&this.enterScope(0);this.type!==u.braceR;){var i=this.parseStatement(null);t.body.push(i)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};b.parseFor=function(e,t){return e.init=t,this.expect(u.semi),e.test=this.type===u.semi?null:this.parseExpression(),this.expect(u.semi),e.update=this.type===u.parenR?null:this.parseExpression(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};b.parseForIn=function(e,t){var r=this.type===u._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};b.parseVar=function(e,t,r,i){for(e.declarations=[],e.kind=r;;){var n=this.startNode();if(this.parseVarId(n,r),this.eat(u.eq)?n.init=this.parseMaybeAssign(t):!i&&r==="const"&&!(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!i&&n.id.type!=="Identifier"&&!(t&&(this.type===u._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):n.init=null,e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(u.comma))break}return e};b.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?ci:ce,!1)};var ut=1,ri=2,As=4;b.parseFunction=function(e,t,r,i,n){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===u.star&&t&ri&&this.unexpected(),e.generator=this.eat(u.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&ut&&(e.id=t&As&&this.type!==u.name?null:this.parseIdent(),e.id&&!(t&ri)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?ci:ce:ws));var s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ui(e.async,e.generator)),t&ut||(e.id=this.type===u.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,n),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&ut?"FunctionDeclaration":"FunctionExpression")};b.parseFunctionParams=function(e){this.expect(u.parenL),e.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};b.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),n=this.startNode(),s=!1;for(n.body=[],this.expect(u.braceL);this.type!==u.braceR;){var a=this.parseClassElement(e.superClass!==null);a&&(n.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"?(s&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),s=!0):a.key&&a.key.type==="PrivateIdentifier"&&oc(i,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};b.parseClassElement=function(e){if(this.eat(u.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),i="",n=!1,s=!1,a="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(u.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===u.star?o=!0:i="static"}if(r.static=o,!i&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===u.star)&&!this.canInsertSemicolon()?s=!0:i="async"),!i&&(t>=9||!s)&&this.eat(u.star)&&(n=!0),!i&&!s&&!n){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=c:i=c)}if(i?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=i,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===u.parenL||a!=="method"||n||s){var l=!r.static&&Gt(r,"constructor"),h=l&&e;l&&a!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=l?"constructor":a,this.parseClassMethod(r,n,s,h)}else this.parseClassField(r);return r};b.isClassElementNameStart=function(){return this.type===u.name||this.type===u.privateId||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword};b.parseClassElementName=function(e){this.type===u.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};b.parseClassMethod=function(e,t,r,i){var n=e.key;e.kind==="constructor"?(t&&this.raise(n.start,"Constructor can't be a generator"),r&&this.raise(n.start,"Constructor can't be an async method")):e.static&&Gt(e,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,r,i);return e.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),e.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),e.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};b.parseClassField=function(e){if(Gt(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Gt(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(u.eq)){var t=this.currentThisScope(),r=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=r}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};b.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(ft|ai);this.type!==u.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};b.parseClassId=function(e,t){this.type===u.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,ce,!1)):(t===!0&&this.unexpected(),e.id=null)};b.parseClassSuper=function(e){e.superClass=this.eat(u._extends)?this.parseExprSubscripts(null,!1):null};b.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};b.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var i=this.privateNameStack.length,n=i===0?null:this.privateNameStack[i-1],s=0;s<r.length;++s){var a=r[s];ht(t,a.name)||(n?n.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}};function oc(e,t){var r=t.key.name,i=e[r],n="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(n=(t.static?"s":"i")+t.kind),i==="iget"&&n==="iset"||i==="iset"&&n==="iget"||i==="sget"&&n==="sset"||i==="sset"&&n==="sget"?(e[r]="true",!1):i?!0:(e[r]=n,!1)}function Gt(e,t){var r=e.computed,i=e.key;return!r&&(i.type==="Identifier"&&i.name===t||i.type==="Literal"&&i.value===t)}b.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==u.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};b.parseExport=function(e,t){if(this.next(),this.eat(u.star))return this.parseExportAllDeclaration(e,t);if(this.eat(u._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==u.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var r=0,i=e.specifiers;r<i.length;r+=1){var n=i[r];this.checkUnreserved(n.local),this.checkLocalExport(n.local),n.local.type==="Literal"&&this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};b.parseExportDeclaration=function(e){return this.parseStatement(null)};b.parseExportDefaultDeclaration=function(){var e;if(this.type===u._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,ut|As,!1,e)}else if(this.type===u._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var i=this.parseMaybeAssign();return this.semicolon(),i}};b.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),ht(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};b.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var i=0,n=t.properties;i<n.length;i+=1){var s=n[i];this.checkPatternExport(e,s)}else if(r==="ArrayPattern")for(var a=0,o=t.elements;a<o.length;a+=1){var c=o[a];c&&this.checkPatternExport(e,c)}else r==="Property"?this.checkPatternExport(e,t.value):r==="AssignmentPattern"?this.checkPatternExport(e,t.left):r==="RestElement"&&this.checkPatternExport(e,t.argument)};b.checkVariableExport=function(e,t){if(e)for(var r=0,i=t;r<i.length;r+=1){var n=i[r];this.checkPatternExport(e,n.id)}};b.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};b.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};b.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(u.braceL);!this.eat(u.braceR);){if(r)r=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;t.push(this.parseExportSpecifier(e))}return t};b.parseImport=function(e){return this.next(),this.type===u.string?(e.specifiers=ac,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===u.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};b.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,ce),this.finishNode(e,"ImportSpecifier")};b.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,ce),this.finishNode(e,"ImportDefaultSpecifier")};b.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,ce),this.finishNode(e,"ImportNamespaceSpecifier")};b.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===u.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(u.comma)))return e;if(this.type===u.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(u.braceL);!this.eat(u.braceR);){if(t)t=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;e.push(this.parseImportSpecifier())}return e};b.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===u.string){var e=this.parseLiteral(this.value);return tc.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};b.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};b.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var G=P.prototype;G.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];this.toAssignable(s,t),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern")&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e};G.toAssignableList=function(e,t){for(var r=e.length,i=0;i<r;i++){var n=e[i];n&&this.toAssignable(n,t)}if(r){var s=e[r-1];this.options.ecmaVersion===6&&t&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier"&&this.unexpected(s.argument.start)}return e};G.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};G.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==u.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};G.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case u.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(u.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case u.braceL:return this.parseObj(!0)}return this.parseIdent()};G.parseBindingList=function(e,t,r,i){for(var n=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(u.comma),t&&this.type===u.comma)n.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===u.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),n.push(a),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else n.push(this.parseAssignableListItem(i))}return n};G.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};G.parseBindingListItem=function(e){return e};G.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(u.eq))return r;var i=this.startNodeAt(e,t);return i.left=r,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")};G.checkLValSimple=function(e,t,r){t===void 0&&(t=Ht);var i=t!==Ht;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode"),i&&(t===ce&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(ht(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),t!==_s&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(i?"Binding":"Assigning to")+" rvalue")}};G.checkLValPattern=function(e,t,r){switch(t===void 0&&(t=Ht),e.type){case"ObjectPattern":for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];this.checkLValInnerPattern(s,t,r)}break;case"ArrayPattern":for(var a=0,o=e.elements;a<o.length;a+=1){var c=o[a];c&&this.checkLValInnerPattern(c,t,r)}break;default:this.checkLValSimple(e,t,r)}};G.checkLValInnerPattern=function(e,t,r){switch(t===void 0&&(t=Ht),e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var $=function(e,t,r,i,n){this.token=e,this.isExpr=!!t,this.preserveSpace=!!r,this.override=i,this.generator=!!n},D={b_stat:new $("{",!1),b_expr:new $("{",!0),b_tmpl:new $("${",!1),p_stat:new $("(",!1),p_expr:new $("(",!0),q_tmpl:new $("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new $("function",!1),f_expr:new $("function",!0),f_expr_gen:new $("function",!0,!1,null,!0),f_gen:new $("function",!1,!1,null,!0)},ze=P.prototype;ze.initialContext=function(){return[D.b_stat]};ze.curContext=function(){return this.context[this.context.length-1]};ze.braceIsBlock=function(e){var t=this.curContext();return t===D.f_expr||t===D.f_stat?!0:e===u.colon&&(t===D.b_stat||t===D.b_expr)?!t.isExpr:e===u._return||e===u.name&&this.exprAllowed?H.test(this.input.slice(this.lastTokEnd,this.start)):e===u._else||e===u.semi||e===u.eof||e===u.parenR||e===u.arrow?!0:e===u.braceL?t===D.b_stat:e===u._var||e===u._const||e===u.name?!1:!this.exprAllowed};ze.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};ze.updateContext=function(e){var t,r=this.type;r.keyword&&e===u.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr};ze.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};u.parenR.updateContext=u.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===D.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};u.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?D.b_stat:D.b_expr),this.exprAllowed=!0};u.dollarBraceL.updateContext=function(){this.context.push(D.b_tmpl),this.exprAllowed=!0};u.parenL.updateContext=function(e){var t=e===u._if||e===u._for||e===u._with||e===u._while;this.context.push(t?D.p_stat:D.p_expr),this.exprAllowed=!0};u.incDec.updateContext=function(){};u._function.updateContext=u._class.updateContext=function(e){e.beforeExpr&&e!==u._else&&!(e===u.semi&&this.curContext()!==D.p_stat)&&!(e===u._return&&H.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===u.colon||e===u.braceL)&&this.curContext()===D.b_stat)?this.context.push(D.f_expr):this.context.push(D.f_stat),this.exprAllowed=!1};u.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};u.backQuote.updateContext=function(){this.curContext()===D.q_tmpl?this.context.pop():this.context.push(D.q_tmpl),this.exprAllowed=!1};u.star.updateContext=function(e){if(e===u._function){var t=this.context.length-1;this.context[t]===D.f_expr?this.context[t]=D.f_expr_gen:this.context[t]=D.f_gen}this.exprAllowed=!0};u.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==u.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var w=P.prototype;w.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var i=e.key,n;switch(i.type){case"Identifier":n=i.name;break;case"Literal":n=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6){n==="__proto__"&&s==="init"&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);return}n="$"+n;var a=t[n];if(a){var o;s==="init"?o=this.strict&&a.init||a.get||a.set:o=a.init||a[s],o&&this.raiseRecoverable(i.start,"Redefinition of property")}else a=t[n]={init:!1,get:!1,set:!1};a[s]=!0}};w.parseExpression=function(e,t){var r=this.start,i=this.startLoc,n=this.parseMaybeAssign(e,t);if(this.type===u.comma){var s=this.startNodeAt(r,i);for(s.expressions=[n];this.eat(u.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return n};w.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var i=!1,n=-1,s=-1,a=-1;t?(n=t.parenthesizedAssign,s=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Zt,i=!0);var o=this.start,c=this.startLoc;(this.type===u.parenL||this.type===u.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var l=this.parseMaybeConditional(e,t);if(r&&(l=r.call(this,l,o,c)),this.type.isAssign){var h=this.startNodeAt(o,c);return h.operator=this.value,this.type===u.eq&&(l=this.toAssignable(l,!1,t)),i||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===u.eq?this.checkLValPattern(l):this.checkLValSimple(l),h.left=l,this.next(),h.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(h,"AssignmentExpression")}else i&&this.checkExpressionErrors(t,!0);return n>-1&&(t.parenthesizedAssign=n),s>-1&&(t.trailingComma=s),l};w.parseMaybeConditional=function(e,t){var r=this.start,i=this.startLoc,n=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return n;if(this.eat(u.question)){var s=this.startNodeAt(r,i);return s.test=n,s.consequent=this.parseMaybeAssign(),this.expect(u.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return n};w.parseExprOps=function(e,t){var r=this.start,i=this.startLoc,n=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||n.start===r&&n.type==="ArrowFunctionExpression"?n:this.parseExprOp(n,r,i,-1,e)};w.parseExprOp=function(e,t,r,i,n){var s=this.type.binop;if(s!=null&&(!n||this.type!==u._in)&&s>i){var a=this.type===u.logicalOR||this.type===u.logicalAND,o=this.type===u.coalesce;o&&(s=u.logicalAND.binop);var c=this.value;this.next();var l=this.start,h=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),l,h,s,n),f=this.buildBinary(t,r,e,p,c,a||o);return(a&&this.type===u.coalesce||o&&(this.type===u.logicalOR||this.type===u.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(f,t,r,i,n)}return e};w.buildBinary=function(e,t,r,i,n,s){i.type==="PrivateIdentifier"&&this.raise(i.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=r,a.operator=n,a.right=i,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")};w.parseMaybeUnary=function(e,t,r,i){var n=this.start,s=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(i),t=!0;else if(this.type.prefix){var o=this.startNode(),c=this.type===u.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,c,i),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(o.argument):this.strict&&o.operator==="delete"&&Cs(o.argument)?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):o.operator==="delete"&&ii(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,a=this.finishNode(o,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===u.privateId)(i||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),a=this.parsePrivateIdent(),this.type!==u._in&&this.unexpected();else{if(a=this.parseExprSubscripts(e,i),this.checkExpressionErrors(e))return a;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(n,s);l.operator=this.value,l.prefix=!1,l.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(l,"UpdateExpression")}}if(!r&&this.eat(u.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(n,s,a,this.parseMaybeUnary(null,!1,!1,i),"**",!1);else return a};function Cs(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Cs(e.expression)}function ii(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&ii(e.expression)||e.type==="ParenthesizedExpression"&&ii(e.expression)}w.parseExprSubscripts=function(e,t){var r=this.start,i=this.startLoc,n=this.parseExprAtom(e,t);if(n.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return n;var s=this.parseSubscripts(n,r,i,!1,t);return e&&s.type==="MemberExpression"&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s};w.parseSubscripts=function(e,t,r,i,n){for(var s=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;;){var o=this.parseSubscript(e,t,r,i,s,a,n);if(o.optional&&(a=!0),o===e||o.type==="ArrowFunctionExpression"){if(a){var c=this.startNodeAt(t,r);c.expression=o,o=this.finishNode(c,"ChainExpression")}return o}e=o}};w.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(u.arrow)};w.parseSubscriptAsyncArrow=function(e,t,r,i){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,i)};w.parseSubscript=function(e,t,r,i,n,s,a){var o=this.options.ecmaVersion>=11,c=o&&this.eat(u.questionDot);i&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(u.bracketL);if(l||c&&this.type!==u.parenL&&this.type!==u.backQuote||this.eat(u.dot)){var h=this.startNodeAt(t,r);h.object=e,l?(h.property=this.parseExpression(),this.expect(u.bracketR)):this.type===u.privateId&&e.type!=="Super"?h.property=this.parsePrivateIdent():h.property=this.parseIdent(this.options.allowReserved!=="never"),h.computed=!!l,o&&(h.optional=c),e=this.finishNode(h,"MemberExpression")}else if(!i&&this.eat(u.parenL)){var p=new Zt,f=this.yieldPos,x=this.awaitPos,y=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var C=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1,p);if(n&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=f,this.awaitPos=x,this.awaitIdentPos=y,this.parseSubscriptAsyncArrow(t,r,C,a);this.checkExpressionErrors(p,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=x||this.awaitPos,this.awaitIdentPos=y||this.awaitIdentPos;var T=this.startNodeAt(t,r);T.callee=e,T.arguments=C,o&&(T.optional=c),e=this.finishNode(T,"CallExpression")}else if(this.type===u.backQuote){(c||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var m=this.startNodeAt(t,r);m.tag=e,m.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(m,"TaggedTemplateExpression")}return e};w.parseExprAtom=function(e,t,r){this.type===u.slash&&this.readRegexp();var i,n=this.potentialArrowAt===this.start;switch(this.type){case u._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type===u.parenL&&!this.allowDirectSuper&&this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==u.dot&&this.type!==u.bracketL&&this.type!==u.parenL&&this.unexpected(),this.finishNode(i,"Super");case u._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case u.name:var s=this.start,a=this.startLoc,o=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(u._function))return this.overrideContext(D.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(n&&!this.canInsertSemicolon()){if(this.eat(u.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===u.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(u.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,a),[c],!0,t)}return c;case u.regexp:var l=this.value;return i=this.parseLiteral(l.value),i.regex={pattern:l.pattern,flags:l.flags},i;case u.num:case u.string:return this.parseLiteral(this.value);case u._null:case u._true:case u._false:return i=this.startNode(),i.value=this.type===u._null?null:this.type===u._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case u.parenL:var h=this.start,p=this.parseParenAndDistinguishExpression(n,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),p;case u.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(u.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case u.braceL:return this.overrideContext(D.b_expr),this.parseObj(!1,e);case u._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case u._class:return this.parseClass(this.startNode(),!1);case u._new:return this.parseNew();case u.backQuote:return this.parseTemplate();case u._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};w.parseExprAtomDefault=function(){this.unexpected()};w.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===u.parenL&&!e)return this.parseDynamicImport(t);if(this.type===u.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};w.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(u.parenR)){var t=this.start;this.eat(u.comma)&&this.eat(u.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};w.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};w.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};w.parseParenExpression=function(){this.expect(u.parenL);var e=this.parseExpression();return this.expect(u.parenR),e};w.shouldParseArrow=function(e){return!this.canInsertSemicolon()};w.parseParenAndDistinguishExpression=function(e,t){var r=this.start,i=this.startLoc,n,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,o=this.startLoc,c=[],l=!0,h=!1,p=new Zt,f=this.yieldPos,x=this.awaitPos,y;for(this.yieldPos=0,this.awaitPos=0;this.type!==u.parenR;)if(l?l=!1:this.expect(u.comma),s&&this.afterTrailingComma(u.parenR,!0)){h=!0;break}else if(this.type===u.ellipsis){y=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,p,this.parseParenItem));var C=this.lastTokEnd,T=this.lastTokEndLoc;if(this.expect(u.parenR),e&&this.shouldParseArrow(c)&&this.eat(u.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=x,this.parseParenArrowList(r,i,c,t);(!c.length||h)&&this.unexpected(this.lastTokStart),y&&this.unexpected(y),this.checkExpressionErrors(p,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=x||this.awaitPos,c.length>1?(n=this.startNodeAt(a,o),n.expressions=c,this.finishNodeAt(n,"SequenceExpression",C,T)):n=c[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var m=this.startNodeAt(r,i);return m.expression=n,this.finishNode(m,"ParenthesizedExpression")}else return n};w.parseParenItem=function(e){return e};w.parseParenArrowList=function(e,t,r,i){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,i)};var uc=[];w.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===u.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var i=this.start,n=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,n,!0,!1),this.eat(u.parenL)?e.arguments=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1):e.arguments=uc,this.finishNode(e,"NewExpression")};w.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===u.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value.replace(/\r\n?/g,`
17
+ OFFSET ${u.from||0} ROWS`,h),N(`
18
+ FETCH NEXT ${u.to!==null?u.to-(u.from||0):1e9} ROWS ONLY`,h)}}else(u.to!==null||u.from!==null)&&N(`
19
+ LIMIT ${u.to!==null?u.to-(u.from||0):1e9}`,h),u.from!==null&&N(` OFFSET ${u.from}`,h);return h}function Fo(e,t){if(typeof e=="object"){let r="";return e.database!=null&&(r+=t(e.database)+"."),e.schema!=null&&(r+=t(e.schema)+"."),r+=t(e.table),r}else return t(e)}function N(e,t){let r=t[0];r[r.length-1]+=e}function en({column:e,direction:t},r,i){N(`${i(e)} ${t.toUpperCase()}`,r)}function Do({type:e,operands:t},r,i){if(t.length<1)throw new Error("Invalid operand length");if(t.length===1||e==="v"||e==="nv")switch(Be(t[0],r,i),e){case"n":case"nv":N(" IS NULL",r);return;case"nn":case"v":N(" IS NOT NULL",r);return;default:throw new Error("Invalid filter operation")}if(t.length===2&&!["in","nin"].includes(e))if(["c","nc"].includes(e)){switch(Be(t[0],r,i),e){case"c":N(" LIKE ",r);break;case"nc":N(" NOT LIKE ",r);break}Be(No(t[1]),r,i);return}else{switch(Be(t[0],r,i),e){case"eq":N(" = ",r);break;case"ne":N(" <> ",r);break;case"gt":N(" > ",r);break;case"lt":N(" < ",r);break;case"gte":N(" >= ",r);break;case"lte":N(" <= ",r);break;default:throw new Error("Invalid filter operation")}Be(t[1],r,i);return}switch(Be(t[0],r,i),e){case"in":N(" IN (",r);break;case"nin":N(" NOT IN (",r);break;default:throw new Error("Invalid filter operation")}To(t.slice(1),r),N(")",r)}function Be(e,t,r){e.type==="column"?N(r(e.value),t):(t.push(e.value),t[0].push(""))}function To(e,t){let r=!0;for(let i of e)r?r=!1:N(",",t),t.push(i.value),t[0].push("")}function No(e){return{...e,value:`%${e.value}%`}}function pn(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))}function Po(e,t){return pn(e,t)||(e<t?-1:e>t?1:0)}function Bo(e,t){return pn(e,t)||(e>t?-1:e<t?1:0)}var Lo=e=>typeof e=="number"&&!Number.isNaN(e),Ro=e=>Number.isInteger(e)&&!Number.isNaN(e),Oo=e=>typeof e=="string",Vo=e=>typeof e=="boolean",Mo=e=>typeof e=="bigint",qo=e=>e instanceof Date&&!isNaN(e),jo=e=>e instanceof ArrayBuffer,Uo=e=>Array.isArray(e),$o=e=>typeof e=="object"&&e!==null,Wo=e=>e!=null;function Tr(e){switch(e){case"string":return Oo;case"bigint":return Mo;case"boolean":return Vo;case"number":return Lo;case"integer":return Ro;case"date":return qo;case"buffer":return jo;case"array":return Uo;case"object":return $o;case"other":default:return Wo}}var hn=/^(([-+]\d{2})?\d{4}(-\d{2}(-\d{2}))|(\d{1,2})\/(\d{1,2})\/(\d{2,4}))([T ]\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/;function zo(e,t){switch(t){case"string":return typeof e=="string"||e==null?e:String(e);case"boolean":if(typeof e=="string"){let r=e.trim().toLowerCase();return r==="true"?!0:r==="false"?!1:null}return typeof e=="boolean"||e==null?e:!!e;case"bigint":return typeof e=="bigint"||e==null?e:Number.isInteger(typeof e=="string"&&!e.trim()?NaN:+e)?BigInt(e):void 0;case"integer":case"number":return typeof e=="number"?e:e==null||typeof e=="string"&&!e.trim()?NaN:Number(e);case"date":{if(e instanceof Date||e==null)return e;if(typeof e=="number")return new Date(e);let r=String(e).trim();return typeof e=="string"&&!r?null:new Date(hn.test(r)?r:NaN)}case"array":case"object":case"buffer":case"other":return e;default:throw new Error(`Unable to coerce to type: ${t}`)}}function fn(e){let{columns:t}=e,{schema:r}=e;return sn(r)?{schema:r,inferred:!1}:(r=Pt(e,an(t)?t:void 0),{schema:r,inferred:!0})}function tn(e,t){let r=e,{schema:i,inferred:n}=fn(e),s=new Map(i.map(({name:a,type:u})=>[a,u]));if(t.types){for(let{name:a,type:u}of t.types){s.set(a,u),i===r.schema&&(i=i.slice());let c=i.findIndex(l=>l.name===a);c>-1&&(i[c]={...i[c],type:u})}e=e.map(a=>Nt(a,s,i))}else n&&(e=e.map(a=>Nt(a,s,i)));return{source:e,schema:i}}function rn(e,t){if(!t.names)return e;let r=new Map(t.names.map(i=>[i.column,i]));return e.map(i=>Object.fromEntries(Object.keys(i).map(n=>[r.get(n)?.name??n,i[n]])))}function dn(e,t){let r=new Map,i=e,n=tn(e,t);e=n.source;let s=n.schema;if(t.derive){let l=[];t.derive.map(({name:p,value:f})=>{let x=[];rn(e,t).map((y,C)=>{let T;try{T=f(y)}catch(m){x.push({index:C,error:m}),T=void 0}l[C]?l[C]={...l[C],[p]:T}:l.push({[p]:T})}),x.length&&r.set(p,x)});let h=tn(l,t);e=e.map((p,f)=>({...p,...h.source[f]})),s=[...s,...h.schema]}for(let{type:l,operands:h}of t.filter){let[{value:p}]=h,f=h.slice(1).map(({value:x})=>x);switch(l){case"v":{let[x]=f,y=Tr(x);e=e.filter(C=>y(C[p]));break}case"nv":{let[x]=f,y=Tr(x);e=e.filter(C=>!y(C[p]));break}case"eq":{let[x]=f;if(x instanceof Date){let y=+x;e=e.filter(C=>+C[p]===y)}else e=e.filter(y=>y[p]===x);break}case"ne":{let[x]=f;e=e.filter(y=>y[p]!==x);break}case"c":{let[x]=f;e=e.filter(y=>typeof y[p]=="string"&&y[p].includes(x));break}case"nc":{let[x]=f;e=e.filter(y=>typeof y[p]=="string"&&!y[p].includes(x));break}case"in":{let x=new Set(f);e=e.filter(y=>x.has(y[p]));break}case"nin":{let x=new Set(f);e=e.filter(y=>!x.has(y[p]));break}case"n":{e=e.filter(x=>x[p]==null);break}case"nn":{e=e.filter(x=>x[p]!=null);break}case"lt":{let[x]=f;e=e.filter(y=>y[p]<x);break}case"lte":{let[x]=f;e=e.filter(y=>y[p]<=x);break}case"gt":{let[x]=f;e=e.filter(y=>y[p]>x);break}case"gte":{let[x]=f;e=e.filter(y=>y[p]>=x);break}default:throw new Error(`unknown filter type: ${l}`)}}for(let{column:l,direction:h}of Dt(t.sort)){let p=h==="desc"?Bo:Po;e===i&&(e=e.slice()),e.sort((f,x)=>p(f[l],x[l]))}let{from:a,to:u}=t.slice;a=a==null?0:Math.max(0,a),u=u==null?1/0:Math.max(0,u),(a>0||u<1/0)&&(e=e.slice(Math.max(0,a),Math.max(0,u)));let c=s.slice();if(t.select.columns){if(s){let l=new Map(s.map(h=>[h.name,h]));s=t.select.columns.map(h=>l.get(h))}e=e.map(l=>Object.fromEntries(t.select.columns.map(h=>[h,l[h]])))}if(t.names){let l=new Map(t.names.map(h=>[h.column,h]));s&&(s=s.map(h=>{let p=l.get(h.name);return{...h,...p?{name:p.name}:null}})),c&&(c=c.map(h=>{let p=l.get(h.name);return{...h,...p?{name:p.name}:null}})),e=rn(e,t)}return e!==i&&s&&(e.schema=s),e.fullSchema=c,e.errors=r,e}function Nt(e,t,r){let i={};for(let n of r){let s=t.get(n.name),a=e[n.name];i[n.name]=s==="raw"?a:zo(a,s)}return i}function Ho(){return{boolean:0,integer:0,number:0,date:0,string:0,array:0,object:0,bigint:0,buffer:0,defined:0}}var Go=["boolean","integer","number","date","bigint","array","object","buffer"];function Yo(e){let t=new Set;for(let r of e)if(r)for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&t.add(i);return Array.from(t)}function Pt(e,t=Yo(e)){let r=[],n=e.slice(0,100),s={};for(let a of t){let u=s[a]=Ho();for(let h of n){let p=h[a];if(p==null)continue;let f=typeof p;if(f!=="string")++u.defined,Array.isArray(p)?++u.array:p instanceof Date?++u.date:p instanceof ArrayBuffer?++u.buffer:f==="number"?(++u.number,Number.isInteger(p)&&++u.integer):f in u&&++u[f];else{if(p=p.trim(),!p)continue;++u.defined,++u.string,/^(true|false)$/i.test(p)?++u.boolean:p&&!isNaN(p)?(++u.number,Number.isInteger(+p)&&++u.integer):hn.test(p)&&++u.date}}let c=Math.max(1,u.defined*.9),l=Ft(Go,h=>u[h]>=c?u[h]:NaN)??(u.string>=c?"string":"other");r.push({name:a,type:l,inferred:l})}return r}var Bt=class{constructor(t){Object.defineProperties(this,{_:{value:t},sheetNames:{value:t.worksheets.map(r=>r.name),enumerable:!0}})}sheet(t,r){let i=typeof t=="number"?this.sheetNames[t]:this.sheetNames.includes(t+="")?t:null;if(i==null)throw new Error(`Sheet not found: ${t}`);let n=this._.getWorksheet(i);return Ko(n,r)}};function Ko(e,{range:t,headers:r}={}){let[[i,n],[s,a]]=Qo(t,e),u=r?e._rows[n++]:null,c=new Set(["#"]);for(let h=i;h<=s;h++){let p=u?mn(u.findCell(h+1)):null,f=p&&p+""||Jo(h);for(;c.has(f);)f+="_";c.add(f)}c=new Array(i).concat(Array.from(c));let l=new Array(a-n+1);for(let h=n;h<=a;h++){let p=l[h-n]=Object.create(null,{"#":{value:h+1}}),f=e.getRow(h+1);if(f.hasValues)for(let x=i;x<=s;x++){let y=mn(f.findCell(x+1));y!=null&&(p[c[x+1]]=y)}}return l.columns=c.filter(()=>!0),l}function mn(e){if(!e)return;let{value:t}=e;if(t&&typeof t=="object"&&!(t instanceof Date)){if(t.formula||t.sharedFormula)return t.result&&t.result.error?NaN:t.result;if(t.richText)return xn(t);if(t.text){let{text:r}=t;return r.richText&&(r=xn(r)),t.hyperlink&&t.hyperlink!==r?`${t.hyperlink} ${r}`:r}return t}return t}function xn(e){return e.richText.map(t=>t.text).join("")}function Qo(e=":",{columnCount:t,rowCount:r}){if(e+="",!e.match(/^[A-Z]*\d*:[A-Z]*\d*$/))throw new Error("Malformed range specifier");let[[i=0,n=0],[s=t-1,a=r-1]]=e.split(":").map(Zo);return[[i,n],[s,a]]}function Jo(e){let t="";e++;do t=String.fromCharCode(64+(e%26||26))+t;while(e=Math.floor((e-1)/26));return t}function Zo(e){let[,t,r]=e.match(/^([A-Z]*)(\d*)$/),i=0;if(t)for(let n=0;n<t.length;n++)i+=Math.pow(26,t.length-n-1)*(t.charCodeAt(n)-64);return[i?i-1:void 0,r?+r-1:void 0]}async function se(e){let t=await fetch(await e.url());if(!t.ok)throw new Error(`Unable to load file: ${e.name}`);return t}function Xo(e,t){let r=new Map(t.map(({name:i,type:n})=>[i,n]));return Object.assign(e.map(i=>Nt(i,r,t)),{schema:t})}async function yn(e,t,{array:r=!1,typed:i=!1}={}){let n=await e.text(),s=t===" "?r?vr:br:r?gr:yr;if(i==="auto"&&!r){let a=s(n);return Xo(a,Pt(a,a.columns))}return s(n,i&&Ct)}var Ae=class{constructor(t,r){Object.defineProperty(this,"name",{value:t,enumerable:!0}),r!==void 0&&Object.defineProperty(this,"mimeType",{value:r+"",enumerable:!0})}async blob(){return(await se(this)).blob()}async arrayBuffer(){return(await se(this)).arrayBuffer()}async text(){return(await se(this)).text()}async json(){return(await se(this)).json()}async stream(){return(await se(this)).body}async csv(t){return yn(this,",",t)}async tsv(t){return yn(this," ",t)}async image(t){let r=await this.url();return new Promise((i,n)=>{let s=new Image;new URL(r,document.baseURI).origin!==new URL(location).origin&&(s.crossOrigin="anonymous"),Object.assign(s,t),s.onload=()=>i(s),s.onerror=()=>n(new Error(`Unable to load file: ${this.name}`)),s.src=r})}async arrow({version:t=4}={}){switch(t){case 4:{let[r,i]=await Promise.all([K(et.resolve()),se(this)]);return r.Table.from(i)}case 9:{let[r,i]=await Promise.all([import(`${Y}${qi.resolve()}`),se(this)]);return r.tableFromIPC(i)}case 11:{let[r,i]=await Promise.all([import(`${Y}${kt.resolve()}`),se(this)]);return r.tableFromIPC(i)}default:throw new Error(`unsupported arrow version: ${t}`)}}async sqlite(){return we.open(se(this))}async zip(){let[t,r]=await Promise.all([K(Li.resolve()),this.arrayBuffer()]);return new Rr(await t.loadAsync(r))}async xml(t="application/xml"){return new DOMParser().parseFromString(await this.text(),t)}async html(){return this.xml("text/html")}async xlsx(){let[t,r]=await Promise.all([K($i.resolve()),this.arrayBuffer()]);return new Bt(await new t.Workbook().xlsx.load(r))}},I=class extends Ae{constructor(t,r,i){super(r,i),Object.defineProperty(this,"_url",{value:t})}async url(){return await this._url+""}};function gn(e){throw new Error(`File not found: ${e}`)}function Vr(e){return Object.assign(t=>{let r=e(t+="");if(r==null)throw new Error(`File not found: ${t}`);if(typeof r=="object"&&"url"in r){let{url:i,mimeType:n}=r;return new I(i,t,n)}return new I(r,t)},{prototype:I.prototype})}var Rr=class{constructor(t){Object.defineProperty(this,"_",{value:t}),this.filenames=Object.keys(t.files).filter(r=>!t.files[r].dir)}file(t){let r=this._.file(t+="");if(!r||r.dir)throw new Error(`file not found: ${t}`);return new Or(r)}},Or=class extends Ae{constructor(t){super(t.name),Object.defineProperty(this,"_",{value:t}),Object.defineProperty(this,"_url",{writable:!0})}async url(){return this._url||(this._url=this.blob().then(URL.createObjectURL))}async blob(){return this._.async("blob")}async arrayBuffer(){return this._.async("arraybuffer")}async text(){return this._.async("text")}async json(){return JSON.parse(await this.text())}};var Mr={};gt(Mr,{canvas:()=>bn,context2d:()=>vn,download:()=>wn,element:()=>En,input:()=>_n,range:()=>An,select:()=>Cn,svg:()=>Sn,text:()=>kn,uid:()=>Rt});function bn(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,r}function vn(e,t,r){r==null&&(r=devicePixelRatio);var i=document.createElement("canvas");i.width=e*r,i.height=t*r,i.style.width=e+"px";var n=i.getContext("2d");return n.scale(r,r),n}function wn(e,t="untitled",r="Save"){let i=document.createElement("a"),n=i.appendChild(document.createElement("button"));n.textContent=r,i.download=t;async function s(){await new Promise(requestAnimationFrame),URL.revokeObjectURL(i.href),i.removeAttribute("href"),n.textContent=r,n.disabled=!1}return i.onclick=async a=>{if(n.disabled=!0,i.href)return s();n.textContent="Saving\u2026";try{let u=await(typeof e=="function"?e():e);n.textContent="Download",i.href=URL.createObjectURL(u)}catch{n.textContent=r}if(a.eventPhase)return s();n.disabled=!1},i}var Lt={math:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function En(e,t){var r=e+="",i=r.indexOf(":"),n;i>=0&&(r=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1));var s=Lt.hasOwnProperty(r)?document.createElementNS(Lt[r],e):document.createElement(e);if(t)for(var a in t)r=a,i=r.indexOf(":"),n=t[a],i>=0&&(r=a.slice(0,i))!=="xmlns"&&(a=a.slice(i+1)),Lt.hasOwnProperty(r)?s.setAttributeNS(Lt[r],a,n):s.setAttribute(a,n);return s}function _n(e){var t=document.createElement("input");return e!=null&&(t.type=e),t}function An(e,t,r){arguments.length===1&&(t=e,e=null);var i=document.createElement("input");return i.min=e=e==null?0:+e,i.max=t=t==null?1:+t,i.step=r==null?"any":r=+r,i.type="range",i}function Cn(e){var t=document.createElement("select");return Array.prototype.forEach.call(e,function(r){var i=document.createElement("option");i.value=i.textContent=r,t.appendChild(i)}),t}function Sn(e,t){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("viewBox",[0,0,e,t]),r.setAttribute("width",e),r.setAttribute("height",t),r}function kn(e){return document.createTextNode(e)}var eu=0;function Rt(e){return new In("O-"+(e==null?"":e+"-")+ ++eu)}function In(e){this.id=e,this.href=new URL(`#${e}`,location)+""}In.prototype.toString=function(){return"url("+this.href+")"};var qr={};gt(qr,{buffer:()=>Fn,text:()=>Dn,url:()=>Tn});function Fn(e){return new Promise(function(t,r){var i=new FileReader;i.onload=function(){t(i.result)},i.onerror=r,i.readAsArrayBuffer(e)})}function Dn(e){return new Promise(function(t,r){var i=new FileReader;i.onload=function(){t(i.result)},i.onerror=r,i.readAsText(e)})}function Tn(e){return new Promise(function(t,r){var i=new FileReader;i.onload=function(){t(i.result)},i.onerror=r,i.readAsDataURL(e)})}var jr={};gt(jr,{disposable:()=>Ot,filter:()=>Nn,input:()=>Bn,map:()=>Ln,observe:()=>ae,queue:()=>Rn,range:()=>On,valueAt:()=>Vn,worker:()=>Mn});function Re(){return this}function Ot(e,t){let r=!1;if(typeof t!="function")throw new Error("dispose is not a function");return{[Symbol.iterator]:Re,next:()=>r?{done:!0}:(r=!0,{done:!1,value:e}),return:()=>(r=!0,t(e),{done:!0}),throw:()=>({done:r=!0})}}function*Nn(e,t){for(var r,i=-1;!(r=e.next()).done;)t(r.value,++i)&&(yield r.value)}function ae(e){let t=!1,r,i,n=e(s);if(n!=null&&typeof n!="function")throw new Error(typeof n.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");function s(u){return i?(i(u),i=null):t=!0,r=u}function a(){return{done:!1,value:t?(t=!1,Promise.resolve(r)):new Promise(u=>i=u)}}return{[Symbol.iterator]:Re,throw:()=>({done:!0}),return:()=>(n?.(),{done:!0}),next:a}}function Bn(e){return ae(function(t){var r=tu(e),i=Pn(e);function n(){t(Pn(e))}return e.addEventListener(r,n),i!==void 0&&t(i),function(){e.removeEventListener(r,n)}})}function Pn(e){switch(e.type){case"range":case"number":return e.valueAsNumber;case"date":return e.valueAsDate;case"checkbox":return e.checked;case"file":return e.multiple?e.files:e.files[0];case"select-multiple":return Array.from(e.selectedOptions,t=>t.value);default:return e.value}}function tu(e){switch(e.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}function*Ln(e,t){for(var r,i=-1;!(r=e.next()).done;)yield t(r.value,++i)}function Rn(e){let t,r=[],i=e(n);if(i!=null&&typeof i!="function")throw new Error(typeof i.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");function n(a){return r.push(a),t&&(t(r.shift()),t=null),a}function s(){return{done:!1,value:r.length?Promise.resolve(r.shift()):new Promise(a=>t=a)}}return{[Symbol.iterator]:Re,throw:()=>({done:!0}),return:()=>(i?.(),{done:!0}),next:s}}function*On(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((t-e)/r))|0;++i<n;)yield e+i*r}function Vn(e,t){if(!(!isFinite(t=+t)||t<0||t!==t|0)){for(var r,i=-1;!(r=e.next()).done;)if(++i===t)return r.value}}function Mn(e){let t=URL.createObjectURL(new Blob([e],{type:"text/javascript"})),r=new Worker(t);return Ot(r,()=>{r.terminate(),URL.revokeObjectURL(t)})}function Oe(e,t){return function(r){var i=r[0],n=[],s,a=null,u,c,l,h,p,f,x,y=-1;for(h=1,p=arguments.length;h<p;++h){if(s=arguments[h],s instanceof Node)n[++y]=s,i+="<!--o:"+y+"-->";else if(Array.isArray(s)){for(f=0,x=s.length;f<x;++f)u=s[f],u instanceof Node?(a===null&&(n[++y]=a=document.createDocumentFragment(),i+="<!--o:"+y+"-->"),a.appendChild(u)):(a=null,i+=u);a=null}else i+=s;i+=r[h]}if(a=e(i),++y>0){for(c=new Array(y),l=document.createTreeWalker(a,NodeFilter.SHOW_COMMENT,null,!1);l.nextNode();)u=l.currentNode,/^o:/.test(u.nodeValue)&&(c[+u.nodeValue.slice(2)]=u);for(h=0;h<y;++h)(u=c[h])&&u.parentNode.replaceChild(n[h],u)}return a.childNodes.length===1?a.removeChild(a.firstChild):a.nodeType===11?((u=t()).appendChild(a),u):a}}var qn=Oe(function(e){var t=document.createElement("template");return t.innerHTML=e.trim(),document.importNode(t.content,!0)},function(){return document.createElement("span")});async function jn(e){let t=await e(_r.resolve());if(!t._style){let r=document.createElement("link");r.rel="stylesheet",r.href=await e.resolve(_r.resolve("dist/leaflet.css")),t._style=document.head.appendChild(r)}return t}function Un(e){return e(Ri.resolve()).then(function(t){return Oe(function(r){var i=document.createElement("div");i.innerHTML=t(r,{langPrefix:""}).trim();var n=i.querySelectorAll("pre code[class]");return n.length>0&&e(St.resolve()).then(function(s){n.forEach(function(a){function u(){s.highlightBlock(a),a.parentNode.classList.add("observablehq--md-pre")}s.getLanguage(a.className)?u():e(St.resolve("async-languages/index.js")).then(c=>{if(c.has(a.className))return e(St.resolve("async-languages/"+c.get(a.className))).then(l=>{s.registerLanguage(a.className,l)})}).then(u,u)})}),i},function(){return document.createElement("div")})})}async function $n(e){let t=await e(Wi.resolve());return t.initialize({securityLevel:"loose",theme:"neutral"}),function(){let i=document.createElement("div");return i.innerHTML=t.render(Rt().id,String.raw.apply(String,arguments)),i.removeChild(i.firstChild)}}function Wn(e){let t;Object.defineProperties(this,{generator:{value:ae(r=>void(t=r))},value:{get:()=>e,set:r=>t(e=r)}}),e!==void 0&&t(e)}function*zn(){for(;;)yield Date.now()}var $r={};gt($r,{delay:()=>Hn,tick:()=>Gn,when:()=>Vt});function Hn(e,t){return new Promise(function(r){setTimeout(function(){r(t)},e)})}var Ur=new Map;function ru(e,t){var r=new Promise(function(i){Ur.delete(t);var n=t-e;if(!(n>0))throw new Error("invalid time");if(n>2147483647)throw new Error("too long to wait");setTimeout(i,n)});return Ur.set(t,r),r}function Vt(e,t){var r;return(r=Ur.get(e=+e))?r.then(()=>t):(r=Date.now())>=e?Promise.resolve(t):ru(r,e).then(()=>t)}function Gn(e,t){return Vt(Math.ceil((Date.now()+1)/e)*e,t)}function Yn(e,t){if(/^(\w+:)|\/\//i.test(e))return e;if(/^[.]{0,2}\//i.test(e))return new URL(e,t??location).href;if(!e.length||/^[\s._]/.test(e)||/\s$/.test(e))throw new Error("illegal name");return"https://unpkg.com/"+e}var Kn=Oe(function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return t.innerHTML=e.trim(),t},function(){return document.createElementNS("http://www.w3.org/2000/svg","g")});var iu=String.raw;function nu(e){return new Promise(function(t,r){var i=document.createElement("link");i.rel="stylesheet",i.href=e,i.onerror=r,i.onload=t,document.head.appendChild(i)})}function Qn(e){return Promise.all([e(wr.resolve()),e.resolve(wr.resolve("dist/katex.min.css")).then(nu)]).then(function(t){var r=t[0],i=n();function n(s){return function(){var a=document.createElement("div");return r.render(iu.apply(String,arguments),a,s),a.removeChild(a.firstChild)}}return i.options=n,i.block=n({displayMode:!0}),i})}async function Jn(e){let[t,r,i]=await Promise.all([Oi,Vi,Mi].map(n=>e(n.resolve())));return i.register(t,r)}function Zn(){return ae(function(e){var t=e(document.body.clientWidth);function r(){var i=document.body.clientWidth;i!==t&&e(t=i)}return window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}})}var Ve=Object.assign(Object.defineProperties(function(t){let r=Qi(t);Object.defineProperties(this,su({FileAttachment:()=>gn,Mutable:()=>Wn,now:zn,width:Zn,dot:()=>r(Ni.resolve()),htl:()=>r(Bi.resolve()),html:()=>qn,md:()=>Un(r),svg:()=>Kn,tex:()=>Qn(r),_:()=>r(Pi.resolve()),aq:()=>r.alias({"apache-arrow":et.resolve()})(ji.resolve()),Arrow:()=>r(et.resolve()),d3:()=>r(Fi.resolve()),DuckDBClient:()=>_e,Inputs:()=>r(Di.resolve()).then(i=>({...i,file:i.fileOf(Ae)})),L:()=>jn(r),mermaid:()=>$n(r),Plot:()=>r(Ti.resolve()),__query:()=>Br,require:()=>r,resolve:()=>Yn,SQLite:()=>Ir(r),SQLiteDatabaseClient:()=>we,topojson:()=>r(Ui.resolve()),vl:()=>Jn(r),aapl:()=>new I("https://static.observableusercontent.com/files/3ccff97fd2d93da734e76829b2b066eafdaac6a1fafdec0faf6ebc443271cfc109d29e80dd217468fcb2aff1e6bffdc73f356cc48feb657f35378e6abbbb63b9").csv({typed:!0}),alphabet:()=>new I("https://static.observableusercontent.com/files/75d52e6c3130b1cae83cda89305e17b50f33e7420ef205587a135e8562bcfd22e483cf4fa2fb5df6dff66f9c5d19740be1cfaf47406286e2eb6574b49ffc685d").csv({typed:!0}),cars:()=>new I("https://static.observableusercontent.com/files/048ec3dfd528110c0665dfa363dd28bc516ffb7247231f3ab25005036717f5c4c232a5efc7bb74bc03037155cb72b1abe85a33d86eb9f1a336196030443be4f6").csv({typed:!0}),citywages:()=>new I("https://static.observableusercontent.com/files/39837ec5121fcc163131dbc2fe8c1a2e0b3423a5d1e96b5ce371e2ac2e20a290d78b71a4fb08b9fa6a0107776e17fb78af313b8ea70f4cc6648fad68ddf06f7a").csv({typed:!0}),diamonds:()=>new I("https://static.observableusercontent.com/files/87942b1f5d061a21fa4bb8f2162db44e3ef0f7391301f867ab5ba718b225a63091af20675f0bfe7f922db097b217b377135203a7eab34651e21a8d09f4e37252").csv({typed:!0}),flare:()=>new I("https://static.observableusercontent.com/files/a6b0d94a7f5828fd133765a934f4c9746d2010e2f342d335923991f31b14120de96b5cb4f160d509d8dc627f0107d7f5b5070d2516f01e4c862b5b4867533000").csv({typed:!0}),industries:()=>new I("https://static.observableusercontent.com/files/76f13741128340cc88798c0a0b7fa5a2df8370f57554000774ab8ee9ae785ffa2903010cad670d4939af3e9c17e5e18e7e05ed2b38b848ac2fc1a0066aa0005f").csv({typed:!0}),miserables:()=>new I("https://static.observableusercontent.com/files/31d904f6e21d42d4963ece9c8cc4fbd75efcbdc404bf511bc79906f0a1be68b5a01e935f65123670ed04e35ca8cae3c2b943f82bf8db49c5a67c85cbb58db052").json(),olympians:()=>new I("https://static.observableusercontent.com/files/31ca24545a0603dce099d10ee89ee5ae72d29fa55e8fc7c9ffb5ded87ac83060d80f1d9e21f4ae8eb04c1e8940b7287d179fe8060d887fb1f055f430e210007c").csv({typed:!0}),penguins:()=>new I("https://static.observableusercontent.com/files/715db1223e067f00500780077febc6cebbdd90c151d3d78317c802732252052ab0e367039872ab9c77d6ef99e5f55a0724b35ddc898a1c99cb14c31a379af80a").csv({typed:!0}),pizza:()=>new I("https://static.observableusercontent.com/files/c653108ab176088cacbb338eaf2344c4f5781681702bd6afb55697a3f91b511c6686ff469f3e3a27c75400001a2334dbd39a4499fe46b50a8b3c278b7d2f7fb5").csv({typed:!0}),weather:()=>new I("https://static.observableusercontent.com/files/693a46b22b33db0f042728700e0c73e836fa13d55446df89120682d55339c6db7cc9e574d3d73f24ecc9bc7eb9ac9a1e7e104a1ee52c00aab1e77eb102913c1f").csv({typed:!0}),DOM:Mr,Files:qr,Generators:jr,Promises:$r}))},{resolve:{get:()=>K.resolve,enumerable:!0,configurable:!0},require:{get:()=>K,set:Ki,enumerable:!0,configurable:!0}}),{resolveFrom:Cr,requireFrom:Ne});function su(e){return Object.fromEntries(Object.entries(e).map(au))}function au([e,t]){return[e,{value:t,writable:!0,enumerable:!0}]}var R=class extends Error{constructor(t,r){super(t),this.input=r}};R.prototype.name="RuntimeError";function Xn(e){return e&&typeof e.next=="function"&&typeof e.return=="function"}function st(e){return()=>e}function Me(e){return e}function es(e){return()=>{throw e}}var ts=Array.prototype,rs=ts.map,yd=ts.forEach;function Q(){}var Mt=1,Se=2,at=3,Ce=Symbol("no-observer");function X(e,t,r,i){r||(r=Ce),Object.defineProperties(this,{_observer:{value:r,writable:!0},_definition:{value:Wr,writable:!0},_duplicate:{value:void 0,writable:!0},_duplicates:{value:void 0,writable:!0},_indegree:{value:NaN,writable:!0},_inputs:{value:[],writable:!0},_invalidate:{value:Q,writable:!0},_module:{value:t},_name:{value:null,writable:!0},_outputs:{value:new Set,writable:!0},_promise:{value:Promise.resolve(void 0),writable:!0},_reachable:{value:r!==Ce,writable:!0},_rejector:{value:lu(this)},_shadow:{value:ou(t,i)},_type:{value:e},_value:{value:void 0,writable:!0},_version:{value:0,writable:!0}})}Object.defineProperties(X.prototype,{_pending:{value:mu,writable:!0,configurable:!0},_fulfilled:{value:xu,writable:!0,configurable:!0},_rejected:{value:yu,writable:!0,configurable:!0},_resolve:{value:hu,writable:!0,configurable:!0},define:{value:pu,writable:!0,configurable:!0},delete:{value:du,writable:!0,configurable:!0},import:{value:fu,writable:!0,configurable:!0}});function ou(e,t){return t?.shadow?new Map(Object.entries(t.shadow).map(([r,i])=>[r,new X(Se,e).define([],i)])):null}function uu(e){e._module._runtime._dirty.add(e),e._outputs.add(this)}function cu(e){e._module._runtime._dirty.add(e),e._outputs.delete(this)}function Wr(){throw Wr}function J(){throw J}function lu(e){return t=>{throw t===J?t:t===Wr?new R(`${e._name} is not defined`,e._name):t instanceof Error&&t.message?new R(t.message,e._name):new R(`${e._name} could not be resolved`,e._name)}}function is(e){return()=>{throw new R(`${e} is defined more than once`)}}function pu(e,t,r){switch(arguments.length){case 1:{r=e,e=t=null;break}case 2:{r=t,typeof e=="string"?t=null:(t=e,e=null);break}}return zr.call(this,e==null?null:String(e),t==null?[]:rs.call(t,this._resolve,this),typeof r=="function"?r:st(r))}function hu(e){return this._shadow?.get(e)??this._module._resolve(e)}function zr(e,t,r){let i=this._module._scope,n=this._module._runtime;if(this._inputs.forEach(cu,this),t.forEach(uu,this),this._inputs=t,this._definition=r,this._value=void 0,r===Q?n._variables.delete(this):n._variables.add(this),e!==this._name||i.get(e)!==this){let s,a;if(this._name)if(this._outputs.size)i.delete(this._name),a=this._module._resolve(this._name),a._outputs=this._outputs,this._outputs=new Set,a._outputs.forEach(function(u){u._inputs[u._inputs.indexOf(this)]=a},this),a._outputs.forEach(n._updates.add,n._updates),n._dirty.add(a).add(this),i.set(this._name,a);else if((a=i.get(this._name))===this)i.delete(this._name);else if(a._type===at)a._duplicates.delete(this),this._duplicate=void 0,a._duplicates.size===1&&(a=a._duplicates.keys().next().value,s=i.get(this._name),a._outputs=s._outputs,s._outputs=new Set,a._outputs.forEach(function(u){u._inputs[u._inputs.indexOf(s)]=a}),a._definition=a._duplicate,a._duplicate=void 0,n._dirty.add(s).add(a),n._updates.add(a),i.set(this._name,a));else throw new Error;if(this._outputs.size)throw new Error;e&&((a=i.get(e))?a._type===at?(this._definition=is(e),this._duplicate=r,a._duplicates.add(this)):a._type===Se?(this._outputs=a._outputs,a._outputs=new Set,this._outputs.forEach(function(u){u._inputs[u._inputs.indexOf(a)]=this},this),n._dirty.add(a).add(this),i.set(e,this)):(a._duplicate=a._definition,this._duplicate=r,s=new X(at,this._module),s._name=e,s._definition=this._definition=a._definition=is(e),s._outputs=a._outputs,a._outputs=new Set,s._outputs.forEach(function(u){u._inputs[u._inputs.indexOf(a)]=s}),s._duplicates=new Set([this,a]),n._dirty.add(a).add(s),n._updates.add(a).add(s),i.set(e,s)):i.set(e,this)),this._name=e}return this._version>0&&++this._version,n._updates.add(this),n._compute(),this}function fu(e,t,r){return arguments.length<3&&(r=t,t=e),zr.call(this,String(t),[r._resolve(String(e))],Me)}function du(){return zr.call(this,null,[],Q)}function mu(){this._observer.pending&&this._observer.pending()}function xu(e){this._observer.fulfilled&&this._observer.fulfilled(e,this._name)}function yu(e){this._observer.rejected&&this._observer.rejected(e,this._name)}var Gr=Symbol("variable"),Yr=Symbol("invalidation"),Kr=Symbol("visibility");function ot(e,t=[]){Object.defineProperties(this,{_runtime:{value:e},_scope:{value:new Map},_builtins:{value:new Map([["@variable",Gr],["invalidation",Yr],["visibility",Kr],...t])},_source:{value:null,writable:!0}})}Object.defineProperties(ot.prototype,{_resolve:{value:Au,writable:!0,configurable:!0},redefine:{value:gu,writable:!0,configurable:!0},define:{value:bu,writable:!0,configurable:!0},derive:{value:_u,writable:!0,configurable:!0},import:{value:vu,writable:!0,configurable:!0},value:{value:Eu,writable:!0,configurable:!0},variable:{value:wu,writable:!0,configurable:!0},builtin:{value:Cu,writable:!0,configurable:!0}});function gu(e){let t=this._scope.get(e);if(!t)throw new R(`${e} is not defined`);if(t._type===at)throw new R(`${e} is defined more than once`);return t.define.apply(t,arguments)}function bu(){let e=new X(Mt,this);return e.define.apply(e,arguments)}function vu(){let e=new X(Mt,this);return e.import.apply(e,arguments)}function wu(e,t){return new X(Mt,this,e,t)}async function Eu(e){let t=this._scope.get(e);if(!t)throw new R(`${e} is not defined`);if(t._observer===Ce){t=this.variable(!0).define([e],Me);try{return await Hr(this._runtime,t)}finally{t.delete()}}else return Hr(this._runtime,t)}async function Hr(e,t){await e._compute();try{return await t._promise}catch(r){if(r===J)return Hr(e,t);throw r}}function _u(e,t){let r=new Map,i=new Set,n=[];function s(u){let c=r.get(u);return c||(c=new ot(u._runtime,u._builtins),c._source=u,r.set(u,c),n.push([c,u]),i.add(u),c)}let a=s(this);for(let u of e){let{alias:c,name:l}=typeof u=="object"?u:{name:u};a.import(l,c??l,t)}for(let u of i)for(let[c,l]of u._scope)if(l._definition===Me){if(u===this&&a._scope.has(c))continue;let h=l._inputs[0]._module;h._source&&s(h)}for(let[u,c]of n)for(let[l,h]of c._scope){let p=u._scope.get(l);if(!(p&&p._type!==Se))if(h._definition===Me){let f=h._inputs[0],x=f._module;u.import(f._name,l,r.get(x)||x)}else u.define(l,h._inputs.map(Su),h._definition)}return a}function Au(e){let t=this._scope.get(e),r;if(!t)if(t=new X(Se,this),this._builtins.has(e))t.define(e,st(this._builtins.get(e)));else if(this._runtime._builtin._scope.has(e))t.import(e,this._runtime._builtin);else{try{r=this._runtime._global(e)}catch(i){return t.define(e,es(i))}r===void 0?this._scope.set(t._name=e,t):t.define(e,st(r))}return t}function Cu(e,t){this._builtins.set(e,t)}function Su(e){return e._name}var ku=typeof requestAnimationFrame=="function"?requestAnimationFrame:typeof setImmediate=="function"?setImmediate:e=>setTimeout(e,0);function qt(e=new Ve,t=zu){let r=this.module();if(Object.defineProperties(this,{_dirty:{value:new Set},_updates:{value:new Set},_precomputes:{value:[],writable:!0},_computing:{value:null,writable:!0},_init:{value:null,writable:!0},_modules:{value:new Map},_variables:{value:new Set},_disposed:{value:!1,writable:!0},_builtin:{value:r},_global:{value:t}}),e)for(let i in e)new X(Se,r).define(i,[],e[i])}Object.defineProperties(qt.prototype,{_precompute:{value:Du,writable:!0,configurable:!0},_compute:{value:Tu,writable:!0,configurable:!0},_computeSoon:{value:Nu,writable:!0,configurable:!0},_computeNow:{value:Pu,writable:!0,configurable:!0},dispose:{value:Iu,writable:!0,configurable:!0},module:{value:Fu,writable:!0,configurable:!0},fileAttachments:{value:Vr,writable:!0,configurable:!0}});function Iu(){this._computing=Promise.resolve(),this._disposed=!0,this._variables.forEach(e=>{e._invalidate(),e._version=NaN})}function Fu(e,t=Q){let r;if(e===void 0)return(r=this._init)?(this._init=null,r):new ot(this);if(r=this._modules.get(e),r)return r;this._init=r=new ot(this),this._modules.set(e,r);try{e(this,t)}finally{this._init=null}return r}function Du(e){this._precomputes.push(e),this._compute()}function Tu(){return this._computing||(this._computing=this._computeSoon())}function Nu(){return new Promise(ku).then(()=>this._disposed?void 0:this._computeNow())}async function Pu(){let e=[],t,r,i=this._precomputes;if(i.length){this._precomputes=[];for(let s of i)s();await Bu(3)}t=new Set(this._dirty),t.forEach(function(s){s._inputs.forEach(t.add,t);let a=Wu(s);a>s._reachable?this._updates.add(s):a<s._reachable&&s._invalidate(),s._reachable=a},this),t=new Set(this._updates),t.forEach(function(s){s._reachable?(s._indegree=0,s._outputs.forEach(t.add,t)):(s._indegree=NaN,t.delete(s))}),this._computing=null,this._updates.clear(),this._dirty.clear(),t.forEach(function(s){s._outputs.forEach(Ru)});do{for(t.forEach(function(s){s._indegree===0&&e.push(s)});r=e.pop();)qu(r),r._outputs.forEach(n),t.delete(r);t.forEach(function(s){Lu(s)&&(Uu(s,new R("circular definition")),s._outputs.forEach(Ou),t.delete(s))})}while(t.size);function n(s){--s._indegree===0&&e.push(s)}}function Bu(e=0){let t=Promise.resolve();for(let r=0;r<e;++r)t=t.then(()=>{});return t}function Lu(e){let t=new Set(e._inputs);for(let r of t){if(r===e)return!0;r._inputs.forEach(t.add,t)}return!1}function Ru(e){++e._indegree}function Ou(e){--e._indegree}function Vu(e){return e._promise.catch(e._rejector)}function Qr(e){return new Promise(function(t){e._invalidate=t})}function Mu(e,t){let r=typeof IntersectionObserver=="function"&&t._observer&&t._observer._node,i=!r,n=Q,s=Q,a,u;return r&&(u=new IntersectionObserver(([c])=>(i=c.isIntersecting)&&(a=null,n())),u.observe(r),e.then(()=>(u.disconnect(),u=null,s()))),function(c){return i?Promise.resolve(c):u?(a||(a=new Promise((l,h)=>(n=l,s=h))),a.then(()=>c)):Promise.reject()}}function qu(e){e._invalidate(),e._invalidate=Q,e._pending();let t=e._value,r=++e._version,i=null,n=e._promise=(e._inputs.length?Promise.all(e._inputs.map(Vu)).then(s):new Promise(u=>u(e._definition.call(t)))).then(a);function s(u){if(e._version!==r)throw J;for(let c=0,l=u.length;c<l;++c)switch(u[c]){case Yr:{u[c]=i=Qr(e);break}case Kr:{i||(i=Qr(e)),u[c]=Mu(i,e);break}case Gr:{u[c]=e;break}}return e._definition.apply(t,u)}function a(u){if(e._version!==r)throw J;return Xn(u)?((i||Qr(e)).then($u(u)),ju(e,r,u)):u}n.then(u=>{e._value=u,e._fulfilled(u)},u=>{u===J||e._version!==r||(e._value=void 0,e._rejected(u))})}function ju(e,t,r){let i=e._module._runtime,n;function s(c){return new Promise(l=>l(r.next(n))).then(({done:l,value:h})=>l?void 0:Promise.resolve(h).then(c))}function a(){let c=s(l=>{if(e._version!==t)throw J;return n=l,u(l,c).then(()=>i._precompute(a)),e._fulfilled(l),l});c.catch(l=>{l===J||e._version!==t||(u(void 0,c),e._rejected(l))})}function u(c,l){return e._value=c,e._promise=l,e._outputs.forEach(i._updates.add,i._updates),i._compute()}return s(c=>{if(e._version!==t)throw J;return n=c,i._precompute(a),c})}function Uu(e,t){e._invalidate(),e._invalidate=Q,e._pending(),++e._version,e._indegree=NaN,(e._promise=Promise.reject(t)).catch(Q),e._value=void 0,e._rejected(t)}function $u(e){return function(){e.return()}}function Wu(e){if(e._observer!==Ce)return!0;let t=new Set(e._outputs);for(let r of t){if(r._observer!==Ce)return!0;r._outputs.forEach(t.add,t)}return!1}function zu(e){return globalThis[e]}var Hu=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],hs=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,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,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Gu="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",fs="\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\u0560-\u0588\u05D0-\u05EA\u05EF-\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\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u09FC\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\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\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\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-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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-\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-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\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-\uAB69\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",Jr={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Zr="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Yu={5:Zr,"5module":Zr+" export import",6:Zr+" const class extends export import super"},Ku=/^in(stanceof)?$/,Qu=new RegExp("["+fs+"]"),Ju=new RegExp("["+fs+Gu+"]");function ei(e,t){for(var r=65536,i=0;i<t.length;i+=2){if(r+=t[i],r>e)return!1;if(r+=t[i+1],r>=e)return!0}return!1}function oe(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Qu.test(String.fromCharCode(e)):t===!1?!1:ei(e,hs)}function je(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ju.test(String.fromCharCode(e)):t===!1?!1:ei(e,hs)||ei(e,Hu)}var S=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function j(e,t){return new S(e,{beforeExpr:!0,binop:t})}var U={beforeExpr:!0},q={startsExpr:!0},ni={};function A(e,t){return t===void 0&&(t={}),t.keyword=e,ni[e]=new S(e,t)}var o={num:new S("num",q),regexp:new S("regexp",q),string:new S("string",q),name:new S("name",q),privateId:new S("privateId",q),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",U),semi:new S(";",U),colon:new S(":",U),dot:new S("."),question:new S("?",U),questionDot:new S("?."),arrow:new S("=>",U),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",U),backQuote:new S("`",q),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:j("||",1),logicalAND:j("&&",2),bitwiseOR:j("|",3),bitwiseXOR:j("^",4),bitwiseAND:j("&",5),equality:j("==/!=/===/!==",6),relational:j("</>/<=/>=",7),bitShift:j("<</>>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:j("%",10),star:j("*",10),slash:j("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:j("??",1),_break:A("break"),_case:A("case",U),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",U),_do:A("do",{isLoop:!0,beforeExpr:!0}),_else:A("else",U),_finally:A("finally"),_for:A("for",{isLoop:!0}),_function:A("function",q),_if:A("if"),_return:A("return",U),_switch:A("switch"),_throw:A("throw",U),_try:A("try"),_var:A("var"),_const:A("const"),_while:A("while",{isLoop:!0}),_with:A("with"),_new:A("new",{beforeExpr:!0,startsExpr:!0}),_this:A("this",q),_super:A("super",q),_class:A("class",q),_extends:A("extends",U),_export:A("export"),_import:A("import",q),_null:A("null",q),_true:A("true",q),_false:A("false",q),_in:A("in",{beforeExpr:!0,binop:7}),_instanceof:A("instanceof",{beforeExpr:!0,binop:7}),_typeof:A("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:A("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:A("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},H=/\r\n?|\n|\u2028|\u2029/,Zu=new RegExp(H.source,"g");function Ue(e){return e===10||e===13||e===8232||e===8233}function ds(e,t,r){r===void 0&&(r=e.length);for(var i=t;i<r;i++){var n=e.charCodeAt(i);if(Ue(n))return i<r-1&&n===13&&e.charCodeAt(i+1)===10?i+2:i+1}return-1}var ms=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,W=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,xs=Object.prototype,Xu=xs.hasOwnProperty,ec=xs.toString,$e=Object.hasOwn||function(e,t){return Xu.call(e,t)},ns=Array.isArray||function(e){return ec.call(e)==="[object Array]"},ss=Object.create(null);function de(e){return ss[e]||(ss[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function ue(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var tc=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,pt=function(e,t){this.line=e,this.column=t};pt.prototype.offset=function(e){return new pt(this.line,this.column+e)};var Qt=function(e,t,r){this.start=t,this.end=r,e.sourceFile!==null&&(this.source=e.sourceFile)};function Jt(e,t){for(var r=1,i=0;;){var n=ds(e,i,t);if(n<0)return new pt(r,t-i);++r,i=n}}var ti={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},as=!1;function rc(e){var t={};for(var r in ti)t[r]=e&&$e(e,r)?e[r]:ti[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!as&&typeof console=="object"&&console.warn&&(as=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
20
+ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ns(t.onToken)){var i=t.onToken;t.onToken=function(n){return i.push(n)}}return ns(t.onComment)&&(t.onComment=ic(t,t.onComment)),t}function ic(e,t){return function(r,i,n,s,a,u){var c={type:r?"Block":"Line",value:i,start:n,end:s};e.locations&&(c.loc=new Qt(this,a,u)),e.ranges&&(c.range=[n,s]),t.push(c)}}var ht=1,We=2,si=4,ys=8,gs=16,bs=32,ai=64,vs=128,ft=256,oi=ht|We|ft;function ui(e,t){return We|(e?si:0)|(t?ys:0)}var Ht=0,ci=1,le=2,ws=3,Es=4,_s=5,P=function(e,t,r){this.options=e=rc(e),this.sourceFile=e.sourceFile,this.keywords=de(Yu[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var i="";e.allowReserved!==!0&&(i=Jr[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module"&&(i+=" await")),this.reservedWords=de(i);var n=(i?i+" ":"")+Jr.strict;this.reservedWordsStrict=de(n),this.reservedWordsStrictBind=de(n+" "+Jr.strictBind),this.input=String(t),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
21
+ `,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(H).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.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=e.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&&e.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(ht),this.regexpState=null,this.privateNameStack=[]},ee={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}};P.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};ee.inFunction.get=function(){return(this.currentVarScope().flags&We)>0};ee.inGenerator.get=function(){return(this.currentVarScope().flags&ys)>0&&!this.currentVarScope().inClassFieldInit};ee.inAsync.get=function(){return(this.currentVarScope().flags&si)>0&&!this.currentVarScope().inClassFieldInit};ee.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&ft)return!1;if(t.flags&We)return(t.flags&si)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};ee.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&ai)>0||r||this.options.allowSuperOutsideMethod};ee.allowDirectSuper.get=function(){return(this.currentThisScope().flags&vs)>0};ee.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};ee.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&(We|ft))>0||r};ee.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ft)>0};P.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r=this,i=0;i<e.length;i++)r=e[i](r);return r};P.parse=function(e,t){return new this(t,e).parse()};P.parseExpressionAt=function(e,t,r){var i=new this(r,e,t);return i.nextToken(),i.parseExpression()};P.tokenizer=function(e,t){return new this(t,e)};Object.defineProperties(P.prototype,ee);var O=P.prototype,nc=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;O.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){W.lastIndex=e,e+=W.exec(this.input)[0].length;var t=nc.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){W.lastIndex=e+t[0].length;var r=W.exec(this.input),i=r.index+r[0].length,n=this.input.charAt(i);return n===";"||n==="}"||H.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(i+1)==="=")}e+=t[0].length,W.lastIndex=e,e+=W.exec(this.input)[0].length,this.input[e]===";"&&e++}};O.eat=function(e){return this.type===e?(this.next(),!0):!1};O.isContextual=function(e){return this.type===o.name&&this.value===e&&!this.containsEsc};O.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};O.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};O.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||H.test(this.input.slice(this.lastTokEnd,this.start))};O.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};O.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()};O.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};O.expect=function(e){this.eat(e)||this.unexpected()};O.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Zt=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};O.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};O.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,i=e.doubleProto;if(!t)return r>=0||i>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")};O.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};O.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var b=P.prototype;b.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==o.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var i=0,n=Object.keys(this.undefinedExports);i<n.length;i+=1){var s=n[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var li={kind:"loop"},sc={kind:"switch"};b.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;W.lastIndex=this.pos;var t=W.exec(this.input),r=this.pos+t[0].length,i=this.input.charCodeAt(r);if(i===91||i===92)return!0;if(e)return!1;if(i===123||i>55295&&i<56320)return!0;if(oe(i,!0)){for(var n=r+1;je(i=this.input.charCodeAt(n),!0);)++n;if(i===92||i>55295&&i<56320)return!0;var s=this.input.slice(r,n);if(!Ku.test(s))return!0}return!1};b.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;W.lastIndex=this.pos;var e=W.exec(this.input),t=this.pos+e[0].length,r;return!H.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(je(r=this.input.charCodeAt(t+8))||r>55295&&r<56320))};b.parseStatement=function(e,t,r){var i=this.type,n=this.startNode(),s;switch(this.isLet(e)&&(i=o._var,s="let"),i){case o._break:case o._continue:return this.parseBreakContinueStatement(n,i.keyword);case o._debugger:return this.parseDebuggerStatement(n);case o._do:return this.parseDoStatement(n);case o._for:return this.parseForStatement(n);case o._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!e);case o._class:return e&&this.unexpected(),this.parseClass(n,!0);case o._if:return this.parseIfStatement(n);case o._return:return this.parseReturnStatement(n);case o._switch:return this.parseSwitchStatement(n);case o._throw:return this.parseThrowStatement(n);case o._try:return this.parseTryStatement(n);case o._const:case o._var:return s=s||this.value,e&&s!=="var"&&this.unexpected(),this.parseVarStatement(n,s);case o._while:return this.parseWhileStatement(n);case o._with:return this.parseWithStatement(n);case o.braceL:return this.parseBlock(!0,n);case o.semi:return this.parseEmptyStatement(n);case o._export:case o._import:if(this.options.ecmaVersion>10&&i===o._import){W.lastIndex=this.pos;var a=W.exec(this.input),u=this.pos+a[0].length,c=this.input.charCodeAt(u);if(c===40||c===46)return this.parseExpressionStatement(n,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||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'")),i===o._import?this.parseImport(n):this.parseExport(n,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(n,!0,!e);var l=this.value,h=this.parseExpression();return i===o.name&&h.type==="Identifier"&&this.eat(o.colon)?this.parseLabeledStatement(n,l,h,e):this.parseExpressionStatement(n,h)}};b.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(o.semi)||this.insertSemicolon()?e.label=null:this.type!==o.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var n=this.labels[i];if((e.label==null||n.name===e.label.name)&&(n.kind!=null&&(r||n.kind==="loop")||e.label&&r))break}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")};b.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};b.parseDoStatement=function(e){return this.next(),this.labels.push(li),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};b.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(li),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===o._var||this.type===o._const||r){var i=this.startNode(),n=r?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&i.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===o._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var s=this.isContextual("let"),a=!1,u=this.containsEsc,c=new Zt,l=this.start,h=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===o._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===o._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(h.start===l&&!u&&h.type==="Identifier"&&h.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),s&&a&&this.raise(h.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(h,!1,c),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(c,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))};b.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,ct|(r?0:ri),!1,t)};b.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};b.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};b.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(o.braceL),this.labels.push(sc),this.enterScope(0);for(var t,r=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var i=this.type===o._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(o.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};b.parseThrowStatement=function(e){return this.next(),H.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ac=[];b.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?bs:0),this.checkLValPattern(e,t?Es:le),this.expect(o.parenR),e};b.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===o._catch){var t=this.startNode();this.next(),this.eat(o.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(o._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};b.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};b.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(li),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};b.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};b.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};b.parseLabeledStatement=function(e,t,r,i){for(var n=0,s=this.labels;n<s.length;n+=1){var a=s[n];a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===o._switch?"switch":null,c=this.labels.length-1;c>=0;c--){var l=this.labels[c];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};b.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};b.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(o.braceL),e&&this.enterScope(0);this.type!==o.braceR;){var i=this.parseStatement(null);t.body.push(i)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};b.parseFor=function(e,t){return e.init=t,this.expect(o.semi),e.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),e.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};b.parseForIn=function(e,t){var r=this.type===o._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};b.parseVar=function(e,t,r,i){for(e.declarations=[],e.kind=r;;){var n=this.startNode();if(this.parseVarId(n,r),this.eat(o.eq)?n.init=this.parseMaybeAssign(t):!i&&r==="const"&&!(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!i&&n.id.type!=="Identifier"&&!(t&&(this.type===o._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):n.init=null,e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(o.comma))break}return e};b.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?ci:le,!1)};var ct=1,ri=2,As=4;b.parseFunction=function(e,t,r,i,n){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===o.star&&t&ri&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&ct&&(e.id=t&As&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&ri)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?ci:le:ws));var s=this.yieldPos,a=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ui(e.async,e.generator)),t&ct||(e.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,n),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=u,this.finishNode(e,t&ct?"FunctionDeclaration":"FunctionExpression")};b.parseFunctionParams=function(e){this.expect(o.parenL),e.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};b.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),n=this.startNode(),s=!1;for(n.body=[],this.expect(o.braceL);this.type!==o.braceR;){var a=this.parseClassElement(e.superClass!==null);a&&(n.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"?(s&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),s=!0):a.key&&a.key.type==="PrivateIdentifier"&&oc(i,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};b.parseClassElement=function(e){if(this.eat(o.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),i="",n=!1,s=!1,a="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===o.star?u=!0:i="static"}if(r.static=u,!i&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===o.star)&&!this.canInsertSemicolon()?s=!0:i="async"),!i&&(t>=9||!s)&&this.eat(o.star)&&(n=!0),!i&&!s&&!n){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=c:i=c)}if(i?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=i,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===o.parenL||a!=="method"||n||s){var l=!r.static&&Gt(r,"constructor"),h=l&&e;l&&a!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=l?"constructor":a,this.parseClassMethod(r,n,s,h)}else this.parseClassField(r);return r};b.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword};b.parseClassElementName=function(e){this.type===o.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};b.parseClassMethod=function(e,t,r,i){var n=e.key;e.kind==="constructor"?(t&&this.raise(n.start,"Constructor can't be a generator"),r&&this.raise(n.start,"Constructor can't be an async method")):e.static&&Gt(e,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,r,i);return e.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),e.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),e.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};b.parseClassField=function(e){if(Gt(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Gt(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)){var t=this.currentThisScope(),r=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=r}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};b.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(ft|ai);this.type!==o.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};b.parseClassId=function(e,t){this.type===o.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,le,!1)):(t===!0&&this.unexpected(),e.id=null)};b.parseClassSuper=function(e){e.superClass=this.eat(o._extends)?this.parseExprSubscripts(null,!1):null};b.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};b.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var i=this.privateNameStack.length,n=i===0?null:this.privateNameStack[i-1],s=0;s<r.length;++s){var a=r[s];$e(t,a.name)||(n?n.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}};function oc(e,t){var r=t.key.name,i=e[r],n="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(n=(t.static?"s":"i")+t.kind),i==="iget"&&n==="iset"||i==="iset"&&n==="iget"||i==="sget"&&n==="sset"||i==="sset"&&n==="sget"?(e[r]="true",!1):i?!0:(e[r]=n,!1)}function Gt(e,t){var r=e.computed,i=e.key;return!r&&(i.type==="Identifier"&&i.name===t||i.type==="Literal"&&i.value===t)}b.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};b.parseExport=function(e,t){if(this.next(),this.eat(o.star))return this.parseExportAllDeclaration(e,t);if(this.eat(o._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var r=0,i=e.specifiers;r<i.length;r+=1){var n=i[r];this.checkUnreserved(n.local),this.checkLocalExport(n.local),n.local.type==="Literal"&&this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};b.parseExportDeclaration=function(e){return this.parseStatement(null)};b.parseExportDefaultDeclaration=function(){var e;if(this.type===o._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,ct|As,!1,e)}else if(this.type===o._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var i=this.parseMaybeAssign();return this.semicolon(),i}};b.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),$e(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};b.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var i=0,n=t.properties;i<n.length;i+=1){var s=n[i];this.checkPatternExport(e,s)}else if(r==="ArrayPattern")for(var a=0,u=t.elements;a<u.length;a+=1){var c=u[a];c&&this.checkPatternExport(e,c)}else r==="Property"?this.checkPatternExport(e,t.value):r==="AssignmentPattern"?this.checkPatternExport(e,t.left):r==="RestElement"&&this.checkPatternExport(e,t.argument)};b.checkVariableExport=function(e,t){if(e)for(var r=0,i=t;r<i.length;r+=1){var n=i[r];this.checkPatternExport(e,n.id)}};b.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};b.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};b.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseExportSpecifier(e))}return t};b.parseImport=function(e){return this.next(),this.type===o.string?(e.specifiers=ac,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===o.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};b.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,le),this.finishNode(e,"ImportSpecifier")};b.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,le),this.finishNode(e,"ImportDefaultSpecifier")};b.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,le),this.finishNode(e,"ImportNamespaceSpecifier")};b.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===o.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return e;if(this.type===o.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(o.braceL);!this.eat(o.braceR);){if(t)t=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseImportSpecifier())}return e};b.parseWithClause=function(){var e=[];if(!this.eat(o._with))return e;this.expect(o.braceL);for(var t={},r=!0;!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;var i=this.parseImportAttribute(),n=i.key.type==="Identifier"?i.key.name:i.key.value;$e(t,n)&&this.raiseRecoverable(i.key.start,"Duplicate attribute key '"+n+"'"),t[n]=!0,e.push(i)}return e};b.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(o.colon),this.type!==o.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};b.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var e=this.parseLiteral(this.value);return tc.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};b.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};b.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var G=P.prototype;G.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];this.toAssignable(s,t),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern")&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e};G.toAssignableList=function(e,t){for(var r=e.length,i=0;i<r;i++){var n=e[i];n&&this.toAssignable(n,t)}if(r){var s=e[r-1];this.options.ecmaVersion===6&&t&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier"&&this.unexpected(s.argument.start)}return e};G.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};G.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==o.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};G.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()};G.parseBindingList=function(e,t,r,i){for(var n=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(o.comma),t&&this.type===o.comma)n.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===o.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),n.push(a),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else n.push(this.parseAssignableListItem(i))}return n};G.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};G.parseBindingListItem=function(e){return e};G.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return r;var i=this.startNodeAt(e,t);return i.left=r,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")};G.checkLValSimple=function(e,t,r){t===void 0&&(t=Ht);var i=t!==Ht;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode"),i&&(t===le&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&($e(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),t!==_s&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(i?"Binding":"Assigning to")+" rvalue")}};G.checkLValPattern=function(e,t,r){switch(t===void 0&&(t=Ht),e.type){case"ObjectPattern":for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];this.checkLValInnerPattern(s,t,r)}break;case"ArrayPattern":for(var a=0,u=e.elements;a<u.length;a+=1){var c=u[a];c&&this.checkLValInnerPattern(c,t,r)}break;default:this.checkLValSimple(e,t,r)}};G.checkLValInnerPattern=function(e,t,r){switch(t===void 0&&(t=Ht),e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var $=function(e,t,r,i,n){this.token=e,this.isExpr=!!t,this.preserveSpace=!!r,this.override=i,this.generator=!!n},D={b_stat:new $("{",!1),b_expr:new $("{",!0),b_tmpl:new $("${",!1),p_stat:new $("(",!1),p_expr:new $("(",!0),q_tmpl:new $("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new $("function",!1),f_expr:new $("function",!0),f_expr_gen:new $("function",!0,!1,null,!0),f_gen:new $("function",!1,!1,null,!0)},ze=P.prototype;ze.initialContext=function(){return[D.b_stat]};ze.curContext=function(){return this.context[this.context.length-1]};ze.braceIsBlock=function(e){var t=this.curContext();return t===D.f_expr||t===D.f_stat?!0:e===o.colon&&(t===D.b_stat||t===D.b_expr)?!t.isExpr:e===o._return||e===o.name&&this.exprAllowed?H.test(this.input.slice(this.lastTokEnd,this.start)):e===o._else||e===o.semi||e===o.eof||e===o.parenR||e===o.arrow?!0:e===o.braceL?t===D.b_stat:e===o._var||e===o._const||e===o.name?!1:!this.exprAllowed};ze.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};ze.updateContext=function(e){var t,r=this.type;r.keyword&&e===o.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr};ze.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};o.parenR.updateContext=o.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===D.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};o.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?D.b_stat:D.b_expr),this.exprAllowed=!0};o.dollarBraceL.updateContext=function(){this.context.push(D.b_tmpl),this.exprAllowed=!0};o.parenL.updateContext=function(e){var t=e===o._if||e===o._for||e===o._with||e===o._while;this.context.push(t?D.p_stat:D.p_expr),this.exprAllowed=!0};o.incDec.updateContext=function(){};o._function.updateContext=o._class.updateContext=function(e){e.beforeExpr&&e!==o._else&&!(e===o.semi&&this.curContext()!==D.p_stat)&&!(e===o._return&&H.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===o.colon||e===o.braceL)&&this.curContext()===D.b_stat)?this.context.push(D.f_expr):this.context.push(D.f_stat),this.exprAllowed=!1};o.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};o.backQuote.updateContext=function(){this.curContext()===D.q_tmpl?this.context.pop():this.context.push(D.q_tmpl),this.exprAllowed=!1};o.star.updateContext=function(e){if(e===o._function){var t=this.context.length-1;this.context[t]===D.f_expr?this.context[t]=D.f_expr_gen:this.context[t]=D.f_gen}this.exprAllowed=!0};o.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==o.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var w=P.prototype;w.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var i=e.key,n;switch(i.type){case"Identifier":n=i.name;break;case"Literal":n=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6){n==="__proto__"&&s==="init"&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);return}n="$"+n;var a=t[n];if(a){var u;s==="init"?u=this.strict&&a.init||a.get||a.set:u=a.init||a[s],u&&this.raiseRecoverable(i.start,"Redefinition of property")}else a=t[n]={init:!1,get:!1,set:!1};a[s]=!0}};w.parseExpression=function(e,t){var r=this.start,i=this.startLoc,n=this.parseMaybeAssign(e,t);if(this.type===o.comma){var s=this.startNodeAt(r,i);for(s.expressions=[n];this.eat(o.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return n};w.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var i=!1,n=-1,s=-1,a=-1;t?(n=t.parenthesizedAssign,s=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Zt,i=!0);var u=this.start,c=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var l=this.parseMaybeConditional(e,t);if(r&&(l=r.call(this,l,u,c)),this.type.isAssign){var h=this.startNodeAt(u,c);return h.operator=this.value,this.type===o.eq&&(l=this.toAssignable(l,!1,t)),i||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(l):this.checkLValSimple(l),h.left=l,this.next(),h.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(h,"AssignmentExpression")}else i&&this.checkExpressionErrors(t,!0);return n>-1&&(t.parenthesizedAssign=n),s>-1&&(t.trailingComma=s),l};w.parseMaybeConditional=function(e,t){var r=this.start,i=this.startLoc,n=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return n;if(this.eat(o.question)){var s=this.startNodeAt(r,i);return s.test=n,s.consequent=this.parseMaybeAssign(),this.expect(o.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return n};w.parseExprOps=function(e,t){var r=this.start,i=this.startLoc,n=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||n.start===r&&n.type==="ArrowFunctionExpression"?n:this.parseExprOp(n,r,i,-1,e)};w.parseExprOp=function(e,t,r,i,n){var s=this.type.binop;if(s!=null&&(!n||this.type!==o._in)&&s>i){var a=this.type===o.logicalOR||this.type===o.logicalAND,u=this.type===o.coalesce;u&&(s=o.logicalAND.binop);var c=this.value;this.next();var l=this.start,h=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),l,h,s,n),f=this.buildBinary(t,r,e,p,c,a||u);return(a&&this.type===o.coalesce||u&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(f,t,r,i,n)}return e};w.buildBinary=function(e,t,r,i,n,s){i.type==="PrivateIdentifier"&&this.raise(i.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=r,a.operator=n,a.right=i,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")};w.parseMaybeUnary=function(e,t,r,i){var n=this.start,s=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(i),t=!0;else if(this.type.prefix){var u=this.startNode(),c=this.type===o.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,c,i),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&Cs(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&ii(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,a=this.finishNode(u,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===o.privateId)(i||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),a=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();else{if(a=this.parseExprSubscripts(e,i),this.checkExpressionErrors(e))return a;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(n,s);l.operator=this.value,l.prefix=!1,l.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(l,"UpdateExpression")}}if(!r&&this.eat(o.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(n,s,a,this.parseMaybeUnary(null,!1,!1,i),"**",!1);else return a};function Cs(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Cs(e.expression)}function ii(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&ii(e.expression)||e.type==="ParenthesizedExpression"&&ii(e.expression)}w.parseExprSubscripts=function(e,t){var r=this.start,i=this.startLoc,n=this.parseExprAtom(e,t);if(n.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return n;var s=this.parseSubscripts(n,r,i,!1,t);return e&&s.type==="MemberExpression"&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s};w.parseSubscripts=function(e,t,r,i,n){for(var s=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;;){var u=this.parseSubscript(e,t,r,i,s,a,n);if(u.optional&&(a=!0),u===e||u.type==="ArrowFunctionExpression"){if(a){var c=this.startNodeAt(t,r);c.expression=u,u=this.finishNode(c,"ChainExpression")}return u}e=u}};w.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.arrow)};w.parseSubscriptAsyncArrow=function(e,t,r,i){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,i)};w.parseSubscript=function(e,t,r,i,n,s,a){var u=this.options.ecmaVersion>=11,c=u&&this.eat(o.questionDot);i&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(o.bracketL);if(l||c&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var h=this.startNodeAt(t,r);h.object=e,l?(h.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&e.type!=="Super"?h.property=this.parsePrivateIdent():h.property=this.parseIdent(this.options.allowReserved!=="never"),h.computed=!!l,u&&(h.optional=c),e=this.finishNode(h,"MemberExpression")}else if(!i&&this.eat(o.parenL)){var p=new Zt,f=this.yieldPos,x=this.awaitPos,y=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var C=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,p);if(n&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=f,this.awaitPos=x,this.awaitIdentPos=y,this.parseSubscriptAsyncArrow(t,r,C,a);this.checkExpressionErrors(p,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=x||this.awaitPos,this.awaitIdentPos=y||this.awaitIdentPos;var T=this.startNodeAt(t,r);T.callee=e,T.arguments=C,u&&(T.optional=c),e=this.finishNode(T,"CallExpression")}else if(this.type===o.backQuote){(c||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var m=this.startNodeAt(t,r);m.tag=e,m.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(m,"TaggedTemplateExpression")}return e};w.parseExprAtom=function(e,t,r){this.type===o.slash&&this.readRegexp();var i,n=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(i,"Super");case o._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case o.name:var s=this.start,a=this.startLoc,u=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(D.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(n&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===o.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,a),[c],!0,t)}return c;case o.regexp:var l=this.value;return i=this.parseLiteral(l.value),i.regex={pattern:l.pattern,flags:l.flags},i;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return i=this.startNode(),i.value=this.type===o._null?null:this.type===o._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case o.parenL:var h=this.start,p=this.parseParenAndDistinguishExpression(n,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),p;case o.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(o.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case o.braceL:return this.overrideContext(D.b_expr),this.parseObj(!1,e);case o._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};w.parseExprAtomDefault=function(){this.unexpected()};w.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===o.parenL&&!e)return this.parseDynamicImport(t);if(this.type===o.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};w.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(o.parenR)?e.options=null:(this.expect(o.comma),this.afterTrailingComma(o.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(o.parenR)||(this.expect(o.comma),this.afterTrailingComma(o.parenR)||this.unexpected())));else if(!this.eat(o.parenR)){var t=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};w.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};w.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};w.parseParenExpression=function(){this.expect(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e};w.shouldParseArrow=function(e){return!this.canInsertSemicolon()};w.parseParenAndDistinguishExpression=function(e,t){var r=this.start,i=this.startLoc,n,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,u=this.startLoc,c=[],l=!0,h=!1,p=new Zt,f=this.yieldPos,x=this.awaitPos,y;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;)if(l?l=!1:this.expect(o.comma),s&&this.afterTrailingComma(o.parenR,!0)){h=!0;break}else if(this.type===o.ellipsis){y=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,p,this.parseParenItem));var C=this.lastTokEnd,T=this.lastTokEndLoc;if(this.expect(o.parenR),e&&this.shouldParseArrow(c)&&this.eat(o.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=x,this.parseParenArrowList(r,i,c,t);(!c.length||h)&&this.unexpected(this.lastTokStart),y&&this.unexpected(y),this.checkExpressionErrors(p,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=x||this.awaitPos,c.length>1?(n=this.startNodeAt(a,u),n.expressions=c,this.finishNodeAt(n,"SequenceExpression",C,T)):n=c[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var m=this.startNodeAt(r,i);return m.expression=n,this.finishNode(m,"ParenthesizedExpression")}else return n};w.parseParenItem=function(e){return e};w.parseParenArrowList=function(e,t,r,i){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,i)};var uc=[];w.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===o.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var i=this.start,n=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,n,!0,!1),this.eat(o.parenL)?e.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):e.arguments=uc,this.finishNode(e,"NewExpression")};w.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===o.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value.replace(/\r\n?/g,`
22
22
  `),cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
23
- `),cooked:this.value},this.next(),r.tail=this.type===u.backQuote,this.finishNode(r,"TemplateElement")};w.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(r.quasis=[i];!i.tail;)this.type===u.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(u.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(u.braceR),r.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};w.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===u.name||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===u.star)&&!H.test(this.input.slice(this.lastTokEnd,this.start))};w.parseObj=function(e,t){var r=this.startNode(),i=!0,n={};for(r.properties=[],this.next();!this.eat(u.braceR);){if(i)i=!1;else if(this.expect(u.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(u.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,n,t),r.properties.push(s)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};w.parseProperty=function(e,t){var r=this.startNode(),i,n,s,a;if(this.options.ecmaVersion>=9&&this.eat(u.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===u.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(s=this.start,a=this.startLoc),e||(i=this.eat(u.star)));var o=this.containsEsc;return this.parsePropertyName(r),!e&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(r)?(n=!0,i=this.options.ecmaVersion>=9&&this.eat(u.star),this.parsePropertyName(r)):n=!1,this.parsePropertyValue(r,e,i,n,s,a,t,o),this.finishNode(r,"Property")};w.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};w.parsePropertyValue=function(e,t,r,i,n,s,a,o){(r||i)&&this.type===u.colon&&this.unexpected(),this.eat(u.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===u.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,i)):!t&&!o&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==u.comma&&this.type!==u.braceR&&this.type!==u.eq?((r||i)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||i)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=n),e.kind="init",t?e.value=this.parseMaybeDefault(n,s,this.copyNode(e.key)):this.type===u.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(n,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};w.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(u.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(u.bracketR),e.key;e.computed=!1}return e.key=this.type===u.num||this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};w.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};w.parseMethod=function(e,t,r){var i=this.startNode(),n=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ui(t,i.generator)|ai|(r?vs:0)),this.expect(u.parenL),i.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(i,"FunctionExpression")};w.parseArrowExpression=function(e,t,r,i){var n=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(ui(r,!1)|gs),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};w.parseFunctionBody=function(e,t,r,i){var n=t&&this.type!==u.braceL,s=this.strict,a=!1;if(n)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||o)&&(a=this.strictDirective(this.end),a&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!s&&!a&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,_s),e.body=this.parseBlock(!1,void 0,a&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()};w.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){var i=r[t];if(i.type!=="Identifier")return!1}return!0};w.checkParams=function(e,t){for(var r=Object.create(null),i=0,n=e.params;i<n.length;i+=1){var s=n[i];this.checkLValInnerPattern(s,ci,t?null:r)}};w.parseExprList=function(e,t,r,i){for(var n=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(u.comma),t&&this.afterTrailingComma(e))break;var a=void 0;r&&this.type===u.comma?a=null:this.type===u.ellipsis?(a=this.parseSpread(i),i&&this.type===u.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):a=this.parseMaybeAssign(!1,i),n.push(a)}return n};w.checkUnreserved=function(e){var t=e.start,r=e.end,i=e.name;if(this.inGenerator&&i==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&i==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&i==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(i==="arguments"||i==="await")&&this.raise(t,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(t,"Unexpected keyword '"+i+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)){var n=this.strict?this.reservedWordsStrict:this.reservedWords;n.test(i)&&(!this.inAsync&&i==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+i+"' is reserved"))}};w.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};w.parseIdentNode=function(){var e=this.startNode();return this.type===u.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=u.name):this.unexpected(),e};w.parsePrivateIdent=function(){var e=this.startNode();return this.type===u.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};w.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===u.semi||this.canInsertSemicolon()||this.type!==u.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(u.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};w.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Yt=P.prototype;Yt.raise=function(e,t){var r=Jt(this.input,e);t+=" ("+r.line+":"+r.column+")";var i=new SyntaxError(t);throw i.pos=e,i.loc=r,i.raisedAt=this.pos,i};Yt.raiseRecoverable=Yt.raise;Yt.curPosition=function(){if(this.options.locations)return new lt(this.curLine,this.pos-this.lineStart)};var me=P.prototype,cc=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};me.enterScope=function(e){this.scopeStack.push(new cc(e))};me.exitScope=function(){this.scopeStack.pop()};me.treatFunctionsAsVarInScope=function(e){return e.flags&$e||!this.inModule&&e.flags&pt};me.declareName=function(e,t,r){var i=!1;if(t===ce){var n=this.currentScope();i=n.lexical.indexOf(e)>-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1,n.lexical.push(e),this.inModule&&n.flags&pt&&delete this.undefinedExports[e]}else if(t===Es){var s=this.currentScope();s.lexical.push(e)}else if(t===ws){var a=this.currentScope();this.treatFunctionsAsVar?i=a.lexical.indexOf(e)>-1:i=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var c=this.scopeStack[o];if(c.lexical.indexOf(e)>-1&&!(c.flags&bs&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){i=!0;break}if(c.var.push(e),this.inModule&&c.flags&pt&&delete this.undefinedExports[e],c.flags&oi)break}i&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};me.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};me.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};me.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&oi)return t}};me.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&oi&&!(t.flags&gs))return t}};var Xt=function(e,t,r){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Qt(e,r)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},dt=P.prototype;dt.startNode=function(){return new Xt(this,this.start,this.startLoc)};dt.startNodeAt=function(e,t){return new Xt(this,e,t)};function Ss(e,t,r,i){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=r),e}dt.finishNode=function(e,t){return Ss.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};dt.finishNodeAt=function(e,t,r,i){return Ss.call(this,e,t,r,i)};dt.copyNode=function(e){var t=new Xt(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var ks="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",Is=ks+" Extended_Pictographic",Fs=Is,Ds=Fs+" EBase EComp EMod EPres ExtPict",Ts=Ds,lc=Ts,pc={9:ks,10:Is,11:Fs,12:Ds,13:Ts,14:lc},hc="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",fc={9:"",10:"",11:"",12:"",13:"",14:hc},os="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",Ns="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",Ps=Ns+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Bs=Ps+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ls=Bs+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Rs=Ls+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",dc=Rs+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",mc={9:Ns,10:Ps,11:Bs,12:Ls,13:Rs,14:dc},Os={};function xc(e){var t=Os[e]={binary:fe(pc[e]+" "+os),binaryOfStrings:fe(fc[e]),nonBinary:{General_Category:fe(os),Script:fe(mc[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(jt=0,Xr=[9,10,11,12,13,14];jt<Xr.length;jt+=1)us=Xr[jt],xc(us);var us,jt,Xr,g=P.prototype,Kt=function(e,t){this.parent=e,this.base=t||this};Kt.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var r=e;r;r=r.parent)if(t.base===r.base&&t!==r)return!0;return!1};Kt.prototype.sibling=function(){return new Kt(this.parent,this.base)};var te=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Os[e.options.ecmaVersion>=14?14:e.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};te.prototype.reset=function(e,t,r){var i=r.indexOf("v")!==-1,n=r.indexOf("u")!==-1;this.start=e|0,this.source=t+"",this.flags=r,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};te.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};te.prototype.at=function(e,t){t===void 0&&(t=!1);var r=this.source,i=r.length;if(e>=i)return-1;var n=r.charCodeAt(e);if(!(t||this.switchU)||n<=55295||n>=57344||e+1>=i)return n;var s=r.charCodeAt(e+1);return s>=56320&&s<=57343?(n<<10)+s-56613888:n};te.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var r=this.source,i=r.length;if(e>=i)return i;var n=r.charCodeAt(e),s;return!(t||this.switchU)||n<=55295||n>=57344||e+1>=i||(s=r.charCodeAt(e+1))<56320||s>57343?e+1:e+2};te.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)};te.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)};te.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)};te.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e?(this.advance(t),!0):!1};te.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var r=this.pos,i=0,n=e;i<n.length;i+=1){var s=n[i],a=this.at(r,t);if(a===-1||a!==s)return!1;r=this.nextIndex(r,t)}return this.pos=r,!0};g.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,i=!1,n=!1,s=0;s<r.length;s++){var a=r.charAt(s);t.indexOf(a)===-1&&this.raise(e.start,"Invalid regular expression flag"),r.indexOf(a,s+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),a==="u"&&(i=!0),a==="v"&&(n=!0)}this.options.ecmaVersion>=15&&i&&n&&this.raise(e.start,"Invalid regular expression flag")};function yc(e){for(var t in e)return!0;return!1}g.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&yc(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};g.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var i=r[t];e.groupNames[i]||e.raise("Invalid named capture referenced")}};g.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Kt(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};g.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};g.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};g.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};g.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};g.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};g.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue),e.eat(125)))return n!==-1&&n<i&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=r}return!1};g.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};g.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};g.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1};g.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};g.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};g.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};g.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Vs(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Vs(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}g.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!Vs(r);)e.advance();return e.pos!==t};g.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};g.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,r=e.groupNames[e.lastStringValue];if(r)if(t)for(var i=0,n=r;i<n.length;i+=1){var s=n[i];s.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(r||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}};g.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};g.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=de(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=de(e.lastIntValue);return!0}return!1};g.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return e.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),gc(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)};function gc(e){return oe(e,!0)||e===36||e===95}g.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return e.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),bc(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)};function bc(e){return je(e,!0)||e===36||e===95||e===8204||e===8205}g.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};g.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};g.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};g.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};g.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};g.regexp_eatZero=function(e){return e.current()===48&&!er(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};g.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};g.regexp_eatControlLetter=function(e){var t=e.current();return Ms(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Ms(e){return e>=65&&e<=90||e>=97&&e<=122}g.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,i=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(i&&n>=55296&&n<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=(n-55296)*1024+(a-56320)+65536,!0}e.pos=s,e.lastIntValue=n}return!0}if(i&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&vc(e.lastIntValue))return!0;i&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function vc(e){return e>=0&&e<=1114111}g.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};g.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var qs=0,ue=1,W=2;g.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(wc(t))return e.lastIntValue=-1,e.advance(),ue;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var i;if(e.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&i===W&&e.raise("Invalid property name"),i;e.raise("Invalid property name")}return qs};function wc(e){return e===100||e===68||e===115||e===83||e===119||e===87}g.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,i),ue}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,n)}return qs};g.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){ht(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};g.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return ue;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return W;e.raise("Invalid property name")};g.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";js(t=e.current());)e.lastStringValue+=de(t),e.advance();return e.lastStringValue!==""};function js(e){return Ms(e)||e===95}g.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Ec(t=e.current());)e.lastStringValue+=de(t),e.advance();return e.lastStringValue!==""};function Ec(e){return js(e)||er(e)}g.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};g.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&r===W&&e.raise("Negated character class may contain strings"),!0}return!1};g.regexp_classContents=function(e){return e.current()===93?ue:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),ue)};g.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};g.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||zs(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return i!==93?(e.lastIntValue=i,e.advance(),!0):!1};g.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};g.regexp_classSetExpression=function(e){var t=ue,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===W&&(t=W);for(var i=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==W&&(t=ue);continue}e.raise("Invalid character in character class")}if(i!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(i!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(r=this.regexp_eatClassSetOperand(e),!r)return t;r===W&&(t=W)}};g.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;return r!==-1&&i!==-1&&r>i&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};g.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?ue:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};g.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),i=this.regexp_classContents(e);if(e.eat(93))return r&&i===W&&e.raise("Negated character class may contain strings"),i;e.pos=t}if(e.eat(92)){var n=this.regexp_eatCharacterClassEscape(e);if(n)return n;e.pos=t}return null};g.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};g.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===W&&(t=W);return t};g.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?ue:W};g.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var r=e.current();return r<0||r===e.lookahead()&&_c(r)||Ac(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function _c(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Ac(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}g.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Cc(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Cc(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}g.regexp_eatClassControlLetter=function(e){var t=e.current();return er(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};g.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};g.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;er(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function er(e){return e>=48&&e<=57}g.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;Us(r=e.current());)e.lastIntValue=16*e.lastIntValue+$s(r),e.advance();return e.pos!==t};function Us(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function $s(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}g.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};g.regexp_eatOctalDigit=function(e){var t=e.current();return zs(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function zs(e){return e>=48&&e<=55}g.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var i=0;i<t;++i){var n=e.current();if(!Us(n))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+$s(n),e.advance()}return!0};var pi=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Qt(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},_=P.prototype;_.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new pi(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};_.getToken=function(){return this.next(),new pi(this)};typeof Symbol<"u"&&(_[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===u.eof,value:t}}}});_.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(u.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};_.readToken=function(e){return oe(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};_.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};_.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var i=void 0,n=t;(i=ds(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};_.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Ue(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())};_.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&ms.test(String.fromCharCode(e)))++this.pos;else break e}}};_.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};_.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(u.ellipsis)):(++this.pos,this.finishToken(u.dot))};_.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(u.assign,2):this.finishOp(u.slash,1)};_.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,i=e===42?u.star:u.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,i=u.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(u.assign,r+1):this.finishOp(i,r)};_.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(u.assign,3)}return this.finishOp(e===124?u.logicalOR:u.logicalAND,2)}return t===61?this.finishOp(u.assign,2):this.finishOp(e===124?u.bitwiseOR:u.bitwiseAND,1)};_.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(u.assign,2):this.finishOp(u.bitwiseXOR,1)};_.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||H.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(u.incDec,2):t===61?this.finishOp(u.assign,2):this.finishOp(u.plusMin,1)};_.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(u.assign,r+1):this.finishOp(u.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(u.relational,r))};_.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(u.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(u.arrow)):this.finishOp(e===61?u.eq:u.prefix,1)};_.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(u.questionDot,2)}if(t===63){if(e>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(u.assign,3)}return this.finishOp(u.coalesce,2)}}return this.finishOp(u.question,1)};_.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),oe(t,!0)||t===92))return this.finishToken(u.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+de(t)+"'")};_.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(u.parenL);case 41:return++this.pos,this.finishToken(u.parenR);case 59:return++this.pos,this.finishToken(u.semi);case 44:return++this.pos,this.finishToken(u.comma);case 91:return++this.pos,this.finishToken(u.bracketL);case 93:return++this.pos,this.finishToken(u.bracketR);case 123:return++this.pos,this.finishToken(u.braceL);case 125:return++this.pos,this.finishToken(u.braceR);case 58:return++this.pos,this.finishToken(u.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(u.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===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(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(u.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+de(e)+"'")};_.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};_.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(H.test(i)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(i==="[")t=!0;else if(i==="]"&&t)t=!1;else if(i==="/"&&!t)break;e=i==="\\"}++this.pos}var n=this.input.slice(r,this.pos);++this.pos;var s=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(s);var o=this.regexpState||(this.regexpState=new te(this));o.reset(r,n,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var c=null;try{c=new RegExp(n,a)}catch{}return this.finishToken(u.regexp,{pattern:n,flags:a,value:c})};_.readInt=function(e,t,r){for(var i=this.options.ecmaVersion>=12&&t===void 0,n=r&&this.input.charCodeAt(this.pos)===48,s=this.pos,a=0,o=0,c=0,l=t??1/0;c<l;++c,++this.pos){var h=this.input.charCodeAt(this.pos),p=void 0;if(i&&h===95){n&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),o===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),c===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=h;continue}if(h>=97?p=h-97+10:h>=65?p=h-65+10:h>=48&&h<=57?p=h-48:p=1/0,p>=e)break;o=h,a=a*e+p}return i&&o===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||t!=null&&this.pos-s!==t?null:a};function Sc(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function Ws(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}_.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=Ws(this.input.slice(t,this.pos)),++this.pos):oe(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(u.num,r)};_.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&i===110){var n=Ws(this.input.slice(t,this.pos));return++this.pos,oe(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(u.num,n)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),i===46&&!r&&(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),(i===69||i===101)&&!r&&(i=this.input.charCodeAt(++this.pos),(i===43||i===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),oe(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Sc(this.input.slice(t,this.pos),r);return this.finishToken(u.num,s)};_.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};_.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;i===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):i===8232||i===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Ue(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(u.string,t)};var Hs={};_.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Hs)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};_.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Hs;this.raise(e,t)};_.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===u.template||this.type===u.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(u.dollarBraceL)):(++this.pos,this.finishToken(u.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(u.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ue(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
24
- `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};_.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(u.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
23
+ `),cooked:this.value},this.next(),r.tail=this.type===o.backQuote,this.finishNode(r,"TemplateElement")};w.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(r.quasis=[i];!i.tail;)this.type===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(o.braceR),r.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};w.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!H.test(this.input.slice(this.lastTokEnd,this.start))};w.parseObj=function(e,t){var r=this.startNode(),i=!0,n={};for(r.properties=[],this.next();!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,n,t),r.properties.push(s)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};w.parseProperty=function(e,t){var r=this.startNode(),i,n,s,a;if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===o.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(s=this.start,a=this.startLoc),e||(i=this.eat(o.star)));var u=this.containsEsc;return this.parsePropertyName(r),!e&&!u&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(r)?(n=!0,i=this.options.ecmaVersion>=9&&this.eat(o.star),this.parsePropertyName(r)):n=!1,this.parsePropertyValue(r,e,i,n,s,a,t,u),this.finishNode(r,"Property")};w.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};w.parsePropertyValue=function(e,t,r,i,n,s,a,u){(r||i)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===o.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,i)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==o.comma&&this.type!==o.braceR&&this.type!==o.eq?((r||i)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||i)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=n),e.kind="init",t?e.value=this.parseMaybeDefault(n,s,this.copyNode(e.key)):this.type===o.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(n,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};w.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(o.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(o.bracketR),e.key;e.computed=!1}return e.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};w.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};w.parseMethod=function(e,t,r){var i=this.startNode(),n=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ui(t,i.generator)|ai|(r?vs:0)),this.expect(o.parenL),i.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(i,"FunctionExpression")};w.parseArrowExpression=function(e,t,r,i){var n=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(ui(r,!1)|gs),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};w.parseFunctionBody=function(e,t,r,i){var n=t&&this.type!==o.braceL,s=this.strict,a=!1;if(n)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||u)&&(a=this.strictDirective(this.end),a&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!s&&!a&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,_s),e.body=this.parseBlock(!1,void 0,a&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()};w.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){var i=r[t];if(i.type!=="Identifier")return!1}return!0};w.checkParams=function(e,t){for(var r=Object.create(null),i=0,n=e.params;i<n.length;i+=1){var s=n[i];this.checkLValInnerPattern(s,ci,t?null:r)}};w.parseExprList=function(e,t,r,i){for(var n=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(o.comma),t&&this.afterTrailingComma(e))break;var a=void 0;r&&this.type===o.comma?a=null:this.type===o.ellipsis?(a=this.parseSpread(i),i&&this.type===o.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):a=this.parseMaybeAssign(!1,i),n.push(a)}return n};w.checkUnreserved=function(e){var t=e.start,r=e.end,i=e.name;if(this.inGenerator&&i==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&i==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&i==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(i==="arguments"||i==="await")&&this.raise(t,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(t,"Unexpected keyword '"+i+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)){var n=this.strict?this.reservedWordsStrict:this.reservedWords;n.test(i)&&(!this.inAsync&&i==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+i+"' is reserved"))}};w.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};w.parseIdentNode=function(){var e=this.startNode();return this.type===o.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=o.name):this.unexpected(),e};w.parsePrivateIdent=function(){var e=this.startNode();return this.type===o.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};w.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===o.semi||this.canInsertSemicolon()||this.type!==o.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(o.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};w.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Yt=P.prototype;Yt.raise=function(e,t){var r=Jt(this.input,e);t+=" ("+r.line+":"+r.column+")";var i=new SyntaxError(t);throw i.pos=e,i.loc=r,i.raisedAt=this.pos,i};Yt.raiseRecoverable=Yt.raise;Yt.curPosition=function(){if(this.options.locations)return new pt(this.curLine,this.pos-this.lineStart)};var me=P.prototype,cc=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};me.enterScope=function(e){this.scopeStack.push(new cc(e))};me.exitScope=function(){this.scopeStack.pop()};me.treatFunctionsAsVarInScope=function(e){return e.flags&We||!this.inModule&&e.flags&ht};me.declareName=function(e,t,r){var i=!1;if(t===le){var n=this.currentScope();i=n.lexical.indexOf(e)>-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1,n.lexical.push(e),this.inModule&&n.flags&ht&&delete this.undefinedExports[e]}else if(t===Es){var s=this.currentScope();s.lexical.push(e)}else if(t===ws){var a=this.currentScope();this.treatFunctionsAsVar?i=a.lexical.indexOf(e)>-1:i=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var c=this.scopeStack[u];if(c.lexical.indexOf(e)>-1&&!(c.flags&bs&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){i=!0;break}if(c.var.push(e),this.inModule&&c.flags&ht&&delete this.undefinedExports[e],c.flags&oi)break}i&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};me.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};me.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};me.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&oi)return t}};me.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&oi&&!(t.flags&gs))return t}};var Xt=function(e,t,r){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Qt(e,r)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},dt=P.prototype;dt.startNode=function(){return new Xt(this,this.start,this.startLoc)};dt.startNodeAt=function(e,t){return new Xt(this,e,t)};function Ss(e,t,r,i){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=r),e}dt.finishNode=function(e,t){return Ss.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};dt.finishNodeAt=function(e,t,r,i){return Ss.call(this,e,t,r,i)};dt.copyNode=function(e){var t=new Xt(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var lc="Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",ks="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",Is=ks+" Extended_Pictographic",Fs=Is,Ds=Fs+" EBase EComp EMod EPres ExtPict",Ts=Ds,pc=Ts,hc={9:ks,10:Is,11:Fs,12:Ds,13:Ts,14:pc},fc="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",dc={9:"",10:"",11:"",12:"",13:"",14:fc},os="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",Ns="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",Ps=Ns+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Bs=Ps+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ls=Bs+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Rs=Ls+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",mc=Rs+" "+lc,xc={9:Ns,10:Ps,11:Bs,12:Ls,13:Rs,14:mc},Os={};function yc(e){var t=Os[e]={binary:de(hc[e]+" "+os),binaryOfStrings:de(dc[e]),nonBinary:{General_Category:de(os),Script:de(xc[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(jt=0,Xr=[9,10,11,12,13,14];jt<Xr.length;jt+=1)us=Xr[jt],yc(us);var us,jt,Xr,g=P.prototype,Kt=function(e,t){this.parent=e,this.base=t||this};Kt.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var r=e;r;r=r.parent)if(t.base===r.base&&t!==r)return!0;return!1};Kt.prototype.sibling=function(){return new Kt(this.parent,this.base)};var te=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Os[e.options.ecmaVersion>=14?14:e.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};te.prototype.reset=function(e,t,r){var i=r.indexOf("v")!==-1,n=r.indexOf("u")!==-1;this.start=e|0,this.source=t+"",this.flags=r,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};te.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};te.prototype.at=function(e,t){t===void 0&&(t=!1);var r=this.source,i=r.length;if(e>=i)return-1;var n=r.charCodeAt(e);if(!(t||this.switchU)||n<=55295||n>=57344||e+1>=i)return n;var s=r.charCodeAt(e+1);return s>=56320&&s<=57343?(n<<10)+s-56613888:n};te.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var r=this.source,i=r.length;if(e>=i)return i;var n=r.charCodeAt(e),s;return!(t||this.switchU)||n<=55295||n>=57344||e+1>=i||(s=r.charCodeAt(e+1))<56320||s>57343?e+1:e+2};te.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)};te.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)};te.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)};te.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e?(this.advance(t),!0):!1};te.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var r=this.pos,i=0,n=e;i<n.length;i+=1){var s=n[i],a=this.at(r,t);if(a===-1||a!==s)return!1;r=this.nextIndex(r,t)}return this.pos=r,!0};g.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,i=!1,n=!1,s=0;s<r.length;s++){var a=r.charAt(s);t.indexOf(a)===-1&&this.raise(e.start,"Invalid regular expression flag"),r.indexOf(a,s+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),a==="u"&&(i=!0),a==="v"&&(n=!0)}this.options.ecmaVersion>=15&&i&&n&&this.raise(e.start,"Invalid regular expression flag")};function gc(e){for(var t in e)return!0;return!1}g.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&gc(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};g.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var i=r[t];e.groupNames[i]||e.raise("Invalid named capture referenced")}};g.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Kt(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};g.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};g.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};g.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};g.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};g.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};g.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue),e.eat(125)))return n!==-1&&n<i&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=r}return!1};g.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};g.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};g.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var r=this.regexp_eatModifiers(e),i=e.eat(45);if(r||i){for(var n=0;n<r.length;n++){var s=r.charAt(n);r.indexOf(s,n+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(i){var a=this.regexp_eatModifiers(e);!r&&!a&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var u=0;u<a.length;u++){var c=a.charAt(u);(a.indexOf(c,u+1)>-1||r.indexOf(c)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};g.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};g.regexp_eatModifiers=function(e){for(var t="",r=0;(r=e.current())!==-1&&bc(r);)t+=ue(r),e.advance();return t};function bc(e){return e===105||e===109||e===115}g.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};g.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};g.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Vs(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Vs(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}g.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!Vs(r);)e.advance();return e.pos!==t};g.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};g.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,r=e.groupNames[e.lastStringValue];if(r)if(t)for(var i=0,n=r;i<n.length;i+=1){var s=n[i];s.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(r||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}};g.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};g.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ue(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ue(e.lastIntValue);return!0}return!1};g.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return e.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),vc(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)};function vc(e){return oe(e,!0)||e===36||e===95}g.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return e.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),wc(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)};function wc(e){return je(e,!0)||e===36||e===95||e===8204||e===8205}g.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};g.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};g.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};g.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};g.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};g.regexp_eatZero=function(e){return e.current()===48&&!er(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};g.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};g.regexp_eatControlLetter=function(e){var t=e.current();return Ms(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Ms(e){return e>=65&&e<=90||e>=97&&e<=122}g.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,i=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(i&&n>=55296&&n<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=(n-55296)*1024+(a-56320)+65536,!0}e.pos=s,e.lastIntValue=n}return!0}if(i&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Ec(e.lastIntValue))return!0;i&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function Ec(e){return e>=0&&e<=1114111}g.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};g.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var qs=0,ce=1,z=2;g.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(_c(t))return e.lastIntValue=-1,e.advance(),ce;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var i;if(e.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&i===z&&e.raise("Invalid property name"),i;e.raise("Invalid property name")}return qs};function _c(e){return e===100||e===68||e===115||e===83||e===119||e===87}g.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,i),ce}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,n)}return qs};g.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){$e(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};g.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return ce;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return z;e.raise("Invalid property name")};g.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";js(t=e.current());)e.lastStringValue+=ue(t),e.advance();return e.lastStringValue!==""};function js(e){return Ms(e)||e===95}g.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Ac(t=e.current());)e.lastStringValue+=ue(t),e.advance();return e.lastStringValue!==""};function Ac(e){return js(e)||er(e)}g.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};g.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&r===z&&e.raise("Negated character class may contain strings"),!0}return!1};g.regexp_classContents=function(e){return e.current()===93?ce:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),ce)};g.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};g.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||Ws(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return i!==93?(e.lastIntValue=i,e.advance(),!0):!1};g.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};g.regexp_classSetExpression=function(e){var t=ce,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===z&&(t=z);for(var i=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==z&&(t=ce);continue}e.raise("Invalid character in character class")}if(i!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(i!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(r=this.regexp_eatClassSetOperand(e),!r)return t;r===z&&(t=z)}};g.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;return r!==-1&&i!==-1&&r>i&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};g.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?ce:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};g.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),i=this.regexp_classContents(e);if(e.eat(93))return r&&i===z&&e.raise("Negated character class may contain strings"),i;e.pos=t}if(e.eat(92)){var n=this.regexp_eatCharacterClassEscape(e);if(n)return n;e.pos=t}return null};g.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};g.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===z&&(t=z);return t};g.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?ce:z};g.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var r=e.current();return r<0||r===e.lookahead()&&Cc(r)||Sc(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function Cc(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Sc(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}g.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return kc(t)?(e.lastIntValue=t,e.advance(),!0):!1};function kc(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}g.regexp_eatClassControlLetter=function(e){var t=e.current();return er(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};g.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};g.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;er(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function er(e){return e>=48&&e<=57}g.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;Us(r=e.current());)e.lastIntValue=16*e.lastIntValue+$s(r),e.advance();return e.pos!==t};function Us(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function $s(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}g.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};g.regexp_eatOctalDigit=function(e){var t=e.current();return Ws(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Ws(e){return e>=48&&e<=55}g.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var i=0;i<t;++i){var n=e.current();if(!Us(n))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+$s(n),e.advance()}return!0};var pi=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Qt(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},_=P.prototype;_.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new pi(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};_.getToken=function(){return this.next(),new pi(this)};typeof Symbol<"u"&&(_[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===o.eof,value:t}}}});_.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(o.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};_.readToken=function(e){return oe(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};_.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};_.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var i=void 0,n=t;(i=ds(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};_.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Ue(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())};_.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&ms.test(String.fromCharCode(e)))++this.pos;else break e}}};_.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};_.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(o.ellipsis)):(++this.pos,this.finishToken(o.dot))};_.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(o.assign,2):this.finishOp(o.slash,1)};_.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,i=e===42?o.star:o.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,i=o.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(o.assign,r+1):this.finishOp(i,r)};_.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(o.assign,3)}return this.finishOp(e===124?o.logicalOR:o.logicalAND,2)}return t===61?this.finishOp(o.assign,2):this.finishOp(e===124?o.bitwiseOR:o.bitwiseAND,1)};_.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)};_.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||H.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(o.incDec,2):t===61?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)};_.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(o.assign,r+1):this.finishOp(o.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(o.relational,r))};_.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(o.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(e===61?o.eq:o.prefix,1)};_.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(o.questionDot,2)}if(t===63){if(e>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(o.assign,3)}return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)};_.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),oe(t,!0)||t===92))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ue(t)+"'")};_.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===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(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ue(e)+"'")};_.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};_.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(H.test(i)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(i==="[")t=!0;else if(i==="]"&&t)t=!1;else if(i==="/"&&!t)break;e=i==="\\"}++this.pos}var n=this.input.slice(r,this.pos);++this.pos;var s=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(s);var u=this.regexpState||(this.regexpState=new te(this));u.reset(r,n,a),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var c=null;try{c=new RegExp(n,a)}catch{}return this.finishToken(o.regexp,{pattern:n,flags:a,value:c})};_.readInt=function(e,t,r){for(var i=this.options.ecmaVersion>=12&&t===void 0,n=r&&this.input.charCodeAt(this.pos)===48,s=this.pos,a=0,u=0,c=0,l=t??1/0;c<l;++c,++this.pos){var h=this.input.charCodeAt(this.pos),p=void 0;if(i&&h===95){n&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),c===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=h;continue}if(h>=97?p=h-97+10:h>=65?p=h-65+10:h>=48&&h<=57?p=h-48:p=1/0,p>=e)break;u=h,a=a*e+p}return i&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||t!=null&&this.pos-s!==t?null:a};function Ic(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function zs(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}_.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=zs(this.input.slice(t,this.pos)),++this.pos):oe(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,r)};_.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&i===110){var n=zs(this.input.slice(t,this.pos));return++this.pos,oe(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,n)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),i===46&&!r&&(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),(i===69||i===101)&&!r&&(i=this.input.charCodeAt(++this.pos),(i===43||i===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),oe(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Ic(this.input.slice(t,this.pos),r);return this.finishToken(o.num,s)};_.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};_.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;i===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):i===8232||i===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Ue(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(o.string,t)};var Hs={};_.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Hs)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};_.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Hs;this.raise(e,t)};_.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===o.template||this.type===o.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(o.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ue(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
24
+ `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};_.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(o.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
25
25
  `&&++this.pos;case`
26
26
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};_.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
27
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return de(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),(i!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return Ue(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};_.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};_.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(je(n,i))this.pos+=n<=65535?1:2;else if(n===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?oe:je)(a,i)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=de(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};_.readWord=function(){var e=this.readWord1(),t=u.name;return this.keywords.test(e)&&(t=ni[e]),this.finishToken(t,e)};var kc="8.13.0";P.acorn={Parser:P,version:kc,defaultOptions:ti,Position:lt,SourceLocation:Qt,getLineInfo:Jt,Node:Xt,TokenType:S,tokTypes:u,keywordTypes:ni,TokContext:$,tokContexts:D,isIdentifierChar:je,isIdentifierStart:oe,Token:pi,isNewLine:Ue,lineBreak:H,lineBreakG:Zu,nonASCIIwhitespace:ms};function Ic(e,t,r,i,n){r||(r=d),function s(a,o,c){var l=c||a.type;r[l](a,o,s),t[l]&&t[l](a,o)}(e,i,n)}function zt(e,t,r,i,n){var s=[];r||(r=d),function a(o,c,l){var h=l||o.type,p=o!==s[s.length-1];p&&s.push(o),r[h](o,c,a),t[h]&&t[h](o,c||s,s),p&&s.pop()}(e,i,n)}function Fc(e,t){var r=Object.create(t||d);for(var i in e)r[i]=e[i];return r}function hi(e,t,r){r(e,t)}function Ie(e,t,r){}var d={};d.Program=d.BlockStatement=d.StaticBlock=function(e,t,r){for(var i=0,n=e.body;i<n.length;i+=1){var s=n[i];r(s,t,"Statement")}};d.Statement=hi;d.EmptyStatement=Ie;d.ExpressionStatement=d.ParenthesizedExpression=d.ChainExpression=function(e,t,r){return r(e.expression,t,"Expression")};d.IfStatement=function(e,t,r){r(e.test,t,"Expression"),r(e.consequent,t,"Statement"),e.alternate&&r(e.alternate,t,"Statement")};d.LabeledStatement=function(e,t,r){return r(e.body,t,"Statement")};d.BreakStatement=d.ContinueStatement=Ie;d.WithStatement=function(e,t,r){r(e.object,t,"Expression"),r(e.body,t,"Statement")};d.SwitchStatement=function(e,t,r){r(e.discriminant,t,"Expression");for(var i=0,n=e.cases;i<n.length;i+=1){var s=n[i];r(s,t)}};d.SwitchCase=function(e,t,r){e.test&&r(e.test,t,"Expression");for(var i=0,n=e.consequent;i<n.length;i+=1){var s=n[i];r(s,t,"Statement")}};d.ReturnStatement=d.YieldExpression=d.AwaitExpression=function(e,t,r){e.argument&&r(e.argument,t,"Expression")};d.ThrowStatement=d.SpreadElement=function(e,t,r){return r(e.argument,t,"Expression")};d.TryStatement=function(e,t,r){r(e.block,t,"Statement"),e.handler&&r(e.handler,t),e.finalizer&&r(e.finalizer,t,"Statement")};d.CatchClause=function(e,t,r){e.param&&r(e.param,t,"Pattern"),r(e.body,t,"Statement")};d.WhileStatement=d.DoWhileStatement=function(e,t,r){r(e.test,t,"Expression"),r(e.body,t,"Statement")};d.ForStatement=function(e,t,r){e.init&&r(e.init,t,"ForInit"),e.test&&r(e.test,t,"Expression"),e.update&&r(e.update,t,"Expression"),r(e.body,t,"Statement")};d.ForInStatement=d.ForOfStatement=function(e,t,r){r(e.left,t,"ForInit"),r(e.right,t,"Expression"),r(e.body,t,"Statement")};d.ForInit=function(e,t,r){e.type==="VariableDeclaration"?r(e,t):r(e,t,"Expression")};d.DebuggerStatement=Ie;d.FunctionDeclaration=function(e,t,r){return r(e,t,"Function")};d.VariableDeclaration=function(e,t,r){for(var i=0,n=e.declarations;i<n.length;i+=1){var s=n[i];r(s,t)}};d.VariableDeclarator=function(e,t,r){r(e.id,t,"Pattern"),e.init&&r(e.init,t,"Expression")};d.Function=function(e,t,r){e.id&&r(e.id,t,"Pattern");for(var i=0,n=e.params;i<n.length;i+=1){var s=n[i];r(s,t,"Pattern")}r(e.body,t,e.expression?"Expression":"Statement")};d.Pattern=function(e,t,r){e.type==="Identifier"?r(e,t,"VariablePattern"):e.type==="MemberExpression"?r(e,t,"MemberPattern"):r(e,t)};d.VariablePattern=Ie;d.MemberPattern=hi;d.RestElement=function(e,t,r){return r(e.argument,t,"Pattern")};d.ArrayPattern=function(e,t,r){for(var i=0,n=e.elements;i<n.length;i+=1){var s=n[i];s&&r(s,t,"Pattern")}};d.ObjectPattern=function(e,t,r){for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];s.type==="Property"?(s.computed&&r(s.key,t,"Expression"),r(s.value,t,"Pattern")):s.type==="RestElement"&&r(s.argument,t,"Pattern")}};d.Expression=hi;d.ThisExpression=d.Super=d.MetaProperty=Ie;d.ArrayExpression=function(e,t,r){for(var i=0,n=e.elements;i<n.length;i+=1){var s=n[i];s&&r(s,t,"Expression")}};d.ObjectExpression=function(e,t,r){for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];r(s,t)}};d.FunctionExpression=d.ArrowFunctionExpression=d.FunctionDeclaration;d.SequenceExpression=function(e,t,r){for(var i=0,n=e.expressions;i<n.length;i+=1){var s=n[i];r(s,t,"Expression")}};d.TemplateLiteral=function(e,t,r){for(var i=0,n=e.quasis;i<n.length;i+=1){var s=n[i];r(s,t)}for(var a=0,o=e.expressions;a<o.length;a+=1){var c=o[a];r(c,t,"Expression")}};d.TemplateElement=Ie;d.UnaryExpression=d.UpdateExpression=function(e,t,r){r(e.argument,t,"Expression")};d.BinaryExpression=d.LogicalExpression=function(e,t,r){r(e.left,t,"Expression"),r(e.right,t,"Expression")};d.AssignmentExpression=d.AssignmentPattern=function(e,t,r){r(e.left,t,"Pattern"),r(e.right,t,"Expression")};d.ConditionalExpression=function(e,t,r){r(e.test,t,"Expression"),r(e.consequent,t,"Expression"),r(e.alternate,t,"Expression")};d.NewExpression=d.CallExpression=function(e,t,r){if(r(e.callee,t,"Expression"),e.arguments)for(var i=0,n=e.arguments;i<n.length;i+=1){var s=n[i];r(s,t,"Expression")}};d.MemberExpression=function(e,t,r){r(e.object,t,"Expression"),e.computed&&r(e.property,t,"Expression")};d.ExportNamedDeclaration=d.ExportDefaultDeclaration=function(e,t,r){e.declaration&&r(e.declaration,t,e.type==="ExportNamedDeclaration"||e.declaration.id?"Statement":"Expression"),e.source&&r(e.source,t,"Expression")};d.ExportAllDeclaration=function(e,t,r){e.exported&&r(e.exported,t),r(e.source,t,"Expression")};d.ImportDeclaration=function(e,t,r){for(var i=0,n=e.specifiers;i<n.length;i+=1){var s=n[i];r(s,t)}r(e.source,t,"Expression")};d.ImportExpression=function(e,t,r){r(e.source,t,"Expression")};d.ImportSpecifier=d.ImportDefaultSpecifier=d.ImportNamespaceSpecifier=d.Identifier=d.PrivateIdentifier=d.Literal=Ie;d.TaggedTemplateExpression=function(e,t,r){r(e.tag,t,"Expression"),r(e.quasi,t,"Expression")};d.ClassDeclaration=d.ClassExpression=function(e,t,r){return r(e,t,"Class")};d.Class=function(e,t,r){e.id&&r(e.id,t,"Pattern"),e.superClass&&r(e.superClass,t,"Expression"),r(e.body,t)};d.ClassBody=function(e,t,r){for(var i=0,n=e.body;i<n.length;i+=1){var s=n[i];r(s,t)}};d.MethodDefinition=d.PropertyDefinition=d.Property=function(e,t,r){e.computed&&r(e.key,t,"Expression"),e.value&&r(e.value,t,"Expression")};var Gs=new Set(["Array","ArrayBuffer","atob","AudioContext","Blob","Boolean","BigInt","btoa","clearInterval","clearTimeout","console","crypto","CustomEvent","DataView","Date","decodeURI","decodeURIComponent","devicePixelRatio","document","encodeURI","encodeURIComponent","Error","escape","eval","fetch","File","FileList","FileReader","Float32Array","Float64Array","Function","Headers","Image","ImageData","Infinity","Int16Array","Int32Array","Int8Array","Intl","isFinite","isNaN","JSON","Map","Math","NaN","Number","navigator","Object","parseFloat","parseInt","performance","Path2D","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","cancelAnimationFrame","requestAnimationFrame","Set","setInterval","setTimeout","String","Symbol","SyntaxError","TextDecoder","TextEncoder","this","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","URIError","URL","WeakMap","WeakSet","WebSocket","Worker","window"]),ct=Fc({Import(){},ViewExpression(e,t,r){r(e.id,t,"Identifier")},MutableExpression(e,t,r){r(e.id,t,"Identifier")}});function Wt(e){return e.type==="FunctionExpression"||e.type==="FunctionDeclaration"||e.type==="ArrowFunctionExpression"||e.type==="Program"}function Dc(e){return e.type==="BlockStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"||e.type==="ForStatement"||Wt(e)}function Tc(e){return e.type==="FunctionExpression"||e.type==="FunctionDeclaration"}function Nc(e,t){let r={type:"Program",body:[e.body]},i=new Map,n=new Set(t),s=[];function a(m,v){let E=i.get(m);return E?E.has(v):!1}function o(m,v){let E=i.get(m);E?E.add(v.name):i.set(m,new Set([v.name]))}function c(m){m.id&&o(m,m.id)}function l(m){m.params.forEach(v=>p(v,m)),m.id&&o(m,m.id)}function h(m){m.param&&p(m.param,m)}function p(m,v){switch(m.type){case"Identifier":o(v,m);break;case"ObjectPattern":m.properties.forEach(E=>p(E,v));break;case"ArrayPattern":m.elements.forEach(E=>E&&p(E,v));break;case"Property":p(m.value,v);break;case"RestElement":p(m.argument,v);break;case"AssignmentPattern":p(m.left,v);break;default:throw new Error("Unrecognized pattern type: "+m.type)}}function f(m){o(r,m.local)}zt(r,{VariableDeclaration:(m,v)=>{let E=null;for(let k=v.length-1;k>=0&&E===null;--k)(m.kind==="var"?Wt(v[k]):Dc(v[k]))&&(E=v[k]);m.declarations.forEach(k=>p(k.id,E))},FunctionDeclaration:(m,v)=>{let E=null;for(let k=v.length-2;k>=0&&E===null;--k)Wt(v[k])&&(E=v[k]);o(E,m.id),l(m)},Function:l,ClassDeclaration:(m,v)=>{let E=null;for(let k=v.length-2;k>=0&&E===null;k--)Wt(v[k])&&(E=v[k]);o(E,m.id)},Class:c,CatchClause:h,ImportDefaultSpecifier:f,ImportSpecifier:f,ImportNamespaceSpecifier:f},ct);function x(m,v){let E=m.name;if(E!=="undefined"){for(let k=v.length-2;k>=0;--k){if(E==="arguments"&&Tc(v[k])||a(v[k],E))return;v[k].type==="ViewExpression"&&(m=v[k],E=`viewof ${m.id.name}`),v[k].type==="MutableExpression"&&(m=v[k],E=`mutable ${m.id.name}`)}if(!n.has(E)){if(E==="arguments")throw Object.assign(new SyntaxError("arguments is not allowed"),{node:m});s.push(m)}}}zt(r,{VariablePattern:x,Identifier:x},ct);function y(m,v){if(m)switch(m.type){case"Identifier":case"VariablePattern":{for(let E of v)if(a(E,m.name))return;if(v[v.length-2].type==="MutableExpression")return;throw Object.assign(new SyntaxError(`Assignment to constant variable ${m.name}`),{node:m})}case"ArrayPattern":{for(let E of m.elements)y(E,v);return}case"ObjectPattern":{for(let E of m.properties)y(E,v);return}case"Property":{y(m.value,v);return}case"RestElement":{y(m.argument,v);return}}}function C(m,v){y(m.argument,v)}function T(m,v){y(m.left,v)}return zt(r,{AssignmentExpression:T,AssignmentPattern:T,UpdateExpression:C,ForOfStatement:T,ForInStatement:T},ct),s}function Ut(e,t){let r={type:"Program",body:[e.body]},i=new Map,{references:n}=e;return Ic(r,{CallExpression:s=>{let{callee:a,arguments:o}=s;if(a.type!=="Identifier"||a.name!==t||n.indexOf(a)<0)return;if(o.length!==1||!(o[0].type==="Literal"&&/^['"]/.test(o[0].raw)||o[0].type==="TemplateLiteral"&&o[0].expressions.length===0))throw Object.assign(new SyntaxError(`${t} requires a single literal string argument`),{node:s});let[c]=o,l=c.type==="Literal"?c.value:c.quasis[0].value.cooked,h={start:c.start,end:c.end};i.has(l)?i.get(l).push(h):i.set(l,[h])}},ct),i}var qe=2,Ys=4,Ks=8;function Pc(e,{tag:t,raw:r,globals:i,...n}={}){let s;if(t!=null&&e){s=Lc.parse(e,n);let a=Oc.parse(t,n);cs(a,t,i),ls(a,t),s.tag=a,s.raw=!!r}else s=fi.parse(e,n);return cs(s,e,i),ls(s,e),s}var fi=class Qs extends P{constructor(t,...r){super(Object.assign({ecmaVersion:13},t),...r)}enterScope(t){return t&qe&&++this.O_function,super.enterScope(t)}exitScope(){return this.currentScope().flags&qe&&--this.O_function,super.exitScope()}parseForIn(t,r){return this.O_function===1&&t.await&&(this.O_async=!0),super.parseForIn(t,r)}parseAwait(){return this.O_function===1&&(this.O_async=!0),super.parseAwait()}parseYield(t){return this.O_function===1&&(this.O_generator=!0),super.parseYield(t)}parseImport(t){return this.next(),t.specifiers=this.parseImportSpecifiers(),this.type===u._with&&(this.next(),t.injections=this.parseImportSpecifiers()),this.expectContextual("from"),t.source=this.type===u.string?this.parseExprAtom():this.unexpected(),this.finishNode(t,"ImportDeclaration")}parseImportSpecifiers(){let t=[],r=new Set,i=!0;for(this.expect(u.braceL);!this.eat(u.braceR);){if(i)i=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;let n=this.startNode();n.view=this.eatContextual("viewof"),n.mutable=n.view?!1:this.eatContextual("mutable"),n.imported=this.parseIdent(),this.checkUnreserved(n.imported),this.checkLocal(n.imported),this.eatContextual("as")?(n.local=this.parseIdent(),this.checkUnreserved(n.local),this.checkLocal(n.local)):n.local=n.imported,this.checkLValSimple(n.local,"let"),r.has(n.local.name)&&this.raise(n.local.start,`Identifier '${n.local.name}' has already been declared`),r.add(n.local.name),t.push(this.finishNode(n,"ImportSpecifier"))}return t}parseExprAtom(t){return this.parseMaybeKeywordExpression("viewof","ViewExpression")||this.parseMaybeKeywordExpression("mutable","MutableExpression")||super.parseExprAtom(t)}startCell(){this.O_function=0,this.O_async=!1,this.O_generator=!1,this.strict=!0,this.enterScope(qe|Ys|Ks)}finishCell(t,r,i){return i&&this.checkLocal(i),t.id=i,t.body=r,t.async=this.O_async,t.generator=this.O_generator,this.exitScope(),this.finishNode(t,"Cell")}parseCell(t,r){let i=new Qs({},this.input,this.start),n=i.getToken(),s=null,a=null;return this.startCell(),n.type===u._import&&i.getToken().type!==u.parenL?s=this.parseImport(this.startNode()):n.type!==u.eof&&n.type!==u.semi&&(n.type===u.name&&((n.value==="viewof"||n.value==="mutable")&&(n=i.getToken(),n.type!==u.name&&i.unexpected()),n=i.getToken(),n.type===u.eq&&(a=this.parseMaybeKeywordExpression("viewof","ViewExpression")||this.parseMaybeKeywordExpression("mutable","MutableExpression")||this.parseIdent(),n=i.getToken(),this.expect(u.eq))),n.type===u.braceL?s=this.parseBlock():(s=this.parseExpression(),a===null&&(s.type==="FunctionExpression"||s.type==="ClassExpression")&&(a=s.id))),this.semicolon(),r&&this.expect(u.eof),this.finishCell(t,s,a)}parseTopLevel(t){return this.parseCell(t,!0)}toAssignable(t,r,i){return t.type==="MutableExpression"?t:super.toAssignable(t,r,i)}checkLocal(t){let r=t.id||t;(Gs.has(r.name)||r.name==="arguments")&&this.raise(r.start,`Identifier '${r.name}' is reserved`)}checkUnreserved(t){return(t.name==="viewof"||t.name==="mutable")&&this.raise(t.start,`Unexpected keyword '${t.name}'`),super.checkUnreserved(t)}checkLValSimple(t,r,i){return super.checkLValSimple(t.type==="MutableExpression"?t.id:t,r,i)}unexpected(t){this.raise(t??this.start,this.type===u.eof?"Unexpected end of input":"Unexpected token")}parseMaybeKeywordExpression(t,r){if(this.isContextual(t)){let i=this.startNode();return this.next(),i.id=this.parseIdent(),this.finishNode(i,r)}}},Bc=new $("`",!0,!0,e=>Rc.call(e)),Lc=class extends fi{constructor(...e){super(...e),this.type=u.backQuote,this.exprAllowed=!1}initialContext(){return[Bc]}parseCell(e){this.startCell(),this.type===u.eof&&(this.value="");let t=!0,r=this.startNode();r.expressions=[];let i=this.parseTemplateElement({isTagged:t});for(r.quasis=[i];this.type!==u.eof;)this.expect(u.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(u.braceR),r.quasis.push(i=this.parseTemplateElement({isTagged:t}));return i.tail=!0,this.next(),this.finishNode(r,"TemplateLiteral"),this.expect(u.eof),this.finishCell(e,r,null)}};function Rc(){e:for(;this.pos<this.input.length;this.pos++)switch(this.input.charCodeAt(this.pos)){case 92:{this.pos<this.input.length-1&&++this.pos;break}case 36:{if(this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&this.type===u.invalidTemplate)return this.pos+=2,this.finishToken(u.dollarBraceL);break e}break}}return this.finishToken(u.invalidTemplate,this.input.slice(this.start,this.pos))}var Oc=class extends P{constructor(e,...t){super(Object.assign({ecmaVersion:12},e),...t)}enterScope(e){return e&qe&&++this.O_function,super.enterScope(e)}exitScope(){return this.currentScope().flags&qe&&--this.O_function,super.exitScope()}parseForIn(e,t){return this.O_function===1&&e.await&&(this.O_async=!0),super.parseForIn(e,t)}parseAwait(){return this.O_function===1&&(this.O_async=!0),super.parseAwait()}parseYield(e){return this.O_function===1&&(this.O_generator=!0),super.parseYield(e)}parseTopLevel(e){return this.O_function=0,this.O_async=!1,this.O_generator=!1,this.strict=!0,this.enterScope(qe|Ys|Ks),e.body=this.parseExpression(),e.input=this.input,e.async=this.O_async,e.generator=this.O_generator,this.exitScope(),this.finishNode(e,"CellTag")}};function cs(e,t,r=Gs){if(!e.body)e.references=[];else if(e.body.type==="ImportDeclaration")e.references=e.body.injections?e.body.injections.map(i=>i.imported):[];else try{e.references=Nc(e,r)}catch(i){if(i.node){let n=Jt(t,i.node.start);i.message+=` (${n.line}:${n.column})`,i.pos=i.node.start,i.loc=n,delete i.node}throw i}return e}function ls(e,t){if(e.body&&e.body.type!=="ImportDeclaration")try{e.fileAttachments=Ut(e,"FileAttachment"),e.databaseClients=Ut(e,"DatabaseClient"),e.secrets=Ut(e,"Secret"),e.notificationClients=Ut(e,"NotificationClient")}catch(r){if(r.node){let i=Jt(t,r.node.start);r.message+=` (${i.line}:${i.column})`,r.pos=r.node.start,r.loc=i,delete r.node}throw r}else e.fileAttachments=new Map,e.databaseClients=new Map,e.secrets=new Map,e.notificationClients=new Map;return e}var Ud=Symbol("start"),$d=Symbol("modifier"),zd=Symbol("function"),Wd=Symbol("name"),Vc=class extends fi{parseTopLevel(e){for(e.cells||(e.cells=[]);this.type!==u.eof;){let t=this.parseCell(this.startNode());t.input=this.input,e.cells.push(t)}return this.next(),this.finishNode(e,"Program")}};function Js(e){return Vc.parse(e,{ecmaVersion:"latest"}).cells.map(t=>({type:"Cell",text:e.substring(t.start,t.end),start:t.start,end:t.end}))}function Zs(e){return Pc(e)}var Mc=ct,ot={functionType:Object.getPrototypeOf(function(){}).constructor,asyncFunctionType:Object.getPrototypeOf(async function(){}).constructor,generatorFunctionType:Object.getPrototypeOf(function*(){}).constructor,asyncGeneratorFunctionType:Object.getPrototypeOf(async function*(){}).constructor};function qc(e=!1,t=!1){return!e&&!t?ot.functionType:e&&!t?ot.asyncFunctionType:!e&&t?ot.generatorFunctionType:ot.asyncGeneratorFunctionType}function di(e,t=!1,r=!1,i=!1,n){if(n!==void 0)return e.patches.sort((s,a)=>a.start-s.start),e.patches.forEach(s=>{n=n.substring(0,s.start)+s.newText+n.substring(s.end)}),new(qc(t,r))(...e.args,i?n.substring(1,n.length-1).trim():`return (
27
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ue(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),(i!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return Ue(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};_.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};_.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(je(n,i))this.pos+=n<=65535?1:2;else if(n===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?oe:je)(a,i)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=ue(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};_.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=ni[e]),this.finishToken(t,e)};var Fc="8.14.0";P.acorn={Parser:P,version:Fc,defaultOptions:ti,Position:pt,SourceLocation:Qt,getLineInfo:Jt,Node:Xt,TokenType:S,tokTypes:o,keywordTypes:ni,TokContext:$,tokContexts:D,isIdentifierChar:je,isIdentifierStart:oe,Token:pi,isNewLine:Ue,lineBreak:H,lineBreakG:Zu,nonASCIIwhitespace:ms};function Dc(e,t,r,i,n){r||(r=d),function s(a,u,c){var l=c||a.type;r[l](a,u,s),t[l]&&t[l](a,u)}(e,i,n)}function Wt(e,t,r,i,n){var s=[];r||(r=d),function a(u,c,l){var h=l||u.type,p=u!==s[s.length-1];p&&s.push(u),r[h](u,c,a),t[h]&&t[h](u,c||s,s),p&&s.pop()}(e,i,n)}function Tc(e,t){var r=Object.create(t||d);for(var i in e)r[i]=e[i];return r}function hi(e,t,r){r(e,t)}function Ie(e,t,r){}var d={};d.Program=d.BlockStatement=d.StaticBlock=function(e,t,r){for(var i=0,n=e.body;i<n.length;i+=1){var s=n[i];r(s,t,"Statement")}};d.Statement=hi;d.EmptyStatement=Ie;d.ExpressionStatement=d.ParenthesizedExpression=d.ChainExpression=function(e,t,r){return r(e.expression,t,"Expression")};d.IfStatement=function(e,t,r){r(e.test,t,"Expression"),r(e.consequent,t,"Statement"),e.alternate&&r(e.alternate,t,"Statement")};d.LabeledStatement=function(e,t,r){return r(e.body,t,"Statement")};d.BreakStatement=d.ContinueStatement=Ie;d.WithStatement=function(e,t,r){r(e.object,t,"Expression"),r(e.body,t,"Statement")};d.SwitchStatement=function(e,t,r){r(e.discriminant,t,"Expression");for(var i=0,n=e.cases;i<n.length;i+=1){var s=n[i];r(s,t)}};d.SwitchCase=function(e,t,r){e.test&&r(e.test,t,"Expression");for(var i=0,n=e.consequent;i<n.length;i+=1){var s=n[i];r(s,t,"Statement")}};d.ReturnStatement=d.YieldExpression=d.AwaitExpression=function(e,t,r){e.argument&&r(e.argument,t,"Expression")};d.ThrowStatement=d.SpreadElement=function(e,t,r){return r(e.argument,t,"Expression")};d.TryStatement=function(e,t,r){r(e.block,t,"Statement"),e.handler&&r(e.handler,t),e.finalizer&&r(e.finalizer,t,"Statement")};d.CatchClause=function(e,t,r){e.param&&r(e.param,t,"Pattern"),r(e.body,t,"Statement")};d.WhileStatement=d.DoWhileStatement=function(e,t,r){r(e.test,t,"Expression"),r(e.body,t,"Statement")};d.ForStatement=function(e,t,r){e.init&&r(e.init,t,"ForInit"),e.test&&r(e.test,t,"Expression"),e.update&&r(e.update,t,"Expression"),r(e.body,t,"Statement")};d.ForInStatement=d.ForOfStatement=function(e,t,r){r(e.left,t,"ForInit"),r(e.right,t,"Expression"),r(e.body,t,"Statement")};d.ForInit=function(e,t,r){e.type==="VariableDeclaration"?r(e,t):r(e,t,"Expression")};d.DebuggerStatement=Ie;d.FunctionDeclaration=function(e,t,r){return r(e,t,"Function")};d.VariableDeclaration=function(e,t,r){for(var i=0,n=e.declarations;i<n.length;i+=1){var s=n[i];r(s,t)}};d.VariableDeclarator=function(e,t,r){r(e.id,t,"Pattern"),e.init&&r(e.init,t,"Expression")};d.Function=function(e,t,r){e.id&&r(e.id,t,"Pattern");for(var i=0,n=e.params;i<n.length;i+=1){var s=n[i];r(s,t,"Pattern")}r(e.body,t,e.expression?"Expression":"Statement")};d.Pattern=function(e,t,r){e.type==="Identifier"?r(e,t,"VariablePattern"):e.type==="MemberExpression"?r(e,t,"MemberPattern"):r(e,t)};d.VariablePattern=Ie;d.MemberPattern=hi;d.RestElement=function(e,t,r){return r(e.argument,t,"Pattern")};d.ArrayPattern=function(e,t,r){for(var i=0,n=e.elements;i<n.length;i+=1){var s=n[i];s&&r(s,t,"Pattern")}};d.ObjectPattern=function(e,t,r){for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];s.type==="Property"?(s.computed&&r(s.key,t,"Expression"),r(s.value,t,"Pattern")):s.type==="RestElement"&&r(s.argument,t,"Pattern")}};d.Expression=hi;d.ThisExpression=d.Super=d.MetaProperty=Ie;d.ArrayExpression=function(e,t,r){for(var i=0,n=e.elements;i<n.length;i+=1){var s=n[i];s&&r(s,t,"Expression")}};d.ObjectExpression=function(e,t,r){for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];r(s,t)}};d.FunctionExpression=d.ArrowFunctionExpression=d.FunctionDeclaration;d.SequenceExpression=function(e,t,r){for(var i=0,n=e.expressions;i<n.length;i+=1){var s=n[i];r(s,t,"Expression")}};d.TemplateLiteral=function(e,t,r){for(var i=0,n=e.quasis;i<n.length;i+=1){var s=n[i];r(s,t)}for(var a=0,u=e.expressions;a<u.length;a+=1){var c=u[a];r(c,t,"Expression")}};d.TemplateElement=Ie;d.UnaryExpression=d.UpdateExpression=function(e,t,r){r(e.argument,t,"Expression")};d.BinaryExpression=d.LogicalExpression=function(e,t,r){r(e.left,t,"Expression"),r(e.right,t,"Expression")};d.AssignmentExpression=d.AssignmentPattern=function(e,t,r){r(e.left,t,"Pattern"),r(e.right,t,"Expression")};d.ConditionalExpression=function(e,t,r){r(e.test,t,"Expression"),r(e.consequent,t,"Expression"),r(e.alternate,t,"Expression")};d.NewExpression=d.CallExpression=function(e,t,r){if(r(e.callee,t,"Expression"),e.arguments)for(var i=0,n=e.arguments;i<n.length;i+=1){var s=n[i];r(s,t,"Expression")}};d.MemberExpression=function(e,t,r){r(e.object,t,"Expression"),e.computed&&r(e.property,t,"Expression")};d.ExportNamedDeclaration=d.ExportDefaultDeclaration=function(e,t,r){e.declaration&&r(e.declaration,t,e.type==="ExportNamedDeclaration"||e.declaration.id?"Statement":"Expression"),e.source&&r(e.source,t,"Expression")};d.ExportAllDeclaration=function(e,t,r){e.exported&&r(e.exported,t),r(e.source,t,"Expression")};d.ImportDeclaration=function(e,t,r){for(var i=0,n=e.specifiers;i<n.length;i+=1){var s=n[i];r(s,t)}r(e.source,t,"Expression")};d.ImportExpression=function(e,t,r){r(e.source,t,"Expression")};d.ImportSpecifier=d.ImportDefaultSpecifier=d.ImportNamespaceSpecifier=d.Identifier=d.PrivateIdentifier=d.Literal=Ie;d.TaggedTemplateExpression=function(e,t,r){r(e.tag,t,"Expression"),r(e.quasi,t,"Expression")};d.ClassDeclaration=d.ClassExpression=function(e,t,r){return r(e,t,"Class")};d.Class=function(e,t,r){e.id&&r(e.id,t,"Pattern"),e.superClass&&r(e.superClass,t,"Expression"),r(e.body,t)};d.ClassBody=function(e,t,r){for(var i=0,n=e.body;i<n.length;i+=1){var s=n[i];r(s,t)}};d.MethodDefinition=d.PropertyDefinition=d.Property=function(e,t,r){e.computed&&r(e.key,t,"Expression"),e.value&&r(e.value,t,"Expression")};var Gs=new Set(["Array","ArrayBuffer","atob","AudioContext","Blob","Boolean","BigInt","btoa","clearInterval","clearTimeout","console","crypto","CustomEvent","DataView","Date","decodeURI","decodeURIComponent","devicePixelRatio","document","encodeURI","encodeURIComponent","Error","escape","eval","fetch","File","FileList","FileReader","Float32Array","Float64Array","Function","Headers","Image","ImageData","Infinity","Int16Array","Int32Array","Int8Array","Intl","isFinite","isNaN","JSON","Map","Math","NaN","Number","navigator","Object","parseFloat","parseInt","performance","Path2D","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","cancelAnimationFrame","requestAnimationFrame","Set","setInterval","setTimeout","String","Symbol","SyntaxError","TextDecoder","TextEncoder","this","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","URIError","URL","WeakMap","WeakSet","WebSocket","Worker","window"]),lt=Tc({Import(){},ViewExpression(e,t,r){r(e.id,t,"Identifier")},MutableExpression(e,t,r){r(e.id,t,"Identifier")}});function zt(e){return e.type==="FunctionExpression"||e.type==="FunctionDeclaration"||e.type==="ArrowFunctionExpression"||e.type==="Program"}function Nc(e){return e.type==="BlockStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"||e.type==="ForStatement"||zt(e)}function Pc(e){return e.type==="FunctionExpression"||e.type==="FunctionDeclaration"}function Bc(e,t){let r={type:"Program",body:[e.body]},i=new Map,n=new Set(t),s=[];function a(m,v){let E=i.get(m);return E?E.has(v):!1}function u(m,v){let E=i.get(m);E?E.add(v.name):i.set(m,new Set([v.name]))}function c(m){m.id&&u(m,m.id)}function l(m){m.params.forEach(v=>p(v,m)),m.id&&u(m,m.id)}function h(m){m.param&&p(m.param,m)}function p(m,v){switch(m.type){case"Identifier":u(v,m);break;case"ObjectPattern":m.properties.forEach(E=>p(E,v));break;case"ArrayPattern":m.elements.forEach(E=>E&&p(E,v));break;case"Property":p(m.value,v);break;case"RestElement":p(m.argument,v);break;case"AssignmentPattern":p(m.left,v);break;default:throw new Error("Unrecognized pattern type: "+m.type)}}function f(m){u(r,m.local)}Wt(r,{VariableDeclaration:(m,v)=>{let E=null;for(let k=v.length-1;k>=0&&E===null;--k)(m.kind==="var"?zt(v[k]):Nc(v[k]))&&(E=v[k]);m.declarations.forEach(k=>p(k.id,E))},FunctionDeclaration:(m,v)=>{let E=null;for(let k=v.length-2;k>=0&&E===null;--k)zt(v[k])&&(E=v[k]);u(E,m.id),l(m)},Function:l,ClassDeclaration:(m,v)=>{let E=null;for(let k=v.length-2;k>=0&&E===null;k--)zt(v[k])&&(E=v[k]);u(E,m.id)},Class:c,CatchClause:h,ImportDefaultSpecifier:f,ImportSpecifier:f,ImportNamespaceSpecifier:f},lt);function x(m,v){let E=m.name;if(E!=="undefined"){for(let k=v.length-2;k>=0;--k){if(E==="arguments"&&Pc(v[k])||a(v[k],E))return;v[k].type==="ViewExpression"&&(m=v[k],E=`viewof ${m.id.name}`),v[k].type==="MutableExpression"&&(m=v[k],E=`mutable ${m.id.name}`)}if(!n.has(E)){if(E==="arguments")throw Object.assign(new SyntaxError("arguments is not allowed"),{node:m});s.push(m)}}}Wt(r,{VariablePattern:x,Identifier:x},lt);function y(m,v){if(m)switch(m.type){case"Identifier":case"VariablePattern":{for(let E of v)if(a(E,m.name))return;if(v[v.length-2].type==="MutableExpression")return;throw Object.assign(new SyntaxError(`Assignment to constant variable ${m.name}`),{node:m})}case"ArrayPattern":{for(let E of m.elements)y(E,v);return}case"ObjectPattern":{for(let E of m.properties)y(E,v);return}case"Property":{y(m.value,v);return}case"RestElement":{y(m.argument,v);return}}}function C(m,v){y(m.argument,v)}function T(m,v){y(m.left,v)}return Wt(r,{AssignmentExpression:T,AssignmentPattern:T,UpdateExpression:C,ForOfStatement:T,ForInStatement:T},lt),s}function Ut(e,t){let r={type:"Program",body:[e.body]},i=new Map,{references:n}=e;return Dc(r,{CallExpression:s=>{let{callee:a,arguments:u}=s;if(a.type!=="Identifier"||a.name!==t||n.indexOf(a)<0)return;if(u.length!==1||!(u[0].type==="Literal"&&/^['"]/.test(u[0].raw)||u[0].type==="TemplateLiteral"&&u[0].expressions.length===0))throw Object.assign(new SyntaxError(`${t} requires a single literal string argument`),{node:s});let[c]=u,l=c.type==="Literal"?c.value:c.quasis[0].value.cooked,h={start:c.start,end:c.end};i.has(l)?i.get(l).push(h):i.set(l,[h])}},lt),i}var qe=2,Ys=4,Ks=8;function Lc(e,{tag:t,raw:r,globals:i,...n}={}){let s;if(t!=null&&e){s=Oc.parse(e,n);let a=Mc.parse(t,n);cs(a,t,i),ls(a,t),s.tag=a,s.raw=!!r}else s=fi.parse(e,n);return cs(s,e,i),ls(s,e),s}var fi=class Qs extends P{constructor(t,...r){super(Object.assign({ecmaVersion:13},t),...r)}enterScope(t){return t&qe&&++this.O_function,super.enterScope(t)}exitScope(){return this.currentScope().flags&qe&&--this.O_function,super.exitScope()}parseForIn(t,r){return this.O_function===1&&t.await&&(this.O_async=!0),super.parseForIn(t,r)}parseAwait(){return this.O_function===1&&(this.O_async=!0),super.parseAwait()}parseYield(t){return this.O_function===1&&(this.O_generator=!0),super.parseYield(t)}parseImport(t){return this.next(),t.specifiers=this.parseImportSpecifiers(),this.type===o._with&&(this.next(),t.injections=this.parseImportSpecifiers()),this.expectContextual("from"),t.source=this.type===o.string?this.parseExprAtom():this.unexpected(),this.finishNode(t,"ImportDeclaration")}parseImportSpecifiers(){let t=[],r=new Set,i=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;let n=this.startNode();n.view=this.eatContextual("viewof"),n.mutable=n.view?!1:this.eatContextual("mutable"),n.imported=this.parseIdent(),this.checkUnreserved(n.imported),this.checkLocal(n.imported),this.eatContextual("as")?(n.local=this.parseIdent(),this.checkUnreserved(n.local),this.checkLocal(n.local)):n.local=n.imported,this.checkLValSimple(n.local,"let"),r.has(n.local.name)&&this.raise(n.local.start,`Identifier '${n.local.name}' has already been declared`),r.add(n.local.name),t.push(this.finishNode(n,"ImportSpecifier"))}return t}parseExprAtom(t){return this.parseMaybeKeywordExpression("viewof","ViewExpression")||this.parseMaybeKeywordExpression("mutable","MutableExpression")||super.parseExprAtom(t)}startCell(){this.O_function=0,this.O_async=!1,this.O_generator=!1,this.strict=!0,this.enterScope(qe|Ys|Ks)}finishCell(t,r,i){return i&&this.checkLocal(i),t.id=i,t.body=r,t.async=this.O_async,t.generator=this.O_generator,this.exitScope(),this.finishNode(t,"Cell")}parseCell(t,r){let i=new Qs({},this.input,this.start),n=i.getToken(),s=null,a=null;return this.startCell(),n.type===o._import&&i.getToken().type!==o.parenL?s=this.parseImport(this.startNode()):n.type!==o.eof&&n.type!==o.semi&&(n.type===o.name&&((n.value==="viewof"||n.value==="mutable")&&(n=i.getToken(),n.type!==o.name&&i.unexpected()),n=i.getToken(),n.type===o.eq&&(a=this.parseMaybeKeywordExpression("viewof","ViewExpression")||this.parseMaybeKeywordExpression("mutable","MutableExpression")||this.parseIdent(),n=i.getToken(),this.expect(o.eq))),n.type===o.braceL?s=this.parseBlock():(s=this.parseExpression(),a===null&&(s.type==="FunctionExpression"||s.type==="ClassExpression")&&(a=s.id))),this.semicolon(),r&&this.expect(o.eof),this.finishCell(t,s,a)}parseTopLevel(t){return this.parseCell(t,!0)}toAssignable(t,r,i){return t.type==="MutableExpression"?t:super.toAssignable(t,r,i)}checkLocal(t){let r=t.id||t;(Gs.has(r.name)||r.name==="arguments")&&this.raise(r.start,`Identifier '${r.name}' is reserved`)}checkUnreserved(t){return(t.name==="viewof"||t.name==="mutable")&&this.raise(t.start,`Unexpected keyword '${t.name}'`),super.checkUnreserved(t)}checkLValSimple(t,r,i){return super.checkLValSimple(t.type==="MutableExpression"?t.id:t,r,i)}unexpected(t){this.raise(t??this.start,this.type===o.eof?"Unexpected end of input":"Unexpected token")}parseMaybeKeywordExpression(t,r){if(this.isContextual(t)){let i=this.startNode();return this.next(),i.id=this.parseIdent(),this.finishNode(i,r)}}},Rc=new $("`",!0,!0,e=>Vc.call(e)),Oc=class extends fi{constructor(...e){super(...e),this.type=o.backQuote,this.exprAllowed=!1}initialContext(){return[Rc]}parseCell(e){this.startCell(),this.type===o.eof&&(this.value="");let t=!0,r=this.startNode();r.expressions=[];let i=this.parseTemplateElement({isTagged:t});for(r.quasis=[i];this.type!==o.eof;)this.expect(o.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(o.braceR),r.quasis.push(i=this.parseTemplateElement({isTagged:t}));return i.tail=!0,this.next(),this.finishNode(r,"TemplateLiteral"),this.expect(o.eof),this.finishCell(e,r,null)}};function Vc(){e:for(;this.pos<this.input.length;this.pos++)switch(this.input.charCodeAt(this.pos)){case 92:{this.pos<this.input.length-1&&++this.pos;break}case 36:{if(this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&this.type===o.invalidTemplate)return this.pos+=2,this.finishToken(o.dollarBraceL);break e}break}}return this.finishToken(o.invalidTemplate,this.input.slice(this.start,this.pos))}var Mc=class extends P{constructor(e,...t){super(Object.assign({ecmaVersion:12},e),...t)}enterScope(e){return e&qe&&++this.O_function,super.enterScope(e)}exitScope(){return this.currentScope().flags&qe&&--this.O_function,super.exitScope()}parseForIn(e,t){return this.O_function===1&&e.await&&(this.O_async=!0),super.parseForIn(e,t)}parseAwait(){return this.O_function===1&&(this.O_async=!0),super.parseAwait()}parseYield(e){return this.O_function===1&&(this.O_generator=!0),super.parseYield(e)}parseTopLevel(e){return this.O_function=0,this.O_async=!1,this.O_generator=!1,this.strict=!0,this.enterScope(qe|Ys|Ks),e.body=this.parseExpression(),e.input=this.input,e.async=this.O_async,e.generator=this.O_generator,this.exitScope(),this.finishNode(e,"CellTag")}};function cs(e,t,r=Gs){if(!e.body)e.references=[];else if(e.body.type==="ImportDeclaration")e.references=e.body.injections?e.body.injections.map(i=>i.imported):[];else try{e.references=Bc(e,r)}catch(i){if(i.node){let n=Jt(t,i.node.start);i.message+=` (${n.line}:${n.column})`,i.pos=i.node.start,i.loc=n,delete i.node}throw i}return e}function ls(e,t){if(e.body&&e.body.type!=="ImportDeclaration")try{e.fileAttachments=Ut(e,"FileAttachment"),e.databaseClients=Ut(e,"DatabaseClient"),e.secrets=Ut(e,"Secret"),e.notificationClients=Ut(e,"NotificationClient")}catch(r){if(r.node){let i=Jt(t,r.node.start);r.message+=` (${i.line}:${i.column})`,r.pos=r.node.start,r.loc=i,delete r.node}throw r}else e.fileAttachments=new Map,e.databaseClients=new Map,e.secrets=new Map,e.notificationClients=new Map;return e}var Wd=Symbol("start"),zd=Symbol("modifier"),Hd=Symbol("function"),Gd=Symbol("name"),qc=class extends fi{parseTopLevel(e){for(e.cells||(e.cells=[]);this.type!==o.eof;){let t=this.parseCell(this.startNode());t.input=this.input,e.cells.push(t)}return this.next(),this.finishNode(e,"Program")}};function Js(e){return qc.parse(e,{ecmaVersion:"latest"}).cells.map(t=>({type:"Cell",text:e.substring(t.start,t.end),start:t.start,end:t.end}))}function Zs(e){return Lc(e)}var jc=lt,ut={functionType:Object.getPrototypeOf(function(){}).constructor,asyncFunctionType:Object.getPrototypeOf(async function(){}).constructor,generatorFunctionType:Object.getPrototypeOf(function*(){}).constructor,asyncGeneratorFunctionType:Object.getPrototypeOf(async function*(){}).constructor};function Uc(e=!1,t=!1){return!e&&!t?ut.functionType:e&&!t?ut.asyncFunctionType:!e&&t?ut.generatorFunctionType:ut.asyncGeneratorFunctionType}function di(e,t=!1,r=!1,i=!1,n){if(n!==void 0)return e.patches.sort((s,a)=>a.start-s.start),e.patches.forEach(s=>{n=n.substring(0,s.start)+s.newText+n.substring(s.end)}),new(Uc(t,r))(...e.args,i?n.substring(1,n.length-1).trim():`return (
28
28
  ${n}
29
- );`)}function jc(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}var Xs=e=>e[0]===".",tr=(e,t)=>Xs(e)?jc(t,e):e;async function Uc(e){return new ot.asyncFunctionType("url","return import(url)")(e)}function $c(e){return e.split("`").join("\\`")}function $t(e,t,r){let i,n;try{i=Zs(e)}catch(s){n=s}return{ojs:e,offset:t,inlineMD:r,cell:i,error:n}}function zc(e){let t=[],r=/(```(?:\s|\S)[\s\S]*?```)/g,i=0,n=r.exec(e);for(;n!==null;){n.index>i&&t.push($t(e.substring(i,n.index),i,!0));let s=n[0];if(s.indexOf("``` ")===0||s.indexOf("```\n")===0||s.indexOf("```\r\n")===0){let a=s.substring(3,s.length-3);t.push($t(a,n.index+3,!1))}else t.push($t(s,n.index,!0));i=n.index+n[0].length,n=r.exec(e)}return e.length>i&&t.push($t(e.substring(i,e.length),i,!0)),t}function rr(e){let t=Js(e);return{files:[],nodes:t.map((r,i)=>({id:i,mode:"js",value:r.text,start:r.start,end:r.end}))}}function Wc(e){let t=zc(e);return{files:[],nodes:t.map((r,i)=>({id:i,mode:r.inlineMD?"md":"js",value:r.ojs,start:r.offset,end:r.offset+r.ojs.length}))}}function mi(e,t="https://api.codetabs.com/v1/proxy/?quest=",r=""){let i=e.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)/img);if(!i||i.length===0)throw new Error(`Invalid URL: ${e}`);return fetch(e,{headers:{origin:i[0],referer:e}}).then(n=>{if(n.ok)return n;throw new Error("CORS?")}).catch(n=>(e=`${t}${e}${r}`,fetch(e,{headers:{origin:i[0],referer:e}})))}function Hc(e,t){if(e.references===void 0)return{inputs:[],args:[],patches:[]};let r={};e.references.forEach(s=>r[t.substring(s.start,s.end)]=!0);let i={inputs:Object.keys(r),args:Object.keys(r).map(s=>s.split(" ").join("_")),patches:[]},n=(s,a)=>i.patches.push({start:s.start-(e.body?.start??0),end:s.end-(e.body?.start??0),newText:a});return e.body&&zt(e.body,{Identifier(s){let a=t.substring(s.start,s.end);r[a]},MutableExpression(s){let a=t.substring(s.start,s.end).split(" ").join("_")+".value";n(s,a)},ViewExpression(s){let a=t.substring(s.start,s.end).split(" ").join("_");n(s,a)},ThisExpression(s,a){t.substring(s.start,s.end)==="this"&&!a.find(o=>o.type==="FunctionExpression")&&n(s,"((this === globalThis || this === globalThis.window)? undefined : this?.valueOf())")}},Mc),i}function Gc(e){return{type:"import",src:e.body.source.value,specifiers:e.body.specifiers?.map(t=>({view:t.view,name:t.imported.name,alias:t.local?.name&&t.imported.name!==t.local.name?t.local.name:t.imported.name}))??[],injections:e.body.injections?.map(t=>({name:t.imported.name,alias:t.local?.name??t.imported.name}))??[]}}function Yc(e,t,r,i){let n=t.id&&e.substring(t.id.start,t.id.end);return{type:"viewof",variable:{type:"variable",id:n,inputs:r.inputs,func:di(r,t.async,t.generator,t.body.type==="BlockStatement",i)},variableValue:{type:"variable",id:t?.id?.id?.name,inputs:["Generators",n],func:(s,a)=>s.input(a)}}}function Kc(e,t,r,i){let n=t.id&&e.substring(t.id.start,t.id.end),s=t?.id?.id?.name,a=`initial ${s}`;return{type:"mutable",initial:{type:"variable",id:a,inputs:r.inputs,func:di(r,t.async,t.generator,t.body.type==="BlockStatement",i)},variable:{type:"variable",id:n,inputs:["Mutable",a],func:(o,c)=>new o(c)},variableValue:{type:"variable",id:s,inputs:[n],func:o=>o.generator}}}function Qc(e,t,r,i){return{type:"variable",id:t.id&&e.substring(t.id?.start,t.id?.end),inputs:r.inputs,func:di(r,t.async,t.generator,t.body.type==="BlockStatement",i)}}function Jc(e,t){let r=Zs(e),i=r.body&&e.substring(r.body.start,r.body.end);switch(r.body?.type){case"ImportDeclaration":return Gc(r);case"ImportExpression":switch(r.body.source.type){case"Literal":i=`import("${tr(""+r.body.source.value,t)}")`;break;default:console.error("Unexpected import value")}}let n=Hc(r,e);switch(r.id?.type){case"ViewExpression":return Yc(e,r,n,i);case"MutableExpression":return Kc(e,r,n,i);default:return Qc(e,r,n,i)}}var Zc=class{_files=[];_imports=[];_functions=[];_defines=[];_defineUid=0;_functionUid=0;constructor(){}toString(){return`${this._imports.join(`
29
+ );`)}function $c(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}var Xs=e=>e[0]===".",tr=(e,t)=>Xs(e)?$c(t,e):e;async function Wc(e){return new ut.asyncFunctionType("url","return import(url)")(e)}function zc(e){return e.split("`").join("\\`")}function $t(e,t,r){let i,n;try{i=Zs(e)}catch(s){n=s}return{ojs:e,offset:t,inlineMD:r,cell:i,error:n}}function Hc(e){let t=[],r=/(```(?:\s|\S)[\s\S]*?```)/g,i=0,n=r.exec(e);for(;n!==null;){n.index>i&&t.push($t(e.substring(i,n.index),i,!0));let s=n[0];if(s.indexOf("``` ")===0||s.indexOf("```\n")===0||s.indexOf("```\r\n")===0){let a=s.substring(3,s.length-3);t.push($t(a,n.index+3,!1))}else t.push($t(s,n.index,!0));i=n.index+n[0].length,n=r.exec(e)}return e.length>i&&t.push($t(e.substring(i,e.length),i,!0)),t}function rr(e){let t=Js(e);return{files:[],nodes:t.map((r,i)=>({id:i,mode:"js",value:r.text,start:r.start,end:r.end}))}}function Gc(e){let t=Hc(e);return{files:[],nodes:t.map((r,i)=>({id:i,mode:r.inlineMD?"md":"js",value:r.ojs,start:r.offset,end:r.offset+r.ojs.length}))}}function mi(e,t="https://api.codetabs.com/v1/proxy/?quest=",r=""){let i=e.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)/img);if(!i||i.length===0)throw new Error(`Invalid URL: ${e}`);return fetch(e,{headers:{origin:i[0],referer:e}}).then(n=>{if(n.ok)return n;throw new Error("CORS?")}).catch(n=>(e=`${t}${e}${r}`,fetch(e,{headers:{origin:i[0],referer:e}})))}function Yc(e,t){if(e.references===void 0)return{inputs:[],args:[],patches:[]};let r={};e.references.forEach(s=>r[t.substring(s.start,s.end)]=!0);let i={inputs:Object.keys(r),args:Object.keys(r).map(s=>s.split(" ").join("_")),patches:[]},n=(s,a)=>i.patches.push({start:s.start-(e.body?.start??0),end:s.end-(e.body?.start??0),newText:a});return e.body&&Wt(e.body,{Identifier(s){let a=t.substring(s.start,s.end);r[a]},MutableExpression(s){let a=t.substring(s.start,s.end).split(" ").join("_")+".value";n(s,a)},ViewExpression(s){let a=t.substring(s.start,s.end).split(" ").join("_");n(s,a)},ThisExpression(s,a){t.substring(s.start,s.end)==="this"&&!a.find(u=>u.type==="FunctionExpression")&&n(s,"((this === globalThis || this === globalThis.window)? undefined : this?.valueOf())")}},jc),i}function Kc(e){return{type:"import",src:e.body.source.value,specifiers:e.body.specifiers?.map(t=>({view:t.view,name:t.imported.name,alias:t.local?.name&&t.imported.name!==t.local.name?t.local.name:t.imported.name}))??[],injections:e.body.injections?.map(t=>({name:t.imported.name,alias:t.local?.name??t.imported.name}))??[]}}function Qc(e,t,r,i){let n=t.id&&e.substring(t.id.start,t.id.end);return{type:"viewof",variable:{type:"variable",id:n,inputs:r.inputs,func:di(r,t.async,t.generator,t.body.type==="BlockStatement",i)},variableValue:{type:"variable",id:t?.id?.id?.name,inputs:["Generators",n],func:(s,a)=>s.input(a)}}}function Jc(e,t,r,i){let n=t.id&&e.substring(t.id.start,t.id.end),s=t?.id?.id?.name,a=`initial ${s}`;return{type:"mutable",initial:{type:"variable",id:a,inputs:r.inputs,func:di(r,t.async,t.generator,t.body.type==="BlockStatement",i)},variable:{type:"variable",id:n,inputs:["Mutable",a],func:(u,c)=>new u(c)},variableValue:{type:"variable",id:s,inputs:[n],func:u=>u.generator}}}function Zc(e,t,r,i){return{type:"variable",id:t.id&&e.substring(t.id?.start,t.id?.end),inputs:r.inputs,func:di(r,t.async,t.generator,t.body.type==="BlockStatement",i)}}function Xc(e,t){let r=Zs(e),i=r.body&&e.substring(r.body.start,r.body.end);switch(r.body?.type){case"ImportDeclaration":return Kc(r);case"ImportExpression":switch(r.body.source.type){case"Literal":i=`import("${tr(""+r.body.source.value,t)}")`;break;default:console.error("Unexpected import value")}}let n=Yc(r,e);switch(r.id?.type){case"ViewExpression":return Qc(e,r,n,i);case"MutableExpression":return Jc(e,r,n,i);default:return Zc(e,r,n,i)}}var el=class{_files=[];_imports=[];_functions=[];_defines=[];_defineUid=0;_functionUid=0;constructor(){}toString(){return`${this._imports.join(`
30
30
  `)}
31
31
 
32
32
  ${this._functions.join(`
@@ -48,12 +48,12 @@ export default function define(runtime, observer) {
48
48
 
49
49
  return main;
50
50
  }
51
- `}files(e){this._files=[...this._files,...e]}import(e){this._imports.push(`import define${++this._defineUid} from "${e}"; `)}importDefine(e){let t=e.injections??[],r=t.map(n=>n.name===n.alias?`"${n.name}"`:`{name: "${n.name}", alias: "${n.alias}"}`),i=t.length?`.derive([${r.join(", ")}], main)`:"";this._defines.push(`const child${this._defineUid} = runtime.module(define${this._defineUid})${i};`),(e.specifiers??[]).forEach(n=>{this._defines.push(`main.import("${n.name}"${n.alias&&n.alias!==n.name?`, "${n.alias}"`:""}, child${this._defineUid}); `)})}function(e){let t=e.id??`${++this._functionUid}`,r=t.split(" ");return t=`_${r[r.length-1]}`,this._functions.push(`${e.func?.toString()?.replace("anonymous",`${t}`)}`),t}define(e,t=!0,r=!1,i){i=i??e.id;let n=t?`.variable(observer(${e.id?JSON.stringify(e.id):""}))`:"",s=e.id?`${JSON.stringify(e.id)}, `:"",a=e.inputs??[],o=a.length?`[${a.map(l=>JSON.stringify(l)).join(", ")}], `:"",c=r?e.func?.toString():i;this._defines.push(`main${n}.define(${s}${o}${c});`)}error(e){}};async function Xc(e,t){let r=tr(e,t),i=await mi(r).then(a=>a.text()),n;e.endsWith(".ojsnb")?n=JSON.parse(i):e.endsWith(".ojs")?n=rr(i):e.endsWith(".omd")?n=Wc(i):(console.warn(`Unknown file type: ${e}, assuming .ojsnb`),n=JSON.parse(i));let s=ir(n,{baseUrl:t});return s.delete=()=>{},s.write=a=>{a.import(r)},s}async function el(e){let t=`https://api.observablehq.com/${e[0]==="@"?e:`d/${e}`}.js?v=3`,r={default:function(n,s){}};try{r=await Uc(t)}catch{}let i=r.default;return i.delete=()=>{},i.write=n=>{n.import(t)},i}async function tl(e){let t=`https://api.observablehq.com/document/${e}`,r=mi(t).then(n=>n.json()).catch(n=>{console.error(t),console.error(n)}),i=ir(await r);return i.delete=()=>{},i.write=n=>{n.import(t)},i}async function rl(e,t,r,{baseUrl:i,importMode:n}){let s=Xs(t.src)?await Xc(t.src,i??""):n==="recursive"?await tl(t.src):await el(t.src),a=[],o=[];t.specifiers.forEach(l=>{let h=l.view?"viewof ":"";a.push(ps(h+l.name,h+l.alias)),l.view&&a.push(ps(l.name,l.alias))});let c=(l,h,p)=>{let f=l.module(s);return t.injections.length&&(f=f.derive(t.injections,h)),o.forEach(x=>x(h,p)),a.forEach(x=>x(h,f)),f};return c.importVariables=a,c.variables=o,c.delete=()=>{a.forEach(l=>l.delete()),o.forEach(l=>l.delete()),s.delete()},c.write=l=>{s.write(l),l.importDefine(t)},c}function ke(e,t,r,i,n,s=!1){let a,o,c=(l,h)=>{if(t&&h&&(a=h(r,e.id)),o=l.variable(a),arguments.length>1)try{o.define(r,i,n)}catch(p){console.error(p?.message)}if(e.pinned){o=h?l.variable(h(r,e.id)):l.variable();try{o.define(void 0,["md"],p=>p`\`\`\`js
51
+ `}files(e){this._files=[...this._files,...e]}import(e){this._imports.push(`import define${++this._defineUid} from "${e}"; `)}importDefine(e){let t=e.injections??[],r=t.map(n=>n.name===n.alias?`"${n.name}"`:`{name: "${n.name}", alias: "${n.alias}"}`),i=t.length?`.derive([${r.join(", ")}], main)`:"";this._defines.push(`const child${this._defineUid} = runtime.module(define${this._defineUid})${i};`),(e.specifiers??[]).forEach(n=>{this._defines.push(`main.import("${n.name}"${n.alias&&n.alias!==n.name?`, "${n.alias}"`:""}, child${this._defineUid}); `)})}function(e){let t=e.id??`${++this._functionUid}`,r=t.split(" ");return t=`_${r[r.length-1]}`,this._functions.push(`${e.func?.toString()?.replace("anonymous",`${t}`)}`),t}define(e,t=!0,r=!1,i){i=i??e.id;let n=t?`.variable(observer(${e.id?JSON.stringify(e.id):""}))`:"",s=e.id?`${JSON.stringify(e.id)}, `:"",a=e.inputs??[],u=a.length?`[${a.map(l=>JSON.stringify(l)).join(", ")}], `:"",c=r?e.func?.toString():i;this._defines.push(`main${n}.define(${s}${u}${c});`)}error(e){}};async function tl(e,t){let r=tr(e,t),i=await mi(r).then(a=>a.text()),n;e.endsWith(".ojsnb")?n=JSON.parse(i):e.endsWith(".ojs")?n=rr(i):e.endsWith(".omd")?n=Gc(i):(console.warn(`Unknown file type: ${e}, assuming .ojsnb`),n=JSON.parse(i));let s=ir(n,{baseUrl:t});return s.delete=()=>{},s.write=a=>{a.import(r)},s}async function rl(e){let t=`https://api.observablehq.com/${e[0]==="@"?e:`d/${e}`}.js?v=3`,r={default:function(n,s){}};try{r=await Wc(t)}catch{}let i=r.default;return i.delete=()=>{},i.write=n=>{n.import(t)},i}async function il(e){let t=`https://api.observablehq.com/document/${e}`,r=mi(t).then(n=>n.json()).catch(n=>{console.error(t),console.error(n)}),i=ir(await r);return i.delete=()=>{},i.write=n=>{n.import(t)},i}async function nl(e,t,r,{baseUrl:i,importMode:n}){let s=Xs(t.src)?await tl(t.src,i??""):n==="recursive"?await il(t.src):await rl(t.src),a=[],u=[];t.specifiers.forEach(l=>{let h=l.view?"viewof ":"";a.push(ps(h+l.name,h+l.alias)),l.view&&a.push(ps(l.name,l.alias))});let c=(l,h,p)=>{let f=l.module(s);return t.injections.length&&(f=f.derive(t.injections,h)),u.forEach(x=>x(h,p)),a.forEach(x=>x(h,f)),f};return c.importVariables=a,c.variables=u,c.delete=()=>{a.forEach(l=>l.delete()),u.forEach(l=>l.delete()),s.delete()},c.write=l=>{s.write(l),l.importDefine(t)},c}function ke(e,t,r,i,n,s=!1){let a,u,c=(l,h)=>{if(t&&h&&(a=h(r,e.id)),u=l.variable(a),arguments.length>1)try{u.define(r,i,n)}catch(p){console.error(p?.message)}if(e.pinned){u=h?l.variable(h(r,e.id)):l.variable();try{u.define(void 0,["md"],p=>p`\`\`\`js
52
52
  ${e.value}
53
- \`\`\``)}catch(p){console.error(p?.message)}}return o};return c.delete=()=>{try{a?._node?.remove()}catch{}a=void 0;try{o?.delete()}catch{}o=void 0},c.write=l=>{if(s)l.define({id:r,inputs:i,func:n},t,!0);else{let h=l.function({id:r,func:n});l.define({id:r,inputs:i,func:n},t,!1,h)}},c}function ps(e,t){let r,i=(n,s)=>{r=n.variable(),t===void 0?r.import(e,s):r.import(e,t,s)};return i.delete=()=>{r?.delete()},i}async function ea(e,t){let r=[],i=[];try{let s=e.mode&&e.mode!=="js"?`${e.mode}\`${$c(e.value)}\``:e.value,a=Js(s);for(let o of a){let c=Jc(o.text,t.baseUrl??"");switch(c.type){case"import":r.push(await rl(e,c,o.text,t));break;case"viewof":i.push(ke(e,!0,c.variable.id,c.variable.inputs,c.variable.func)),i.push(ke(e,!1,c.variableValue.id,c.variableValue.inputs,c.variableValue.func,!0));break;case"mutable":i.push(ke(e,!1,c.initial.id,c.initial.inputs,c.initial.func)),i.push(ke(e,!1,c.variable.id,c.variable.inputs,c.variable.func)),i.push(ke(e,!0,c.variableValue.id,c.variableValue.inputs,c.variableValue.func,!0));break;case"variable":i.push(ke(e,!0,c.id,c.inputs,c.func));break}}}catch(s){i.push(ke(e,!0,void 0,[],s.message??"Unkown error"))}let n=(s,a,o)=>{r.forEach(c=>c(s,a,o)),i.forEach(c=>c(a,o))};return n.id=e.id,n.modules=r,n.variables=i,n.delete=()=>{i.forEach(s=>s.delete()),r.forEach(s=>s.delete())},n.write=s=>{r.forEach(a=>a.write(s)),i.forEach(a=>a.write(s))},n}function il(e,t){function r(){return globalThis.url??""}return[e.name,{url:new URL(tr(e.url,t.baseUrl??"")),mimeType:e.mime_type,toString:r}]}function nl(e=[],t=[],{baseUrl:r=".",importMode:i="precompiled"}={}){let n=e.map(c=>il(c,{baseUrl:r,importMode:i})),s=new Map(n),a=new Map(t.map(c=>[c.id,c])),o=(c,l)=>{let h=c.module();return h.builtin("FileAttachment",c.fileAttachments(p=>s.get(p)??{url:new URL(tr(p,r)),mimeType:null})),h.builtin("fetchEx",mi),a.forEach(p=>{p(c,h,l)}),h};return o.fileAttachments=s,o.cells=a,o.set=async c=>{let l=await ea(c,{baseUrl:r,importMode:i});return o.delete(l.id),a.set(l.id,l),l},o.get=c=>a.get(c),o.delete=c=>{let l=a.get(c);return l?(l.delete(),a.delete(c)):!1},o.clear=()=>{a.forEach(c=>c.delete()),a.clear()},o.write=c=>{c.files(e),a.forEach(l=>l.write(c))},o.toString=(c=new Zc)=>(o.write(c),c.toString().trim()),o}async function ir(e,{baseUrl:t=".",importMode:r="precompiled"}={}){let i=typeof e=="string"?rr(e):e,n=await Promise.all(i.nodes.map(s=>ea(s,{baseUrl:t,importMode:r})));return nl(i.files,n,{baseUrl:t,importMode:r})}var ta={type:"js",exec:!1,echo:void 0,hide:void 0};function ra(e){return e.exec===!0?e.echo===!0:e.echo!==!1}function ia(e){return e.exec===!0}function xi(e){return e.exec==!0&&e.hide!==!0}var na=0;function sl(e){return`fence-${++na}${e?`-${e}`:""}`}function al(e,t){let r=[];try{let i=rr(e);for(let n=0;n<i.nodes.length;++n){let s=sl(n+1),a=i.nodes[n].value;r.push({...t,id:s,content:a,innerHTML:`<span id="${s}" >
53
+ \`\`\``)}catch(p){console.error(p?.message)}}return u};return c.delete=()=>{try{a?._node?.remove()}catch{}a=void 0;try{u?.delete()}catch{}u=void 0},c.write=l=>{if(s)l.define({id:r,inputs:i,func:n},t,!0);else{let h=l.function({id:r,func:n});l.define({id:r,inputs:i,func:n},t,!1,h)}},c}function ps(e,t){let r,i=(n,s)=>{r=n.variable(),t===void 0?r.import(e,s):r.import(e,t,s)};return i.delete=()=>{r?.delete()},i}async function ea(e,t){let r=[],i=[];try{let s=e.mode&&e.mode!=="js"?`${e.mode}\`${zc(e.value)}\``:e.value,a=Js(s);for(let u of a){let c=Xc(u.text,t.baseUrl??"");switch(c.type){case"import":r.push(await nl(e,c,u.text,t));break;case"viewof":i.push(ke(e,!0,c.variable.id,c.variable.inputs,c.variable.func)),i.push(ke(e,!1,c.variableValue.id,c.variableValue.inputs,c.variableValue.func,!0));break;case"mutable":i.push(ke(e,!1,c.initial.id,c.initial.inputs,c.initial.func)),i.push(ke(e,!1,c.variable.id,c.variable.inputs,c.variable.func)),i.push(ke(e,!0,c.variableValue.id,c.variableValue.inputs,c.variableValue.func,!0));break;case"variable":i.push(ke(e,!0,c.id,c.inputs,c.func));break}}}catch(s){i.push(ke(e,!0,void 0,[],s.message??"Unkown error"))}let n=(s,a,u)=>{r.forEach(c=>c(s,a,u)),i.forEach(c=>c(a,u))};return n.id=e.id,n.modules=r,n.variables=i,n.delete=()=>{i.forEach(s=>s.delete()),r.forEach(s=>s.delete())},n.write=s=>{r.forEach(a=>a.write(s)),i.forEach(a=>a.write(s))},n}function sl(e,t){function r(){return globalThis.url??""}return[e.name,{url:new URL(tr(e.url,t.baseUrl??"")),mimeType:e.mime_type,toString:r}]}function al(e=[],t=[],{baseUrl:r=".",importMode:i="precompiled"}={}){let n=e.map(c=>sl(c,{baseUrl:r,importMode:i})),s=new Map(n),a=new Map(t.map(c=>[c.id,c])),u=(c,l)=>{let h=c.module();return h.builtin("FileAttachment",c.fileAttachments(p=>s.get(p)??{url:new URL(tr(p,r)),mimeType:null})),h.builtin("fetchEx",mi),a.forEach(p=>{p(c,h,l)}),h};return u.fileAttachments=s,u.cells=a,u.set=async c=>{let l=await ea(c,{baseUrl:r,importMode:i});return u.delete(l.id),a.set(l.id,l),l},u.get=c=>a.get(c),u.delete=c=>{let l=a.get(c);return l?(l.delete(),a.delete(c)):!1},u.clear=()=>{a.forEach(c=>c.delete()),a.clear()},u.write=c=>{c.files(e),a.forEach(l=>l.write(c))},u.toString=(c=new el)=>(u.write(c),c.toString().trim()),u}async function ir(e,{baseUrl:t=".",importMode:r="precompiled"}={}){let i=typeof e=="string"?rr(e):e,n=await Promise.all(i.nodes.map(s=>ea(s,{baseUrl:t,importMode:r})));return al(i.files,n,{baseUrl:t,importMode:r})}var ta={type:"js",exec:!1,echo:void 0,hide:void 0};function ra(e){return e.exec===!0?e.echo===!0:e.echo!==!1}function ia(e){return e.exec===!0}function xi(e){return e.exec==!0&&e.hide!==!0}var na=0;function ol(e){return`fence-${++na}${e?`-${e}`:""}`}function ul(e,t){let r=[];try{let i=rr(e);for(let n=0;n<i.nodes.length;++n){let s=ol(n+1),a=i.nodes[n].value;r.push({...t,id:s,content:a,innerHTML:`<span id="${s}" >
54
54
  ${xi(t)?"...":""}
55
55
  </span>`})}}catch(i){let n=`fence-${na}-error`;r.push({...t,id:n,content:JSON.stringify(i),innerHTML:`<span id="${n}" class="red">
56
56
  ${JSON.stringify(i)}
57
- </span>`})}return r}var re="ENV_OBSERVABLE";function nr(e,t,r){return r[re]||(r[re]=[]),al(e,t).reduce((i,n)=>(r[re].push({...n,innerHTML:void 0}),i+n.innerHTML),"")}var yi=class extends ge{constructor(r){super(r);this.placeholder=r}pending(){super.pending()}fulfilled(r,i){switch(typeof r){case"string":this.placeholder.innerText=r;break;default:super.fulfilled(r)}}rejected(r){super.rejected(r)}};async function sa(e){let t={},r={nodes:[],files:[]};for(let s of e)r.nodes.push({id:s.id,name:s.id,mode:"js",value:s.content}),t[s.id]=xi(s);let i=await ir(r),n=new qt(new Ve);n.module(i,()=>{i(n,(s,a)=>{let o=globalThis?.document?.getElementById(""+a);return o&&t[a]?new yi(o):{pending(){},fulfilled(c,l){},rejected(c,l){}}})})}function ol(e,t,r,i,n){return nr(e[t].content,{type:"js",exec:!0},i)}var gi=36,sr=123,aa=125;function*oa(e,t=0,r=e.length){if(e.charCodeAt(t)===gi&&e.charCodeAt(t+1)===sr){t+=2;let i=t,n=0,s=!1;for(;!s&&t<r;){switch(e.charCodeAt(t)){case sr:n++;break;case aa:n===0?(s=!0,--t):n--;break}t++}let a=t;if(t>=r||i==a||e.charCodeAt(t)!==aa)return;t++,yield{type:"placeholder",content:e.slice(i,a).trim(),pos:t}}}function*ul(e){let t=0,r=0,i=e.length;for(;t<i;)if(e.charCodeAt(t)===gi&&e.charCodeAt(t+1)===sr){yield{type:"html_block",content:e.slice(r,t)};for(let n of oa(e,t,i))yield n,t=n.pos,r=t}else t++;t>r&&(yield{type:"html_block",content:e.slice(r,t)})}var cl=(e,t)=>{if(t||e.pos+2>e.posMax)return!1;let r=e.src.charCodeAt(e.pos),i=e.src.charCodeAt(e.pos+1);if(r!==gi||i!==sr)return!1;for(let{type:n,content:s,pos:a}of oa(e.src,e.pos,e.posMax)){if(n!=="placeholder")break;let o=e.push(n,"",0);return o.content=s,e.pos=a,!0}return!1},ll=e=>{let{tokens:t}=e;for(let r=0,i=t.length;r<i;++r){let n=t[r];if(n.type==="html_block"){let s=[];for(let{type:a,content:o}of ul(n.content)){let c=new e.Token(a,"",0);c.content=o,s.push(c)}if(s.length===1&&s[0].type==="html_block")t[r].content=s[0].content;else{let a=new e.Token("inline","",0);a.children=s,t[r]=a}}}};function ua(e){e.inline.ruler.push("placeholder",cl),e.core.ruler.after("inline","placeholder",ll),e.renderer.rules.placeholder=(t,r,i,n,s)=>ol(t,r,i,n,s)}var pl=e=>e.split(/\s+/).reduce((t,r,i)=>{if(i===0)return t.type=r,t;let[n,s]=r.split("=");switch(n){case"exec":case"echo":case"hide":t[n]=s!=="false";break}return t},{...ta}),hl=(e,t,r,i,n)=>n.renderToken(e,t,r);function ca(e){let t=e.renderer.rules.fence||hl,r=(i,n,s,a,o)=>{let c=i[n],l=pl(c.info);l.type==="javascript"&&(l.type="js"),c.content+=`
58
- `;let h="";switch(l.type){case"js":if(ia(l)&&(a[re]||(a[re]=[]),h+=nr(c.content,l,a)),ra(l))return h+t(i,n,s,a,o);break;default:return h+t(i,n,s,a,o)}return h};e.renderer.rules.fence=r}function fl(e){let t=e.render;e.render=(r,i)=>{let n={...i},s=t.call(e,r,n);return sa(n[re]??[]),s}}function dl(e){let t=e.render;e.render=(r,i)=>{let n=i??{},s=t.call(e,r,n);if(i[re]?.length){let a=encodeURI(JSON.stringify(i[re]));s+=`<RenderComponent content="${a}" />`}return s}}function fm(e,t={}){ua(e),ca(e),t.vitePress?dl(e):fl(e)}export{fm as observable,sa as render};
57
+ </span>`})}return r}var re="ENV_OBSERVABLE";function nr(e,t,r){return r[re]||(r[re]=[]),ul(e,t).reduce((i,n)=>(r[re].push({...n,innerHTML:void 0}),i+n.innerHTML),"")}var yi=class extends ge{constructor(r){super(r);this.placeholder=r}pending(){super.pending()}fulfilled(r,i){switch(typeof r){case"string":this.placeholder.innerText=r;break;default:super.fulfilled(r)}}rejected(r){super.rejected(r)}};async function sa(e){let t={},r={nodes:[],files:[]};for(let s of e)r.nodes.push({id:s.id,name:s.id,mode:"js",value:s.content}),t[s.id]=xi(s);let i=await ir(r),n=new qt(new Ve);n.module(i,()=>{i(n,(s,a)=>{let u=globalThis?.document?.getElementById(""+a);return u&&t[a]?new yi(u):{pending(){},fulfilled(c,l){},rejected(c,l){}}})})}function cl(e,t,r,i,n){return nr(e[t].content,{type:"js",exec:!0},i)}var gi=36,sr=123,aa=125;function*oa(e,t=0,r=e.length){if(e.charCodeAt(t)===gi&&e.charCodeAt(t+1)===sr){t+=2;let i=t,n=0,s=!1;for(;!s&&t<r;){switch(e.charCodeAt(t)){case sr:n++;break;case aa:n===0?(s=!0,--t):n--;break}t++}let a=t;if(t>=r||i==a||e.charCodeAt(t)!==aa)return;t++,yield{type:"placeholder",content:e.slice(i,a).trim(),pos:t}}}function*ll(e){let t=0,r=0,i=e.length;for(;t<i;)if(e.charCodeAt(t)===gi&&e.charCodeAt(t+1)===sr){yield{type:"html_block",content:e.slice(r,t)};for(let n of oa(e,t,i))yield n,t=n.pos,r=t}else t++;t>r&&(yield{type:"html_block",content:e.slice(r,t)})}var pl=(e,t)=>{if(t||e.pos+2>e.posMax)return!1;let r=e.src.charCodeAt(e.pos),i=e.src.charCodeAt(e.pos+1);if(r!==gi||i!==sr)return!1;for(let{type:n,content:s,pos:a}of oa(e.src,e.pos,e.posMax)){if(n!=="placeholder")break;let u=e.push(n,"",0);return u.content=s,e.pos=a,!0}return!1},hl=e=>{let{tokens:t}=e;for(let r=0,i=t.length;r<i;++r){let n=t[r];if(n.type==="html_block"){let s=[];for(let{type:a,content:u}of ll(n.content)){let c=new e.Token(a,"",0);c.content=u,s.push(c)}if(s.length===1&&s[0].type==="html_block")t[r].content=s[0].content;else{let a=new e.Token("inline","",0);a.children=s,t[r]=a}}}};function ua(e){e.inline.ruler.push("placeholder",pl),e.core.ruler.after("inline","placeholder",hl),e.renderer.rules.placeholder=(t,r,i,n,s)=>cl(t,r,i,n,s)}var fl=e=>e.split(/\s+/).reduce((t,r,i)=>{if(i===0)return t.type=r,t;let[n,s]=r.split("=");switch(n){case"exec":case"echo":case"hide":t[n]=s!=="false";break}return t},{...ta}),dl=(e,t,r,i,n)=>n.renderToken(e,t,r);function ca(e){let t=e.renderer.rules.fence||dl,r=(i,n,s,a,u)=>{let c=i[n],l=fl(c.info);l.type==="javascript"&&(l.type="js"),c.content+=`
58
+ `;let h="";switch(l.type){case"js":if(ia(l)&&(a[re]||(a[re]=[]),h+=nr(c.content,l,a)),ra(l))return h+t(i,n,s,a,u);break;default:return h+t(i,n,s,a,u)}return h};e.renderer.rules.fence=r}function ml(e){let t=e.render;e.render=(r,i)=>{let n={...i},s=t.call(e,r,n);return sa(n[re]??[]),s}}function xl(e){let t=e.render;e.render=(r,i)=>{let n=i??{},s=t.call(e,r,n);if(i[re]?.length){let a=encodeURI(JSON.stringify(i[re]));s+=`<RenderComponent content="${a}" />`}return s}}function mm(e,t={}){ua(e),ca(e),t.vitePress?xl(e):ml(e)}export{mm as observable,sa as render};
59
59
  //# sourceMappingURL=index.js.map