From 4ed3ca412802d5586254335c85302012c0b75fa3 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Tue, 8 Nov 2022 19:50:27 +0100 Subject: [PATCH] use new transpiler in vite-vanilla-repl --- .../{index.66252a18.js => index.1207dd8c.js} | 2 +- .../{index.b66fb637.js => index.b12de8ae.js} | 2 +- .../{index.d9f8bbbd.js => index.f09cc89e.js} | 2 +- .../dist/assets/index.f17ed672.js | 64 +++++++++++++++++++ .../dist/assets/index.f88145a1.js | 56 ---------------- .../vite-vanilla-repl/dist/index.html | 2 +- .../core/examples/vite-vanilla-repl/main.js | 2 + .../examples/vite-vanilla-repl/package.json | 5 +- packages/transpiler/transpiler.mjs | 1 + 9 files changed, 74 insertions(+), 62 deletions(-) rename packages/core/examples/vite-vanilla-repl/dist/assets/{index.66252a18.js => index.1207dd8c.js} (99%) rename packages/core/examples/vite-vanilla-repl/dist/assets/{index.b66fb637.js => index.b12de8ae.js} (82%) rename packages/core/examples/vite-vanilla-repl/dist/assets/{index.d9f8bbbd.js => index.f09cc89e.js} (99%) create mode 100644 packages/core/examples/vite-vanilla-repl/dist/assets/index.f17ed672.js delete mode 100644 packages/core/examples/vite-vanilla-repl/dist/assets/index.f88145a1.js diff --git a/packages/core/examples/vite-vanilla-repl/dist/assets/index.66252a18.js b/packages/core/examples/vite-vanilla-repl/dist/assets/index.1207dd8c.js similarity index 99% rename from packages/core/examples/vite-vanilla-repl/dist/assets/index.66252a18.js rename to packages/core/examples/vite-vanilla-repl/dist/assets/index.1207dd8c.js index ddb8aac4..9bbfa21c 100644 --- a/packages/core/examples/vite-vanilla-repl/dist/assets/index.66252a18.js +++ b/packages/core/examples/vite-vanilla-repl/dist/assets/index.1207dd8c.js @@ -1 +1 @@ -import{P as _,m as Lt,k as Ut,n as Y,o as Xt,q as Kt,H as Qt,t as Yt}from"./index.f88145a1.js";const C=(n,t)=>Array(Math.abs(t)+1).join(n);function g(n,t,e){return function(...o){return console.warn(`${n} is deprecated. Use ${t}.`),e.apply(this,o)}}function z(n){return n!==null&&typeof n=="object"&&typeof n.name=="string"}function q(n){return n!==null&&typeof n=="object"&&typeof n.step=="number"&&typeof n.alt=="number"}const Qn=[0,2,4,-1,1,3,5],Yn=Qn.map(n=>Math.floor(n*7/12));function en(n){const{step:t,alt:e,oct:o,dir:r=1}=n,i=Qn[t]+7*e;if(o===void 0)return[r*i];const a=o-Yn[t]-4*e;return[r*i,r*a]}const Zt=[3,0,4,1,5,2,6];function on(n){const[t,e,o]=n,r=Zt[Jt(t)],i=Math.floor((t+1)/7);if(e===void 0)return{step:r,alt:i,dir:o};const a=e+4*i+Yn[r];return{step:r,alt:i,oct:a,dir:o}}function Jt(n){const t=(n+1)%7;return t<0?7+t:t}const Zn={empty:!0,name:"",pc:"",acc:""},Dn=new Map,vn=n=>"CDEFGAB".charAt(n),E=n=>n<0?C("b",-n):C("#",n),G=n=>n[0]==="b"?-n.length:n.length;function m(n){const t=Dn.get(n);if(t)return t;const e=typeof n=="string"?te(n):q(n)?m(ee(n)):z(n)?m(n.name):Zn;return Dn.set(n,e),e}const Wt=/^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)$/;function rn(n){const t=Wt.exec(n);return[t[1].toUpperCase(),t[2].replace(/x/g,"##"),t[3],t[4]]}function F(n){return m(on(n))}const ne=(n,t)=>(n%t+t)%t,pn=[0,2,4,5,7,9,11];function te(n){const t=rn(n);if(t[0]===""||t[3]!=="")return Zn;const e=t[0],o=t[1],r=t[2],i=(e.charCodeAt(0)+3)%7,a=G(o),s=r.length?+r:void 0,c=en({step:i,alt:a,oct:s}),l=e+o+r,u=e+o,d=(pn[i]+a+120)%12,M=s===void 0?ne(pn[i]+a,12)-12*99:pn[i]+a+12*(s+1),h=M>=0&&M<=127?M:null,A=s===void 0?null:Math.pow(2,(M-69)/12)*440;return{empty:!1,acc:o,alt:a,chroma:d,coord:c,freq:A,height:M,letter:e,midi:h,name:l,oct:s,pc:u,step:i}}function ee(n){const{step:t,alt:e,oct:o}=n,r=vn(t);if(!r)return"";const i=r+E(e);return o||o===0?i+o:i}const yn={empty:!0,name:"",acc:""},oe="([-+]?\\d+)(d{1,4}|m|M|P|A{1,4})",re="(AA|A|P|M|m|d|dd)([-+]?\\d+)",ie=new RegExp("^"+oe+"|"+re+"$");function $n(n){const t=ie.exec(`${n}`);return t===null?["",""]:t[1]?[t[1],t[2]]:[t[4],t[3]]}const kn={};function f(n){return typeof n=="string"?kn[n]||(kn[n]=ae(n)):q(n)?f(ce(n)):z(n)?f(n.name):yn}const Rn=[0,2,4,5,7,9,11],Jn="PMMPPMM";function ae(n){const t=$n(n);if(t[0]==="")return yn;const e=+t[0],o=t[1],r=(Math.abs(e)-1)%7,i=Jn[r];if(i==="M"&&o==="P")return yn;const a=i==="M"?"majorable":"perfectable",s=""+e+o,c=e<0?-1:1,l=e===8||e===-8?e:c*(r+1),u=se(a,o),d=Math.floor((Math.abs(e)-1)/7),M=c*(Rn[r]+u+12*d),h=(c*(Rn[r]+u)%12+12)%12,A=en({step:r,alt:u,oct:d,dir:c});return{empty:!1,name:s,num:e,q:o,step:r,alt:u,dir:c,type:a,simple:l,semitones:M,chroma:h,coord:A,oct:d}}function B(n,t){const[e,o=0]=n,r=e*7+o*12<0,i=t||r?[-e,-o,-1]:[e,o,1];return f(on(i))}function se(n,t){return t==="M"&&n==="majorable"||t==="P"&&n==="perfectable"?0:t==="m"&&n==="majorable"?-1:/^A+$/.test(t)?t.length:/^d+$/.test(t)?-1*(n==="perfectable"?t.length:t.length+1):0}function ce(n){const{step:t,alt:e,oct:o=0,dir:r}=n;if(!r)return"";const i=t+1+7*o,a=i===0?t+1:i,s=r<0?"-":"",c=Jn[t]==="M"?"majorable":"perfectable";return s+a+me(c,e)}function me(n,t){return t===0?n==="majorable"?"M":"P":t===-1&&n==="majorable"?"m":t>0?C("A",t):C("d",n==="perfectable"?t:t+1)}function P(n,t){const e=m(n),o=f(t);if(e.empty||o.empty)return"";const r=e.coord,i=o.coord,a=r.length===1?[r[0]+i[0]]:[r[0]+i[0],r[1]+i[1]];return F(a).name}function D(n,t){const e=m(n),o=m(t);if(e.empty||o.empty)return"";const r=e.coord,i=o.coord,a=i[0]-r[0],s=r.length===2&&i.length===2?i[1]-r[1]:-Math.floor(a*7/12),c=o.height===e.height&&o.midi!==null&&e.midi!==null&&e.step>o.step;return B([a,s],c).name}const Wn=Object.freeze(Object.defineProperty({__proto__:null,accToAlt:G,altToAcc:E,coordToInterval:B,coordToNote:F,decode:on,deprecate:g,distance:D,encode:en,fillStr:C,interval:f,isNamed:z,isPitch:q,note:m,stepToLetter:vn,tokenizeInterval:$n,tokenizeNote:rn,transpose:P},Symbol.toStringTag,{value:"Module"})),On=(n,t)=>Array(t+1).join(n),ue=/^(_{1,}|=|\^{1,}|)([abcdefgABCDEFG])([,']*)$/;function nt(n){const t=ue.exec(n);return t?[t[1],t[2],t[3]]:["","",""]}function W(n){const[t,e,o]=nt(n);if(e==="")return"";let r=4;for(let a=0;a96?e.toUpperCase()+i+(r+1):e+i+r}function tt(n){const t=m(n);if(t.empty||!t.oct&&t.oct!==0)return"";const{letter:e,acc:o,oct:r}=t,i=o[0]==="b"?o.replace(/b/g,"_"):o.replace(/#/g,"^"),a=r>4?e.toLowerCase():e,s=r===5?"":r>4?On("'",r-5):On(",",4-r);return i+a+s}function le(n,t){return tt(P(W(n),t))}function de(n,t){return D(W(n),W(t))}var Me={abcToScientificNotation:W,scientificToAbcNotation:tt,tokenize:nt,transpose:le,distance:de};function fe(n,t){const e=[];for(;t--;e[t]=t+n);return e}function Pe(n,t){const e=[];for(;t--;e[t]=n-t);return e}function pe(n,t){return nt===0||t)}function et(n){return n.map(e=>m(e)).filter(e=>!e.empty).sort((e,o)=>e.height-o.height).map(e=>e.name)}function ge(n){return et(n).filter((t,e,o)=>e===0||t!==o[e-1])}function be(n,t=Math.random){let e,o,r=n.length;for(;r;)e=Math.floor(t()*r--),o=n[r],n[r]=n[e],n[e]=o;return n}function ot(n){return n.length===0?[[]]:ot(n.slice(1)).reduce((t,e)=>t.concat(n.map((o,r)=>{const i=e.slice();return i.splice(r,0,n[0]),i})),[])}const Ae=Object.freeze(Object.defineProperty({__proto__:null,compact:ye,permutations:ot,range:pe,rotate:he,shuffle:be,sortedNoteNames:et,sortedUniqNoteNames:ge},Symbol.toStringTag,{value:"Module"}));function ve(n,t){const e=[];for(;t--;e[t]=t+n);return e}function $e(n,t){const e=[];for(;t--;e[t]=n-t);return e}function an(n,t){return nt===0||t)}function Ne(n,t=Math.random){let e,o,r=n.length;for(;r;)e=Math.floor(t()*r--),o=n[r],n[r]=n[e],n[e]=o;return n}function rt(n){return n.length===0?[[]]:rt(n.slice(1)).reduce((t,e)=>t.concat(n.map((o,r)=>{const i=e.slice();return i.splice(r,0,n[0]),i})),[])}var Ie={compact:Nn,permutations:rt,range:an,rotate:H,shuffle:Ne};const T={empty:!0,name:"",setNum:0,chroma:"000000000000",normalized:"000000000000",intervals:[]},In=n=>Number(n).toString(2),Fn=n=>parseInt(n,2),je=/^[01]{12}$/;function it(n){return je.test(n)}const Se=n=>typeof n=="number"&&n>=0&&n<=4095,Te=n=>n&&it(n.chroma),zn={[T.chroma]:T};function p(n){const t=it(n)?n:Se(n)?In(n):Array.isArray(n)?ze(n):Te(n)?n.chroma:T.chroma;return zn[t]=zn[t]||Fe(t)}const Ve=g("Pcset.pcset","Pcset.get",p),_e=n=>p(n).chroma,Ce=n=>p(n).intervals,we=n=>p(n).setNum,xe=["1P","2m","2M","3m","3M","4P","5d","5P","6m","6M","7m","7M"];function Ee(n){const t=[];for(let e=0;e<12;e++)n.charAt(e)==="1"&&t.push(xe[e]);return t}function De(){return an(2048,4095).map(In)}function jn(n,t=!0){const o=p(n).chroma.split("");return Nn(o.map((r,i)=>{const a=H(i,o);return t&&a[0]==="0"?null:a.join("")}))}function ke(n,t){return p(n).setNum===p(t).setNum}function sn(n){const t=p(n).setNum;return e=>{const o=p(e).setNum;return t&&t!==o&&(o&t)===o}}function cn(n){const t=p(n).setNum;return e=>{const o=p(e).setNum;return t&&t!==o&&(o|t)===o}}function at(n){const t=p(n);return e=>{const o=m(e);return t&&!o.empty&&t.chroma.charAt(o.chroma)==="1"}}function Re(n){const t=at(n);return e=>e.filter(t)}var st={get:p,chroma:_e,num:we,intervals:Ce,chromas:De,isSupersetOf:cn,isSubsetOf:sn,isNoteIncludedIn:at,isEqual:ke,filter:Re,modes:jn,pcset:Ve};function Oe(n){const t=n.split("");return t.map((e,o)=>H(o,t).join(""))}function Fe(n){const t=Fn(n),e=Oe(n).map(Fn).filter(i=>i>=2048).sort()[0],o=In(e),r=Ee(n);return{empty:!1,name:"",setNum:t,chroma:n,normalized:o,intervals:r}}function ze(n){if(n.length===0)return T.chroma;let t;const e=[0,0,0,0,0,0,0,0,0,0,0,0];for(let o=0;on.name).filter(n=>n)}function Le(){return k.map(n=>n.aliases[0]).filter(n=>n)}function Ue(){return Object.keys(j)}function R(){return k.slice()}const Xe=g("ChordType.entries","ChordType.all",R);function Ke(){k=[],j={}}function ct(n,t,e){const o=Ye(n),r={...p(n),name:e||"",quality:o,intervals:n,aliases:t};k.push(r),r.name&&(j[r.name]=r),j[r.setNum]=r,j[r.chroma]=r,r.aliases.forEach(i=>Qe(r,i))}function Qe(n,t){j[t]=n}function Ye(n){const t=e=>n.indexOf(e)!==-1;return t("5A")?"Augmented":t("3M")?"Major":t("5d")?"Diminished":t("3m")?"Minor":"Unknown"}qe.forEach(([n,t,e])=>ct(n.split(" "),e.split(" "),t));k.sort((n,t)=>n.setNum-t.setNum);var mt={names:He,symbols:Le,get:Sn,all:R,add:ct,removeAll:Ke,keys:Ue,entries:Xe,chordType:Be};const Ze=n=>{const t=n.reduce((e,o)=>{const r=m(o).chroma;return r!==void 0&&(e[r]=e[r]||m(o).name),e},{});return e=>t[e]};function Je(n){const t=n.map(o=>m(o).pc).filter(o=>o);return m.length===0?[]:We(t,1).filter(o=>o.weight).sort((o,r)=>r.weight-o.weight).map(o=>o.name)}function We(n,t){const e=n[0],o=m(e).chroma,r=Ze(n),i=jn(n,!1),a=[];return i.forEach((s,c)=>{R().filter(u=>u.chroma===s).forEach(u=>{const d=u.aliases[0],M=r(c);c!==o?a.push({weight:.5*t,name:`${M}${d}/${e}`}):a.push({weight:1*t,name:`${M}${d}`})})}),a}const no=[["1P 2M 3M 5P 6M","major pentatonic","pentatonic"],["1P 3M 4P 5P 7M","ionian pentatonic"],["1P 3M 4P 5P 7m","mixolydian pentatonic","indian"],["1P 2M 4P 5P 6M","ritusen"],["1P 2M 4P 5P 7m","egyptian"],["1P 3M 4P 5d 7m","neopolitan major pentatonic"],["1P 3m 4P 5P 6m","vietnamese 1"],["1P 2m 3m 5P 6m","pelog"],["1P 2m 4P 5P 6m","kumoijoshi"],["1P 2M 3m 5P 6m","hirajoshi"],["1P 2m 4P 5d 7m","iwato"],["1P 2m 4P 5P 7m","in-sen"],["1P 3M 4A 5P 7M","lydian pentatonic","chinese"],["1P 3m 4P 6m 7m","malkos raga"],["1P 3m 4P 5d 7m","locrian pentatonic","minor seven flat five pentatonic"],["1P 3m 4P 5P 7m","minor pentatonic","vietnamese 2"],["1P 3m 4P 5P 6M","minor six pentatonic"],["1P 2M 3m 5P 6M","flat three pentatonic","kumoi"],["1P 2M 3M 5P 6m","flat six pentatonic"],["1P 2m 3M 5P 6M","scriabin"],["1P 3M 5d 6m 7m","whole tone pentatonic"],["1P 3M 4A 5A 7M","lydian #5P pentatonic"],["1P 3M 4A 5P 7m","lydian dominant pentatonic"],["1P 3m 4P 5P 7M","minor #7M pentatonic"],["1P 3m 4d 5d 7m","super locrian pentatonic"],["1P 2M 3m 4P 5P 7M","minor hexatonic"],["1P 2A 3M 5P 5A 7M","augmented"],["1P 2M 3m 3M 5P 6M","major blues"],["1P 2M 4P 5P 6M 7m","piongio"],["1P 2m 3M 4A 6M 7m","prometheus neopolitan"],["1P 2M 3M 4A 6M 7m","prometheus"],["1P 2m 3M 5d 6m 7m","mystery #1"],["1P 2m 3M 4P 5A 6M","six tone symmetric"],["1P 2M 3M 4A 5A 7m","whole tone","messiaen's mode #1"],["1P 2m 4P 4A 5P 7M","messiaen's mode #5"],["1P 3m 4P 5d 5P 7m","minor blues","blues"],["1P 2M 3M 4P 5d 6m 7m","locrian major","arabian"],["1P 2m 3M 4A 5P 6m 7M","double harmonic lydian"],["1P 2M 3m 4P 5P 6m 7M","harmonic minor"],["1P 2m 2A 3M 4A 6m 7m","altered","super locrian","diminished whole tone","pomeroy"],["1P 2M 3m 4P 5d 6m 7m","locrian #2","half-diminished","aeolian b5"],["1P 2M 3M 4P 5P 6m 7m","mixolydian b6","melodic minor fifth mode","hindu"],["1P 2M 3M 4A 5P 6M 7m","lydian dominant","lydian b7","overtone"],["1P 2M 3M 4A 5P 6M 7M","lydian"],["1P 2M 3M 4A 5A 6M 7M","lydian augmented"],["1P 2m 3m 4P 5P 6M 7m","dorian b2","phrygian #6","melodic minor second mode"],["1P 2M 3m 4P 5P 6M 7M","melodic minor"],["1P 2m 3m 4P 5d 6m 7m","locrian"],["1P 2m 3m 4d 5d 6m 7d","ultralocrian","superlocrian bb7","superlocrian diminished"],["1P 2m 3m 4P 5d 6M 7m","locrian 6","locrian natural 6","locrian sharp 6"],["1P 2A 3M 4P 5P 5A 7M","augmented heptatonic"],["1P 2M 3m 4A 5P 6M 7m","dorian #4","ukrainian dorian","romanian minor","altered dorian"],["1P 2M 3m 4A 5P 6M 7M","lydian diminished"],["1P 2m 3m 4P 5P 6m 7m","phrygian"],["1P 2M 3M 4A 5A 7m 7M","leading whole tone"],["1P 2M 3M 4A 5P 6m 7m","lydian minor"],["1P 2m 3M 4P 5P 6m 7m","phrygian dominant","spanish","phrygian major"],["1P 2m 3m 4P 5P 6m 7M","balinese"],["1P 2m 3m 4P 5P 6M 7M","neopolitan major"],["1P 2M 3m 4P 5P 6m 7m","aeolian","minor"],["1P 2M 3M 4P 5P 6m 7M","harmonic major"],["1P 2m 3M 4P 5P 6m 7M","double harmonic major","gypsy"],["1P 2M 3m 4P 5P 6M 7m","dorian"],["1P 2M 3m 4A 5P 6m 7M","hungarian minor"],["1P 2A 3M 4A 5P 6M 7m","hungarian major"],["1P 2m 3M 4P 5d 6M 7m","oriental"],["1P 2m 3m 3M 4A 5P 7m","flamenco"],["1P 2m 3m 4A 5P 6m 7M","todi raga"],["1P 2M 3M 4P 5P 6M 7m","mixolydian","dominant"],["1P 2m 3M 4P 5d 6m 7M","persian"],["1P 2M 3M 4P 5P 6M 7M","major","ionian"],["1P 2m 3M 5d 6m 7m 7M","enigmatic"],["1P 2M 3M 4P 5A 6M 7M","major augmented","major #5","ionian augmented","ionian #5"],["1P 2A 3M 4A 5P 6M 7M","lydian #9"],["1P 2m 2M 4P 4A 5P 6m 7M","messiaen's mode #4"],["1P 2m 3M 4P 4A 5P 6m 7M","purvi raga"],["1P 2m 3m 3M 4P 5P 6m 7m","spanish heptatonic"],["1P 2M 3M 4P 5P 6M 7m 7M","bebop"],["1P 2M 3m 3M 4P 5P 6M 7m","bebop minor"],["1P 2M 3M 4P 5P 5A 6M 7M","bebop major"],["1P 2m 3m 4P 5d 5P 6m 7m","bebop locrian"],["1P 2M 3m 4P 5P 6m 7m 7M","minor bebop"],["1P 2M 3m 4P 5d 6m 6M 7M","diminished","whole-half diminished"],["1P 2M 3M 4P 5d 5P 6M 7M","ichikosucho"],["1P 2M 3m 4P 5P 6m 6M 7M","minor six diminished"],["1P 2m 3m 3M 4A 5P 6M 7m","half-whole diminished","dominant diminished","messiaen's mode #2"],["1P 3m 3M 4P 5P 6M 7m 7M","kafi raga"],["1P 2M 3M 4P 4A 5A 6A 7M","messiaen's mode #6"],["1P 2M 3m 3M 4P 5d 5P 6M 7m","composite blues"],["1P 2M 3m 3M 4A 5P 6m 7m 7M","messiaen's mode #3"],["1P 2m 2M 3m 4P 4A 5P 6m 6M 7M","messiaen's mode #7"],["1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M","chromatic"]],to={...T,intervals:[],aliases:[]};let mn=[],S={};function ut(){return mn.map(n=>n.name)}function un(n){return S[n]||to}const eo=g("ScaleDictionary.scaleType","ScaleType.get",un);function L(){return mn.slice()}const oo=g("ScaleDictionary.entries","ScaleType.all",L);function ro(){return Object.keys(S)}function io(){mn=[],S={}}function lt(n,t,e=[]){const o={...p(n),name:t,intervals:n,aliases:e};return mn.push(o),S[o.name]=o,S[o.setNum]=o,S[o.chroma]=o,o.aliases.forEach(r=>ao(o,r)),o}function ao(n,t){S[t]=n}no.forEach(([n,t,...e])=>lt(n.split(" "),t,e));var dt={names:ut,get:un,all:L,add:lt,removeAll:io,keys:ro,entries:oo,scaleType:eo};const gn={empty:!0,name:"",symbol:"",root:"",rootDegree:0,type:"",tonic:null,setNum:NaN,quality:"Unknown",chroma:"",normalized:"",aliases:[],notes:[],intervals:[]},so=/^(6|64|7|9|11|13)$/;function ln(n){const[t,e,o,r]=rn(n);return t===""?["",n]:t==="A"&&r==="ug"?["","aug"]:!r&&(o==="4"||o==="5")?[t+e,o]:so.test(o)?[t+e,o+r]:[t+e+o,r]}function U(n){if(n==="")return gn;if(Array.isArray(n)&&n.length===2)return Z(n[1],n[0]);{const[t,e]=ln(n),o=Z(e,t);return o.empty?Z(n):o}}function Z(n,t,e){const o=Sn(n),r=m(t||""),i=m(e||"");if(o.empty||t&&r.empty||e&&i.empty)return gn;const a=D(r.pc,i.pc),s=o.intervals.indexOf(a)+1;if(!i.empty&&!s)return gn;const c=Array.from(o.intervals);for(let M=1;MP(r,M));n=o.aliases.indexOf(n)!==-1?n:o.aliases[0];const u=`${r.empty?"":r.pc}${n}${i.empty||s<=1?"":"/"+i.pc}`,d=`${t?r.pc+" ":""}${o.name}${s>1&&e?" over "+i.pc:""}`;return{...o,name:d,symbol:u,type:o.name,root:i.name,intervals:c,rootDegree:s,tonic:r.name,notes:l}}const co=g("Chord.chord","Chord.get",U);function mo(n,t){const[e,o]=ln(n);return e?P(e,t)+o:n}function uo(n){const t=U(n),e=cn(t.chroma);return L().filter(o=>e(o.chroma)).map(o=>o.name)}function lo(n){const t=U(n),e=cn(t.chroma);return R().filter(o=>e(o.chroma)).map(o=>t.tonic+o.aliases[0])}function Mo(n){const t=U(n),e=sn(t.chroma);return R().filter(o=>e(o.chroma)).map(o=>t.tonic+o.aliases[0])}var fo={getChord:Z,get:U,detect:Je,chordScales:uo,extended:lo,reduced:Mo,tokenize:ln,transpose:mo,chord:co};const Po=[[.125,"dl",["large","duplex longa","maxima","octuple","octuple whole"]],[.25,"l",["long","longa"]],[.5,"d",["double whole","double","breve"]],[1,"w",["whole","semibreve"]],[2,"h",["half","minim"]],[4,"q",["quarter","crotchet"]],[8,"e",["eighth","quaver"]],[16,"s",["sixteenth","semiquaver"]],[32,"t",["thirty-second","demisemiquaver"]],[64,"sf",["sixty-fourth","hemidemisemiquaver"]],[128,"h",["hundred twenty-eighth"]],[256,"th",["two hundred fifty-sixth"]]],dn=[];Po.forEach(([n,t,e])=>$o(n,t,e));const po={empty:!0,name:"",value:0,fraction:[0,0],shorthand:"",dots:"",names:[]};function ho(){return dn.reduce((n,t)=>(t.names.forEach(e=>n.push(e)),n),[])}function yo(){return dn.map(n=>n.shorthand)}const go=/^([^.]+)(\.*)$/;function Tn(n){const[t,e,o]=go.exec(n)||[],r=dn.find(s=>s.shorthand===e||s.names.includes(e));if(!r)return po;const i=No(r.fraction,o.length),a=i[0]/i[1];return{...r,name:n,dots:o,value:a,fraction:i}}const bo=n=>Tn(n).value,Ao=n=>Tn(n).fraction;var vo={names:ho,shorthands:yo,get:Tn,value:bo,fraction:Ao};function $o(n,t,e){dn.push({empty:!1,dots:"",name:"",value:1/n,fraction:n<1?[1/n,1]:[1,n],shorthand:t,names:e})}function No(n,t){const e=Math.pow(2,t);let o=n[0]*e,r=n[1]*e;const i=o;for(let a=0;af(n).name,So=n=>f(n).semitones,To=n=>f(n).q,Vo=n=>f(n).num;function ft(n){const t=f(n);return t.empty?"":t.simple+t.q}function _o(n){const t=f(n);if(t.empty)return"";const e=(7-t.step)%7,o=t.type==="perfectable"?-t.alt:-(t.alt+1);return f({step:e,alt:o,oct:t.oct,dir:t.dir}).name}const Co=[1,2,2,3,3,4,5,5,6,6,7,7],wo="P m M m M P d P m M m M".split(" ");function xo(n){const t=n<0?-1:1,e=Math.abs(n),o=e%12,r=Math.floor(e/12);return t*(Co[o]+7*r)+wo[o]}const Eo=D,Pt=ht((n,t)=>[n[0]+t[0],n[1]+t[1]]),Do=n=>t=>Pt(n,t),ko=ht((n,t)=>[n[0]-t[0],n[1]-t[1]]);function pt(n,t){const e=Mt(n);if(e.empty)return"";const[o,r,i]=e.coord;return B([o+t,r,i]).name}var bn={names:Io,get:Mt,name:jo,num:Vo,semitones:So,quality:To,fromSemitones:xo,distance:Eo,invert:_o,simplify:ft,add:Pt,addTo:Do,substract:ko,transposeFifths:pt};function ht(n){return(t,e)=>{const o=f(t).coord,r=f(e).coord;if(o&&r){const i=n(o,r);return B(i).name}}}function yt(n){return+n>=0&&+n<=127}function gt(n){if(yt(n))return+n;const t=m(n);return t.empty?null:t.midi}function Ro(n,t=440){return Math.pow(2,(n-69)/12)*t}const Oo=Math.log(2),Fo=Math.log(440);function Vn(n){const t=12*(Math.log(n)-Fo)/Oo+69;return Math.round(t*100)/100}const zo="C C# D D# E F F# G G# A A# B".split(" "),qo="C Db D Eb E F Gb G Ab A Bb B".split(" ");function I(n,t={}){if(isNaN(n)||n===-1/0||n===1/0)return"";n=Math.round(n);const o=(t.sharps===!0?zo:qo)[n%12];if(t.pitchClass)return o;const r=Math.floor(n/12)-1;return o+r}var Go={isMidi:yt,toMidi:gt,midiToFreq:Ro,midiToNoteName:I,freqToMidi:Vn};const Bo=["C","D","E","F","G","A","B"],bt=n=>n.name,At=n=>n.map(m).filter(t=>!t.empty);function Ho(n){return n===void 0?Bo.slice():Array.isArray(n)?At(n).map(bt):[]}const y=m,Lo=n=>y(n).name,Uo=n=>y(n).pc,Xo=n=>y(n).acc,Ko=n=>y(n).oct,Qo=n=>y(n).midi,Yo=n=>y(n).freq,Zo=n=>y(n).chroma;function vt(n){return I(n)}function Jo(n){return I(Vn(n))}function Wo(n){return I(Vn(n),{sharps:!0})}function nr(n){return I(n,{sharps:!0})}const _n=P,tr=P,$t=n=>t=>_n(t,n),er=$t,Nt=n=>t=>_n(n,t),or=Nt;function nn(n,t){const e=y(n);if(e.empty)return"";const[o,r]=e.coord;return F(r===void 0?[o+t]:[o+t,r]).name}const rr=nn,Cn=(n,t)=>n.height-t.height,ir=(n,t)=>t.height-n.height;function It(n,t){return t=t||Cn,At(n).sort(t).map(bt)}function jt(n){return It(n,Cn).filter((t,e,o)=>e===0||t!==o[e-1])}const ar=n=>{const t=y(n);return t.empty?"":I(t.midi||t.chroma,{sharps:t.alt>0,pitchClass:t.midi===null})};function St(n,t){const e=y(n);if(e.empty)return"";const o=y(t||I(e.midi||e.chroma,{sharps:e.alt<0,pitchClass:!0}));if(o.empty||o.chroma!==e.chroma)return"";if(e.oct===void 0)return o.pc;const r=e.chroma-e.alt,i=o.chroma-o.alt,a=r>11||i<0?-1:r<0||i>11?1:0,s=e.oct+a;return o.pc+s}var w={names:Ho,get:y,name:Lo,pitchClass:Uo,accidentals:Xo,octave:Ko,midi:Qo,ascending:Cn,descending:ir,sortedNames:It,sortedUniqNames:jt,fromMidi:vt,fromMidiSharps:nr,freq:Yo,fromFreq:Jo,fromFreqSharps:Wo,chroma:Zo,transpose:_n,tr,transposeBy:$t,trBy:er,transposeFrom:Nt,trFrom:or,transposeFifths:nn,trFifths:rr,simplify:ar,enharmonic:St};const Tt={empty:!0,name:"",chordType:""},qn={};function $(n){return typeof n=="string"?qn[n]||(qn[n]=Mr(n)):typeof n=="number"?$(Mn[n]||""):q(n)?mr(n):z(n)?$(n.name):Tt}const sr=g("RomanNumeral.romanNumeral","RomanNumeral.get",$);function cr(n=!0){return(n?Mn:dr).slice()}function mr(n){return $(E(n.alt)+Mn[n.step])}const ur=/^(#{1,}|b{1,}|x{1,}|)(IV|I{1,3}|VI{0,2}|iv|i{1,3}|vi{0,2})([^IViv]*)$/;function lr(n){return ur.exec(n)||["","","",""]}const Vt="I II III IV V VI VII",Mn=Vt.split(" "),dr=Vt.toLowerCase().split(" ");function Mr(n){const[t,e,o,r]=lr(n);if(!o)return Tt;const i=o.toUpperCase(),a=Mn.indexOf(i),s=G(e),c=1;return{empty:!1,name:t,roman:o,interval:f({step:a,alt:s,dir:c}).name,acc:e,chordType:r,alt:s,step:a,major:o===i,oct:0,dir:c}}var fr={names:cr,get:$,romanNumeral:sr};const b=Object.freeze([]),_t={type:"major",tonic:"",alteration:0,keySignature:""},J={tonic:"",grades:b,intervals:b,scale:b,chords:b,chordsHarmonicFunction:b,chordScales:b},Pr={..._t,...J,type:"major",minorRelative:"",scale:b,secondaryDominants:b,secondaryDominantsMinorRelative:b,substituteDominants:b,substituteDominantsMinorRelative:b},pr={..._t,type:"minor",relativeMajor:"",natural:J,harmonic:J,melodic:J},Gn=(n,t,e="")=>t.map((o,r)=>`${n[r]}${e}${o}`);function fn(n,t,e,o){return r=>{const i=n.map(s=>$(s).interval||""),a=i.map(s=>P(r,s));return{tonic:r,grades:n,intervals:i,scale:a,chords:Gn(a,t),chordsHarmonicFunction:e.slice(),chordScales:Gn(a,o," ")}}}const Ct=(n,t)=>{const e=m(n),o=m(t);return e.empty||o.empty?0:o.coord[0]-e.coord[0]},hr=fn("I II III IV V VI VII".split(" "),"maj7 m7 m7 maj7 7 m7 m7b5".split(" "),"T SD T SD D T D".split(" "),"major,dorian,phrygian,lydian,mixolydian,minor,locrian".split(",")),yr=fn("I II bIII IV V bVI bVII".split(" "),"m7 m7b5 maj7 m7 m7 maj7 7".split(" "),"T SD T SD D SD SD".split(" "),"minor,locrian,major,dorian,phrygian,lydian,mixolydian".split(",")),gr=fn("I II bIII IV V bVI VII".split(" "),"mMaj7 m7b5 +maj7 m7 7 maj7 o7".split(" "),"T SD T SD D SD D".split(" "),"harmonic minor,locrian 6,major augmented,lydian diminished,phrygian dominant,lydian #9,ultralocrian".split(",")),br=fn("I II bIII IV V VI VII".split(" "),"m6 m7 +maj7 7 7 m7b5 m7b5".split(" "),"T SD T SD D ".split(" "),"melodic minor,dorian b2,lydian augmented,lydian dominant,mixolydian b6,locrian #2,altered".split(","));function Ar(n){const t=m(n).pc;if(!t)return Pr;const e=hr(t),o=Ct("C",t),r=i=>{const a=$(i);return a.empty?"":P(n,a.interval)+a.chordType};return{...e,type:"major",minorRelative:P(t,"-3m"),alteration:o,keySignature:E(o),secondaryDominants:"- VI7 VII7 I7 II7 III7 -".split(" ").map(r),secondaryDominantsMinorRelative:"- IIIm7b5 IV#m7 Vm7 VIm7 VIIm7b5 -".split(" ").map(r),substituteDominants:"- bIII7 IV7 bV7 bVI7 bVII7 -".split(" ").map(r),substituteDominantsMinorRelative:"- IIIm7 Im7 IIbm7 VIm7 IVm7 -".split(" ").map(r)}}function vr(n){const t=m(n).pc;if(!t)return pr;const e=Ct("C",t)-3;return{type:"minor",tonic:t,relativeMajor:P(t,"3m"),alteration:e,keySignature:E(e),natural:yr(t),harmonic:gr(t),melodic:br(t)}}function $r(n){return typeof n=="number"?nn("C",n):typeof n=="string"&&/^b+|#+$/.test(n)?nn("C",G(n)):null}var Nr={majorKey:Ar,majorTonicFromKeySignature:$r,minorKey:vr};const wn=[[0,2773,0,"ionian","","Maj7","major"],[1,2902,2,"dorian","m","m7"],[2,3418,4,"phrygian","m","m7"],[3,2741,-1,"lydian","","Maj7"],[4,2774,1,"mixolydian","","7"],[5,2906,3,"aeolian","m","m7","minor"],[6,3434,5,"locrian","dim","m7b5"]],Bn={...T,name:"",alt:0,modeNum:NaN,triad:"",seventh:"",aliases:[]},xn=wn.map(Tr),An={};xn.forEach(n=>{An[n.name]=n,n.aliases.forEach(t=>{An[t]=n})});function V(n){return typeof n=="string"?An[n.toLowerCase()]||Bn:n&&n.name?V(n.name):Bn}const Ir=g("Mode.mode","Mode.get",V);function wt(){return xn.slice()}const jr=g("Mode.mode","Mode.all",wt);function Sr(){return xn.map(n=>n.name)}function Tr(n){const[t,e,o,r,i,a,s]=n,c=s?[s]:[],l=Number(e).toString(2);return{empty:!1,intervals:un(r).intervals,modeNum:t,chroma:l,normalized:l,name:r,setNum:e,alt:o,triad:i,seventh:a,aliases:c}}function Vr(n,t){return V(n).intervals.map(e=>P(t,e))}function xt(n){return(t,e)=>{const o=V(t);if(o.empty)return[];const r=H(o.modeNum,n),i=o.intervals.map(a=>P(e,a));return r.map((a,s)=>i[s]+a)}}const _r=xt(wn.map(n=>n[4])),Cr=xt(wn.map(n=>n[5]));function Et(n,t){const e=V(t),o=V(n);return e.empty||o.empty?"":ft(pt("1P",o.alt-e.alt))}function wr(n,t,e){return P(e,Et(n,t))}var xr={get:V,names:Sr,all:wt,distance:Et,relativeTonic:wr,notes:Vr,triads:_r,seventhChords:Cr,entries:jr,mode:Ir};function Er(n,t){return t.map($).map(o=>P(n,f(o))+o.chordType)}function Dr(n,t){return t.map(e=>{const[o,r]=ln(e),i=D(n,o);return $(f(i)).name+r})}var kr={fromRomanNumerals:Er,toRomanNumerals:Dr};function Dt(n){const t=Nn(n.map(gt));return!n.length||t.length!==n.length?[]:t.reduce((e,o)=>{const r=e[e.length-1];return e.concat(an(r,o).slice(1))},[t[0]])}function Rr(n,t){return Dt(n).map(e=>I(e,t))}var Or={numeric:Dt,chromatic:Rr};const Fr={empty:!0,name:"",type:"",tonic:null,setNum:NaN,chroma:"",normalized:"",aliases:[],notes:[],intervals:[]};function kt(n){if(typeof n!="string")return["",""];const t=n.indexOf(" "),e=m(n.substring(0,t));if(e.empty){const r=m(n);return r.empty?["",n]:[r.name,""]}const o=n.substring(e.name.length+1);return[e.name,o.length?o:""]}const zr=ut;function N(n){const t=Array.isArray(n)?n:kt(n),e=m(t[0]).name,o=un(t[1]);if(o.empty)return Fr;const r=o.name,i=e?o.intervals.map(s=>P(e,s)):[],a=e?e+" "+r:r;return{...o,name:a,type:r,tonic:e,notes:i}}const qr=g("Scale.scale","Scale.get",N);function Gr(n){const t=N(n),e=sn(t.chroma);return R().filter(o=>e(o.chroma)).map(o=>o.aliases[0])}function Br(n){const t=N(n),e=cn(t.chroma);return L().filter(o=>e(o.chroma)).map(o=>o.name)}function Hr(n){const t=sn(N(n).chroma);return L().filter(e=>t(e.chroma)).map(e=>e.name)}function Rt(n){const t=n.map(r=>m(r).pc).filter(r=>r),e=t[0],o=jt(t);return H(o.indexOf(e),o)}function Lr(n){const t=N(n);if(t.empty)return[];const e=t.tonic?t.notes:t.intervals;return jn(t.chroma).map((o,r)=>{const i=N(o).name;return i?[e[r],i]:["",""]}).filter(o=>o[0])}function Ur(n){const t=Array.isArray(n)?Rt(n):N(n).notes,e=t.map(o=>m(o).chroma);return o=>{const r=m(typeof o=="number"?vt(o):o),i=r.height;if(i===void 0)return;const a=i%12,s=e.indexOf(a);if(s!==-1)return St(r.name,t[s])}}function Xr(n){const t=Ur(n);return(e,o)=>{const r=m(e).height,i=m(o).height;return r===void 0||i===void 0?[]:an(r,i).map(t).filter(a=>a)}}var tn={get:N,names:zr,extended:Br,modeNames:Lr,reduced:Hr,scaleChords:Gr,scaleNotes:Rt,tokenize:kt,rangeOf:Xr,scale:qr};const Kr={empty:!0,name:"",upper:void 0,lower:void 0,type:void 0,additive:[]},Qr=["4/4","3/4","2/4","2/2","12/8","9/8","6/8","3/8"];function Yr(){return Qr.slice()}const Zr=/^(\d?\d(?:\+\d)*)\/(\d)$/,Hn=new Map;function Jr(n){const t=Hn.get(n);if(t)return t;const e=ni(En(n));return Hn.set(n,e),e}function En(n){if(typeof n=="string"){const[i,a,s]=Zr.exec(n)||[];return En([a,s])}const[t,e]=n,o=+e;if(typeof t=="number")return[t,o];const r=t.split("+").map(i=>+i);return r.length===1?[r[0],o]:[r,o]}var Wr={names:Yr,parse:En,get:Jr};function ni([n,t]){const e=Array.isArray(n)?n.reduce((s,c)=>s+c,0):n,o=t;if(e===0||o===0)return Kr;const r=Array.isArray(n)?`${n.join("+")}/${t}`:`${n}/${t}`,i=Array.isArray(n)?n:[],a=o===4||o===2?"simple":o===8&&e%3===0?"compound":"irregular";return{empty:!1,name:r,type:a,upper:e,lower:o,additive:i}}const ti=Wn,ei=st,oi=mt,ri=dt,ii=Object.freeze(Object.defineProperty({__proto__:null,Array:Ae,Core:Wn,ChordDictionary:oi,PcSet:ei,ScaleDictionary:ri,Tonal:ti,AbcNotation:Me,Chord:fo,ChordType:mt,Collection:Ie,DurationValue:vo,Interval:bn,Key:Nr,Midi:Go,Mode:xr,Note:w,Pcset:st,Progression:kr,Range:Or,RomanNumeral:fr,Scale:tn,ScaleType:dt,TimeSignature:Wr,accToAlt:G,altToAcc:E,coordToInterval:B,coordToNote:F,decode:on,deprecate:g,distance:D,encode:en,fillStr:C,interval:f,isNamed:z,isPitch:q,note:m,stepToLetter:vn,tokenizeInterval:$n,tokenizeNote:rn,transpose:P},Symbol.toStringTag,{value:"Module"}));function Ot(n,t,e){let[o,r]=tn.tokenize(n),{notes:i}=tn.get(`${o} ${r}`);if(i=i.map(h=>w.get(h).pc),t=Number(t),isNaN(t))throw new Error(`scale offset "${t}" not a number`);const{pc:a,oct:s=3}=w.get(e),c=i.indexOf(a);if(c===-1)throw new Error(`note "${e}" is not in scale "${n}"`);let l=c,u=s,d=a;const M=Math.sign(t);for(;Math.abs(l-c)0&&d[0]==="C"&&(u+=M)}return d+u}_.prototype._transpose=function(n){return this._withHap(t=>{const e=isNaN(Number(n))?String(n):bn.fromSemitones(n);if(typeof t.value=="number"){const o=typeof e=="string"?bn.semitones(e)||0:e;return t.withValue(()=>t.value+o)}return t.withValue(()=>w.simplify(w.transpose(t.value,e)))})};_.prototype._scaleTranspose=function(n){return this._withHap(t=>{if(!t.context.scale)throw new Error("can only use scaleTranspose after .scale");if(typeof t.value!="string")throw new Error("can only use scaleTranspose with notes");return t.withValue(()=>Ot(t.context.scale,Number(n),t.value))})};_.prototype._scale=function(n){return this._withHap(t=>{let e=t.value;const o=Number(e);if(!isNaN(o)){let[r,i]=tn.tokenize(n);const{pc:a,oct:s=3}=w.get(r);e=Ot(a+" "+i,o,a+s)}return t.withValue(()=>e).setContext({...t.context,scale:n})})};_.prototype.define("transpose",(n,t)=>t.transpose(n),{composable:!0,patternified:!0});_.prototype.define("scale",(n,t)=>t.scale(n),{composable:!0,patternified:!0});_.prototype.define("scaleTranspose",(n,t)=>t.scaleTranspose(n),{composable:!0,patternified:!0});var Ft={},hn={},X={};X.__esModule=!0;X.getBestVoicing=void 0;function ai(n){var t=n.chord,e=n.range,o=n.finder,r=n.picker,i=n.lastVoicing,a=o(t,e);return a.length?r(a,i):[]}X.getBestVoicing=ai;var O={};const zt=Ut(ii);var K={};K.__esModule=!0;K.tokenizeChord=void 0;function si(n){var t=(n||"").match(/^([A-G][b#]*)([^\/]*)[\/]?([A-G][b#]*)?$/);return t?t.slice(1):[]}K.tokenizeChord=si;var Ln;function ci(){if(Ln)return O;Ln=1,O.__esModule=!0,O.voicingsInRange=void 0;var n=zt,t=qt(),e=K;function o(r,i,a){i===void 0&&(i=t.lefthand),a===void 0&&(a=["D3","A4"]);var s=(0,e.tokenizeChord)(r),c=s[0],l=s[1];if(!i[l])return[];var u=i[l].map(function(M){return M.split(" ")}),d=n.Range.chromatic(a);return u.reduce(function(M,h){var A=h.map(function(v){return n.Interval.substract(v,h[0])}),Q=n.Note.transpose(c,h[0]),Gt=d.filter(function(v){return n.Note.chroma(v)===n.Note.chroma(Q)}).filter(function(v){return n.Note.midi(n.Note.transpose(v,A[A.length-1]))<=n.Note.midi(a[1])}).map(function(v){return n.Note.enharmonic(v,Q)}),Bt=Gt.map(function(v){return A.map(function(Ht){return n.Note.transpose(v,Ht)})});return M.concat(Bt)},[])}return O.voicingsInRange=o,O}var Un;function qt(){return Un||(Un=1,function(n){var t=Y&&Y.__assign||function(){return t=Object.assign||function(s){for(var c,l=1,u=arguments.length;lui({chord:n,dictionary:di,range:e,picker:li,lastVoicing:t}),x=_;x.prototype.fmapNested=function(n){return new x(t=>this.query(t).map(e=>Kt(n(e)).query(t).map(o=>new Qt(e.whole,e.part,o.value,o.context))).flat())};x.prototype.voicings=function(n){let t;return n!=null&&n.length||(n=["F3","A4"]),this.fmapNested(e=>(t=Mi(e.value,t,n),Yt(...t)._withContext(()=>({locations:e.context.locations||[]}))))};x.prototype._rootNotes=function(n=2){return this.fmap(t=>{const[e,o]=t.match(/^([a-gA-G][b#]?).*$/);return o+n})};x.prototype.define("voicings",(n,t)=>t.voicings(n),{composable:!0});x.prototype.define("rootNotes",(n,t)=>t.rootNotes(n),{composable:!0,patternified:!0}); +import{P as _,m as Lt,k as Ut,n as Y,o as Xt,q as Kt,H as Qt,t as Yt}from"./index.f17ed672.js";const C=(n,t)=>Array(Math.abs(t)+1).join(n);function g(n,t,e){return function(...o){return console.warn(`${n} is deprecated. Use ${t}.`),e.apply(this,o)}}function z(n){return n!==null&&typeof n=="object"&&typeof n.name=="string"}function q(n){return n!==null&&typeof n=="object"&&typeof n.step=="number"&&typeof n.alt=="number"}const Qn=[0,2,4,-1,1,3,5],Yn=Qn.map(n=>Math.floor(n*7/12));function en(n){const{step:t,alt:e,oct:o,dir:r=1}=n,i=Qn[t]+7*e;if(o===void 0)return[r*i];const a=o-Yn[t]-4*e;return[r*i,r*a]}const Zt=[3,0,4,1,5,2,6];function on(n){const[t,e,o]=n,r=Zt[Jt(t)],i=Math.floor((t+1)/7);if(e===void 0)return{step:r,alt:i,dir:o};const a=e+4*i+Yn[r];return{step:r,alt:i,oct:a,dir:o}}function Jt(n){const t=(n+1)%7;return t<0?7+t:t}const Zn={empty:!0,name:"",pc:"",acc:""},Dn=new Map,vn=n=>"CDEFGAB".charAt(n),E=n=>n<0?C("b",-n):C("#",n),G=n=>n[0]==="b"?-n.length:n.length;function m(n){const t=Dn.get(n);if(t)return t;const e=typeof n=="string"?te(n):q(n)?m(ee(n)):z(n)?m(n.name):Zn;return Dn.set(n,e),e}const Wt=/^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)$/;function rn(n){const t=Wt.exec(n);return[t[1].toUpperCase(),t[2].replace(/x/g,"##"),t[3],t[4]]}function F(n){return m(on(n))}const ne=(n,t)=>(n%t+t)%t,pn=[0,2,4,5,7,9,11];function te(n){const t=rn(n);if(t[0]===""||t[3]!=="")return Zn;const e=t[0],o=t[1],r=t[2],i=(e.charCodeAt(0)+3)%7,a=G(o),s=r.length?+r:void 0,c=en({step:i,alt:a,oct:s}),l=e+o+r,u=e+o,d=(pn[i]+a+120)%12,M=s===void 0?ne(pn[i]+a,12)-12*99:pn[i]+a+12*(s+1),h=M>=0&&M<=127?M:null,A=s===void 0?null:Math.pow(2,(M-69)/12)*440;return{empty:!1,acc:o,alt:a,chroma:d,coord:c,freq:A,height:M,letter:e,midi:h,name:l,oct:s,pc:u,step:i}}function ee(n){const{step:t,alt:e,oct:o}=n,r=vn(t);if(!r)return"";const i=r+E(e);return o||o===0?i+o:i}const yn={empty:!0,name:"",acc:""},oe="([-+]?\\d+)(d{1,4}|m|M|P|A{1,4})",re="(AA|A|P|M|m|d|dd)([-+]?\\d+)",ie=new RegExp("^"+oe+"|"+re+"$");function $n(n){const t=ie.exec(`${n}`);return t===null?["",""]:t[1]?[t[1],t[2]]:[t[4],t[3]]}const kn={};function f(n){return typeof n=="string"?kn[n]||(kn[n]=ae(n)):q(n)?f(ce(n)):z(n)?f(n.name):yn}const Rn=[0,2,4,5,7,9,11],Jn="PMMPPMM";function ae(n){const t=$n(n);if(t[0]==="")return yn;const e=+t[0],o=t[1],r=(Math.abs(e)-1)%7,i=Jn[r];if(i==="M"&&o==="P")return yn;const a=i==="M"?"majorable":"perfectable",s=""+e+o,c=e<0?-1:1,l=e===8||e===-8?e:c*(r+1),u=se(a,o),d=Math.floor((Math.abs(e)-1)/7),M=c*(Rn[r]+u+12*d),h=(c*(Rn[r]+u)%12+12)%12,A=en({step:r,alt:u,oct:d,dir:c});return{empty:!1,name:s,num:e,q:o,step:r,alt:u,dir:c,type:a,simple:l,semitones:M,chroma:h,coord:A,oct:d}}function B(n,t){const[e,o=0]=n,r=e*7+o*12<0,i=t||r?[-e,-o,-1]:[e,o,1];return f(on(i))}function se(n,t){return t==="M"&&n==="majorable"||t==="P"&&n==="perfectable"?0:t==="m"&&n==="majorable"?-1:/^A+$/.test(t)?t.length:/^d+$/.test(t)?-1*(n==="perfectable"?t.length:t.length+1):0}function ce(n){const{step:t,alt:e,oct:o=0,dir:r}=n;if(!r)return"";const i=t+1+7*o,a=i===0?t+1:i,s=r<0?"-":"",c=Jn[t]==="M"?"majorable":"perfectable";return s+a+me(c,e)}function me(n,t){return t===0?n==="majorable"?"M":"P":t===-1&&n==="majorable"?"m":t>0?C("A",t):C("d",n==="perfectable"?t:t+1)}function P(n,t){const e=m(n),o=f(t);if(e.empty||o.empty)return"";const r=e.coord,i=o.coord,a=r.length===1?[r[0]+i[0]]:[r[0]+i[0],r[1]+i[1]];return F(a).name}function D(n,t){const e=m(n),o=m(t);if(e.empty||o.empty)return"";const r=e.coord,i=o.coord,a=i[0]-r[0],s=r.length===2&&i.length===2?i[1]-r[1]:-Math.floor(a*7/12),c=o.height===e.height&&o.midi!==null&&e.midi!==null&&e.step>o.step;return B([a,s],c).name}const Wn=Object.freeze(Object.defineProperty({__proto__:null,accToAlt:G,altToAcc:E,coordToInterval:B,coordToNote:F,decode:on,deprecate:g,distance:D,encode:en,fillStr:C,interval:f,isNamed:z,isPitch:q,note:m,stepToLetter:vn,tokenizeInterval:$n,tokenizeNote:rn,transpose:P},Symbol.toStringTag,{value:"Module"})),On=(n,t)=>Array(t+1).join(n),ue=/^(_{1,}|=|\^{1,}|)([abcdefgABCDEFG])([,']*)$/;function nt(n){const t=ue.exec(n);return t?[t[1],t[2],t[3]]:["","",""]}function W(n){const[t,e,o]=nt(n);if(e==="")return"";let r=4;for(let a=0;a96?e.toUpperCase()+i+(r+1):e+i+r}function tt(n){const t=m(n);if(t.empty||!t.oct&&t.oct!==0)return"";const{letter:e,acc:o,oct:r}=t,i=o[0]==="b"?o.replace(/b/g,"_"):o.replace(/#/g,"^"),a=r>4?e.toLowerCase():e,s=r===5?"":r>4?On("'",r-5):On(",",4-r);return i+a+s}function le(n,t){return tt(P(W(n),t))}function de(n,t){return D(W(n),W(t))}var Me={abcToScientificNotation:W,scientificToAbcNotation:tt,tokenize:nt,transpose:le,distance:de};function fe(n,t){const e=[];for(;t--;e[t]=t+n);return e}function Pe(n,t){const e=[];for(;t--;e[t]=n-t);return e}function pe(n,t){return nt===0||t)}function et(n){return n.map(e=>m(e)).filter(e=>!e.empty).sort((e,o)=>e.height-o.height).map(e=>e.name)}function ge(n){return et(n).filter((t,e,o)=>e===0||t!==o[e-1])}function be(n,t=Math.random){let e,o,r=n.length;for(;r;)e=Math.floor(t()*r--),o=n[r],n[r]=n[e],n[e]=o;return n}function ot(n){return n.length===0?[[]]:ot(n.slice(1)).reduce((t,e)=>t.concat(n.map((o,r)=>{const i=e.slice();return i.splice(r,0,n[0]),i})),[])}const Ae=Object.freeze(Object.defineProperty({__proto__:null,compact:ye,permutations:ot,range:pe,rotate:he,shuffle:be,sortedNoteNames:et,sortedUniqNoteNames:ge},Symbol.toStringTag,{value:"Module"}));function ve(n,t){const e=[];for(;t--;e[t]=t+n);return e}function $e(n,t){const e=[];for(;t--;e[t]=n-t);return e}function an(n,t){return nt===0||t)}function Ne(n,t=Math.random){let e,o,r=n.length;for(;r;)e=Math.floor(t()*r--),o=n[r],n[r]=n[e],n[e]=o;return n}function rt(n){return n.length===0?[[]]:rt(n.slice(1)).reduce((t,e)=>t.concat(n.map((o,r)=>{const i=e.slice();return i.splice(r,0,n[0]),i})),[])}var Ie={compact:Nn,permutations:rt,range:an,rotate:H,shuffle:Ne};const T={empty:!0,name:"",setNum:0,chroma:"000000000000",normalized:"000000000000",intervals:[]},In=n=>Number(n).toString(2),Fn=n=>parseInt(n,2),je=/^[01]{12}$/;function it(n){return je.test(n)}const Se=n=>typeof n=="number"&&n>=0&&n<=4095,Te=n=>n&&it(n.chroma),zn={[T.chroma]:T};function p(n){const t=it(n)?n:Se(n)?In(n):Array.isArray(n)?ze(n):Te(n)?n.chroma:T.chroma;return zn[t]=zn[t]||Fe(t)}const Ve=g("Pcset.pcset","Pcset.get",p),_e=n=>p(n).chroma,Ce=n=>p(n).intervals,we=n=>p(n).setNum,xe=["1P","2m","2M","3m","3M","4P","5d","5P","6m","6M","7m","7M"];function Ee(n){const t=[];for(let e=0;e<12;e++)n.charAt(e)==="1"&&t.push(xe[e]);return t}function De(){return an(2048,4095).map(In)}function jn(n,t=!0){const o=p(n).chroma.split("");return Nn(o.map((r,i)=>{const a=H(i,o);return t&&a[0]==="0"?null:a.join("")}))}function ke(n,t){return p(n).setNum===p(t).setNum}function sn(n){const t=p(n).setNum;return e=>{const o=p(e).setNum;return t&&t!==o&&(o&t)===o}}function cn(n){const t=p(n).setNum;return e=>{const o=p(e).setNum;return t&&t!==o&&(o|t)===o}}function at(n){const t=p(n);return e=>{const o=m(e);return t&&!o.empty&&t.chroma.charAt(o.chroma)==="1"}}function Re(n){const t=at(n);return e=>e.filter(t)}var st={get:p,chroma:_e,num:we,intervals:Ce,chromas:De,isSupersetOf:cn,isSubsetOf:sn,isNoteIncludedIn:at,isEqual:ke,filter:Re,modes:jn,pcset:Ve};function Oe(n){const t=n.split("");return t.map((e,o)=>H(o,t).join(""))}function Fe(n){const t=Fn(n),e=Oe(n).map(Fn).filter(i=>i>=2048).sort()[0],o=In(e),r=Ee(n);return{empty:!1,name:"",setNum:t,chroma:n,normalized:o,intervals:r}}function ze(n){if(n.length===0)return T.chroma;let t;const e=[0,0,0,0,0,0,0,0,0,0,0,0];for(let o=0;on.name).filter(n=>n)}function Le(){return k.map(n=>n.aliases[0]).filter(n=>n)}function Ue(){return Object.keys(j)}function R(){return k.slice()}const Xe=g("ChordType.entries","ChordType.all",R);function Ke(){k=[],j={}}function ct(n,t,e){const o=Ye(n),r={...p(n),name:e||"",quality:o,intervals:n,aliases:t};k.push(r),r.name&&(j[r.name]=r),j[r.setNum]=r,j[r.chroma]=r,r.aliases.forEach(i=>Qe(r,i))}function Qe(n,t){j[t]=n}function Ye(n){const t=e=>n.indexOf(e)!==-1;return t("5A")?"Augmented":t("3M")?"Major":t("5d")?"Diminished":t("3m")?"Minor":"Unknown"}qe.forEach(([n,t,e])=>ct(n.split(" "),e.split(" "),t));k.sort((n,t)=>n.setNum-t.setNum);var mt={names:He,symbols:Le,get:Sn,all:R,add:ct,removeAll:Ke,keys:Ue,entries:Xe,chordType:Be};const Ze=n=>{const t=n.reduce((e,o)=>{const r=m(o).chroma;return r!==void 0&&(e[r]=e[r]||m(o).name),e},{});return e=>t[e]};function Je(n){const t=n.map(o=>m(o).pc).filter(o=>o);return m.length===0?[]:We(t,1).filter(o=>o.weight).sort((o,r)=>r.weight-o.weight).map(o=>o.name)}function We(n,t){const e=n[0],o=m(e).chroma,r=Ze(n),i=jn(n,!1),a=[];return i.forEach((s,c)=>{R().filter(u=>u.chroma===s).forEach(u=>{const d=u.aliases[0],M=r(c);c!==o?a.push({weight:.5*t,name:`${M}${d}/${e}`}):a.push({weight:1*t,name:`${M}${d}`})})}),a}const no=[["1P 2M 3M 5P 6M","major pentatonic","pentatonic"],["1P 3M 4P 5P 7M","ionian pentatonic"],["1P 3M 4P 5P 7m","mixolydian pentatonic","indian"],["1P 2M 4P 5P 6M","ritusen"],["1P 2M 4P 5P 7m","egyptian"],["1P 3M 4P 5d 7m","neopolitan major pentatonic"],["1P 3m 4P 5P 6m","vietnamese 1"],["1P 2m 3m 5P 6m","pelog"],["1P 2m 4P 5P 6m","kumoijoshi"],["1P 2M 3m 5P 6m","hirajoshi"],["1P 2m 4P 5d 7m","iwato"],["1P 2m 4P 5P 7m","in-sen"],["1P 3M 4A 5P 7M","lydian pentatonic","chinese"],["1P 3m 4P 6m 7m","malkos raga"],["1P 3m 4P 5d 7m","locrian pentatonic","minor seven flat five pentatonic"],["1P 3m 4P 5P 7m","minor pentatonic","vietnamese 2"],["1P 3m 4P 5P 6M","minor six pentatonic"],["1P 2M 3m 5P 6M","flat three pentatonic","kumoi"],["1P 2M 3M 5P 6m","flat six pentatonic"],["1P 2m 3M 5P 6M","scriabin"],["1P 3M 5d 6m 7m","whole tone pentatonic"],["1P 3M 4A 5A 7M","lydian #5P pentatonic"],["1P 3M 4A 5P 7m","lydian dominant pentatonic"],["1P 3m 4P 5P 7M","minor #7M pentatonic"],["1P 3m 4d 5d 7m","super locrian pentatonic"],["1P 2M 3m 4P 5P 7M","minor hexatonic"],["1P 2A 3M 5P 5A 7M","augmented"],["1P 2M 3m 3M 5P 6M","major blues"],["1P 2M 4P 5P 6M 7m","piongio"],["1P 2m 3M 4A 6M 7m","prometheus neopolitan"],["1P 2M 3M 4A 6M 7m","prometheus"],["1P 2m 3M 5d 6m 7m","mystery #1"],["1P 2m 3M 4P 5A 6M","six tone symmetric"],["1P 2M 3M 4A 5A 7m","whole tone","messiaen's mode #1"],["1P 2m 4P 4A 5P 7M","messiaen's mode #5"],["1P 3m 4P 5d 5P 7m","minor blues","blues"],["1P 2M 3M 4P 5d 6m 7m","locrian major","arabian"],["1P 2m 3M 4A 5P 6m 7M","double harmonic lydian"],["1P 2M 3m 4P 5P 6m 7M","harmonic minor"],["1P 2m 2A 3M 4A 6m 7m","altered","super locrian","diminished whole tone","pomeroy"],["1P 2M 3m 4P 5d 6m 7m","locrian #2","half-diminished","aeolian b5"],["1P 2M 3M 4P 5P 6m 7m","mixolydian b6","melodic minor fifth mode","hindu"],["1P 2M 3M 4A 5P 6M 7m","lydian dominant","lydian b7","overtone"],["1P 2M 3M 4A 5P 6M 7M","lydian"],["1P 2M 3M 4A 5A 6M 7M","lydian augmented"],["1P 2m 3m 4P 5P 6M 7m","dorian b2","phrygian #6","melodic minor second mode"],["1P 2M 3m 4P 5P 6M 7M","melodic minor"],["1P 2m 3m 4P 5d 6m 7m","locrian"],["1P 2m 3m 4d 5d 6m 7d","ultralocrian","superlocrian bb7","superlocrian diminished"],["1P 2m 3m 4P 5d 6M 7m","locrian 6","locrian natural 6","locrian sharp 6"],["1P 2A 3M 4P 5P 5A 7M","augmented heptatonic"],["1P 2M 3m 4A 5P 6M 7m","dorian #4","ukrainian dorian","romanian minor","altered dorian"],["1P 2M 3m 4A 5P 6M 7M","lydian diminished"],["1P 2m 3m 4P 5P 6m 7m","phrygian"],["1P 2M 3M 4A 5A 7m 7M","leading whole tone"],["1P 2M 3M 4A 5P 6m 7m","lydian minor"],["1P 2m 3M 4P 5P 6m 7m","phrygian dominant","spanish","phrygian major"],["1P 2m 3m 4P 5P 6m 7M","balinese"],["1P 2m 3m 4P 5P 6M 7M","neopolitan major"],["1P 2M 3m 4P 5P 6m 7m","aeolian","minor"],["1P 2M 3M 4P 5P 6m 7M","harmonic major"],["1P 2m 3M 4P 5P 6m 7M","double harmonic major","gypsy"],["1P 2M 3m 4P 5P 6M 7m","dorian"],["1P 2M 3m 4A 5P 6m 7M","hungarian minor"],["1P 2A 3M 4A 5P 6M 7m","hungarian major"],["1P 2m 3M 4P 5d 6M 7m","oriental"],["1P 2m 3m 3M 4A 5P 7m","flamenco"],["1P 2m 3m 4A 5P 6m 7M","todi raga"],["1P 2M 3M 4P 5P 6M 7m","mixolydian","dominant"],["1P 2m 3M 4P 5d 6m 7M","persian"],["1P 2M 3M 4P 5P 6M 7M","major","ionian"],["1P 2m 3M 5d 6m 7m 7M","enigmatic"],["1P 2M 3M 4P 5A 6M 7M","major augmented","major #5","ionian augmented","ionian #5"],["1P 2A 3M 4A 5P 6M 7M","lydian #9"],["1P 2m 2M 4P 4A 5P 6m 7M","messiaen's mode #4"],["1P 2m 3M 4P 4A 5P 6m 7M","purvi raga"],["1P 2m 3m 3M 4P 5P 6m 7m","spanish heptatonic"],["1P 2M 3M 4P 5P 6M 7m 7M","bebop"],["1P 2M 3m 3M 4P 5P 6M 7m","bebop minor"],["1P 2M 3M 4P 5P 5A 6M 7M","bebop major"],["1P 2m 3m 4P 5d 5P 6m 7m","bebop locrian"],["1P 2M 3m 4P 5P 6m 7m 7M","minor bebop"],["1P 2M 3m 4P 5d 6m 6M 7M","diminished","whole-half diminished"],["1P 2M 3M 4P 5d 5P 6M 7M","ichikosucho"],["1P 2M 3m 4P 5P 6m 6M 7M","minor six diminished"],["1P 2m 3m 3M 4A 5P 6M 7m","half-whole diminished","dominant diminished","messiaen's mode #2"],["1P 3m 3M 4P 5P 6M 7m 7M","kafi raga"],["1P 2M 3M 4P 4A 5A 6A 7M","messiaen's mode #6"],["1P 2M 3m 3M 4P 5d 5P 6M 7m","composite blues"],["1P 2M 3m 3M 4A 5P 6m 7m 7M","messiaen's mode #3"],["1P 2m 2M 3m 4P 4A 5P 6m 6M 7M","messiaen's mode #7"],["1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M","chromatic"]],to={...T,intervals:[],aliases:[]};let mn=[],S={};function ut(){return mn.map(n=>n.name)}function un(n){return S[n]||to}const eo=g("ScaleDictionary.scaleType","ScaleType.get",un);function L(){return mn.slice()}const oo=g("ScaleDictionary.entries","ScaleType.all",L);function ro(){return Object.keys(S)}function io(){mn=[],S={}}function lt(n,t,e=[]){const o={...p(n),name:t,intervals:n,aliases:e};return mn.push(o),S[o.name]=o,S[o.setNum]=o,S[o.chroma]=o,o.aliases.forEach(r=>ao(o,r)),o}function ao(n,t){S[t]=n}no.forEach(([n,t,...e])=>lt(n.split(" "),t,e));var dt={names:ut,get:un,all:L,add:lt,removeAll:io,keys:ro,entries:oo,scaleType:eo};const gn={empty:!0,name:"",symbol:"",root:"",rootDegree:0,type:"",tonic:null,setNum:NaN,quality:"Unknown",chroma:"",normalized:"",aliases:[],notes:[],intervals:[]},so=/^(6|64|7|9|11|13)$/;function ln(n){const[t,e,o,r]=rn(n);return t===""?["",n]:t==="A"&&r==="ug"?["","aug"]:!r&&(o==="4"||o==="5")?[t+e,o]:so.test(o)?[t+e,o+r]:[t+e+o,r]}function U(n){if(n==="")return gn;if(Array.isArray(n)&&n.length===2)return Z(n[1],n[0]);{const[t,e]=ln(n),o=Z(e,t);return o.empty?Z(n):o}}function Z(n,t,e){const o=Sn(n),r=m(t||""),i=m(e||"");if(o.empty||t&&r.empty||e&&i.empty)return gn;const a=D(r.pc,i.pc),s=o.intervals.indexOf(a)+1;if(!i.empty&&!s)return gn;const c=Array.from(o.intervals);for(let M=1;MP(r,M));n=o.aliases.indexOf(n)!==-1?n:o.aliases[0];const u=`${r.empty?"":r.pc}${n}${i.empty||s<=1?"":"/"+i.pc}`,d=`${t?r.pc+" ":""}${o.name}${s>1&&e?" over "+i.pc:""}`;return{...o,name:d,symbol:u,type:o.name,root:i.name,intervals:c,rootDegree:s,tonic:r.name,notes:l}}const co=g("Chord.chord","Chord.get",U);function mo(n,t){const[e,o]=ln(n);return e?P(e,t)+o:n}function uo(n){const t=U(n),e=cn(t.chroma);return L().filter(o=>e(o.chroma)).map(o=>o.name)}function lo(n){const t=U(n),e=cn(t.chroma);return R().filter(o=>e(o.chroma)).map(o=>t.tonic+o.aliases[0])}function Mo(n){const t=U(n),e=sn(t.chroma);return R().filter(o=>e(o.chroma)).map(o=>t.tonic+o.aliases[0])}var fo={getChord:Z,get:U,detect:Je,chordScales:uo,extended:lo,reduced:Mo,tokenize:ln,transpose:mo,chord:co};const Po=[[.125,"dl",["large","duplex longa","maxima","octuple","octuple whole"]],[.25,"l",["long","longa"]],[.5,"d",["double whole","double","breve"]],[1,"w",["whole","semibreve"]],[2,"h",["half","minim"]],[4,"q",["quarter","crotchet"]],[8,"e",["eighth","quaver"]],[16,"s",["sixteenth","semiquaver"]],[32,"t",["thirty-second","demisemiquaver"]],[64,"sf",["sixty-fourth","hemidemisemiquaver"]],[128,"h",["hundred twenty-eighth"]],[256,"th",["two hundred fifty-sixth"]]],dn=[];Po.forEach(([n,t,e])=>$o(n,t,e));const po={empty:!0,name:"",value:0,fraction:[0,0],shorthand:"",dots:"",names:[]};function ho(){return dn.reduce((n,t)=>(t.names.forEach(e=>n.push(e)),n),[])}function yo(){return dn.map(n=>n.shorthand)}const go=/^([^.]+)(\.*)$/;function Tn(n){const[t,e,o]=go.exec(n)||[],r=dn.find(s=>s.shorthand===e||s.names.includes(e));if(!r)return po;const i=No(r.fraction,o.length),a=i[0]/i[1];return{...r,name:n,dots:o,value:a,fraction:i}}const bo=n=>Tn(n).value,Ao=n=>Tn(n).fraction;var vo={names:ho,shorthands:yo,get:Tn,value:bo,fraction:Ao};function $o(n,t,e){dn.push({empty:!1,dots:"",name:"",value:1/n,fraction:n<1?[1/n,1]:[1,n],shorthand:t,names:e})}function No(n,t){const e=Math.pow(2,t);let o=n[0]*e,r=n[1]*e;const i=o;for(let a=0;af(n).name,So=n=>f(n).semitones,To=n=>f(n).q,Vo=n=>f(n).num;function ft(n){const t=f(n);return t.empty?"":t.simple+t.q}function _o(n){const t=f(n);if(t.empty)return"";const e=(7-t.step)%7,o=t.type==="perfectable"?-t.alt:-(t.alt+1);return f({step:e,alt:o,oct:t.oct,dir:t.dir}).name}const Co=[1,2,2,3,3,4,5,5,6,6,7,7],wo="P m M m M P d P m M m M".split(" ");function xo(n){const t=n<0?-1:1,e=Math.abs(n),o=e%12,r=Math.floor(e/12);return t*(Co[o]+7*r)+wo[o]}const Eo=D,Pt=ht((n,t)=>[n[0]+t[0],n[1]+t[1]]),Do=n=>t=>Pt(n,t),ko=ht((n,t)=>[n[0]-t[0],n[1]-t[1]]);function pt(n,t){const e=Mt(n);if(e.empty)return"";const[o,r,i]=e.coord;return B([o+t,r,i]).name}var bn={names:Io,get:Mt,name:jo,num:Vo,semitones:So,quality:To,fromSemitones:xo,distance:Eo,invert:_o,simplify:ft,add:Pt,addTo:Do,substract:ko,transposeFifths:pt};function ht(n){return(t,e)=>{const o=f(t).coord,r=f(e).coord;if(o&&r){const i=n(o,r);return B(i).name}}}function yt(n){return+n>=0&&+n<=127}function gt(n){if(yt(n))return+n;const t=m(n);return t.empty?null:t.midi}function Ro(n,t=440){return Math.pow(2,(n-69)/12)*t}const Oo=Math.log(2),Fo=Math.log(440);function Vn(n){const t=12*(Math.log(n)-Fo)/Oo+69;return Math.round(t*100)/100}const zo="C C# D D# E F F# G G# A A# B".split(" "),qo="C Db D Eb E F Gb G Ab A Bb B".split(" ");function I(n,t={}){if(isNaN(n)||n===-1/0||n===1/0)return"";n=Math.round(n);const o=(t.sharps===!0?zo:qo)[n%12];if(t.pitchClass)return o;const r=Math.floor(n/12)-1;return o+r}var Go={isMidi:yt,toMidi:gt,midiToFreq:Ro,midiToNoteName:I,freqToMidi:Vn};const Bo=["C","D","E","F","G","A","B"],bt=n=>n.name,At=n=>n.map(m).filter(t=>!t.empty);function Ho(n){return n===void 0?Bo.slice():Array.isArray(n)?At(n).map(bt):[]}const y=m,Lo=n=>y(n).name,Uo=n=>y(n).pc,Xo=n=>y(n).acc,Ko=n=>y(n).oct,Qo=n=>y(n).midi,Yo=n=>y(n).freq,Zo=n=>y(n).chroma;function vt(n){return I(n)}function Jo(n){return I(Vn(n))}function Wo(n){return I(Vn(n),{sharps:!0})}function nr(n){return I(n,{sharps:!0})}const _n=P,tr=P,$t=n=>t=>_n(t,n),er=$t,Nt=n=>t=>_n(n,t),or=Nt;function nn(n,t){const e=y(n);if(e.empty)return"";const[o,r]=e.coord;return F(r===void 0?[o+t]:[o+t,r]).name}const rr=nn,Cn=(n,t)=>n.height-t.height,ir=(n,t)=>t.height-n.height;function It(n,t){return t=t||Cn,At(n).sort(t).map(bt)}function jt(n){return It(n,Cn).filter((t,e,o)=>e===0||t!==o[e-1])}const ar=n=>{const t=y(n);return t.empty?"":I(t.midi||t.chroma,{sharps:t.alt>0,pitchClass:t.midi===null})};function St(n,t){const e=y(n);if(e.empty)return"";const o=y(t||I(e.midi||e.chroma,{sharps:e.alt<0,pitchClass:!0}));if(o.empty||o.chroma!==e.chroma)return"";if(e.oct===void 0)return o.pc;const r=e.chroma-e.alt,i=o.chroma-o.alt,a=r>11||i<0?-1:r<0||i>11?1:0,s=e.oct+a;return o.pc+s}var w={names:Ho,get:y,name:Lo,pitchClass:Uo,accidentals:Xo,octave:Ko,midi:Qo,ascending:Cn,descending:ir,sortedNames:It,sortedUniqNames:jt,fromMidi:vt,fromMidiSharps:nr,freq:Yo,fromFreq:Jo,fromFreqSharps:Wo,chroma:Zo,transpose:_n,tr,transposeBy:$t,trBy:er,transposeFrom:Nt,trFrom:or,transposeFifths:nn,trFifths:rr,simplify:ar,enharmonic:St};const Tt={empty:!0,name:"",chordType:""},qn={};function $(n){return typeof n=="string"?qn[n]||(qn[n]=Mr(n)):typeof n=="number"?$(Mn[n]||""):q(n)?mr(n):z(n)?$(n.name):Tt}const sr=g("RomanNumeral.romanNumeral","RomanNumeral.get",$);function cr(n=!0){return(n?Mn:dr).slice()}function mr(n){return $(E(n.alt)+Mn[n.step])}const ur=/^(#{1,}|b{1,}|x{1,}|)(IV|I{1,3}|VI{0,2}|iv|i{1,3}|vi{0,2})([^IViv]*)$/;function lr(n){return ur.exec(n)||["","","",""]}const Vt="I II III IV V VI VII",Mn=Vt.split(" "),dr=Vt.toLowerCase().split(" ");function Mr(n){const[t,e,o,r]=lr(n);if(!o)return Tt;const i=o.toUpperCase(),a=Mn.indexOf(i),s=G(e),c=1;return{empty:!1,name:t,roman:o,interval:f({step:a,alt:s,dir:c}).name,acc:e,chordType:r,alt:s,step:a,major:o===i,oct:0,dir:c}}var fr={names:cr,get:$,romanNumeral:sr};const b=Object.freeze([]),_t={type:"major",tonic:"",alteration:0,keySignature:""},J={tonic:"",grades:b,intervals:b,scale:b,chords:b,chordsHarmonicFunction:b,chordScales:b},Pr={..._t,...J,type:"major",minorRelative:"",scale:b,secondaryDominants:b,secondaryDominantsMinorRelative:b,substituteDominants:b,substituteDominantsMinorRelative:b},pr={..._t,type:"minor",relativeMajor:"",natural:J,harmonic:J,melodic:J},Gn=(n,t,e="")=>t.map((o,r)=>`${n[r]}${e}${o}`);function fn(n,t,e,o){return r=>{const i=n.map(s=>$(s).interval||""),a=i.map(s=>P(r,s));return{tonic:r,grades:n,intervals:i,scale:a,chords:Gn(a,t),chordsHarmonicFunction:e.slice(),chordScales:Gn(a,o," ")}}}const Ct=(n,t)=>{const e=m(n),o=m(t);return e.empty||o.empty?0:o.coord[0]-e.coord[0]},hr=fn("I II III IV V VI VII".split(" "),"maj7 m7 m7 maj7 7 m7 m7b5".split(" "),"T SD T SD D T D".split(" "),"major,dorian,phrygian,lydian,mixolydian,minor,locrian".split(",")),yr=fn("I II bIII IV V bVI bVII".split(" "),"m7 m7b5 maj7 m7 m7 maj7 7".split(" "),"T SD T SD D SD SD".split(" "),"minor,locrian,major,dorian,phrygian,lydian,mixolydian".split(",")),gr=fn("I II bIII IV V bVI VII".split(" "),"mMaj7 m7b5 +maj7 m7 7 maj7 o7".split(" "),"T SD T SD D SD D".split(" "),"harmonic minor,locrian 6,major augmented,lydian diminished,phrygian dominant,lydian #9,ultralocrian".split(",")),br=fn("I II bIII IV V VI VII".split(" "),"m6 m7 +maj7 7 7 m7b5 m7b5".split(" "),"T SD T SD D ".split(" "),"melodic minor,dorian b2,lydian augmented,lydian dominant,mixolydian b6,locrian #2,altered".split(","));function Ar(n){const t=m(n).pc;if(!t)return Pr;const e=hr(t),o=Ct("C",t),r=i=>{const a=$(i);return a.empty?"":P(n,a.interval)+a.chordType};return{...e,type:"major",minorRelative:P(t,"-3m"),alteration:o,keySignature:E(o),secondaryDominants:"- VI7 VII7 I7 II7 III7 -".split(" ").map(r),secondaryDominantsMinorRelative:"- IIIm7b5 IV#m7 Vm7 VIm7 VIIm7b5 -".split(" ").map(r),substituteDominants:"- bIII7 IV7 bV7 bVI7 bVII7 -".split(" ").map(r),substituteDominantsMinorRelative:"- IIIm7 Im7 IIbm7 VIm7 IVm7 -".split(" ").map(r)}}function vr(n){const t=m(n).pc;if(!t)return pr;const e=Ct("C",t)-3;return{type:"minor",tonic:t,relativeMajor:P(t,"3m"),alteration:e,keySignature:E(e),natural:yr(t),harmonic:gr(t),melodic:br(t)}}function $r(n){return typeof n=="number"?nn("C",n):typeof n=="string"&&/^b+|#+$/.test(n)?nn("C",G(n)):null}var Nr={majorKey:Ar,majorTonicFromKeySignature:$r,minorKey:vr};const wn=[[0,2773,0,"ionian","","Maj7","major"],[1,2902,2,"dorian","m","m7"],[2,3418,4,"phrygian","m","m7"],[3,2741,-1,"lydian","","Maj7"],[4,2774,1,"mixolydian","","7"],[5,2906,3,"aeolian","m","m7","minor"],[6,3434,5,"locrian","dim","m7b5"]],Bn={...T,name:"",alt:0,modeNum:NaN,triad:"",seventh:"",aliases:[]},xn=wn.map(Tr),An={};xn.forEach(n=>{An[n.name]=n,n.aliases.forEach(t=>{An[t]=n})});function V(n){return typeof n=="string"?An[n.toLowerCase()]||Bn:n&&n.name?V(n.name):Bn}const Ir=g("Mode.mode","Mode.get",V);function wt(){return xn.slice()}const jr=g("Mode.mode","Mode.all",wt);function Sr(){return xn.map(n=>n.name)}function Tr(n){const[t,e,o,r,i,a,s]=n,c=s?[s]:[],l=Number(e).toString(2);return{empty:!1,intervals:un(r).intervals,modeNum:t,chroma:l,normalized:l,name:r,setNum:e,alt:o,triad:i,seventh:a,aliases:c}}function Vr(n,t){return V(n).intervals.map(e=>P(t,e))}function xt(n){return(t,e)=>{const o=V(t);if(o.empty)return[];const r=H(o.modeNum,n),i=o.intervals.map(a=>P(e,a));return r.map((a,s)=>i[s]+a)}}const _r=xt(wn.map(n=>n[4])),Cr=xt(wn.map(n=>n[5]));function Et(n,t){const e=V(t),o=V(n);return e.empty||o.empty?"":ft(pt("1P",o.alt-e.alt))}function wr(n,t,e){return P(e,Et(n,t))}var xr={get:V,names:Sr,all:wt,distance:Et,relativeTonic:wr,notes:Vr,triads:_r,seventhChords:Cr,entries:jr,mode:Ir};function Er(n,t){return t.map($).map(o=>P(n,f(o))+o.chordType)}function Dr(n,t){return t.map(e=>{const[o,r]=ln(e),i=D(n,o);return $(f(i)).name+r})}var kr={fromRomanNumerals:Er,toRomanNumerals:Dr};function Dt(n){const t=Nn(n.map(gt));return!n.length||t.length!==n.length?[]:t.reduce((e,o)=>{const r=e[e.length-1];return e.concat(an(r,o).slice(1))},[t[0]])}function Rr(n,t){return Dt(n).map(e=>I(e,t))}var Or={numeric:Dt,chromatic:Rr};const Fr={empty:!0,name:"",type:"",tonic:null,setNum:NaN,chroma:"",normalized:"",aliases:[],notes:[],intervals:[]};function kt(n){if(typeof n!="string")return["",""];const t=n.indexOf(" "),e=m(n.substring(0,t));if(e.empty){const r=m(n);return r.empty?["",n]:[r.name,""]}const o=n.substring(e.name.length+1);return[e.name,o.length?o:""]}const zr=ut;function N(n){const t=Array.isArray(n)?n:kt(n),e=m(t[0]).name,o=un(t[1]);if(o.empty)return Fr;const r=o.name,i=e?o.intervals.map(s=>P(e,s)):[],a=e?e+" "+r:r;return{...o,name:a,type:r,tonic:e,notes:i}}const qr=g("Scale.scale","Scale.get",N);function Gr(n){const t=N(n),e=sn(t.chroma);return R().filter(o=>e(o.chroma)).map(o=>o.aliases[0])}function Br(n){const t=N(n),e=cn(t.chroma);return L().filter(o=>e(o.chroma)).map(o=>o.name)}function Hr(n){const t=sn(N(n).chroma);return L().filter(e=>t(e.chroma)).map(e=>e.name)}function Rt(n){const t=n.map(r=>m(r).pc).filter(r=>r),e=t[0],o=jt(t);return H(o.indexOf(e),o)}function Lr(n){const t=N(n);if(t.empty)return[];const e=t.tonic?t.notes:t.intervals;return jn(t.chroma).map((o,r)=>{const i=N(o).name;return i?[e[r],i]:["",""]}).filter(o=>o[0])}function Ur(n){const t=Array.isArray(n)?Rt(n):N(n).notes,e=t.map(o=>m(o).chroma);return o=>{const r=m(typeof o=="number"?vt(o):o),i=r.height;if(i===void 0)return;const a=i%12,s=e.indexOf(a);if(s!==-1)return St(r.name,t[s])}}function Xr(n){const t=Ur(n);return(e,o)=>{const r=m(e).height,i=m(o).height;return r===void 0||i===void 0?[]:an(r,i).map(t).filter(a=>a)}}var tn={get:N,names:zr,extended:Br,modeNames:Lr,reduced:Hr,scaleChords:Gr,scaleNotes:Rt,tokenize:kt,rangeOf:Xr,scale:qr};const Kr={empty:!0,name:"",upper:void 0,lower:void 0,type:void 0,additive:[]},Qr=["4/4","3/4","2/4","2/2","12/8","9/8","6/8","3/8"];function Yr(){return Qr.slice()}const Zr=/^(\d?\d(?:\+\d)*)\/(\d)$/,Hn=new Map;function Jr(n){const t=Hn.get(n);if(t)return t;const e=ni(En(n));return Hn.set(n,e),e}function En(n){if(typeof n=="string"){const[i,a,s]=Zr.exec(n)||[];return En([a,s])}const[t,e]=n,o=+e;if(typeof t=="number")return[t,o];const r=t.split("+").map(i=>+i);return r.length===1?[r[0],o]:[r,o]}var Wr={names:Yr,parse:En,get:Jr};function ni([n,t]){const e=Array.isArray(n)?n.reduce((s,c)=>s+c,0):n,o=t;if(e===0||o===0)return Kr;const r=Array.isArray(n)?`${n.join("+")}/${t}`:`${n}/${t}`,i=Array.isArray(n)?n:[],a=o===4||o===2?"simple":o===8&&e%3===0?"compound":"irregular";return{empty:!1,name:r,type:a,upper:e,lower:o,additive:i}}const ti=Wn,ei=st,oi=mt,ri=dt,ii=Object.freeze(Object.defineProperty({__proto__:null,Array:Ae,Core:Wn,ChordDictionary:oi,PcSet:ei,ScaleDictionary:ri,Tonal:ti,AbcNotation:Me,Chord:fo,ChordType:mt,Collection:Ie,DurationValue:vo,Interval:bn,Key:Nr,Midi:Go,Mode:xr,Note:w,Pcset:st,Progression:kr,Range:Or,RomanNumeral:fr,Scale:tn,ScaleType:dt,TimeSignature:Wr,accToAlt:G,altToAcc:E,coordToInterval:B,coordToNote:F,decode:on,deprecate:g,distance:D,encode:en,fillStr:C,interval:f,isNamed:z,isPitch:q,note:m,stepToLetter:vn,tokenizeInterval:$n,tokenizeNote:rn,transpose:P},Symbol.toStringTag,{value:"Module"}));function Ot(n,t,e){let[o,r]=tn.tokenize(n),{notes:i}=tn.get(`${o} ${r}`);if(i=i.map(h=>w.get(h).pc),t=Number(t),isNaN(t))throw new Error(`scale offset "${t}" not a number`);const{pc:a,oct:s=3}=w.get(e),c=i.indexOf(a);if(c===-1)throw new Error(`note "${e}" is not in scale "${n}"`);let l=c,u=s,d=a;const M=Math.sign(t);for(;Math.abs(l-c)0&&d[0]==="C"&&(u+=M)}return d+u}_.prototype._transpose=function(n){return this._withHap(t=>{const e=isNaN(Number(n))?String(n):bn.fromSemitones(n);if(typeof t.value=="number"){const o=typeof e=="string"?bn.semitones(e)||0:e;return t.withValue(()=>t.value+o)}return t.withValue(()=>w.simplify(w.transpose(t.value,e)))})};_.prototype._scaleTranspose=function(n){return this._withHap(t=>{if(!t.context.scale)throw new Error("can only use scaleTranspose after .scale");if(typeof t.value!="string")throw new Error("can only use scaleTranspose with notes");return t.withValue(()=>Ot(t.context.scale,Number(n),t.value))})};_.prototype._scale=function(n){return this._withHap(t=>{let e=t.value;const o=Number(e);if(!isNaN(o)){let[r,i]=tn.tokenize(n);const{pc:a,oct:s=3}=w.get(r);e=Ot(a+" "+i,o,a+s)}return t.withValue(()=>e).setContext({...t.context,scale:n})})};_.prototype.define("transpose",(n,t)=>t.transpose(n),{composable:!0,patternified:!0});_.prototype.define("scale",(n,t)=>t.scale(n),{composable:!0,patternified:!0});_.prototype.define("scaleTranspose",(n,t)=>t.scaleTranspose(n),{composable:!0,patternified:!0});var Ft={},hn={},X={};X.__esModule=!0;X.getBestVoicing=void 0;function ai(n){var t=n.chord,e=n.range,o=n.finder,r=n.picker,i=n.lastVoicing,a=o(t,e);return a.length?r(a,i):[]}X.getBestVoicing=ai;var O={};const zt=Ut(ii);var K={};K.__esModule=!0;K.tokenizeChord=void 0;function si(n){var t=(n||"").match(/^([A-G][b#]*)([^\/]*)[\/]?([A-G][b#]*)?$/);return t?t.slice(1):[]}K.tokenizeChord=si;var Ln;function ci(){if(Ln)return O;Ln=1,O.__esModule=!0,O.voicingsInRange=void 0;var n=zt,t=qt(),e=K;function o(r,i,a){i===void 0&&(i=t.lefthand),a===void 0&&(a=["D3","A4"]);var s=(0,e.tokenizeChord)(r),c=s[0],l=s[1];if(!i[l])return[];var u=i[l].map(function(M){return M.split(" ")}),d=n.Range.chromatic(a);return u.reduce(function(M,h){var A=h.map(function(v){return n.Interval.substract(v,h[0])}),Q=n.Note.transpose(c,h[0]),Gt=d.filter(function(v){return n.Note.chroma(v)===n.Note.chroma(Q)}).filter(function(v){return n.Note.midi(n.Note.transpose(v,A[A.length-1]))<=n.Note.midi(a[1])}).map(function(v){return n.Note.enharmonic(v,Q)}),Bt=Gt.map(function(v){return A.map(function(Ht){return n.Note.transpose(v,Ht)})});return M.concat(Bt)},[])}return O.voicingsInRange=o,O}var Un;function qt(){return Un||(Un=1,function(n){var t=Y&&Y.__assign||function(){return t=Object.assign||function(s){for(var c,l=1,u=arguments.length;lui({chord:n,dictionary:di,range:e,picker:li,lastVoicing:t}),x=_;x.prototype.fmapNested=function(n){return new x(t=>this.query(t).map(e=>Kt(n(e)).query(t).map(o=>new Qt(e.whole,e.part,o.value,o.context))).flat())};x.prototype.voicings=function(n){let t;return n!=null&&n.length||(n=["F3","A4"]),this.fmapNested(e=>(t=Mi(e.value,t,n),Yt(...t)._withContext(()=>({locations:e.context.locations||[]}))))};x.prototype._rootNotes=function(n=2){return this.fmap(t=>{const[e,o]=t.match(/^([a-gA-G][b#]?).*$/);return o+n})};x.prototype.define("voicings",(n,t)=>t.voicings(n),{composable:!0});x.prototype.define("rootNotes",(n,t)=>t.rootNotes(n),{composable:!0,patternified:!0}); diff --git a/packages/core/examples/vite-vanilla-repl/dist/assets/index.b66fb637.js b/packages/core/examples/vite-vanilla-repl/dist/assets/index.b12de8ae.js similarity index 82% rename from packages/core/examples/vite-vanilla-repl/dist/assets/index.b66fb637.js rename to packages/core/examples/vite-vanilla-repl/dist/assets/index.b12de8ae.js index 3e89ede1..c001b094 100644 --- a/packages/core/examples/vite-vanilla-repl/dist/assets/index.b66fb637.js +++ b/packages/core/examples/vite-vanilla-repl/dist/assets/index.b12de8ae.js @@ -1 +1 @@ -import{g as s,b as d,e as t,j as u,l as o,f as r,p as f,i as p,d as g,h as i,w as l,a as m}from"./index.f88145a1.js";export{s as getAudioContext,d as getCachedBuffer,t as getLoadedBuffer,u as getLoadedSamples,o as loadBuffer,r as loadGithubSamples,f as panic,p as resetLoadedSamples,g as reverseBuffer,i as samples,l as webaudioOutput,m as webaudioOutputTrigger}; +import{g as s,b as d,e as t,j as u,l as o,f as r,p as f,i as p,d as g,h as i,w as l,a as m}from"./index.f17ed672.js";export{s as getAudioContext,d as getCachedBuffer,t as getLoadedBuffer,u as getLoadedSamples,o as loadBuffer,r as loadGithubSamples,f as panic,p as resetLoadedSamples,g as reverseBuffer,i as samples,l as webaudioOutput,m as webaudioOutputTrigger}; diff --git a/packages/core/examples/vite-vanilla-repl/dist/assets/index.d9f8bbbd.js b/packages/core/examples/vite-vanilla-repl/dist/assets/index.f09cc89e.js similarity index 99% rename from packages/core/examples/vite-vanilla-repl/dist/assets/index.d9f8bbbd.js rename to packages/core/examples/vite-vanilla-repl/dist/assets/index.f09cc89e.js index 5a3aae28..e9a84427 100644 --- a/packages/core/examples/vite-vanilla-repl/dist/assets/index.d9f8bbbd.js +++ b/packages/core/examples/vite-vanilla-repl/dist/assets/index.f09cc89e.js @@ -1,4 +1,4 @@ -import{c as ut,r as Se,s as pt}from"./index.f88145a1.js";function gt(a,c){function r(){this.constructor=a}r.prototype=c.prototype,a.prototype=new r}function D(a,c,r,_){var p=Error.call(this,a);return Object.setPrototypeOf&&Object.setPrototypeOf(p,D.prototype),p.expected=c,p.found=r,p.location=_,p.name="SyntaxError",p}gt(D,Error);function U(a,c,r){return r=r||" ",a.length>c?a:(c-=a.length,r+=r.repeat(c),a+r.slice(0,c))}D.prototype.format=function(a){var c="Error: "+this.message;if(this.location){var r=null,_;for(_=0;_c?a:(c-=a.length,r+=r.repeat(c),a+r.slice(0,c))}D.prototype.format=function(a){var c="Error: "+this.message;if(this.location){var r=null,_;for(_=0;_ `+$+` `+A+` | `+p.line+" | "+E+` diff --git a/packages/core/examples/vite-vanilla-repl/dist/assets/index.f17ed672.js b/packages/core/examples/vite-vanilla-repl/dist/assets/index.f17ed672.js new file mode 100644 index 00000000..72891292 --- /dev/null +++ b/packages/core/examples/vite-vanilla-repl/dist/assets/index.f17ed672.js @@ -0,0 +1,64 @@ +var je=Object.defineProperty;var Ue=(e,t,r)=>t in e?je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ge=(e,t,r)=>(Ue(e,typeof t!="symbol"?t+"":t,r),r);const strudel=Object.freeze(Object.defineProperty({__proto__:null,get Fraction(){return fraction},get controls(){return controls},get drawLine(){return drawLine},get gist(){return gist},get Hap(){return Hap},get Pattern(){return Pattern$2},get polyrhythm(){return polyrhythm},get pr(){return pr},get silence(){return silence},get pure(){return pure},get isPattern(){return isPattern$1},get reify(){return reify$1},get stack(){return stack},get slowcat(){return slowcat},get slowcatPrime(){return slowcatPrime},get fastcat(){return fastcat},get cat(){return cat},get timeCat(){return timeCat},get sequence(){return sequence},get seq(){return seq},get polymeterSteps(){return polymeterSteps},get polymeter(){return polymeter},get pm(){return pm},get add(){return add},get chop(){return chop},get chunk(){return chunk},get chunkBack(){return chunkBack},get div(){return div},get early(){return early},get echo(){return echo},get every(){return every},get fast(){return fast},get inv(){return inv},get invert(){return invert},get iter(){return iter},get iterBack(){return iterBack},get jux(){return jux},get juxBy(){return juxBy},get late(){return late},get linger(){return linger},get mask(){return mask},get mul(){return mul},get off(){return off},get ply(){return ply},get range(){return range},get rangex(){return rangex},get range2(){return range2},get rev(){return rev},get slow(){return slow},get struct(){return struct},get sub(){return sub},get superimpose(){return superimpose},get set(){return set},get when(){return when},get makeComposable(){return makeComposable},get patternify2(){return patternify2},get patternify3(){return patternify3},get patternify4(){return patternify4},get steady(){return steady},get signal(){return signal},get isaw(){return isaw},get isaw2(){return isaw2},get saw(){return saw},get saw2(){return saw2},get sine2(){return sine2},get sine(){return sine},get cosine(){return cosine},get cosine2(){return cosine2},get square(){return square},get square2(){return square2},get tri(){return tri},get tri2(){return tri2},get time(){return time},get rand(){return rand},get rand2(){return rand2},get _brandBy(){return _brandBy},get brandBy(){return brandBy},get brand(){return brand},get _irand(){return _irand},get irand(){return irand},get __chooseWith(){return __chooseWith},get chooseWith(){return chooseWith},get chooseInWith(){return chooseInWith},get choose(){return choose},get chooseCycles(){return chooseCycles},get randcat(){return randcat},get wchoose(){return wchoose},get wchooseCycles(){return wchooseCycles},get perlinWith(){return perlinWith},get perlin(){return perlin},get State(){return State},get TimeSpan(){return TimeSpan},get isNote(){return isNote},get tokenizeNote(){return tokenizeNote},get toMidi(){return toMidi},get fromMidi(){return fromMidi},get getFreq(){return getFreq},get midi2note(){return midi2note},get mod(){return mod},get getPlayableNoteValue(){return getPlayableNoteValue},get getFrequency(){return getFrequency},get rotate(){return rotate},get pipe(){return pipe},get compose(){return compose},get removeUndefineds(){return removeUndefineds},get flatten(){return flatten},get id(){return id},get constant(){return constant},get listRange(){return listRange},get curry(){return curry},get parseNumeral(){return parseNumeral},get mapArgs(){return mapArgs},get numeralArgs(){return numeralArgs},get parseFractional(){return parseFractional},get fractionalArgs(){return fractionalArgs},get evalScope(){return evalScope},get evaluate(){return evaluate$1},get repl(){return repl}},Symbol.toStringTag,{value:"Module"}));(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerpolicy&&(a.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?a.credentials="include":s.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(s){if(s.ep)return;s.ep=!0;const a=r(s);fetch(s.href,a)}})();const scriptRel="modulepreload",assetsURL=function(e){return"/tidalcycles/strudel/general-purpose-scheduler/packages/core/examples/vite-vanilla-repl/dist/"+e},seen={},__vitePreload=function(t,r,n){if(!r||r.length===0)return t();const s=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=assetsURL(a),a in seen)return;seen[a]=!0;const o=a.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!n)for(let m=s.length-1;m>=0;m--){const v=s[m];if(v.href===a&&(!o||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${l}`))return;const y=document.createElement("link");if(y.rel=o?"stylesheet":scriptRel,o||(y.as="script",y.crossOrigin=""),y.href=a,document.head.appendChild(y),o)return new Promise((m,v)=>{y.addEventListener("load",m),y.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){var t=e.default;if(typeof t=="function"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var fraction$1={exports:{}};/** + * @license Fraction.js v4.2.0 05/03/2022 + * https://www.xarg.org/2014/03/rational-numbers-in-javascript/ + * + * Copyright (c) 2021, Robert Eisele (robert@xarg.org) + * Dual licensed under the MIT or GPL Version 2 licenses. + **/(function(e,t){(function(r){var n=2e3,s={s:1,n:0,d:1};function a(g,d){if(isNaN(g=parseInt(g,10)))throw E.InvalidParameter;return g*d}function o(g,d){if(d===0)throw E.DivisionByZero;var D=Object.create(E.prototype);D.s=g<0?-1:1,g=g<0?-g:g;var S=A(g,d);return D.n=g/S,D.d=d/S,D}function l(g){for(var d={},D=g,S=2,k=4;k<=D;){for(;D%S===0;)D/=S,d[S]=(d[S]||0)+1;k+=1+2*S++}return D!==g?D>1&&(d[D]=(d[D]||0)+1):d[g]=(d[g]||0)+1,d}var f=function(g,d){var D=0,S=1,k=1,N=0,b=0,F=0,B=1,_=1,x=0,$=1,T=1,V=1,M=1e7,L;if(g!=null)if(d!==void 0){if(D=g,S=d,k=D*S,D%1!==0||S%1!==0)throw E.NonIntegerParameter}else switch(typeof g){case"object":{if("d"in g&&"n"in g)D=g.n,S=g.d,"s"in g&&(D*=g.s);else if(0 in g)D=g[0],1 in g&&(S=g[1]);else throw E.InvalidParameter;k=D*S;break}case"number":{if(g<0&&(k=g,g=-g),g%1===0)D=g;else if(g>0){for(g>=1&&(_=Math.pow(10,Math.floor(1+Math.log(g)/Math.LN10)),g/=_);$<=M&&V<=M;)if(L=(x+T)/($+V),g===L){$+V<=M?(D=x+T,S=$+V):V>$?(D=T,S=V):(D=x,S=$);break}else g>L?(x+=T,$+=V):(T+=x,V+=$),$>M?(D=T,S=V):(D=x,S=$);D*=_}else(isNaN(g)||isNaN(d))&&(S=D=NaN);break}case"string":{if($=g.match(/\d+|./g),$===null)throw E.InvalidParameter;if($[x]==="-"?(k=-1,x++):$[x]==="+"&&x++,$.length===x+1?b=a($[x++],k):$[x+1]==="."||$[x]==="."?($[x]!=="."&&(N=a($[x++],k)),x++,(x+1===$.length||$[x+1]==="("&&$[x+3]===")"||$[x+1]==="'"&&$[x+3]==="'")&&(b=a($[x],k),B=Math.pow(10,$[x].length),x++),($[x]==="("&&$[x+2]===")"||$[x]==="'"&&$[x+2]==="'")&&(F=a($[x+1],k),_=Math.pow(10,$[x+1].length)-1,x+=3)):$[x+1]==="/"||$[x+1]===":"?(b=a($[x],k),B=a($[x+2],1),x+=3):$[x+3]==="/"&&$[x+1]===" "&&(N=a($[x],k),b=a($[x+2],k),B=a($[x+4],1),x+=5),$.length<=x){S=B*_,k=D=F+S*N+_*b;break}}default:throw E.InvalidParameter}if(S===0)throw E.DivisionByZero;s.s=k<0?-1:1,s.n=Math.abs(D),s.d=Math.abs(S)};function y(g,d,D){for(var S=1;d>0;g=g*g%D,d>>=1)d&1&&(S=S*g%D);return S}function m(g,d){for(;d%2===0;d/=2);for(;d%5===0;d/=5);if(d===1)return 0;for(var D=10%d,S=1;D!==1;S++)if(D=D*10%d,S>n)return 0;return S}function v(g,d,D){for(var S=1,k=y(10,D,d),N=0;N<300;N++){if(S===k)return N;S=S*10%d,k=k*10%d}return 0}function A(g,d){if(!g)return d;if(!d)return g;for(;;){if(g%=d,!g)return d;if(d%=g,!d)return g}}function E(g,d){if(f(g,d),this instanceof E)g=A(s.d,s.n),this.s=s.s,this.n=s.n/g,this.d=s.d/g;else return o(s.s*s.n,s.d)}E.DivisionByZero=new Error("Division by Zero"),E.InvalidParameter=new Error("Invalid argument"),E.NonIntegerParameter=new Error("Parameters must be integer"),E.prototype={s:1,n:0,d:1,abs:function(){return o(this.n,this.d)},neg:function(){return o(-this.s*this.n,this.d)},add:function(g,d){return f(g,d),o(this.s*this.n*s.d+s.s*this.d*s.n,this.d*s.d)},sub:function(g,d){return f(g,d),o(this.s*this.n*s.d-s.s*this.d*s.n,this.d*s.d)},mul:function(g,d){return f(g,d),o(this.s*s.s*this.n*s.n,this.d*s.d)},div:function(g,d){return f(g,d),o(this.s*s.s*this.n*s.d,this.d*s.n)},clone:function(){return o(this.s*this.n,this.d)},mod:function(g,d){if(isNaN(this.n)||isNaN(this.d))return new E(NaN);if(g===void 0)return o(this.s*this.n%this.d,1);if(f(g,d),s.n===0&&this.d===0)throw E.DivisionByZero;return o(this.s*(s.d*this.n)%(s.n*this.d),s.d*this.d)},gcd:function(g,d){return f(g,d),o(A(s.n,this.n)*A(s.d,this.d),s.d*this.d)},lcm:function(g,d){return f(g,d),s.n===0&&this.n===0?o(0,1):o(s.n*this.n,A(s.n,this.n)*A(s.d,this.d))},ceil:function(g){return g=Math.pow(10,g||0),isNaN(this.n)||isNaN(this.d)?new E(NaN):o(Math.ceil(g*this.s*this.n/this.d),g)},floor:function(g){return g=Math.pow(10,g||0),isNaN(this.n)||isNaN(this.d)?new E(NaN):o(Math.floor(g*this.s*this.n/this.d),g)},round:function(g){return g=Math.pow(10,g||0),isNaN(this.n)||isNaN(this.d)?new E(NaN):o(Math.round(g*this.s*this.n/this.d),g)},inverse:function(){return o(this.s*this.d,this.n)},pow:function(g,d){if(f(g,d),s.d===1)return s.s<0?o(Math.pow(this.s*this.d,s.n),Math.pow(this.n,s.n)):o(Math.pow(this.s*this.n,s.n),Math.pow(this.d,s.n));if(this.s<0)return null;var D=l(this.n),S=l(this.d),k=1,N=1;for(var b in D)if(b!=="1"){if(b==="0"){k=0;break}if(D[b]*=s.n,D[b]%s.d===0)D[b]/=s.d;else return null;k*=Math.pow(b,D[b])}for(var b in S)if(b!=="1"){if(S[b]*=s.n,S[b]%s.d===0)S[b]/=s.d;else return null;N*=Math.pow(b,S[b])}return s.s<0?o(N,k):o(k,N)},equals:function(g,d){return f(g,d),this.s*this.n*s.d===s.s*s.n*this.d},compare:function(g,d){f(g,d);var D=this.s*this.n*s.d-s.s*s.n*this.d;return(0=0;N--)k=k.inverse().add(D[N]);if(k.sub(d).abs().valueOf()0&&(D+=d,D+=" ",S%=k),D+=S,D+="/",D+=k),D},toLatex:function(g){var d,D="",S=this.n,k=this.d;return this.s<0&&(D+="-"),k===1?D+=S:(g&&(d=Math.floor(S/k))>0&&(D+=d,S%=k),D+="\\frac{",D+=S,D+="}{",D+=k,D+="}"),D},toContinued:function(){var g,d=this.n,D=this.d,S=[];if(isNaN(d)||isNaN(D))return S;do S.push(Math.floor(d/D)),g=d%D,d=D,D=g;while(d!==1);return S},toString:function(g){var d=this.n,D=this.d;if(isNaN(d)||isNaN(D))return"NaN";g=g||15;var S=m(d,D),k=v(d,D,S),N=this.s<0?"-":"";if(N+=d/D|0,d%=D,d*=10,d&&(N+="."),S){for(var b=k;b--;)N+=d/D|0,d%=D,d*=10;N+="(";for(var b=S;b--;)N+=d/D|0,d%=D,d*=10;N+=")"}else for(var b=g;d&&b--;)N+=d/D|0,d%=D,d*=10;return N}},Object.defineProperty(E,"__esModule",{value:!0}),E.default=E,E.Fraction=E,e.exports=E})()})(fraction$1);const Fraction=getDefaultExportFromCjs(fraction$1.exports);Fraction.prototype.sam=function(){return this.floor()};Fraction.prototype.nextSam=function(){return this.sam().add(1)};Fraction.prototype.wholeCycle=function(){return new TimeSpan(this.sam(),this.nextSam())};Fraction.prototype.cyclePos=function(){return this.sub(this.sam())};Fraction.prototype.lt=function(e){return this.compare(e)<0};Fraction.prototype.gt=function(e){return this.compare(e)>0};Fraction.prototype.lte=function(e){return this.compare(e)<=0};Fraction.prototype.gte=function(e){return this.compare(e)>=0};Fraction.prototype.eq=function(e){return this.compare(e)==0};Fraction.prototype.max=function(e){return this.gt(e)?this:e};Fraction.prototype.min=function(e){return this.lt(e)?this:e};Fraction.prototype.show=function(){return this.s*this.n+"/"+this.d};Fraction.prototype.or=function(e){return this.eq(0)?e:this};const fraction=e=>(typeof e=="number"&&(e=String(e)),Fraction(e)),gcd=(...e)=>e.reduce((t,r)=>t.gcd(r),fraction(1));fraction._original=Fraction;class TimeSpan{constructor(t,r){this.begin=fraction(t),this.end=fraction(r)}get spanCycles(){const t=[];var r=this.begin;const n=this.end,s=n.sam();if(r.equals(n))return[new TimeSpan(r,n)];for(;n.gt(r);){if(r.sam().equals(s)){t.push(new TimeSpan(r,this.end));break}const a=r.nextSam();t.push(new TimeSpan(r,a)),r=a}return t}get duration(){return this.end.sub(this.begin)}cycleArc(){const t=this.begin.cyclePos(),r=t.add(this.duration);return new TimeSpan(t,r)}withTime(t){return new TimeSpan(t(this.begin),t(this.end))}withEnd(t){return new TimeSpan(this.begin,t(this.end))}withCycle(t){const r=this.begin.sam(),n=r.add(t(this.begin.sub(r))),s=r.add(t(this.end.sub(r)));return new TimeSpan(n,s)}intersection(t){const r=this.begin.max(t.begin),n=this.end.min(t.end);if(!r.gt(n)&&!(r.equals(n)&&(r.equals(this.end)&&this.begin.lt(this.end)||r.equals(t.end)&&t.begin.lt(t.end))))return new TimeSpan(r,n)}intersection_e(t){const r=this.intersection(t);if(r==null)throw"TimeSpans do not intersect";return r}midpoint(){return this.begin.add(this.duration.div(fraction(2)))}equals(t){return this.begin.equals(t.begin)&&this.end.equals(t.end)}show(){return this.begin.show()+" -> "+this.end.show()}}class Hap{constructor(t,r,n,s={},a=!1){this.whole=t,this.part=r,this.value=n,this.context=s,this.stateful=a,a&&console.assert(typeof this.value=="function","Stateful values must be functions")}get duration(){return this.whole.end.sub(this.whole.begin)}wholeOrPart(){return this.whole?this.whole:this.part}withSpan(t){const r=this.whole?t(this.whole):void 0;return new Hap(r,t(this.part),this.value,this.context)}withValue(t){return new Hap(this.whole,this.part,t(this.value),this.context)}hasOnset(){return this.whole!=null&&this.whole.begin.equals(this.part.begin)}resolveState(t){if(this.stateful&&this.hasOnset()){console.log("stateful");const r=this.value,[n,s]=r(t);return[n,new Hap(this.whole,this.part,s,this.context,!1)]}return[t,this]}spanEquals(t){return this.whole==null&&t.whole==null||this.whole.equals(t.whole)}equals(t){return this.spanEquals(t)&&this.part.equals(t.part)&&this.value===t.value}show(){return"("+(this.whole==null?"~":this.whole.show())+", "+this.part.show()+", "+this.value+")"}showWhole(){return`${this.whole==null?"~":this.whole.show()}: ${typeof this.value=="object"?JSON.stringify(this.value):this.value}`}combineContext(t){const r=this;return{...r.context,...t.context,locations:(r.context.locations||[]).concat(t.context.locations||[])}}setContext(t){return new Hap(this.whole,this.part,this.value,t)}}class State{constructor(t,r={}){this.span=t,this.controls=r}setSpan(t){return new State(t,this.controls)}withSpan(t){return this.setSpan(t(this.span))}setControls(t){return new State(this.span,t)}}const isNote=e=>/^[a-gA-G][#b]*[0-9]$/.test(e),tokenizeNote=e=>{var s;if(typeof e!="string")return[];const[t,r="",n]=((s=e.match(/^([a-gA-G])([#bs]*)([0-9])?$/))==null?void 0:s.slice(1))||[];return t?[t,r,n?Number(n):void 0]:[]},toMidi=e=>{const[t,r,n]=tokenizeNote(e);if(!t)throw new Error('not a note: "'+e+'"');const s={c:0,d:2,e:4,f:5,g:7,a:9,b:11}[t.toLowerCase()],a=(r==null?void 0:r.split("").reduce((o,l)=>o+{"#":1,b:-1,s:1}[l],0))||0;return(Number(n)+1)*12+s+a},fromMidi=e=>Math.pow(2,(e-69)/12)*440,getFreq=e=>fromMidi(typeof e=="number"?e:toMidi(e)),midi2note=e=>{const t=Math.floor(e/12)-1;return["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"][e%12]+t},mod=(e,t)=>(e%t+t)%t,getPlayableNoteValue=e=>{let{value:t,context:r}=e;if(typeof t=="object"&&!Array.isArray(t)&&(t=t.note||t.n||t.value),typeof t=="number"&&r.type!=="frequency")t=fromMidi(e.value);else if(typeof t=="number"&&r.type==="frequency")t=e.value;else if(typeof t!="string"||!isNote(t))throw new Error("not a note: "+JSON.stringify(t));return t},getFrequency=e=>{let{value:t,context:r}=e;if(typeof t=="object")return t.freq?t.freq:getFreq(t.note||t.n||t.value);if(typeof t=="number"&&r.type!=="frequency")t=fromMidi(e.value);else if(typeof t=="string"&&isNote(t))t=fromMidi(toMidi(e.value));else if(typeof t!="number")throw new Error("not a note or frequency: "+t);return t},rotate=(e,t)=>e.slice(t).concat(e.slice(0,t)),pipe=(...e)=>e.reduce((t,r)=>(...n)=>t(r(...n)),t=>t),compose=(...e)=>pipe(...e.reverse()),removeUndefineds=e=>e.filter(t=>t!=null),flatten=e=>[].concat(...e),id=e=>e,constant=(e,t)=>e,listRange=(e,t)=>Array.from({length:t-e+1},(r,n)=>n+e);function curry(e,t){const r=function n(...s){if(s.length>=e.length)return e.apply(this,s);{const a=function(...o){return n.apply(this,s.concat(o))};return t&&t(a,s),a}};return t&&t(r,[]),r}function parseNumeral(e){const t=Number(e);if(!isNaN(t))return t;if(isNote(e))return toMidi(e);throw new Error(`cannot parse as numeral: "${e}"`)}function mapArgs(e,t){return(...r)=>e(...r.map(t))}function numeralArgs(e){return mapArgs(e,parseNumeral)}function parseFractional(e){const t=Number(e);if(!isNaN(t))return t;const r={pi:Math.PI,w:1,h:.5,q:.25,e:.125,s:.0625,t:1/3,f:.2,x:1/6}[e];if(typeof r<"u")return r;throw new Error(`cannot parse as fractional: "${e}"`)}const fractionalArgs=e=>mapArgs(e,parseFractional);function unionWithObj(e,t,r){const n=Object.keys(e).filter(s=>Object.keys(t).includes(s));return Object.assign({},e,t,Object.fromEntries(n.map(s=>[s,r(e[s],t[s])])))}curry((e,t)=>e*t);curry((e,t)=>t.map(e));function drawLine(e,t=60){let r=0,n=fraction(0),s=[""],a="";for(;s[0].lengthm.hasOnset()).map(m=>m.duration),f=gcd(...l),y=f.inverse();s=s.map(m=>m+"|"),a+="|";for(let m=0;md.whole.begin.lte(v)&&d.whole.end.gte(A)),g=E.length-s.length;g>0&&(s=s.concat(Array(g).fill(a))),s=s.map((d,D)=>{const S=E[D];if(S){const N=S.whole.begin.eq(v)?""+S.value:"-";return d+N}return d+"."}),a+=".",n=n.add(f)}r++}return s.join(` +`)}class Pattern$2{constructor(t){ge(this,"_Pattern",!0);this.query=t}queryArc(t,r){return this.query(new State(new TimeSpan(t,r)))}_splitQueries(){const t=this,r=n=>flatten(n.span.spanCycles.map(s=>t.query(n.setSpan(s))));return new Pattern$2(r)}withQuerySpan(t){return new Pattern$2(r=>this.query(r.withSpan(t)))}withQuerySpanMaybe(t){const r=this;return new Pattern$2(n=>{const s=n.withSpan(t);return s.span?r.query(s):[]})}withQueryTime(t){return new Pattern$2(r=>this.query(r.withSpan(n=>n.withTime(t))))}withHapSpan(t){return new Pattern$2(r=>this.query(r).map(n=>n.withSpan(t)))}withHapTime(t){return this.withHapSpan(r=>r.withTime(t))}_withHaps(t){return new Pattern$2(r=>t(this.query(r)))}_withHap(t){return this._withHaps(r=>r.map(t))}_setContext(t){return this._withHap(r=>r.setContext(t))}_withContext(t){return this._withHap(r=>r.setContext(t(r.context)))}_stripContext(){return this._withHap(t=>t.setContext({}))}withLocation(t,r){const n={start:{line:t[0],column:t[1],offset:t[2]},end:{line:r[0],column:r[1],offset:r[2]}};return this._withContext(s=>{const a=(s.locations||[]).concat([n]);return{...s,locations:a}})}withMiniLocation(t,r){const n={start:{line:t[0],column:t[1],offset:t[2]},end:{line:r[0],column:r[1],offset:r[2]}};return this._withContext(s=>{let a=s.locations||[];return a=a.map(({start:o,end:l})=>{const f=o.line===1?n.start.column:0;return{start:{...o,line:o.line-1+(n.start.line-1)+1,column:o.column-1+f},end:{...l,line:l.line-1+(n.start.line-1)+1,column:l.column-1+f}}}),{...s,locations:a}})}withValue(t){return new Pattern$2(r=>this.query(r).map(n=>n.withValue(t)))}fmap(t){return this.withValue(t)}_filterHaps(t){return new Pattern$2(r=>this.query(r).filter(t))}_filterValues(t){return new Pattern$2(r=>this.query(r).filter(n=>t(n.value)))}_removeUndefineds(){return this._filterValues(t=>t!=null)}onsetsOnly(){return this._filterHaps(t=>t.hasOnset())}discreteOnly(){return this._filterHaps(t=>t.whole)}_appWhole(t,r){const n=this,s=function(a){const o=n.query(a),l=r.query(a),f=function(y,m){const v=y.part.intersection(m.part);if(v!=null)return new Hap(t(y.whole,m.whole),v,y.value(m.value),m.combineContext(y))};return flatten(o.map(y=>removeUndefineds(l.map(m=>f(y,m)))))};return new Pattern$2(s)}appBoth(t){const r=function(n,s){if(!(n==null||s==null))return n.intersection_e(s)};return this._appWhole(r,t)}appLeft(t){const r=this,n=function(s){const a=[];for(const o of r.query(s)){const l=t.query(s.setSpan(o.wholeOrPart()));for(const f of l){const y=o.whole,m=o.part.intersection(f.part);if(m){const v=o.value(f.value),A=f.combineContext(o),E=new Hap(y,m,v,A);a.push(E)}}}return a};return new Pattern$2(n)}appRight(t){const r=this,n=function(s){const a=[];for(const o of t.query(s)){const l=r.query(s.setSpan(o.wholeOrPart()));for(const f of l){const y=o.whole,m=f.part.intersection(o.part);if(m){const v=f.value(o.value),A=o.combineContext(f),E=new Hap(y,m,v,A);a.push(E)}}}return a};return new Pattern$2(n)}firstCycle(t=!1){var r=this;return t||(r=r._stripContext()),r.query(new State(new TimeSpan(fraction(0),fraction(1))))}get _firstCycleValues(){return this.firstCycle().map(t=>t.value)}get _showFirstCycle(){return this.firstCycle().map(t=>`${t.value}: ${t.whole.begin.toFraction()} - ${t.whole.end.toFraction()}`)}_sortHapsByPart(){return this._withHaps(t=>t.sort((r,n)=>r.part.begin.sub(n.part.begin).or(r.part.end.sub(n.part.end)).or(r.whole.begin.sub(n.whole.begin).or(r.whole.end.sub(n.whole.end)))))}_opIn(t,r){return this.fmap(r).appLeft(reify$1(t))}_opOut(t,r){return this.fmap(r).appRight(reify$1(t))}_opMix(t,r){return this.fmap(r).appBoth(reify$1(t))}_opSqueeze(t,r){const n=reify$1(t);return this.fmap(s=>n.fmap(a=>r(s)(a)))._squeezeJoin()}_opSqueezeOut(t,r){const n=this;return reify$1(t).fmap(a=>n.fmap(o=>r(o)(a)))._squeezeJoin()}_opTrig(t,r){return reify$1(t).fmap(s=>this.fmap(a=>r(a)(s)))._trigJoin()}_opTrigzero(t,r){return reify$1(t).fmap(s=>this.fmap(a=>r(a)(s)))._TrigzeroJoin()}_asNumber(){return this.fmap(parseNumeral)}round(){return this._asNumber().fmap(t=>Math.round(t))}floor(){return this._asNumber().fmap(t=>Math.floor(t))}ceil(){return this._asNumber().fmap(t=>Math.ceil(t))}_toBipolar(){return this.fmap(t=>t*2-1)}_fromBipolar(){return this.fmap(t=>(t+1)/2)}_range(t,r){return this.mul(r-t).add(t)}_rangex(t,r){return this._range(Math.log(t),Math.log(r)).fmap(Math.exp)}_range2(t,r){return this._fromBipolar()._range(t,r)}_bindWhole(t,r){const n=this,s=function(a){const o=function(f,y){return new Hap(t(f.whole,y.whole),y.part,y.value,Object.assign({},f.context,y.context,{locations:(f.context.locations||[]).concat(y.context.locations||[])}))},l=function(f){return r(f.value).query(a.setSpan(f.part)).map(y=>o(f,y))};return flatten(n.query(a).map(f=>l(f)))};return new Pattern$2(s)}bind(t){const r=function(n,s){if(!(n==null||s==null))return n.intersection_e(s)};return this._bindWhole(r,t)}join(){return this.bind(id)}outerBind(t){return this._bindWhole((r,n)=>r,t)}outerJoin(){return this.outerBind(id)}innerBind(t){return this._bindWhole((r,n)=>n,t)}innerJoin(){return this.innerBind(id)}_trigJoin(t=!1){const r=this;return new Pattern$2(n=>r.discreteOnly().query(n).map(s=>s.value.late(t?s.whole.begin:s.whole.begin.cyclePos()).query(n).map(a=>new Hap(a.whole?a.whole.intersection(s.whole):void 0,a.part.intersection(s.part),a.value).setContext(s.combineContext(a))).filter(a=>a.part)).flat())}_TrigzeroJoin(){return this._trigJoin(!0)}_squeezeJoin(){const t=this;function r(n){const s=t.discreteOnly().query(n);function a(l){const y=l.value._focusSpan(l.wholeOrPart()).query(n.setSpan(l.part));function m(v,A){let E;if(A.whole&&v.whole&&(E=A.whole.intersection(v.whole),!E))return;const g=A.part.intersection(v.part);if(!g)return;const d=A.combineContext(v);return new Hap(E,g,A.value,d)}return y.map(v=>m(l,v))}return flatten(s.map(a)).filter(l=>l)}return new Pattern$2(r)}_squeezeBind(t){return this.fmap(t)._squeezeJoin()}_apply(t){return t(this)}layer(...t){return stack(...t.map(r=>r(this)))}_patternify(t){const r=this;return function(...s){return s=s.map(o=>isPattern$1(o)?o.fmap(l=>l.value||l):o),sequence(...s).fmap(o=>t.call(r,o)).innerJoin()}}_fastGap(t){const r=function(s){const a=s.begin.sam(),o=s.begin.sub(a).mul(t).min(1),l=s.end.sub(a).mul(t).min(1);if(!(o>=1))return new TimeSpan(a.add(o),a.add(l))},n=function(s){const a=s.part.begin,o=s.part.end,l=a.sam(),f=a.sub(l).div(t).min(1),y=o.sub(l).div(t).min(1),m=new TimeSpan(l.add(f),l.add(y)),v=s.whole?new TimeSpan(m.begin.sub(a.sub(s.whole.begin).div(t)),m.end.add(s.whole.end.sub(o).div(t))):void 0;return new Hap(v,m,s.value,s.context)};return this.withQuerySpanMaybe(r)._withHap(n)._splitQueries()}_compress(t,r){return t.gt(r)||t.gt(1)||r.gt(1)||t.lt(0)||r.lt(0)?silence:this._fastGap(fraction(1).div(r.sub(t)))._late(t)}_compressSpan(t){return this._compress(t.begin,t.end)}_focus(t,r){return this._fast(fraction(1).div(r.sub(t))).late(t.cyclePos())}_focusSpan(t){return this._focus(t.begin,t.end)}_fast(t){return this.withQueryTime(n=>n.mul(t)).withHapTime(n=>n.div(t))}_slow(t){return this._fast(fraction(1).div(t))}_inside(t,r){return r(this._slow(t))._fast(t)}_outside(t,r){return r(this._fast(t))._slow(t)}_ply(t){return this.fmap(r=>pure(r)._fast(t))._squeezeJoin()}_chop(t){const n=Array.from({length:t},(a,o)=>o).map(a=>({begin:a/t,end:(a+1)/t})),s=function(a){return sequence(n.map(o=>Object.assign({},a,o)))};return this._squeezeBind(s)}_striate(t){const n=Array.from({length:t},(a,o)=>o).map(a=>({begin:a/t,end:(a+1)/t})),s=slowcat(...n);return this.set(s)._fast(t)}_cpm(t){return this._fast(t/60)}_early(t){return t=fraction(t),this.withQueryTime(r=>r.add(t)).withHapTime(r=>r.sub(t))}_late(t){return t=fraction(t),this._early(fraction(0).sub(t))}_zoom(t,r){r=fraction(r),t=fraction(t);const n=r.sub(t);return this.withQuerySpan(s=>s.withCycle(a=>a.mul(n).add(t))).withHapSpan(s=>s.withCycle(a=>a.sub(t).div(n)))._splitQueries()}_zoomArc(t){return this.zoom(t.begin,t.end)}_linger(t){return t==0?silence:t<0?this._zoom(t.add(1),1)._slow(t):this._zoom(0,t)._slow(t)}_color(t){return this._withContext(r=>({...r,color:t}))}log(){return this._withHap(t=>{var r;return t.setContext({...t.context,logs:(((r=t.context)==null?void 0:r.logs)||[]).concat([t.show()])})})}drawLine(){return console.log(drawLine(this)),this}_segment(t){return this.struct(pure(!0)._fast(t))}invert(){return this.fmap(t=>!t)}inv(){return this.invert()}when(t,r){const n=t._filterValues(id),s=t._filterValues(l=>!l),a=n.fmap(l=>f=>f).appRight(r(this)),o=s.fmap(l=>f=>f).appRight(this);return stack(a,o)}off(t,r){return stack(this,r(this.late(t)))}every(t,r){const n=this,s=Array(t-1).fill(n);return s.push(r(n)),slowcatPrime(...s)}every(t,r){const n=this,s=Array(t-1).fill(n);return s.unshift(r(n)),slowcatPrime(...s)}each(t,r){const n=this,s=Array(t-1).fill(n);return s.push(r(n)),slowcatPrime(...s)}brak(){return this.when(slowcat(!1,!0),t=>fastcat(t,silence)._late(.25))}rev(){const t=this,r=function(n){const s=n.span,a=s.begin.sam(),o=s.begin.nextSam(),l=function(y){const m=y.withTime(A=>a.add(o.sub(A))),v=m.begin;return m.begin=m.end,m.end=v,m};return t.query(n.setSpan(l(s))).map(y=>y.withSpan(l))};return new Pattern$2(r)._splitQueries()}palindrome(){return this.every(2,rev)}juxBy(t,r){t/=2;const n=function(o,l,f){return l in o?o[l]:f},s=this.withValue(o=>Object.assign({},o,{pan:n(o,"pan",.5)-t})),a=this.withValue(o=>Object.assign({},o,{pan:n(o,"pan",.5)+t}));return stack(s,r(a))}_jux(t){return this.juxBy(1,t)}stack(...t){return stack(this,...t)}sequence(...t){return sequence(this,...t)}seq(...t){return sequence(this,...t)}cat(...t){return cat(this,...t)}fastcat(...t){return fastcat(this,...t)}slowcat(...t){return slowcat(this,...t)}superimpose(...t){return this.stack(...t.map(r=>r(this)))}stutWith(t,r,n){return stack(...listRange(0,t-1).map(s=>n(this.late(fraction(r).mul(s)),s)))}stut(t,r,n){return this.stutWith(t,n,(s,a)=>s.velocity(Math.pow(r,a)))}_echoWith(t,r,n){return stack(...listRange(0,t-1).map(s=>n(this.late(fraction(r).mul(s)),s)))}_echo(t,r,n){return this._echoWith(t,r,(s,a)=>s.velocity(Math.pow(n,a)))}iter(t,r=!1){return slowcat(...listRange(0,t-1).map(n=>r?this.late(n/t):this.early(n/t)))}iterBack(t){return this.iter(t,!0)}_chunk(t,r,n=!1){const s=Array(t-1).fill(!1);s.unshift(!0);const a=sequence(...s).iter(t,n);return this.when(a,r)}_chunkBack(t,r){return this._chunk(t,r,!0)}_bypass(t){return t=Boolean(parseInt(t)),t?silence:this}hush(){return silence}_duration(t){return this.withHapSpan(r=>new TimeSpan(r.begin,r.begin.add(t)))}_legato(t){return this.withHapSpan(r=>new TimeSpan(r.begin,r.begin.add(r.end.sub(r.begin).mul(t))))}_velocity(t){return this._withContext(r=>({...r,velocity:(r.velocity||1)*t}))}_loopAt(t,r=1){return this.speed(1/t*r).unit("c").slow(t)}onTrigger(t){return this._withHap(r=>r.setContext({...r.context,onTrigger:t}))}log(t=id){return this._withHap(r=>r.setContext({...r.context,onTrigger:(...n)=>{r.context.onTrigger&&r.context.onTrigger(...n),console.log(t(...n))}}))}logValues(t=id){return this.log((r,n)=>t(n.value))}}function _composeOp(e,t,r){function n(s){return s instanceof Object&&!(s instanceof Function)}return n(e)||n(t)?(n(e)||(e={value:e}),n(t)||(t={value:t}),unionWithObj(e,t,r)):r(e,t)}(function(){const e={set:[(t,r)=>r],keep:[(t,r)=>t],keepif:[(t,r)=>r?t:void 0],add:[numeralArgs((t,r)=>t+r)],sub:[numeralArgs((t,r)=>t-r)],mul:[numeralArgs((t,r)=>t*r)],div:[numeralArgs((t,r)=>t/r)],mod:[numeralArgs(mod)],pow:[numeralArgs(Math.pow)],_and:[numeralArgs((t,r)=>t&r)],_or:[numeralArgs((t,r)=>t|r)],_xor:[numeralArgs((t,r)=>t^r)],_lshift:[numeralArgs((t,r)=>t<t>>r)],lt:[(t,r)=>tt>r],lte:[(t,r)=>t<=r],gte:[(t,r)=>t>=r],eq:[(t,r)=>t==r],eqt:[(t,r)=>t===r],ne:[(t,r)=>t!=r],net:[(t,r)=>t!==r],and:[(t,r)=>t&&r],or:[(t,r)=>t||r],func:[(t,r)=>r(t)]};for(const[t,[r,n]]of Object.entries(e))for(const s of["In","Out","Mix","Squeeze","SqueezeOut","Trig","Trigzero"])Pattern$2.prototype[t+s]=function(...a){var o=this;a=sequence(a),n&&(o=n(o),a=n(a));var l;return t==="keepif"?(l=o["_op"+s](a,f=>y=>r(f,y)),l=l._removeUndefineds()):l=o["_op"+s](a,f=>y=>_composeOp(f,y,r)),l},s==="Squeeze"&&(Pattern$2.prototype[t+"SqueezeIn"]=Pattern$2.prototype[t+s]),s==="In"?Pattern$2.prototype[t]=Pattern$2.prototype[t+s]:t==="set"&&(Pattern$2.prototype[s.toLowerCase()]=Pattern$2.prototype[t+s]);Pattern$2.prototype.struct=Pattern$2.prototype.keepifOut,Pattern$2.prototype.structAll=Pattern$2.prototype.keepOut,Pattern$2.prototype.mask=Pattern$2.prototype.keepifIn,Pattern$2.prototype.maskAll=Pattern$2.prototype.keepIn,Pattern$2.prototype.reset=Pattern$2.prototype.keepifTrig,Pattern$2.prototype.resetAll=Pattern$2.prototype.keepTrig,Pattern$2.prototype.restart=Pattern$2.prototype.keepifTrigzero,Pattern$2.prototype.restartAll=Pattern$2.prototype.keepTrigzero})();Pattern$2.prototype.patternified=["apply","chop","color","cpm","duration","early","fast","jux","late","legato","linger","ply","segment","striate","slow","velocity"];const polyrhythm=stack,pr=stack;Pattern$2.prototype.factories={pure,stack,slowcat,fastcat,cat,timeCat,sequence,seq,polymeter,pm,polyrhythm,pr};const silence=new Pattern$2(e=>[]);function pure(e){function t(r){return r.span.spanCycles.map(n=>new Hap(fraction(n.begin).wholeCycle(),n,e))}return new Pattern$2(t)}function isPattern$1(e){const t=e instanceof Pattern$2||(e==null?void 0:e._Pattern);return!e instanceof Pattern$2&&console.warn(`Found Pattern that fails "instanceof Pattern" check. + This may happen if you are using multiple versions of @strudel.cycles/core. + Please check by running "npm ls @strudel.cycles/core".`),t}function reify$1(e){return isPattern$1(e)?e:pure(e)}function stack(...e){e=e.map(r=>Array.isArray(r)?sequence(...r):reify$1(r));const t=r=>flatten(e.map(n=>n.query(r)));return new Pattern$2(t)}function slowcat(...e){e=e.map(r=>Array.isArray(r)?sequence(...r):reify$1(r));const t=function(r){const n=r.span,s=mod(n.begin.sam(),e.length),a=e[s];if(!a)return[];const o=n.begin.floor().sub(n.begin.div(e.length).floor());return a.withHapTime(l=>l.add(o)).query(r.setSpan(n.withTime(l=>l.sub(o))))};return new Pattern$2(t)._splitQueries()}function slowcatPrime(...e){e=e.map(reify$1);const t=function(r){const n=Math.floor(r.span.begin)%e.length,s=e[n];return(s==null?void 0:s.query(r))||[]};return new Pattern$2(t)._splitQueries()}function fastcat(...e){return slowcat(...e)._fast(e.length)}function cat(...e){return slowcat(...e)}function timeCat(...e){const t=e.map(s=>s[0]).reduce((s,a)=>s.add(a),fraction(0));let r=fraction(0);const n=[];for(const[s,a]of e){const o=r.add(s);n.push(reify$1(a)._compress(r.div(t),o.div(t))),r=o}return stack(...n)}function sequence(...e){return fastcat(...e)}function seq(...e){return fastcat(...e)}function _sequenceCount(e){return Array.isArray(e)?e.length==0?[silence,0]:e.length==1?_sequenceCount(e[0]):[fastcat(...e.map(t=>_sequenceCount(t)[0])),e.length]:[reify$1(e),1]}function polymeterSteps(e,...t){const r=t.map(s=>_sequenceCount(s));if(r.length==0)return silence;e==0&&(e=r[0][1]);const n=[];for(const s of r)s[1]==0&&next,e==s[1]?n.push(s[0]):n.push(s[0]._fast(fraction(e).div(fraction(s[1]))));return stack(...n)}function polymeter(...e){return polymeterSteps(0,...e)}function pm(...e){polymeter(...e)}const add=curry((e,t)=>t.add(e)),chop=curry((e,t)=>t.chop(e)),chunk=curry((e,t)=>t.chunk(e)),chunkBack=curry((e,t)=>t.chunkBack(e)),div=curry((e,t)=>t.div(e)),early=curry((e,t)=>t.early(e)),echo=curry((e,t,r,n)=>n.echo(e,t,r)),every=curry((e,t,r)=>r.every(e,t)),fast=curry((e,t)=>t.fast(e)),inv=e=>e.inv(),invert=e=>e.invert(),iter=curry((e,t)=>t.iter(e)),iterBack=curry((e,t)=>t.iter(e)),jux=curry((e,t)=>t.jux(e)),juxBy=curry((e,t,r)=>r.juxBy(e,t)),late=curry((e,t)=>t.late(e)),linger=curry((e,t)=>t.linger(e)),mask=curry((e,t)=>t.mask(e)),mul=curry((e,t)=>t.mul(e)),off=curry((e,t,r)=>r.off(e,t)),ply=curry((e,t)=>t.ply(e)),range=curry((e,t,r)=>r.range(e,t)),rangex=curry((e,t,r)=>r.rangex(e,t)),range2=curry((e,t,r)=>r.range2(e,t)),rev=e=>e.rev(),slow=curry((e,t)=>t.slow(e)),struct=curry((e,t)=>t.struct(e)),sub=curry((e,t)=>t.sub(e)),superimpose=curry((e,t)=>t.superimpose(...e)),set=curry((e,t)=>t.set(e)),when=curry((e,t,r)=>r.when(e,t));Pattern$2.prototype.composable={fast,slow,early,late,superimpose};function makeComposable(e){return Object.entries(Pattern$2.prototype.composable).forEach(([t,r])=>{e[t]=(...n)=>{const s=compose(e,r(...n));return makeComposable(s)}}),e}const patternify2=e=>(t,r,n)=>t.fmap(s=>a=>e.call(n,s,a)).appLeft(r).innerJoin(),patternify3=e=>(t,r,n,s)=>t.fmap(a=>o=>l=>e.call(s,a,o,l)).appLeft(r).appLeft(n).innerJoin(),patternify4=e=>(t,r,n,s,a)=>t.fmap(o=>l=>f=>y=>e.call(a,o,l,f,y)).appLeft(r).appLeft(n).appLeft(s).innerJoin();Pattern$2.prototype.echo=function(...e){return e=e.map(reify$1),patternify3(Pattern$2.prototype._echo)(...e,this)};Pattern$2.prototype.echoWith=function(...e){return e=e.map(reify$1),patternify3(Pattern$2.prototype._echoWith)(...e,this)};Pattern$2.prototype.chunk=function(...e){return e=e.map(reify$1),patternify2(Pattern$2.prototype._chunk)(...e,this)};Pattern$2.prototype.chunkBack=function(...e){return e=e.map(reify$1),patternify2(Pattern$2.prototype._chunkBack)(...e,this)};Pattern$2.prototype.loopAt=function(...e){return e=e.map(reify$1),patternify2(Pattern$2.prototype._loopAt)(...e,this)};Pattern$2.prototype.zoom=function(...e){return e=e.map(reify$1),patternify2(Pattern$2.prototype._zoom)(...e,this)};Pattern$2.prototype.compress=function(...e){return e=e.map(reify$1),patternify2(Pattern$2.prototype._compress)(...e,this)};Pattern$2.prototype.outside=function(...e){return e=e.map(reify$1),patternify2(Pattern$2.prototype._outside)(...e,this)};Pattern$2.prototype.inside=function(...e){return e=e.map(reify$1),patternify2(Pattern$2.prototype._inside)(...e,this)};Pattern$2.prototype.range=function(...e){return e=e.map(reify$1),patternify2(Pattern$2.prototype._range)(...e,this)};Pattern$2.prototype.rangex=function(...e){return e=e.map(reify$1),patternify2(Pattern$2.prototype._rangex)(...e,this)};Pattern$2.prototype.range2=function(...e){return e=e.map(reify$1),patternify2(Pattern$2.prototype._range2)(...e,this)};Pattern$2.prototype.bootstrap=function(){const e=Object.fromEntries(Object.entries(Pattern$2.prototype.composable).map(([t,r])=>(Pattern$2.prototype[t]&&(Pattern$2.prototype[t]=makeComposable(Pattern$2.prototype[t])),[t,curry(r,makeComposable)])));return this.patternified.forEach(t=>{Pattern$2.prototype[t]=function(...r){return this._patternify(Pattern$2.prototype["_"+t])(...r)}}),e};Pattern$2.prototype.define=(e,t,r={})=>{r.composable&&(Pattern$2.prototype.composable[e]=t),r.patternified&&(Pattern$2.prototype.patternified=Pattern$2.prototype.patternified.concat([e])),Pattern$2.prototype.bootstrap()};Pattern$2.prototype.define("hush",e=>e.hush(),{patternified:!1,composable:!0});Pattern$2.prototype.define("bypass",e=>e.bypass(on),{patternified:!0,composable:!0});const controls={},generic_params=[["s","s","sound"],["f","n","The note or sample number to choose for a synth or sampleset"],["f","note","The note or pitch to play a sound or synth with"],["f","accelerate","a pattern of numbers that speed up (or slow down) samples while they play."],["f","gain","a pattern of numbers that specify volume. Values less than 1 make the sound quieter. Values greater than 1 make the sound louder. For the linear equivalent, see @amp@."],["f","amp","like @gain@, but linear."],["f","attack","a pattern of numbers to specify the attack time (in seconds) of an envelope applied to each sample."],["f","bank","selects sound bank to use"],["f","decay",""],["f","sustain",""],["f","release","a pattern of numbers to specify the release time (in seconds) of an envelope applied to each sample."],["f","hold","a pattern of numbers to specify the hold time (in seconds) of an envelope applied to each sample. Only takes effect if `attack` and `release` are also specified."],["f","bandf","A pattern of numbers from 0 to 1. Sets the center frequency of the band-pass filter."],["f","bandq","a pattern of anumbers from 0 to 1. Sets the q-factor of the band-pass filter."],["f","begin","a pattern of numbers from 0 to 1. Skips the beginning of each sample, e.g. `0.25` to cut off the first quarter from each sample."],["f","end","the same as `begin`, but cuts the end off samples, shortening them; e.g. `0.75` to cut off the last quarter of each sample."],["f","loop","loops the sample (from `begin` to `end`) the specified number of times."],["f","legato","controls the amount of overlap between two adjacent sounds"],["f","crush","bit crushing, a pattern of numbers from 1 (for drastic reduction in bit-depth) to 16 (for barely no reduction)."],["f","coarse","fake-resampling, a pattern of numbers for lowering the sample rate, i.e. 1 for original 2 for half, 3 for a third and so on."],["i","channel","choose the channel the pattern is sent to in superdirt"],["i","cut","In the style of classic drum-machines, `cut` will stop a playing sample as soon as another samples with in same cutgroup is to be played. An example would be an open hi-hat followed by a closed one, essentially muting the open."],["f","cutoff","a pattern of numbers from 0 to 1. Applies the cutoff frequency of the low-pass filter."],["f","hcutoff","a pattern of numbers from 0 to 1. Applies the cutoff frequency of the high-pass filter. Also has alias @hpf@"],["f","hresonance","a pattern of numbers from 0 to 1. Applies the resonance of the high-pass filter. Has alias @hpq@"],["f","resonance","a pattern of numbers from 0 to 1. Specifies the resonance of the low-pass filter."],["f","djf","DJ filter, below 0.5 is low pass filter, above is high pass filter."],["f","delay","a pattern of numbers from 0 to 1. Sets the level of the delay signal."],["f","delayfeedback","a pattern of numbers from 0 to 1. Sets the amount of delay feedback."],["f","delaytime","a pattern of numbers from 0 to 1. Sets the length of the delay."],["f","lock","A pattern of numbers. Specifies whether delaytime is calculated relative to cps. When set to 1, delaytime is a direct multiple of a cycle."],["f","detune",""],["f","dry","when set to `1` will disable all reverb for this pattern. See `room` and `size` for more information about reverb."],["f","fadeTime","Used when using begin/end or chop/striate and friends, to change the fade out time of the 'grain' envelope."],["f","fadeInTime","As with fadeTime, but controls the fade in time of the grain envelope. Not used if the grain begins at position 0 in the sample."],["f","freq",""],["f","gate",""],["f","leslie",""],["f","lrate",""],["f","lsize",""],["f","degree",""],["f","mtranspose",""],["f","ctranspose",""],["f","harmonic",""],["f","stepsPerOctave",""],["f","octaveR",""],["f","nudge","Nudges events into the future by the specified number of seconds. Negative numbers work up to a point as well (due to internal latency)"],["i","octave",""],["f","offset",""],["i","orbit","a pattern of numbers. An `orbit` is a global parameter context for patterns. Patterns with the same orbit will share hardware output bus offset and global effects, e.g. reverb and delay. The maximum number of orbits is specified in the superdirt startup, numbers higher than maximum will wrap around."],["f","overgain",""],["f","overshape",""],["f","pan","a pattern of numbers between 0 and 1, from left to right (assuming stereo), once round a circle (assuming multichannel)"],["f","panspan","a pattern of numbers between -inf and inf, which controls how much multichannel output is fanned out (negative is backwards ordering)"],["f","pansplay","a pattern of numbers between 0.0 and 1.0, which controls the multichannel spread range (multichannel only)"],["f","panwidth","a pattern of numbers between 0.0 and inf, which controls how much each channel is distributed over neighbours (multichannel only)"],["f","panorient","a pattern of numbers between -1.0 and 1.0, which controls the relative position of the centre pan in a pair of adjacent speakers (multichannel only)"],["f","rate","used in SuperDirt softsynths as a control rate or 'speed'"],["f","slide",""],["f","semitone",""],["f","velocity",""],["f","voice",""],["f","room","a pattern of numbers from 0 to 1. Sets the level of reverb."],["f","size","a pattern of numbers from 0 to 1. Sets the perceptual size (reverb time) of the `room` to be used in reverb."],["f","roomsize","a pattern of numbers from 0 to 1. Sets the perceptual size (reverb time) of the `room` to be used in reverb."],["f","shape","wave shaping distortion, a pattern of numbers from 0 for no distortion up to 1 for loads of distortion."],["f","speed","a pattern of numbers which changes the speed of sample playback, i.e. a cheap way of changing pitch. Negative values will play the sample backwards!"],["s","unit",'used in conjunction with `speed`, accepts values of "r" (rate, default behavior), "c" (cycles), or "s" (seconds). Using `unit "c"` means `speed` will be interpreted in units of cycles, e.g. `speed "1"` means samples will be stretched to fill a cycle. Using `unit "s"` means the playback speed will be adjusted so that the duration is the number of seconds specified by `speed`.'],["f","squiz",""],["f","stutterdepth",""],["f","stuttertime",""],["f","timescale",""],["f","timescalewin",""],["s","vowel","formant filter to make things sound like vowels, a pattern of either `a`, `e`, `i`, `o` or `u`. Use a rest (`~`) for no effect."],["f","waveloss",""],["f","dur",""],["f","expression",""],["f","sustainpedal",""],["f","tremolodepth","Tremolo Audio DSP effect | params are 'tremolorate' and 'tremolodepth'"],["f","tremolorate","Tremolo Audio DSP effect | params are 'tremolorate' and 'tremolodepth'"],["f","phaserdepth","Phaser Audio DSP effect | params are 'phaserrate' and 'phaserdepth'"],["f","phaserrate","Phaser Audio DSP effect | params are 'phaserrate' and 'phaserdepth'"],["f","fshift","frequency shifter"],["f","fshiftnote","frequency shifter"],["f","fshiftphase","frequency shifter"],["f","triode","tube distortion"],["f","krush","shape/bass enhancer"],["f","kcutoff",""],["f","octer","octaver effect"],["f","octersub","octaver effect"],["f","octersubsub","octaver effect"],["f","ring","ring modulation"],["f","ringf","ring modulation"],["f","ringdf","ring modulation"],["f","distort","noisy fuzzy distortion"],["f","freeze","Spectral freeze"],["f","xsdelay",""],["f","tsdelay",""],["f","real","Spectral conform"],["f","imag",""],["f","enhance","Spectral enhance"],["f","partials",""],["f","comb","Spectral comb"],["f","smear","Spectral smear"],["f","scram","Spectral scramble"],["f","binshift","Spectral binshift"],["f","hbrick","High pass sort of spectral filter"],["f","lbrick","Low pass sort of spectral filter"],["f","midichan",""],["f","control",""],["f","ccn",""],["f","ccv",""],["f","polyTouch",""],["f","midibend",""],["f","miditouch",""],["f","ctlNum",""],["f","frameRate",""],["f","frames",""],["f","hours",""],["s","midicmd",""],["f","minutes",""],["f","progNum",""],["f","seconds",""],["f","songPtr",""],["f","uid",""],["f","val",""],["f","cps",""],["f","clip",""]],_name=(e,...t)=>sequence(...t).withValue(r=>({[e]:r})),_setter=(e,t)=>function(...r){return r.length?this.set(e(...r)):this.fmap(n=>({[t]:n}))};generic_params.forEach(([e,t,r])=>{controls[t]=(...n)=>_name(t,...n),Pattern$2.prototype[t]=_setter(controls[t],t)});controls.createParam=e=>{const t=(...r)=>_name(e,...r);return Pattern$2.prototype[e]=_setter(t,e),(...r)=>_name(e,...r)};controls.createParams=(...e)=>e.reduce((t,r)=>Object.assign(t,{[r]:createParam(r)}),{});function bjorklund(e,t){for(var r=[],n=[],s=[t],a=e-t,o=0,l=function(f){if(f==-1)r.push(0);else if(f==-2)r.push(1);else{for(var y=0;y1;)n.push(Math.floor(a/s[o])),s.push(a%s[o]),a=s[o],o++;return n.push(a),l(o),r.reverse()}var bjork=function(e,t){return e>t?bjorklund(e,t):bjorklund(t,e)};const euclid=(e,t,r=0)=>{const n=bjork(t,e);return r?rotate(n,-r):n};Pattern$2.prototype.euclid=function(e,t,r=0){return this.struct(euclid(e,t,r))};Pattern$2.prototype.euclidLegato=function(e,t,r=0){const n=euclid(e,t,r),s=n.indexOf(1),a=rotate(n,s).join("").split("1").slice(1).map(o=>[o.length+1,!0]);return this.struct(timeCat(...a)).late(fraction(s).div(t))};function steady(e){return new Pattern$2(t=>[new Hap(void 0,t.span,e)])}const signal=e=>{const t=r=>[new Hap(void 0,r.span,e(r.span.midpoint()))];return new Pattern$2(t)},isaw=signal(e=>1-e%1),isaw2=isaw._toBipolar(),saw=signal(e=>e%1),saw2=saw._toBipolar(),sine2=signal(e=>Math.sin(Math.PI*2*e)),sine=sine2._fromBipolar(),cosine=sine._early(fraction(1).div(4)),cosine2=sine2._early(fraction(1).div(4)),square=signal(e=>Math.floor(e*2%2)),square2=square._toBipolar(),tri=fastcat(isaw,saw),tri2=fastcat(isaw2,saw2),time=signal(id),xorwise=e=>{const t=e<<13^e,r=t>>17^t;return r<<5^r},_frac=e=>e-Math.trunc(e),timeToIntSeed=e=>xorwise(Math.trunc(_frac(e/300)*536870912)),intSeedToRand=e=>e%536870912/536870912,timeToRand=e=>Math.abs(intSeedToRand(timeToIntSeed(e))),rand=signal(timeToRand),rand2=rand._toBipolar(),_brandBy=e=>rand.fmap(t=>treify$1(e).fmap(_brandBy).innerJoin(),brand=_brandBy(.5),_irand=e=>rand.fmap(t=>Math.trunc(t*e)),irand=e=>reify$1(e).fmap(_irand).innerJoin(),__chooseWith=(e,t)=>(t=t.map(reify$1),t.length==0?silence:e.range(0,t.length).fmap(r=>t[Math.floor(r)])),chooseWith=(e,t)=>__chooseWith(e,t).outerJoin(),chooseInWith=(e,t)=>__chooseWith(e,t).innerJoin(),choose=(...e)=>chooseWith(rand,e);Pattern$2.prototype.choose=function(...e){return chooseWith(this,e)};Pattern$2.prototype.choose2=function(...e){return chooseWith(this._fromBipolar(),e)};const chooseCycles=(...e)=>chooseInWith(rand.segment(1),e),randcat=chooseCycles,_wchooseWith=function(e,...t){const r=t.map(l=>reify$1(l[0])),n=[];let s=0;for(const l of t)s+=l[1],n.push(s);const a=s,o=function(l){const f=l*a;return r[n.findIndex(y=>y>f,n)]};return e.fmap(o)},wchooseWith=(...e)=>_wchooseWith(...e).outerJoin(),wchoose=(...e)=>wchooseWith(rand,...e),wchooseCycles=(...e)=>_wchooseWith(rand,...e).innerJoin(),perlinWith=e=>{const t=e.fmap(Math.floor),r=e.fmap(a=>Math.floor(a)+1),n=a=>6*a**5-15*a**4+10*a**3,s=a=>o=>l=>o+n(a)*(l-o);return e.sub(t).fmap(s).appBoth(t.fmap(timeToRand)).appBoth(r.fmap(timeToRand))},perlin=perlinWith(time.fmap(e=>Number(e)));Pattern$2.prototype._degradeByWith=function(e,t){return this.fmap(r=>n=>r).appLeft(e._filterValues(r=>r>t))};Pattern$2.prototype._degradeBy=function(e){return this._degradeByWith(rand,e)};Pattern$2.prototype.degrade=function(){return this._degradeBy(.5)};Pattern$2.prototype._undegradeBy=function(e){return this._degradeByWith(rand.fmap(t=>1-t),e)};Pattern$2.prototype.undegrade=function(){return this._undegradeBy(.5)};Pattern$2.prototype._sometimesBy=function(e,t){return stack(this._degradeBy(e),t(this._undegradeBy(1-e)))};Pattern$2.prototype.sometimesBy=function(e,t){const r=this;return reify$1(e).fmap(n=>r._sometimesBy(n,t)).innerJoin()};Pattern$2.prototype._sometimesByPre=function(e,t){return stack(this._degradeBy(e),t(this).undegradeBy(1-e))};Pattern$2.prototype.sometimesByPre=function(e,t){const r=this;return reify$1(e).fmap(n=>r._sometimesByPre(n,t)).innerJoin()};Pattern$2.prototype.sometimes=function(e){return this._sometimesBy(.5,e)};Pattern$2.prototype.sometimesPre=function(e){return this._sometimesByPre(.5,e)};Pattern$2.prototype._someCyclesBy=function(e,t){return stack(this._degradeByWith(rand._segment(1),e),t(this._degradeByWith(rand.fmap(r=>1-r)._segment(1),1-e)))};Pattern$2.prototype.someCyclesBy=function(e,t){const r=this;return reify$1(e).fmap(n=>r._someCyclesBy(n,t)).innerJoin()};Pattern$2.prototype.someCycles=function(e){return this._someCyclesBy(.5,e)};Pattern$2.prototype.often=function(e){return this.sometimesBy(.75,e)};Pattern$2.prototype.rarely=function(e){return this.sometimesBy(.25,e)};Pattern$2.prototype.almostNever=function(e){return this.sometimesBy(.1,e)};Pattern$2.prototype.almostAlways=function(e){return this.sometimesBy(.9,e)};Pattern$2.prototype.never=function(e){return this};Pattern$2.prototype.always=function(e){return e(this)};Pattern$2.prototype.patternified.push("degradeBy","undegradeBy");let synth;try{synth=window==null?void 0:window.speechSynthesis}catch{console.warn("cannot use window: not in browser?")}let allVoices=synth==null?void 0:synth.getVoices();function speak(e,t,r){synth.cancel();const n=new SpeechSynthesisUtterance(e);n.lang=t,allVoices=synth.getVoices();const s=allVoices.filter(a=>a.lang.includes(t));typeof r=="number"?n.voice=s[r%s.length]:typeof r=="string"&&(n.voice=s.find(a=>a.name===a)),speechSynthesis.speak(n)}Pattern$2.prototype._speak=function(e,t){return this._withHap(r=>{const n=(s,a)=>{speak(a.value,e,t)};return r.setContext({...r.context,onTrigger:n})})};Pattern$2.prototype.speak=function(e,t){return patternify2(Pattern$2.prototype._speak)(reify(e),reify(t),this)};const{isPattern,Pattern:Pattern$1}=strudel;let scoped=!1;const evalScope=async(...e)=>{scoped&&console.warn("evalScope was called more than once."),scoped=!0;const t=await Promise.allSettled(e),r=t.filter(n=>n.status==="fulfilled").map(n=>n.value);t.forEach((n,s)=>{n.status==="rejected"&&console.warn(`evalScope: module with index ${s} could not be loaded:`,n.reason)}),Object.assign(globalThis,...r,Pattern$1.prototype.bootstrap())};function safeEval(e){return Function('"use strict";return ('+e+")")()}const evaluate$1=async(e,t)=>{scoped||await evalScope(),t&&(e=t(e));let r=await safeEval(e);if(!isPattern(r)){console.log("evaluated",r);const n=`got "${typeof r}" instead of pattern`;throw new Error(n+(typeof r=="function"?", did you forget to call a function?":"."))}return{mode:"javascript",pattern:r}};function createClock(e,t,r=.05,n=.1,s=.1){let a=0,o=0,l=10**4,f=.01;const y=S=>r=S(r);s=s||n/2;const m=()=>{const S=e(),k=S+n+s;for(o===0&&(o=S+f);o=S&&t(o,r,a),o{m(),v=setInterval(m,n*1e3)},E=()=>clearInterval(v);return{setDuration:y,start:A,stop:()=>{a=0,o=0,E()},pause:()=>E(),duration:r,getPhase:()=>o}}class Cyclist{constructor({interval:t,onTrigger:r,onError:n,getTime:s,latency:a=.1}){ge(this,"worker");ge(this,"pattern");ge(this,"started",!1);ge(this,"cps",1);ge(this,"getTime");ge(this,"phase",0);this.getTime=s;const o=l=>Math.round(l*1e3)/1e3;this.clock=createClock(s,(l,f,y)=>{y===0&&(this.origin=l);const m=o(l-this.origin);this.phase=m-a;const v=o(m+f),A=s();try{this.pattern.queryArc(m,v).forEach(g=>{if(g.part.begin.equals(g.whole.begin)){const d=g.whole.begin+this.origin-A+a,D=g.duration*1;r==null||r(g,d,D)}})}catch(E){console.warn("scheduler error",E),n==null||n(E)}},t)}getPhase(){return this.phase}start(){if(!this.pattern)throw new Error("Scheduler: no pattern set! call .setPattern first.");this.clock.start(),this.started=!0}pause(){this.clock.stop(),delete this.origin,this.started=!1}stop(){delete this.origin,this.clock.stop(),this.started=!1}setPattern(t,r=!1){this.pattern=t,r&&!this.started&&this.start()}setCps(t=1){this.cps=t}log(t,r,n){const s=n.filter(a=>a.hasOnset());console.log(`${t.toFixed(4)} - ${r.toFixed(4)} ${Array(s.length).fill("I").join("")}`)}}function repl({interval:e,defaultOutput:t,onSchedulerError:r,onEvalError:n,onEval:s,getTime:a,transpiler:o}){const l=new Cyclist({interval:e,onTrigger:t,onError:r,getTime:a});return{scheduler:l,evaluate:async y=>{if(!y)throw new Error("no code to evaluate");try{const{pattern:m}=await evaluate$1(y,o);l.setPattern(m,!0),s==null||s({pattern:m,code:y})}catch(m){console.warn(`eval error: ${m.message}`),n==null||n(m)}}}}const gist=(route,cache=!0)=>fetch(`https://gist.githubusercontent.com/${route}?cachebust=${cache?"":Date.now()}`).then(e=>e.text()).then(code=>eval(code));console.log("%c // \u{1F300} @strudel.cycles/core loaded \u{1F300}","background-color: black;color:white;padding:4px;border-radius:15px");globalThis._strudelLoaded&&console.warn(`@strudel.cycles/core was loaded more than once... +This might happen when you have multiple versions of strudel installed. +Please check with "npm ls @strudel.cycles/core".`);globalThis._strudelLoaded=!0;if(typeof DelayNode<"u"){class e extends DelayNode{constructor(r,n,s,a){super(r),n=Math.abs(n),this.delayTime.value=s;const o=r.createGain();o.gain.value=Math.min(Math.abs(a),.995),this.feedback=o.gain;const l=r.createGain();return l.gain.value=n,this.delayGain=l,this.connect(o),this.connect(l),o.connect(this),this.connect=f=>l.connect(f),this}start(r){this.delayGain.gain.setValueAtTime(this.delayGain.gain.value,r+this.delayTime.value)}}AudioContext.prototype.createFeedbackDelay=function(t,r,n){return new e(this,t,r,n)}}typeof AudioContext<"u"&&(AudioContext.prototype.impulseResponse=function(e,t=1){const r=this.sampleRate*e,n=this.createBuffer(t,r,this.sampleRate),s=n.getChannelData(0);for(let a=0;a(t.buffer=this.impulseResponse(r),t.duration=e,t),t.setDuration(e),t});const bufferCache={},loadCache={},getCachedBuffer=e=>bufferCache[e],loadBuffer=(e,t)=>(loadCache[e]||(loadCache[e]=fetch(e).then(r=>r.arrayBuffer()).then(async r=>{const n=await t.decodeAudioData(r);return bufferCache[e]=n,n})),loadCache[e]);function reverseBuffer(e){const t=getAudioContext(),r=t.createBuffer(e.numberOfChannels,e.length,t.sampleRate);for(let n=0;nbufferCache[e],githubCache={};let sampleCache={current:void 0};const loadGithubSamples=async(e,t)=>{const r="loadGithubSamples "+e,n=localStorage.getItem(r);if(n&&(console.log("[sampler]: loaded sample list from localstorage",e),githubCache[e]=JSON.parse(n)),githubCache[e])return sampleCache.current=githubCache[e],githubCache[e];console.log("[sampler]: fetching sample list from github",e);try{const[s,a,...o]=e.split("/"),l=`https://api.github.com/repos/${s}/${a}/contents`,f=await fetch(`${l}/${o.join("/")}`).then(y=>y.json());githubCache[e]=(await Promise.all(f.map(async({name:y,path:m})=>({name:y,content:await fetch(`${l}/${m}`).then(v=>v.json()).catch(v=>{console.error("could not load path",v)})})))).filter(({content:y})=>!!y).reduce((y,{name:m,content:v})=>({...y,[(t==null?void 0:t(m))||m]:v.map(({download_url:A})=>A)}),{})}catch(s){console.error("[sampler]: failed to fetch sample list from github",s);return}return sampleCache.current=githubCache[e],localStorage.setItem(r,JSON.stringify(sampleCache.current)),console.log("[sampler]: loaded samples:",sampleCache.current),githubCache[e]},samples=async(e,t=e._base||"")=>{if(typeof e=="string"){if(e.startsWith("github:")){const[n,s]=e.split("github:");e=`https://raw.githubusercontent.com/${s}/strudel.json`}if(typeof fetch!="function")return;const r=e.split("/").slice(0,-1).join("/");return typeof fetch>"u"?void 0:fetch(e).then(n=>n.json()).then(n=>samples(n,t||n._base||r)).catch(n=>{throw console.error(n),new Error(`error loading "${e}"`)})}sampleCache.current={...sampleCache.current,...Object.fromEntries(Object.entries(e).map(([r,n])=>{if(typeof n=="string"&&(n=[n]),typeof n!="object")throw new Error("wrong sample map format for "+r);t=n._base||t;const s=a=>(t+a).replace("github:","https://raw.githubusercontent.com/");return Array.isArray(n)?[r,n.map(s)]:[r,Object.fromEntries(Object.entries(n).map(([a,o])=>[a,(typeof o=="string"?[o]:o).map(s)]))]}))}},resetLoadedSamples=()=>{sampleCache.current=void 0},getLoadedSamples$1=()=>sampleCache.current;var vowelFormant={a:{freqs:[660,1120,2750,3e3,3350],gains:[1,.5012,.0708,.0631,.0126],qs:[80,90,120,130,140]},e:{freqs:[440,1800,2700,3e3,3300],gains:[1,.1995,.1259,.1,.1],qs:[70,80,100,120,120]},i:{freqs:[270,1850,2900,3350,3590],gains:[1,.0631,.0631,.0158,.0158],qs:[40,90,100,120,120]},o:{freqs:[430,820,2700,3e3,3300],gains:[1,.3162,.0501,.0794,.01995],qs:[40,80,100,120,120]},u:{freqs:[370,630,2750,3e3,3400],gains:[1,.1,.0708,.0316,.01995],qs:[40,60,100,120,120]}};if(typeof GainNode<"u"){class e extends GainNode{constructor(r,n){if(super(r),!vowelFormant[n])throw new Error("vowel: unknown vowel "+n);const{gains:s,qs:a,freqs:o}=vowelFormant[n],l=r.createGain();for(let f=0;f<5;f++){const y=r.createGain();y.gain.value=s[f];const m=r.createBiquadFilter();m.type="bandpass",m.Q.value=a[f],m.frequency.value=o[f],this.connect(m),m.connect(y),y.connect(l)}return l.gain.value=8,this.connect=f=>l.connect(f),this}}AudioContext.prototype.createVowelFilter=function(t){return new e(this,t)}}const workletsUrl="data:application/javascript;base64,Ly8gTElDRU5TRSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2My4wIHNlZSBodHRwczovL2dpdGh1Yi5jb20vZGt0cjAvV2ViRGlydC9ibG9iL21haW4vTElDRU5TRQovLyBhbGwgdGhlIGNyZWRpdCBnb2VzIHRvIGRrdHIwJ3Mgd2ViZGlydDogaHR0cHM6Ly9naXRodWIuY29tL2RrdHIwL1dlYkRpcnQvYmxvYi81Y2UzZDY5ODM2MmM1NGQ2ZTFiNjhhY2M0N2ViMjk1NWFjNjJjNzkzL2Rpc3QvQXVkaW9Xb3JrbGV0cy5qcwovLyA8MwoKY2xhc3MgQ29hcnNlUHJvY2Vzc29yIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBzdGF0aWMgZ2V0IHBhcmFtZXRlckRlc2NyaXB0b3JzKCkgewogICAgcmV0dXJuIFt7IG5hbWU6ICdjb2Fyc2UnLCBkZWZhdWx0VmFsdWU6IDEgfV07CiAgfQoKICBjb25zdHJ1Y3RvcigpIHsKICAgIHN1cGVyKCk7CiAgICB0aGlzLm5vdFN0YXJ0ZWQgPSB0cnVlOwogIH0KCiAgcHJvY2VzcyhpbnB1dHMsIG91dHB1dHMsIHBhcmFtZXRlcnMpIHsKICAgIGNvbnN0IGlucHV0ID0gaW5wdXRzWzBdOwogICAgY29uc3Qgb3V0cHV0ID0gb3V0cHV0c1swXTsKICAgIGNvbnN0IGNvYXJzZSA9IHBhcmFtZXRlcnMuY29hcnNlOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBvdXRwdXRbMF1bMF0gPSBpbnB1dFswXVswXTsKICAgICAgZm9yIChsZXQgbiA9IDE7IG4gPCBibG9ja1NpemU7IG4rKykgewogICAgICAgIGZvciAobGV0IG8gPSAwOyBvIDwgb3V0cHV0Lmxlbmd0aDsgbysrKSB7CiAgICAgICAgICBvdXRwdXRbb11bbl0gPSBuICUgY29hcnNlID09IDAgPyBpbnB1dFswXVtuXSA6IG91dHB1dFtvXVtuIC0gMV07CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ2NvYXJzZS1wcm9jZXNzb3InLCBDb2Fyc2VQcm9jZXNzb3IpOwoKY2xhc3MgQ3J1c2hQcm9jZXNzb3IgZXh0ZW5kcyBBdWRpb1dvcmtsZXRQcm9jZXNzb3IgewogIHN0YXRpYyBnZXQgcGFyYW1ldGVyRGVzY3JpcHRvcnMoKSB7CiAgICByZXR1cm4gW3sgbmFtZTogJ2NydXNoJywgZGVmYXVsdFZhbHVlOiAwIH1dOwogIH0KCiAgY29uc3RydWN0b3IoKSB7CiAgICBzdXBlcigpOwogICAgdGhpcy5ub3RTdGFydGVkID0gdHJ1ZTsKICB9CgogIHByb2Nlc3MoaW5wdXRzLCBvdXRwdXRzLCBwYXJhbWV0ZXJzKSB7CiAgICBjb25zdCBpbnB1dCA9IGlucHV0c1swXTsKICAgIGNvbnN0IG91dHB1dCA9IG91dHB1dHNbMF07CiAgICBjb25zdCBjcnVzaCA9IHBhcmFtZXRlcnMuY3J1c2g7CiAgICBjb25zdCBibG9ja1NpemUgPSAxMjg7CiAgICBjb25zdCBoYXNJbnB1dCA9ICEoaW5wdXRbMF0gPT09IHVuZGVmaW5lZCk7CiAgICBpZiAoaGFzSW5wdXQpIHsKICAgICAgdGhpcy5ub3RTdGFydGVkID0gZmFsc2U7CiAgICAgIGlmIChjcnVzaC5sZW5ndGggPT09IDEpIHsKICAgICAgICBjb25zdCB4ID0gTWF0aC5wb3coMiwgY3J1c2hbMF0gLSAxKTsKICAgICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgICBjb25zdCB2YWx1ZSA9IE1hdGgucm91bmQoaW5wdXRbMF1bbl0gKiB4KSAvIHg7CiAgICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgICBvdXRwdXRbb11bbl0gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm9yIChsZXQgbiA9IDA7IG4gPCBibG9ja1NpemU7IG4rKykgewogICAgICAgICAgbGV0IHggPSBNYXRoLnBvdygyLCBjcnVzaFtuXSAtIDEpOwogICAgICAgICAgY29uc3QgdmFsdWUgPSBNYXRoLnJvdW5kKGlucHV0WzBdW25dICogeCkgLyB4OwogICAgICAgICAgZm9yIChsZXQgbyA9IDA7IG8gPCBvdXRwdXQubGVuZ3RoOyBvKyspIHsKICAgICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQpyZWdpc3RlclByb2Nlc3NvcignY3J1c2gtcHJvY2Vzc29yJywgQ3J1c2hQcm9jZXNzb3IpOwoKY2xhc3MgU2hhcGVQcm9jZXNzb3IgZXh0ZW5kcyBBdWRpb1dvcmtsZXRQcm9jZXNzb3IgewogIHN0YXRpYyBnZXQgcGFyYW1ldGVyRGVzY3JpcHRvcnMoKSB7CiAgICByZXR1cm4gW3sgbmFtZTogJ3NoYXBlJywgZGVmYXVsdFZhbHVlOiAwIH1dOwogIH0KCiAgY29uc3RydWN0b3IoKSB7CiAgICBzdXBlcigpOwogICAgdGhpcy5ub3RTdGFydGVkID0gdHJ1ZTsKICB9CgogIHByb2Nlc3MoaW5wdXRzLCBvdXRwdXRzLCBwYXJhbWV0ZXJzKSB7CiAgICBjb25zdCBpbnB1dCA9IGlucHV0c1swXTsKICAgIGNvbnN0IG91dHB1dCA9IG91dHB1dHNbMF07CiAgICBjb25zdCBzaGFwZTAgPSBwYXJhbWV0ZXJzLnNoYXBlWzBdOwogICAgY29uc3Qgc2hhcGUxID0gc2hhcGUwIDwgMSA/IHNoYXBlMCA6IDEuMCAtIDRlLTEwOwogICAgY29uc3Qgc2hhcGUgPSAoMi4wICogc2hhcGUxKSAvICgxLjAgLSBzaGFwZTEpOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgY29uc3QgdmFsdWUgPSAoKDEgKyBzaGFwZSkgKiBpbnB1dFswXVtuXSkgLyAoMSArIHNoYXBlICogTWF0aC5hYnMoaW5wdXRbMF1bbl0pKTsKICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ3NoYXBlLXByb2Nlc3NvcicsIFNoYXBlUHJvY2Vzc29yKTsK",{Pattern}=strudel;let audioContext;const getAudioContext$1=()=>(audioContext||(audioContext=new AudioContext),audioContext);let destination;const getDestination=()=>{const e=getAudioContext$1();return destination||(destination=e.createGain(),destination.connect(e.destination)),destination},panic=()=>{getDestination().gain.linearRampToValueAtTime(0,getAudioContext$1().currentTime+.01),destination=null},getFilter=(e,t,r)=>{const n=getAudioContext$1().createBiquadFilter();return n.type=e,n.frequency.value=t,n.Q.value=r,n},getADSR=(e,t,r,n,s,a,o)=>{const l=getAudioContext$1().createGain();return l.gain.setValueAtTime(0,a),l.gain.linearRampToValueAtTime(s,a+e),l.gain.linearRampToValueAtTime(r*s,a+e+t),l.gain.setValueAtTime(r*s,o),l.gain.linearRampToValueAtTime(0,o+n),l},getOscillator=({s:e,freq:t,t:r,duration:n,release:s})=>{const a=getAudioContext$1().createOscillator();return a.type=e||"triangle",a.frequency.value=Number(t),a.start(r),a.stop(r+n+s),a},getSoundfontKey=e=>{var n,s,a,o;if(!globalThis.soundfontList)return!1;if((s=(n=globalThis.soundfontList)==null?void 0:n.instruments)!=null&&s.includes(e))return e;const t=(o=(a=globalThis.soundfontList)==null?void 0:a.instrumentNames)==null?void 0:o.indexOf(e),r=t<10?`00${t}`:t<100?`0${t}`:t;if(t!==-1)return globalThis.soundfontList.instruments.find(l=>l.startsWith(r))},getSampleBufferSource=async(e,t,r,n)=>{let s=0,a=typeof r=="string"?toMidi(r):r||36;s=a-36;const o=getAudioContext$1(),l=getLoadedSamples();if(!l)throw new Error("no samples loaded");const f=l==null?void 0:l[e];if(!f)throw new Error(`sample not found: "${e}", try one of ${Object.keys(l).map(E=>`"${E}"`).join(", ")}.`);if(typeof f!="object")throw new Error("wrong format for sample bank:",e);let y;if(Array.isArray(f))y=f[t%f.length];else{const E=d=>toMidi(d)-a,g=Object.keys(f).filter(d=>!d.startsWith("_")).reduce((d,D,S)=>!d||Math.abs(E(D)){if(!e.includes(":"))return[e,t];let[r,n]=e.split(":");return isNaN(Number(n))?[e,t]:[r,n]};let workletsLoading;function loadWorklets(){return workletsLoading||(workletsLoading=getAudioContext$1().audioWorklet.addModule(workletsUrl),workletsLoading)}function getWorklet(e,t,r){const n=new AudioWorkletNode(e,t);return Object.entries(r).forEach(([s,a])=>{n.parameters.get(s).value=a}),n}if(typeof window<"u")try{loadWorklets()}catch(e){console.warn("could not load AudioWorklet effects coarse, crush and shape",e)}function gainNode(e){const t=getAudioContext$1().createGain();return t.gain.value=e,t}const cutGroups=[];let delays={};function getDelay(e,t,r,n){if(!delays[e]){const a=getAudioContext$1().createFeedbackDelay(1,t,r);a.start(n),a.connect(getDestination()),delays[e]=a}return delays[e].delayTime.value!==t&&delays[e].delayTime.setValueAtTime(t,n),delays[e].feedback.value!==r&&delays[e].feedback.setValueAtTime(r,n),delays[e]}let reverbs={};function getReverb(e,t=2){if(!reverbs[e]){const n=getAudioContext$1().createReverb(t);n.connect(getDestination()),reverbs[e]=n}return reverbs[e].duration!==t&&(reverbs[e]=reverbs[e].setDuration(t),reverbs[e].duration=t),reverbs[e]}function effectSend(e,t,r){const n=gainNode(r);return e.connect(n),n.connect(t),n}const webaudioOutput=async(e,t,r)=>{var n;try{const s=getAudioContext$1();if(typeof e.value!="object")throw new Error(`hap.value ${e.value} is not supported by webaudio output. Hint: append .note() or .s() to the end`);let a=s.currentTime+t,{freq:o,s:l,bank:f,sf:y,clip:m=0,n:v=0,note:A,gain:E=.8,cutoff:g,resonance:d=1,hcutoff:D,hresonance:S=1,bandf:k,bandq:N=1,coarse:b,crush:F,shape:B,pan:_,speed:x=1,begin:$=0,end:T=1,vowel:V,delay:M=0,delayfeedback:L=.5,delaytime:W=.25,unit:Q,nudge:Z=0,cut:X,loop:j,orbit:ue=1,room:ae,size:R=2,roomsize:pe=R}=e.value;const{velocity:me=1}=e.context;E*=me;const K=[];if(f&&l&&(l=`${f}_${l}`),typeof l=="string"&&([l,v]=splitSN(l,v)),typeof A=="string"&&([A,v]=splitSN(A,v)),!l||["sine","square","triangle","sawtooth"].includes(l)){const{attack:re=.001,decay:Ce=.05,sustain:Ee=.6,release:oe=.01}=e.value;v=A||v||36,typeof v=="string"&&(v=toMidi(v)),!o&&typeof v=="number"&&(o=fromMidi(v));const De=getOscillator({t:a,s:l,freq:o,duration:r,release:oe});K.push(De),K.push(gainNode(.3));const G=getADSR(re,Ce,Ee,oe,1,a,a+r);K.push(G)}else{const{attack:re=.001,decay:Ce=.001,sustain:Ee=1,release:oe=.001}=e.value;if(x===0)return;if(!l){console.warn("no sample specified");return}const De=getSoundfontKey(l);let G;try{De?G=await globalThis.getFontBufferSource(De,A||v,s):G=await getSampleBufferSource(l,v,A,x)}catch(xe){console.warn(xe);return}if(s.currentTime>a){console.warn("sample still loading:",l,v);return}if(!G){console.warn("no buffer source");return}G.playbackRate.value=Math.abs(x)*G.playbackRate.value,Q==="c"&&(G.playbackRate.value=G.playbackRate.value*G.buffer.duration);let le=De||m?r:G.buffer.duration/G.playbackRate.value;const de=$*le*G.playbackRate.value;le=(T-$)*le,j&&(G.loop=!0,G.loopStart=de,G.loopEnd=de+le,le=j*le),a+=Z,G.start(a,de),X!==void 0&&((n=cutGroups[X])==null||n.stop(a),cutGroups[X]=G),K.push(G),G.stop(a+le+oe);const we=getADSR(re,Ce,Ee,oe,1,a,a+le);K.push(we)}if(K.push(gainNode(E)),g!==void 0&&K.push(getFilter("lowpass",g,d)),D!==void 0&&K.push(getFilter("highpass",D,S)),k!==void 0&&K.push(getFilter("bandpass",k,N)),V!==void 0&&K.push(s.createVowelFilter(V)),b!==void 0&&K.push(getWorklet(s,"coarse-processor",{coarse:b})),F!==void 0&&K.push(getWorklet(s,"crush-processor",{crush:F})),B!==void 0&&K.push(getWorklet(s,"shape-processor",{shape:B})),_!==void 0){const re=s.createStereoPanner();re.pan.value=2*_-1,K.push(re)}const U=gainNode(1);K.push(U),U.connect(getDestination());let ne;if(M>0&&W>0&&L>0){const re=getDelay(ue,W,L,a);ne=effectSend(U,re,M)}let ye;if(ae>0&&pe>0){const re=getReverb(ue,pe);ye=effectSend(U,re,ae)}K.slice(1).reduce((re,Ce)=>re.connect(Ce),K[0]),K[0].onended=()=>K.concat([ne,ye]).forEach(re=>re==null?void 0:re.disconnect())}catch(s){console.warn(".out error:",s)}},webaudioOutputTrigger=(e,t,r,n)=>webaudioOutput(t,e-r,t.duration/n);Pattern.prototype.out=function(){return this.onTrigger(webaudioOutputTrigger)};var escodegen={},estraverse={};(function(e){(function t(r){var n,s,a,o,l,f;function y(F){var B={},_,x;for(_ in F)F.hasOwnProperty(_)&&(x=F[_],typeof x=="object"&&x!==null?B[_]=y(x):B[_]=x);return B}function m(F,B){var _,x,$,T;for(x=F.length,$=0;x;)_=x>>>1,T=$+_,B(F[T])?x=_:($=T+1,x-=_+1);return $}n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},a={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},o={},l={},f={},s={Break:o,Skip:l,Remove:f};function v(F,B){this.parent=F,this.key=B}v.prototype.replace=function(B){this.parent[this.key]=B},v.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function A(F,B,_,x){this.node=F,this.path=B,this.wrap=_,this.ref=x}function E(){}E.prototype.path=function(){var B,_,x,$,T,V;function M(L,W){if(Array.isArray(W))for(x=0,$=W.length;x<$;++x)L.push(W[x]);else L.push(W)}if(!this.__current.path)return null;for(T=[],B=2,_=this.__leavelist.length;B<_;++B)V=this.__leavelist[B],M(T,V.path);return M(T,this.__current.path),T},E.prototype.type=function(){var F=this.current();return F.type||this.__current.wrap},E.prototype.parents=function(){var B,_,x;for(x=[],B=1,_=this.__leavelist.length;B<_;++B)x.push(this.__leavelist[B].node);return x},E.prototype.current=function(){return this.__current.node},E.prototype.__execute=function(B,_){var x,$;return $=void 0,x=this.__current,this.__current=_,this.__state=null,B&&($=B.call(this,_.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=x,$},E.prototype.notify=function(B){this.__state=B},E.prototype.skip=function(){this.notify(l)},E.prototype.break=function(){this.notify(o)},E.prototype.remove=function(){this.notify(f)},E.prototype.__initialize=function(F,B){this.visitor=B,this.root=F,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,B.fallback==="iteration"?this.__fallback=Object.keys:typeof B.fallback=="function"&&(this.__fallback=B.fallback),this.__keys=a,B.keys&&(this.__keys=Object.assign(Object.create(this.__keys),B.keys))};function g(F){return F==null?!1:typeof F=="object"&&typeof F.type=="string"}function d(F,B){return(F===n.ObjectExpression||F===n.ObjectPattern)&&B==="properties"}function D(F,B){for(var _=F.length-1;_>=0;--_)if(F[_].node===B)return!0;return!1}E.prototype.traverse=function(B,_){var x,$,T,V,M,L,W,Q,Z,X,j,ue;for(this.__initialize(B,_),ue={},x=this.__worklist,$=this.__leavelist,x.push(new A(B,null,null,null)),$.push(new A(null,null,null,null));x.length;){if(T=x.pop(),T===ue){if(T=$.pop(),L=this.__execute(_.leave,T),this.__state===o||L===o)return;continue}if(T.node){if(L=this.__execute(_.enter,T),this.__state===o||L===o)return;if(x.push(ue),$.push(T),this.__state===l||L===l)continue;if(V=T.node,M=V.type||T.wrap,X=this.__keys[M],!X)if(this.__fallback)X=this.__fallback(V);else throw new Error("Unknown node type "+M+".");for(Q=X.length;(Q-=1)>=0;)if(W=X[Q],j=V[W],!!j){if(Array.isArray(j)){for(Z=j.length;(Z-=1)>=0;)if(!!j[Z]&&!D($,j[Z])){if(d(M,X[Q]))T=new A(j[Z],[W,Z],"Property",null);else if(g(j[Z]))T=new A(j[Z],[W,Z],null,null);else continue;x.push(T)}}else if(g(j)){if(D($,j))continue;x.push(new A(j,W,null,null))}}}}},E.prototype.replace=function(B,_){var x,$,T,V,M,L,W,Q,Z,X,j,ue,ae;function R(pe){var me,K,U,ne;if(pe.ref.remove()){for(K=pe.ref.key,ne=pe.ref.parent,me=x.length;me--;)if(U=x[me],U.ref&&U.ref.parent===ne){if(U.ref.key=0;)if(ae=Z[W],X=T[ae],!!X)if(Array.isArray(X)){for(Q=X.length;(Q-=1)>=0;)if(!!X[Q]){if(d(V,Z[W]))L=new A(X[Q],[ae,Q],"Property",new v(X,Q));else if(g(X[Q]))L=new A(X[Q],[ae,Q],null,new v(X,Q));else continue;x.push(L)}}else g(X)&&x.push(new A(X,ae,null,new v(T,ae)))}}return ue.root};function S(F,B){var _=new E;return _.traverse(F,B)}function k(F,B){var _=new E;return _.replace(F,B)}function N(F,B){var _;return _=m(B,function($){return $.range[0]>F.range[0]}),F.extendedRange=[F.range[0],F.range[1]],_!==B.length&&(F.extendedRange[1]=B[_].range[0]),_-=1,_>=0&&(F.extendedRange[0]=B[_].range[1]),F}function b(F,B,_){var x=[],$,T,V,M;if(!F.range)throw new Error("attachComments needs range information");if(!_.length){if(B.length){for(V=0,T=B.length;VL.range[0]));)W.extendedRange[1]===L.range[0]?(L.leadingComments||(L.leadingComments=[]),L.leadingComments.push(W),x.splice(M,1)):M+=1;if(M===x.length)return s.Break;if(x[M].extendedRange[0]>L.range[1])return s.Skip}}),M=0,S(F,{leave:function(L){for(var W;ML.range[1])return s.Skip}}),F}return r.Syntax=n,r.traverse=S,r.replace=k,r.attachComments=b,r.VisitorKeys=a,r.VisitorOption=s,r.Controller=E,r.cloneEnvironment=function(){return t({})},r})(e)})(estraverse);var utils={},ast={exports:{}};(function(){function e(o){if(o==null)return!1;switch(o.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function t(o){if(o==null)return!1;switch(o.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function r(o){if(o==null)return!1;switch(o.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(o){return r(o)||o!=null&&o.type==="FunctionDeclaration"}function s(o){switch(o.type){case"IfStatement":return o.alternate!=null?o.alternate:o.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return o.body}return null}function a(o){var l;if(o.type!=="IfStatement"||o.alternate==null)return!1;l=o.consequent;do{if(l.type==="IfStatement"&&l.alternate==null)return!0;l=s(l)}while(l);return!1}ast.exports={isExpression:e,isStatement:r,isIterationStatement:t,isSourceElement:n,isProblematicIfStatement:a,trailingStatement:s}})();var code={exports:{}};(function(){var e,t,r,n,s,a;t={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},e={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function o(D){return 48<=D&&D<=57}function l(D){return 48<=D&&D<=57||97<=D&&D<=102||65<=D&&D<=70}function f(D){return D>=48&&D<=55}r=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function y(D){return D===32||D===9||D===11||D===12||D===160||D>=5760&&r.indexOf(D)>=0}function m(D){return D===10||D===13||D===8232||D===8233}function v(D){if(D<=65535)return String.fromCharCode(D);var S=String.fromCharCode(Math.floor((D-65536)/1024)+55296),k=String.fromCharCode((D-65536)%1024+56320);return S+k}for(n=new Array(128),a=0;a<128;++a)n[a]=a>=97&&a<=122||a>=65&&a<=90||a===36||a===95;for(s=new Array(128),a=0;a<128;++a)s[a]=a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===36||a===95;function A(D){return D<128?n[D]:t.NonAsciiIdentifierStart.test(v(D))}function E(D){return D<128?s[D]:t.NonAsciiIdentifierPart.test(v(D))}function g(D){return D<128?n[D]:e.NonAsciiIdentifierStart.test(v(D))}function d(D){return D<128?s[D]:e.NonAsciiIdentifierPart.test(v(D))}code.exports={isDecimalDigit:o,isHexDigit:l,isOctalDigit:f,isWhiteSpace:y,isLineTerminator:m,isIdentifierStartES5:A,isIdentifierPartES5:E,isIdentifierStartES6:g,isIdentifierPartES6:d}})();var keyword={exports:{}};(function(){var e=code.exports;function t(A){switch(A){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function r(A,E){return!E&&A==="yield"?!1:n(A,E)}function n(A,E){if(E&&t(A))return!0;switch(A.length){case 2:return A==="if"||A==="in"||A==="do";case 3:return A==="var"||A==="for"||A==="new"||A==="try";case 4:return A==="this"||A==="else"||A==="case"||A==="void"||A==="with"||A==="enum";case 5:return A==="while"||A==="break"||A==="catch"||A==="throw"||A==="const"||A==="yield"||A==="class"||A==="super";case 6:return A==="return"||A==="typeof"||A==="delete"||A==="switch"||A==="export"||A==="import";case 7:return A==="default"||A==="finally"||A==="extends";case 8:return A==="function"||A==="continue"||A==="debugger";case 10:return A==="instanceof";default:return!1}}function s(A,E){return A==="null"||A==="true"||A==="false"||r(A,E)}function a(A,E){return A==="null"||A==="true"||A==="false"||n(A,E)}function o(A){return A==="eval"||A==="arguments"}function l(A){var E,g,d;if(A.length===0||(d=A.charCodeAt(0),!e.isIdentifierStartES5(d)))return!1;for(E=1,g=A.length;E=g||(D=A.charCodeAt(E),!(56320<=D&&D<=57343)))return!1;d=f(d,D)}if(!S(d))return!1;S=e.isIdentifierPartES6}return!0}function m(A,E){return l(A)&&!s(A,E)}function v(A,E){return y(A)&&!a(A,E)}keyword.exports={isKeywordES5:r,isKeywordES6:n,isReservedWordES5:s,isReservedWordES6:a,isRestrictedWord:o,isIdentifierNameES5:l,isIdentifierNameES6:y,isIdentifierES5:m,isIdentifierES6:v}})();(function(){utils.ast=ast.exports,utils.code=code.exports,utils.keyword=keyword.exports})();var sourceMap={},sourceMapGenerator={},base64Vlq={},base64={},hasRequiredBase64;function requireBase64(){if(hasRequiredBase64)return base64;hasRequiredBase64=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return base64.encode=function(t){if(0<=t&&t>1;return f?-y:y}return base64Vlq.encode=function(f){var y="",m,v=a(f);do m=v&n,v>>>=t,v>0&&(m|=s),y+=e.encode(m);while(v>0);return y},base64Vlq.decode=function(f,y,m){var v=f.length,A=0,E=0,g,d;do{if(y>=v)throw new Error("Expected more digits in base 64 VLQ value.");if(d=e.decode(f.charCodeAt(y++)),d===-1)throw new Error("Invalid base64 digit: "+f.charAt(y-1));g=!!(d&s),d&=n,A=A+(d<=0;V--)$=x[V],$==="."?x.splice(V,1):$===".."?T++:T>0&&($===""?(x.splice(V+1,T),T=0):(x.splice(V,2),T--));return F=x.join("/"),F===""&&(F=_?"/":"."),B?(B.path=F,a(B)):F}e.normalize=o;function l(b,F){b===""&&(b="."),F===""&&(F=".");var B=s(F),_=s(b);if(_&&(b=_.path||"/"),B&&!B.scheme)return _&&(B.scheme=_.scheme),a(B);if(B||F.match(n))return F;if(_&&!_.host&&!_.path)return _.host=F,a(_);var x=F.charAt(0)==="/"?F:o(b.replace(/\/+$/,"")+"/"+F);return _?(_.path=x,a(_)):x}e.join=l,e.isAbsolute=function(b){return b.charAt(0)==="/"||r.test(b)};function f(b,F){b===""&&(b="."),b=b.replace(/\/$/,"");for(var B=0;F.indexOf(b+"/")!==0;){var _=b.lastIndexOf("/");if(_<0||(b=b.slice(0,_),b.match(/^([^\/]+:\/)?\/*$/)))return F;++B}return Array(B+1).join("../")+F.substr(b.length+1)}e.relative=f;var y=function(){var b=Object.create(null);return!("__proto__"in b)}();function m(b){return b}function v(b){return E(b)?"$"+b:b}e.toSetString=y?m:v;function A(b){return E(b)?b.slice(1):b}e.fromSetString=y?m:A;function E(b){if(!b)return!1;var F=b.length;if(F<9||b.charCodeAt(F-1)!==95||b.charCodeAt(F-2)!==95||b.charCodeAt(F-3)!==111||b.charCodeAt(F-4)!==116||b.charCodeAt(F-5)!==111||b.charCodeAt(F-6)!==114||b.charCodeAt(F-7)!==112||b.charCodeAt(F-8)!==95||b.charCodeAt(F-9)!==95)return!1;for(var B=F-10;B>=0;B--)if(b.charCodeAt(B)!==36)return!1;return!0}function g(b,F,B){var _=D(b.source,F.source);return _!==0||(_=b.originalLine-F.originalLine,_!==0)||(_=b.originalColumn-F.originalColumn,_!==0||B)||(_=b.generatedColumn-F.generatedColumn,_!==0)||(_=b.generatedLine-F.generatedLine,_!==0)?_:D(b.name,F.name)}e.compareByOriginalPositions=g;function d(b,F,B){var _=b.generatedLine-F.generatedLine;return _!==0||(_=b.generatedColumn-F.generatedColumn,_!==0||B)||(_=D(b.source,F.source),_!==0)||(_=b.originalLine-F.originalLine,_!==0)||(_=b.originalColumn-F.originalColumn,_!==0)?_:D(b.name,F.name)}e.compareByGeneratedPositionsDeflated=d;function D(b,F){return b===F?0:b===null?1:F===null?-1:b>F?1:-1}function S(b,F){var B=b.generatedLine-F.generatedLine;return B!==0||(B=b.generatedColumn-F.generatedColumn,B!==0)||(B=D(b.source,F.source),B!==0)||(B=b.originalLine-F.originalLine,B!==0)||(B=b.originalColumn-F.originalColumn,B!==0)?B:D(b.name,F.name)}e.compareByGeneratedPositionsInflated=S;function k(b){return JSON.parse(b.replace(/^\)]}'[^\n]*\n/,""))}e.parseSourceMapInput=k;function N(b,F,B){if(F=F||"",b&&(b[b.length-1]!=="/"&&F[0]!=="/"&&(b+="/"),F=b+F),B){var _=s(B);if(!_)throw new Error("sourceMapURL could not be parsed");if(_.path){var x=_.path.lastIndexOf("/");x>=0&&(_.path=_.path.substring(0,x+1))}F=l(a(_),F)}return o(F)}e.computeSourceURL=N}(util)),util}var arraySet={},hasRequiredArraySet;function requireArraySet(){if(hasRequiredArraySet)return arraySet;hasRequiredArraySet=1;var e=requireUtil(),t=Object.prototype.hasOwnProperty,r=typeof Map<"u";function n(){this._array=[],this._set=r?new Map:Object.create(null)}return n.fromArray=function(a,o){for(var l=new n,f=0,y=a.length;f=0)return o}else{var l=e.toSetString(a);if(t.call(this._set,l))return this._set[l]}throw new Error('"'+a+'" is not in the set.')},n.prototype.at=function(a){if(a>=0&&aa||o==a&&f>=l||e.compareByGeneratedPositionsInflated(n,s)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return r.prototype.unsortedForEach=function(s,a){this._array.forEach(s,a)},r.prototype.add=function(s){t(this._last,s)?(this._last=s,this._array.push(s)):(this._sorted=!1,this._array.push(s))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},mappingList.MappingList=r,mappingList}var hasRequiredSourceMapGenerator;function requireSourceMapGenerator(){if(hasRequiredSourceMapGenerator)return sourceMapGenerator;hasRequiredSourceMapGenerator=1;var e=requireBase64Vlq(),t=requireUtil(),r=requireArraySet().ArraySet,n=requireMappingList().MappingList;function s(a){a||(a={}),this._file=t.getArg(a,"file",null),this._sourceRoot=t.getArg(a,"sourceRoot",null),this._skipValidation=t.getArg(a,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new n,this._sourcesContents=null}return s.prototype._version=3,s.fromSourceMap=function(o){var l=o.sourceRoot,f=new s({file:o.file,sourceRoot:l});return o.eachMapping(function(y){var m={generated:{line:y.generatedLine,column:y.generatedColumn}};y.source!=null&&(m.source=y.source,l!=null&&(m.source=t.relative(l,m.source)),m.original={line:y.originalLine,column:y.originalColumn},y.name!=null&&(m.name=y.name)),f.addMapping(m)}),o.sources.forEach(function(y){var m=y;l!==null&&(m=t.relative(l,y)),f._sources.has(m)||f._sources.add(m);var v=o.sourceContentFor(y);v!=null&&f.setSourceContent(y,v)}),f},s.prototype.addMapping=function(o){var l=t.getArg(o,"generated"),f=t.getArg(o,"original",null),y=t.getArg(o,"source",null),m=t.getArg(o,"name",null);this._skipValidation||this._validateMapping(l,f,y,m),y!=null&&(y=String(y),this._sources.has(y)||this._sources.add(y)),m!=null&&(m=String(m),this._names.has(m)||this._names.add(m)),this._mappings.add({generatedLine:l.line,generatedColumn:l.column,originalLine:f!=null&&f.line,originalColumn:f!=null&&f.column,source:y,name:m})},s.prototype.setSourceContent=function(o,l){var f=o;this._sourceRoot!=null&&(f=t.relative(this._sourceRoot,f)),l!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(f)]=l):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(f)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(o,l,f){var y=l;if(l==null){if(o.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);y=o.file}var m=this._sourceRoot;m!=null&&(y=t.relative(m,y));var v=new r,A=new r;this._mappings.unsortedForEach(function(E){if(E.source===y&&E.originalLine!=null){var g=o.originalPositionFor({line:E.originalLine,column:E.originalColumn});g.source!=null&&(E.source=g.source,f!=null&&(E.source=t.join(f,E.source)),m!=null&&(E.source=t.relative(m,E.source)),E.originalLine=g.line,E.originalColumn=g.column,g.name!=null&&(E.name=g.name))}var d=E.source;d!=null&&!v.has(d)&&v.add(d);var D=E.name;D!=null&&!A.has(D)&&A.add(D)},this),this._sources=v,this._names=A,o.sources.forEach(function(E){var g=o.sourceContentFor(E);g!=null&&(f!=null&&(E=t.join(f,E)),m!=null&&(E=t.relative(m,E)),this.setSourceContent(E,g))},this)},s.prototype._validateMapping=function(o,l,f,y){if(l&&typeof l.line!="number"&&typeof l.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(o&&"line"in o&&"column"in o&&o.line>0&&o.column>=0&&!l&&!f&&!y)){if(o&&"line"in o&&"column"in o&&l&&"line"in l&&"column"in l&&o.line>0&&o.column>=0&&l.line>0&&l.column>=0&&f)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:o,source:f,original:l,name:y}))}},s.prototype._serializeMappings=function(){for(var o=0,l=1,f=0,y=0,m=0,v=0,A="",E,g,d,D,S=this._mappings.toArray(),k=0,N=S.length;k0){if(!t.compareByGeneratedPositionsInflated(g,S[k-1]))continue;E+=","}E+=e.encode(g.generatedColumn-o),o=g.generatedColumn,g.source!=null&&(D=this._sources.indexOf(g.source),E+=e.encode(D-v),v=D,E+=e.encode(g.originalLine-1-y),y=g.originalLine-1,E+=e.encode(g.originalColumn-f),f=g.originalColumn,g.name!=null&&(d=this._names.indexOf(g.name),E+=e.encode(d-m),m=d)),A+=E}return A},s.prototype._generateSourcesContent=function(o,l){return o.map(function(f){if(!this._sourcesContents)return null;l!=null&&(f=t.relative(l,f));var y=t.toSetString(f);return Object.prototype.hasOwnProperty.call(this._sourcesContents,y)?this._sourcesContents[y]:null},this)},s.prototype.toJSON=function(){var o={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(o.file=this._file),this._sourceRoot!=null&&(o.sourceRoot=this._sourceRoot),this._sourcesContents&&(o.sourcesContent=this._generateSourcesContent(o.sources,o.sourceRoot)),o},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},sourceMapGenerator.SourceMapGenerator=s,sourceMapGenerator}var sourceMapConsumer={},binarySearch={},hasRequiredBinarySearch;function requireBinarySearch(){return hasRequiredBinarySearch||(hasRequiredBinarySearch=1,function(e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(r,n,s,a,o,l){var f=Math.floor((n-r)/2)+r,y=o(s,a[f],!0);return y===0?f:y>0?n-f>1?t(f,n,s,a,o,l):l==e.LEAST_UPPER_BOUND?n1?t(r,f,s,a,o,l):l==e.LEAST_UPPER_BOUND?f:r<0?-1:r}e.search=function(n,s,a,o){if(s.length===0)return-1;var l=t(-1,s.length,n,s,a,o||e.GREATEST_LOWER_BOUND);if(l<0)return-1;for(;l-1>=0&&a(s[l],s[l-1],!0)===0;)--l;return l}}(binarySearch)),binarySearch}var quickSort={},hasRequiredQuickSort;function requireQuickSort(){if(hasRequiredQuickSort)return quickSort;hasRequiredQuickSort=1;function e(n,s,a){var o=n[s];n[s]=n[a],n[a]=o}function t(n,s){return Math.round(n+Math.random()*(s-n))}function r(n,s,a,o){if(a=0){var d=this._originalMappings[g];if(m.column===void 0)for(var D=d.originalLine;d&&d.originalLine===D;)E.push({line:e.getArg(d,"generatedLine",null),column:e.getArg(d,"generatedColumn",null),lastColumn:e.getArg(d,"lastGeneratedColumn",null)}),d=this._originalMappings[++g];else for(var S=d.originalColumn;d&&d.originalLine===v&&d.originalColumn==S;)E.push({line:e.getArg(d,"generatedLine",null),column:e.getArg(d,"generatedColumn",null),lastColumn:e.getArg(d,"lastGeneratedColumn",null)}),d=this._originalMappings[++g]}return E},sourceMapConsumer.SourceMapConsumer=a;function o(y,m){var v=y;typeof y=="string"&&(v=e.parseSourceMapInput(y));var A=e.getArg(v,"version"),E=e.getArg(v,"sources"),g=e.getArg(v,"names",[]),d=e.getArg(v,"sourceRoot",null),D=e.getArg(v,"sourcesContent",null),S=e.getArg(v,"mappings"),k=e.getArg(v,"file",null);if(A!=this._version)throw new Error("Unsupported version: "+A);d&&(d=e.normalize(d)),E=E.map(String).map(e.normalize).map(function(N){return d&&e.isAbsolute(d)&&e.isAbsolute(N)?e.relative(d,N):N}),this._names=r.fromArray(g.map(String),!0),this._sources=r.fromArray(E,!0),this._absoluteSources=this._sources.toArray().map(function(N){return e.computeSourceURL(d,N,m)}),this.sourceRoot=d,this.sourcesContent=D,this._mappings=S,this._sourceMapURL=m,this.file=k}o.prototype=Object.create(a.prototype),o.prototype.consumer=a,o.prototype._findSourceIndex=function(y){var m=y;if(this.sourceRoot!=null&&(m=e.relative(this.sourceRoot,m)),this._sources.has(m))return this._sources.indexOf(m);var v;for(v=0;v1&&(x.source=D+T[1],D+=T[1],x.originalLine=g+T[2],g=x.originalLine,x.originalLine+=1,x.originalColumn=d+T[3],d=x.originalColumn,T.length>4&&(x.name=S+T[4],S+=T[4])),_.push(x),typeof x.originalLine=="number"&&B.push(x)}s(_,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,s(B,e.compareByOriginalPositions),this.__originalMappings=B},o.prototype._findMapping=function(m,v,A,E,g,d){if(m[A]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+m[A]);if(m[E]<0)throw new TypeError("Column must be greater than or equal to 0, got "+m[E]);return t.search(m,v,g,d)},o.prototype.computeColumnSpans=function(){for(var m=0;m=0){var E=this._generatedMappings[A];if(E.generatedLine===v.generatedLine){var g=e.getArg(E,"source",null);g!==null&&(g=this._sources.at(g),g=e.computeSourceURL(this.sourceRoot,g,this._sourceMapURL));var d=e.getArg(E,"name",null);return d!==null&&(d=this._names.at(d)),{source:g,line:e.getArg(E,"originalLine",null),column:e.getArg(E,"originalColumn",null),name:d}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(m){return m==null}):!1},o.prototype.sourceContentFor=function(m,v){if(!this.sourcesContent)return null;var A=this._findSourceIndex(m);if(A>=0)return this.sourcesContent[A];var E=m;this.sourceRoot!=null&&(E=e.relative(this.sourceRoot,E));var g;if(this.sourceRoot!=null&&(g=e.urlParse(this.sourceRoot))){var d=E.replace(/^file:\/\//,"");if(g.scheme=="file"&&this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)];if((!g.path||g.path=="/")&&this._sources.has("/"+E))return this.sourcesContent[this._sources.indexOf("/"+E)]}if(v)return null;throw new Error('"'+E+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(m){var v=e.getArg(m,"source");if(v=this._findSourceIndex(v),v<0)return{line:null,column:null,lastColumn:null};var A={source:v,originalLine:e.getArg(m,"line"),originalColumn:e.getArg(m,"column")},E=this._findMapping(A,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(m,"bias",a.GREATEST_LOWER_BOUND));if(E>=0){var g=this._originalMappings[E];if(g.source===A.source)return{line:e.getArg(g,"generatedLine",null),column:e.getArg(g,"generatedColumn",null),lastColumn:e.getArg(g,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},sourceMapConsumer.BasicSourceMapConsumer=o;function f(y,m){var v=y;typeof y=="string"&&(v=e.parseSourceMapInput(y));var A=e.getArg(v,"version"),E=e.getArg(v,"sections");if(A!=this._version)throw new Error("Unsupported version: "+A);this._sources=new r,this._names=new r;var g={line:-1,column:0};this._sections=E.map(function(d){if(d.url)throw new Error("Support for url field in sections not implemented.");var D=e.getArg(d,"offset"),S=e.getArg(D,"line"),k=e.getArg(D,"column");if(S=0;f--)this.prepend(l[f]);else if(l[s]||typeof l=="string")this.children.unshift(l);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+l);return this},a.prototype.walk=function(l){for(var f,y=0,m=this.children.length;y0){for(f=[],y=0;y=6.0"},maintainers=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"http://github.com/Constellation"}],repository={type:"git",url:"http://github.com/estools/escodegen.git"},dependencies={estraverse:"^5.2.0",esutils:"^2.0.2",esprima:"^4.0.1",optionator:"^0.8.1"},optionalDependencies={"source-map":"~0.6.1"},devDependencies={acorn:"^7.3.1",bluebird:"^3.4.7","bower-registry-client":"^1.0.0",chai:"^4.2.0","chai-exclude":"^2.0.2","commonjs-everywhere":"^0.9.7",gulp:"^3.8.10","gulp-eslint":"^3.0.1","gulp-mocha":"^3.0.1",semver:"^5.1.0"},license="BSD-2-Clause",scripts={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint",release:"node tools/release.js","build-min":"./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",build:"./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js"},require$$3={name,description,homepage,main,bin,files,version:version$1,engines,maintainers,repository,dependencies,optionalDependencies,devDependencies,license,scripts};(function(e){(function(){var t,r,n,s,a,o,l,f,y,m,v,A,E,g,d,D,S,k,N,b,F,B,_,x,$,T;a=estraverse,o=utils,t=a.Syntax;function V(u){return J.Expression.hasOwnProperty(u.type)}function M(u){return J.Statement.hasOwnProperty(u.type)}r={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,LogicalOR:3,LogicalAND:4,BitwiseOR:5,BitwiseXOR:6,BitwiseAND:7,Equality:8,Relational:9,BitwiseSHIFT:10,Additive:11,Multiplicative:12,Exponentiation:13,Await:14,Unary:14,Postfix:15,OptionalChaining:16,Call:17,New:18,TaggedTemplate:19,Member:20,Primary:21},n={"||":r.LogicalOR,"&&":r.LogicalAND,"|":r.BitwiseOR,"^":r.BitwiseXOR,"&":r.BitwiseAND,"==":r.Equality,"!=":r.Equality,"===":r.Equality,"!==":r.Equality,is:r.Equality,isnt:r.Equality,"<":r.Relational,">":r.Relational,"<=":r.Relational,">=":r.Relational,in:r.Relational,instanceof:r.Relational,"<<":r.BitwiseSHIFT,">>":r.BitwiseSHIFT,">>>":r.BitwiseSHIFT,"+":r.Additive,"-":r.Additive,"*":r.Multiplicative,"%":r.Multiplicative,"/":r.Multiplicative,"**":r.Exponentiation};var L=1,W=1<<1,Q=1<<2,Z=1<<3,X=1<<4,j=1<<5,ue=W|Q,ae=L|W,R=L|W|Q,pe=L,me=Q,K=L|Q,U=L,ne=L|j,ye=0,re=L|X,Ce=L|Z;function Ee(){return{indent:null,base:null,parse:null,comment:!1,format:{indent:{style:" ",base:0,adjustMultilineComment:!1},newline:` +`,space:" ",json:!1,renumber:!1,hexadecimal:!1,quotes:"single",escapeless:!1,compact:!1,parentheses:!0,semicolons:!0,safeConcatenation:!1,preserveBlankLines:!1},moz:{comprehensionExpressionStartsWithAssignment:!1,starlessGenerator:!1},sourceMap:null,sourceMapRoot:null,sourceMapWithCode:!1,directive:!1,raw:!0,verbatim:null,sourceCode:null}}function oe(u,p){var c="";for(p|=0;p>0;p>>>=1,u+=u)p&1&&(c+=u);return c}function De(u){return/[\r\n]/g.test(u)}function G(u){var p=u.length;return p&&o.code.isLineTerminator(u.charCodeAt(p-1))}function le(u,p){var c;for(c in p)p.hasOwnProperty(c)&&(u[c]=p[c]);return u}function de(u,p){var c,h;function C(w){return typeof w=="object"&&w instanceof Object&&!(w instanceof RegExp)}for(c in p)p.hasOwnProperty(c)&&(h=p[c],C(h)?C(u[c])?de(u[c],h):u[c]=de({},h):u[c]=h);return u}function we(u){var p,c,h,C,w;if(u!==u)throw new Error("Numeric literal whose value is NaN");if(u<0||u===0&&1/u<0)throw new Error("Numeric literal whose value is negative");if(u===1/0)return y?"null":m?"1e400":"1e+400";if(p=""+u,!m||p.length<3)return p;for(c=p.indexOf("."),!y&&p.charCodeAt(0)===48&&c===1&&(c=0,p=p.slice(1)),h=p,p=p.replace("e+","e"),C=0,(w=h.indexOf("e"))>0&&(C=+h.slice(w+1),h=h.slice(0,w)),c>=0&&(C-=h.length-c-1,h=+(h.slice(0,c)+h.slice(c+1))+""),w=0;h.charCodeAt(h.length+w-1)===48;)--w;return w!==0&&(C-=w,h=h.slice(0,w)),C!==0&&(h+="e"+C),(h.length1e12&&Math.floor(u)===u&&(h="0x"+u.toString(16)).length255?"\\u"+"0000".slice(c.length)+c:u===0&&!o.code.isDecimalDigit(p)?"\\0":u===11?"\\x0B":"\\x"+"00".slice(c.length)+c)}function Le(u){if(u===92)return"\\\\";if(u===10)return"\\n";if(u===13)return"\\r";if(u===8232)return"\\u2028";if(u===8233)return"\\u2029";throw new Error("Incorrectly classified character")}function Re(u){var p,c,h,C;for(C=A==="double"?'"':"'",p=0,c=u.length;p126))){p+=Te(C,u.charCodeAt(c+1));continue}p+=String.fromCharCode(C)}if(P=!(A==="double"||A==="auto"&&I=0&&!o.code.isLineTerminator(u.charCodeAt(p));--p);return u.length-1-p}function Ve(u,p){var c,h,C,w,I,P,O,z;for(c=u.split(/\r\n|[\r\n]/),P=Number.MAX_VALUE,h=1,C=c.length;hI&&(P=I)}for(typeof p<"u"?(O=l,c[1][P]==="*"&&(p+=" "),l=p):(P&1&&--P,O=l),h=1,C=c.length;h0){if(w=p,x){for(C=u.leadingComments[0],p=[],z=C.extendedRange,te=C.range,be=_.substring(z[0],te[0]),he=(be.match(/\n/g)||[]).length,he>0?(p.push(oe(` +`,he)),p.push(se(fe(C)))):(p.push(be),p.push(fe(C))),Ae=te,c=1,h=u.leadingComments.length;c0?(p.push(oe(` +`,he)),p.push(se(fe(C)))):(p.push(be),p.push(fe(C)));else for(I=!G(H(p).toString()),P=oe(" ",Me(H([l,p,f]).toString())),c=0,h=u.trailingComments.length;c")),u.expression?(p.push(d),c=this.generateExpression(u.body,r.Assignment,R),c.toString().charAt(0)==="{"&&(c=["(",c,")"]),p.push(c)):p.push(this.maybeBlock(u.body,Ce)),p},J.prototype.generateIterationForStatement=function(u,p,c){var h=["for"+(p.await?ie()+"await":"")+d+"("],C=this;return Y(function(){p.left.type===t.VariableDeclaration?Y(function(){h.push(p.left.kind+ie()),h.push(C.generateStatement(p.left.declarations[0],ye))}):h.push(C.generateExpression(p.left,r.Call,R)),h=q(h,u),h=[q(h,C.generateExpression(p.right,r.Assignment,R)),")"]}),h.push(this.maybeBlock(p.body,c)),h},J.prototype.generatePropertyKey=function(u,p){var c=[];return p&&c.push("["),c.push(this.generateExpression(u,r.Assignment,R)),p&&c.push("]"),c},J.prototype.generateAssignment=function(u,p,c,h,C){return r.Assignment2&&(h=_.substring(c[0]+1,c[1]-1),h[0]===` +`&&(C=["{"]),C.push(h)));var I,P,O,z;for(z=U,p&Z&&(z|=X),I=0,P=u.body.length;I0&&!u.body[I-1].trailingComments&&!u.body[I].leadingComments&&ve(u.body[I-1].range[1],u.body[I].range[0],C)),I===P-1&&(z|=j),u.body[I].leadingComments&&x?O=w.generateStatement(u.body[I],z):O=se(w.generateStatement(u.body[I],z)),C.push(O),G(H(O).toString())||x&&I1?Y(O):O(),c.push(this.semicolon(p)),c},ThrowStatement:function(u,p){return[q("throw",this.generateExpression(u.argument,r.Sequence,R)),this.semicolon(p)]},TryStatement:function(u,p){var c,h,C,w;if(c=["try",this.maybeBlock(u.block,U)],c=this.maybeBlockSuffix(u.block,c),u.handlers)for(h=0,C=u.handlers.length;h0?` +`:""],I=re,C=0;C0&&!u.body[C-1].trailingComments&&!u.body[C].leadingComments&&ve(u.body[C-1].range[1],u.body[C].range[0],c)),h=se(this.generateStatement(u.body[C],I)),c.push(h),C+10){for(h.push("("),w=0,I=C;w=2&&C.charCodeAt(0)===48)&&h.push(" ")),h.push(u.optional?"?.":"."),h.push(ce(u.property))),ee(h,r.Member,p)},MetaProperty:function(u,p,c){var h;return h=[],h.push(typeof u.meta=="string"?u.meta:ce(u.meta)),h.push("."),h.push(typeof u.property=="string"?u.property:ce(u.property)),ee(h,r.Member,p)},UnaryExpression:function(u,p,c){var h,C,w,I,P;return C=this.generateExpression(u.argument,r.Unary,R),d===""?h=q(u.operator,C):(h=[u.operator],u.operator.length>2?h=q(h,C):(I=H(h).toString(),P=I.charCodeAt(I.length-1),w=C.toString().charCodeAt(0),((P===43||P===45)&&P===w||o.code.isIdentifierPartES5(P)&&o.code.isIdentifierPartES5(w))&&h.push(ie()),h.push(C))),ee(h,r.Unary,p)},YieldExpression:function(u,p,c){var h;return u.delegate?h="yield*":h="yield",u.argument&&(h=q(h,this.generateExpression(u.argument,r.Yield,R))),ee(h,r.Yield,p)},AwaitExpression:function(u,p,c){var h=q(u.all?"await*":"await",this.generateExpression(u.argument,r.Await,R));return ee(h,r.Await,p)},UpdateExpression:function(u,p,c){return u.prefix?ee([u.operator,this.generateExpression(u.argument,r.Unary,R)],r.Unary,p):ee([this.generateExpression(u.argument,r.Postfix,R),u.operator],r.Postfix,p)},FunctionExpression:function(u,p,c){var h=[Fe(u,!0),"function"];return u.id?(h.push(Se(u)||ie()),h.push(ce(u.id))):h.push(Se(u)||d),h.push(this.generateFunctionBody(u)),h},ArrayPattern:function(u,p,c){return this.ArrayExpression(u,p,c,!0)},ArrayExpression:function(u,p,c,h){var C,w,I=this;return u.elements.length?(w=h?!1:u.elements.length>1,C=["[",w?g:""],Y(function(P){var O,z;for(O=0,z=u.elements.length;O1,Y(function(){w=I.generateExpression(u.properties[0],r.Sequence,R)}),!h&&!De(H(w).toString())?["{",d,w,d,"}"]:(Y(function(P){var O,z;if(C=["{",g,P,w],h)for(C.push(","+g),O=1,z=u.properties.length;O0||b.moz.comprehensionExpressionStartsWithAssignment?h=q(h,I):h.push(I)}),u.filter&&(h=q(h,"if"+d),I=this.generateExpression(u.filter,r.Sequence,R),h=q(h,["(",I,")"])),b.moz.comprehensionExpressionStartsWithAssignment||(I=this.generateExpression(u.body,r.Assignment,R),h=q(h,I)),h.push(u.type===t.GeneratorExpression?")":"]"),h},ComprehensionBlock:function(u,p,c){var h;return u.left.type===t.VariableDeclaration?h=[u.left.kind,ie(),this.generateStatement(u.left.declarations[0],ye)]:h=this.generateExpression(u.left,r.Call,R),h=q(h,u.of?"of":"in"),h=q(h,this.generateExpression(u.right,r.Sequence,R)),["for"+d+"(",h,")"]},SpreadElement:function(u,p,c){return["...",this.generateExpression(u.argument,r.Assignment,R)]},TaggedTemplateExpression:function(u,p,c){var h=ae;c&W||(h=pe);var C=[this.generateExpression(u.tag,r.Call,h),this.generateExpression(u.quasi,r.Primary,me)];return ee(C,r.TaggedTemplate,p)},TemplateElement:function(u,p,c){return u.value.raw},TemplateLiteral:function(u,p,c){var h,C,w;for(h=["`"],C=0,w=u.quasis.length;Ce)return!1;if(r+=t[n+1],r>=e)return!0}}function isIdentifierStart(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&nonASCIIidentifierStart.test(String.fromCharCode(e)):t===!1?!1:isInAstralSet(e,astralIdentifierStartCodes)}function isIdentifierChar(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&&nonASCIIidentifier.test(String.fromCharCode(e)):t===!1?!1:isInAstralSet(e,astralIdentifierStartCodes)||isInAstralSet(e,astralIdentifierCodes)}var TokenType=function e(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function binop(e,t){return new TokenType(e,{beforeExpr:!0,binop:t})}var beforeExpr={beforeExpr:!0},startsExpr={startsExpr:!0},keywords={};function kw(e,t){return t===void 0&&(t={}),t.keyword=e,keywords[e]=new TokenType(e,t)}var types$1={num:new TokenType("num",startsExpr),regexp:new TokenType("regexp",startsExpr),string:new TokenType("string",startsExpr),name:new TokenType("name",startsExpr),privateId:new TokenType("privateId",startsExpr),eof:new TokenType("eof"),bracketL:new TokenType("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new TokenType("]"),braceL:new TokenType("{",{beforeExpr:!0,startsExpr:!0}),braceR:new TokenType("}"),parenL:new TokenType("(",{beforeExpr:!0,startsExpr:!0}),parenR:new TokenType(")"),comma:new TokenType(",",beforeExpr),semi:new TokenType(";",beforeExpr),colon:new TokenType(":",beforeExpr),dot:new TokenType("."),question:new TokenType("?",beforeExpr),questionDot:new TokenType("?."),arrow:new TokenType("=>",beforeExpr),template:new TokenType("template"),invalidTemplate:new TokenType("invalidTemplate"),ellipsis:new TokenType("...",beforeExpr),backQuote:new TokenType("`",startsExpr),dollarBraceL:new TokenType("${",{beforeExpr:!0,startsExpr:!0}),eq:new TokenType("=",{beforeExpr:!0,isAssign:!0}),assign:new TokenType("_=",{beforeExpr:!0,isAssign:!0}),incDec:new TokenType("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new TokenType("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("/<=/>=",7),bitShift:binop("<>/>>>",8),plusMin:new TokenType("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new TokenType("**",{beforeExpr:!0}),coalesce:binop("??",1),_break:kw("break"),_case:kw("case",beforeExpr),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",beforeExpr),_do:kw("do",{isLoop:!0,beforeExpr:!0}),_else:kw("else",beforeExpr),_finally:kw("finally"),_for:kw("for",{isLoop:!0}),_function:kw("function",startsExpr),_if:kw("if"),_return:kw("return",beforeExpr),_switch:kw("switch"),_throw:kw("throw",beforeExpr),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:!0}),_with:kw("with"),_new:kw("new",{beforeExpr:!0,startsExpr:!0}),_this:kw("this",startsExpr),_super:kw("super",startsExpr),_class:kw("class",startsExpr),_extends:kw("extends",beforeExpr),_export:kw("export"),_import:kw("import",startsExpr),_null:kw("null",startsExpr),_true:kw("true",startsExpr),_false:kw("false",startsExpr),_in:kw("in",{beforeExpr:!0,binop:7}),_instanceof:kw("instanceof",{beforeExpr:!0,binop:7}),_typeof:kw("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:kw("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:kw("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},lineBreak=/\r\n?|\n|\u2028|\u2029/,lineBreakG=new RegExp(lineBreak.source,"g");function isNewLine(e){return e===10||e===13||e===8232||e===8233}function nextLineBreak(e,t,r){r===void 0&&(r=e.length);for(var n=t;n>10)+55296,(e&1023)+56320))}var loneSurrogate=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Position=function e(t,r){this.line=t,this.column=r};Position.prototype.offset=function e(t){return new Position(this.line,this.column+t)};var SourceLocation=function e(t,r,n){this.start=r,this.end=n,t.sourceFile!==null&&(this.source=t.sourceFile)};function getLineInfo(e,t){for(var r=1,n=0;;){var s=nextLineBreak(e,n,t);if(s<0)return new Position(r,t-n);++r,n=s}}var defaultOptions={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},warnedAboutEcmaVersion=!1;function getOptions(e){var t={};for(var r in defaultOptions)t[r]=e&&hasOwn(e,r)?e[r]:defaultOptions[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!warnedAboutEcmaVersion&&typeof console=="object"&&console.warn&&(warnedAboutEcmaVersion=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +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.allowHashBang==null&&(t.allowHashBang=t.ecmaVersion>=14),isArray(t.onToken)){var n=t.onToken;t.onToken=function(s){return n.push(s)}}return isArray(t.onComment)&&(t.onComment=pushComment(t,t.onComment)),t}function pushComment(e,t){return function(r,n,s,a,o,l){var f={type:r?"Block":"Line",value:n,start:s,end:a};e.locations&&(f.loc=new SourceLocation(this,o,l)),e.ranges&&(f.range=[s,a]),t.push(f)}}var SCOPE_TOP=1,SCOPE_FUNCTION=2,SCOPE_ASYNC=4,SCOPE_GENERATOR=8,SCOPE_ARROW=16,SCOPE_SIMPLE_CATCH=32,SCOPE_SUPER=64,SCOPE_DIRECT_SUPER=128,SCOPE_CLASS_STATIC_BLOCK=256,SCOPE_VAR=SCOPE_TOP|SCOPE_FUNCTION|SCOPE_CLASS_STATIC_BLOCK;function functionFlags(e,t){return SCOPE_FUNCTION|(e?SCOPE_ASYNC:0)|(t?SCOPE_GENERATOR:0)}var BIND_NONE=0,BIND_VAR=1,BIND_LEXICAL=2,BIND_FUNCTION=3,BIND_SIMPLE_CATCH=4,BIND_OUTSIDE=5,Parser=function e(t,r,n){this.options=t=getOptions(t),this.sourceFile=t.sourceFile,this.keywords=wordsRegexp(keywords$1[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var s="";t.allowReserved!==!0&&(s=reservedWords[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(s+=" await")),this.reservedWords=wordsRegexp(s);var a=(s?s+" ":"")+reservedWords.strict;this.reservedWordsStrict=wordsRegexp(a),this.reservedWordsStrictBind=wordsRegexp(a+" "+reservedWords.strictBind),this.input=String(r),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(` +`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(lineBreak).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=types$1.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=t.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&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(SCOPE_TOP),this.regexpState=null,this.privateNameStack=[]},prototypeAccessors={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}};Parser.prototype.parse=function e(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};prototypeAccessors.inFunction.get=function(){return(this.currentVarScope().flags&SCOPE_FUNCTION)>0};prototypeAccessors.inGenerator.get=function(){return(this.currentVarScope().flags&SCOPE_GENERATOR)>0&&!this.currentVarScope().inClassFieldInit};prototypeAccessors.inAsync.get=function(){return(this.currentVarScope().flags&SCOPE_ASYNC)>0&&!this.currentVarScope().inClassFieldInit};prototypeAccessors.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&SCOPE_CLASS_STATIC_BLOCK)return!1;if(t.flags&SCOPE_FUNCTION)return(t.flags&SCOPE_ASYNC)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};prototypeAccessors.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&SCOPE_SUPER)>0||r||this.options.allowSuperOutsideMethod};prototypeAccessors.allowDirectSuper.get=function(){return(this.currentThisScope().flags&SCOPE_DIRECT_SUPER)>0};prototypeAccessors.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};prototypeAccessors.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&(SCOPE_FUNCTION|SCOPE_CLASS_STATIC_BLOCK))>0||r};prototypeAccessors.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&SCOPE_CLASS_STATIC_BLOCK)>0};Parser.extend=function e(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var n=this,s=0;s=,?^&]/.test(s)||s==="!"&&this.input.charAt(n+1)==="=")}e+=t[0].length,skipWhiteSpace.lastIndex=e,e+=skipWhiteSpace.exec(this.input)[0].length,this.input[e]===";"&&e++}};pp$9.eat=function(e){return this.type===e?(this.next(),!0):!1};pp$9.isContextual=function(e){return this.type===types$1.name&&this.value===e&&!this.containsEsc};pp$9.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};pp$9.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};pp$9.canInsertSemicolon=function(){return this.type===types$1.eof||this.type===types$1.braceR||lineBreak.test(this.input.slice(this.lastTokEnd,this.start))};pp$9.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};pp$9.semicolon=function(){!this.eat(types$1.semi)&&!this.insertSemicolon()&&this.unexpected()};pp$9.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};pp$9.expect=function(e){this.eat(e)||this.unexpected()};pp$9.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var DestructuringErrors=function e(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};pp$9.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")}};pp$9.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,n=e.doubleProto;if(!t)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")};pp$9.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&n<56320)return!0;if(e)return!1;if(n===123)return!0;if(isIdentifierStart(n,!0)){for(var s=r+1;isIdentifierChar(n=this.input.charCodeAt(s),!0);)++s;if(n===92||n>55295&&n<56320)return!0;var a=this.input.slice(r,s);if(!keywordRelationalOperator.test(a))return!0}return!1};pp$8.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;skipWhiteSpace.lastIndex=this.pos;var e=skipWhiteSpace.exec(this.input),t=this.pos+e[0].length,r;return!lineBreak.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(isIdentifierChar(r=this.input.charCodeAt(t+8))||r>55295&&r<56320))};pp$8.parseStatement=function(e,t,r){var n=this.type,s=this.startNode(),a;switch(this.isLet(e)&&(n=types$1._var,a="let"),n){case types$1._break:case types$1._continue:return this.parseBreakContinueStatement(s,n.keyword);case types$1._debugger:return this.parseDebuggerStatement(s);case types$1._do:return this.parseDoStatement(s);case types$1._for:return this.parseForStatement(s);case types$1._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case types$1._class:return e&&this.unexpected(),this.parseClass(s,!0);case types$1._if:return this.parseIfStatement(s);case types$1._return:return this.parseReturnStatement(s);case types$1._switch:return this.parseSwitchStatement(s);case types$1._throw:return this.parseThrowStatement(s);case types$1._try:return this.parseTryStatement(s);case types$1._const:case types$1._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(s,a);case types$1._while:return this.parseWhileStatement(s);case types$1._with:return this.parseWithStatement(s);case types$1.braceL:return this.parseBlock(!0,s);case types$1.semi:return this.parseEmptyStatement(s);case types$1._export:case types$1._import:if(this.options.ecmaVersion>10&&n===types$1._import){skipWhiteSpace.lastIndex=this.pos;var o=skipWhiteSpace.exec(this.input),l=this.pos+o[0].length,f=this.input.charCodeAt(l);if(f===40||f===46)return this.parseExpressionStatement(s,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'")),n===types$1._import?this.parseImport(s):this.parseExport(s,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var y=this.value,m=this.parseExpression();return n===types$1.name&&m.type==="Identifier"&&this.eat(types$1.colon)?this.parseLabeledStatement(s,y,m,e):this.parseExpressionStatement(s,m)}};pp$8.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(types$1.semi)||this.insertSemicolon()?e.label=null:this.type!==types$1.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n=6?this.eat(types$1.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};pp$8.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(loopLabel),this.enterScope(0),this.expect(types$1.parenL),this.type===types$1.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===types$1._var||this.type===types$1._const||r){var n=this.startNode(),s=r?"let":this.value;return this.next(),this.parseVar(n,!0,s),this.finishNode(n,"VariableDeclaration"),(this.type===types$1._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&n.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===types$1._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,n)):(t>-1&&this.unexpected(t),this.parseFor(e,n))}var a=this.isContextual("let"),o=!1,l=new DestructuringErrors,f=this.parseExpression(t>-1?"await":!0,l);return this.type===types$1._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===types$1._in?t>-1&&this.unexpected(t):e.await=t>-1),a&&o&&this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(f,!1,l),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(l,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))};pp$8.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,FUNC_STATEMENT|(r?0:FUNC_HANGING_STATEMENT),!1,t)};pp$8.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(types$1._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};pp$8.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(types$1.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};pp$8.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(types$1.braceL),this.labels.push(switchLabel),this.enterScope(0);for(var t,r=!1;this.type!==types$1.braceR;)if(this.type===types$1._case||this.type===types$1._default){var n=this.type===types$1._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(types$1.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")};pp$8.parseThrowStatement=function(e){return this.next(),lineBreak.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 empty$1=[];pp$8.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===types$1._catch){var t=this.startNode();if(this.next(),this.eat(types$1.parenL)){t.param=this.parseBindingAtom();var r=t.param.type==="Identifier";this.enterScope(r?SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(t.param,r?BIND_SIMPLE_CATCH:BIND_LEXICAL),this.expect(types$1.parenR)}else 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(types$1._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};pp$8.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")};pp$8.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(loopLabel),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};pp$8.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")};pp$8.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};pp$8.parseLabeledStatement=function(e,t,r,n){for(var s=0,a=this.labels;s=0;f--){var y=this.labels[f];if(y.statementStart===e.start)y.statementStart=this.start,y.kind=l;else break}return this.labels.push({name:t,kind:l,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};pp$8.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};pp$8.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(types$1.braceL),e&&this.enterScope(0);this.type!==types$1.braceR;){var n=this.parseStatement(null);t.body.push(n)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};pp$8.parseFor=function(e,t){return e.init=t,this.expect(types$1.semi),e.test=this.type===types$1.semi?null:this.parseExpression(),this.expect(types$1.semi),e.update=this.type===types$1.parenR?null:this.parseExpression(),this.expect(types$1.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};pp$8.parseForIn=function(e,t){var r=this.type===types$1._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(types$1.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};pp$8.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r;;){var n=this.startNode();if(this.parseVarId(n,r),this.eat(types$1.eq)?n.init=this.parseMaybeAssign(t):r==="const"&&!(this.type===types$1._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():n.id.type!=="Identifier"&&!(t&&(this.type===types$1._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(types$1.comma))break}return e};pp$8.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?BIND_VAR:BIND_LEXICAL,!1)};var FUNC_STATEMENT=1,FUNC_HANGING_STATEMENT=2,FUNC_NULLABLE_ID=4;pp$8.parseFunction=function(e,t,r,n,s){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===types$1.star&&t&FUNC_HANGING_STATEMENT&&this.unexpected(),e.generator=this.eat(types$1.star)),this.options.ecmaVersion>=8&&(e.async=!!n),t&FUNC_STATEMENT&&(e.id=t&FUNC_NULLABLE_ID&&this.type!==types$1.name?null:this.parseIdent(),e.id&&!(t&FUNC_HANGING_STATEMENT)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?BIND_VAR:BIND_LEXICAL:BIND_FUNCTION));var a=this.yieldPos,o=this.awaitPos,l=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(functionFlags(e.async,e.generator)),t&FUNC_STATEMENT||(e.id=this.type===types$1.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,s),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=l,this.finishNode(e,t&FUNC_STATEMENT?"FunctionDeclaration":"FunctionExpression")};pp$8.parseFunctionParams=function(e){this.expect(types$1.parenL),e.params=this.parseBindingList(types$1.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};pp$8.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.enterClassBody(),s=this.startNode(),a=!1;for(s.body=[],this.expect(types$1.braceL);this.type!==types$1.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(s.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(a&&this.raise(o.start,"Duplicate constructor in the same class"),a=!0):o.key&&o.key.type==="PrivateIdentifier"&&isPrivateNameConflicted(n,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(s,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};pp$8.parseClassElement=function(e){if(this.eat(types$1.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),n="",s=!1,a=!1,o="method",l=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(types$1.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===types$1.star?l=!0:n="static"}if(r.static=l,!n&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===types$1.star)&&!this.canInsertSemicolon()?a=!0:n="async"),!n&&(t>=9||!a)&&this.eat(types$1.star)&&(s=!0),!n&&!a&&!s){var f=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=f:n=f)}if(n?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=n,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===types$1.parenL||o!=="method"||s||a){var y=!r.static&&checkKeyName(r,"constructor"),m=y&&e;y&&o!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=y?"constructor":o,this.parseClassMethod(r,s,a,m)}else this.parseClassField(r);return r};pp$8.isClassElementNameStart=function(){return this.type===types$1.name||this.type===types$1.privateId||this.type===types$1.num||this.type===types$1.string||this.type===types$1.bracketL||this.type.keyword};pp$8.parseClassElementName=function(e){this.type===types$1.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)};pp$8.parseClassMethod=function(e,t,r,n){var s=e.key;e.kind==="constructor"?(t&&this.raise(s.start,"Constructor can't be a generator"),r&&this.raise(s.start,"Constructor can't be an async method")):e.static&&checkKeyName(e,"prototype")&&this.raise(s.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,r,n);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};pp$8.parseClassField=function(e){if(checkKeyName(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&checkKeyName(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(types$1.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")};pp$8.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(SCOPE_CLASS_STATIC_BLOCK|SCOPE_SUPER);this.type!==types$1.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};pp$8.parseClassId=function(e,t){this.type===types$1.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,BIND_LEXICAL,!1)):(t===!0&&this.unexpected(),e.id=null)};pp$8.parseClassSuper=function(e){e.superClass=this.eat(types$1._extends)?this.parseExprSubscripts(!1):null};pp$8.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};pp$8.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,r=e.used,n=this.privateNameStack.length,s=n===0?null:this.privateNameStack[n-1],a=0;a=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==types$1.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(types$1._default)){this.checkExport(t,"default",this.lastTokStart);var r;if(this.type===types$1._function||(r=this.isAsyncFunction())){var n=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(n,FUNC_STATEMENT|FUNC_NULLABLE_ID,!1,r)}else if(this.type===types$1._class){var s=this.startNode();e.declaration=this.parseClass(s,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),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!==types$1.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var a=0,o=e.specifiers;a=13&&this.type===types$1.string){var e=this.parseLiteral(this.value);return loneSurrogate.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};pp$8.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var pp$7=Parser.prototype;pp$7.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 n=0,s=e.properties;n=8&&!o&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(types$1._function))return this.overrideContext(types.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(n&&!this.canInsertSemicolon()){if(this.eat(types$1.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===types$1.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(types$1.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,a),[l],!0,t)}return l;case types$1.regexp:var f=this.value;return r=this.parseLiteral(f.value),r.regex={pattern:f.pattern,flags:f.flags},r;case types$1.num:case types$1.string:return this.parseLiteral(this.value);case types$1._null:case types$1._true:case types$1._false:return r=this.startNode(),r.value=this.type===types$1._null?null:this.type===types$1._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case types$1.parenL:var y=this.start,m=this.parseParenAndDistinguishExpression(n,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(m)&&(e.parenthesizedAssign=y),e.parenthesizedBind<0&&(e.parenthesizedBind=y)),m;case types$1.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(types$1.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case types$1.braceL:return this.overrideContext(types.b_expr),this.parseObj(!1,e);case types$1._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case types$1._class:return this.parseClass(this.startNode(),!1);case types$1._new:return this.parseNew();case types$1.backQuote:return this.parseTemplate();case types$1._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}};pp$5.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var t=this.parseIdent(!0);switch(this.type){case types$1.parenL:return this.parseDynamicImport(e);case types$1.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}};pp$5.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(types$1.parenR)){var t=this.start;this.eat(types$1.comma)&&this.eat(types$1.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};pp$5.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")};pp$5.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")};pp$5.parseParenExpression=function(){this.expect(types$1.parenL);var e=this.parseExpression();return this.expect(types$1.parenR),e};pp$5.parseParenAndDistinguishExpression=function(e,t){var r=this.start,n=this.startLoc,s,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,l=this.startLoc,f=[],y=!0,m=!1,v=new DestructuringErrors,A=this.yieldPos,E=this.awaitPos,g;for(this.yieldPos=0,this.awaitPos=0;this.type!==types$1.parenR;)if(y?y=!1:this.expect(types$1.comma),a&&this.afterTrailingComma(types$1.parenR,!0)){m=!0;break}else if(this.type===types$1.ellipsis){g=this.start,f.push(this.parseParenItem(this.parseRestBinding())),this.type===types$1.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}else f.push(this.parseMaybeAssign(!1,v,this.parseParenItem));var d=this.lastTokEnd,D=this.lastTokEndLoc;if(this.expect(types$1.parenR),e&&!this.canInsertSemicolon()&&this.eat(types$1.arrow))return this.checkPatternErrors(v,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=A,this.awaitPos=E,this.parseParenArrowList(r,n,f,t);(!f.length||m)&&this.unexpected(this.lastTokStart),g&&this.unexpected(g),this.checkExpressionErrors(v,!0),this.yieldPos=A||this.yieldPos,this.awaitPos=E||this.awaitPos,f.length>1?(s=this.startNodeAt(o,l),s.expressions=f,this.finishNodeAt(s,"SequenceExpression",d,D)):s=f[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var S=this.startNodeAt(r,n);return S.expression=s,this.finishNode(S,"ParenthesizedExpression")}else return s};pp$5.parseParenItem=function(e){return e};pp$5.parseParenArrowList=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,n)};var empty=[];pp$5.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(types$1.dot)){e.meta=t;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 n=this.start,s=this.startLoc,a=this.type===types$1._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,s,!0,!1),a&&e.callee.type==="ImportExpression"&&this.raise(n,"Cannot use new with import()"),this.eat(types$1.parenL)?e.arguments=this.parseExprList(types$1.parenR,this.options.ecmaVersion>=8,!1):e.arguments=empty,this.finishNode(e,"NewExpression")};pp$5.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===types$1.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value,cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),r.tail=this.type===types$1.backQuote,this.finishNode(r,"TemplateElement")};pp$5.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 n=this.parseTemplateElement({isTagged:t});for(r.quasis=[n];!n.tail;)this.type===types$1.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(types$1.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(types$1.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};pp$5.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===types$1.name||this.type===types$1.num||this.type===types$1.string||this.type===types$1.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===types$1.star)&&!lineBreak.test(this.input.slice(this.lastTokEnd,this.start))};pp$5.parseObj=function(e,t){var r=this.startNode(),n=!0,s={};for(r.properties=[],this.next();!this.eat(types$1.braceR);){if(n)n=!1;else if(this.expect(types$1.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(types$1.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,s,t),r.properties.push(a)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};pp$5.parseProperty=function(e,t){var r=this.startNode(),n,s,a,o;if(this.options.ecmaVersion>=9&&this.eat(types$1.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===types$1.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===types$1.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)&&(a=this.start,o=this.startLoc),e||(n=this.eat(types$1.star)));var l=this.containsEsc;return this.parsePropertyName(r),!e&&!l&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r)?(s=!0,n=this.options.ecmaVersion>=9&&this.eat(types$1.star),this.parsePropertyName(r,t)):s=!1,this.parsePropertyValue(r,e,n,s,a,o,t,l),this.finishNode(r,"Property")};pp$5.parsePropertyValue=function(e,t,r,n,s,a,o,l){if((r||n)&&this.type===types$1.colon&&this.unexpected(),this.eat(types$1.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===types$1.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,n);else if(!t&&!l&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==types$1.comma&&this.type!==types$1.braceR&&this.type!==types$1.eq){(r||n)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var f=e.kind==="get"?0:1;if(e.value.params.length!==f){var y=e.value.start;e.kind==="get"?this.raiseRecoverable(y,"getter should have no params"):this.raiseRecoverable(y,"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")}else this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||n)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=s),e.kind="init",t?e.value=this.parseMaybeDefault(s,a,this.copyNode(e.key)):this.type===types$1.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};pp$5.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(types$1.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(types$1.bracketR),e.key;e.computed=!1}return e.key=this.type===types$1.num||this.type===types$1.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};pp$5.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};pp$5.parseMethod=function(e,t,r){var n=this.startNode(),s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(functionFlags(t,n.generator)|SCOPE_SUPER|(r?SCOPE_DIRECT_SUPER:0)),this.expect(types$1.parenL),n.params=this.parseBindingList(types$1.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(n,"FunctionExpression")};pp$5.parseArrowExpression=function(e,t,r,n){var s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(functionFlags(r,!1)|SCOPE_ARROW),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,n),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};pp$5.parseFunctionBody=function(e,t,r,n){var s=t&&this.type!==types$1.braceL,a=this.strict,o=!1;if(s)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var l=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||l)&&(o=this.strictDirective(this.end),o&&l&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var f=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,BIND_OUTSIDE),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=f}this.exitScope()};pp$5.isSimpleParamList=function(e){for(var t=0,r=e;t-1||s.functions.indexOf(e)>-1||s.var.indexOf(e)>-1,s.lexical.push(e),this.inModule&&s.flags&SCOPE_TOP&&delete this.undefinedExports[e]}else if(t===BIND_SIMPLE_CATCH){var a=this.currentScope();a.lexical.push(e)}else if(t===BIND_FUNCTION){var o=this.currentScope();this.treatFunctionsAsVar?n=o.lexical.indexOf(e)>-1:n=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var l=this.scopeStack.length-1;l>=0;--l){var f=this.scopeStack[l];if(f.lexical.indexOf(e)>-1&&!(f.flags&SCOPE_SIMPLE_CATCH&&f.lexical[0]===e)||!this.treatFunctionsAsVarInScope(f)&&f.functions.indexOf(e)>-1){n=!0;break}if(f.var.push(e),this.inModule&&f.flags&SCOPE_TOP&&delete this.undefinedExports[e],f.flags&SCOPE_VAR)break}n&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};pp$3.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};pp$3.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};pp$3.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&SCOPE_VAR)return t}};pp$3.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&SCOPE_VAR&&!(t.flags&SCOPE_ARROW))return t}};var Node=function e(t,r,n){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new SourceLocation(t,n)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},pp$2=Parser.prototype;pp$2.startNode=function(){return new Node(this,this.start,this.startLoc)};pp$2.startNodeAt=function(e,t){return new Node(this,e,t)};function finishNodeAt(e,t,r,n){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=r),e}pp$2.finishNode=function(e,t){return finishNodeAt.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};pp$2.finishNodeAt=function(e,t,r,n){return finishNodeAt.call(this,e,t,r,n)};pp$2.copyNode=function(e){var t=new Node(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var ecma9BinaryProperties="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",ecma10BinaryProperties=ecma9BinaryProperties+" Extended_Pictographic",ecma11BinaryProperties=ecma10BinaryProperties,ecma12BinaryProperties=ecma11BinaryProperties+" EBase EComp EMod EPres ExtPict",ecma13BinaryProperties=ecma12BinaryProperties,unicodeBinaryProperties={9:ecma9BinaryProperties,10:ecma10BinaryProperties,11:ecma11BinaryProperties,12:ecma12BinaryProperties,13:ecma13BinaryProperties},unicodeGeneralCategoryValues="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",ecma9ScriptValues="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",ecma10ScriptValues=ecma9ScriptValues+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ecma11ScriptValues=ecma10ScriptValues+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ecma12ScriptValues=ecma11ScriptValues+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ecma13ScriptValues=ecma12ScriptValues+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",unicodeScriptValues={9:ecma9ScriptValues,10:ecma10ScriptValues,11:ecma11ScriptValues,12:ecma12ScriptValues,13:ecma13ScriptValues},data={};function buildUnicodeData(e){var t=data[e]={binary:wordsRegexp(unicodeBinaryProperties[e]+" "+unicodeGeneralCategoryValues),nonBinary:{General_Category:wordsRegexp(unicodeGeneralCategoryValues),Script:wordsRegexp(unicodeScriptValues[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(var i=0,list=[9,10,11,12,13];i=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":""),this.unicodeProperties=data[t.options.ecmaVersion>=13?13:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};RegExpValidationState.prototype.reset=function e(t,r,n){var s=n.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=n,this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchN=s&&this.parser.options.ecmaVersion>=9};RegExpValidationState.prototype.raise=function e(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};RegExpValidationState.prototype.at=function e(t,r){r===void 0&&(r=!1);var n=this.source,s=n.length;if(t>=s)return-1;var a=n.charCodeAt(t);if(!(r||this.switchU)||a<=55295||a>=57344||t+1>=s)return a;var o=n.charCodeAt(t+1);return o>=56320&&o<=57343?(a<<10)+o-56613888:a};RegExpValidationState.prototype.nextIndex=function e(t,r){r===void 0&&(r=!1);var n=this.source,s=n.length;if(t>=s)return s;var a=n.charCodeAt(t),o;return!(r||this.switchU)||a<=55295||a>=57344||t+1>=s||(o=n.charCodeAt(t+1))<56320||o>57343?t+1:t+2};RegExpValidationState.prototype.current=function e(t){return t===void 0&&(t=!1),this.at(this.pos,t)};RegExpValidationState.prototype.lookahead=function e(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};RegExpValidationState.prototype.advance=function e(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};RegExpValidationState.prototype.eat=function e(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};pp$1.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,n=0;n-1&&this.raise(e.start,"Duplicate regular expression flag")}};pp$1.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};pp$1.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,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=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};pp$1.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};pp$1.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};pp$1.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,s=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue),e.eat(125)))return s!==-1&&s=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};pp$1.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)};pp$1.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};pp$1.regexp_eatSyntaxCharacter=function(e){var t=e.current();return isSyntaxCharacter(t)?(e.lastIntValue=t,e.advance(),!0):!1};function isSyntaxCharacter(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}pp$1.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!isSyntaxCharacter(r);)e.advance();return e.pos!==t};pp$1.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};pp$1.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};pp$1.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};pp$1.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=codePointToString(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=codePointToString(e.lastIntValue);return!0}return!1};pp$1.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),isRegExpIdentifierStart(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function isRegExpIdentifierStart(e){return isIdentifierStart(e,!0)||e===36||e===95}pp$1.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),isRegExpIdentifierPart(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function isRegExpIdentifierPart(e){return isIdentifierChar(e,!0)||e===36||e===95||e===8204||e===8205}pp$1.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)};pp$1.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};pp$1.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};pp$1.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)};pp$1.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};pp$1.regexp_eatZero=function(e){return e.current()===48&&!isDecimalDigit(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};pp$1.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};pp$1.regexp_eatControlLetter=function(e){var t=e.current();return isControlLetter(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function isControlLetter(e){return e>=65&&e<=90||e>=97&&e<=122}pp$1.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(n&&s>=55296&&s<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(s-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=s}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&isValidUnicode(e.lastIntValue))return!0;n&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function isValidUnicode(e){return e>=0&&e<=1114111}pp$1.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};pp$1.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};pp$1.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(isCharacterClassEscape(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(t===80||t===112)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1};function isCharacterClassEscape(e){return e===100||e===68||e===115||e===83||e===119||e===87}pp$1.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 n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,s),!0}return!1};pp$1.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){hasOwn(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};pp$1.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")};pp$1.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";isUnicodePropertyNameCharacter(t=e.current());)e.lastStringValue+=codePointToString(t),e.advance();return e.lastStringValue!==""};function isUnicodePropertyNameCharacter(e){return isControlLetter(e)||e===95}pp$1.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";isUnicodePropertyValueCharacter(t=e.current());)e.lastStringValue+=codePointToString(t),e.advance();return e.lastStringValue!==""};function isUnicodePropertyValueCharacter(e){return isUnicodePropertyNameCharacter(e)||isDecimalDigit(e)}pp$1.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};pp$1.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1};pp$1.regexp_classRanges=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")}}};pp$1.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||isOctalDigit(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var n=e.current();return n!==93?(e.lastIntValue=n,e.advance(),!0):!1};pp$1.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)};pp$1.regexp_eatClassControlLetter=function(e){var t=e.current();return isDecimalDigit(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};pp$1.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};pp$1.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;isDecimalDigit(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function isDecimalDigit(e){return e>=48&&e<=57}pp$1.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;isHexDigit(r=e.current());)e.lastIntValue=16*e.lastIntValue+hexToInt(r),e.advance();return e.pos!==t};function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hexToInt(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}pp$1.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};pp$1.regexp_eatOctalDigit=function(e){var t=e.current();return isOctalDigit(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function isOctalDigit(e){return e>=48&&e<=55}pp$1.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n=this.input.length)return this.finishToken(types$1.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};pp.readToken=function(e){return isIdentifierStart(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};pp.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};pp.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 n=void 0,s=t;(n=nextLineBreak(this.input,s,this.pos))>-1;)++this.curLine,s=this.lineStart=n;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};pp.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&nonASCIIwhitespace.test(String.fromCharCode(e)))++this.pos;else break e}}};pp.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)};pp.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(types$1.ellipsis)):(++this.pos,this.finishToken(types$1.dot))};pp.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(types$1.assign,2):this.finishOp(types$1.slash,1)};pp.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=e===42?types$1.star:types$1.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,n=types$1.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(types$1.assign,r+1):this.finishOp(n,r)};pp.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(types$1.assign,3)}return this.finishOp(e===124?types$1.logicalOR:types$1.logicalAND,2)}return t===61?this.finishOp(types$1.assign,2):this.finishOp(e===124?types$1.bitwiseOR:types$1.bitwiseAND,1)};pp.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(types$1.assign,2):this.finishOp(types$1.bitwiseXOR,1)};pp.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||lineBreak.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(types$1.incDec,2):t===61?this.finishOp(types$1.assign,2):this.finishOp(types$1.plusMin,1)};pp.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(types$1.assign,r+1):this.finishOp(types$1.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(types$1.relational,r))};pp.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(types$1.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(types$1.arrow)):this.finishOp(e===61?types$1.eq:types$1.prefix,1)};pp.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(types$1.questionDot,2)}if(t===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(types$1.assign,3)}return this.finishOp(types$1.coalesce,2)}}return this.finishOp(types$1.question,1)};pp.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),isIdentifierStart(t,!0)||t===92))return this.finishToken(types$1.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+codePointToString(t)+"'")};pp.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(types$1.parenL);case 41:return++this.pos,this.finishToken(types$1.parenR);case 59:return++this.pos,this.finishToken(types$1.semi);case 44:return++this.pos,this.finishToken(types$1.comma);case 91:return++this.pos,this.finishToken(types$1.bracketL);case 93:return++this.pos,this.finishToken(types$1.bracketR);case 123:return++this.pos,this.finishToken(types$1.braceL);case 125:return++this.pos,this.finishToken(types$1.braceR);case 58:return++this.pos,this.finishToken(types$1.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(types$1.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(types$1.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+codePointToString(e)+"'")};pp.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};pp.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(lineBreak.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(n==="[")t=!0;else if(n==="]"&&t)t=!1;else if(n==="/"&&!t)break;e=n==="\\"}++this.pos}var s=this.input.slice(r,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var l=this.regexpState||(this.regexpState=new RegExpValidationState(this));l.reset(r,s,o),this.validateRegExpFlags(l),this.validateRegExpPattern(l);var f=null;try{f=new RegExp(s,o)}catch{}return this.finishToken(types$1.regexp,{pattern:s,flags:o,value:f})};pp.readInt=function(e,t,r){for(var n=this.options.ecmaVersion>=12&&t===void 0,s=r&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,l=0,f=0,y=t==null?1/0:t;f=97?v=m-97+10:m>=65?v=m-65+10:m>=48&&m<=57?v=m-48:v=1/0,v>=e)break;l=m,o=o*e+v}return n&&l===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||t!=null&&this.pos-a!==t?null:o};function stringToNumber(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function stringToBigInt(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}pp.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=stringToBigInt(this.input.slice(t,this.pos)),++this.pos):isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(types$1.num,r)};pp.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 n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&n===110){var s=stringToBigInt(this.input.slice(t,this.pos));return++this.pos,isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(types$1.num,s)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),n===46&&!r&&(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),(n===69||n===101)&&!r&&(n=this.input.charCodeAt(++this.pos),(n===43||n===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=stringToNumber(this.input.slice(t,this.pos),r);return this.finishToken(types$1.num,a)};pp.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};pp.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;n===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):n===8232||n===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(isNewLine(n)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(types$1.string,t)};var INVALID_TEMPLATE_ESCAPE_ERROR={};pp.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===INVALID_TEMPLATE_ESCAPE_ERROR)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};pp.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw INVALID_TEMPLATE_ESCAPE_ERROR;this.raise(e,t)};pp.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===types$1.template||this.type===types$1.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(types$1.dollarBraceL)):(++this.pos,this.finishToken(types$1.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(types$1.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(isNewLine(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+=` +`;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};pp.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(n,8);return s>255&&(n=n.slice(0,-1),s=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),(n!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return isNewLine(t)?"":String.fromCharCode(t)}};pp.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};pp.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;this.posthis.should_skip=!0,remove:()=>this.should_remove=!0,replace:t=>this.replacement=t}}replace(t,r,n,s){t&&(n!==null?t[r][n]=s:t[r]=s)}remove(t,r,n){t&&(n!==null?t[r].splice(n,1):delete t[r])}}class SyncWalker extends WalkerBase{constructor(t,r){super(),this.enter=t,this.leave=r}visit(t,r,n,s){if(t){if(this.enter){const a=this.should_skip,o=this.should_remove,l=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,t,r,n,s),this.replacement&&(t=this.replacement,this.replace(r,n,s,t)),this.should_remove&&this.remove(r,n,s);const f=this.should_skip,y=this.should_remove;if(this.should_skip=a,this.should_remove=o,this.replacement=l,f)return t;if(y)return null}for(const a in t){const o=t[a];if(typeof o=="object")if(Array.isArray(o))for(let l=0;l{${o}})()`:o}function isStringWithDoubleQuotes(e,t,r){const{raw:n,type:s}=e;return s!=="Literal"?!1:n[0]==='"'}function isBackTickString(e,t){return e.type==="TemplateLiteral"&&t.type!=="TaggedTemplateExpression"}function miniWithLocation(e,t,r){return{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"CallExpression",callee:{type:"Identifier",name:"mini"},arguments:[{type:"Literal",value:e}],optional:!1},property:{type:"Identifier",name:"withMiniLocation"}},arguments:[{type:"Literal",value:t},{type:"Literal",value:r}],optional:!1}}const tune=`await samples('github:tidalcycles/Dirt-Samples/master') + +stack( + // amen + n("0 1 2 3 4 5 6 7") + .sometimes(x=>x.ply(2)) + .rarely(x=>x.speed("2 | -2")) + .sometimesBy(.4, x=>x.delay(".5")) + .s("amencutup") + .slow(2) + .room(.5) + , + // bass + sine.add(saw.slow(4)).range(0,7).segment(8) + .superimpose(x=>x.add(.1)) + .scale('G0 minor').note() + .s("sawtooth").decay(.1).sustain(0) + .gain(.4).cutoff(perlin.range(300,3000).slow(8)).resonance(10) + .degradeBy("0 0.1 .5 .1") + .rarely(add(note("12"))) + , + // chord + note("Bb3,D4".superimpose(x=>x.add(.2))) + .s('sawtooth').cutoff(1000).struct("<~@3 [~ x]>") + .decay(.05).sustain(.0).delay(.8).delaytime(.125).room(.8) + , + // alien + s("breath").room(1).shape(.6).chop(16).rev().mask("") + , + n("0 1").s("east").delay(.5).degradeBy(.8).speed(rand.range(.5,1.5)) +).reset("")`,ctx=getAudioContext$1(),input=document.getElementById("text");input.innerHTML=tune;evalScope(controls,__vitePreload(()=>Promise.resolve().then(()=>strudel),void 0),__vitePreload(()=>import("./index.f09cc89e.js"),[]),__vitePreload(()=>import("./index.b12de8ae.js"),[]),__vitePreload(()=>import("./index.1207dd8c.js"),[]));const{evaluate}=repl({defaultOutput:webaudioOutput,getTime:()=>ctx.currentTime,transpiler});document.getElementById("start").addEventListener("click",()=>{ctx.resume(),evaluate(input.value)});export{Hap as H,Pattern$2 as P,webaudioOutputTrigger as a,getCachedBuffer as b,chooseInWith as c,reverseBuffer as d,getLoadedBuffer as e,loadGithubSamples as f,getAudioContext$1 as g,samples as h,resetLoadedSamples as i,getLoadedSamples$1 as j,getAugmentedNamespace as k,loadBuffer as l,mod as m,commonjsGlobal as n,getDefaultExportFromCjs as o,panic as p,reify$1 as q,rand as r,strudel as s,stack as t,webaudioOutput as w}; diff --git a/packages/core/examples/vite-vanilla-repl/dist/assets/index.f88145a1.js b/packages/core/examples/vite-vanilla-repl/dist/assets/index.f88145a1.js deleted file mode 100644 index 55c08661..00000000 --- a/packages/core/examples/vite-vanilla-repl/dist/assets/index.f88145a1.js +++ /dev/null @@ -1,56 +0,0 @@ -var _t=Object.defineProperty;var It=(s,e,r)=>e in s?_t(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r;var V=(s,e,r)=>(It(s,typeof e!="symbol"?e+"":e,r),r);const strudel=Object.freeze(Object.defineProperty({__proto__:null,get Fraction(){return fraction},get controls(){return controls},get drawLine(){return drawLine},get gist(){return gist},get Hap(){return Hap},get Pattern(){return Pattern$3},get polyrhythm(){return polyrhythm},get pr(){return pr},get silence(){return silence},get pure(){return pure},get isPattern(){return isPattern$1},get reify(){return reify$1},get stack(){return stack},get slowcat(){return slowcat},get slowcatPrime(){return slowcatPrime},get fastcat(){return fastcat},get cat(){return cat},get timeCat(){return timeCat},get sequence(){return sequence},get seq(){return seq$2},get polymeterSteps(){return polymeterSteps},get polymeter(){return polymeter},get pm(){return pm},get add(){return add},get chop(){return chop},get chunk(){return chunk},get chunkBack(){return chunkBack},get div(){return div},get early(){return early},get echo(){return echo},get every(){return every},get fast(){return fast},get inv(){return inv},get invert(){return invert},get iter(){return iter},get iterBack(){return iterBack},get jux(){return jux},get juxBy(){return juxBy},get late(){return late},get linger(){return linger},get mask(){return mask},get mul(){return mul},get off(){return off},get ply(){return ply},get range(){return range},get rangex(){return rangex},get range2(){return range2},get rev(){return rev},get slow(){return slow},get struct(){return struct},get sub(){return sub},get superimpose(){return superimpose},get set(){return set},get when(){return when},get makeComposable(){return makeComposable},get patternify2(){return patternify2},get patternify3(){return patternify3},get patternify4(){return patternify4},get steady(){return steady},get signal(){return signal},get isaw(){return isaw},get isaw2(){return isaw2},get saw(){return saw},get saw2(){return saw2},get sine2(){return sine2},get sine(){return sine},get cosine(){return cosine},get cosine2(){return cosine2},get square(){return square},get square2(){return square2},get tri(){return tri},get tri2(){return tri2},get time(){return time},get rand(){return rand},get rand2(){return rand2},get _brandBy(){return _brandBy},get brandBy(){return brandBy},get brand(){return brand},get _irand(){return _irand},get irand(){return irand},get __chooseWith(){return __chooseWith},get chooseWith(){return chooseWith},get chooseInWith(){return chooseInWith},get choose(){return choose},get chooseCycles(){return chooseCycles},get randcat(){return randcat},get wchoose(){return wchoose},get wchooseCycles(){return wchooseCycles},get perlinWith(){return perlinWith},get perlin(){return perlin},get State(){return State},get TimeSpan(){return TimeSpan},get isNote(){return isNote$1},get tokenizeNote(){return tokenizeNote},get toMidi(){return toMidi},get fromMidi(){return fromMidi},get getFreq(){return getFreq},get midi2note(){return midi2note},get mod(){return mod},get getPlayableNoteValue(){return getPlayableNoteValue},get getFrequency(){return getFrequency},get rotate(){return rotate},get pipe(){return pipe},get compose(){return compose},get removeUndefineds(){return removeUndefineds},get flatten(){return flatten},get id(){return id},get constant(){return constant},get listRange(){return listRange},get curry(){return curry},get parseNumeral(){return parseNumeral},get mapArgs(){return mapArgs},get numeralArgs(){return numeralArgs},get parseFractional(){return parseFractional},get fractionalArgs(){return fractionalArgs},get ClockWorker(){return ClockWorker},get Scheduler(){return Scheduler},get evalScope(){return evalScope},get evaluate(){return evaluate$1},get repl(){return repl}},Symbol.toStringTag,{value:"Module"}));(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))u(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&u(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerpolicy&&(n.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?n.credentials="include":i.crossorigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function u(i){if(i.ep)return;i.ep=!0;const n=r(i);fetch(i.href,n)}})();const scriptRel="modulepreload",assetsURL=function(s){return"/tidalcycles/strudel/general-purpose-scheduler/packages/core/examples/vite-vanilla-repl/dist/"+s},seen={},__vitePreload=function(e,r,u){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(n=>{if(n=assetsURL(n),n in seen)return;seen[n]=!0;const a=n.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!u)for(let A=i.length-1;A>=0;A--){const d=i[A];if(d.href===n&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${l}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":scriptRel,a||(c.as="script",c.crossOrigin=""),c.href=n,document.head.appendChild(c),a)return new Promise((A,d)=>{c.addEventListener("load",A),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>e())};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function getAugmentedNamespace(s){var e=s.default;if(typeof e=="function"){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(s).forEach(function(u){var i=Object.getOwnPropertyDescriptor(s,u);Object.defineProperty(r,u,i.get?i:{enumerable:!0,get:function(){return s[u]}})}),r}var fraction$1={exports:{}};/** - * @license Fraction.js v4.2.0 05/03/2022 - * https://www.xarg.org/2014/03/rational-numbers-in-javascript/ - * - * Copyright (c) 2021, Robert Eisele (robert@xarg.org) - * Dual licensed under the MIT or GPL Version 2 licenses. - **/(function(s,e){(function(r){var u=2e3,i={s:1,n:0,d:1};function n(E,D){if(isNaN(E=parseInt(E,10)))throw f.InvalidParameter;return E*D}function a(E,D){if(D===0)throw f.DivisionByZero;var h=Object.create(f.prototype);h.s=E<0?-1:1,E=E<0?-E:E;var y=m(E,D);return h.n=E/y,h.d=D/y,h}function l(E){for(var D={},h=E,y=2,_=4;_<=h;){for(;h%y===0;)h/=y,D[y]=(D[y]||0)+1;_+=1+2*y++}return h!==E?h>1&&(D[h]=(D[h]||0)+1):D[E]=(D[E]||0)+1,D}var o=function(E,D){var h=0,y=1,_=1,b=0,P=0,B=0,g=1,x=1,C=0,S=1,L=1,$=1,N=1e7,R;if(E!=null)if(D!==void 0){if(h=E,y=D,_=h*y,h%1!==0||y%1!==0)throw f.NonIntegerParameter}else switch(typeof E){case"object":{if("d"in E&&"n"in E)h=E.n,y=E.d,"s"in E&&(h*=E.s);else if(0 in E)h=E[0],1 in E&&(y=E[1]);else throw f.InvalidParameter;_=h*y;break}case"number":{if(E<0&&(_=E,E=-E),E%1===0)h=E;else if(E>0){for(E>=1&&(x=Math.pow(10,Math.floor(1+Math.log(E)/Math.LN10)),E/=x);S<=N&&$<=N;)if(R=(C+L)/(S+$),E===R){S+$<=N?(h=C+L,y=S+$):$>S?(h=L,y=$):(h=C,y=S);break}else E>R?(C+=L,S+=$):(L+=C,$+=S),S>N?(h=L,y=$):(h=C,y=S);h*=x}else(isNaN(E)||isNaN(D))&&(y=h=NaN);break}case"string":{if(S=E.match(/\d+|./g),S===null)throw f.InvalidParameter;if(S[C]==="-"?(_=-1,C++):S[C]==="+"&&C++,S.length===C+1?P=n(S[C++],_):S[C+1]==="."||S[C]==="."?(S[C]!=="."&&(b=n(S[C++],_)),C++,(C+1===S.length||S[C+1]==="("&&S[C+3]===")"||S[C+1]==="'"&&S[C+3]==="'")&&(P=n(S[C],_),g=Math.pow(10,S[C].length),C++),(S[C]==="("&&S[C+2]===")"||S[C]==="'"&&S[C+2]==="'")&&(B=n(S[C+1],_),x=Math.pow(10,S[C+1].length)-1,C+=3)):S[C+1]==="/"||S[C+1]===":"?(P=n(S[C],_),g=n(S[C+2],1),C+=3):S[C+3]==="/"&&S[C+1]===" "&&(b=n(S[C],_),P=n(S[C+2],_),g=n(S[C+4],1),C+=5),S.length<=C){y=g*x,_=h=B+y*b+x*P;break}}default:throw f.InvalidParameter}if(y===0)throw f.DivisionByZero;i.s=_<0?-1:1,i.n=Math.abs(h),i.d=Math.abs(y)};function c(E,D,h){for(var y=1;D>0;E=E*E%h,D>>=1)D&1&&(y=y*E%h);return y}function A(E,D){for(;D%2===0;D/=2);for(;D%5===0;D/=5);if(D===1)return 0;for(var h=10%D,y=1;h!==1;y++)if(h=h*10%D,y>u)return 0;return y}function d(E,D,h){for(var y=1,_=c(10,h,D),b=0;b<300;b++){if(y===_)return b;y=y*10%D,_=_*10%D}return 0}function m(E,D){if(!E)return D;if(!D)return E;for(;;){if(E%=D,!E)return D;if(D%=E,!D)return E}}function f(E,D){if(o(E,D),this instanceof f)E=m(i.d,i.n),this.s=i.s,this.n=i.n/E,this.d=i.d/E;else return a(i.s*i.n,i.d)}f.DivisionByZero=new Error("Division by Zero"),f.InvalidParameter=new Error("Invalid argument"),f.NonIntegerParameter=new Error("Parameters must be integer"),f.prototype={s:1,n:0,d:1,abs:function(){return a(this.n,this.d)},neg:function(){return a(-this.s*this.n,this.d)},add:function(E,D){return o(E,D),a(this.s*this.n*i.d+i.s*this.d*i.n,this.d*i.d)},sub:function(E,D){return o(E,D),a(this.s*this.n*i.d-i.s*this.d*i.n,this.d*i.d)},mul:function(E,D){return o(E,D),a(this.s*i.s*this.n*i.n,this.d*i.d)},div:function(E,D){return o(E,D),a(this.s*i.s*this.n*i.d,this.d*i.n)},clone:function(){return a(this.s*this.n,this.d)},mod:function(E,D){if(isNaN(this.n)||isNaN(this.d))return new f(NaN);if(E===void 0)return a(this.s*this.n%this.d,1);if(o(E,D),i.n===0&&this.d===0)throw f.DivisionByZero;return a(this.s*(i.d*this.n)%(i.n*this.d),i.d*this.d)},gcd:function(E,D){return o(E,D),a(m(i.n,this.n)*m(i.d,this.d),i.d*this.d)},lcm:function(E,D){return o(E,D),i.n===0&&this.n===0?a(0,1):a(i.n*this.n,m(i.n,this.n)*m(i.d,this.d))},ceil:function(E){return E=Math.pow(10,E||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):a(Math.ceil(E*this.s*this.n/this.d),E)},floor:function(E){return E=Math.pow(10,E||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):a(Math.floor(E*this.s*this.n/this.d),E)},round:function(E){return E=Math.pow(10,E||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):a(Math.round(E*this.s*this.n/this.d),E)},inverse:function(){return a(this.s*this.d,this.n)},pow:function(E,D){if(o(E,D),i.d===1)return i.s<0?a(Math.pow(this.s*this.d,i.n),Math.pow(this.n,i.n)):a(Math.pow(this.s*this.n,i.n),Math.pow(this.d,i.n));if(this.s<0)return null;var h=l(this.n),y=l(this.d),_=1,b=1;for(var P in h)if(P!=="1"){if(P==="0"){_=0;break}if(h[P]*=i.n,h[P]%i.d===0)h[P]/=i.d;else return null;_*=Math.pow(P,h[P])}for(var P in y)if(P!=="1"){if(y[P]*=i.n,y[P]%i.d===0)y[P]/=i.d;else return null;b*=Math.pow(P,y[P])}return i.s<0?a(b,_):a(_,b)},equals:function(E,D){return o(E,D),this.s*this.n*i.d===i.s*i.n*this.d},compare:function(E,D){o(E,D);var h=this.s*this.n*i.d-i.s*i.n*this.d;return(0=0;b--)_=_.inverse().add(h[b]);if(_.sub(D).abs().valueOf()0&&(h+=D,h+=" ",y%=_),h+=y,h+="/",h+=_),h},toLatex:function(E){var D,h="",y=this.n,_=this.d;return this.s<0&&(h+="-"),_===1?h+=y:(E&&(D=Math.floor(y/_))>0&&(h+=D,y%=_),h+="\\frac{",h+=y,h+="}{",h+=_,h+="}"),h},toContinued:function(){var E,D=this.n,h=this.d,y=[];if(isNaN(D)||isNaN(h))return y;do y.push(Math.floor(D/h)),E=D%h,D=h,h=E;while(D!==1);return y},toString:function(E){var D=this.n,h=this.d;if(isNaN(D)||isNaN(h))return"NaN";E=E||15;var y=A(D,h),_=d(D,h,y),b=this.s<0?"-":"";if(b+=D/h|0,D%=h,D*=10,D&&(b+="."),y){for(var P=_;P--;)b+=D/h|0,D%=h,D*=10;b+="(";for(var P=y;P--;)b+=D/h|0,D%=h,D*=10;b+=")"}else for(var P=E;D&&P--;)b+=D/h|0,D%=h,D*=10;return b}},Object.defineProperty(f,"__esModule",{value:!0}),f.default=f,f.Fraction=f,s.exports=f})()})(fraction$1);const Fraction=getDefaultExportFromCjs(fraction$1.exports);Fraction.prototype.sam=function(){return this.floor()};Fraction.prototype.nextSam=function(){return this.sam().add(1)};Fraction.prototype.wholeCycle=function(){return new TimeSpan(this.sam(),this.nextSam())};Fraction.prototype.cyclePos=function(){return this.sub(this.sam())};Fraction.prototype.lt=function(s){return this.compare(s)<0};Fraction.prototype.gt=function(s){return this.compare(s)>0};Fraction.prototype.lte=function(s){return this.compare(s)<=0};Fraction.prototype.gte=function(s){return this.compare(s)>=0};Fraction.prototype.eq=function(s){return this.compare(s)==0};Fraction.prototype.max=function(s){return this.gt(s)?this:s};Fraction.prototype.min=function(s){return this.lt(s)?this:s};Fraction.prototype.show=function(){return this.s*this.n+"/"+this.d};Fraction.prototype.or=function(s){return this.eq(0)?s:this};const fraction=s=>(typeof s=="number"&&(s=String(s)),Fraction(s)),gcd=(...s)=>s.reduce((e,r)=>e.gcd(r),fraction(1));fraction._original=Fraction;class TimeSpan{constructor(e,r){this.begin=fraction(e),this.end=fraction(r)}get spanCycles(){const e=[];var r=this.begin;const u=this.end,i=u.sam();if(r.equals(u))return[new TimeSpan(r,u)];for(;u.gt(r);){if(r.sam().equals(i)){e.push(new TimeSpan(r,this.end));break}const n=r.nextSam();e.push(new TimeSpan(r,n)),r=n}return e}get duration(){return this.end.sub(this.begin)}cycleArc(){const e=this.begin.cyclePos(),r=e.add(this.duration);return new TimeSpan(e,r)}withTime(e){return new TimeSpan(e(this.begin),e(this.end))}withEnd(e){return new TimeSpan(this.begin,e(this.end))}withCycle(e){const r=this.begin.sam(),u=r.add(e(this.begin.sub(r))),i=r.add(e(this.end.sub(r)));return new TimeSpan(u,i)}intersection(e){const r=this.begin.max(e.begin),u=this.end.min(e.end);if(!r.gt(u)&&!(r.equals(u)&&(r.equals(this.end)&&this.begin.lt(this.end)||r.equals(e.end)&&e.begin.lt(e.end))))return new TimeSpan(r,u)}intersection_e(e){const r=this.intersection(e);if(r==null)throw"TimeSpans do not intersect";return r}midpoint(){return this.begin.add(this.duration.div(fraction(2)))}equals(e){return this.begin.equals(e.begin)&&this.end.equals(e.end)}show(){return this.begin.show()+" -> "+this.end.show()}}class Hap{constructor(e,r,u,i={},n=!1){this.whole=e,this.part=r,this.value=u,this.context=i,this.stateful=n,n&&console.assert(typeof this.value=="function","Stateful values must be functions")}get duration(){return this.whole.end.sub(this.whole.begin)}wholeOrPart(){return this.whole?this.whole:this.part}withSpan(e){const r=this.whole?e(this.whole):void 0;return new Hap(r,e(this.part),this.value,this.context)}withValue(e){return new Hap(this.whole,this.part,e(this.value),this.context)}hasOnset(){return this.whole!=null&&this.whole.begin.equals(this.part.begin)}resolveState(e){if(this.stateful&&this.hasOnset()){console.log("stateful");const r=this.value,[u,i]=r(e);return[u,new Hap(this.whole,this.part,i,this.context,!1)]}return[e,this]}spanEquals(e){return this.whole==null&&e.whole==null||this.whole.equals(e.whole)}equals(e){return this.spanEquals(e)&&this.part.equals(e.part)&&this.value===e.value}show(){return"("+(this.whole==null?"~":this.whole.show())+", "+this.part.show()+", "+this.value+")"}showWhole(){return`${this.whole==null?"~":this.whole.show()}: ${typeof this.value=="object"?JSON.stringify(this.value):this.value}`}combineContext(e){const r=this;return{...r.context,...e.context,locations:(r.context.locations||[]).concat(e.context.locations||[])}}setContext(e){return new Hap(this.whole,this.part,this.value,e)}}class State{constructor(e,r={}){this.span=e,this.controls=r}setSpan(e){return new State(e,this.controls)}withSpan(e){return this.setSpan(e(this.span))}setControls(e){return new State(this.span,e)}}const isNote$1=s=>/^[a-gA-G][#b]*[0-9]$/.test(s),tokenizeNote=s=>{var i;if(typeof s!="string")return[];const[e,r="",u]=((i=s.match(/^([a-gA-G])([#bs]*)([0-9])?$/))==null?void 0:i.slice(1))||[];return e?[e,r,u?Number(u):void 0]:[]},toMidi=s=>{const[e,r,u]=tokenizeNote(s);if(!e)throw new Error('not a note: "'+s+'"');const i={c:0,d:2,e:4,f:5,g:7,a:9,b:11}[e.toLowerCase()],n=(r==null?void 0:r.split("").reduce((a,l)=>a+{"#":1,b:-1,s:1}[l],0))||0;return(Number(u)+1)*12+i+n},fromMidi=s=>Math.pow(2,(s-69)/12)*440,getFreq=s=>fromMidi(typeof s=="number"?s:toMidi(s)),midi2note=s=>{const e=Math.floor(s/12)-1;return["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"][s%12]+e},mod=(s,e)=>(s%e+e)%e,getPlayableNoteValue=s=>{let{value:e,context:r}=s;if(typeof e=="object"&&!Array.isArray(e)&&(e=e.note||e.n||e.value),typeof e=="number"&&r.type!=="frequency")e=fromMidi(s.value);else if(typeof e=="number"&&r.type==="frequency")e=s.value;else if(typeof e!="string"||!isNote$1(e))throw new Error("not a note: "+JSON.stringify(e));return e},getFrequency=s=>{let{value:e,context:r}=s;if(typeof e=="object")return e.freq?e.freq:getFreq(e.note||e.n||e.value);if(typeof e=="number"&&r.type!=="frequency")e=fromMidi(s.value);else if(typeof e=="string"&&isNote$1(e))e=fromMidi(toMidi(s.value));else if(typeof e!="number")throw new Error("not a note or frequency: "+e);return e},rotate=(s,e)=>s.slice(e).concat(s.slice(0,e)),pipe=(...s)=>s.reduce((e,r)=>(...u)=>e(r(...u)),e=>e),compose=(...s)=>pipe(...s.reverse()),removeUndefineds=s=>s.filter(e=>e!=null),flatten=s=>[].concat(...s),id=s=>s,constant=(s,e)=>s,listRange=(s,e)=>Array.from({length:e-s+1},(r,u)=>u+s);function curry(s,e){const r=function u(...i){if(i.length>=s.length)return s.apply(this,i);{const n=function(...a){return u.apply(this,i.concat(a))};return e&&e(n,i),n}};return e&&e(r,[]),r}function parseNumeral(s){const e=Number(s);if(!isNaN(e))return e;if(isNote$1(s))return toMidi(s);throw new Error(`cannot parse as numeral: "${s}"`)}function mapArgs(s,e){return(...r)=>s(...r.map(e))}function numeralArgs(s){return mapArgs(s,parseNumeral)}function parseFractional(s){const e=Number(s);if(!isNaN(e))return e;const r={pi:Math.PI,w:1,h:.5,q:.25,e:.125,s:.0625,t:1/3,f:.2,x:1/6}[s];if(typeof r<"u")return r;throw new Error(`cannot parse as fractional: "${s}"`)}const fractionalArgs=s=>mapArgs(s,parseFractional);function unionWithObj(s,e,r){const u=Object.keys(s).filter(i=>Object.keys(e).includes(i));return Object.assign({},s,e,Object.fromEntries(u.map(i=>[i,r(s[i],e[i])])))}curry((s,e)=>s*e);curry((s,e)=>e.map(s));function drawLine(s,e=60){let r=0,u=fraction(0),i=[""],n="";for(;i[0].lengthA.hasOnset()).map(A=>A.duration),o=gcd(...l),c=o.inverse();i=i.map(A=>A+"|"),n+="|";for(let A=0;AD.whole.begin.lte(d)&&D.whole.end.gte(m)),E=f.length-i.length;E>0&&(i=i.concat(Array(E).fill(n))),i=i.map((D,h)=>{const y=f[h];if(y){const b=y.whole.begin.eq(d)?""+y.value:"-";return D+b}return D+"."}),n+=".",u=u.add(o)}r++}return i.join(` -`)}class Pattern$3{constructor(e){V(this,"_Pattern",!0);this.query=e}queryArc(e,r){return this.query(new State(new TimeSpan(e,r)))}_splitQueries(){const e=this,r=u=>flatten(u.span.spanCycles.map(i=>e.query(u.setSpan(i))));return new Pattern$3(r)}withQuerySpan(e){return new Pattern$3(r=>this.query(r.withSpan(e)))}withQuerySpanMaybe(e){const r=this;return new Pattern$3(u=>{const i=u.withSpan(e);return i.span?r.query(i):[]})}withQueryTime(e){return new Pattern$3(r=>this.query(r.withSpan(u=>u.withTime(e))))}withHapSpan(e){return new Pattern$3(r=>this.query(r).map(u=>u.withSpan(e)))}withHapTime(e){return this.withHapSpan(r=>r.withTime(e))}_withHaps(e){return new Pattern$3(r=>e(this.query(r)))}_withHap(e){return this._withHaps(r=>r.map(e))}_setContext(e){return this._withHap(r=>r.setContext(e))}_withContext(e){return this._withHap(r=>r.setContext(e(r.context)))}_stripContext(){return this._withHap(e=>e.setContext({}))}withLocation(e,r){const u={start:{line:e[0],column:e[1],offset:e[2]},end:{line:r[0],column:r[1],offset:r[2]}};return this._withContext(i=>{const n=(i.locations||[]).concat([u]);return{...i,locations:n}})}withMiniLocation(e,r){const u={start:{line:e[0],column:e[1],offset:e[2]},end:{line:r[0],column:r[1],offset:r[2]}};return this._withContext(i=>{let n=i.locations||[];return n=n.map(({start:a,end:l})=>{const o=a.line===1?u.start.column:0;return{start:{...a,line:a.line-1+(u.start.line-1)+1,column:a.column-1+o},end:{...l,line:l.line-1+(u.start.line-1)+1,column:l.column-1+o}}}),{...i,locations:n}})}withValue(e){return new Pattern$3(r=>this.query(r).map(u=>u.withValue(e)))}fmap(e){return this.withValue(e)}_filterHaps(e){return new Pattern$3(r=>this.query(r).filter(e))}_filterValues(e){return new Pattern$3(r=>this.query(r).filter(u=>e(u.value)))}_removeUndefineds(){return this._filterValues(e=>e!=null)}onsetsOnly(){return this._filterHaps(e=>e.hasOnset())}discreteOnly(){return this._filterHaps(e=>e.whole)}_appWhole(e,r){const u=this,i=function(n){const a=u.query(n),l=r.query(n),o=function(c,A){const d=c.part.intersection(A.part);if(d!=null)return new Hap(e(c.whole,A.whole),d,c.value(A.value),A.combineContext(c))};return flatten(a.map(c=>removeUndefineds(l.map(A=>o(c,A)))))};return new Pattern$3(i)}appBoth(e){const r=function(u,i){if(!(u==null||i==null))return u.intersection_e(i)};return this._appWhole(r,e)}appLeft(e){const r=this,u=function(i){const n=[];for(const a of r.query(i)){const l=e.query(i.setSpan(a.wholeOrPart()));for(const o of l){const c=a.whole,A=a.part.intersection(o.part);if(A){const d=a.value(o.value),m=o.combineContext(a),f=new Hap(c,A,d,m);n.push(f)}}}return n};return new Pattern$3(u)}appRight(e){const r=this,u=function(i){const n=[];for(const a of e.query(i)){const l=r.query(i.setSpan(a.wholeOrPart()));for(const o of l){const c=a.whole,A=o.part.intersection(a.part);if(A){const d=o.value(a.value),m=a.combineContext(o),f=new Hap(c,A,d,m);n.push(f)}}}return n};return new Pattern$3(u)}firstCycle(e=!1){var r=this;return e||(r=r._stripContext()),r.query(new State(new TimeSpan(fraction(0),fraction(1))))}get _firstCycleValues(){return this.firstCycle().map(e=>e.value)}get _showFirstCycle(){return this.firstCycle().map(e=>`${e.value}: ${e.whole.begin.toFraction()} - ${e.whole.end.toFraction()}`)}_sortHapsByPart(){return this._withHaps(e=>e.sort((r,u)=>r.part.begin.sub(u.part.begin).or(r.part.end.sub(u.part.end)).or(r.whole.begin.sub(u.whole.begin).or(r.whole.end.sub(u.whole.end)))))}_opIn(e,r){return this.fmap(r).appLeft(reify$1(e))}_opOut(e,r){return this.fmap(r).appRight(reify$1(e))}_opMix(e,r){return this.fmap(r).appBoth(reify$1(e))}_opSqueeze(e,r){const u=reify$1(e);return this.fmap(i=>u.fmap(n=>r(i)(n)))._squeezeJoin()}_opSqueezeOut(e,r){const u=this;return reify$1(e).fmap(n=>u.fmap(a=>r(a)(n)))._squeezeJoin()}_opTrig(e,r){return reify$1(e).fmap(i=>this.fmap(n=>r(n)(i)))._trigJoin()}_opTrigzero(e,r){return reify$1(e).fmap(i=>this.fmap(n=>r(n)(i)))._TrigzeroJoin()}_asNumber(){return this.fmap(parseNumeral)}round(){return this._asNumber().fmap(e=>Math.round(e))}floor(){return this._asNumber().fmap(e=>Math.floor(e))}ceil(){return this._asNumber().fmap(e=>Math.ceil(e))}_toBipolar(){return this.fmap(e=>e*2-1)}_fromBipolar(){return this.fmap(e=>(e+1)/2)}_range(e,r){return this.mul(r-e).add(e)}_rangex(e,r){return this._range(Math.log(e),Math.log(r)).fmap(Math.exp)}_range2(e,r){return this._fromBipolar()._range(e,r)}_bindWhole(e,r){const u=this,i=function(n){const a=function(o,c){return new Hap(e(o.whole,c.whole),c.part,c.value,Object.assign({},o.context,c.context,{locations:(o.context.locations||[]).concat(c.context.locations||[])}))},l=function(o){return r(o.value).query(n.setSpan(o.part)).map(c=>a(o,c))};return flatten(u.query(n).map(o=>l(o)))};return new Pattern$3(i)}bind(e){const r=function(u,i){if(!(u==null||i==null))return u.intersection_e(i)};return this._bindWhole(r,e)}join(){return this.bind(id)}outerBind(e){return this._bindWhole((r,u)=>r,e)}outerJoin(){return this.outerBind(id)}innerBind(e){return this._bindWhole((r,u)=>u,e)}innerJoin(){return this.innerBind(id)}_trigJoin(e=!1){const r=this;return new Pattern$3(u=>r.discreteOnly().query(u).map(i=>i.value.late(e?i.whole.begin:i.whole.begin.cyclePos()).query(u).map(n=>new Hap(n.whole?n.whole.intersection(i.whole):void 0,n.part.intersection(i.part),n.value).setContext(i.combineContext(n))).filter(n=>n.part)).flat())}_TrigzeroJoin(){return this._trigJoin(!0)}_squeezeJoin(){const e=this;function r(u){const i=e.discreteOnly().query(u);function n(l){const c=l.value._focusSpan(l.wholeOrPart()).query(u.setSpan(l.part));function A(d,m){let f;if(m.whole&&d.whole&&(f=m.whole.intersection(d.whole),!f))return;const E=m.part.intersection(d.part);if(!E)return;const D=m.combineContext(d);return new Hap(f,E,m.value,D)}return c.map(d=>A(l,d))}return flatten(i.map(n)).filter(l=>l)}return new Pattern$3(r)}_squeezeBind(e){return this.fmap(e)._squeezeJoin()}_apply(e){return e(this)}layer(...e){return stack(...e.map(r=>r(this)))}_patternify(e){const r=this;return function(...i){return i=i.map(a=>isPattern$1(a)?a.fmap(l=>l.value||l):a),sequence(...i).fmap(a=>e.call(r,a)).innerJoin()}}_fastGap(e){const r=function(i){const n=i.begin.sam(),a=i.begin.sub(n).mul(e).min(1),l=i.end.sub(n).mul(e).min(1);if(!(a>=1))return new TimeSpan(n.add(a),n.add(l))},u=function(i){const n=i.part.begin,a=i.part.end,l=n.sam(),o=n.sub(l).div(e).min(1),c=a.sub(l).div(e).min(1),A=new TimeSpan(l.add(o),l.add(c)),d=i.whole?new TimeSpan(A.begin.sub(n.sub(i.whole.begin).div(e)),A.end.add(i.whole.end.sub(a).div(e))):void 0;return new Hap(d,A,i.value,i.context)};return this.withQuerySpanMaybe(r)._withHap(u)._splitQueries()}_compress(e,r){return e.gt(r)||e.gt(1)||r.gt(1)||e.lt(0)||r.lt(0)?silence:this._fastGap(fraction(1).div(r.sub(e)))._late(e)}_compressSpan(e){return this._compress(e.begin,e.end)}_focus(e,r){return this._fast(fraction(1).div(r.sub(e))).late(e.cyclePos())}_focusSpan(e){return this._focus(e.begin,e.end)}_fast(e){return this.withQueryTime(u=>u.mul(e)).withHapTime(u=>u.div(e))}_slow(e){return this._fast(fraction(1).div(e))}_inside(e,r){return r(this._slow(e))._fast(e)}_outside(e,r){return r(this._fast(e))._slow(e)}_ply(e){return this.fmap(r=>pure(r)._fast(e))._squeezeJoin()}_chop(e){const u=Array.from({length:e},(n,a)=>a).map(n=>({begin:n/e,end:(n+1)/e})),i=function(n){return sequence(u.map(a=>Object.assign({},n,a)))};return this._squeezeBind(i)}_striate(e){const u=Array.from({length:e},(n,a)=>a).map(n=>({begin:n/e,end:(n+1)/e})),i=slowcat(...u);return this.set(i)._fast(e)}_cpm(e){return this._fast(e/60)}_early(e){return e=fraction(e),this.withQueryTime(r=>r.add(e)).withHapTime(r=>r.sub(e))}_late(e){return e=fraction(e),this._early(fraction(0).sub(e))}_zoom(e,r){r=fraction(r),e=fraction(e);const u=r.sub(e);return this.withQuerySpan(i=>i.withCycle(n=>n.mul(u).add(e))).withHapSpan(i=>i.withCycle(n=>n.sub(e).div(u)))._splitQueries()}_zoomArc(e){return this.zoom(e.begin,e.end)}_linger(e){return e==0?silence:e<0?this._zoom(e.add(1),1)._slow(e):this._zoom(0,e)._slow(e)}_color(e){return this._withContext(r=>({...r,color:e}))}log(){return this._withHap(e=>{var r;return e.setContext({...e.context,logs:(((r=e.context)==null?void 0:r.logs)||[]).concat([e.show()])})})}drawLine(){return console.log(drawLine(this)),this}_segment(e){return this.struct(pure(!0)._fast(e))}invert(){return this.fmap(e=>!e)}inv(){return this.invert()}when(e,r){const u=e._filterValues(id),i=e._filterValues(l=>!l),n=u.fmap(l=>o=>o).appRight(r(this)),a=i.fmap(l=>o=>o).appRight(this);return stack(n,a)}off(e,r){return stack(this,r(this.late(e)))}every(e,r){const u=this,i=Array(e-1).fill(u);return i.push(r(u)),slowcatPrime(...i)}every(e,r){const u=this,i=Array(e-1).fill(u);return i.unshift(r(u)),slowcatPrime(...i)}each(e,r){const u=this,i=Array(e-1).fill(u);return i.push(r(u)),slowcatPrime(...i)}brak(){return this.when(slowcat(!1,!0),e=>fastcat(e,silence)._late(.25))}rev(){const e=this,r=function(u){const i=u.span,n=i.begin.sam(),a=i.begin.nextSam(),l=function(c){const A=c.withTime(m=>n.add(a.sub(m))),d=A.begin;return A.begin=A.end,A.end=d,A};return e.query(u.setSpan(l(i))).map(c=>c.withSpan(l))};return new Pattern$3(r)._splitQueries()}palindrome(){return this.every(2,rev)}juxBy(e,r){e/=2;const u=function(a,l,o){return l in a?a[l]:o},i=this.withValue(a=>Object.assign({},a,{pan:u(a,"pan",.5)-e})),n=this.withValue(a=>Object.assign({},a,{pan:u(a,"pan",.5)+e}));return stack(i,r(n))}_jux(e){return this.juxBy(1,e)}stack(...e){return stack(this,...e)}sequence(...e){return sequence(this,...e)}seq(...e){return sequence(this,...e)}cat(...e){return cat(this,...e)}fastcat(...e){return fastcat(this,...e)}slowcat(...e){return slowcat(this,...e)}superimpose(...e){return this.stack(...e.map(r=>r(this)))}stutWith(e,r,u){return stack(...listRange(0,e-1).map(i=>u(this.late(fraction(r).mul(i)),i)))}stut(e,r,u){return this.stutWith(e,u,(i,n)=>i.velocity(Math.pow(r,n)))}_echoWith(e,r,u){return stack(...listRange(0,e-1).map(i=>u(this.late(fraction(r).mul(i)),i)))}_echo(e,r,u){return this._echoWith(e,r,(i,n)=>i.velocity(Math.pow(u,n)))}iter(e,r=!1){return slowcat(...listRange(0,e-1).map(u=>r?this.late(u/e):this.early(u/e)))}iterBack(e){return this.iter(e,!0)}_chunk(e,r,u=!1){const i=Array(e-1).fill(!1);i.unshift(!0);const n=sequence(...i).iter(e,u);return this.when(n,r)}_chunkBack(e,r){return this._chunk(e,r,!0)}_bypass(e){return e=Boolean(parseInt(e)),e?silence:this}hush(){return silence}_duration(e){return this.withHapSpan(r=>new TimeSpan(r.begin,r.begin.add(e)))}_legato(e){return this.withHapSpan(r=>new TimeSpan(r.begin,r.begin.add(r.end.sub(r.begin).mul(e))))}_velocity(e){return this._withContext(r=>({...r,velocity:(r.velocity||1)*e}))}_loopAt(e,r=1){return this.speed(1/e*r).unit("c").slow(e)}onTrigger(e){return this._withHap(r=>r.setContext({...r.context,onTrigger:e}))}log(e=id){return this._withHap(r=>r.setContext({...r.context,onTrigger:(...u)=>{r.context.onTrigger&&r.context.onTrigger(...u),console.log(e(...u))}}))}logValues(e=id){return this.log((r,u)=>e(u.value))}}function _composeOp(s,e,r){function u(i){return i instanceof Object&&!(i instanceof Function)}return u(s)||u(e)?(u(s)||(s={value:s}),u(e)||(e={value:e}),unionWithObj(s,e,r)):r(s,e)}(function(){const s={set:[(e,r)=>r],keep:[(e,r)=>e],keepif:[(e,r)=>r?e:void 0],add:[numeralArgs((e,r)=>e+r)],sub:[numeralArgs((e,r)=>e-r)],mul:[numeralArgs((e,r)=>e*r)],div:[numeralArgs((e,r)=>e/r)],mod:[numeralArgs(mod)],pow:[numeralArgs(Math.pow)],_and:[numeralArgs((e,r)=>e&r)],_or:[numeralArgs((e,r)=>e|r)],_xor:[numeralArgs((e,r)=>e^r)],_lshift:[numeralArgs((e,r)=>e<e>>r)],lt:[(e,r)=>ee>r],lte:[(e,r)=>e<=r],gte:[(e,r)=>e>=r],eq:[(e,r)=>e==r],eqt:[(e,r)=>e===r],ne:[(e,r)=>e!=r],net:[(e,r)=>e!==r],and:[(e,r)=>e&&r],or:[(e,r)=>e||r],func:[(e,r)=>r(e)]};for(const[e,[r,u]]of Object.entries(s))for(const i of["In","Out","Mix","Squeeze","SqueezeOut","Trig","Trigzero"])Pattern$3.prototype[e+i]=function(...n){var a=this;n=sequence(n),u&&(a=u(a),n=u(n));var l;return e==="keepif"?(l=a["_op"+i](n,o=>c=>r(o,c)),l=l._removeUndefineds()):l=a["_op"+i](n,o=>c=>_composeOp(o,c,r)),l},i==="Squeeze"&&(Pattern$3.prototype[e+"SqueezeIn"]=Pattern$3.prototype[e+i]),i==="In"?Pattern$3.prototype[e]=Pattern$3.prototype[e+i]:e==="set"&&(Pattern$3.prototype[i.toLowerCase()]=Pattern$3.prototype[e+i]);Pattern$3.prototype.struct=Pattern$3.prototype.keepifOut,Pattern$3.prototype.structAll=Pattern$3.prototype.keepOut,Pattern$3.prototype.mask=Pattern$3.prototype.keepifIn,Pattern$3.prototype.maskAll=Pattern$3.prototype.keepIn,Pattern$3.prototype.reset=Pattern$3.prototype.keepifTrig,Pattern$3.prototype.resetAll=Pattern$3.prototype.keepTrig,Pattern$3.prototype.restart=Pattern$3.prototype.keepifTrigzero,Pattern$3.prototype.restartAll=Pattern$3.prototype.keepTrigzero})();Pattern$3.prototype.patternified=["apply","chop","color","cpm","duration","early","fast","jux","late","legato","linger","ply","segment","striate","slow","velocity"];const polyrhythm=stack,pr=stack;Pattern$3.prototype.factories={pure,stack,slowcat,fastcat,cat,timeCat,sequence,seq:seq$2,polymeter,pm,polyrhythm,pr};const silence=new Pattern$3(s=>[]);function pure(s){function e(r){return r.span.spanCycles.map(u=>new Hap(fraction(u.begin).wholeCycle(),u,s))}return new Pattern$3(e)}function isPattern$1(s){const e=s instanceof Pattern$3||(s==null?void 0:s._Pattern);return!s instanceof Pattern$3&&console.warn(`Found Pattern that fails "instanceof Pattern" check. - This may happen if you are using multiple versions of @strudel.cycles/core. - Please check by running "npm ls @strudel.cycles/core".`),e}function reify$1(s){return isPattern$1(s)?s:pure(s)}function stack(...s){s=s.map(r=>Array.isArray(r)?sequence(...r):reify$1(r));const e=r=>flatten(s.map(u=>u.query(r)));return new Pattern$3(e)}function slowcat(...s){s=s.map(r=>Array.isArray(r)?sequence(...r):reify$1(r));const e=function(r){const u=r.span,i=mod(u.begin.sam(),s.length),n=s[i];if(!n)return[];const a=u.begin.floor().sub(u.begin.div(s.length).floor());return n.withHapTime(l=>l.add(a)).query(r.setSpan(u.withTime(l=>l.sub(a))))};return new Pattern$3(e)._splitQueries()}function slowcatPrime(...s){s=s.map(reify$1);const e=function(r){const u=Math.floor(r.span.begin)%s.length,i=s[u];return(i==null?void 0:i.query(r))||[]};return new Pattern$3(e)._splitQueries()}function fastcat(...s){return slowcat(...s)._fast(s.length)}function cat(...s){return slowcat(...s)}function timeCat(...s){const e=s.map(i=>i[0]).reduce((i,n)=>i.add(n),fraction(0));let r=fraction(0);const u=[];for(const[i,n]of s){const a=r.add(i);u.push(reify$1(n)._compress(r.div(e),a.div(e))),r=a}return stack(...u)}function sequence(...s){return fastcat(...s)}function seq$2(...s){return fastcat(...s)}function _sequenceCount(s){return Array.isArray(s)?s.length==0?[silence,0]:s.length==1?_sequenceCount(s[0]):[fastcat(...s.map(e=>_sequenceCount(e)[0])),s.length]:[reify$1(s),1]}function polymeterSteps(s,...e){const r=e.map(i=>_sequenceCount(i));if(r.length==0)return silence;s==0&&(s=r[0][1]);const u=[];for(const i of r)i[1]==0&&next,s==i[1]?u.push(i[0]):u.push(i[0]._fast(fraction(s).div(fraction(i[1]))));return stack(...u)}function polymeter(...s){return polymeterSteps(0,...s)}function pm(...s){polymeter(...s)}const add=curry((s,e)=>e.add(s)),chop=curry((s,e)=>e.chop(s)),chunk=curry((s,e)=>e.chunk(s)),chunkBack=curry((s,e)=>e.chunkBack(s)),div=curry((s,e)=>e.div(s)),early=curry((s,e)=>e.early(s)),echo=curry((s,e,r,u)=>u.echo(s,e,r)),every=curry((s,e,r)=>r.every(s,e)),fast=curry((s,e)=>e.fast(s)),inv=s=>s.inv(),invert=s=>s.invert(),iter=curry((s,e)=>e.iter(s)),iterBack=curry((s,e)=>e.iter(s)),jux=curry((s,e)=>e.jux(s)),juxBy=curry((s,e,r)=>r.juxBy(s,e)),late=curry((s,e)=>e.late(s)),linger=curry((s,e)=>e.linger(s)),mask=curry((s,e)=>e.mask(s)),mul=curry((s,e)=>e.mul(s)),off=curry((s,e,r)=>r.off(s,e)),ply=curry((s,e)=>e.ply(s)),range=curry((s,e,r)=>r.range(s,e)),rangex=curry((s,e,r)=>r.rangex(s,e)),range2=curry((s,e,r)=>r.range2(s,e)),rev=s=>s.rev(),slow=curry((s,e)=>e.slow(s)),struct=curry((s,e)=>e.struct(s)),sub=curry((s,e)=>e.sub(s)),superimpose=curry((s,e)=>e.superimpose(...s)),set=curry((s,e)=>e.set(s)),when=curry((s,e,r)=>r.when(s,e));Pattern$3.prototype.composable={fast,slow,early,late,superimpose};function makeComposable(s){return Object.entries(Pattern$3.prototype.composable).forEach(([e,r])=>{s[e]=(...u)=>{const i=compose(s,r(...u));return makeComposable(i)}}),s}const patternify2=s=>(e,r,u)=>e.fmap(i=>n=>s.call(u,i,n)).appLeft(r).innerJoin(),patternify3=s=>(e,r,u,i)=>e.fmap(n=>a=>l=>s.call(i,n,a,l)).appLeft(r).appLeft(u).innerJoin(),patternify4=s=>(e,r,u,i,n)=>e.fmap(a=>l=>o=>c=>s.call(n,a,l,o,c)).appLeft(r).appLeft(u).appLeft(i).innerJoin();Pattern$3.prototype.echo=function(...s){return s=s.map(reify$1),patternify3(Pattern$3.prototype._echo)(...s,this)};Pattern$3.prototype.echoWith=function(...s){return s=s.map(reify$1),patternify3(Pattern$3.prototype._echoWith)(...s,this)};Pattern$3.prototype.chunk=function(...s){return s=s.map(reify$1),patternify2(Pattern$3.prototype._chunk)(...s,this)};Pattern$3.prototype.chunkBack=function(...s){return s=s.map(reify$1),patternify2(Pattern$3.prototype._chunkBack)(...s,this)};Pattern$3.prototype.loopAt=function(...s){return s=s.map(reify$1),patternify2(Pattern$3.prototype._loopAt)(...s,this)};Pattern$3.prototype.zoom=function(...s){return s=s.map(reify$1),patternify2(Pattern$3.prototype._zoom)(...s,this)};Pattern$3.prototype.compress=function(...s){return s=s.map(reify$1),patternify2(Pattern$3.prototype._compress)(...s,this)};Pattern$3.prototype.outside=function(...s){return s=s.map(reify$1),patternify2(Pattern$3.prototype._outside)(...s,this)};Pattern$3.prototype.inside=function(...s){return s=s.map(reify$1),patternify2(Pattern$3.prototype._inside)(...s,this)};Pattern$3.prototype.range=function(...s){return s=s.map(reify$1),patternify2(Pattern$3.prototype._range)(...s,this)};Pattern$3.prototype.rangex=function(...s){return s=s.map(reify$1),patternify2(Pattern$3.prototype._rangex)(...s,this)};Pattern$3.prototype.range2=function(...s){return s=s.map(reify$1),patternify2(Pattern$3.prototype._range2)(...s,this)};Pattern$3.prototype.bootstrap=function(){const s=Object.fromEntries(Object.entries(Pattern$3.prototype.composable).map(([e,r])=>(Pattern$3.prototype[e]&&(Pattern$3.prototype[e]=makeComposable(Pattern$3.prototype[e])),[e,curry(r,makeComposable)])));return this.patternified.forEach(e=>{Pattern$3.prototype[e]=function(...r){return this._patternify(Pattern$3.prototype["_"+e])(...r)}}),s};Pattern$3.prototype.define=(s,e,r={})=>{r.composable&&(Pattern$3.prototype.composable[s]=e),r.patternified&&(Pattern$3.prototype.patternified=Pattern$3.prototype.patternified.concat([s])),Pattern$3.prototype.bootstrap()};Pattern$3.prototype.define("hush",s=>s.hush(),{patternified:!1,composable:!0});Pattern$3.prototype.define("bypass",s=>s.bypass(on),{patternified:!0,composable:!0});const controls={},generic_params=[["s","s","sound"],["f","n","The note or sample number to choose for a synth or sampleset"],["f","note","The note or pitch to play a sound or synth with"],["f","accelerate","a pattern of numbers that speed up (or slow down) samples while they play."],["f","gain","a pattern of numbers that specify volume. Values less than 1 make the sound quieter. Values greater than 1 make the sound louder. For the linear equivalent, see @amp@."],["f","amp","like @gain@, but linear."],["f","attack","a pattern of numbers to specify the attack time (in seconds) of an envelope applied to each sample."],["f","bank","selects sound bank to use"],["f","decay",""],["f","sustain",""],["f","release","a pattern of numbers to specify the release time (in seconds) of an envelope applied to each sample."],["f","hold","a pattern of numbers to specify the hold time (in seconds) of an envelope applied to each sample. Only takes effect if `attack` and `release` are also specified."],["f","bandf","A pattern of numbers from 0 to 1. Sets the center frequency of the band-pass filter."],["f","bandq","a pattern of anumbers from 0 to 1. Sets the q-factor of the band-pass filter."],["f","begin","a pattern of numbers from 0 to 1. Skips the beginning of each sample, e.g. `0.25` to cut off the first quarter from each sample."],["f","end","the same as `begin`, but cuts the end off samples, shortening them; e.g. `0.75` to cut off the last quarter of each sample."],["f","loop","loops the sample (from `begin` to `end`) the specified number of times."],["f","legato","controls the amount of overlap between two adjacent sounds"],["f","crush","bit crushing, a pattern of numbers from 1 (for drastic reduction in bit-depth) to 16 (for barely no reduction)."],["f","coarse","fake-resampling, a pattern of numbers for lowering the sample rate, i.e. 1 for original 2 for half, 3 for a third and so on."],["i","channel","choose the channel the pattern is sent to in superdirt"],["i","cut","In the style of classic drum-machines, `cut` will stop a playing sample as soon as another samples with in same cutgroup is to be played. An example would be an open hi-hat followed by a closed one, essentially muting the open."],["f","cutoff","a pattern of numbers from 0 to 1. Applies the cutoff frequency of the low-pass filter."],["f","hcutoff","a pattern of numbers from 0 to 1. Applies the cutoff frequency of the high-pass filter. Also has alias @hpf@"],["f","hresonance","a pattern of numbers from 0 to 1. Applies the resonance of the high-pass filter. Has alias @hpq@"],["f","resonance","a pattern of numbers from 0 to 1. Specifies the resonance of the low-pass filter."],["f","djf","DJ filter, below 0.5 is low pass filter, above is high pass filter."],["f","delay","a pattern of numbers from 0 to 1. Sets the level of the delay signal."],["f","delayfeedback","a pattern of numbers from 0 to 1. Sets the amount of delay feedback."],["f","delaytime","a pattern of numbers from 0 to 1. Sets the length of the delay."],["f","lock","A pattern of numbers. Specifies whether delaytime is calculated relative to cps. When set to 1, delaytime is a direct multiple of a cycle."],["f","detune",""],["f","dry","when set to `1` will disable all reverb for this pattern. See `room` and `size` for more information about reverb."],["f","fadeTime","Used when using begin/end or chop/striate and friends, to change the fade out time of the 'grain' envelope."],["f","fadeInTime","As with fadeTime, but controls the fade in time of the grain envelope. Not used if the grain begins at position 0 in the sample."],["f","freq",""],["f","gate",""],["f","leslie",""],["f","lrate",""],["f","lsize",""],["f","degree",""],["f","mtranspose",""],["f","ctranspose",""],["f","harmonic",""],["f","stepsPerOctave",""],["f","octaveR",""],["f","nudge","Nudges events into the future by the specified number of seconds. Negative numbers work up to a point as well (due to internal latency)"],["i","octave",""],["f","offset",""],["i","orbit","a pattern of numbers. An `orbit` is a global parameter context for patterns. Patterns with the same orbit will share hardware output bus offset and global effects, e.g. reverb and delay. The maximum number of orbits is specified in the superdirt startup, numbers higher than maximum will wrap around."],["f","overgain",""],["f","overshape",""],["f","pan","a pattern of numbers between 0 and 1, from left to right (assuming stereo), once round a circle (assuming multichannel)"],["f","panspan","a pattern of numbers between -inf and inf, which controls how much multichannel output is fanned out (negative is backwards ordering)"],["f","pansplay","a pattern of numbers between 0.0 and 1.0, which controls the multichannel spread range (multichannel only)"],["f","panwidth","a pattern of numbers between 0.0 and inf, which controls how much each channel is distributed over neighbours (multichannel only)"],["f","panorient","a pattern of numbers between -1.0 and 1.0, which controls the relative position of the centre pan in a pair of adjacent speakers (multichannel only)"],["f","rate","used in SuperDirt softsynths as a control rate or 'speed'"],["f","slide",""],["f","semitone",""],["f","velocity",""],["f","voice",""],["f","room","a pattern of numbers from 0 to 1. Sets the level of reverb."],["f","size","a pattern of numbers from 0 to 1. Sets the perceptual size (reverb time) of the `room` to be used in reverb."],["f","roomsize","a pattern of numbers from 0 to 1. Sets the perceptual size (reverb time) of the `room` to be used in reverb."],["f","shape","wave shaping distortion, a pattern of numbers from 0 for no distortion up to 1 for loads of distortion."],["f","speed","a pattern of numbers which changes the speed of sample playback, i.e. a cheap way of changing pitch. Negative values will play the sample backwards!"],["s","unit",'used in conjunction with `speed`, accepts values of "r" (rate, default behavior), "c" (cycles), or "s" (seconds). Using `unit "c"` means `speed` will be interpreted in units of cycles, e.g. `speed "1"` means samples will be stretched to fill a cycle. Using `unit "s"` means the playback speed will be adjusted so that the duration is the number of seconds specified by `speed`.'],["f","squiz",""],["f","stutterdepth",""],["f","stuttertime",""],["f","timescale",""],["f","timescalewin",""],["s","vowel","formant filter to make things sound like vowels, a pattern of either `a`, `e`, `i`, `o` or `u`. Use a rest (`~`) for no effect."],["f","waveloss",""],["f","dur",""],["f","expression",""],["f","sustainpedal",""],["f","tremolodepth","Tremolo Audio DSP effect | params are 'tremolorate' and 'tremolodepth'"],["f","tremolorate","Tremolo Audio DSP effect | params are 'tremolorate' and 'tremolodepth'"],["f","phaserdepth","Phaser Audio DSP effect | params are 'phaserrate' and 'phaserdepth'"],["f","phaserrate","Phaser Audio DSP effect | params are 'phaserrate' and 'phaserdepth'"],["f","fshift","frequency shifter"],["f","fshiftnote","frequency shifter"],["f","fshiftphase","frequency shifter"],["f","triode","tube distortion"],["f","krush","shape/bass enhancer"],["f","kcutoff",""],["f","octer","octaver effect"],["f","octersub","octaver effect"],["f","octersubsub","octaver effect"],["f","ring","ring modulation"],["f","ringf","ring modulation"],["f","ringdf","ring modulation"],["f","distort","noisy fuzzy distortion"],["f","freeze","Spectral freeze"],["f","xsdelay",""],["f","tsdelay",""],["f","real","Spectral conform"],["f","imag",""],["f","enhance","Spectral enhance"],["f","partials",""],["f","comb","Spectral comb"],["f","smear","Spectral smear"],["f","scram","Spectral scramble"],["f","binshift","Spectral binshift"],["f","hbrick","High pass sort of spectral filter"],["f","lbrick","Low pass sort of spectral filter"],["f","midichan",""],["f","control",""],["f","ccn",""],["f","ccv",""],["f","polyTouch",""],["f","midibend",""],["f","miditouch",""],["f","ctlNum",""],["f","frameRate",""],["f","frames",""],["f","hours",""],["s","midicmd",""],["f","minutes",""],["f","progNum",""],["f","seconds",""],["f","songPtr",""],["f","uid",""],["f","val",""],["f","cps",""],["f","clip",""]],_name=(s,...e)=>sequence(...e).withValue(r=>({[s]:r})),_setter=(s,e)=>function(...r){return r.length?this.set(s(...r)):this.fmap(u=>({[e]:u}))};generic_params.forEach(([s,e,r])=>{controls[e]=(...u)=>_name(e,...u),Pattern$3.prototype[e]=_setter(controls[e],e)});controls.createParam=s=>{const e=(...r)=>_name(s,...r);return Pattern$3.prototype[s]=_setter(e,s),(...r)=>_name(s,...r)};controls.createParams=(...s)=>s.reduce((e,r)=>Object.assign(e,{[r]:createParam(r)}),{});function bjorklund(s,e){for(var r=[],u=[],i=[e],n=s-e,a=0,l=function(o){if(o==-1)r.push(0);else if(o==-2)r.push(1);else{for(var c=0;c1;)u.push(Math.floor(n/i[a])),i.push(n%i[a]),n=i[a],a++;return u.push(n),l(a),r.reverse()}var bjork=function(s,e){return s>e?bjorklund(s,e):bjorklund(e,s)};const euclid=(s,e,r=0)=>{const u=bjork(e,s);return r?rotate(u,-r):u};Pattern$3.prototype.euclid=function(s,e,r=0){return this.struct(euclid(s,e,r))};Pattern$3.prototype.euclidLegato=function(s,e,r=0){const u=euclid(s,e,r),i=u.indexOf(1),n=rotate(u,i).join("").split("1").slice(1).map(a=>[a.length+1,!0]);return this.struct(timeCat(...n)).late(fraction(i).div(e))};function steady(s){return new Pattern$3(e=>[new Hap(void 0,e.span,s)])}const signal=s=>{const e=r=>[new Hap(void 0,r.span,s(r.span.midpoint()))];return new Pattern$3(e)},isaw=signal(s=>1-s%1),isaw2=isaw._toBipolar(),saw=signal(s=>s%1),saw2=saw._toBipolar(),sine2=signal(s=>Math.sin(Math.PI*2*s)),sine=sine2._fromBipolar(),cosine=sine._early(fraction(1).div(4)),cosine2=sine2._early(fraction(1).div(4)),square=signal(s=>Math.floor(s*2%2)),square2=square._toBipolar(),tri=fastcat(isaw,saw),tri2=fastcat(isaw2,saw2),time=signal(id),xorwise=s=>{const e=s<<13^s,r=e>>17^e;return r<<5^r},_frac=s=>s-Math.trunc(s),timeToIntSeed=s=>xorwise(Math.trunc(_frac(s/300)*536870912)),intSeedToRand=s=>s%536870912/536870912,timeToRand=s=>Math.abs(intSeedToRand(timeToIntSeed(s))),rand=signal(timeToRand),rand2=rand._toBipolar(),_brandBy=s=>rand.fmap(e=>ereify$1(s).fmap(_brandBy).innerJoin(),brand=_brandBy(.5),_irand=s=>rand.fmap(e=>Math.trunc(e*s)),irand=s=>reify$1(s).fmap(_irand).innerJoin(),__chooseWith=(s,e)=>(e=e.map(reify$1),e.length==0?silence:s.range(0,e.length).fmap(r=>e[Math.floor(r)])),chooseWith=(s,e)=>__chooseWith(s,e).outerJoin(),chooseInWith=(s,e)=>__chooseWith(s,e).innerJoin(),choose=(...s)=>chooseWith(rand,s);Pattern$3.prototype.choose=function(...s){return chooseWith(this,s)};Pattern$3.prototype.choose2=function(...s){return chooseWith(this._fromBipolar(),s)};const chooseCycles=(...s)=>chooseInWith(rand.segment(1),s),randcat=chooseCycles,_wchooseWith=function(s,...e){const r=e.map(l=>reify$1(l[0])),u=[];let i=0;for(const l of e)i+=l[1],u.push(i);const n=i,a=function(l){const o=l*n;return r[u.findIndex(c=>c>o,u)]};return s.fmap(a)},wchooseWith=(...s)=>_wchooseWith(...s).outerJoin(),wchoose=(...s)=>wchooseWith(rand,...s),wchooseCycles=(...s)=>_wchooseWith(rand,...s).innerJoin(),perlinWith=s=>{const e=s.fmap(Math.floor),r=s.fmap(n=>Math.floor(n)+1),u=n=>6*n**5-15*n**4+10*n**3,i=n=>a=>l=>a+u(n)*(l-a);return s.sub(e).fmap(i).appBoth(e.fmap(timeToRand)).appBoth(r.fmap(timeToRand))},perlin=perlinWith(time.fmap(s=>Number(s)));Pattern$3.prototype._degradeByWith=function(s,e){return this.fmap(r=>u=>r).appLeft(s._filterValues(r=>r>e))};Pattern$3.prototype._degradeBy=function(s){return this._degradeByWith(rand,s)};Pattern$3.prototype.degrade=function(){return this._degradeBy(.5)};Pattern$3.prototype._undegradeBy=function(s){return this._degradeByWith(rand.fmap(e=>1-e),s)};Pattern$3.prototype.undegrade=function(){return this._undegradeBy(.5)};Pattern$3.prototype._sometimesBy=function(s,e){return stack(this._degradeBy(s),e(this._undegradeBy(1-s)))};Pattern$3.prototype.sometimesBy=function(s,e){const r=this;return reify$1(s).fmap(u=>r._sometimesBy(u,e)).innerJoin()};Pattern$3.prototype._sometimesByPre=function(s,e){return stack(this._degradeBy(s),e(this).undegradeBy(1-s))};Pattern$3.prototype.sometimesByPre=function(s,e){const r=this;return reify$1(s).fmap(u=>r._sometimesByPre(u,e)).innerJoin()};Pattern$3.prototype.sometimes=function(s){return this._sometimesBy(.5,s)};Pattern$3.prototype.sometimesPre=function(s){return this._sometimesByPre(.5,s)};Pattern$3.prototype._someCyclesBy=function(s,e){return stack(this._degradeByWith(rand._segment(1),s),e(this._degradeByWith(rand.fmap(r=>1-r)._segment(1),1-s)))};Pattern$3.prototype.someCyclesBy=function(s,e){const r=this;return reify$1(s).fmap(u=>r._someCyclesBy(u,e)).innerJoin()};Pattern$3.prototype.someCycles=function(s){return this._someCyclesBy(.5,s)};Pattern$3.prototype.often=function(s){return this.sometimesBy(.75,s)};Pattern$3.prototype.rarely=function(s){return this.sometimesBy(.25,s)};Pattern$3.prototype.almostNever=function(s){return this.sometimesBy(.1,s)};Pattern$3.prototype.almostAlways=function(s){return this.sometimesBy(.9,s)};Pattern$3.prototype.never=function(s){return this};Pattern$3.prototype.always=function(s){return s(this)};Pattern$3.prototype.patternified.push("degradeBy","undegradeBy");let synth;try{synth=window==null?void 0:window.speechSynthesis}catch{console.warn("cannot use window: not in browser?")}let allVoices=synth==null?void 0:synth.getVoices();function speak(s,e,r){synth.cancel();const u=new SpeechSynthesisUtterance(s);u.lang=e,allVoices=synth.getVoices();const i=allVoices.filter(n=>n.lang.includes(e));typeof r=="number"?u.voice=i[r%i.length]:typeof r=="string"&&(u.voice=i.find(n=>n.name===n)),speechSynthesis.speak(u)}Pattern$3.prototype._speak=function(s,e){return this._withHap(r=>{const u=(i,n)=>{speak(n.value,s,e)};return r.setContext({...r.context,onTrigger:u})})};Pattern$3.prototype.speak=function(s,e){return patternify2(Pattern$3.prototype._speak)(reify(s),reify(e),this)};const stringifyFunction=s=>"("+s+")();",urlifyFunction=s=>URL.createObjectURL(new Blob([stringifyFunction(s)],{type:"text/javascript"})),createWorker=s=>new Worker(urlifyFunction(s));class ClockWorker{constructor(e,r){V(this,"worker");V(this,"interval",1/20);V(this,"tick",0);this.interval=r||this.interval,this.worker=createWorker(()=>{let u,i=null;const n=()=>{i&&(clearInterval(i),i=null)},a=()=>{if(n(),!u)throw new Error("no interval set! call worker.postMessage({interval}) before starting.");postMessage("tick"),i=setInterval(()=>postMessage("tick"),u*1e3)};self.onmessage=function(l){l.data=="start"?a():l.data.interval?(u=l.data.interval,i&&a()):l.data=="stop"&&n()}}),this.setInterval(this.interval),this.worker.onmessage=u=>{u.data==="tick"&&e(this.tick++,this.interval)}}start(){this.worker.postMessage("start")}stop(){this.worker.postMessage("stop"),this.tick=0}setInterval(e){this.worker.postMessage({interval:e})}}class Scheduler{constructor({interval:e,onTrigger:r,onError:u,latency:i=.2,getTime:n}){V(this,"worker");V(this,"pattern");V(this,"started",!1);V(this,"phase",0);V(this,"cps",1);V(this,"getTime");V(this,"lastTime");this.worker=new ClockWorker((a,l)=>{try{const o=n();if(!this.lastTime){this.lastTime=o;return}const c=o-this.lastTime;this.lastTime=o;const A=this.phase,d=this.phase+c*this.cps;this.phase=d,this.pattern.queryArc(A,d).forEach(f=>{var _,b;if(typeof((_=f.value)==null?void 0:_.cps)=="number"&&this.setCps((b=f.value)==null?void 0:b.cps),!f.part.begin.equals(f.whole.begin))return;const E=o+(f.whole.begin-A)/this.cps-c+l+i,D=f.duration/this.cps,h=n(),y=E-h;if(En.hasOnset());console.log(`${e.toFixed(4)} - ${r.toFixed(4)} ${Array(i.length).fill("I").join("")}`)}}const{isPattern,Pattern:Pattern$2}=strudel;let scoped=!1;const evalScope=async(...s)=>{scoped&&console.warn("evalScope was called more than once."),scoped=!0;const e=await Promise.allSettled(s),r=e.filter(u=>u.status==="fulfilled").map(u=>u.value);e.forEach((u,i)=>{u.status==="rejected"&&console.warn(`evalScope: module with index ${i} could not be loaded:`,u.reason)}),Object.assign(globalThis,...r,Pattern$2.prototype.bootstrap())};function safeEval(s){return Function('"use strict";return ('+s+")")()}const evaluate$1=async(s,e)=>{scoped||await evalScope(),e&&(s=e(s));let r=await safeEval(s);if(!isPattern(r)){console.log("evaluated",r);const u=`got "${typeof r}" instead of pattern`;throw new Error(u+(typeof r=="function"?", did you forget to call a function?":"."))}return{mode:"javascript",pattern:r}};function createClock(s,e,r=.05,u=.1,i=.1){let n=0,a=0,l=10**4,o=.01;const c=y=>r=y(r);i=i||u/2;const A=()=>{const y=s(),_=y+u+i;for(a===0&&(a=y+o);a<_;)a=Math.round(a*l)/l,a>=y&&e(a,r,n),a{A(),d=setInterval(A,u*1e3)},f=()=>clearInterval(d);return{setDuration:c,start:m,stop:()=>{n=0,a=0,f()},pause:()=>f(),duration:r,getPhase:()=>a}}class Cyclist{constructor({interval:e,onTrigger:r,onError:u,getTime:i,latency:n=.1}){V(this,"worker");V(this,"pattern");V(this,"started",!1);V(this,"cps",1);V(this,"getTime");V(this,"phase",0);this.getTime=i;const a=l=>Math.round(l*1e3)/1e3;this.clock=createClock(i,(l,o,c)=>{c===0&&(this.origin=l);const A=a(l-this.origin);this.phase=A-n;const d=a(A+o),m=i();try{this.pattern.queryArc(A,d).forEach(E=>{if(E.part.begin.equals(E.whole.begin)){const D=E.whole.begin+this.origin-m+n,h=E.duration*1;r==null||r(E,D,h)}})}catch(f){console.warn("scheduler error",f),u==null||u(f)}},e)}getPhase(){return this.phase}start(){if(!this.pattern)throw new Error("Scheduler: no pattern set! call .setPattern first.");this.clock.start(),this.started=!0}pause(){this.clock.stop(),delete this.origin,this.started=!1}stop(){delete this.origin,this.clock.stop(),this.started=!1}setPattern(e,r=!1){this.pattern=e,r&&!this.started&&this.start()}setCps(e=1){this.cps=e}log(e,r,u){const i=u.filter(n=>n.hasOnset());console.log(`${e.toFixed(4)} - ${r.toFixed(4)} ${Array(i.length).fill("I").join("")}`)}}function repl({interval:s,defaultOutput:e,onSchedulerError:r,onEvalError:u,onEval:i,getTime:n,transpiler:a}){const l=new Cyclist({interval:s,onTrigger:e,onError:r,getTime:n});return{scheduler:l,evaluate:async c=>{if(!c)throw new Error("no code to evaluate");try{const{pattern:A}=await evaluate$1(c,a);l.setPattern(A,!0),i==null||i({pattern:A,code:c})}catch(A){console.warn(`eval error: ${A.message}`),u==null||u(A)}}}}const gist=(route,cache=!0)=>fetch(`https://gist.githubusercontent.com/${route}?cachebust=${cache?"":Date.now()}`).then(s=>s.text()).then(code=>eval(code));console.log("%c // \u{1F300} @strudel.cycles/core loaded \u{1F300}","background-color: black;color:white;padding:4px;border-radius:15px");globalThis._strudelLoaded&&console.warn(`@strudel.cycles/core was loaded more than once... -This might happen when you have multiple versions of strudel installed. -Please check with "npm ls @strudel.cycles/core".`);globalThis._strudelLoaded=!0;if(typeof DelayNode<"u"){class s extends DelayNode{constructor(r,u,i,n){super(r),u=Math.abs(u),this.delayTime.value=i;const a=r.createGain();a.gain.value=Math.min(Math.abs(n),.995),this.feedback=a.gain;const l=r.createGain();return l.gain.value=u,this.delayGain=l,this.connect(a),this.connect(l),a.connect(this),this.connect=o=>l.connect(o),this}start(r){this.delayGain.gain.setValueAtTime(this.delayGain.gain.value,r+this.delayTime.value)}}AudioContext.prototype.createFeedbackDelay=function(e,r,u){return new s(this,e,r,u)}}typeof AudioContext<"u"&&(AudioContext.prototype.impulseResponse=function(s,e=1){const r=this.sampleRate*s,u=this.createBuffer(e,r,this.sampleRate),i=u.getChannelData(0);for(let n=0;n(e.buffer=this.impulseResponse(r),e.duration=s,e),e.setDuration(s),e});const bufferCache={},loadCache={},getCachedBuffer=s=>bufferCache[s],loadBuffer=(s,e)=>(loadCache[s]||(loadCache[s]=fetch(s).then(r=>r.arrayBuffer()).then(async r=>{const u=await e.decodeAudioData(r);return bufferCache[s]=u,u})),loadCache[s]);function reverseBuffer(s){const e=getAudioContext(),r=e.createBuffer(s.numberOfChannels,s.length,e.sampleRate);for(let u=0;ubufferCache[s],githubCache={};let sampleCache={current:void 0};const loadGithubSamples=async(s,e)=>{const r="loadGithubSamples "+s,u=localStorage.getItem(r);if(u&&(console.log("[sampler]: loaded sample list from localstorage",s),githubCache[s]=JSON.parse(u)),githubCache[s])return sampleCache.current=githubCache[s],githubCache[s];console.log("[sampler]: fetching sample list from github",s);try{const[i,n,...a]=s.split("/"),l=`https://api.github.com/repos/${i}/${n}/contents`,o=await fetch(`${l}/${a.join("/")}`).then(c=>c.json());githubCache[s]=(await Promise.all(o.map(async({name:c,path:A})=>({name:c,content:await fetch(`${l}/${A}`).then(d=>d.json()).catch(d=>{console.error("could not load path",d)})})))).filter(({content:c})=>!!c).reduce((c,{name:A,content:d})=>({...c,[(e==null?void 0:e(A))||A]:d.map(({download_url:m})=>m)}),{})}catch(i){console.error("[sampler]: failed to fetch sample list from github",i);return}return sampleCache.current=githubCache[s],localStorage.setItem(r,JSON.stringify(sampleCache.current)),console.log("[sampler]: loaded samples:",sampleCache.current),githubCache[s]},samples=async(s,e=s._base||"")=>{if(typeof s=="string"){if(s.startsWith("github:")){const[u,i]=s.split("github:");s=`https://raw.githubusercontent.com/${i}/strudel.json`}if(typeof fetch!="function")return;const r=s.split("/").slice(0,-1).join("/");return typeof fetch>"u"?void 0:fetch(s).then(u=>u.json()).then(u=>samples(u,e||u._base||r)).catch(u=>{throw console.error(u),new Error(`error loading "${s}"`)})}sampleCache.current={...sampleCache.current,...Object.fromEntries(Object.entries(s).map(([r,u])=>{if(typeof u=="string"&&(u=[u]),typeof u!="object")throw new Error("wrong sample map format for "+r);e=u._base||e;const i=n=>(e+n).replace("github:","https://raw.githubusercontent.com/");return Array.isArray(u)?[r,u.map(i)]:[r,Object.fromEntries(Object.entries(u).map(([n,a])=>[n,(typeof a=="string"?[a]:a).map(i)]))]}))}},resetLoadedSamples=()=>{sampleCache.current=void 0},getLoadedSamples$1=()=>sampleCache.current;var vowelFormant={a:{freqs:[660,1120,2750,3e3,3350],gains:[1,.5012,.0708,.0631,.0126],qs:[80,90,120,130,140]},e:{freqs:[440,1800,2700,3e3,3300],gains:[1,.1995,.1259,.1,.1],qs:[70,80,100,120,120]},i:{freqs:[270,1850,2900,3350,3590],gains:[1,.0631,.0631,.0158,.0158],qs:[40,90,100,120,120]},o:{freqs:[430,820,2700,3e3,3300],gains:[1,.3162,.0501,.0794,.01995],qs:[40,80,100,120,120]},u:{freqs:[370,630,2750,3e3,3400],gains:[1,.1,.0708,.0316,.01995],qs:[40,60,100,120,120]}};if(typeof GainNode<"u"){class s extends GainNode{constructor(r,u){if(super(r),!vowelFormant[u])throw new Error("vowel: unknown vowel "+u);const{gains:i,qs:n,freqs:a}=vowelFormant[u],l=r.createGain();for(let o=0;o<5;o++){const c=r.createGain();c.gain.value=i[o];const A=r.createBiquadFilter();A.type="bandpass",A.Q.value=n[o],A.frequency.value=a[o],this.connect(A),A.connect(c),c.connect(l)}return l.gain.value=8,this.connect=o=>l.connect(o),this}}AudioContext.prototype.createVowelFilter=function(e){return new s(this,e)}}const workletsUrl="data:application/javascript;base64,Ly8gTElDRU5TRSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2My4wIHNlZSBodHRwczovL2dpdGh1Yi5jb20vZGt0cjAvV2ViRGlydC9ibG9iL21haW4vTElDRU5TRQovLyBhbGwgdGhlIGNyZWRpdCBnb2VzIHRvIGRrdHIwJ3Mgd2ViZGlydDogaHR0cHM6Ly9naXRodWIuY29tL2RrdHIwL1dlYkRpcnQvYmxvYi81Y2UzZDY5ODM2MmM1NGQ2ZTFiNjhhY2M0N2ViMjk1NWFjNjJjNzkzL2Rpc3QvQXVkaW9Xb3JrbGV0cy5qcwovLyA8MwoKY2xhc3MgQ29hcnNlUHJvY2Vzc29yIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBzdGF0aWMgZ2V0IHBhcmFtZXRlckRlc2NyaXB0b3JzKCkgewogICAgcmV0dXJuIFt7IG5hbWU6ICdjb2Fyc2UnLCBkZWZhdWx0VmFsdWU6IDEgfV07CiAgfQoKICBjb25zdHJ1Y3RvcigpIHsKICAgIHN1cGVyKCk7CiAgICB0aGlzLm5vdFN0YXJ0ZWQgPSB0cnVlOwogIH0KCiAgcHJvY2VzcyhpbnB1dHMsIG91dHB1dHMsIHBhcmFtZXRlcnMpIHsKICAgIGNvbnN0IGlucHV0ID0gaW5wdXRzWzBdOwogICAgY29uc3Qgb3V0cHV0ID0gb3V0cHV0c1swXTsKICAgIGNvbnN0IGNvYXJzZSA9IHBhcmFtZXRlcnMuY29hcnNlOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBvdXRwdXRbMF1bMF0gPSBpbnB1dFswXVswXTsKICAgICAgZm9yIChsZXQgbiA9IDE7IG4gPCBibG9ja1NpemU7IG4rKykgewogICAgICAgIGZvciAobGV0IG8gPSAwOyBvIDwgb3V0cHV0Lmxlbmd0aDsgbysrKSB7CiAgICAgICAgICBvdXRwdXRbb11bbl0gPSBuICUgY29hcnNlID09IDAgPyBpbnB1dFswXVtuXSA6IG91dHB1dFtvXVtuIC0gMV07CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ2NvYXJzZS1wcm9jZXNzb3InLCBDb2Fyc2VQcm9jZXNzb3IpOwoKY2xhc3MgQ3J1c2hQcm9jZXNzb3IgZXh0ZW5kcyBBdWRpb1dvcmtsZXRQcm9jZXNzb3IgewogIHN0YXRpYyBnZXQgcGFyYW1ldGVyRGVzY3JpcHRvcnMoKSB7CiAgICByZXR1cm4gW3sgbmFtZTogJ2NydXNoJywgZGVmYXVsdFZhbHVlOiAwIH1dOwogIH0KCiAgY29uc3RydWN0b3IoKSB7CiAgICBzdXBlcigpOwogICAgdGhpcy5ub3RTdGFydGVkID0gdHJ1ZTsKICB9CgogIHByb2Nlc3MoaW5wdXRzLCBvdXRwdXRzLCBwYXJhbWV0ZXJzKSB7CiAgICBjb25zdCBpbnB1dCA9IGlucHV0c1swXTsKICAgIGNvbnN0IG91dHB1dCA9IG91dHB1dHNbMF07CiAgICBjb25zdCBjcnVzaCA9IHBhcmFtZXRlcnMuY3J1c2g7CiAgICBjb25zdCBibG9ja1NpemUgPSAxMjg7CiAgICBjb25zdCBoYXNJbnB1dCA9ICEoaW5wdXRbMF0gPT09IHVuZGVmaW5lZCk7CiAgICBpZiAoaGFzSW5wdXQpIHsKICAgICAgdGhpcy5ub3RTdGFydGVkID0gZmFsc2U7CiAgICAgIGlmIChjcnVzaC5sZW5ndGggPT09IDEpIHsKICAgICAgICBjb25zdCB4ID0gTWF0aC5wb3coMiwgY3J1c2hbMF0gLSAxKTsKICAgICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgICBjb25zdCB2YWx1ZSA9IE1hdGgucm91bmQoaW5wdXRbMF1bbl0gKiB4KSAvIHg7CiAgICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgICBvdXRwdXRbb11bbl0gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm9yIChsZXQgbiA9IDA7IG4gPCBibG9ja1NpemU7IG4rKykgewogICAgICAgICAgbGV0IHggPSBNYXRoLnBvdygyLCBjcnVzaFtuXSAtIDEpOwogICAgICAgICAgY29uc3QgdmFsdWUgPSBNYXRoLnJvdW5kKGlucHV0WzBdW25dICogeCkgLyB4OwogICAgICAgICAgZm9yIChsZXQgbyA9IDA7IG8gPCBvdXRwdXQubGVuZ3RoOyBvKyspIHsKICAgICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQpyZWdpc3RlclByb2Nlc3NvcignY3J1c2gtcHJvY2Vzc29yJywgQ3J1c2hQcm9jZXNzb3IpOwoKY2xhc3MgU2hhcGVQcm9jZXNzb3IgZXh0ZW5kcyBBdWRpb1dvcmtsZXRQcm9jZXNzb3IgewogIHN0YXRpYyBnZXQgcGFyYW1ldGVyRGVzY3JpcHRvcnMoKSB7CiAgICByZXR1cm4gW3sgbmFtZTogJ3NoYXBlJywgZGVmYXVsdFZhbHVlOiAwIH1dOwogIH0KCiAgY29uc3RydWN0b3IoKSB7CiAgICBzdXBlcigpOwogICAgdGhpcy5ub3RTdGFydGVkID0gdHJ1ZTsKICB9CgogIHByb2Nlc3MoaW5wdXRzLCBvdXRwdXRzLCBwYXJhbWV0ZXJzKSB7CiAgICBjb25zdCBpbnB1dCA9IGlucHV0c1swXTsKICAgIGNvbnN0IG91dHB1dCA9IG91dHB1dHNbMF07CiAgICBjb25zdCBzaGFwZTAgPSBwYXJhbWV0ZXJzLnNoYXBlWzBdOwogICAgY29uc3Qgc2hhcGUxID0gc2hhcGUwIDwgMSA/IHNoYXBlMCA6IDEuMCAtIDRlLTEwOwogICAgY29uc3Qgc2hhcGUgPSAoMi4wICogc2hhcGUxKSAvICgxLjAgLSBzaGFwZTEpOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgY29uc3QgdmFsdWUgPSAoKDEgKyBzaGFwZSkgKiBpbnB1dFswXVtuXSkgLyAoMSArIHNoYXBlICogTWF0aC5hYnMoaW5wdXRbMF1bbl0pKTsKICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ3NoYXBlLXByb2Nlc3NvcicsIFNoYXBlUHJvY2Vzc29yKTsK",{Pattern:Pattern$1}=strudel;let audioContext;const getAudioContext$1=()=>(audioContext||(audioContext=new AudioContext),audioContext);let destination;const getDestination=()=>{const s=getAudioContext$1();return destination||(destination=s.createGain(),destination.connect(s.destination)),destination},panic=()=>{getDestination().gain.linearRampToValueAtTime(0,getAudioContext$1().currentTime+.01),destination=null},getFilter=(s,e,r)=>{const u=getAudioContext$1().createBiquadFilter();return u.type=s,u.frequency.value=e,u.Q.value=r,u},getADSR=(s,e,r,u,i,n,a)=>{const l=getAudioContext$1().createGain();return l.gain.setValueAtTime(0,n),l.gain.linearRampToValueAtTime(i,n+s),l.gain.linearRampToValueAtTime(r*i,n+s+e),l.gain.setValueAtTime(r*i,a),l.gain.linearRampToValueAtTime(0,a+u),l},getOscillator=({s,freq:e,t:r,duration:u,release:i})=>{const n=getAudioContext$1().createOscillator();return n.type=s||"triangle",n.frequency.value=Number(e),n.start(r),n.stop(r+u+i),n},getSoundfontKey=s=>{var u,i,n,a;if(!globalThis.soundfontList)return!1;if((i=(u=globalThis.soundfontList)==null?void 0:u.instruments)!=null&&i.includes(s))return s;const e=(a=(n=globalThis.soundfontList)==null?void 0:n.instrumentNames)==null?void 0:a.indexOf(s),r=e<10?`00${e}`:e<100?`0${e}`:e;if(e!==-1)return globalThis.soundfontList.instruments.find(l=>l.startsWith(r))},getSampleBufferSource=async(s,e,r,u)=>{let i=0,n=typeof r=="string"?toMidi(r):r||36;i=n-36;const a=getAudioContext$1(),l=getLoadedSamples();if(!l)throw new Error("no samples loaded");const o=l==null?void 0:l[s];if(!o)throw new Error(`sample not found: "${s}", try one of ${Object.keys(l).map(f=>`"${f}"`).join(", ")}.`);if(typeof o!="object")throw new Error("wrong format for sample bank:",s);let c;if(Array.isArray(o))c=o[e%o.length];else{const f=D=>toMidi(D)-n,E=Object.keys(o).filter(D=>!D.startsWith("_")).reduce((D,h,y)=>!D||Math.abs(f(h)){if(!s.includes(":"))return[s,e];let[r,u]=s.split(":");return isNaN(Number(u))?[s,e]:[r,u]};let workletsLoading;function loadWorklets(){return workletsLoading||(workletsLoading=getAudioContext$1().audioWorklet.addModule(workletsUrl),workletsLoading)}function getWorklet(s,e,r){const u=new AudioWorkletNode(s,e);return Object.entries(r).forEach(([i,n])=>{u.parameters.get(i).value=n}),u}if(typeof window<"u")try{loadWorklets()}catch(s){console.warn("could not load AudioWorklet effects coarse, crush and shape",s)}function gainNode(s){const e=getAudioContext$1().createGain();return e.gain.value=s,e}const cutGroups=[];let delays={};function getDelay(s,e,r,u){if(!delays[s]){const n=getAudioContext$1().createFeedbackDelay(1,e,r);n.start(u),n.connect(getDestination()),delays[s]=n}return delays[s].delayTime.value!==e&&delays[s].delayTime.setValueAtTime(e,u),delays[s].feedback.value!==r&&delays[s].feedback.setValueAtTime(r,u),delays[s]}let reverbs={};function getReverb(s,e=2){if(!reverbs[s]){const u=getAudioContext$1().createReverb(e);u.connect(getDestination()),reverbs[s]=u}return reverbs[s].duration!==e&&(reverbs[s]=reverbs[s].setDuration(e),reverbs[s].duration=e),reverbs[s]}function effectSend(s,e,r){const u=gainNode(r);return s.connect(u),u.connect(e),u}const webaudioOutput=async(s,e,r)=>{var u;try{const i=getAudioContext$1();if(typeof s.value!="object")throw new Error(`hap.value ${s.value} is not supported by webaudio output. Hint: append .note() or .s() to the end`);let n=i.currentTime+e,{freq:a,s:l,bank:o,sf:c,clip:A=0,n:d=0,note:m,gain:f=.8,cutoff:E,resonance:D=1,hcutoff:h,hresonance:y=1,bandf:_,bandq:b=1,coarse:P,crush:B,shape:g,pan:x,speed:C=1,begin:S=0,end:L=1,vowel:$,delay:N=0,delayfeedback:R=.5,delaytime:O=.25,unit:U,nudge:G=0,cut:k,loop:M,orbit:H=1,room:Y,size:ae=2,roomsize:ee=ae}=s.value;const{velocity:te=1}=s.context;f*=te;const v=[];if(o&&l&&(l=`${o}_${l}`),typeof l=="string"&&([l,d]=splitSN(l,d)),typeof m=="string"&&([m,d]=splitSN(m,d)),!l||["sine","square","triangle","sawtooth"].includes(l)){const{attack:q=.001,decay:K=.05,sustain:le=.6,release:ue=.01}=s.value;d=m||d||36,typeof d=="string"&&(d=toMidi(d)),!a&&typeof d=="number"&&(a=fromMidi(d));const se=getOscillator({t:n,s:l,freq:a,duration:r,release:ue});v.push(se),v.push(gainNode(.3));const W=getADSR(q,K,le,ue,1,n,n+r);v.push(W)}else{const{attack:q=.001,decay:K=.001,sustain:le=1,release:ue=.001}=s.value;if(C===0)return;if(!l){console.warn("no sample specified");return}const se=getSoundfontKey(l);let W;try{se?W=await globalThis.getFontBufferSource(se,m||d,i):W=await getSampleBufferSource(l,d,m,C)}catch(Ae){console.warn(Ae);return}if(i.currentTime>n){console.warn("sample still loading:",l,d);return}if(!W){console.warn("no buffer source");return}W.playbackRate.value=Math.abs(C)*W.playbackRate.value,U==="c"&&(W.playbackRate.value=W.playbackRate.value*W.buffer.duration);let z=se||A?r:W.buffer.duration/W.playbackRate.value;const ce=S*z*W.playbackRate.value;z=(L-S)*z,M&&(W.loop=!0,W.loopStart=ce,W.loopEnd=ce+z,z=M*z),n+=G,W.start(n,ce),k!==void 0&&((u=cutGroups[k])==null||u.stop(n),cutGroups[k]=W),v.push(W),W.stop(n+z+ue);const De=getADSR(q,K,le,ue,1,n,n+z);v.push(De)}if(v.push(gainNode(f)),E!==void 0&&v.push(getFilter("lowpass",E,D)),h!==void 0&&v.push(getFilter("highpass",h,y)),_!==void 0&&v.push(getFilter("bandpass",_,b)),$!==void 0&&v.push(i.createVowelFilter($)),P!==void 0&&v.push(getWorklet(i,"coarse-processor",{coarse:P})),B!==void 0&&v.push(getWorklet(i,"crush-processor",{crush:B})),g!==void 0&&v.push(getWorklet(i,"shape-processor",{shape:g})),x!==void 0){const q=i.createStereoPanner();q.pan.value=2*x-1,v.push(q)}const X=gainNode(1);v.push(X),X.connect(getDestination());let re;if(N>0&&O>0&&R>0){const q=getDelay(H,O,R,n);re=effectSend(X,q,N)}let Ee;if(Y>0&&ee>0){const q=getReverb(H,ee);Ee=effectSend(X,q,Y)}v.slice(1).reduce((q,K)=>q.connect(K),v[0]),v[0].onended=()=>v.concat([re,Ee]).forEach(q=>q==null?void 0:q.disconnect())}catch(i){console.warn(".out error:",i)}},webaudioOutputTrigger=(s,e,r,u)=>webaudioOutput(e,s-r,e.duration/u);Pattern$1.prototype.out=function(){return this.onTrigger(webaudioOutputTrigger)};var errors={ErrorMessages:{UNEXPECTED_TOKEN(s){return`Unexpected token ${JSON.stringify(s)}`},UNEXPECTED_ILLEGAL_TOKEN(s){return`Unexpected ${JSON.stringify(s)}`},UNEXPECTED_ESCAPED_KEYWORD:"Unexpected escaped keyword",UNEXPECTED_NUMBER:"Unexpected number",UNEXPECTED_STRING:"Unexpected string",UNEXPECTED_IDENTIFIER:"Unexpected identifier",UNEXPECTED_RESERVED_WORD:"Unexpected reserved word",UNEXPECTED_TEMPLATE:"Unexpected template",UNEXPECTED_EOS:"Unexpected end of input",UNEXPECTED_LINE_TERMINATOR:"Unexpected line terminator",UNEXPECTED_COMMA_AFTER_REST:"Unexpected comma after rest",UNEXPECTED_REST_PARAMETERS_INITIALIZATION:"Rest parameter may not have a default initializer",NEWLINE_AFTER_THROW:"Illegal newline after throw",UNTERMINATED_REGEXP:"Invalid regular expression: missing /",INVALID_LAST_REST_PARAMETER:"Rest parameter must be last formal parameter",INVALID_REST_PARAMETERS_INITIALIZATION:"Rest parameter may not have a default initializer",INVALID_REGEXP_FLAGS:"Invalid regular expression flags",INVALID_REGEX:"Invalid regular expression",INVALID_LHS_IN_ASSIGNMENT:"Invalid left-hand side in assignment",INVALID_LHS_IN_BINDING:"Invalid left-hand side in binding",INVALID_LHS_IN_FOR_IN:"Invalid left-hand side in for-in",INVALID_LHS_IN_FOR_OF:"Invalid left-hand side in for-of",INVALID_LHS_IN_FOR_AWAIT:"Invalid left-hand side in for-await",INVALID_UPDATE_OPERAND:"Increment/decrement target must be an identifier or member expression",INVALID_EXPONENTIATION_LHS:"Unary expressions as the left operand of an exponentation expression must be disambiguated with parentheses",MULTIPLE_DEFAULTS_IN_SWITCH:"More than one default clause in switch statement",NO_CATCH_OR_FINALLY:"Missing catch or finally after try",ILLEGAL_RETURN:"Illegal return statement",ILLEGAL_ARROW_FUNCTION_PARAMS:"Illegal arrow function parameter list",INVALID_ASYNC_PARAMS:"Async function parameters must not contain await expressions",INVALID_VAR_INIT_FOR_IN:"Invalid variable declaration in for-in statement",INVALID_VAR_INIT_FOR_OF:"Invalid variable declaration in for-of statement",INVALID_VAR_INIT_FOR_AWAIT:"Invalid variable declaration in for-await statement",UNINITIALIZED_BINDINGPATTERN_IN_FOR_INIT:"Binding pattern appears without initializer in for statement init",ILLEGAL_PROPERTY:"Illegal property initializer",INVALID_ID_BINDING_STRICT_MODE(s){return`The identifier ${JSON.stringify(s)} must not be in binding position in strict mode`},INVALID_ID_IN_LABEL_STRICT_MODE(s){return`The identifier ${JSON.stringify(s)} must not be in label position in strict mode`},INVALID_ID_IN_EXPRESSION_STRICT_MODE(s){return`The identifier ${JSON.stringify(s)} must not be in expression position in strict mode`},INVALID_CALL_TO_SUPER:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',INVALID_DELETE_STRICT_MODE:"Identifier expressions must not be deleted in strict mode",DUPLICATE_BINDING(s){return`Duplicate binding ${JSON.stringify(s)}`},ILLEGAL_ID_IN_LEXICAL_DECLARATION(s){return`Lexical declarations must not have a binding named ${JSON.stringify(s)}`},UNITIALIZED_CONST:"Constant lexical declarations must have an initialiser",ILLEGAL_LABEL_IN_BODY(s){return`The body of a ${s} statement must not be a labeled function declaration`},ILLEGEAL_LABEL_IN_IF:"The consequent of an if statement must not be a labeled function declaration",ILLEGAL_LABEL_IN_ELSE:"The alternate of an if statement must not be a labeled function declaration",ILLEGAL_CONTINUE_WITHOUT_ITERATION_WITH_ID(s){return`Continue statement must be nested within an iteration statement with label ${JSON.stringify(s)}`},ILLEGAL_CONTINUE_WITHOUT_ITERATION:"Continue statement must be nested within an iteration statement",ILLEGAL_BREAK_WITHOUT_ITERATION_OR_SWITCH:"Break statement must be nested within an iteration statement or a switch statement",ILLEGAL_WITH_STRICT_MODE:"Strict mode code must not include a with statement",ILLEGAL_ACCESS_SUPER_MEMBER:"Member access on super must be in a method",ILLEGAL_SUPER_CALL:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',DUPLICATE_LABEL_DECLARATION(s){return`Label ${JSON.stringify(s)} has already been declared`},ILLEGAL_BREAK_WITHIN_LABEL(s){return`Break statement must be nested within a statement with label ${JSON.stringify(s)}`},ILLEGAL_YIELD_EXPRESSIONS(s){return`${s} parameters must not contain yield expressions`},ILLEGAL_YIELD_IDENTIFIER:'"yield" may not be used as an identifier in this context',ILLEGAL_AWAIT_IDENTIFIER:'"await" may not be used as an identifier in this context',DUPLICATE_CONSTRUCTOR:"Duplicate constructor method in class",ILLEGAL_CONSTRUCTORS:"Constructors cannot be async, generators, getters or setters",ILLEGAL_STATIC_CLASS_NAME:'Static class methods cannot be named "prototype"',NEW_TARGET_ERROR:"new.target must be within function (but not arrow expression) code",DUPLICATE_EXPORT(s){return`Duplicate export ${JSON.stringify(s)}`},UNDECLARED_BINDING(s){return`Exported binding ${JSON.stringify(s)} is not declared`},DUPLICATE_PROPTO_PROP:"Duplicate __proto__ property in object literal not allowed",ILLEGAL_LABEL_FUNC_DECLARATION:"Labeled FunctionDeclarations are disallowed in strict mode",ILLEGAL_FUNC_DECL_IF:"FunctionDeclarations in IfStatements are disallowed in strict mode",ILLEGAL_USE_STRICT:'Functions with non-simple parameter lists may not contain a "use strict" directive',ILLEGAL_EXPORTED_NAME:"Names of variables used in an export specifier from the current module must be identifiers",NO_OCTALS_IN_TEMPLATES:"Template literals may not contain octal escape sequences",NO_AWAIT_IN_ASYNC_PARAMS:'Async arrow parameters may not contain "await"'}},mappings=new Map([["General_Category",new Map([["C","Other"],["Cc","Control"],["cntrl","Control"],["Cf","Format"],["Cn","Unassigned"],["Co","Private_Use"],["Cs","Surrogate"],["L","Letter"],["LC","Cased_Letter"],["Ll","Lowercase_Letter"],["Lm","Modifier_Letter"],["Lo","Other_Letter"],["Lt","Titlecase_Letter"],["Lu","Uppercase_Letter"],["M","Mark"],["Combining_Mark","Mark"],["Mc","Spacing_Mark"],["Me","Enclosing_Mark"],["Mn","Nonspacing_Mark"],["N","Number"],["Nd","Decimal_Number"],["digit","Decimal_Number"],["Nl","Letter_Number"],["No","Other_Number"],["P","Punctuation"],["punct","Punctuation"],["Pc","Connector_Punctuation"],["Pd","Dash_Punctuation"],["Pe","Close_Punctuation"],["Pf","Final_Punctuation"],["Pi","Initial_Punctuation"],["Po","Other_Punctuation"],["Ps","Open_Punctuation"],["S","Symbol"],["Sc","Currency_Symbol"],["Sk","Modifier_Symbol"],["Sm","Math_Symbol"],["So","Other_Symbol"],["Z","Separator"],["Zl","Line_Separator"],["Zp","Paragraph_Separator"],["Zs","Space_Separator"],["Other","Other"],["Control","Control"],["Format","Format"],["Unassigned","Unassigned"],["Private_Use","Private_Use"],["Surrogate","Surrogate"],["Letter","Letter"],["Cased_Letter","Cased_Letter"],["Lowercase_Letter","Lowercase_Letter"],["Modifier_Letter","Modifier_Letter"],["Other_Letter","Other_Letter"],["Titlecase_Letter","Titlecase_Letter"],["Uppercase_Letter","Uppercase_Letter"],["Mark","Mark"],["Spacing_Mark","Spacing_Mark"],["Enclosing_Mark","Enclosing_Mark"],["Nonspacing_Mark","Nonspacing_Mark"],["Number","Number"],["Decimal_Number","Decimal_Number"],["Letter_Number","Letter_Number"],["Other_Number","Other_Number"],["Punctuation","Punctuation"],["Connector_Punctuation","Connector_Punctuation"],["Dash_Punctuation","Dash_Punctuation"],["Close_Punctuation","Close_Punctuation"],["Final_Punctuation","Final_Punctuation"],["Initial_Punctuation","Initial_Punctuation"],["Other_Punctuation","Other_Punctuation"],["Open_Punctuation","Open_Punctuation"],["Symbol","Symbol"],["Currency_Symbol","Currency_Symbol"],["Modifier_Symbol","Modifier_Symbol"],["Math_Symbol","Math_Symbol"],["Other_Symbol","Other_Symbol"],["Separator","Separator"],["Line_Separator","Line_Separator"],["Paragraph_Separator","Paragraph_Separator"],["Space_Separator","Space_Separator"]])],["Script",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","Ahom"],["Arab","Arabic"],["Armi","Imperial_Aramaic"],["Armn","Armenian"],["Avst","Avestan"],["Bali","Balinese"],["Bamu","Bamum"],["Bass","Bassa_Vah"],["Batk","Batak"],["Beng","Bengali"],["Bhks","Bhaiksuki"],["Bopo","Bopomofo"],["Brah","Brahmi"],["Brai","Braille"],["Bugi","Buginese"],["Buhd","Buhid"],["Cakm","Chakma"],["Cans","Canadian_Aboriginal"],["Cari","Carian"],["Cham","Cham"],["Cher","Cherokee"],["Copt","Coptic"],["Qaac","Coptic"],["Cprt","Cypriot"],["Cyrl","Cyrillic"],["Deva","Devanagari"],["Dogr","Dogra"],["Dsrt","Deseret"],["Dupl","Duployan"],["Egyp","Egyptian_Hieroglyphs"],["Elba","Elbasan"],["Ethi","Ethiopic"],["Geor","Georgian"],["Glag","Glagolitic"],["Gong","Gunjala_Gondi"],["Gonm","Masaram_Gondi"],["Goth","Gothic"],["Gran","Grantha"],["Grek","Greek"],["Gujr","Gujarati"],["Guru","Gurmukhi"],["Hang","Hangul"],["Hani","Han"],["Hano","Hanunoo"],["Hatr","Hatran"],["Hebr","Hebrew"],["Hira","Hiragana"],["Hluw","Anatolian_Hieroglyphs"],["Hmng","Pahawh_Hmong"],["Hrkt","Katakana_Or_Hiragana"],["Hung","Old_Hungarian"],["Ital","Old_Italic"],["Java","Javanese"],["Kali","Kayah_Li"],["Kana","Katakana"],["Khar","Kharoshthi"],["Khmr","Khmer"],["Khoj","Khojki"],["Knda","Kannada"],["Kthi","Kaithi"],["Lana","Tai_Tham"],["Laoo","Lao"],["Latn","Latin"],["Lepc","Lepcha"],["Limb","Limbu"],["Lina","Linear_A"],["Linb","Linear_B"],["Lisu","Lisu"],["Lyci","Lycian"],["Lydi","Lydian"],["Mahj","Mahajani"],["Maka","Makasar"],["Mand","Mandaic"],["Mani","Manichaean"],["Marc","Marchen"],["Medf","Medefaidrin"],["Mend","Mende_Kikakui"],["Merc","Meroitic_Cursive"],["Mero","Meroitic_Hieroglyphs"],["Mlym","Malayalam"],["Modi","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["Palm","Palmyrene"],["Pauc","Pau_Cin_Hau"],["Perm","Old_Permic"],["Phag","Phags_Pa"],["Phli","Inscriptional_Pahlavi"],["Phlp","Psalter_Pahlavi"],["Phnx","Phoenician"],["Plrd","Miao"],["Prti","Inscriptional_Parthian"],["Rjng","Rejang"],["Rohg","Hanifi_Rohingya"],["Runr","Runic"],["Samr","Samaritan"],["Sarb","Old_South_Arabian"],["Saur","Saurashtra"],["Sgnw","SignWriting"],["Shaw","Shavian"],["Shrd","Sharada"],["Sidd","Siddham"],["Sind","Khudawadi"],["Sinh","Sinhala"],["Sogd","Sogdian"],["Sogo","Old_Sogdian"],["Sora","Sora_Sompeng"],["Soyo","Soyombo"],["Sund","Sundanese"],["Sylo","Syloti_Nagri"],["Syrc","Syriac"],["Tagb","Tagbanwa"],["Takr","Takri"],["Tale","Tai_Le"],["Talu","New_Tai_Lue"],["Taml","Tamil"],["Tang","Tangut"],["Tavt","Tai_Viet"],["Telu","Telugu"],["Tfng","Tifinagh"],["Tglg","Tagalog"],["Thaa","Thaana"],["Thai","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])],["Script_Extensions",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","Ahom"],["Arab","Arabic"],["Armi","Imperial_Aramaic"],["Armn","Armenian"],["Avst","Avestan"],["Bali","Balinese"],["Bamu","Bamum"],["Bass","Bassa_Vah"],["Batk","Batak"],["Beng","Bengali"],["Bhks","Bhaiksuki"],["Bopo","Bopomofo"],["Brah","Brahmi"],["Brai","Braille"],["Bugi","Buginese"],["Buhd","Buhid"],["Cakm","Chakma"],["Cans","Canadian_Aboriginal"],["Cari","Carian"],["Cham","Cham"],["Cher","Cherokee"],["Copt","Coptic"],["Qaac","Coptic"],["Cprt","Cypriot"],["Cyrl","Cyrillic"],["Deva","Devanagari"],["Dogr","Dogra"],["Dsrt","Deseret"],["Dupl","Duployan"],["Egyp","Egyptian_Hieroglyphs"],["Elba","Elbasan"],["Ethi","Ethiopic"],["Geor","Georgian"],["Glag","Glagolitic"],["Gong","Gunjala_Gondi"],["Gonm","Masaram_Gondi"],["Goth","Gothic"],["Gran","Grantha"],["Grek","Greek"],["Gujr","Gujarati"],["Guru","Gurmukhi"],["Hang","Hangul"],["Hani","Han"],["Hano","Hanunoo"],["Hatr","Hatran"],["Hebr","Hebrew"],["Hira","Hiragana"],["Hluw","Anatolian_Hieroglyphs"],["Hmng","Pahawh_Hmong"],["Hrkt","Katakana_Or_Hiragana"],["Hung","Old_Hungarian"],["Ital","Old_Italic"],["Java","Javanese"],["Kali","Kayah_Li"],["Kana","Katakana"],["Khar","Kharoshthi"],["Khmr","Khmer"],["Khoj","Khojki"],["Knda","Kannada"],["Kthi","Kaithi"],["Lana","Tai_Tham"],["Laoo","Lao"],["Latn","Latin"],["Lepc","Lepcha"],["Limb","Limbu"],["Lina","Linear_A"],["Linb","Linear_B"],["Lisu","Lisu"],["Lyci","Lycian"],["Lydi","Lydian"],["Mahj","Mahajani"],["Maka","Makasar"],["Mand","Mandaic"],["Mani","Manichaean"],["Marc","Marchen"],["Medf","Medefaidrin"],["Mend","Mende_Kikakui"],["Merc","Meroitic_Cursive"],["Mero","Meroitic_Hieroglyphs"],["Mlym","Malayalam"],["Modi","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["Palm","Palmyrene"],["Pauc","Pau_Cin_Hau"],["Perm","Old_Permic"],["Phag","Phags_Pa"],["Phli","Inscriptional_Pahlavi"],["Phlp","Psalter_Pahlavi"],["Phnx","Phoenician"],["Plrd","Miao"],["Prti","Inscriptional_Parthian"],["Rjng","Rejang"],["Rohg","Hanifi_Rohingya"],["Runr","Runic"],["Samr","Samaritan"],["Sarb","Old_South_Arabian"],["Saur","Saurashtra"],["Sgnw","SignWriting"],["Shaw","Shavian"],["Shrd","Sharada"],["Sidd","Siddham"],["Sind","Khudawadi"],["Sinh","Sinhala"],["Sogd","Sogdian"],["Sogo","Old_Sogdian"],["Sora","Sora_Sompeng"],["Soyo","Soyombo"],["Sund","Sundanese"],["Sylo","Syloti_Nagri"],["Syrc","Syriac"],["Tagb","Tagbanwa"],["Takr","Takri"],["Tale","Tai_Le"],["Talu","New_Tai_Lue"],["Taml","Tamil"],["Tang","Tangut"],["Tavt","Tai_Viet"],["Telu","Telugu"],["Tfng","Tifinagh"],["Tglg","Tagalog"],["Thaa","Thaana"],["Thai","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])]]);const propertyToValueAliases=mappings,matchPropertyValue$1=function(s,e){const r=propertyToValueAliases.get(s);if(!r)throw new Error(`Unknown property \`${s}\`.`);const u=r.get(e);if(u)return u;throw new Error(`Unknown value \`${e}\` for property \`${s}\`.`)};var unicodeMatchPropertyValueEcmascript=matchPropertyValue$1,unicodeCanonicalPropertyNamesEcmascript=new Set(["General_Category","Script","Script_Extensions","Alphabetic","Any","ASCII","ASCII_Hex_Digit","Assigned","Bidi_Control","Bidi_Mirrored","Case_Ignorable","Cased","Changes_When_Casefolded","Changes_When_Casemapped","Changes_When_Lowercased","Changes_When_NFKC_Casefolded","Changes_When_Titlecased","Changes_When_Uppercased","Dash","Default_Ignorable_Code_Point","Deprecated","Diacritic","Emoji","Emoji_Component","Emoji_Modifier","Emoji_Modifier_Base","Emoji_Presentation","Extended_Pictographic","Extender","Grapheme_Base","Grapheme_Extend","Hex_Digit","ID_Continue","ID_Start","Ideographic","IDS_Binary_Operator","IDS_Trinary_Operator","Join_Control","Logical_Order_Exception","Lowercase","Math","Noncharacter_Code_Point","Pattern_Syntax","Pattern_White_Space","Quotation_Mark","Radical","Regional_Indicator","Sentence_Terminal","Soft_Dotted","Terminal_Punctuation","Unified_Ideograph","Uppercase","Variation_Selector","White_Space","XID_Continue","XID_Start"]),unicodePropertyAliasesEcmascript=new Map([["scx","Script_Extensions"],["sc","Script"],["gc","General_Category"],["AHex","ASCII_Hex_Digit"],["Alpha","Alphabetic"],["Bidi_C","Bidi_Control"],["Bidi_M","Bidi_Mirrored"],["Cased","Cased"],["CI","Case_Ignorable"],["CWCF","Changes_When_Casefolded"],["CWCM","Changes_When_Casemapped"],["CWKCF","Changes_When_NFKC_Casefolded"],["CWL","Changes_When_Lowercased"],["CWT","Changes_When_Titlecased"],["CWU","Changes_When_Uppercased"],["Dash","Dash"],["Dep","Deprecated"],["DI","Default_Ignorable_Code_Point"],["Dia","Diacritic"],["Ext","Extender"],["Gr_Base","Grapheme_Base"],["Gr_Ext","Grapheme_Extend"],["Hex","Hex_Digit"],["IDC","ID_Continue"],["Ideo","Ideographic"],["IDS","ID_Start"],["IDSB","IDS_Binary_Operator"],["IDST","IDS_Trinary_Operator"],["Join_C","Join_Control"],["LOE","Logical_Order_Exception"],["Lower","Lowercase"],["Math","Math"],["NChar","Noncharacter_Code_Point"],["Pat_Syn","Pattern_Syntax"],["Pat_WS","Pattern_White_Space"],["QMark","Quotation_Mark"],["Radical","Radical"],["RI","Regional_Indicator"],["SD","Soft_Dotted"],["STerm","Sentence_Terminal"],["Term","Terminal_Punctuation"],["UIdeo","Unified_Ideograph"],["Upper","Uppercase"],["VS","Variation_Selector"],["WSpace","White_Space"],["space","White_Space"],["XIDC","XID_Continue"],["XIDS","XID_Start"]]);const canonicalProperties=unicodeCanonicalPropertyNamesEcmascript,propertyAliases$1=unicodePropertyAliasesEcmascript,matchProperty$1=function(s){if(canonicalProperties.has(s))return s;if(propertyAliases$1.has(s))return propertyAliases$1.get(s);throw new Error(`Unknown property: ${s}`)};var unicodeMatchPropertyEcmascript=matchProperty$1,unicode$2={};unicode$2.whitespaceArray=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];unicode$2.whitespaceBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!0,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1];unicode$2.idStartLargeRegex=/^[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]$/;unicode$2.idStartBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];unicode$2.idContinueLargeRegex=/^[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]$/;unicode$2.idContinueBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];const matchPropertyValue=unicodeMatchPropertyValueEcmascript,matchPropertyValueMappings=mappings,matchProperty=unicodeMatchPropertyEcmascript,propertyAliases=unicodePropertyAliasesEcmascript,{idContinueBool:idContinueBool$3,idContinueLargeRegex:idContinueLargeRegex$3,idStartBool:idStartBool$2,idStartLargeRegex:idStartLargeRegex$2}=unicode$2,catchIsFalse=s=>{try{return!!s()}catch{return!1}},syntaxCharacters="^$\\.*+?()[]{}|".split(""),extendedSyntaxCharacters="^$\\.*+?()[|".split(""),controlEscapeCharacters="fnrtv".split(""),controlEscapeCharacterValues={f:"\f".charCodeAt(0),n:` -`.charCodeAt(0),r:"\r".charCodeAt(0),t:" ".charCodeAt(0),v:"\v".charCodeAt(0)},controlCharacters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),hexDigits="0123456789abcdefABCDEF".split(""),decimalDigits="0123456789".split(""),octalDigits="01234567".split(""),INVALID_NAMED_BACKREFERENCE_SENTINEL={};function isIdentifierStart$1(s){return s<128?idStartBool$2[s]:idStartLargeRegex$2.test(String.fromCodePoint(s))}function isIdentifierPart$1(s){return s<128?idContinueBool$3[s]:idContinueLargeRegex$3.test(String.fromCodePoint(s))}class PatternAcceptorState{constructor(e,r){this.pattern=e,this.unicode=r,this.index=0,this.largestBackreference=0,this.backreferenceNames=[],this.groupingNames=[],this.capturingGroups=0}empty(){return this.index>=this.pattern.length}backreference(e){e>this.largestBackreference&&(this.largestBackreference=e)}nextCodePoint(){return this.empty()?null:this.unicode?String.fromCodePoint(this.pattern.codePointAt(this.index)):this.pattern.charAt(this.index)}skipCodePoint(){this.index+=this.nextCodePoint().length}eat(e){return this.index+e.length>this.pattern.length||this.pattern.slice(this.index,this.index+e.length)!==e?!1:(this.index+=e.length,!0)}eatIdentifierCodePoint(){let e,r=this.index,u;if(this.match("\\u")){if(this.skipCodePoint(),e=acceptUnicodeEscape(this),!e.matched)return this.index=r,null;e=e.value,u=String.fromCodePoint(e)}else{if(u=this.nextCodePoint(),u==null)return this.index=r,null;this.index+=u.length,e=u.codePointAt(0)}return{character:u,characterValue:e}}eatIdentifierStart(){let e=this.index,r=this.eatIdentifierCodePoint();return r===null?(this.index=e,null):r.character==="_"||r.character==="$"||isIdentifierStart$1(r.characterValue)?r.character:(this.index=e,null)}eatIdentifierPart(){let e=this.index,r=this.eatIdentifierCodePoint();return r===null?(this.index=e,null):r.character==="\u200C"||r.character==="\u200D"||r.character==="$"||isIdentifierPart$1(r.characterValue)?r.character:(this.index=e,null)}eatAny(...e){for(let r of e)if(this.eat(r))return r;return null}match(e){return this.index+e.length<=this.pattern.length&&this.pattern.slice(this.index,this.index+e.length)===e}matchAny(...e){for(let r of e)if(this.match(r))return!0;return!1}eatNaturalNumber(){let e=[],r=()=>{for(let u of decimalDigits)if(this.eat(u))return e.push(u),!0;return!1};for(;r(););return e.length===0?null:e.join("")}}var src$3=(s,{unicode:e=!1}={})=>{let r=new PatternAcceptorState(s,e),u=acceptDisjunction(r);if(u.matched){if(r.unicode&&r.largestBackreference>r.capturingGroups)return!1;if(r.groupingNames.length>0||r.unicode){for(let i of r.backreferenceNames)if(r.groupingNames.indexOf(i)===-1)return!1}}return u.matched};const backtrackOnFailure=s=>e=>{let r=e.index,u=e.largestBackreference,i=e.capturingGroups,n=s(e);return n.matched||(e.index=r,e.largestBackreference=u,e.capturingGroups=i),n},acceptUnicodeEscape=backtrackOnFailure(s=>{if(!s.eat("u"))return{matched:!1};if(s.unicode&&s.eat("{")){let u=[];for(;!s.eat("}");){let n=s.eatAny(...hexDigits);if(n===null)return{matched:!1};u.push(n)}let i=parseInt(u.join(""),16);return i>1114111?{matched:!1}:{matched:!0,value:i}}let e=[0,0,0,0].map(()=>s.eatAny(...hexDigits));if(e.some(u=>u===null))return{matched:!1};let r=parseInt(e.join(""),16);if(s.unicode&&r>=55296&&r<=56319){let u=backtrackOnFailure(i=>{if(!i.eat("\\u"))return{matched:!1};let n=[0,0,0,0].map(()=>i.eatAny(...hexDigits));if(n.some(l=>l===null))return{matched:!1};let a=parseInt(n.join(""),16);return a<56320||a>=57344?{matched:!1}:{matched:!0,value:65536+((r&1023)<<10)+(a&1023)}})(s);if(u.matched)return u}return{matched:!0,value:r}}),acceptDisjunction=(s,e)=>{do{if(e!==void 0&&s.eat(e))return{matched:!0};if(s.match("|"))continue;if(!acceptAlternative(s,e).matched)return{matched:!1}}while(s.eat("|"));return{matched:e===void 0||!!s.eat(e)}},acceptAlternative=(s,e)=>{for(;!s.match("|")&&!s.empty()&&(e===void 0||!s.match(e));)if(!acceptTerm(s).matched)return{matched:!1};return{matched:!0}},anyOf=(...s)=>e=>{for(let r of s){let u=r(e);if(u.matched)return u}return{matched:!1}},acceptTerm=s=>s.unicode?anyOf(acceptAssertion,acceptQuantified(acceptAtom))(s):anyOf(acceptQuantified(acceptQuantifiableAssertion),acceptAssertion,acceptQuantified(acceptAtom))(s),acceptLabeledGroup=s=>backtrackOnFailure(e=>e.eat("(")?s(e)?acceptDisjunction(e,")"):{matched:!1}:{matched:!1}),acceptQuantifiableAssertion=acceptLabeledGroup(s=>!!s.eatAny("?=","?!")),acceptAssertion=s=>s.eatAny("^","$","\\b","\\B")?{matched:!0}:acceptLabeledGroup(e=>e.unicode?!!e.eatAny("?=","?!","?<=","?({matched:s.eatNaturalNumber()!==null}),acceptQuantified=s=>backtrackOnFailure(e=>{if(!s(e).matched)return{matched:!1};if(e.match("{")){let r=backtrackOnFailure(u=>{u.eat("{");let i=u.eatNaturalNumber();if(i===null)return{matched:!1};if(u.eat(",")&&u.matchAny(...decimalDigits)){let n=u.eatNaturalNumber();if(n===null||parseInt(i)>parseInt(n))return{matched:!1}}return u.eat("}")?(u.eat("?"),{matched:!0}):{matched:!1}})(e);return r.matched?r:{matched:!e.unicode}}else e.eatAny("*","+","?")&&e.eat("?");return{matched:!0}}),acceptCharacterExcept=s=>e=>{let r=e.nextCodePoint();return r===null||s.indexOf(r)!==-1?{matched:!1}:(e.skipCodePoint(),{matched:!0})},acceptPatternCharacter=acceptCharacterExcept(syntaxCharacters),acceptExtendedPatternCharacter=acceptCharacterExcept(extendedSyntaxCharacters),acceptInvalidBracedQuantifier=s=>backtrackOnFailure(e=>({matched:!!(e.eat("{")&&acceptDecimal(e).matched&&(!e.eat(",")||e.match("}")||acceptDecimal(e).matched)&&e.eat("}"))}))(s),acceptAtom=s=>{if(s.unicode)return anyOf(acceptPatternCharacter,r=>({matched:!!r.eat(".")}),backtrackOnFailure(r=>r.eat("\\")?acceptAtomEscape(r):{matched:!1}),acceptCharacterClass,acceptLabeledGroup(r=>r.eat("?:")),acceptGrouping)(s);let e=anyOf(r=>({matched:!!r.eat(".")}),backtrackOnFailure(r=>r.eat("\\")?acceptAtomEscape(r):{matched:!1}),backtrackOnFailure(r=>({matched:r.eat("\\")&&r.match("c")})),acceptCharacterClass,acceptLabeledGroup(r=>r.eat("?:")),acceptGrouping)(s);return!e.matched&&acceptInvalidBracedQuantifier(s).matched?{matched:!1}:e.matched?e:acceptExtendedPatternCharacter(s)},acceptGrouping=backtrackOnFailure(s=>{if(!s.eat("("))return{matched:!1};let e=backtrackOnFailure(r=>s.eat("?")?acceptGroupName(r):{matched:!1})(s);if(!acceptDisjunction(s,")").matched)return{matched:!1};if(e.matched){if(s.groupingNames.indexOf(e.data)!==-1)return{matched:!1};s.groupingNames.push(e.data)}return s.capturingGroups++,{matched:!0}}),acceptDecimalEscape=backtrackOnFailure(s=>{let e=s.eatAny(...decimalDigits);return e===null?{matched:!1}:e==="0"?{matched:!0}:(s.backreference(parseInt(e+(s.eatNaturalNumber()||""))),{matched:!0})}),acceptCharacterClassEscape=s=>s.eatAny("d","D","s","S","w","W")?{matched:!0}:s.unicode?backtrackOnFailure(e=>!e.eat("p{")&&!e.eat("P{")?{matched:!1}:acceptUnicodePropertyValueExpression(e).matched?{matched:!!e.eat("}")}:{matched:!1})(s):{matched:!1},acceptUnicodePropertyName=s=>{let e=[],r;for(;r=s.eatAny(...controlCharacters,"_");)e.push(r);return{matched:e.length>0,data:e.join("")}},acceptUnicodePropertyValue=s=>{let e=[],r;for(;r=s.eatAny(...controlCharacters,...decimalDigits,"_");)e.push(r);return{matched:e.length>0,data:e.join("")}},illegalLoneUnicodePropertyNames=["General_Category","Script","Script_Extensions","scx","sc","gc"],generalCategoryValues=matchPropertyValueMappings.get("General_Category"),acceptLoneUnicodePropertyNameOrValue=s=>{let e=acceptUnicodePropertyValue(s);return!e.matched||illegalLoneUnicodePropertyNames.includes(e.data)?{matched:!1}:{matched:catchIsFalse(()=>matchProperty(e.data))||generalCategoryValues.get(e.data)!=null}},acceptUnicodePropertyValueExpression=s=>anyOf(backtrackOnFailure(e=>{let r=acceptUnicodePropertyName(e);if(!r.matched||!e.eat("="))return{matched:!1};let u=acceptUnicodePropertyValue(e);return u.matched?{matched:catchIsFalse(()=>matchPropertyValue(propertyAliases.get(r.data)||r.data,u.data))}:{matched:!1}}),backtrackOnFailure(acceptLoneUnicodePropertyNameOrValue))(s),acceptCharacterEscape=anyOf(s=>{let e=s.eatAny(...controlEscapeCharacters);return e===null?{matched:!1}:{matched:!0,value:controlEscapeCharacterValues[e]}},backtrackOnFailure(s=>{if(!s.eat("c"))return{matched:!1};let e=s.eatAny(...controlCharacters);return e===null?{matched:!1}:{matched:!0,value:e.charCodeAt(0)%32}}),backtrackOnFailure(s=>!s.eat("0")||s.eatAny(...decimalDigits)?{matched:!1}:{matched:!0,value:0}),backtrackOnFailure(s=>{if(!s.eat("x"))return{matched:!1};let e=[0,0].map(()=>s.eatAny(...hexDigits));return e.some(r=>r===null)?{matched:!1}:{matched:!0,value:parseInt(e.join(""),16)}}),acceptUnicodeEscape,backtrackOnFailure(s=>{if(s.unicode)return{matched:!1};let e=s.eatAny(...octalDigits);if(e===null)return{matched:!1};let r=parseInt(e,8);if(octalDigits.indexOf(s.nextCodePoint())===-1)return{matched:!0,value:r};let u=s.eatAny(...octalDigits),i=parseInt(u,8);if(r<4){if(octalDigits.indexOf(s.nextCodePoint())===-1)return{matched:!0,value:r<<3|i};let n=s.eatAny(...octalDigits),a=parseInt(n,8);return{matched:!0,value:r<<6|i<<3|a}}return{matched:!0,value:r<<3|i}}),backtrackOnFailure(s=>{if(!s.unicode)return{matched:!1};let e=s.eatAny(...syntaxCharacters);return e===null?{matched:!1}:{matched:!0,value:e.charCodeAt(0)}}),s=>!s.unicode||!s.eat("/")?{matched:!1}:{matched:!0,value:"/".charCodeAt(0)},backtrackOnFailure(s=>{if(s.unicode)return{matched:!1};let e=s.nextCodePoint();return e!==null&&e!=="c"&&e!=="k"?(s.skipCodePoint(),{matched:!0,value:e.codePointAt(0)}):{matched:!1}})),acceptGroupNameBackreference=backtrackOnFailure(s=>{if(!s.eat("k"))return{matched:!1};let e=acceptGroupName(s);return e.matched?(s.backreferenceNames.push(e.data),{matched:!0}):(s.backreferenceNames.push(INVALID_NAMED_BACKREFERENCE_SENTINEL),{matched:!0})}),acceptGroupName=backtrackOnFailure(s=>{if(!s.eat("<"))return{matched:!1};let e=[],r=s.eatIdentifierStart();if(!r)return{matched:!1};e.push(r);let u;for(;u=s.eatIdentifierPart();)e.push(u);return s.eat(">")?{matched:e.length>0,data:e.join("")}:{matched:!1}}),acceptAtomEscape=anyOf(acceptDecimalEscape,acceptCharacterClassEscape,acceptCharacterEscape,acceptGroupNameBackreference),acceptCharacterClass=backtrackOnFailure(s=>{if(!s.eat("["))return{matched:!1};s.eat("^");const e=anyOf(o=>({matched:!!o.eat("b"),value:8}),o=>({matched:o.unicode&&!!o.eat("-"),value:"-".charCodeAt(0)}),backtrackOnFailure(o=>{if(o.unicode||!o.eat("c"))return{matched:!1};let c=o.eatAny(...decimalDigits,"_");return c===null?{matched:!1}:{matched:!0,value:c.charCodeAt(0)%32}}),acceptCharacterClassEscape,acceptCharacterEscape,o=>({matched:!o.unicode&&!!o.eat("k"),value:107})),r=o=>{let c=o.nextCodePoint();if(c==="]"||c==="-"||c===null)return{matched:!1};if(c!=="\\")return o.skipCodePoint(),{matched:!0,value:c.codePointAt(0)};o.eat("\\");let A=e(o);return!A.matched&&o.nextCodePoint()==="c"&&!o.unicode?{matched:!0,value:"\\".charCodeAt(0)}:A},u=o=>o.eat("-")?{matched:!0,value:"-".charCodeAt(0)}:r(o),i=(o,c)=>{const A=d=>d.value===void 0&&d.matched;if(o.eat("-")){if(o.match("]"))return{matched:!0};let d=u(o);return d.matched?o.unicode&&(A(c)||A(d))?{matched:!1}:!(!o.unicode&&(A(c)||A(d)))&&c.value>d.value?{matched:!1}:o.match("]")?{matched:!0}:n(o):{matched:!1}}return o.match("]")?{matched:!0}:a(o)},n=o=>{let c=u(o);return c.matched?i(o,c):{matched:!1}},a=o=>{let c=r(o);return c.matched?i(o,c):{matched:!1}};if(s.eat("]"))return{matched:!0};let l=n(s);return l.matched&&s.eat("]"),l});var utils$1={},unicode$1={};unicode$1.whitespaceArray=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];unicode$1.whitespaceBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!0,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1];unicode$1.idStartLargeRegex=/^[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]$/;unicode$1.idStartBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];unicode$1.idContinueLargeRegex=/^[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]$/;unicode$1.idContinueBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];const{whitespaceArray:whitespaceArray$1,whitespaceBool:whitespaceBool$1,idStartLargeRegex:idStartLargeRegex$1,idStartBool:idStartBool$1,idContinueLargeRegex:idContinueLargeRegex$2,idContinueBool:idContinueBool$2}=unicode$1,strictReservedWords=["null","true","false","implements","interface","package","private","protected","public","static","let","if","in","do","var","for","new","try","this","else","case","void","with","enum","while","break","catch","throw","const","yield","class","super","return","typeof","delete","switch","export","import","default","finally","extends","function","continue","debugger","instanceof"];utils$1.isStrictModeReservedWord=s=>strictReservedWords.indexOf(s)!==-1;utils$1.isWhiteSpace=s=>s<128?whitespaceBool$1[s]:s===160||s>5759&&whitespaceArray$1.indexOf(s)!==-1;utils$1.isLineTerminator=s=>s===10||s===13||s===8232||s===8233;utils$1.isIdentifierStart=s=>s<128?idStartBool$1[s]:idStartLargeRegex$1.test(String.fromCodePoint(s));utils$1.isIdentifierPart=s=>s<128?idContinueBool$2[s]:idContinueLargeRegex$2.test(String.fromCodePoint(s));utils$1.isDecimalDigit=s=>s>=48&&s<=57;utils$1.getHexValue=s=>s>="0"&&s<="9"?s.charCodeAt(0)-48:s>="a"&&s<="f"?s.charCodeAt(0)-87:s>="A"&&s<="F"?s.charCodeAt(0)-55:-1;const{getHexValue,isLineTerminator:isLineTerminator$1,isWhiteSpace,isIdentifierStart,isIdentifierPart,isDecimalDigit}=utils$1,{ErrorMessages:ErrorMessages$2}=errors,TokenClass$2={Eof:{name:""},Ident:{name:"Identifier",isIdentifierName:!0},Keyword:{name:"Keyword",isIdentifierName:!0},NumericLiteral:{name:"Numeric"},TemplateElement:{name:"Template"},Punctuator:{name:"Punctuator"},StringLiteral:{name:"String"},RegularExpression:{name:"RegularExpression"},Illegal:{name:"Illegal"}},TokenType$2={EOS:{klass:TokenClass$2.Eof,name:"EOS"},LPAREN:{klass:TokenClass$2.Punctuator,name:"("},RPAREN:{klass:TokenClass$2.Punctuator,name:")"},LBRACK:{klass:TokenClass$2.Punctuator,name:"["},RBRACK:{klass:TokenClass$2.Punctuator,name:"]"},LBRACE:{klass:TokenClass$2.Punctuator,name:"{"},RBRACE:{klass:TokenClass$2.Punctuator,name:"}"},COLON:{klass:TokenClass$2.Punctuator,name:":"},SEMICOLON:{klass:TokenClass$2.Punctuator,name:";"},PERIOD:{klass:TokenClass$2.Punctuator,name:"."},ELLIPSIS:{klass:TokenClass$2.Punctuator,name:"..."},ARROW:{klass:TokenClass$2.Punctuator,name:"=>"},CONDITIONAL:{klass:TokenClass$2.Punctuator,name:"?"},INC:{klass:TokenClass$2.Punctuator,name:"++"},DEC:{klass:TokenClass$2.Punctuator,name:"--"},ASSIGN:{klass:TokenClass$2.Punctuator,name:"="},ASSIGN_BIT_OR:{klass:TokenClass$2.Punctuator,name:"|="},ASSIGN_BIT_XOR:{klass:TokenClass$2.Punctuator,name:"^="},ASSIGN_BIT_AND:{klass:TokenClass$2.Punctuator,name:"&="},ASSIGN_SHL:{klass:TokenClass$2.Punctuator,name:"<<="},ASSIGN_SHR:{klass:TokenClass$2.Punctuator,name:">>="},ASSIGN_SHR_UNSIGNED:{klass:TokenClass$2.Punctuator,name:">>>="},ASSIGN_ADD:{klass:TokenClass$2.Punctuator,name:"+="},ASSIGN_SUB:{klass:TokenClass$2.Punctuator,name:"-="},ASSIGN_MUL:{klass:TokenClass$2.Punctuator,name:"*="},ASSIGN_DIV:{klass:TokenClass$2.Punctuator,name:"/="},ASSIGN_MOD:{klass:TokenClass$2.Punctuator,name:"%="},ASSIGN_EXP:{klass:TokenClass$2.Punctuator,name:"**="},COMMA:{klass:TokenClass$2.Punctuator,name:","},OR:{klass:TokenClass$2.Punctuator,name:"||"},AND:{klass:TokenClass$2.Punctuator,name:"&&"},BIT_OR:{klass:TokenClass$2.Punctuator,name:"|"},BIT_XOR:{klass:TokenClass$2.Punctuator,name:"^"},BIT_AND:{klass:TokenClass$2.Punctuator,name:"&"},SHL:{klass:TokenClass$2.Punctuator,name:"<<"},SHR:{klass:TokenClass$2.Punctuator,name:">>"},SHR_UNSIGNED:{klass:TokenClass$2.Punctuator,name:">>>"},ADD:{klass:TokenClass$2.Punctuator,name:"+"},SUB:{klass:TokenClass$2.Punctuator,name:"-"},MUL:{klass:TokenClass$2.Punctuator,name:"*"},DIV:{klass:TokenClass$2.Punctuator,name:"/"},MOD:{klass:TokenClass$2.Punctuator,name:"%"},EXP:{klass:TokenClass$2.Punctuator,name:"**"},EQ:{klass:TokenClass$2.Punctuator,name:"=="},NE:{klass:TokenClass$2.Punctuator,name:"!="},EQ_STRICT:{klass:TokenClass$2.Punctuator,name:"==="},NE_STRICT:{klass:TokenClass$2.Punctuator,name:"!=="},LT:{klass:TokenClass$2.Punctuator,name:"<"},GT:{klass:TokenClass$2.Punctuator,name:">"},LTE:{klass:TokenClass$2.Punctuator,name:"<="},GTE:{klass:TokenClass$2.Punctuator,name:">="},INSTANCEOF:{klass:TokenClass$2.Keyword,name:"instanceof"},IN:{klass:TokenClass$2.Keyword,name:"in"},NOT:{klass:TokenClass$2.Punctuator,name:"!"},BIT_NOT:{klass:TokenClass$2.Punctuator,name:"~"},ASYNC:{klass:TokenClass$2.Keyword,name:"async"},AWAIT:{klass:TokenClass$2.Keyword,name:"await"},ENUM:{klass:TokenClass$2.Keyword,name:"enum"},DELETE:{klass:TokenClass$2.Keyword,name:"delete"},TYPEOF:{klass:TokenClass$2.Keyword,name:"typeof"},VOID:{klass:TokenClass$2.Keyword,name:"void"},BREAK:{klass:TokenClass$2.Keyword,name:"break"},CASE:{klass:TokenClass$2.Keyword,name:"case"},CATCH:{klass:TokenClass$2.Keyword,name:"catch"},CLASS:{klass:TokenClass$2.Keyword,name:"class"},CONTINUE:{klass:TokenClass$2.Keyword,name:"continue"},DEBUGGER:{klass:TokenClass$2.Keyword,name:"debugger"},DEFAULT:{klass:TokenClass$2.Keyword,name:"default"},DO:{klass:TokenClass$2.Keyword,name:"do"},ELSE:{klass:TokenClass$2.Keyword,name:"else"},EXPORT:{klass:TokenClass$2.Keyword,name:"export"},EXTENDS:{klass:TokenClass$2.Keyword,name:"extends"},FINALLY:{klass:TokenClass$2.Keyword,name:"finally"},FOR:{klass:TokenClass$2.Keyword,name:"for"},FUNCTION:{klass:TokenClass$2.Keyword,name:"function"},IF:{klass:TokenClass$2.Keyword,name:"if"},IMPORT:{klass:TokenClass$2.Keyword,name:"import"},LET:{klass:TokenClass$2.Keyword,name:"let"},NEW:{klass:TokenClass$2.Keyword,name:"new"},RETURN:{klass:TokenClass$2.Keyword,name:"return"},SUPER:{klass:TokenClass$2.Keyword,name:"super"},SWITCH:{klass:TokenClass$2.Keyword,name:"switch"},THIS:{klass:TokenClass$2.Keyword,name:"this"},THROW:{klass:TokenClass$2.Keyword,name:"throw"},TRY:{klass:TokenClass$2.Keyword,name:"try"},VAR:{klass:TokenClass$2.Keyword,name:"var"},WHILE:{klass:TokenClass$2.Keyword,name:"while"},WITH:{klass:TokenClass$2.Keyword,name:"with"},NULL:{klass:TokenClass$2.Keyword,name:"null"},TRUE:{klass:TokenClass$2.Keyword,name:"true"},FALSE:{klass:TokenClass$2.Keyword,name:"false"},YIELD:{klass:TokenClass$2.Keyword,name:"yield"},NUMBER:{klass:TokenClass$2.NumericLiteral,name:""},STRING:{klass:TokenClass$2.StringLiteral,name:""},REGEXP:{klass:TokenClass$2.RegularExpression,name:""},IDENTIFIER:{klass:TokenClass$2.Ident,name:""},CONST:{klass:TokenClass$2.Keyword,name:"const"},TEMPLATE:{klass:TokenClass$2.TemplateElement,name:""},ESCAPED_KEYWORD:{klass:TokenClass$2.Keyword,name:""},ILLEGAL:{klass:TokenClass$2.Illegal,name:""}},TT=TokenType$2,I=TT.ILLEGAL,F=!1,T=!0,ONE_CHAR_PUNCTUATOR=[I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,TT.NOT,I,I,I,TT.MOD,TT.BIT_AND,I,TT.LPAREN,TT.RPAREN,TT.MUL,TT.ADD,TT.COMMA,TT.SUB,TT.PERIOD,TT.DIV,I,I,I,I,I,I,I,I,I,I,TT.COLON,TT.SEMICOLON,TT.LT,TT.ASSIGN,TT.GT,TT.CONDITIONAL,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,TT.LBRACK,I,TT.RBRACK,TT.BIT_XOR,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,TT.LBRACE,TT.BIT_OR,TT.RBRACE,TT.BIT_NOT],PUNCTUATOR_START=[F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,F,F,F,T,T,F,T,T,T,T,T,T,F,T,F,F,F,F,F,F,F,F,F,F,T,T,T,T,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,F,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,T,T,T,F];class JsError$1 extends Error{constructor(e,r,u,i){super(i),this.index=e;try{this.line=r,this.column=u}catch{}this.parseErrorLine=r,this.parseErrorColumn=u,this.description=i,this.message=`[${r}:${u}]: ${i}`}}function fromCodePoint(s){if(s<=65535)return String.fromCharCode(s);let e=String.fromCharCode(Math.floor((s-65536)/1024)+55296),r=String.fromCharCode((s-65536)%1024+56320);return e+r}function decodeUtf16(s,e){return(s-55296)*1024+(e-56320)+65536}class Tokenizer$2{constructor(e){this.source=e,this.index=0,this.line=0,this.lineStart=0,this.startIndex=0,this.startLine=0,this.startLineStart=0,this.lastIndex=0,this.lastLine=0,this.lastLineStart=0,this.hasLineTerminatorBeforeNext=!1,this.tokenIndex=0}saveLexerState(){return{source:this.source,index:this.index,line:this.line,lineStart:this.lineStart,startIndex:this.startIndex,startLine:this.startLine,startLineStart:this.startLineStart,lastIndex:this.lastIndex,lastLine:this.lastLine,lastLineStart:this.lastLineStart,lookahead:this.lookahead,hasLineTerminatorBeforeNext:this.hasLineTerminatorBeforeNext,tokenIndex:this.tokenIndex}}restoreLexerState(e){this.source=e.source,this.index=e.index,this.line=e.line,this.lineStart=e.lineStart,this.startIndex=e.startIndex,this.startLine=e.startLine,this.startLineStart=e.startLineStart,this.lastIndex=e.lastIndex,this.lastLine=e.lastLine,this.lastLineStart=e.lastLineStart,this.lookahead=e.lookahead,this.hasLineTerminatorBeforeNext=e.hasLineTerminatorBeforeNext,this.tokenIndex=e.tokenIndex}createILLEGAL(){return this.startIndex=this.index,this.startLine=this.line,this.startLineStart=this.lineStart,this.indexJSON.stringify(arguments[+n+2]));return e.slice&&e.slice.startLocation&&(e=e.slice.startLocation),new JsError$1(e.offset,e.line,e.column+1,u)}static cse2(e,r,u){return e.charAt(1)===r&&e.charAt(2)===u}static cse3(e,r,u,i){return e.charAt(1)===r&&e.charAt(2)===u&&e.charAt(3)===i}static cse4(e,r,u,i,n){return e.charAt(1)===r&&e.charAt(2)===u&&e.charAt(3)===i&&e.charAt(4)===n}static cse5(e,r,u,i,n,a){return e.charAt(1)===r&&e.charAt(2)===u&&e.charAt(3)===i&&e.charAt(4)===n&&e.charAt(5)===a}static cse6(e,r,u,i,n,a,l){return e.charAt(1)===r&&e.charAt(2)===u&&e.charAt(3)===i&&e.charAt(4)===n&&e.charAt(5)===a&&e.charAt(6)===l}static cse7(e,r,u,i,n,a,l,o){return e.charAt(1)===r&&e.charAt(2)===u&&e.charAt(3)===i&&e.charAt(4)===n&&e.charAt(5)===a&&e.charAt(6)===l&&e.charAt(7)===o}getKeyword(e){if(e.length===1||e.length>10)return TokenType$2.IDENTIFIER;switch(e.length){case 2:switch(e.charAt(0)){case"i":switch(e.charAt(1)){case"f":return TokenType$2.IF;case"n":return TokenType$2.IN}break;case"d":if(e.charAt(1)==="o")return TokenType$2.DO;break}break;case 3:switch(e.charAt(0)){case"v":if(Tokenizer$2.cse2(e,"a","r"))return TokenType$2.VAR;break;case"f":if(Tokenizer$2.cse2(e,"o","r"))return TokenType$2.FOR;break;case"n":if(Tokenizer$2.cse2(e,"e","w"))return TokenType$2.NEW;break;case"t":if(Tokenizer$2.cse2(e,"r","y"))return TokenType$2.TRY;break;case"l":if(Tokenizer$2.cse2(e,"e","t"))return TokenType$2.LET;break}break;case 4:switch(e.charAt(0)){case"t":if(Tokenizer$2.cse3(e,"h","i","s"))return TokenType$2.THIS;if(Tokenizer$2.cse3(e,"r","u","e"))return TokenType$2.TRUE;break;case"n":if(Tokenizer$2.cse3(e,"u","l","l"))return TokenType$2.NULL;break;case"e":if(Tokenizer$2.cse3(e,"l","s","e"))return TokenType$2.ELSE;if(Tokenizer$2.cse3(e,"n","u","m"))return TokenType$2.ENUM;break;case"c":if(Tokenizer$2.cse3(e,"a","s","e"))return TokenType$2.CASE;break;case"v":if(Tokenizer$2.cse3(e,"o","i","d"))return TokenType$2.VOID;break;case"w":if(Tokenizer$2.cse3(e,"i","t","h"))return TokenType$2.WITH;break}break;case 5:switch(e.charAt(0)){case"a":if(Tokenizer$2.cse4(e,"s","y","n","c"))return TokenType$2.ASYNC;if(Tokenizer$2.cse4(e,"w","a","i","t"))return TokenType$2.AWAIT;break;case"w":if(Tokenizer$2.cse4(e,"h","i","l","e"))return TokenType$2.WHILE;break;case"b":if(Tokenizer$2.cse4(e,"r","e","a","k"))return TokenType$2.BREAK;break;case"f":if(Tokenizer$2.cse4(e,"a","l","s","e"))return TokenType$2.FALSE;break;case"c":if(Tokenizer$2.cse4(e,"a","t","c","h"))return TokenType$2.CATCH;if(Tokenizer$2.cse4(e,"o","n","s","t"))return TokenType$2.CONST;if(Tokenizer$2.cse4(e,"l","a","s","s"))return TokenType$2.CLASS;break;case"t":if(Tokenizer$2.cse4(e,"h","r","o","w"))return TokenType$2.THROW;break;case"y":if(Tokenizer$2.cse4(e,"i","e","l","d"))return TokenType$2.YIELD;break;case"s":if(Tokenizer$2.cse4(e,"u","p","e","r"))return TokenType$2.SUPER;break}break;case 6:switch(e.charAt(0)){case"r":if(Tokenizer$2.cse5(e,"e","t","u","r","n"))return TokenType$2.RETURN;break;case"t":if(Tokenizer$2.cse5(e,"y","p","e","o","f"))return TokenType$2.TYPEOF;break;case"d":if(Tokenizer$2.cse5(e,"e","l","e","t","e"))return TokenType$2.DELETE;break;case"s":if(Tokenizer$2.cse5(e,"w","i","t","c","h"))return TokenType$2.SWITCH;break;case"e":if(Tokenizer$2.cse5(e,"x","p","o","r","t"))return TokenType$2.EXPORT;break;case"i":if(Tokenizer$2.cse5(e,"m","p","o","r","t"))return TokenType$2.IMPORT;break}break;case 7:switch(e.charAt(0)){case"d":if(Tokenizer$2.cse6(e,"e","f","a","u","l","t"))return TokenType$2.DEFAULT;break;case"f":if(Tokenizer$2.cse6(e,"i","n","a","l","l","y"))return TokenType$2.FINALLY;break;case"e":if(Tokenizer$2.cse6(e,"x","t","e","n","d","s"))return TokenType$2.EXTENDS;break}break;case 8:switch(e.charAt(0)){case"f":if(Tokenizer$2.cse7(e,"u","n","c","t","i","o","n"))return TokenType$2.FUNCTION;break;case"c":if(Tokenizer$2.cse7(e,"o","n","t","i","n","u","e"))return TokenType$2.CONTINUE;break;case"d":if(Tokenizer$2.cse7(e,"e","b","u","g","g","e","r"))return TokenType$2.DEBUGGER;break}break;case 10:if(e==="instanceof")return TokenType$2.INSTANCEOF;break}return TokenType$2.IDENTIFIER}skipSingleLineComment(e){for(this.index+=e;this.index=r)break;if(u=this.source.charCodeAt(this.index+1),u===47)this.skipSingleLineComment(2),e=!0;else if(u===42)e=this.skipMultiLineComment()||e;else break}else if(!this.moduleIsTheGoalSymbol&&e&&u===45){if(this.index+2>=r)break;if(this.source.charAt(this.index+1)==="-"&&this.source.charAt(this.index+2)===">")this.skipSingleLineComment(3);else break}else if(!this.moduleIsTheGoalSymbol&&u===60)if(this.source.slice(this.index+1,this.index+4)==="!--")this.skipSingleLineComment(4),e=!0;else break;else break}}scanHexEscape2(){if(this.index+2>this.source.length)return-1;let e=getHexValue(this.source.charAt(this.index));if(e===-1)return-1;let r=getHexValue(this.source.charAt(this.index+1));return r===-1?-1:(this.index+=2,e<<4|r)}scanUnicode(){if(this.source.charAt(this.index)==="{"){let n=this.index+1,a=0,l;for(;n1114111)throw this.createILLEGAL();n++}if(l!=="}")throw this.createILLEGAL();if(n===this.index+1)throw++this.index,this.createILLEGAL();return this.index=n+1,a}if(this.index+4>this.source.length)return-1;let e=getHexValue(this.source.charAt(this.index));if(e===-1)return-1;let r=getHexValue(this.source.charAt(this.index+1));if(r===-1)return-1;let u=getHexValue(this.source.charAt(this.index+2));if(u===-1)return-1;let i=getHexValue(this.source.charAt(this.index+3));return i===-1?-1:(this.index+=4,e<<12|r<<8|u<<4|i)}getEscapedIdentifier(){let e="",r=isIdentifierStart;for(;this.index=this.source.length)throw this.createILLEGAL();if(this.source.charAt(this.index)!=="u")throw this.createILLEGAL();if(++this.index,i=this.scanUnicode(),i<0)throw this.createILLEGAL();u=fromCodePoint(i)}else if(i>=55296&&i<=56319){if(this.index>=this.source.length)throw this.createILLEGAL();let a=this.source.charCodeAt(this.index);if(++this.index,!(a>=56320&&a<=57343))throw this.createILLEGAL();i=decodeUtf16(i,a),u=fromCodePoint(i)}if(!r(i)){if(e.length<1)throw this.createILLEGAL();return this.index=n,e}r=isIdentifierPart,e+=u}return e}getIdentifier(){let e=this.index,r=this.source.length,u=this.index,i=isIdentifierStart;for(;u=55296&&a<=56319)return this.index=e,this.getEscapedIdentifier();if(!i(a))return this.index=u,this.source.slice(e,u);++u,i=isIdentifierPart}return this.index=u,this.source.slice(e,u)}scanIdentifier(){let e=this.getLocation(),r=this.index,u=this.source.charAt(this.index)==="\\"?this.getEscapedIdentifier():this.getIdentifier(),i=this.getSlice(r,e);i.text=u;let n=this.index-r!==u.length,a=this.getKeyword(u);return n&&a!==TokenType$2.IDENTIFIER&&(a=TokenType$2.ESCAPED_KEYWORD),{type:a,value:u,slice:i,escaped:n}}getLocation(){return{line:this.startLine+1,column:this.startIndex-this.startLineStart,offset:this.startIndex}}getLastTokenEndLocation(){return{line:this.lastLine+1,column:this.lastIndex-this.lastLineStart,offset:this.lastIndex}}getSlice(e,r){return{text:this.source.slice(e,this.index),start:e,startLocation:r,end:this.index}}scanPunctuatorHelper(){let e=this.source.charAt(this.index);switch(e){case".":return this.source.charAt(this.index+1)!=="."||this.source.charAt(this.index+2)!=="."?TokenType$2.PERIOD:TokenType$2.ELLIPSIS;case"(":return TokenType$2.LPAREN;case")":case";":case",":return ONE_CHAR_PUNCTUATOR[e.charCodeAt(0)];case"{":return TokenType$2.LBRACE;case"}":case"[":case"]":case":":case"?":case"~":return ONE_CHAR_PUNCTUATOR[e.charCodeAt(0)];default:if(this.index+1":return TokenType$2.GTE;case"/":return TokenType$2.ASSIGN_DIV;case"%":return TokenType$2.ASSIGN_MOD;case"^":return TokenType$2.ASSIGN_BIT_XOR;case"&":return TokenType$2.ASSIGN_BIT_AND}}if(this.index+1"&&u===">")return this.index+3"&&u==="=")return TokenType$2.ASSIGN_SHR;if(e==="*"&&u==="=")return TokenType$2.ASSIGN_EXP}switch(e){case"*":return TokenType$2.EXP;case"+":return TokenType$2.INC;case"-":return TokenType$2.DEC;case"<":return TokenType$2.SHL;case">":return TokenType$2.SHR;case"&":return TokenType$2.AND;case"|":return TokenType$2.OR}}else if(e==="="&&r===">")return TokenType$2.ARROW}return ONE_CHAR_PUNCTUATOR[e.charCodeAt(0)]}scanPunctuator(){let e=this.getLocation(),r=this.index,u=this.scanPunctuatorHelper();return this.index+=u.name.length,{type:u,value:u.name,slice:this.getSlice(r,e)}}scanHexLiteral(e,r){let u=this.index;for(;u="0"&&u<="7")this.index++;else{if(isIdentifierPart(u.charCodeAt(0)))throw this.createILLEGAL();break}}if(this.index-e===2)throw this.createILLEGAL();return{type:TokenType$2.NUMBER,value:parseInt(this.getSlice(e,r).text.substr(2),8),slice:this.getSlice(e,r),octal:!1,noctal:!1}}scanLegacyOctalLiteral(e,r){let u=!0;for(;this.index="0"&&n<="7")this.index++;else if(n==="8"||n==="9")u=!1,this.index++;else{if(isIdentifierPart(n.charCodeAt(0)))throw this.createILLEGAL();break}}let i=this.getSlice(e,r);return u?{type:TokenType$2.NUMBER,slice:i,value:parseInt(i.text.substr(1),8),octal:!0,noctal:!u}:(this.eatDecimalLiteralSuffix(),{type:TokenType$2.NUMBER,slice:i,value:+i.text,octal:!0,noctal:!u})}scanNumericLiteral(){let e=this.source.charAt(this.index),r=this.getLocation(),u=this.index;if(e==="0")if(this.index++,this.index="0"&&e<="9")return this.scanLegacyOctalLiteral(u,r)}else{let n=this.getSlice(u,r);return{type:TokenType$2.NUMBER,value:+n.text,slice:n,octal:!1,noctal:!1}}else if(e!==".")for(e=this.source.charAt(this.index);e>="0"&&e<="9";){if(this.index++,this.index===this.source.length){let n=this.getSlice(u,r);return{type:TokenType$2.NUMBER,value:+n.text,slice:n,octal:!1,noctal:!1}}e=this.source.charAt(this.index)}if(this.eatDecimalLiteralSuffix(),this.index!==this.source.length&&isIdentifierStart(this.source.charCodeAt(this.index)))throw this.createILLEGAL();let i=this.getSlice(u,r);return{type:TokenType$2.NUMBER,value:+i.text,slice:i,octal:!1,noctal:!1}}eatDecimalLiteralSuffix(){let e=this.source.charAt(this.index);if(e==="."){if(this.index++,this.index===this.source.length)return;for(e=this.source.charAt(this.index);e>="0"&&e<="9";){if(this.index++,this.index===this.source.length)return;e=this.source.charAt(this.index)}}if(e==="e"||e==="E"){if(this.index++,this.index===this.source.length)throw this.createILLEGAL();if(e=this.source.charAt(this.index),e==="+"||e==="-"){if(this.index++,this.index===this.source.length)throw this.createILLEGAL();e=this.source.charAt(this.index)}if(e>="0"&&e<="9")for(;e>="0"&&e<="9"&&(this.index++,this.index!==this.source.length);)e=this.source.charAt(this.index);else throw this.createILLEGAL()}}scanStringEscape(e,r){if(this.index++,this.index===this.source.length)throw this.createILLEGAL();let u=this.source.charAt(this.index);if(isLineTerminator$1(u.charCodeAt(0)))this.index++,u==="\r"&&this.source.charAt(this.index)===` -`&&this.index++,this.lineStart=this.index,this.line++;else switch(u){case"n":e+=` -`,this.index++;break;case"r":e+="\r",this.index++;break;case"t":e+=" ",this.index++;break;case"u":case"x":{let i;if(this.index++,this.index>=this.source.length)throw this.createILLEGAL();if(i=u==="u"?this.scanUnicode():this.scanHexEscape2(),i<0)throw this.createILLEGAL();e+=fromCodePoint(i);break}case"b":e+="\b",this.index++;break;case"f":e+="\f",this.index++;break;case"v":e+="\v",this.index++;break;default:if(u>="0"&&u<="7"){let i=this.index,n=1;u>="0"&&u<="3"&&(n=0);let a=0;for(;n<3&&u>="0"&&u<="7";){if(this.index++,(n>0||u!=="0")&&(r=this.source.slice(i,this.index)),a*=8,a+=u-"0",n++,this.index===this.source.length)throw this.createILLEGAL();u=this.source.charAt(this.index)}a===0&&n===1&&(u==="8"||u==="9")&&(r=this.source.slice(i,this.index+1)),e+=String.fromCharCode(a)}else{if(u==="8"||u==="9")throw this.createILLEGAL();e+=u,this.index++}}return[e,r]}scanStringLiteral(){let e="",r=this.source.charAt(this.index),u=this.getLocation(),i=this.index;this.index++;let n=null;for(;this.index=this.source.length)return{type:TokenType$2.EOS,slice:this.getSlice(this.index,e)};let r=this.source.charCodeAt(this.index);if(r<128){if(PUNCTUATOR_START[r])return this.scanPunctuator();if(isIdentifierStart(r)||r===92)return this.scanIdentifier();if(r===46)return this.index+1=48&&r<=57)return this.scanNumericLiteral();throw this.createILLEGAL()}else{if(isIdentifierStart(r)||r>=55296&&r<=56319)return this.scanIdentifier();throw this.createILLEGAL()}}eof(){return this.lookahead.type===TokenType$2.EOS}lex(){let e=this.lookahead;return this.lookahead=this.advance(),this.tokenIndex++,e}}var tokenizer={default:Tokenizer$2,Tokenizer:Tokenizer$2,TokenClass:TokenClass$2,TokenType:TokenType$2,JsError:JsError$1},gen={};gen.ArrayAssignmentTarget=class{constructor({elements:s,rest:e}){this.type="ArrayAssignmentTarget",this.elements=s,this.rest=e}};gen.ArrayBinding=class{constructor({elements:s,rest:e}){this.type="ArrayBinding",this.elements=s,this.rest=e}};var ArrayExpression=gen.ArrayExpression=class{constructor({elements:s}){this.type="ArrayExpression",this.elements=s}};gen.ArrowExpression=class{constructor({isAsync:s,params:e,body:r}){this.type="ArrowExpression",this.isAsync=s,this.params=e,this.body=r}};gen.AssignmentExpression=class{constructor({binding:s,expression:e}){this.type="AssignmentExpression",this.binding=s,this.expression=e}};gen.AssignmentTargetIdentifier=class{constructor({name:s}){this.type="AssignmentTargetIdentifier",this.name=s}};gen.AssignmentTargetPropertyIdentifier=class{constructor({binding:s,init:e}){this.type="AssignmentTargetPropertyIdentifier",this.binding=s,this.init=e}};gen.AssignmentTargetPropertyProperty=class{constructor({name:s,binding:e}){this.type="AssignmentTargetPropertyProperty",this.name=s,this.binding=e}};gen.AssignmentTargetWithDefault=class{constructor({binding:s,init:e}){this.type="AssignmentTargetWithDefault",this.binding=s,this.init=e}};gen.AwaitExpression=class{constructor({expression:s}){this.type="AwaitExpression",this.expression=s}};gen.BinaryExpression=class{constructor({left:s,operator:e,right:r}){this.type="BinaryExpression",this.left=s,this.operator=e,this.right=r}};gen.BindingIdentifier=class{constructor({name:s}){this.type="BindingIdentifier",this.name=s}};gen.BindingPropertyIdentifier=class{constructor({binding:s,init:e}){this.type="BindingPropertyIdentifier",this.binding=s,this.init=e}};gen.BindingPropertyProperty=class{constructor({name:s,binding:e}){this.type="BindingPropertyProperty",this.name=s,this.binding=e}};gen.BindingWithDefault=class{constructor({binding:s,init:e}){this.type="BindingWithDefault",this.binding=s,this.init=e}};gen.Block=class{constructor({statements:s}){this.type="Block",this.statements=s}};gen.BlockStatement=class{constructor({block:s}){this.type="BlockStatement",this.block=s}};gen.BreakStatement=class{constructor({label:s}){this.type="BreakStatement",this.label=s}};var CallExpression=gen.CallExpression=class{constructor({callee:s,arguments:e}){this.type="CallExpression",this.callee=s,this.arguments=e}};gen.CatchClause=class{constructor({binding:s,body:e}){this.type="CatchClause",this.binding=s,this.body=e}};gen.ClassDeclaration=class{constructor({name:s,super:e,elements:r}){this.type="ClassDeclaration",this.name=s,this.super=e,this.elements=r}};gen.ClassElement=class{constructor({isStatic:s,method:e}){this.type="ClassElement",this.isStatic=s,this.method=e}};gen.ClassExpression=class{constructor({name:s,super:e,elements:r}){this.type="ClassExpression",this.name=s,this.super=e,this.elements=r}};gen.CompoundAssignmentExpression=class{constructor({binding:s,operator:e,expression:r}){this.type="CompoundAssignmentExpression",this.binding=s,this.operator=e,this.expression=r}};gen.ComputedMemberAssignmentTarget=class{constructor({object:s,expression:e}){this.type="ComputedMemberAssignmentTarget",this.object=s,this.expression=e}};gen.ComputedMemberExpression=class{constructor({object:s,expression:e}){this.type="ComputedMemberExpression",this.object=s,this.expression=e}};gen.ComputedPropertyName=class{constructor({expression:s}){this.type="ComputedPropertyName",this.expression=s}};gen.ConditionalExpression=class{constructor({test:s,consequent:e,alternate:r}){this.type="ConditionalExpression",this.test=s,this.consequent=e,this.alternate=r}};gen.ContinueStatement=class{constructor({label:s}){this.type="ContinueStatement",this.label=s}};gen.DataProperty=class{constructor({name:s,expression:e}){this.type="DataProperty",this.name=s,this.expression=e}};gen.DebuggerStatement=class{constructor(){this.type="DebuggerStatement"}};gen.Directive=class{constructor({rawValue:s}){this.type="Directive",this.rawValue=s}};gen.DoWhileStatement=class{constructor({body:s,test:e}){this.type="DoWhileStatement",this.body=s,this.test=e}};gen.EmptyStatement=class{constructor(){this.type="EmptyStatement"}};gen.Export=class{constructor({declaration:s}){this.type="Export",this.declaration=s}};gen.ExportAllFrom=class{constructor({moduleSpecifier:s}){this.type="ExportAllFrom",this.moduleSpecifier=s}};gen.ExportDefault=class{constructor({body:s}){this.type="ExportDefault",this.body=s}};gen.ExportFrom=class{constructor({namedExports:s,moduleSpecifier:e}){this.type="ExportFrom",this.namedExports=s,this.moduleSpecifier=e}};gen.ExportFromSpecifier=class{constructor({name:s,exportedName:e}){this.type="ExportFromSpecifier",this.name=s,this.exportedName=e}};gen.ExportLocalSpecifier=class{constructor({name:s,exportedName:e}){this.type="ExportLocalSpecifier",this.name=s,this.exportedName=e}};gen.ExportLocals=class{constructor({namedExports:s}){this.type="ExportLocals",this.namedExports=s}};gen.ExpressionStatement=class{constructor({expression:s}){this.type="ExpressionStatement",this.expression=s}};gen.ForAwaitStatement=class{constructor({left:s,right:e,body:r}){this.type="ForAwaitStatement",this.left=s,this.right=e,this.body=r}};gen.ForInStatement=class{constructor({left:s,right:e,body:r}){this.type="ForInStatement",this.left=s,this.right=e,this.body=r}};gen.ForOfStatement=class{constructor({left:s,right:e,body:r}){this.type="ForOfStatement",this.left=s,this.right=e,this.body=r}};gen.ForStatement=class{constructor({init:s,test:e,update:r,body:u}){this.type="ForStatement",this.init=s,this.test=e,this.update=r,this.body=u}};gen.FormalParameters=class{constructor({items:s,rest:e}){this.type="FormalParameters",this.items=s,this.rest=e}};gen.FunctionBody=class{constructor({directives:s,statements:e}){this.type="FunctionBody",this.directives=s,this.statements=e}};gen.FunctionDeclaration=class{constructor({isAsync:s,isGenerator:e,name:r,params:u,body:i}){this.type="FunctionDeclaration",this.isAsync=s,this.isGenerator=e,this.name=r,this.params=u,this.body=i}};gen.FunctionExpression=class{constructor({isAsync:s,isGenerator:e,name:r,params:u,body:i}){this.type="FunctionExpression",this.isAsync=s,this.isGenerator=e,this.name=r,this.params=u,this.body=i}};gen.Getter=class{constructor({name:s,body:e}){this.type="Getter",this.name=s,this.body=e}};var IdentifierExpression=gen.IdentifierExpression=class{constructor({name:s}){this.type="IdentifierExpression",this.name=s}};gen.IfStatement=class{constructor({test:s,consequent:e,alternate:r}){this.type="IfStatement",this.test=s,this.consequent=e,this.alternate=r}};gen.Import=class{constructor({defaultBinding:s,namedImports:e,moduleSpecifier:r}){this.type="Import",this.defaultBinding=s,this.namedImports=e,this.moduleSpecifier=r}};gen.ImportNamespace=class{constructor({defaultBinding:s,namespaceBinding:e,moduleSpecifier:r}){this.type="ImportNamespace",this.defaultBinding=s,this.namespaceBinding=e,this.moduleSpecifier=r}};gen.ImportSpecifier=class{constructor({name:s,binding:e}){this.type="ImportSpecifier",this.name=s,this.binding=e}};gen.LabeledStatement=class{constructor({label:s,body:e}){this.type="LabeledStatement",this.label=s,this.body=e}};gen.LiteralBooleanExpression=class{constructor({value:s}){this.type="LiteralBooleanExpression",this.value=s}};gen.LiteralInfinityExpression=class{constructor(){this.type="LiteralInfinityExpression"}};gen.LiteralNullExpression=class{constructor(){this.type="LiteralNullExpression"}};var LiteralNumericExpression=gen.LiteralNumericExpression=class{constructor({value:s}){this.type="LiteralNumericExpression",this.value=s}};gen.LiteralRegExpExpression=class{constructor({pattern:s,global:e,ignoreCase:r,multiLine:u,dotAll:i,unicode:n,sticky:a}){this.type="LiteralRegExpExpression",this.pattern=s,this.global=e,this.ignoreCase=r,this.multiLine=u,this.dotAll=i,this.unicode=n,this.sticky=a}};var LiteralStringExpression=gen.LiteralStringExpression=class{constructor({value:s}){this.type="LiteralStringExpression",this.value=s}};gen.Method=class{constructor({isAsync:s,isGenerator:e,name:r,params:u,body:i}){this.type="Method",this.isAsync=s,this.isGenerator=e,this.name=r,this.params=u,this.body=i}};gen.Module=class{constructor({directives:s,items:e}){this.type="Module",this.directives=s,this.items=e}};gen.NewExpression=class{constructor({callee:s,arguments:e}){this.type="NewExpression",this.callee=s,this.arguments=e}};gen.NewTargetExpression=class{constructor(){this.type="NewTargetExpression"}};gen.ObjectAssignmentTarget=class{constructor({properties:s,rest:e}){this.type="ObjectAssignmentTarget",this.properties=s,this.rest=e}};gen.ObjectBinding=class{constructor({properties:s,rest:e}){this.type="ObjectBinding",this.properties=s,this.rest=e}};gen.ObjectExpression=class{constructor({properties:s}){this.type="ObjectExpression",this.properties=s}};var ReturnStatement=gen.ReturnStatement=class{constructor({expression:s}){this.type="ReturnStatement",this.expression=s}};gen.Script=class{constructor({directives:s,statements:e}){this.type="Script",this.directives=s,this.statements=e}};gen.Setter=class{constructor({name:s,param:e,body:r}){this.type="Setter",this.name=s,this.param=e,this.body=r}};gen.ShorthandProperty=class{constructor({name:s}){this.type="ShorthandProperty",this.name=s}};gen.SpreadElement=class{constructor({expression:s}){this.type="SpreadElement",this.expression=s}};gen.SpreadProperty=class{constructor({expression:s}){this.type="SpreadProperty",this.expression=s}};gen.StaticMemberAssignmentTarget=class{constructor({object:s,property:e}){this.type="StaticMemberAssignmentTarget",this.object=s,this.property=e}};var StaticMemberExpression=gen.StaticMemberExpression=class{constructor({object:s,property:e}){this.type="StaticMemberExpression",this.object=s,this.property=e}};gen.StaticPropertyName=class{constructor({value:s}){this.type="StaticPropertyName",this.value=s}};gen.Super=class{constructor(){this.type="Super"}};gen.SwitchCase=class{constructor({test:s,consequent:e}){this.type="SwitchCase",this.test=s,this.consequent=e}};gen.SwitchDefault=class{constructor({consequent:s}){this.type="SwitchDefault",this.consequent=s}};gen.SwitchStatement=class{constructor({discriminant:s,cases:e}){this.type="SwitchStatement",this.discriminant=s,this.cases=e}};gen.SwitchStatementWithDefault=class{constructor({discriminant:s,preDefaultCases:e,defaultCase:r,postDefaultCases:u}){this.type="SwitchStatementWithDefault",this.discriminant=s,this.preDefaultCases=e,this.defaultCase=r,this.postDefaultCases=u}};gen.TemplateElement=class{constructor({rawValue:s}){this.type="TemplateElement",this.rawValue=s}};gen.TemplateExpression=class{constructor({tag:s,elements:e}){this.type="TemplateExpression",this.tag=s,this.elements=e}};gen.ThisExpression=class{constructor(){this.type="ThisExpression"}};gen.ThrowStatement=class{constructor({expression:s}){this.type="ThrowStatement",this.expression=s}};gen.TryCatchStatement=class{constructor({body:s,catchClause:e}){this.type="TryCatchStatement",this.body=s,this.catchClause=e}};gen.TryFinallyStatement=class{constructor({body:s,catchClause:e,finalizer:r}){this.type="TryFinallyStatement",this.body=s,this.catchClause=e,this.finalizer=r}};gen.UnaryExpression=class{constructor({operator:s,operand:e}){this.type="UnaryExpression",this.operator=s,this.operand=e}};gen.UpdateExpression=class{constructor({isPrefix:s,operator:e,operand:r}){this.type="UpdateExpression",this.isPrefix=s,this.operator=e,this.operand=r}};gen.VariableDeclaration=class{constructor({kind:s,declarators:e}){this.type="VariableDeclaration",this.kind=s,this.declarators=e}};gen.VariableDeclarationStatement=class{constructor({declaration:s}){this.type="VariableDeclarationStatement",this.declaration=s}};gen.VariableDeclarator=class{constructor({binding:s,init:e}){this.type="VariableDeclarator",this.binding=s,this.init=e}};gen.WhileStatement=class{constructor({test:s,body:e}){this.type="WhileStatement",this.test=s,this.body=e}};gen.WithStatement=class{constructor({object:s,body:e}){this.type="WithStatement",this.object=s,this.body=e}};gen.YieldExpression=class{constructor({expression:s}){this.type="YieldExpression",this.expression=s}};gen.YieldGeneratorExpression=class{constructor({expression:s}){this.type="YieldGeneratorExpression",this.expression=s}};const{ErrorMessages:ErrorMessages$1}=errors,acceptRegex=src$3,{Tokenizer:Tokenizer$1,TokenClass:TokenClass$1,TokenType:TokenType$1}=tokenizer,AST=gen,ARROW_EXPRESSION_PARAMS="CoverParenthesizedExpressionAndArrowParameterList",EXPORT_UNKNOWN_SPECIFIER="ExportNameOfUnknownType",Precedence$4={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,LogicalOR:3,LogicalAND:4,BitwiseOR:5,BitwiseXOR:6,BitwiseAND:7,Equality:8,Relational:9,BitwiseSHIFT:10,Additive:11,Multiplicative:12,Unary:13,Postfix:14,Call:15,New:16,TaggedTemplate:17,Member:18,Primary:19},BinaryPrecedence$1={"||":Precedence$4.LogicalOR,"&&":Precedence$4.LogicalAND,"|":Precedence$4.BitwiseOR,"^":Precedence$4.BitwiseXOR,"&":Precedence$4.BitwiseAND,"==":Precedence$4.Equality,"!=":Precedence$4.Equality,"===":Precedence$4.Equality,"!==":Precedence$4.Equality,"<":Precedence$4.Relational,">":Precedence$4.Relational,"<=":Precedence$4.Relational,">=":Precedence$4.Relational,in:Precedence$4.Relational,instanceof:Precedence$4.Relational,"<<":Precedence$4.BitwiseSHIFT,">>":Precedence$4.BitwiseSHIFT,">>>":Precedence$4.BitwiseSHIFT,"+":Precedence$4.Additive,"-":Precedence$4.Additive,"*":Precedence$4.Multiplicative,"%":Precedence$4.Multiplicative,"/":Precedence$4.Multiplicative};function isValidSimpleAssignmentTarget(s){if(s==null)return!1;switch(s.type){case"IdentifierExpression":case"ComputedMemberExpression":case"StaticMemberExpression":return!0}return!1}function isPrefixOperator(s){switch(s.type){case TokenType$1.INC:case TokenType$1.DEC:case TokenType$1.ADD:case TokenType$1.SUB:case TokenType$1.BIT_NOT:case TokenType$1.NOT:case TokenType$1.DELETE:case TokenType$1.VOID:case TokenType$1.TYPEOF:return!0}return!1}function isUpdateOperator(s){return s.type===TokenType$1.INC||s.type===TokenType$1.DEC}class GenericParser$1 extends Tokenizer$1{constructor(e){super(e),this.allowIn=!0,this.inFunctionBody=!1,this.inParameter=!1,this.allowYieldExpression=!1,this.allowAwaitExpression=!1,this.firstAwaitLocation=null,this.module=!1,this.moduleIsTheGoalSymbol=!1,this.strict=!1,this.isBindingElement=!0,this.isAssignmentTarget=!0,this.firstExprError=null}match(e){return this.lookahead.type===e}matchIdentifier(){switch(this.lookahead.type){case TokenType$1.IDENTIFIER:case TokenType$1.LET:case TokenType$1.YIELD:case TokenType$1.ASYNC:return!0;case TokenType$1.AWAIT:return this.moduleIsTheGoalSymbol?!1:(this.firstAwaitLocation===null&&(this.firstAwaitLocation=this.getLocation()),!0);case TokenType$1.ESCAPED_KEYWORD:return this.lookahead.value==="await"&&!this.moduleIsTheGoalSymbol?(this.firstAwaitLocation===null&&(this.firstAwaitLocation=this.getLocation()),!0):this.lookahead.value==="let"||this.lookahead.value==="yield"||this.lookahead.value==="async"}return!1}eat(e){return this.lookahead.type===e?this.lex():null}expect(e){if(this.lookahead.type===e)return this.lex();throw this.createUnexpected(this.lookahead)}matchContextualKeyword(e){return this.lookahead.type===TokenType$1.IDENTIFIER&&!this.lookahead.escaped&&this.lookahead.value===e}expectContextualKeyword(e){if(this.lookahead.type===TokenType$1.IDENTIFIER&&!this.lookahead.escaped&&this.lookahead.value===e)return this.lex();throw this.createUnexpected(this.lookahead)}eatContextualKeyword(e){return this.lookahead.type===TokenType$1.IDENTIFIER&&!this.lookahead.escaped&&this.lookahead.value===e?this.lex():null}consumeSemicolon(){if(!this.eat(TokenType$1.SEMICOLON)&&!this.hasLineTerminatorBeforeNext&&!this.eof()&&!this.match(TokenType$1.RBRACE))throw this.createUnexpected(this.lookahead)}startNode(e){return e}copyNode(e,r){return r}finishNode(e){return e}parseModule(){this.moduleIsTheGoalSymbol=this.module=this.strict=!0,this.lookahead=this.advance();let e=this.startNode(),{directives:r,statements:u}=this.parseBody();if(!this.match(TokenType$1.EOS))throw this.createUnexpected(this.lookahead);return this.finishNode(new AST.Module({directives:r,items:u}),e)}parseScript(){this.lookahead=this.advance();let e=this.startNode(),{directives:r,statements:u}=this.parseBody();if(!this.match(TokenType$1.EOS))throw this.createUnexpected(this.lookahead);return this.finishNode(new AST.Script({directives:r,statements:u}),e)}parseFunctionBody(){let e=this.inFunctionBody,r=this.module,u=this.strict;this.inFunctionBody=!0,this.module=!1;let i=this.startNode();this.expect(TokenType$1.LBRACE);let n=new AST.FunctionBody(this.parseBody());return this.expect(TokenType$1.RBRACE),n=this.finishNode(n,i),this.inFunctionBody=e,this.module=r,this.strict=u,n}parseBody(){let e=[],r=[],u=!0,i=null;for(;!(this.eof()||this.match(TokenType$1.RBRACE));){let n=this.lookahead,a=n.slice.text,l=n.type===TokenType$1.STRING,o=this.module,c=this.getLocation(),A=this.startNode(),d=o?this.parseModuleItem():this.parseStatementListItem();if(u)if(l&&d.type==="ExpressionStatement"&&d.expression.type==="LiteralStringExpression"){!i&&n.octal&&(i=this.createErrorWithLocation(c,"Unexpected legacy octal escape sequence: \\"+n.octal));let m=a.slice(1,-1);m==="use strict"&&(this.strict=!0),e.push(this.finishNode(new AST.Directive({rawValue:m}),A))}else{if(u=!1,i&&this.strict)throw i;r.push(d)}else r.push(d)}if(i&&this.strict)throw i;return{directives:e,statements:r}}parseImportSpecifier(){let e=this.startNode(),r;if(this.matchIdentifier()){if(r=this.parseIdentifier(),!this.eatContextualKeyword("as"))return this.finishNode(new AST.ImportSpecifier({name:null,binding:this.finishNode(new AST.BindingIdentifier({name:r}),e)}),e)}else this.lookahead.type.klass.isIdentifierName&&(r=this.parseIdentifierName(),this.expectContextualKeyword("as"));return this.finishNode(new AST.ImportSpecifier({name:r,binding:this.parseBindingIdentifier()}),e)}parseNameSpaceBinding(){return this.expect(TokenType$1.MUL),this.expectContextualKeyword("as"),this.parseBindingIdentifier()}parseNamedImports(){let e=[];for(this.expect(TokenType$1.LBRACE);!this.eat(TokenType$1.RBRACE);)if(e.push(this.parseImportSpecifier()),!this.eat(TokenType$1.COMMA)){this.expect(TokenType$1.RBRACE);break}return e}parseFromClause(){return this.expectContextualKeyword("from"),this.expect(TokenType$1.STRING).str}parseImportDeclaration(){let e=this.startNode(),r=null,u;if(this.expect(TokenType$1.IMPORT),this.match(TokenType$1.STRING))return u=this.lex().str,this.consumeSemicolon(),this.finishNode(new AST.Import({defaultBinding:null,namedImports:[],moduleSpecifier:u}),e);if(this.matchIdentifier()&&(r=this.parseBindingIdentifier(),!this.eat(TokenType$1.COMMA))){let i=new AST.Import({defaultBinding:r,namedImports:[],moduleSpecifier:this.parseFromClause()});return this.consumeSemicolon(),this.finishNode(i,e)}if(this.match(TokenType$1.MUL)){let i=new AST.ImportNamespace({defaultBinding:r,namespaceBinding:this.parseNameSpaceBinding(),moduleSpecifier:this.parseFromClause()});return this.consumeSemicolon(),this.finishNode(i,e)}else if(this.match(TokenType$1.LBRACE)){let i=new AST.Import({defaultBinding:r,namedImports:this.parseNamedImports(),moduleSpecifier:this.parseFromClause()});return this.consumeSemicolon(),this.finishNode(i,e)}throw this.createUnexpected(this.lookahead)}parseExportSpecifier(){let e=this.startNode(),r=this.finishNode({type:EXPORT_UNKNOWN_SPECIFIER,isIdentifier:this.matchIdentifier(),value:this.parseIdentifierName()},e);if(this.eatContextualKeyword("as")){let u=this.parseIdentifierName();return this.finishNode({name:r,exportedName:u},e)}return this.finishNode({name:r,exportedName:null},e)}parseExportClause(){this.expect(TokenType$1.LBRACE);let e=[];for(;!this.eat(TokenType$1.RBRACE);)if(e.push(this.parseExportSpecifier()),!this.eat(TokenType$1.COMMA)){this.expect(TokenType$1.RBRACE);break}return e}parseExportDeclaration(){let e=this.startNode(),r;switch(this.expect(TokenType$1.EXPORT),this.lookahead.type){case TokenType$1.MUL:this.lex(),r=new AST.ExportAllFrom({moduleSpecifier:this.parseFromClause()}),this.consumeSemicolon();break;case TokenType$1.LBRACE:{let u=this.parseExportClause(),i=null;this.matchContextualKeyword("from")?(i=this.parseFromClause(),r=new AST.ExportFrom({namedExports:u.map(n=>this.copyNode(n,new AST.ExportFromSpecifier({name:n.name.value,exportedName:n.exportedName}))),moduleSpecifier:i})):(u.forEach(({name:n})=>{if(!n.isIdentifier)throw this.createError(ErrorMessages$1.ILLEGAL_EXPORTED_NAME)}),r=new AST.ExportLocals({namedExports:u.map(n=>this.copyNode(n,new AST.ExportLocalSpecifier({name:this.copyNode(n.name,new AST.IdentifierExpression({name:n.name.value})),exportedName:n.exportedName})))})),this.consumeSemicolon();break}case TokenType$1.CLASS:r=new AST.Export({declaration:this.parseClass({isExpr:!1,inDefault:!1})});break;case TokenType$1.FUNCTION:r=new AST.Export({declaration:this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!0,isAsync:!1})});break;case TokenType$1.ASYNC:{let u=this.startNode();this.lex(),r=new AST.Export({declaration:this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!0,isAsync:!0,startState:u})});break}case TokenType$1.DEFAULT:switch(this.lex(),this.lookahead.type){case TokenType$1.FUNCTION:r=new AST.ExportDefault({body:this.parseFunction({isExpr:!1,inDefault:!0,allowGenerator:!0,isAsync:!1})});break;case TokenType$1.CLASS:r=new AST.ExportDefault({body:this.parseClass({isExpr:!1,inDefault:!0})});break;case TokenType$1.ASYNC:{let u=this.startNode(),i=this.saveLexerState();if(this.lex(),!this.hasLineTerminatorBeforeNext&&this.match(TokenType$1.FUNCTION)){r=new AST.ExportDefault({body:this.parseFunction({isExpr:!1,inDefault:!0,allowGenerator:!1,isAsync:!0,startState:u})});break}this.restoreLexerState(i)}default:r=new AST.ExportDefault({body:this.parseAssignmentExpression()}),this.consumeSemicolon();break}break;case TokenType$1.VAR:case TokenType$1.LET:case TokenType$1.CONST:r=new AST.Export({declaration:this.parseVariableDeclaration(!0)}),this.consumeSemicolon();break;default:throw this.createUnexpected(this.lookahead)}return this.finishNode(r,e)}parseModuleItem(){switch(this.lookahead.type){case TokenType$1.IMPORT:return this.parseImportDeclaration();case TokenType$1.EXPORT:return this.parseExportDeclaration();default:return this.parseStatementListItem()}}lookaheadLexicalDeclaration(){if(this.match(TokenType$1.LET)||this.match(TokenType$1.CONST)){let e=this.saveLexerState();if(this.lex(),this.matchIdentifier()||this.match(TokenType$1.LBRACE)||this.match(TokenType$1.LBRACK))return this.restoreLexerState(e),!0;this.restoreLexerState(e)}return!1}parseStatementListItem(){if(this.eof())throw this.createUnexpected(this.lookahead);switch(this.lookahead.type){case TokenType$1.FUNCTION:return this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!0,isAsync:!1});case TokenType$1.CLASS:return this.parseClass({isExpr:!1,inDefault:!1});case TokenType$1.ASYNC:{let e=this.getLocation(),r=this.saveLexerState();return this.lex(),!this.hasLineTerminatorBeforeNext&&this.match(TokenType$1.FUNCTION)?this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!0,isAsync:!0,startState:e}):(this.restoreLexerState(r),this.parseStatement())}default:if(this.lookaheadLexicalDeclaration()){let e=this.startNode();return this.finishNode(this.parseVariableDeclarationStatement(),e)}return this.parseStatement()}}parseStatement(){let e=this.startNode(),r=this.isolateCoverGrammar(this.parseStatementHelper);return this.finishNode(r,e)}parseStatementHelper(){if(this.eof())throw this.createUnexpected(this.lookahead);switch(this.lookahead.type){case TokenType$1.SEMICOLON:return this.parseEmptyStatement();case TokenType$1.LBRACE:return this.parseBlockStatement();case TokenType$1.LPAREN:return this.parseExpressionStatement();case TokenType$1.BREAK:return this.parseBreakStatement();case TokenType$1.CONTINUE:return this.parseContinueStatement();case TokenType$1.DEBUGGER:return this.parseDebuggerStatement();case TokenType$1.DO:return this.parseDoWhileStatement();case TokenType$1.FOR:return this.parseForStatement();case TokenType$1.IF:return this.parseIfStatement();case TokenType$1.RETURN:return this.parseReturnStatement();case TokenType$1.SWITCH:return this.parseSwitchStatement();case TokenType$1.THROW:return this.parseThrowStatement();case TokenType$1.TRY:return this.parseTryStatement();case TokenType$1.VAR:return this.parseVariableDeclarationStatement();case TokenType$1.WHILE:return this.parseWhileStatement();case TokenType$1.WITH:return this.parseWithStatement();case TokenType$1.FUNCTION:case TokenType$1.CLASS:throw this.createUnexpected(this.lookahead);default:{let e=this.saveLexerState();if(this.eat(TokenType$1.LET)){if(this.match(TokenType$1.LBRACK))throw this.restoreLexerState(e),this.createUnexpected(this.lookahead);this.restoreLexerState(e)}else if(this.eat(TokenType$1.ASYNC)){if(!this.hasLineTerminatorBeforeNext&&this.match(TokenType$1.FUNCTION))throw this.createUnexpected(this.lookahead);this.restoreLexerState(e)}let r=this.parseExpression();if(r.type==="IdentifierExpression"&&this.eat(TokenType$1.COLON)){let u=this.match(TokenType$1.FUNCTION)?this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!1,isAsync:!1}):this.parseStatement();return new AST.LabeledStatement({label:r.name,body:u})}return this.consumeSemicolon(),new AST.ExpressionStatement({expression:r})}}}parseEmptyStatement(){return this.lex(),new AST.EmptyStatement}parseBlockStatement(){return new AST.BlockStatement({block:this.parseBlock()})}parseExpressionStatement(){let e=this.parseExpression();return this.consumeSemicolon(),new AST.ExpressionStatement({expression:e})}parseBreakStatement(){if(this.lex(),this.eat(TokenType$1.SEMICOLON)||this.hasLineTerminatorBeforeNext)return new AST.BreakStatement({label:null});let e=null;return this.matchIdentifier()&&(e=this.parseIdentifier()),this.consumeSemicolon(),new AST.BreakStatement({label:e})}parseContinueStatement(){if(this.lex(),this.eat(TokenType$1.SEMICOLON)||this.hasLineTerminatorBeforeNext)return new AST.ContinueStatement({label:null});let e=null;return this.matchIdentifier()&&(e=this.parseIdentifier()),this.consumeSemicolon(),new AST.ContinueStatement({label:e})}parseDebuggerStatement(){return this.lex(),this.consumeSemicolon(),new AST.DebuggerStatement}parseDoWhileStatement(){this.lex();let e=this.parseStatement();this.expect(TokenType$1.WHILE),this.expect(TokenType$1.LPAREN);let r=this.parseExpression();return this.expect(TokenType$1.RPAREN),this.eat(TokenType$1.SEMICOLON),new AST.DoWhileStatement({body:e,test:r})}parseForStatement(){this.lex();let e=this.allowAwaitExpression&&this.eat(TokenType$1.AWAIT);this.expect(TokenType$1.LPAREN);let r=null,u=null;if(e&&this.match(TokenType$1.SEMICOLON))throw this.createUnexpected(this.lookahead);if(this.eat(TokenType$1.SEMICOLON))return this.match(TokenType$1.SEMICOLON)||(r=this.parseExpression()),this.expect(TokenType$1.SEMICOLON),this.match(TokenType$1.RPAREN)||(u=this.parseExpression()),new AST.ForStatement({init:null,test:r,update:u,body:this.getIteratorStatementEpilogue()});let i=this.match(TokenType$1.LET),n=this.lookaheadLexicalDeclaration(),a=this.startNode();if(this.match(TokenType$1.VAR)||n){let c=this.allowIn;this.allowIn=!1;let A=this.parseVariableDeclaration(!1);if(this.allowIn=c,A.declarators.length===1&&(this.match(TokenType$1.IN)||this.matchContextualKeyword("of"))){let d,m=A.declarators[0];if(this.match(TokenType$1.IN)){if(e)throw this.createUnexpected(this.lookahead);if(m.init!==null&&(this.strict||A.kind!=="var"||m.binding.type!=="BindingIdentifier"))throw this.createError(ErrorMessages$1.INVALID_VAR_INIT_FOR_IN);d=AST.ForInStatement,this.lex(),u=this.parseExpression()}else{if(m.init!==null)throw this.createError(e?ErrorMessages$1.INVALID_VAR_INIT_FOR_AWAIT:ErrorMessages$1.INVALID_VAR_INIT_FOR_OF);e?d=AST.ForAwaitStatement:d=AST.ForOfStatement,this.lex(),u=this.parseAssignmentExpression()}let f=this.getIteratorStatementEpilogue();return new d({left:A,right:u,body:f})}else if(e)throw this.createUnexpected(this.lookahead);if(this.expect(TokenType$1.SEMICOLON),A.declarators.some(d=>d.binding.type!=="BindingIdentifier"&&d.init===null))throw this.createError(ErrorMessages$1.UNINITIALIZED_BINDINGPATTERN_IN_FOR_INIT);return this.match(TokenType$1.SEMICOLON)||(r=this.parseExpression()),this.expect(TokenType$1.SEMICOLON),this.match(TokenType$1.RPAREN)||(u=this.parseExpression()),new AST.ForStatement({init:A,test:r,update:u,body:this.getIteratorStatementEpilogue()})}let l=this.allowIn;this.allowIn=!1;let o=this.inheritCoverGrammar(this.parseAssignmentExpressionOrTarget);if(this.allowIn=l,this.isAssignmentTarget&&o.type!=="AssignmentExpression"&&(this.match(TokenType$1.IN)||this.matchContextualKeyword("of"))){if((o.type==="ObjectAssignmentTarget"||o.type==="ArrayAssignmentTarget")&&(this.firstExprError=null),i&&this.matchContextualKeyword("of"))throw this.createError(e?ErrorMessages$1.INVALID_LHS_IN_FOR_AWAIT:ErrorMessages$1.INVALID_LHS_IN_FOR_OF);let c;if(this.match(TokenType$1.IN)){if(e)throw this.createUnexpected(this.lookahead);c=AST.ForInStatement,this.lex(),u=this.parseExpression()}else e?c=AST.ForAwaitStatement:c=AST.ForOfStatement,this.lex(),u=this.parseAssignmentExpression();return new c({left:this.transformDestructuring(o),right:u,body:this.getIteratorStatementEpilogue()})}else if(e)throw this.createError(ErrorMessages$1.INVALID_LHS_IN_FOR_AWAIT);if(this.firstExprError)throw this.firstExprError;for(;this.eat(TokenType$1.COMMA);){let c=this.parseAssignmentExpression();o=this.finishNode(new AST.BinaryExpression({left:o,operator:",",right:c}),a)}if(this.match(TokenType$1.IN))throw this.createError(ErrorMessages$1.INVALID_LHS_IN_FOR_IN);if(this.matchContextualKeyword("of"))throw this.createError(ErrorMessages$1.INVALID_LHS_IN_FOR_OF);return this.expect(TokenType$1.SEMICOLON),this.match(TokenType$1.SEMICOLON)||(r=this.parseExpression()),this.expect(TokenType$1.SEMICOLON),this.match(TokenType$1.RPAREN)||(u=this.parseExpression()),new AST.ForStatement({init:o,test:r,update:u,body:this.getIteratorStatementEpilogue()})}getIteratorStatementEpilogue(){return this.expect(TokenType$1.RPAREN),this.parseStatement()}parseIfStatementChild(){return this.match(TokenType$1.FUNCTION)?this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!1,isAsync:!1}):this.parseStatement()}parseIfStatement(){this.lex(),this.expect(TokenType$1.LPAREN);let e=this.parseExpression();this.expect(TokenType$1.RPAREN);let r=this.parseIfStatementChild(),u=null;return this.eat(TokenType$1.ELSE)&&(u=this.parseIfStatementChild()),new AST.IfStatement({test:e,consequent:r,alternate:u})}parseReturnStatement(){if(!this.inFunctionBody)throw this.createError(ErrorMessages$1.ILLEGAL_RETURN);if(this.lex(),this.eat(TokenType$1.SEMICOLON)||this.hasLineTerminatorBeforeNext)return new AST.ReturnStatement({expression:null});let e=null;return!this.match(TokenType$1.RBRACE)&&!this.eof()&&(e=this.parseExpression()),this.consumeSemicolon(),new AST.ReturnStatement({expression:e})}parseSwitchStatement(){this.lex(),this.expect(TokenType$1.LPAREN);let e=this.parseExpression();if(this.expect(TokenType$1.RPAREN),this.expect(TokenType$1.LBRACE),this.eat(TokenType$1.RBRACE))return new AST.SwitchStatement({discriminant:e,cases:[]});let r=this.parseSwitchCases();if(this.match(TokenType$1.DEFAULT)){let u=this.parseSwitchDefault(),i=this.parseSwitchCases();if(this.match(TokenType$1.DEFAULT))throw this.createError(ErrorMessages$1.MULTIPLE_DEFAULTS_IN_SWITCH);return this.expect(TokenType$1.RBRACE),new AST.SwitchStatementWithDefault({discriminant:e,preDefaultCases:r,defaultCase:u,postDefaultCases:i})}return this.expect(TokenType$1.RBRACE),new AST.SwitchStatement({discriminant:e,cases:r})}parseSwitchCases(){let e=[];for(;!(this.eof()||this.match(TokenType$1.RBRACE)||this.match(TokenType$1.DEFAULT));)e.push(this.parseSwitchCase());return e}parseSwitchCase(){let e=this.startNode();return this.expect(TokenType$1.CASE),this.finishNode(new AST.SwitchCase({test:this.parseExpression(),consequent:this.parseSwitchCaseBody()}),e)}parseSwitchDefault(){let e=this.startNode();return this.expect(TokenType$1.DEFAULT),this.finishNode(new AST.SwitchDefault({consequent:this.parseSwitchCaseBody()}),e)}parseSwitchCaseBody(){return this.expect(TokenType$1.COLON),this.parseStatementListInSwitchCaseBody()}parseStatementListInSwitchCaseBody(){let e=[];for(;!(this.eof()||this.match(TokenType$1.RBRACE)||this.match(TokenType$1.DEFAULT)||this.match(TokenType$1.CASE));)e.push(this.parseStatementListItem());return e}parseThrowStatement(){let e=this.lex();if(this.hasLineTerminatorBeforeNext)throw this.createErrorWithLocation(e,ErrorMessages$1.NEWLINE_AFTER_THROW);let r=this.parseExpression();return this.consumeSemicolon(),new AST.ThrowStatement({expression:r})}parseTryStatement(){this.lex();let e=this.parseBlock();if(this.match(TokenType$1.CATCH)){let r=this.parseCatchClause();if(this.eat(TokenType$1.FINALLY)){let u=this.parseBlock();return new AST.TryFinallyStatement({body:e,catchClause:r,finalizer:u})}return new AST.TryCatchStatement({body:e,catchClause:r})}if(this.eat(TokenType$1.FINALLY)){let r=this.parseBlock();return new AST.TryFinallyStatement({body:e,catchClause:null,finalizer:r})}throw this.createError(ErrorMessages$1.NO_CATCH_OR_FINALLY)}parseVariableDeclarationStatement(){let e=this.parseVariableDeclaration(!0);return this.consumeSemicolon(),new AST.VariableDeclarationStatement({declaration:e})}parseWhileStatement(){this.lex(),this.expect(TokenType$1.LPAREN);let e=this.parseExpression(),r=this.getIteratorStatementEpilogue();return new AST.WhileStatement({test:e,body:r})}parseWithStatement(){this.lex(),this.expect(TokenType$1.LPAREN);let e=this.parseExpression();this.expect(TokenType$1.RPAREN);let r=this.parseStatement();return new AST.WithStatement({object:e,body:r})}parseCatchClause(){let e=this.startNode();this.lex();let r=null;if(this.match(TokenType$1.LPAREN)){if(this.lex(),this.match(TokenType$1.RPAREN)||this.match(TokenType$1.LPAREN))throw this.createUnexpected(this.lookahead);r=this.parseBindingTarget(),this.expect(TokenType$1.RPAREN)}let u=this.parseBlock();return this.finishNode(new AST.CatchClause({binding:r,body:u}),e)}parseBlock(){let e=this.startNode();this.expect(TokenType$1.LBRACE);let r=[];for(;!this.match(TokenType$1.RBRACE);)r.push(this.parseStatementListItem());return this.expect(TokenType$1.RBRACE),this.finishNode(new AST.Block({statements:r}),e)}parseVariableDeclaration(e){let r=this.startNode(),u=this.lex(),i=u.type===TokenType$1.VAR?"var":u.type===TokenType$1.CONST?"const":"let",n=this.parseVariableDeclaratorList(e);return this.finishNode(new AST.VariableDeclaration({kind:i,declarators:n}),r)}parseVariableDeclaratorList(e){let r=[];do r.push(this.parseVariableDeclarator(e));while(this.eat(TokenType$1.COMMA));return r}parseVariableDeclarator(e){let r=this.startNode();if(this.match(TokenType$1.LPAREN))throw this.createUnexpected(this.lookahead);let u=this.allowIn;this.allowIn=!0;let i=this.parseBindingTarget();this.allowIn=u,e&&i.type!=="BindingIdentifier"&&!this.match(TokenType$1.ASSIGN)&&this.expect(TokenType$1.ASSIGN);let n=null;return this.eat(TokenType$1.ASSIGN)&&(n=this.parseAssignmentExpression()),this.finishNode(new AST.VariableDeclarator({binding:i,init:n}),r)}isolateCoverGrammar(e){let r=this.isBindingElement,u=this.isAssignmentTarget,i=this.firstExprError,n;if(this.isBindingElement=this.isAssignmentTarget=!0,this.firstExprError=null,n=e.call(this),this.firstExprError!==null)throw this.firstExprError;return this.isBindingElement=r,this.isAssignmentTarget=u,this.firstExprError=i,n}inheritCoverGrammar(e){let r=this.isBindingElement,u=this.isAssignmentTarget,i=this.firstExprError,n;return this.isBindingElement=this.isAssignmentTarget=!0,this.firstExprError=null,n=e.call(this),this.isBindingElement=this.isBindingElement&&r,this.isAssignmentTarget=this.isAssignmentTarget&&u,this.firstExprError=i||this.firstExprError,n}parseExpression(){let e=this.startNode(),r=this.parseAssignmentExpression();if(this.match(TokenType$1.COMMA))for(;!this.eof()&&this.match(TokenType$1.COMMA);){this.lex();let u=this.parseAssignmentExpression();r=this.finishNode(new AST.BinaryExpression({left:r,operator:",",right:u}),e)}return r}finishArrowParams(e){let{params:r=null,rest:u=null}=e;if(e.type!==ARROW_EXPRESSION_PARAMS)if(e.type==="IdentifierExpression")r=[this.targetToBinding(this.transformDestructuring(e))];else throw this.createUnexpected(this.lookahead);return this.copyNode(e,new AST.FormalParameters({items:r,rest:u}))}parseArrowExpressionTail(e,r,u){this.expect(TokenType$1.ARROW);let i=this.allowYieldExpression,n=this.allowAwaitExpression,a=this.firstAwaitLocation;this.allowYieldExpression=!1,this.allowAwaitExpression=r,this.firstAwaitLocation=null;let l;if(this.match(TokenType$1.LBRACE)){let o=this.allowIn;this.allowIn=!0,l=this.parseFunctionBody(),this.allowIn=o}else l=this.parseAssignmentExpression();return this.allowYieldExpression=i,this.allowAwaitExpression=n,this.firstAwaitLocation=a,this.finishNode(new AST.ArrowExpression({isAsync:r,params:e,body:l}),u)}parseAssignmentExpression(){return this.isolateCoverGrammar(this.parseAssignmentExpressionOrTarget)}parseAssignmentExpressionOrTarget(){let e=this.startNode();if(this.allowYieldExpression&&this.match(TokenType$1.YIELD))return this.isBindingElement=this.isAssignmentTarget=!1,this.parseYieldExpression();let r=this.parseConditionalExpression();if(!this.hasLineTerminatorBeforeNext&&this.match(TokenType$1.ARROW)){this.isBindingElement=this.isAssignmentTarget=!1,this.firstExprError=null;let l=r.type===ARROW_EXPRESSION_PARAMS&&r.isAsync;return this.parseArrowExpressionTail(this.finishArrowParams(r),l,e)}let u=!1,i=this.lookahead;switch(i.type){case TokenType$1.ASSIGN_BIT_OR:case TokenType$1.ASSIGN_BIT_XOR:case TokenType$1.ASSIGN_BIT_AND:case TokenType$1.ASSIGN_SHL:case TokenType$1.ASSIGN_SHR:case TokenType$1.ASSIGN_SHR_UNSIGNED:case TokenType$1.ASSIGN_ADD:case TokenType$1.ASSIGN_SUB:case TokenType$1.ASSIGN_MUL:case TokenType$1.ASSIGN_DIV:case TokenType$1.ASSIGN_MOD:case TokenType$1.ASSIGN_EXP:u=!0;break}if(u){if(!this.isAssignmentTarget||!isValidSimpleAssignmentTarget(r))throw this.createError(ErrorMessages$1.INVALID_LHS_IN_ASSIGNMENT);r=this.transformDestructuring(r)}else if(i.type===TokenType$1.ASSIGN){if(!this.isAssignmentTarget)throw this.createError(ErrorMessages$1.INVALID_LHS_IN_ASSIGNMENT);r=this.transformDestructuring(r)}else return r;this.lex();let n=this.parseAssignmentExpression();this.firstExprError=null;let a;return i.type===TokenType$1.ASSIGN?a=new AST.AssignmentExpression({binding:r,expression:n}):(a=new AST.CompoundAssignmentExpression({binding:r,operator:i.type.name,expression:n}),this.isBindingElement=this.isAssignmentTarget=!1),this.finishNode(a,e)}targetToBinding(e){if(e===null)return null;switch(e.type){case"AssignmentTargetIdentifier":return this.copyNode(e,new AST.BindingIdentifier({name:e.name}));case"ArrayAssignmentTarget":return this.copyNode(e,new AST.ArrayBinding({elements:e.elements.map(r=>this.targetToBinding(r)),rest:this.targetToBinding(e.rest)}));case"ObjectAssignmentTarget":return this.copyNode(e,new AST.ObjectBinding({properties:e.properties.map(r=>this.targetToBinding(r)),rest:this.targetToBinding(e.rest)}));case"AssignmentTargetPropertyIdentifier":return this.copyNode(e,new AST.BindingPropertyIdentifier({binding:this.targetToBinding(e.binding),init:e.init}));case"AssignmentTargetPropertyProperty":return this.copyNode(e,new AST.BindingPropertyProperty({name:e.name,binding:this.targetToBinding(e.binding)}));case"AssignmentTargetWithDefault":return this.copyNode(e,new AST.BindingWithDefault({binding:this.targetToBinding(e.binding),init:e.init}))}throw new Error("Not reached")}transformDestructuring(e){switch(e.type){case"DataProperty":return this.copyNode(e,new AST.AssignmentTargetPropertyProperty({name:e.name,binding:this.transformDestructuringWithDefault(e.expression)}));case"ShorthandProperty":return this.copyNode(e,new AST.AssignmentTargetPropertyIdentifier({binding:this.copyNode(e,new AST.AssignmentTargetIdentifier({name:e.name.name})),init:null}));case"ObjectExpression":{let r=e.properties.length>0?e.properties[e.properties.length-1]:void 0;return r!=null&&r.type==="SpreadProperty"?this.copyNode(e,new AST.ObjectAssignmentTarget({properties:e.properties.slice(0,-1).map(u=>u&&this.transformDestructuringWithDefault(u)),rest:this.transformDestructuring(r.expression)})):this.copyNode(e,new AST.ObjectAssignmentTarget({properties:e.properties.map(u=>u&&this.transformDestructuringWithDefault(u)),rest:null}))}case"ArrayExpression":{let r=e.elements[e.elements.length-1];return r!=null&&r.type==="SpreadElement"?this.copyNode(e,new AST.ArrayAssignmentTarget({elements:e.elements.slice(0,-1).map(u=>u&&this.transformDestructuringWithDefault(u)),rest:this.copyNode(r.expression,this.transformDestructuring(r.expression))})):this.copyNode(e,new AST.ArrayAssignmentTarget({elements:e.elements.map(u=>u&&this.transformDestructuringWithDefault(u)),rest:null}))}case"IdentifierExpression":return this.copyNode(e,new AST.AssignmentTargetIdentifier({name:e.name}));case"StaticPropertyName":return this.copyNode(e,new AST.AssignmentTargetIdentifier({name:e.value}));case"ComputedMemberExpression":return this.copyNode(e,new AST.ComputedMemberAssignmentTarget({object:e.object,expression:e.expression}));case"StaticMemberExpression":return this.copyNode(e,new AST.StaticMemberAssignmentTarget({object:e.object,property:e.property}));case"ArrayAssignmentTarget":case"ObjectAssignmentTarget":case"ComputedMemberAssignmentTarget":case"StaticMemberAssignmentTarget":case"AssignmentTargetIdentifier":case"AssignmentTargetPropertyIdentifier":case"AssignmentTargetPropertyProperty":case"AssignmentTargetWithDefault":return e}throw new Error("Not reached")}transformDestructuringWithDefault(e){switch(e.type){case"AssignmentExpression":return this.copyNode(e,new AST.AssignmentTargetWithDefault({binding:this.transformDestructuring(e.binding),init:e.expression}))}return this.transformDestructuring(e)}lookaheadAssignmentExpression(){if(this.matchIdentifier())return!0;switch(this.lookahead.type){case TokenType$1.ADD:case TokenType$1.ASSIGN_DIV:case TokenType$1.BIT_NOT:case TokenType$1.CLASS:case TokenType$1.DEC:case TokenType$1.DELETE:case TokenType$1.DIV:case TokenType$1.FALSE:case TokenType$1.FUNCTION:case TokenType$1.INC:case TokenType$1.LBRACE:case TokenType$1.LBRACK:case TokenType$1.LPAREN:case TokenType$1.NEW:case TokenType$1.NOT:case TokenType$1.NULL:case TokenType$1.NUMBER:case TokenType$1.STRING:case TokenType$1.SUB:case TokenType$1.SUPER:case TokenType$1.THIS:case TokenType$1.TRUE:case TokenType$1.TYPEOF:case TokenType$1.VOID:case TokenType$1.TEMPLATE:return!0}return!1}parseYieldExpression(){let e=this.startNode();if(this.lex(),this.hasLineTerminatorBeforeNext)return this.finishNode(new AST.YieldExpression({expression:null}),e);let r=!!this.eat(TokenType$1.MUL),u=null;(r||this.lookaheadAssignmentExpression())&&(u=this.parseAssignmentExpression());let i=r?AST.YieldGeneratorExpression:AST.YieldExpression;return this.finishNode(new i({expression:u}),e)}parseConditionalExpression(){let e=this.startNode(),r=this.parseBinaryExpression();if(this.firstExprError)return r;if(this.eat(TokenType$1.CONDITIONAL)){this.isBindingElement=this.isAssignmentTarget=!1;let u=this.allowIn;this.allowIn=!0;let i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.allowIn=u,this.expect(TokenType$1.COLON);let n=this.isolateCoverGrammar(this.parseAssignmentExpression);return this.finishNode(new AST.ConditionalExpression({test:r,consequent:i,alternate:n}),e)}return r}isBinaryOperator(e){switch(e){case TokenType$1.OR:case TokenType$1.AND:case TokenType$1.BIT_OR:case TokenType$1.BIT_XOR:case TokenType$1.BIT_AND:case TokenType$1.EQ:case TokenType$1.NE:case TokenType$1.EQ_STRICT:case TokenType$1.NE_STRICT:case TokenType$1.LT:case TokenType$1.GT:case TokenType$1.LTE:case TokenType$1.GTE:case TokenType$1.INSTANCEOF:case TokenType$1.SHL:case TokenType$1.SHR:case TokenType$1.SHR_UNSIGNED:case TokenType$1.ADD:case TokenType$1.SUB:case TokenType$1.MUL:case TokenType$1.DIV:case TokenType$1.MOD:return!0;case TokenType$1.IN:return this.allowIn;default:return!1}}parseBinaryExpression(){let e=this.startNode(),r=this.parseExponentiationExpression();if(this.firstExprError)return r;let u=this.lookahead.type;if(!this.isBinaryOperator(u))return r;this.isBindingElement=this.isAssignmentTarget=!1,this.lex();let i=[];i.push({startState:e,left:r,operator:u,precedence:BinaryPrecedence$1[u.name]}),e=this.startNode();let n=this.isolateCoverGrammar(this.parseExponentiationExpression);for(u=this.lookahead.type;this.isBinaryOperator(u);){let a=BinaryPrecedence$1[u.name];for(;i.length&&a<=i[i.length-1].precedence;){let l=i[i.length-1],o=l.operator;r=l.left,i.pop(),e=l.startState,n=this.finishNode(new AST.BinaryExpression({left:r,operator:o.name,right:n}),e)}this.lex(),i.push({startState:e,left:n,operator:u,precedence:a}),e=this.startNode(),n=this.isolateCoverGrammar(this.parseExponentiationExpression),u=this.lookahead.type}return i.reduceRight((a,l)=>this.finishNode(new AST.BinaryExpression({left:l.left,operator:l.operator.name,right:a}),l.startState),n)}parseExponentiationExpression(){let e=this.startNode(),r=this.lookahead.type===TokenType$1.LPAREN,u=this.parseUnaryExpression();if(this.lookahead.type!==TokenType$1.EXP)return u;if(u.type==="UnaryExpression"&&!r)throw this.createError(ErrorMessages$1.INVALID_EXPONENTIATION_LHS);this.lex(),this.isBindingElement=this.isAssignmentTarget=!1;let i=this.isolateCoverGrammar(this.parseExponentiationExpression);return this.finishNode(new AST.BinaryExpression({left:u,operator:"**",right:i}),e)}parseUnaryExpression(){if(this.lookahead.type.klass!==TokenClass$1.Punctuator&&this.lookahead.type.klass!==TokenClass$1.Keyword)return this.parseUpdateExpression();let e=this.startNode();if(this.allowAwaitExpression&&this.eat(TokenType$1.AWAIT)){this.isBindingElement=this.isAssignmentTarget=!1;let i=this.isolateCoverGrammar(this.parseUnaryExpression);return this.finishNode(new AST.AwaitExpression({expression:i}),e)}let r=this.lookahead;if(!isPrefixOperator(r))return this.parseUpdateExpression();this.lex(),this.isBindingElement=this.isAssignmentTarget=!1;let u;if(isUpdateOperator(r)){let i=this.getLocation(),n=this.isolateCoverGrammar(this.parseUnaryExpression);if(!isValidSimpleAssignmentTarget(n))throw this.createErrorWithLocation(i,ErrorMessages$1.INVALID_UPDATE_OPERAND);n=this.transformDestructuring(n),u=new AST.UpdateExpression({isPrefix:!0,operator:r.value,operand:n})}else{let i=this.isolateCoverGrammar(this.parseUnaryExpression);u=new AST.UnaryExpression({operator:r.value,operand:i})}return this.finishNode(u,e)}parseUpdateExpression(){let e=this.getLocation(),r=this.startNode(),u=this.parseLeftHandSideExpression({allowCall:!0});if(this.firstExprError||this.hasLineTerminatorBeforeNext)return u;let i=this.lookahead;if(!isUpdateOperator(i))return u;if(this.lex(),this.isBindingElement=this.isAssignmentTarget=!1,!isValidSimpleAssignmentTarget(u))throw this.createErrorWithLocation(e,ErrorMessages$1.INVALID_UPDATE_OPERAND);return u=this.transformDestructuring(u),this.finishNode(new AST.UpdateExpression({isPrefix:!1,operator:i.value,operand:u}),r)}parseLeftHandSideExpression({allowCall:e}){let r=this.startNode(),u=this.allowIn;this.allowIn=!0;let i,n=this.lookahead;if(this.eat(TokenType$1.SUPER))if(this.isBindingElement=!1,this.isAssignmentTarget=!1,i=this.finishNode(new AST.Super,r),this.match(TokenType$1.LPAREN))if(e)i=this.finishNode(new AST.CallExpression({callee:i,arguments:this.parseArgumentList().args}),r);else throw this.createUnexpected(n);else if(this.match(TokenType$1.LBRACK))i=this.finishNode(new AST.ComputedMemberExpression({object:i,expression:this.parseComputedMember()}),r),this.isAssignmentTarget=!0;else if(this.match(TokenType$1.PERIOD))i=this.finishNode(new AST.StaticMemberExpression({object:i,property:this.parseStaticMember()}),r),this.isAssignmentTarget=!0;else throw this.createUnexpected(n);else if(this.match(TokenType$1.NEW))this.isBindingElement=this.isAssignmentTarget=!1,i=this.parseNewExpression();else if(this.match(TokenType$1.ASYNC)){if(i=this.parsePrimaryExpression(),i.type==="IdentifierExpression"&&e&&!this.hasLineTerminatorBeforeNext){if(this.matchIdentifier()){let a=this.startNode(),l=this.allowAwaitExpression;this.allowAwaitExpression=!0;let o=this.parseBindingIdentifier();return this.allowAwaitExpression=l,this.ensureArrow(),this.finishNode({type:ARROW_EXPRESSION_PARAMS,params:[o],rest:null,isAsync:!0},a)}if(this.match(TokenType$1.LPAREN)){let a=this.startNode(),l=this.firstAwaitLocation;this.firstAwaitLocation=null;let{args:o,locationFollowingFirstSpread:c}=this.parseArgumentList();if(this.isBindingElement&&!this.hasLineTerminatorBeforeNext&&this.match(TokenType$1.ARROW)){if(c!==null)throw this.createErrorWithLocation(c,ErrorMessages$1.UNEXPECTED_TOKEN(","));if(this.firstAwaitLocation!==null)throw this.createErrorWithLocation(this.firstAwaitLocation,ErrorMessages$1.NO_AWAIT_IN_ASYNC_PARAMS);let A=null;if(o.length>0&&o[o.length-1].type==="SpreadElement"){if(A=this.targetToBinding(this.transformDestructuringWithDefault(o[o.length-1].expression)),A.init!=null)throw this.createError(ErrorMessages$1.UNEXPECTED_REST_PARAMETERS_INITIALIZATION);o=o.slice(0,-1)}let d=o.map(m=>this.targetToBinding(this.transformDestructuringWithDefault(m)));return this.finishNode({type:ARROW_EXPRESSION_PARAMS,params:d,rest:A,isAsync:!0},a)}this.firstAwaitLocation=l||this.firstAwaitLocation,this.isBindingElement=this.isAssignmentTarget=!1,i=this.finishNode(new AST.CallExpression({callee:i,arguments:o}),r)}}}else if(i=this.parsePrimaryExpression(),this.firstExprError)return i;for(;;)if(e&&this.match(TokenType$1.LPAREN))this.isBindingElement=this.isAssignmentTarget=!1,i=this.finishNode(new AST.CallExpression({callee:i,arguments:this.parseArgumentList().args}),r);else if(this.match(TokenType$1.LBRACK))this.isBindingElement=!1,this.isAssignmentTarget=!0,i=this.finishNode(new AST.ComputedMemberExpression({object:i,expression:this.parseComputedMember()}),r);else if(this.match(TokenType$1.PERIOD))this.isBindingElement=!1,this.isAssignmentTarget=!0,i=this.finishNode(new AST.StaticMemberExpression({object:i,property:this.parseStaticMember()}),r);else if(this.match(TokenType$1.TEMPLATE))this.isBindingElement=this.isAssignmentTarget=!1,i=this.finishNode(new AST.TemplateExpression({tag:i,elements:this.parseTemplateElements()}),r);else break;return this.allowIn=u,i}parseTemplateElements(){let e=this.startNode(),r=this.lookahead;if(r.tail)return this.lex(),[this.finishNode(new AST.TemplateElement({rawValue:r.slice.text.slice(1,-1)}),e)];let u=[this.finishNode(new AST.TemplateElement({rawValue:this.lex().slice.text.slice(1,-2)}),e)];for(;;){if(u.push(this.parseExpression()),!this.match(TokenType$1.RBRACE))throw this.createILLEGAL();if(this.index=this.startIndex,this.line=this.startLine,this.lineStart=this.startLineStart,this.lookahead=this.scanTemplateElement(),e=this.startNode(),r=this.lex(),r.tail)return u.push(this.finishNode(new AST.TemplateElement({rawValue:r.slice.text.slice(1,-1)}),e)),u;u.push(this.finishNode(new AST.TemplateElement({rawValue:r.slice.text.slice(1,-2)}),e))}}parseStaticMember(){if(this.lex(),this.lookahead.type.klass.isIdentifierName)return this.lex().value;throw this.createUnexpected(this.lookahead)}parseComputedMember(){this.lex();let e=this.parseExpression();return this.expect(TokenType$1.RBRACK),e}parseNewExpression(){let e=this.startNode();if(this.lex(),this.eat(TokenType$1.PERIOD))return this.expectContextualKeyword("target"),this.finishNode(new AST.NewTargetExpression,e);let r=this.isolateCoverGrammar(()=>this.parseLeftHandSideExpression({allowCall:!1}));return this.finishNode(new AST.NewExpression({callee:r,arguments:this.match(TokenType$1.LPAREN)?this.parseArgumentList().args:[]}),e)}parseRegexFlags(e){let r=!1,u=!1,i=!1,n=!1,a=!1,l=!1;for(let o=0;on&&this.transformDestructuringWithDefault(n)),rest:i}),r);if(this.firstExprError){let n=u[u.length-1];return n!=null&&n.type==="SpreadElement"?this.finishNode(new AST.ArrayAssignmentTarget({elements:u.slice(0,-1).map(a=>a&&this.transformDestructuringWithDefault(a)),rest:this.transformDestructuring(n.expression)}),r):this.finishNode(new AST.ArrayAssignmentTarget({elements:u.map(a=>a&&this.transformDestructuringWithDefault(a)),rest:null}),r)}return this.finishNode(new AST.ArrayExpression({elements:u}),r)}parseObjectExpression(){let e=this.startNode();this.lex();let r=[];for(;!this.match(TokenType$1.RBRACE);){let u=!1;if(this.match(TokenType$1.ELLIPSIS)){u=!0;let i=this.parseSpreadPropertyDefinition();r.push(i)}else{let i=this.inheritCoverGrammar(this.parsePropertyDefinition);r.push(i)}this.match(TokenType$1.RBRACE)||(this.expect(TokenType$1.COMMA),u&&(this.isBindingElement=this.isAssignmentTarget=!1))}if(this.expect(TokenType$1.RBRACE),this.firstExprError){if(!this.isAssignmentTarget)throw this.createError(ErrorMessages$1.INVALID_LHS_IN_BINDING);let u=r[r.length-1];return u!=null&&u.type==="SpreadProperty"?this.finishNode(new AST.ObjectAssignmentTarget({properties:r.slice(0,-1).map(i=>this.transformDestructuringWithDefault(i)),rest:this.transformDestructuring(u.expression)}),e):this.finishNode(new AST.ObjectAssignmentTarget({properties:r.map(i=>this.transformDestructuringWithDefault(i)),rest:null}),e)}return this.finishNode(new AST.ObjectExpression({properties:r}),e)}parseSpreadPropertyDefinition(){let e=this.startNode();this.expect(TokenType$1.ELLIPSIS);let r=this.parseAssignmentExpression();return isValidSimpleAssignmentTarget(r)?r.type!=="IdentifierExpression"&&(this.isBindingElement=!1):this.isBindingElement=this.isAssignmentTarget=!1,this.finishNode(new AST.SpreadProperty({expression:r}),e)}parsePropertyDefinition(){let e=this.getLocation(),r=this.startNode(),u=this.lookahead,{methodOrKey:i,kind:n}=this.parseMethodDefinition();switch(n){case"method":return this.isBindingElement=this.isAssignmentTarget=!1,i;case"identifier":if(u.value==="await"&&this.firstAwaitLocation==null&&(this.firstAwaitLocation=this.getLocation()),this.eat(TokenType$1.ASSIGN)){if(this.allowYieldExpression&&u.value==="yield")throw this.createError(ErrorMessages$1.ILLEGAL_YIELD_IDENTIFIER);if(this.allowAwaitExpression&&u.value==="await")throw this.createError(ErrorMessages$1.ILLEGAL_AWAIT_IDENTIFIER);let l=this.isolateCoverGrammar(this.parseAssignmentExpression);return this.firstExprError=this.createErrorWithLocation(e,ErrorMessages$1.ILLEGAL_PROPERTY),this.finishNode(new AST.AssignmentTargetPropertyIdentifier({binding:this.transformDestructuring(i),init:l}),r)}else if(!this.match(TokenType$1.COLON)){if(this.allowYieldExpression&&u.value==="yield")throw this.createError(ErrorMessages$1.ILLEGAL_YIELD_IDENTIFIER);if(this.allowAwaitExpression&&u.value==="await")throw this.createError(ErrorMessages$1.ILLEGAL_AWAIT_IDENTIFIER);if(u.type===TokenType$1.IDENTIFIER||u.value==="let"||u.value==="yield"||u.value==="async"||u.value==="await")return this.finishNode(new AST.ShorthandProperty({name:this.finishNode(new AST.IdentifierExpression({name:i.value}),r)}),r);throw this.createUnexpected(u)}}this.expect(TokenType$1.COLON);let a=this.inheritCoverGrammar(this.parseAssignmentExpressionOrTarget);return this.firstExprError?this.finishNode(new AST.AssignmentTargetPropertyProperty({name:i,binding:a}),r):this.finishNode(new AST.DataProperty({name:i,expression:a}),r)}parsePropertyName(){let e=this.lookahead,r=this.startNode();if(this.eof())throw this.createUnexpected(e);switch(e.type){case TokenType$1.STRING:return{name:this.finishNode(new AST.StaticPropertyName({value:this.parseStringLiteral().value}),r),binding:null};case TokenType$1.NUMBER:{let i=this.parseNumericLiteral();return{name:this.finishNode(new AST.StaticPropertyName({value:`${i.type==="LiteralInfinityExpression"?1/0:i.value}`}),r),binding:null}}case TokenType$1.LBRACK:{this.lex();let i=this.parseAssignmentExpression();return this.expect(TokenType$1.RBRACK),{name:this.finishNode(new AST.ComputedPropertyName({expression:i}),r),binding:null}}}let u=this.parseIdentifierName();return{name:this.finishNode(new AST.StaticPropertyName({value:u}),r),binding:this.finishNode(new AST.BindingIdentifier({name:u}),r)}}lookaheadPropertyName(){switch(this.lookahead.type){case TokenType$1.NUMBER:case TokenType$1.STRING:case TokenType$1.LBRACK:return!0;default:return this.lookahead.type.klass.isIdentifierName}}parseMethodDefinition(){let e=this.lookahead,r=this.startNode(),u=this.saveLexerState(),i=!!this.eat(TokenType$1.ASYNC);i&&this.hasLineTerminatorBeforeNext&&(i=!1,this.restoreLexerState(u));let n=!!this.eat(TokenType$1.MUL);i&&!this.lookaheadPropertyName()&&(i=!1,n=!1,this.restoreLexerState(u));let{name:a}=this.parsePropertyName();if(!n&&!i&&e.type===TokenType$1.IDENTIFIER&&e.value.length===3){if(e.value==="get"&&this.lookaheadPropertyName()&&!e.escaped){({name:a}=this.parsePropertyName()),this.expect(TokenType$1.LPAREN),this.expect(TokenType$1.RPAREN);let l=this.allowYieldExpression,o=this.allowAwaitExpression,c=this.firstAwaitLocation;this.allowYieldExpression=!1,this.allowAwaitExpression=!1,this.firstAwaitLocation=null;let A=this.parseFunctionBody();return this.allowYieldExpression=l,this.allowAwaitExpression=o,this.firstAwaitLocation=c,{methodOrKey:this.finishNode(new AST.Getter({name:a,body:A}),r),kind:"method"}}else if(e.value==="set"&&this.lookaheadPropertyName()&&!e.escaped){({name:a}=this.parsePropertyName()),this.expect(TokenType$1.LPAREN);let l=this.allowYieldExpression,o=this.allowAwaitExpression,c=this.firstAwaitLocation;this.allowYieldExpression=!1,this.allowAwaitExpression=!1,this.firstAwaitLocation=null;let A=this.parseBindingElement();this.expect(TokenType$1.RPAREN);let d=this.parseFunctionBody();return this.allowYieldExpression=l,this.allowAwaitExpression=o,this.firstAwaitLocation=c,{methodOrKey:this.finishNode(new AST.Setter({name:a,param:A,body:d}),r),kind:"method"}}}if(i){let l=this.allowYieldExpression,o=this.allowAwaitExpression;this.allowYieldExpression=n,this.allowAwaitExpression=!0;let c=this.parseParams();this.allowYieldExpression=n,this.allowAwaitExpression=!0;let A=this.parseFunctionBody();return this.allowYieldExpression=l,this.allowAwaitExpression=o,{methodOrKey:this.finishNode(new AST.Method({isAsync:i,isGenerator:n,name:a,params:c,body:A}),r),kind:"method"}}if(this.match(TokenType$1.LPAREN)){let l=this.allowYieldExpression,o=this.allowAwaitExpression,c=this.firstAwaitLocation;this.allowYieldExpression=n,this.allowAwaitExpression=!1,this.firstAwaitLocation=null;let A=this.parseParams(),d=this.parseFunctionBody();return this.allowYieldExpression=l,this.allowAwaitExpression=o,this.firstAwaitLocation=c,{methodOrKey:this.finishNode(new AST.Method({isAsync:i,isGenerator:n,name:a,params:A,body:d}),r),kind:"method"}}if(n&&this.match(TokenType$1.COLON))throw this.createUnexpected(this.lookahead);return{methodOrKey:a,kind:e.type.klass.isIdentifierName?"identifier":"property",escaped:e.escaped}}parseClass({isExpr:e,inDefault:r}){let u=this.startNode();this.lex();let i=null,n=null;if(this.matchIdentifier())i=this.parseBindingIdentifier();else if(!e)if(r)i=new AST.BindingIdentifier({name:"*default*"});else throw this.createUnexpected(this.lookahead);this.eat(TokenType$1.EXTENDS)&&(n=this.isolateCoverGrammar(()=>this.parseLeftHandSideExpression({allowCall:!0}))),this.expect(TokenType$1.LBRACE);let a=[];for(;!this.eat(TokenType$1.RBRACE);){if(this.eat(TokenType$1.SEMICOLON))continue;let l=!1,o=this.startNode(),{methodOrKey:c,kind:A,escaped:d}=this.parseMethodDefinition();if(A==="identifier"&&c.value==="static"&&!d&&(l=!0,{methodOrKey:c,kind:A}=this.parseMethodDefinition()),A==="method")a.push(this.finishNode(new AST.ClassElement({isStatic:l,method:c}),o));else throw this.createError("Only methods are allowed in classes")}return this.finishNode(new(e?AST.ClassExpression:AST.ClassDeclaration)({name:i,super:n,elements:a}),u)}parseFunction({isExpr:e,inDefault:r,allowGenerator:u,isAsync:i,startState:n=this.startNode()}){this.lex();let a=null,l=u&&!!this.eat(TokenType$1.MUL),o=this.allowYieldExpression,c=this.allowAwaitExpression,A=this.firstAwaitLocation;if(e&&(this.allowYieldExpression=l,this.allowAwaitExpression=i),!this.match(TokenType$1.LPAREN))a=this.parseBindingIdentifier();else if(!e)if(r)a=new AST.BindingIdentifier({name:"*default*"});else throw this.createUnexpected(this.lookahead);this.allowYieldExpression=l,this.allowAwaitExpression=i,this.firstAwaitLocation=null;let d=this.parseParams(),m=this.parseFunctionBody();return this.allowYieldExpression=o,this.allowAwaitExpression=c,this.firstAwaitLocation=A,this.finishNode(new(e?AST.FunctionExpression:AST.FunctionDeclaration)({isAsync:i,isGenerator:l,name:a,params:d,body:m}),n)}parseArrayBinding(){let e=this.startNode();this.expect(TokenType$1.LBRACK);let r=[],u=null;for(;!this.match(TokenType$1.RBRACK);){let i;if(this.eat(TokenType$1.COMMA))i=null;else{if(this.eat(TokenType$1.ELLIPSIS)){u=this.parseBindingTarget();break}else i=this.parseBindingElement();this.match(TokenType$1.RBRACK)||this.expect(TokenType$1.COMMA)}r.push(i)}return this.expect(TokenType$1.RBRACK),this.finishNode(new AST.ArrayBinding({elements:r,rest:u}),e)}parseBindingProperty(){let e=this.startNode(),r=this.matchIdentifier(),u=this.lookahead,{name:i,binding:n}=this.parsePropertyName();if(r&&i.type==="StaticPropertyName"&&!this.match(TokenType$1.COLON)){if(this.allowYieldExpression&&u.value==="yield")throw this.createError(ErrorMessages$1.ILLEGAL_YIELD_IDENTIFIER);if(this.allowAwaitExpression&&u.value==="await")throw this.createError(ErrorMessages$1.ILLEGAL_AWAIT_IDENTIFIER);let a=null;return this.eat(TokenType$1.ASSIGN)&&(a=this.parseAssignmentExpression()),this.finishNode(new AST.BindingPropertyIdentifier({binding:n,init:a}),e)}return this.expect(TokenType$1.COLON),n=this.parseBindingElement(),this.finishNode(new AST.BindingPropertyProperty({name:i,binding:n}),e)}parseObjectBinding(){let e=this.startNode();this.expect(TokenType$1.LBRACE);let r=[],u=null;for(;!this.match(TokenType$1.RBRACE);){if(this.eat(TokenType$1.ELLIPSIS)){u=this.parseBindingIdentifier();break}r.push(this.parseBindingProperty()),this.match(TokenType$1.RBRACE)||this.expect(TokenType$1.COMMA)}return this.expect(TokenType$1.RBRACE),this.finishNode(new AST.ObjectBinding({properties:r,rest:u}),e)}parseBindingTarget(){if(this.matchIdentifier())return this.parseBindingIdentifier();switch(this.lookahead.type){case TokenType$1.LBRACK:return this.parseArrayBinding();case TokenType$1.LBRACE:return this.parseObjectBinding()}throw this.createUnexpected(this.lookahead)}parseBindingElement(){let e=this.startNode(),r=this.parseBindingTarget();if(this.eat(TokenType$1.ASSIGN)){let u=this.parseAssignmentExpression();r=this.finishNode(new AST.BindingWithDefault({binding:r,init:u}),e)}return r}parseParam(){let e=this.inParameter;this.inParameter=!0;let r=this.parseBindingElement();return this.inParameter=e,r}parseParams(){let e=this.startNode();this.expect(TokenType$1.LPAREN);let r=[],u=null;for(;!this.match(TokenType$1.RPAREN);){if(this.eat(TokenType$1.ELLIPSIS)){if(u=this.parseBindingTarget(),this.lookahead.type===TokenType$1.ASSIGN)throw this.createError(ErrorMessages$1.UNEXPECTED_REST_PARAMETERS_INITIALIZATION);if(this.match(TokenType$1.COMMA))throw this.createError(ErrorMessages$1.UNEXPECTED_COMMA_AFTER_REST);break}if(r.push(this.parseParam()),this.match(TokenType$1.RPAREN))break;this.expect(TokenType$1.COMMA)}return this.expect(TokenType$1.RPAREN),this.finishNode(new AST.FormalParameters({items:r,rest:u}),e)}}var parser={GenericParser:GenericParser$1};const director$1={ArrayAssignmentTarget(s,e){return s.reduceArrayAssignmentTarget(e,{elements:e.elements.map(r=>r&&this[r.type](s,r)),rest:e.rest&&this[e.rest.type](s,e.rest)})},ArrayBinding(s,e){return s.reduceArrayBinding(e,{elements:e.elements.map(r=>r&&this[r.type](s,r)),rest:e.rest&&this[e.rest.type](s,e.rest)})},ArrayExpression(s,e){return s.reduceArrayExpression(e,{elements:e.elements.map(r=>r&&this[r.type](s,r))})},ArrowExpression(s,e){return s.reduceArrowExpression(e,{params:this.FormalParameters(s,e.params),body:this[e.body.type](s,e.body)})},AssignmentExpression(s,e){return s.reduceAssignmentExpression(e,{binding:this[e.binding.type](s,e.binding),expression:this[e.expression.type](s,e.expression)})},AssignmentTargetIdentifier(s,e){return s.reduceAssignmentTargetIdentifier(e)},AssignmentTargetPropertyIdentifier(s,e){return s.reduceAssignmentTargetPropertyIdentifier(e,{binding:this.AssignmentTargetIdentifier(s,e.binding),init:e.init&&this[e.init.type](s,e.init)})},AssignmentTargetPropertyProperty(s,e){return s.reduceAssignmentTargetPropertyProperty(e,{name:this[e.name.type](s,e.name),binding:this[e.binding.type](s,e.binding)})},AssignmentTargetWithDefault(s,e){return s.reduceAssignmentTargetWithDefault(e,{binding:this[e.binding.type](s,e.binding),init:this[e.init.type](s,e.init)})},AwaitExpression(s,e){return s.reduceAwaitExpression(e,{expression:this[e.expression.type](s,e.expression)})},BinaryExpression(s,e){return s.reduceBinaryExpression(e,{left:this[e.left.type](s,e.left),right:this[e.right.type](s,e.right)})},BindingIdentifier(s,e){return s.reduceBindingIdentifier(e)},BindingPropertyIdentifier(s,e){return s.reduceBindingPropertyIdentifier(e,{binding:this.BindingIdentifier(s,e.binding),init:e.init&&this[e.init.type](s,e.init)})},BindingPropertyProperty(s,e){return s.reduceBindingPropertyProperty(e,{name:this[e.name.type](s,e.name),binding:this[e.binding.type](s,e.binding)})},BindingWithDefault(s,e){return s.reduceBindingWithDefault(e,{binding:this[e.binding.type](s,e.binding),init:this[e.init.type](s,e.init)})},Block(s,e){return s.reduceBlock(e,{statements:e.statements.map(r=>this[r.type](s,r))})},BlockStatement(s,e){return s.reduceBlockStatement(e,{block:this.Block(s,e.block)})},BreakStatement(s,e){return s.reduceBreakStatement(e)},CallExpression(s,e){return s.reduceCallExpression(e,{callee:this[e.callee.type](s,e.callee),arguments:e.arguments.map(r=>this[r.type](s,r))})},CatchClause(s,e){return s.reduceCatchClause(e,{binding:e.binding&&this[e.binding.type](s,e.binding),body:this.Block(s,e.body)})},ClassDeclaration(s,e){return s.reduceClassDeclaration(e,{name:this.BindingIdentifier(s,e.name),super:e.super&&this[e.super.type](s,e.super),elements:e.elements.map(r=>this.ClassElement(s,r))})},ClassElement(s,e){return s.reduceClassElement(e,{method:this[e.method.type](s,e.method)})},ClassExpression(s,e){return s.reduceClassExpression(e,{name:e.name&&this.BindingIdentifier(s,e.name),super:e.super&&this[e.super.type](s,e.super),elements:e.elements.map(r=>this.ClassElement(s,r))})},CompoundAssignmentExpression(s,e){return s.reduceCompoundAssignmentExpression(e,{binding:this[e.binding.type](s,e.binding),expression:this[e.expression.type](s,e.expression)})},ComputedMemberAssignmentTarget(s,e){return s.reduceComputedMemberAssignmentTarget(e,{object:this[e.object.type](s,e.object),expression:this[e.expression.type](s,e.expression)})},ComputedMemberExpression(s,e){return s.reduceComputedMemberExpression(e,{object:this[e.object.type](s,e.object),expression:this[e.expression.type](s,e.expression)})},ComputedPropertyName(s,e){return s.reduceComputedPropertyName(e,{expression:this[e.expression.type](s,e.expression)})},ConditionalExpression(s,e){return s.reduceConditionalExpression(e,{test:this[e.test.type](s,e.test),consequent:this[e.consequent.type](s,e.consequent),alternate:this[e.alternate.type](s,e.alternate)})},ContinueStatement(s,e){return s.reduceContinueStatement(e)},DataProperty(s,e){return s.reduceDataProperty(e,{name:this[e.name.type](s,e.name),expression:this[e.expression.type](s,e.expression)})},DebuggerStatement(s,e){return s.reduceDebuggerStatement(e)},Directive(s,e){return s.reduceDirective(e)},DoWhileStatement(s,e){return s.reduceDoWhileStatement(e,{body:this[e.body.type](s,e.body),test:this[e.test.type](s,e.test)})},EmptyStatement(s,e){return s.reduceEmptyStatement(e)},Export(s,e){return s.reduceExport(e,{declaration:this[e.declaration.type](s,e.declaration)})},ExportAllFrom(s,e){return s.reduceExportAllFrom(e)},ExportDefault(s,e){return s.reduceExportDefault(e,{body:this[e.body.type](s,e.body)})},ExportFrom(s,e){return s.reduceExportFrom(e,{namedExports:e.namedExports.map(r=>this.ExportFromSpecifier(s,r))})},ExportFromSpecifier(s,e){return s.reduceExportFromSpecifier(e)},ExportLocalSpecifier(s,e){return s.reduceExportLocalSpecifier(e,{name:this.IdentifierExpression(s,e.name)})},ExportLocals(s,e){return s.reduceExportLocals(e,{namedExports:e.namedExports.map(r=>this.ExportLocalSpecifier(s,r))})},ExpressionStatement(s,e){return s.reduceExpressionStatement(e,{expression:this[e.expression.type](s,e.expression)})},ForAwaitStatement(s,e){return s.reduceForAwaitStatement(e,{left:this[e.left.type](s,e.left),right:this[e.right.type](s,e.right),body:this[e.body.type](s,e.body)})},ForInStatement(s,e){return s.reduceForInStatement(e,{left:this[e.left.type](s,e.left),right:this[e.right.type](s,e.right),body:this[e.body.type](s,e.body)})},ForOfStatement(s,e){return s.reduceForOfStatement(e,{left:this[e.left.type](s,e.left),right:this[e.right.type](s,e.right),body:this[e.body.type](s,e.body)})},ForStatement(s,e){return s.reduceForStatement(e,{init:e.init&&this[e.init.type](s,e.init),test:e.test&&this[e.test.type](s,e.test),update:e.update&&this[e.update.type](s,e.update),body:this[e.body.type](s,e.body)})},FormalParameters(s,e){return s.reduceFormalParameters(e,{items:e.items.map(r=>this[r.type](s,r)),rest:e.rest&&this[e.rest.type](s,e.rest)})},FunctionBody(s,e){return s.reduceFunctionBody(e,{directives:e.directives.map(r=>this.Directive(s,r)),statements:e.statements.map(r=>this[r.type](s,r))})},FunctionDeclaration(s,e){return s.reduceFunctionDeclaration(e,{name:this.BindingIdentifier(s,e.name),params:this.FormalParameters(s,e.params),body:this.FunctionBody(s,e.body)})},FunctionExpression(s,e){return s.reduceFunctionExpression(e,{name:e.name&&this.BindingIdentifier(s,e.name),params:this.FormalParameters(s,e.params),body:this.FunctionBody(s,e.body)})},Getter(s,e){return s.reduceGetter(e,{name:this[e.name.type](s,e.name),body:this.FunctionBody(s,e.body)})},IdentifierExpression(s,e){return s.reduceIdentifierExpression(e)},IfStatement(s,e){return s.reduceIfStatement(e,{test:this[e.test.type](s,e.test),consequent:this[e.consequent.type](s,e.consequent),alternate:e.alternate&&this[e.alternate.type](s,e.alternate)})},Import(s,e){return s.reduceImport(e,{defaultBinding:e.defaultBinding&&this.BindingIdentifier(s,e.defaultBinding),namedImports:e.namedImports.map(r=>this.ImportSpecifier(s,r))})},ImportNamespace(s,e){return s.reduceImportNamespace(e,{defaultBinding:e.defaultBinding&&this.BindingIdentifier(s,e.defaultBinding),namespaceBinding:this.BindingIdentifier(s,e.namespaceBinding)})},ImportSpecifier(s,e){return s.reduceImportSpecifier(e,{binding:this.BindingIdentifier(s,e.binding)})},LabeledStatement(s,e){return s.reduceLabeledStatement(e,{body:this[e.body.type](s,e.body)})},LiteralBooleanExpression(s,e){return s.reduceLiteralBooleanExpression(e)},LiteralInfinityExpression(s,e){return s.reduceLiteralInfinityExpression(e)},LiteralNullExpression(s,e){return s.reduceLiteralNullExpression(e)},LiteralNumericExpression(s,e){return s.reduceLiteralNumericExpression(e)},LiteralRegExpExpression(s,e){return s.reduceLiteralRegExpExpression(e)},LiteralStringExpression(s,e){return s.reduceLiteralStringExpression(e)},Method(s,e){return s.reduceMethod(e,{name:this[e.name.type](s,e.name),params:this.FormalParameters(s,e.params),body:this.FunctionBody(s,e.body)})},Module(s,e){return s.reduceModule(e,{directives:e.directives.map(r=>this.Directive(s,r)),items:e.items.map(r=>this[r.type](s,r))})},NewExpression(s,e){return s.reduceNewExpression(e,{callee:this[e.callee.type](s,e.callee),arguments:e.arguments.map(r=>this[r.type](s,r))})},NewTargetExpression(s,e){return s.reduceNewTargetExpression(e)},ObjectAssignmentTarget(s,e){return s.reduceObjectAssignmentTarget(e,{properties:e.properties.map(r=>this[r.type](s,r)),rest:e.rest&&this[e.rest.type](s,e.rest)})},ObjectBinding(s,e){return s.reduceObjectBinding(e,{properties:e.properties.map(r=>this[r.type](s,r)),rest:e.rest&&this.BindingIdentifier(s,e.rest)})},ObjectExpression(s,e){return s.reduceObjectExpression(e,{properties:e.properties.map(r=>this[r.type](s,r))})},ReturnStatement(s,e){return s.reduceReturnStatement(e,{expression:e.expression&&this[e.expression.type](s,e.expression)})},Script(s,e){return s.reduceScript(e,{directives:e.directives.map(r=>this.Directive(s,r)),statements:e.statements.map(r=>this[r.type](s,r))})},Setter(s,e){return s.reduceSetter(e,{name:this[e.name.type](s,e.name),param:this[e.param.type](s,e.param),body:this.FunctionBody(s,e.body)})},ShorthandProperty(s,e){return s.reduceShorthandProperty(e,{name:this.IdentifierExpression(s,e.name)})},SpreadElement(s,e){return s.reduceSpreadElement(e,{expression:this[e.expression.type](s,e.expression)})},SpreadProperty(s,e){return s.reduceSpreadProperty(e,{expression:this[e.expression.type](s,e.expression)})},StaticMemberAssignmentTarget(s,e){return s.reduceStaticMemberAssignmentTarget(e,{object:this[e.object.type](s,e.object)})},StaticMemberExpression(s,e){return s.reduceStaticMemberExpression(e,{object:this[e.object.type](s,e.object)})},StaticPropertyName(s,e){return s.reduceStaticPropertyName(e)},Super(s,e){return s.reduceSuper(e)},SwitchCase(s,e){return s.reduceSwitchCase(e,{test:this[e.test.type](s,e.test),consequent:e.consequent.map(r=>this[r.type](s,r))})},SwitchDefault(s,e){return s.reduceSwitchDefault(e,{consequent:e.consequent.map(r=>this[r.type](s,r))})},SwitchStatement(s,e){return s.reduceSwitchStatement(e,{discriminant:this[e.discriminant.type](s,e.discriminant),cases:e.cases.map(r=>this.SwitchCase(s,r))})},SwitchStatementWithDefault(s,e){return s.reduceSwitchStatementWithDefault(e,{discriminant:this[e.discriminant.type](s,e.discriminant),preDefaultCases:e.preDefaultCases.map(r=>this.SwitchCase(s,r)),defaultCase:this.SwitchDefault(s,e.defaultCase),postDefaultCases:e.postDefaultCases.map(r=>this.SwitchCase(s,r))})},TemplateElement(s,e){return s.reduceTemplateElement(e)},TemplateExpression(s,e){return s.reduceTemplateExpression(e,{tag:e.tag&&this[e.tag.type](s,e.tag),elements:e.elements.map(r=>this[r.type](s,r))})},ThisExpression(s,e){return s.reduceThisExpression(e)},ThrowStatement(s,e){return s.reduceThrowStatement(e,{expression:this[e.expression.type](s,e.expression)})},TryCatchStatement(s,e){return s.reduceTryCatchStatement(e,{body:this.Block(s,e.body),catchClause:this.CatchClause(s,e.catchClause)})},TryFinallyStatement(s,e){return s.reduceTryFinallyStatement(e,{body:this.Block(s,e.body),catchClause:e.catchClause&&this.CatchClause(s,e.catchClause),finalizer:this.Block(s,e.finalizer)})},UnaryExpression(s,e){return s.reduceUnaryExpression(e,{operand:this[e.operand.type](s,e.operand)})},UpdateExpression(s,e){return s.reduceUpdateExpression(e,{operand:this[e.operand.type](s,e.operand)})},VariableDeclaration(s,e){return s.reduceVariableDeclaration(e,{declarators:e.declarators.map(r=>this.VariableDeclarator(s,r))})},VariableDeclarationStatement(s,e){return s.reduceVariableDeclarationStatement(e,{declaration:this.VariableDeclaration(s,e.declaration)})},VariableDeclarator(s,e){return s.reduceVariableDeclarator(e,{binding:this[e.binding.type](s,e.binding),init:e.init&&this[e.init.type](s,e.init)})},WhileStatement(s,e){return s.reduceWhileStatement(e,{test:this[e.test.type](s,e.test),body:this[e.body.type](s,e.body)})},WithStatement(s,e){return s.reduceWithStatement(e,{object:this[e.object.type](s,e.object),body:this[e.body.type](s,e.body)})},YieldExpression(s,e){return s.reduceYieldExpression(e,{expression:e.expression&&this[e.expression.type](s,e.expression)})},YieldGeneratorExpression(s,e){return s.reduceYieldGeneratorExpression(e,{expression:this[e.expression.type](s,e.expression)})}};var director_1=function s(e,r){return director$1[r.type](e,r)};const director={ArrayAssignmentTarget(s,e){return s.reduceArrayAssignmentTarget(e,{elements:e.elements.map(r=>r&&(()=>this[r.type](s,r))),rest:e.rest&&(()=>this[e.rest.type](s,e.rest))})},ArrayBinding(s,e){return s.reduceArrayBinding(e,{elements:e.elements.map(r=>r&&(()=>this[r.type](s,r))),rest:e.rest&&(()=>this[e.rest.type](s,e.rest))})},ArrayExpression(s,e){return s.reduceArrayExpression(e,{elements:e.elements.map(r=>r&&(()=>this[r.type](s,r)))})},ArrowExpression(s,e){return s.reduceArrowExpression(e,{params:()=>this.FormalParameters(s,e.params),body:()=>this[e.body.type](s,e.body)})},AssignmentExpression(s,e){return s.reduceAssignmentExpression(e,{binding:()=>this[e.binding.type](s,e.binding),expression:()=>this[e.expression.type](s,e.expression)})},AssignmentTargetIdentifier(s,e){return s.reduceAssignmentTargetIdentifier(e)},AssignmentTargetPropertyIdentifier(s,e){return s.reduceAssignmentTargetPropertyIdentifier(e,{binding:()=>this.AssignmentTargetIdentifier(s,e.binding),init:e.init&&(()=>this[e.init.type](s,e.init))})},AssignmentTargetPropertyProperty(s,e){return s.reduceAssignmentTargetPropertyProperty(e,{name:()=>this[e.name.type](s,e.name),binding:()=>this[e.binding.type](s,e.binding)})},AssignmentTargetWithDefault(s,e){return s.reduceAssignmentTargetWithDefault(e,{binding:()=>this[e.binding.type](s,e.binding),init:()=>this[e.init.type](s,e.init)})},AwaitExpression(s,e){return s.reduceAwaitExpression(e,{expression:()=>this[e.expression.type](s,e.expression)})},BinaryExpression(s,e){return s.reduceBinaryExpression(e,{left:()=>this[e.left.type](s,e.left),right:()=>this[e.right.type](s,e.right)})},BindingIdentifier(s,e){return s.reduceBindingIdentifier(e)},BindingPropertyIdentifier(s,e){return s.reduceBindingPropertyIdentifier(e,{binding:()=>this.BindingIdentifier(s,e.binding),init:e.init&&(()=>this[e.init.type](s,e.init))})},BindingPropertyProperty(s,e){return s.reduceBindingPropertyProperty(e,{name:()=>this[e.name.type](s,e.name),binding:()=>this[e.binding.type](s,e.binding)})},BindingWithDefault(s,e){return s.reduceBindingWithDefault(e,{binding:()=>this[e.binding.type](s,e.binding),init:()=>this[e.init.type](s,e.init)})},Block(s,e){return s.reduceBlock(e,{statements:e.statements.map(r=>()=>this[r.type](s,r))})},BlockStatement(s,e){return s.reduceBlockStatement(e,{block:()=>this.Block(s,e.block)})},BreakStatement(s,e){return s.reduceBreakStatement(e)},CallExpression(s,e){return s.reduceCallExpression(e,{callee:()=>this[e.callee.type](s,e.callee),arguments:e.arguments.map(r=>()=>this[r.type](s,r))})},CatchClause(s,e){return s.reduceCatchClause(e,{binding:e.binding&&(()=>this[e.binding.type](s,e.binding)),body:()=>this.Block(s,e.body)})},ClassDeclaration(s,e){return s.reduceClassDeclaration(e,{name:()=>this.BindingIdentifier(s,e.name),super:e.super&&(()=>this[e.super.type](s,e.super)),elements:e.elements.map(r=>()=>this.ClassElement(s,r))})},ClassElement(s,e){return s.reduceClassElement(e,{method:()=>this[e.method.type](s,e.method)})},ClassExpression(s,e){return s.reduceClassExpression(e,{name:e.name&&(()=>this.BindingIdentifier(s,e.name)),super:e.super&&(()=>this[e.super.type](s,e.super)),elements:e.elements.map(r=>()=>this.ClassElement(s,r))})},CompoundAssignmentExpression(s,e){return s.reduceCompoundAssignmentExpression(e,{binding:()=>this[e.binding.type](s,e.binding),expression:()=>this[e.expression.type](s,e.expression)})},ComputedMemberAssignmentTarget(s,e){return s.reduceComputedMemberAssignmentTarget(e,{object:()=>this[e.object.type](s,e.object),expression:()=>this[e.expression.type](s,e.expression)})},ComputedMemberExpression(s,e){return s.reduceComputedMemberExpression(e,{object:()=>this[e.object.type](s,e.object),expression:()=>this[e.expression.type](s,e.expression)})},ComputedPropertyName(s,e){return s.reduceComputedPropertyName(e,{expression:()=>this[e.expression.type](s,e.expression)})},ConditionalExpression(s,e){return s.reduceConditionalExpression(e,{test:()=>this[e.test.type](s,e.test),consequent:()=>this[e.consequent.type](s,e.consequent),alternate:()=>this[e.alternate.type](s,e.alternate)})},ContinueStatement(s,e){return s.reduceContinueStatement(e)},DataProperty(s,e){return s.reduceDataProperty(e,{name:()=>this[e.name.type](s,e.name),expression:()=>this[e.expression.type](s,e.expression)})},DebuggerStatement(s,e){return s.reduceDebuggerStatement(e)},Directive(s,e){return s.reduceDirective(e)},DoWhileStatement(s,e){return s.reduceDoWhileStatement(e,{body:()=>this[e.body.type](s,e.body),test:()=>this[e.test.type](s,e.test)})},EmptyStatement(s,e){return s.reduceEmptyStatement(e)},Export(s,e){return s.reduceExport(e,{declaration:()=>this[e.declaration.type](s,e.declaration)})},ExportAllFrom(s,e){return s.reduceExportAllFrom(e)},ExportDefault(s,e){return s.reduceExportDefault(e,{body:()=>this[e.body.type](s,e.body)})},ExportFrom(s,e){return s.reduceExportFrom(e,{namedExports:e.namedExports.map(r=>()=>this.ExportFromSpecifier(s,r))})},ExportFromSpecifier(s,e){return s.reduceExportFromSpecifier(e)},ExportLocalSpecifier(s,e){return s.reduceExportLocalSpecifier(e,{name:()=>this.IdentifierExpression(s,e.name)})},ExportLocals(s,e){return s.reduceExportLocals(e,{namedExports:e.namedExports.map(r=>()=>this.ExportLocalSpecifier(s,r))})},ExpressionStatement(s,e){return s.reduceExpressionStatement(e,{expression:()=>this[e.expression.type](s,e.expression)})},ForAwaitStatement(s,e){return s.reduceForAwaitStatement(e,{left:()=>this[e.left.type](s,e.left),right:()=>this[e.right.type](s,e.right),body:()=>this[e.body.type](s,e.body)})},ForInStatement(s,e){return s.reduceForInStatement(e,{left:()=>this[e.left.type](s,e.left),right:()=>this[e.right.type](s,e.right),body:()=>this[e.body.type](s,e.body)})},ForOfStatement(s,e){return s.reduceForOfStatement(e,{left:()=>this[e.left.type](s,e.left),right:()=>this[e.right.type](s,e.right),body:()=>this[e.body.type](s,e.body)})},ForStatement(s,e){return s.reduceForStatement(e,{init:e.init&&(()=>this[e.init.type](s,e.init)),test:e.test&&(()=>this[e.test.type](s,e.test)),update:e.update&&(()=>this[e.update.type](s,e.update)),body:()=>this[e.body.type](s,e.body)})},FormalParameters(s,e){return s.reduceFormalParameters(e,{items:e.items.map(r=>()=>this[r.type](s,r)),rest:e.rest&&(()=>this[e.rest.type](s,e.rest))})},FunctionBody(s,e){return s.reduceFunctionBody(e,{directives:e.directives.map(r=>()=>this.Directive(s,r)),statements:e.statements.map(r=>()=>this[r.type](s,r))})},FunctionDeclaration(s,e){return s.reduceFunctionDeclaration(e,{name:()=>this.BindingIdentifier(s,e.name),params:()=>this.FormalParameters(s,e.params),body:()=>this.FunctionBody(s,e.body)})},FunctionExpression(s,e){return s.reduceFunctionExpression(e,{name:e.name&&(()=>this.BindingIdentifier(s,e.name)),params:()=>this.FormalParameters(s,e.params),body:()=>this.FunctionBody(s,e.body)})},Getter(s,e){return s.reduceGetter(e,{name:()=>this[e.name.type](s,e.name),body:()=>this.FunctionBody(s,e.body)})},IdentifierExpression(s,e){return s.reduceIdentifierExpression(e)},IfStatement(s,e){return s.reduceIfStatement(e,{test:()=>this[e.test.type](s,e.test),consequent:()=>this[e.consequent.type](s,e.consequent),alternate:e.alternate&&(()=>this[e.alternate.type](s,e.alternate))})},Import(s,e){return s.reduceImport(e,{defaultBinding:e.defaultBinding&&(()=>this.BindingIdentifier(s,e.defaultBinding)),namedImports:e.namedImports.map(r=>()=>this.ImportSpecifier(s,r))})},ImportNamespace(s,e){return s.reduceImportNamespace(e,{defaultBinding:e.defaultBinding&&(()=>this.BindingIdentifier(s,e.defaultBinding)),namespaceBinding:()=>this.BindingIdentifier(s,e.namespaceBinding)})},ImportSpecifier(s,e){return s.reduceImportSpecifier(e,{binding:()=>this.BindingIdentifier(s,e.binding)})},LabeledStatement(s,e){return s.reduceLabeledStatement(e,{body:()=>this[e.body.type](s,e.body)})},LiteralBooleanExpression(s,e){return s.reduceLiteralBooleanExpression(e)},LiteralInfinityExpression(s,e){return s.reduceLiteralInfinityExpression(e)},LiteralNullExpression(s,e){return s.reduceLiteralNullExpression(e)},LiteralNumericExpression(s,e){return s.reduceLiteralNumericExpression(e)},LiteralRegExpExpression(s,e){return s.reduceLiteralRegExpExpression(e)},LiteralStringExpression(s,e){return s.reduceLiteralStringExpression(e)},Method(s,e){return s.reduceMethod(e,{name:()=>this[e.name.type](s,e.name),params:()=>this.FormalParameters(s,e.params),body:()=>this.FunctionBody(s,e.body)})},Module(s,e){return s.reduceModule(e,{directives:e.directives.map(r=>()=>this.Directive(s,r)),items:e.items.map(r=>()=>this[r.type](s,r))})},NewExpression(s,e){return s.reduceNewExpression(e,{callee:()=>this[e.callee.type](s,e.callee),arguments:e.arguments.map(r=>()=>this[r.type](s,r))})},NewTargetExpression(s,e){return s.reduceNewTargetExpression(e)},ObjectAssignmentTarget(s,e){return s.reduceObjectAssignmentTarget(e,{properties:e.properties.map(r=>()=>this[r.type](s,r)),rest:e.rest&&(()=>this[e.rest.type](s,e.rest))})},ObjectBinding(s,e){return s.reduceObjectBinding(e,{properties:e.properties.map(r=>()=>this[r.type](s,r)),rest:e.rest&&(()=>this.BindingIdentifier(s,e.rest))})},ObjectExpression(s,e){return s.reduceObjectExpression(e,{properties:e.properties.map(r=>()=>this[r.type](s,r))})},ReturnStatement(s,e){return s.reduceReturnStatement(e,{expression:e.expression&&(()=>this[e.expression.type](s,e.expression))})},Script(s,e){return s.reduceScript(e,{directives:e.directives.map(r=>()=>this.Directive(s,r)),statements:e.statements.map(r=>()=>this[r.type](s,r))})},Setter(s,e){return s.reduceSetter(e,{name:()=>this[e.name.type](s,e.name),param:()=>this[e.param.type](s,e.param),body:()=>this.FunctionBody(s,e.body)})},ShorthandProperty(s,e){return s.reduceShorthandProperty(e,{name:()=>this.IdentifierExpression(s,e.name)})},SpreadElement(s,e){return s.reduceSpreadElement(e,{expression:()=>this[e.expression.type](s,e.expression)})},SpreadProperty(s,e){return s.reduceSpreadProperty(e,{expression:()=>this[e.expression.type](s,e.expression)})},StaticMemberAssignmentTarget(s,e){return s.reduceStaticMemberAssignmentTarget(e,{object:()=>this[e.object.type](s,e.object)})},StaticMemberExpression(s,e){return s.reduceStaticMemberExpression(e,{object:()=>this[e.object.type](s,e.object)})},StaticPropertyName(s,e){return s.reduceStaticPropertyName(e)},Super(s,e){return s.reduceSuper(e)},SwitchCase(s,e){return s.reduceSwitchCase(e,{test:()=>this[e.test.type](s,e.test),consequent:e.consequent.map(r=>()=>this[r.type](s,r))})},SwitchDefault(s,e){return s.reduceSwitchDefault(e,{consequent:e.consequent.map(r=>()=>this[r.type](s,r))})},SwitchStatement(s,e){return s.reduceSwitchStatement(e,{discriminant:()=>this[e.discriminant.type](s,e.discriminant),cases:e.cases.map(r=>()=>this.SwitchCase(s,r))})},SwitchStatementWithDefault(s,e){return s.reduceSwitchStatementWithDefault(e,{discriminant:()=>this[e.discriminant.type](s,e.discriminant),preDefaultCases:e.preDefaultCases.map(r=>()=>this.SwitchCase(s,r)),defaultCase:()=>this.SwitchDefault(s,e.defaultCase),postDefaultCases:e.postDefaultCases.map(r=>()=>this.SwitchCase(s,r))})},TemplateElement(s,e){return s.reduceTemplateElement(e)},TemplateExpression(s,e){return s.reduceTemplateExpression(e,{tag:e.tag&&(()=>this[e.tag.type](s,e.tag)),elements:e.elements.map(r=>()=>this[r.type](s,r))})},ThisExpression(s,e){return s.reduceThisExpression(e)},ThrowStatement(s,e){return s.reduceThrowStatement(e,{expression:()=>this[e.expression.type](s,e.expression)})},TryCatchStatement(s,e){return s.reduceTryCatchStatement(e,{body:()=>this.Block(s,e.body),catchClause:()=>this.CatchClause(s,e.catchClause)})},TryFinallyStatement(s,e){return s.reduceTryFinallyStatement(e,{body:()=>this.Block(s,e.body),catchClause:e.catchClause&&(()=>this.CatchClause(s,e.catchClause)),finalizer:()=>this.Block(s,e.finalizer)})},UnaryExpression(s,e){return s.reduceUnaryExpression(e,{operand:()=>this[e.operand.type](s,e.operand)})},UpdateExpression(s,e){return s.reduceUpdateExpression(e,{operand:()=>this[e.operand.type](s,e.operand)})},VariableDeclaration(s,e){return s.reduceVariableDeclaration(e,{declarators:e.declarators.map(r=>()=>this.VariableDeclarator(s,r))})},VariableDeclarationStatement(s,e){return s.reduceVariableDeclarationStatement(e,{declaration:()=>this.VariableDeclaration(s,e.declaration)})},VariableDeclarator(s,e){return s.reduceVariableDeclarator(e,{binding:()=>this[e.binding.type](s,e.binding),init:e.init&&(()=>this[e.init.type](s,e.init))})},WhileStatement(s,e){return s.reduceWhileStatement(e,{test:()=>this[e.test.type](s,e.test),body:()=>this[e.body.type](s,e.body)})},WithStatement(s,e){return s.reduceWithStatement(e,{object:()=>this[e.object.type](s,e.object),body:()=>this[e.body.type](s,e.body)})},YieldExpression(s,e){return s.reduceYieldExpression(e,{expression:e.expression&&(()=>this[e.expression.type](s,e.expression))})},YieldGeneratorExpression(s,e){return s.reduceYieldGeneratorExpression(e,{expression:()=>this[e.expression.type](s,e.expression)})}};var thunkedDirector=function s(e,r){return director[r.type](e,r)},thunkify$1=function s(e){return{reduceArrayAssignmentTarget(r,{elements:u,rest:i}){return e.reduceArrayAssignmentTarget(r,{elements:u.map(n=>n==null?null:n()),rest:i==null?null:i()})},reduceArrayBinding(r,{elements:u,rest:i}){return e.reduceArrayBinding(r,{elements:u.map(n=>n==null?null:n()),rest:i==null?null:i()})},reduceArrayExpression(r,{elements:u}){return e.reduceArrayExpression(r,{elements:u.map(i=>i==null?null:i())})},reduceArrowExpression(r,{params:u,body:i}){return e.reduceArrowExpression(r,{params:u(),body:i()})},reduceAssignmentExpression(r,{binding:u,expression:i}){return e.reduceAssignmentExpression(r,{binding:u(),expression:i()})},reduceAssignmentTargetIdentifier(r){return e.reduceAssignmentTargetIdentifier(r)},reduceAssignmentTargetPropertyIdentifier(r,{binding:u,init:i}){return e.reduceAssignmentTargetPropertyIdentifier(r,{binding:u(),init:i==null?null:i()})},reduceAssignmentTargetPropertyProperty(r,{name:u,binding:i}){return e.reduceAssignmentTargetPropertyProperty(r,{name:u(),binding:i()})},reduceAssignmentTargetWithDefault(r,{binding:u,init:i}){return e.reduceAssignmentTargetWithDefault(r,{binding:u(),init:i()})},reduceAwaitExpression(r,{expression:u}){return e.reduceAwaitExpression(r,{expression:u()})},reduceBinaryExpression(r,{left:u,right:i}){return e.reduceBinaryExpression(r,{left:u(),right:i()})},reduceBindingIdentifier(r){return e.reduceBindingIdentifier(r)},reduceBindingPropertyIdentifier(r,{binding:u,init:i}){return e.reduceBindingPropertyIdentifier(r,{binding:u(),init:i==null?null:i()})},reduceBindingPropertyProperty(r,{name:u,binding:i}){return e.reduceBindingPropertyProperty(r,{name:u(),binding:i()})},reduceBindingWithDefault(r,{binding:u,init:i}){return e.reduceBindingWithDefault(r,{binding:u(),init:i()})},reduceBlock(r,{statements:u}){return e.reduceBlock(r,{statements:u.map(i=>i())})},reduceBlockStatement(r,{block:u}){return e.reduceBlockStatement(r,{block:u()})},reduceBreakStatement(r){return e.reduceBreakStatement(r)},reduceCallExpression(r,{callee:u,arguments:i}){return e.reduceCallExpression(r,{callee:u(),arguments:i.map(n=>n())})},reduceCatchClause(r,{binding:u,body:i}){return e.reduceCatchClause(r,{binding:u==null?null:u(),body:i()})},reduceClassDeclaration(r,{name:u,super:i,elements:n}){return e.reduceClassDeclaration(r,{name:u(),super:i==null?null:i(),elements:n.map(a=>a())})},reduceClassElement(r,{method:u}){return e.reduceClassElement(r,{method:u()})},reduceClassExpression(r,{name:u,super:i,elements:n}){return e.reduceClassExpression(r,{name:u==null?null:u(),super:i==null?null:i(),elements:n.map(a=>a())})},reduceCompoundAssignmentExpression(r,{binding:u,expression:i}){return e.reduceCompoundAssignmentExpression(r,{binding:u(),expression:i()})},reduceComputedMemberAssignmentTarget(r,{object:u,expression:i}){return e.reduceComputedMemberAssignmentTarget(r,{object:u(),expression:i()})},reduceComputedMemberExpression(r,{object:u,expression:i}){return e.reduceComputedMemberExpression(r,{object:u(),expression:i()})},reduceComputedPropertyName(r,{expression:u}){return e.reduceComputedPropertyName(r,{expression:u()})},reduceConditionalExpression(r,{test:u,consequent:i,alternate:n}){return e.reduceConditionalExpression(r,{test:u(),consequent:i(),alternate:n()})},reduceContinueStatement(r){return e.reduceContinueStatement(r)},reduceDataProperty(r,{name:u,expression:i}){return e.reduceDataProperty(r,{name:u(),expression:i()})},reduceDebuggerStatement(r){return e.reduceDebuggerStatement(r)},reduceDirective(r){return e.reduceDirective(r)},reduceDoWhileStatement(r,{body:u,test:i}){return e.reduceDoWhileStatement(r,{body:u(),test:i()})},reduceEmptyStatement(r){return e.reduceEmptyStatement(r)},reduceExport(r,{declaration:u}){return e.reduceExport(r,{declaration:u()})},reduceExportAllFrom(r){return e.reduceExportAllFrom(r)},reduceExportDefault(r,{body:u}){return e.reduceExportDefault(r,{body:u()})},reduceExportFrom(r,{namedExports:u}){return e.reduceExportFrom(r,{namedExports:u.map(i=>i())})},reduceExportFromSpecifier(r){return e.reduceExportFromSpecifier(r)},reduceExportLocalSpecifier(r,{name:u}){return e.reduceExportLocalSpecifier(r,{name:u()})},reduceExportLocals(r,{namedExports:u}){return e.reduceExportLocals(r,{namedExports:u.map(i=>i())})},reduceExpressionStatement(r,{expression:u}){return e.reduceExpressionStatement(r,{expression:u()})},reduceForAwaitStatement(r,{left:u,right:i,body:n}){return e.reduceForAwaitStatement(r,{left:u(),right:i(),body:n()})},reduceForInStatement(r,{left:u,right:i,body:n}){return e.reduceForInStatement(r,{left:u(),right:i(),body:n()})},reduceForOfStatement(r,{left:u,right:i,body:n}){return e.reduceForOfStatement(r,{left:u(),right:i(),body:n()})},reduceForStatement(r,{init:u,test:i,update:n,body:a}){return e.reduceForStatement(r,{init:u==null?null:u(),test:i==null?null:i(),update:n==null?null:n(),body:a()})},reduceFormalParameters(r,{items:u,rest:i}){return e.reduceFormalParameters(r,{items:u.map(n=>n()),rest:i==null?null:i()})},reduceFunctionBody(r,{directives:u,statements:i}){return e.reduceFunctionBody(r,{directives:u.map(n=>n()),statements:i.map(n=>n())})},reduceFunctionDeclaration(r,{name:u,params:i,body:n}){return e.reduceFunctionDeclaration(r,{name:u(),params:i(),body:n()})},reduceFunctionExpression(r,{name:u,params:i,body:n}){return e.reduceFunctionExpression(r,{name:u==null?null:u(),params:i(),body:n()})},reduceGetter(r,{name:u,body:i}){return e.reduceGetter(r,{name:u(),body:i()})},reduceIdentifierExpression(r){return e.reduceIdentifierExpression(r)},reduceIfStatement(r,{test:u,consequent:i,alternate:n}){return e.reduceIfStatement(r,{test:u(),consequent:i(),alternate:n==null?null:n()})},reduceImport(r,{defaultBinding:u,namedImports:i}){return e.reduceImport(r,{defaultBinding:u==null?null:u(),namedImports:i.map(n=>n())})},reduceImportNamespace(r,{defaultBinding:u,namespaceBinding:i}){return e.reduceImportNamespace(r,{defaultBinding:u==null?null:u(),namespaceBinding:i()})},reduceImportSpecifier(r,{binding:u}){return e.reduceImportSpecifier(r,{binding:u()})},reduceLabeledStatement(r,{body:u}){return e.reduceLabeledStatement(r,{body:u()})},reduceLiteralBooleanExpression(r){return e.reduceLiteralBooleanExpression(r)},reduceLiteralInfinityExpression(r){return e.reduceLiteralInfinityExpression(r)},reduceLiteralNullExpression(r){return e.reduceLiteralNullExpression(r)},reduceLiteralNumericExpression(r){return e.reduceLiteralNumericExpression(r)},reduceLiteralRegExpExpression(r){return e.reduceLiteralRegExpExpression(r)},reduceLiteralStringExpression(r){return e.reduceLiteralStringExpression(r)},reduceMethod(r,{name:u,params:i,body:n}){return e.reduceMethod(r,{name:u(),params:i(),body:n()})},reduceModule(r,{directives:u,items:i}){return e.reduceModule(r,{directives:u.map(n=>n()),items:i.map(n=>n())})},reduceNewExpression(r,{callee:u,arguments:i}){return e.reduceNewExpression(r,{callee:u(),arguments:i.map(n=>n())})},reduceNewTargetExpression(r){return e.reduceNewTargetExpression(r)},reduceObjectAssignmentTarget(r,{properties:u,rest:i}){return e.reduceObjectAssignmentTarget(r,{properties:u.map(n=>n()),rest:i==null?null:i()})},reduceObjectBinding(r,{properties:u,rest:i}){return e.reduceObjectBinding(r,{properties:u.map(n=>n()),rest:i==null?null:i()})},reduceObjectExpression(r,{properties:u}){return e.reduceObjectExpression(r,{properties:u.map(i=>i())})},reduceReturnStatement(r,{expression:u}){return e.reduceReturnStatement(r,{expression:u==null?null:u()})},reduceScript(r,{directives:u,statements:i}){return e.reduceScript(r,{directives:u.map(n=>n()),statements:i.map(n=>n())})},reduceSetter(r,{name:u,param:i,body:n}){return e.reduceSetter(r,{name:u(),param:i(),body:n()})},reduceShorthandProperty(r,{name:u}){return e.reduceShorthandProperty(r,{name:u()})},reduceSpreadElement(r,{expression:u}){return e.reduceSpreadElement(r,{expression:u()})},reduceSpreadProperty(r,{expression:u}){return e.reduceSpreadProperty(r,{expression:u()})},reduceStaticMemberAssignmentTarget(r,{object:u}){return e.reduceStaticMemberAssignmentTarget(r,{object:u()})},reduceStaticMemberExpression(r,{object:u}){return e.reduceStaticMemberExpression(r,{object:u()})},reduceStaticPropertyName(r){return e.reduceStaticPropertyName(r)},reduceSuper(r){return e.reduceSuper(r)},reduceSwitchCase(r,{test:u,consequent:i}){return e.reduceSwitchCase(r,{test:u(),consequent:i.map(n=>n())})},reduceSwitchDefault(r,{consequent:u}){return e.reduceSwitchDefault(r,{consequent:u.map(i=>i())})},reduceSwitchStatement(r,{discriminant:u,cases:i}){return e.reduceSwitchStatement(r,{discriminant:u(),cases:i.map(n=>n())})},reduceSwitchStatementWithDefault(r,{discriminant:u,preDefaultCases:i,defaultCase:n,postDefaultCases:a}){return e.reduceSwitchStatementWithDefault(r,{discriminant:u(),preDefaultCases:i.map(l=>l()),defaultCase:n(),postDefaultCases:a.map(l=>l())})},reduceTemplateElement(r){return e.reduceTemplateElement(r)},reduceTemplateExpression(r,{tag:u,elements:i}){return e.reduceTemplateExpression(r,{tag:u==null?null:u(),elements:i.map(n=>n())})},reduceThisExpression(r){return e.reduceThisExpression(r)},reduceThrowStatement(r,{expression:u}){return e.reduceThrowStatement(r,{expression:u()})},reduceTryCatchStatement(r,{body:u,catchClause:i}){return e.reduceTryCatchStatement(r,{body:u(),catchClause:i()})},reduceTryFinallyStatement(r,{body:u,catchClause:i,finalizer:n}){return e.reduceTryFinallyStatement(r,{body:u(),catchClause:i==null?null:i(),finalizer:n()})},reduceUnaryExpression(r,{operand:u}){return e.reduceUnaryExpression(r,{operand:u()})},reduceUpdateExpression(r,{operand:u}){return e.reduceUpdateExpression(r,{operand:u()})},reduceVariableDeclaration(r,{declarators:u}){return e.reduceVariableDeclaration(r,{declarators:u.map(i=>i())})},reduceVariableDeclarationStatement(r,{declaration:u}){return e.reduceVariableDeclarationStatement(r,{declaration:u()})},reduceVariableDeclarator(r,{binding:u,init:i}){return e.reduceVariableDeclarator(r,{binding:u(),init:i==null?null:i()})},reduceWhileStatement(r,{test:u,body:i}){return e.reduceWhileStatement(r,{test:u(),body:i()})},reduceWithStatement(r,{object:u,body:i}){return e.reduceWithStatement(r,{object:u(),body:i()})},reduceYieldExpression(r,{expression:u}){return e.reduceYieldExpression(r,{expression:u==null?null:u()})},reduceYieldGeneratorExpression(r,{expression:u}){return e.reduceYieldGeneratorExpression(r,{expression:u()})}}},thunkifyClass$1=function s(e){return class extends e{reduceArrayAssignmentTarget(r,{elements:u,rest:i}){return super.reduceArrayAssignmentTarget(r,{elements:u.map(n=>n==null?null:n()),rest:i==null?null:i()})}reduceArrayBinding(r,{elements:u,rest:i}){return super.reduceArrayBinding(r,{elements:u.map(n=>n==null?null:n()),rest:i==null?null:i()})}reduceArrayExpression(r,{elements:u}){return super.reduceArrayExpression(r,{elements:u.map(i=>i==null?null:i())})}reduceArrowExpression(r,{params:u,body:i}){return super.reduceArrowExpression(r,{params:u(),body:i()})}reduceAssignmentExpression(r,{binding:u,expression:i}){return super.reduceAssignmentExpression(r,{binding:u(),expression:i()})}reduceAssignmentTargetIdentifier(r){return super.reduceAssignmentTargetIdentifier(r)}reduceAssignmentTargetPropertyIdentifier(r,{binding:u,init:i}){return super.reduceAssignmentTargetPropertyIdentifier(r,{binding:u(),init:i==null?null:i()})}reduceAssignmentTargetPropertyProperty(r,{name:u,binding:i}){return super.reduceAssignmentTargetPropertyProperty(r,{name:u(),binding:i()})}reduceAssignmentTargetWithDefault(r,{binding:u,init:i}){return super.reduceAssignmentTargetWithDefault(r,{binding:u(),init:i()})}reduceAwaitExpression(r,{expression:u}){return super.reduceAwaitExpression(r,{expression:u()})}reduceBinaryExpression(r,{left:u,right:i}){return super.reduceBinaryExpression(r,{left:u(),right:i()})}reduceBindingIdentifier(r){return super.reduceBindingIdentifier(r)}reduceBindingPropertyIdentifier(r,{binding:u,init:i}){return super.reduceBindingPropertyIdentifier(r,{binding:u(),init:i==null?null:i()})}reduceBindingPropertyProperty(r,{name:u,binding:i}){return super.reduceBindingPropertyProperty(r,{name:u(),binding:i()})}reduceBindingWithDefault(r,{binding:u,init:i}){return super.reduceBindingWithDefault(r,{binding:u(),init:i()})}reduceBlock(r,{statements:u}){return super.reduceBlock(r,{statements:u.map(i=>i())})}reduceBlockStatement(r,{block:u}){return super.reduceBlockStatement(r,{block:u()})}reduceBreakStatement(r){return super.reduceBreakStatement(r)}reduceCallExpression(r,{callee:u,arguments:i}){return super.reduceCallExpression(r,{callee:u(),arguments:i.map(n=>n())})}reduceCatchClause(r,{binding:u,body:i}){return super.reduceCatchClause(r,{binding:u==null?null:u(),body:i()})}reduceClassDeclaration(r,{name:u,super:i,elements:n}){return super.reduceClassDeclaration(r,{name:u(),super:i==null?null:i(),elements:n.map(a=>a())})}reduceClassElement(r,{method:u}){return super.reduceClassElement(r,{method:u()})}reduceClassExpression(r,{name:u,super:i,elements:n}){return super.reduceClassExpression(r,{name:u==null?null:u(),super:i==null?null:i(),elements:n.map(a=>a())})}reduceCompoundAssignmentExpression(r,{binding:u,expression:i}){return super.reduceCompoundAssignmentExpression(r,{binding:u(),expression:i()})}reduceComputedMemberAssignmentTarget(r,{object:u,expression:i}){return super.reduceComputedMemberAssignmentTarget(r,{object:u(),expression:i()})}reduceComputedMemberExpression(r,{object:u,expression:i}){return super.reduceComputedMemberExpression(r,{object:u(),expression:i()})}reduceComputedPropertyName(r,{expression:u}){return super.reduceComputedPropertyName(r,{expression:u()})}reduceConditionalExpression(r,{test:u,consequent:i,alternate:n}){return super.reduceConditionalExpression(r,{test:u(),consequent:i(),alternate:n()})}reduceContinueStatement(r){return super.reduceContinueStatement(r)}reduceDataProperty(r,{name:u,expression:i}){return super.reduceDataProperty(r,{name:u(),expression:i()})}reduceDebuggerStatement(r){return super.reduceDebuggerStatement(r)}reduceDirective(r){return super.reduceDirective(r)}reduceDoWhileStatement(r,{body:u,test:i}){return super.reduceDoWhileStatement(r,{body:u(),test:i()})}reduceEmptyStatement(r){return super.reduceEmptyStatement(r)}reduceExport(r,{declaration:u}){return super.reduceExport(r,{declaration:u()})}reduceExportAllFrom(r){return super.reduceExportAllFrom(r)}reduceExportDefault(r,{body:u}){return super.reduceExportDefault(r,{body:u()})}reduceExportFrom(r,{namedExports:u}){return super.reduceExportFrom(r,{namedExports:u.map(i=>i())})}reduceExportFromSpecifier(r){return super.reduceExportFromSpecifier(r)}reduceExportLocalSpecifier(r,{name:u}){return super.reduceExportLocalSpecifier(r,{name:u()})}reduceExportLocals(r,{namedExports:u}){return super.reduceExportLocals(r,{namedExports:u.map(i=>i())})}reduceExpressionStatement(r,{expression:u}){return super.reduceExpressionStatement(r,{expression:u()})}reduceForAwaitStatement(r,{left:u,right:i,body:n}){return super.reduceForAwaitStatement(r,{left:u(),right:i(),body:n()})}reduceForInStatement(r,{left:u,right:i,body:n}){return super.reduceForInStatement(r,{left:u(),right:i(),body:n()})}reduceForOfStatement(r,{left:u,right:i,body:n}){return super.reduceForOfStatement(r,{left:u(),right:i(),body:n()})}reduceForStatement(r,{init:u,test:i,update:n,body:a}){return super.reduceForStatement(r,{init:u==null?null:u(),test:i==null?null:i(),update:n==null?null:n(),body:a()})}reduceFormalParameters(r,{items:u,rest:i}){return super.reduceFormalParameters(r,{items:u.map(n=>n()),rest:i==null?null:i()})}reduceFunctionBody(r,{directives:u,statements:i}){return super.reduceFunctionBody(r,{directives:u.map(n=>n()),statements:i.map(n=>n())})}reduceFunctionDeclaration(r,{name:u,params:i,body:n}){return super.reduceFunctionDeclaration(r,{name:u(),params:i(),body:n()})}reduceFunctionExpression(r,{name:u,params:i,body:n}){return super.reduceFunctionExpression(r,{name:u==null?null:u(),params:i(),body:n()})}reduceGetter(r,{name:u,body:i}){return super.reduceGetter(r,{name:u(),body:i()})}reduceIdentifierExpression(r){return super.reduceIdentifierExpression(r)}reduceIfStatement(r,{test:u,consequent:i,alternate:n}){return super.reduceIfStatement(r,{test:u(),consequent:i(),alternate:n==null?null:n()})}reduceImport(r,{defaultBinding:u,namedImports:i}){return super.reduceImport(r,{defaultBinding:u==null?null:u(),namedImports:i.map(n=>n())})}reduceImportNamespace(r,{defaultBinding:u,namespaceBinding:i}){return super.reduceImportNamespace(r,{defaultBinding:u==null?null:u(),namespaceBinding:i()})}reduceImportSpecifier(r,{binding:u}){return super.reduceImportSpecifier(r,{binding:u()})}reduceLabeledStatement(r,{body:u}){return super.reduceLabeledStatement(r,{body:u()})}reduceLiteralBooleanExpression(r){return super.reduceLiteralBooleanExpression(r)}reduceLiteralInfinityExpression(r){return super.reduceLiteralInfinityExpression(r)}reduceLiteralNullExpression(r){return super.reduceLiteralNullExpression(r)}reduceLiteralNumericExpression(r){return super.reduceLiteralNumericExpression(r)}reduceLiteralRegExpExpression(r){return super.reduceLiteralRegExpExpression(r)}reduceLiteralStringExpression(r){return super.reduceLiteralStringExpression(r)}reduceMethod(r,{name:u,params:i,body:n}){return super.reduceMethod(r,{name:u(),params:i(),body:n()})}reduceModule(r,{directives:u,items:i}){return super.reduceModule(r,{directives:u.map(n=>n()),items:i.map(n=>n())})}reduceNewExpression(r,{callee:u,arguments:i}){return super.reduceNewExpression(r,{callee:u(),arguments:i.map(n=>n())})}reduceNewTargetExpression(r){return super.reduceNewTargetExpression(r)}reduceObjectAssignmentTarget(r,{properties:u,rest:i}){return super.reduceObjectAssignmentTarget(r,{properties:u.map(n=>n()),rest:i==null?null:i()})}reduceObjectBinding(r,{properties:u,rest:i}){return super.reduceObjectBinding(r,{properties:u.map(n=>n()),rest:i==null?null:i()})}reduceObjectExpression(r,{properties:u}){return super.reduceObjectExpression(r,{properties:u.map(i=>i())})}reduceReturnStatement(r,{expression:u}){return super.reduceReturnStatement(r,{expression:u==null?null:u()})}reduceScript(r,{directives:u,statements:i}){return super.reduceScript(r,{directives:u.map(n=>n()),statements:i.map(n=>n())})}reduceSetter(r,{name:u,param:i,body:n}){return super.reduceSetter(r,{name:u(),param:i(),body:n()})}reduceShorthandProperty(r,{name:u}){return super.reduceShorthandProperty(r,{name:u()})}reduceSpreadElement(r,{expression:u}){return super.reduceSpreadElement(r,{expression:u()})}reduceSpreadProperty(r,{expression:u}){return super.reduceSpreadProperty(r,{expression:u()})}reduceStaticMemberAssignmentTarget(r,{object:u}){return super.reduceStaticMemberAssignmentTarget(r,{object:u()})}reduceStaticMemberExpression(r,{object:u}){return super.reduceStaticMemberExpression(r,{object:u()})}reduceStaticPropertyName(r){return super.reduceStaticPropertyName(r)}reduceSuper(r){return super.reduceSuper(r)}reduceSwitchCase(r,{test:u,consequent:i}){return super.reduceSwitchCase(r,{test:u(),consequent:i.map(n=>n())})}reduceSwitchDefault(r,{consequent:u}){return super.reduceSwitchDefault(r,{consequent:u.map(i=>i())})}reduceSwitchStatement(r,{discriminant:u,cases:i}){return super.reduceSwitchStatement(r,{discriminant:u(),cases:i.map(n=>n())})}reduceSwitchStatementWithDefault(r,{discriminant:u,preDefaultCases:i,defaultCase:n,postDefaultCases:a}){return super.reduceSwitchStatementWithDefault(r,{discriminant:u(),preDefaultCases:i.map(l=>l()),defaultCase:n(),postDefaultCases:a.map(l=>l())})}reduceTemplateElement(r){return super.reduceTemplateElement(r)}reduceTemplateExpression(r,{tag:u,elements:i}){return super.reduceTemplateExpression(r,{tag:u==null?null:u(),elements:i.map(n=>n())})}reduceThisExpression(r){return super.reduceThisExpression(r)}reduceThrowStatement(r,{expression:u}){return super.reduceThrowStatement(r,{expression:u()})}reduceTryCatchStatement(r,{body:u,catchClause:i}){return super.reduceTryCatchStatement(r,{body:u(),catchClause:i()})}reduceTryFinallyStatement(r,{body:u,catchClause:i,finalizer:n}){return super.reduceTryFinallyStatement(r,{body:u(),catchClause:i==null?null:i(),finalizer:n()})}reduceUnaryExpression(r,{operand:u}){return super.reduceUnaryExpression(r,{operand:u()})}reduceUpdateExpression(r,{operand:u}){return super.reduceUpdateExpression(r,{operand:u()})}reduceVariableDeclaration(r,{declarators:u}){return super.reduceVariableDeclaration(r,{declarators:u.map(i=>i())})}reduceVariableDeclarationStatement(r,{declaration:u}){return super.reduceVariableDeclarationStatement(r,{declaration:u()})}reduceVariableDeclarator(r,{binding:u,init:i}){return super.reduceVariableDeclarator(r,{binding:u(),init:i==null?null:i()})}reduceWhileStatement(r,{test:u,body:i}){return super.reduceWhileStatement(r,{test:u(),body:i()})}reduceWithStatement(r,{object:u,body:i}){return super.reduceWithStatement(r,{object:u(),body:i()})}reduceYieldExpression(r,{expression:u}){return super.reduceYieldExpression(r,{expression:u==null?null:u()})}reduceYieldGeneratorExpression(r,{expression:u}){return super.reduceYieldGeneratorExpression(r,{expression:u()})}}},memoize$1=function s(e){const r=new WeakMap;return{reduceArrayAssignmentTarget(u,i){if(r.has(u))return r.get(u);const n=e.reduceArrayAssignmentTarget(u,i);return r.set(u,n),n},reduceArrayBinding(u,i){if(r.has(u))return r.get(u);const n=e.reduceArrayBinding(u,i);return r.set(u,n),n},reduceArrayExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceArrayExpression(u,i);return r.set(u,n),n},reduceArrowExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceArrowExpression(u,i);return r.set(u,n),n},reduceAssignmentExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceAssignmentExpression(u,i);return r.set(u,n),n},reduceAssignmentTargetIdentifier(u){if(r.has(u))return r.get(u);const i=e.reduceAssignmentTargetIdentifier(u);return r.set(u,i),i},reduceAssignmentTargetPropertyIdentifier(u,i){if(r.has(u))return r.get(u);const n=e.reduceAssignmentTargetPropertyIdentifier(u,i);return r.set(u,n),n},reduceAssignmentTargetPropertyProperty(u,i){if(r.has(u))return r.get(u);const n=e.reduceAssignmentTargetPropertyProperty(u,i);return r.set(u,n),n},reduceAssignmentTargetWithDefault(u,i){if(r.has(u))return r.get(u);const n=e.reduceAssignmentTargetWithDefault(u,i);return r.set(u,n),n},reduceAwaitExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceAwaitExpression(u,i);return r.set(u,n),n},reduceBinaryExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceBinaryExpression(u,i);return r.set(u,n),n},reduceBindingIdentifier(u){if(r.has(u))return r.get(u);const i=e.reduceBindingIdentifier(u);return r.set(u,i),i},reduceBindingPropertyIdentifier(u,i){if(r.has(u))return r.get(u);const n=e.reduceBindingPropertyIdentifier(u,i);return r.set(u,n),n},reduceBindingPropertyProperty(u,i){if(r.has(u))return r.get(u);const n=e.reduceBindingPropertyProperty(u,i);return r.set(u,n),n},reduceBindingWithDefault(u,i){if(r.has(u))return r.get(u);const n=e.reduceBindingWithDefault(u,i);return r.set(u,n),n},reduceBlock(u,i){if(r.has(u))return r.get(u);const n=e.reduceBlock(u,i);return r.set(u,n),n},reduceBlockStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceBlockStatement(u,i);return r.set(u,n),n},reduceBreakStatement(u){if(r.has(u))return r.get(u);const i=e.reduceBreakStatement(u);return r.set(u,i),i},reduceCallExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceCallExpression(u,i);return r.set(u,n),n},reduceCatchClause(u,i){if(r.has(u))return r.get(u);const n=e.reduceCatchClause(u,i);return r.set(u,n),n},reduceClassDeclaration(u,i){if(r.has(u))return r.get(u);const n=e.reduceClassDeclaration(u,i);return r.set(u,n),n},reduceClassElement(u,i){if(r.has(u))return r.get(u);const n=e.reduceClassElement(u,i);return r.set(u,n),n},reduceClassExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceClassExpression(u,i);return r.set(u,n),n},reduceCompoundAssignmentExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceCompoundAssignmentExpression(u,i);return r.set(u,n),n},reduceComputedMemberAssignmentTarget(u,i){if(r.has(u))return r.get(u);const n=e.reduceComputedMemberAssignmentTarget(u,i);return r.set(u,n),n},reduceComputedMemberExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceComputedMemberExpression(u,i);return r.set(u,n),n},reduceComputedPropertyName(u,i){if(r.has(u))return r.get(u);const n=e.reduceComputedPropertyName(u,i);return r.set(u,n),n},reduceConditionalExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceConditionalExpression(u,i);return r.set(u,n),n},reduceContinueStatement(u){if(r.has(u))return r.get(u);const i=e.reduceContinueStatement(u);return r.set(u,i),i},reduceDataProperty(u,i){if(r.has(u))return r.get(u);const n=e.reduceDataProperty(u,i);return r.set(u,n),n},reduceDebuggerStatement(u){if(r.has(u))return r.get(u);const i=e.reduceDebuggerStatement(u);return r.set(u,i),i},reduceDirective(u){if(r.has(u))return r.get(u);const i=e.reduceDirective(u);return r.set(u,i),i},reduceDoWhileStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceDoWhileStatement(u,i);return r.set(u,n),n},reduceEmptyStatement(u){if(r.has(u))return r.get(u);const i=e.reduceEmptyStatement(u);return r.set(u,i),i},reduceExport(u,i){if(r.has(u))return r.get(u);const n=e.reduceExport(u,i);return r.set(u,n),n},reduceExportAllFrom(u){if(r.has(u))return r.get(u);const i=e.reduceExportAllFrom(u);return r.set(u,i),i},reduceExportDefault(u,i){if(r.has(u))return r.get(u);const n=e.reduceExportDefault(u,i);return r.set(u,n),n},reduceExportFrom(u,i){if(r.has(u))return r.get(u);const n=e.reduceExportFrom(u,i);return r.set(u,n),n},reduceExportFromSpecifier(u){if(r.has(u))return r.get(u);const i=e.reduceExportFromSpecifier(u);return r.set(u,i),i},reduceExportLocalSpecifier(u,i){if(r.has(u))return r.get(u);const n=e.reduceExportLocalSpecifier(u,i);return r.set(u,n),n},reduceExportLocals(u,i){if(r.has(u))return r.get(u);const n=e.reduceExportLocals(u,i);return r.set(u,n),n},reduceExpressionStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceExpressionStatement(u,i);return r.set(u,n),n},reduceForAwaitStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceForAwaitStatement(u,i);return r.set(u,n),n},reduceForInStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceForInStatement(u,i);return r.set(u,n),n},reduceForOfStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceForOfStatement(u,i);return r.set(u,n),n},reduceForStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceForStatement(u,i);return r.set(u,n),n},reduceFormalParameters(u,i){if(r.has(u))return r.get(u);const n=e.reduceFormalParameters(u,i);return r.set(u,n),n},reduceFunctionBody(u,i){if(r.has(u))return r.get(u);const n=e.reduceFunctionBody(u,i);return r.set(u,n),n},reduceFunctionDeclaration(u,i){if(r.has(u))return r.get(u);const n=e.reduceFunctionDeclaration(u,i);return r.set(u,n),n},reduceFunctionExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceFunctionExpression(u,i);return r.set(u,n),n},reduceGetter(u,i){if(r.has(u))return r.get(u);const n=e.reduceGetter(u,i);return r.set(u,n),n},reduceIdentifierExpression(u){if(r.has(u))return r.get(u);const i=e.reduceIdentifierExpression(u);return r.set(u,i),i},reduceIfStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceIfStatement(u,i);return r.set(u,n),n},reduceImport(u,i){if(r.has(u))return r.get(u);const n=e.reduceImport(u,i);return r.set(u,n),n},reduceImportNamespace(u,i){if(r.has(u))return r.get(u);const n=e.reduceImportNamespace(u,i);return r.set(u,n),n},reduceImportSpecifier(u,i){if(r.has(u))return r.get(u);const n=e.reduceImportSpecifier(u,i);return r.set(u,n),n},reduceLabeledStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceLabeledStatement(u,i);return r.set(u,n),n},reduceLiteralBooleanExpression(u){if(r.has(u))return r.get(u);const i=e.reduceLiteralBooleanExpression(u);return r.set(u,i),i},reduceLiteralInfinityExpression(u){if(r.has(u))return r.get(u);const i=e.reduceLiteralInfinityExpression(u);return r.set(u,i),i},reduceLiteralNullExpression(u){if(r.has(u))return r.get(u);const i=e.reduceLiteralNullExpression(u);return r.set(u,i),i},reduceLiteralNumericExpression(u){if(r.has(u))return r.get(u);const i=e.reduceLiteralNumericExpression(u);return r.set(u,i),i},reduceLiteralRegExpExpression(u){if(r.has(u))return r.get(u);const i=e.reduceLiteralRegExpExpression(u);return r.set(u,i),i},reduceLiteralStringExpression(u){if(r.has(u))return r.get(u);const i=e.reduceLiteralStringExpression(u);return r.set(u,i),i},reduceMethod(u,i){if(r.has(u))return r.get(u);const n=e.reduceMethod(u,i);return r.set(u,n),n},reduceModule(u,i){if(r.has(u))return r.get(u);const n=e.reduceModule(u,i);return r.set(u,n),n},reduceNewExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceNewExpression(u,i);return r.set(u,n),n},reduceNewTargetExpression(u){if(r.has(u))return r.get(u);const i=e.reduceNewTargetExpression(u);return r.set(u,i),i},reduceObjectAssignmentTarget(u,i){if(r.has(u))return r.get(u);const n=e.reduceObjectAssignmentTarget(u,i);return r.set(u,n),n},reduceObjectBinding(u,i){if(r.has(u))return r.get(u);const n=e.reduceObjectBinding(u,i);return r.set(u,n),n},reduceObjectExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceObjectExpression(u,i);return r.set(u,n),n},reduceReturnStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceReturnStatement(u,i);return r.set(u,n),n},reduceScript(u,i){if(r.has(u))return r.get(u);const n=e.reduceScript(u,i);return r.set(u,n),n},reduceSetter(u,i){if(r.has(u))return r.get(u);const n=e.reduceSetter(u,i);return r.set(u,n),n},reduceShorthandProperty(u,i){if(r.has(u))return r.get(u);const n=e.reduceShorthandProperty(u,i);return r.set(u,n),n},reduceSpreadElement(u,i){if(r.has(u))return r.get(u);const n=e.reduceSpreadElement(u,i);return r.set(u,n),n},reduceSpreadProperty(u,i){if(r.has(u))return r.get(u);const n=e.reduceSpreadProperty(u,i);return r.set(u,n),n},reduceStaticMemberAssignmentTarget(u,i){if(r.has(u))return r.get(u);const n=e.reduceStaticMemberAssignmentTarget(u,i);return r.set(u,n),n},reduceStaticMemberExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceStaticMemberExpression(u,i);return r.set(u,n),n},reduceStaticPropertyName(u){if(r.has(u))return r.get(u);const i=e.reduceStaticPropertyName(u);return r.set(u,i),i},reduceSuper(u){if(r.has(u))return r.get(u);const i=e.reduceSuper(u);return r.set(u,i),i},reduceSwitchCase(u,i){if(r.has(u))return r.get(u);const n=e.reduceSwitchCase(u,i);return r.set(u,n),n},reduceSwitchDefault(u,i){if(r.has(u))return r.get(u);const n=e.reduceSwitchDefault(u,i);return r.set(u,n),n},reduceSwitchStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceSwitchStatement(u,i);return r.set(u,n),n},reduceSwitchStatementWithDefault(u,i){if(r.has(u))return r.get(u);const n=e.reduceSwitchStatementWithDefault(u,i);return r.set(u,n),n},reduceTemplateElement(u){if(r.has(u))return r.get(u);const i=e.reduceTemplateElement(u);return r.set(u,i),i},reduceTemplateExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceTemplateExpression(u,i);return r.set(u,n),n},reduceThisExpression(u){if(r.has(u))return r.get(u);const i=e.reduceThisExpression(u);return r.set(u,i),i},reduceThrowStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceThrowStatement(u,i);return r.set(u,n),n},reduceTryCatchStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceTryCatchStatement(u,i);return r.set(u,n),n},reduceTryFinallyStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceTryFinallyStatement(u,i);return r.set(u,n),n},reduceUnaryExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceUnaryExpression(u,i);return r.set(u,n),n},reduceUpdateExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceUpdateExpression(u,i);return r.set(u,n),n},reduceVariableDeclaration(u,i){if(r.has(u))return r.get(u);const n=e.reduceVariableDeclaration(u,i);return r.set(u,n),n},reduceVariableDeclarationStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceVariableDeclarationStatement(u,i);return r.set(u,n),n},reduceVariableDeclarator(u,i){if(r.has(u))return r.get(u);const n=e.reduceVariableDeclarator(u,i);return r.set(u,n),n},reduceWhileStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceWhileStatement(u,i);return r.set(u,n),n},reduceWithStatement(u,i){if(r.has(u))return r.get(u);const n=e.reduceWithStatement(u,i);return r.set(u,n),n},reduceYieldExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceYieldExpression(u,i);return r.set(u,n),n},reduceYieldGeneratorExpression(u,i){if(r.has(u))return r.get(u);const n=e.reduceYieldGeneratorExpression(u,i);return r.set(u,n),n}}};const Shift$1=gen;var cloneReducer=class{reduceArrayAssignmentTarget(e,{elements:r,rest:u}){return new Shift$1.ArrayAssignmentTarget({elements:r,rest:u})}reduceArrayBinding(e,{elements:r,rest:u}){return new Shift$1.ArrayBinding({elements:r,rest:u})}reduceArrayExpression(e,{elements:r}){return new Shift$1.ArrayExpression({elements:r})}reduceArrowExpression(e,{params:r,body:u}){return new Shift$1.ArrowExpression({isAsync:e.isAsync,params:r,body:u})}reduceAssignmentExpression(e,{binding:r,expression:u}){return new Shift$1.AssignmentExpression({binding:r,expression:u})}reduceAssignmentTargetIdentifier(e){return new Shift$1.AssignmentTargetIdentifier({name:e.name})}reduceAssignmentTargetPropertyIdentifier(e,{binding:r,init:u}){return new Shift$1.AssignmentTargetPropertyIdentifier({binding:r,init:u})}reduceAssignmentTargetPropertyProperty(e,{name:r,binding:u}){return new Shift$1.AssignmentTargetPropertyProperty({name:r,binding:u})}reduceAssignmentTargetWithDefault(e,{binding:r,init:u}){return new Shift$1.AssignmentTargetWithDefault({binding:r,init:u})}reduceAwaitExpression(e,{expression:r}){return new Shift$1.AwaitExpression({expression:r})}reduceBinaryExpression(e,{left:r,right:u}){return new Shift$1.BinaryExpression({left:r,operator:e.operator,right:u})}reduceBindingIdentifier(e){return new Shift$1.BindingIdentifier({name:e.name})}reduceBindingPropertyIdentifier(e,{binding:r,init:u}){return new Shift$1.BindingPropertyIdentifier({binding:r,init:u})}reduceBindingPropertyProperty(e,{name:r,binding:u}){return new Shift$1.BindingPropertyProperty({name:r,binding:u})}reduceBindingWithDefault(e,{binding:r,init:u}){return new Shift$1.BindingWithDefault({binding:r,init:u})}reduceBlock(e,{statements:r}){return new Shift$1.Block({statements:r})}reduceBlockStatement(e,{block:r}){return new Shift$1.BlockStatement({block:r})}reduceBreakStatement(e){return new Shift$1.BreakStatement({label:e.label})}reduceCallExpression(e,{callee:r,arguments:u}){return new Shift$1.CallExpression({callee:r,arguments:u})}reduceCatchClause(e,{binding:r,body:u}){return new Shift$1.CatchClause({binding:r,body:u})}reduceClassDeclaration(e,{name:r,super:u,elements:i}){return new Shift$1.ClassDeclaration({name:r,super:u,elements:i})}reduceClassElement(e,{method:r}){return new Shift$1.ClassElement({isStatic:e.isStatic,method:r})}reduceClassExpression(e,{name:r,super:u,elements:i}){return new Shift$1.ClassExpression({name:r,super:u,elements:i})}reduceCompoundAssignmentExpression(e,{binding:r,expression:u}){return new Shift$1.CompoundAssignmentExpression({binding:r,operator:e.operator,expression:u})}reduceComputedMemberAssignmentTarget(e,{object:r,expression:u}){return new Shift$1.ComputedMemberAssignmentTarget({object:r,expression:u})}reduceComputedMemberExpression(e,{object:r,expression:u}){return new Shift$1.ComputedMemberExpression({object:r,expression:u})}reduceComputedPropertyName(e,{expression:r}){return new Shift$1.ComputedPropertyName({expression:r})}reduceConditionalExpression(e,{test:r,consequent:u,alternate:i}){return new Shift$1.ConditionalExpression({test:r,consequent:u,alternate:i})}reduceContinueStatement(e){return new Shift$1.ContinueStatement({label:e.label})}reduceDataProperty(e,{name:r,expression:u}){return new Shift$1.DataProperty({name:r,expression:u})}reduceDebuggerStatement(e){return new Shift$1.DebuggerStatement}reduceDirective(e){return new Shift$1.Directive({rawValue:e.rawValue})}reduceDoWhileStatement(e,{body:r,test:u}){return new Shift$1.DoWhileStatement({body:r,test:u})}reduceEmptyStatement(e){return new Shift$1.EmptyStatement}reduceExport(e,{declaration:r}){return new Shift$1.Export({declaration:r})}reduceExportAllFrom(e){return new Shift$1.ExportAllFrom({moduleSpecifier:e.moduleSpecifier})}reduceExportDefault(e,{body:r}){return new Shift$1.ExportDefault({body:r})}reduceExportFrom(e,{namedExports:r}){return new Shift$1.ExportFrom({namedExports:r,moduleSpecifier:e.moduleSpecifier})}reduceExportFromSpecifier(e){return new Shift$1.ExportFromSpecifier({name:e.name,exportedName:e.exportedName})}reduceExportLocalSpecifier(e,{name:r}){return new Shift$1.ExportLocalSpecifier({name:r,exportedName:e.exportedName})}reduceExportLocals(e,{namedExports:r}){return new Shift$1.ExportLocals({namedExports:r})}reduceExpressionStatement(e,{expression:r}){return new Shift$1.ExpressionStatement({expression:r})}reduceForAwaitStatement(e,{left:r,right:u,body:i}){return new Shift$1.ForAwaitStatement({left:r,right:u,body:i})}reduceForInStatement(e,{left:r,right:u,body:i}){return new Shift$1.ForInStatement({left:r,right:u,body:i})}reduceForOfStatement(e,{left:r,right:u,body:i}){return new Shift$1.ForOfStatement({left:r,right:u,body:i})}reduceForStatement(e,{init:r,test:u,update:i,body:n}){return new Shift$1.ForStatement({init:r,test:u,update:i,body:n})}reduceFormalParameters(e,{items:r,rest:u}){return new Shift$1.FormalParameters({items:r,rest:u})}reduceFunctionBody(e,{directives:r,statements:u}){return new Shift$1.FunctionBody({directives:r,statements:u})}reduceFunctionDeclaration(e,{name:r,params:u,body:i}){return new Shift$1.FunctionDeclaration({isAsync:e.isAsync,isGenerator:e.isGenerator,name:r,params:u,body:i})}reduceFunctionExpression(e,{name:r,params:u,body:i}){return new Shift$1.FunctionExpression({isAsync:e.isAsync,isGenerator:e.isGenerator,name:r,params:u,body:i})}reduceGetter(e,{name:r,body:u}){return new Shift$1.Getter({name:r,body:u})}reduceIdentifierExpression(e){return new Shift$1.IdentifierExpression({name:e.name})}reduceIfStatement(e,{test:r,consequent:u,alternate:i}){return new Shift$1.IfStatement({test:r,consequent:u,alternate:i})}reduceImport(e,{defaultBinding:r,namedImports:u}){return new Shift$1.Import({defaultBinding:r,namedImports:u,moduleSpecifier:e.moduleSpecifier})}reduceImportNamespace(e,{defaultBinding:r,namespaceBinding:u}){return new Shift$1.ImportNamespace({defaultBinding:r,namespaceBinding:u,moduleSpecifier:e.moduleSpecifier})}reduceImportSpecifier(e,{binding:r}){return new Shift$1.ImportSpecifier({name:e.name,binding:r})}reduceLabeledStatement(e,{body:r}){return new Shift$1.LabeledStatement({label:e.label,body:r})}reduceLiteralBooleanExpression(e){return new Shift$1.LiteralBooleanExpression({value:e.value})}reduceLiteralInfinityExpression(e){return new Shift$1.LiteralInfinityExpression}reduceLiteralNullExpression(e){return new Shift$1.LiteralNullExpression}reduceLiteralNumericExpression(e){return new Shift$1.LiteralNumericExpression({value:e.value})}reduceLiteralRegExpExpression(e){return new Shift$1.LiteralRegExpExpression({pattern:e.pattern,global:e.global,ignoreCase:e.ignoreCase,multiLine:e.multiLine,dotAll:e.dotAll,unicode:e.unicode,sticky:e.sticky})}reduceLiteralStringExpression(e){return new Shift$1.LiteralStringExpression({value:e.value})}reduceMethod(e,{name:r,params:u,body:i}){return new Shift$1.Method({isAsync:e.isAsync,isGenerator:e.isGenerator,name:r,params:u,body:i})}reduceModule(e,{directives:r,items:u}){return new Shift$1.Module({directives:r,items:u})}reduceNewExpression(e,{callee:r,arguments:u}){return new Shift$1.NewExpression({callee:r,arguments:u})}reduceNewTargetExpression(e){return new Shift$1.NewTargetExpression}reduceObjectAssignmentTarget(e,{properties:r,rest:u}){return new Shift$1.ObjectAssignmentTarget({properties:r,rest:u})}reduceObjectBinding(e,{properties:r,rest:u}){return new Shift$1.ObjectBinding({properties:r,rest:u})}reduceObjectExpression(e,{properties:r}){return new Shift$1.ObjectExpression({properties:r})}reduceReturnStatement(e,{expression:r}){return new Shift$1.ReturnStatement({expression:r})}reduceScript(e,{directives:r,statements:u}){return new Shift$1.Script({directives:r,statements:u})}reduceSetter(e,{name:r,param:u,body:i}){return new Shift$1.Setter({name:r,param:u,body:i})}reduceShorthandProperty(e,{name:r}){return new Shift$1.ShorthandProperty({name:r})}reduceSpreadElement(e,{expression:r}){return new Shift$1.SpreadElement({expression:r})}reduceSpreadProperty(e,{expression:r}){return new Shift$1.SpreadProperty({expression:r})}reduceStaticMemberAssignmentTarget(e,{object:r}){return new Shift$1.StaticMemberAssignmentTarget({object:r,property:e.property})}reduceStaticMemberExpression(e,{object:r}){return new Shift$1.StaticMemberExpression({object:r,property:e.property})}reduceStaticPropertyName(e){return new Shift$1.StaticPropertyName({value:e.value})}reduceSuper(e){return new Shift$1.Super}reduceSwitchCase(e,{test:r,consequent:u}){return new Shift$1.SwitchCase({test:r,consequent:u})}reduceSwitchDefault(e,{consequent:r}){return new Shift$1.SwitchDefault({consequent:r})}reduceSwitchStatement(e,{discriminant:r,cases:u}){return new Shift$1.SwitchStatement({discriminant:r,cases:u})}reduceSwitchStatementWithDefault(e,{discriminant:r,preDefaultCases:u,defaultCase:i,postDefaultCases:n}){return new Shift$1.SwitchStatementWithDefault({discriminant:r,preDefaultCases:u,defaultCase:i,postDefaultCases:n})}reduceTemplateElement(e){return new Shift$1.TemplateElement({rawValue:e.rawValue})}reduceTemplateExpression(e,{tag:r,elements:u}){return new Shift$1.TemplateExpression({tag:r,elements:u})}reduceThisExpression(e){return new Shift$1.ThisExpression}reduceThrowStatement(e,{expression:r}){return new Shift$1.ThrowStatement({expression:r})}reduceTryCatchStatement(e,{body:r,catchClause:u}){return new Shift$1.TryCatchStatement({body:r,catchClause:u})}reduceTryFinallyStatement(e,{body:r,catchClause:u,finalizer:i}){return new Shift$1.TryFinallyStatement({body:r,catchClause:u,finalizer:i})}reduceUnaryExpression(e,{operand:r}){return new Shift$1.UnaryExpression({operator:e.operator,operand:r})}reduceUpdateExpression(e,{operand:r}){return new Shift$1.UpdateExpression({isPrefix:e.isPrefix,operator:e.operator,operand:r})}reduceVariableDeclaration(e,{declarators:r}){return new Shift$1.VariableDeclaration({kind:e.kind,declarators:r})}reduceVariableDeclarationStatement(e,{declaration:r}){return new Shift$1.VariableDeclarationStatement({declaration:r})}reduceVariableDeclarator(e,{binding:r,init:u}){return new Shift$1.VariableDeclarator({binding:r,init:u})}reduceWhileStatement(e,{test:r,body:u}){return new Shift$1.WhileStatement({test:r,body:u})}reduceWithStatement(e,{object:r,body:u}){return new Shift$1.WithStatement({object:r,body:u})}reduceYieldExpression(e,{expression:r}){return new Shift$1.YieldExpression({expression:r})}reduceYieldGeneratorExpression(e,{expression:r}){return new Shift$1.YieldGeneratorExpression({expression:r})}};const Shift=gen;var lazyCloneReducer=class{reduceArrayAssignmentTarget(e,{elements:r,rest:u}){return e.elements.length===r.length&&e.elements.every((i,n)=>i===r[n])&&e.rest===u?e:new Shift.ArrayAssignmentTarget({elements:r,rest:u})}reduceArrayBinding(e,{elements:r,rest:u}){return e.elements.length===r.length&&e.elements.every((i,n)=>i===r[n])&&e.rest===u?e:new Shift.ArrayBinding({elements:r,rest:u})}reduceArrayExpression(e,{elements:r}){return e.elements.length===r.length&&e.elements.every((u,i)=>u===r[i])?e:new Shift.ArrayExpression({elements:r})}reduceArrowExpression(e,{params:r,body:u}){return e.params===r&&e.body===u?e:new Shift.ArrowExpression({isAsync:e.isAsync,params:r,body:u})}reduceAssignmentExpression(e,{binding:r,expression:u}){return e.binding===r&&e.expression===u?e:new Shift.AssignmentExpression({binding:r,expression:u})}reduceAssignmentTargetIdentifier(e){return e}reduceAssignmentTargetPropertyIdentifier(e,{binding:r,init:u}){return e.binding===r&&e.init===u?e:new Shift.AssignmentTargetPropertyIdentifier({binding:r,init:u})}reduceAssignmentTargetPropertyProperty(e,{name:r,binding:u}){return e.name===r&&e.binding===u?e:new Shift.AssignmentTargetPropertyProperty({name:r,binding:u})}reduceAssignmentTargetWithDefault(e,{binding:r,init:u}){return e.binding===r&&e.init===u?e:new Shift.AssignmentTargetWithDefault({binding:r,init:u})}reduceAwaitExpression(e,{expression:r}){return e.expression===r?e:new Shift.AwaitExpression({expression:r})}reduceBinaryExpression(e,{left:r,right:u}){return e.left===r&&e.right===u?e:new Shift.BinaryExpression({left:r,operator:e.operator,right:u})}reduceBindingIdentifier(e){return e}reduceBindingPropertyIdentifier(e,{binding:r,init:u}){return e.binding===r&&e.init===u?e:new Shift.BindingPropertyIdentifier({binding:r,init:u})}reduceBindingPropertyProperty(e,{name:r,binding:u}){return e.name===r&&e.binding===u?e:new Shift.BindingPropertyProperty({name:r,binding:u})}reduceBindingWithDefault(e,{binding:r,init:u}){return e.binding===r&&e.init===u?e:new Shift.BindingWithDefault({binding:r,init:u})}reduceBlock(e,{statements:r}){return e.statements.length===r.length&&e.statements.every((u,i)=>u===r[i])?e:new Shift.Block({statements:r})}reduceBlockStatement(e,{block:r}){return e.block===r?e:new Shift.BlockStatement({block:r})}reduceBreakStatement(e){return e}reduceCallExpression(e,{callee:r,arguments:u}){return e.callee===r&&e.arguments.length===u.length&&e.arguments.every((i,n)=>i===u[n])?e:new Shift.CallExpression({callee:r,arguments:u})}reduceCatchClause(e,{binding:r,body:u}){return e.binding===r&&e.body===u?e:new Shift.CatchClause({binding:r,body:u})}reduceClassDeclaration(e,{name:r,super:u,elements:i}){return e.name===r&&e.super===u&&e.elements.length===i.length&&e.elements.every((n,a)=>n===i[a])?e:new Shift.ClassDeclaration({name:r,super:u,elements:i})}reduceClassElement(e,{method:r}){return e.method===r?e:new Shift.ClassElement({isStatic:e.isStatic,method:r})}reduceClassExpression(e,{name:r,super:u,elements:i}){return e.name===r&&e.super===u&&e.elements.length===i.length&&e.elements.every((n,a)=>n===i[a])?e:new Shift.ClassExpression({name:r,super:u,elements:i})}reduceCompoundAssignmentExpression(e,{binding:r,expression:u}){return e.binding===r&&e.expression===u?e:new Shift.CompoundAssignmentExpression({binding:r,operator:e.operator,expression:u})}reduceComputedMemberAssignmentTarget(e,{object:r,expression:u}){return e.object===r&&e.expression===u?e:new Shift.ComputedMemberAssignmentTarget({object:r,expression:u})}reduceComputedMemberExpression(e,{object:r,expression:u}){return e.object===r&&e.expression===u?e:new Shift.ComputedMemberExpression({object:r,expression:u})}reduceComputedPropertyName(e,{expression:r}){return e.expression===r?e:new Shift.ComputedPropertyName({expression:r})}reduceConditionalExpression(e,{test:r,consequent:u,alternate:i}){return e.test===r&&e.consequent===u&&e.alternate===i?e:new Shift.ConditionalExpression({test:r,consequent:u,alternate:i})}reduceContinueStatement(e){return e}reduceDataProperty(e,{name:r,expression:u}){return e.name===r&&e.expression===u?e:new Shift.DataProperty({name:r,expression:u})}reduceDebuggerStatement(e){return e}reduceDirective(e){return e}reduceDoWhileStatement(e,{body:r,test:u}){return e.body===r&&e.test===u?e:new Shift.DoWhileStatement({body:r,test:u})}reduceEmptyStatement(e){return e}reduceExport(e,{declaration:r}){return e.declaration===r?e:new Shift.Export({declaration:r})}reduceExportAllFrom(e){return e}reduceExportDefault(e,{body:r}){return e.body===r?e:new Shift.ExportDefault({body:r})}reduceExportFrom(e,{namedExports:r}){return e.namedExports.length===r.length&&e.namedExports.every((u,i)=>u===r[i])?e:new Shift.ExportFrom({namedExports:r,moduleSpecifier:e.moduleSpecifier})}reduceExportFromSpecifier(e){return e}reduceExportLocalSpecifier(e,{name:r}){return e.name===r?e:new Shift.ExportLocalSpecifier({name:r,exportedName:e.exportedName})}reduceExportLocals(e,{namedExports:r}){return e.namedExports.length===r.length&&e.namedExports.every((u,i)=>u===r[i])?e:new Shift.ExportLocals({namedExports:r})}reduceExpressionStatement(e,{expression:r}){return e.expression===r?e:new Shift.ExpressionStatement({expression:r})}reduceForAwaitStatement(e,{left:r,right:u,body:i}){return e.left===r&&e.right===u&&e.body===i?e:new Shift.ForAwaitStatement({left:r,right:u,body:i})}reduceForInStatement(e,{left:r,right:u,body:i}){return e.left===r&&e.right===u&&e.body===i?e:new Shift.ForInStatement({left:r,right:u,body:i})}reduceForOfStatement(e,{left:r,right:u,body:i}){return e.left===r&&e.right===u&&e.body===i?e:new Shift.ForOfStatement({left:r,right:u,body:i})}reduceForStatement(e,{init:r,test:u,update:i,body:n}){return e.init===r&&e.test===u&&e.update===i&&e.body===n?e:new Shift.ForStatement({init:r,test:u,update:i,body:n})}reduceFormalParameters(e,{items:r,rest:u}){return e.items.length===r.length&&e.items.every((i,n)=>i===r[n])&&e.rest===u?e:new Shift.FormalParameters({items:r,rest:u})}reduceFunctionBody(e,{directives:r,statements:u}){return e.directives.length===r.length&&e.directives.every((i,n)=>i===r[n])&&e.statements.length===u.length&&e.statements.every((i,n)=>i===u[n])?e:new Shift.FunctionBody({directives:r,statements:u})}reduceFunctionDeclaration(e,{name:r,params:u,body:i}){return e.name===r&&e.params===u&&e.body===i?e:new Shift.FunctionDeclaration({isAsync:e.isAsync,isGenerator:e.isGenerator,name:r,params:u,body:i})}reduceFunctionExpression(e,{name:r,params:u,body:i}){return e.name===r&&e.params===u&&e.body===i?e:new Shift.FunctionExpression({isAsync:e.isAsync,isGenerator:e.isGenerator,name:r,params:u,body:i})}reduceGetter(e,{name:r,body:u}){return e.name===r&&e.body===u?e:new Shift.Getter({name:r,body:u})}reduceIdentifierExpression(e){return e}reduceIfStatement(e,{test:r,consequent:u,alternate:i}){return e.test===r&&e.consequent===u&&e.alternate===i?e:new Shift.IfStatement({test:r,consequent:u,alternate:i})}reduceImport(e,{defaultBinding:r,namedImports:u}){return e.defaultBinding===r&&e.namedImports.length===u.length&&e.namedImports.every((i,n)=>i===u[n])?e:new Shift.Import({defaultBinding:r,namedImports:u,moduleSpecifier:e.moduleSpecifier})}reduceImportNamespace(e,{defaultBinding:r,namespaceBinding:u}){return e.defaultBinding===r&&e.namespaceBinding===u?e:new Shift.ImportNamespace({defaultBinding:r,namespaceBinding:u,moduleSpecifier:e.moduleSpecifier})}reduceImportSpecifier(e,{binding:r}){return e.binding===r?e:new Shift.ImportSpecifier({name:e.name,binding:r})}reduceLabeledStatement(e,{body:r}){return e.body===r?e:new Shift.LabeledStatement({label:e.label,body:r})}reduceLiteralBooleanExpression(e){return e}reduceLiteralInfinityExpression(e){return e}reduceLiteralNullExpression(e){return e}reduceLiteralNumericExpression(e){return e}reduceLiteralRegExpExpression(e){return e}reduceLiteralStringExpression(e){return e}reduceMethod(e,{name:r,params:u,body:i}){return e.name===r&&e.params===u&&e.body===i?e:new Shift.Method({isAsync:e.isAsync,isGenerator:e.isGenerator,name:r,params:u,body:i})}reduceModule(e,{directives:r,items:u}){return e.directives.length===r.length&&e.directives.every((i,n)=>i===r[n])&&e.items.length===u.length&&e.items.every((i,n)=>i===u[n])?e:new Shift.Module({directives:r,items:u})}reduceNewExpression(e,{callee:r,arguments:u}){return e.callee===r&&e.arguments.length===u.length&&e.arguments.every((i,n)=>i===u[n])?e:new Shift.NewExpression({callee:r,arguments:u})}reduceNewTargetExpression(e){return e}reduceObjectAssignmentTarget(e,{properties:r,rest:u}){return e.properties.length===r.length&&e.properties.every((i,n)=>i===r[n])&&e.rest===u?e:new Shift.ObjectAssignmentTarget({properties:r,rest:u})}reduceObjectBinding(e,{properties:r,rest:u}){return e.properties.length===r.length&&e.properties.every((i,n)=>i===r[n])&&e.rest===u?e:new Shift.ObjectBinding({properties:r,rest:u})}reduceObjectExpression(e,{properties:r}){return e.properties.length===r.length&&e.properties.every((u,i)=>u===r[i])?e:new Shift.ObjectExpression({properties:r})}reduceReturnStatement(e,{expression:r}){return e.expression===r?e:new Shift.ReturnStatement({expression:r})}reduceScript(e,{directives:r,statements:u}){return e.directives.length===r.length&&e.directives.every((i,n)=>i===r[n])&&e.statements.length===u.length&&e.statements.every((i,n)=>i===u[n])?e:new Shift.Script({directives:r,statements:u})}reduceSetter(e,{name:r,param:u,body:i}){return e.name===r&&e.param===u&&e.body===i?e:new Shift.Setter({name:r,param:u,body:i})}reduceShorthandProperty(e,{name:r}){return e.name===r?e:new Shift.ShorthandProperty({name:r})}reduceSpreadElement(e,{expression:r}){return e.expression===r?e:new Shift.SpreadElement({expression:r})}reduceSpreadProperty(e,{expression:r}){return e.expression===r?e:new Shift.SpreadProperty({expression:r})}reduceStaticMemberAssignmentTarget(e,{object:r}){return e.object===r?e:new Shift.StaticMemberAssignmentTarget({object:r,property:e.property})}reduceStaticMemberExpression(e,{object:r}){return e.object===r?e:new Shift.StaticMemberExpression({object:r,property:e.property})}reduceStaticPropertyName(e){return e}reduceSuper(e){return e}reduceSwitchCase(e,{test:r,consequent:u}){return e.test===r&&e.consequent.length===u.length&&e.consequent.every((i,n)=>i===u[n])?e:new Shift.SwitchCase({test:r,consequent:u})}reduceSwitchDefault(e,{consequent:r}){return e.consequent.length===r.length&&e.consequent.every((u,i)=>u===r[i])?e:new Shift.SwitchDefault({consequent:r})}reduceSwitchStatement(e,{discriminant:r,cases:u}){return e.discriminant===r&&e.cases.length===u.length&&e.cases.every((i,n)=>i===u[n])?e:new Shift.SwitchStatement({discriminant:r,cases:u})}reduceSwitchStatementWithDefault(e,{discriminant:r,preDefaultCases:u,defaultCase:i,postDefaultCases:n}){return e.discriminant===r&&e.preDefaultCases.length===u.length&&e.preDefaultCases.every((a,l)=>a===u[l])&&e.defaultCase===i&&e.postDefaultCases.length===n.length&&e.postDefaultCases.every((a,l)=>a===n[l])?e:new Shift.SwitchStatementWithDefault({discriminant:r,preDefaultCases:u,defaultCase:i,postDefaultCases:n})}reduceTemplateElement(e){return e}reduceTemplateExpression(e,{tag:r,elements:u}){return e.tag===r&&e.elements.length===u.length&&e.elements.every((i,n)=>i===u[n])?e:new Shift.TemplateExpression({tag:r,elements:u})}reduceThisExpression(e){return e}reduceThrowStatement(e,{expression:r}){return e.expression===r?e:new Shift.ThrowStatement({expression:r})}reduceTryCatchStatement(e,{body:r,catchClause:u}){return e.body===r&&e.catchClause===u?e:new Shift.TryCatchStatement({body:r,catchClause:u})}reduceTryFinallyStatement(e,{body:r,catchClause:u,finalizer:i}){return e.body===r&&e.catchClause===u&&e.finalizer===i?e:new Shift.TryFinallyStatement({body:r,catchClause:u,finalizer:i})}reduceUnaryExpression(e,{operand:r}){return e.operand===r?e:new Shift.UnaryExpression({operator:e.operator,operand:r})}reduceUpdateExpression(e,{operand:r}){return e.operand===r?e:new Shift.UpdateExpression({isPrefix:e.isPrefix,operator:e.operator,operand:r})}reduceVariableDeclaration(e,{declarators:r}){return e.declarators.length===r.length&&e.declarators.every((u,i)=>u===r[i])?e:new Shift.VariableDeclaration({kind:e.kind,declarators:r})}reduceVariableDeclarationStatement(e,{declaration:r}){return e.declaration===r?e:new Shift.VariableDeclarationStatement({declaration:r})}reduceVariableDeclarator(e,{binding:r,init:u}){return e.binding===r&&e.init===u?e:new Shift.VariableDeclarator({binding:r,init:u})}reduceWhileStatement(e,{test:r,body:u}){return e.test===r&&e.body===u?e:new Shift.WhileStatement({test:r,body:u})}reduceWithStatement(e,{object:r,body:u}){return e.object===r&&e.body===u?e:new Shift.WithStatement({object:r,body:u})}reduceYieldExpression(e,{expression:r}){return e.expression===r?e:new Shift.YieldExpression({expression:r})}reduceYieldGeneratorExpression(e,{expression:r}){return e.expression===r?e:new Shift.YieldGeneratorExpression({expression:r})}},monoidalReducer=class{constructor(e){let r=e.empty();this.identity=r;let u;if(e.prototype&&typeof e.prototype.concat=="function")u=Function.prototype.call.bind(e.prototype.concat);else if(typeof e.concat=="function")u=e.concat;else throw new TypeError("Monoid must provide a `concat` method");this.append=(...i)=>i.reduce(u,r)}reduceArrayAssignmentTarget(e,{elements:r,rest:u}){return this.append(...r.filter(i=>i!=null),u==null?this.identity:u)}reduceArrayBinding(e,{elements:r,rest:u}){return this.append(...r.filter(i=>i!=null),u==null?this.identity:u)}reduceArrayExpression(e,{elements:r}){return this.append(...r.filter(u=>u!=null))}reduceArrowExpression(e,{params:r,body:u}){return this.append(r,u)}reduceAssignmentExpression(e,{binding:r,expression:u}){return this.append(r,u)}reduceAssignmentTargetIdentifier(e){return this.identity}reduceAssignmentTargetPropertyIdentifier(e,{binding:r,init:u}){return this.append(r,u==null?this.identity:u)}reduceAssignmentTargetPropertyProperty(e,{name:r,binding:u}){return this.append(r,u)}reduceAssignmentTargetWithDefault(e,{binding:r,init:u}){return this.append(r,u)}reduceAwaitExpression(e,{expression:r}){return r}reduceBinaryExpression(e,{left:r,right:u}){return this.append(r,u)}reduceBindingIdentifier(e){return this.identity}reduceBindingPropertyIdentifier(e,{binding:r,init:u}){return this.append(r,u==null?this.identity:u)}reduceBindingPropertyProperty(e,{name:r,binding:u}){return this.append(r,u)}reduceBindingWithDefault(e,{binding:r,init:u}){return this.append(r,u)}reduceBlock(e,{statements:r}){return this.append(...r)}reduceBlockStatement(e,{block:r}){return r}reduceBreakStatement(e){return this.identity}reduceCallExpression(e,{callee:r,arguments:u}){return this.append(r,...u)}reduceCatchClause(e,{binding:r,body:u}){return this.append(r==null?this.identity:r,u)}reduceClassDeclaration(e,{name:r,super:u,elements:i}){return this.append(r,u==null?this.identity:u,...i)}reduceClassElement(e,{method:r}){return r}reduceClassExpression(e,{name:r,super:u,elements:i}){return this.append(r==null?this.identity:r,u==null?this.identity:u,...i)}reduceCompoundAssignmentExpression(e,{binding:r,expression:u}){return this.append(r,u)}reduceComputedMemberAssignmentTarget(e,{object:r,expression:u}){return this.append(r,u)}reduceComputedMemberExpression(e,{object:r,expression:u}){return this.append(r,u)}reduceComputedPropertyName(e,{expression:r}){return r}reduceConditionalExpression(e,{test:r,consequent:u,alternate:i}){return this.append(r,u,i)}reduceContinueStatement(e){return this.identity}reduceDataProperty(e,{name:r,expression:u}){return this.append(r,u)}reduceDebuggerStatement(e){return this.identity}reduceDirective(e){return this.identity}reduceDoWhileStatement(e,{body:r,test:u}){return this.append(r,u)}reduceEmptyStatement(e){return this.identity}reduceExport(e,{declaration:r}){return r}reduceExportAllFrom(e){return this.identity}reduceExportDefault(e,{body:r}){return r}reduceExportFrom(e,{namedExports:r}){return this.append(...r)}reduceExportFromSpecifier(e){return this.identity}reduceExportLocalSpecifier(e,{name:r}){return r}reduceExportLocals(e,{namedExports:r}){return this.append(...r)}reduceExpressionStatement(e,{expression:r}){return r}reduceForAwaitStatement(e,{left:r,right:u,body:i}){return this.append(r,u,i)}reduceForInStatement(e,{left:r,right:u,body:i}){return this.append(r,u,i)}reduceForOfStatement(e,{left:r,right:u,body:i}){return this.append(r,u,i)}reduceForStatement(e,{init:r,test:u,update:i,body:n}){return this.append(r==null?this.identity:r,u==null?this.identity:u,i==null?this.identity:i,n)}reduceFormalParameters(e,{items:r,rest:u}){return this.append(...r,u==null?this.identity:u)}reduceFunctionBody(e,{directives:r,statements:u}){return this.append(...r,...u)}reduceFunctionDeclaration(e,{name:r,params:u,body:i}){return this.append(r,u,i)}reduceFunctionExpression(e,{name:r,params:u,body:i}){return this.append(r==null?this.identity:r,u,i)}reduceGetter(e,{name:r,body:u}){return this.append(r,u)}reduceIdentifierExpression(e){return this.identity}reduceIfStatement(e,{test:r,consequent:u,alternate:i}){return this.append(r,u,i==null?this.identity:i)}reduceImport(e,{defaultBinding:r,namedImports:u}){return this.append(r==null?this.identity:r,...u)}reduceImportNamespace(e,{defaultBinding:r,namespaceBinding:u}){return this.append(r==null?this.identity:r,u)}reduceImportSpecifier(e,{binding:r}){return r}reduceLabeledStatement(e,{body:r}){return r}reduceLiteralBooleanExpression(e){return this.identity}reduceLiteralInfinityExpression(e){return this.identity}reduceLiteralNullExpression(e){return this.identity}reduceLiteralNumericExpression(e){return this.identity}reduceLiteralRegExpExpression(e){return this.identity}reduceLiteralStringExpression(e){return this.identity}reduceMethod(e,{name:r,params:u,body:i}){return this.append(r,u,i)}reduceModule(e,{directives:r,items:u}){return this.append(...r,...u)}reduceNewExpression(e,{callee:r,arguments:u}){return this.append(r,...u)}reduceNewTargetExpression(e){return this.identity}reduceObjectAssignmentTarget(e,{properties:r,rest:u}){return this.append(...r,u==null?this.identity:u)}reduceObjectBinding(e,{properties:r,rest:u}){return this.append(...r,u==null?this.identity:u)}reduceObjectExpression(e,{properties:r}){return this.append(...r)}reduceReturnStatement(e,{expression:r}){return r==null?this.identity:r}reduceScript(e,{directives:r,statements:u}){return this.append(...r,...u)}reduceSetter(e,{name:r,param:u,body:i}){return this.append(r,u,i)}reduceShorthandProperty(e,{name:r}){return r}reduceSpreadElement(e,{expression:r}){return r}reduceSpreadProperty(e,{expression:r}){return r}reduceStaticMemberAssignmentTarget(e,{object:r}){return r}reduceStaticMemberExpression(e,{object:r}){return r}reduceStaticPropertyName(e){return this.identity}reduceSuper(e){return this.identity}reduceSwitchCase(e,{test:r,consequent:u}){return this.append(r,...u)}reduceSwitchDefault(e,{consequent:r}){return this.append(...r)}reduceSwitchStatement(e,{discriminant:r,cases:u}){return this.append(r,...u)}reduceSwitchStatementWithDefault(e,{discriminant:r,preDefaultCases:u,defaultCase:i,postDefaultCases:n}){return this.append(r,...u,i,...n)}reduceTemplateElement(e){return this.identity}reduceTemplateExpression(e,{tag:r,elements:u}){return this.append(r==null?this.identity:r,...u)}reduceThisExpression(e){return this.identity}reduceThrowStatement(e,{expression:r}){return r}reduceTryCatchStatement(e,{body:r,catchClause:u}){return this.append(r,u)}reduceTryFinallyStatement(e,{body:r,catchClause:u,finalizer:i}){return this.append(r,u==null?this.identity:u,i)}reduceUnaryExpression(e,{operand:r}){return r}reduceUpdateExpression(e,{operand:r}){return r}reduceVariableDeclaration(e,{declarators:r}){return this.append(...r)}reduceVariableDeclarationStatement(e,{declaration:r}){return r}reduceVariableDeclarator(e,{binding:r,init:u}){return this.append(r,u==null?this.identity:u)}reduceWhileStatement(e,{test:r,body:u}){return this.append(r,u)}reduceWithStatement(e,{object:r,body:u}){return this.append(r,u)}reduceYieldExpression(e,{expression:r}){return r==null?this.identity:r}reduceYieldGeneratorExpression(e,{expression:r}){return r}},thunkedMonoidalReducer=class{constructor(e){let r=e.empty();this.identity=r;let u;if(e.prototype&&typeof e.prototype.concatThunk=="function")u=Function.prototype.call.bind(e.prototype.concatThunk);else if(typeof e.concatThunk=="function")u=e.concatThunk;else{let i;if(e.prototype&&typeof e.prototype.concat=="function")i=Function.prototype.call.bind(e.prototype.concat);else if(typeof e.concat=="function")i=e.concat;else throw new TypeError("Monoid must provide a `concatThunk` or `concat` method");if(typeof e.isAbsorbing=="function"){let n=e.isAbsorbing;u=(a,l)=>n(a)?a:i(a,l())}else u=(n,a)=>i(n,a())}this.append=(...i)=>i.reduce(u,r)}reduceArrayAssignmentTarget(e,{elements:r,rest:u}){return this.append(...r.filter(i=>i!=null),u==null?()=>this.identity:u)}reduceArrayBinding(e,{elements:r,rest:u}){return this.append(...r.filter(i=>i!=null),u==null?()=>this.identity:u)}reduceArrayExpression(e,{elements:r}){return this.append(...r.filter(u=>u!=null))}reduceArrowExpression(e,{params:r,body:u}){return this.append(r,u)}reduceAssignmentExpression(e,{binding:r,expression:u}){return this.append(r,u)}reduceAssignmentTargetIdentifier(e){return this.identity}reduceAssignmentTargetPropertyIdentifier(e,{binding:r,init:u}){return this.append(r,u==null?()=>this.identity:u)}reduceAssignmentTargetPropertyProperty(e,{name:r,binding:u}){return this.append(r,u)}reduceAssignmentTargetWithDefault(e,{binding:r,init:u}){return this.append(r,u)}reduceAwaitExpression(e,{expression:r}){return r()}reduceBinaryExpression(e,{left:r,right:u}){return this.append(r,u)}reduceBindingIdentifier(e){return this.identity}reduceBindingPropertyIdentifier(e,{binding:r,init:u}){return this.append(r,u==null?()=>this.identity:u)}reduceBindingPropertyProperty(e,{name:r,binding:u}){return this.append(r,u)}reduceBindingWithDefault(e,{binding:r,init:u}){return this.append(r,u)}reduceBlock(e,{statements:r}){return this.append(...r)}reduceBlockStatement(e,{block:r}){return r()}reduceBreakStatement(e){return this.identity}reduceCallExpression(e,{callee:r,arguments:u}){return this.append(r,...u)}reduceCatchClause(e,{binding:r,body:u}){return this.append(r==null?()=>this.identity:r,u)}reduceClassDeclaration(e,{name:r,super:u,elements:i}){return this.append(r,u==null?()=>this.identity:u,...i)}reduceClassElement(e,{method:r}){return r()}reduceClassExpression(e,{name:r,super:u,elements:i}){return this.append(r==null?()=>this.identity:r,u==null?()=>this.identity:u,...i)}reduceCompoundAssignmentExpression(e,{binding:r,expression:u}){return this.append(r,u)}reduceComputedMemberAssignmentTarget(e,{object:r,expression:u}){return this.append(r,u)}reduceComputedMemberExpression(e,{object:r,expression:u}){return this.append(r,u)}reduceComputedPropertyName(e,{expression:r}){return r()}reduceConditionalExpression(e,{test:r,consequent:u,alternate:i}){return this.append(r,u,i)}reduceContinueStatement(e){return this.identity}reduceDataProperty(e,{name:r,expression:u}){return this.append(r,u)}reduceDebuggerStatement(e){return this.identity}reduceDirective(e){return this.identity}reduceDoWhileStatement(e,{body:r,test:u}){return this.append(r,u)}reduceEmptyStatement(e){return this.identity}reduceExport(e,{declaration:r}){return r()}reduceExportAllFrom(e){return this.identity}reduceExportDefault(e,{body:r}){return r()}reduceExportFrom(e,{namedExports:r}){return this.append(...r)}reduceExportFromSpecifier(e){return this.identity}reduceExportLocalSpecifier(e,{name:r}){return r()}reduceExportLocals(e,{namedExports:r}){return this.append(...r)}reduceExpressionStatement(e,{expression:r}){return r()}reduceForAwaitStatement(e,{left:r,right:u,body:i}){return this.append(r,u,i)}reduceForInStatement(e,{left:r,right:u,body:i}){return this.append(r,u,i)}reduceForOfStatement(e,{left:r,right:u,body:i}){return this.append(r,u,i)}reduceForStatement(e,{init:r,test:u,update:i,body:n}){return this.append(r==null?()=>this.identity:r,u==null?()=>this.identity:u,i==null?()=>this.identity:i,n)}reduceFormalParameters(e,{items:r,rest:u}){return this.append(...r,u==null?()=>this.identity:u)}reduceFunctionBody(e,{directives:r,statements:u}){return this.append(...r,...u)}reduceFunctionDeclaration(e,{name:r,params:u,body:i}){return this.append(r,u,i)}reduceFunctionExpression(e,{name:r,params:u,body:i}){return this.append(r==null?()=>this.identity:r,u,i)}reduceGetter(e,{name:r,body:u}){return this.append(r,u)}reduceIdentifierExpression(e){return this.identity}reduceIfStatement(e,{test:r,consequent:u,alternate:i}){return this.append(r,u,i==null?()=>this.identity:i)}reduceImport(e,{defaultBinding:r,namedImports:u}){return this.append(r==null?()=>this.identity:r,...u)}reduceImportNamespace(e,{defaultBinding:r,namespaceBinding:u}){return this.append(r==null?()=>this.identity:r,u)}reduceImportSpecifier(e,{binding:r}){return r()}reduceLabeledStatement(e,{body:r}){return r()}reduceLiteralBooleanExpression(e){return this.identity}reduceLiteralInfinityExpression(e){return this.identity}reduceLiteralNullExpression(e){return this.identity}reduceLiteralNumericExpression(e){return this.identity}reduceLiteralRegExpExpression(e){return this.identity}reduceLiteralStringExpression(e){return this.identity}reduceMethod(e,{name:r,params:u,body:i}){return this.append(r,u,i)}reduceModule(e,{directives:r,items:u}){return this.append(...r,...u)}reduceNewExpression(e,{callee:r,arguments:u}){return this.append(r,...u)}reduceNewTargetExpression(e){return this.identity}reduceObjectAssignmentTarget(e,{properties:r,rest:u}){return this.append(...r,u==null?()=>this.identity:u)}reduceObjectBinding(e,{properties:r,rest:u}){return this.append(...r,u==null?()=>this.identity:u)}reduceObjectExpression(e,{properties:r}){return this.append(...r)}reduceReturnStatement(e,{expression:r}){return r==null?this.identity:r()}reduceScript(e,{directives:r,statements:u}){return this.append(...r,...u)}reduceSetter(e,{name:r,param:u,body:i}){return this.append(r,u,i)}reduceShorthandProperty(e,{name:r}){return r()}reduceSpreadElement(e,{expression:r}){return r()}reduceSpreadProperty(e,{expression:r}){return r()}reduceStaticMemberAssignmentTarget(e,{object:r}){return r()}reduceStaticMemberExpression(e,{object:r}){return r()}reduceStaticPropertyName(e){return this.identity}reduceSuper(e){return this.identity}reduceSwitchCase(e,{test:r,consequent:u}){return this.append(r,...u)}reduceSwitchDefault(e,{consequent:r}){return this.append(...r)}reduceSwitchStatement(e,{discriminant:r,cases:u}){return this.append(r,...u)}reduceSwitchStatementWithDefault(e,{discriminant:r,preDefaultCases:u,defaultCase:i,postDefaultCases:n}){return this.append(r,...u,i,...n)}reduceTemplateElement(e){return this.identity}reduceTemplateExpression(e,{tag:r,elements:u}){return this.append(r==null?()=>this.identity:r,...u)}reduceThisExpression(e){return this.identity}reduceThrowStatement(e,{expression:r}){return r()}reduceTryCatchStatement(e,{body:r,catchClause:u}){return this.append(r,u)}reduceTryFinallyStatement(e,{body:r,catchClause:u,finalizer:i}){return this.append(r,u==null?()=>this.identity:u,i)}reduceUnaryExpression(e,{operand:r}){return r()}reduceUpdateExpression(e,{operand:r}){return r()}reduceVariableDeclaration(e,{declarators:r}){return this.append(...r)}reduceVariableDeclarationStatement(e,{declaration:r}){return r()}reduceVariableDeclarator(e,{binding:r,init:u}){return this.append(r,u==null?()=>this.identity:u)}reduceWhileStatement(e,{test:r,body:u}){return this.append(r,u)}reduceWithStatement(e,{object:r,body:u}){return this.append(r,u)}reduceYieldExpression(e,{expression:r}){return r==null?this.identity:r()}reduceYieldGeneratorExpression(e,{expression:r}){return r()}},adapt$2=(s,e)=>({__proto__:e,reduceArrayAssignmentTarget(r,u){return s(super.reduceArrayAssignmentTarget(r,u),r)},reduceArrayBinding(r,u){return s(super.reduceArrayBinding(r,u),r)},reduceArrayExpression(r,u){return s(super.reduceArrayExpression(r,u),r)},reduceArrowExpression(r,u){return s(super.reduceArrowExpression(r,u),r)},reduceAssignmentExpression(r,u){return s(super.reduceAssignmentExpression(r,u),r)},reduceAssignmentTargetIdentifier(r,u){return s(super.reduceAssignmentTargetIdentifier(r,u),r)},reduceAssignmentTargetPropertyIdentifier(r,u){return s(super.reduceAssignmentTargetPropertyIdentifier(r,u),r)},reduceAssignmentTargetPropertyProperty(r,u){return s(super.reduceAssignmentTargetPropertyProperty(r,u),r)},reduceAssignmentTargetWithDefault(r,u){return s(super.reduceAssignmentTargetWithDefault(r,u),r)},reduceAwaitExpression(r,u){return s(super.reduceAwaitExpression(r,u),r)},reduceBinaryExpression(r,u){return s(super.reduceBinaryExpression(r,u),r)},reduceBindingIdentifier(r,u){return s(super.reduceBindingIdentifier(r,u),r)},reduceBindingPropertyIdentifier(r,u){return s(super.reduceBindingPropertyIdentifier(r,u),r)},reduceBindingPropertyProperty(r,u){return s(super.reduceBindingPropertyProperty(r,u),r)},reduceBindingWithDefault(r,u){return s(super.reduceBindingWithDefault(r,u),r)},reduceBlock(r,u){return s(super.reduceBlock(r,u),r)},reduceBlockStatement(r,u){return s(super.reduceBlockStatement(r,u),r)},reduceBreakStatement(r,u){return s(super.reduceBreakStatement(r,u),r)},reduceCallExpression(r,u){return s(super.reduceCallExpression(r,u),r)},reduceCatchClause(r,u){return s(super.reduceCatchClause(r,u),r)},reduceClassDeclaration(r,u){return s(super.reduceClassDeclaration(r,u),r)},reduceClassElement(r,u){return s(super.reduceClassElement(r,u),r)},reduceClassExpression(r,u){return s(super.reduceClassExpression(r,u),r)},reduceCompoundAssignmentExpression(r,u){return s(super.reduceCompoundAssignmentExpression(r,u),r)},reduceComputedMemberAssignmentTarget(r,u){return s(super.reduceComputedMemberAssignmentTarget(r,u),r)},reduceComputedMemberExpression(r,u){return s(super.reduceComputedMemberExpression(r,u),r)},reduceComputedPropertyName(r,u){return s(super.reduceComputedPropertyName(r,u),r)},reduceConditionalExpression(r,u){return s(super.reduceConditionalExpression(r,u),r)},reduceContinueStatement(r,u){return s(super.reduceContinueStatement(r,u),r)},reduceDataProperty(r,u){return s(super.reduceDataProperty(r,u),r)},reduceDebuggerStatement(r,u){return s(super.reduceDebuggerStatement(r,u),r)},reduceDirective(r,u){return s(super.reduceDirective(r,u),r)},reduceDoWhileStatement(r,u){return s(super.reduceDoWhileStatement(r,u),r)},reduceEmptyStatement(r,u){return s(super.reduceEmptyStatement(r,u),r)},reduceExport(r,u){return s(super.reduceExport(r,u),r)},reduceExportAllFrom(r,u){return s(super.reduceExportAllFrom(r,u),r)},reduceExportDefault(r,u){return s(super.reduceExportDefault(r,u),r)},reduceExportFrom(r,u){return s(super.reduceExportFrom(r,u),r)},reduceExportFromSpecifier(r,u){return s(super.reduceExportFromSpecifier(r,u),r)},reduceExportLocalSpecifier(r,u){return s(super.reduceExportLocalSpecifier(r,u),r)},reduceExportLocals(r,u){return s(super.reduceExportLocals(r,u),r)},reduceExpressionStatement(r,u){return s(super.reduceExpressionStatement(r,u),r)},reduceForAwaitStatement(r,u){return s(super.reduceForAwaitStatement(r,u),r)},reduceForInStatement(r,u){return s(super.reduceForInStatement(r,u),r)},reduceForOfStatement(r,u){return s(super.reduceForOfStatement(r,u),r)},reduceForStatement(r,u){return s(super.reduceForStatement(r,u),r)},reduceFormalParameters(r,u){return s(super.reduceFormalParameters(r,u),r)},reduceFunctionBody(r,u){return s(super.reduceFunctionBody(r,u),r)},reduceFunctionDeclaration(r,u){return s(super.reduceFunctionDeclaration(r,u),r)},reduceFunctionExpression(r,u){return s(super.reduceFunctionExpression(r,u),r)},reduceGetter(r,u){return s(super.reduceGetter(r,u),r)},reduceIdentifierExpression(r,u){return s(super.reduceIdentifierExpression(r,u),r)},reduceIfStatement(r,u){return s(super.reduceIfStatement(r,u),r)},reduceImport(r,u){return s(super.reduceImport(r,u),r)},reduceImportNamespace(r,u){return s(super.reduceImportNamespace(r,u),r)},reduceImportSpecifier(r,u){return s(super.reduceImportSpecifier(r,u),r)},reduceLabeledStatement(r,u){return s(super.reduceLabeledStatement(r,u),r)},reduceLiteralBooleanExpression(r,u){return s(super.reduceLiteralBooleanExpression(r,u),r)},reduceLiteralInfinityExpression(r,u){return s(super.reduceLiteralInfinityExpression(r,u),r)},reduceLiteralNullExpression(r,u){return s(super.reduceLiteralNullExpression(r,u),r)},reduceLiteralNumericExpression(r,u){return s(super.reduceLiteralNumericExpression(r,u),r)},reduceLiteralRegExpExpression(r,u){return s(super.reduceLiteralRegExpExpression(r,u),r)},reduceLiteralStringExpression(r,u){return s(super.reduceLiteralStringExpression(r,u),r)},reduceMethod(r,u){return s(super.reduceMethod(r,u),r)},reduceModule(r,u){return s(super.reduceModule(r,u),r)},reduceNewExpression(r,u){return s(super.reduceNewExpression(r,u),r)},reduceNewTargetExpression(r,u){return s(super.reduceNewTargetExpression(r,u),r)},reduceObjectAssignmentTarget(r,u){return s(super.reduceObjectAssignmentTarget(r,u),r)},reduceObjectBinding(r,u){return s(super.reduceObjectBinding(r,u),r)},reduceObjectExpression(r,u){return s(super.reduceObjectExpression(r,u),r)},reduceReturnStatement(r,u){return s(super.reduceReturnStatement(r,u),r)},reduceScript(r,u){return s(super.reduceScript(r,u),r)},reduceSetter(r,u){return s(super.reduceSetter(r,u),r)},reduceShorthandProperty(r,u){return s(super.reduceShorthandProperty(r,u),r)},reduceSpreadElement(r,u){return s(super.reduceSpreadElement(r,u),r)},reduceSpreadProperty(r,u){return s(super.reduceSpreadProperty(r,u),r)},reduceStaticMemberAssignmentTarget(r,u){return s(super.reduceStaticMemberAssignmentTarget(r,u),r)},reduceStaticMemberExpression(r,u){return s(super.reduceStaticMemberExpression(r,u),r)},reduceStaticPropertyName(r,u){return s(super.reduceStaticPropertyName(r,u),r)},reduceSuper(r,u){return s(super.reduceSuper(r,u),r)},reduceSwitchCase(r,u){return s(super.reduceSwitchCase(r,u),r)},reduceSwitchDefault(r,u){return s(super.reduceSwitchDefault(r,u),r)},reduceSwitchStatement(r,u){return s(super.reduceSwitchStatement(r,u),r)},reduceSwitchStatementWithDefault(r,u){return s(super.reduceSwitchStatementWithDefault(r,u),r)},reduceTemplateElement(r,u){return s(super.reduceTemplateElement(r,u),r)},reduceTemplateExpression(r,u){return s(super.reduceTemplateExpression(r,u),r)},reduceThisExpression(r,u){return s(super.reduceThisExpression(r,u),r)},reduceThrowStatement(r,u){return s(super.reduceThrowStatement(r,u),r)},reduceTryCatchStatement(r,u){return s(super.reduceTryCatchStatement(r,u),r)},reduceTryFinallyStatement(r,u){return s(super.reduceTryFinallyStatement(r,u),r)},reduceUnaryExpression(r,u){return s(super.reduceUnaryExpression(r,u),r)},reduceUpdateExpression(r,u){return s(super.reduceUpdateExpression(r,u),r)},reduceVariableDeclaration(r,u){return s(super.reduceVariableDeclaration(r,u),r)},reduceVariableDeclarationStatement(r,u){return s(super.reduceVariableDeclarationStatement(r,u),r)},reduceVariableDeclarator(r,u){return s(super.reduceVariableDeclarator(r,u),r)},reduceWhileStatement(r,u){return s(super.reduceWhileStatement(r,u),r)},reduceWithStatement(r,u){return s(super.reduceWithStatement(r,u),r)},reduceYieldExpression(r,u){return s(super.reduceYieldExpression(r,u),r)},reduceYieldGeneratorExpression(r,u){return s(super.reduceYieldGeneratorExpression(r,u),r)}}),reducers={};const MonoidalReducer$2=monoidalReducer,ThunkedMonoidalReducer$1=thunkedMonoidalReducer,PlusMonoid={empty:()=>0,concat:(s,e)=>s+e},ConcatMonoid={empty:()=>[],concat:(s,e)=>s.concat(e)},AndMonoid={empty:()=>!0,concat:(s,e)=>s&&e,concatThunk:(s,e)=>s&&e()},OrMonoid={empty:()=>!1,concat:(s,e)=>s||e,concatThunk:(s,e)=>s||e()};reducers.PlusReducer=class extends MonoidalReducer$2{constructor(){super(PlusMonoid)}};reducers.ThunkedPlusReducer=class extends ThunkedMonoidalReducer$1{constructor(){super(PlusMonoid)}};reducers.ConcatReducer=class extends MonoidalReducer$2{constructor(){super(ConcatMonoid)}};reducers.ThunkedConcatReducer=class extends ThunkedMonoidalReducer$1{constructor(){super(ConcatMonoid)}};reducers.AndReducer=class extends MonoidalReducer$2{constructor(){super(AndMonoid)}};reducers.ThunkedAndReducer=class extends ThunkedMonoidalReducer$1{constructor(){super(AndMonoid)}};reducers.OrReducer=class extends MonoidalReducer$2{constructor(){super(OrMonoid)}};reducers.ThunkedOrReducer=class extends ThunkedMonoidalReducer$1{constructor(){super(OrMonoid)}};const reduce$3=director_1,thunkedReduce=thunkedDirector,thunkify=thunkify$1,thunkifyClass=thunkifyClass$1,memoize=memoize$1,CloneReducer=cloneReducer,LazyCloneReducer=lazyCloneReducer,MonoidalReducer$1=monoidalReducer,ThunkedMonoidalReducer=thunkedMonoidalReducer,adapt$1=adapt$2,{PlusReducer,ThunkedPlusReducer,ConcatReducer,ThunkedConcatReducer,AndReducer,ThunkedAndReducer,OrReducer,ThunkedOrReducer}=reducers;var src$2={default:reduce$3,reduce:reduce$3,thunkedReduce,thunkify,thunkifyClass,memoize,CloneReducer,LazyCloneReducer,MonoidalReducer:MonoidalReducer$1,ThunkedMonoidalReducer,adapt:adapt$1,PlusReducer,ThunkedPlusReducer,ConcatReducer,ThunkedConcatReducer,AndReducer,ThunkedAndReducer,OrReducer,ThunkedOrReducer},multimap={exports:{}};(function(s,e){function r(i,n){for(var a=i.keys(),l;!(l=a.next()).done;)n(i.get(l.value),l.value,i)}var u=function(){var i;typeof Map<"u"&&(i=Map,Map.prototype.keys||(Map.prototype.keys=function(){var o=[];return this.forEach(function(c,A){o.push(A)}),o}));function n(o){var c=this;c._map=i,n.Map&&(c._map=n.Map),c._=c._map?new c._map:{},o&&o.forEach(function(A){c.set(A[0],A[1])})}n.prototype.get=function(o){return this._map?this._.get(o):this._[o]},n.prototype.set=function(o,c){var A=Array.prototype.slice.call(arguments);o=A.shift();var d=this.get(o);return d||(d=[],this._map?this._.set(o,d):this._[o]=d),Array.prototype.push.apply(d,A),this},n.prototype.delete=function(o,c){if(!this.has(o))return!1;if(arguments.length==1)return this._map?this._.delete(o):delete this._[o],!0;var A=this.get(o),d=A.indexOf(c);return d!=-1?(A.splice(d,1),!0):!1},n.prototype.has=function(o,c){var A=this._map?this._.has(o):this._.hasOwnProperty(o);if(arguments.length==1||!A)return A;var d=this.get(o)||[];return d.indexOf(c)!=-1},n.prototype.keys=function(){return this._map?l(this._.keys()):l(Object.keys(this._))},n.prototype.values=function(){var o=[];return this.forEachEntry(function(c){Array.prototype.push.apply(o,c)}),l(o)},n.prototype.forEachEntry=function(o){r(this,o)},n.prototype.forEach=function(o){var c=this;c.forEachEntry(function(A,d){A.forEach(function(m){o(m,d,c)})})},n.prototype.clear=function(){this._map?this._.clear():this._={}},Object.defineProperty(n.prototype,"size",{configurable:!1,enumerable:!0,get:function(){var o=0;return r(this,function(c){o+=c.length}),o}}),Object.defineProperty(n.prototype,"count",{configurable:!1,enumerable:!0,get:function(){return this._.size}});var a;try{a=new Function("iterator","makeIterator","var keysArray = []; for(var key of iterator){keysArray.push(key);} return makeIterator(keysArray).next;")}catch{}function l(o){if(Array.isArray(o)){var c=0;return{next:function(){return c{r.forEachEntry((u,i)=>{s.set.apply(s,[i].concat(u))})}),s}let identity;class EarlyErrorState$1{constructor(){this.errors=[],this.strictErrors=[],this.usedLabelNames=[],this.freeBreakStatements=[],this.freeContinueStatements=[],this.freeLabeledBreakStatements=[],this.freeLabeledContinueStatements=[],this.newTargetExpressions=[],this.boundNames=new MultiMap,this.lexicallyDeclaredNames=new MultiMap,this.functionDeclarationNames=new MultiMap,this.varDeclaredNames=new MultiMap,this.forOfVarDeclaredNames=[],this.exportedNames=new MultiMap,this.exportedBindings=new MultiMap,this.superCallExpressions=[],this.superCallExpressionsInConstructorMethod=[],this.superPropertyExpressions=[],this.yieldExpressions=[],this.awaitExpressions=[]}addFreeBreakStatement(e){return this.freeBreakStatements.push(e),this}addFreeLabeledBreakStatement(e){return this.freeLabeledBreakStatements.push(e),this}clearFreeBreakStatements(){return this.freeBreakStatements=[],this}addFreeContinueStatement(e){return this.freeContinueStatements.push(e),this}addFreeLabeledContinueStatement(e){return this.freeLabeledContinueStatements.push(e),this}clearFreeContinueStatements(){return this.freeContinueStatements=[],this}enforceFreeBreakStatementErrors(e){return[].push.apply(this.errors,this.freeBreakStatements.map(e)),this.freeBreakStatements=[],this}enforceFreeLabeledBreakStatementErrors(e){return[].push.apply(this.errors,this.freeLabeledBreakStatements.map(e)),this.freeLabeledBreakStatements=[],this}enforceFreeContinueStatementErrors(e){return[].push.apply(this.errors,this.freeContinueStatements.map(e)),this.freeContinueStatements=[],this}enforceFreeLabeledContinueStatementErrors(e){return[].push.apply(this.errors,this.freeLabeledContinueStatements.map(e)),this.freeLabeledContinueStatements=[],this}observeIterationLabel(e){return this.usedLabelNames.push(e),this.freeLabeledBreakStatements=this.freeLabeledBreakStatements.filter(r=>r.label!==e),this.freeLabeledContinueStatements=this.freeLabeledContinueStatements.filter(r=>r.label!==e),this}observeNonIterationLabel(e){return this.usedLabelNames.push(e),this.freeLabeledBreakStatements=this.freeLabeledBreakStatements.filter(r=>r.label!==e),this}clearUsedLabelNames(){return this.usedLabelNames=[],this}observeSuperCallExpression(e){return this.superCallExpressions.push(e),this}observeConstructorMethod(){return this.superCallExpressionsInConstructorMethod=this.superCallExpressions,this.superCallExpressions=[],this}clearSuperCallExpressionsInConstructorMethod(){return this.superCallExpressionsInConstructorMethod=[],this}enforceSuperCallExpressions(e){return[].push.apply(this.errors,this.superCallExpressions.map(e)),[].push.apply(this.errors,this.superCallExpressionsInConstructorMethod.map(e)),this.superCallExpressions=[],this.superCallExpressionsInConstructorMethod=[],this}enforceSuperCallExpressionsInConstructorMethod(e){return[].push.apply(this.errors,this.superCallExpressionsInConstructorMethod.map(e)),this.superCallExpressionsInConstructorMethod=[],this}observeSuperPropertyExpression(e){return this.superPropertyExpressions.push(e),this}clearSuperPropertyExpressions(){return this.superPropertyExpressions=[],this}enforceSuperPropertyExpressions(e){return[].push.apply(this.errors,this.superPropertyExpressions.map(e)),this.superPropertyExpressions=[],this}observeNewTargetExpression(e){return this.newTargetExpressions.push(e),this}clearNewTargetExpressions(){return this.newTargetExpressions=[],this}bindName(e,r){return this.boundNames.set(e,r),this}clearBoundNames(){return this.boundNames=new MultiMap,this}observeLexicalDeclaration(){return addEach(this.lexicallyDeclaredNames,this.boundNames),this.boundNames=new MultiMap,this}observeLexicalBoundary(){return this.previousLexicallyDeclaredNames=this.lexicallyDeclaredNames,this.lexicallyDeclaredNames=new MultiMap,this.functionDeclarationNames=new MultiMap,this}enforceDuplicateLexicallyDeclaredNames(e){return this.lexicallyDeclaredNames.forEachEntry(r=>{r.length>1&&r.slice(1).forEach(u=>{this.addError(e(u))})}),this}enforceConflictingLexicallyDeclaredNames(e,r){return this.lexicallyDeclaredNames.forEachEntry((u,i)=>{e.has(i)&&u.forEach(n=>{this.addError(r(n))})}),this}observeFunctionDeclaration(){return this.observeVarBoundary(),addEach(this.functionDeclarationNames,this.boundNames),this.boundNames=new MultiMap,this}functionDeclarationNamesAreLexical(){return addEach(this.lexicallyDeclaredNames,this.functionDeclarationNames),this.functionDeclarationNames=new MultiMap,this}observeVarDeclaration(){return addEach(this.varDeclaredNames,this.boundNames),this.boundNames=new MultiMap,this}recordForOfVars(){return this.varDeclaredNames.forEach(e=>{this.forOfVarDeclaredNames.push(e)}),this}observeVarBoundary(){return this.lexicallyDeclaredNames=new MultiMap,this.functionDeclarationNames=new MultiMap,this.varDeclaredNames=new MultiMap,this.forOfVarDeclaredNames=[],this}exportName(e,r){return this.exportedNames.set(e,r),this}exportDeclaredNames(){return addEach(this.exportedNames,this.lexicallyDeclaredNames,this.varDeclaredNames),addEach(this.exportedBindings,this.lexicallyDeclaredNames,this.varDeclaredNames),this}exportBinding(e,r){return this.exportedBindings.set(e,r),this}clearExportedBindings(){return this.exportedBindings=new MultiMap,this}observeYieldExpression(e){return this.yieldExpressions.push(e),this}clearYieldExpressions(){return this.yieldExpressions=[],this}observeAwaitExpression(e){return this.awaitExpressions.push(e),this}clearAwaitExpressions(){return this.awaitExpressions=[],this}addError(e){return this.errors.push(e),this}addStrictError(e){return this.strictErrors.push(e),this}enforceStrictErrors(){return[].push.apply(this.errors,this.strictErrors),this.strictErrors=[],this}static empty(){return identity}concat(e){return this===identity?e:e===identity?this:([].push.apply(this.errors,e.errors),[].push.apply(this.strictErrors,e.strictErrors),[].push.apply(this.usedLabelNames,e.usedLabelNames),[].push.apply(this.freeBreakStatements,e.freeBreakStatements),[].push.apply(this.freeContinueStatements,e.freeContinueStatements),[].push.apply(this.freeLabeledBreakStatements,e.freeLabeledBreakStatements),[].push.apply(this.freeLabeledContinueStatements,e.freeLabeledContinueStatements),[].push.apply(this.newTargetExpressions,e.newTargetExpressions),addEach(this.boundNames,e.boundNames),addEach(this.lexicallyDeclaredNames,e.lexicallyDeclaredNames),addEach(this.functionDeclarationNames,e.functionDeclarationNames),addEach(this.varDeclaredNames,e.varDeclaredNames),[].push.apply(this.forOfVarDeclaredNames,e.forOfVarDeclaredNames),addEach(this.exportedNames,e.exportedNames),addEach(this.exportedBindings,e.exportedBindings),[].push.apply(this.superCallExpressions,e.superCallExpressions),[].push.apply(this.superCallExpressionsInConstructorMethod,e.superCallExpressionsInConstructorMethod),[].push.apply(this.superPropertyExpressions,e.superPropertyExpressions),[].push.apply(this.yieldExpressions,e.yieldExpressions),[].push.apply(this.awaitExpressions,e.awaitExpressions),this)}}identity=new EarlyErrorState$1;Object.getOwnPropertyNames(EarlyErrorState$1.prototype).forEach(s=>{s!=="constructor"&&Object.defineProperty(identity,s,{value(){return EarlyErrorState$1.prototype[s].apply(new EarlyErrorState$1,arguments)},enumerable:!1,writable:!0,configurable:!0})});class EarlyError$1 extends Error{constructor(e,r){super(r),this.node=e,this.message=r}}var earlyErrorState={EarlyErrorState:EarlyErrorState$1,EarlyError:EarlyError$1};const{reduce:reduce$2,MonoidalReducer}=src$2,{isStrictModeReservedWord}=utils$1,{ErrorMessages}=errors,{EarlyErrorState,EarlyError}=earlyErrorState;function isStrictFunctionBody({directives:s}){return s.some(e=>e.rawValue==="use strict")}function isLabelledFunction(s){return s.type==="LabeledStatement"&&(s.body.type==="FunctionDeclaration"||isLabelledFunction(s.body))}function isIterationStatement(s){switch(s.type){case"LabeledStatement":return isIterationStatement(s.body);case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function isSpecialMethod(s){if(s.name.type!=="StaticPropertyName"||s.name.value!=="constructor")return!1;switch(s.type){case"Getter":case"Setter":return!0;case"Method":return s.isGenerator||s.isAsync}throw new Error("not reached")}function enforceDuplicateConstructorMethods(s,e){let r=s.elements.filter(u=>!u.isStatic&&u.method.type==="Method"&&!u.method.isGenerator&&u.method.name.type==="StaticPropertyName"&&u.method.name.value==="constructor");return r.length>1&&r.slice(1).forEach(u=>{e=e.addError(new EarlyError(u,"Duplicate constructor method in class"))}),e}const SUPERCALL_ERROR=s=>new EarlyError(s,ErrorMessages.ILLEGAL_SUPER_CALL),SUPERPROPERTY_ERROR=s=>new EarlyError(s,"Member access on super must be in a method"),DUPLICATE_BINDING=s=>new EarlyError(s,`Duplicate binding ${JSON.stringify(s.name)}`),FREE_CONTINUE=s=>new EarlyError(s,"Continue statement must be nested within an iteration statement"),UNBOUND_CONTINUE=s=>new EarlyError(s,`Continue statement must be nested within an iteration statement with label ${JSON.stringify(s.label)}`),FREE_BREAK=s=>new EarlyError(s,"Break statement must be nested within an iteration statement or a switch statement"),UNBOUND_BREAK=s=>new EarlyError(s,`Break statement must be nested within a statement with label ${JSON.stringify(s.label)}`);class EarlyErrorChecker$1 extends MonoidalReducer{constructor(){super(EarlyErrorState)}reduceAssignmentExpression(){return super.reduceAssignmentExpression(...arguments).clearBoundNames()}reduceAssignmentTargetIdentifier(e){let r=this.identity;return(e.name==="eval"||e.name==="arguments"||isStrictModeReservedWord(e.name))&&(r=r.addStrictError(new EarlyError(e,`The identifier ${JSON.stringify(e.name)} must not be in binding position in strict mode`))),r}reduceArrowExpression(e,{params:r,body:u}){let i=e.params.rest==null&&e.params.items.every(a=>a.type==="BindingIdentifier");r=r.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),e.body.type==="FunctionBody"&&(u=u.enforceConflictingLexicallyDeclaredNames(r.lexicallyDeclaredNames,DUPLICATE_BINDING),isStrictFunctionBody(e.body)&&(r=r.enforceStrictErrors(),u=u.enforceStrictErrors())),r.yieldExpressions.forEach(a=>{r=r.addError(new EarlyError(a,"Arrow parameters must not contain yield expressions"))}),r.awaitExpressions.forEach(a=>{r=r.addError(new EarlyError(a,"Arrow parameters must not contain await expressions"))});let n=super.reduceArrowExpression(e,{params:r,body:u});return!i&&e.body.type==="FunctionBody"&&isStrictFunctionBody(e.body)&&(n=n.addError(new EarlyError(e,'Functions with non-simple parameter lists may not contain a "use strict" directive'))),n=n.clearYieldExpressions(),n=n.clearAwaitExpressions(),n=n.observeVarBoundary(),n}reduceAwaitExpression(e,{expression:r}){return r.observeAwaitExpression(e)}reduceBindingIdentifier(e){let r=this.identity;return(e.name==="eval"||e.name==="arguments"||isStrictModeReservedWord(e.name))&&(r=r.addStrictError(new EarlyError(e,`The identifier ${JSON.stringify(e.name)} must not be in binding position in strict mode`))),r=r.bindName(e.name,e),r}reduceBlock(){let e=super.reduceBlock(...arguments);return e=e.functionDeclarationNamesAreLexical(),e=e.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),e=e.enforceConflictingLexicallyDeclaredNames(e.varDeclaredNames,DUPLICATE_BINDING),e=e.observeLexicalBoundary(),e}reduceBreakStatement(e){let r=super.reduceBreakStatement(...arguments);return r=e.label==null?r.addFreeBreakStatement(e):r.addFreeLabeledBreakStatement(e),r}reduceCallExpression(e){let r=super.reduceCallExpression(...arguments);return e.callee.type==="Super"&&(r=r.observeSuperCallExpression(e)),r}reduceCatchClause(e,{binding:r,body:u}){r!=null&&(r=r.observeLexicalDeclaration(),r=r.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),r=r.enforceConflictingLexicallyDeclaredNames(u.previousLexicallyDeclaredNames,DUPLICATE_BINDING));let i=super.reduceCatchClause(e,{binding:r,body:u});return i=i.observeLexicalBoundary(),i}reduceClassDeclaration(e,{name:r,super:u,elements:i}){let n=r.enforceStrictErrors(),a=this.append(...i);return a=a.enforceStrictErrors(),e.super!=null&&(u=u.enforceStrictErrors(),n=this.append(n,u),a=a.clearSuperCallExpressionsInConstructorMethod()),n=this.append(n,a),n=enforceDuplicateConstructorMethods(e,n),n=n.observeLexicalDeclaration(),n}reduceClassElement(e){let r=super.reduceClassElement(...arguments);return!e.isStatic&&isSpecialMethod(e.method)&&(r=r.addError(new EarlyError(e,ErrorMessages.ILLEGAL_CONSTRUCTORS))),e.isStatic&&e.method.name.type==="StaticPropertyName"&&e.method.name.value==="prototype"&&(r=r.addError(new EarlyError(e,'Static class methods cannot be named "prototype"'))),r}reduceClassExpression(e,{name:r,super:u,elements:i}){let n=e.name==null?this.identity:r.enforceStrictErrors(),a=this.append(...i);return a=a.enforceStrictErrors(),e.super!=null&&(u=u.enforceStrictErrors(),n=this.append(n,u),a=a.clearSuperCallExpressionsInConstructorMethod()),n=this.append(n,a),n=enforceDuplicateConstructorMethods(e,n),n=n.clearBoundNames(),n}reduceCompoundAssignmentExpression(){return super.reduceCompoundAssignmentExpression(...arguments).clearBoundNames()}reduceComputedMemberExpression(e){let r=super.reduceComputedMemberExpression(...arguments);return e.object.type==="Super"&&(r=r.observeSuperPropertyExpression(e)),r}reduceContinueStatement(e){let r=super.reduceContinueStatement(...arguments);return r=e.label==null?r.addFreeContinueStatement(e):r.addFreeLabeledContinueStatement(e),r}reduceDoWhileStatement(e){let r=super.reduceDoWhileStatement(...arguments);return isLabelledFunction(e.body)&&(r=r.addError(new EarlyError(e.body,"The body of a do-while statement must not be a labeled function declaration"))),r=r.clearFreeContinueStatements(),r=r.clearFreeBreakStatements(),r}reduceExport(){let e=super.reduceExport(...arguments);return e=e.functionDeclarationNamesAreLexical(),e=e.exportDeclaredNames(),e}reduceExportFrom(){let e=super.reduceExportFrom(...arguments);return e=e.clearExportedBindings(),e}reduceExportFromSpecifier(e){let r=super.reduceExportFromSpecifier(...arguments);return r=r.exportName(e.exportedName||e.name,e),r=r.exportBinding(e.name,e),r}reduceExportLocalSpecifier(e){let r=super.reduceExportLocalSpecifier(...arguments);return r=r.exportName(e.exportedName||e.name.name,e),r=r.exportBinding(e.name.name,e),r}reduceExportDefault(e){let r=super.reduceExportDefault(...arguments);return r=r.functionDeclarationNamesAreLexical(),r=r.exportName("default",e),r}reduceFormalParameters(){let e=super.reduceFormalParameters(...arguments);return e=e.observeLexicalDeclaration(),e}reduceForStatement(e,{init:r,test:u,update:i,body:n}){r!=null&&(r=r.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),r=r.enforceConflictingLexicallyDeclaredNames(n.varDeclaredNames,DUPLICATE_BINDING));let a=super.reduceForStatement(e,{init:r,test:u,update:i,body:n});return e.init!=null&&e.init.type==="VariableDeclaration"&&e.init.kind==="const"&&e.init.declarators.forEach(l=>{l.init==null&&(a=a.addError(new EarlyError(l,"Constant lexical declarations must have an initialiser")))}),isLabelledFunction(e.body)&&(a=a.addError(new EarlyError(e.body,"The body of a for statement must not be a labeled function declaration"))),a=a.clearFreeContinueStatements(),a=a.clearFreeBreakStatements(),a=a.observeLexicalBoundary(),a}reduceForInStatement(e,{left:r,right:u,body:i}){r=r.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),r=r.enforceConflictingLexicallyDeclaredNames(i.varDeclaredNames,DUPLICATE_BINDING);let n=super.reduceForInStatement(e,{left:r,right:u,body:i});return isLabelledFunction(e.body)&&(n=n.addError(new EarlyError(e.body,"The body of a for-in statement must not be a labeled function declaration"))),n=n.clearFreeContinueStatements(),n=n.clearFreeBreakStatements(),n=n.observeLexicalBoundary(),n}reduceForOfStatement(e,{left:r,right:u,body:i}){r=r.recordForOfVars(),r=r.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),r=r.enforceConflictingLexicallyDeclaredNames(i.varDeclaredNames,DUPLICATE_BINDING);let n=super.reduceForOfStatement(e,{left:r,right:u,body:i});return isLabelledFunction(e.body)&&(n=n.addError(new EarlyError(e.body,"The body of a for-of statement must not be a labeled function declaration"))),n=n.clearFreeContinueStatements(),n=n.clearFreeBreakStatements(),n=n.observeLexicalBoundary(),n}reduceForAwaitStatement(e,{left:r,right:u,body:i}){r=r.recordForOfVars(),r=r.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),r=r.enforceConflictingLexicallyDeclaredNames(i.varDeclaredNames,DUPLICATE_BINDING);let n=super.reduceForOfStatement(e,{left:r,right:u,body:i});return isLabelledFunction(e.body)&&(n=n.addError(new EarlyError(e.body,"The body of a for-await statement must not be a labeled function declaration"))),n=n.clearFreeContinueStatements(),n=n.clearFreeBreakStatements(),n=n.observeLexicalBoundary(),n}reduceFunctionBody(e){let r=super.reduceFunctionBody(...arguments);return r=r.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),r=r.enforceConflictingLexicallyDeclaredNames(r.varDeclaredNames,DUPLICATE_BINDING),r=r.enforceFreeContinueStatementErrors(FREE_CONTINUE),r=r.enforceFreeLabeledContinueStatementErrors(UNBOUND_CONTINUE),r=r.enforceFreeBreakStatementErrors(FREE_BREAK),r=r.enforceFreeLabeledBreakStatementErrors(UNBOUND_BREAK),r=r.clearUsedLabelNames(),r=r.clearYieldExpressions(),r=r.clearAwaitExpressions(),isStrictFunctionBody(e)&&(r=r.enforceStrictErrors()),r}reduceFunctionDeclaration(e,{name:r,params:u,body:i}){let n=e.params.rest==null&&e.params.items.every(o=>o.type==="BindingIdentifier"),a=!n||e.isGenerator?"addError":"addStrictError";u.lexicallyDeclaredNames.forEachEntry(o=>{o.length>1&&o.slice(1).forEach(c=>{u=u[a](DUPLICATE_BINDING(c))})}),i=i.enforceConflictingLexicallyDeclaredNames(u.lexicallyDeclaredNames,DUPLICATE_BINDING),i=i.enforceSuperCallExpressions(SUPERCALL_ERROR),i=i.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),u=u.enforceSuperCallExpressions(SUPERCALL_ERROR),u=u.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),e.isGenerator&&u.yieldExpressions.forEach(o=>{u=u.addError(new EarlyError(o,"Generator parameters must not contain yield expressions"))}),e.isAsync&&u.awaitExpressions.forEach(o=>{u=u.addError(new EarlyError(o,"Async function parameters must not contain await expressions"))}),u=u.clearNewTargetExpressions(),i=i.clearNewTargetExpressions(),isStrictFunctionBody(e.body)&&(u=u.enforceStrictErrors(),i=i.enforceStrictErrors());let l=super.reduceFunctionDeclaration(e,{name:r,params:u,body:i});return!n&&isStrictFunctionBody(e.body)&&(l=l.addError(new EarlyError(e,'Functions with non-simple parameter lists may not contain a "use strict" directive'))),l=l.clearYieldExpressions(),l=l.clearAwaitExpressions(),l=l.observeFunctionDeclaration(),l}reduceFunctionExpression(e,{name:r,params:u,body:i}){let n=e.params.rest==null&&e.params.items.every(o=>o.type==="BindingIdentifier"),a=!n||e.isGenerator?"addError":"addStrictError";u.lexicallyDeclaredNames.forEachEntry((o,c)=>{o.length>1&&o.slice(1).forEach(A=>{u=u[a](new EarlyError(A,`Duplicate binding ${JSON.stringify(c)}`))})}),i=i.enforceConflictingLexicallyDeclaredNames(u.lexicallyDeclaredNames,DUPLICATE_BINDING),i=i.enforceSuperCallExpressions(SUPERCALL_ERROR),i=i.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),u=u.enforceSuperCallExpressions(SUPERCALL_ERROR),u=u.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),e.isGenerator&&u.yieldExpressions.forEach(o=>{u=u.addError(new EarlyError(o,"Generator parameters must not contain yield expressions"))}),e.isAsync&&u.awaitExpressions.forEach(o=>{u=u.addError(new EarlyError(o,"Async function parameters must not contain await expressions"))}),u=u.clearNewTargetExpressions(),i=i.clearNewTargetExpressions(),isStrictFunctionBody(e.body)&&(u=u.enforceStrictErrors(),i=i.enforceStrictErrors());let l=super.reduceFunctionExpression(e,{name:r,params:u,body:i});return!n&&isStrictFunctionBody(e.body)&&(l=l.addError(new EarlyError(e,'Functions with non-simple parameter lists may not contain a "use strict" directive'))),l=l.clearBoundNames(),l=l.clearYieldExpressions(),l=l.clearAwaitExpressions(),l=l.observeVarBoundary(),l}reduceGetter(e,{name:r,body:u}){u=u.enforceSuperCallExpressions(SUPERCALL_ERROR),u=u.clearSuperPropertyExpressions(),u=u.clearNewTargetExpressions(),isStrictFunctionBody(e.body)&&(u=u.enforceStrictErrors());let i=super.reduceGetter(e,{name:r,body:u});return i=i.observeVarBoundary(),i}reduceIdentifierExpression(e){let r=this.identity;return isStrictModeReservedWord(e.name)&&(r=r.addStrictError(new EarlyError(e,`The identifier ${JSON.stringify(e.name)} must not be in expression position in strict mode`))),r}reduceIfStatement(e,{test:r,consequent:u,alternate:i}){return isLabelledFunction(e.consequent)&&(u=u.addError(new EarlyError(e.consequent,"The consequent of an if statement must not be a labeled function declaration"))),e.alternate!=null&&isLabelledFunction(e.alternate)&&(i=i.addError(new EarlyError(e.alternate,"The alternate of an if statement must not be a labeled function declaration"))),e.consequent.type==="FunctionDeclaration"&&(u=u.addStrictError(new EarlyError(e.consequent,"FunctionDeclarations in IfStatements are disallowed in strict mode")),u=u.observeLexicalBoundary()),e.alternate!=null&&e.alternate.type==="FunctionDeclaration"&&(i=i.addStrictError(new EarlyError(e.alternate,"FunctionDeclarations in IfStatements are disallowed in strict mode")),i=i.observeLexicalBoundary()),super.reduceIfStatement(e,{test:r,consequent:u,alternate:i})}reduceImport(){let e=super.reduceImport(...arguments);return e=e.observeLexicalDeclaration(),e}reduceImportNamespace(){let e=super.reduceImportNamespace(...arguments);return e=e.observeLexicalDeclaration(),e}reduceLabeledStatement(e){let r=super.reduceLabeledStatement(...arguments);return(e.label==="yield"||isStrictModeReservedWord(e.label))&&(r=r.addStrictError(new EarlyError(e,`The identifier ${JSON.stringify(e.label)} must not be in label position in strict mode`))),r.usedLabelNames.indexOf(e.label)>=0&&(r=r.addError(new EarlyError(e,`Label ${JSON.stringify(e.label)} has already been declared`))),e.body.type==="FunctionDeclaration"&&(r=r.addStrictError(new EarlyError(e,"Labeled FunctionDeclarations are disallowed in strict mode"))),r=isIterationStatement(e.body)?r.observeIterationLabel(e.label):r.observeNonIterationLabel(e.label),r}reduceLiteralRegExpExpression(){return this.identity}reduceMethod(e,{name:r,params:u,body:i}){let n=e.params.rest==null&&e.params.items.every(l=>l.type==="BindingIdentifier");u=u.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),i=i.enforceConflictingLexicallyDeclaredNames(u.lexicallyDeclaredNames,DUPLICATE_BINDING),e.name.type==="StaticPropertyName"&&e.name.value==="constructor"?(i=i.observeConstructorMethod(),u=u.observeConstructorMethod()):(i=i.enforceSuperCallExpressions(SUPERCALL_ERROR),u=u.enforceSuperCallExpressions(SUPERCALL_ERROR)),e.isGenerator&&u.yieldExpressions.forEach(l=>{u=u.addError(new EarlyError(l,"Generator parameters must not contain yield expressions"))}),e.isAsync&&u.awaitExpressions.forEach(l=>{u=u.addError(new EarlyError(l,"Async function parameters must not contain await expressions"))}),i=i.clearSuperPropertyExpressions(),u=u.clearSuperPropertyExpressions(),u=u.clearNewTargetExpressions(),i=i.clearNewTargetExpressions(),isStrictFunctionBody(e.body)&&(u=u.enforceStrictErrors(),i=i.enforceStrictErrors());let a=super.reduceMethod(e,{name:r,params:u,body:i});return!n&&isStrictFunctionBody(e.body)&&(a=a.addError(new EarlyError(e,'Functions with non-simple parameter lists may not contain a "use strict" directive'))),a=a.clearYieldExpressions(),a=a.clearAwaitExpressions(),a=a.observeVarBoundary(),a}reduceModule(){let e=super.reduceModule(...arguments);return e=e.functionDeclarationNamesAreLexical(),e=e.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),e=e.enforceConflictingLexicallyDeclaredNames(e.varDeclaredNames,DUPLICATE_BINDING),e.exportedNames.forEachEntry((r,u)=>{r.length>1&&r.slice(1).forEach(i=>{e=e.addError(new EarlyError(i,`Duplicate export ${JSON.stringify(u)}`))})}),e.exportedBindings.forEachEntry((r,u)=>{!e.lexicallyDeclaredNames.has(u)&&!e.varDeclaredNames.has(u)&&r.forEach(i=>{e=e.addError(new EarlyError(i,`Exported binding ${JSON.stringify(u)} is not declared`))})}),e.newTargetExpressions.forEach(r=>{e=e.addError(new EarlyError(r,"new.target must be within function (but not arrow expression) code"))}),e=e.enforceFreeContinueStatementErrors(FREE_CONTINUE),e=e.enforceFreeLabeledContinueStatementErrors(UNBOUND_CONTINUE),e=e.enforceFreeBreakStatementErrors(FREE_BREAK),e=e.enforceFreeLabeledBreakStatementErrors(UNBOUND_BREAK),e=e.enforceSuperCallExpressions(SUPERCALL_ERROR),e=e.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),e=e.enforceStrictErrors(),e}reduceNewTargetExpression(e){return this.identity.observeNewTargetExpression(e)}reduceObjectExpression(e){let r=super.reduceObjectExpression(...arguments);return r=r.enforceSuperCallExpressionsInConstructorMethod(SUPERCALL_ERROR),e.properties.filter(i=>i.type==="DataProperty"&&i.name.type==="StaticPropertyName"&&i.name.value==="__proto__").slice(1).forEach(i=>{r=r.addError(new EarlyError(i,"Duplicate __proto__ property in object literal not allowed"))}),r}reduceUpdateExpression(){let e=super.reduceUpdateExpression(...arguments);return e=e.clearBoundNames(),e}reduceUnaryExpression(e){let r=super.reduceUnaryExpression(...arguments);return e.operator==="delete"&&e.operand.type==="IdentifierExpression"&&(r=r.addStrictError(new EarlyError(e,"Identifier expressions must not be deleted in strict mode"))),r}reduceScript(e){let r=super.reduceScript(...arguments);return r=r.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),r=r.enforceConflictingLexicallyDeclaredNames(r.varDeclaredNames,DUPLICATE_BINDING),r.newTargetExpressions.forEach(u=>{r=r.addError(new EarlyError(u,"new.target must be within function (but not arrow expression) code"))}),r=r.enforceFreeContinueStatementErrors(FREE_CONTINUE),r=r.enforceFreeLabeledContinueStatementErrors(UNBOUND_CONTINUE),r=r.enforceFreeBreakStatementErrors(FREE_BREAK),r=r.enforceFreeLabeledBreakStatementErrors(UNBOUND_BREAK),r=r.enforceSuperCallExpressions(SUPERCALL_ERROR),r=r.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),isStrictFunctionBody(e)&&(r=r.enforceStrictErrors()),r}reduceSetter(e,{name:r,param:u,body:i}){let n=e.param.type==="BindingIdentifier";u=u.observeLexicalDeclaration(),u=u.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),i=i.enforceConflictingLexicallyDeclaredNames(u.lexicallyDeclaredNames,DUPLICATE_BINDING),u=u.enforceSuperCallExpressions(SUPERCALL_ERROR),i=i.enforceSuperCallExpressions(SUPERCALL_ERROR),u=u.clearSuperPropertyExpressions(),i=i.clearSuperPropertyExpressions(),u=u.clearNewTargetExpressions(),i=i.clearNewTargetExpressions(),isStrictFunctionBody(e.body)&&(u=u.enforceStrictErrors(),i=i.enforceStrictErrors());let a=super.reduceSetter(e,{name:r,param:u,body:i});return!n&&isStrictFunctionBody(e.body)&&(a=a.addError(new EarlyError(e,'Functions with non-simple parameter lists may not contain a "use strict" directive'))),a=a.observeVarBoundary(),a}reduceStaticMemberExpression(e){let r=super.reduceStaticMemberExpression(...arguments);return e.object.type==="Super"&&(r=r.observeSuperPropertyExpression(e)),r}reduceSwitchStatement(e,{discriminant:r,cases:u}){let i=this.append(...u);i=i.functionDeclarationNamesAreLexical(),i=i.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),i=i.enforceConflictingLexicallyDeclaredNames(i.varDeclaredNames,DUPLICATE_BINDING),i=i.observeLexicalBoundary();let n=this.append(r,i);return n=n.clearFreeBreakStatements(),n}reduceSwitchStatementWithDefault(e,{discriminant:r,preDefaultCases:u,defaultCase:i,postDefaultCases:n}){let a=this.append(i,...u,...n);a=a.functionDeclarationNamesAreLexical(),a=a.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),a=a.enforceConflictingLexicallyDeclaredNames(a.varDeclaredNames,DUPLICATE_BINDING),a=a.observeLexicalBoundary();let l=this.append(r,a);return l=l.clearFreeBreakStatements(),l}reduceVariableDeclaration(e){let r=super.reduceVariableDeclaration(...arguments);switch(e.kind){case"const":case"let":{r=r.observeLexicalDeclaration(),r.lexicallyDeclaredNames.has("let")&&r.lexicallyDeclaredNames.get("let").forEach(u=>{r=r.addError(new EarlyError(u,'Lexical declarations must not have a binding named "let"'))});break}case"var":r=r.observeVarDeclaration();break}return r}reduceVariableDeclarationStatement(e){let r=super.reduceVariableDeclarationStatement(...arguments);return e.declaration.kind==="const"&&e.declaration.declarators.forEach(u=>{u.init==null&&(r=r.addError(new EarlyError(u,"Constant lexical declarations must have an initialiser")))}),r}reduceWhileStatement(e){let r=super.reduceWhileStatement(...arguments);return isLabelledFunction(e.body)&&(r=r.addError(new EarlyError(e.body,"The body of a while statement must not be a labeled function declaration"))),r=r.clearFreeContinueStatements().clearFreeBreakStatements(),r}reduceWithStatement(e){let r=super.reduceWithStatement(...arguments);return isLabelledFunction(e.body)&&(r=r.addError(new EarlyError(e.body,"The body of a with statement must not be a labeled function declaration"))),r=r.addStrictError(new EarlyError(e,"Strict mode code must not include a with statement")),r}reduceYieldExpression(e){let r=super.reduceYieldExpression(...arguments);return r=r.observeYieldExpression(e),r}reduceYieldGeneratorExpression(e){let r=super.reduceYieldGeneratorExpression(...arguments);return r=r.observeYieldExpression(e),r}static check(e){return reduce$2(new EarlyErrorChecker$1,e).errors}}var earlyErrors={EarlyErrorChecker:EarlyErrorChecker$1};const{GenericParser}=parser,{JsError}=tokenizer,{EarlyErrorChecker}=earlyErrors,{isLineTerminator}=utils$1,{Tokenizer,TokenClass,TokenType}=tokenizer;class ParserWithLocation extends GenericParser{constructor(e){super(e),this.locations=new WeakMap,this.comments=[]}startNode(){return this.getLocation()}finishNode(e,r){if(e.type==="Script"||e.type==="Module")return this.locations.set(e,{start:{line:1,column:0,offset:0},end:this.getLocation()}),e;if(e.type==="TemplateExpression")for(let u=0;u0)throw new JsError(0,1,0,a[0].message)}return n}}function generateInterfaceWithLocation(s){return function(r,{earlyErrors:u=!0}={}){let i=new ParserWithLocation(r),n=i[s]();if(u){let a=EarlyErrorChecker.check(n);if(a.length>0){let{node:l,message:o}=a[0],{offset:c,line:A,column:d}=i.locations.get(l).start;throw new JsError(c,A,d,o)}}return{tree:n,locations:i.locations,comments:i.comments}}}const parseScript=generateInterface("parseScript"),parseModule=generateInterface("parseModule"),parseModuleWithLocation=generateInterfaceWithLocation("parseModule"),parseScriptWithLocation=generateInterfaceWithLocation("parseScript");var src$1={default:parseScript,parseScript,parseModule,parseModuleWithLocation,parseScriptWithLocation,EarlyErrorChecker,GenericParser,ParserWithLocation,Tokenizer,TokenClass,TokenType},dist=function(){var s={},e={typeName:"Boolean"},r={typeName:"Number"},u={typeName:"String"};function i(Fe){return{typeName:"Maybe",argument:Fe}}function n(Fe){return{typeName:"List",argument:Fe}}function a(Fe){return{typeName:"Const",argument:Fe}}function l(){return{typeName:"Union",arguments:[].slice.call(arguments,0)}}var o={typeName:"Enum",values:["ArrayAssignmentTarget","ArrayBinding","ArrayExpression","ArrowExpression","AssignmentExpression","AssignmentTargetIdentifier","AssignmentTargetPropertyIdentifier","AssignmentTargetPropertyProperty","AssignmentTargetWithDefault","AwaitExpression","BinaryExpression","BindingIdentifier","BindingPropertyIdentifier","BindingPropertyProperty","BindingWithDefault","Block","BlockStatement","BreakStatement","CallExpression","CatchClause","ClassDeclaration","ClassElement","ClassExpression","CompoundAssignmentExpression","ComputedMemberAssignmentTarget","ComputedMemberExpression","ComputedPropertyName","ConditionalExpression","ContinueStatement","DataProperty","DebuggerStatement","Directive","DoWhileStatement","EmptyStatement","Export","ExportAllFrom","ExportDefault","ExportFrom","ExportFromSpecifier","ExportLocalSpecifier","ExportLocals","ExpressionStatement","ForAwaitStatement","ForInStatement","ForOfStatement","ForStatement","FormalParameters","FunctionBody","FunctionDeclaration","FunctionExpression","Getter","IdentifierExpression","IfStatement","Import","ImportNamespace","ImportSpecifier","LabeledStatement","LiteralBooleanExpression","LiteralInfinityExpression","LiteralNullExpression","LiteralNumericExpression","LiteralRegExpExpression","LiteralStringExpression","Method","Module","NewExpression","NewTargetExpression","ObjectAssignmentTarget","ObjectBinding","ObjectExpression","ReturnStatement","Script","Setter","ShorthandProperty","SpreadElement","SpreadProperty","StaticMemberAssignmentTarget","StaticMemberExpression","StaticPropertyName","Super","SwitchCase","SwitchDefault","SwitchStatement","SwitchStatementWithDefault","TemplateElement","TemplateExpression","ThisExpression","ThrowStatement","TryCatchStatement","TryFinallyStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarationStatement","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","YieldGeneratorExpression"]},c={typeName:"Enum",values:["==","!=","===","!==","<","<=",">",">=","in","instanceof","<<",">>",">>>","+","-","*","/","%","**",",","||","&&","|","^","&"]},A={typeName:"Enum",values:["+=","-=","*=","/=","%=","**=","<<=",">>=",">>>=","|=","^=","&="]},d={typeName:"Enum",values:["+","-","!","~","typeof","void","delete"]},m={typeName:"Enum",values:["++","--"]},f={typeName:"Enum",values:["var","let","const"]},E=s.ArrayAssignmentTarget={},D=s.ArrayBinding={},h=s.ArrayExpression={},y=s.ArrowExpression={},_=s.AssignmentExpression={},b=s.AssignmentTargetIdentifier={},P=s.AssignmentTargetPropertyIdentifier={},B=s.AssignmentTargetPropertyProperty={},g=s.AssignmentTargetWithDefault={},x=s.AwaitExpression={},C=s.BinaryExpression={},S=s.BindingIdentifier={},L=s.BindingPropertyIdentifier={},$=s.BindingPropertyProperty={},N=s.BindingWithDefault={},R=s.Block={},O=s.BlockStatement={},U=s.BreakStatement={},G=s.CallExpression={},k=s.CatchClause={},M=s.ClassDeclaration={},H=s.ClassElement={},Y=s.ClassExpression={},ae=s.CompoundAssignmentExpression={},ee=s.ComputedMemberAssignmentTarget={},te=s.ComputedMemberExpression={},v=s.ComputedPropertyName={},X=s.ConditionalExpression={},re=s.ContinueStatement={},Ee=s.DataProperty={},q=s.DebuggerStatement={},K=s.Directive={},le=s.DoWhileStatement={},ue=s.EmptyStatement={},se=s.Export={},W=s.ExportAllFrom={},z=s.ExportDefault={},ce=s.ExportFrom={},De=s.ExportFromSpecifier={},Ae=s.ExportLocalSpecifier={},xe=s.ExportLocals={},_e=s.ExpressionStatement={},Ie=s.ForAwaitStatement={},Re=s.ForInStatement={},Ne=s.ForOfStatement={},we=s.ForStatement={},pe=s.FormalParameters={},ie=s.FunctionBody={},me=s.FunctionDeclaration={},ye=s.FunctionExpression={},be=s.Getter={},de=s.IdentifierExpression={},Le=s.IfStatement={},$e=s.Import={},Pe=s.ImportNamespace={},Se=s.ImportSpecifier={},Oe=s.LabeledStatement={},ke=s.LiteralBooleanExpression={},Me=s.LiteralInfinityExpression={},ve=s.LiteralNullExpression={},We=s.LiteralNumericExpression={},Ge=s.LiteralRegExpExpression={},Ue=s.LiteralStringExpression={},qe=s.Method={},He=s.Module={},Ve=s.NewExpression={},je=s.NewTargetExpression={},Q=s.ObjectAssignmentTarget={},J=s.ObjectBinding={},Ye=s.ObjectExpression={},Xe=s.ReturnStatement={},Ke=s.Script={},ze=s.Setter={},Je=s.ShorthandProperty={},fe=s.SpreadElement={},Ze=s.SpreadProperty={},Qe=s.StaticMemberAssignmentTarget={},et=s.StaticMemberExpression={},tt=s.StaticPropertyName={},oe=s.Super={},Ce=s.SwitchCase={},ge=s.SwitchDefault={},rt=s.SwitchStatement={},ut=s.SwitchStatementWithDefault={},Te=s.TemplateElement={},st=s.TemplateExpression={},it=s.ThisExpression={},nt=s.ThrowStatement={},at=s.TryCatchStatement={},ot=s.TryFinallyStatement={},lt=s.UnaryExpression={},ct=s.UpdateExpression={},ne=s.VariableDeclaration={},pt=s.VariableDeclarationStatement={},Be=s.VariableDeclarator={},ht=s.WhileStatement={},Et=s.WithStatement={},Dt=s.YieldExpression={},At=s.YieldGeneratorExpression={},St=l(te,et),mt=l(P,B);l(M,Y);var dt=l(se,W,z,ce,xe),he=l(v,tt);l(me,ye);var ft=l($e,Pe),gt=l(le,Ie,Re,Ne,we,ht),Z=l(ee,Qe),Ct=l(L,$),Ft=l(be,qe,ze),Tt=l(He,Ke),Bt=l(b,S,de),xt=l(Ee,Ft),w=l(h,y,_,x,C,G,Y,ae,X,ye,de,ke,Me,ve,We,Ge,Ue,St,Ve,je,Ye,st,it,lt,ct,Dt,At),j=l(O,U,M,re,q,ue,_e,me,Le,gt,Oe,Xe,rt,ut,nt,at,ot,pt,Et),yt=l(xt,Je,Ze);return l(E,D,mt,g,Ct,N,R,k,H,K,dt,De,Ae,w,pe,ie,ft,Se,Z,Q,J,yt,Tt,he,fe,j,oe,Ce,ge,Te,ne,Be,Bt),E.typeName="ArrayAssignmentTarget",E.fields=[{name:"type",type:a(o),value:"ArrayAssignmentTarget"},{name:"elements",type:n(i(l(g,l(l(E,Q),l(b,Z)))))},{name:"rest",type:i(l(l(E,Q),l(b,Z)))}],D.typeName="ArrayBinding",D.fields=[{name:"type",type:a(o),value:"ArrayBinding"},{name:"elements",type:n(i(l(N,l(S,l(D,J)))))},{name:"rest",type:i(l(S,l(D,J)))}],h.typeName="ArrayExpression",h.fields=[{name:"type",type:a(o),value:"ArrayExpression"},{name:"elements",type:n(i(l(w,fe)))}],y.typeName="ArrowExpression",y.fields=[{name:"type",type:a(o),value:"ArrowExpression"},{name:"isAsync",type:e},{name:"params",type:pe},{name:"body",type:l(w,ie)}],_.typeName="AssignmentExpression",_.fields=[{name:"type",type:a(o),value:"AssignmentExpression"},{name:"binding",type:l(l(E,Q),l(b,Z))},{name:"expression",type:w}],b.typeName="AssignmentTargetIdentifier",b.fields=[{name:"type",type:a(o),value:"AssignmentTargetIdentifier"},{name:"name",type:u}],P.typeName="AssignmentTargetPropertyIdentifier",P.fields=[{name:"type",type:a(o),value:"AssignmentTargetPropertyIdentifier"},{name:"binding",type:b},{name:"init",type:i(w)}],B.typeName="AssignmentTargetPropertyProperty",B.fields=[{name:"type",type:a(o),value:"AssignmentTargetPropertyProperty"},{name:"name",type:he},{name:"binding",type:l(g,l(l(E,Q),l(b,Z)))}],g.typeName="AssignmentTargetWithDefault",g.fields=[{name:"type",type:a(o),value:"AssignmentTargetWithDefault"},{name:"binding",type:l(l(E,Q),l(b,Z))},{name:"init",type:w}],x.typeName="AwaitExpression",x.fields=[{name:"type",type:a(o),value:"AwaitExpression"},{name:"expression",type:w}],C.typeName="BinaryExpression",C.fields=[{name:"type",type:a(o),value:"BinaryExpression"},{name:"left",type:w},{name:"operator",type:c},{name:"right",type:w}],S.typeName="BindingIdentifier",S.fields=[{name:"type",type:a(o),value:"BindingIdentifier"},{name:"name",type:u}],L.typeName="BindingPropertyIdentifier",L.fields=[{name:"type",type:a(o),value:"BindingPropertyIdentifier"},{name:"binding",type:S},{name:"init",type:i(w)}],$.typeName="BindingPropertyProperty",$.fields=[{name:"type",type:a(o),value:"BindingPropertyProperty"},{name:"name",type:he},{name:"binding",type:l(N,l(S,l(D,J)))}],N.typeName="BindingWithDefault",N.fields=[{name:"type",type:a(o),value:"BindingWithDefault"},{name:"binding",type:l(S,l(D,J))},{name:"init",type:w}],R.typeName="Block",R.fields=[{name:"type",type:a(o),value:"Block"},{name:"statements",type:n(j)}],O.typeName="BlockStatement",O.fields=[{name:"type",type:a(o),value:"BlockStatement"},{name:"block",type:R}],U.typeName="BreakStatement",U.fields=[{name:"type",type:a(o),value:"BreakStatement"},{name:"label",type:i(u)}],G.typeName="CallExpression",G.fields=[{name:"type",type:a(o),value:"CallExpression"},{name:"callee",type:l(w,oe)},{name:"arguments",type:n(l(w,fe))}],k.typeName="CatchClause",k.fields=[{name:"type",type:a(o),value:"CatchClause"},{name:"binding",type:i(l(S,l(D,J)))},{name:"body",type:R}],M.typeName="ClassDeclaration",M.fields=[{name:"type",type:a(o),value:"ClassDeclaration"},{name:"name",type:S},{name:"super",type:i(w)},{name:"elements",type:n(H)}],H.typeName="ClassElement",H.fields=[{name:"type",type:a(o),value:"ClassElement"},{name:"isStatic",type:e},{name:"method",type:Ft}],Y.typeName="ClassExpression",Y.fields=[{name:"type",type:a(o),value:"ClassExpression"},{name:"name",type:i(S)},{name:"super",type:i(w)},{name:"elements",type:n(H)}],ae.typeName="CompoundAssignmentExpression",ae.fields=[{name:"type",type:a(o),value:"CompoundAssignmentExpression"},{name:"binding",type:l(b,Z)},{name:"operator",type:A},{name:"expression",type:w}],ee.typeName="ComputedMemberAssignmentTarget",ee.fields=[{name:"type",type:a(o),value:"ComputedMemberAssignmentTarget"},{name:"object",type:l(w,oe)},{name:"expression",type:w}],te.typeName="ComputedMemberExpression",te.fields=[{name:"type",type:a(o),value:"ComputedMemberExpression"},{name:"object",type:l(w,oe)},{name:"expression",type:w}],v.typeName="ComputedPropertyName",v.fields=[{name:"type",type:a(o),value:"ComputedPropertyName"},{name:"expression",type:w}],X.typeName="ConditionalExpression",X.fields=[{name:"type",type:a(o),value:"ConditionalExpression"},{name:"test",type:w},{name:"consequent",type:w},{name:"alternate",type:w}],re.typeName="ContinueStatement",re.fields=[{name:"type",type:a(o),value:"ContinueStatement"},{name:"label",type:i(u)}],Ee.typeName="DataProperty",Ee.fields=[{name:"type",type:a(o),value:"DataProperty"},{name:"name",type:he},{name:"expression",type:w}],q.typeName="DebuggerStatement",q.fields=[{name:"type",type:a(o),value:"DebuggerStatement"}],K.typeName="Directive",K.fields=[{name:"type",type:a(o),value:"Directive"},{name:"rawValue",type:u}],le.typeName="DoWhileStatement",le.fields=[{name:"type",type:a(o),value:"DoWhileStatement"},{name:"body",type:j},{name:"test",type:w}],ue.typeName="EmptyStatement",ue.fields=[{name:"type",type:a(o),value:"EmptyStatement"}],se.typeName="Export",se.fields=[{name:"type",type:a(o),value:"Export"},{name:"declaration",type:l(M,me,ne)}],W.typeName="ExportAllFrom",W.fields=[{name:"type",type:a(o),value:"ExportAllFrom"},{name:"moduleSpecifier",type:u}],z.typeName="ExportDefault",z.fields=[{name:"type",type:a(o),value:"ExportDefault"},{name:"body",type:l(M,w,me)}],ce.typeName="ExportFrom",ce.fields=[{name:"type",type:a(o),value:"ExportFrom"},{name:"namedExports",type:n(De)},{name:"moduleSpecifier",type:u}],De.typeName="ExportFromSpecifier",De.fields=[{name:"type",type:a(o),value:"ExportFromSpecifier"},{name:"name",type:u},{name:"exportedName",type:i(u)}],Ae.typeName="ExportLocalSpecifier",Ae.fields=[{name:"type",type:a(o),value:"ExportLocalSpecifier"},{name:"name",type:de},{name:"exportedName",type:i(u)}],xe.typeName="ExportLocals",xe.fields=[{name:"type",type:a(o),value:"ExportLocals"},{name:"namedExports",type:n(Ae)}],_e.typeName="ExpressionStatement",_e.fields=[{name:"type",type:a(o),value:"ExpressionStatement"},{name:"expression",type:w}],Ie.typeName="ForAwaitStatement",Ie.fields=[{name:"type",type:a(o),value:"ForAwaitStatement"},{name:"left",type:l(l(l(E,Q),l(b,Z)),ne)},{name:"right",type:w},{name:"body",type:j}],Re.typeName="ForInStatement",Re.fields=[{name:"type",type:a(o),value:"ForInStatement"},{name:"left",type:l(l(l(E,Q),l(b,Z)),ne)},{name:"right",type:w},{name:"body",type:j}],Ne.typeName="ForOfStatement",Ne.fields=[{name:"type",type:a(o),value:"ForOfStatement"},{name:"left",type:l(l(l(E,Q),l(b,Z)),ne)},{name:"right",type:w},{name:"body",type:j}],we.typeName="ForStatement",we.fields=[{name:"type",type:a(o),value:"ForStatement"},{name:"init",type:i(l(w,ne))},{name:"test",type:i(w)},{name:"update",type:i(w)},{name:"body",type:j}],pe.typeName="FormalParameters",pe.fields=[{name:"type",type:a(o),value:"FormalParameters"},{name:"items",type:n(l(N,l(S,l(D,J))))},{name:"rest",type:i(l(S,l(D,J)))}],ie.typeName="FunctionBody",ie.fields=[{name:"type",type:a(o),value:"FunctionBody"},{name:"directives",type:n(K)},{name:"statements",type:n(j)}],me.typeName="FunctionDeclaration",me.fields=[{name:"type",type:a(o),value:"FunctionDeclaration"},{name:"isAsync",type:e},{name:"isGenerator",type:e},{name:"name",type:S},{name:"params",type:pe},{name:"body",type:ie}],ye.typeName="FunctionExpression",ye.fields=[{name:"type",type:a(o),value:"FunctionExpression"},{name:"isAsync",type:e},{name:"isGenerator",type:e},{name:"name",type:i(S)},{name:"params",type:pe},{name:"body",type:ie}],be.typeName="Getter",be.fields=[{name:"type",type:a(o),value:"Getter"},{name:"name",type:he},{name:"body",type:ie}],de.typeName="IdentifierExpression",de.fields=[{name:"type",type:a(o),value:"IdentifierExpression"},{name:"name",type:u}],Le.typeName="IfStatement",Le.fields=[{name:"type",type:a(o),value:"IfStatement"},{name:"test",type:w},{name:"consequent",type:j},{name:"alternate",type:i(j)}],$e.typeName="Import",$e.fields=[{name:"type",type:a(o),value:"Import"},{name:"defaultBinding",type:i(S)},{name:"namedImports",type:n(Se)},{name:"moduleSpecifier",type:u}],Pe.typeName="ImportNamespace",Pe.fields=[{name:"type",type:a(o),value:"ImportNamespace"},{name:"defaultBinding",type:i(S)},{name:"namespaceBinding",type:S},{name:"moduleSpecifier",type:u}],Se.typeName="ImportSpecifier",Se.fields=[{name:"type",type:a(o),value:"ImportSpecifier"},{name:"name",type:i(u)},{name:"binding",type:S}],Oe.typeName="LabeledStatement",Oe.fields=[{name:"type",type:a(o),value:"LabeledStatement"},{name:"label",type:u},{name:"body",type:j}],ke.typeName="LiteralBooleanExpression",ke.fields=[{name:"type",type:a(o),value:"LiteralBooleanExpression"},{name:"value",type:e}],Me.typeName="LiteralInfinityExpression",Me.fields=[{name:"type",type:a(o),value:"LiteralInfinityExpression"}],ve.typeName="LiteralNullExpression",ve.fields=[{name:"type",type:a(o),value:"LiteralNullExpression"}],We.typeName="LiteralNumericExpression",We.fields=[{name:"type",type:a(o),value:"LiteralNumericExpression"},{name:"value",type:r}],Ge.typeName="LiteralRegExpExpression",Ge.fields=[{name:"type",type:a(o),value:"LiteralRegExpExpression"},{name:"pattern",type:u},{name:"global",type:e},{name:"ignoreCase",type:e},{name:"multiLine",type:e},{name:"dotAll",type:e},{name:"unicode",type:e},{name:"sticky",type:e}],Ue.typeName="LiteralStringExpression",Ue.fields=[{name:"type",type:a(o),value:"LiteralStringExpression"},{name:"value",type:u}],qe.typeName="Method",qe.fields=[{name:"type",type:a(o),value:"Method"},{name:"isAsync",type:e},{name:"isGenerator",type:e},{name:"name",type:he},{name:"params",type:pe},{name:"body",type:ie}],He.typeName="Module",He.fields=[{name:"type",type:a(o),value:"Module"},{name:"directives",type:n(K)},{name:"items",type:n(l(dt,ft,j))}],Ve.typeName="NewExpression",Ve.fields=[{name:"type",type:a(o),value:"NewExpression"},{name:"callee",type:w},{name:"arguments",type:n(l(w,fe))}],je.typeName="NewTargetExpression",je.fields=[{name:"type",type:a(o),value:"NewTargetExpression"}],Q.typeName="ObjectAssignmentTarget",Q.fields=[{name:"type",type:a(o),value:"ObjectAssignmentTarget"},{name:"properties",type:n(mt)},{name:"rest",type:i(l(b,Z))}],J.typeName="ObjectBinding",J.fields=[{name:"type",type:a(o),value:"ObjectBinding"},{name:"properties",type:n(Ct)},{name:"rest",type:i(S)}],Ye.typeName="ObjectExpression",Ye.fields=[{name:"type",type:a(o),value:"ObjectExpression"},{name:"properties",type:n(yt)}],Xe.typeName="ReturnStatement",Xe.fields=[{name:"type",type:a(o),value:"ReturnStatement"},{name:"expression",type:i(w)}],Ke.typeName="Script",Ke.fields=[{name:"type",type:a(o),value:"Script"},{name:"directives",type:n(K)},{name:"statements",type:n(j)}],ze.typeName="Setter",ze.fields=[{name:"type",type:a(o),value:"Setter"},{name:"name",type:he},{name:"param",type:l(N,l(S,l(D,J)))},{name:"body",type:ie}],Je.typeName="ShorthandProperty",Je.fields=[{name:"type",type:a(o),value:"ShorthandProperty"},{name:"name",type:de}],fe.typeName="SpreadElement",fe.fields=[{name:"type",type:a(o),value:"SpreadElement"},{name:"expression",type:w}],Ze.typeName="SpreadProperty",Ze.fields=[{name:"type",type:a(o),value:"SpreadProperty"},{name:"expression",type:w}],Qe.typeName="StaticMemberAssignmentTarget",Qe.fields=[{name:"type",type:a(o),value:"StaticMemberAssignmentTarget"},{name:"object",type:l(w,oe)},{name:"property",type:u}],et.typeName="StaticMemberExpression",et.fields=[{name:"type",type:a(o),value:"StaticMemberExpression"},{name:"object",type:l(w,oe)},{name:"property",type:u}],tt.typeName="StaticPropertyName",tt.fields=[{name:"type",type:a(o),value:"StaticPropertyName"},{name:"value",type:u}],oe.typeName="Super",oe.fields=[{name:"type",type:a(o),value:"Super"}],Ce.typeName="SwitchCase",Ce.fields=[{name:"type",type:a(o),value:"SwitchCase"},{name:"test",type:w},{name:"consequent",type:n(j)}],ge.typeName="SwitchDefault",ge.fields=[{name:"type",type:a(o),value:"SwitchDefault"},{name:"consequent",type:n(j)}],rt.typeName="SwitchStatement",rt.fields=[{name:"type",type:a(o),value:"SwitchStatement"},{name:"discriminant",type:w},{name:"cases",type:n(Ce)}],ut.typeName="SwitchStatementWithDefault",ut.fields=[{name:"type",type:a(o),value:"SwitchStatementWithDefault"},{name:"discriminant",type:w},{name:"preDefaultCases",type:n(Ce)},{name:"defaultCase",type:ge},{name:"postDefaultCases",type:n(Ce)}],Te.typeName="TemplateElement",Te.fields=[{name:"type",type:a(o),value:"TemplateElement"},{name:"rawValue",type:u}],st.typeName="TemplateExpression",st.fields=[{name:"type",type:a(o),value:"TemplateExpression"},{name:"tag",type:i(w)},{name:"elements",type:n(l(w,Te))}],it.typeName="ThisExpression",it.fields=[{name:"type",type:a(o),value:"ThisExpression"}],nt.typeName="ThrowStatement",nt.fields=[{name:"type",type:a(o),value:"ThrowStatement"},{name:"expression",type:w}],at.typeName="TryCatchStatement",at.fields=[{name:"type",type:a(o),value:"TryCatchStatement"},{name:"body",type:R},{name:"catchClause",type:k}],ot.typeName="TryFinallyStatement",ot.fields=[{name:"type",type:a(o),value:"TryFinallyStatement"},{name:"body",type:R},{name:"catchClause",type:i(k)},{name:"finalizer",type:R}],lt.typeName="UnaryExpression",lt.fields=[{name:"type",type:a(o),value:"UnaryExpression"},{name:"operator",type:d},{name:"operand",type:w}],ct.typeName="UpdateExpression",ct.fields=[{name:"type",type:a(o),value:"UpdateExpression"},{name:"isPrefix",type:e},{name:"operator",type:m},{name:"operand",type:l(b,Z)}],ne.typeName="VariableDeclaration",ne.fields=[{name:"type",type:a(o),value:"VariableDeclaration"},{name:"kind",type:f},{name:"declarators",type:n(Be)}],pt.typeName="VariableDeclarationStatement",pt.fields=[{name:"type",type:a(o),value:"VariableDeclarationStatement"},{name:"declaration",type:ne}],Be.typeName="VariableDeclarator",Be.fields=[{name:"type",type:a(o),value:"VariableDeclarator"},{name:"binding",type:l(S,l(D,J))},{name:"init",type:i(w)}],ht.typeName="WhileStatement",ht.fields=[{name:"type",type:a(o),value:"WhileStatement"},{name:"test",type:w},{name:"body",type:j}],Et.typeName="WithStatement",Et.fields=[{name:"type",type:a(o),value:"WithStatement"},{name:"object",type:w},{name:"body",type:j}],Dt.typeName="YieldExpression",Dt.fields=[{name:"type",type:a(o),value:"YieldExpression"},{name:"expression",type:i(w)}],At.typeName="YieldGeneratorExpression",At.fields=[{name:"type",type:a(o),value:"YieldGeneratorExpression"},{name:"expression",type:w}],s}(),estraverse$1={};(function(s){(function e(r){var u,i,n,a,l,o;function c(B){var g={},x,C;for(x in B)B.hasOwnProperty(x)&&(C=B[x],typeof C=="object"&&C!==null?g[x]=c(C):g[x]=C);return g}function A(B,g){var x,C,S,L;for(C=B.length,S=0;C;)x=C>>>1,L=S+x,g(B[L])?C=x:(S=L+1,C-=x+1);return S}u={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},n={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},a={},l={},o={},i={Break:a,Skip:l,Remove:o};function d(B,g){this.parent=B,this.key=g}d.prototype.replace=function(g){this.parent[this.key]=g},d.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function m(B,g,x,C){this.node=B,this.path=g,this.wrap=x,this.ref=C}function f(){}f.prototype.path=function(){var g,x,C,S,L,$;function N(R,O){if(Array.isArray(O))for(C=0,S=O.length;C=0;--x)if(B[x].node===g)return!0;return!1}f.prototype.traverse=function(g,x){var C,S,L,$,N,R,O,U,G,k,M,H;for(this.__initialize(g,x),H={},C=this.__worklist,S=this.__leavelist,C.push(new m(g,null,null,null)),S.push(new m(null,null,null,null));C.length;){if(L=C.pop(),L===H){if(L=S.pop(),R=this.__execute(x.leave,L),this.__state===a||R===a)return;continue}if(L.node){if(R=this.__execute(x.enter,L),this.__state===a||R===a)return;if(C.push(H),S.push(L),this.__state===l||R===l)continue;if($=L.node,N=$.type||L.wrap,k=this.__keys[N],!k)if(this.__fallback)k=this.__fallback($);else throw new Error("Unknown node type "+N+".");for(U=k.length;(U-=1)>=0;)if(O=k[U],M=$[O],!!M){if(Array.isArray(M)){for(G=M.length;(G-=1)>=0;)if(!!M[G]&&!h(S,M[G])){if(D(N,k[U]))L=new m(M[G],[O,G],"Property",null);else if(E(M[G]))L=new m(M[G],[O,G],null,null);else continue;C.push(L)}}else if(E(M)){if(h(S,M))continue;C.push(new m(M,O,null,null))}}}}},f.prototype.replace=function(g,x){var C,S,L,$,N,R,O,U,G,k,M,H,Y;function ae(ee){var te,v,X,re;if(ee.ref.remove()){for(v=ee.ref.key,re=ee.ref.parent,te=C.length;te--;)if(X=C[te],X.ref&&X.ref.parent===re){if(X.ref.key=0;)if(Y=G[O],k=L[Y],!!k)if(Array.isArray(k)){for(U=k.length;(U-=1)>=0;)if(!!k[U]){if(D($,G[O]))R=new m(k[U],[Y,U],"Property",new d(k,U));else if(E(k[U]))R=new m(k[U],[Y,U],null,new d(k,U));else continue;C.push(R)}}else E(k)&&C.push(new m(k,Y,null,new d(L,Y)))}}return H.root};function y(B,g){var x=new f;return x.traverse(B,g)}function _(B,g){var x=new f;return x.replace(B,g)}function b(B,g){var x;return x=A(g,function(S){return S.range[0]>B.range[0]}),B.extendedRange=[B.range[0],B.range[1]],x!==g.length&&(B.extendedRange[1]=g[x].range[0]),x-=1,x>=0&&(B.extendedRange[0]=g[x].range[1]),B}function P(B,g,x){var C=[],S,L,$,N;if(!B.range)throw new Error("attachComments needs range information");if(!x.length){if(g.length){for($=0,L=g.length;$R.range[0]));)O.extendedRange[1]===R.range[0]?(R.leadingComments||(R.leadingComments=[]),R.leadingComments.push(O),C.splice(N,1)):N+=1;if(N===C.length)return i.Break;if(C[N].extendedRange[0]>R.range[1])return i.Skip}}),N=0,y(B,{leave:function(R){for(var O;NR.range[1])return i.Skip}}),B}return r.Syntax=u,r.traverse=y,r.replace=_,r.attachComments=P,r.VisitorKeys=n,r.VisitorOption=i,r.Controller=f,r.cloneEnvironment=function(){return e({})},r})(s)})(estraverse$1);const Spec=dist.default||dist,estraverse=estraverse$1.cloneEnvironment();Object.keys(estraverse.Syntax).filter(s=>s!=="Property").forEach(s=>{delete estraverse.Syntax[s],delete estraverse.VisitorKeys[s]});Object.assign(estraverse.Syntax,Object.keys(Spec).reduce((s,e)=>(s[e]=e,s),{}));Object.assign(estraverse.VisitorKeys,Object.keys(Spec).reduce((s,e)=>(s[e]=Spec[e].fields.map(r=>r.name),s),{}));const whitespaceArray=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],whitespaceBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!0,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1],idStartLargeRegex=/^[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]$/,idStartBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1],idContinueLargeRegex$1=/^[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]$/,idContinueBool$1=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];var unicode={whitespaceArray,whitespaceBool,idStartLargeRegex,idStartBool,idContinueLargeRegex:idContinueLargeRegex$1,idContinueBool:idContinueBool$1};const{idContinueLargeRegex,idContinueBool}=unicode;function isIdentifierPartES6(s){let e=s.charCodeAt(0);return e<128?idContinueBool[e]:idContinueLargeRegex.test(s)}function needsDoubleDot$1(s){return s.indexOf(".")<0&&s.indexOf("e")<0&&s.indexOf("x")<0}function renderNumber(s){let e;return s>=1e3&&s%10===0?(e=s.toString(10),/[eE]/.test(e)?e.replace(/[eE]\+/,"e"):s.toString(10).replace(/0{3,}$/,r=>"e"+r.length)):s%1===0?s>1e15&&s<1e20?"0x"+s.toString(16).toUpperCase():s.toString(10).replace(/[eE]\+/,"e"):s.toString(10).replace(/^0\./,".").replace(/[eE]\+/,"e")}class TokenStream$2{constructor(){this.result="",this.lastNumber=null,this.lastCodePoint=null,this.lastTokenStr="",this.optionalSemi=!1,this.previousWasRegExp=!1,this.partialHtmlComment=!1}putNumber(e){let r=renderNumber(e);this.put(r),this.lastNumber=r}putOptionalSemi(){this.optionalSemi=!0}putRaw(e){this.result+=e,this.lastTokenStr=e}put(e,r){if(this.optionalSemi&&(this.optionalSemi=!1,e!=="}"&&(this.result+=";",this.lastCodePoint=";",this.previousWasRegExp=!1)),this.lastNumber!==null&&e.length===1&&e==="."){this.result+=needsDoubleDot$1(this.lastNumber)?"..":".",this.lastNumber=null,this.lastCodePoint=".";return}let u=[...e].length;if(u>0){this.lastNumber=null;let i=String.fromCodePoint(e.codePointAt(0)),n=this.lastCodePoint;this.lastCodePoint=String.fromCodePoint(e.codePointAt(u-1));let a=this.previousWasRegExp;this.previousWasRegExp=r,n&&((n==="+"||n==="-")&&n===i||isIdentifierPartES6(n)&&isIdentifierPartES6(i)||n==="/"&&i==="/"||a&&i==="i"||this.partialHtmlComment&&e.startsWith("--"))&&(this.result+=" ")}this.partialHtmlComment=this.lastTokenStr.endsWith("<")&&e==="!",this.result+=e,this.lastTokenStr=e}}var tokenStream={needsDoubleDot:needsDoubleDot$1,TokenStream:TokenStream$2};/* -object-assign -(c) Sindre Sorhus -@license MIT -*/var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function shouldUseNative(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var u=Object.getOwnPropertyNames(e).map(function(n){return e[n]});if(u.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(n){i[n]=n}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var objectAssign$2=shouldUseNative()?Object.assign:function(s,e){for(var r,u=toObject(s),i,n=1;n=48&&h<=55}r=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function c(h){return h===32||h===9||h===11||h===12||h===160||h>=5760&&r.indexOf(h)>=0}function A(h){return h===10||h===13||h===8232||h===8233}function d(h){if(h<=65535)return String.fromCharCode(h);var y=String.fromCharCode(Math.floor((h-65536)/1024)+55296),_=String.fromCharCode((h-65536)%1024+56320);return y+_}for(u=new Array(128),n=0;n<128;++n)u[n]=n>=97&&n<=122||n>=65&&n<=90||n===36||n===95;for(i=new Array(128),n=0;n<128;++n)i[n]=n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57||n===36||n===95;function m(h){return h<128?u[h]:e.NonAsciiIdentifierStart.test(d(h))}function f(h){return h<128?i[h]:e.NonAsciiIdentifierPart.test(d(h))}function E(h){return h<128?u[h]:s.NonAsciiIdentifierStart.test(d(h))}function D(h){return h<128?i[h]:s.NonAsciiIdentifierPart.test(d(h))}code.exports={isDecimalDigit:a,isHexDigit:l,isOctalDigit:o,isWhiteSpace:c,isLineTerminator:A,isIdentifierStartES5:m,isIdentifierPartES5:f,isIdentifierStartES6:E,isIdentifierPartES6:D}})();var keyword$2={exports:{}};(function(){var s=code.exports;function e(m){switch(m){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function r(m,f){return!f&&m==="yield"?!1:u(m,f)}function u(m,f){if(f&&e(m))return!0;switch(m.length){case 2:return m==="if"||m==="in"||m==="do";case 3:return m==="var"||m==="for"||m==="new"||m==="try";case 4:return m==="this"||m==="else"||m==="case"||m==="void"||m==="with"||m==="enum";case 5:return m==="while"||m==="break"||m==="catch"||m==="throw"||m==="const"||m==="yield"||m==="class"||m==="super";case 6:return m==="return"||m==="typeof"||m==="delete"||m==="switch"||m==="export"||m==="import";case 7:return m==="default"||m==="finally"||m==="extends";case 8:return m==="function"||m==="continue"||m==="debugger";case 10:return m==="instanceof";default:return!1}}function i(m,f){return m==="null"||m==="true"||m==="false"||r(m,f)}function n(m,f){return m==="null"||m==="true"||m==="false"||u(m,f)}function a(m){return m==="eval"||m==="arguments"}function l(m){var f,E,D;if(m.length===0||(D=m.charCodeAt(0),!s.isIdentifierStartES5(D)))return!1;for(f=1,E=m.length;f=E||(h=m.charCodeAt(f),!(56320<=h&&h<=57343)))return!1;D=o(D,h)}if(!y(D))return!1;y=s.isIdentifierPartES6}return!0}function A(m,f){return l(m)&&!i(m,f)}function d(m,f){return c(m)&&!n(m,f)}keyword$2.exports={isKeywordES5:r,isKeywordES6:u,isReservedWordES5:i,isReservedWordES6:n,isRestrictedWord:a,isIdentifierNameES5:l,isIdentifierNameES6:c,isIdentifierES5:A,isIdentifierES6:d}})();(function(){utils.ast=ast.exports,utils.code=code.exports,utils.keyword=keyword$2.exports})();const Precedence$3={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,LogicalOR:3,LogicalAND:4,BitwiseOR:5,BitwiseXOR:6,BitwiseAND:7,Equality:8,Relational:9,BitwiseSHIFT:10,Additive:11,Multiplicative:12,Exponential:13,Prefix:14,Postfix:15,New:16,Call:17,TaggedTemplate:18,Member:19,Primary:20},BinaryPrecedence={",":Precedence$3.Sequence,"||":Precedence$3.LogicalOR,"&&":Precedence$3.LogicalAND,"|":Precedence$3.BitwiseOR,"^":Precedence$3.BitwiseXOR,"&":Precedence$3.BitwiseAND,"==":Precedence$3.Equality,"!=":Precedence$3.Equality,"===":Precedence$3.Equality,"!==":Precedence$3.Equality,"<":Precedence$3.Relational,">":Precedence$3.Relational,"<=":Precedence$3.Relational,">=":Precedence$3.Relational,in:Precedence$3.Relational,instanceof:Precedence$3.Relational,"<<":Precedence$3.BitwiseSHIFT,">>":Precedence$3.BitwiseSHIFT,">>>":Precedence$3.BitwiseSHIFT,"+":Precedence$3.Additive,"-":Precedence$3.Additive,"*":Precedence$3.Multiplicative,"%":Precedence$3.Multiplicative,"/":Precedence$3.Multiplicative,"**":Precedence$3.Exponential};function getPrecedence$3(s){switch(s.type){case"ArrayExpression":case"FunctionExpression":case"ClassExpression":case"IdentifierExpression":case"AssignmentTargetIdentifier":case"NewTargetExpression":case"Super":case"LiteralBooleanExpression":case"LiteralNullExpression":case"LiteralNumericExpression":case"LiteralInfinityExpression":case"LiteralRegExpExpression":case"LiteralStringExpression":case"ObjectExpression":case"ThisExpression":case"SpreadElement":case"FunctionBody":return Precedence$3.Primary;case"ArrowExpression":case"AssignmentExpression":case"CompoundAssignmentExpression":case"YieldExpression":case"YieldGeneratorExpression":return Precedence$3.Assignment;case"ConditionalExpression":return Precedence$3.Conditional;case"ComputedMemberExpression":case"StaticMemberExpression":case"ComputedMemberAssignmentTarget":case"StaticMemberAssignmentTarget":switch(s.object.type){case"CallExpression":case"ComputedMemberExpression":case"StaticMemberExpression":case"TemplateExpression":return getPrecedence$3(s.object);default:return Precedence$3.Member}case"TemplateExpression":if(s.tag==null)return Precedence$3.Member;switch(s.tag.type){case"CallExpression":case"ComputedMemberExpression":case"StaticMemberExpression":case"TemplateExpression":return getPrecedence$3(s.tag);default:return Precedence$3.Member}case"BinaryExpression":return BinaryPrecedence[s.operator];case"CallExpression":return Precedence$3.Call;case"NewExpression":return s.arguments.length===0?Precedence$3.New:Precedence$3.Member;case"UpdateExpression":return s.isPrefix?Precedence$3.Prefix:Precedence$3.Postfix;case"AwaitExpression":case"UnaryExpression":return Precedence$3.Prefix;default:throw new Error("unreachable: "+s.type)}}function escapeStringLiteral$3(s){let e="",r=0,u=0;for(let n=0,a=s.length;nr?"'":'"';e+=i;for(let n=0;nu.emit(e,r))}forEach(e){e(this),this.children.forEach(r=>r.forEach(e))}}class Semi$2 extends Token$3{constructor(){super(";")}}class CommaSep$2 extends CodeRep$2{constructor(e){super(),this.children=e}emit(e,r){let u=!0;this.children.forEach(i=>{u?u=!1:e.put(","),i.emit(e,r)})}forEach(e){e(this),this.children.forEach(r=>r.forEach(e))}}class SemiOp$3 extends CodeRep$2{constructor(){super()}emit(e){e.putOptionalSemi()}}var coderep={Precedence:Precedence$3,getPrecedence:getPrecedence$3,escapeStringLiteral:escapeStringLiteral$3,CodeRep:CodeRep$2,Empty:Empty$3,Token:Token$3,RawToken:RawToken$1,NumberCodeRep:NumberCodeRep$3,Paren:Paren$3,Bracket:Bracket$3,Brace:Brace$3,NoIn:NoIn$3,ContainsIn:ContainsIn$3,Seq:Seq$3,Semi:Semi$2,CommaSep:CommaSep$2,SemiOp:SemiOp$3};const objectAssign$1=objectAssign$2,{keyword:keyword$1}=utils,{Precedence:Precedence$2,getPrecedence:getPrecedence$2,escapeStringLiteral:escapeStringLiteral$2,Empty:Empty$2,Token:Token$2,RawToken,NumberCodeRep:NumberCodeRep$2,Paren:Paren$2,Bracket:Bracket$2,Brace:Brace$2,NoIn:NoIn$2,ContainsIn:ContainsIn$2,Seq:Seq$2,Semi:Semi$1,CommaSep:CommaSep$1,SemiOp:SemiOp$2}=coderep;function p(s,e,r){return getPrecedence$2(s)0&&r[r.length-1]==null&&(u=seq$1(u,t(","))),bracket(u)}reduceAwaitExpression(e,{expression:r}){return seq$1(t("await"),p(e.expression,getPrecedence$2(e),r))}reduceSpreadElement(e,{expression:r}){return seq$1(t("..."),p(e.expression,Precedence$2.Assignment,r))}reduceSpreadProperty(e,{expression:r}){return seq$1(t("..."),getAssignmentExpr(r))}reduceAssignmentExpression(e,{binding:r,expression:u}){let i=r,n=u,a=u.containsIn,l=r.startsWithCurly,o=r.startsWithLetSquareBracket,c=r.startsWithFunctionOrClass;return getPrecedence$2(e.expression)0&&r[r.length-1]==null&&(i=seq$1(i,t(",")))),bracket(i)}reduceArrayBinding(e,{elements:r,rest:u}){let i;return r.length===0?i=u==null?empty$1():seq$1(t("..."),u):(r=r.concat(u==null?[]:[seq$1(t("..."),u)]),i=commaSep(r.map(getAssignmentExpr)),r.length>0&&r[r.length-1]==null&&(i=seq$1(i,t(",")))),bracket(i)}reduceObjectAssignmentTarget(e,{properties:r,rest:u}){let i=commaSep(r);r.length===0?i=u==null?empty$1():seq$1(t("..."),u):i=u==null?i:seq$1(i,t(","),t("..."),u);let n=brace(i);return n.startsWithCurly=!0,n}reduceObjectBinding(e,{properties:r,rest:u}){let i=commaSep(r);r.length===0?i=u==null?empty$1():seq$1(t("..."),u):i=u==null?i:seq$1(i,t(","),t("..."),u);let n=brace(i);return n.startsWithCurly=!0,n}reduceAssignmentTargetPropertyIdentifier(e,{binding:r,init:u}){return e.init==null?r:seq$1(r,t("="),p(e.init,Precedence$2.Assignment,u))}reduceAssignmentTargetPropertyProperty(e,{name:r,binding:u}){return seq$1(r,t(":"),u)}reduceBindingPropertyIdentifier(e,{binding:r,init:u}){return e.init==null?r:seq$1(r,t("="),p(e.init,Precedence$2.Assignment,u))}reduceBindingPropertyProperty(e,{name:r,binding:u}){return seq$1(r,t(":"),u)}reduceBlock(e,{statements:r}){return brace(seq$1(...r))}reduceBlockStatement(e,{block:r}){return r}reduceBreakStatement(e){return seq$1(t("break"),e.label?t(e.label):empty$1(),semiOp())}reduceCallExpression(e,{callee:r,arguments:u}){const i=u.map((n,a)=>p(e.arguments[a],Precedence$2.Assignment,n));return objectAssign$1(seq$1(p(e.callee,getPrecedence$2(e),r),paren(commaSep(i))),{startsWithCurly:r.startsWithCurly,startsWithLet:r.startsWithLet,startsWithLetSquareBracket:r.startsWithLetSquareBracket,startsWithFunctionOrClass:r.startsWithFunctionOrClass})}reduceCatchClause(e,{binding:r,body:u}){return r==null?seq$1(t("catch"),u):seq$1(t("catch"),paren(r),u)}reduceClassDeclaration(e,{name:r,super:u,elements:i}){let n=seq$1(t("class"),e.name.name==="*default*"?empty$1():r);return u!=null&&(n=seq$1(n,t("extends"),p(e.super,Precedence$2.New,u))),n=seq$1(n,t("{"),...i,t("}")),n}reduceClassExpression(e,{name:r,super:u,elements:i}){let n=t("class");return r!=null&&(n=seq$1(n,r)),u!=null&&(n=seq$1(n,t("extends"),p(e.super,Precedence$2.New,u))),n=seq$1(n,t("{"),...i,t("}")),n.startsWithFunctionOrClass=!0,n}reduceClassElement(e,{method:r}){return e.isStatic?seq$1(t("static"),r):r}reduceComputedMemberAssignmentTarget(e,{object:r,expression:u}){let i=r.startsWithLetSquareBracket||e.object.type==="IdentifierExpression"&&e.object.name==="let";return objectAssign$1(seq$1(p(e.object,getPrecedence$2(e),r),bracket(u)),{startsWithLet:r.startsWithLet,startsWithLetSquareBracket:i,startsWithCurly:r.startsWithCurly,startsWithFunctionOrClass:r.startsWithFunctionOrClass})}reduceComputedMemberExpression(e,{object:r,expression:u}){let i=r.startsWithLetSquareBracket||e.object.type==="IdentifierExpression"&&e.object.name==="let";return objectAssign$1(seq$1(p(e.object,getPrecedence$2(e),r),bracket(u)),{startsWithLet:r.startsWithLet,startsWithLetSquareBracket:i,startsWithCurly:r.startsWithCurly,startsWithFunctionOrClass:r.startsWithFunctionOrClass})}reduceComputedPropertyName(e,{expression:r}){return bracket(p(e.expression,Precedence$2.Assignment,r))}reduceConditionalExpression(e,{test:r,consequent:u,alternate:i}){let n=r.containsIn||i.containsIn,a=r.startsWithCurly,l=r.startsWithLetSquareBracket,o=r.startsWithFunctionOrClass;return objectAssign$1(seq$1(p(e.test,Precedence$2.LogicalOR,r),t("?"),p(e.consequent,Precedence$2.Assignment,u),t(":"),p(e.alternate,Precedence$2.Assignment,i)),{containsIn:n,startsWithCurly:a,startsWithLetSquareBracket:l,startsWithFunctionOrClass:o})}reduceContinueStatement(e){return seq$1(t("continue"),e.label?t(e.label):empty$1(),semiOp())}reduceDataProperty(e,{name:r,expression:u}){return seq$1(r,t(":"),getAssignmentExpr(u))}reduceDebuggerStatement(){return seq$1(t("debugger"),semiOp())}reduceDoWhileStatement(e,{body:r,test:u}){return seq$1(t("do"),r,t("while"),paren(u),semiOp())}reduceEmptyStatement(){return semi()}reduceExpressionStatement(e,{expression:r}){let u=r.startsWithCurly||r.startsWithLetSquareBracket||r.startsWithFunctionOrClass;return seq$1(u?paren(r):r,semiOp())}reduceForInStatement(e,{left:r,right:u,body:i}){return r=e.left.type==="VariableDeclaration"?noIn$1(markContainsIn$1(r)):r,objectAssign$1(seq$1(t("for"),paren(seq$1(r.startsWithLet?paren(r):r,t("in"),u)),i),{endsWithMissingElse:i.endsWithMissingElse})}reduceForOfStatement(e,{left:r,right:u,body:i}){return r=e.left.type==="VariableDeclaration"?noIn$1(markContainsIn$1(r)):r,objectAssign$1(seq$1(t("for"),paren(seq$1(r.startsWithLet?paren(r):r,t("of"),p(e.right,Precedence$2.Assignment,u))),i),{endsWithMissingElse:i.endsWithMissingElse})}reduceForStatement(e,{init:r,test:u,update:i,body:n}){return r&&(r.startsWithLetSquareBracket&&(r=paren(r)),r=noIn$1(markContainsIn$1(r))),objectAssign$1(seq$1(t("for"),paren(seq$1(r||empty$1(),semi(),u||empty$1(),semi(),i||empty$1())),n),{endsWithMissingElse:n.endsWithMissingElse})}reduceForAwaitStatement(e,{left:r,right:u,body:i}){return r=e.left.type==="VariableDeclaration"?noIn$1(markContainsIn$1(r)):r,objectAssign$1(seq$1(t("for"),t("await"),paren(seq$1(r.startsWithLet?paren(r):r,t("of"),p(e.right,Precedence$2.Assignment,u))),i),{endsWithMissingElse:i.endsWithMissingElse})}reduceFunctionBody(e,{directives:r,statements:u}){return u.length&&(u[0]=this.parenToAvoidBeingDirective(e.statements[0],u[0])),brace(seq$1(...r,...u))}reduceFunctionDeclaration(e,{name:r,params:u,body:i}){return seq$1(e.isAsync?t("async"):empty$1(),t("function"),e.isGenerator?t("*"):empty$1(),e.name.name==="*default*"?empty$1():r,u,i)}reduceFunctionExpression(e,{name:r,params:u,body:i}){let n=seq$1(e.isAsync?t("async"):empty$1(),t("function"),e.isGenerator?t("*"):empty$1(),r||empty$1(),u,i);return n.startsWithFunctionOrClass=!0,n}reduceFormalParameters(e,{items:r,rest:u}){return paren(commaSep(r.concat(u==null?[]:[seq$1(t("..."),u)])))}reduceArrowExpression(e,{params:r,body:u}){r=this.regenerateArrowParams(e.params,r);let i=!1;return e.body.type!=="FunctionBody"&&(u.startsWithCurly?u=paren(u):u.containsIn&&(i=!0)),objectAssign$1(seq$1(e.isAsync?t("async"):empty$1(),r,t("=>"),p(e.body,Precedence$2.Assignment,u)),{containsIn:i})}reduceGetter(e,{name:r,body:u}){return seq$1(t("get"),r,paren(empty$1()),u)}reduceIdentifierExpression(e){let r=t(e.name);return e.name==="let"&&(r.startsWithLet=!0),r}reduceIfStatement(e,{test:r,consequent:u,alternate:i}){return i&&u.endsWithMissingElse&&(u=brace(u)),objectAssign$1(seq$1(t("if"),paren(r),u,i?seq$1(t("else"),i):empty$1()),{endsWithMissingElse:i?i.endsWithMissingElse:!0})}reduceImport(e,{defaultBinding:r,namedImports:u}){let i=[];return r!=null&&i.push(r),u.length>0&&i.push(brace(commaSep(u))),i.length===0?seq$1(t("import"),t(escapeStringLiteral$2(e.moduleSpecifier)),semiOp()):seq$1(t("import"),commaSep(i),t("from"),t(escapeStringLiteral$2(e.moduleSpecifier)),semiOp())}reduceImportNamespace(e,{defaultBinding:r,namespaceBinding:u}){return seq$1(t("import"),r==null?empty$1():seq$1(r,t(",")),t("*"),t("as"),u,t("from"),t(escapeStringLiteral$2(e.moduleSpecifier)),semiOp())}reduceImportSpecifier(e,{binding:r}){return e.name==null?r:seq$1(t(e.name),t("as"),r)}reduceExportAllFrom(e){return seq$1(t("export"),t("*"),t("from"),t(escapeStringLiteral$2(e.moduleSpecifier)),semiOp())}reduceExportFrom(e,{namedExports:r}){return seq$1(t("export"),brace(commaSep(r)),t("from"),t(escapeStringLiteral$2(e.moduleSpecifier)),semiOp())}reduceExportLocals(e,{namedExports:r}){return seq$1(t("export"),brace(commaSep(r)),semiOp())}reduceExport(e,{declaration:r}){switch(e.declaration.type){case"FunctionDeclaration":case"ClassDeclaration":break;default:r=seq$1(r,semiOp())}return seq$1(t("export"),r)}reduceExportDefault(e,{body:r}){switch(r=r.startsWithFunctionOrClass?paren(r):r,e.body.type){case"FunctionDeclaration":case"ClassDeclaration":return seq$1(t("export default"),r);default:return seq$1(t("export default"),p(e.body,Precedence$2.Assignment,r),semiOp())}}reduceExportFromSpecifier(e){return e.exportedName==null?t(e.name):seq$1(t(e.name),t("as"),t(e.exportedName))}reduceExportLocalSpecifier(e,{name:r}){return e.exportedName==null?r:seq$1(r,t("as"),t(e.exportedName))}reduceLabeledStatement(e,{body:r}){return objectAssign$1(seq$1(t(e.label+":"),r),{endsWithMissingElse:r.endsWithMissingElse})}reduceLiteralBooleanExpression(e){return t(e.value.toString())}reduceLiteralNullExpression(){return t("null")}reduceLiteralInfinityExpression(){return t("2e308")}reduceLiteralNumericExpression(e){return new NumberCodeRep$2(e.value)}reduceLiteralRegExpExpression(e){return t(`/${e.pattern}/${e.global?"g":""}${e.ignoreCase?"i":""}${e.multiLine?"m":""}${e.dotAll?"s":""}${e.unicode?"u":""}${e.sticky?"y":""}`,!0)}reduceLiteralStringExpression(e){return t(escapeStringLiteral$2(e.value))}reduceMethod(e,{name:r,params:u,body:i}){return seq$1(e.isAsync?t("async"):empty$1(),e.isGenerator?t("*"):empty$1(),r,u,i)}reduceModule(e,{directives:r,items:u}){return u.length&&(u[0]=this.parenToAvoidBeingDirective(e.items[0],u[0])),seq$1(...r,...u)}reduceNewExpression(e,{callee:r,arguments:u}){const i=u.map((a,l)=>p(e.arguments[l],Precedence$2.Assignment,a));let n=getPrecedence$2(e.callee)===Precedence$2.Call?paren(r):p(e.callee,getPrecedence$2(e),r);return seq$1(t("new"),n,u.length===0?empty$1():paren(commaSep(i)))}reduceNewTargetExpression(){return t("new.target")}reduceObjectExpression(e,{properties:r}){let u=brace(commaSep(r));return u.startsWithCurly=!0,u}reduceUpdateExpression(e,{operand:r}){return e.isPrefix?this.reduceUnaryExpression(...arguments):objectAssign$1(seq$1(p(e.operand,Precedence$2.New,r),t(e.operator)),{startsWithCurly:r.startsWithCurly,startsWithLetSquareBracket:r.startsWithLetSquareBracket,startsWithFunctionOrClass:r.startsWithFunctionOrClass})}reduceUnaryExpression(e,{operand:r}){return seq$1(t(e.operator),p(e.operand,getPrecedence$2(e),r))}reduceReturnStatement(e,{expression:r}){return seq$1(t("return"),r||empty$1(),semiOp())}reduceScript(e,{directives:r,statements:u}){return u.length&&(u[0]=this.parenToAvoidBeingDirective(e.statements[0],u[0])),seq$1(...r,...u)}reduceSetter(e,{name:r,param:u,body:i}){return seq$1(t("set"),r,paren(u),i)}reduceShorthandProperty(e,{name:r}){return r}reduceStaticMemberAssignmentTarget(e,{object:r}){const u=seq$1(p(e.object,getPrecedence$2(e),r),t("."),t(e.property));return u.startsWithLet=r.startsWithLet,u.startsWithCurly=r.startsWithCurly,u.startsWithLetSquareBracket=r.startsWithLetSquareBracket,u.startsWithFunctionOrClass=r.startsWithFunctionOrClass,u}reduceStaticMemberExpression(e,{object:r}){const u=seq$1(p(e.object,getPrecedence$2(e),r),t("."),t(e.property));return u.startsWithLet=r.startsWithLet,u.startsWithCurly=r.startsWithCurly,u.startsWithLetSquareBracket=r.startsWithLetSquareBracket,u.startsWithFunctionOrClass=r.startsWithFunctionOrClass,u}reduceStaticPropertyName(e){if(keyword$1.isIdentifierNameES6(e.value))return t(e.value);let r=parseFloat(e.value);return r>=0&&r.toString()===e.value?new NumberCodeRep$2(r):t(escapeStringLiteral$2(e.value))}reduceSuper(){return t("super")}reduceSwitchCase(e,{test:r,consequent:u}){return seq$1(t("case"),r,t(":"),seq$1(...u))}reduceSwitchDefault(e,{consequent:r}){return seq$1(t("default:"),seq$1(...r))}reduceSwitchStatement(e,{discriminant:r,cases:u}){return seq$1(t("switch"),paren(r),brace(seq$1(...u)))}reduceSwitchStatementWithDefault(e,{discriminant:r,preDefaultCases:u,defaultCase:i,postDefaultCases:n}){return seq$1(t("switch"),paren(r),brace(seq$1(...u,i,...n)))}reduceTemplateExpression(e,{tag:r,elements:u}){let i=e.tag==null?empty$1():p(e.tag,getPrecedence$2(e),r);i=seq$1(i,t("`"));for(let n=0,a=e.elements.length;n0?t("}"):empty$1(),u[n],ni?(i=!1,n):seq(this.sep(r),this.t(","),this.sep(u),n)),seq(...e)}semiOp(){return new SemiOp$1}sep(){return empty()}reduceArrayExpression(e,{elements:r}){if(r.length===0)return this.bracket(empty(),null,null,Sep$1.ARRAY_EMPTY);let u=this.commaSep(r.map(i=>this.getAssignmentExpr(i)),Sep$1.ARRAY_BEFORE_COMMA,Sep$1.ARRAY_AFTER_COMMA);return r.length>0&&r[r.length-1]==null&&(u=seq(u,this.sep(Sep$1.ARRAY_BEFORE_COMMA),this.t(","),this.sep(Sep$1.ARRAY_AFTER_COMMA))),this.bracket(u,Sep$1.ARRAY_INITIAL,Sep$1.ARRAY_FINAL)}reduceAwaitExpression(e,{expression:r}){return seq(this.t("await"),this.sep(Sep$1.AWAIT),this.p(e.expression,getPrecedence$1(e),r))}reduceSpreadElement(e,{expression:r}){return seq(this.t("..."),this.sep(Sep$1.SPREAD),this.p(e.expression,Precedence$1.Assignment,r))}reduceSpreadProperty(e,{expression:r}){return seq(this.t("..."),this.sep(Sep$1.SPREAD),this.getAssignmentExpr(r))}reduceAssignmentExpression(e,{binding:r,expression:u}){let i=r,n=u,a=u.containsIn,l=r.startsWithCurly,o=r.startsWithLetSquareBracket,c=r.startsWithFunctionOrClass;return getPrecedence$1(e.expression)this.getAssignmentExpr(n)),Sep$1.ARRAY_BEFORE_COMMA,Sep$1.ARRAY_AFTER_COMMA),r.length>0&&r[r.length-1]==null&&(i=seq(i,this.sep(Sep$1.ARRAY_BEFORE_COMMA),this.t(","),this.sep(Sep$1.ARRAY_AFTER_COMMA)))),this.bracket(i,Sep$1.ARRAY_INITIAL,Sep$1.ARRAY_FINAL,Sep$1.ARRAY_EMPTY)}reduceArrayBinding(e,{elements:r,rest:u}){let i;return r.length===0?i=u==null?empty():seq(this.t("..."),this.sep(Sep$1.REST),u):(r=r.concat(u==null?[]:[seq(this.t("..."),this.sep(Sep$1.REST),u)]),i=this.commaSep(r.map(n=>this.getAssignmentExpr(n)),Sep$1.ARRAY_BEFORE_COMMA,Sep$1.ARRAY_AFTER_COMMA),r.length>0&&r[r.length-1]==null&&(i=seq(i,this.sep(Sep$1.ARRAY_BEFORE_COMMA),this.t(","),this.sep(Sep$1.ARRAY_AFTER_COMMA)))),this.bracket(i,Sep$1.ARRAY_INITIAL,Sep$1.ARRAY_FINAL,Sep$1.ARRAY_EMPTY)}reduceObjectAssignmentTarget(e,{properties:r,rest:u}){let i;r.length===0?i=u==null?empty():seq(this.t("..."),this.sep(Sep$1.REST),u):(i=this.commaSep(r,Sep$1.OBJECT_BEFORE_COMMA,Sep$1.OBJECT_AFTER_COMMA),i=u==null?i:this.commaSep([i,seq(this.t("..."),this.sep(Sep$1.REST),u)],Sep$1.OBJECT_BEFORE_COMMA,Sep$1.OBJECT_AFTER_COMMA));let n=this.brace(i,e,Sep$1.OBJECT_BRACE_INITIAL,Sep$1.OBJECT_BRACE_FINAL,Sep$1.OBJECT_EMPTY);return n.startsWithCurly=!0,n}reduceObjectBinding(e,{properties:r,rest:u}){let i;r.length===0?i=u==null?empty():seq(this.t("..."),this.sep(Sep$1.REST),u):(i=this.commaSep(r,Sep$1.OBJECT_BEFORE_COMMA,Sep$1.OBJECT_AFTER_COMMA),i=u==null?i:this.commaSep([i,seq(this.t("..."),this.sep(Sep$1.REST),u)],Sep$1.OBJECT_BEFORE_COMMA,Sep$1.OBJECT_AFTER_COMMA));let n=this.brace(i,e,Sep$1.OBJECT_BRACE_INITIAL,Sep$1.OBJECT_BRACE_FINAL,Sep$1.OBJECT_EMPTY);return n.startsWithCurly=!0,n}reduceAssignmentTargetPropertyIdentifier(e,{binding:r,init:u}){return e.init==null?r:seq(r,this.sep(Sep$1.BEFORE_DEFAULT_EQUALS),this.t("="),this.sep(Sep$1.AFTER_DEFAULT_EQUALS),this.p(e.init,Precedence$1.Assignment,u))}reduceAssignmentTargetPropertyProperty(e,{name:r,binding:u}){return seq(r,this.sep(Sep$1.BEFORE_PROP),this.t(":"),this.sep(Sep$1.AFTER_PROP),u)}reduceBindingPropertyIdentifier(e,{binding:r,init:u}){return e.init==null?r:seq(r,this.sep(Sep$1.BEFORE_DEFAULT_EQUALS),this.t("="),this.sep(Sep$1.AFTER_DEFAULT_EQUALS),this.p(e.init,Precedence$1.Assignment,u))}reduceBindingPropertyProperty(e,{name:r,binding:u}){return seq(r,this.sep(Sep$1.BEFORE_PROP),this.t(":"),this.sep(Sep$1.AFTER_PROP),u)}reduceBlock(e,{statements:r}){return this.brace(seq(...r),e,Sep$1.BLOCK_BRACE_INITIAL,Sep$1.BLOCK_BRACE_FINAL,Sep$1.BLOCK_EMPTY)}reduceBlockStatement(e,{block:r}){return seq(r,this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceBreakStatement(e){return seq(this.t("break"),e.label?seq(this.sep(Sep$1.BEFORE_JUMP_LABEL),this.t(e.label)):empty(),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceCallExpression(e,{callee:r,arguments:u}){const i=u.map((n,a)=>this.p(e.arguments[a],Precedence$1.Assignment,n));return objectAssign(seq(this.p(e.callee,getPrecedence$1(e),r),this.sep(Sep$1.CALL),this.paren(this.commaSep(i,Sep$1.ARGS_BEFORE_COMMA,Sep$1.ARGS_AFTER_COMMA),Sep$1.CALL_PAREN_BEFORE,Sep$1.CALL_PAREN_AFTER,Sep$1.CALL_PAREN_EMPTY)),{startsWithCurly:r.startsWithCurly,startsWithLet:r.startsWithLet,startsWithLetSquareBracket:r.startsWithLetSquareBracket,startsWithFunctionOrClass:r.startsWithFunctionOrClass})}reduceCatchClause(e,{binding:r,body:u}){return r==null?seq(this.t("catch"),this.sep(Sep$1.BEFORE_CATCH_BINDING),u):seq(this.t("catch"),this.sep(Sep$1.BEFORE_CATCH_BINDING),this.paren(r,Sep$1.CATCH_PAREN_BEFORE,Sep$1.CATCH_PAREN_AFTER),this.sep(Sep$1.AFTER_CATCH_BINDING),u)}reduceClassDeclaration(e,{name:r,super:u,elements:i}){let n=seq(this.t("class"),e.name.name==="*default*"?empty():seq(this.sep(Sep$1.BEFORE_CLASS_NAME),r));return u!=null&&(n=seq(n,this.sep(Sep$1.BEFORE_EXTENDS),this.t("extends"),this.sep(Sep$1.AFTER_EXTENDS),this.p(e.super,Precedence$1.New,u))),n=seq(n,this.sep(Sep$1.BEFORE_CLASS_DECLARATION_ELEMENTS),this.brace(seq(...i),e,Sep$1.CLASS_BRACE_INITIAL,Sep$1.CLASS_BRACE_FINAL,Sep$1.CLASS_EMPTY),this.sep(Sep$1.AFTER_STATEMENT(e))),n}reduceClassExpression(e,{name:r,super:u,elements:i}){let n=this.t("class");return r!=null&&(n=seq(n,this.sep(Sep$1.BEFORE_CLASS_NAME),r)),u!=null&&(n=seq(n,this.sep(Sep$1.BEFORE_EXTENDS),this.t("extends"),this.sep(Sep$1.AFTER_EXTENDS),this.p(e.super,Precedence$1.New,u))),n=seq(n,this.sep(Sep$1.BEFORE_CLASS_EXPRESSION_ELEMENTS),this.brace(seq(...i),e,Sep$1.CLASS_EXPRESSION_BRACE_INITIAL,Sep$1.CLASS_EXPRESSION_BRACE_FINAL,Sep$1.CLASS_EXPRESSION_BRACE_EMPTY)),n.startsWithFunctionOrClass=!0,n}reduceClassElement(e,{method:r}){return r=seq(this.sep(Sep$1.BEFORE_CLASS_ELEMENT),r,this.sep(Sep$1.AFTER_CLASS_ELEMENT)),e.isStatic?seq(this.t("static"),this.sep(Sep$1.AFTER_STATIC),r):r}reduceComputedMemberAssignmentTarget(e,{object:r,expression:u}){let i=r.startsWithLetSquareBracket||e.object.type==="IdentifierExpression"&&e.object.name==="let";return objectAssign(seq(this.p(e.object,getPrecedence$1(e),r),this.sep(Sep$1.COMPUTED_MEMBER_ASSIGNMENT_TARGET),this.bracket(u,Sep$1.COMPUTED_MEMBER_ASSIGNMENT_TARGET_BRACKET_INTIAL,Sep$1.COMPUTED_MEMBER_ASSIGNMENT_TARGET_BRACKET_FINAL)),{startsWithLet:r.startsWithLet,startsWithLetSquareBracket:i,startsWithCurly:r.startsWithCurly,startsWithFunctionOrClass:r.startsWithFunctionOrClass})}reduceComputedMemberExpression(e,{object:r,expression:u}){let i=r.startsWithLetSquareBracket||e.object.type==="IdentifierExpression"&&e.object.name==="let";return objectAssign(seq(this.p(e.object,getPrecedence$1(e),r),this.sep(Sep$1.COMPUTED_MEMBER_EXPRESSION),this.bracket(u,Sep$1.COMPUTED_MEMBER_BRACKET_INTIAL,Sep$1.COMPUTED_MEMBER_BRACKET_FINAL)),{startsWithLet:r.startsWithLet,startsWithLetSquareBracket:i,startsWithCurly:r.startsWithCurly,startsWithFunctionOrClass:r.startsWithFunctionOrClass})}reduceComputedPropertyName(e,{expression:r}){return this.bracket(this.p(e.expression,Precedence$1.Assignment,r),Sep$1.COMPUTED_PROPERTY_BRACKET_INTIAL,Sep$1.COMPUTED_PROPERTY_BRACKET_FINAL)}reduceConditionalExpression(e,{test:r,consequent:u,alternate:i}){let n=r.containsIn||i.containsIn,a=r.startsWithCurly,l=r.startsWithLetSquareBracket,o=r.startsWithFunctionOrClass;return objectAssign(seq(this.p(e.test,Precedence$1.LogicalOR,r),this.sep(Sep$1.BEFORE_TERNARY_QUESTION),this.t("?"),this.sep(Sep$1.AFTER_TERNARY_QUESTION),this.p(e.consequent,Precedence$1.Assignment,u),this.sep(Sep$1.BEFORE_TERNARY_COLON),this.t(":"),this.sep(Sep$1.AFTER_TERNARY_COLON),this.p(e.alternate,Precedence$1.Assignment,i)),{containsIn:n,startsWithCurly:a,startsWithLetSquareBracket:l,startsWithFunctionOrClass:o})}reduceContinueStatement(e){return seq(this.t("continue"),e.label?seq(this.sep(Sep$1.BEFORE_JUMP_LABEL),this.t(e.label)):empty(),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceDataProperty(e,{name:r,expression:u}){return seq(r,this.sep(Sep$1.BEFORE_PROP),this.t(":"),this.sep(Sep$1.AFTER_PROP),this.getAssignmentExpr(u))}reduceDebuggerStatement(e){return seq(this.t("debugger"),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceDoWhileStatement(e,{body:r,test:u}){return seq(this.t("do"),this.sep(Sep$1.AFTER_DO),r,this.sep(Sep$1.BEFORE_DOWHILE_WHILE),this.t("while"),this.sep(Sep$1.AFTER_DOWHILE_WHILE),this.paren(u,Sep$1.DO_WHILE_TEST_PAREN_BEFORE,Sep$1.DO_WHILE_TEST_PAREN_AFTER),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceEmptyStatement(e){return seq(this.t(";"),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceExpressionStatement(e,{expression:r}){let u=r.startsWithCurly||r.startsWithLetSquareBracket||r.startsWithFunctionOrClass;return seq(u?this.paren(r,Sep$1.EXPRESSION_STATEMENT_PAREN_BEFORE,Sep$1.EXPRESSION_STATEMENT_PAREN_AFTER):r,this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceForInStatement(e,{left:r,right:u,body:i}){return r=e.left.type==="VariableDeclaration"?noIn(markContainsIn(r)):r,objectAssign(seq(this.t("for"),this.sep(Sep$1.AFTER_FORIN_FOR),this.paren(seq(r.startsWithLet?this.paren(r,Sep$1.FOR_IN_LET_PAREN_BEFORE,Sep$1.FOR_IN_LET_PAREN_AFTER):r,this.sep(Sep$1.BEFORE_FORIN_IN),this.t("in"),this.sep(Sep$1.AFTER_FORIN_FOR),u),Sep$1.FOR_IN_PAREN_BEFORE,Sep$1.FOR_IN_PAREN_AFTER),this.sep(Sep$1.BEFORE_FORIN_BODY),i,this.sep(Sep$1.AFTER_STATEMENT(e))),{endsWithMissingElse:i.endsWithMissingElse})}reduceForOfStatement(e,{left:r,right:u,body:i}){return r=e.left.type==="VariableDeclaration"?noIn(markContainsIn(r)):r,objectAssign(seq(this.t("for"),this.sep(Sep$1.AFTER_FOROF_FOR),this.paren(seq(r.startsWithLet?this.paren(r,Sep$1.FOR_OF_LET_PAREN_BEFORE,Sep$1.FOR_OF_LET_PAREN_AFTER):r,this.sep(Sep$1.BEFORE_FOROF_OF),this.t("of"),this.sep(Sep$1.AFTER_FOROF_FOR),this.p(e.right,Precedence$1.Assignment,u)),Sep$1.FOR_OF_PAREN_BEFORE,Sep$1.FOR_OF_PAREN_AFTER),this.sep(Sep$1.BEFORE_FOROF_BODY),i,this.sep(Sep$1.AFTER_STATEMENT(e))),{endsWithMissingElse:i.endsWithMissingElse})}reduceForStatement(e,{init:r,test:u,update:i,body:n}){return r&&(r.startsWithLetSquareBracket&&(r=this.paren(r,Sep$1.FOR_LET_PAREN_BEFORE,Sep$1.FOR_LET_PAREN_AFTER)),r=noIn(markContainsIn(r))),objectAssign(seq(this.t("for"),this.sep(Sep$1.AFTER_FOR_FOR),this.paren(seq(r?seq(this.sep(Sep$1.BEFORE_FOR_INIT),r,this.sep(Sep$1.AFTER_FOR_INIT)):this.sep(Sep$1.EMPTY_FOR_INIT),this.t(";"),u?seq(this.sep(Sep$1.BEFORE_FOR_TEST),u,this.sep(Sep$1.AFTER_FOR_TEST)):this.sep(Sep$1.EMPTY_FOR_TEST),this.t(";"),i?seq(this.sep(Sep$1.BEFORE_FOR_UPDATE),i,this.sep(Sep$1.AFTER_FOR_UPDATE)):this.sep(Sep$1.EMPTY_FOR_UPDATE))),this.sep(Sep$1.BEFORE_FOR_BODY),n,this.sep(Sep$1.AFTER_STATEMENT(e))),{endsWithMissingElse:n.endsWithMissingElse})}reduceForAwaitStatement(e,{left:r,right:u,body:i}){return r=e.left.type==="VariableDeclaration"?noIn(markContainsIn(r)):r,objectAssign(seq(this.t("for"),this.sep(Sep$1.AFTER_FOROF_FOR),this.t("await"),this.sep(Sep$1.AFTER_FORAWAIT_AWAIT),this.paren(seq(r.startsWithLet?this.paren(r,Sep$1.FOR_OF_LET_PAREN_BEFORE,Sep$1.FOR_OF_LET_PAREN_AFTER):r,this.sep(Sep$1.BEFORE_FOROF_OF),this.t("of"),this.sep(Sep$1.AFTER_FOROF_FOR),this.p(e.right,Precedence$1.Assignment,u)),Sep$1.FOR_OF_PAREN_BEFORE,Sep$1.FOR_OF_PAREN_AFTER),this.sep(Sep$1.BEFORE_FOROF_BODY),i,this.sep(Sep$1.AFTER_STATEMENT(e))),{endsWithMissingElse:i.endsWithMissingElse})}reduceFunctionBody(e,{directives:r,statements:u}){return u.length&&(u[0]=this.parenToAvoidBeingDirective(e.statements[0],u[0])),seq(...r,r.length?this.sep(Sep$1.AFTER_FUNCTION_DIRECTIVES):empty(),...u)}reduceFunctionDeclaration(e,{name:r,params:u,body:i}){return seq(e.isAsync?this.t("async"):empty(),this.t("function"),e.isGenerator?seq(this.sep(Sep$1.BEFORE_GENERATOR_STAR),this.t("*"),this.sep(Sep$1.AFTER_GENERATOR_STAR)):empty(),this.sep(Sep$1.BEFORE_FUNCTION_NAME(e)),e.name.name==="*default*"?empty():r,this.sep(Sep$1.BEFORE_FUNCTION_PARAMS),this.paren(u,Sep$1.PARAMETERS_PAREN_BEFORE,Sep$1.PARAMETERS_PAREN_AFTER,Sep$1.PARAMETERS_PAREN_EMPTY),this.sep(Sep$1.BEFORE_FUNCTION_DECLARATION_BODY),this.brace(i,e,Sep$1.FUNCTION_BRACE_INITIAL,Sep$1.FUNCTION_BRACE_FINAL,Sep$1.FUNCTION_EMPTY),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceFunctionExpression(e,{name:r,params:u,body:i}){let n=seq(e.isAsync?this.t("async"):empty(),this.t("function"),e.isGenerator?seq(this.sep(Sep$1.BEFORE_GENERATOR_STAR),this.t("*"),this.sep(Sep$1.AFTER_GENERATOR_STAR)):empty(),this.sep(Sep$1.BEFORE_FUNCTION_NAME(e)),r||empty(),this.sep(Sep$1.BEFORE_FUNCTION_PARAMS),this.paren(u,Sep$1.PARAMETERS_PAREN_BEFORE,Sep$1.PARAMETERS_PAREN_AFTER,Sep$1.PARAMETERS_PAREN_EMPTY),this.sep(Sep$1.BEFORE_FUNCTION_EXPRESSION_BODY),this.brace(i,e,Sep$1.FUNCTION_EXPRESSION_BRACE_INITIAL,Sep$1.FUNCTION_EXPRESSION_BRACE_FINAL,Sep$1.FUNCTION_EXPRESSION_EMPTY));return n.startsWithFunctionOrClass=!0,n}reduceFormalParameters(e,{items:r,rest:u}){return this.commaSep(r.concat(u==null?[]:[seq(this.t("..."),this.sep(Sep$1.REST),u)]),Sep$1.PARAMETER_BEFORE_COMMA,Sep$1.PARAMETER_AFTER_COMMA)}reduceArrowExpression(e,{params:r,body:u}){(e.params.rest!=null||e.params.items.length!==1||e.params.items[0].type!=="BindingIdentifier")&&(r=this.paren(r,Sep$1.ARROW_PARAMETERS_PAREN_BEFORE,Sep$1.ARROW_PARAMETERS_PAREN_AFTER,Sep$1.ARROW_PARAMETERS_PAREN_EMPTY));let i=!1;return e.body.type==="FunctionBody"?u=this.brace(u,e,Sep$1.ARROW_BRACE_INITIAL,Sep$1.ARROW_BRACE_FINAL,Sep$1.ARROW_BRACE_EMPTY):u.startsWithCurly?u=this.paren(u,Sep$1.ARROW_BODY_PAREN_BEFORE,Sep$1.ARROW_BODY_PAREN_AFTER):u.containsIn&&(i=!0),objectAssign(seq(e.isAsync?seq(this.t("async"),this.sep(Sep$1.BEFORE_ARROW_ASYNC_PARAMS)):empty(),r,this.sep(Sep$1.BEFORE_ARROW),this.t("=>"),this.sep(Sep$1.AFTER_ARROW),this.p(e.body,Precedence$1.Assignment,u)),{containsIn:i})}reduceGetter(e,{name:r,body:u}){return seq(this.t("get"),this.sep(Sep$1.AFTER_GET),r,this.sep(Sep$1.BEFORE_GET_PARAMS),this.paren(empty(),null,null,Sep$1.GETTER_PARAMS),this.sep(Sep$1.BEFORE_GET_BODY),this.brace(u,e,Sep$1.GET_BRACE_INTIAL,Sep$1.GET_BRACE_FINAL,Sep$1.GET_BRACE_EMPTY))}reduceIdentifierExpression(e){let r=this.t(e.name);return e.name==="let"&&(r.startsWithLet=!0),r}reduceIfStatement(e,{test:r,consequent:u,alternate:i}){return i&&u.endsWithMissingElse&&(u=this.brace(u,e,Sep$1.MISSING_ELSE_INTIIAL,Sep$1.MISSING_ELSE_FINAL,Sep$1.MISSING_ELSE_EMPTY)),objectAssign(seq(this.t("if"),this.sep(Sep$1.AFTER_IF),this.paren(r,Sep$1.IF_PAREN_BEFORE,Sep$1.IF_PAREN_AFTER),this.sep(Sep$1.AFTER_IF_TEST),u,i?seq(this.sep(Sep$1.BEFORE_ELSE),this.t("else"),this.sep(Sep$1.AFTER_ELSE),i):empty(),this.sep(Sep$1.AFTER_STATEMENT(e))),{endsWithMissingElse:i?i.endsWithMissingElse:!0})}reduceImport(e,{defaultBinding:r,namedImports:u}){let i=[];return r!=null&&i.push(r),u.length>0&&i.push(this.brace(this.commaSep(u,Sep$1.NAMED_IMPORT_BEFORE_COMMA,Sep$1.NAMED_IMPORT_AFTER_COMMA),e,Sep$1.IMPORT_BRACE_INTIAL,Sep$1.IMPORT_BRACE_FINAL,Sep$1.IMPORT_BRACE_EMPTY)),i.length===0?seq(this.t("import"),this.sep(Sep$1.BEFORE_IMPORT_MODULE),this.t(escapeStringLiteral$1(e.moduleSpecifier)),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e))):seq(this.t("import"),this.sep(Sep$1.BEFORE_IMPORT_BINDINGS),this.commaSep(i,Sep$1.IMPORT_BEFORE_COMMA,Sep$1.IMPORT_AFTER_COMMA),this.sep(Sep$1.AFTER_IMPORT_BINDINGS),this.t("from"),this.sep(Sep$1.AFTER_FROM),this.t(escapeStringLiteral$1(e.moduleSpecifier)),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceImportNamespace(e,{defaultBinding:r,namespaceBinding:u}){return seq(this.t("import"),this.sep(Sep$1.BEFORE_IMPORT_NAMESPACE),r==null?empty():seq(r,this.sep(Sep$1.IMPORT_BEFORE_COMMA),this.t(","),this.sep(Sep$1.IMPORT_AFTER_COMMA)),this.sep(Sep$1.BEFORE_IMPORT_STAR),this.t("*"),this.sep(Sep$1.AFTER_IMPORT_STAR),this.t("as"),this.sep(Sep$1.AFTER_IMPORT_AS),u,this.sep(Sep$1.AFTER_NAMESPACE_BINDING),this.t("from"),this.sep(Sep$1.AFTER_FROM),this.t(escapeStringLiteral$1(e.moduleSpecifier)),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceImportSpecifier(e,{binding:r}){return e.name==null?r:seq(this.t(e.name),this.sep(Sep$1.BEFORE_IMPORT_AS),this.t("as"),this.sep(Sep$1.AFTER_IMPORT_AS),r)}reduceExportAllFrom(e){return seq(this.t("export"),this.sep(Sep$1.BEFORE_EXPORT_STAR),this.t("*"),this.sep(Sep$1.AFTER_EXPORT_STAR),this.t("from"),this.sep(Sep$1.AFTER_FROM),this.t(escapeStringLiteral$1(e.moduleSpecifier)),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceExportFrom(e,{namedExports:r}){return seq(this.t("export"),this.sep(Sep$1.BEFORE_EXPORT_BINDINGS),this.brace(this.commaSep(r,Sep$1.EXPORTS_BEFORE_COMMA,Sep$1.EXPORTS_AFTER_COMMA),e,Sep$1.EXPORT_BRACE_INITIAL,Sep$1.EXPORT_BRACE_FINAL,Sep$1.EXPORT_BRACE_EMPTY),this.sep(Sep$1.AFTER_EXPORT_FROM_BINDINGS),this.t("from"),this.sep(Sep$1.AFTER_FROM),this.t(escapeStringLiteral$1(e.moduleSpecifier)),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceExportLocals(e,{namedExports:r}){return seq(this.t("export"),this.sep(Sep$1.BEFORE_EXPORT_BINDINGS),this.brace(this.commaSep(r,Sep$1.EXPORTS_BEFORE_COMMA,Sep$1.EXPORTS_AFTER_COMMA),e,Sep$1.EXPORT_BRACE_INITIAL,Sep$1.EXPORT_BRACE_FINAL,Sep$1.EXPORT_BRACE_EMPTY),this.sep(Sep$1.AFTER_EXPORT_LOCAL_BINDINGS),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceExport(e,{declaration:r}){switch(e.declaration.type){case"FunctionDeclaration":case"ClassDeclaration":break;default:r=seq(r,this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}return seq(this.t("export"),this.sep(Sep$1.AFTER_EXPORT),r)}reduceExportDefault(e,{body:r}){switch(r=r.startsWithFunctionOrClass?this.paren(r,Sep$1.EXPORT_PAREN_BEFORE,Sep$1.EXPORT_PAREN_AFTER):r,e.body.type){case"FunctionDeclaration":case"ClassDeclaration":return seq(this.t("export"),this.sep(Sep$1.EXPORT_DEFAULT),this.t("default"),this.sep(Sep$1.AFTER_EXPORT_DEFAULT),r);default:return seq(this.t("export"),this.sep(Sep$1.EXPORT_DEFAULT),this.t("default"),this.sep(Sep$1.AFTER_EXPORT_DEFAULT),this.p(e.body,Precedence$1.Assignment,r),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}}reduceExportFromSpecifier(e){return e.exportedName==null?this.t(e.name):seq(this.t(e.name),this.sep(Sep$1.BEFORE_EXPORT_AS),this.t("as"),this.sep(Sep$1.AFTER_EXPORT_AS),this.t(e.exportedName))}reduceExportLocalSpecifier(e,{name:r}){return e.exportedName==null?r:seq(r,this.sep(Sep$1.BEFORE_EXPORT_AS),this.t("as"),this.sep(Sep$1.AFTER_EXPORT_AS),this.t(e.exportedName))}reduceLabeledStatement(e,{body:r}){return objectAssign(seq(this.t(e.label),this.sep(Sep$1.BEFORE_LABEL_COLON),this.t(":"),this.sep(Sep$1.AFTER_LABEL_COLON),r),{endsWithMissingElse:r.endsWithMissingElse})}reduceLiteralBooleanExpression(e){return this.t(e.value.toString())}reduceLiteralNullExpression(){return this.t("null")}reduceLiteralInfinityExpression(){return this.t("2e308")}reduceLiteralNumericExpression(e){return new NumberCodeRep$1(e.value)}reduceLiteralRegExpExpression(e){return this.t(`/${e.pattern}/${e.global?"g":""}${e.ignoreCase?"i":""}${e.multiLine?"m":""}${e.dotAll?"s":""}${e.unicode?"u":""}${e.sticky?"y":""}`,!0)}reduceLiteralStringExpression(e){return this.t(escapeStringLiteral$1(e.value))}reduceMethod(e,{name:r,params:u,body:i}){return seq(e.isAsync?seq(this.t("async"),this.sep(Sep$1.AFTER_METHOD_ASYNC)):empty(),e.isGenerator?seq(this.t("*"),this.sep(Sep$1.AFTER_METHOD_GENERATOR_STAR)):empty(),r,this.sep(Sep$1.AFTER_METHOD_NAME),this.paren(u,Sep$1.PARAMETERS_PAREN_BEFORE,Sep$1.PARAMETERS_PAREN_AFTER,Sep$1.PARAMETERS_PAREN_EMPTY),this.sep(Sep$1.BEFORE_METHOD_BODY),this.brace(i,e,Sep$1.METHOD_BRACE_INTIAL,Sep$1.METHOD_BRACE_FINAL,Sep$1.METHOD_BRACE_EMPTY))}reduceModule(e,{directives:r,items:u}){return u.length&&(u[0]=this.parenToAvoidBeingDirective(e.items[0],u[0])),seq(...r,r.length?this.sep(Sep$1.AFTER_MODULE_DIRECTIVES):empty(),...u)}reduceNewExpression(e,{callee:r,arguments:u}){const i=u.map((a,l)=>this.p(e.arguments[l],Precedence$1.Assignment,a));let n=getPrecedence$1(e.callee)===Precedence$1.Call?this.paren(r,Sep$1.NEW_CALLEE_PAREN_BEFORE,Sep$1.NEW_CALLEE_PAREN_AFTER):this.p(e.callee,getPrecedence$1(e),r);return seq(this.t("new"),this.sep(Sep$1.AFTER_NEW),n,u.length===0?this.sep(Sep$1.EMPTY_NEW_CALL):seq(this.sep(Sep$1.BEFORE_NEW_ARGS),this.paren(this.commaSep(i,Sep$1.ARGS_BEFORE_COMMA,Sep$1.ARGS_AFTER_COMMA),Sep$1.NEW_PAREN_BEFORE,Sep$1.NEW_PAREN_AFTER,Sep$1.NEW_PAREN_EMPTY)))}reduceNewTargetExpression(){return seq(this.t("new"),this.sep(Sep$1.NEW_TARGET_BEFORE_DOT),this.t("."),this.sep(Sep$1.NEW_TARGET_AFTER_DOT),this.t("target"))}reduceObjectExpression(e,{properties:r}){let u=this.brace(this.commaSep(r,Sep$1.OBJECT_BEFORE_COMMA,Sep$1.OBJECT_AFTER_COMMA),e,Sep$1.OBJECT_BRACE_INITIAL,Sep$1.OBJECT_BRACE_FINAL,Sep$1.OBJECT_EMPTY);return u.startsWithCurly=!0,u}reduceUpdateExpression(e,{operand:r}){return e.isPrefix?this.reduceUnaryExpression(...arguments):objectAssign(seq(this.p(e.operand,Precedence$1.New,r),this.sep(Sep$1.BEFORE_POSTFIX(e.operator)),this.t(e.operator)),{startsWithCurly:r.startsWithCurly,startsWithLetSquareBracket:r.startsWithLetSquareBracket,startsWithFunctionOrClass:r.startsWithFunctionOrClass})}reduceUnaryExpression(e,{operand:r}){return seq(this.t(e.operator),this.sep(Sep$1.UNARY(e.operator)),this.p(e.operand,getPrecedence$1(e),r))}reduceReturnStatement(e,{expression:r}){return seq(this.t("return"),r?seq(this.sep(Sep$1.RETURN),r):empty(),this.semiOp(),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceScript(e,{directives:r,statements:u}){return u.length&&(u[0]=this.parenToAvoidBeingDirective(e.statements[0],u[0])),seq(...r,r.length?this.sep(Sep$1.AFTER_SCRIPT_DIRECTIVES):empty(),...u)}reduceSetter(e,{name:r,param:u,body:i}){return seq(this.t("set"),this.sep(Sep$1.AFTER_SET),r,this.sep(Sep$1.BEFORE_SET_PARAMS),this.paren(u,Sep$1.SETTER_PARAM_BEFORE,Sep$1.SETTER_PARAM_AFTER),this.sep(Sep$1.BEFORE_SET_BODY),this.brace(i,e,Sep$1.SET_BRACE_INTIIAL,Sep$1.SET_BRACE_FINAL,Sep$1.SET_BRACE_EMPTY))}reduceShorthandProperty(e,{name:r}){return r}reduceStaticMemberAssignmentTarget(e,{object:r}){const u=seq(this.p(e.object,getPrecedence$1(e),r),this.sep(Sep$1.BEFORE_STATIC_MEMBER_ASSIGNMENT_TARGET_DOT),this.t("."),this.sep(Sep$1.AFTER_STATIC_MEMBER_ASSIGNMENT_TARGET_DOT),this.t(e.property));return u.startsWithLet=r.startsWithLet,u.startsWithCurly=r.startsWithCurly,u.startsWithLetSquareBracket=r.startsWithLetSquareBracket,u.startsWithFunctionOrClass=r.startsWithFunctionOrClass,u}reduceStaticMemberExpression(e,{object:r}){const u=seq(this.p(e.object,getPrecedence$1(e),r),this.sep(Sep$1.BEFORE_STATIC_MEMBER_DOT),this.t("."),this.sep(Sep$1.AFTER_STATIC_MEMBER_DOT),this.t(e.property));return u.startsWithLet=r.startsWithLet,u.startsWithCurly=r.startsWithCurly,u.startsWithLetSquareBracket=r.startsWithLetSquareBracket,u.startsWithFunctionOrClass=r.startsWithFunctionOrClass,u}reduceStaticPropertyName(e){if(keyword.isIdentifierNameES6(e.value))return this.t(e.value);let r=parseFloat(e.value);return r>=0&&r.toString()===e.value?new NumberCodeRep$1(r):this.t(escapeStringLiteral$1(e.value))}reduceSuper(){return this.t("super")}reduceSwitchCase(e,{test:r,consequent:u}){return seq(this.t("case"),this.sep(Sep$1.BEFORE_CASE_TEST),r,this.sep(Sep$1.AFTER_CASE_TEST),this.t(":"),this.sep(Sep$1.BEFORE_CASE_BODY),seq(...u),this.sep(Sep$1.AFTER_CASE_BODY))}reduceSwitchDefault(e,{consequent:r}){return seq(this.t("default"),this.sep(Sep$1.DEFAULT),this.t(":"),this.sep(Sep$1.BEFORE_CASE_BODY),seq(...r),this.sep(Sep$1.AFTER_DEFAULT_BODY))}reduceSwitchStatement(e,{discriminant:r,cases:u}){return seq(this.t("switch"),this.sep(Sep$1.BEFORE_SWITCH_DISCRIM),this.paren(r,Sep$1.SWITCH_DISCRIM_PAREN_BEFORE,Sep$1.SWITCH_DISCRIM_PAREN_AFTER),this.sep(Sep$1.BEFORE_SWITCH_BODY),this.brace(seq(...u),e,Sep$1.SWITCH_BRACE_INTIAL,Sep$1.SWITCH_BRACE_FINAL,Sep$1.SWITCH_BRACE_EMPTY),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceSwitchStatementWithDefault(e,{discriminant:r,preDefaultCases:u,defaultCase:i,postDefaultCases:n}){return seq(this.t("switch"),this.sep(Sep$1.BEFORE_SWITCH_DISCRIM),this.paren(r,Sep$1.SWITCH_DISCRIM_PAREN_BEFORE,Sep$1.SWITCH_DISCRIM_PAREN_AFTER),this.sep(Sep$1.BEFORE_SWITCH_BODY),this.brace(seq(...u,i,...n),e,Sep$1.SWITCH_BRACE_INTIAL,Sep$1.SWITCH_BRACE_FINAL,Sep$1.SWITCH_BRACE_EMPTY),this.sep(Sep$1.AFTER_STATEMENT(e)))}reduceTemplateExpression(e,{tag:r,elements:u}){let i=e.tag==null?empty():seq(this.p(e.tag,getPrecedence$1(e),r),this.sep(Sep$1.TEMPLATE_TAG));i=seq(i,this.t("`"));for(let n=0,a=e.elements.length;n0&&(l+="}"),l+=e.elements[n].rawValue,n{u.locations.set(e,{start:{line:1,column:0,offset:0},end:null}),r(u,...i),u.locations.get(e).end={line:u.line,column:u.column,offset:u.result.length}}:e.type==="LiteralNumericExpression"?s.emit=(u,...i)=>{u.startEmit(e),r(u,...i),u.finishEmit(e),u.lastNumberNode=e}:s.emit=(u,...i)=>{u.startEmit(e),r(u,...i),u.finishEmit(e)},s}function addLocationToReducer(s){const e=adapt(addLocation,s),r=e.regenerateArrowParams.bind(e);e.regenerateArrowParams=function(i,n){const a=r(i,n);return a!==n&&addLocation(a,i),a};const u=e.parenToAvoidBeingDirective.bind(e);return e.parenToAvoidBeingDirective=function(i,n){const a=u(i,n);return a!==n&&addLocation(a,i),a},e}function codeGenWithLocation$1(s,e=new MinimalCodeGen$1){let r=new TokenStreamWithLocation;return reduce$1(addLocationToReducer(e),s).emit(r),{source:r.result,locations:r.locations}}var withLocation=codeGenWithLocation$1;const reduce=src$2.default,{TokenStream}=tokenStream,MinimalCodeGen=minimalCodegen;function codeGen(s,e=new MinimalCodeGen){let r=new TokenStream;return reduce(e,s).emit(r),r.result}const{ExtensibleCodeGen,FormattedCodeGen,Sep}=formattedCodegen,{Precedence,getPrecedence,escapeStringLiteral,CodeRep,Empty,Token,NumberCodeRep,Paren,Bracket,Brace,NoIn,ContainsIn,Seq,Semi,CommaSep,SemiOp}=coderep,codeGenWithLocation=withLocation;var src={default:codeGen,codeGen,MinimalCodeGen,ExtensibleCodeGen,FormattedCodeGen,Sep,Precedence,getPrecedence,escapeStringLiteral,CodeRep,Empty,Token,NumberCodeRep,Paren,Bracket,Brace,NoIn,ContainsIn,Seq,Semi,CommaSep,SemiOp,codeGenWithLocation};const{replace}=estraverse,codegen=src.default||src,{Pattern}=strudel,isNote=s=>/^[a-gC-G][bs]?[0-9]$/.test(s),shapeshifter=s=>{const{code:e,addReturn:r}=wrapAsync(s),u=src$1.parseScriptWithLocation(disguiseImports(e)),i=[],n=[],a=replace(u.tree,{enter(o,c){var f,E,D;if(n.push(c),n.some(h=>i.includes(h)))return o;if(isBackTickString(o))return minifyWithLocation(o,o,u.locations,i);if(((f=o.directives)==null?void 0:f.length)===1&&!((E=o.statements)!=null&&E.length)){const h=new LiteralStringExpression({value:o.directives[0].rawValue}),y=minifyWithLocation(h,o.directives[0],u.locations,i);return{...o,directives:[],statements:[y]}}if(isStringWithDoubleQuotes(o,u.locations,e))return minifyWithLocation(o,o,u.locations,i);const d={"*":"fast","/":"slow","&":"stack","&&":"append"};if(o.type==="BinaryExpression"&&d[o.operator]&&["LiteralNumericExpression","LiteralStringExpression","IdentifierExpression"].includes((D=o.right)==null?void 0:D.type)&&canBeOverloaded(o.left)){let h=o.left;return o.left.type==="IdentifierExpression"&&(h=wrapFunction("reify",o.left)),new CallExpression({callee:new StaticMemberExpression({property:d[o.operator],object:wrapFunction("reify",h)}),arguments:[o.right]})}const m=isPatternArg(n)||hasModifierCall(c);if(o.type==="CallExpression"&&o.callee.name==="pure"){const h=o.arguments[0];return reifyWithLocation(h,o.arguments[0],u.locations,i)}if(o.type==="IdentifierExpression"){if(isNote(o.name)){const h=o.name[1]==="s"?o.name.replace("s","#"):o.name;return m?reifyWithLocation(new LiteralStringExpression({value:h}),o,u.locations,i):new LiteralStringExpression({value:h})}if(o.name==="r")return new IdentifierExpression({name:"silence"})}return["LiteralStringExpression"].includes(o.type)&&m?reifyWithLocation(o,o,u.locations,i):addMiniNotationLocations(o,u.locations,i)},leave(){n.pop()}});return r(a),undisguiseImports(codegen(a))};function disguiseImports(s){return s.replaceAll("import","_mport")}function undisguiseImports(s){return s.replaceAll("_mport","import")}function wrapAsync(s){return s=`(async () => { -${s} -})()`,{code:s,addReturn:r=>{const u=r.statements[0].expression.callee.body;u.statements=u.statements.slice(0,-1).concat([new ReturnStatement({expression:u.statements.slice(-1)[0]})])}}}function addMiniNotationLocations(s,e,r){const u=["mini","m"];if(s.type==="CallExpression"&&u.includes(s.callee.name)){if(s.arguments.length>1)return console.warn("multi arg mini locations not supported yet..."),s;const i=s.arguments[0];return minifyWithLocation(i,i,e,r)}return s.type==="StaticMemberExpression"&&u.includes(s.property)?minifyWithLocation(s.object,s,e,r):s}function wrapFunction(s,...e){return new CallExpression({callee:new IdentifierExpression({name:s}),arguments:e})}function isBackTickString(s){return s.type==="TemplateExpression"&&s.elements.length===1}function isStringWithDoubleQuotes(s,e,r){if(s.type!=="LiteralStringExpression")return!1;const u=e.get(s);return r.slice(u.start.offset,u.end.offset)[0]==='"'}function isPatternArg(s){if(!s.length)return!1;const e=s.slice(0,-1),r=s[s.length-1];return isPatternFactory(r)?!0:(r==null?void 0:r.type)==="ArrayExpression"?isPatternArg(e):!1}function hasModifierCall(s){return(s==null?void 0:s.type)==="StaticMemberExpression"&&Object.keys(Pattern.prototype.composable).includes(s.property)}const factories=Object.keys(Pattern.prototype.factories).concat(["mini"]);function isPatternFactory(s){return(s==null?void 0:s.type)==="CallExpression"&&factories.includes(s.callee.name)}function canBeOverloaded(s){return s.type==="IdentifierExpression"&&isNote(s.name)||isPatternFactory(s)}function reifyWithLocation(s,e,r,u){const i=getLocationArguments(e,r),n=new CallExpression({callee:new StaticMemberExpression({object:wrapFunction("reify",s),property:"withLocation"}),arguments:i});return u.push(n),n}function minifyWithLocation(s,e,r,u){const i=getLocationArguments(e,r),n=wrapFunction("mini",s),a=new CallExpression({callee:new StaticMemberExpression({object:n,property:"withMiniLocation"}),arguments:i});return u.push(a),a}function getLocationArguments(s,e){const r=e.get(s),u=-1;return[new ArrayExpression({elements:[new LiteralNumericExpression({value:r.start.line+u}),new LiteralNumericExpression({value:r.start.column}),new LiteralNumericExpression({value:r.start.offset})]}),new ArrayExpression({elements:[new LiteralNumericExpression({value:r.end.line+u}),new LiteralNumericExpression({value:r.end.column}),new LiteralNumericExpression({value:r.end.offset})]})]}const tune=`await samples('github:tidalcycles/Dirt-Samples/master') - -stack( - // amen - n("0 1 2 3 4 5 6 7") - .sometimes(x=>x.ply(2)) - .rarely(x=>x.speed("2 | -2")) - .sometimesBy(.4, x=>x.delay(".5")) - .s("amencutup") - .slow(2) - .room(.5) - , - // bass - sine.add(saw.slow(4)).range(0,7).segment(8) - .superimpose(x=>x.add(.1)) - .scale('G0 minor').note() - .s("sawtooth").decay(.1).sustain(0) - .gain(.4).cutoff(perlin.range(300,3000).slow(8)).resonance(10) - .degradeBy("0 0.1 .5 .1") - .rarely(add(note("12"))) - , - // chord - note("Bb3,D4".superimpose(x=>x.add(.2))) - .s('sawtooth').cutoff(1000).struct("<~@3 [~ x]>") - .decay(.05).sustain(.0).delay(.8).delaytime(.125).room(.8) - , - // alien - s("breath").room(1).shape(.6).chop(16).rev().mask("") - , - n("0 1").s("east").delay(.5).degradeBy(.8).speed(rand.range(.5,1.5)) -).reset("")`,ctx=getAudioContext$1(),input=document.getElementById("text");input.innerHTML=tune;evalScope(controls,__vitePreload(()=>Promise.resolve().then(()=>strudel),void 0),__vitePreload(()=>import("./index.d9f8bbbd.js"),[]),__vitePreload(()=>import("./index.b66fb637.js"),[]),__vitePreload(()=>import("./index.66252a18.js"),[]));const{evaluate}=repl({defaultOutput:webaudioOutput,getTime:()=>ctx.currentTime,transpiler:shapeshifter});document.getElementById("start").addEventListener("click",()=>{ctx.resume(),evaluate(input.value)});export{Hap as H,Pattern$3 as P,webaudioOutputTrigger as a,getCachedBuffer as b,chooseInWith as c,reverseBuffer as d,getLoadedBuffer as e,loadGithubSamples as f,getAudioContext$1 as g,samples as h,resetLoadedSamples as i,getLoadedSamples$1 as j,getAugmentedNamespace as k,loadBuffer as l,mod as m,commonjsGlobal as n,getDefaultExportFromCjs as o,panic as p,reify$1 as q,rand as r,strudel as s,stack as t,webaudioOutput as w}; diff --git a/packages/core/examples/vite-vanilla-repl/dist/index.html b/packages/core/examples/vite-vanilla-repl/dist/index.html index 891d3a80..216ca275 100644 --- a/packages/core/examples/vite-vanilla-repl/dist/index.html +++ b/packages/core/examples/vite-vanilla-repl/dist/index.html @@ -4,7 +4,7 @@ Vite Vanilla Strudel REPL - +
diff --git a/packages/core/examples/vite-vanilla-repl/main.js b/packages/core/examples/vite-vanilla-repl/main.js index 1ddffe55..327e8f1f 100644 --- a/packages/core/examples/vite-vanilla-repl/main.js +++ b/packages/core/examples/vite-vanilla-repl/main.js @@ -1,6 +1,7 @@ import { controls, repl, evalScope } from '@strudel.cycles/core'; import { getAudioContext, webaudioOutput } from '@strudel.cycles/webaudio'; import { transpiler } from '@strudel.cycles/transpiler'; +// import shapeshifter from '@strudel.cycles/eval/shapeshifter.mjs'; import tune from './tune.mjs'; const ctx = getAudioContext(); @@ -19,6 +20,7 @@ const { evaluate } = repl({ defaultOutput: webaudioOutput, getTime: () => ctx.currentTime, transpiler, + // transpiler: shapeshifter, }); document.getElementById('start').addEventListener('click', () => { ctx.resume(); diff --git a/packages/core/examples/vite-vanilla-repl/package.json b/packages/core/examples/vite-vanilla-repl/package.json index c53bb411..9e01de4a 100644 --- a/packages/core/examples/vite-vanilla-repl/package.json +++ b/packages/core/examples/vite-vanilla-repl/package.json @@ -5,10 +5,11 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build --base /tidalcycles/strudel/general-purpose-scheduler/packages/core/examples/vite-vanilla-repl/dist/", + "build-githack": "vite build --base /tidalcycles/strudel/general-purpose-scheduler/packages/core/examples/vite-vanilla-repl/dist/", + "build": "vite build", "preview": "vite preview" }, "devDependencies": { "vite": "^3.2.0" } -} \ No newline at end of file +} diff --git a/packages/transpiler/transpiler.mjs b/packages/transpiler/transpiler.mjs index e663ef5b..a08cbd71 100644 --- a/packages/transpiler/transpiler.mjs +++ b/packages/transpiler/transpiler.mjs @@ -9,6 +9,7 @@ export function transpiler(input, options = {}) { let ast = parse(input, { ecmaVersion: 2022, allowAwaitOutsideFunction: true, + // locations: true, }); walk(ast, {