diff --git a/assets/index-53ae576e.js b/assets/index-139d9ed9.js similarity index 97% rename from assets/index-53ae576e.js rename to assets/index-139d9ed9.js index 21bca4a..e353848 100644 --- a/assets/index-53ae576e.js +++ b/assets/index-139d9ed9.js @@ -2423,7 +2423,7 @@ I won't teach you how to play with Hydra. You can find some great resources on t ${r} \`\`\` -`},dE=n=>(n.api.codeExamples={},{introduction:aP(n),interface:uP(n),code:hP(n),time:dP(n),sound:mP(n),samples:lP(n),synths:bP(n),chaining:cP(n),patterns:_P(n),ziffers:OP(n),midi:pP(n),functions:SP(n),reference:EP(),shortcuts:gP(),bonus:TP(n),about:fP()}),SR=n=>new Promise((e,t)=>setTimeout(()=>t(new Error("Operation took too long")),n)),OR=n=>n.replace(/->/g,"&&").replace(/::/g,"&&"),Kg=(n,e)=>new Promise((t,r)=>{try{Function(`"use strict";try{${OR(e)}} catch (e) {console.log(e); _reportError(e);};`).call(n.api),t(!0)}catch(i){n.error_line.innerHTML=i,console.log(i),t(!1)}}),es=new Map,vP=20,CP=(n,e)=>{es.size>=vP&&es.delete(es.keys().next().value),es.set(n,e)},ls=async(n,e,t=5e3)=>{try{e.evaluations++;const r=e.candidate;if(es.has(r))es.get(r).call(n.api);else{const i=`let i = ${e.evaluations};`+r;if(await Promise.race([Kg(n,i),SR(t)])){e.committed=e.candidate;const a=new Function(`"use strict";try{${OR(i)}} catch (e) {console.log(e); _reportError(e);};`);CP(r,a)}else await yP(n,e,t)}}catch(r){n.error_line.innerHTML=r,console.log(r)}},yP=async(n,e,t=1e3)=>{try{await Promise.race([Kg(n,e.committed),SR(t)]),e.evaluations&&e.evaluations++}catch(r){n.error_line.innerHTML=r,console.log(r)}},AP=async(n,e)=>{await Kg(n,e)},pE=(n,e)=>String(n).padStart(e,"0");class RP extends AudioWorkletNode{constructor(t,r,i){super(t,"transport",r);v(this,"handleMessage",t=>{if(t.data&&t.data.type==="bang"){this.app.clock.tick++;const r=this.app.clock.convertTicksToTimeposition(this.app.clock.tick);this.app.clock.time_position=r,this.timeviewer.innerHTML=`${pE(r.bar,2)}:${r.beat+1}:${pE(r.pulse,2)}`,this.app.exampleIsPlaying?ls(this.app,this.app.example_buffer):ls(this.app,this.app.global_buffer)}});this.app=i,this.port.addEventListener("message",this.handleMessage),this.port.start(),this.timeviewer=document.getElementById("timeviewer")}start(){this.port.postMessage("start")}pause(){this.port.postMessage("pause")}setBPM(t){this.port.postMessage({type:"bpm",value:t})}setPPQN(t){this.port.postMessage({type:"ppqn",value:t})}stop(){this.port.postMessage("stop")}}const IP="/assets/TransportProcessor-b463db54.js";class NP{constructor(e,t){v(this,"ctx");v(this,"transportNode");v(this,"_bpm");v(this,"time_signature");v(this,"time_position");v(this,"_ppqn");v(this,"tick");this.app=e,this.time_position={bar:-1,beat:-1,pulse:-1},this.time_signature=[4,4],this.tick=-1,this._bpm=120,this._ppqn=48,this.transportNode=null,this.ctx=t,t.audioWorklet.addModule(IP).then(r=>(this.transportNode=new RP(t,{},this.app),this.transportNode.connect(t.destination),r)).catch(r=>{console.log("Error loading TransportProcessor.js:",r)})}convertTicksToTimeposition(e){const t=this.app.clock.time_signature[0],r=e%this.app.clock.ppqn,i=Math.floor(e/this.app.clock.ppqn),s=Math.floor(i/t),a=Math.floor(i%t);return{bar:s,beat:a,pulse:r}}get ticks_before_new_bar(){const e=this.ppqn-this.time_position.pulse;return(this.beats_per_bar-this.time_position.beat)*this.ppqn+e}get next_beat_in_ticks(){return this.app.clock.pulses_since_origin+this.time_position.pulse}get beats_per_bar(){return this.time_signature[0]}get beats_since_origin(){return Math.floor(this.tick/this.ppqn)}get pulses_since_origin(){return this.tick}get pulse_duration(){return 60/this.bpm/this.ppqn}get bpm(){return this._bpm}set bpm(e){var t;e>0&&this._bpm!==e&&(this._bpm=e,(t=this.transportNode)==null||t.setBPM(e))}get ppqn(){return this._ppqn}set ppqn(e){var t;e>0&&this._ppqn!==e&&(this._ppqn=e,(t=this.transportNode)==null||t.setPPQN(e))}convertPulseToSecond(e){return e*this.pulse_duration}start(){var e;this.app.audioContext.resume(),(e=this.transportNode)==null||e.start()}pause(){var e;(e=this.transportNode)==null||e.pause()}stop(){var e;this.app.clock.tick=-1,(e=this.transportNode)==null||e.stop()}}const wP={"+":(n,e)=>n+e,"-":(n,e)=>n-e,"*":(n,e)=>n*e,"/":(n,e)=>n/e,"%":(n,e)=>n%e,"^":(n,e)=>n**e,"<<":(n,e)=>n<>":(n,e)=>n>>e,"&":(n,e)=>n&e,"|":(n,e)=>n|e},jg=.25,DP={octave:0,key:"C4",scale:"MAJOR",measure:0,degrees:!1},xP={m:8,k:10240/1920,l:4,"d.":3,p:5120/1920,d:2,"w.":1.5,c:2560/1920,w:1,"h..":.875,"h.":.75,y:1280/1920,h:.5,"q..":840/1920,"q.":.375,n:640/1920,q:.25,"e..":420/1920,"e.":.1875,a:320/1920,e:.125,"s..":210/1920,"s.":180/1920,f:160/1920,s:.0625,"t..":105/1920,"t.":90/1920,x:80/1920,t:60/1920,"u.":45/1920,g:40/1920,u:30/1920,j:15/1920,o:8/1920,z:0},kP={C:0,Cs:1,D:2,Eb:3,E:4,F:5,Fs:6,G:7,Ab:8,A:9,Bb:10,B:11},LP={0:"C",1:"Cs",2:"D",3:"Eb",4:"E",5:"F",6:"Fs",7:"G",8:"Ab",9:"A",10:"Bb",11:"B"},hE=["Gb","Cs","Ab","Eb","Bb","F","C","G","D","A","E","B","Fs"],MP={"#":1,b:-1,s:1},PP={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},BP=()=>{const n=[2,1,2,2,1,2,2],e=[2,2,1,2,2,2,1],t=[2,1,2,2,1,3,1],r=[2,2,1,2,1,3,1],i=[3,2,2,3,2],s=[2,3,2,3,2],a=[2,2,2,2,2,2],o=[2,1,1,3,2,3],l=[3,2,1,1,3,2],c=[2,1,2,2,2,2,1],u=[2,2,1,2,1,2,2],p=[1,2,2,2,1,3,1],m=[1,2,2,2,2,2,1],_=[1,2,1,2,1,2,1,2],T=[2,2,1,2,1,1,2,1],R=[2,1,2,2,1,1,2,1],I=[2,2,1,2,2,1,1,1];return{MAJOR:e,MINOR:n,"HARMONIC MINOR":t,"HARMONIC MAJOR":r,"MINOR PENTATONIC":i,"SUSPENDED PENTATONIC":s,"BLUES MAJOR":o,"BLUES MINOR":l,WHOLE:a,"MELODIC MINOR":c,"MELODIC MAJOR":u,MINORIC:[4,4,4],THAPTIC:[4,3,4,1],LOTHIC:[3,4,1,4],PHRATIC:[4,1,4,3],AERATHIC:[1,4,3,4],EPATHIC:[4,3,2,3],MYNIC:[3,2,3,4],ROTHIC:[2,3,4,3],EPORIC:[3,4,3,2],ZYPHIC:[4,4,3,1],EPOGIC:[4,3,1,4],LANIC:[3,1,4,4],PYRRIC:[1,4,4,3],AEOLORIC:[4,4,1,3],GONIC:[4,1,3,4],DALIC:[1,3,4,4],DYGIC:[3,4,4,1],DARIC:[4,3,3,2],LONIC:[3,3,2,4],PHRADIC:[3,2,4,3],BOLIC:[2,4,3,3],SARIC:[4,2,3,3],ZOPTIC:[2,3,3,4],AERAPHIC:[3,3,4,2],BYPTIC:[3,4,2,3],AEOLIC:[4,4,2,2],KOPTIC:[4,2,2,4],MIXOLYRIC:[2,2,4,4],LYDIC:[2,4,4,2],STATHIC:[4,2,4,2],DADIC:[2,4,2,4],PHRYNIC:[3,3,3,3],EPATHITONIC:[3,2,3,2,2],MYNITONIC:[2,3,2,2,3],ROCRITONIC:i,PENTATONIC:[2,2,3,2,3],THAPTITONIC:s,MAGITONIC:[4,3,2,2,1],DADITONIC:[3,2,2,1,4],AEOLYPHRITONIC:[2,2,1,4,3],GYCRITONIC:[2,1,4,3,2],PYRITONIC:[1,4,3,2,2],GATHITONIC:[4,2,3,2,1],IONITONIC:[2,3,2,1,4],PHRYNITONIC:[3,2,1,4,2],STATHITONIC:[2,1,4,2,3],THALITONIC:[1,4,2,3,2],ZOLITONIC:[4,2,1,4,1],EPOGITONIC:[2,1,4,1,4],LANITONIC:[1,4,1,4,2],PAPTITONIC:[4,1,4,2,1],IONACRITONIC:[1,4,2,1,4],PHRADITONIC:[4,1,4,1,2],AEOLORITONIC:[1,4,1,2,4],GONITONIC:[4,1,2,4,1],DALITONIC:[1,2,4,1,4],DYGITONIC:[2,4,1,4,1],AERACRITONIC:[4,1,2,3,2],BYPTITONIC:[1,2,3,2,4],DARITONIC:[2,3,2,4,1],LONITONIC:[3,2,4,1,2],IONYCRITONIC:[2,4,1,2,3],LOTHITONIC:[4,1,2,2,3],PHRATONIC:[1,2,2,3,4],AERATHITONIC:[2,2,3,4,1],SARITONIC:[2,3,4,1,2],ZOPTITONIC:[3,4,1,2,2],DOLITONIC:[4,4,1,2,1],PORITONIC:[4,1,2,1,4],AERYLITONIC:[1,2,1,4,4],ZAGITONIC:[2,1,4,4,1],LAGITONIC:[1,4,4,1,2],MOLITONIC:[4,3,3,1,1],STAPTITONIC:[3,3,1,1,4],MOTHITONIC:[3,1,1,4,3],AERITONIC:[1,1,4,3,3],RAGITONIC:[1,4,3,3,1],IONADITONIC:[4,3,2,1,2],BOCRITONIC:[3,2,1,2,4],GYTHITONIC:[2,1,2,4,3],PAGITONIC:[1,2,4,3,2],AEOLYTHITONIC:[2,4,3,2,1],ZACRITONIC:[4,3,1,3,1],LARITONIC:[3,1,3,1,4],THACRITONIC:[1,3,1,4,3],STYDITONIC:[3,1,4,3,1],LORITONIC:[1,4,3,1,3],AEOLYRITONIC:[4,3,1,1,3],GORITONIC:[3,1,1,3,4],AEOLODITONIC:[1,1,3,4,3],DOPTITONIC:[1,3,4,3,1],AERAPHITONIC:[3,4,3,1,1],ZATHITONIC:[4,2,4,1,1],RADITONIC:[2,4,1,1,4],STONITONIC:[4,1,1,4,2],SYPTITONIC:[1,1,4,2,4],IONYTHITONIC:[1,4,2,4,1],AEOLANITONIC:[4,2,2,3,1],DANITONIC:[2,2,3,1,4],IONARITONIC:[2,3,1,4,2],DYNITONIC:[3,1,4,2,2],ZYDITONIC:[1,4,2,2,3],AEOLACRITONIC:[4,2,1,2,3],ZYTHITONIC:[2,1,2,3,4],DYRITONIC:[1,2,3,4,2],KOPTITONIC:[2,3,4,2,1],THOCRITONIC:[3,4,2,1,2],LYCRITONIC:[4,1,3,3,1],DAPTITONIC:[1,3,3,1,4],KYGITONIC:[3,3,1,4,1],MOCRITONIC:[3,1,4,1,3],ZYNITONIC:[1,4,1,3,3],EPYGITONIC:[4,1,3,2,2],ZAPTITONIC:[1,3,2,2,4],KAGITONIC:[3,2,2,4,1],ZOGITONIC:[2,2,4,1,3],EPYRITONIC:[2,4,1,3,2],ZOTHITONIC:[4,1,3,1,3],PHROLITONIC:[1,3,1,3,4],IONAGITONIC:[3,1,3,4,1],AEOLAPRITONIC:[1,3,4,1,3],KYRITONIC:[3,4,1,3,1],IONYPTITONIC:[4,1,1,3,3],GYRITONIC:[1,1,3,3,4],ZALITONIC:[1,3,3,4,1],STOLITONIC:[3,3,4,1,1],BYLITONIC:[3,4,1,1,3],THODITONIC:[3,3,2,3,1],DOGITONIC:[3,2,3,1,3],PHRALITONIC:[2,3,1,3,3],GARITONIC:[3,1,3,3,2],SOPTITONIC:[1,3,3,2,3],KATARITONIC:[3,3,2,2,2],SYLITONIC:[3,2,2,2,3],THONITONIC:[2,2,2,3,3],PHROPITONIC:[2,2,3,3,2],STADITONIC:[2,3,3,2,2],LYDITONIC:[3,3,1,3,2],MYTHITONIC:[3,1,3,2,3],SOGITONIC:[1,3,2,3,3],GOTHITONIC:[3,2,3,3,1],ROTHITONIC:[2,3,3,1,3],ZYLITONIC:[4,4,2,1,1],ZODITONIC:[4,2,1,1,4],ZARITONIC:[2,1,1,4,4],PHRYTHITONIC:[1,1,4,4,2],ROLITONIC:[1,4,4,2,1],RANITONIC:[4,4,1,1,2],LADITONIC:[4,1,1,2,4],PODITONIC:[1,1,2,4,4],IONOTHITONIC:[1,2,4,4,1],KANITONIC:[2,4,4,1,1],RYPHITONIC:[4,3,1,2,2],GYLITONIC:[3,1,2,2,4],AEOLYCRITONIC:[1,2,2,4,3],PYNITONIC:[2,2,4,3,1],ZANITONIC:[2,4,3,1,2],PHRONITONIC:[4,2,3,1,2],BANITONIC:[2,3,1,2,4],AERONITONIC:[3,1,2,4,2],GOLITONIC:[1,2,4,2,3],DYPTITONIC:[2,4,2,3,1],AERYNITONIC:[4,2,2,1,3],PALITONIC:[2,2,1,3,4],STOTHITONIC:[2,1,3,4,2],AEROPHITONIC:[1,3,4,2,2],KATAGITONIC:[3,4,2,2,1],IONODITONIC:[4,2,1,3,2],BOGITONIC:[2,1,3,2,4],MOGITONIC:[1,3,2,4,2],DOCRITONIC:[3,2,4,2,1],EPADITONIC:[2,4,2,1,3],MIXITONIC:[3,3,3,2,1],PHROTHITONIC:[3,3,2,1,3],KATYCRITONIC:[3,2,1,3,3],IONALITONIC:[2,1,3,3,3],LOPTITONIC:[1,3,3,3,2],THYRITONIC:[3,3,3,1,2],THOPTITONIC:[3,3,1,2,3],BYCRITONIC:[3,1,2,3,3],PATHITONIC:[1,2,3,3,3],MYDITONIC:[2,3,3,3,1],BOLITONIC:[4,2,2,2,2],BOTHITONIC:[2,2,2,2,4],KATADITONIC:[2,2,2,4,2],KODITONIC:[2,2,4,2,2],THOLITONIC:[2,4,2,2,2],EPATHIMIC:[3,2,2,1,2,2],MYNIMIC:[2,2,1,2,2,3],ROCRIMIC:[2,1,2,2,3,2],EPORIMIC:[1,2,2,3,2,2],THAPTIMIC:[2,2,3,2,2,1],LOTHIMIC:[2,3,2,2,1,2],DYRIMIC:[4,2,1,2,2,1],KOPTIMIC:[2,1,2,2,1,4],THOCRIMIC:[1,2,2,1,4,2],AEOLANIMIC:[2,2,1,4,2,1],DANIMIC:[2,1,4,2,1,2],IONARIMIC:[1,4,2,1,2,2],DAPTIMIC:[4,1,4,1,1,1],KYGIMIC:[1,4,1,1,1,4],MOCRIMIC:[4,1,1,1,4,1],ZYNIMIC:[1,1,1,4,1,4],AEOLIMIC:[1,1,4,1,4,1],ZYTHIMIC:[1,4,1,4,1,1],EPYGIMIC:[4,1,2,3,1,1],ZAPT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1,1],RAGYLLIAN:[1,2,1,1,2,1,1,1,1,1],THYDYLLIAN:[2,1,1,1,1,2,1,1,1,1],EPIRYLLIAN:[1,1,1,1,2,1,1,1,1,2],LYRYLLIAN:[1,1,1,2,1,1,1,1,2,1],MOGYLLIAN:[1,1,2,1,1,1,1,2,1,1],KATODYLLIAN:[1,2,1,1,1,1,2,1,1,1],AERYCRATIC:[2,1,1,1,1,1,1,1,1,1,1],MONATIC:[1,1,1,1,1,1,1,1,1,1,2],SOLATIC:[1,1,1,1,1,1,1,1,1,2,1],ZYLATIC:[1,1,1,1,1,1,1,1,2,1,1],MIXOLATIC:[1,1,1,1,1,1,1,2,1,1,1],SORATIC:[1,1,1,1,1,1,2,1,1,1,1],GODATIC:[1,1,1,1,1,2,1,1,1,1,1],EPTATIC:[1,1,1,1,2,1,1,1,1,1,1],IONATIC:[1,1,1,2,1,1,1,1,1,1,1],AEOLATIC:[1,1,2,1,1,1,1,1,1,1,1],THYDATIC:[1,2,1,1,1,1,1,1,1,1,1],CHROMATIC:[1,1,1,1,1,1,1,1,1,1,1,1]}},kc=BP(),UP=()=>{const n=Object.keys(kc),e=n[Math.floor(Math.random()*n.length)];return kc[e]},Ti=n=>kc[n.toUpperCase()],Jg=n=>n.toUpperCase()in kc,FP=n=>Ti(n).length,YP=()=>{const n=[0,4,7],e=[0,3,7],t=[0,4,7,11],r=[0,4,7,10],i=[0,3,7,10],s=[0,4,8],a=[0,3,6],o=[0,3,6,9],l=[0,3,6,10],m={1:[0],5:[0,7],"+5":[0,4,8],"m+5":[0,3,8],sus2:[0,2,7],sus4:[0,5,7],6:[0,4,7,9],m6:[0,3,7,9],"7sus2":[0,2,7,10],"7sus4":[0,5,7,10],"7-5":[0,4,6,10],"7+5":[0,4,8,10],"m7+5":[0,3,8,10],9:[0,4,7,10,14],m9:[0,3,7,10,14],"m7+9":[0,3,7,10,14],maj9:[0,4,7,11,14],"9sus4":[0,5,7,10,14],"6*9":[0,4,7,9,14],"m6*9":[0,3,7,9,14],"7-9":[0,4,7,10,13],"m7-9":[0,3,7,10,13],"7-10":[0,4,7,10,15],"7-11":[0,4,7,10,16],"7-13":[0,4,7,10,20],"9+5":[0,10,13],"m9+5":[0,10,14],"7+5-9":[0,4,8,10,13],"m7+5-9":[0,3,8,10,13],11:[0,4,7,10,14,17],m11:[0,3,7,10,14,17],maj11:[0,4,7,11,14,17],"11+":[0,4,7,10,14,18],"m11+":[0,3,7,10,14,18],13:[0,4,7,10,14,17,21],m13:[0,3,7,10,14,17,21],add2:[0,2,4,7],add4:[0,4,5,7],add9:[0,4,7,14],add11:[0,4,7,17],add13:[0,4,7,21],madd2:[0,2,3,7],madd4:[0,3,5,7],madd9:[0,3,7,14],madd11:[0,3,7,17],madd13:[0,3,7,21],dim9:[0,3,6,9,14],dim:a,hdim7:l,hdim9:[0,3,6,10,14],hdimb9:[0,3,6,10,13],augMaj7:[0,4,8,11],minmaj7:[0,3,7,11],five:[0,7,12],seven:r,nine:[0,4,10,14],b9:[0,4,10,13],mM9:[0,3,11,14],min7:i,min9:[0,3,10,14],b5:[0,4,6,12],mb5:[0,3,6,12],major:n,maj:n,M:n,minor:e,min:e,m:e,major7:t,dom7:r,7:r,M7:t,m7:i,augmented:s,a:s,aug:s,diminished:a,diminished7:o,dim7:o,halfdim:l,m7b5:l,"m7-5":l},_=Object.keys(m);return[m,_]},[fE,fG]=YP(),Fm=(n="")=>{let e=0,t=0,r=0,i=0;function s(){const a=(e^e<<11)>>>0;return e=t,t=r,r=i,i^=(i>>>19^a^a>>>8)>>>0,(i>>>0)/4294967296}for(let a=0;aArray.isArray(n)?n.map(e=>ei(e)):n&&typeof n=="object"?Object.getOwnPropertyNames(n).reduce((e,t)=>(Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t)),e[t]=ei(n[t]),e),Object.create(Object.getPrototypeOf(n))):n,ER=n=>{try{return new Function(`"use strict";return (${n})`)()}catch(e){throw new Error(`Error in eval: ${e}`)}},$P=(n,e)=>(n%e+e)%e,bR=function(){function n(i,s){function a(){this.constructor=i}a.prototype=s.prototype,i.prototype=new a}function e(i,s,a,o){var l=Error.call(this,i);return Object.setPrototypeOf&&Object.setPrototypeOf(l,e.prototype),l.expected=s,l.found=a,l.location=o,l.name="SyntaxError",l}n(e,Error);function t(i,s,a){return a=a||" ",i.length>s?i:(s-=i.length,a+=a.repeat(s),i+a.slice(0,s))}e.prototype.format=function(i){var s="Error: "+this.message;if(this.location){var a=null,o;for(o=0;o(n.api.codeExamples={},{introduction:aP(n),interface:uP(n),code:hP(n),time:dP(n),sound:mP(n),samples:lP(n),synths:bP(n),chaining:cP(n),patterns:_P(n),ziffers:OP(n),midi:pP(n),functions:SP(n),reference:EP(),shortcuts:gP(),bonus:TP(n),about:fP()}),SR=n=>new Promise((e,t)=>setTimeout(()=>t(new Error("Operation took too long")),n)),OR=n=>n.replace(/->/g,"&&").replace(/::/g,"&&"),Kg=(n,e)=>new Promise((t,r)=>{try{Function(`"use strict";try{${OR(e)}} catch (e) {console.log(e); _reportError(e);};`).call(n.api),t(!0)}catch(i){n.error_line.innerHTML=i,console.log(i),t(!1)}}),es=new Map,vP=20,CP=(n,e)=>{es.size>=vP&&es.delete(es.keys().next().value),es.set(n,e)},ls=async(n,e,t=5e3)=>{try{e.evaluations++;const r=e.candidate;if(es.has(r))es.get(r).call(n.api);else{const i=`let i = ${e.evaluations};`+r;if(await Promise.race([Kg(n,i),SR(t)])){e.committed=e.candidate;const a=new Function(`"use strict";try{${OR(i)}} catch (e) {console.log(e); _reportError(e);};`);CP(r,a)}else await yP(n,e,t)}}catch(r){n.error_line.innerHTML=r,console.log(r)}},yP=async(n,e,t=1e3)=>{try{await Promise.race([Kg(n,e.committed),SR(t)]),e.evaluations&&e.evaluations++}catch(r){n.error_line.innerHTML=r,console.log(r)}},AP=async(n,e)=>{await Kg(n,e)},pE=(n,e)=>String(n).padStart(e,"0");class RP extends AudioWorkletNode{constructor(t,r,i){super(t,"transport",r);v(this,"handleMessage",t=>{if(t.data&&t.data.type==="bang"){this.app.clock.tick++;const r=this.app.clock.convertTicksToTimeposition(this.app.clock.tick);this.app.clock.time_position=r,this.timeviewer.innerHTML=`${pE(r.bar,2)}:${r.beat+1}:${pE(r.pulse,2)}`,this.app.api.MidiConnection.sendMidiClock(),this.app.exampleIsPlaying?ls(this.app,this.app.example_buffer):ls(this.app,this.app.global_buffer)}});this.app=i,this.port.addEventListener("message",this.handleMessage),this.port.start(),this.timeviewer=document.getElementById("timeviewer")}start(){this.port.postMessage("start")}pause(){this.port.postMessage("pause")}setBPM(t){this.port.postMessage({type:"bpm",value:t})}setPPQN(t){this.port.postMessage({type:"ppqn",value:t})}stop(){this.port.postMessage("stop")}}const IP="/assets/TransportProcessor-b463db54.js";class NP{constructor(e,t){v(this,"ctx");v(this,"transportNode");v(this,"_bpm");v(this,"time_signature");v(this,"time_position");v(this,"_ppqn");v(this,"tick");this.app=e,this.time_position={bar:-1,beat:-1,pulse:-1},this.time_signature=[4,4],this.tick=-1,this._bpm=120,this._ppqn=48,this.transportNode=null,this.ctx=t,t.audioWorklet.addModule(IP).then(r=>(this.transportNode=new RP(t,{},this.app),this.transportNode.connect(t.destination),r)).catch(r=>{console.log("Error loading TransportProcessor.js:",r)})}convertTicksToTimeposition(e){const t=this.app.clock.time_signature[0],r=e%this.app.clock.ppqn,i=Math.floor(e/this.app.clock.ppqn),s=Math.floor(i/t),a=Math.floor(i%t);return{bar:s,beat:a,pulse:r}}get ticks_before_new_bar(){const e=this.ppqn-this.time_position.pulse;return(this.beats_per_bar-this.time_position.beat)*this.ppqn+e}get next_beat_in_ticks(){return this.app.clock.pulses_since_origin+this.time_position.pulse}get beats_per_bar(){return this.time_signature[0]}get beats_since_origin(){return Math.floor(this.tick/this.ppqn)}get pulses_since_origin(){return this.tick}get pulse_duration(){return 60/this.bpm/this.ppqn}get bpm(){return this._bpm}set bpm(e){var t;e>0&&this._bpm!==e&&(this._bpm=e,(t=this.transportNode)==null||t.setBPM(e))}get ppqn(){return this._ppqn}set ppqn(e){var t;e>0&&this._ppqn!==e&&(this._ppqn=e,(t=this.transportNode)==null||t.setPPQN(e))}convertPulseToSecond(e){return e*this.pulse_duration}start(){var e;this.app.audioContext.resume(),this.app.api.MidiConnection.sendStartMessage(),(e=this.transportNode)==null||e.start()}pause(){var e;(e=this.transportNode)==null||e.pause(),this.app.api.MidiConnection.sendStopMessage()}stop(){var e;this.app.clock.tick=-1,this.app.api.MidiConnection.sendStopMessage(),(e=this.transportNode)==null||e.stop()}}const wP={"+":(n,e)=>n+e,"-":(n,e)=>n-e,"*":(n,e)=>n*e,"/":(n,e)=>n/e,"%":(n,e)=>n%e,"^":(n,e)=>n**e,"<<":(n,e)=>n<>":(n,e)=>n>>e,"&":(n,e)=>n&e,"|":(n,e)=>n|e},jg=.25,DP={octave:0,key:"C4",scale:"MAJOR",measure:0,degrees:!1},xP={m:8,k:10240/1920,l:4,"d.":3,p:5120/1920,d:2,"w.":1.5,c:2560/1920,w:1,"h..":.875,"h.":.75,y:1280/1920,h:.5,"q..":840/1920,"q.":.375,n:640/1920,q:.25,"e..":420/1920,"e.":.1875,a:320/1920,e:.125,"s..":210/1920,"s.":180/1920,f:160/1920,s:.0625,"t..":105/1920,"t.":90/1920,x:80/1920,t:60/1920,"u.":45/1920,g:40/1920,u:30/1920,j:15/1920,o:8/1920,z:0},kP={C:0,Cs:1,D:2,Eb:3,E:4,F:5,Fs:6,G:7,Ab:8,A:9,Bb:10,B:11},LP={0:"C",1:"Cs",2:"D",3:"Eb",4:"E",5:"F",6:"Fs",7:"G",8:"Ab",9:"A",10:"Bb",11:"B"},hE=["Gb","Cs","Ab","Eb","Bb","F","C","G","D","A","E","B","Fs"],MP={"#":1,b:-1,s:1},PP={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},BP=()=>{const n=[2,1,2,2,1,2,2],e=[2,2,1,2,2,2,1],t=[2,1,2,2,1,3,1],r=[2,2,1,2,1,3,1],i=[3,2,2,3,2],s=[2,3,2,3,2],a=[2,2,2,2,2,2],o=[2,1,1,3,2,3],l=[3,2,1,1,3,2],c=[2,1,2,2,2,2,1],u=[2,2,1,2,1,2,2],p=[1,2,2,2,1,3,1],m=[1,2,2,2,2,2,1],_=[1,2,1,2,1,2,1,2],T=[2,2,1,2,1,1,2,1],R=[2,1,2,2,1,1,2,1],I=[2,2,1,2,2,1,1,1];return{MAJOR:e,MINOR:n,"HARMONIC MINOR":t,"HARMONIC MAJOR":r,"MINOR PENTATONIC":i,"SUSPENDED PENTATONIC":s,"BLUES MAJOR":o,"BLUES MINOR":l,WHOLE:a,"MELODIC MINOR":c,"MELODIC MAJOR":u,MINORIC:[4,4,4],THAPTIC:[4,3,4,1],LOTHIC:[3,4,1,4],PHRATIC:[4,1,4,3],AERATHIC:[1,4,3,4],EPATHIC:[4,3,2,3],MYNIC:[3,2,3,4],ROTHIC:[2,3,4,3],EPORIC:[3,4,3,2],ZYPHIC:[4,4,3,1],EPOGIC:[4,3,1,4],LANIC:[3,1,4,4],PYRRIC:[1,4,4,3],AEOLORIC:[4,4,1,3],GONIC:[4,1,3,4],DALIC:[1,3,4,4],DYGIC:[3,4,4,1],DARIC:[4,3,3,2],LONIC:[3,3,2,4],PHRADIC:[3,2,4,3],BOLIC:[2,4,3,3],SARIC:[4,2,3,3],ZOPTIC:[2,3,3,4],AERAPHIC:[3,3,4,2],BYPTIC:[3,4,2,3],AEOLIC:[4,4,2,2],KOPTIC:[4,2,2,4],MIXOLYRIC:[2,2,4,4],LYDIC:[2,4,4,2],STATHIC:[4,2,4,2],DADIC:[2,4,2,4],PHRYNIC:[3,3,3,3],EPATHITONIC:[3,2,3,2,2],MYNITONIC:[2,3,2,2,3],ROCRITONIC:i,PENTATONIC:[2,2,3,2,3],THAPTITONIC:s,MAGITONIC:[4,3,2,2,1],DADITONIC:[3,2,2,1,4],AEOLYPHRITONIC:[2,2,1,4,3],GYCRITONIC:[2,1,4,3,2],PYRITONIC:[1,4,3,2,2],GATHITONIC:[4,2,3,2,1],IONITONIC:[2,3,2,1,4],PHRYNITONIC:[3,2,1,4,2],STATHITONIC:[2,1,4,2,3],THALITONIC:[1,4,2,3,2],ZOLITONIC:[4,2,1,4,1],EPOGITONIC:[2,1,4,1,4],LANITONIC:[1,4,1,4,2],PAPTITONIC:[4,1,4,2,1],IONACRITONIC:[1,4,2,1,4],PHRADITONIC:[4,1,4,1,2],AEOLORITONIC:[1,4,1,2,4],GONITONIC:[4,1,2,4,1],DALITONIC:[1,2,4,1,4],DYGITONIC:[2,4,1,4,1],AERACRITONIC:[4,1,2,3,2],BYPTITONIC:[1,2,3,2,4],DARITONIC:[2,3,2,4,1],LONITONIC:[3,2,4,1,2],IONYCRITONIC:[2,4,1,2,3],LOTHITONIC:[4,1,2,2,3],PHRATONIC:[1,2,2,3,4],AERATHITONIC:[2,2,3,4,1],SARITONIC:[2,3,4,1,2],ZOPTITONIC:[3,4,1,2,2],DOLITONIC:[4,4,1,2,1],PORITONIC:[4,1,2,1,4],AERYLITONIC:[1,2,1,4,4],ZAGITONIC:[2,1,4,4,1],LAGITONIC:[1,4,4,1,2],MOLITONIC:[4,3,3,1,1],STAPTITONIC:[3,3,1,1,4],MOTHITONIC:[3,1,1,4,3],AERITONIC:[1,1,4,3,3],RAGITONIC:[1,4,3,3,1],IONADITONIC:[4,3,2,1,2],BOCRITONIC:[3,2,1,2,4],GYTHITONIC:[2,1,2,4,3],PAGITONIC:[1,2,4,3,2],AEOLYTHITONIC:[2,4,3,2,1],ZACRITONIC:[4,3,1,3,1],LARITONIC:[3,1,3,1,4],THACRITONIC:[1,3,1,4,3],STYDITONIC:[3,1,4,3,1],LORITONIC:[1,4,3,1,3],AEOLYRITONIC:[4,3,1,1,3],GORITONIC:[3,1,1,3,4],AEOLODITONIC:[1,1,3,4,3],DOPTITONIC:[1,3,4,3,1],AERAPHITONIC:[3,4,3,1,1],ZATHITONIC:[4,2,4,1,1],RADITONIC:[2,4,1,1,4],STONITONIC:[4,1,1,4,2],SYPTITONIC:[1,1,4,2,4],IONYTHITONIC:[1,4,2,4,1],AEOLANITONIC:[4,2,2,3,1],DANITONIC:[2,2,3,1,4],IONARITONIC:[2,3,1,4,2],DYNITONIC:[3,1,4,2,2],ZYDITONIC:[1,4,2,2,3],AEOLACRITONIC:[4,2,1,2,3],ZYTHITONIC:[2,1,2,3,4],DYRITONIC:[1,2,3,4,2],KOPTITONIC:[2,3,4,2,1],THOCRITONIC:[3,4,2,1,2],LYCRITONIC:[4,1,3,3,1],DAPTITONIC:[1,3,3,1,4],KYGITONIC:[3,3,1,4,1],MOCRITONIC:[3,1,4,1,3],ZYNITONIC:[1,4,1,3,3],EPYGITONIC:[4,1,3,2,2],ZAPTITONIC:[1,3,2,2,4],KAGITONIC:[3,2,2,4,1],ZOGITONIC:[2,2,4,1,3],EPYRITONIC:[2,4,1,3,2],ZOTHITONIC:[4,1,3,1,3],PHROLITONIC:[1,3,1,3,4],IONAGITONIC:[3,1,3,4,1],AEOLAPRITONIC:[1,3,4,1,3],KYRITONIC:[3,4,1,3,1],IONYPTITONIC:[4,1,1,3,3],GYRITONIC:[1,1,3,3,4],ZALITONIC:[1,3,3,4,1],STOLITONIC:[3,3,4,1,1],BYLITONIC:[3,4,1,1,3],THODITONIC:[3,3,2,3,1],DOGITONIC:[3,2,3,1,3],PHRALITONIC:[2,3,1,3,3],GARITONIC:[3,1,3,3,2],SOPTITONIC:[1,3,3,2,3],KATARITONIC:[3,3,2,2,2],SYLITONIC:[3,2,2,2,3],THONITONIC:[2,2,2,3,3],PHROPITONIC:[2,2,3,3,2],STADITONIC:[2,3,3,2,2],LYDITONIC:[3,3,1,3,2],MYTHITONIC:[3,1,3,2,3],SOGITONIC:[1,3,2,3,3],GOTHITONIC:[3,2,3,3,1],ROTHITONIC:[2,3,3,1,3],ZYLITONIC:[4,4,2,1,1],ZODITONIC:[4,2,1,1,4],ZARITONIC:[2,1,1,4,4],PHRYTHITONIC:[1,1,4,4,2],ROLITONIC:[1,4,4,2,1],RANITONIC:[4,4,1,1,2],LADITONIC:[4,1,1,2,4],PODITONIC:[1,1,2,4,4],IONOTHITONIC:[1,2,4,4,1],KANITONIC:[2,4,4,1,1],RYPHITONIC:[4,3,1,2,2],GYLITONIC:[3,1,2,2,4],AEOLYCRITONIC:[1,2,2,4,3],PYNITONIC:[2,2,4,3,1],ZANITONIC:[2,4,3,1,2],PHRONITONIC:[4,2,3,1,2],BANITONIC:[2,3,1,2,4],AERONITONIC:[3,1,2,4,2],GOLITONIC:[1,2,4,2,3],DYPTITONIC:[2,4,2,3,1],AERYNITONIC:[4,2,2,1,3],PALITONIC:[2,2,1,3,4],STOTHITONIC:[2,1,3,4,2],AEROPHITONIC:[1,3,4,2,2],KATAGITONIC:[3,4,2,2,1],IONODITONIC:[4,2,1,3,2],BOGITONIC:[2,1,3,2,4],MOGITONIC:[1,3,2,4,2],DOCRITONIC:[3,2,4,2,1],EPADITONIC:[2,4,2,1,3],MIXITONIC:[3,3,3,2,1],PHROTHITONIC:[3,3,2,1,3],KATYCRITONIC:[3,2,1,3,3],IONALITONIC:[2,1,3,3,3],LOPTITONIC:[1,3,3,3,2],THYRITONIC:[3,3,3,1,2],THOPTITONIC:[3,3,1,2,3],BYCRITONIC:[3,1,2,3,3],PATHITONIC:[1,2,3,3,3],MYDITONIC:[2,3,3,3,1],BOLITONIC:[4,2,2,2,2],BOTHITONIC:[2,2,2,2,4],KATADITONIC:[2,2,2,4,2],KODITONIC:[2,2,4,2,2],THOLITONIC:[2,4,2,2,2],EPATHIMIC:[3,2,2,1,2,2],MYNIMIC:[2,2,1,2,2,3],ROCRIMIC:[2,1,2,2,3,2],EPORIMIC:[1,2,2,3,2,2],THAPTIMIC:[2,2,3,2,2,1],LOTHIMIC:[2,3,2,2,1,2],DYRIMIC:[4,2,1,2,2,1],KOPTIMIC:[2,1,2,2,1,4],THOCRIMIC:[1,2,2,1,4,2],AEOLANIMIC:[2,2,1,4,2,1],DANIMIC:[2,1,4,2,1,2],IONARIMIC:[1,4,2,1,2,2],DAPTIMIC:[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LLIAN:[1,1,1,1,1,1,2,1,1,2],ZYRYLLIAN:[1,1,1,1,1,2,1,1,2,1],SAGYLLIAN:[1,1,1,1,2,1,1,2,1,1],EPINYLLIAN:[1,1,1,2,1,1,2,1,1,1],KATAGYLLIAN:[1,1,2,1,1,2,1,1,1,1],RAGYLLIAN:[1,2,1,1,2,1,1,1,1,1],THYDYLLIAN:[2,1,1,1,1,2,1,1,1,1],EPIRYLLIAN:[1,1,1,1,2,1,1,1,1,2],LYRYLLIAN:[1,1,1,2,1,1,1,1,2,1],MOGYLLIAN:[1,1,2,1,1,1,1,2,1,1],KATODYLLIAN:[1,2,1,1,1,1,2,1,1,1],AERYCRATIC:[2,1,1,1,1,1,1,1,1,1,1],MONATIC:[1,1,1,1,1,1,1,1,1,1,2],SOLATIC:[1,1,1,1,1,1,1,1,1,2,1],ZYLATIC:[1,1,1,1,1,1,1,1,2,1,1],MIXOLATIC:[1,1,1,1,1,1,1,2,1,1,1],SORATIC:[1,1,1,1,1,1,2,1,1,1,1],GODATIC:[1,1,1,1,1,2,1,1,1,1,1],EPTATIC:[1,1,1,1,2,1,1,1,1,1,1],IONATIC:[1,1,1,2,1,1,1,1,1,1,1],AEOLATIC:[1,1,2,1,1,1,1,1,1,1,1],THYDATIC:[1,2,1,1,1,1,1,1,1,1,1],CHROMATIC:[1,1,1,1,1,1,1,1,1,1,1,1]}},kc=BP(),UP=()=>{const n=Object.keys(kc),e=n[Math.floor(Math.random()*n.length)];return kc[e]},Ti=n=>kc[n.toUpperCase()],Jg=n=>n.toUpperCase()in kc,FP=n=>Ti(n).length,YP=()=>{const n=[0,4,7],e=[0,3,7],t=[0,4,7,11],r=[0,4,7,10],i=[0,3,7,10],s=[0,4,8],a=[0,3,6],o=[0,3,6,9],l=[0,3,6,10],m={1:[0],5:[0,7],"+5":[0,4,8],"m+5":[0,3,8],sus2:[0,2,7],sus4:[0,5,7],6:[0,4,7,9],m6:[0,3,7,9],"7sus2":[0,2,7,10],"7sus4":[0,5,7,10],"7-5":[0,4,6,10],"7+5":[0,4,8,10],"m7+5":[0,3,8,10],9:[0,4,7,10,14],m9:[0,3,7,10,14],"m7+9":[0,3,7,10,14],maj9:[0,4,7,11,14],"9sus4":[0,5,7,10,14],"6*9":[0,4,7,9,14],"m6*9":[0,3,7,9,14],"7-9":[0,4,7,10,13],"m7-9":[0,3,7,10,13],"7-10":[0,4,7,10,15],"7-11":[0,4,7,10,16],"7-13":[0,4,7,10,20],"9+5":[0,10,13],"m9+5":[0,10,14],"7+5-9":[0,4,8,10,13],"m7+5-9":[0,3,8,10,13],11:[0,4,7,10,14,17],m11:[0,3,7,10,14,17],maj11:[0,4,7,11,14,17],"11+":[0,4,7,10,14,18],"m11+":[0,3,7,10,14,18],13:[0,4,7,10,14,17,21],m13:[0,3,7,10,14,17,21],add2:[0,2,4,7],add4:[0,4,5,7],add9:[0,4,7,14],add11:[0,4,7,17],add13:[0,4,7,21],madd2:[0,2,3,7],madd4:[0,3,5,7],madd9:[0,3,7,14],madd11:[0,3,7,17],madd13:[0,3,7,21],dim9:[0,3,6,9,14],dim:a,hdim7:l,hdim9:[0,3,6,10,14],hdimb9:[0,3,6,10,13],augMaj7:[0,4,8,11],minmaj7:[0,3,7,11],five:[0,7,12],seven:r,nine:[0,4,10,14],b9:[0,4,10,13],mM9:[0,3,11,14],min7:i,min9:[0,3,10,14],b5:[0,4,6,12],mb5:[0,3,6,12],major:n,maj:n,M:n,minor:e,min:e,m:e,major7:t,dom7:r,7:r,M7:t,m7:i,augmented:s,a:s,aug:s,diminished:a,diminished7:o,dim7:o,halfdim:l,m7b5:l,"m7-5":l},_=Object.keys(m);return[m,_]},[fE,fG]=YP(),Fm=(n="")=>{let e=0,t=0,r=0,i=0;function s(){const a=(e^e<<11)>>>0;return e=t,t=r,r=i,i^=(i>>>19^a^a>>>8)>>>0,(i>>>0)/4294967296}for(let a=0;aArray.isArray(n)?n.map(e=>ei(e)):n&&typeof n=="object"?Object.getOwnPropertyNames(n).reduce((e,t)=>(Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t)),e[t]=ei(n[t]),e),Object.create(Object.getPrototypeOf(n))):n,ER=n=>{try{return new Function(`"use strict";return (${n})`)()}catch(e){throw new Error(`Error in eval: ${e}`)}},$P=(n,e)=>(n%e+e)%e,bR=function(){function n(i,s){function a(){this.constructor=i}a.prototype=s.prototype,i.prototype=new a}function e(i,s,a,o){var l=Error.call(this,i);return Object.setPrototypeOf&&Object.setPrototypeOf(l,e.prototype),l.expected=s,l.found=a,l.location=o,l.name="SyntaxError",l}n(e,Error);function t(i,s,a){return a=a||" ",i.length>s?i:(s-=i.length,a+=a.repeat(s),i+a.slice(0,s))}e.prototype.format=function(i){var s="Error: "+this.message;if(this.location){var a=null,o;for(o=0;o `+u+` `+m+` | `+c.line+" | "+_+` @@ -2435,7 +2435,7 @@ I won't teach you how to play with Hydra. You can find some great resources on t `+c.line+" | "+_+` `+m+" | "+t("",l.column-1," ")+t("",R,"^")}else s+=` at `+u}return s},e.buildMessage=function(i,s){var a={literal:function(_){return'"'+l(_.text)+'"'},class:function(_){var T=_.parts.map(function(R){return Array.isArray(R)?c(R[0])+"-"+c(R[1]):c(R)});return"["+(_.inverted?"^":"")+T.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(_){return _.description}};function o(_){return _.charCodeAt(0).toString(16).toUpperCase()}function l(_){return _.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(T){return"\\x0"+o(T)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(T){return"\\x"+o(T)})}function c(_){return _.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(T){return"\\x0"+o(T)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(T){return"\\x"+o(T)})}function u(_){return a[_.type](_)}function p(_){var T=_.map(u),R,I;if(T.sort(),T.length>0){for(R=1,I=1;R",I="@",L=":",$="/",K="(",f=")",E="[:",S="]",N="[",k="{",x="}",M="+",G="*",te="%",ne="^",re="&",ee=">>",B="<<",Q="_",j="?",Z="!",ue="r",le="#",Ee="b",De="iii",xe="ii",be="iv",Ie="i",ce="vii",ke="vi",Ze="v",Le=/^[0-9]/,tt=/^[ \n\r\t]/,nt=/^[a-z]/,ze=/^[a-z_]/,St=/^[a-z_0-9]/,mt=/^[mklpdcwyhnqaefsxtgujzo]/,At=/^[a-zA-Z0-9]/,It=/^[a-zA-Z0-9\-*+]/,at=/^[A-G]/,$e=/^[bs]/,hr=lt("-",!1),rt=Xr([["0","9"]],!1,!1),He=lt(".",!1),Pr=zs("whitespace"),cr=Xr([" ",` -`,"\r"," "],!1,!1),br=lt(",",!1),W=lt("|",!1),_e=Xr([["a","z"]],!1,!1),we=Xr([["a","z"],"_"],!1,!1),Ne=Xr([["a","z"],"_",["0","9"]],!1,!1),Je=lt("<",!1),ye=lt(">",!1),Ht=lt("@",!1),ut=lt(":",!1),Rt=Xr(["m","k","l","p","d","c","w","y","h","n","q","a","e","f","s","x","t","g","u","j","z","o"],!1,!1),qr=lt("/",!1),ht=lt("(",!1),Zt=lt(")",!1),Ct=lt("[:",!1),Be=lt("]",!1),Br=lt("[",!1),Fn=lt("{",!1),dt=lt("}",!1),Vr=lt("+",!1),Ar=lt("*",!1),Ri=lt("%",!1),Rr=lt("^",!1),Wt=lt("&",!1),yn=lt(">>",!1),Ji=lt("<<",!1),li=lt("_",!1),ea=lt("?",!1),cn=lt("!",!1),ci=lt("r",!1),An=Xr([["a","z"],["A","Z"],["0","9"]],!1,!1),Kt=lt("#",!1),ui=lt("b",!1),di=Xr([["a","z"],["A","Z"],["0","9"],"-","*","+"],!1,!1),q=Xr([["A","G"]],!1,!1),ie=Xr(["b","s"],!1,!1),de=lt("iii",!1),ge=lt("ii",!1),Ae=lt("iv",!1),Qe=lt("i",!1),Me=lt("vii",!1),yt=lt("vi",!1),Ir=lt("v",!1),zr=function(b){return b.filter(w=>w)},xa=function(){return parseFloat(Fr())},ta=function(){return parseInt(Fr())},Ds=function(){return parseInt(Fr())},Hr=function(){},xs=function(b){return Ut(QP,{sound:b})},ka=function(){return Fr()},La=function(b){return Ut(Ao,{items:b})},ks=function(b){return b},Ma=function(b,w){return Ut(qP,{item:b,sound:w})},Ls=function(b,w){return Ut(VP,{item:b,soundIndex:w})},Pa=function(b){return b},Ur=function(){return xP[Fr()]},Ms=function(b,w){return b/w},Ps=function(b){return b.filter(w=>w)},Ba=function(b){return Ut(Ao,{items:b})},Ua=function(b,w){return w?Ut(mE,{item:b,times:w}):Ut(gE,{items:b})},Bs=function(b){return b},Fa=function(b,w,P){return Ut(ZP,{left:b,operation:w,right:P})},Us=function(b,w){return Ut(XP,{items:b,times:w})},Ya=function(b){return Ut(TR,{items:b})},Fs=function(b){return b.map(w=>typeof w=="number"?w:void 0)},Ys=function(){return Math.ceil(ER(Fr()))},un=function(b){var w=b.filter(P=>P).map(P=>Ut(ti,{pitch:P[0]},P.toString()));return Ut(gE,{items:w})},bt=function(b){return b},$s=function(b){return b},Ii=function(){},Gs=function(b){return Ut(Ao,{items:b})},pi=function(b){return Ut(HP,{octave:b})},Qs=function(){return Fr().split("").reduce((b,w)=>b+(w==="^"?1:-1),0)},Ni=function(){return Ut(Lc,{seededRandom:s.seededRandom})},$a=function(b,w){return Ut(Lc,{min:b,max:w,seededRandom:s.seededRandom})},Ga=function(b,w){return Ut(mE,{item:b,times:w})},qs=function(b){return Ut(WP,{duration:b})},wi=function(b){return b},Qa=function(b){return Ut(Ym,{duration:b})},Di=function(b,w,P,X){const oe=b?s.nodeOptions.octave+b:s.nodeOptions.octave;return Ut(ti,{duration:w,pitch:X,pitchOctave:oe,add:P})},xi=function(b){return b.reduce((w,P)=>w+(P==="#"?1:-1),0)},qa=function(b,w,P){return Ut(Na,{pitches:[b].concat(w),inversion:P})},ra=function(){return Fr()},hi=function(b){return b},fr=function(){return Fr()},Va=function(b,w,P,X,oe){const Te=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",gt=s.nodeOptions.key?s.nodeOptions.key:"C",hn=a3(X,P,Te,b,w),Zs=w||s.nodeOptions.duration,mI=b?s.nodeOptions.octave+b:s.nodeOptions.octave;return Ut(Na,{duration:Zs,chordOctave:mI,pitches:hn,chordName:X,inversion:oe,scaleName:Te,key:gt})},Wr=function(b,w,P){const X=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",oe=s.nodeOptions.key?s.nodeOptions.key:"C";return Ut(zP,{roman:b,chordName:w,inversion:P,scaleName:X,key:oe})},na=function(b){const w=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",P=s.nodeOptions.key?s.nodeOptions.key:"C",X=h3(b,P,w);return Ut(ti,{pitch:X.pc,add:X.add,scaleName:w,key:P})},A=0,We=0,za=[{line:1,column:1}],dn=0,Vs=[],Oe=0,me={},ia;if("startRule"in s){if(!(s.startRule in l))throw new Error(`Can't start parsing from rule "`+s.startRule+'".');c=l[s.startRule]}function Fr(){return i.substring(We,A)}function cl(){return d(We,A)}function lt(b,w){return{type:"literal",text:b,ignoreCase:w}}function Xr(b,w,P){return{type:"class",parts:b,inverted:w,ignoreCase:P}}function ul(){return{type:"end"}}function zs(b){return{type:"other",description:b}}function dl(b){var w=za[b],P;if(w)return w;for(P=b-1;!za[P];)P--;for(w=za[P],w={line:w.line,column:w.column};Pdn&&(dn=A,Vs=[]),Vs.push(b))}function g(b,w,P){return new e(e.buildMessage(b,w),b,w,P)}function O(){var b,w,P=A*56+0,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=Xt(),w!==a&&(We=b,w=zr(w)),b=w,me[P]={nextPos:A,result:b},b)}function C(){var b,w,P,X,oe,Te,gt,hn=A*56+1,Zs=me[hn];if(Zs)return A=Zs.nextPos,Zs.result;for(b=A,w=A,i.charCodeAt(A)===45?(P=u,A++):(P=a,Oe===0&&h(hr)),P===a&&(P=null),X=[],Le.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(rt));oe!==a;)X.push(oe),Le.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(rt));if(i.charCodeAt(A)===46?(oe=p,A++):(oe=a,Oe===0&&h(He)),oe!==a){if(Te=[],Le.test(i.charAt(A))?(gt=i.charAt(A),A++):(gt=a,Oe===0&&h(rt)),gt!==a)for(;gt!==a;)Te.push(gt),Le.test(i.charAt(A))?(gt=i.charAt(A),A++):(gt=a,Oe===0&&h(rt));else Te=a;Te!==a?(P=[P,X,oe,Te],w=P):(A=w,w=a)}else A=w,w=a;if(w===a)if(w=A,i.charCodeAt(A)===46?(P=p,A++):(P=a,Oe===0&&h(He)),P!==a){if(X=[],Le.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(rt)),oe!==a)for(;oe!==a;)X.push(oe),Le.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(rt));else X=a;X!==a?(P=[P,X],w=P):(A=w,w=a)}else A=w,w=a;return w!==a&&(We=b,w=xa()),b=w,me[hn]={nextPos:A,result:b},b}function y(){var b,w,P=A*56+2,X=me[P];return X?(A=X.nextPos,X.result):(b=A,i.charCodeAt(A)===45?A++:Oe===0&&h(hr),Le.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(rt)),w!==a?(We=b,b=ta()):(A=b,b=a),me[P]={nextPos:A,result:b},b)}function D(){var b,w,P,X=A*56+3,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,i.charCodeAt(A)===45?A++:Oe===0&&h(hr),w=[],Le.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(rt)),P!==a)for(;P!==a;)w.push(P),Le.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(rt));else w=a;return w!==a?(We=b,b=Ds()):(A=b,b=a),me[X]={nextPos:A,result:b},b}function F(){var b,w,P=A*56+4,X=me[P];return X?(A=X.nextPos,X.result):(Oe++,b=A,tt.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(cr)),w!==a&&(We=b,w=Hr()),b=w,Oe--,b===a&&(w=a,Oe===0&&h(Pr)),me[P]={nextPos:A,result:b},b)}function U(){var b,w,P=A*56+8,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=H(),w!==a&&(We=b,w=xs(w)),b=w,me[P]={nextPos:A,result:b},b)}function H(){var b,w,P,X,oe,Te=A*56+10,gt=me[Te];if(gt)return A=gt.nextPos,gt.result;if(b=A,nt.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(_e)),w!==a){if(P=[],ze.test(i.charAt(A))?(X=i.charAt(A),A++):(X=a,Oe===0&&h(we)),X!==a)for(;X!==a;)P.push(X),ze.test(i.charAt(A))?(X=i.charAt(A),A++):(X=a,Oe===0&&h(we));else P=a;if(P!==a){for(X=[],St.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(Ne));oe!==a;)X.push(oe),St.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(Ne));We=b,b=ka()}else A=b,b=a}else A=b,b=a;return me[Te]={nextPos:A,result:b},b}function z(){var b,w=A*56+11,P=me[w];return P?(A=P.nextPos,P.result):(b=pe(),b===a&&(b=he()),me[w]={nextPos:A,result:b},b)}function pe(){var b,w,P,X,oe=A*56+12,Te=me[oe];if(Te)return A=Te.nextPos,Te.result;if(b=A,i.charCodeAt(A)===60?(w=T,A++):(w=a,Oe===0&&h(Je)),w!==a){if(P=[],X=z(),X!==a)for(;X!==a;)P.push(X),X=z();else P=a;P!==a?(i.charCodeAt(A)===62?(X=R,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=b,b=La(P)):(A=b,b=a)):(A=b,b=a)}else A=b,b=a;return me[oe]={nextPos:A,result:b},b}function he(){var b,w=A*56+13,P=me[w];return P?(A=P.nextPos,P.result):(b=H(),b===a&&(b=pe(),b===a&&(b=F())),me[w]={nextPos:A,result:b},b)}function se(){var b,w,P,X=A*56+14,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,i.charCodeAt(A)===64?(w=I,A++):(w=a,Oe===0&&h(Ht)),w!==a?(P=z(),P!==a?(We=b,b=ks(P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function ae(){var b,w=A*56+15,P=me[w];return P?(A=P.nextPos,P.result):(b=rr(),b===a&&(b=st(),b===a&&(b=qt(),b===a&&(b=su(),b===a&&(b=Qt())))),me[w]={nextPos:A,result:b},b)}function Ce(){var b,w,P,X=A*56+16,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,w=ae(),w===a&&(w=Xs()),w!==a?(P=se(),P!==a?(We=b,b=Ma(w,P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function Se(){var b,w,P,X=A*56+17,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,w=Ce(),w===a&&(w=ae(),w===a&&(w=Xs())),w!==a?(P=qe(),P!==a?(We=b,b=Ls(w,P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function qe(){var b,w,P,X=A*56+18,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,i.charCodeAt(A)===58?(w=L,A++):(w=a,Oe===0&&h(ut)),w!==a?(P=Dt(),P!==a?(We=b,b=Pa(P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function je(){var b,w,P=A*56+19,X=me[P];return X?(A=X.nextPos,X.result):(b=A,mt.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(Rt)),w!==a&&(We=b,w=Ur()),b=w,me[P]={nextPos:A,result:b},b)}function Ue(){var b,w=A*56+20,P=me[w];return P?(A=P.nextPos,P.result):(b=Nt(),b===a&&(b=C(),b===a&&(b=je())),me[w]={nextPos:A,result:b},b)}function Nt(){var b,w,P,X,oe=A*56+21,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,w=D(),w!==a?(i.charCodeAt(A)===47?(P=$,A++):(P=a,Oe===0&&h(qr)),P!==a?(X=D(),X!==a?(We=b,b=Ms(w,X)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function Xt(){var b,w,P,X=A*56+22,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,w=[],P=O_(),P===a&&(P=Se(),P===a&&(P=Ce(),P===a&&(P=rr(),P===a&&(P=qt(),P===a&&(P=st(),P===a&&(P=Qt(),P===a&&(P=Xs(),P===a&&(P=su())))))))),P!==a)for(;P!==a;)w.push(P),P=O_(),P===a&&(P=Se(),P===a&&(P=Ce(),P===a&&(P=rr(),P===a&&(P=qt(),P===a&&(P=st(),P===a&&(P=Qt(),P===a&&(P=Xs(),P===a&&(P=su()))))))));else w=a;return w!==a&&(We=b,w=Ps(w)),b=w,me[X]={nextPos:A,result:b},b}function Dt(){var b,w=A*56+23,P=me[w];return P?(A=P.nextPos,P.result):(b=F(),b===a&&(b=D(),b===a&&(b=S_(),b===a&&(b=lu(),b===a&&(b=er(),b===a&&(b=g_()))))),me[w]={nextPos:A,result:b},b)}function er(){var b,w,P,X,oe=A*56+24,Te=me[oe];if(Te)return A=Te.nextPos,Te.result;if(b=A,i.charCodeAt(A)===60?(w=T,A++):(w=a,Oe===0&&h(Je)),w!==a){if(P=[],X=Dt(),X!==a)for(;X!==a;)P.push(X),X=Dt();else P=a;P!==a?(i.charCodeAt(A)===62?(X=R,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=b,b=Ba(P)):(A=b,b=a)):(A=b,b=a)}else A=b,b=a;return me[oe]={nextPos:A,result:b},b}function st(){var b,w,P,X,oe,Te=A*56+25,gt=me[Te];return gt?(A=gt.nextPos,gt.result):(b=A,i.charCodeAt(A)===40?(w=K,A++):(w=a,Oe===0&&h(ht)),w!==a?(i.charCodeAt(A)===58?A++:Oe===0&&h(ut),P=Xt(),P!==a?(X=ft(),X===a&&(X=null),i.charCodeAt(A)===41?(oe=f,A++):(oe=a,Oe===0&&h(Zt)),oe!==a?(We=b,b=Ua(P,X)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[Te]={nextPos:A,result:b},b)}function ft(){var b,w,P,X=A*56+26,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,i.charCodeAt(A)===58?(w=L,A++):(w=a,Oe===0&&h(ut)),w!==a?(P=D(),P!==a?(We=b,b=Bs(P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function rr(){var b,w,P,X,oe=A*56+27,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,w=st(),w!==a?(P=__(),P!==a?(X=st(),X!==a?(We=b,b=Fa(w,P,X)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function Qt(){var b,w,P,X,oe,Te=A*56+28,gt=me[Te];return gt?(A=gt.nextPos,gt.result):(b=A,i.substr(A,2)===E?(w=E,A+=2):(w=a,Oe===0&&h(Ct)),w!==a?(P=Xt(),P!==a?(X=ft(),X===a&&(X=null),i.charCodeAt(A)===93?(oe=S,A++):(oe=a,Oe===0&&h(Be)),oe!==a?(We=b,b=Us(P,X)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[Te]={nextPos:A,result:b},b)}function qt(){var b,w,P,X,oe=A*56+29,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,i.charCodeAt(A)===91?(w=N,A++):(w=a,Oe===0&&h(Br)),w!==a?(P=Xt(),P!==a?(i.charCodeAt(A)===93?(X=S,A++):(X=a,Oe===0&&h(Be)),X!==a?(We=b,b=Ya(P)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function pn(){var b,w=A*56+30,P=me[w];return P?(A=P.nextPos,P.result):(b=D(),b===a&&(b=y()),me[w]={nextPos:A,result:b},b)}function Hs(){var b,w,P,X=A*56+31,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,w=[],P=pl(),P===a&&(P=pn()),P!==a)for(;P!==a;)w.push(P),P=pl(),P===a&&(P=pn());else w=a;return w!==a&&(We=b,w=Fs(w)),b=w,me[X]={nextPos:A,result:b},b}function pl(){var b,w,P,X,oe=A*56+32,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,i.charCodeAt(A)===40?A++:Oe===0&&h(ht),w=pn(),w!==a?(P=__(),P!==a?(X=Hs(),X!==a?(i.charCodeAt(A)===41?A++:Oe===0&&h(Zt),We=b,b=Ys()):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function Ws(){var b,w,P,X,oe=A*56+33,Te=me[oe];if(Te)return A=Te.nextPos,Te.result;if(b=A,i.charCodeAt(A)===123?(w=k,A++):(w=a,Oe===0&&h(Fn)),w!==a){if(P=[],X=Hs(),X===a&&(X=F()),X!==a)for(;X!==a;)P.push(X),X=Hs(),X===a&&(X=F());else P=a;P!==a?(i.charCodeAt(A)===125?(X=x,A++):(X=a,Oe===0&&h(dt)),X!==a?(We=b,b=un(P)):(A=b,b=a)):(A=b,b=a)}else A=b,b=a;return me[oe]={nextPos:A,result:b},b}function g_(){var b,w,P,X,oe=A*56+34,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,i.charCodeAt(A)===123?(w=k,A++):(w=a,Oe===0&&h(Fn)),w!==a?(P=D(),P===a&&(P=lu()),P!==a?(i.charCodeAt(A)===125?(X=x,A++):(X=a,Oe===0&&h(dt)),X!==a?(We=b,b=bt(P)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function __(){var b,w=A*56+35,P=me[w];return P?(A=P.nextPos,P.result):(i.charCodeAt(A)===43?(b=M,A++):(b=a,Oe===0&&h(Vr)),b===a&&(i.charCodeAt(A)===45?(b=u,A++):(b=a,Oe===0&&h(hr)),b===a&&(i.charCodeAt(A)===42?(b=G,A++):(b=a,Oe===0&&h(Ar)),b===a&&(i.charCodeAt(A)===47?(b=$,A++):(b=a,Oe===0&&h(qr)),b===a&&(i.charCodeAt(A)===37?(b=te,A++):(b=a,Oe===0&&h(Ri)),b===a&&(i.charCodeAt(A)===94?(b=ne,A++):(b=a,Oe===0&&h(Rr)),b===a&&(i.charCodeAt(A)===124?(b=_,A++):(b=a,Oe===0&&h(W)),b===a&&(i.charCodeAt(A)===38?(b=re,A++):(b=a,Oe===0&&h(Wt)),b===a&&(i.substr(A,2)===ee?(b=ee,A+=2):(b=a,Oe===0&&h(yn)),b===a&&(i.substr(A,2)===B?(b=B,A+=2):(b=a,Oe===0&&h(Ji))))))))))),me[w]={nextPos:A,result:b},b)}function Xs(){var b,w,P=A*56+36,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=cI(),w===a&&(w=hI(),w===a&&(w=pI(),w===a&&(w=fI(),w===a&&(w=U(),w===a&&(w=dI(),w===a&&(w=hl(),w===a&&(w=sI(),w===a&&(w=F(),w===a&&(w=oI(),w===a&&(w=st(),w===a&&(w=Ws(),w===a&&(w=aI())))))))))))),w!==a&&(We=b,w=$s(w)),b=w,me[P]={nextPos:A,result:b},b)}function aI(){var b,w,P=A*56+37,X=me[P];return X?(A=X.nextPos,X.result):(b=A,i.charCodeAt(A)===124?(w=_,A++):(w=a,Oe===0&&h(W)),w!==a&&(We=b,w=Ii()),b=w,me[P]={nextPos:A,result:b},b)}function su(){var b,w,P,X,oe=A*56+38,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,i.charCodeAt(A)===60?(w=T,A++):(w=a,Oe===0&&h(Je)),w!==a?(P=Xt(),P!==a?(i.charCodeAt(A)===62?(X=R,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=b,b=Gs(P)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function sI(){var b,w,P=A*56+39,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=ou(),w!==a&&(We=b,w=pi(w)),b=w,me[P]={nextPos:A,result:b},b)}function ou(){var b,w,P,X=A*56+40,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,w=[],i.charCodeAt(A)===94?(P=ne,A++):(P=a,Oe===0&&h(Rr)),P===a&&(i.charCodeAt(A)===95?(P=Q,A++):(P=a,Oe===0&&h(li))),P!==a)for(;P!==a;)w.push(P),i.charCodeAt(A)===94?(P=ne,A++):(P=a,Oe===0&&h(Rr)),P===a&&(i.charCodeAt(A)===95?(P=Q,A++):(P=a,Oe===0&&h(li)));else w=a;return w!==a&&(We=b,w=Qs()),b=w,me[X]={nextPos:A,result:b},b}function S_(){var b,w,P=A*56+41,X=me[P];return X?(A=X.nextPos,X.result):(b=A,i.charCodeAt(A)===63?(w=j,A++):(w=a,Oe===0&&h(ea)),w!==a&&(We=b,w=Ni()),b=w,me[P]={nextPos:A,result:b},b)}function lu(){var b,w,P,X,oe,Te,gt=A*56+42,hn=me[gt];return hn?(A=hn.nextPos,hn.result):(b=A,i.charCodeAt(A)===40?(w=K,A++):(w=a,Oe===0&&h(ht)),w!==a?(P=D(),P!==a?(i.charCodeAt(A)===44?(X=m,A++):(X=a,Oe===0&&h(br)),X!==a?(oe=D(),oe!==a?(i.charCodeAt(A)===41?(Te=f,A++):(Te=a,Oe===0&&h(Zt)),Te!==a?(We=b,b=$a(P,oe)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[gt]={nextPos:A,result:b},b)}function O_(){var b,w,P,X,oe=A*56+43,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,w=Se(),w===a&&(w=Ce(),w===a&&(w=ae(),w===a&&(w=Xs()))),w!==a?(i.charCodeAt(A)===33?(P=Z,A++):(P=a,Oe===0&&h(cn)),P!==a?(X=D(),X!==a?(We=b,b=Ga(w,X)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function oI(){var b,w,P=A*56+44,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=Ue(),w!==a&&(We=b,w=qs(w)),b=w,me[P]={nextPos:A,result:b},b)}function lI(){var b,w,P,X=A*56+45,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,w=Ue(),w!==a?(i.charCodeAt(A)===94?(P=ne,A++):(P=a,Oe===0&&h(Rr)),P!==a?(We=b,b=wi(w)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function cI(){var b,w,P,X,oe,Te=A*56+46,gt=me[Te];return gt?(A=gt.nextPos,gt.result):(b=A,w=lI(),w===a&&(w=null),i.charCodeAt(A)===114?(P=ue,A++):(P=a,Oe===0&&h(ci)),P!==a?(X=A,Oe++,At.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(An)),Oe--,oe===a?X=void 0:(A=X,X=a),X!==a?(We=b,b=Qa(w)):(A=b,b=a)):(A=b,b=a),me[Te]={nextPos:A,result:b},b)}function hl(){var b,w,P,X,oe,Te=A*56+47,gt=me[Te];return gt?(A=gt.nextPos,gt.result):(b=A,w=ou(),w===a&&(w=null),P=Ue(),P===a&&(P=null),X=uI(),X===a&&(X=null),oe=y(),oe===a&&(oe=S_(),oe===a&&(oe=lu(),oe===a&&(oe=g_()))),oe!==a?(We=b,b=Di(w,P,X,oe)):(A=b,b=a),me[Te]={nextPos:A,result:b},b)}function uI(){var b,w,P,X=A*56+48,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,w=[],i.charCodeAt(A)===35?(P=le,A++):(P=a,Oe===0&&h(Kt)),P===a&&(i.charCodeAt(A)===98?(P=Ee,A++):(P=a,Oe===0&&h(ui))),P!==a)for(;P!==a;)w.push(P),i.charCodeAt(A)===35?(P=le,A++):(P=a,Oe===0&&h(Kt)),P===a&&(i.charCodeAt(A)===98?(P=Ee,A++):(P=a,Oe===0&&h(ui)));else w=a;return w!==a&&(We=b,w=xi(w)),b=w,me[X]={nextPos:A,result:b},b}function dI(){var b,w,P,X,oe=A*56+49,Te=me[oe];if(Te)return A=Te.nextPos,Te.result;if(b=A,w=hl(),w!==a){if(P=[],X=hl(),X!==a)for(;X!==a;)P.push(X),X=hl();else P=a;P!==a?(X=cu(),X===a&&(X=null),We=b,b=qa(w,P,X)):(A=b,b=a)}else A=b,b=a;return me[oe]={nextPos:A,result:b},b}function E_(){var b,w,P,X=A*56+50,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,w=[],It.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(di)),P!==a)for(;P!==a;)w.push(P),It.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(di));else w=a;return w!==a&&(We=b,w=ra()),b=w,me[X]={nextPos:A,result:b},b}function cu(){var b,w,P,X=A*56+51,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,i.charCodeAt(A)===37?(w=te,A++):(w=a,Oe===0&&h(Ri)),w!==a?(P=D(),P!==a?(We=b,b=hi(P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function b_(){var b,w,P=A*56+52,X=me[P];return X?(A=X.nextPos,X.result):(b=A,at.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(q)),w!==a?($e.test(i.charAt(A))?(i.charAt(A),A++):Oe===0&&h(ie),We=b,b=fr()):(A=b,b=a),me[P]={nextPos:A,result:b},b)}function pI(){var b,w,P,X,oe,Te,gt=A*56+53,hn=me[gt];return hn?(A=hn.nextPos,hn.result):(b=A,w=ou(),w===a&&(w=null),P=Ue(),P===a&&(P=null),X=b_(),X!==a?(i.charCodeAt(A)===94?A++:Oe===0&&h(Rr),oe=E_(),oe!==a?(Te=cu(),Te===a&&(Te=null),We=b,b=Va(w,P,X,oe,Te)):(A=b,b=a)):(A=b,b=a),me[gt]={nextPos:A,result:b},b)}function hI(){var b,w,P,X,oe=A*56+54,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,i.substr(A,3)===De?(w=De,A+=3):(w=a,Oe===0&&h(de)),w===a&&(i.substr(A,2)===xe?(w=xe,A+=2):(w=a,Oe===0&&h(ge)),w===a&&(i.substr(A,2)===be?(w=be,A+=2):(w=a,Oe===0&&h(Ae)),w===a&&(i.charCodeAt(A)===105?(w=Ie,A++):(w=a,Oe===0&&h(Qe)),w===a&&(i.substr(A,3)===ce?(w=ce,A+=3):(w=a,Oe===0&&h(Me)),w===a&&(i.substr(A,2)===ke?(w=ke,A+=2):(w=a,Oe===0&&h(yt)),w===a&&(i.charCodeAt(A)===118?(w=Ze,A++):(w=a,Oe===0&&h(Ir)))))))),w!==a?(i.charCodeAt(A)===94?A++:Oe===0&&h(Rr),P=E_(),P===a&&(P=null),X=cu(),X===a&&(X=null),We=b,b=Wr(w,P,X)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function fI(){var b,w,P=A*56+55,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=b_(),w!==a&&(We=b,w=na(w)),b=w,me[P]={nextPos:A,result:b},b)}var T_=s.nodeOptions||{};function Ut(b,w,P=void 0){w.text=P||Fr(),w.location=cl();for(var X in T_)(w[X]===void 0||w[X]===null)&&(w[X]=T_[X]);return new b(w)}if(ia=c(),ia!==a&&A===i.length)return ia;throw ia!==a&&Ae.collect("pitch"))}notes(){return this.evaluated.map(e=>e.collect("note"))}sounds(){return this.evaluated.map(e=>e.collect("sound"))}indices(){return this.evaluated.map(e=>e.collect("soundIndex"))}freqs(){return this.evaluated.map(e=>e.collect("freq"))}durations(){return this.evaluated.map(e=>e.collect("duration"))}octaves(){return this.evaluated.map(e=>e.collect("octave"))}retrograde(){return this.evaluated=this.evaluated.reverse(),this}scale(e){return this.applyOptions({scale:e}),this}key(e){return this.applyOptions({key:e}),this}octave(e){return this.applyOptions({octave:e}),this}invert(e){return this.applyOptions({inversion:e}),this}isInOptions(e,t){return this.options.nodeOptions&&this.options.nodeOptions[e]===t}atLast(){return this.index+1>=this.evaluated.length*this.redo}clone(){return ei(this)}notStarted(){return this.index<0}peek(){return this.evaluated[this.index-1||0]}hasStarted(){return this.index>=0}next(){this.index<0&&(this.index=0);const e=this.evaluated[this.index%this.evaluated.length];return this.index++,this.counter++,this.redo>0&&this.index>=this.evaluated.length*this.redo&&(this.index=0,this.evaluated=this.evaluate(this.values)),e}applyOptions(e={}){this.evaluated=this.evaluate(this.evaluated,e),this.applyTransformations()}applyTransformations(){var e;(e=this.globalOptions)!=null&&e.retrograde&&(this.evaluated=this.evaluated.reverse())}update(){return this.evaluated=this.evaluate(this.values),this.applyTransformations(),this}evaluate(e,t={}){let r=e.map(i=>i.evaluate(t)).flat(1/0).filter(i=>i!==void 0);return t.subdivisions&&(r=NR(r)),r}totalDuration(){return this.evaluated.reduce((t,r)=>t+r.collect("duration"),0)}lead(){let e=this.evaluated.findIndex(t=>t instanceof Na);if(e>=0){for(let t=e+1;t<=this.evaluated.length;t++)if(this.evaluated[t]instanceof Na){const r=this.evaluated[e],i=this.evaluated[t],s=m3(r.notes(),i.notes()),a=ei(i);a.voiceLeadFromNotes(s,this.options.nodeOptions),this.evaluated[t]=a,e=t}}return this}}const NR=(n,e=void 0)=>n.map(r=>{if(r instanceof TR){const i=r.evaluated.length,s=(e||r.duration)/i;return NR(r.evaluated,s)}else return r.duration=e||r.duration,r}).flat(1/0),S3=n=>{let e={};return GP.forEach(t=>{if(n[t]!==void 0){const r=n[t];e[t]=r,delete n[t]}}),e};class O3{constructor(){v(this,"midiAccess",null);v(this,"midiOutputs",[]);v(this,"currentOutputIndex",0);v(this,"scheduledNotes",{});this.initializeMidiAccess()}async initializeMidiAccess(){try{this.midiAccess=await navigator.requestMIDIAccess(),this.midiOutputs=Array.from(this.midiAccess.outputs.values()),this.midiOutputs.length===0&&(console.warn("No MIDI outputs available."),this.currentOutputIndex=-1)}catch(e){console.error("Failed to initialize MIDI:",e)}}getCurrentMidiPort(){return this.midiOutputs.length>0&&this.currentOutputIndex>=0&&this.currentOutputIndex0&&this.currentOutputIndex>=0&&this.currentOutputIndex=this.midiOutputs.length?(console.error(`Invalid MIDI output index. Index must be in the range 0-${this.midiOutputs.length-1}.`),this.currentOutputIndex):e;{const t=this.midiOutputs.findIndex(r=>r.name===e);return t!==-1?t:(console.error(`MIDI output "${e}" not found.`),this.currentOutputIndex)}}listMidiOutputs(){let e="Available MIDI Outputs: ";return this.midiOutputs.forEach((t,r)=>{e+=`(${r+1}) ${t.name} `}),e}sendMidiNote(e,t,r,i,s=this.currentOutputIndex,a=void 0){typeof s=="string"&&(s=this.getMidiOutputIndex(s));const o=this.midiOutputs[s];if(e=Math.min(Math.max(e,0),127),o){const l=[144+t,e,r],c=[128+t,e,0];o.send(l),a&&this.sendPitchBend(a,t,s);const u=setTimeout(()=>{o.send(c),a&&this.sendPitchBend(8192,t,s),delete this.scheduledNotes[e]},(i-.02)*1e3);this.scheduledNotes[e]=u}else console.error("MIDI output not available.")}sendSysExMessage(e){const t=this.midiOutputs[this.currentOutputIndex];t?t.send(e):console.error("MIDI output not available.")}sendPitchBend(e,t,r=this.currentOutputIndex){(e<0||e>16383)&&console.error("Invalid pitch bend value. Value must be in the range 0-16383."),(t<0||t>15)&&console.error("Invalid MIDI channel. Channel must be in the range 0-15."),typeof r=="string"&&(r=this.getMidiOutputIndex(r));const i=this.midiOutputs[r];if(i){const s=e&127,a=e>>7&127;i.send([224|t,s,a])}else console.error("MIDI output not available.")}sendProgramChange(e,t){const r=this.midiOutputs[this.currentOutputIndex];r?r.send([192+t,e]):console.error("MIDI output not available.")}sendMidiControlChange(e,t,r){const i=this.midiOutputs[this.currentOutputIndex];i?i.send([176+r,e,t]):console.error("MIDI output not available.")}panic(){const e=this.midiOutputs[this.currentOutputIndex];if(e){for(const t in this.scheduledNotes){const r=this.scheduledNotes[t];clearTimeout(r),e.send([128,parseInt(t),0])}this.scheduledNotes={}}else console.error("MIDI output not available.")}}class E3{constructor(e,t,r){v(this,"min");v(this,"max");v(this,"wrap");v(this,"position");this.min=e,this.max=t,this.wrap=r,this.position=0}step(){const e=Math.floor(Math.random()*3)-1;this.position+=e,this.wrap?this.position>this.max?this.position=this.min:this.positionthis.max&&(this.position=this.max)}getPosition(){return this.position}toggleWrap(e){this.wrap=e}}class n_{constructor(e){v(this,"seedValue");v(this,"randomGen",Math.random);v(this,"app");v(this,"values",{});v(this,"odds",(e,t)=>this.randomGen()this);v(this,"almostNever",e=>this.odds(.025,e));v(this,"rarely",e=>this.odds(.1,e));v(this,"scarcely",e=>this.odds(.25,e));v(this,"sometimes",e=>this.odds(.5,e));v(this,"often",e=>this.odds(.75,e));v(this,"frequently",e=>this.odds(.9,e));v(this,"almostAlways",e=>this.odds(.985,e));v(this,"always",e=>this.modify(e));v(this,"modify",e=>e(this));v(this,"seed",e=>(this.seedValue=e.toString(),this.randomGen=this.app.api.localSeededRandom(this.seedValue),this));v(this,"clear",()=>(this.app.api.clearLocalSeed(this.seedValue),this));v(this,"apply",e=>this.modify(e));v(this,"length",e=>(this.values.length=e,this));this.app=e,this.app.api.currentSeed&&(this.randomGen=this.app.api.randomGen)}}class wR extends n_{constructor(t){super(t);v(this,"octave",t=>(this.values.octave=t,this.update(),this));v(this,"key",t=>(this.values.key=t,this.update(),this));v(this,"scale",t=>(Jg(t)?(this.values.scaleName=t,this.values.parsedScale=Ti(t)):this.values.parsedScale=e_(t),this.update(),this));v(this,"freq",t=>{this.values.freq=t;const r=KP(t);return r%1!==0?(this.values.note=Math.floor(r),this.values.bend=vR(r)[1]):this.values.note=r,this});v(this,"update",()=>{})}}let wr=[],b3=(n,e)=>{let t,r=[],i={lc:0,l:e||0,value:n,set(s){i.value=s,i.notify()},get(){return i.lc||i.listen(()=>{})(),i.value},notify(s){t=r;let a=!wr.length;for(let o=0;o{r===t&&(r=r.slice());let o=r.indexOf(s);~o&&(r.splice(o,2),i.lc--,i.lc||i.off())}},subscribe(s,a){let o=i.listen(s,a);return s(i.value),o},off(){}};return i},T3=(n={})=>{let e=b3(n);return e.setKey=function(t,r){typeof r>"u"?t in e.value&&(e.value={...e.value},delete e.value[t],e.notify(t)):e.value[t]!==r&&(e.value={...e.value,[t]:r},e.notify(t))},e};if(typeof DelayNode<"u"){class n extends DelayNode{constructor(t,r,i,s){super(t),r=Math.abs(r),this.delayTime.value=i;const a=t.createGain();a.gain.value=Math.min(Math.abs(s),.995),this.feedback=a.gain;const o=t.createGain();return o.gain.value=r,this.delayGain=o,this.connect(a),this.connect(o),a.connect(this),this.connect=l=>o.connect(l),this}start(t){this.delayGain.gain.setValueAtTime(this.delayGain.gain.value,t+this.delayTime.value)}}AudioContext.prototype.createFeedbackDelay=function(e,t,r){return new n(this,e,t,r)}}typeof AudioContext<"u"&&(AudioContext.prototype.impulseResponse=function(n,e=1){const t=this.sampleRate*n,r=this.createBuffer(e,t,this.sampleRate),i=r.getChannelData(0);for(let s=0;s(e.buffer=this.impulseResponse(t),e.duration=n,e),e.setDuration(n),e});var _E={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 n extends GainNode{constructor(t,r){if(super(t),!_E[r])throw new Error("vowel: unknown vowel "+r);const{gains:i,qs:s,freqs:a}=_E[r],o=t.createGain();for(let l=0;l<5;l++){const c=t.createGain();c.gain.value=i[l];const u=t.createBiquadFilter();u.type="bandpass",u.Q.value=s[l],u.frequency.value=a[l],this.connect(u),u.connect(c),c.connect(o)}return o.gain.value=8,this.connect=l=>o.connect(l),this}}AudioContext.prototype.createVowelFilter=function(e){return new n(this,e)}}const v3=n=>{var i;if(typeof n!="string")return[];const[e,t="",r]=((i=n.match(/^([a-gA-G])([#bsf]*)([0-9]*)$/))==null?void 0:i.slice(1))||[];return e?[e,t,r?Number(r):void 0]:[]},C3={c:0,d:2,e:4,f:5,g:7,a:9,b:11},y3={"#":1,b:-1,s:1,f:-1},ru=(n,e=3)=>{const[t,r,i=e]=v3(n);if(!t)throw new Error('not a note: "'+n+'"');const s=C3[t.toLowerCase()],a=(r==null?void 0:r.split("").reduce((o,l)=>o+y3[l],0))||0;return(Number(i)+1)*12+s+a},DR=n=>Math.pow(2,(n-69)/12)*440,Gm=(n,e,t)=>Math.min(Math.max(n,e),t),A3=n=>12*Math.log(n/440)/Math.LN2+69,R3=(n,e)=>{if(typeof n!="object")throw new Error("valueToMidi: expected object value");let{freq:t,note:r}=n;if(typeof t=="number")return A3(t);if(typeof r=="string")return ru(r);if(typeof r=="number")return r;if(!e)throw new Error("valueToMidi: expected freq or note to be set");return e},I3="data:application/javascript;base64,Ly8gTElDRU5TRSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2My4wIHNlZSBodHRwczovL2dpdGh1Yi5jb20vZGt0cjAvV2ViRGlydC9ibG9iL21haW4vTElDRU5TRQovLyBhbGwgdGhlIGNyZWRpdCBnb2VzIHRvIGRrdHIwJ3Mgd2ViZGlydDogaHR0cHM6Ly9naXRodWIuY29tL2RrdHIwL1dlYkRpcnQvYmxvYi81Y2UzZDY5ODM2MmM1NGQ2ZTFiNjhhY2M0N2ViMjk1NWFjNjJjNzkzL2Rpc3QvQXVkaW9Xb3JrbGV0cy5qcwovLyA8MwoKY2xhc3MgQ29hcnNlUHJvY2Vzc29yIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBzdGF0aWMgZ2V0IHBhcmFtZXRlckRlc2NyaXB0b3JzKCkgewogICAgcmV0dXJuIFt7IG5hbWU6ICdjb2Fyc2UnLCBkZWZh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BpbnB1dFswXVtuXSkgLyAoMSArIHNoYXBlICogTWF0aC5hYnMoaW5wdXRbMF1bbl0pKTsKICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ3NoYXBlLXByb2Nlc3NvcicsIFNoYXBlUHJvY2Vzc29yKTsK";function Mc(n){const e=Jt().createGain();return e.gain.value=n,e}const Qm=(n,e,t,r,i,s)=>{const a=Jt().createGain();return a.gain.setValueAtTime(0,s),a.gain.linearRampToValueAtTime(i,s+n),a.gain.linearRampToValueAtTime(t*i,s+n+e),{node:a,stop:o=>{a.gain.setValueAtTime(t*i,o),a.gain.linearRampToValueAtTime(0,o+r)}}},N3=(n,e,t,r,i,s)=>{t=Math.max(.001,t),i=Math.max(.001,i);const a=Jt().createGain();return a.gain.setValueAtTime(1e-4,s),a.gain.exponentialRampToValueAtTime(i,s+n),a.gain.exponentialRampToValueAtTime(t*i,s+n+e),{node:a,stop:o=>{a.gain.exponentialRampToValueAtTime(1e-4,o+r)}}},w3=(n,e,t,r,i,s,a,o,l)=>{const c=a-s,u=s+c,p=s+r*c;n.setValueAtTime(s,o),n.linearRampToValueAtTime(u,o+e),n.linearRampToValueAtTime(p,o+e+t),n.setValueAtTime(p,l),n.linearRampToValueAtTime(s,l+Math.max(i,.1))};function Wu(n,e,t,r,i,s,a,o,l,c,u,p=.5){const m=n.createBiquadFilter();if(m.type=e,m.Q.value=r,m.frequency.value=t,!isNaN(l)&&l!==0){const _=l*p,T=Gm(2**-_*t,0,2e4),R=Gm(2**(l-_)*t,0,2e4);return w3(m.frequency,i,s,a,o,T,R,c,u),m}return m}let D3=n=>console.log(n);const ys=(...n)=>D3(...n),i_=T3();function a_(n,e,t={}){i_.setKey(n,{onTrigger:e,data:t})}function SE(n){return i_.get()[n]}let Xu;const Jt=()=>(Xu||(Xu=new AudioContext),Xu);let Bl;const s_=()=>{const n=Jt();return Bl||(Bl=n.createGain(),Bl.connect(n.destination)),Bl};let Zu;function x3(){return Zu||(Zu=Jt().audioWorklet.addModule(I3),Zu)}function Ku(n,e,t){const r=new AudioWorkletNode(n,e);return Object.entries(t).forEach(([i,s])=>{r.parameters.get(i).value=s}),r}async function k3(n={}){const{disableWorklets:e=!1}=n;typeof window<"u"&&(await Jt().resume(),e?console.log("disableWorklets: AudioWorklet effects coarse, crush and shape are skipped!"):await x3().catch(t=>{console.warn("could not load AudioWorklet effects coarse, crush and shape",t)}))}async function L3(n){return new Promise(e=>{document.addEventListener("click",async function t(){await k3(n),e(),document.removeEventListener("click",t)})})}let oa={};function M3(n,e,t,r){var i;if(t=Gm(t,0,.98),!oa[n]){const s=Jt().createFeedbackDelay(1,e,t);(i=s.start)==null||i.call(s,r),s.connect(s_()),oa[n]=s}return oa[n].delayTime.value!==e&&oa[n].delayTime.setValueAtTime(e,r),oa[n].feedback.value!==t&&oa[n].feedback.setValueAtTime(t,r),oa[n]}let la={};function P3(n,e=2){if(!la[n]){const t=Jt().createReverb(e);t.connect(s_()),la[n]=t}return la[n].duration!==e&&(la[n]=la[n].setDuration(e),la[n].duration=e),la[n]}let ca;function B3(n=2048){if(!ca){const e=Jt().createAnalyser();e.fftSize=n,ca=e,new Float32Array(ca.frequencyBinCount)}return ca.fftSize!==n&&(ca.fftSize=n,new Float32Array(ca.frequencyBinCount)),ca}function ju(n,e,t){const r=Mc(t);return n.connect(r),r.connect(e),r}const OE=async(n,e,t)=>{const r=Jt();if(typeof n!="object")throw new Error(`expected hap.value to be an object, but got "${n}". Hint: append .note() or .s() to the end`,"error");n.duration=t;let i=r.currentTime+e,{s="triangle",bank:a,source:o,gain:l=.8,ftype:c="12db",fanchor:u=.5,cutoff:p,lpenv:m,lpattack:_=.01,lpdecay:T=.01,lpsustain:R=1,lprelease:I=.01,resonance:L=1,hpenv:$,hcutoff:K,hpattack:f=.01,hpdecay:E=.01,hpsustain:S=1,hprelease:N=.01,hresonance:k=1,bpenv:x,bandf:M,bpattack:G=.01,bpdecay:te=.01,bpsustain:ne=1,bprelease:re=.01,bandq:ee=1,coarse:B,crush:Q,shape:j,pan:Z,vowel:ue,delay:le=0,delayfeedback:Ee=.5,delaytime:De=.25,orbit:xe=1,room:be,size:Ie=2,velocity:ce=1,analyze:ke,fft:Ze=8}=n;l*=ce;let Le=[];const tt=()=>{Le.forEach(at=>at==null?void 0:at.disconnect())};a&&s&&(s=`${a}_${s}`);let nt;if(o)nt=o(i,n,t);else if(SE(s)){const{onTrigger:at}=SE(s),$e=await at(i,n,tt);$e&&(nt=$e.node,$e.stop(i+t))}else throw new Error(`sound ${s} not found! Is it loaded?`);if(!nt)return;if(r.currentTime>i){ys("[webaudio] skip hap: still loading",r.currentTime-i);return}const ze=[];if(ze.push(nt),ze.push(Mc(l)),p!==void 0){let at=()=>Wu(r,"lowpass",p,L,_,T,R,I,m,i,i+t,u);ze.push(at()),c==="24db"&&ze.push(at())}if(K!==void 0){let at=()=>Wu(r,"highpass",K,k,f,E,S,N,$,i,i+t,u);ze.push(at()),c==="24db"&&ze.push(at())}if(M!==void 0){let at=()=>Wu(r,"bandpass",M,ee,G,te,ne,re,x,i,i+t,u);ze.push(at()),c==="24db"&&ze.push(at())}if(ue!==void 0){const at=r.createVowelFilter(ue);ze.push(at)}if(B!==void 0&&ze.push(Ku(r,"coarse-processor",{coarse:B})),Q!==void 0&&ze.push(Ku(r,"crush-processor",{crush:Q})),j!==void 0&&ze.push(Ku(r,"shape-processor",{shape:j})),Z!==void 0){const at=r.createStereoPanner();at.pan.value=2*Z-1,ze.push(at)}const St=Mc(1);ze.push(St),St.connect(s_());let mt;if(le>0&&De>0&&Ee>0){const at=M3(xe,De,Ee,i);mt=ju(St,at,le)}let At;if(be>0&&Ie>0){const at=P3(xe,Ie);At=ju(St,at,be)}let It;if(ke){const at=B3(2**(Ze+5));It=ju(St,at,ke)}ze.slice(1).reduce((at,$e)=>at.connect($e),ze[0]),Le=ze.concat([mt,At,It])},Ju={};function U3(n,e){var t=e?1e3:1024;if(n=t);return n.toFixed(1)+" "+r[i]}const F3=async(n,e,t,r,i,s,a)=>{let o=0;i!==void 0&&t!==void 0&&ys("[sampler] hap has note and freq. ignoring note","warning");let l=R3({freq:i,note:t},36);o=l-36;const c=Jt();let u;if(Array.isArray(s))u=s[e%s.length];else{const T=I=>ru(I)-l,R=Object.keys(s).filter(I=>!I.startsWith("_")).reduce((I,L,$)=>!I||Math.abs(T(L)){const i=t?`sound "${t}:${r}"`:"sample";if(!Ju[n]){ys(`[sampler] load ${i}..`,"load-sample",{url:n});const s=Date.now();Ju[n]=fetch(n).then(a=>a.arrayBuffer()).then(async a=>{const o=Date.now()-s,l=U3(a.byteLength);return ys(`[sampler] load ${i}... done! loaded ${l} in ${o}ms`,"loaded-sample",{url:n}),await e.decodeAudioData(a)})}return Ju[n]};function $3(n){const e=Jt(),t=e.createBuffer(n.numberOfChannels,n.length,e.sampleRate);for(let r=0;rObject.entries(n).forEach(([r,i])=>{if(typeof i=="string"&&(i=[i]),typeof i!="object")throw new Error("wrong sample map format for "+r);t=i._base||t;const s=a=>(t+a).replace("github:","https://raw.githubusercontent.com/");Array.isArray(i)?i=i.map(s):i=Object.fromEntries(Object.entries(i).map(([a,o])=>[a,(typeof o=="string"?[o]:o).map(s)])),e(r,i)});let Q3={};function q3(n){const e=Object.entries(Q3).find(([t])=>n.startsWith(t));if(e)return e[1]}const pa=async(n,e=n._base||"",t={})=>{if(typeof n=="string"){const s=q3(n);if(s)return s(n);if(n.startsWith("github:")){let[o,l]=n.split("github:");l=l.endsWith("/")?l.slice(0,-1):l,n=`https://raw.githubusercontent.com/${l}/strudel.json`}if(typeof fetch!="function")return;const a=n.split("/").slice(0,-1).join("/");return typeof fetch>"u"?void 0:fetch(n).then(o=>o.json()).then(o=>pa(o,e||o._base||a,t)).catch(o=>{throw console.error(o),new Error(`error loading "${n}"`)})}const{prebake:r,tag:i}=t;G3(n,(s,a)=>a_(s,(o,l,c)=>V3(o,l,c,a),{type:"sample",samples:a,baseUrl:e,prebake:r,tag:i}),e)},EE=[];async function V3(n,e,t,r,i){let{s,freq:a,unit:o,nudge:l=0,cut:c,loop:u,clip:p=void 0,n:m=0,note:_,speed:T=1,loopBegin:R=0,begin:I=0,loopEnd:L=1,end:$=1}=e;if(T===0)return;u=s.startsWith("wt_")?1:e.loop;const K=Jt(),{attack:f=.001,decay:E=.001,sustain:S=1,release:N=.001}=e,k=n+l,x=await F3(s,m,_,T,a,r,i);if(K.currentTime>n){ys(`[sampler] still loading sound "${s}:${m}"`,"highlight");return}if(!x){ys(`[sampler] could not load "${s}:${m}"`,"error");return}x.playbackRate.value=Math.abs(T)*x.playbackRate.value,o==="c"&&(x.playbackRate.value=x.playbackRate.value*x.buffer.duration*1);const M=I*x.buffer.duration;u&&(x.loop=!0,x.loopStart=R*x.buffer.duration-M,x.loopEnd=L*x.buffer.duration-M),x.start(k,M);const{node:G,stop:te}=Qm(f,E,S,N,1,n);x.connect(G);const ne=K.createGain();G.connect(ne),x.onended=function(){x.disconnect(),G.disconnect(),ne.disconnect(),t()};const re={node:ne,bufferSource:x,stop:(ee,B=p===void 0&&u===void 0)=>{let Q=ee;if(B){const j=x.buffer.duration/x.playbackRate.value;Q=n+($-I)*j}x.stop(Q+N),te(Q)}};if(c!==void 0){const ee=EE[c];ee&&(ee.node.gain.setValueAtTime(1,k),ee.node.gain.linearRampToValueAtTime(0,k+.01)),EE[c]=re}return re}const z3=(n,e=1,t="sine")=>{const r=Jt(),i=r.createOscillator();i.type=t,i.frequency.value=n,i.start();const s=new GainNode(r,{gain:e});return i.connect(s),{node:s,stop:a=>i.stop(a)}},H3=(n,e,t,r="sine")=>{const i=n.frequency.value*e,s=i*t;return z3(i,s,r)};function W3(){["sine","square","triangle","sawtooth"].forEach(n=>{a_(n,(e,t,r)=>{let{attack:i=.001,decay:s=.05,sustain:a=.6,release:o=.01,fmh:l=1,fmi:c,fmenv:u="lin",fmattack:p,fmdecay:m,fmsustain:_,fmrelease:T,fmvelocity:R,fmwave:I="sine",vib:L=0,vibmod:$=.5}=t,{n:K,note:f,freq:E}=t;f=f||36,typeof f=="string"&&(f=ru(f)),!E&&typeof f=="number"&&(E=DR(f));const{node:S,stop:N}=Z3({t:e,s:n,freq:E,vib:L,vibmod:$,partials:K});let k,x;if(c){const{node:ne,stop:re}=H3(S,l,c,I);[p,m,_,T,R].find(ee=>ee!==void 0)?(p=p??.001,m=m??.001,_=_??1,T=T??.001,R=R??1,x=Qm(p,m,_,T,R,e),u==="exp"&&(x=N3(p,m,_,T,R,e),x.node.maxValue=c*2,x.node.minValue=1e-5),ne.connect(x.node),x.node.connect(S.frequency)):ne.connect(S.frequency),k=re}const M=Mc(.3),{node:G,stop:te}=Qm(i,s,a,o,1,e);return S.onended=()=>{S.disconnect(),M.disconnect(),r()},{node:S.connect(M).connect(G),stop:ne=>{te(ne),x==null||x.stop(ne);let re=ne+o;N(re),k==null||k(re)}}},{type:"synth",prebake:!0})})}function X3(n,e){const t=new Float32Array(n+1),r=new Float32Array(n+1),i=Jt(),s=i.createOscillator(),a={sawtooth:c=>1/c,square:c=>c%2===0?0:1/c,triangle:c=>c%2===0?0:1/(c*c)};if(!a[e])throw new Error(`unknown wave type ${e}`);t[0]=0,r[0]=0;let o=1;for(;o<=n;)t[o]=a[e](o),r[o]=0,o++;const l=i.createPeriodicWave(t,r);return s.setPeriodicWave(l),s}function Z3({s:n,freq:e,t,vib:r,vibmod:i,partials:s}){let a;!s||n==="sine"?(a=Jt().createOscillator(),a.type=n||"triangle"):a=X3(s,n),a.frequency.value=Number(e),a.start(t);let o;if(r>0){o=Jt().createOscillator(),o.frequency.value=r;const l=Jt().createGain();l.gain.value=i*100,o.connect(l),l.connect(a.detune),o.start(t)}return{node:a,stop:l=>{o==null||o.stop(l),a.stop(l)}}}function K3(n=1,e=.05,t=220,r=0,i=0,s=.1,a=0,o=1,l=0,c=0,u=0,p=0,m=0,_=0,T=0,R=0,I=0,L=1,$=0,K=0){let f=Math.PI*2,E=Jt().sampleRate,S=Z=>Z>0?1:-1,N=l*=500*f/E/E,k=t*=(1+e*2*Math.random()-e)*f/E,x=[],M=0,G=0,te=0,ne=1,re=0,ee=0,B=0,Q,j;for(r=r*E+9,$*=E,i*=E,s*=E,I*=E,c*=500*f/E**3,T*=f/E,u*=f/E,p*=E,m=m*E|0,j=r+$+i+s+I|0;te1?a>2?a>3?Math.sin((M%f)**3):Math.max(Math.min(Math.tan(M),1),-1):1-(2*M/f%2+2)%2:1-4*Math.abs(Math.round(M/f)-M/f):Math.sin(M),B=(m?1-K+K*Math.sin(f*te/m):1)*S(B)*Math.abs(B)**o*n*1*(tete?0:(tep&&(t+=u,k+=u,ne=0),m&&!(++re%m)&&(t=k,l=N,ne||(ne=1));return x}const j3=(n,e)=>{let{s:t,note:r=36,freq:i,zrand:s=0,attack:a=0,decay:o=0,sustain:l=.8,release:c=.1,curve:u=1,slide:p=0,deltaSlide:m=0,pitchJump:_=0,pitchJumpTime:T=0,lfo:R=0,noise:I=0,zmod:L=0,zcrush:$=0,zdelay:K=0,tremolo:f=0,duration:E=.2,zzfx:S}=n;const N=Math.max(E-a-o,0);typeof r=="string"&&(r=ru(r)),!i&&typeof r=="number"&&(i=DR(r)),t=t.replace("z_","");const k=["sine","triangle","sawtooth","tan","noise"].indexOf(t)||0;u=t==="square"?0:u;const x=K3(...S||[.25,s,i,a,N,c,k,u,p,m,_,T,R,I,L,$,K,l,o,f]),M=Jt(),G=M.createBuffer(1,x.length,M.sampleRate);G.getChannelData(0).set(x);const te=Jt().createBufferSource();return te.buffer=G,te.start(e),{node:te}};function J3(){["zzfx","z_sine","z_sawtooth","z_triangle","z_square","z_tan","z_noise"].forEach(n=>{a_(n,(e,t,r)=>{const{node:i}=j3({s:n,...t},e);return i.onended=()=>{i.disconnect(),r()},{node:i,stop:()=>{}}},{type:"synth",prebake:!0})})}class qm extends wR{constructor(t,r){super(r);v(this,"volume",t=>this.updateValue("volume",t));v(this,"vol",this.volume);v(this,"zrand",t=>this.updateValue("zrand",t));v(this,"curve",t=>this.updateValue("curve",t));v(this,"slide",t=>this.updateValue("slide",t));v(this,"sld",this.slide);v(this,"deltaSlide",t=>this.updateValue("deltaSlide",t));v(this,"dslide",this.deltaSlide);v(this,"pitchJump",t=>this.updateValue("pitchJump",t));v(this,"pj",this.pitchJump);v(this,"pitchJumpTime",t=>this.updateValue("pitchJumpTime",t));v(this,"pjt",this.pitchJumpTime);v(this,"lfo",t=>this.updateValue("lfo",t));v(this,"noise",t=>this.updateValue("noise",t));v(this,"zmod",t=>this.updateValue("zmod",t));v(this,"zcrush",t=>this.updateValue("zcrush",t));v(this,"zdelay",t=>this.updateValue("zdelay",t));v(this,"sustainVolume",t=>this.updateValue("sustainVolume",t));v(this,"tremolo",t=>this.updateValue("tremolo",t));v(this,"dur",t=>this.updateValue("dur",t));v(this,"zzfx",t=>this.updateValue("zzfx",t));v(this,"fmi",t=>this.updateValue("fmi",t));v(this,"fmh",t=>this.updateValue("fmh",t));v(this,"fmenv",t=>this.updateValue("fmenv",t));v(this,"fmattack",t=>this.updateValue("fmattack",t));v(this,"fmatk",this.fmattack);v(this,"fmdecay",t=>this.updateValue("fmdecay",t));v(this,"fmdec",this.fmdecay);v(this,"fmsustain",t=>this.updateValue("fmsustain",t));v(this,"fmsus",this.fmsustain);v(this,"fmrelease",t=>this.updateValue("fmrelease",t));v(this,"fmrel",this.fmrelease);v(this,"fmvelocity",t=>this.updateValue("fmvelocity",t));v(this,"fmvel",this.fmvelocity);v(this,"fmwave",t=>this.updateValue("fmwave",t));v(this,"fmw",this.fmwave);v(this,"ftype",t=>this.updateValue("ftype",t));v(this,"fanchor",t=>this.updateValue("fanchor",t));v(this,"attack",t=>this.updateValue("attack",t));v(this,"atk",this.attack);v(this,"decay",t=>this.updateValue("decay",t));v(this,"dec",this.decay);v(this,"sustain",t=>this.updateValue("sustain",t));v(this,"sus",this.sustain);v(this,"release",t=>this.updateValue("release",t));v(this,"rel",this.release);v(this,"adsr",(t,r,i,s)=>(this.attack(t),this.decay(r),this.sustain(i),this.release(s),this));v(this,"lpenv",t=>this.updateValue("lpenv",t));v(this,"lpe",t=>this.updateValue("lpenv",t));v(this,"lpattack",t=>this.updateValue("lpattack",t));v(this,"lpa",this.lpattack);v(this,"lpdecay",t=>this.updateValue("lpdecay",t));v(this,"lpd",this.lpdecay);v(this,"lpsustain",t=>this.updateValue("lpsustain",t));v(this,"lps",this.lpsustain);v(this,"lprelease",t=>this.updateValue("lprelease",t));v(this,"lpr",this.lprelease);v(this,"cutoff",t=>this.updateValue("cutoff",t));v(this,"lpf",this.cutoff);v(this,"resonance",t=>this.updateValue("resonance",Math.min(Math.max(t,0),50)));v(this,"lpq",this.resonance);v(this,"lpadsr",(t,r,i,s,a)=>(this.lpenv(t),this.lpattack(r),this.lpdecay(i),this.lpsustain(s),this.lprelease(a),this));v(this,"hpenv",t=>this.updateValue("hpenv",t));v(this,"hpe",t=>this.updateValue("hpe",t));v(this,"hpattack",t=>this.updateValue("hpattack",t));v(this,"hpa",this.hpattack);v(this,"hpdecay",t=>this.updateValue("hpdecay",t));v(this,"hpd",this.hpdecay);v(this,"hpsustain",t=>this.updateValue("hpsustain",t));v(this,"hpsus",this.hpsustain);v(this,"hprelease",t=>this.updateValue("hprelease",t));v(this,"hpr",this.hprelease);v(this,"hcutoff",t=>this.updateValue("hcutoff",t));v(this,"hpf",this.hcutoff);v(this,"hresonance",t=>this.updateValue("hresonance",t));v(this,"hpq",this.hresonance);v(this,"hpadsr",(t,r,i,s,a)=>(this.hpenv(t),this.hpattack(r),this.hpdecay(i),this.hpsustain(s),this.hprelease(a),this));v(this,"bpenv",t=>this.updateValue("bpenv",t));v(this,"bpe",t=>this.updateValue("bpe",t));v(this,"bpattack",t=>this.updateValue("bpattack",t));v(this,"bpa",this.bpattack);v(this,"bpdecay",t=>this.updateValue("bpdecay",t));v(this,"bpd",this.bpdecay);v(this,"bpsustain",t=>this.updateValue("bpsustain",t));v(this,"bps",this.bpsustain);v(this,"bprelease",t=>this.updateValue("bprelease",t));v(this,"bpr",this.bprelease);v(this,"bandf",t=>this.updateValue("bandf",t));v(this,"bpf",this.bandf);v(this,"bandq",t=>this.updateValue("bandq",t));v(this,"bpq",this.bandq);v(this,"bpadsr",(t,r,i,s,a)=>(this.bpenv(t),this.bpattack(r),this.bpdecay(i),this.bpsustain(s),this.bprelease(a),this));v(this,"freq",t=>this.updateValue("freq",t));v(this,"f",this.freq);v(this,"vib",t=>this.updateValue("vib",t));v(this,"vibmod",t=>this.updateValue("vibmod",t));v(this,"fm",t=>{if(typeof t=="number")this.values.fmi=t;else{let r=t.split(":");this.values.fmi=parseFloat(r[0]),r.length>1&&(this.values.fmh=parseFloat(r[1]))}return this});v(this,"loop",t=>this.updateValue("loop",t));v(this,"loopBegin",t=>this.updateValue("loopBegin",t));v(this,"loopEnd",t=>this.updateValue("loopEnd",t));v(this,"begin",t=>this.updateValue("begin",t));v(this,"end",t=>this.updateValue("end",t));v(this,"gain",t=>this.updateValue("gain",t));v(this,"dbgain",t=>this.updateValue("gain",Math.min(Math.pow(10,t/20),10)));v(this,"db",this.dbgain);v(this,"velocity",t=>this.updateValue("velocity",t));v(this,"vel",this.velocity);v(this,"pan",t=>this.updateValue("pan",t));v(this,"sound",t=>this.updateValue("s",t));v(this,"chord",(t,...r)=>(typeof t=="string"?t=l3(t).map(s=>({note:s,freq:Zn(s)})):t instanceof Array&&typeof t[0]=="number"?t=t.map(i=>({note:i,freq:Zn(i)})):typeof t=="number"&&r.length>0&&(t=[t,...r].map(i=>({note:i,freq:Zn(i)}))),this.updateValue("chord",t)));v(this,"invert",(t=0)=>{if(this.values.chord){let r=this.values.chord.map(s=>s.note);r=t<0?[...r].reverse():r;for(let s=0;s({note:s,freq:Zn(s)}));return this.updateValue("chord",i)}else return this});v(this,"snd",this.sound);v(this,"nudge",t=>this.updateValue("nudge",t));v(this,"cut",t=>this.updateValue("cut",t));v(this,"clip",t=>this.updateValue("clip",t));v(this,"n",t=>this.updateValue("n",t));v(this,"note",t=>typeof t=="string"?this.updateValue("note",oi(t)):this.updateValue("note",t));v(this,"speed",t=>this.updateValue("speed",t));v(this,"spd",this.speed);v(this,"coarse",t=>this.updateValue("coarse",t));v(this,"crush",t=>this.updateValue("crush",t));v(this,"shape",t=>this.updateValue("shape",t));v(this,"vowel",t=>this.updateValue("vowel",t));v(this,"vow",this.vowel);v(this,"delay",t=>this.updateValue("delay",t));v(this,"del",this.delay);v(this,"delayfeedback",t=>this.updateValue("delayfeedback",t));v(this,"delayfb",this.delayfeedback);v(this,"delaytime",t=>this.updateValue("delaytime",t));v(this,"delayt",this.delaytime);v(this,"orbit",t=>this.updateValue("orbit",t));v(this,"o",this.orbit);v(this,"room",t=>this.updateValue("room",t));v(this,"rm",this.room);v(this,"size",t=>this.updateValue("size",t));v(this,"sz",this.size);v(this,"stretch",t=>(this.updateValue("unit","c"),this.updateValue("speed",2/t),this));v(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this.update(),this)});v(this,"update",()=>{const[t,r]=t_(this.values.key||"C4",this.values.pitch||0,this.values.parsedScale||"MAJOR",this.values.octave||0);this.values.freq=Zn(t)});v(this,"out",()=>{this.values.chord?this.values.chord.forEach(t=>{const r={...this.values};r.freq=t.freq,OE(r,.25,this.values.dur)}):OE(this.values,.25,this.values.dur)});this.app=r,typeof t=="string"?t.includes(":")?this.values={s:t.split(":")[0],n:t.split(":")[1],dur:r.clock.convertPulseToSecond(r.clock.ppqn)}:this.values={s:t,dur:.5}:this.values=t}updateValue(t,r){return this.values[t]=r,this}}class Vm extends wR{constructor(t,r){super(r);v(this,"midiConnection");v(this,"chord",t=>(this.values.chord=t,this));v(this,"note",t=>(this.values.note=t,this));v(this,"sustain",t=>(this.values.sustain=t,this));v(this,"channel",t=>(this.values.channel=t,this));v(this,"port",t=>(this.values.port=this.midiConnection.getMidiOutputIndex(t),this));v(this,"add",t=>(this.values.note+=t,this));v(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this.update(),this)});v(this,"bend",t=>(this.values.bend=t,this));v(this,"random",(t=0,r=127)=>(t=Math.min(Math.max(t,0),127),r=Math.min(Math.max(r,0),127),this.values.note=Math.floor(this.randomGen()*(r-t+1))+t,this));v(this,"update",()=>{const[t,r]=t_(this.values.key||"C4",this.values.pitch||0,this.values.parsedScale||"MAJOR",this.values.octave||0);this.values.note=t,this.values.freq=Zn(t),r&&(this.values.bend=r)});v(this,"out",()=>{function t(r,i){const s=i&&i.channel?i.channel:0,a=r.values.channel?r.values.channel:s,o=r.values.velocity?r.values.velocity:100,l=i&&i.note?i.note:60,c=r.values.note?r.values.note:l,u=r.values.sustain?r.values.sustain*r.app.clock.pulse_duration*r.app.api.ppqn():r.app.clock.pulse_duration*r.app.api.ppqn(),p=r.values.bend?r.values.bend:void 0,m=r.values.port?r.midiConnection.getMidiOutputIndex(r.values.port):r.midiConnection.getCurrentMidiPortIndex();r.midiConnection.sendMidiNote(c,a,o,u,m,p)}this.values.chord?this.values.chord.forEach(r=>{t(this,r)}):t(this)});this.app=r,typeof t=="number"?this.values.note=t:this.values=t,this.midiConnection=r.api.MidiConnection}}const lo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,xR=new Set,zm=typeof process=="object"&&process?process:{},kR=(n,e,t,r)=>{typeof zm.emitWarning=="function"?zm.emitWarning(n,e,t,r):console.error(`[${t}] ${e}: ${n}`)};let Pc=globalThis.AbortController,bE=globalThis.AbortSignal;var dv;if(typeof Pc>"u"){bE=class{constructor(){v(this,"onabort");v(this,"_onabort",[]);v(this,"reason");v(this,"aborted",!1)}addEventListener(r,i){this._onabort.push(i)}},Pc=class{constructor(){v(this,"signal",new bE);e()}abort(r){var i,s;if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(const a of this.signal._onabort)a(r);(s=(i=this.signal).onabort)==null||s.call(i,r)}}};let n=((dv=zm.env)==null?void 0:dv.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,kR("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const eB=n=>!xR.has(n),Pi=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),LR=n=>Pi(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Jl:null:null;class Jl extends Array{constructor(e){super(e),this.fill(0)}}var cs;const ha=class ha{constructor(e,t){v(this,"heap");v(this,"length");if(!V(ha,cs))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}static create(e){const t=LR(e);if(!t)return[];Xe(ha,cs,!0);const r=new ha(e,t);return Xe(ha,cs,!1),r}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};cs=new WeakMap,ot(ha,cs,!1);let Hm=ha;var Nn,jr,wn,Dn,us,nr,xn,ir,Mt,it,Dr,Jr,Tr,dr,kn,pr,gi,_i,Ln,Mn,Gi,xr,Xo,Xm,Ea,Si,Zo,en,$c,MR,ba,ds,Ko,qn,Bi,Vn,Ui,jo,Zm,ps,ec,hs,tc,xt,Ft,Jo,Km,Ta,Oo;const m_=class m_{constructor(e){ot(this,Xo);ot(this,$c);ot(this,qn);ot(this,Vn);ot(this,jo);ot(this,ps);ot(this,hs);ot(this,xt);ot(this,Jo);ot(this,Ta);ot(this,Nn,void 0);ot(this,jr,void 0);ot(this,wn,void 0);ot(this,Dn,void 0);ot(this,us,void 0);v(this,"ttl");v(this,"ttlResolution");v(this,"ttlAutopurge");v(this,"updateAgeOnGet");v(this,"updateAgeOnHas");v(this,"allowStale");v(this,"noDisposeOnSet");v(this,"noUpdateTTL");v(this,"maxEntrySize");v(this,"sizeCalculation");v(this,"noDeleteOnFetchRejection");v(this,"noDeleteOnStaleGet");v(this,"allowStaleOnFetchAbort");v(this,"allowStaleOnFetchRejection");v(this,"ignoreFetchAbort");ot(this,nr,void 0);ot(this,xn,void 0);ot(this,ir,void 0);ot(this,Mt,void 0);ot(this,it,void 0);ot(this,Dr,void 0);ot(this,Jr,void 0);ot(this,Tr,void 0);ot(this,dr,void 0);ot(this,kn,void 0);ot(this,pr,void 0);ot(this,gi,void 0);ot(this,_i,void 0);ot(this,Ln,void 0);ot(this,Mn,void 0);ot(this,Gi,void 0);ot(this,xr,void 0);ot(this,Ea,()=>{});ot(this,Si,()=>{});ot(this,Zo,()=>{});ot(this,en,()=>!1);ot(this,ba,e=>{});ot(this,ds,(e,t,r)=>{});ot(this,Ko,(e,t,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:l,dispose:c,disposeAfter:u,noDisposeOnSet:p,noUpdateTTL:m,maxSize:_=0,maxEntrySize:T=0,sizeCalculation:R,fetchMethod:I,noDeleteOnFetchRejection:L,noDeleteOnStaleGet:$,allowStaleOnFetchRejection:K,allowStaleOnFetchAbort:f,ignoreFetchAbort:E}=e;if(t!==0&&!Pi(t))throw new TypeError("max option must be a nonnegative integer");const S=t?LR(t):Array;if(!S)throw new Error("invalid max value: "+t);if(Xe(this,Nn,t),Xe(this,jr,_),this.maxEntrySize=T||V(this,jr),this.sizeCalculation=R,this.sizeCalculation){if(!V(this,jr)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(I!==void 0&&typeof I!="function")throw new TypeError("fetchMethod must be a function if specified");if(Xe(this,us,I),Xe(this,Gi,!!I),Xe(this,ir,new Map),Xe(this,Mt,new Array(t).fill(void 0)),Xe(this,it,new Array(t).fill(void 0)),Xe(this,Dr,new S(t)),Xe(this,Jr,new S(t)),Xe(this,Tr,0),Xe(this,dr,0),Xe(this,kn,Hm.create(t)),Xe(this,nr,0),Xe(this,xn,0),typeof c=="function"&&Xe(this,wn,c),typeof u=="function"?(Xe(this,Dn,u),Xe(this,pr,[])):(Xe(this,Dn,void 0),Xe(this,pr,void 0)),Xe(this,Mn,!!V(this,wn)),Xe(this,xr,!!V(this,Dn)),this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!L,this.allowStaleOnFetchRejection=!!K,this.allowStaleOnFetchAbort=!!f,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(V(this,jr)!==0&&!Pi(V(this,jr)))throw new TypeError("maxSize must be a positive integer if specified");if(!Pi(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Ve(this,$c,MR).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!$,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=Pi(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||0,this.ttl){if(!Pi(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Ve(this,Xo,Xm).call(this)}if(V(this,Nn)===0&&this.ttl===0&&V(this,jr)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!V(this,Nn)&&!V(this,jr)){const N="LRU_CACHE_UNBOUNDED";eB(N)&&(xR.add(N),kR("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",N,m_))}}static unsafeExposeInternals(e){return{starts:V(e,_i),ttls:V(e,Ln),sizes:V(e,gi),keyMap:V(e,ir),keyList:V(e,Mt),valList:V(e,it),next:V(e,Dr),prev:V(e,Jr),get head(){return V(e,Tr)},get tail(){return V(e,dr)},free:V(e,kn),isBackgroundFetch:t=>{var r;return Ve(r=e,xt,Ft).call(r,t)},backgroundFetch:(t,r,i,s)=>{var a;return Ve(a=e,hs,tc).call(a,t,r,i,s)},moveToTail:t=>{var r;return Ve(r=e,Ta,Oo).call(r,t)},indexes:t=>{var r;return Ve(r=e,qn,Bi).call(r,t)},rindexes:t=>{var r;return Ve(r=e,Vn,Ui).call(r,t)},isStale:t=>{var r;return V(r=e,en).call(r,t)}}}get max(){return V(this,Nn)}get maxSize(){return V(this,jr)}get calculatedSize(){return V(this,xn)}get size(){return V(this,nr)}get fetchMethod(){return V(this,us)}get dispose(){return V(this,wn)}get disposeAfter(){return V(this,Dn)}getRemainingTTL(e){return V(this,ir).has(e)?1/0:0}*entries(){for(const e of Ve(this,qn,Bi).call(this))V(this,it)[e]!==void 0&&V(this,Mt)[e]!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield[V(this,Mt)[e],V(this,it)[e]])}*rentries(){for(const e of Ve(this,Vn,Ui).call(this))V(this,it)[e]!==void 0&&V(this,Mt)[e]!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield[V(this,Mt)[e],V(this,it)[e]])}*keys(){for(const e of Ve(this,qn,Bi).call(this)){const t=V(this,Mt)[e];t!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield t)}}*rkeys(){for(const e of Ve(this,Vn,Ui).call(this)){const t=V(this,Mt)[e];t!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield t)}}*values(){for(const e of Ve(this,qn,Bi).call(this))V(this,it)[e]!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield V(this,it)[e])}*rvalues(){for(const e of Ve(this,Vn,Ui).call(this))V(this,it)[e]!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield V(this,it)[e])}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const r of Ve(this,qn,Bi).call(this)){const i=V(this,it)[r],s=Ve(this,xt,Ft).call(this,i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,V(this,Mt)[r],this))return this.get(V(this,Mt)[r],t)}}forEach(e,t=this){for(const r of Ve(this,qn,Bi).call(this)){const i=V(this,it)[r],s=Ve(this,xt,Ft).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,V(this,Mt)[r],this)}}rforEach(e,t=this){for(const r of Ve(this,Vn,Ui).call(this)){const i=V(this,it)[r],s=Ve(this,xt,Ft).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,V(this,Mt)[r],this)}}purgeStale(){let e=!1;for(const t of Ve(this,Vn,Ui).call(this,{allowStale:!0}))V(this,en).call(this,t)&&(this.delete(V(this,Mt)[t]),e=!0);return e}dump(){const e=[];for(const t of Ve(this,qn,Bi).call(this,{allowStale:!0})){const r=V(this,Mt)[t],i=V(this,it)[t],s=Ve(this,xt,Ft).call(this,i)?i.__staleWhileFetching:i;if(s===void 0||r===void 0)continue;const a={value:s};if(V(this,Ln)&&V(this,_i)){a.ttl=V(this,Ln)[t];const o=lo.now()-V(this,_i)[t];a.start=Math.floor(Date.now()-o)}V(this,gi)&&(a.size=V(this,gi)[t]),e.unshift([r,a])}return e}load(e){this.clear();for(const[t,r]of e){if(r.start){const i=Date.now()-r.start;r.start=lo.now()-i}this.set(t,r.value,r)}}set(e,t,r={}){var m,_,T,R,I;if(t===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:s,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=r;let{noUpdateTTL:c=this.noUpdateTTL}=r;const u=V(this,Ko).call(this,e,t,r.size||0,o);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let p=V(this,nr)===0?void 0:V(this,ir).get(e);if(p===void 0)p=V(this,nr)===0?V(this,dr):V(this,kn).length!==0?V(this,kn).pop():V(this,nr)===V(this,Nn)?Ve(this,ps,ec).call(this,!1):V(this,nr),V(this,Mt)[p]=e,V(this,it)[p]=t,V(this,ir).set(e,p),V(this,Dr)[V(this,dr)]=p,V(this,Jr)[p]=V(this,dr),Xe(this,dr,p),fl(this,nr)._++,V(this,ds).call(this,p,u,l),l&&(l.set="add"),c=!1;else{Ve(this,Ta,Oo).call(this,p);const L=V(this,it)[p];if(t!==L){if(V(this,Gi)&&Ve(this,xt,Ft).call(this,L)){L.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:$}=L;$!==void 0&&!a&&(V(this,Mn)&&((m=V(this,wn))==null||m.call(this,$,e,"set")),V(this,xr)&&((_=V(this,pr))==null||_.push([$,e,"set"])))}else a||(V(this,Mn)&&((T=V(this,wn))==null||T.call(this,L,e,"set")),V(this,xr)&&((R=V(this,pr))==null||R.push([L,e,"set"])));if(V(this,ba).call(this,p),V(this,ds).call(this,p,u,l),V(this,it)[p]=t,l){l.set="replace";const $=L&&Ve(this,xt,Ft).call(this,L)?L.__staleWhileFetching:L;$!==void 0&&(l.oldValue=$)}}else l&&(l.set="update")}if(i!==0&&!V(this,Ln)&&Ve(this,Xo,Xm).call(this),V(this,Ln)&&(c||V(this,Zo).call(this,p,i,s),l&&V(this,Si).call(this,l,p)),!a&&V(this,xr)&&V(this,pr)){const L=V(this,pr);let $;for(;$=L==null?void 0:L.shift();)(I=V(this,Dn))==null||I.call(this,...$)}return this}pop(){var e;try{for(;V(this,nr);){const t=V(this,it)[V(this,Tr)];if(Ve(this,ps,ec).call(this,!0),Ve(this,xt,Ft).call(this,t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(V(this,xr)&&V(this,pr)){const t=V(this,pr);let r;for(;r=t==null?void 0:t.shift();)(e=V(this,Dn))==null||e.call(this,...r)}}}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=t,s=V(this,ir).get(e);if(s!==void 0){const a=V(this,it)[s];if(Ve(this,xt,Ft).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(V(this,en).call(this,s))i&&(i.has="stale",V(this,Si).call(this,i,s));else return r&&V(this,Ea).call(this,s),i&&(i.has="hit",V(this,Si).call(this,i,s)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,i=V(this,ir).get(e);if(i!==void 0&&(r||!V(this,en).call(this,i))){const s=V(this,it)[i];return Ve(this,xt,Ft).call(this,s)?s.__staleWhileFetching:s}}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:T=this.allowStaleOnFetchAbort,context:R,forceRefresh:I=!1,status:L,signal:$}=t;if(!V(this,Gi))return L&&(L.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:L});const K={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:T,ignoreFetchAbort:_,status:L,signal:$};let f=V(this,ir).get(e);if(f===void 0){L&&(L.fetch="miss");const E=Ve(this,hs,tc).call(this,e,f,K,R);return E.__returned=E}else{const E=V(this,it)[f];if(Ve(this,xt,Ft).call(this,E)){const M=r&&E.__staleWhileFetching!==void 0;return L&&(L.fetch="inflight",M&&(L.returnedStale=!0)),M?E.__staleWhileFetching:E.__returned=E}const S=V(this,en).call(this,f);if(!I&&!S)return L&&(L.fetch="hit"),Ve(this,Ta,Oo).call(this,f),i&&V(this,Ea).call(this,f),L&&V(this,Si).call(this,L,f),E;const N=Ve(this,hs,tc).call(this,e,f,K,R),x=N.__staleWhileFetching!==void 0&&r;return L&&(L.fetch=S?"stale":"refresh",x&&S&&(L.returnedStale=!0)),x?N.__staleWhileFetching:N.__returned=N}}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=t,o=V(this,ir).get(e);if(o!==void 0){const l=V(this,it)[o],c=Ve(this,xt,Ft).call(this,l);return a&&V(this,Si).call(this,a,o),V(this,en).call(this,o)?(a&&(a.get="stale"),c?(a&&r&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),r?l.__staleWhileFetching:void 0):(s||this.delete(e),a&&r&&(a.returnedStale=!0),r?l:void 0)):(a&&(a.get="hit"),c?l.__staleWhileFetching:(Ve(this,Ta,Oo).call(this,o),i&&V(this,Ea).call(this,o),l))}else a&&(a.get="miss")}delete(e){var r,i,s,a;let t=!1;if(V(this,nr)!==0){const o=V(this,ir).get(e);if(o!==void 0)if(t=!0,V(this,nr)===1)this.clear();else{V(this,ba).call(this,o);const l=V(this,it)[o];Ve(this,xt,Ft).call(this,l)?l.__abortController.abort(new Error("deleted")):(V(this,Mn)||V(this,xr))&&(V(this,Mn)&&((r=V(this,wn))==null||r.call(this,l,e,"delete")),V(this,xr)&&((i=V(this,pr))==null||i.push([l,e,"delete"]))),V(this,ir).delete(e),V(this,Mt)[o]=void 0,V(this,it)[o]=void 0,o===V(this,dr)?Xe(this,dr,V(this,Jr)[o]):o===V(this,Tr)?Xe(this,Tr,V(this,Dr)[o]):(V(this,Dr)[V(this,Jr)[o]]=V(this,Dr)[o],V(this,Jr)[V(this,Dr)[o]]=V(this,Jr)[o]),fl(this,nr)._--,V(this,kn).push(o)}}if(V(this,xr)&&((s=V(this,pr))!=null&&s.length)){const o=V(this,pr);let l;for(;l=o==null?void 0:o.shift();)(a=V(this,Dn))==null||a.call(this,...l)}return t}clear(){var e,t,r;for(const i of Ve(this,Vn,Ui).call(this,{allowStale:!0})){const s=V(this,it)[i];if(Ve(this,xt,Ft).call(this,s))s.__abortController.abort(new Error("deleted"));else{const a=V(this,Mt)[i];V(this,Mn)&&((e=V(this,wn))==null||e.call(this,s,a,"delete")),V(this,xr)&&((t=V(this,pr))==null||t.push([s,a,"delete"]))}}if(V(this,ir).clear(),V(this,it).fill(void 0),V(this,Mt).fill(void 0),V(this,Ln)&&V(this,_i)&&(V(this,Ln).fill(0),V(this,_i).fill(0)),V(this,gi)&&V(this,gi).fill(0),Xe(this,Tr,0),Xe(this,dr,0),V(this,kn).length=0,Xe(this,xn,0),Xe(this,nr,0),V(this,xr)&&V(this,pr)){const i=V(this,pr);let s;for(;s=i==null?void 0:i.shift();)(r=V(this,Dn))==null||r.call(this,...s)}}};Nn=new WeakMap,jr=new WeakMap,wn=new WeakMap,Dn=new WeakMap,us=new WeakMap,nr=new WeakMap,xn=new WeakMap,ir=new WeakMap,Mt=new WeakMap,it=new WeakMap,Dr=new WeakMap,Jr=new WeakMap,Tr=new WeakMap,dr=new WeakMap,kn=new WeakMap,pr=new WeakMap,gi=new WeakMap,_i=new WeakMap,Ln=new WeakMap,Mn=new WeakMap,Gi=new WeakMap,xr=new WeakMap,Xo=new WeakSet,Xm=function(){const e=new Jl(V(this,Nn)),t=new Jl(V(this,Nn));Xe(this,Ln,e),Xe(this,_i,t),Xe(this,Zo,(s,a,o=lo.now())=>{if(t[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){const l=setTimeout(()=>{V(this,en).call(this,s)&&this.delete(V(this,Mt)[s])},a+1);l.unref&&l.unref()}}),Xe(this,Ea,s=>{t[s]=e[s]!==0?lo.now():0}),Xe(this,Si,(s,a)=>{if(e[a]){const o=e[a],l=t[a];s.ttl=o,s.start=l,s.now=r||i();const c=s.now-l;s.remainingTTL=o-c}});let r=0;const i=()=>{const s=lo.now();if(this.ttlResolution>0){r=s;const a=setTimeout(()=>r=0,this.ttlResolution);a.unref&&a.unref()}return s};this.getRemainingTTL=s=>{const a=V(this,ir).get(s);if(a===void 0)return 0;const o=e[a],l=t[a];if(o===0||l===0)return 1/0;const c=(r||i())-l;return o-c},Xe(this,en,s=>e[s]!==0&&t[s]!==0&&(r||i())-t[s]>e[s])},Ea=new WeakMap,Si=new WeakMap,Zo=new WeakMap,en=new WeakMap,$c=new WeakSet,MR=function(){const e=new Jl(V(this,Nn));Xe(this,xn,0),Xe(this,gi,e),Xe(this,ba,t=>{Xe(this,xn,V(this,xn)-e[t]),e[t]=0}),Xe(this,Ko,(t,r,i,s)=>{if(Ve(this,xt,Ft).call(this,r))return 0;if(!Pi(i))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(r,t),!Pi(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),Xe(this,ds,(t,r,i)=>{if(e[t]=r,V(this,jr)){const s=V(this,jr)-e[t];for(;V(this,xn)>s;)Ve(this,ps,ec).call(this,!0)}Xe(this,xn,V(this,xn)+e[t]),i&&(i.entrySize=r,i.totalCalculatedSize=V(this,xn))})},ba=new WeakMap,ds=new WeakMap,Ko=new WeakMap,qn=new WeakSet,Bi=function*({allowStale:e=this.allowStale}={}){if(V(this,nr))for(let t=V(this,dr);!(!Ve(this,jo,Zm).call(this,t)||((e||!V(this,en).call(this,t))&&(yield t),t===V(this,Tr)));)t=V(this,Jr)[t]},Vn=new WeakSet,Ui=function*({allowStale:e=this.allowStale}={}){if(V(this,nr))for(let t=V(this,Tr);!(!Ve(this,jo,Zm).call(this,t)||((e||!V(this,en).call(this,t))&&(yield t),t===V(this,dr)));)t=V(this,Dr)[t]},jo=new WeakSet,Zm=function(e){return e!==void 0&&V(this,ir).get(V(this,Mt)[e])===e},ps=new WeakSet,ec=function(e){var s,a;const t=V(this,Tr),r=V(this,Mt)[t],i=V(this,it)[t];return V(this,Gi)&&Ve(this,xt,Ft).call(this,i)?i.__abortController.abort(new Error("evicted")):(V(this,Mn)||V(this,xr))&&(V(this,Mn)&&((s=V(this,wn))==null||s.call(this,i,r,"evict")),V(this,xr)&&((a=V(this,pr))==null||a.push([i,r,"evict"]))),V(this,ba).call(this,t),e&&(V(this,Mt)[t]=void 0,V(this,it)[t]=void 0,V(this,kn).push(t)),V(this,nr)===1?(Xe(this,Tr,Xe(this,dr,0)),V(this,kn).length=0):Xe(this,Tr,V(this,Dr)[t]),V(this,ir).delete(r),fl(this,nr)._--,t},hs=new WeakSet,tc=function(e,t,r,i){const s=t===void 0?void 0:V(this,it)[t];if(Ve(this,xt,Ft).call(this,s))return s;const a=new Pc,{signal:o}=r;o==null||o.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});const l={signal:a.signal,options:r,context:i},c=(R,I=!1)=>{const{aborted:L}=a.signal,$=r.ignoreFetchAbort&&R!==void 0;if(r.status&&(L&&!I?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,$&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),L&&!$&&!I)return p(a.signal.reason);const K=_;return V(this,it)[t]===_&&(R===void 0?K.__staleWhileFetching?V(this,it)[t]=K.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,R,l.options))),R},u=R=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=R),p(R)),p=R=>{const{aborted:I}=a.signal,L=I&&r.allowStaleOnFetchAbort,$=L||r.allowStaleOnFetchRejection,K=$||r.noDeleteOnFetchRejection,f=_;if(V(this,it)[t]===_&&(!K||f.__staleWhileFetching===void 0?this.delete(e):L||(V(this,it)[t]=f.__staleWhileFetching)),$)return r.status&&f.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),f.__staleWhileFetching;if(f.__returned===f)throw R},m=(R,I)=>{var $;const L=($=V(this,us))==null?void 0:$.call(this,e,s,l);L&&L instanceof Promise&&L.then(K=>R(K===void 0?void 0:K),I),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(R(void 0),r.allowStaleOnFetchAbort&&(R=K=>c(K,!0)))})};r.status&&(r.status.fetchDispatched=!0);const _=new Promise(m).then(c,u),T=Object.assign(_,{__abortController:a,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.set(e,T,{...l.options,status:void 0}),t=V(this,ir).get(e)):V(this,it)[t]=T,T},xt=new WeakSet,Ft=function(e){if(!V(this,Gi))return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Pc},Jo=new WeakSet,Km=function(e,t){V(this,Jr)[t]=e,V(this,Dr)[e]=t},Ta=new WeakSet,Oo=function(e){e!==V(this,dr)&&(e===V(this,Tr)?Xe(this,Tr,V(this,Dr)[e]):Ve(this,Jo,Km).call(this,V(this,Jr)[e],V(this,Dr)[e]),Ve(this,Jo,Km).call(this,V(this,dr),e),Xe(this,dr,e))};let Wm=m_;const Ro=class Ro{constructor(){v(this,"_fallbackMethod",()=>Ro.createSkipProxy());v(this,"out",()=>{})}};v(Ro,"createSkipProxy",()=>{const e=new Ro;return new Proxy(e,{get(t,r,i){return typeof t[r]>"u"?t._fallbackMethod:t[r]},set(t,r,i,s){return!1}})});let Bc=Ro;const Io=class Io extends n_{constructor(t,r){super(r);v(this,"_fallbackMethod",()=>Io.createRestProxy(this.values.length,this.app));v(this,"out",()=>{});this.values.length=t}};v(Io,"createRestProxy",(t,r)=>{const i=new Io(t,r);return new Proxy(i,{get(s,a,o){return typeof s[a]>"u"?s._fallbackMethod:s[a]},set(s,a,o,l){return!1}})});let Uc=Io;class tB extends n_{constructor(t,r,i){super(i);v(this,"input");v(this,"ziffers");v(this,"initCallTime",0);v(this,"startCallTime",0);v(this,"lastCallTime",0);v(this,"waitTime",0);v(this,"startBeat",0);v(this,"played",!1);v(this,"current");v(this,"retro",!1);v(this,"index",-1);v(this,"zid","");v(this,"options",{});v(this,"skipIndex",0);v(this,"endTime",0);v(this,"next",()=>(this.current=this.ziffers.next(),this.played=!0,this.current));v(this,"pulseToSecond",t=>this.app.clock.convertPulseToSecond(t));v(this,"firstRun",()=>this.notStarted());v(this,"atTheBeginning",()=>this.skipIndex===0&&this.ziffers.index<=0);v(this,"origin",()=>this.app.clock.pulses_since_origin+1);v(this,"pulse",()=>this.app.clock.time_position.pulse);v(this,"beat",()=>this.app.clock.time_position.beat);v(this,"nextBeat",()=>this.app.clock.next_beat_in_ticks);v(this,"nextBeatInTicks",()=>this.app.clock.next_beat_in_ticks);v(this,"areWeThereYet",()=>{this.app.clock.pulses_since_origin=this.nextBeatInTicks())&&this.origin()>=this.waitTime,r=this.current&&this.pulseToSecond(this.origin())>=this.pulseToSecond(this.lastCallTime)+this.pulseToSecond(this.current.duration*4*this.app.clock.ppqn)&&this.origin()>=this.waitTime,i=t||r;return this.skipIndex=i?0:this.skipIndex+1,this.index=i?this.index+1:this.index,i&&this.notStarted()&&(this.initCallTime=this.app.clock.pulses_since_origin),this.atTheBeginning()&&(this.startCallTime=this.app.clock.pulses_since_origin),i});v(this,"lead",()=>this.voiceleading());v(this,"invert",t=>(this.atTheBeginning()&&this.ziffers.invert(t),this));v(this,"out",()=>{});this.app=i,this.input=t,this.options=r,this.ziffers=new _3(t,r)}get ticks(){return this.ziffers.duration*4*this.app.clock.ppqn}nextEndTime(){return this.startCallTime+this.ticks}updateLastCallTime(){(this.notStarted()||this.played)&&(this.lastCallTime=this.app.clock.pulses_since_origin,this.played=!1)}notStarted(){return this.ziffers.notStarted()}sound(t){if(this.areWeThereYet()){const r=this.next(),i=this.app.clock.convertPulseToSecond(r.duration*4*this.app.clock.ppqn);if(r instanceof ti){const s=r.getExisting("freq","pitch","key","scale","octave","parsedScale");return r.sound&&(t=r.sound),r.soundIndex&&(s.n=r.soundIndex),s.dur=i,new qm(s,this.app).sound(t||"sine")}else if(r instanceof Na){const s=r.pitches.map(o=>o.getExisting("freq","pitch","key","scale","octave","parsedScale")),a={dur:i};return t&&(a.s=t),new qm(a,this.app).chord(s)}else if(r instanceof Ym)return Uc.createRestProxy(r.duration,this.app)}else return Bc.createSkipProxy()}midi(t=void 0){if(this.areWeThereYet()){const r=this.next(),i=r.getExisting("note","pitch","bend","key","scale","octave","parsedScale");if(r instanceof ti){r.soundIndex&&(i.channel=r.soundIndex);const s=new Vm(i,this.app);return t?s.note(t):s}else{if(r instanceof Ym)return Uc.createRestProxy(r.duration,this.app);if(r instanceof Na){const s=r.midiChord();return new Vm(i,this.app).chord(s)}}}else return Bc.createSkipProxy()}scale(t){return this.atTheBeginning()&&this.ziffers.scale(t),this}key(t){return this.atTheBeginning()&&this.ziffers.key(t),this}octave(t){return this.atTheBeginning()&&this.ziffers.octave(t),this}voiceleading(){return this.atTheBeginning()&&this.ziffers.lead(),this}retrograde(){return this.atTheBeginning()&&this.ziffers.retrograde(),this}wait(t){if(this.atTheBeginning()){if(typeof t=="function"){const r=this.app.api.patternCache.get(t.name);return r&&(this.waitTime=r.nextEndTime()),this}this.waitTime=this.origin()+Math.ceil(t*4*this.app.clock.ppqn)}return this}sync(t){if(this.atTheBeginning()&&this.notStarted()){const r=this.app.clock.pulses_since_origin,i=typeof t=="function"?t.name:t;if(r>0){const s=this.app.api.patternCache.get(i);if(s){const a=s.ziffers.duration,o=s.startCallTime,l=a*4*this.app.clock.ppqn;this.waitTime=o+l}}}return this}}const rB=n=>n[0]==="{"&&n[n.length-1]==="}",co=(n,e)=>{if(rB(n)){const t=JSON.parse(n);return JSON.stringify({...t,...e})}else return JSON.stringify({...e,text:n})},nB=n=>{String.prototype.speak=function(){const e=JSON.parse(this.valueOf());new PR({...e,text:e.text}).speak().then(()=>{}).catch(t=>{console.log("Error speaking:",t)})},String.prototype.rate=function(e){return co(this.valueOf(),{rate:e})},String.prototype.pitch=function(e){return co(this.valueOf(),{pitch:e})},String.prototype.lang=function(e){return co(this.valueOf(),{lang:e})},String.prototype.volume=function(e){return co(this.valueOf(),{volume:e})},String.prototype.voice=function(e){return co(this.valueOf(),{voice:e})},String.prototype.z=function(e={}){return n.z(this.valueOf(),e)},String.prototype.z0=function(e={}){return n.z0(this.valueOf(),e)},String.prototype.z1=function(e={}){return n.z1(this.valueOf(),e)},String.prototype.z2=function(e={}){return n.z2(this.valueOf(),e)},String.prototype.z3=function(e={}){return n.z3(this.valueOf(),e)},String.prototype.z4=function(e={}){return n.z4(this.valueOf(),e)},String.prototype.z5=function(e={}){return n.z5(this.valueOf(),e)},String.prototype.z6=function(e={}){return n.z6(this.valueOf(),e)},String.prototype.z7=function(e={}){return n.z7(this.valueOf(),e)},String.prototype.z8=function(e={}){return n.z8(this.valueOf(),e)},String.prototype.z9=function(e={}){return n.z9(this.valueOf(),e)},String.prototype.z10=function(e={}){return n.z10(this.valueOf(),e)},String.prototype.z11=function(e={}){return n.z11(this.valueOf(),e)},String.prototype.z12=function(e={}){return n.z12(this.valueOf(),e)},String.prototype.z13=function(e={}){return n.z13(this.valueOf(),e)},String.prototype.z14=function(e={}){return n.z14(this.valueOf(),e)},String.prototype.z15=function(e={}){return n.z15(this.valueOf(),e)},String.prototype.z16=function(e={}){return n.z16(this.valueOf(),e)},String.prototype.note=function(){try{return parseInt(this.valueOf())}catch{return oi(this.valueOf())}}};let ed;class PR{constructor(e){v(this,"speak",()=>new Promise((e,t)=>{if(this.options.text){const r=window.speechSynthesis;r.speaking&&r.cancel();const i=new SpeechSynthesisUtterance(this.options.text);i.rate=this.options.rate||1,i.pitch=this.options.pitch||1,i.volume=this.options.volume||1,this.options.voice&&(i.voice=r.getVoices()[this.options.voice]),this.options.lang&&(this.options.lang.length===2?i.lang=`${this.options.lang}-${this.options.lang.toUpperCase()}`:this.options.lang.length===5?i.lang=this.options.lang:i.lang="en-US"),i.onend=()=>{e()},i.onerror=s=>{t(s)},r.speaking?(r.cancel(),ed&&clearTimeout(ed),ed=setTimeout(()=>{r.speak(i)},200)):r.speak(i)}else t("No text provided")}));this.options=e}}async function TE(){return Promise.all([L3(),pa("github:tidalcycles/Dirt-Samples/master").then(()=>W3()),J3(),pa("github:Bubobubobubobubo/Dough-Samples/main"),pa("github:Bubobubobubobubo/Dough-Amiga/main"),pa("github:Bubobubobubobubo/Dough-Amen/main"),pa("github:Bubobubobubobubo/Dough-Waveforms/main")])}class iB{constructor(e){v(this,"variables",{});v(this,"codeExamples",{});v(this,"counters",{});v(this,"_drunk",new E3(-100,100,!1));v(this,"randomGen",Math.random);v(this,"currentSeed");v(this,"localSeeds",new Map);v(this,"patternCache",new Wm({max:1e3,ttl:1e3*60*5}));v(this,"errorTimeoutID",0);v(this,"printTimeoutID",0);v(this,"MidiConnection",new O3);v(this,"load");v(this,"_loadUniverseFromInterface",e=>{this.app.loadUniverse(e),this.app.openBuffersModal()});v(this,"_deleteUniverseFromInterface",e=>{delete this.app.universes[e],this.app.settings.saveApplicationToLocalStorage(this.app.universes,this.app.settings),this.app.updateKnownUniversesView()});v(this,"_playDocExample",e=>{let t=this.app.universes[this.app.selected_universe];this.app.exampleIsPlaying=!0,t.example?t.example.candidate=e||this.app.selectedExample:(t.example={candidate:"",committed:"",evaluations:0},t.example.candidate=e||this.app.selectedExample),this.play()});v(this,"_stopDocExample",()=>{let e=this.app.universes[this.app.selected_universe];(e==null?void 0:e.example)!==void 0&&(this.app.exampleIsPlaying=!1,e.example.candidate="",e.example.committed=""),this.pause()});v(this,"_playDocExampleOnce",e=>{let t=this.app.universes[this.app.selected_universe];(t==null?void 0:t.example)!==void 0&&(t.example.candidate="",t.example.committed=""),this.play(),this.app.exampleIsPlaying=!0,AP(this.app,e)});v(this,"_all_samples",()=>i_.get());v(this,"_reportError",e=>{console.log(e),clearTimeout(this.errorTimeoutID),clearTimeout(this.printTimeoutID),this.app.error_line.innerHTML=e,this.app.error_line.style.color="color-red-800",this.app.error_line.classList.remove("hidden"),this.errorTimeoutID=setTimeout(()=>this.app.error_line.classList.add("hidden"),2e3)});v(this,"_logMessage",e=>{console.log(e),clearTimeout(this.printTimeoutID),clearTimeout(this.errorTimeoutID),this.app.error_line.innerHTML=e,this.app.error_line.style.color="white",this.app.error_line.classList.remove("hidden"),this.printTimeoutID=setTimeout(()=>this.app.error_line.classList.add("hidden"),4e3)});v(this,"time",()=>this.app.audioContext.currentTime);v(this,"play",()=>{this.app.setButtonHighlighting("play",!0),this.app.clock.start()});v(this,"pause",()=>{this.app.setButtonHighlighting("pause",!0),this.app.clock.pause()});v(this,"stop",()=>{this.app.setButtonHighlighting("stop",!0),this.app.clock.stop()});v(this,"silence",this.stop);v(this,"hush",this.stop);v(this,"warp",e=>{this.app.clock.tick=e,this.app.clock.time_position=this.app.clock.convertTicksToTimeposition(e)});v(this,"beat_warp",e=>{this.app.clock.tick=e*this.app.clock.ppqn,this.app.clock.time_position=this.app.clock.convertTicksToTimeposition(e*this.app.clock.ppqn)});v(this,"onmousemove",e=>{this.app._mouseX=e.pageX,this.app._mouseY=e.pageY});v(this,"mouseX",()=>this.app._mouseX);v(this,"mouseY",()=>this.app._mouseY);v(this,"noteX",()=>Math.floor(this.app._mouseX/document.body.clientWidth*127));v(this,"noteY",()=>Math.floor(this.app._mouseY/document.body.clientHeight*127));v(this,"script",(...e)=>{e.forEach(t=>{ls(this.app,this.app.universes[this.app.selected_universe].locals[t])})});v(this,"s",this.script);v(this,"clear_script",e=>{this.app.universes[this.app.selected_universe].locals[e]={candidate:"",committed:"",evaluations:0}});v(this,"cs",this.clear_script);v(this,"copy_script",(e,t)=>{this.app.universes[this.app.selected_universe].locals[t]=this.app.universes[this.app.selected_universe].locals[e]});v(this,"cps",this.copy_script);v(this,"midi_outputs",()=>{this._logMessage(this.MidiConnection.listMidiOutputs())});v(this,"midi_output",e=>{e?this.MidiConnection.switchMidiOutput(e):console.log(this.MidiConnection.getCurrentMidiPort())});v(this,"midi",(e=60,t,r)=>(t!==void 0&&(typeof e=="number"&&(e={note:e}),e.velocity=t),r!==void 0&&(typeof e=="number"&&(e={note:e}),e.channel=r),new Vm(e,this.app)));v(this,"sysex",e=>{this.MidiConnection.sendSysExMessage(e)});v(this,"pitch_bend",(e,t)=>{this.MidiConnection.sendPitchBend(e,t)});v(this,"program_change",(e,t)=>{this.MidiConnection.sendProgramChange(e,t)});v(this,"midi_clock",()=>{this.MidiConnection.sendMidiClock()});v(this,"control_change",({control:e=20,value:t=0,channel:r=0})=>{this.MidiConnection.sendMidiControlChange(e,t,r)});v(this,"midi_panic",()=>{this.MidiConnection.panic()});v(this,"generateCacheKey",(...e)=>e.map(t=>JSON.stringify(t)).join(","));v(this,"z",(e,t={},r="")=>{const i="z"+r.toString(),s=r===""?this.generateCacheKey(e,t):i;let a;return this.app.api.patternCache.has(s)&&(a=this.app.api.patternCache.get(s),a.input!==e&&(a=void 0)),a||(a=new tB(e,t,this.app),this.app.api.patternCache.set(s,a)),typeof r=="number"&&(a.zid=i),a.updateLastCallTime(),r!==""&&a.sync("z0"),a});v(this,"z0",(e,t={})=>this.z(e,t,0));v(this,"z1",(e,t={})=>this.z(e,t,1));v(this,"z2",(e,t={})=>this.z(e,t,2));v(this,"z3",(e,t={})=>this.z(e,t,3));v(this,"z4",(e,t={})=>this.z(e,t,4));v(this,"z5",(e,t={})=>this.z(e,t,5));v(this,"z6",(e,t={})=>this.z(e,t,6));v(this,"z7",(e,t={})=>this.z(e,t,7));v(this,"z8",(e,t={})=>this.z(e,t,8));v(this,"z9",(e,t={})=>this.z(e,t,9));v(this,"z10",(e,t={})=>this.z(e,t,10));v(this,"z11",(e,t={})=>this.z(e,t,11));v(this,"z12",(e,t={})=>this.z(e,t,12));v(this,"z13",(e,t={})=>this.z(e,t,13));v(this,"z14",(e,t={})=>this.z(e,t,14));v(this,"z15",(e,t={})=>this.z(e,t,15));v(this,"z16",(e,t={})=>this.z(e,t,16));v(this,"counter",(e,t,r)=>(e in this.counters?(this.counters[e].limit!==t&&(this.counters[e].value=0,this.counters[e].limit=t),this.counters[e].step!==r&&(this.counters[e].step=r??this.counters[e].step),this.counters[e].value+=this.counters[e].step,this.counters[e].limit!==void 0&&this.counters[e].value>this.counters[e].limit&&(this.counters[e].value=0)):this.counters[e]={value:0,step:r??1,limit:t},this.counters[e].value));v(this,"$",this.counter);v(this,"i",e=>e!==void 0?(this.app.universes[this.app.selected_universe].global.evaluations=e,this.app.universes[this.app.selected_universe]):this.app.universes[this.app.selected_universe].global.evaluations);v(this,"drunk",e=>e!==void 0?(this._drunk.position=e,this._drunk.getPosition()):(this._drunk.step(),this._drunk.getPosition()));v(this,"drunk_max",e=>{this._drunk.max=e});v(this,"drunk_min",e=>{this._drunk.min=e});v(this,"drunk_wrap",e=>{this._drunk.toggleWrap(e)});v(this,"variable",(e,t)=>typeof e=="string"&&t===void 0?this.variables[e]:(this.variables[e]=t,this.variables[e]));v(this,"v",this.variable);v(this,"delete_variable",e=>{delete this.variables[e]});v(this,"dv",this.delete_variable);v(this,"clear_variables",()=>{this.variables={}});v(this,"cv",this.clear_variables);v(this,"randI",(e,t)=>Math.floor(this.randomGen()*(t-e+1))+e);v(this,"rand",(e,t)=>this.randomGen()*(t-e)+e);v(this,"irand",this.randI);v(this,"rI",this.randI);v(this,"r",this.rand);v(this,"ir",this.randI);v(this,"seed",e=>{typeof e=="number"&&(e=e.toString()),this.currentSeed!==e&&(this.currentSeed=e,this.randomGen=Fm(e))});v(this,"localSeededRandom",e=>{if(typeof e=="number"&&(e=e.toString()),this.localSeeds.has(e))return this.localSeeds.get(e);const t=Fm(e);return this.localSeeds.set(e,t),t});v(this,"clearLocalSeed",(e=void 0)=>{e&&this.localSeeds.delete(e.toString()),this.localSeeds.clear()});v(this,"quantize",(e,t)=>{if(t.length===0)return e;let r=t[0];return t.forEach(i=>{Math.abs(i-e)Math.min(Math.max(e,t),r));v(this,"cmp",this.clamp);v(this,"bpm",e=>e===void 0?this.app.clock.bpm:((e<1||e>500)&&console.log(`Setting bpm to ${e}`),this.app.clock.bpm=e,e));v(this,"tempo",this.bpm);v(this,"bpb",e=>e===void 0?this.app.clock.time_signature[0]:(e<1&&console.log(`Setting bpb to ${e}`),this.app.clock.time_signature[0]=e,e));v(this,"ppqn",e=>e===void 0?this.app.clock.ppqn:(e<1&&console.log(`Setting ppqn to ${e}`),this.app.clock.ppqn=e,e));v(this,"time_signature",(e,t)=>{this.app.clock.time_signature=[e,t]});v(this,"prob",e=>this.randomGen()*100this.randomGen()>.5);v(this,"odds",(e,t=1)=>this.randomGen()!1);v(this,"almostNever",(e=1)=>this.randomGen()<.025*this.ppqn()/(this.ppqn()*e));v(this,"rarely",(e=1)=>this.randomGen()<.1*this.ppqn()/(this.ppqn()*e));v(this,"scarcely",(e=1)=>this.randomGen()<.25*this.ppqn()/(this.ppqn()*e));v(this,"sometimes",(e=1)=>this.randomGen()<.5*this.ppqn()/(this.ppqn()*e));v(this,"often",(e=1)=>this.randomGen()<.75*this.ppqn()/(this.ppqn()*e));v(this,"frequently",(e=1)=>this.randomGen()<.9*this.ppqn()/(this.ppqn()*e));v(this,"almostAlways",(e=1)=>this.randomGen()<.985*this.ppqn()/(this.ppqn()*e));v(this,"always",(e=1)=>!0);v(this,"dice",e=>Math.floor(this.randomGen()*e)+1);v(this,"cbar",()=>this.app.clock.time_position.bar+1);v(this,"ctick",()=>this.app.clock.tick+1);v(this,"cpulse",()=>this.app.clock.time_position.pulse+1);v(this,"cbeat",()=>this.app.clock.time_position.beat+1);v(this,"ebeat",()=>this.app.clock.beats_since_origin+1);v(this,"epulse",()=>this.app.clock.pulses_since_origin+1);v(this,"nominator",()=>this.app.clock.time_signature[0]);v(this,"meter",()=>this.app.clock.time_signature[1]);v(this,"denominator",this.meter);v(this,"beat",(...e)=>e.map(r=>this.app.clock.pulses_since_origin%Math.floor(r*this.ppqn())===0).some(r=>r===!0));v(this,"b",this.beat);v(this,"pulse",(...e)=>e.map(r=>this.app.clock.pulses_since_origin%r===0).some(r=>r===!0));v(this,"flip",(e,t=50)=>{const r=this.app.clock.pulses_since_origin,i=Math.floor(e*this.ppqn()),s=Math.floor(t/100*i);return r%i{const t=this.app.clock.time_position.bar;return Math.floor(t/e)%2===0});v(this,"onbar",(e,t=this.app.clock.time_signature[0])=>{let r=this.app.clock.time_position.bar%t+1;return typeof e=="number"?e===r:e.some(i=>i==r)});v(this,"onbeat",(...e)=>{let t=[];return e.forEach(r=>{let i=r%this.nominator()||this.nominator(),s=Math.floor(i);s=s==0?this.nominator():s;let a=Math.floor((i-s)*this.ppqn()+1);a<=0&&(a=a+this.ppqn()*this.nominator()),t.push(s===this.cbeat()&&this.cpulse()===a)}),t.some(r=>r==!0)});v(this,"oncount",(e,t)=>{typeof e=="number"&&(e=[e]);const r=this.app.clock.pulses_since_origin;let i=[];return e.forEach(s=>{s=s<1?0:s-1;const a=Math.ceil(s*this.ppqn()),o=r%(this.ppqn()*t);return i.push(o===a)}),i.some(s=>s==!0)});v(this,"oneuclid",(e,t,r=0)=>{const s=this._euclidean_cycle(e,t,r).reduce((a,o,l)=>(o&&a.push(l+1),a),[]);return this.oncount(s,t)});v(this,"delay",(e,t)=>{setTimeout(t,e)});v(this,"delayr",(e,t,r)=>{[...Array(t).keys()].map(s=>e*s).forEach((s,a)=>{setTimeout(r,s)})});v(this,"euclid",(e,t,r,i=0)=>this._euclidean_cycle(t,r,i)[e%r]);v(this,"ec",this.euclid);v(this,"rhythm",(e,t,r,i=0)=>this.beat(e)&&this._euclidean_cycle(t,r,i).beat(e));v(this,"bin",(e,t)=>{let i=t.toString(2).split("").map(s=>s==="1");return i[e%i.length]});v(this,"binrhythm",(e,t)=>{let i=t.toString(2).split("").map(s=>s==="1");return this.beat(e)&&i.beat(e)});v(this,"line",(e,t,r=1)=>{const i=[];if(t>e&&r>0||tMath.sin(this.app.clock.ctx.currentTime*Math.PI*2*e)+t);v(this,"usine",(e=1,t=0)=>(this.sine(e,t)+1)/2);v(this,"saw",(e=1,t=0)=>this.app.clock.ctx.currentTime*e%1*2-1+t);v(this,"usaw",(e=1,t=0)=>(this.saw(e,t)+1)/2);v(this,"triangle",(e=1,t=0)=>Math.abs(this.saw(e,t))*2-1);v(this,"utriangle",(e=1,t=0)=>(this.triangle(e,t)+1)/2);v(this,"square",(e=1,t=0,r=.5)=>{const i=1/e;return(Date.now()/1e3+t)%i/i(this.square(e,t,r)+1)/2);v(this,"noise",()=>this.randomGen()*2-1);v(this,"min",(...e)=>Math.min(...e));v(this,"max",(...e)=>Math.max(...e));v(this,"mean",(...e)=>e.reduce((r,i)=>r+i,0)/e.length);v(this,"limit",(e,t,r)=>Math.min(Math.max(e,t),r));v(this,"abs",Math.abs);v(this,"speak",(e,t="en-US",r=0,i=1,s=1)=>{new PR({text:e,lang:t,voice:r,rate:i,pitch:s}).speak().then(()=>{}).catch(o=>{console.log(o)})});v(this,"stop_hydra",()=>{this.app.hydra.hush()});v(this,"sound",e=>new qm(e,this.app));v(this,"snd",this.sound);v(this,"samples",pa);v(this,"log",e=>{console.log(e),this._logMessage(e)});v(this,"scale",r_);v(this,"rate",e=>{});v(this,"divseq",(...e)=>{const t=e[0],r=e.slice(1),i=this.app.clock.pulses_since_origin,s=Math.floor(i/Math.floor(t*this.ppqn()));return r[s%r.length]});v(this,"seqbeat",(...e)=>e[this.app.clock.time_position.beat%e.length]);v(this,"seqbar",(...e)=>e[(this.app.clock.time_position.bar+1)%e.length]);this.app=e}_euclidean_cycle(e,t,r=0){if(e==t)return Array.from({length:t},()=>!0);function i(o,l){const c=o.length,u=(l+1)%c;return o[l]>o[u]}if(e>=t)return[!0];const s=Array.from({length:t},(o,l)=>(e*(l-1)%t+t)%t);let a=s.map((o,l)=>i(s,l));return r!=0&&(a=a.slice(r).concat(a.slice(0,r))),a}}const aB=n=>{Array.prototype.in=function(e){return this.includes(e)},Array.prototype.square=function(){return this.map(e=>e*e)},Array.prototype.sqrt=function(){if(this.some(e=>e<0))throw new Error("Cannot take square root of negative number");return this.map(e=>Math.sqrt(e))},Array.prototype.add=function(e){return this.map(t=>t+e)},Array.prototype.sub=function(e){return this.map(t=>t-e)},Array.prototype.mult=function(e){return this.map(t=>t*e)},Array.prototype.div=function(e){if(e===0)throw new Error("Division by zero");return this.map(t=>t/e)},Array.prototype.pick=function(){return this[Math.floor(n.randomGen()*this.length)]},Array.prototype.gen=function(e,t,r){return r<1?[]:Array.from({length:r},()=>Math.floor(n.randomGen()*(t-e+1))+e)},Array.prototype.bar=function(){return this[n.app.clock.time_position.bar%this.length]},Array.prototype.pulse=function(){return this[n.app.clock.time_position.pulse%this.length]},Array.prototype.beat=function(e=1){const t=e,r=n.app.clock.pulses_since_origin,i=Math.floor(r/Math.floor(t*n.ppqn()));return this[i%this.length]},Array.prototype.b=Array.prototype.beat,Array.prototype.shuffle=function(){let e=this.length,t;for(;e!==0;)t=Math.floor(n.randomGen()*e),e--,[this[e],this[t]]=[this[t],this[e]];return this},Array.prototype.rotate=function(e){const t=this.length;if(e<0)e=t+e%t;else if(e>0)e=e%t;else return this;const r=this.splice(-e,e);return this.unshift(...r),this},Array.prototype.unique=function(){const e=new Set;let t=0;for(let r=0;r100)throw new Error("Amount should be between 0 and 100");if(this.length<=1)return this;for(let t=0;t1)this.splice(t,1);else return this;else t++;return this},Array.prototype.repeatAll=function(e=1){if(e<1)throw new Error("Amount should be at least 1");let t=[];for(let r=0;r(i%s+s)%s,r=yR(ll(n));return this.map(i=>{const s=Math.floor(i/r.length)*12;return r[t(i,r.length)]+e+s})};Array.prototype.scaleArp=function(n="major",e=0){const t=yR(ll(n));let r=[];e=e>t.length?t.length:e,e=e==0?t.length:e;for(let i=0;i>1|(Bt&21845)<<1;Li=(Li&52428)>>2|(Li&13107)<<2,Li=(Li&61680)>>4|(Li&3855)<<4,eg[Bt]=((Li&65280)>>8|(Li&255)<<8)>>1}var ri=function(n,e,t){for(var r=n.length,i=0,s=new on(e);i>l]=c}else for(o=new on(r),i=0;i>15-n[i]);return o},Ki=new Sr(288);for(var Bt=0;Bt<144;++Bt)Ki[Bt]=8;for(var Bt=144;Bt<256;++Bt)Ki[Bt]=9;for(var Bt=256;Bt<280;++Bt)Ki[Bt]=7;for(var Bt=280;Bt<288;++Bt)Ki[Bt]=8;var zo=new Sr(32);for(var Bt=0;Bt<32;++Bt)zo[Bt]=5;var oB=ri(Ki,9,0),lB=ri(Ki,9,1),cB=ri(zo,5,0),uB=ri(zo,5,1),td=function(n){for(var e=n[0],t=1;te&&(e=n[t]);return e},In=function(n,e,t){var r=e/8|0;return(n[r]|n[r+1]<<8)>>(e&7)&t},rd=function(n,e){var t=e/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(e&7)},l_=function(n){return(n+7)/8|0},c_=function(n,e,t){(e==null||e<0)&&(e=0),(t==null||t>n.length)&&(t=n.length);var r=new Sr(t-e);return r.set(n.subarray(e,t)),r},dB=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Yr=function(n,e,t){var r=new Error(e||dB[n]);if(r.code=n,Error.captureStackTrace&&Error.captureStackTrace(r,Yr),!t)throw r;return r},u_=function(n,e,t,r){var i=n.length,s=r?r.length:0;if(!i||e.f&&!e.l)return t||new Sr(0);var a=!t||e.i!=2,o=e.i;t||(t=new Sr(i*3));var l=function(Le){var tt=t.length;if(Le>tt){var nt=new Sr(Math.max(tt*2,Le));nt.set(t),t=nt}},c=e.f||0,u=e.p||0,p=e.b||0,m=e.l,_=e.d,T=e.m,R=e.n,I=i*8;do{if(!m){c=In(n,u,1);var L=In(n,u+1,3);if(u+=3,L)if(L==1)m=lB,_=uB,T=9,R=5;else if(L==2){var E=In(n,u,31)+257,S=In(n,u+10,15)+4,N=E+In(n,u+5,31)+1;u+=14;for(var k=new Sr(N),x=new Sr(19),M=0;M>4;if($<16)k[M++]=$;else{var ee=0,B=0;for($==16?(B=3+In(n,u,3),u+=2,ee=k[M-1]):$==17?(B=3+In(n,u,7),u+=3):$==18&&(B=11+In(n,u,127),u+=7);B--;)k[M++]=ee}}var Q=k.subarray(0,E),j=k.subarray(E);T=td(Q),R=td(j),m=ri(Q,T,1),_=ri(j,R,1)}else Yr(1);else{var $=l_(u)+4,K=n[$-4]|n[$-3]<<8,f=$+K;if(f>i){o&&Yr(0);break}a&&l(p+K),t.set(n.subarray($,f),p),e.b=p+=K,e.p=u=f*8,e.f=c;continue}if(u>I){o&&Yr(0);break}}a&&l(p+131072);for(var Z=(1<>4;if(u+=ee&15,u>I){o&&Yr(0);break}if(ee||Yr(2),Ee<256)t[p++]=Ee;else if(Ee==256){le=u,m=null;break}else{var De=Ee-254;if(Ee>264){var M=Ee-257,xe=nu[M];De=In(n,u,(1<>4;be||Yr(3),u+=be&15;var j=sB[Ie];if(Ie>3){var xe=iu[Ie];j+=rd(n,u)&(1<I){o&&Yr(0);break}a&&l(p+131072);var ce=p+De;if(p>8},uo=function(n,e,t){t<<=e&7;var r=e/8|0;n[r]|=t,n[r+1]|=t>>8,n[r+2]|=t>>16},nd=function(n,e){for(var t=[],r=0;rm&&(m=s[r].s);var _=new on(m+1),T=tg(t[u-1],_,0);if(T>e){var r=0,R=0,I=T-e,L=1<e)R+=L-(1<>=I;R>0;){var K=s[r].s;_[K]=0&&R;--r){var f=s[r].s;_[f]==e&&(--_[f],++R)}T=e}return{t:new Sr(_),l:T}},tg=function(n,e,t){return n.s==-1?Math.max(tg(n.l,e,t+1),tg(n.r,e,t+1)):e[n.s]=t},CE=function(n){for(var e=n.length;e&&!n[--e];);for(var t=new on(++e),r=0,i=n[0],s=1,a=function(l){t[r++]=l},o=1;o<=e;++o)if(n[o]==i&&o!=e)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=n[o]}return{c:t.subarray(0,r),n:e}},po=function(n,e){for(var t=0,r=0;r>8,n[i+2]=n[i]^255,n[i+3]=n[i+1]^255;for(var s=0;s4&&!M[jm[te-1]];--te);var ne=c+5<<3,re=po(i,Ki)+po(s,zo)+a,ee=po(i,m)+po(s,R)+a+14+3*te+po(N,M)+2*N[16]+3*N[17]+7*N[18];if(l>=0&&ne<=re&&ne<=ee)return $R(e,u,n.subarray(l,l+c));var B,Q,j,Z;if(fi(e,u,1+(ee15&&(fi(e,u,De[k]>>5&127),u+=De[k]>>12)}}else B=oB,Q=Ki,j=cB,Z=zo;for(var k=0;k255){var xe=be>>18&31;uo(e,u,B[xe+257]),u+=Q[xe+257],xe>7&&(fi(e,u,be>>23&31),u+=nu[xe]);var Ie=be&31;uo(e,u,j[Ie]),u+=Z[Ie],Ie>3&&(uo(e,u,be>>5&8191),u+=iu[Ie])}else uo(e,u,B[be]),u+=Q[be]}return uo(e,u,B[256]),u+Q[256]},pB=new o_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),GR=new Sr(0),hB=function(n,e,t,r,i,s){var a=s.z||n.length,o=new Sr(r+a+5*(1+Math.ceil(a/7e3))+i),l=o.subarray(r,o.length-i),c=s.l,u=(s.r||0)&7;if(e){u&&(l[0]=s.r>>3);for(var p=pB[e-1],m=p>>13,_=p&8191,T=(1<7e3||M>24576)&&(B>423||!c)){u=yE(n,l,0,f,E,S,k,M,te,x-te,u),M=N=k=0,te=x;for(var Q=0;Q<286;++Q)E[Q]=0;for(var Q=0;Q<30;++Q)S[Q]=0}var j=2,Z=0,ue=_,le=re-ee&32767;if(B>2&&ne==K(x-le))for(var Ee=Math.min(m,B)-1,De=Math.min(32767,x),xe=Math.min(258,B);le<=De&&--ue&&re!=ee;){if(n[x+j]==n[x+j-le]){for(var be=0;bej){if(j=be,Z=le,be>Ee)break;for(var Ie=Math.min(le,be-2),ce=0,Q=0;Qce&&(ce=Le,ee=ke)}}}re=ee,ee=R[re],le+=re-ee&32767}if(Z){f[M++]=268435456|Jm[j]<<18|vE[Z];var tt=Jm[j]&31,nt=vE[Z]&31;k+=nu[tt]+iu[nt],++E[257+tt],++S[nt],G=x+j,++N}else f[M++]=n[x],++E[n[x]]}}for(x=Math.max(x,G);x=a&&(l[u/8|0]=c,ze=a),u=$R(l,u+1,n.subarray(x,ze))}s.i=a}return c_(o,0,r+l_(u)+i)},fB=function(){for(var n=new Int32Array(256),e=0;e<256;++e){for(var t=e,r=9;--r;)t=(t&1&&-306674912)^t>>>1;n[e]=t}return n}(),mB=function(){var n=-1;return{p:function(e){for(var t=n,r=0;r>>8;n=t},d:function(){return~n}}},gB=function(n,e,t,r,i){if(!i&&(i={l:1},e.dictionary)){var s=e.dictionary.subarray(-32768),a=new Sr(s.length+n.length);a.set(s),a.set(n,s.length),n=a,i.w=s.length}return hB(n,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):12+e.mem,t,r,i)},rg=function(n,e,t){for(;t;++e)n[e]=t,t>>>=8},_B=function(n,e){var t=e.filename;if(n[0]=31,n[1]=139,n[2]=8,n[8]=e.level<2?4:e.level==9?2:0,n[9]=3,e.mtime!=0&&rg(n,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){n[3]=8;for(var r=0;r<=t.length;++r)n[r+10]=t.charCodeAt(r)}},SB=function(n){(n[0]!=31||n[1]!=139||n[2]!=8)&&Yr(6,"invalid gzip data");var e=n[3],t=10;e&4&&(t+=(n[10]|n[11]<<8)+2);for(var r=(e>>3&1)+(e>>4&1);r>0;r-=!n[t++]);return t+(e&2)},OB=function(n){var e=n.length;return(n[e-4]|n[e-3]<<8|n[e-2]<<16|n[e-1]<<24)>>>0},EB=function(n){return 10+(n.filename?n.filename.length+1:0)},bB=function(n,e){return((n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31)&&Yr(6,"invalid zlib data"),(n[1]>>5&1)==+!e&&Yr(6,"invalid zlib data: "+(n[1]&32?"need":"unexpected")+" dictionary"),(n[1]>>3&4)+2};function TB(n,e){return u_(n,{i:2},e&&e.out,e&&e.dictionary)}function vB(n,e){e||(e={});var t=mB(),r=n.length;t.p(n);var i=gB(n,e,EB(e),8),s=i.length;return _B(i,e),rg(i,s-8,t.d()),rg(i,s-4,r),i}function CB(n,e){var t=SB(n);return t+8>n.length&&Yr(6,"invalid gzip data"),u_(n.subarray(t,-8),{i:2},e&&e.out||new Sr(OB(n)),e&&e.dictionary)}function yB(n,e){return u_(n.subarray(bB(n,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function AB(n,e){return n[0]==31&&n[1]==139&&n[2]==8?CB(n,e):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?TB(n,e):yB(n,e)}var ng=typeof TextDecoder<"u"&&new TextDecoder,RB=0;try{ng.decode(GR,{stream:!0}),RB=1}catch{}var IB=function(n){for(var e="",t=0;;){var r=n[t++],i=(r>127)+(r>223)+(r>239);if(t+i>n.length)return{s:e,r:c_(n,t-1)};i?i==3?(r=((r&15)<<18|(n[t++]&63)<<12|(n[t++]&63)<<6|n[t++]&63)-65536,e+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?e+=String.fromCharCode((r&31)<<6|n[t++]&63):e+=String.fromCharCode((r&15)<<12|(n[t++]&63)<<6|n[t++]&63):e+=String.fromCharCode(r)}};function NB(n,e){if(e){for(var t="",r=0;r (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `ยซยซยซ` and `ยปยปยป` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(f===!1)return JSON.parse(JSON.stringify(E));var S={};for(var N in E)E.hasOwnProperty(N)&&(S[N]=E[N].defaultValue);return S}function t(){var f=e(!0),E={};for(var S in f)f.hasOwnProperty(S)&&(E[S]=!0);return E}var r={},i={},s={},a=e(!0),o="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:e(!0),allOn:t()};r.helper={},r.extensions={},r.setOption=function(f,E){return a[f]=E,this},r.getOption=function(f){return a[f]},r.getOptions=function(){return a},r.resetOptions=function(){a=e(!0)},r.setFlavor=function(f){if(!l.hasOwnProperty(f))throw Error(f+" flavor was not found");r.resetOptions();var E=l[f];o=f;for(var S in E)E.hasOwnProperty(S)&&(a[S]=E[S])},r.getFlavor=function(){return o},r.getFlavorOptions=function(f){if(l.hasOwnProperty(f))return l[f]},r.getDefaultOptions=function(f){return e(f)},r.subParser=function(f,E){if(r.helper.isString(f))if(typeof E<"u")i[f]=E;else{if(i.hasOwnProperty(f))return i[f];throw Error("SubParser named "+f+" not registered!")}},r.extension=function(f,E){if(!r.helper.isString(f))throw Error("Extension 'name' must be a string");if(f=r.helper.stdExtName(f),r.helper.isUndefined(E)){if(!s.hasOwnProperty(f))throw Error("Extension named "+f+" is not registered!");return s[f]}else{typeof E=="function"&&(E=E()),r.helper.isArray(E)||(E=[E]);var S=c(E,f);if(S.valid)s[f]=E;else throw Error(S.error)}},r.getAllExtensions=function(){return s},r.removeExtension=function(f){delete s[f]},r.resetExtensions=function(){s={}};function c(f,E){var S=E?"Error in "+E+" extension->":"Error in unnamed extension",N={valid:!0,error:""};r.helper.isArray(f)||(f=[f]);for(var k=0;k"u"},r.helper.forEach=function(f,E){if(r.helper.isUndefined(f))throw new Error("obj param is required");if(r.helper.isUndefined(E))throw new Error("callback param is required");if(!r.helper.isFunction(E))throw new Error("callback param must be a function/closure");if(typeof f.forEach=="function")f.forEach(E);else if(r.helper.isArray(f))for(var S=0;S").replace(/&/g,"&")};var p=function(f,E,S,N){var k=N||"",x=k.indexOf("g")>-1,M=new RegExp(E+"|"+S,"g"+k.replace(/g/g,"")),G=new RegExp(E,k.replace(/g/g,"")),te=[],ne,re,ee,B,Q;do for(ne=0;ee=M.exec(f);)if(G.test(ee[0]))ne++||(re=M.lastIndex,B=re-ee[0].length);else if(ne&&!--ne){Q=ee.index+ee[0].length;var j={left:{start:B,end:re},match:{start:re,end:ee.index},right:{start:ee.index,end:Q},wholeMatch:{start:B,end:Q}};if(te.push(j),!x)return te}while(ne&&(M.lastIndex=re));return te};r.helper.matchRecursiveRegExp=function(f,E,S,N){for(var k=p(f,E,S,N),x=[],M=0;M0){var ne=[];M[0].wholeMatch.start!==0&&ne.push(f.slice(0,M[0].wholeMatch.start));for(var re=0;re=0?N+(S||0):N},r.helper.splitAtIndex=function(f,E){if(!r.helper.isString(f))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[f.substring(0,E),f.substring(E)]},r.helper.encodeEmailAddress=function(f){var E=[function(S){return"&#"+S.charCodeAt(0)+";"},function(S){return"&#x"+S.charCodeAt(0).toString(16)+";"},function(S){return S}];return f=f.replace(/./g,function(S){if(S==="@")S=E[Math.floor(Math.random()*2)](S);else{var N=Math.random();S=N>.9?E[2](S):N>.45?E[1](S):E[0](S)}return S}),f},r.helper.padEnd=function(E,S,N){return S=S>>0,N=String(N||" "),E.length>S?String(E):(S=S-E.length,S>N.length&&(N+=N.repeat(S/N.length)),String(E)+N.slice(0,S))},typeof console>"u"&&(console={warn:function(f){alert(f)},log:function(f){alert(f)},error:function(f){throw f}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"๐Ÿ‘","-1":"๐Ÿ‘Ž",100:"๐Ÿ’ฏ",1234:"๐Ÿ”ข","1st_place_medal":"๐Ÿฅ‡","2nd_place_medal":"๐Ÿฅˆ","3rd_place_medal":"๐Ÿฅ‰","8ball":"๐ŸŽฑ",a:"๐Ÿ…ฐ๏ธ",ab:"๐Ÿ†Ž",abc:"๐Ÿ”ค",abcd:"๐Ÿ”ก",accept:"๐Ÿ‰‘",aerial_tramway:"๐Ÿšก",airplane:"โœˆ๏ธ",alarm_clock:"โฐ",alembic:"โš—๏ธ",alien:"๐Ÿ‘ฝ",ambulance:"๐Ÿš‘",amphora:"๐Ÿบ",anchor:"โš“๏ธ",angel:"๐Ÿ‘ผ",anger:"๐Ÿ’ข",angry:"๐Ÿ˜ ",anguished:"๐Ÿ˜ง",ant:"๐Ÿœ",apple:"๐ŸŽ",aquarius:"โ™’๏ธ",aries:"โ™ˆ๏ธ",arrow_backward:"โ—€๏ธ",arrow_double_down:"โฌ",arrow_double_up:"โซ",arrow_down:"โฌ‡๏ธ",arrow_down_small:"๐Ÿ”ฝ",arrow_forward:"โ–ถ๏ธ",arrow_heading_down:"โคต๏ธ",arrow_heading_up:"โคด๏ธ",arrow_left:"โฌ…๏ธ",arrow_lower_left:"โ†™๏ธ",arrow_lower_right:"โ†˜๏ธ",arrow_right:"โžก๏ธ",arrow_right_hook:"โ†ช๏ธ",arrow_up:"โฌ†๏ธ",arrow_up_down:"โ†•๏ธ",arrow_up_small:"๐Ÿ”ผ",arrow_upper_left:"โ†–๏ธ",arrow_upper_right:"โ†—๏ธ",arrows_clockwise:"๐Ÿ”ƒ",arrows_counterclockwise:"๐Ÿ”„",art:"๐ŸŽจ",articulated_lorry:"๐Ÿš›",artificial_satellite:"๐Ÿ›ฐ",astonished:"๐Ÿ˜ฒ",athletic_shoe:"๐Ÿ‘Ÿ",atm:"๐Ÿง",atom_symbol:"โš›๏ธ",avocado:"๐Ÿฅ‘",b:"๐Ÿ…ฑ๏ธ",baby:"๐Ÿ‘ถ",baby_bottle:"๐Ÿผ",baby_chick:"๐Ÿค",baby_symbol:"๐Ÿšผ",back:"๐Ÿ”™",bacon:"๐Ÿฅ“",badminton:"๐Ÿธ",baggage_claim:"๐Ÿ›„",baguette_bread:"๐Ÿฅ–",balance_scale:"โš–๏ธ",balloon:"๐ŸŽˆ",ballot_box:"๐Ÿ—ณ",ballot_box_with_check:"โ˜‘๏ธ",bamboo:"๐ŸŽ",banana:"๐ŸŒ",bangbang:"โ€ผ๏ธ",bank:"๐Ÿฆ",bar_chart:"๐Ÿ“Š",barber:"๐Ÿ’ˆ",baseball:"โšพ๏ธ",basketball:"๐Ÿ€",basketball_man:"โ›น๏ธ",basketball_woman:"โ›น๏ธ‍โ™€๏ธ",bat:"๐Ÿฆ‡",bath:"๐Ÿ›€",bathtub:"๐Ÿ›",battery:"๐Ÿ”‹",beach_umbrella:"๐Ÿ–",bear:"๐Ÿป",bed:"๐Ÿ›",bee:"๐Ÿ",beer:"๐Ÿบ",beers:"๐Ÿป",beetle:"๐Ÿž",beginner:"๐Ÿ”ฐ",bell:"๐Ÿ””",bellhop_bell:"๐Ÿ›Ž",bento:"๐Ÿฑ",biking_man:"๐Ÿšด",bike:"๐Ÿšฒ",biking_woman:"๐Ÿšด‍โ™€๏ธ",bikini:"๐Ÿ‘™",biohazard:"โ˜ฃ๏ธ",bird:"๐Ÿฆ",birthday:"๐ŸŽ‚",black_circle:"โšซ๏ธ",black_flag:"๐Ÿด",black_heart:"๐Ÿ–ค",black_joker:"๐Ÿƒ",black_large_square:"โฌ›๏ธ",black_medium_small_square:"โ—พ๏ธ",black_medium_square:"โ—ผ๏ธ",black_nib:"โœ’๏ธ",black_small_square:"โ–ช๏ธ",black_square_button:"๐Ÿ”ฒ",blonde_man:"๐Ÿ‘ฑ",blonde_woman:"๐Ÿ‘ฑ‍โ™€๏ธ",blossom:"๐ŸŒผ",blowfish:"๐Ÿก",blue_book:"๐Ÿ“˜",blue_car:"๐Ÿš™",blue_heart:"๐Ÿ’™",blush:"๐Ÿ˜Š",boar:"๐Ÿ—",boat:"โ›ต๏ธ",bomb:"๐Ÿ’ฃ",book:"๐Ÿ“–",bookmark:"๐Ÿ”–",bookmark_tabs:"๐Ÿ“‘",books:"๐Ÿ“š",boom:"๐Ÿ’ฅ",boot:"๐Ÿ‘ข",bouquet:"๐Ÿ’",bowing_man:"๐Ÿ™‡",bow_and_arrow:"๐Ÿน",bowing_woman:"๐Ÿ™‡‍โ™€๏ธ",bowling:"๐ŸŽณ",boxing_glove:"๐ŸฅŠ",boy:"๐Ÿ‘ฆ",bread:"๐Ÿž",bride_with_veil:"๐Ÿ‘ฐ",bridge_at_night:"๐ŸŒ‰",briefcase:"๐Ÿ’ผ",broken_heart:"๐Ÿ’”",bug:"๐Ÿ›",building_construction:"๐Ÿ—",bulb:"๐Ÿ’ก",bullettrain_front:"๐Ÿš…",bullettrain_side:"๐Ÿš„",burrito:"๐ŸŒฏ",bus:"๐ŸšŒ",business_suit_levitating:"๐Ÿ•ด",busstop:"๐Ÿš",bust_in_silhouette:"๐Ÿ‘ค",busts_in_silhouette:"๐Ÿ‘ฅ",butterfly:"๐Ÿฆ‹",cactus:"๐ŸŒต",cake:"๐Ÿฐ",calendar:"๐Ÿ“†",call_me_hand:"๐Ÿค™",calling:"๐Ÿ“ฒ",camel:"๐Ÿซ",camera:"๐Ÿ“ท",camera_flash:"๐Ÿ“ธ",camping:"๐Ÿ•",cancer:"โ™‹๏ธ",candle:"๐Ÿ•ฏ",candy:"๐Ÿฌ",canoe:"๐Ÿ›ถ",capital_abcd:"๐Ÿ” ",capricorn:"โ™‘๏ธ",car:"๐Ÿš—",card_file_box:"๐Ÿ—ƒ",card_index:"๐Ÿ“‡",card_index_dividers:"๐Ÿ—‚",carousel_horse:"๐ŸŽ ",carrot:"๐Ÿฅ•",cat:"๐Ÿฑ",cat2:"๐Ÿˆ",cd:"๐Ÿ’ฟ",chains:"โ›“",champagne:"๐Ÿพ",chart:"๐Ÿ’น",chart_with_downwards_trend:"๐Ÿ“‰",chart_with_upwards_trend:"๐Ÿ“ˆ",checkered_flag:"๐Ÿ",cheese:"๐Ÿง€",cherries:"๐Ÿ’",cherry_blossom:"๐ŸŒธ",chestnut:"๐ŸŒฐ",chicken:"๐Ÿ”",children_crossing:"๐Ÿšธ",chipmunk:"๐Ÿฟ",chocolate_bar:"๐Ÿซ",christmas_tree:"๐ŸŽ„",church:"โ›ช๏ธ",cinema:"๐ŸŽฆ",circus_tent:"๐ŸŽช",city_sunrise:"๐ŸŒ‡",city_sunset:"๐ŸŒ†",cityscape:"๐Ÿ™",cl:"๐Ÿ†‘",clamp:"๐Ÿ—œ",clap:"๐Ÿ‘",clapper:"๐ŸŽฌ",classical_building:"๐Ÿ›",clinking_glasses:"๐Ÿฅ‚",clipboard:"๐Ÿ“‹",clock1:"๐Ÿ•",clock10:"๐Ÿ•™",clock1030:"๐Ÿ•ฅ",clock11:"๐Ÿ•š",clock1130:"๐Ÿ•ฆ",clock12:"๐Ÿ•›",clock1230:"๐Ÿ•ง",clock130:"๐Ÿ•œ",clock2:"๐Ÿ•‘",clock230:"๐Ÿ•",clock3:"๐Ÿ•’",clock330:"๐Ÿ•ž",clock4:"๐Ÿ•“",clock430:"๐Ÿ•Ÿ",clock5:"๐Ÿ•”",clock530:"๐Ÿ• ",clock6:"๐Ÿ••",clock630:"๐Ÿ•ก",clock7:"๐Ÿ•–",clock730:"๐Ÿ•ข",clock8:"๐Ÿ•—",clock830:"๐Ÿ•ฃ",clock9:"๐Ÿ•˜",clock930:"๐Ÿ•ค",closed_book:"๐Ÿ“•",closed_lock_with_key:"๐Ÿ”",closed_umbrella:"๐ŸŒ‚",cloud:"โ˜๏ธ",cloud_with_lightning:"๐ŸŒฉ",cloud_with_lightning_and_rain:"โ›ˆ",cloud_with_rain:"๐ŸŒง",cloud_with_snow:"๐ŸŒจ",clown_face:"๐Ÿคก",clubs:"โ™ฃ๏ธ",cocktail:"๐Ÿธ",coffee:"โ˜•๏ธ",coffin:"โšฐ๏ธ",cold_sweat:"๐Ÿ˜ฐ",comet:"โ˜„๏ธ",computer:"๐Ÿ’ป",computer_mouse:"๐Ÿ–ฑ",confetti_ball:"๐ŸŽŠ",confounded:"๐Ÿ˜–",confused:"๐Ÿ˜•",congratulations:"ใŠ—๏ธ",construction:"๐Ÿšง",construction_worker_man:"๐Ÿ‘ท",construction_worker_woman:"๐Ÿ‘ท‍โ™€๏ธ",control_knobs:"๐ŸŽ›",convenience_store:"๐Ÿช",cookie:"๐Ÿช",cool:"๐Ÿ†’",policeman:"๐Ÿ‘ฎ",copyright:"ยฉ๏ธ",corn:"๐ŸŒฝ",couch_and_lamp:"๐Ÿ›‹",couple:"๐Ÿ‘ซ",couple_with_heart_woman_man:"๐Ÿ’‘",couple_with_heart_man_man:"๐Ÿ‘จ‍โค๏ธ‍๐Ÿ‘จ",couple_with_heart_woman_woman:"๐Ÿ‘ฉ‍โค๏ธ‍๐Ÿ‘ฉ",couplekiss_man_man:"๐Ÿ‘จ‍โค๏ธ‍๐Ÿ’‹‍๐Ÿ‘จ",couplekiss_man_woman:"๐Ÿ’",couplekiss_woman_woman:"๐Ÿ‘ฉ‍โค๏ธ‍๐Ÿ’‹‍๐Ÿ‘ฉ",cow:"๐Ÿฎ",cow2:"๐Ÿ„",cowboy_hat_face:"๐Ÿค ",crab:"๐Ÿฆ€",crayon:"๐Ÿ–",credit_card:"๐Ÿ’ณ",crescent_moon:"๐ŸŒ™",cricket:"๐Ÿ",crocodile:"๐ŸŠ",croissant:"๐Ÿฅ",crossed_fingers:"๐Ÿคž",crossed_flags:"๐ŸŽŒ",crossed_swords:"โš”๏ธ",crown:"๐Ÿ‘‘",cry:"๐Ÿ˜ข",crying_cat_face:"๐Ÿ˜ฟ",crystal_ball:"๐Ÿ”ฎ",cucumber:"๐Ÿฅ’",cupid:"๐Ÿ’˜",curly_loop:"โžฐ",currency_exchange:"๐Ÿ’ฑ",curry:"๐Ÿ›",custard:"๐Ÿฎ",customs:"๐Ÿ›ƒ",cyclone:"๐ŸŒ€",dagger:"๐Ÿ—ก",dancer:"๐Ÿ’ƒ",dancing_women:"๐Ÿ‘ฏ",dancing_men:"๐Ÿ‘ฏ‍โ™‚๏ธ",dango:"๐Ÿก",dark_sunglasses:"๐Ÿ•ถ",dart:"๐ŸŽฏ",dash:"๐Ÿ’จ",date:"๐Ÿ“…",deciduous_tree:"๐ŸŒณ",deer:"๐ŸฆŒ",department_store:"๐Ÿฌ",derelict_house:"๐Ÿš",desert:"๐Ÿœ",desert_island:"๐Ÿ",desktop_computer:"๐Ÿ–ฅ",male_detective:"๐Ÿ•ต๏ธ",diamond_shape_with_a_dot_inside:"๐Ÿ’ ",diamonds:"โ™ฆ๏ธ",disappointed:"๐Ÿ˜ž",disappointed_relieved:"๐Ÿ˜ฅ",dizzy:"๐Ÿ’ซ",dizzy_face:"๐Ÿ˜ต",do_not_litter:"๐Ÿšฏ",dog:"๐Ÿถ",dog2:"๐Ÿ•",dollar:"๐Ÿ’ต",dolls:"๐ŸŽŽ",dolphin:"๐Ÿฌ",door:"๐Ÿšช",doughnut:"๐Ÿฉ",dove:"๐Ÿ•Š",dragon:"๐Ÿ‰",dragon_face:"๐Ÿฒ",dress:"๐Ÿ‘—",dromedary_camel:"๐Ÿช",drooling_face:"๐Ÿคค",droplet:"๐Ÿ’ง",drum:"๐Ÿฅ",duck:"๐Ÿฆ†",dvd:"๐Ÿ“€","e-mail":"๐Ÿ“ง",eagle:"๐Ÿฆ…",ear:"๐Ÿ‘‚",ear_of_rice:"๐ŸŒพ",earth_africa:"๐ŸŒ",earth_americas:"๐ŸŒŽ",earth_asia:"๐ŸŒ",egg:"๐Ÿฅš",eggplant:"๐Ÿ†",eight_pointed_black_star:"โœด๏ธ",eight_spoked_asterisk:"โœณ๏ธ",electric_plug:"๐Ÿ”Œ",elephant:"๐Ÿ˜",email:"โœ‰๏ธ",end:"๐Ÿ”š",envelope_with_arrow:"๐Ÿ“ฉ",euro:"๐Ÿ’ถ",european_castle:"๐Ÿฐ",european_post_office:"๐Ÿค",evergreen_tree:"๐ŸŒฒ",exclamation:"โ—๏ธ",expressionless:"๐Ÿ˜‘",eye:"๐Ÿ‘",eye_speech_bubble:"๐Ÿ‘‍๐Ÿ—จ",eyeglasses:"๐Ÿ‘“",eyes:"๐Ÿ‘€",face_with_head_bandage:"๐Ÿค•",face_with_thermometer:"๐Ÿค’",fist_oncoming:"๐Ÿ‘Š",factory:"๐Ÿญ",fallen_leaf:"๐Ÿ‚",family_man_woman_boy:"๐Ÿ‘ช",family_man_boy:"๐Ÿ‘จ‍๐Ÿ‘ฆ",family_man_boy_boy:"๐Ÿ‘จ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_man_girl:"๐Ÿ‘จ‍๐Ÿ‘ง",family_man_girl_boy:"๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_man_girl_girl:"๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_man_man_boy:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ฆ",family_man_man_boy_boy:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_man_man_girl:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ง",family_man_man_girl_boy:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_man_man_girl_girl:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_man_woman_boy_boy:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_man_woman_girl:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง",family_man_woman_girl_boy:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_man_woman_girl_girl:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_woman_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฆ",family_woman_boy_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_woman_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ง",family_woman_girl_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_woman_girl_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_woman_woman_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ฆ",family_woman_woman_boy_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_woman_woman_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ง",family_woman_woman_girl_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_woman_woman_girl_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ง",fast_forward:"โฉ",fax:"๐Ÿ“ ",fearful:"๐Ÿ˜จ",feet:"๐Ÿพ",female_detective:"๐Ÿ•ต๏ธ‍โ™€๏ธ",ferris_wheel:"๐ŸŽก",ferry:"โ›ด",field_hockey:"๐Ÿ‘",file_cabinet:"๐Ÿ—„",file_folder:"๐Ÿ“",film_projector:"๐Ÿ“ฝ",film_strip:"๐ŸŽž",fire:"๐Ÿ”ฅ",fire_engine:"๐Ÿš’",fireworks:"๐ŸŽ†",first_quarter_moon:"๐ŸŒ“",first_quarter_moon_with_face:"๐ŸŒ›",fish:"๐ŸŸ",fish_cake:"๐Ÿฅ",fishing_pole_and_fish:"๐ŸŽฃ",fist_raised:"โœŠ",fist_left:"๐Ÿค›",fist_right:"๐Ÿคœ",flags:"๐ŸŽ",flashlight:"๐Ÿ”ฆ",fleur_de_lis:"โšœ๏ธ",flight_arrival:"๐Ÿ›ฌ",flight_departure:"๐Ÿ›ซ",floppy_disk:"๐Ÿ’พ",flower_playing_cards:"๐ŸŽด",flushed:"๐Ÿ˜ณ",fog:"๐ŸŒซ",foggy:"๐ŸŒ",football:"๐Ÿˆ",footprints:"๐Ÿ‘ฃ",fork_and_knife:"๐Ÿด",fountain:"โ›ฒ๏ธ",fountain_pen:"๐Ÿ–‹",four_leaf_clover:"๐Ÿ€",fox_face:"๐ŸฆŠ",framed_picture:"๐Ÿ–ผ",free:"๐Ÿ†“",fried_egg:"๐Ÿณ",fried_shrimp:"๐Ÿค",fries:"๐ŸŸ",frog:"๐Ÿธ",frowning:"๐Ÿ˜ฆ",frowning_face:"โ˜น๏ธ",frowning_man:"๐Ÿ™‍โ™‚๏ธ",frowning_woman:"๐Ÿ™",middle_finger:"๐Ÿ–•",fuelpump:"โ›ฝ๏ธ",full_moon:"๐ŸŒ•",full_moon_with_face:"๐ŸŒ",funeral_urn:"โšฑ๏ธ",game_die:"๐ŸŽฒ",gear:"โš™๏ธ",gem:"๐Ÿ’Ž",gemini:"โ™Š๏ธ",ghost:"๐Ÿ‘ป",gift:"๐ŸŽ",gift_heart:"๐Ÿ’",girl:"๐Ÿ‘ง",globe_with_meridians:"๐ŸŒ",goal_net:"๐Ÿฅ…",goat:"๐Ÿ",golf:"โ›ณ๏ธ",golfing_man:"๐ŸŒ๏ธ",golfing_woman:"๐ŸŒ๏ธ‍โ™€๏ธ",gorilla:"๐Ÿฆ",grapes:"๐Ÿ‡",green_apple:"๐Ÿ",green_book:"๐Ÿ“—",green_heart:"๐Ÿ’š",green_salad:"๐Ÿฅ—",grey_exclamation:"โ•",grey_question:"โ”",grimacing:"๐Ÿ˜ฌ",grin:"๐Ÿ˜",grinning:"๐Ÿ˜€",guardsman:"๐Ÿ’‚",guardswoman:"๐Ÿ’‚‍โ™€๏ธ",guitar:"๐ŸŽธ",gun:"๐Ÿ”ซ",haircut_woman:"๐Ÿ’‡",haircut_man:"๐Ÿ’‡‍โ™‚๏ธ",hamburger:"๐Ÿ”",hammer:"๐Ÿ”จ",hammer_and_pick:"โš’",hammer_and_wrench:"๐Ÿ› ",hamster:"๐Ÿน",hand:"โœ‹",handbag:"๐Ÿ‘œ",handshake:"๐Ÿค",hankey:"๐Ÿ’ฉ",hatched_chick:"๐Ÿฅ",hatching_chick:"๐Ÿฃ",headphones:"๐ŸŽง",hear_no_evil:"๐Ÿ™‰",heart:"โค๏ธ",heart_decoration:"๐Ÿ’Ÿ",heart_eyes:"๐Ÿ˜",heart_eyes_cat:"๐Ÿ˜ป",heartbeat:"๐Ÿ’“",heartpulse:"๐Ÿ’—",hearts:"โ™ฅ๏ธ",heavy_check_mark:"โœ”๏ธ",heavy_division_sign:"โž—",heavy_dollar_sign:"๐Ÿ’ฒ",heavy_heart_exclamation:"โฃ๏ธ",heavy_minus_sign:"โž–",heavy_multiplication_x:"โœ–๏ธ",heavy_plus_sign:"โž•",helicopter:"๐Ÿš",herb:"๐ŸŒฟ",hibiscus:"๐ŸŒบ",high_brightness:"๐Ÿ”†",high_heel:"๐Ÿ‘ ",hocho:"๐Ÿ”ช",hole:"๐Ÿ•ณ",honey_pot:"๐Ÿฏ",horse:"๐Ÿด",horse_racing:"๐Ÿ‡",hospital:"๐Ÿฅ",hot_pepper:"๐ŸŒถ",hotdog:"๐ŸŒญ",hotel:"๐Ÿจ",hotsprings:"โ™จ๏ธ",hourglass:"โŒ›๏ธ",hourglass_flowing_sand:"โณ",house:"๐Ÿ ",house_with_garden:"๐Ÿก",houses:"๐Ÿ˜",hugs:"๐Ÿค—",hushed:"๐Ÿ˜ฏ",ice_cream:"๐Ÿจ",ice_hockey:"๐Ÿ’",ice_skate:"โ›ธ",icecream:"๐Ÿฆ",id:"๐Ÿ†”",ideograph_advantage:"๐Ÿ‰",imp:"๐Ÿ‘ฟ",inbox_tray:"๐Ÿ“ฅ",incoming_envelope:"๐Ÿ“จ",tipping_hand_woman:"๐Ÿ’",information_source:"โ„น๏ธ",innocent:"๐Ÿ˜‡",interrobang:"โ‰๏ธ",iphone:"๐Ÿ“ฑ",izakaya_lantern:"๐Ÿฎ",jack_o_lantern:"๐ŸŽƒ",japan:"๐Ÿ—พ",japanese_castle:"๐Ÿฏ",japanese_goblin:"๐Ÿ‘บ",japanese_ogre:"๐Ÿ‘น",jeans:"๐Ÿ‘–",joy:"๐Ÿ˜‚",joy_cat:"๐Ÿ˜น",joystick:"๐Ÿ•น",kaaba:"๐Ÿ•‹",key:"๐Ÿ”‘",keyboard:"โŒจ๏ธ",keycap_ten:"๐Ÿ”Ÿ",kick_scooter:"๐Ÿ›ด",kimono:"๐Ÿ‘˜",kiss:"๐Ÿ’‹",kissing:"๐Ÿ˜—",kissing_cat:"๐Ÿ˜ฝ",kissing_closed_eyes:"๐Ÿ˜š",kissing_heart:"๐Ÿ˜˜",kissing_smiling_eyes:"๐Ÿ˜™",kiwi_fruit:"๐Ÿฅ",koala:"๐Ÿจ",koko:"๐Ÿˆ",label:"๐Ÿท",large_blue_circle:"๐Ÿ”ต",large_blue_diamond:"๐Ÿ”ท",large_orange_diamond:"๐Ÿ”ถ",last_quarter_moon:"๐ŸŒ—",last_quarter_moon_with_face:"๐ŸŒœ",latin_cross:"โœ๏ธ",laughing:"๐Ÿ˜†",leaves:"๐Ÿƒ",ledger:"๐Ÿ“’",left_luggage:"๐Ÿ›…",left_right_arrow:"โ†”๏ธ",leftwards_arrow_with_hook:"โ†ฉ๏ธ",lemon:"๐Ÿ‹",leo:"โ™Œ๏ธ",leopard:"๐Ÿ†",level_slider:"๐ŸŽš",libra:"โ™Ž๏ธ",light_rail:"๐Ÿšˆ",link:"๐Ÿ”—",lion:"๐Ÿฆ",lips:"๐Ÿ‘„",lipstick:"๐Ÿ’„",lizard:"๐ŸฆŽ",lock:"๐Ÿ”’",lock_with_ink_pen:"๐Ÿ”",lollipop:"๐Ÿญ",loop:"โžฟ",loud_sound:"๐Ÿ”Š",loudspeaker:"๐Ÿ“ข",love_hotel:"๐Ÿฉ",love_letter:"๐Ÿ’Œ",low_brightness:"๐Ÿ”…",lying_face:"๐Ÿคฅ",m:"โ“‚๏ธ",mag:"๐Ÿ”",mag_right:"๐Ÿ”Ž",mahjong:"๐Ÿ€„๏ธ",mailbox:"๐Ÿ“ซ",mailbox_closed:"๐Ÿ“ช",mailbox_with_mail:"๐Ÿ“ฌ",mailbox_with_no_mail:"๐Ÿ“ญ",man:"๐Ÿ‘จ",man_artist:"๐Ÿ‘จ‍๐ŸŽจ",man_astronaut:"๐Ÿ‘จ‍๐Ÿš€",man_cartwheeling:"๐Ÿคธ‍โ™‚๏ธ",man_cook:"๐Ÿ‘จ‍๐Ÿณ",man_dancing:"๐Ÿ•บ",man_facepalming:"๐Ÿคฆ‍โ™‚๏ธ",man_factory_worker:"๐Ÿ‘จ‍๐Ÿญ",man_farmer:"๐Ÿ‘จ‍๐ŸŒพ",man_firefighter:"๐Ÿ‘จ‍๐Ÿš’",man_health_worker:"๐Ÿ‘จ‍โš•๏ธ",man_in_tuxedo:"๐Ÿคต",man_judge:"๐Ÿ‘จ‍โš–๏ธ",man_juggling:"๐Ÿคน‍โ™‚๏ธ",man_mechanic:"๐Ÿ‘จ‍๐Ÿ”ง",man_office_worker:"๐Ÿ‘จ‍๐Ÿ’ผ",man_pilot:"๐Ÿ‘จ‍โœˆ๏ธ",man_playing_handball:"๐Ÿคพ‍โ™‚๏ธ",man_playing_water_polo:"๐Ÿคฝ‍โ™‚๏ธ",man_scientist:"๐Ÿ‘จ‍๐Ÿ”ฌ",man_shrugging:"๐Ÿคท‍โ™‚๏ธ",man_singer:"๐Ÿ‘จ‍๐ŸŽค",man_student:"๐Ÿ‘จ‍๐ŸŽ“",man_teacher:"๐Ÿ‘จ‍๐Ÿซ",man_technologist:"๐Ÿ‘จ‍๐Ÿ’ป",man_with_gua_pi_mao:"๐Ÿ‘ฒ",man_with_turban:"๐Ÿ‘ณ",tangerine:"๐ŸŠ",mans_shoe:"๐Ÿ‘ž",mantelpiece_clock:"๐Ÿ•ฐ",maple_leaf:"๐Ÿ",martial_arts_uniform:"๐Ÿฅ‹",mask:"๐Ÿ˜ท",massage_woman:"๐Ÿ’†",massage_man:"๐Ÿ’†‍โ™‚๏ธ",meat_on_bone:"๐Ÿ–",medal_military:"๐ŸŽ–",medal_sports:"๐Ÿ…",mega:"๐Ÿ“ฃ",melon:"๐Ÿˆ",memo:"๐Ÿ“",men_wrestling:"๐Ÿคผ‍โ™‚๏ธ",menorah:"๐Ÿ•Ž",mens:"๐Ÿšน",metal:"๐Ÿค˜",metro:"๐Ÿš‡",microphone:"๐ŸŽค",microscope:"๐Ÿ”ฌ",milk_glass:"๐Ÿฅ›",milky_way:"๐ŸŒŒ",minibus:"๐Ÿš",minidisc:"๐Ÿ’ฝ",mobile_phone_off:"๐Ÿ“ด",money_mouth_face:"๐Ÿค‘",money_with_wings:"๐Ÿ’ธ",moneybag:"๐Ÿ’ฐ",monkey:"๐Ÿ’",monkey_face:"๐Ÿต",monorail:"๐Ÿš",moon:"๐ŸŒ”",mortar_board:"๐ŸŽ“",mosque:"๐Ÿ•Œ",motor_boat:"๐Ÿ›ฅ",motor_scooter:"๐Ÿ›ต",motorcycle:"๐Ÿ",motorway:"๐Ÿ›ฃ",mount_fuji:"๐Ÿ—ป",mountain:"โ›ฐ",mountain_biking_man:"๐Ÿšต",mountain_biking_woman:"๐Ÿšต‍โ™€๏ธ",mountain_cableway:"๐Ÿš ",mountain_railway:"๐Ÿšž",mountain_snow:"๐Ÿ”",mouse:"๐Ÿญ",mouse2:"๐Ÿ",movie_camera:"๐ŸŽฅ",moyai:"๐Ÿ—ฟ",mrs_claus:"๐Ÿคถ",muscle:"๐Ÿ’ช",mushroom:"๐Ÿ„",musical_keyboard:"๐ŸŽน",musical_note:"๐ŸŽต",musical_score:"๐ŸŽผ",mute:"๐Ÿ”‡",nail_care:"๐Ÿ’…",name_badge:"๐Ÿ“›",national_park:"๐Ÿž",nauseated_face:"๐Ÿคข",necktie:"๐Ÿ‘”",negative_squared_cross_mark:"โŽ",nerd_face:"๐Ÿค“",neutral_face:"๐Ÿ˜",new:"๐Ÿ†•",new_moon:"๐ŸŒ‘",new_moon_with_face:"๐ŸŒš",newspaper:"๐Ÿ“ฐ",newspaper_roll:"๐Ÿ—ž",next_track_button:"โญ",ng:"๐Ÿ†–",no_good_man:"๐Ÿ™…‍โ™‚๏ธ",no_good_woman:"๐Ÿ™…",night_with_stars:"๐ŸŒƒ",no_bell:"๐Ÿ”•",no_bicycles:"๐Ÿšณ",no_entry:"โ›”๏ธ",no_entry_sign:"๐Ÿšซ",no_mobile_phones:"๐Ÿ“ต",no_mouth:"๐Ÿ˜ถ",no_pedestrians:"๐Ÿšท",no_smoking:"๐Ÿšญ","non-potable_water":"๐Ÿšฑ",nose:"๐Ÿ‘ƒ",notebook:"๐Ÿ““",notebook_with_decorative_cover:"๐Ÿ“”",notes:"๐ŸŽถ",nut_and_bolt:"๐Ÿ”ฉ",o:"โญ•๏ธ",o2:"๐Ÿ…พ๏ธ",ocean:"๐ŸŒŠ",octopus:"๐Ÿ™",oden:"๐Ÿข",office:"๐Ÿข",oil_drum:"๐Ÿ›ข",ok:"๐Ÿ†—",ok_hand:"๐Ÿ‘Œ",ok_man:"๐Ÿ™†‍โ™‚๏ธ",ok_woman:"๐Ÿ™†",old_key:"๐Ÿ—",older_man:"๐Ÿ‘ด",older_woman:"๐Ÿ‘ต",om:"๐Ÿ•‰",on:"๐Ÿ”›",oncoming_automobile:"๐Ÿš˜",oncoming_bus:"๐Ÿš",oncoming_police_car:"๐Ÿš”",oncoming_taxi:"๐Ÿš–",open_file_folder:"๐Ÿ“‚",open_hands:"๐Ÿ‘",open_mouth:"๐Ÿ˜ฎ",open_umbrella:"โ˜‚๏ธ",ophiuchus:"โ›Ž",orange_book:"๐Ÿ“™",orthodox_cross:"โ˜ฆ๏ธ",outbox_tray:"๐Ÿ“ค",owl:"๐Ÿฆ‰",ox:"๐Ÿ‚",package:"๐Ÿ“ฆ",page_facing_up:"๐Ÿ“„",page_with_curl:"๐Ÿ“ƒ",pager:"๐Ÿ“Ÿ",paintbrush:"๐Ÿ–Œ",palm_tree:"๐ŸŒด",pancakes:"๐Ÿฅž",panda_face:"๐Ÿผ",paperclip:"๐Ÿ“Ž",paperclips:"๐Ÿ–‡",parasol_on_ground:"โ›ฑ",parking:"๐Ÿ…ฟ๏ธ",part_alternation_mark:"ใ€ฝ๏ธ",partly_sunny:"โ›…๏ธ",passenger_ship:"๐Ÿ›ณ",passport_control:"๐Ÿ›‚",pause_button:"โธ",peace_symbol:"โ˜ฎ๏ธ",peach:"๐Ÿ‘",peanuts:"๐Ÿฅœ",pear:"๐Ÿ",pen:"๐Ÿ–Š",pencil2:"โœ๏ธ",penguin:"๐Ÿง",pensive:"๐Ÿ˜”",performing_arts:"๐ŸŽญ",persevere:"๐Ÿ˜ฃ",person_fencing:"๐Ÿคบ",pouting_woman:"๐Ÿ™Ž",phone:"โ˜Ž๏ธ",pick:"โ›",pig:"๐Ÿท",pig2:"๐Ÿ–",pig_nose:"๐Ÿฝ",pill:"๐Ÿ’Š",pineapple:"๐Ÿ",ping_pong:"๐Ÿ“",pisces:"โ™“๏ธ",pizza:"๐Ÿ•",place_of_worship:"๐Ÿ›",plate_with_cutlery:"๐Ÿฝ",play_or_pause_button:"โฏ",point_down:"๐Ÿ‘‡",point_left:"๐Ÿ‘ˆ",point_right:"๐Ÿ‘‰",point_up:"โ˜๏ธ",point_up_2:"๐Ÿ‘†",police_car:"๐Ÿš“",policewoman:"๐Ÿ‘ฎ‍โ™€๏ธ",poodle:"๐Ÿฉ",popcorn:"๐Ÿฟ",post_office:"๐Ÿฃ",postal_horn:"๐Ÿ“ฏ",postbox:"๐Ÿ“ฎ",potable_water:"๐Ÿšฐ",potato:"๐Ÿฅ”",pouch:"๐Ÿ‘",poultry_leg:"๐Ÿ—",pound:"๐Ÿ’ท",rage:"๐Ÿ˜ก",pouting_cat:"๐Ÿ˜พ",pouting_man:"๐Ÿ™Ž‍โ™‚๏ธ",pray:"๐Ÿ™",prayer_beads:"๐Ÿ“ฟ",pregnant_woman:"๐Ÿคฐ",previous_track_button:"โฎ",prince:"๐Ÿคด",princess:"๐Ÿ‘ธ",printer:"๐Ÿ–จ",purple_heart:"๐Ÿ’œ",purse:"๐Ÿ‘›",pushpin:"๐Ÿ“Œ",put_litter_in_its_place:"๐Ÿšฎ",question:"โ“",rabbit:"๐Ÿฐ",rabbit2:"๐Ÿ‡",racehorse:"๐ŸŽ",racing_car:"๐ŸŽ",radio:"๐Ÿ“ป",radio_button:"๐Ÿ”˜",radioactive:"โ˜ข๏ธ",railway_car:"๐Ÿšƒ",railway_track:"๐Ÿ›ค",rainbow:"๐ŸŒˆ",rainbow_flag:"๐Ÿณ๏ธ‍๐ŸŒˆ",raised_back_of_hand:"๐Ÿคš",raised_hand_with_fingers_splayed:"๐Ÿ–",raised_hands:"๐Ÿ™Œ",raising_hand_woman:"๐Ÿ™‹",raising_hand_man:"๐Ÿ™‹‍โ™‚๏ธ",ram:"๐Ÿ",ramen:"๐Ÿœ",rat:"๐Ÿ€",record_button:"โบ",recycle:"โ™ป๏ธ",red_circle:"๐Ÿ”ด",registered:"ยฎ๏ธ",relaxed:"โ˜บ๏ธ",relieved:"๐Ÿ˜Œ",reminder_ribbon:"๐ŸŽ—",repeat:"๐Ÿ”",repeat_one:"๐Ÿ”‚",rescue_worker_helmet:"โ›‘",restroom:"๐Ÿšป",revolving_hearts:"๐Ÿ’ž",rewind:"โช",rhinoceros:"๐Ÿฆ",ribbon:"๐ŸŽ€",rice:"๐Ÿš",rice_ball:"๐Ÿ™",rice_cracker:"๐Ÿ˜",rice_scene:"๐ŸŽ‘",right_anger_bubble:"๐Ÿ—ฏ",ring:"๐Ÿ’",robot:"๐Ÿค–",rocket:"๐Ÿš€",rofl:"๐Ÿคฃ",roll_eyes:"๐Ÿ™„",roller_coaster:"๐ŸŽข",rooster:"๐Ÿ“",rose:"๐ŸŒน",rosette:"๐Ÿต",rotating_light:"๐Ÿšจ",round_pushpin:"๐Ÿ“",rowing_man:"๐Ÿšฃ",rowing_woman:"๐Ÿšฃ‍โ™€๏ธ",rugby_football:"๐Ÿ‰",running_man:"๐Ÿƒ",running_shirt_with_sash:"๐ŸŽฝ",running_woman:"๐Ÿƒ‍โ™€๏ธ",sa:"๐Ÿˆ‚๏ธ",sagittarius:"โ™๏ธ",sake:"๐Ÿถ",sandal:"๐Ÿ‘ก",santa:"๐ŸŽ…",satellite:"๐Ÿ“ก",saxophone:"๐ŸŽท",school:"๐Ÿซ",school_satchel:"๐ŸŽ’",scissors:"โœ‚๏ธ",scorpion:"๐Ÿฆ‚",scorpius:"โ™๏ธ",scream:"๐Ÿ˜ฑ",scream_cat:"๐Ÿ™€",scroll:"๐Ÿ“œ",seat:"๐Ÿ’บ",secret:"ใŠ™๏ธ",see_no_evil:"๐Ÿ™ˆ",seedling:"๐ŸŒฑ",selfie:"๐Ÿคณ",shallow_pan_of_food:"๐Ÿฅ˜",shamrock:"โ˜˜๏ธ",shark:"๐Ÿฆˆ",shaved_ice:"๐Ÿง",sheep:"๐Ÿ‘",shell:"๐Ÿš",shield:"๐Ÿ›ก",shinto_shrine:"โ›ฉ",ship:"๐Ÿšข",shirt:"๐Ÿ‘•",shopping:"๐Ÿ›",shopping_cart:"๐Ÿ›’",shower:"๐Ÿšฟ",shrimp:"๐Ÿฆ",signal_strength:"๐Ÿ“ถ",six_pointed_star:"๐Ÿ”ฏ",ski:"๐ŸŽฟ",skier:"โ›ท",skull:"๐Ÿ’€",skull_and_crossbones:"โ˜ ๏ธ",sleeping:"๐Ÿ˜ด",sleeping_bed:"๐Ÿ›Œ",sleepy:"๐Ÿ˜ช",slightly_frowning_face:"๐Ÿ™",slightly_smiling_face:"๐Ÿ™‚",slot_machine:"๐ŸŽฐ",small_airplane:"๐Ÿ›ฉ",small_blue_diamond:"๐Ÿ”น",small_orange_diamond:"๐Ÿ”ธ",small_red_triangle:"๐Ÿ”บ",small_red_triangle_down:"๐Ÿ”ป",smile:"๐Ÿ˜„",smile_cat:"๐Ÿ˜ธ",smiley:"๐Ÿ˜ƒ",smiley_cat:"๐Ÿ˜บ",smiling_imp:"๐Ÿ˜ˆ",smirk:"๐Ÿ˜",smirk_cat:"๐Ÿ˜ผ",smoking:"๐Ÿšฌ",snail:"๐ŸŒ",snake:"๐Ÿ",sneezing_face:"๐Ÿคง",snowboarder:"๐Ÿ‚",snowflake:"โ„๏ธ",snowman:"โ›„๏ธ",snowman_with_snow:"โ˜ƒ๏ธ",sob:"๐Ÿ˜ญ",soccer:"โšฝ๏ธ",soon:"๐Ÿ”œ",sos:"๐Ÿ†˜",sound:"๐Ÿ”‰",space_invader:"๐Ÿ‘พ",spades:"โ™ ๏ธ",spaghetti:"๐Ÿ",sparkle:"โ‡๏ธ",sparkler:"๐ŸŽ‡",sparkles:"โœจ",sparkling_heart:"๐Ÿ’–",speak_no_evil:"๐Ÿ™Š",speaker:"๐Ÿ”ˆ",speaking_head:"๐Ÿ—ฃ",speech_balloon:"๐Ÿ’ฌ",speedboat:"๐Ÿšค",spider:"๐Ÿ•ท",spider_web:"๐Ÿ•ธ",spiral_calendar:"๐Ÿ—“",spiral_notepad:"๐Ÿ—’",spoon:"๐Ÿฅ„",squid:"๐Ÿฆ‘",stadium:"๐ŸŸ",star:"โญ๏ธ",star2:"๐ŸŒŸ",star_and_crescent:"โ˜ช๏ธ",star_of_david:"โœก๏ธ",stars:"๐ŸŒ ",station:"๐Ÿš‰",statue_of_liberty:"๐Ÿ—ฝ",steam_locomotive:"๐Ÿš‚",stew:"๐Ÿฒ",stop_button:"โน",stop_sign:"๐Ÿ›‘",stopwatch:"โฑ",straight_ruler:"๐Ÿ“",strawberry:"๐Ÿ“",stuck_out_tongue:"๐Ÿ˜›",stuck_out_tongue_closed_eyes:"๐Ÿ˜",stuck_out_tongue_winking_eye:"๐Ÿ˜œ",studio_microphone:"๐ŸŽ™",stuffed_flatbread:"๐Ÿฅ™",sun_behind_large_cloud:"๐ŸŒฅ",sun_behind_rain_cloud:"๐ŸŒฆ",sun_behind_small_cloud:"๐ŸŒค",sun_with_face:"๐ŸŒž",sunflower:"๐ŸŒป",sunglasses:"๐Ÿ˜Ž",sunny:"โ˜€๏ธ",sunrise:"๐ŸŒ…",sunrise_over_mountains:"๐ŸŒ„",surfing_man:"๐Ÿ„",surfing_woman:"๐Ÿ„‍โ™€๏ธ",sushi:"๐Ÿฃ",suspension_railway:"๐ŸšŸ",sweat:"๐Ÿ˜“",sweat_drops:"๐Ÿ’ฆ",sweat_smile:"๐Ÿ˜…",sweet_potato:"๐Ÿ ",swimming_man:"๐ŸŠ",swimming_woman:"๐ŸŠ‍โ™€๏ธ",symbols:"๐Ÿ”ฃ",synagogue:"๐Ÿ•",syringe:"๐Ÿ’‰",taco:"๐ŸŒฎ",tada:"๐ŸŽ‰",tanabata_tree:"๐ŸŽ‹",taurus:"โ™‰๏ธ",taxi:"๐Ÿš•",tea:"๐Ÿต",telephone_receiver:"๐Ÿ“ž",telescope:"๐Ÿ”ญ",tennis:"๐ŸŽพ",tent:"โ›บ๏ธ",thermometer:"๐ŸŒก",thinking:"๐Ÿค”",thought_balloon:"๐Ÿ’ญ",ticket:"๐ŸŽซ",tickets:"๐ŸŽŸ",tiger:"๐Ÿฏ",tiger2:"๐Ÿ…",timer_clock:"โฒ",tipping_hand_man:"๐Ÿ’‍โ™‚๏ธ",tired_face:"๐Ÿ˜ซ",tm:"โ„ข๏ธ",toilet:"๐Ÿšฝ",tokyo_tower:"๐Ÿ—ผ",tomato:"๐Ÿ…",tongue:"๐Ÿ‘…",top:"๐Ÿ”",tophat:"๐ŸŽฉ",tornado:"๐ŸŒช",trackball:"๐Ÿ–ฒ",tractor:"๐Ÿšœ",traffic_light:"๐Ÿšฅ",train:"๐Ÿš‹",train2:"๐Ÿš†",tram:"๐ŸšŠ",triangular_flag_on_post:"๐Ÿšฉ",triangular_ruler:"๐Ÿ“",trident:"๐Ÿ”ฑ",triumph:"๐Ÿ˜ค",trolleybus:"๐ŸšŽ",trophy:"๐Ÿ†",tropical_drink:"๐Ÿน",tropical_fish:"๐Ÿ ",truck:"๐Ÿšš",trumpet:"๐ŸŽบ",tulip:"๐ŸŒท",tumbler_glass:"๐Ÿฅƒ",turkey:"๐Ÿฆƒ",turtle:"๐Ÿข",tv:"๐Ÿ“บ",twisted_rightwards_arrows:"๐Ÿ”€",two_hearts:"๐Ÿ’•",two_men_holding_hands:"๐Ÿ‘ฌ",two_women_holding_hands:"๐Ÿ‘ญ",u5272:"๐Ÿˆน",u5408:"๐Ÿˆด",u55b6:"๐Ÿˆบ",u6307:"๐Ÿˆฏ๏ธ",u6708:"๐Ÿˆท๏ธ",u6709:"๐Ÿˆถ",u6e80:"๐Ÿˆต",u7121:"๐Ÿˆš๏ธ",u7533:"๐Ÿˆธ",u7981:"๐Ÿˆฒ",u7a7a:"๐Ÿˆณ",umbrella:"โ˜”๏ธ",unamused:"๐Ÿ˜’",underage:"๐Ÿ”ž",unicorn:"๐Ÿฆ„",unlock:"๐Ÿ”“",up:"๐Ÿ†™",upside_down_face:"๐Ÿ™ƒ",v:"โœŒ๏ธ",vertical_traffic_light:"๐Ÿšฆ",vhs:"๐Ÿ“ผ",vibration_mode:"๐Ÿ“ณ",video_camera:"๐Ÿ“น",video_game:"๐ŸŽฎ",violin:"๐ŸŽป",virgo:"โ™๏ธ",volcano:"๐ŸŒ‹",volleyball:"๐Ÿ",vs:"๐Ÿ†š",vulcan_salute:"๐Ÿ––",walking_man:"๐Ÿšถ",walking_woman:"๐Ÿšถ‍โ™€๏ธ",waning_crescent_moon:"๐ŸŒ˜",waning_gibbous_moon:"๐ŸŒ–",warning:"โš ๏ธ",wastebasket:"๐Ÿ—‘",watch:"โŒš๏ธ",water_buffalo:"๐Ÿƒ",watermelon:"๐Ÿ‰",wave:"๐Ÿ‘‹",wavy_dash:"ใ€ฐ๏ธ",waxing_crescent_moon:"๐ŸŒ’",wc:"๐Ÿšพ",weary:"๐Ÿ˜ฉ",wedding:"๐Ÿ’’",weight_lifting_man:"๐Ÿ‹๏ธ",weight_lifting_woman:"๐Ÿ‹๏ธ‍โ™€๏ธ",whale:"๐Ÿณ",whale2:"๐Ÿ‹",wheel_of_dharma:"โ˜ธ๏ธ",wheelchair:"โ™ฟ๏ธ",white_check_mark:"โœ…",white_circle:"โšช๏ธ",white_flag:"๐Ÿณ๏ธ",white_flower:"๐Ÿ’ฎ",white_large_square:"โฌœ๏ธ",white_medium_small_square:"โ—ฝ๏ธ",white_medium_square:"โ—ป๏ธ",white_small_square:"โ–ซ๏ธ",white_square_button:"๐Ÿ”ณ",wilted_flower:"๐Ÿฅ€",wind_chime:"๐ŸŽ",wind_face:"๐ŸŒฌ",wine_glass:"๐Ÿท",wink:"๐Ÿ˜‰",wolf:"๐Ÿบ",woman:"๐Ÿ‘ฉ",woman_artist:"๐Ÿ‘ฉ‍๐ŸŽจ",woman_astronaut:"๐Ÿ‘ฉ‍๐Ÿš€",woman_cartwheeling:"๐Ÿคธ‍โ™€๏ธ",woman_cook:"๐Ÿ‘ฉ‍๐Ÿณ",woman_facepalming:"๐Ÿคฆ‍โ™€๏ธ",woman_factory_worker:"๐Ÿ‘ฉ‍๐Ÿญ",woman_farmer:"๐Ÿ‘ฉ‍๐ŸŒพ",woman_firefighter:"๐Ÿ‘ฉ‍๐Ÿš’",woman_health_worker:"๐Ÿ‘ฉ‍โš•๏ธ",woman_judge:"๐Ÿ‘ฉ‍โš–๏ธ",woman_juggling:"๐Ÿคน‍โ™€๏ธ",woman_mechanic:"๐Ÿ‘ฉ‍๐Ÿ”ง",woman_office_worker:"๐Ÿ‘ฉ‍๐Ÿ’ผ",woman_pilot:"๐Ÿ‘ฉ‍โœˆ๏ธ",woman_playing_handball:"๐Ÿคพ‍โ™€๏ธ",woman_playing_water_polo:"๐Ÿคฝ‍โ™€๏ธ",woman_scientist:"๐Ÿ‘ฉ‍๐Ÿ”ฌ",woman_shrugging:"๐Ÿคท‍โ™€๏ธ",woman_singer:"๐Ÿ‘ฉ‍๐ŸŽค",woman_student:"๐Ÿ‘ฉ‍๐ŸŽ“",woman_teacher:"๐Ÿ‘ฉ‍๐Ÿซ",woman_technologist:"๐Ÿ‘ฉ‍๐Ÿ’ป",woman_with_turban:"๐Ÿ‘ณ‍โ™€๏ธ",womans_clothes:"๐Ÿ‘š",womans_hat:"๐Ÿ‘’",women_wrestling:"๐Ÿคผ‍โ™€๏ธ",womens:"๐Ÿšบ",world_map:"๐Ÿ—บ",worried:"๐Ÿ˜Ÿ",wrench:"๐Ÿ”ง",writing_hand:"โœ๏ธ",x:"โŒ",yellow_heart:"๐Ÿ’›",yen:"๐Ÿ’ด",yin_yang:"โ˜ฏ๏ธ",yum:"๐Ÿ˜‹",zap:"โšก๏ธ",zipper_mouth_face:"๐Ÿค",zzz:"๐Ÿ’ค",octocat:':octocat:',showdown:`S`},r.Converter=function(f){var E={},S=[],N=[],k={},x=o,M={parsed:{},raw:"",format:""};G();function G(){f=f||{};for(var B in a)a.hasOwnProperty(B)&&(E[B]=a[B]);if(typeof f=="object")for(var Q in f)f.hasOwnProperty(Q)&&(E[Q]=f[Q]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof f+" was passed instead.");E.extensions&&r.helper.forEach(E.extensions,te)}function te(B,Q){if(Q=Q||null,r.helper.isString(B))if(B=r.helper.stdExtName(B),Q=B,r.extensions[B]){console.warn("DEPRECATION WARNING: "+B+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),ne(r.extensions[B],B);return}else if(!r.helper.isUndefined(s[B]))B=s[B];else throw Error('Extension "'+B+'" could not be loaded. It was either not found or is not a valid extension.');typeof B=="function"&&(B=B()),r.helper.isArray(B)||(B=[B]);var j=c(B,Q);if(!j.valid)throw Error(j.error);for(var Z=0;Z",!1),Ht=lt("@",!1),ut=lt(":",!1),Rt=Xr(["m","k","l","p","d","c","w","y","h","n","q","a","e","f","s","x","t","g","u","j","z","o"],!1,!1),qr=lt("/",!1),ht=lt("(",!1),Zt=lt(")",!1),Ct=lt("[:",!1),Be=lt("]",!1),Br=lt("[",!1),Fn=lt("{",!1),dt=lt("}",!1),Vr=lt("+",!1),Ar=lt("*",!1),Ri=lt("%",!1),Rr=lt("^",!1),Wt=lt("&",!1),yn=lt(">>",!1),Ji=lt("<<",!1),li=lt("_",!1),ea=lt("?",!1),cn=lt("!",!1),ci=lt("r",!1),An=Xr([["a","z"],["A","Z"],["0","9"]],!1,!1),Kt=lt("#",!1),ui=lt("b",!1),di=Xr([["a","z"],["A","Z"],["0","9"],"-","*","+"],!1,!1),q=Xr([["A","G"]],!1,!1),ie=Xr(["b","s"],!1,!1),de=lt("iii",!1),ge=lt("ii",!1),Ae=lt("iv",!1),Qe=lt("i",!1),Me=lt("vii",!1),yt=lt("vi",!1),Ir=lt("v",!1),zr=function(b){return b.filter(w=>w)},xa=function(){return parseFloat(Fr())},ta=function(){return parseInt(Fr())},Ds=function(){return parseInt(Fr())},Hr=function(){},xs=function(b){return Ut(QP,{sound:b})},ka=function(){return Fr()},La=function(b){return Ut(Ao,{items:b})},ks=function(b){return b},Ma=function(b,w){return Ut(qP,{item:b,sound:w})},Ls=function(b,w){return Ut(VP,{item:b,soundIndex:w})},Pa=function(b){return b},Ur=function(){return xP[Fr()]},Ms=function(b,w){return b/w},Ps=function(b){return b.filter(w=>w)},Ba=function(b){return Ut(Ao,{items:b})},Ua=function(b,w){return w?Ut(mE,{item:b,times:w}):Ut(gE,{items:b})},Bs=function(b){return b},Fa=function(b,w,P){return Ut(ZP,{left:b,operation:w,right:P})},Us=function(b,w){return Ut(XP,{items:b,times:w})},Ya=function(b){return Ut(TR,{items:b})},Fs=function(b){return b.map(w=>typeof w=="number"?w:void 0)},Ys=function(){return Math.ceil(ER(Fr()))},un=function(b){var w=b.filter(P=>P).map(P=>Ut(ti,{pitch:P[0]},P.toString()));return Ut(gE,{items:w})},bt=function(b){return b},$s=function(b){return b},Ii=function(){},Gs=function(b){return Ut(Ao,{items:b})},pi=function(b){return Ut(HP,{octave:b})},Qs=function(){return Fr().split("").reduce((b,w)=>b+(w==="^"?1:-1),0)},Ni=function(){return Ut(Lc,{seededRandom:s.seededRandom})},$a=function(b,w){return Ut(Lc,{min:b,max:w,seededRandom:s.seededRandom})},Ga=function(b,w){return Ut(mE,{item:b,times:w})},qs=function(b){return Ut(WP,{duration:b})},wi=function(b){return b},Qa=function(b){return Ut(Ym,{duration:b})},Di=function(b,w,P,X){const oe=b?s.nodeOptions.octave+b:s.nodeOptions.octave;return Ut(ti,{duration:w,pitch:X,pitchOctave:oe,add:P})},xi=function(b){return b.reduce((w,P)=>w+(P==="#"?1:-1),0)},qa=function(b,w,P){return Ut(Na,{pitches:[b].concat(w),inversion:P})},ra=function(){return Fr()},hi=function(b){return b},fr=function(){return Fr()},Va=function(b,w,P,X,oe){const Te=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",gt=s.nodeOptions.key?s.nodeOptions.key:"C",hn=a3(X,P,Te,b,w),Zs=w||s.nodeOptions.duration,mI=b?s.nodeOptions.octave+b:s.nodeOptions.octave;return Ut(Na,{duration:Zs,chordOctave:mI,pitches:hn,chordName:X,inversion:oe,scaleName:Te,key:gt})},Wr=function(b,w,P){const X=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",oe=s.nodeOptions.key?s.nodeOptions.key:"C";return Ut(zP,{roman:b,chordName:w,inversion:P,scaleName:X,key:oe})},na=function(b){const w=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",P=s.nodeOptions.key?s.nodeOptions.key:"C",X=h3(b,P,w);return Ut(ti,{pitch:X.pc,add:X.add,scaleName:w,key:P})},A=0,We=0,za=[{line:1,column:1}],dn=0,Vs=[],Oe=0,me={},ia;if("startRule"in s){if(!(s.startRule in l))throw new Error(`Can't start parsing from rule "`+s.startRule+'".');c=l[s.startRule]}function Fr(){return i.substring(We,A)}function cl(){return d(We,A)}function lt(b,w){return{type:"literal",text:b,ignoreCase:w}}function Xr(b,w,P){return{type:"class",parts:b,inverted:w,ignoreCase:P}}function ul(){return{type:"end"}}function zs(b){return{type:"other",description:b}}function dl(b){var w=za[b],P;if(w)return w;for(P=b-1;!za[P];)P--;for(w=za[P],w={line:w.line,column:w.column};Pdn&&(dn=A,Vs=[]),Vs.push(b))}function g(b,w,P){return new e(e.buildMessage(b,w),b,w,P)}function O(){var b,w,P=A*56+0,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=Xt(),w!==a&&(We=b,w=zr(w)),b=w,me[P]={nextPos:A,result:b},b)}function C(){var b,w,P,X,oe,Te,gt,hn=A*56+1,Zs=me[hn];if(Zs)return A=Zs.nextPos,Zs.result;for(b=A,w=A,i.charCodeAt(A)===45?(P=u,A++):(P=a,Oe===0&&h(hr)),P===a&&(P=null),X=[],Le.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(rt));oe!==a;)X.push(oe),Le.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(rt));if(i.charCodeAt(A)===46?(oe=p,A++):(oe=a,Oe===0&&h(He)),oe!==a){if(Te=[],Le.test(i.charAt(A))?(gt=i.charAt(A),A++):(gt=a,Oe===0&&h(rt)),gt!==a)for(;gt!==a;)Te.push(gt),Le.test(i.charAt(A))?(gt=i.charAt(A),A++):(gt=a,Oe===0&&h(rt));else Te=a;Te!==a?(P=[P,X,oe,Te],w=P):(A=w,w=a)}else A=w,w=a;if(w===a)if(w=A,i.charCodeAt(A)===46?(P=p,A++):(P=a,Oe===0&&h(He)),P!==a){if(X=[],Le.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(rt)),oe!==a)for(;oe!==a;)X.push(oe),Le.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(rt));else X=a;X!==a?(P=[P,X],w=P):(A=w,w=a)}else A=w,w=a;return w!==a&&(We=b,w=xa()),b=w,me[hn]={nextPos:A,result:b},b}function y(){var b,w,P=A*56+2,X=me[P];return X?(A=X.nextPos,X.result):(b=A,i.charCodeAt(A)===45?A++:Oe===0&&h(hr),Le.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(rt)),w!==a?(We=b,b=ta()):(A=b,b=a),me[P]={nextPos:A,result:b},b)}function D(){var b,w,P,X=A*56+3,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,i.charCodeAt(A)===45?A++:Oe===0&&h(hr),w=[],Le.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(rt)),P!==a)for(;P!==a;)w.push(P),Le.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(rt));else w=a;return w!==a?(We=b,b=Ds()):(A=b,b=a),me[X]={nextPos:A,result:b},b}function F(){var b,w,P=A*56+4,X=me[P];return X?(A=X.nextPos,X.result):(Oe++,b=A,tt.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(cr)),w!==a&&(We=b,w=Hr()),b=w,Oe--,b===a&&(w=a,Oe===0&&h(Pr)),me[P]={nextPos:A,result:b},b)}function U(){var b,w,P=A*56+8,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=H(),w!==a&&(We=b,w=xs(w)),b=w,me[P]={nextPos:A,result:b},b)}function H(){var b,w,P,X,oe,Te=A*56+10,gt=me[Te];if(gt)return A=gt.nextPos,gt.result;if(b=A,nt.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(_e)),w!==a){if(P=[],ze.test(i.charAt(A))?(X=i.charAt(A),A++):(X=a,Oe===0&&h(we)),X!==a)for(;X!==a;)P.push(X),ze.test(i.charAt(A))?(X=i.charAt(A),A++):(X=a,Oe===0&&h(we));else P=a;if(P!==a){for(X=[],St.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(Ne));oe!==a;)X.push(oe),St.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(Ne));We=b,b=ka()}else A=b,b=a}else A=b,b=a;return me[Te]={nextPos:A,result:b},b}function z(){var b,w=A*56+11,P=me[w];return P?(A=P.nextPos,P.result):(b=pe(),b===a&&(b=he()),me[w]={nextPos:A,result:b},b)}function pe(){var b,w,P,X,oe=A*56+12,Te=me[oe];if(Te)return A=Te.nextPos,Te.result;if(b=A,i.charCodeAt(A)===60?(w=T,A++):(w=a,Oe===0&&h(Je)),w!==a){if(P=[],X=z(),X!==a)for(;X!==a;)P.push(X),X=z();else P=a;P!==a?(i.charCodeAt(A)===62?(X=R,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=b,b=La(P)):(A=b,b=a)):(A=b,b=a)}else A=b,b=a;return me[oe]={nextPos:A,result:b},b}function he(){var b,w=A*56+13,P=me[w];return P?(A=P.nextPos,P.result):(b=H(),b===a&&(b=pe(),b===a&&(b=F())),me[w]={nextPos:A,result:b},b)}function se(){var b,w,P,X=A*56+14,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,i.charCodeAt(A)===64?(w=I,A++):(w=a,Oe===0&&h(Ht)),w!==a?(P=z(),P!==a?(We=b,b=ks(P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function ae(){var b,w=A*56+15,P=me[w];return P?(A=P.nextPos,P.result):(b=rr(),b===a&&(b=st(),b===a&&(b=qt(),b===a&&(b=su(),b===a&&(b=Qt())))),me[w]={nextPos:A,result:b},b)}function Ce(){var b,w,P,X=A*56+16,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,w=ae(),w===a&&(w=Xs()),w!==a?(P=se(),P!==a?(We=b,b=Ma(w,P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function Se(){var b,w,P,X=A*56+17,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,w=Ce(),w===a&&(w=ae(),w===a&&(w=Xs())),w!==a?(P=qe(),P!==a?(We=b,b=Ls(w,P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function qe(){var b,w,P,X=A*56+18,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,i.charCodeAt(A)===58?(w=L,A++):(w=a,Oe===0&&h(ut)),w!==a?(P=Dt(),P!==a?(We=b,b=Pa(P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function je(){var b,w,P=A*56+19,X=me[P];return X?(A=X.nextPos,X.result):(b=A,mt.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(Rt)),w!==a&&(We=b,w=Ur()),b=w,me[P]={nextPos:A,result:b},b)}function Ue(){var b,w=A*56+20,P=me[w];return P?(A=P.nextPos,P.result):(b=Nt(),b===a&&(b=C(),b===a&&(b=je())),me[w]={nextPos:A,result:b},b)}function Nt(){var b,w,P,X,oe=A*56+21,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,w=D(),w!==a?(i.charCodeAt(A)===47?(P=$,A++):(P=a,Oe===0&&h(qr)),P!==a?(X=D(),X!==a?(We=b,b=Ms(w,X)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function Xt(){var b,w,P,X=A*56+22,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,w=[],P=O_(),P===a&&(P=Se(),P===a&&(P=Ce(),P===a&&(P=rr(),P===a&&(P=qt(),P===a&&(P=st(),P===a&&(P=Qt(),P===a&&(P=Xs(),P===a&&(P=su())))))))),P!==a)for(;P!==a;)w.push(P),P=O_(),P===a&&(P=Se(),P===a&&(P=Ce(),P===a&&(P=rr(),P===a&&(P=qt(),P===a&&(P=st(),P===a&&(P=Qt(),P===a&&(P=Xs(),P===a&&(P=su()))))))));else w=a;return w!==a&&(We=b,w=Ps(w)),b=w,me[X]={nextPos:A,result:b},b}function Dt(){var b,w=A*56+23,P=me[w];return P?(A=P.nextPos,P.result):(b=F(),b===a&&(b=D(),b===a&&(b=S_(),b===a&&(b=lu(),b===a&&(b=er(),b===a&&(b=g_()))))),me[w]={nextPos:A,result:b},b)}function er(){var b,w,P,X,oe=A*56+24,Te=me[oe];if(Te)return A=Te.nextPos,Te.result;if(b=A,i.charCodeAt(A)===60?(w=T,A++):(w=a,Oe===0&&h(Je)),w!==a){if(P=[],X=Dt(),X!==a)for(;X!==a;)P.push(X),X=Dt();else P=a;P!==a?(i.charCodeAt(A)===62?(X=R,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=b,b=Ba(P)):(A=b,b=a)):(A=b,b=a)}else A=b,b=a;return me[oe]={nextPos:A,result:b},b}function st(){var b,w,P,X,oe,Te=A*56+25,gt=me[Te];return gt?(A=gt.nextPos,gt.result):(b=A,i.charCodeAt(A)===40?(w=K,A++):(w=a,Oe===0&&h(ht)),w!==a?(i.charCodeAt(A)===58?A++:Oe===0&&h(ut),P=Xt(),P!==a?(X=ft(),X===a&&(X=null),i.charCodeAt(A)===41?(oe=f,A++):(oe=a,Oe===0&&h(Zt)),oe!==a?(We=b,b=Ua(P,X)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[Te]={nextPos:A,result:b},b)}function ft(){var b,w,P,X=A*56+26,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,i.charCodeAt(A)===58?(w=L,A++):(w=a,Oe===0&&h(ut)),w!==a?(P=D(),P!==a?(We=b,b=Bs(P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function rr(){var b,w,P,X,oe=A*56+27,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,w=st(),w!==a?(P=__(),P!==a?(X=st(),X!==a?(We=b,b=Fa(w,P,X)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function Qt(){var b,w,P,X,oe,Te=A*56+28,gt=me[Te];return gt?(A=gt.nextPos,gt.result):(b=A,i.substr(A,2)===E?(w=E,A+=2):(w=a,Oe===0&&h(Ct)),w!==a?(P=Xt(),P!==a?(X=ft(),X===a&&(X=null),i.charCodeAt(A)===93?(oe=S,A++):(oe=a,Oe===0&&h(Be)),oe!==a?(We=b,b=Us(P,X)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[Te]={nextPos:A,result:b},b)}function qt(){var b,w,P,X,oe=A*56+29,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,i.charCodeAt(A)===91?(w=N,A++):(w=a,Oe===0&&h(Br)),w!==a?(P=Xt(),P!==a?(i.charCodeAt(A)===93?(X=S,A++):(X=a,Oe===0&&h(Be)),X!==a?(We=b,b=Ya(P)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function pn(){var b,w=A*56+30,P=me[w];return P?(A=P.nextPos,P.result):(b=D(),b===a&&(b=y()),me[w]={nextPos:A,result:b},b)}function Hs(){var b,w,P,X=A*56+31,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,w=[],P=pl(),P===a&&(P=pn()),P!==a)for(;P!==a;)w.push(P),P=pl(),P===a&&(P=pn());else w=a;return w!==a&&(We=b,w=Fs(w)),b=w,me[X]={nextPos:A,result:b},b}function pl(){var b,w,P,X,oe=A*56+32,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,i.charCodeAt(A)===40?A++:Oe===0&&h(ht),w=pn(),w!==a?(P=__(),P!==a?(X=Hs(),X!==a?(i.charCodeAt(A)===41?A++:Oe===0&&h(Zt),We=b,b=Ys()):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function Ws(){var b,w,P,X,oe=A*56+33,Te=me[oe];if(Te)return A=Te.nextPos,Te.result;if(b=A,i.charCodeAt(A)===123?(w=k,A++):(w=a,Oe===0&&h(Fn)),w!==a){if(P=[],X=Hs(),X===a&&(X=F()),X!==a)for(;X!==a;)P.push(X),X=Hs(),X===a&&(X=F());else P=a;P!==a?(i.charCodeAt(A)===125?(X=x,A++):(X=a,Oe===0&&h(dt)),X!==a?(We=b,b=un(P)):(A=b,b=a)):(A=b,b=a)}else A=b,b=a;return me[oe]={nextPos:A,result:b},b}function g_(){var b,w,P,X,oe=A*56+34,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,i.charCodeAt(A)===123?(w=k,A++):(w=a,Oe===0&&h(Fn)),w!==a?(P=D(),P===a&&(P=lu()),P!==a?(i.charCodeAt(A)===125?(X=x,A++):(X=a,Oe===0&&h(dt)),X!==a?(We=b,b=bt(P)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function __(){var b,w=A*56+35,P=me[w];return P?(A=P.nextPos,P.result):(i.charCodeAt(A)===43?(b=M,A++):(b=a,Oe===0&&h(Vr)),b===a&&(i.charCodeAt(A)===45?(b=u,A++):(b=a,Oe===0&&h(hr)),b===a&&(i.charCodeAt(A)===42?(b=G,A++):(b=a,Oe===0&&h(Ar)),b===a&&(i.charCodeAt(A)===47?(b=$,A++):(b=a,Oe===0&&h(qr)),b===a&&(i.charCodeAt(A)===37?(b=te,A++):(b=a,Oe===0&&h(Ri)),b===a&&(i.charCodeAt(A)===94?(b=ne,A++):(b=a,Oe===0&&h(Rr)),b===a&&(i.charCodeAt(A)===124?(b=_,A++):(b=a,Oe===0&&h(W)),b===a&&(i.charCodeAt(A)===38?(b=re,A++):(b=a,Oe===0&&h(Wt)),b===a&&(i.substr(A,2)===ee?(b=ee,A+=2):(b=a,Oe===0&&h(yn)),b===a&&(i.substr(A,2)===B?(b=B,A+=2):(b=a,Oe===0&&h(Ji))))))))))),me[w]={nextPos:A,result:b},b)}function Xs(){var b,w,P=A*56+36,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=cI(),w===a&&(w=hI(),w===a&&(w=pI(),w===a&&(w=fI(),w===a&&(w=U(),w===a&&(w=dI(),w===a&&(w=hl(),w===a&&(w=sI(),w===a&&(w=F(),w===a&&(w=oI(),w===a&&(w=st(),w===a&&(w=Ws(),w===a&&(w=aI())))))))))))),w!==a&&(We=b,w=$s(w)),b=w,me[P]={nextPos:A,result:b},b)}function aI(){var b,w,P=A*56+37,X=me[P];return X?(A=X.nextPos,X.result):(b=A,i.charCodeAt(A)===124?(w=_,A++):(w=a,Oe===0&&h(W)),w!==a&&(We=b,w=Ii()),b=w,me[P]={nextPos:A,result:b},b)}function su(){var b,w,P,X,oe=A*56+38,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,i.charCodeAt(A)===60?(w=T,A++):(w=a,Oe===0&&h(Je)),w!==a?(P=Xt(),P!==a?(i.charCodeAt(A)===62?(X=R,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=b,b=Gs(P)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function sI(){var b,w,P=A*56+39,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=ou(),w!==a&&(We=b,w=pi(w)),b=w,me[P]={nextPos:A,result:b},b)}function ou(){var b,w,P,X=A*56+40,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,w=[],i.charCodeAt(A)===94?(P=ne,A++):(P=a,Oe===0&&h(Rr)),P===a&&(i.charCodeAt(A)===95?(P=Q,A++):(P=a,Oe===0&&h(li))),P!==a)for(;P!==a;)w.push(P),i.charCodeAt(A)===94?(P=ne,A++):(P=a,Oe===0&&h(Rr)),P===a&&(i.charCodeAt(A)===95?(P=Q,A++):(P=a,Oe===0&&h(li)));else w=a;return w!==a&&(We=b,w=Qs()),b=w,me[X]={nextPos:A,result:b},b}function S_(){var b,w,P=A*56+41,X=me[P];return X?(A=X.nextPos,X.result):(b=A,i.charCodeAt(A)===63?(w=j,A++):(w=a,Oe===0&&h(ea)),w!==a&&(We=b,w=Ni()),b=w,me[P]={nextPos:A,result:b},b)}function lu(){var b,w,P,X,oe,Te,gt=A*56+42,hn=me[gt];return hn?(A=hn.nextPos,hn.result):(b=A,i.charCodeAt(A)===40?(w=K,A++):(w=a,Oe===0&&h(ht)),w!==a?(P=D(),P!==a?(i.charCodeAt(A)===44?(X=m,A++):(X=a,Oe===0&&h(br)),X!==a?(oe=D(),oe!==a?(i.charCodeAt(A)===41?(Te=f,A++):(Te=a,Oe===0&&h(Zt)),Te!==a?(We=b,b=$a(P,oe)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[gt]={nextPos:A,result:b},b)}function O_(){var b,w,P,X,oe=A*56+43,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,w=Se(),w===a&&(w=Ce(),w===a&&(w=ae(),w===a&&(w=Xs()))),w!==a?(i.charCodeAt(A)===33?(P=Z,A++):(P=a,Oe===0&&h(cn)),P!==a?(X=D(),X!==a?(We=b,b=Ga(w,X)):(A=b,b=a)):(A=b,b=a)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function oI(){var b,w,P=A*56+44,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=Ue(),w!==a&&(We=b,w=qs(w)),b=w,me[P]={nextPos:A,result:b},b)}function lI(){var b,w,P,X=A*56+45,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,w=Ue(),w!==a?(i.charCodeAt(A)===94?(P=ne,A++):(P=a,Oe===0&&h(Rr)),P!==a?(We=b,b=wi(w)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function cI(){var b,w,P,X,oe,Te=A*56+46,gt=me[Te];return gt?(A=gt.nextPos,gt.result):(b=A,w=lI(),w===a&&(w=null),i.charCodeAt(A)===114?(P=ue,A++):(P=a,Oe===0&&h(ci)),P!==a?(X=A,Oe++,At.test(i.charAt(A))?(oe=i.charAt(A),A++):(oe=a,Oe===0&&h(An)),Oe--,oe===a?X=void 0:(A=X,X=a),X!==a?(We=b,b=Qa(w)):(A=b,b=a)):(A=b,b=a),me[Te]={nextPos:A,result:b},b)}function hl(){var b,w,P,X,oe,Te=A*56+47,gt=me[Te];return gt?(A=gt.nextPos,gt.result):(b=A,w=ou(),w===a&&(w=null),P=Ue(),P===a&&(P=null),X=uI(),X===a&&(X=null),oe=y(),oe===a&&(oe=S_(),oe===a&&(oe=lu(),oe===a&&(oe=g_()))),oe!==a?(We=b,b=Di(w,P,X,oe)):(A=b,b=a),me[Te]={nextPos:A,result:b},b)}function uI(){var b,w,P,X=A*56+48,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,w=[],i.charCodeAt(A)===35?(P=le,A++):(P=a,Oe===0&&h(Kt)),P===a&&(i.charCodeAt(A)===98?(P=Ee,A++):(P=a,Oe===0&&h(ui))),P!==a)for(;P!==a;)w.push(P),i.charCodeAt(A)===35?(P=le,A++):(P=a,Oe===0&&h(Kt)),P===a&&(i.charCodeAt(A)===98?(P=Ee,A++):(P=a,Oe===0&&h(ui)));else w=a;return w!==a&&(We=b,w=xi(w)),b=w,me[X]={nextPos:A,result:b},b}function dI(){var b,w,P,X,oe=A*56+49,Te=me[oe];if(Te)return A=Te.nextPos,Te.result;if(b=A,w=hl(),w!==a){if(P=[],X=hl(),X!==a)for(;X!==a;)P.push(X),X=hl();else P=a;P!==a?(X=cu(),X===a&&(X=null),We=b,b=qa(w,P,X)):(A=b,b=a)}else A=b,b=a;return me[oe]={nextPos:A,result:b},b}function E_(){var b,w,P,X=A*56+50,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(b=A,w=[],It.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(di)),P!==a)for(;P!==a;)w.push(P),It.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(di));else w=a;return w!==a&&(We=b,w=ra()),b=w,me[X]={nextPos:A,result:b},b}function cu(){var b,w,P,X=A*56+51,oe=me[X];return oe?(A=oe.nextPos,oe.result):(b=A,i.charCodeAt(A)===37?(w=te,A++):(w=a,Oe===0&&h(Ri)),w!==a?(P=D(),P!==a?(We=b,b=hi(P)):(A=b,b=a)):(A=b,b=a),me[X]={nextPos:A,result:b},b)}function b_(){var b,w,P=A*56+52,X=me[P];return X?(A=X.nextPos,X.result):(b=A,at.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(q)),w!==a?($e.test(i.charAt(A))?(i.charAt(A),A++):Oe===0&&h(ie),We=b,b=fr()):(A=b,b=a),me[P]={nextPos:A,result:b},b)}function pI(){var b,w,P,X,oe,Te,gt=A*56+53,hn=me[gt];return hn?(A=hn.nextPos,hn.result):(b=A,w=ou(),w===a&&(w=null),P=Ue(),P===a&&(P=null),X=b_(),X!==a?(i.charCodeAt(A)===94?A++:Oe===0&&h(Rr),oe=E_(),oe!==a?(Te=cu(),Te===a&&(Te=null),We=b,b=Va(w,P,X,oe,Te)):(A=b,b=a)):(A=b,b=a),me[gt]={nextPos:A,result:b},b)}function hI(){var b,w,P,X,oe=A*56+54,Te=me[oe];return Te?(A=Te.nextPos,Te.result):(b=A,i.substr(A,3)===De?(w=De,A+=3):(w=a,Oe===0&&h(de)),w===a&&(i.substr(A,2)===xe?(w=xe,A+=2):(w=a,Oe===0&&h(ge)),w===a&&(i.substr(A,2)===be?(w=be,A+=2):(w=a,Oe===0&&h(Ae)),w===a&&(i.charCodeAt(A)===105?(w=Ie,A++):(w=a,Oe===0&&h(Qe)),w===a&&(i.substr(A,3)===ce?(w=ce,A+=3):(w=a,Oe===0&&h(Me)),w===a&&(i.substr(A,2)===ke?(w=ke,A+=2):(w=a,Oe===0&&h(yt)),w===a&&(i.charCodeAt(A)===118?(w=Ze,A++):(w=a,Oe===0&&h(Ir)))))))),w!==a?(i.charCodeAt(A)===94?A++:Oe===0&&h(Rr),P=E_(),P===a&&(P=null),X=cu(),X===a&&(X=null),We=b,b=Wr(w,P,X)):(A=b,b=a),me[oe]={nextPos:A,result:b},b)}function fI(){var b,w,P=A*56+55,X=me[P];return X?(A=X.nextPos,X.result):(b=A,w=b_(),w!==a&&(We=b,w=na(w)),b=w,me[P]={nextPos:A,result:b},b)}var T_=s.nodeOptions||{};function Ut(b,w,P=void 0){w.text=P||Fr(),w.location=cl();for(var X in T_)(w[X]===void 0||w[X]===null)&&(w[X]=T_[X]);return new b(w)}if(ia=c(),ia!==a&&A===i.length)return ia;throw ia!==a&&Ae.collect("pitch"))}notes(){return this.evaluated.map(e=>e.collect("note"))}sounds(){return this.evaluated.map(e=>e.collect("sound"))}indices(){return this.evaluated.map(e=>e.collect("soundIndex"))}freqs(){return this.evaluated.map(e=>e.collect("freq"))}durations(){return this.evaluated.map(e=>e.collect("duration"))}octaves(){return this.evaluated.map(e=>e.collect("octave"))}retrograde(){return this.evaluated=this.evaluated.reverse(),this}scale(e){return this.applyOptions({scale:e}),this}key(e){return this.applyOptions({key:e}),this}octave(e){return this.applyOptions({octave:e}),this}invert(e){return this.applyOptions({inversion:e}),this}isInOptions(e,t){return this.options.nodeOptions&&this.options.nodeOptions[e]===t}atLast(){return this.index+1>=this.evaluated.length*this.redo}clone(){return ei(this)}notStarted(){return this.index<0}peek(){return this.evaluated[this.index-1||0]}hasStarted(){return this.index>=0}next(){this.index<0&&(this.index=0);const e=this.evaluated[this.index%this.evaluated.length];return this.index++,this.counter++,this.redo>0&&this.index>=this.evaluated.length*this.redo&&(this.index=0,this.evaluated=this.evaluate(this.values)),e}applyOptions(e={}){this.evaluated=this.evaluate(this.evaluated,e),this.applyTransformations()}applyTransformations(){var e;(e=this.globalOptions)!=null&&e.retrograde&&(this.evaluated=this.evaluated.reverse())}update(){return this.evaluated=this.evaluate(this.values),this.applyTransformations(),this}evaluate(e,t={}){let r=e.map(i=>i.evaluate(t)).flat(1/0).filter(i=>i!==void 0);return t.subdivisions&&(r=NR(r)),r}totalDuration(){return this.evaluated.reduce((t,r)=>t+r.collect("duration"),0)}lead(){let e=this.evaluated.findIndex(t=>t instanceof Na);if(e>=0){for(let t=e+1;t<=this.evaluated.length;t++)if(this.evaluated[t]instanceof Na){const r=this.evaluated[e],i=this.evaluated[t],s=m3(r.notes(),i.notes()),a=ei(i);a.voiceLeadFromNotes(s,this.options.nodeOptions),this.evaluated[t]=a,e=t}}return this}}const NR=(n,e=void 0)=>n.map(r=>{if(r instanceof TR){const i=r.evaluated.length,s=(e||r.duration)/i;return NR(r.evaluated,s)}else return r.duration=e||r.duration,r}).flat(1/0),S3=n=>{let e={};return GP.forEach(t=>{if(n[t]!==void 0){const r=n[t];e[t]=r,delete n[t]}}),e};class O3{constructor(){v(this,"midiAccess",null);v(this,"midiOutputs",[]);v(this,"currentOutputIndex",0);v(this,"scheduledNotes",{});this.initializeMidiAccess()}async initializeMidiAccess(){try{this.midiAccess=await navigator.requestMIDIAccess(),this.midiOutputs=Array.from(this.midiAccess.outputs.values()),this.midiOutputs.length===0&&(console.warn("No MIDI outputs available."),this.currentOutputIndex=-1)}catch(e){console.error("Failed to initialize MIDI:",e)}}getCurrentMidiPort(){return this.midiOutputs.length>0&&this.currentOutputIndex>=0&&this.currentOutputIndex0&&this.currentOutputIndex>=0&&this.currentOutputIndex=this.midiOutputs.length?(console.error(`Invalid MIDI output index. Index must be in the range 0-${this.midiOutputs.length-1}.`),this.currentOutputIndex):e;{const t=this.midiOutputs.findIndex(r=>r.name===e);return t!==-1?t:(console.error(`MIDI output "${e}" not found.`),this.currentOutputIndex)}}listMidiOutputs(){let e="Available MIDI Outputs: ";return this.midiOutputs.forEach((t,r)=>{e+=`(${r+1}) ${t.name} `}),e}sendMidiNote(e,t,r,i,s=this.currentOutputIndex,a=void 0){typeof s=="string"&&(s=this.getMidiOutputIndex(s));const o=this.midiOutputs[s];if(e=Math.min(Math.max(e,0),127),o){const l=[144+t,e,r],c=[128+t,e,0];o.send(l),a&&this.sendPitchBend(a,t,s);const u=setTimeout(()=>{o.send(c),a&&this.sendPitchBend(8192,t,s),delete this.scheduledNotes[e]},(i-.02)*1e3);this.scheduledNotes[e]=u}else console.error("MIDI output not available.")}sendSysExMessage(e){const t=this.midiOutputs[this.currentOutputIndex];t?t.send(e):console.error("MIDI output not available.")}sendPitchBend(e,t,r=this.currentOutputIndex){(e<0||e>16383)&&console.error("Invalid pitch bend value. Value must be in the range 0-16383."),(t<0||t>15)&&console.error("Invalid MIDI channel. Channel must be in the range 0-15."),typeof r=="string"&&(r=this.getMidiOutputIndex(r));const i=this.midiOutputs[r];if(i){const s=e&127,a=e>>7&127;i.send([224|t,s,a])}else console.error("MIDI output not available.")}sendProgramChange(e,t){const r=this.midiOutputs[this.currentOutputIndex];r?r.send([192+t,e]):console.error("MIDI output not available.")}sendMidiControlChange(e,t,r){const i=this.midiOutputs[this.currentOutputIndex];i?i.send([176+r,e,t]):console.error("MIDI output not available.")}panic(){const e=this.midiOutputs[this.currentOutputIndex];if(e){for(const t in this.scheduledNotes){const r=this.scheduledNotes[t];clearTimeout(r),e.send([128,parseInt(t),0])}this.scheduledNotes={}}else console.error("MIDI output not available.")}}class E3{constructor(e,t,r){v(this,"min");v(this,"max");v(this,"wrap");v(this,"position");this.min=e,this.max=t,this.wrap=r,this.position=0}step(){const e=Math.floor(Math.random()*3)-1;this.position+=e,this.wrap?this.position>this.max?this.position=this.min:this.positionthis.max&&(this.position=this.max)}getPosition(){return this.position}toggleWrap(e){this.wrap=e}}class n_{constructor(e){v(this,"seedValue");v(this,"randomGen",Math.random);v(this,"app");v(this,"values",{});v(this,"odds",(e,t)=>this.randomGen()this);v(this,"almostNever",e=>this.odds(.025,e));v(this,"rarely",e=>this.odds(.1,e));v(this,"scarcely",e=>this.odds(.25,e));v(this,"sometimes",e=>this.odds(.5,e));v(this,"often",e=>this.odds(.75,e));v(this,"frequently",e=>this.odds(.9,e));v(this,"almostAlways",e=>this.odds(.985,e));v(this,"always",e=>this.modify(e));v(this,"modify",e=>e(this));v(this,"seed",e=>(this.seedValue=e.toString(),this.randomGen=this.app.api.localSeededRandom(this.seedValue),this));v(this,"clear",()=>(this.app.api.clearLocalSeed(this.seedValue),this));v(this,"apply",e=>this.modify(e));v(this,"length",e=>(this.values.length=e,this));this.app=e,this.app.api.currentSeed&&(this.randomGen=this.app.api.randomGen)}}class wR extends n_{constructor(t){super(t);v(this,"octave",t=>(this.values.octave=t,this.update(),this));v(this,"key",t=>(this.values.key=t,this.update(),this));v(this,"scale",t=>(Jg(t)?(this.values.scaleName=t,this.values.parsedScale=Ti(t)):this.values.parsedScale=e_(t),this.update(),this));v(this,"freq",t=>{this.values.freq=t;const r=KP(t);return r%1!==0?(this.values.note=Math.floor(r),this.values.bend=vR(r)[1]):this.values.note=r,this});v(this,"update",()=>{})}}let wr=[],b3=(n,e)=>{let t,r=[],i={lc:0,l:e||0,value:n,set(s){i.value=s,i.notify()},get(){return i.lc||i.listen(()=>{})(),i.value},notify(s){t=r;let a=!wr.length;for(let o=0;o{r===t&&(r=r.slice());let o=r.indexOf(s);~o&&(r.splice(o,2),i.lc--,i.lc||i.off())}},subscribe(s,a){let o=i.listen(s,a);return s(i.value),o},off(){}};return i},T3=(n={})=>{let e=b3(n);return e.setKey=function(t,r){typeof r>"u"?t in e.value&&(e.value={...e.value},delete e.value[t],e.notify(t)):e.value[t]!==r&&(e.value={...e.value,[t]:r},e.notify(t))},e};if(typeof DelayNode<"u"){class n extends DelayNode{constructor(t,r,i,s){super(t),r=Math.abs(r),this.delayTime.value=i;const a=t.createGain();a.gain.value=Math.min(Math.abs(s),.995),this.feedback=a.gain;const o=t.createGain();return o.gain.value=r,this.delayGain=o,this.connect(a),this.connect(o),a.connect(this),this.connect=l=>o.connect(l),this}start(t){this.delayGain.gain.setValueAtTime(this.delayGain.gain.value,t+this.delayTime.value)}}AudioContext.prototype.createFeedbackDelay=function(e,t,r){return new n(this,e,t,r)}}typeof AudioContext<"u"&&(AudioContext.prototype.impulseResponse=function(n,e=1){const t=this.sampleRate*n,r=this.createBuffer(e,t,this.sampleRate),i=r.getChannelData(0);for(let s=0;s(e.buffer=this.impulseResponse(t),e.duration=n,e),e.setDuration(n),e});var _E={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 n extends GainNode{constructor(t,r){if(super(t),!_E[r])throw new Error("vowel: unknown vowel "+r);const{gains:i,qs:s,freqs:a}=_E[r],o=t.createGain();for(let l=0;l<5;l++){const c=t.createGain();c.gain.value=i[l];const u=t.createBiquadFilter();u.type="bandpass",u.Q.value=s[l],u.frequency.value=a[l],this.connect(u),u.connect(c),c.connect(o)}return o.gain.value=8,this.connect=l=>o.connect(l),this}}AudioContext.prototype.createVowelFilter=function(e){return new n(this,e)}}const v3=n=>{var i;if(typeof n!="string")return[];const[e,t="",r]=((i=n.match(/^([a-gA-G])([#bsf]*)([0-9]*)$/))==null?void 0:i.slice(1))||[];return e?[e,t,r?Number(r):void 0]:[]},C3={c:0,d:2,e:4,f:5,g:7,a:9,b:11},y3={"#":1,b:-1,s:1,f:-1},ru=(n,e=3)=>{const[t,r,i=e]=v3(n);if(!t)throw new Error('not a note: "'+n+'"');const s=C3[t.toLowerCase()],a=(r==null?void 0:r.split("").reduce((o,l)=>o+y3[l],0))||0;return(Number(i)+1)*12+s+a},DR=n=>Math.pow(2,(n-69)/12)*440,Gm=(n,e,t)=>Math.min(Math.max(n,e),t),A3=n=>12*Math.log(n/440)/Math.LN2+69,R3=(n,e)=>{if(typeof n!="object")throw new Error("valueToMidi: expected object value");let{freq:t,note:r}=n;if(typeof t=="number")return A3(t);if(typeof r=="string")return ru(r);if(typeof r=="number")return r;if(!e)throw new Error("valueToMidi: expected freq or note to be set");return e},I3="data:application/javascript;base64,Ly8gTElDRU5TRSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2My4wIHNlZSBodHRwczovL2dpdGh1Yi5jb20vZGt0cjAvV2ViRGlydC9ibG9iL21haW4vTElDRU5TRQovLyBhbGwgdGhlIGNyZWRpdCBnb2VzIHRvIGRrdHIwJ3Mgd2ViZGlydDogaHR0cHM6Ly9naXRodWIuY29tL2RrdHIwL1dlYkRpcnQvYmxvYi81Y2UzZDY5ODM2MmM1NGQ2ZTFiNjhhY2M0N2ViMjk1NWFjNjJjNzkzL2Rpc3QvQXVkaW9Xb3JrbGV0cy5qcwovLyA8MwoKY2xhc3MgQ29hcnNlUHJvY2Vzc29yIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBzdGF0aWMgZ2V0IHBhcmFtZXRlckRlc2NyaXB0b3JzKCkgewogICAgcmV0dXJuIFt7IG5hbWU6ICdjb2Fyc2UnLCBkZWZhdWx0VmFsdWU6IDEgfV07CiAgfQoKICBjb25zdHJ1Y3RvcigpIHsKICAgIHN1cGVyKCk7CiAgICB0aGlzLm5vdFN0YXJ0ZWQgPSB0cnVlOwogIH0KCiAgcHJvY2VzcyhpbnB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0ZXJzKSB7CiAgICBjb25zdCBpbnB1dCA9IGlucHV0c1swXTsKICAgIGNvbnN0IG91dHB1dCA9IG91dHB1dHNbMF07CiAgICBjb25zdCBjcnVzaCA9IHBhcmFtZXRlcnMuY3J1c2g7CiAgICBjb25zdCBibG9ja1NpemUgPSAxMjg7CiAgICBjb25zdCBoYXNJbnB1dCA9ICEoaW5wdXRbMF0gPT09IHVuZGVmaW5lZCk7CiAgICBpZiAoaGFzSW5wdXQpIHsKICAgICAgdGhpcy5ub3RTdGFydGVkID0gZmFsc2U7CiAgICAgIGlmIChjcnVzaC5sZW5ndGggPT09IDEpIHsKICAgICAgICBjb25zdCB4ID0gTWF0aC5wb3coMiwgY3J1c2hbMF0gLSAxKTsKICAgICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgICBjb25zdCB2YWx1ZSA9IE1hdGgucm91bmQoaW5wdXRbMF1bbl0gKiB4KSAvIHg7CiAgICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgICBvdXRwdXRbb11bbl0gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm9yIChsZXQgbiA9IDA7IG4gPCBibG9ja1NpemU7IG4rKykgewogICAgICAgICAgbGV0IHggPSBNYXRoLnBvdygyLCBjcnVzaFtuXSAtIDEpOwogICAgICAgICAgY29uc3QgdmFsdWUgPSBNYXRoLnJvdW5kKGlucHV0WzBdW25dICogeCkgLyB4OwogICAgICAgICAgZm9yIChsZXQgbyA9IDA7IG8gPCBvdXRwdXQubGVuZ3RoOyBvKyspIHsKICAgICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQpy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ICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ3NoYXBlLXByb2Nlc3NvcicsIFNoYXBlUHJvY2Vzc29yKTsK";function Mc(n){const e=Jt().createGain();return e.gain.value=n,e}const Qm=(n,e,t,r,i,s)=>{const a=Jt().createGain();return a.gain.setValueAtTime(0,s),a.gain.linearRampToValueAtTime(i,s+n),a.gain.linearRampToValueAtTime(t*i,s+n+e),{node:a,stop:o=>{a.gain.setValueAtTime(t*i,o),a.gain.linearRampToValueAtTime(0,o+r)}}},N3=(n,e,t,r,i,s)=>{t=Math.max(.001,t),i=Math.max(.001,i);const a=Jt().createGain();return a.gain.setValueAtTime(1e-4,s),a.gain.exponentialRampToValueAtTime(i,s+n),a.gain.exponentialRampToValueAtTime(t*i,s+n+e),{node:a,stop:o=>{a.gain.exponentialRampToValueAtTime(1e-4,o+r)}}},w3=(n,e,t,r,i,s,a,o,l)=>{const c=a-s,u=s+c,p=s+r*c;n.setValueAtTime(s,o),n.linearRampToValueAtTime(u,o+e),n.linearRampToValueAtTime(p,o+e+t),n.setValueAtTime(p,l),n.linearRampToValueAtTime(s,l+Math.max(i,.1))};function Wu(n,e,t,r,i,s,a,o,l,c,u,p=.5){const m=n.createBiquadFilter();if(m.type=e,m.Q.value=r,m.frequency.value=t,!isNaN(l)&&l!==0){const _=l*p,T=Gm(2**-_*t,0,2e4),R=Gm(2**(l-_)*t,0,2e4);return w3(m.frequency,i,s,a,o,T,R,c,u),m}return m}let D3=n=>console.log(n);const ys=(...n)=>D3(...n),i_=T3();function a_(n,e,t={}){i_.setKey(n,{onTrigger:e,data:t})}function SE(n){return i_.get()[n]}let Xu;const Jt=()=>(Xu||(Xu=new AudioContext),Xu);let Bl;const s_=()=>{const n=Jt();return Bl||(Bl=n.createGain(),Bl.connect(n.destination)),Bl};let Zu;function x3(){return Zu||(Zu=Jt().audioWorklet.addModule(I3),Zu)}function Ku(n,e,t){const r=new AudioWorkletNode(n,e);return Object.entries(t).forEach(([i,s])=>{r.parameters.get(i).value=s}),r}async function k3(n={}){const{disableWorklets:e=!1}=n;typeof window<"u"&&(await Jt().resume(),e?console.log("disableWorklets: AudioWorklet effects coarse, crush and shape are skipped!"):await x3().catch(t=>{console.warn("could not load AudioWorklet effects coarse, crush and shape",t)}))}async function L3(n){return new Promise(e=>{document.addEventListener("click",async function t(){await k3(n),e(),document.removeEventListener("click",t)})})}let oa={};function M3(n,e,t,r){var i;if(t=Gm(t,0,.98),!oa[n]){const s=Jt().createFeedbackDelay(1,e,t);(i=s.start)==null||i.call(s,r),s.connect(s_()),oa[n]=s}return oa[n].delayTime.value!==e&&oa[n].delayTime.setValueAtTime(e,r),oa[n].feedback.value!==t&&oa[n].feedback.setValueAtTime(t,r),oa[n]}let la={};function P3(n,e=2){if(!la[n]){const t=Jt().createReverb(e);t.connect(s_()),la[n]=t}return la[n].duration!==e&&(la[n]=la[n].setDuration(e),la[n].duration=e),la[n]}let ca;function B3(n=2048){if(!ca){const e=Jt().createAnalyser();e.fftSize=n,ca=e,new Float32Array(ca.frequencyBinCount)}return ca.fftSize!==n&&(ca.fftSize=n,new Float32Array(ca.frequencyBinCount)),ca}function ju(n,e,t){const r=Mc(t);return n.connect(r),r.connect(e),r}const OE=async(n,e,t)=>{const r=Jt();if(typeof n!="object")throw new Error(`expected hap.value to be an object, but got "${n}". Hint: append .note() or .s() to the end`,"error");n.duration=t;let i=r.currentTime+e,{s="triangle",bank:a,source:o,gain:l=.8,ftype:c="12db",fanchor:u=.5,cutoff:p,lpenv:m,lpattack:_=.01,lpdecay:T=.01,lpsustain:R=1,lprelease:I=.01,resonance:L=1,hpenv:$,hcutoff:K,hpattack:f=.01,hpdecay:E=.01,hpsustain:S=1,hprelease:N=.01,hresonance:k=1,bpenv:x,bandf:M,bpattack:G=.01,bpdecay:te=.01,bpsustain:ne=1,bprelease:re=.01,bandq:ee=1,coarse:B,crush:Q,shape:j,pan:Z,vowel:ue,delay:le=0,delayfeedback:Ee=.5,delaytime:De=.25,orbit:xe=1,room:be,size:Ie=2,velocity:ce=1,analyze:ke,fft:Ze=8}=n;l*=ce;let Le=[];const tt=()=>{Le.forEach(at=>at==null?void 0:at.disconnect())};a&&s&&(s=`${a}_${s}`);let nt;if(o)nt=o(i,n,t);else if(SE(s)){const{onTrigger:at}=SE(s),$e=await at(i,n,tt);$e&&(nt=$e.node,$e.stop(i+t))}else throw new Error(`sound ${s} not found! Is it loaded?`);if(!nt)return;if(r.currentTime>i){ys("[webaudio] skip hap: still loading",r.currentTime-i);return}const ze=[];if(ze.push(nt),ze.push(Mc(l)),p!==void 0){let at=()=>Wu(r,"lowpass",p,L,_,T,R,I,m,i,i+t,u);ze.push(at()),c==="24db"&&ze.push(at())}if(K!==void 0){let at=()=>Wu(r,"highpass",K,k,f,E,S,N,$,i,i+t,u);ze.push(at()),c==="24db"&&ze.push(at())}if(M!==void 0){let at=()=>Wu(r,"bandpass",M,ee,G,te,ne,re,x,i,i+t,u);ze.push(at()),c==="24db"&&ze.push(at())}if(ue!==void 0){const at=r.createVowelFilter(ue);ze.push(at)}if(B!==void 0&&ze.push(Ku(r,"coarse-processor",{coarse:B})),Q!==void 0&&ze.push(Ku(r,"crush-processor",{crush:Q})),j!==void 0&&ze.push(Ku(r,"shape-processor",{shape:j})),Z!==void 0){const at=r.createStereoPanner();at.pan.value=2*Z-1,ze.push(at)}const St=Mc(1);ze.push(St),St.connect(s_());let mt;if(le>0&&De>0&&Ee>0){const at=M3(xe,De,Ee,i);mt=ju(St,at,le)}let At;if(be>0&&Ie>0){const at=P3(xe,Ie);At=ju(St,at,be)}let It;if(ke){const at=B3(2**(Ze+5));It=ju(St,at,ke)}ze.slice(1).reduce((at,$e)=>at.connect($e),ze[0]),Le=ze.concat([mt,At,It])},Ju={};function U3(n,e){var t=e?1e3:1024;if(n=t);return n.toFixed(1)+" "+r[i]}const F3=async(n,e,t,r,i,s,a)=>{let o=0;i!==void 0&&t!==void 0&&ys("[sampler] hap has note and freq. ignoring note","warning");let l=R3({freq:i,note:t},36);o=l-36;const c=Jt();let u;if(Array.isArray(s))u=s[e%s.length];else{const T=I=>ru(I)-l,R=Object.keys(s).filter(I=>!I.startsWith("_")).reduce((I,L,$)=>!I||Math.abs(T(L)){const i=t?`sound "${t}:${r}"`:"sample";if(!Ju[n]){ys(`[sampler] load ${i}..`,"load-sample",{url:n});const s=Date.now();Ju[n]=fetch(n).then(a=>a.arrayBuffer()).then(async a=>{const o=Date.now()-s,l=U3(a.byteLength);return ys(`[sampler] load ${i}... done! loaded ${l} in ${o}ms`,"loaded-sample",{url:n}),await e.decodeAudioData(a)})}return Ju[n]};function $3(n){const e=Jt(),t=e.createBuffer(n.numberOfChannels,n.length,e.sampleRate);for(let r=0;rObject.entries(n).forEach(([r,i])=>{if(typeof i=="string"&&(i=[i]),typeof i!="object")throw new Error("wrong sample map format for "+r);t=i._base||t;const s=a=>(t+a).replace("github:","https://raw.githubusercontent.com/");Array.isArray(i)?i=i.map(s):i=Object.fromEntries(Object.entries(i).map(([a,o])=>[a,(typeof o=="string"?[o]:o).map(s)])),e(r,i)});let Q3={};function q3(n){const e=Object.entries(Q3).find(([t])=>n.startsWith(t));if(e)return e[1]}const pa=async(n,e=n._base||"",t={})=>{if(typeof n=="string"){const s=q3(n);if(s)return s(n);if(n.startsWith("github:")){let[o,l]=n.split("github:");l=l.endsWith("/")?l.slice(0,-1):l,n=`https://raw.githubusercontent.com/${l}/strudel.json`}if(typeof fetch!="function")return;const a=n.split("/").slice(0,-1).join("/");return typeof fetch>"u"?void 0:fetch(n).then(o=>o.json()).then(o=>pa(o,e||o._base||a,t)).catch(o=>{throw console.error(o),new Error(`error loading "${n}"`)})}const{prebake:r,tag:i}=t;G3(n,(s,a)=>a_(s,(o,l,c)=>V3(o,l,c,a),{type:"sample",samples:a,baseUrl:e,prebake:r,tag:i}),e)},EE=[];async function V3(n,e,t,r,i){let{s,freq:a,unit:o,nudge:l=0,cut:c,loop:u,clip:p=void 0,n:m=0,note:_,speed:T=1,loopBegin:R=0,begin:I=0,loopEnd:L=1,end:$=1}=e;if(T===0)return;u=s.startsWith("wt_")?1:e.loop;const K=Jt(),{attack:f=.001,decay:E=.001,sustain:S=1,release:N=.001}=e,k=n+l,x=await F3(s,m,_,T,a,r,i);if(K.currentTime>n){ys(`[sampler] still loading sound "${s}:${m}"`,"highlight");return}if(!x){ys(`[sampler] could not load "${s}:${m}"`,"error");return}x.playbackRate.value=Math.abs(T)*x.playbackRate.value,o==="c"&&(x.playbackRate.value=x.playbackRate.value*x.buffer.duration*1);const M=I*x.buffer.duration;u&&(x.loop=!0,x.loopStart=R*x.buffer.duration-M,x.loopEnd=L*x.buffer.duration-M),x.start(k,M);const{node:G,stop:te}=Qm(f,E,S,N,1,n);x.connect(G);const ne=K.createGain();G.connect(ne),x.onended=function(){x.disconnect(),G.disconnect(),ne.disconnect(),t()};const re={node:ne,bufferSource:x,stop:(ee,B=p===void 0&&u===void 0)=>{let Q=ee;if(B){const j=x.buffer.duration/x.playbackRate.value;Q=n+($-I)*j}x.stop(Q+N),te(Q)}};if(c!==void 0){const ee=EE[c];ee&&(ee.node.gain.setValueAtTime(1,k),ee.node.gain.linearRampToValueAtTime(0,k+.01)),EE[c]=re}return re}const z3=(n,e=1,t="sine")=>{const r=Jt(),i=r.createOscillator();i.type=t,i.frequency.value=n,i.start();const s=new GainNode(r,{gain:e});return i.connect(s),{node:s,stop:a=>i.stop(a)}},H3=(n,e,t,r="sine")=>{const i=n.frequency.value*e,s=i*t;return z3(i,s,r)};function W3(){["sine","square","triangle","sawtooth"].forEach(n=>{a_(n,(e,t,r)=>{let{attack:i=.001,decay:s=.05,sustain:a=.6,release:o=.01,fmh:l=1,fmi:c,fmenv:u="lin",fmattack:p,fmdecay:m,fmsustain:_,fmrelease:T,fmvelocity:R,fmwave:I="sine",vib:L=0,vibmod:$=.5}=t,{n:K,note:f,freq:E}=t;f=f||36,typeof f=="string"&&(f=ru(f)),!E&&typeof f=="number"&&(E=DR(f));const{node:S,stop:N}=Z3({t:e,s:n,freq:E,vib:L,vibmod:$,partials:K});let k,x;if(c){const{node:ne,stop:re}=H3(S,l,c,I);[p,m,_,T,R].find(ee=>ee!==void 0)?(p=p??.001,m=m??.001,_=_??1,T=T??.001,R=R??1,x=Qm(p,m,_,T,R,e),u==="exp"&&(x=N3(p,m,_,T,R,e),x.node.maxValue=c*2,x.node.minValue=1e-5),ne.connect(x.node),x.node.connect(S.frequency)):ne.connect(S.frequency),k=re}const M=Mc(.3),{node:G,stop:te}=Qm(i,s,a,o,1,e);return S.onended=()=>{S.disconnect(),M.disconnect(),r()},{node:S.connect(M).connect(G),stop:ne=>{te(ne),x==null||x.stop(ne);let re=ne+o;N(re),k==null||k(re)}}},{type:"synth",prebake:!0})})}function X3(n,e){const t=new Float32Array(n+1),r=new Float32Array(n+1),i=Jt(),s=i.createOscillator(),a={sawtooth:c=>1/c,square:c=>c%2===0?0:1/c,triangle:c=>c%2===0?0:1/(c*c)};if(!a[e])throw new Error(`unknown wave type ${e}`);t[0]=0,r[0]=0;let o=1;for(;o<=n;)t[o]=a[e](o),r[o]=0,o++;const l=i.createPeriodicWave(t,r);return s.setPeriodicWave(l),s}function Z3({s:n,freq:e,t,vib:r,vibmod:i,partials:s}){let a;!s||n==="sine"?(a=Jt().createOscillator(),a.type=n||"triangle"):a=X3(s,n),a.frequency.value=Number(e),a.start(t);let o;if(r>0){o=Jt().createOscillator(),o.frequency.value=r;const l=Jt().createGain();l.gain.value=i*100,o.connect(l),l.connect(a.detune),o.start(t)}return{node:a,stop:l=>{o==null||o.stop(l),a.stop(l)}}}function K3(n=1,e=.05,t=220,r=0,i=0,s=.1,a=0,o=1,l=0,c=0,u=0,p=0,m=0,_=0,T=0,R=0,I=0,L=1,$=0,K=0){let f=Math.PI*2,E=Jt().sampleRate,S=Z=>Z>0?1:-1,N=l*=500*f/E/E,k=t*=(1+e*2*Math.random()-e)*f/E,x=[],M=0,G=0,te=0,ne=1,re=0,ee=0,B=0,Q,j;for(r=r*E+9,$*=E,i*=E,s*=E,I*=E,c*=500*f/E**3,T*=f/E,u*=f/E,p*=E,m=m*E|0,j=r+$+i+s+I|0;te1?a>2?a>3?Math.sin((M%f)**3):Math.max(Math.min(Math.tan(M),1),-1):1-(2*M/f%2+2)%2:1-4*Math.abs(Math.round(M/f)-M/f):Math.sin(M),B=(m?1-K+K*Math.sin(f*te/m):1)*S(B)*Math.abs(B)**o*n*1*(tete?0:(tep&&(t+=u,k+=u,ne=0),m&&!(++re%m)&&(t=k,l=N,ne||(ne=1));return x}const j3=(n,e)=>{let{s:t,note:r=36,freq:i,zrand:s=0,attack:a=0,decay:o=0,sustain:l=.8,release:c=.1,curve:u=1,slide:p=0,deltaSlide:m=0,pitchJump:_=0,pitchJumpTime:T=0,lfo:R=0,noise:I=0,zmod:L=0,zcrush:$=0,zdelay:K=0,tremolo:f=0,duration:E=.2,zzfx:S}=n;const N=Math.max(E-a-o,0);typeof r=="string"&&(r=ru(r)),!i&&typeof r=="number"&&(i=DR(r)),t=t.replace("z_","");const k=["sine","triangle","sawtooth","tan","noise"].indexOf(t)||0;u=t==="square"?0:u;const x=K3(...S||[.25,s,i,a,N,c,k,u,p,m,_,T,R,I,L,$,K,l,o,f]),M=Jt(),G=M.createBuffer(1,x.length,M.sampleRate);G.getChannelData(0).set(x);const te=Jt().createBufferSource();return te.buffer=G,te.start(e),{node:te}};function J3(){["zzfx","z_sine","z_sawtooth","z_triangle","z_square","z_tan","z_noise"].forEach(n=>{a_(n,(e,t,r)=>{const{node:i}=j3({s:n,...t},e);return i.onended=()=>{i.disconnect(),r()},{node:i,stop:()=>{}}},{type:"synth",prebake:!0})})}class qm extends wR{constructor(t,r){super(r);v(this,"volume",t=>this.updateValue("volume",t));v(this,"vol",this.volume);v(this,"zrand",t=>this.updateValue("zrand",t));v(this,"curve",t=>this.updateValue("curve",t));v(this,"slide",t=>this.updateValue("slide",t));v(this,"sld",this.slide);v(this,"deltaSlide",t=>this.updateValue("deltaSlide",t));v(this,"dslide",this.deltaSlide);v(this,"pitchJump",t=>this.updateValue("pitchJump",t));v(this,"pj",this.pitchJump);v(this,"pitchJumpTime",t=>this.updateValue("pitchJumpTime",t));v(this,"pjt",this.pitchJumpTime);v(this,"lfo",t=>this.updateValue("lfo",t));v(this,"noise",t=>this.updateValue("noise",t));v(this,"zmod",t=>this.updateValue("zmod",t));v(this,"zcrush",t=>this.updateValue("zcrush",t));v(this,"zdelay",t=>this.updateValue("zdelay",t));v(this,"sustainVolume",t=>this.updateValue("sustainVolume",t));v(this,"tremolo",t=>this.updateValue("tremolo",t));v(this,"dur",t=>this.updateValue("dur",t));v(this,"zzfx",t=>this.updateValue("zzfx",t));v(this,"fmi",t=>this.updateValue("fmi",t));v(this,"fmh",t=>this.updateValue("fmh",t));v(this,"fmenv",t=>this.updateValue("fmenv",t));v(this,"fmattack",t=>this.updateValue("fmattack",t));v(this,"fmatk",this.fmattack);v(this,"fmdecay",t=>this.updateValue("fmdecay",t));v(this,"fmdec",this.fmdecay);v(this,"fmsustain",t=>this.updateValue("fmsustain",t));v(this,"fmsus",this.fmsustain);v(this,"fmrelease",t=>this.updateValue("fmrelease",t));v(this,"fmrel",this.fmrelease);v(this,"fmvelocity",t=>this.updateValue("fmvelocity",t));v(this,"fmvel",this.fmvelocity);v(this,"fmwave",t=>this.updateValue("fmwave",t));v(this,"fmw",this.fmwave);v(this,"ftype",t=>this.updateValue("ftype",t));v(this,"fanchor",t=>this.updateValue("fanchor",t));v(this,"attack",t=>this.updateValue("attack",t));v(this,"atk",this.attack);v(this,"decay",t=>this.updateValue("decay",t));v(this,"dec",this.decay);v(this,"sustain",t=>this.updateValue("sustain",t));v(this,"sus",this.sustain);v(this,"release",t=>this.updateValue("release",t));v(this,"rel",this.release);v(this,"adsr",(t,r,i,s)=>(this.attack(t),this.decay(r),this.sustain(i),this.release(s),this));v(this,"lpenv",t=>this.updateValue("lpenv",t));v(this,"lpe",t=>this.updateValue("lpenv",t));v(this,"lpattack",t=>this.updateValue("lpattack",t));v(this,"lpa",this.lpattack);v(this,"lpdecay",t=>this.updateValue("lpdecay",t));v(this,"lpd",this.lpdecay);v(this,"lpsustain",t=>this.updateValue("lpsustain",t));v(this,"lps",this.lpsustain);v(this,"lprelease",t=>this.updateValue("lprelease",t));v(this,"lpr",this.lprelease);v(this,"cutoff",t=>this.updateValue("cutoff",t));v(this,"lpf",this.cutoff);v(this,"resonance",t=>this.updateValue("resonance",Math.min(Math.max(t,0),50)));v(this,"lpq",this.resonance);v(this,"lpadsr",(t,r,i,s,a)=>(this.lpenv(t),this.lpattack(r),this.lpdecay(i),this.lpsustain(s),this.lprelease(a),this));v(this,"hpenv",t=>this.updateValue("hpenv",t));v(this,"hpe",t=>this.updateValue("hpe",t));v(this,"hpattack",t=>this.updateValue("hpattack",t));v(this,"hpa",this.hpattack);v(this,"hpdecay",t=>this.updateValue("hpdecay",t));v(this,"hpd",this.hpdecay);v(this,"hpsustain",t=>this.updateValue("hpsustain",t));v(this,"hpsus",this.hpsustain);v(this,"hprelease",t=>this.updateValue("hprelease",t));v(this,"hpr",this.hprelease);v(this,"hcutoff",t=>this.updateValue("hcutoff",t));v(this,"hpf",this.hcutoff);v(this,"hresonance",t=>this.updateValue("hresonance",t));v(this,"hpq",this.hresonance);v(this,"hpadsr",(t,r,i,s,a)=>(this.hpenv(t),this.hpattack(r),this.hpdecay(i),this.hpsustain(s),this.hprelease(a),this));v(this,"bpenv",t=>this.updateValue("bpenv",t));v(this,"bpe",t=>this.updateValue("bpe",t));v(this,"bpattack",t=>this.updateValue("bpattack",t));v(this,"bpa",this.bpattack);v(this,"bpdecay",t=>this.updateValue("bpdecay",t));v(this,"bpd",this.bpdecay);v(this,"bpsustain",t=>this.updateValue("bpsustain",t));v(this,"bps",this.bpsustain);v(this,"bprelease",t=>this.updateValue("bprelease",t));v(this,"bpr",this.bprelease);v(this,"bandf",t=>this.updateValue("bandf",t));v(this,"bpf",this.bandf);v(this,"bandq",t=>this.updateValue("bandq",t));v(this,"bpq",this.bandq);v(this,"bpadsr",(t,r,i,s,a)=>(this.bpenv(t),this.bpattack(r),this.bpdecay(i),this.bpsustain(s),this.bprelease(a),this));v(this,"freq",t=>this.updateValue("freq",t));v(this,"f",this.freq);v(this,"vib",t=>this.updateValue("vib",t));v(this,"vibmod",t=>this.updateValue("vibmod",t));v(this,"fm",t=>{if(typeof t=="number")this.values.fmi=t;else{let r=t.split(":");this.values.fmi=parseFloat(r[0]),r.length>1&&(this.values.fmh=parseFloat(r[1]))}return this});v(this,"loop",t=>this.updateValue("loop",t));v(this,"loopBegin",t=>this.updateValue("loopBegin",t));v(this,"loopEnd",t=>this.updateValue("loopEnd",t));v(this,"begin",t=>this.updateValue("begin",t));v(this,"end",t=>this.updateValue("end",t));v(this,"gain",t=>this.updateValue("gain",t));v(this,"dbgain",t=>this.updateValue("gain",Math.min(Math.pow(10,t/20),10)));v(this,"db",this.dbgain);v(this,"velocity",t=>this.updateValue("velocity",t));v(this,"vel",this.velocity);v(this,"pan",t=>this.updateValue("pan",t));v(this,"sound",t=>this.updateValue("s",t));v(this,"chord",(t,...r)=>(typeof t=="string"?t=l3(t).map(s=>({note:s,freq:Zn(s)})):t instanceof Array&&typeof t[0]=="number"?t=t.map(i=>({note:i,freq:Zn(i)})):typeof t=="number"&&r.length>0&&(t=[t,...r].map(i=>({note:i,freq:Zn(i)}))),this.updateValue("chord",t)));v(this,"invert",(t=0)=>{if(this.values.chord){let r=this.values.chord.map(s=>s.note);r=t<0?[...r].reverse():r;for(let s=0;s({note:s,freq:Zn(s)}));return this.updateValue("chord",i)}else return this});v(this,"snd",this.sound);v(this,"nudge",t=>this.updateValue("nudge",t));v(this,"cut",t=>this.updateValue("cut",t));v(this,"clip",t=>this.updateValue("clip",t));v(this,"n",t=>this.updateValue("n",t));v(this,"note",t=>typeof t=="string"?this.updateValue("note",oi(t)):this.updateValue("note",t));v(this,"speed",t=>this.updateValue("speed",t));v(this,"spd",this.speed);v(this,"coarse",t=>this.updateValue("coarse",t));v(this,"crush",t=>this.updateValue("crush",t));v(this,"shape",t=>this.updateValue("shape",t));v(this,"vowel",t=>this.updateValue("vowel",t));v(this,"vow",this.vowel);v(this,"delay",t=>this.updateValue("delay",t));v(this,"del",this.delay);v(this,"delayfeedback",t=>this.updateValue("delayfeedback",t));v(this,"delayfb",this.delayfeedback);v(this,"delaytime",t=>this.updateValue("delaytime",t));v(this,"delayt",this.delaytime);v(this,"orbit",t=>this.updateValue("orbit",t));v(this,"o",this.orbit);v(this,"room",t=>this.updateValue("room",t));v(this,"rm",this.room);v(this,"size",t=>this.updateValue("size",t));v(this,"sz",this.size);v(this,"stretch",t=>(this.updateValue("unit","c"),this.updateValue("speed",2/t),this));v(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this.update(),this)});v(this,"update",()=>{const[t,r]=t_(this.values.key||"C4",this.values.pitch||0,this.values.parsedScale||"MAJOR",this.values.octave||0);this.values.freq=Zn(t)});v(this,"out",()=>{this.values.chord?this.values.chord.forEach(t=>{const r={...this.values};r.freq=t.freq,OE(r,.25,this.values.dur)}):OE(this.values,.25,this.values.dur)});this.app=r,typeof t=="string"?t.includes(":")?this.values={s:t.split(":")[0],n:t.split(":")[1],dur:r.clock.convertPulseToSecond(r.clock.ppqn)}:this.values={s:t,dur:.5}:this.values=t}updateValue(t,r){return this.values[t]=r,this}}class Vm extends wR{constructor(t,r){super(r);v(this,"midiConnection");v(this,"chord",t=>(this.values.chord=t,this));v(this,"note",t=>(this.values.note=t,this));v(this,"sustain",t=>(this.values.sustain=t,this));v(this,"channel",t=>(this.values.channel=t,this));v(this,"port",t=>(this.values.port=this.midiConnection.getMidiOutputIndex(t),this));v(this,"add",t=>(this.values.note+=t,this));v(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this.update(),this)});v(this,"bend",t=>(this.values.bend=t,this));v(this,"random",(t=0,r=127)=>(t=Math.min(Math.max(t,0),127),r=Math.min(Math.max(r,0),127),this.values.note=Math.floor(this.randomGen()*(r-t+1))+t,this));v(this,"update",()=>{const[t,r]=t_(this.values.key||"C4",this.values.pitch||0,this.values.parsedScale||"MAJOR",this.values.octave||0);this.values.note=t,this.values.freq=Zn(t),r&&(this.values.bend=r)});v(this,"out",()=>{function t(r,i){const s=i&&i.channel?i.channel:0,a=r.values.channel?r.values.channel:s,o=r.values.velocity?r.values.velocity:100,l=i&&i.note?i.note:60,c=r.values.note?r.values.note:l,u=r.values.sustain?r.values.sustain*r.app.clock.pulse_duration*r.app.api.ppqn():r.app.clock.pulse_duration*r.app.api.ppqn(),p=r.values.bend?r.values.bend:void 0,m=r.values.port?r.midiConnection.getMidiOutputIndex(r.values.port):r.midiConnection.getCurrentMidiPortIndex();r.midiConnection.sendMidiNote(c,a,o,u,m,p)}this.values.chord?this.values.chord.forEach(r=>{t(this,r)}):t(this)});this.app=r,typeof t=="number"?this.values.note=t:this.values=t,this.midiConnection=r.api.MidiConnection}}const lo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,xR=new Set,zm=typeof process=="object"&&process?process:{},kR=(n,e,t,r)=>{typeof zm.emitWarning=="function"?zm.emitWarning(n,e,t,r):console.error(`[${t}] ${e}: ${n}`)};let Pc=globalThis.AbortController,bE=globalThis.AbortSignal;var dv;if(typeof Pc>"u"){bE=class{constructor(){v(this,"onabort");v(this,"_onabort",[]);v(this,"reason");v(this,"aborted",!1)}addEventListener(r,i){this._onabort.push(i)}},Pc=class{constructor(){v(this,"signal",new bE);e()}abort(r){var i,s;if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(const a of this.signal._onabort)a(r);(s=(i=this.signal).onabort)==null||s.call(i,r)}}};let n=((dv=zm.env)==null?void 0:dv.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,kR("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const eB=n=>!xR.has(n),Pi=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),LR=n=>Pi(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Jl:null:null;class Jl extends Array{constructor(e){super(e),this.fill(0)}}var cs;const ha=class ha{constructor(e,t){v(this,"heap");v(this,"length");if(!V(ha,cs))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}static create(e){const t=LR(e);if(!t)return[];Xe(ha,cs,!0);const r=new ha(e,t);return Xe(ha,cs,!1),r}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};cs=new WeakMap,ot(ha,cs,!1);let Hm=ha;var Nn,jr,wn,Dn,us,nr,xn,ir,Mt,it,Dr,Jr,Tr,dr,kn,pr,gi,_i,Ln,Mn,Gi,xr,Xo,Xm,Ea,Si,Zo,en,$c,MR,ba,ds,Ko,qn,Bi,Vn,Ui,jo,Zm,ps,ec,hs,tc,xt,Ft,Jo,Km,Ta,Oo;const m_=class m_{constructor(e){ot(this,Xo);ot(this,$c);ot(this,qn);ot(this,Vn);ot(this,jo);ot(this,ps);ot(this,hs);ot(this,xt);ot(this,Jo);ot(this,Ta);ot(this,Nn,void 0);ot(this,jr,void 0);ot(this,wn,void 0);ot(this,Dn,void 0);ot(this,us,void 0);v(this,"ttl");v(this,"ttlResolution");v(this,"ttlAutopurge");v(this,"updateAgeOnGet");v(this,"updateAgeOnHas");v(this,"allowStale");v(this,"noDisposeOnSet");v(this,"noUpdateTTL");v(this,"maxEntrySize");v(this,"sizeCalculation");v(this,"noDeleteOnFetchRejection");v(this,"noDeleteOnStaleGet");v(this,"allowStaleOnFetchAbort");v(this,"allowStaleOnFetchRejection");v(this,"ignoreFetchAbort");ot(this,nr,void 0);ot(this,xn,void 0);ot(this,ir,void 0);ot(this,Mt,void 0);ot(this,it,void 0);ot(this,Dr,void 0);ot(this,Jr,void 0);ot(this,Tr,void 0);ot(this,dr,void 0);ot(this,kn,void 0);ot(this,pr,void 0);ot(this,gi,void 0);ot(this,_i,void 0);ot(this,Ln,void 0);ot(this,Mn,void 0);ot(this,Gi,void 0);ot(this,xr,void 0);ot(this,Ea,()=>{});ot(this,Si,()=>{});ot(this,Zo,()=>{});ot(this,en,()=>!1);ot(this,ba,e=>{});ot(this,ds,(e,t,r)=>{});ot(this,Ko,(e,t,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:l,dispose:c,disposeAfter:u,noDisposeOnSet:p,noUpdateTTL:m,maxSize:_=0,maxEntrySize:T=0,sizeCalculation:R,fetchMethod:I,noDeleteOnFetchRejection:L,noDeleteOnStaleGet:$,allowStaleOnFetchRejection:K,allowStaleOnFetchAbort:f,ignoreFetchAbort:E}=e;if(t!==0&&!Pi(t))throw new TypeError("max option must be a nonnegative integer");const S=t?LR(t):Array;if(!S)throw new Error("invalid max value: "+t);if(Xe(this,Nn,t),Xe(this,jr,_),this.maxEntrySize=T||V(this,jr),this.sizeCalculation=R,this.sizeCalculation){if(!V(this,jr)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(I!==void 0&&typeof I!="function")throw new TypeError("fetchMethod must be a function if specified");if(Xe(this,us,I),Xe(this,Gi,!!I),Xe(this,ir,new Map),Xe(this,Mt,new Array(t).fill(void 0)),Xe(this,it,new Array(t).fill(void 0)),Xe(this,Dr,new S(t)),Xe(this,Jr,new S(t)),Xe(this,Tr,0),Xe(this,dr,0),Xe(this,kn,Hm.create(t)),Xe(this,nr,0),Xe(this,xn,0),typeof c=="function"&&Xe(this,wn,c),typeof u=="function"?(Xe(this,Dn,u),Xe(this,pr,[])):(Xe(this,Dn,void 0),Xe(this,pr,void 0)),Xe(this,Mn,!!V(this,wn)),Xe(this,xr,!!V(this,Dn)),this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!L,this.allowStaleOnFetchRejection=!!K,this.allowStaleOnFetchAbort=!!f,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(V(this,jr)!==0&&!Pi(V(this,jr)))throw new TypeError("maxSize must be a positive integer if specified");if(!Pi(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Ve(this,$c,MR).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!$,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=Pi(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||0,this.ttl){if(!Pi(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Ve(this,Xo,Xm).call(this)}if(V(this,Nn)===0&&this.ttl===0&&V(this,jr)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!V(this,Nn)&&!V(this,jr)){const N="LRU_CACHE_UNBOUNDED";eB(N)&&(xR.add(N),kR("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",N,m_))}}static unsafeExposeInternals(e){return{starts:V(e,_i),ttls:V(e,Ln),sizes:V(e,gi),keyMap:V(e,ir),keyList:V(e,Mt),valList:V(e,it),next:V(e,Dr),prev:V(e,Jr),get head(){return V(e,Tr)},get tail(){return V(e,dr)},free:V(e,kn),isBackgroundFetch:t=>{var r;return Ve(r=e,xt,Ft).call(r,t)},backgroundFetch:(t,r,i,s)=>{var a;return Ve(a=e,hs,tc).call(a,t,r,i,s)},moveToTail:t=>{var r;return Ve(r=e,Ta,Oo).call(r,t)},indexes:t=>{var r;return Ve(r=e,qn,Bi).call(r,t)},rindexes:t=>{var r;return Ve(r=e,Vn,Ui).call(r,t)},isStale:t=>{var r;return V(r=e,en).call(r,t)}}}get max(){return V(this,Nn)}get maxSize(){return V(this,jr)}get calculatedSize(){return V(this,xn)}get size(){return V(this,nr)}get fetchMethod(){return V(this,us)}get dispose(){return V(this,wn)}get disposeAfter(){return V(this,Dn)}getRemainingTTL(e){return V(this,ir).has(e)?1/0:0}*entries(){for(const e of Ve(this,qn,Bi).call(this))V(this,it)[e]!==void 0&&V(this,Mt)[e]!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield[V(this,Mt)[e],V(this,it)[e]])}*rentries(){for(const e of Ve(this,Vn,Ui).call(this))V(this,it)[e]!==void 0&&V(this,Mt)[e]!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield[V(this,Mt)[e],V(this,it)[e]])}*keys(){for(const e of Ve(this,qn,Bi).call(this)){const t=V(this,Mt)[e];t!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield t)}}*rkeys(){for(const e of Ve(this,Vn,Ui).call(this)){const t=V(this,Mt)[e];t!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield t)}}*values(){for(const e of Ve(this,qn,Bi).call(this))V(this,it)[e]!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield V(this,it)[e])}*rvalues(){for(const e of Ve(this,Vn,Ui).call(this))V(this,it)[e]!==void 0&&!Ve(this,xt,Ft).call(this,V(this,it)[e])&&(yield V(this,it)[e])}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const r of Ve(this,qn,Bi).call(this)){const i=V(this,it)[r],s=Ve(this,xt,Ft).call(this,i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,V(this,Mt)[r],this))return this.get(V(this,Mt)[r],t)}}forEach(e,t=this){for(const r of Ve(this,qn,Bi).call(this)){const i=V(this,it)[r],s=Ve(this,xt,Ft).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,V(this,Mt)[r],this)}}rforEach(e,t=this){for(const r of Ve(this,Vn,Ui).call(this)){const i=V(this,it)[r],s=Ve(this,xt,Ft).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,V(this,Mt)[r],this)}}purgeStale(){let e=!1;for(const t of Ve(this,Vn,Ui).call(this,{allowStale:!0}))V(this,en).call(this,t)&&(this.delete(V(this,Mt)[t]),e=!0);return e}dump(){const e=[];for(const t of Ve(this,qn,Bi).call(this,{allowStale:!0})){const r=V(this,Mt)[t],i=V(this,it)[t],s=Ve(this,xt,Ft).call(this,i)?i.__staleWhileFetching:i;if(s===void 0||r===void 0)continue;const a={value:s};if(V(this,Ln)&&V(this,_i)){a.ttl=V(this,Ln)[t];const o=lo.now()-V(this,_i)[t];a.start=Math.floor(Date.now()-o)}V(this,gi)&&(a.size=V(this,gi)[t]),e.unshift([r,a])}return e}load(e){this.clear();for(const[t,r]of e){if(r.start){const i=Date.now()-r.start;r.start=lo.now()-i}this.set(t,r.value,r)}}set(e,t,r={}){var m,_,T,R,I;if(t===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:s,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=r;let{noUpdateTTL:c=this.noUpdateTTL}=r;const u=V(this,Ko).call(this,e,t,r.size||0,o);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let p=V(this,nr)===0?void 0:V(this,ir).get(e);if(p===void 0)p=V(this,nr)===0?V(this,dr):V(this,kn).length!==0?V(this,kn).pop():V(this,nr)===V(this,Nn)?Ve(this,ps,ec).call(this,!1):V(this,nr),V(this,Mt)[p]=e,V(this,it)[p]=t,V(this,ir).set(e,p),V(this,Dr)[V(this,dr)]=p,V(this,Jr)[p]=V(this,dr),Xe(this,dr,p),fl(this,nr)._++,V(this,ds).call(this,p,u,l),l&&(l.set="add"),c=!1;else{Ve(this,Ta,Oo).call(this,p);const L=V(this,it)[p];if(t!==L){if(V(this,Gi)&&Ve(this,xt,Ft).call(this,L)){L.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:$}=L;$!==void 0&&!a&&(V(this,Mn)&&((m=V(this,wn))==null||m.call(this,$,e,"set")),V(this,xr)&&((_=V(this,pr))==null||_.push([$,e,"set"])))}else a||(V(this,Mn)&&((T=V(this,wn))==null||T.call(this,L,e,"set")),V(this,xr)&&((R=V(this,pr))==null||R.push([L,e,"set"])));if(V(this,ba).call(this,p),V(this,ds).call(this,p,u,l),V(this,it)[p]=t,l){l.set="replace";const $=L&&Ve(this,xt,Ft).call(this,L)?L.__staleWhileFetching:L;$!==void 0&&(l.oldValue=$)}}else l&&(l.set="update")}if(i!==0&&!V(this,Ln)&&Ve(this,Xo,Xm).call(this),V(this,Ln)&&(c||V(this,Zo).call(this,p,i,s),l&&V(this,Si).call(this,l,p)),!a&&V(this,xr)&&V(this,pr)){const L=V(this,pr);let $;for(;$=L==null?void 0:L.shift();)(I=V(this,Dn))==null||I.call(this,...$)}return this}pop(){var e;try{for(;V(this,nr);){const t=V(this,it)[V(this,Tr)];if(Ve(this,ps,ec).call(this,!0),Ve(this,xt,Ft).call(this,t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(V(this,xr)&&V(this,pr)){const t=V(this,pr);let r;for(;r=t==null?void 0:t.shift();)(e=V(this,Dn))==null||e.call(this,...r)}}}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=t,s=V(this,ir).get(e);if(s!==void 0){const a=V(this,it)[s];if(Ve(this,xt,Ft).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(V(this,en).call(this,s))i&&(i.has="stale",V(this,Si).call(this,i,s));else return r&&V(this,Ea).call(this,s),i&&(i.has="hit",V(this,Si).call(this,i,s)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,i=V(this,ir).get(e);if(i!==void 0&&(r||!V(this,en).call(this,i))){const s=V(this,it)[i];return Ve(this,xt,Ft).call(this,s)?s.__staleWhileFetching:s}}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:T=this.allowStaleOnFetchAbort,context:R,forceRefresh:I=!1,status:L,signal:$}=t;if(!V(this,Gi))return L&&(L.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:L});const K={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:T,ignoreFetchAbort:_,status:L,signal:$};let f=V(this,ir).get(e);if(f===void 0){L&&(L.fetch="miss");const E=Ve(this,hs,tc).call(this,e,f,K,R);return E.__returned=E}else{const E=V(this,it)[f];if(Ve(this,xt,Ft).call(this,E)){const M=r&&E.__staleWhileFetching!==void 0;return L&&(L.fetch="inflight",M&&(L.returnedStale=!0)),M?E.__staleWhileFetching:E.__returned=E}const S=V(this,en).call(this,f);if(!I&&!S)return L&&(L.fetch="hit"),Ve(this,Ta,Oo).call(this,f),i&&V(this,Ea).call(this,f),L&&V(this,Si).call(this,L,f),E;const N=Ve(this,hs,tc).call(this,e,f,K,R),x=N.__staleWhileFetching!==void 0&&r;return L&&(L.fetch=S?"stale":"refresh",x&&S&&(L.returnedStale=!0)),x?N.__staleWhileFetching:N.__returned=N}}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=t,o=V(this,ir).get(e);if(o!==void 0){const l=V(this,it)[o],c=Ve(this,xt,Ft).call(this,l);return a&&V(this,Si).call(this,a,o),V(this,en).call(this,o)?(a&&(a.get="stale"),c?(a&&r&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),r?l.__staleWhileFetching:void 0):(s||this.delete(e),a&&r&&(a.returnedStale=!0),r?l:void 0)):(a&&(a.get="hit"),c?l.__staleWhileFetching:(Ve(this,Ta,Oo).call(this,o),i&&V(this,Ea).call(this,o),l))}else a&&(a.get="miss")}delete(e){var r,i,s,a;let t=!1;if(V(this,nr)!==0){const o=V(this,ir).get(e);if(o!==void 0)if(t=!0,V(this,nr)===1)this.clear();else{V(this,ba).call(this,o);const l=V(this,it)[o];Ve(this,xt,Ft).call(this,l)?l.__abortController.abort(new Error("deleted")):(V(this,Mn)||V(this,xr))&&(V(this,Mn)&&((r=V(this,wn))==null||r.call(this,l,e,"delete")),V(this,xr)&&((i=V(this,pr))==null||i.push([l,e,"delete"]))),V(this,ir).delete(e),V(this,Mt)[o]=void 0,V(this,it)[o]=void 0,o===V(this,dr)?Xe(this,dr,V(this,Jr)[o]):o===V(this,Tr)?Xe(this,Tr,V(this,Dr)[o]):(V(this,Dr)[V(this,Jr)[o]]=V(this,Dr)[o],V(this,Jr)[V(this,Dr)[o]]=V(this,Jr)[o]),fl(this,nr)._--,V(this,kn).push(o)}}if(V(this,xr)&&((s=V(this,pr))!=null&&s.length)){const o=V(this,pr);let l;for(;l=o==null?void 0:o.shift();)(a=V(this,Dn))==null||a.call(this,...l)}return t}clear(){var e,t,r;for(const i of Ve(this,Vn,Ui).call(this,{allowStale:!0})){const s=V(this,it)[i];if(Ve(this,xt,Ft).call(this,s))s.__abortController.abort(new Error("deleted"));else{const a=V(this,Mt)[i];V(this,Mn)&&((e=V(this,wn))==null||e.call(this,s,a,"delete")),V(this,xr)&&((t=V(this,pr))==null||t.push([s,a,"delete"]))}}if(V(this,ir).clear(),V(this,it).fill(void 0),V(this,Mt).fill(void 0),V(this,Ln)&&V(this,_i)&&(V(this,Ln).fill(0),V(this,_i).fill(0)),V(this,gi)&&V(this,gi).fill(0),Xe(this,Tr,0),Xe(this,dr,0),V(this,kn).length=0,Xe(this,xn,0),Xe(this,nr,0),V(this,xr)&&V(this,pr)){const i=V(this,pr);let s;for(;s=i==null?void 0:i.shift();)(r=V(this,Dn))==null||r.call(this,...s)}}};Nn=new WeakMap,jr=new WeakMap,wn=new WeakMap,Dn=new WeakMap,us=new WeakMap,nr=new WeakMap,xn=new WeakMap,ir=new WeakMap,Mt=new WeakMap,it=new WeakMap,Dr=new WeakMap,Jr=new WeakMap,Tr=new WeakMap,dr=new WeakMap,kn=new WeakMap,pr=new WeakMap,gi=new WeakMap,_i=new WeakMap,Ln=new WeakMap,Mn=new WeakMap,Gi=new WeakMap,xr=new WeakMap,Xo=new WeakSet,Xm=function(){const e=new Jl(V(this,Nn)),t=new Jl(V(this,Nn));Xe(this,Ln,e),Xe(this,_i,t),Xe(this,Zo,(s,a,o=lo.now())=>{if(t[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){const l=setTimeout(()=>{V(this,en).call(this,s)&&this.delete(V(this,Mt)[s])},a+1);l.unref&&l.unref()}}),Xe(this,Ea,s=>{t[s]=e[s]!==0?lo.now():0}),Xe(this,Si,(s,a)=>{if(e[a]){const o=e[a],l=t[a];s.ttl=o,s.start=l,s.now=r||i();const c=s.now-l;s.remainingTTL=o-c}});let r=0;const i=()=>{const s=lo.now();if(this.ttlResolution>0){r=s;const a=setTimeout(()=>r=0,this.ttlResolution);a.unref&&a.unref()}return s};this.getRemainingTTL=s=>{const a=V(this,ir).get(s);if(a===void 0)return 0;const o=e[a],l=t[a];if(o===0||l===0)return 1/0;const c=(r||i())-l;return o-c},Xe(this,en,s=>e[s]!==0&&t[s]!==0&&(r||i())-t[s]>e[s])},Ea=new WeakMap,Si=new WeakMap,Zo=new WeakMap,en=new WeakMap,$c=new WeakSet,MR=function(){const e=new Jl(V(this,Nn));Xe(this,xn,0),Xe(this,gi,e),Xe(this,ba,t=>{Xe(this,xn,V(this,xn)-e[t]),e[t]=0}),Xe(this,Ko,(t,r,i,s)=>{if(Ve(this,xt,Ft).call(this,r))return 0;if(!Pi(i))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(r,t),!Pi(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),Xe(this,ds,(t,r,i)=>{if(e[t]=r,V(this,jr)){const s=V(this,jr)-e[t];for(;V(this,xn)>s;)Ve(this,ps,ec).call(this,!0)}Xe(this,xn,V(this,xn)+e[t]),i&&(i.entrySize=r,i.totalCalculatedSize=V(this,xn))})},ba=new WeakMap,ds=new WeakMap,Ko=new WeakMap,qn=new WeakSet,Bi=function*({allowStale:e=this.allowStale}={}){if(V(this,nr))for(let t=V(this,dr);!(!Ve(this,jo,Zm).call(this,t)||((e||!V(this,en).call(this,t))&&(yield t),t===V(this,Tr)));)t=V(this,Jr)[t]},Vn=new WeakSet,Ui=function*({allowStale:e=this.allowStale}={}){if(V(this,nr))for(let t=V(this,Tr);!(!Ve(this,jo,Zm).call(this,t)||((e||!V(this,en).call(this,t))&&(yield t),t===V(this,dr)));)t=V(this,Dr)[t]},jo=new WeakSet,Zm=function(e){return e!==void 0&&V(this,ir).get(V(this,Mt)[e])===e},ps=new WeakSet,ec=function(e){var s,a;const t=V(this,Tr),r=V(this,Mt)[t],i=V(this,it)[t];return V(this,Gi)&&Ve(this,xt,Ft).call(this,i)?i.__abortController.abort(new Error("evicted")):(V(this,Mn)||V(this,xr))&&(V(this,Mn)&&((s=V(this,wn))==null||s.call(this,i,r,"evict")),V(this,xr)&&((a=V(this,pr))==null||a.push([i,r,"evict"]))),V(this,ba).call(this,t),e&&(V(this,Mt)[t]=void 0,V(this,it)[t]=void 0,V(this,kn).push(t)),V(this,nr)===1?(Xe(this,Tr,Xe(this,dr,0)),V(this,kn).length=0):Xe(this,Tr,V(this,Dr)[t]),V(this,ir).delete(r),fl(this,nr)._--,t},hs=new WeakSet,tc=function(e,t,r,i){const s=t===void 0?void 0:V(this,it)[t];if(Ve(this,xt,Ft).call(this,s))return s;const a=new Pc,{signal:o}=r;o==null||o.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});const l={signal:a.signal,options:r,context:i},c=(R,I=!1)=>{const{aborted:L}=a.signal,$=r.ignoreFetchAbort&&R!==void 0;if(r.status&&(L&&!I?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,$&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),L&&!$&&!I)return p(a.signal.reason);const K=_;return V(this,it)[t]===_&&(R===void 0?K.__staleWhileFetching?V(this,it)[t]=K.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,R,l.options))),R},u=R=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=R),p(R)),p=R=>{const{aborted:I}=a.signal,L=I&&r.allowStaleOnFetchAbort,$=L||r.allowStaleOnFetchRejection,K=$||r.noDeleteOnFetchRejection,f=_;if(V(this,it)[t]===_&&(!K||f.__staleWhileFetching===void 0?this.delete(e):L||(V(this,it)[t]=f.__staleWhileFetching)),$)return r.status&&f.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),f.__staleWhileFetching;if(f.__returned===f)throw R},m=(R,I)=>{var $;const L=($=V(this,us))==null?void 0:$.call(this,e,s,l);L&&L instanceof Promise&&L.then(K=>R(K===void 0?void 0:K),I),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(R(void 0),r.allowStaleOnFetchAbort&&(R=K=>c(K,!0)))})};r.status&&(r.status.fetchDispatched=!0);const _=new Promise(m).then(c,u),T=Object.assign(_,{__abortController:a,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.set(e,T,{...l.options,status:void 0}),t=V(this,ir).get(e)):V(this,it)[t]=T,T},xt=new WeakSet,Ft=function(e){if(!V(this,Gi))return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Pc},Jo=new WeakSet,Km=function(e,t){V(this,Jr)[t]=e,V(this,Dr)[e]=t},Ta=new WeakSet,Oo=function(e){e!==V(this,dr)&&(e===V(this,Tr)?Xe(this,Tr,V(this,Dr)[e]):Ve(this,Jo,Km).call(this,V(this,Jr)[e],V(this,Dr)[e]),Ve(this,Jo,Km).call(this,V(this,dr),e),Xe(this,dr,e))};let Wm=m_;const Ro=class Ro{constructor(){v(this,"_fallbackMethod",()=>Ro.createSkipProxy());v(this,"out",()=>{})}};v(Ro,"createSkipProxy",()=>{const e=new Ro;return new Proxy(e,{get(t,r,i){return typeof t[r]>"u"?t._fallbackMethod:t[r]},set(t,r,i,s){return!1}})});let Bc=Ro;const Io=class Io extends n_{constructor(t,r){super(r);v(this,"_fallbackMethod",()=>Io.createRestProxy(this.values.length,this.app));v(this,"out",()=>{});this.values.length=t}};v(Io,"createRestProxy",(t,r)=>{const i=new Io(t,r);return new Proxy(i,{get(s,a,o){return typeof s[a]>"u"?s._fallbackMethod:s[a]},set(s,a,o,l){return!1}})});let Uc=Io;class tB extends n_{constructor(t,r,i){super(i);v(this,"input");v(this,"ziffers");v(this,"initCallTime",0);v(this,"startCallTime",0);v(this,"lastCallTime",0);v(this,"waitTime",0);v(this,"startBeat",0);v(this,"played",!1);v(this,"current");v(this,"retro",!1);v(this,"index",-1);v(this,"zid","");v(this,"options",{});v(this,"skipIndex",0);v(this,"endTime",0);v(this,"next",()=>(this.current=this.ziffers.next(),this.played=!0,this.current));v(this,"pulseToSecond",t=>this.app.clock.convertPulseToSecond(t));v(this,"firstRun",()=>this.notStarted());v(this,"atTheBeginning",()=>this.skipIndex===0&&this.ziffers.index<=0);v(this,"origin",()=>this.app.clock.pulses_since_origin+1);v(this,"pulse",()=>this.app.clock.time_position.pulse);v(this,"beat",()=>this.app.clock.time_position.beat);v(this,"nextBeat",()=>this.app.clock.next_beat_in_ticks);v(this,"nextBeatInTicks",()=>this.app.clock.next_beat_in_ticks);v(this,"areWeThereYet",()=>{this.app.clock.pulses_since_origin=this.nextBeatInTicks())&&this.origin()>=this.waitTime,r=this.current&&this.pulseToSecond(this.origin())>=this.pulseToSecond(this.lastCallTime)+this.pulseToSecond(this.current.duration*4*this.app.clock.ppqn)&&this.origin()>=this.waitTime,i=t||r;return this.skipIndex=i?0:this.skipIndex+1,this.index=i?this.index+1:this.index,i&&this.notStarted()&&(this.initCallTime=this.app.clock.pulses_since_origin),this.atTheBeginning()&&(this.startCallTime=this.app.clock.pulses_since_origin),i});v(this,"lead",()=>this.voiceleading());v(this,"invert",t=>(this.atTheBeginning()&&this.ziffers.invert(t),this));v(this,"out",()=>{});this.app=i,this.input=t,this.options=r,this.ziffers=new _3(t,r)}get ticks(){return this.ziffers.duration*4*this.app.clock.ppqn}nextEndTime(){return this.startCallTime+this.ticks}updateLastCallTime(){(this.notStarted()||this.played)&&(this.lastCallTime=this.app.clock.pulses_since_origin,this.played=!1)}notStarted(){return this.ziffers.notStarted()}sound(t){if(this.areWeThereYet()){const r=this.next(),i=this.app.clock.convertPulseToSecond(r.duration*4*this.app.clock.ppqn);if(r instanceof ti){const s=r.getExisting("freq","pitch","key","scale","octave","parsedScale");return r.sound&&(t=r.sound),r.soundIndex&&(s.n=r.soundIndex),s.dur=i,new qm(s,this.app).sound(t||"sine")}else if(r instanceof Na){const s=r.pitches.map(o=>o.getExisting("freq","pitch","key","scale","octave","parsedScale")),a={dur:i};return t&&(a.s=t),new qm(a,this.app).chord(s)}else if(r instanceof Ym)return Uc.createRestProxy(r.duration,this.app)}else return Bc.createSkipProxy()}midi(t=void 0){if(this.areWeThereYet()){const r=this.next(),i=r.getExisting("note","pitch","bend","key","scale","octave","parsedScale");if(r instanceof ti){r.soundIndex&&(i.channel=r.soundIndex);const s=new Vm(i,this.app);return t?s.note(t):s}else{if(r instanceof Ym)return Uc.createRestProxy(r.duration,this.app);if(r instanceof Na){const s=r.midiChord();return new Vm(i,this.app).chord(s)}}}else return Bc.createSkipProxy()}scale(t){return this.atTheBeginning()&&this.ziffers.scale(t),this}key(t){return this.atTheBeginning()&&this.ziffers.key(t),this}octave(t){return this.atTheBeginning()&&this.ziffers.octave(t),this}voiceleading(){return this.atTheBeginning()&&this.ziffers.lead(),this}retrograde(){return this.atTheBeginning()&&this.ziffers.retrograde(),this}wait(t){if(this.atTheBeginning()){if(typeof t=="function"){const r=this.app.api.patternCache.get(t.name);return r&&(this.waitTime=r.nextEndTime()),this}this.waitTime=this.origin()+Math.ceil(t*4*this.app.clock.ppqn)}return this}sync(t){if(this.atTheBeginning()&&this.notStarted()){const r=this.app.clock.pulses_since_origin,i=typeof t=="function"?t.name:t;if(r>0){const s=this.app.api.patternCache.get(i);if(s){const a=s.ziffers.duration,o=s.startCallTime,l=a*4*this.app.clock.ppqn;this.waitTime=o+l}}}return this}}const rB=n=>n[0]==="{"&&n[n.length-1]==="}",co=(n,e)=>{if(rB(n)){const t=JSON.parse(n);return JSON.stringify({...t,...e})}else return JSON.stringify({...e,text:n})},nB=n=>{String.prototype.speak=function(){const e=JSON.parse(this.valueOf());new PR({...e,text:e.text}).speak().then(()=>{}).catch(t=>{console.log("Error speaking:",t)})},String.prototype.rate=function(e){return co(this.valueOf(),{rate:e})},String.prototype.pitch=function(e){return co(this.valueOf(),{pitch:e})},String.prototype.lang=function(e){return co(this.valueOf(),{lang:e})},String.prototype.volume=function(e){return co(this.valueOf(),{volume:e})},String.prototype.voice=function(e){return co(this.valueOf(),{voice:e})},String.prototype.z=function(e={}){return n.z(this.valueOf(),e)},String.prototype.z0=function(e={}){return n.z0(this.valueOf(),e)},String.prototype.z1=function(e={}){return n.z1(this.valueOf(),e)},String.prototype.z2=function(e={}){return n.z2(this.valueOf(),e)},String.prototype.z3=function(e={}){return n.z3(this.valueOf(),e)},String.prototype.z4=function(e={}){return n.z4(this.valueOf(),e)},String.prototype.z5=function(e={}){return n.z5(this.valueOf(),e)},String.prototype.z6=function(e={}){return n.z6(this.valueOf(),e)},String.prototype.z7=function(e={}){return n.z7(this.valueOf(),e)},String.prototype.z8=function(e={}){return n.z8(this.valueOf(),e)},String.prototype.z9=function(e={}){return n.z9(this.valueOf(),e)},String.prototype.z10=function(e={}){return n.z10(this.valueOf(),e)},String.prototype.z11=function(e={}){return n.z11(this.valueOf(),e)},String.prototype.z12=function(e={}){return n.z12(this.valueOf(),e)},String.prototype.z13=function(e={}){return n.z13(this.valueOf(),e)},String.prototype.z14=function(e={}){return n.z14(this.valueOf(),e)},String.prototype.z15=function(e={}){return n.z15(this.valueOf(),e)},String.prototype.z16=function(e={}){return n.z16(this.valueOf(),e)},String.prototype.note=function(){try{return parseInt(this.valueOf())}catch{return oi(this.valueOf())}}};let ed;class PR{constructor(e){v(this,"speak",()=>new Promise((e,t)=>{if(this.options.text){const r=window.speechSynthesis;r.speaking&&r.cancel();const i=new SpeechSynthesisUtterance(this.options.text);i.rate=this.options.rate||1,i.pitch=this.options.pitch||1,i.volume=this.options.volume||1,this.options.voice&&(i.voice=r.getVoices()[this.options.voice]),this.options.lang&&(this.options.lang.length===2?i.lang=`${this.options.lang}-${this.options.lang.toUpperCase()}`:this.options.lang.length===5?i.lang=this.options.lang:i.lang="en-US"),i.onend=()=>{e()},i.onerror=s=>{t(s)},r.speaking?(r.cancel(),ed&&clearTimeout(ed),ed=setTimeout(()=>{r.speak(i)},200)):r.speak(i)}else t("No text provided")}));this.options=e}}async function TE(){return Promise.all([L3(),pa("github:tidalcycles/Dirt-Samples/master").then(()=>W3()),J3(),pa("github:Bubobubobubobubo/Dough-Samples/main"),pa("github:Bubobubobubobubo/Dough-Amiga/main"),pa("github:Bubobubobubobubo/Dough-Amen/main"),pa("github:Bubobubobubobubo/Dough-Waveforms/main")])}class iB{constructor(e){v(this,"variables",{});v(this,"codeExamples",{});v(this,"counters",{});v(this,"_drunk",new E3(-100,100,!1));v(this,"randomGen",Math.random);v(this,"currentSeed");v(this,"localSeeds",new Map);v(this,"patternCache",new Wm({max:1e3,ttl:1e3*60*5}));v(this,"errorTimeoutID",0);v(this,"printTimeoutID",0);v(this,"MidiConnection",new O3);v(this,"load");v(this,"_loadUniverseFromInterface",e=>{this.app.loadUniverse(e),this.app.openBuffersModal()});v(this,"_deleteUniverseFromInterface",e=>{delete this.app.universes[e],this.app.settings.saveApplicationToLocalStorage(this.app.universes,this.app.settings),this.app.updateKnownUniversesView()});v(this,"_playDocExample",e=>{let t=this.app.universes[this.app.selected_universe];this.app.exampleIsPlaying=!0,t.example?t.example.candidate=e||this.app.selectedExample:(t.example={candidate:"",committed:"",evaluations:0},t.example.candidate=e||this.app.selectedExample),this.play()});v(this,"_stopDocExample",()=>{let e=this.app.universes[this.app.selected_universe];(e==null?void 0:e.example)!==void 0&&(this.app.exampleIsPlaying=!1,e.example.candidate="",e.example.committed=""),this.pause()});v(this,"_playDocExampleOnce",e=>{let t=this.app.universes[this.app.selected_universe];(t==null?void 0:t.example)!==void 0&&(t.example.candidate="",t.example.committed=""),this.play(),this.app.exampleIsPlaying=!0,AP(this.app,e)});v(this,"_all_samples",()=>i_.get());v(this,"_reportError",e=>{console.log(e),clearTimeout(this.errorTimeoutID),clearTimeout(this.printTimeoutID),this.app.error_line.innerHTML=e,this.app.error_line.style.color="color-red-800",this.app.error_line.classList.remove("hidden"),this.errorTimeoutID=setTimeout(()=>this.app.error_line.classList.add("hidden"),2e3)});v(this,"_logMessage",e=>{console.log(e),clearTimeout(this.printTimeoutID),clearTimeout(this.errorTimeoutID),this.app.error_line.innerHTML=e,this.app.error_line.style.color="white",this.app.error_line.classList.remove("hidden"),this.printTimeoutID=setTimeout(()=>this.app.error_line.classList.add("hidden"),4e3)});v(this,"time",()=>this.app.audioContext.currentTime);v(this,"play",()=>{this.app.setButtonHighlighting("play",!0),this.app.clock.start()});v(this,"pause",()=>{this.app.setButtonHighlighting("pause",!0),this.app.clock.pause()});v(this,"stop",()=>{this.app.setButtonHighlighting("stop",!0),this.app.clock.stop()});v(this,"silence",this.stop);v(this,"hush",this.stop);v(this,"warp",e=>{this.app.clock.tick=e,this.app.clock.time_position=this.app.clock.convertTicksToTimeposition(e)});v(this,"beat_warp",e=>{this.app.clock.tick=e*this.app.clock.ppqn,this.app.clock.time_position=this.app.clock.convertTicksToTimeposition(e*this.app.clock.ppqn)});v(this,"onmousemove",e=>{this.app._mouseX=e.pageX,this.app._mouseY=e.pageY});v(this,"mouseX",()=>this.app._mouseX);v(this,"mouseY",()=>this.app._mouseY);v(this,"noteX",()=>Math.floor(this.app._mouseX/document.body.clientWidth*127));v(this,"noteY",()=>Math.floor(this.app._mouseY/document.body.clientHeight*127));v(this,"script",(...e)=>{e.forEach(t=>{ls(this.app,this.app.universes[this.app.selected_universe].locals[t])})});v(this,"s",this.script);v(this,"clear_script",e=>{this.app.universes[this.app.selected_universe].locals[e]={candidate:"",committed:"",evaluations:0}});v(this,"cs",this.clear_script);v(this,"copy_script",(e,t)=>{this.app.universes[this.app.selected_universe].locals[t]=this.app.universes[this.app.selected_universe].locals[e]});v(this,"cps",this.copy_script);v(this,"midi_outputs",()=>{this._logMessage(this.MidiConnection.listMidiOutputs())});v(this,"midi_output",e=>{e?this.MidiConnection.switchMidiOutput(e):console.log(this.MidiConnection.getCurrentMidiPort())});v(this,"midi",(e=60,t,r)=>(t!==void 0&&(typeof e=="number"&&(e={note:e}),e.velocity=t),r!==void 0&&(typeof e=="number"&&(e={note:e}),e.channel=r),new Vm(e,this.app)));v(this,"sysex",e=>{this.MidiConnection.sendSysExMessage(e)});v(this,"pitch_bend",(e,t)=>{this.MidiConnection.sendPitchBend(e,t)});v(this,"program_change",(e,t)=>{this.MidiConnection.sendProgramChange(e,t)});v(this,"midi_clock",()=>{this.MidiConnection.sendMidiClock()});v(this,"control_change",({control:e=20,value:t=0,channel:r=0})=>{this.MidiConnection.sendMidiControlChange(e,t,r)});v(this,"midi_panic",()=>{this.MidiConnection.panic()});v(this,"generateCacheKey",(...e)=>e.map(t=>JSON.stringify(t)).join(","));v(this,"z",(e,t={},r="")=>{const i="z"+r.toString(),s=r===""?this.generateCacheKey(e,t):i;let a;return this.app.api.patternCache.has(s)&&(a=this.app.api.patternCache.get(s),a.input!==e&&(a=void 0)),a||(a=new tB(e,t,this.app),this.app.api.patternCache.set(s,a)),typeof r=="number"&&(a.zid=i),a.updateLastCallTime(),r!==""&&a.sync("z0"),a});v(this,"z0",(e,t={})=>this.z(e,t,0));v(this,"z1",(e,t={})=>this.z(e,t,1));v(this,"z2",(e,t={})=>this.z(e,t,2));v(this,"z3",(e,t={})=>this.z(e,t,3));v(this,"z4",(e,t={})=>this.z(e,t,4));v(this,"z5",(e,t={})=>this.z(e,t,5));v(this,"z6",(e,t={})=>this.z(e,t,6));v(this,"z7",(e,t={})=>this.z(e,t,7));v(this,"z8",(e,t={})=>this.z(e,t,8));v(this,"z9",(e,t={})=>this.z(e,t,9));v(this,"z10",(e,t={})=>this.z(e,t,10));v(this,"z11",(e,t={})=>this.z(e,t,11));v(this,"z12",(e,t={})=>this.z(e,t,12));v(this,"z13",(e,t={})=>this.z(e,t,13));v(this,"z14",(e,t={})=>this.z(e,t,14));v(this,"z15",(e,t={})=>this.z(e,t,15));v(this,"z16",(e,t={})=>this.z(e,t,16));v(this,"counter",(e,t,r)=>(e in this.counters?(this.counters[e].limit!==t&&(this.counters[e].value=0,this.counters[e].limit=t),this.counters[e].step!==r&&(this.counters[e].step=r??this.counters[e].step),this.counters[e].value+=this.counters[e].step,this.counters[e].limit!==void 0&&this.counters[e].value>this.counters[e].limit&&(this.counters[e].value=0)):this.counters[e]={value:0,step:r??1,limit:t},this.counters[e].value));v(this,"$",this.counter);v(this,"i",e=>e!==void 0?(this.app.universes[this.app.selected_universe].global.evaluations=e,this.app.universes[this.app.selected_universe]):this.app.universes[this.app.selected_universe].global.evaluations);v(this,"drunk",e=>e!==void 0?(this._drunk.position=e,this._drunk.getPosition()):(this._drunk.step(),this._drunk.getPosition()));v(this,"drunk_max",e=>{this._drunk.max=e});v(this,"drunk_min",e=>{this._drunk.min=e});v(this,"drunk_wrap",e=>{this._drunk.toggleWrap(e)});v(this,"variable",(e,t)=>typeof e=="string"&&t===void 0?this.variables[e]:(this.variables[e]=t,this.variables[e]));v(this,"v",this.variable);v(this,"delete_variable",e=>{delete this.variables[e]});v(this,"dv",this.delete_variable);v(this,"clear_variables",()=>{this.variables={}});v(this,"cv",this.clear_variables);v(this,"randI",(e,t)=>Math.floor(this.randomGen()*(t-e+1))+e);v(this,"rand",(e,t)=>this.randomGen()*(t-e)+e);v(this,"irand",this.randI);v(this,"rI",this.randI);v(this,"r",this.rand);v(this,"ir",this.randI);v(this,"seed",e=>{typeof e=="number"&&(e=e.toString()),this.currentSeed!==e&&(this.currentSeed=e,this.randomGen=Fm(e))});v(this,"localSeededRandom",e=>{if(typeof e=="number"&&(e=e.toString()),this.localSeeds.has(e))return this.localSeeds.get(e);const t=Fm(e);return this.localSeeds.set(e,t),t});v(this,"clearLocalSeed",(e=void 0)=>{e&&this.localSeeds.delete(e.toString()),this.localSeeds.clear()});v(this,"quantize",(e,t)=>{if(t.length===0)return e;let r=t[0];return t.forEach(i=>{Math.abs(i-e)Math.min(Math.max(e,t),r));v(this,"cmp",this.clamp);v(this,"bpm",e=>e===void 0?this.app.clock.bpm:((e<1||e>500)&&console.log(`Setting bpm to ${e}`),this.app.clock.bpm=e,e));v(this,"tempo",this.bpm);v(this,"bpb",e=>e===void 0?this.app.clock.time_signature[0]:(e<1&&console.log(`Setting bpb to ${e}`),this.app.clock.time_signature[0]=e,e));v(this,"ppqn",e=>e===void 0?this.app.clock.ppqn:(e<1&&console.log(`Setting ppqn to ${e}`),this.app.clock.ppqn=e,e));v(this,"time_signature",(e,t)=>{this.app.clock.time_signature=[e,t]});v(this,"prob",e=>this.randomGen()*100this.randomGen()>.5);v(this,"odds",(e,t=1)=>this.randomGen()!1);v(this,"almostNever",(e=1)=>this.randomGen()<.025*this.ppqn()/(this.ppqn()*e));v(this,"rarely",(e=1)=>this.randomGen()<.1*this.ppqn()/(this.ppqn()*e));v(this,"scarcely",(e=1)=>this.randomGen()<.25*this.ppqn()/(this.ppqn()*e));v(this,"sometimes",(e=1)=>this.randomGen()<.5*this.ppqn()/(this.ppqn()*e));v(this,"often",(e=1)=>this.randomGen()<.75*this.ppqn()/(this.ppqn()*e));v(this,"frequently",(e=1)=>this.randomGen()<.9*this.ppqn()/(this.ppqn()*e));v(this,"almostAlways",(e=1)=>this.randomGen()<.985*this.ppqn()/(this.ppqn()*e));v(this,"always",(e=1)=>!0);v(this,"dice",e=>Math.floor(this.randomGen()*e)+1);v(this,"cbar",()=>this.app.clock.time_position.bar+1);v(this,"ctick",()=>this.app.clock.tick+1);v(this,"cpulse",()=>this.app.clock.time_position.pulse+1);v(this,"cbeat",()=>this.app.clock.time_position.beat+1);v(this,"ebeat",()=>this.app.clock.beats_since_origin+1);v(this,"epulse",()=>this.app.clock.pulses_since_origin+1);v(this,"nominator",()=>this.app.clock.time_signature[0]);v(this,"meter",()=>this.app.clock.time_signature[1]);v(this,"denominator",this.meter);v(this,"beat",(...e)=>e.map(r=>this.app.clock.pulses_since_origin%Math.floor(r*this.ppqn())===0).some(r=>r===!0));v(this,"b",this.beat);v(this,"pulse",(...e)=>e.map(r=>this.app.clock.pulses_since_origin%r===0).some(r=>r===!0));v(this,"flip",(e,t=50)=>{const r=this.app.clock.pulses_since_origin,i=Math.floor(e*this.ppqn()),s=Math.floor(t/100*i);return r%i{const t=this.app.clock.time_position.bar;return Math.floor(t/e)%2===0});v(this,"onbar",(e,t=this.app.clock.time_signature[0])=>{let r=this.app.clock.time_position.bar%t+1;return typeof e=="number"?e===r:e.some(i=>i==r)});v(this,"onbeat",(...e)=>{let t=[];return e.forEach(r=>{let i=r%this.nominator()||this.nominator(),s=Math.floor(i);s=s==0?this.nominator():s;let a=Math.floor((i-s)*this.ppqn()+1);a<=0&&(a=a+this.ppqn()*this.nominator()),t.push(s===this.cbeat()&&this.cpulse()===a)}),t.some(r=>r==!0)});v(this,"oncount",(e,t)=>{typeof e=="number"&&(e=[e]);const r=this.app.clock.pulses_since_origin;let i=[];return e.forEach(s=>{s=s<1?0:s-1;const a=Math.ceil(s*this.ppqn()),o=r%(this.ppqn()*t);return i.push(o===a)}),i.some(s=>s==!0)});v(this,"oneuclid",(e,t,r=0)=>{const s=this._euclidean_cycle(e,t,r).reduce((a,o,l)=>(o&&a.push(l+1),a),[]);return this.oncount(s,t)});v(this,"delay",(e,t)=>{setTimeout(t,e)});v(this,"delayr",(e,t,r)=>{[...Array(t).keys()].map(s=>e*s).forEach((s,a)=>{setTimeout(r,s)})});v(this,"euclid",(e,t,r,i=0)=>this._euclidean_cycle(t,r,i)[e%r]);v(this,"ec",this.euclid);v(this,"rhythm",(e,t,r,i=0)=>this.beat(e)&&this._euclidean_cycle(t,r,i).beat(e));v(this,"bin",(e,t)=>{let i=t.toString(2).split("").map(s=>s==="1");return i[e%i.length]});v(this,"binrhythm",(e,t)=>{let i=t.toString(2).split("").map(s=>s==="1");return this.beat(e)&&i.beat(e)});v(this,"line",(e,t,r=1)=>{const i=[];if(t>e&&r>0||tMath.sin(this.app.clock.ctx.currentTime*Math.PI*2*e)+t);v(this,"usine",(e=1,t=0)=>(this.sine(e,t)+1)/2);v(this,"saw",(e=1,t=0)=>this.app.clock.ctx.currentTime*e%1*2-1+t);v(this,"usaw",(e=1,t=0)=>(this.saw(e,t)+1)/2);v(this,"triangle",(e=1,t=0)=>Math.abs(this.saw(e,t))*2-1);v(this,"utriangle",(e=1,t=0)=>(this.triangle(e,t)+1)/2);v(this,"square",(e=1,t=0,r=.5)=>{const i=1/e;return(Date.now()/1e3+t)%i/i(this.square(e,t,r)+1)/2);v(this,"noise",()=>this.randomGen()*2-1);v(this,"min",(...e)=>Math.min(...e));v(this,"max",(...e)=>Math.max(...e));v(this,"mean",(...e)=>e.reduce((r,i)=>r+i,0)/e.length);v(this,"limit",(e,t,r)=>Math.min(Math.max(e,t),r));v(this,"abs",Math.abs);v(this,"speak",(e,t="en-US",r=0,i=1,s=1)=>{new PR({text:e,lang:t,voice:r,rate:i,pitch:s}).speak().then(()=>{}).catch(o=>{console.log(o)})});v(this,"stop_hydra",()=>{this.app.hydra.hush()});v(this,"sound",e=>new qm(e,this.app));v(this,"snd",this.sound);v(this,"samples",pa);v(this,"log",e=>{console.log(e),this._logMessage(e)});v(this,"scale",r_);v(this,"rate",e=>{});v(this,"divseq",(...e)=>{const t=e[0],r=e.slice(1),i=this.app.clock.pulses_since_origin,s=Math.floor(i/Math.floor(t*this.ppqn()));return r[s%r.length]});v(this,"seqbeat",(...e)=>e[this.app.clock.time_position.beat%e.length]);v(this,"seqbar",(...e)=>e[(this.app.clock.time_position.bar+1)%e.length]);this.app=e}_euclidean_cycle(e,t,r=0){if(e==t)return Array.from({length:t},()=>!0);function i(o,l){const c=o.length,u=(l+1)%c;return o[l]>o[u]}if(e>=t)return[!0];const s=Array.from({length:t},(o,l)=>(e*(l-1)%t+t)%t);let a=s.map((o,l)=>i(s,l));return r!=0&&(a=a.slice(r).concat(a.slice(0,r))),a}}const aB=n=>{Array.prototype.in=function(e){return this.includes(e)},Array.prototype.square=function(){return this.map(e=>e*e)},Array.prototype.sqrt=function(){if(this.some(e=>e<0))throw new Error("Cannot take square root of negative number");return this.map(e=>Math.sqrt(e))},Array.prototype.add=function(e){return this.map(t=>t+e)},Array.prototype.sub=function(e){return this.map(t=>t-e)},Array.prototype.mult=function(e){return this.map(t=>t*e)},Array.prototype.div=function(e){if(e===0)throw new Error("Division by zero");return this.map(t=>t/e)},Array.prototype.pick=function(){return this[Math.floor(n.randomGen()*this.length)]},Array.prototype.gen=function(e,t,r){return r<1?[]:Array.from({length:r},()=>Math.floor(n.randomGen()*(t-e+1))+e)},Array.prototype.bar=function(){return this[n.app.clock.time_position.bar%this.length]},Array.prototype.pulse=function(){return this[n.app.clock.time_position.pulse%this.length]},Array.prototype.beat=function(e=1){const t=e,r=n.app.clock.pulses_since_origin,i=Math.floor(r/Math.floor(t*n.ppqn()));return this[i%this.length]},Array.prototype.b=Array.prototype.beat,Array.prototype.shuffle=function(){let e=this.length,t;for(;e!==0;)t=Math.floor(n.randomGen()*e),e--,[this[e],this[t]]=[this[t],this[e]];return this},Array.prototype.rotate=function(e){const t=this.length;if(e<0)e=t+e%t;else if(e>0)e=e%t;else return this;const r=this.splice(-e,e);return this.unshift(...r),this},Array.prototype.unique=function(){const e=new Set;let t=0;for(let r=0;r100)throw new Error("Amount should be between 0 and 100");if(this.length<=1)return this;for(let t=0;t1)this.splice(t,1);else return this;else t++;return this},Array.prototype.repeatAll=function(e=1){if(e<1)throw new Error("Amount should be at least 1");let t=[];for(let r=0;r(i%s+s)%s,r=yR(ll(n));return this.map(i=>{const s=Math.floor(i/r.length)*12;return r[t(i,r.length)]+e+s})};Array.prototype.scaleArp=function(n="major",e=0){const t=yR(ll(n));let r=[];e=e>t.length?t.length:e,e=e==0?t.length:e;for(let i=0;i>1|(Bt&21845)<<1;Li=(Li&52428)>>2|(Li&13107)<<2,Li=(Li&61680)>>4|(Li&3855)<<4,eg[Bt]=((Li&65280)>>8|(Li&255)<<8)>>1}var ri=function(n,e,t){for(var r=n.length,i=0,s=new on(e);i>l]=c}else for(o=new on(r),i=0;i>15-n[i]);return o},Ki=new Sr(288);for(var Bt=0;Bt<144;++Bt)Ki[Bt]=8;for(var Bt=144;Bt<256;++Bt)Ki[Bt]=9;for(var Bt=256;Bt<280;++Bt)Ki[Bt]=7;for(var Bt=280;Bt<288;++Bt)Ki[Bt]=8;var zo=new Sr(32);for(var Bt=0;Bt<32;++Bt)zo[Bt]=5;var oB=ri(Ki,9,0),lB=ri(Ki,9,1),cB=ri(zo,5,0),uB=ri(zo,5,1),td=function(n){for(var e=n[0],t=1;te&&(e=n[t]);return e},In=function(n,e,t){var r=e/8|0;return(n[r]|n[r+1]<<8)>>(e&7)&t},rd=function(n,e){var t=e/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(e&7)},l_=function(n){return(n+7)/8|0},c_=function(n,e,t){(e==null||e<0)&&(e=0),(t==null||t>n.length)&&(t=n.length);var r=new Sr(t-e);return r.set(n.subarray(e,t)),r},dB=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Yr=function(n,e,t){var r=new Error(e||dB[n]);if(r.code=n,Error.captureStackTrace&&Error.captureStackTrace(r,Yr),!t)throw r;return r},u_=function(n,e,t,r){var i=n.length,s=r?r.length:0;if(!i||e.f&&!e.l)return t||new Sr(0);var a=!t||e.i!=2,o=e.i;t||(t=new Sr(i*3));var l=function(Le){var tt=t.length;if(Le>tt){var nt=new Sr(Math.max(tt*2,Le));nt.set(t),t=nt}},c=e.f||0,u=e.p||0,p=e.b||0,m=e.l,_=e.d,T=e.m,R=e.n,I=i*8;do{if(!m){c=In(n,u,1);var L=In(n,u+1,3);if(u+=3,L)if(L==1)m=lB,_=uB,T=9,R=5;else if(L==2){var E=In(n,u,31)+257,S=In(n,u+10,15)+4,N=E+In(n,u+5,31)+1;u+=14;for(var k=new Sr(N),x=new Sr(19),M=0;M>4;if($<16)k[M++]=$;else{var ee=0,B=0;for($==16?(B=3+In(n,u,3),u+=2,ee=k[M-1]):$==17?(B=3+In(n,u,7),u+=3):$==18&&(B=11+In(n,u,127),u+=7);B--;)k[M++]=ee}}var Q=k.subarray(0,E),j=k.subarray(E);T=td(Q),R=td(j),m=ri(Q,T,1),_=ri(j,R,1)}else Yr(1);else{var $=l_(u)+4,K=n[$-4]|n[$-3]<<8,f=$+K;if(f>i){o&&Yr(0);break}a&&l(p+K),t.set(n.subarray($,f),p),e.b=p+=K,e.p=u=f*8,e.f=c;continue}if(u>I){o&&Yr(0);break}}a&&l(p+131072);for(var Z=(1<>4;if(u+=ee&15,u>I){o&&Yr(0);break}if(ee||Yr(2),Ee<256)t[p++]=Ee;else if(Ee==256){le=u,m=null;break}else{var De=Ee-254;if(Ee>264){var M=Ee-257,xe=nu[M];De=In(n,u,(1<>4;be||Yr(3),u+=be&15;var j=sB[Ie];if(Ie>3){var xe=iu[Ie];j+=rd(n,u)&(1<I){o&&Yr(0);break}a&&l(p+131072);var ce=p+De;if(p>8},uo=function(n,e,t){t<<=e&7;var r=e/8|0;n[r]|=t,n[r+1]|=t>>8,n[r+2]|=t>>16},nd=function(n,e){for(var t=[],r=0;rm&&(m=s[r].s);var _=new on(m+1),T=tg(t[u-1],_,0);if(T>e){var r=0,R=0,I=T-e,L=1<e)R+=L-(1<>=I;R>0;){var K=s[r].s;_[K]=0&&R;--r){var f=s[r].s;_[f]==e&&(--_[f],++R)}T=e}return{t:new Sr(_),l:T}},tg=function(n,e,t){return n.s==-1?Math.max(tg(n.l,e,t+1),tg(n.r,e,t+1)):e[n.s]=t},CE=function(n){for(var e=n.length;e&&!n[--e];);for(var t=new on(++e),r=0,i=n[0],s=1,a=function(l){t[r++]=l},o=1;o<=e;++o)if(n[o]==i&&o!=e)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=n[o]}return{c:t.subarray(0,r),n:e}},po=function(n,e){for(var t=0,r=0;r>8,n[i+2]=n[i]^255,n[i+3]=n[i+1]^255;for(var s=0;s4&&!M[jm[te-1]];--te);var ne=c+5<<3,re=po(i,Ki)+po(s,zo)+a,ee=po(i,m)+po(s,R)+a+14+3*te+po(N,M)+2*N[16]+3*N[17]+7*N[18];if(l>=0&&ne<=re&&ne<=ee)return $R(e,u,n.subarray(l,l+c));var B,Q,j,Z;if(fi(e,u,1+(ee15&&(fi(e,u,De[k]>>5&127),u+=De[k]>>12)}}else B=oB,Q=Ki,j=cB,Z=zo;for(var k=0;k255){var xe=be>>18&31;uo(e,u,B[xe+257]),u+=Q[xe+257],xe>7&&(fi(e,u,be>>23&31),u+=nu[xe]);var Ie=be&31;uo(e,u,j[Ie]),u+=Z[Ie],Ie>3&&(uo(e,u,be>>5&8191),u+=iu[Ie])}else uo(e,u,B[be]),u+=Q[be]}return uo(e,u,B[256]),u+Q[256]},pB=new o_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),GR=new Sr(0),hB=function(n,e,t,r,i,s){var a=s.z||n.length,o=new Sr(r+a+5*(1+Math.ceil(a/7e3))+i),l=o.subarray(r,o.length-i),c=s.l,u=(s.r||0)&7;if(e){u&&(l[0]=s.r>>3);for(var p=pB[e-1],m=p>>13,_=p&8191,T=(1<7e3||M>24576)&&(B>423||!c)){u=yE(n,l,0,f,E,S,k,M,te,x-te,u),M=N=k=0,te=x;for(var Q=0;Q<286;++Q)E[Q]=0;for(var Q=0;Q<30;++Q)S[Q]=0}var j=2,Z=0,ue=_,le=re-ee&32767;if(B>2&&ne==K(x-le))for(var Ee=Math.min(m,B)-1,De=Math.min(32767,x),xe=Math.min(258,B);le<=De&&--ue&&re!=ee;){if(n[x+j]==n[x+j-le]){for(var be=0;bej){if(j=be,Z=le,be>Ee)break;for(var Ie=Math.min(le,be-2),ce=0,Q=0;Qce&&(ce=Le,ee=ke)}}}re=ee,ee=R[re],le+=re-ee&32767}if(Z){f[M++]=268435456|Jm[j]<<18|vE[Z];var tt=Jm[j]&31,nt=vE[Z]&31;k+=nu[tt]+iu[nt],++E[257+tt],++S[nt],G=x+j,++N}else f[M++]=n[x],++E[n[x]]}}for(x=Math.max(x,G);x=a&&(l[u/8|0]=c,ze=a),u=$R(l,u+1,n.subarray(x,ze))}s.i=a}return c_(o,0,r+l_(u)+i)},fB=function(){for(var n=new Int32Array(256),e=0;e<256;++e){for(var t=e,r=9;--r;)t=(t&1&&-306674912)^t>>>1;n[e]=t}return n}(),mB=function(){var n=-1;return{p:function(e){for(var t=n,r=0;r>>8;n=t},d:function(){return~n}}},gB=function(n,e,t,r,i){if(!i&&(i={l:1},e.dictionary)){var s=e.dictionary.subarray(-32768),a=new Sr(s.length+n.length);a.set(s),a.set(n,s.length),n=a,i.w=s.length}return hB(n,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):12+e.mem,t,r,i)},rg=function(n,e,t){for(;t;++e)n[e]=t,t>>>=8},_B=function(n,e){var t=e.filename;if(n[0]=31,n[1]=139,n[2]=8,n[8]=e.level<2?4:e.level==9?2:0,n[9]=3,e.mtime!=0&&rg(n,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){n[3]=8;for(var r=0;r<=t.length;++r)n[r+10]=t.charCodeAt(r)}},SB=function(n){(n[0]!=31||n[1]!=139||n[2]!=8)&&Yr(6,"invalid gzip data");var e=n[3],t=10;e&4&&(t+=(n[10]|n[11]<<8)+2);for(var r=(e>>3&1)+(e>>4&1);r>0;r-=!n[t++]);return t+(e&2)},OB=function(n){var e=n.length;return(n[e-4]|n[e-3]<<8|n[e-2]<<16|n[e-1]<<24)>>>0},EB=function(n){return 10+(n.filename?n.filename.length+1:0)},bB=function(n,e){return((n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31)&&Yr(6,"invalid zlib data"),(n[1]>>5&1)==+!e&&Yr(6,"invalid zlib data: "+(n[1]&32?"need":"unexpected")+" dictionary"),(n[1]>>3&4)+2};function TB(n,e){return u_(n,{i:2},e&&e.out,e&&e.dictionary)}function vB(n,e){e||(e={});var t=mB(),r=n.length;t.p(n);var i=gB(n,e,EB(e),8),s=i.length;return _B(i,e),rg(i,s-8,t.d()),rg(i,s-4,r),i}function CB(n,e){var t=SB(n);return t+8>n.length&&Yr(6,"invalid gzip data"),u_(n.subarray(t,-8),{i:2},e&&e.out||new Sr(OB(n)),e&&e.dictionary)}function yB(n,e){return u_(n.subarray(bB(n,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function AB(n,e){return n[0]==31&&n[1]==139&&n[2]==8?CB(n,e):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?TB(n,e):yB(n,e)}var ng=typeof TextDecoder<"u"&&new TextDecoder,RB=0;try{ng.decode(GR,{stream:!0}),RB=1}catch{}var IB=function(n){for(var e="",t=0;;){var r=n[t++],i=(r>127)+(r>223)+(r>239);if(t+i>n.length)return{s:e,r:c_(n,t-1)};i?i==3?(r=((r&15)<<18|(n[t++]&63)<<12|(n[t++]&63)<<6|n[t++]&63)-65536,e+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?e+=String.fromCharCode((r&31)<<6|n[t++]&63):e+=String.fromCharCode((r&15)<<12|(n[t++]&63)<<6|n[t++]&63):e+=String.fromCharCode(r)}};function NB(n,e){if(e){for(var t="",r=0;r (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `ยซยซยซ` and `ยปยปยป` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(f===!1)return JSON.parse(JSON.stringify(E));var S={};for(var N in E)E.hasOwnProperty(N)&&(S[N]=E[N].defaultValue);return S}function t(){var f=e(!0),E={};for(var S in f)f.hasOwnProperty(S)&&(E[S]=!0);return E}var r={},i={},s={},a=e(!0),o="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:e(!0),allOn:t()};r.helper={},r.extensions={},r.setOption=function(f,E){return a[f]=E,this},r.getOption=function(f){return a[f]},r.getOptions=function(){return a},r.resetOptions=function(){a=e(!0)},r.setFlavor=function(f){if(!l.hasOwnProperty(f))throw Error(f+" flavor was not found");r.resetOptions();var E=l[f];o=f;for(var S in E)E.hasOwnProperty(S)&&(a[S]=E[S])},r.getFlavor=function(){return o},r.getFlavorOptions=function(f){if(l.hasOwnProperty(f))return l[f]},r.getDefaultOptions=function(f){return e(f)},r.subParser=function(f,E){if(r.helper.isString(f))if(typeof E<"u")i[f]=E;else{if(i.hasOwnProperty(f))return i[f];throw Error("SubParser named "+f+" not registered!")}},r.extension=function(f,E){if(!r.helper.isString(f))throw Error("Extension 'name' must be a string");if(f=r.helper.stdExtName(f),r.helper.isUndefined(E)){if(!s.hasOwnProperty(f))throw Error("Extension named "+f+" is not registered!");return s[f]}else{typeof E=="function"&&(E=E()),r.helper.isArray(E)||(E=[E]);var S=c(E,f);if(S.valid)s[f]=E;else throw Error(S.error)}},r.getAllExtensions=function(){return s},r.removeExtension=function(f){delete s[f]},r.resetExtensions=function(){s={}};function c(f,E){var S=E?"Error in "+E+" extension->":"Error in unnamed extension",N={valid:!0,error:""};r.helper.isArray(f)||(f=[f]);for(var k=0;k"u"},r.helper.forEach=function(f,E){if(r.helper.isUndefined(f))throw new Error("obj param is required");if(r.helper.isUndefined(E))throw new Error("callback param is required");if(!r.helper.isFunction(E))throw new Error("callback param must be a function/closure");if(typeof f.forEach=="function")f.forEach(E);else if(r.helper.isArray(f))for(var S=0;S").replace(/&/g,"&")};var p=function(f,E,S,N){var k=N||"",x=k.indexOf("g")>-1,M=new RegExp(E+"|"+S,"g"+k.replace(/g/g,"")),G=new RegExp(E,k.replace(/g/g,"")),te=[],ne,re,ee,B,Q;do for(ne=0;ee=M.exec(f);)if(G.test(ee[0]))ne++||(re=M.lastIndex,B=re-ee[0].length);else if(ne&&!--ne){Q=ee.index+ee[0].length;var j={left:{start:B,end:re},match:{start:re,end:ee.index},right:{start:ee.index,end:Q},wholeMatch:{start:B,end:Q}};if(te.push(j),!x)return te}while(ne&&(M.lastIndex=re));return te};r.helper.matchRecursiveRegExp=function(f,E,S,N){for(var k=p(f,E,S,N),x=[],M=0;M0){var ne=[];M[0].wholeMatch.start!==0&&ne.push(f.slice(0,M[0].wholeMatch.start));for(var re=0;re=0?N+(S||0):N},r.helper.splitAtIndex=function(f,E){if(!r.helper.isString(f))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[f.substring(0,E),f.substring(E)]},r.helper.encodeEmailAddress=function(f){var E=[function(S){return"&#"+S.charCodeAt(0)+";"},function(S){return"&#x"+S.charCodeAt(0).toString(16)+";"},function(S){return S}];return f=f.replace(/./g,function(S){if(S==="@")S=E[Math.floor(Math.random()*2)](S);else{var N=Math.random();S=N>.9?E[2](S):N>.45?E[1](S):E[0](S)}return S}),f},r.helper.padEnd=function(E,S,N){return S=S>>0,N=String(N||" "),E.length>S?String(E):(S=S-E.length,S>N.length&&(N+=N.repeat(S/N.length)),String(E)+N.slice(0,S))},typeof console>"u"&&(console={warn:function(f){alert(f)},log:function(f){alert(f)},error:function(f){throw f}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"๐Ÿ‘","-1":"๐Ÿ‘Ž",100:"๐Ÿ’ฏ",1234:"๐Ÿ”ข","1st_place_medal":"๐Ÿฅ‡","2nd_place_medal":"๐Ÿฅˆ","3rd_place_medal":"๐Ÿฅ‰","8ball":"๐ŸŽฑ",a:"๐Ÿ…ฐ๏ธ",ab:"๐Ÿ†Ž",abc:"๐Ÿ”ค",abcd:"๐Ÿ”ก",accept:"๐Ÿ‰‘",aerial_tramway:"๐Ÿšก",airplane:"โœˆ๏ธ",alarm_clock:"โฐ",alembic:"โš—๏ธ",alien:"๐Ÿ‘ฝ",ambulance:"๐Ÿš‘",amphora:"๐Ÿบ",anchor:"โš“๏ธ",angel:"๐Ÿ‘ผ",anger:"๐Ÿ’ข",angry:"๐Ÿ˜ ",anguished:"๐Ÿ˜ง",ant:"๐Ÿœ",apple:"๐ŸŽ",aquarius:"โ™’๏ธ",aries:"โ™ˆ๏ธ",arrow_backward:"โ—€๏ธ",arrow_double_down:"โฌ",arrow_double_up:"โซ",arrow_down:"โฌ‡๏ธ",arrow_down_small:"๐Ÿ”ฝ",arrow_forward:"โ–ถ๏ธ",arrow_heading_down:"โคต๏ธ",arrow_heading_up:"โคด๏ธ",arrow_left:"โฌ…๏ธ",arrow_lower_left:"โ†™๏ธ",arrow_lower_right:"โ†˜๏ธ",arrow_right:"โžก๏ธ",arrow_right_hook:"โ†ช๏ธ",arrow_up:"โฌ†๏ธ",arrow_up_down:"โ†•๏ธ",arrow_up_small:"๐Ÿ”ผ",arrow_upper_left:"โ†–๏ธ",arrow_upper_right:"โ†—๏ธ",arrows_clockwise:"๐Ÿ”ƒ",arrows_counterclockwise:"๐Ÿ”„",art:"๐ŸŽจ",articulated_lorry:"๐Ÿš›",artificial_satellite:"๐Ÿ›ฐ",astonished:"๐Ÿ˜ฒ",athletic_shoe:"๐Ÿ‘Ÿ",atm:"๐Ÿง",atom_symbol:"โš›๏ธ",avocado:"๐Ÿฅ‘",b:"๐Ÿ…ฑ๏ธ",baby:"๐Ÿ‘ถ",baby_bottle:"๐Ÿผ",baby_chick:"๐Ÿค",baby_symbol:"๐Ÿšผ",back:"๐Ÿ”™",bacon:"๐Ÿฅ“",badminton:"๐Ÿธ",baggage_claim:"๐Ÿ›„",baguette_bread:"๐Ÿฅ–",balance_scale:"โš–๏ธ",balloon:"๐ŸŽˆ",ballot_box:"๐Ÿ—ณ",ballot_box_with_check:"โ˜‘๏ธ",bamboo:"๐ŸŽ",banana:"๐ŸŒ",bangbang:"โ€ผ๏ธ",bank:"๐Ÿฆ",bar_chart:"๐Ÿ“Š",barber:"๐Ÿ’ˆ",baseball:"โšพ๏ธ",basketball:"๐Ÿ€",basketball_man:"โ›น๏ธ",basketball_woman:"โ›น๏ธ‍โ™€๏ธ",bat:"๐Ÿฆ‡",bath:"๐Ÿ›€",bathtub:"๐Ÿ›",battery:"๐Ÿ”‹",beach_umbrella:"๐Ÿ–",bear:"๐Ÿป",bed:"๐Ÿ›",bee:"๐Ÿ",beer:"๐Ÿบ",beers:"๐Ÿป",beetle:"๐Ÿž",beginner:"๐Ÿ”ฐ",bell:"๐Ÿ””",bellhop_bell:"๐Ÿ›Ž",bento:"๐Ÿฑ",biking_man:"๐Ÿšด",bike:"๐Ÿšฒ",biking_woman:"๐Ÿšด‍โ™€๏ธ",bikini:"๐Ÿ‘™",biohazard:"โ˜ฃ๏ธ",bird:"๐Ÿฆ",birthday:"๐ŸŽ‚",black_circle:"โšซ๏ธ",black_flag:"๐Ÿด",black_heart:"๐Ÿ–ค",black_joker:"๐Ÿƒ",black_large_square:"โฌ›๏ธ",black_medium_small_square:"โ—พ๏ธ",black_medium_square:"โ—ผ๏ธ",black_nib:"โœ’๏ธ",black_small_square:"โ–ช๏ธ",black_square_button:"๐Ÿ”ฒ",blonde_man:"๐Ÿ‘ฑ",blonde_woman:"๐Ÿ‘ฑ‍โ™€๏ธ",blossom:"๐ŸŒผ",blowfish:"๐Ÿก",blue_book:"๐Ÿ“˜",blue_car:"๐Ÿš™",blue_heart:"๐Ÿ’™",blush:"๐Ÿ˜Š",boar:"๐Ÿ—",boat:"โ›ต๏ธ",bomb:"๐Ÿ’ฃ",book:"๐Ÿ“–",bookmark:"๐Ÿ”–",bookmark_tabs:"๐Ÿ“‘",books:"๐Ÿ“š",boom:"๐Ÿ’ฅ",boot:"๐Ÿ‘ข",bouquet:"๐Ÿ’",bowing_man:"๐Ÿ™‡",bow_and_arrow:"๐Ÿน",bowing_woman:"๐Ÿ™‡‍โ™€๏ธ",bowling:"๐ŸŽณ",boxing_glove:"๐ŸฅŠ",boy:"๐Ÿ‘ฆ",bread:"๐Ÿž",bride_with_veil:"๐Ÿ‘ฐ",bridge_at_night:"๐ŸŒ‰",briefcase:"๐Ÿ’ผ",broken_heart:"๐Ÿ’”",bug:"๐Ÿ›",building_construction:"๐Ÿ—",bulb:"๐Ÿ’ก",bullettrain_front:"๐Ÿš…",bullettrain_side:"๐Ÿš„",burrito:"๐ŸŒฏ",bus:"๐ŸšŒ",business_suit_levitating:"๐Ÿ•ด",busstop:"๐Ÿš",bust_in_silhouette:"๐Ÿ‘ค",busts_in_silhouette:"๐Ÿ‘ฅ",butterfly:"๐Ÿฆ‹",cactus:"๐ŸŒต",cake:"๐Ÿฐ",calendar:"๐Ÿ“†",call_me_hand:"๐Ÿค™",calling:"๐Ÿ“ฒ",camel:"๐Ÿซ",camera:"๐Ÿ“ท",camera_flash:"๐Ÿ“ธ",camping:"๐Ÿ•",cancer:"โ™‹๏ธ",candle:"๐Ÿ•ฏ",candy:"๐Ÿฌ",canoe:"๐Ÿ›ถ",capital_abcd:"๐Ÿ” ",capricorn:"โ™‘๏ธ",car:"๐Ÿš—",card_file_box:"๐Ÿ—ƒ",card_index:"๐Ÿ“‡",card_index_dividers:"๐Ÿ—‚",carousel_horse:"๐ŸŽ ",carrot:"๐Ÿฅ•",cat:"๐Ÿฑ",cat2:"๐Ÿˆ",cd:"๐Ÿ’ฟ",chains:"โ›“",champagne:"๐Ÿพ",chart:"๐Ÿ’น",chart_with_downwards_trend:"๐Ÿ“‰",chart_with_upwards_trend:"๐Ÿ“ˆ",checkered_flag:"๐Ÿ",cheese:"๐Ÿง€",cherries:"๐Ÿ’",cherry_blossom:"๐ŸŒธ",chestnut:"๐ŸŒฐ",chicken:"๐Ÿ”",children_crossing:"๐Ÿšธ",chipmunk:"๐Ÿฟ",chocolate_bar:"๐Ÿซ",christmas_tree:"๐ŸŽ„",church:"โ›ช๏ธ",cinema:"๐ŸŽฆ",circus_tent:"๐ŸŽช",city_sunrise:"๐ŸŒ‡",city_sunset:"๐ŸŒ†",cityscape:"๐Ÿ™",cl:"๐Ÿ†‘",clamp:"๐Ÿ—œ",clap:"๐Ÿ‘",clapper:"๐ŸŽฌ",classical_building:"๐Ÿ›",clinking_glasses:"๐Ÿฅ‚",clipboard:"๐Ÿ“‹",clock1:"๐Ÿ•",clock10:"๐Ÿ•™",clock1030:"๐Ÿ•ฅ",clock11:"๐Ÿ•š",clock1130:"๐Ÿ•ฆ",clock12:"๐Ÿ•›",clock1230:"๐Ÿ•ง",clock130:"๐Ÿ•œ",clock2:"๐Ÿ•‘",clock230:"๐Ÿ•",clock3:"๐Ÿ•’",clock330:"๐Ÿ•ž",clock4:"๐Ÿ•“",clock430:"๐Ÿ•Ÿ",clock5:"๐Ÿ•”",clock530:"๐Ÿ• ",clock6:"๐Ÿ••",clock630:"๐Ÿ•ก",clock7:"๐Ÿ•–",clock730:"๐Ÿ•ข",clock8:"๐Ÿ•—",clock830:"๐Ÿ•ฃ",clock9:"๐Ÿ•˜",clock930:"๐Ÿ•ค",closed_book:"๐Ÿ“•",closed_lock_with_key:"๐Ÿ”",closed_umbrella:"๐ŸŒ‚",cloud:"โ˜๏ธ",cloud_with_lightning:"๐ŸŒฉ",cloud_with_lightning_and_rain:"โ›ˆ",cloud_with_rain:"๐ŸŒง",cloud_with_snow:"๐ŸŒจ",clown_face:"๐Ÿคก",clubs:"โ™ฃ๏ธ",cocktail:"๐Ÿธ",coffee:"โ˜•๏ธ",coffin:"โšฐ๏ธ",cold_sweat:"๐Ÿ˜ฐ",comet:"โ˜„๏ธ",computer:"๐Ÿ’ป",computer_mouse:"๐Ÿ–ฑ",confetti_ball:"๐ŸŽŠ",confounded:"๐Ÿ˜–",confused:"๐Ÿ˜•",congratulations:"ใŠ—๏ธ",construction:"๐Ÿšง",construction_worker_man:"๐Ÿ‘ท",construction_worker_woman:"๐Ÿ‘ท‍โ™€๏ธ",control_knobs:"๐ŸŽ›",convenience_store:"๐Ÿช",cookie:"๐Ÿช",cool:"๐Ÿ†’",policeman:"๐Ÿ‘ฎ",copyright:"ยฉ๏ธ",corn:"๐ŸŒฝ",couch_and_lamp:"๐Ÿ›‹",couple:"๐Ÿ‘ซ",couple_with_heart_woman_man:"๐Ÿ’‘",couple_with_heart_man_man:"๐Ÿ‘จ‍โค๏ธ‍๐Ÿ‘จ",couple_with_heart_woman_woman:"๐Ÿ‘ฉ‍โค๏ธ‍๐Ÿ‘ฉ",couplekiss_man_man:"๐Ÿ‘จ‍โค๏ธ‍๐Ÿ’‹‍๐Ÿ‘จ",couplekiss_man_woman:"๐Ÿ’",couplekiss_woman_woman:"๐Ÿ‘ฉ‍โค๏ธ‍๐Ÿ’‹‍๐Ÿ‘ฉ",cow:"๐Ÿฎ",cow2:"๐Ÿ„",cowboy_hat_face:"๐Ÿค ",crab:"๐Ÿฆ€",crayon:"๐Ÿ–",credit_card:"๐Ÿ’ณ",crescent_moon:"๐ŸŒ™",cricket:"๐Ÿ",crocodile:"๐ŸŠ",croissant:"๐Ÿฅ",crossed_fingers:"๐Ÿคž",crossed_flags:"๐ŸŽŒ",crossed_swords:"โš”๏ธ",crown:"๐Ÿ‘‘",cry:"๐Ÿ˜ข",crying_cat_face:"๐Ÿ˜ฟ",crystal_ball:"๐Ÿ”ฎ",cucumber:"๐Ÿฅ’",cupid:"๐Ÿ’˜",curly_loop:"โžฐ",currency_exchange:"๐Ÿ’ฑ",curry:"๐Ÿ›",custard:"๐Ÿฎ",customs:"๐Ÿ›ƒ",cyclone:"๐ŸŒ€",dagger:"๐Ÿ—ก",dancer:"๐Ÿ’ƒ",dancing_women:"๐Ÿ‘ฏ",dancing_men:"๐Ÿ‘ฏ‍โ™‚๏ธ",dango:"๐Ÿก",dark_sunglasses:"๐Ÿ•ถ",dart:"๐ŸŽฏ",dash:"๐Ÿ’จ",date:"๐Ÿ“…",deciduous_tree:"๐ŸŒณ",deer:"๐ŸฆŒ",department_store:"๐Ÿฌ",derelict_house:"๐Ÿš",desert:"๐Ÿœ",desert_island:"๐Ÿ",desktop_computer:"๐Ÿ–ฅ",male_detective:"๐Ÿ•ต๏ธ",diamond_shape_with_a_dot_inside:"๐Ÿ’ ",diamonds:"โ™ฆ๏ธ",disappointed:"๐Ÿ˜ž",disappointed_relieved:"๐Ÿ˜ฅ",dizzy:"๐Ÿ’ซ",dizzy_face:"๐Ÿ˜ต",do_not_litter:"๐Ÿšฏ",dog:"๐Ÿถ",dog2:"๐Ÿ•",dollar:"๐Ÿ’ต",dolls:"๐ŸŽŽ",dolphin:"๐Ÿฌ",door:"๐Ÿšช",doughnut:"๐Ÿฉ",dove:"๐Ÿ•Š",dragon:"๐Ÿ‰",dragon_face:"๐Ÿฒ",dress:"๐Ÿ‘—",dromedary_camel:"๐Ÿช",drooling_face:"๐Ÿคค",droplet:"๐Ÿ’ง",drum:"๐Ÿฅ",duck:"๐Ÿฆ†",dvd:"๐Ÿ“€","e-mail":"๐Ÿ“ง",eagle:"๐Ÿฆ…",ear:"๐Ÿ‘‚",ear_of_rice:"๐ŸŒพ",earth_africa:"๐ŸŒ",earth_americas:"๐ŸŒŽ",earth_asia:"๐ŸŒ",egg:"๐Ÿฅš",eggplant:"๐Ÿ†",eight_pointed_black_star:"โœด๏ธ",eight_spoked_asterisk:"โœณ๏ธ",electric_plug:"๐Ÿ”Œ",elephant:"๐Ÿ˜",email:"โœ‰๏ธ",end:"๐Ÿ”š",envelope_with_arrow:"๐Ÿ“ฉ",euro:"๐Ÿ’ถ",european_castle:"๐Ÿฐ",european_post_office:"๐Ÿค",evergreen_tree:"๐ŸŒฒ",exclamation:"โ—๏ธ",expressionless:"๐Ÿ˜‘",eye:"๐Ÿ‘",eye_speech_bubble:"๐Ÿ‘‍๐Ÿ—จ",eyeglasses:"๐Ÿ‘“",eyes:"๐Ÿ‘€",face_with_head_bandage:"๐Ÿค•",face_with_thermometer:"๐Ÿค’",fist_oncoming:"๐Ÿ‘Š",factory:"๐Ÿญ",fallen_leaf:"๐Ÿ‚",family_man_woman_boy:"๐Ÿ‘ช",family_man_boy:"๐Ÿ‘จ‍๐Ÿ‘ฆ",family_man_boy_boy:"๐Ÿ‘จ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_man_girl:"๐Ÿ‘จ‍๐Ÿ‘ง",family_man_girl_boy:"๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_man_girl_girl:"๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_man_man_boy:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ฆ",family_man_man_boy_boy:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_man_man_girl:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ง",family_man_man_girl_boy:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_man_man_girl_girl:"๐Ÿ‘จ‍๐Ÿ‘จ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_man_woman_boy_boy:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_man_woman_girl:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง",family_man_woman_girl_boy:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_man_woman_girl_girl:"๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_woman_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฆ",family_woman_boy_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_woman_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ง",family_woman_girl_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_woman_girl_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ง",family_woman_woman_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ฆ",family_woman_woman_boy_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ฆ‍๐Ÿ‘ฆ",family_woman_woman_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ง",family_woman_woman_girl_boy:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ",family_woman_woman_girl_girl:"๐Ÿ‘ฉ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ง",fast_forward:"โฉ",fax:"๐Ÿ“ ",fearful:"๐Ÿ˜จ",feet:"๐Ÿพ",female_detective:"๐Ÿ•ต๏ธ‍โ™€๏ธ",ferris_wheel:"๐ŸŽก",ferry:"โ›ด",field_hockey:"๐Ÿ‘",file_cabinet:"๐Ÿ—„",file_folder:"๐Ÿ“",film_projector:"๐Ÿ“ฝ",film_strip:"๐ŸŽž",fire:"๐Ÿ”ฅ",fire_engine:"๐Ÿš’",fireworks:"๐ŸŽ†",first_quarter_moon:"๐ŸŒ“",first_quarter_moon_with_face:"๐ŸŒ›",fish:"๐ŸŸ",fish_cake:"๐Ÿฅ",fishing_pole_and_fish:"๐ŸŽฃ",fist_raised:"โœŠ",fist_left:"๐Ÿค›",fist_right:"๐Ÿคœ",flags:"๐ŸŽ",flashlight:"๐Ÿ”ฆ",fleur_de_lis:"โšœ๏ธ",flight_arrival:"๐Ÿ›ฌ",flight_departure:"๐Ÿ›ซ",floppy_disk:"๐Ÿ’พ",flower_playing_cards:"๐ŸŽด",flushed:"๐Ÿ˜ณ",fog:"๐ŸŒซ",foggy:"๐ŸŒ",football:"๐Ÿˆ",footprints:"๐Ÿ‘ฃ",fork_and_knife:"๐Ÿด",fountain:"โ›ฒ๏ธ",fountain_pen:"๐Ÿ–‹",four_leaf_clover:"๐Ÿ€",fox_face:"๐ŸฆŠ",framed_picture:"๐Ÿ–ผ",free:"๐Ÿ†“",fried_egg:"๐Ÿณ",fried_shrimp:"๐Ÿค",fries:"๐ŸŸ",frog:"๐Ÿธ",frowning:"๐Ÿ˜ฆ",frowning_face:"โ˜น๏ธ",frowning_man:"๐Ÿ™‍โ™‚๏ธ",frowning_woman:"๐Ÿ™",middle_finger:"๐Ÿ–•",fuelpump:"โ›ฝ๏ธ",full_moon:"๐ŸŒ•",full_moon_with_face:"๐ŸŒ",funeral_urn:"โšฑ๏ธ",game_die:"๐ŸŽฒ",gear:"โš™๏ธ",gem:"๐Ÿ’Ž",gemini:"โ™Š๏ธ",ghost:"๐Ÿ‘ป",gift:"๐ŸŽ",gift_heart:"๐Ÿ’",girl:"๐Ÿ‘ง",globe_with_meridians:"๐ŸŒ",goal_net:"๐Ÿฅ…",goat:"๐Ÿ",golf:"โ›ณ๏ธ",golfing_man:"๐ŸŒ๏ธ",golfing_woman:"๐ŸŒ๏ธ‍โ™€๏ธ",gorilla:"๐Ÿฆ",grapes:"๐Ÿ‡",green_apple:"๐Ÿ",green_book:"๐Ÿ“—",green_heart:"๐Ÿ’š",green_salad:"๐Ÿฅ—",grey_exclamation:"โ•",grey_question:"โ”",grimacing:"๐Ÿ˜ฌ",grin:"๐Ÿ˜",grinning:"๐Ÿ˜€",guardsman:"๐Ÿ’‚",guardswoman:"๐Ÿ’‚‍โ™€๏ธ",guitar:"๐ŸŽธ",gun:"๐Ÿ”ซ",haircut_woman:"๐Ÿ’‡",haircut_man:"๐Ÿ’‡‍โ™‚๏ธ",hamburger:"๐Ÿ”",hammer:"๐Ÿ”จ",hammer_and_pick:"โš’",hammer_and_wrench:"๐Ÿ› ",hamster:"๐Ÿน",hand:"โœ‹",handbag:"๐Ÿ‘œ",handshake:"๐Ÿค",hankey:"๐Ÿ’ฉ",hatched_chick:"๐Ÿฅ",hatching_chick:"๐Ÿฃ",headphones:"๐ŸŽง",hear_no_evil:"๐Ÿ™‰",heart:"โค๏ธ",heart_decoration:"๐Ÿ’Ÿ",heart_eyes:"๐Ÿ˜",heart_eyes_cat:"๐Ÿ˜ป",heartbeat:"๐Ÿ’“",heartpulse:"๐Ÿ’—",hearts:"โ™ฅ๏ธ",heavy_check_mark:"โœ”๏ธ",heavy_division_sign:"โž—",heavy_dollar_sign:"๐Ÿ’ฒ",heavy_heart_exclamation:"โฃ๏ธ",heavy_minus_sign:"โž–",heavy_multiplication_x:"โœ–๏ธ",heavy_plus_sign:"โž•",helicopter:"๐Ÿš",herb:"๐ŸŒฟ",hibiscus:"๐ŸŒบ",high_brightness:"๐Ÿ”†",high_heel:"๐Ÿ‘ ",hocho:"๐Ÿ”ช",hole:"๐Ÿ•ณ",honey_pot:"๐Ÿฏ",horse:"๐Ÿด",horse_racing:"๐Ÿ‡",hospital:"๐Ÿฅ",hot_pepper:"๐ŸŒถ",hotdog:"๐ŸŒญ",hotel:"๐Ÿจ",hotsprings:"โ™จ๏ธ",hourglass:"โŒ›๏ธ",hourglass_flowing_sand:"โณ",house:"๐Ÿ ",house_with_garden:"๐Ÿก",houses:"๐Ÿ˜",hugs:"๐Ÿค—",hushed:"๐Ÿ˜ฏ",ice_cream:"๐Ÿจ",ice_hockey:"๐Ÿ’",ice_skate:"โ›ธ",icecream:"๐Ÿฆ",id:"๐Ÿ†”",ideograph_advantage:"๐Ÿ‰",imp:"๐Ÿ‘ฟ",inbox_tray:"๐Ÿ“ฅ",incoming_envelope:"๐Ÿ“จ",tipping_hand_woman:"๐Ÿ’",information_source:"โ„น๏ธ",innocent:"๐Ÿ˜‡",interrobang:"โ‰๏ธ",iphone:"๐Ÿ“ฑ",izakaya_lantern:"๐Ÿฎ",jack_o_lantern:"๐ŸŽƒ",japan:"๐Ÿ—พ",japanese_castle:"๐Ÿฏ",japanese_goblin:"๐Ÿ‘บ",japanese_ogre:"๐Ÿ‘น",jeans:"๐Ÿ‘–",joy:"๐Ÿ˜‚",joy_cat:"๐Ÿ˜น",joystick:"๐Ÿ•น",kaaba:"๐Ÿ•‹",key:"๐Ÿ”‘",keyboard:"โŒจ๏ธ",keycap_ten:"๐Ÿ”Ÿ",kick_scooter:"๐Ÿ›ด",kimono:"๐Ÿ‘˜",kiss:"๐Ÿ’‹",kissing:"๐Ÿ˜—",kissing_cat:"๐Ÿ˜ฝ",kissing_closed_eyes:"๐Ÿ˜š",kissing_heart:"๐Ÿ˜˜",kissing_smiling_eyes:"๐Ÿ˜™",kiwi_fruit:"๐Ÿฅ",koala:"๐Ÿจ",koko:"๐Ÿˆ",label:"๐Ÿท",large_blue_circle:"๐Ÿ”ต",large_blue_diamond:"๐Ÿ”ท",large_orange_diamond:"๐Ÿ”ถ",last_quarter_moon:"๐ŸŒ—",last_quarter_moon_with_face:"๐ŸŒœ",latin_cross:"โœ๏ธ",laughing:"๐Ÿ˜†",leaves:"๐Ÿƒ",ledger:"๐Ÿ“’",left_luggage:"๐Ÿ›…",left_right_arrow:"โ†”๏ธ",leftwards_arrow_with_hook:"โ†ฉ๏ธ",lemon:"๐Ÿ‹",leo:"โ™Œ๏ธ",leopard:"๐Ÿ†",level_slider:"๐ŸŽš",libra:"โ™Ž๏ธ",light_rail:"๐Ÿšˆ",link:"๐Ÿ”—",lion:"๐Ÿฆ",lips:"๐Ÿ‘„",lipstick:"๐Ÿ’„",lizard:"๐ŸฆŽ",lock:"๐Ÿ”’",lock_with_ink_pen:"๐Ÿ”",lollipop:"๐Ÿญ",loop:"โžฟ",loud_sound:"๐Ÿ”Š",loudspeaker:"๐Ÿ“ข",love_hotel:"๐Ÿฉ",love_letter:"๐Ÿ’Œ",low_brightness:"๐Ÿ”…",lying_face:"๐Ÿคฅ",m:"โ“‚๏ธ",mag:"๐Ÿ”",mag_right:"๐Ÿ”Ž",mahjong:"๐Ÿ€„๏ธ",mailbox:"๐Ÿ“ซ",mailbox_closed:"๐Ÿ“ช",mailbox_with_mail:"๐Ÿ“ฌ",mailbox_with_no_mail:"๐Ÿ“ญ",man:"๐Ÿ‘จ",man_artist:"๐Ÿ‘จ‍๐ŸŽจ",man_astronaut:"๐Ÿ‘จ‍๐Ÿš€",man_cartwheeling:"๐Ÿคธ‍โ™‚๏ธ",man_cook:"๐Ÿ‘จ‍๐Ÿณ",man_dancing:"๐Ÿ•บ",man_facepalming:"๐Ÿคฆ‍โ™‚๏ธ",man_factory_worker:"๐Ÿ‘จ‍๐Ÿญ",man_farmer:"๐Ÿ‘จ‍๐ŸŒพ",man_firefighter:"๐Ÿ‘จ‍๐Ÿš’",man_health_worker:"๐Ÿ‘จ‍โš•๏ธ",man_in_tuxedo:"๐Ÿคต",man_judge:"๐Ÿ‘จ‍โš–๏ธ",man_juggling:"๐Ÿคน‍โ™‚๏ธ",man_mechanic:"๐Ÿ‘จ‍๐Ÿ”ง",man_office_worker:"๐Ÿ‘จ‍๐Ÿ’ผ",man_pilot:"๐Ÿ‘จ‍โœˆ๏ธ",man_playing_handball:"๐Ÿคพ‍โ™‚๏ธ",man_playing_water_polo:"๐Ÿคฝ‍โ™‚๏ธ",man_scientist:"๐Ÿ‘จ‍๐Ÿ”ฌ",man_shrugging:"๐Ÿคท‍โ™‚๏ธ",man_singer:"๐Ÿ‘จ‍๐ŸŽค",man_student:"๐Ÿ‘จ‍๐ŸŽ“",man_teacher:"๐Ÿ‘จ‍๐Ÿซ",man_technologist:"๐Ÿ‘จ‍๐Ÿ’ป",man_with_gua_pi_mao:"๐Ÿ‘ฒ",man_with_turban:"๐Ÿ‘ณ",tangerine:"๐ŸŠ",mans_shoe:"๐Ÿ‘ž",mantelpiece_clock:"๐Ÿ•ฐ",maple_leaf:"๐Ÿ",martial_arts_uniform:"๐Ÿฅ‹",mask:"๐Ÿ˜ท",massage_woman:"๐Ÿ’†",massage_man:"๐Ÿ’†‍โ™‚๏ธ",meat_on_bone:"๐Ÿ–",medal_military:"๐ŸŽ–",medal_sports:"๐Ÿ…",mega:"๐Ÿ“ฃ",melon:"๐Ÿˆ",memo:"๐Ÿ“",men_wrestling:"๐Ÿคผ‍โ™‚๏ธ",menorah:"๐Ÿ•Ž",mens:"๐Ÿšน",metal:"๐Ÿค˜",metro:"๐Ÿš‡",microphone:"๐ŸŽค",microscope:"๐Ÿ”ฌ",milk_glass:"๐Ÿฅ›",milky_way:"๐ŸŒŒ",minibus:"๐Ÿš",minidisc:"๐Ÿ’ฝ",mobile_phone_off:"๐Ÿ“ด",money_mouth_face:"๐Ÿค‘",money_with_wings:"๐Ÿ’ธ",moneybag:"๐Ÿ’ฐ",monkey:"๐Ÿ’",monkey_face:"๐Ÿต",monorail:"๐Ÿš",moon:"๐ŸŒ”",mortar_board:"๐ŸŽ“",mosque:"๐Ÿ•Œ",motor_boat:"๐Ÿ›ฅ",motor_scooter:"๐Ÿ›ต",motorcycle:"๐Ÿ",motorway:"๐Ÿ›ฃ",mount_fuji:"๐Ÿ—ป",mountain:"โ›ฐ",mountain_biking_man:"๐Ÿšต",mountain_biking_woman:"๐Ÿšต‍โ™€๏ธ",mountain_cableway:"๐Ÿš ",mountain_railway:"๐Ÿšž",mountain_snow:"๐Ÿ”",mouse:"๐Ÿญ",mouse2:"๐Ÿ",movie_camera:"๐ŸŽฅ",moyai:"๐Ÿ—ฟ",mrs_claus:"๐Ÿคถ",muscle:"๐Ÿ’ช",mushroom:"๐Ÿ„",musical_keyboard:"๐ŸŽน",musical_note:"๐ŸŽต",musical_score:"๐ŸŽผ",mute:"๐Ÿ”‡",nail_care:"๐Ÿ’…",name_badge:"๐Ÿ“›",national_park:"๐Ÿž",nauseated_face:"๐Ÿคข",necktie:"๐Ÿ‘”",negative_squared_cross_mark:"โŽ",nerd_face:"๐Ÿค“",neutral_face:"๐Ÿ˜",new:"๐Ÿ†•",new_moon:"๐ŸŒ‘",new_moon_with_face:"๐ŸŒš",newspaper:"๐Ÿ“ฐ",newspaper_roll:"๐Ÿ—ž",next_track_button:"โญ",ng:"๐Ÿ†–",no_good_man:"๐Ÿ™…‍โ™‚๏ธ",no_good_woman:"๐Ÿ™…",night_with_stars:"๐ŸŒƒ",no_bell:"๐Ÿ”•",no_bicycles:"๐Ÿšณ",no_entry:"โ›”๏ธ",no_entry_sign:"๐Ÿšซ",no_mobile_phones:"๐Ÿ“ต",no_mouth:"๐Ÿ˜ถ",no_pedestrians:"๐Ÿšท",no_smoking:"๐Ÿšญ","non-potable_water":"๐Ÿšฑ",nose:"๐Ÿ‘ƒ",notebook:"๐Ÿ““",notebook_with_decorative_cover:"๐Ÿ“”",notes:"๐ŸŽถ",nut_and_bolt:"๐Ÿ”ฉ",o:"โญ•๏ธ",o2:"๐Ÿ…พ๏ธ",ocean:"๐ŸŒŠ",octopus:"๐Ÿ™",oden:"๐Ÿข",office:"๐Ÿข",oil_drum:"๐Ÿ›ข",ok:"๐Ÿ†—",ok_hand:"๐Ÿ‘Œ",ok_man:"๐Ÿ™†‍โ™‚๏ธ",ok_woman:"๐Ÿ™†",old_key:"๐Ÿ—",older_man:"๐Ÿ‘ด",older_woman:"๐Ÿ‘ต",om:"๐Ÿ•‰",on:"๐Ÿ”›",oncoming_automobile:"๐Ÿš˜",oncoming_bus:"๐Ÿš",oncoming_police_car:"๐Ÿš”",oncoming_taxi:"๐Ÿš–",open_file_folder:"๐Ÿ“‚",open_hands:"๐Ÿ‘",open_mouth:"๐Ÿ˜ฎ",open_umbrella:"โ˜‚๏ธ",ophiuchus:"โ›Ž",orange_book:"๐Ÿ“™",orthodox_cross:"โ˜ฆ๏ธ",outbox_tray:"๐Ÿ“ค",owl:"๐Ÿฆ‰",ox:"๐Ÿ‚",package:"๐Ÿ“ฆ",page_facing_up:"๐Ÿ“„",page_with_curl:"๐Ÿ“ƒ",pager:"๐Ÿ“Ÿ",paintbrush:"๐Ÿ–Œ",palm_tree:"๐ŸŒด",pancakes:"๐Ÿฅž",panda_face:"๐Ÿผ",paperclip:"๐Ÿ“Ž",paperclips:"๐Ÿ–‡",parasol_on_ground:"โ›ฑ",parking:"๐Ÿ…ฟ๏ธ",part_alternation_mark:"ใ€ฝ๏ธ",partly_sunny:"โ›…๏ธ",passenger_ship:"๐Ÿ›ณ",passport_control:"๐Ÿ›‚",pause_button:"โธ",peace_symbol:"โ˜ฎ๏ธ",peach:"๐Ÿ‘",peanuts:"๐Ÿฅœ",pear:"๐Ÿ",pen:"๐Ÿ–Š",pencil2:"โœ๏ธ",penguin:"๐Ÿง",pensive:"๐Ÿ˜”",performing_arts:"๐ŸŽญ",persevere:"๐Ÿ˜ฃ",person_fencing:"๐Ÿคบ",pouting_woman:"๐Ÿ™Ž",phone:"โ˜Ž๏ธ",pick:"โ›",pig:"๐Ÿท",pig2:"๐Ÿ–",pig_nose:"๐Ÿฝ",pill:"๐Ÿ’Š",pineapple:"๐Ÿ",ping_pong:"๐Ÿ“",pisces:"โ™“๏ธ",pizza:"๐Ÿ•",place_of_worship:"๐Ÿ›",plate_with_cutlery:"๐Ÿฝ",play_or_pause_button:"โฏ",point_down:"๐Ÿ‘‡",point_left:"๐Ÿ‘ˆ",point_right:"๐Ÿ‘‰",point_up:"โ˜๏ธ",point_up_2:"๐Ÿ‘†",police_car:"๐Ÿš“",policewoman:"๐Ÿ‘ฎ‍โ™€๏ธ",poodle:"๐Ÿฉ",popcorn:"๐Ÿฟ",post_office:"๐Ÿฃ",postal_horn:"๐Ÿ“ฏ",postbox:"๐Ÿ“ฎ",potable_water:"๐Ÿšฐ",potato:"๐Ÿฅ”",pouch:"๐Ÿ‘",poultry_leg:"๐Ÿ—",pound:"๐Ÿ’ท",rage:"๐Ÿ˜ก",pouting_cat:"๐Ÿ˜พ",pouting_man:"๐Ÿ™Ž‍โ™‚๏ธ",pray:"๐Ÿ™",prayer_beads:"๐Ÿ“ฟ",pregnant_woman:"๐Ÿคฐ",previous_track_button:"โฎ",prince:"๐Ÿคด",princess:"๐Ÿ‘ธ",printer:"๐Ÿ–จ",purple_heart:"๐Ÿ’œ",purse:"๐Ÿ‘›",pushpin:"๐Ÿ“Œ",put_litter_in_its_place:"๐Ÿšฎ",question:"โ“",rabbit:"๐Ÿฐ",rabbit2:"๐Ÿ‡",racehorse:"๐ŸŽ",racing_car:"๐ŸŽ",radio:"๐Ÿ“ป",radio_button:"๐Ÿ”˜",radioactive:"โ˜ข๏ธ",railway_car:"๐Ÿšƒ",railway_track:"๐Ÿ›ค",rainbow:"๐ŸŒˆ",rainbow_flag:"๐Ÿณ๏ธ‍๐ŸŒˆ",raised_back_of_hand:"๐Ÿคš",raised_hand_with_fingers_splayed:"๐Ÿ–",raised_hands:"๐Ÿ™Œ",raising_hand_woman:"๐Ÿ™‹",raising_hand_man:"๐Ÿ™‹‍โ™‚๏ธ",ram:"๐Ÿ",ramen:"๐Ÿœ",rat:"๐Ÿ€",record_button:"โบ",recycle:"โ™ป๏ธ",red_circle:"๐Ÿ”ด",registered:"ยฎ๏ธ",relaxed:"โ˜บ๏ธ",relieved:"๐Ÿ˜Œ",reminder_ribbon:"๐ŸŽ—",repeat:"๐Ÿ”",repeat_one:"๐Ÿ”‚",rescue_worker_helmet:"โ›‘",restroom:"๐Ÿšป",revolving_hearts:"๐Ÿ’ž",rewind:"โช",rhinoceros:"๐Ÿฆ",ribbon:"๐ŸŽ€",rice:"๐Ÿš",rice_ball:"๐Ÿ™",rice_cracker:"๐Ÿ˜",rice_scene:"๐ŸŽ‘",right_anger_bubble:"๐Ÿ—ฏ",ring:"๐Ÿ’",robot:"๐Ÿค–",rocket:"๐Ÿš€",rofl:"๐Ÿคฃ",roll_eyes:"๐Ÿ™„",roller_coaster:"๐ŸŽข",rooster:"๐Ÿ“",rose:"๐ŸŒน",rosette:"๐Ÿต",rotating_light:"๐Ÿšจ",round_pushpin:"๐Ÿ“",rowing_man:"๐Ÿšฃ",rowing_woman:"๐Ÿšฃ‍โ™€๏ธ",rugby_football:"๐Ÿ‰",running_man:"๐Ÿƒ",running_shirt_with_sash:"๐ŸŽฝ",running_woman:"๐Ÿƒ‍โ™€๏ธ",sa:"๐Ÿˆ‚๏ธ",sagittarius:"โ™๏ธ",sake:"๐Ÿถ",sandal:"๐Ÿ‘ก",santa:"๐ŸŽ…",satellite:"๐Ÿ“ก",saxophone:"๐ŸŽท",school:"๐Ÿซ",school_satchel:"๐ŸŽ’",scissors:"โœ‚๏ธ",scorpion:"๐Ÿฆ‚",scorpius:"โ™๏ธ",scream:"๐Ÿ˜ฑ",scream_cat:"๐Ÿ™€",scroll:"๐Ÿ“œ",seat:"๐Ÿ’บ",secret:"ใŠ™๏ธ",see_no_evil:"๐Ÿ™ˆ",seedling:"๐ŸŒฑ",selfie:"๐Ÿคณ",shallow_pan_of_food:"๐Ÿฅ˜",shamrock:"โ˜˜๏ธ",shark:"๐Ÿฆˆ",shaved_ice:"๐Ÿง",sheep:"๐Ÿ‘",shell:"๐Ÿš",shield:"๐Ÿ›ก",shinto_shrine:"โ›ฉ",ship:"๐Ÿšข",shirt:"๐Ÿ‘•",shopping:"๐Ÿ›",shopping_cart:"๐Ÿ›’",shower:"๐Ÿšฟ",shrimp:"๐Ÿฆ",signal_strength:"๐Ÿ“ถ",six_pointed_star:"๐Ÿ”ฏ",ski:"๐ŸŽฟ",skier:"โ›ท",skull:"๐Ÿ’€",skull_and_crossbones:"โ˜ ๏ธ",sleeping:"๐Ÿ˜ด",sleeping_bed:"๐Ÿ›Œ",sleepy:"๐Ÿ˜ช",slightly_frowning_face:"๐Ÿ™",slightly_smiling_face:"๐Ÿ™‚",slot_machine:"๐ŸŽฐ",small_airplane:"๐Ÿ›ฉ",small_blue_diamond:"๐Ÿ”น",small_orange_diamond:"๐Ÿ”ธ",small_red_triangle:"๐Ÿ”บ",small_red_triangle_down:"๐Ÿ”ป",smile:"๐Ÿ˜„",smile_cat:"๐Ÿ˜ธ",smiley:"๐Ÿ˜ƒ",smiley_cat:"๐Ÿ˜บ",smiling_imp:"๐Ÿ˜ˆ",smirk:"๐Ÿ˜",smirk_cat:"๐Ÿ˜ผ",smoking:"๐Ÿšฌ",snail:"๐ŸŒ",snake:"๐Ÿ",sneezing_face:"๐Ÿคง",snowboarder:"๐Ÿ‚",snowflake:"โ„๏ธ",snowman:"โ›„๏ธ",snowman_with_snow:"โ˜ƒ๏ธ",sob:"๐Ÿ˜ญ",soccer:"โšฝ๏ธ",soon:"๐Ÿ”œ",sos:"๐Ÿ†˜",sound:"๐Ÿ”‰",space_invader:"๐Ÿ‘พ",spades:"โ™ ๏ธ",spaghetti:"๐Ÿ",sparkle:"โ‡๏ธ",sparkler:"๐ŸŽ‡",sparkles:"โœจ",sparkling_heart:"๐Ÿ’–",speak_no_evil:"๐Ÿ™Š",speaker:"๐Ÿ”ˆ",speaking_head:"๐Ÿ—ฃ",speech_balloon:"๐Ÿ’ฌ",speedboat:"๐Ÿšค",spider:"๐Ÿ•ท",spider_web:"๐Ÿ•ธ",spiral_calendar:"๐Ÿ—“",spiral_notepad:"๐Ÿ—’",spoon:"๐Ÿฅ„",squid:"๐Ÿฆ‘",stadium:"๐ŸŸ",star:"โญ๏ธ",star2:"๐ŸŒŸ",star_and_crescent:"โ˜ช๏ธ",star_of_david:"โœก๏ธ",stars:"๐ŸŒ ",station:"๐Ÿš‰",statue_of_liberty:"๐Ÿ—ฝ",steam_locomotive:"๐Ÿš‚",stew:"๐Ÿฒ",stop_button:"โน",stop_sign:"๐Ÿ›‘",stopwatch:"โฑ",straight_ruler:"๐Ÿ“",strawberry:"๐Ÿ“",stuck_out_tongue:"๐Ÿ˜›",stuck_out_tongue_closed_eyes:"๐Ÿ˜",stuck_out_tongue_winking_eye:"๐Ÿ˜œ",studio_microphone:"๐ŸŽ™",stuffed_flatbread:"๐Ÿฅ™",sun_behind_large_cloud:"๐ŸŒฅ",sun_behind_rain_cloud:"๐ŸŒฆ",sun_behind_small_cloud:"๐ŸŒค",sun_with_face:"๐ŸŒž",sunflower:"๐ŸŒป",sunglasses:"๐Ÿ˜Ž",sunny:"โ˜€๏ธ",sunrise:"๐ŸŒ…",sunrise_over_mountains:"๐ŸŒ„",surfing_man:"๐Ÿ„",surfing_woman:"๐Ÿ„‍โ™€๏ธ",sushi:"๐Ÿฃ",suspension_railway:"๐ŸšŸ",sweat:"๐Ÿ˜“",sweat_drops:"๐Ÿ’ฆ",sweat_smile:"๐Ÿ˜…",sweet_potato:"๐Ÿ ",swimming_man:"๐ŸŠ",swimming_woman:"๐ŸŠ‍โ™€๏ธ",symbols:"๐Ÿ”ฃ",synagogue:"๐Ÿ•",syringe:"๐Ÿ’‰",taco:"๐ŸŒฎ",tada:"๐ŸŽ‰",tanabata_tree:"๐ŸŽ‹",taurus:"โ™‰๏ธ",taxi:"๐Ÿš•",tea:"๐Ÿต",telephone_receiver:"๐Ÿ“ž",telescope:"๐Ÿ”ญ",tennis:"๐ŸŽพ",tent:"โ›บ๏ธ",thermometer:"๐ŸŒก",thinking:"๐Ÿค”",thought_balloon:"๐Ÿ’ญ",ticket:"๐ŸŽซ",tickets:"๐ŸŽŸ",tiger:"๐Ÿฏ",tiger2:"๐Ÿ…",timer_clock:"โฒ",tipping_hand_man:"๐Ÿ’‍โ™‚๏ธ",tired_face:"๐Ÿ˜ซ",tm:"โ„ข๏ธ",toilet:"๐Ÿšฝ",tokyo_tower:"๐Ÿ—ผ",tomato:"๐Ÿ…",tongue:"๐Ÿ‘…",top:"๐Ÿ”",tophat:"๐ŸŽฉ",tornado:"๐ŸŒช",trackball:"๐Ÿ–ฒ",tractor:"๐Ÿšœ",traffic_light:"๐Ÿšฅ",train:"๐Ÿš‹",train2:"๐Ÿš†",tram:"๐ŸšŠ",triangular_flag_on_post:"๐Ÿšฉ",triangular_ruler:"๐Ÿ“",trident:"๐Ÿ”ฑ",triumph:"๐Ÿ˜ค",trolleybus:"๐ŸšŽ",trophy:"๐Ÿ†",tropical_drink:"๐Ÿน",tropical_fish:"๐Ÿ ",truck:"๐Ÿšš",trumpet:"๐ŸŽบ",tulip:"๐ŸŒท",tumbler_glass:"๐Ÿฅƒ",turkey:"๐Ÿฆƒ",turtle:"๐Ÿข",tv:"๐Ÿ“บ",twisted_rightwards_arrows:"๐Ÿ”€",two_hearts:"๐Ÿ’•",two_men_holding_hands:"๐Ÿ‘ฌ",two_women_holding_hands:"๐Ÿ‘ญ",u5272:"๐Ÿˆน",u5408:"๐Ÿˆด",u55b6:"๐Ÿˆบ",u6307:"๐Ÿˆฏ๏ธ",u6708:"๐Ÿˆท๏ธ",u6709:"๐Ÿˆถ",u6e80:"๐Ÿˆต",u7121:"๐Ÿˆš๏ธ",u7533:"๐Ÿˆธ",u7981:"๐Ÿˆฒ",u7a7a:"๐Ÿˆณ",umbrella:"โ˜”๏ธ",unamused:"๐Ÿ˜’",underage:"๐Ÿ”ž",unicorn:"๐Ÿฆ„",unlock:"๐Ÿ”“",up:"๐Ÿ†™",upside_down_face:"๐Ÿ™ƒ",v:"โœŒ๏ธ",vertical_traffic_light:"๐Ÿšฆ",vhs:"๐Ÿ“ผ",vibration_mode:"๐Ÿ“ณ",video_camera:"๐Ÿ“น",video_game:"๐ŸŽฎ",violin:"๐ŸŽป",virgo:"โ™๏ธ",volcano:"๐ŸŒ‹",volleyball:"๐Ÿ",vs:"๐Ÿ†š",vulcan_salute:"๐Ÿ––",walking_man:"๐Ÿšถ",walking_woman:"๐Ÿšถ‍โ™€๏ธ",waning_crescent_moon:"๐ŸŒ˜",waning_gibbous_moon:"๐ŸŒ–",warning:"โš ๏ธ",wastebasket:"๐Ÿ—‘",watch:"โŒš๏ธ",water_buffalo:"๐Ÿƒ",watermelon:"๐Ÿ‰",wave:"๐Ÿ‘‹",wavy_dash:"ใ€ฐ๏ธ",waxing_crescent_moon:"๐ŸŒ’",wc:"๐Ÿšพ",weary:"๐Ÿ˜ฉ",wedding:"๐Ÿ’’",weight_lifting_man:"๐Ÿ‹๏ธ",weight_lifting_woman:"๐Ÿ‹๏ธ‍โ™€๏ธ",whale:"๐Ÿณ",whale2:"๐Ÿ‹",wheel_of_dharma:"โ˜ธ๏ธ",wheelchair:"โ™ฟ๏ธ",white_check_mark:"โœ…",white_circle:"โšช๏ธ",white_flag:"๐Ÿณ๏ธ",white_flower:"๐Ÿ’ฎ",white_large_square:"โฌœ๏ธ",white_medium_small_square:"โ—ฝ๏ธ",white_medium_square:"โ—ป๏ธ",white_small_square:"โ–ซ๏ธ",white_square_button:"๐Ÿ”ณ",wilted_flower:"๐Ÿฅ€",wind_chime:"๐ŸŽ",wind_face:"๐ŸŒฌ",wine_glass:"๐Ÿท",wink:"๐Ÿ˜‰",wolf:"๐Ÿบ",woman:"๐Ÿ‘ฉ",woman_artist:"๐Ÿ‘ฉ‍๐ŸŽจ",woman_astronaut:"๐Ÿ‘ฉ‍๐Ÿš€",woman_cartwheeling:"๐Ÿคธ‍โ™€๏ธ",woman_cook:"๐Ÿ‘ฉ‍๐Ÿณ",woman_facepalming:"๐Ÿคฆ‍โ™€๏ธ",woman_factory_worker:"๐Ÿ‘ฉ‍๐Ÿญ",woman_farmer:"๐Ÿ‘ฉ‍๐ŸŒพ",woman_firefighter:"๐Ÿ‘ฉ‍๐Ÿš’",woman_health_worker:"๐Ÿ‘ฉ‍โš•๏ธ",woman_judge:"๐Ÿ‘ฉ‍โš–๏ธ",woman_juggling:"๐Ÿคน‍โ™€๏ธ",woman_mechanic:"๐Ÿ‘ฉ‍๐Ÿ”ง",woman_office_worker:"๐Ÿ‘ฉ‍๐Ÿ’ผ",woman_pilot:"๐Ÿ‘ฉ‍โœˆ๏ธ",woman_playing_handball:"๐Ÿคพ‍โ™€๏ธ",woman_playing_water_polo:"๐Ÿคฝ‍โ™€๏ธ",woman_scientist:"๐Ÿ‘ฉ‍๐Ÿ”ฌ",woman_shrugging:"๐Ÿคท‍โ™€๏ธ",woman_singer:"๐Ÿ‘ฉ‍๐ŸŽค",woman_student:"๐Ÿ‘ฉ‍๐ŸŽ“",woman_teacher:"๐Ÿ‘ฉ‍๐Ÿซ",woman_technologist:"๐Ÿ‘ฉ‍๐Ÿ’ป",woman_with_turban:"๐Ÿ‘ณ‍โ™€๏ธ",womans_clothes:"๐Ÿ‘š",womans_hat:"๐Ÿ‘’",women_wrestling:"๐Ÿคผ‍โ™€๏ธ",womens:"๐Ÿšบ",world_map:"๐Ÿ—บ",worried:"๐Ÿ˜Ÿ",wrench:"๐Ÿ”ง",writing_hand:"โœ๏ธ",x:"โŒ",yellow_heart:"๐Ÿ’›",yen:"๐Ÿ’ด",yin_yang:"โ˜ฏ๏ธ",yum:"๐Ÿ˜‹",zap:"โšก๏ธ",zipper_mouth_face:"๐Ÿค",zzz:"๐Ÿ’ค",octocat:':octocat:',showdown:`S`},r.Converter=function(f){var E={},S=[],N=[],k={},x=o,M={parsed:{},raw:"",format:""};G();function G(){f=f||{};for(var B in a)a.hasOwnProperty(B)&&(E[B]=a[B]);if(typeof f=="object")for(var Q in f)f.hasOwnProperty(Q)&&(E[Q]=f[Q]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof f+" was passed instead.");E.extensions&&r.helper.forEach(E.extensions,te)}function te(B,Q){if(Q=Q||null,r.helper.isString(B))if(B=r.helper.stdExtName(B),Q=B,r.extensions[B]){console.warn("DEPRECATION WARNING: "+B+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),ne(r.extensions[B],B);return}else if(!r.helper.isUndefined(s[B]))B=s[B];else throw Error('Extension "'+B+'" could not be loaded. It was either not found or is not a valid extension.');typeof B=="function"&&(B=B()),r.helper.isArray(B)||(B=[B]);var j=c(B,Q);if(!j.valid)throw Error(j.error);for(var Z=0;Z

${i}

-`}),r=r+"",e.innerHTML=r});this.universes={...this.settings.universes,...Um},this.selected_universe="Welcome",this.universe_viewer.innerHTML=`Topos: ${this.selected_universe}`;let e=nc[Math.floor(Math.random()*nc.length)];this.universes[this.selected_universe].global.committed=e,this.universes[this.selected_universe].global.candidate=e,this.line_numbers_checkbox.checked=this.settings.line_numbers,this.time_position_checkbox.checked=this.settings.time_position,this.tips_checkbox.checked=this.settings.tips,this.settings.time_position||document.getElementById("timeviewer").classList.add("hidden"),this.audioContext=new AudioContext({latencyHint:"playback"}),this.clock=new NP(this,this.audioContext),this.api=new iB(this),aB(this.api),nB(this.api),this.vimModeCompartment=new zn,this.hoveringCompartment=new zn,this.withLineNumbers=new zn,this.chosenLanguage=new zn,this.fontSize=new zn;const t=this.settings.vimMode?Hu():[],r=this.settings.line_numbers?AS():[],i=Pe.theme({"&":{fontSize:`${this.settings.font_size}px`},$content:{fontFamily:`${this.settings.font}, Menlo, Monaco, Lucida Console, monospace`,fontSize:`${this.settings.font_size}px`},".cm-gutters":{fontSize:`${this.settings.font_size}px`}});this.editorExtensions=[this.vimModeCompartment.of(t),this.withLineNumbers.of(r),this.fontSize.of(i),this.hoveringCompartment.of(this.settings.tips?pO:[]),iP,zD,this.chosenLanguage.of(Cm()),Pe.updateListener.of(c=>{})];let s=new zn;(async()=>{await TE()})(),this.docs=dE(this),window.addEventListener("keydown",c=>{c.key==="Tab"&&c.preventDefault(),c.ctrlKey&&c.key==="s"&&(c.preventDefault(),this.setButtonHighlighting("stop",!0),this.clock.stop()),c.ctrlKey&&c.key==="p"&&(c.preventDefault(),this.isPlaying?(this.isPlaying=!1,this.setButtonHighlighting("pause",!0),this.clock.pause()):(this.isPlaying=!0,this.setButtonHighlighting("play",!0),this.clock.start())),(c.key==="v"||c.key==="V")&&c.ctrlKey&&c.shiftKey&&(this.settings.vimMode=!this.settings.vimMode,c.preventDefault(),this.userPlugins=this.settings.vimMode?[]:[Hu()],this.view.dispatch({effects:s.reconfigure(this.userPlugins)})),(c.key==="Enter"||c.key==="Return")&&c.ctrlKey&&(c.preventDefault(),this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#404040",200)),(c.key==="Enter"&&c.shiftKey||c.key==="e"&&c.ctrlKey)&&(c.preventDefault(),this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#404040",200)),c.key==="Enter"&&c.shiftKey&&c.ctrlKey&&(c.preventDefault(),this.currentFile().candidate=this.view.state.doc.toString(),ls(this,this.currentFile()),this.flashBackground("#404040",200)),c.ctrlKey&&c.key==="b"&&(c.preventDefault(),this.hideDocumentation(),this.updateKnownUniversesView(),this.openBuffersModal()),c.shiftKey&&c.key==="Escape"&&this.openSettingsModal(),c.ctrlKey&&c.key==="l"&&(c.preventDefault(),this.changeModeFromInterface("local"),this.hideDocumentation(),this.view.focus()),c.ctrlKey&&c.key==="n"&&(c.preventDefault(),this.changeModeFromInterface("notes"),this.hideDocumentation(),this.view.focus()),c.ctrlKey&&c.key==="g"&&(c.preventDefault(),this.changeModeFromInterface("global"),this.hideDocumentation(),this.view.focus()),c.ctrlKey&&c.key==="i"&&(c.preventDefault(),this.changeModeFromInterface("init"),this.hideDocumentation(),this.changeToLocalBuffer(0),this.view.focus()),c.ctrlKey&&c.key==="d"&&(c.preventDefault(),this.showDocumentation()),[112,113,114,115,116,117,118,119,120].forEach((u,p)=>{c.keyCode===u&&(c.preventDefault(),c.ctrlKey?(c.preventDefault(),this.api.script(u-111)):(c.preventDefault(),this.changeModeFromInterface("local"),this.changeToLocalBuffer(p),this.hideDocumentation()))}),c.keyCode==121&&(c.preventDefault(),this.changeModeFromInterface("global"),this.hideDocumentation()),c.keyCode==122&&(c.preventDefault(),this.changeModeFromInterface("init"),this.hideDocumentation())});const o=document.querySelectorAll('[id^="tab-"]');for(let c=0;c{o[c].classList.add("bg-orange-300");for(let _=0;_{this.hideDocumentation(),this.updateKnownUniversesView(),this.openBuffersModal()}),this.play_buttons.forEach(c=>{c.addEventListener("click",()=>{this.isPlaying?(this.setButtonHighlighting("pause",!0),this.isPlaying=!this.isPlaying,this.clock.pause()):(this.setButtonHighlighting("play",!0),this.isPlaying=!this.isPlaying,this.clock.start())})}),this.clear_buttons.forEach(c=>{c.addEventListener("click",()=>{this.setButtonHighlighting("clear",!0),confirm("Do you want to reset the current universe?")&&(this.universes[this.selected_universe]=lE,this.updateEditorView())})}),this.documentation_button.addEventListener("click",()=>{this.showDocumentation()}),this.load_universe_button.addEventListener("click",()=>{let c=this.buffer_search.value;c.length>2&&c.length<20&&!c.includes(" ")&&(this.loadUniverse(c),this.settings.selected_universe=c,this.buffer_search.value="",this.closeBuffersModal(),this.view.focus(),this.emptyUrl())}),this.eval_button.addEventListener("click",()=>{this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#404040",200)}),this.stop_buttons.forEach(c=>{c.addEventListener("click",()=>{this.setButtonHighlighting("stop",!0),this.isPlaying=!1,this.clock.stop()})}),this.local_button.addEventListener("click",()=>this.changeModeFromInterface("local")),this.global_button.addEventListener("click",()=>this.changeModeFromInterface("global")),this.init_button.addEventListener("click",()=>this.changeModeFromInterface("init")),this.note_button.addEventListener("click",()=>this.changeModeFromInterface("notes")),this.settings_button.addEventListener("click",()=>{var p;if(this.font_size_slider.value=this.settings.font_size.toString(),this.font_size_witness.innerHTML=`Font Size: ${this.settings.font_size}px`,(p=this.font_size_witness)==null||p.setAttribute("style",`font-size: ${this.settings.font_size}px;`),this.line_numbers_checkbox.checked=this.settings.line_numbers,this.time_position_checkbox.checked=this.settings.time_position,this.tips_checkbox.checked=this.settings.tips,this.settings.vimMode){let m=document.getElementById("vim-mode-radio"),_=document.getElementById("normal-mode-radio");m.checked=!0,_.checked=!1}else{let m=document.getElementById("vim-mode-radio"),_=document.getElementById("normal-mode-radio");_.checked=!0,m.checked=!1}let c=document.getElementById("modal-settings"),u=document.getElementById("editor");c==null||c.classList.remove("invisible"),u==null||u.classList.add("invisible")}),this.close_settings_button.addEventListener("click",()=>{let c=document.getElementById("modal-settings"),u=document.getElementById("editor");c==null||c.classList.add("invisible"),u==null||u.classList.remove("invisible")}),this.close_universes_button.addEventListener("click",()=>{this.openBuffersModal()}),this.font_size_slider.addEventListener("input",()=>{const c=this.font_size_slider.value;this.settings.font_size=parseInt(c),this.font_size_witness.style.fontSize=`${c}px`,this.font_size_witness.innerHTML=`Font Size: ${c}px`;let u=Pe.theme({"&":{fontSize:c+"px"},"&content":{fontFamily:this.settings.font},".cm-gutters":{fontSize:c+"px"}});this.view.dispatch({effects:this.fontSize.reconfigure(u)}),this.settings.font_size=parseInt(c)}),this.share_button.addEventListener("click",async()=>{this.currentFile().candidate=mn.view.state.doc.toString(),this.currentFile().committed=mn.view.state.doc.toString(),this.settings.saveApplicationToLocalStorage(mn.universes,mn.settings),await this.share()}),this.normal_mode_button.addEventListener("click",()=>{this.settings.vimMode=!1,this.view.dispatch({effects:this.vimModeCompartment.reconfigure([])})}),this.line_numbers_checkbox.addEventListener("change",()=>{let c=!!this.line_numbers_checkbox.checked;this.settings.line_numbers=c,this.view.dispatch({effects:this.withLineNumbers.reconfigure(c?[AS()]:[])})}),this.time_position_checkbox.addEventListener("change",()=>{let c=document.getElementById("timeviewer"),u=!!this.time_position_checkbox.checked;this.settings.time_position=u,u?c.classList.remove("hidden"):c.classList.add("hidden")}),this.tips_checkbox.addEventListener("change",()=>{let c=!!this.tips_checkbox.checked;this.settings.tips=c,this.view.dispatch({effects:this.hoveringCompartment.reconfigure(c?pO:[])})}),this.vim_mode_button.addEventListener("click",()=>{this.settings.vimMode=!0,this.view.dispatch({effects:this.vimModeCompartment.reconfigure(Hu())})}),this.universe_creator.addEventListener("submit",c=>{c.preventDefault();let p=new FormData(this.universe_creator).get("universe");p&&p.length>2&&p.length<20&&(this.loadUniverse(p),this.settings.selected_universe=p,this.buffer_search.value="",this.closeBuffersModal(),this.view.focus())}),ls(this,this.universes[this.selected_universe.toString()].init),["introduction","interface","code","time","sound","samples","synths","chaining","patterns","ziffers","midi","functions","shortcuts","about","bonus"].forEach(c=>{let u="docs_"+c;document.getElementById(u).addEventListener("click",async()=>{u!=="docs_samples"?(this.currentDocumentationPane=c,this.updateDocumentationContent()):(console.log("Loading samples!"),await TE().then(()=>{this.docs=dE(this),this.currentDocumentationPane=c,this.updateDocumentationContent()}))})}),Object.entries(this.api).forEach(([c,u])=>{globalThis[c]=u}),this.state=_t.create({extensions:[...this.editorExtensions,Pe.lineWrapping,s.of(this.userPlugins),vi.highest(Ia.of([{key:"Ctrl-Enter",run:()=>!0}])),Ia.of([tM])],doc:this.universes[this.selected_universe].global.candidate}),this.view=new Pe({parent:document.getElementById("editor"),state:this.state}),this.changeModeFromInterface("global");let l=new URLSearchParams(window.location.search);if(l!==void 0){let c;if(l!==null){const u=l.get("universe");if(u!==null){let p=Uint8Array.from(atob(u),_=>_.charCodeAt(0));c=JSON.parse(NB(AB(p)));const m=OI({length:2,separator:"_",dictionaries:[bI,EI]});this.loadUniverse(m,c.universe),this.emptyUrl(),this.emptyUrl()}}}this.hydra=this.hydra_backend.synth}get note_buffer(){return this.universes[this.selected_universe.toString()].notes}get example_buffer(){return this.universes[this.selected_universe.toString()].example}get global_buffer(){return this.universes[this.selected_universe.toString()].global}get init_buffer(){return this.universes[this.selected_universe.toString()].init}get local_buffer(){return this.universes[this.selected_universe.toString()].locals[this.local_index]}async share(){async function e(a){const o=await new Promise(l=>{const c=new FileReader;c.onload=()=>l(c.result),c.readAsDataURL(new Blob([a]))});return o.slice(o.indexOf(",")+1)}let t=JSON.stringify({universe:this.settings.universes[this.selected_universe]}),r=vB(new TextEncoder().encode(t));const i=await e(r),s=new URL(window.location.href);s.searchParams.set("universe",i),window.history.replaceState({},"",s.toString()),navigator.clipboard.writeText(s.toString())}showDocumentation(){var e,t,r,i,s;(e=document.getElementById("app"))!=null&&e.classList.contains("hidden")?((t=document.getElementById("app"))==null||t.classList.remove("hidden"),(r=document.getElementById("documentation"))==null||r.classList.add("hidden"),this.exampleIsPlaying=!1):((i=document.getElementById("app"))==null||i.classList.add("hidden"),(s=document.getElementById("documentation"))==null||s.classList.remove("hidden"),this.updateDocumentationContent())}hideDocumentation(){var e,t,r;(e=document.getElementById("app"))!=null&&e.classList.contains("hidden")&&((t=document.getElementById("app"))==null||t.classList.remove("hidden"),(r=document.getElementById("documentation"))==null||r.classList.add("hidden"))}updateDocumentationContent(){const t=new zR.Converter({emoji:!0,moreStyling:!0,backslashEscapesHTMLTags:!0,extensions:[aG({auto_detection:!0}),...sG]}).makeHtml(this.docs[this.currentDocumentationPane]);document.getElementById("documentation-content").innerHTML=t}changeToLocalBuffer(e){const t=document.querySelectorAll('[id^="tab-"]'),r=t[e];r.classList.add("bg-orange-300");for(let s=0;s{t.forEach(s=>{let a=s.children[0];a.classList.contains("text-orange-300")&&(a.classList.remove("text-orange-300"),s.classList.remove("text-orange-300"))}),i.children[0].classList.remove("text-white"),i.children[0].classList.add("text-orange-300"),i.classList.add("text-orange-300"),i.classList.add("fill-orange-300")};switch(e){case"local":this.local_script_tabs.classList.contains("hidden")&&this.local_script_tabs.classList.remove("hidden"),this.editor_mode="local",this.local_index=0,this.changeToLocalBuffer(this.local_index),r(this.local_button);break;case"global":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="global",r(this.global_button);break;case"init":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="init",r(this.init_button);break;case"notes":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="notes",r(this.note_button);break}this.view.dispatch({effects:this.chosenLanguage.reconfigure(this.editor_mode=="notes"?[zk()]:[Cm()])}),this.updateEditorView()}setButtonHighlighting(e,t){document.getElementById("play-label").textContent=e!=="pause"?"Pause":"Play",e!=="pause"?(document.getElementById("pause-icon").classList.remove("hidden"),document.getElementById("play-icon").classList.add("hidden")):(document.getElementById("pause-icon").classList.add("hidden"),document.getElementById("play-icon").classList.remove("hidden")),e==="stop"&&(this.isPlaying==!1,document.getElementById("play-label").textContent="Play",document.getElementById("pause-icon").classList.add("hidden"),document.getElementById("play-icon").classList.remove("hidden")),this.flashBackground("#404040",200);const r=['[id^="play-button-"]','[id^="clear-button-"]','[id^="stop-button-"]'];let i;switch(e){case"play":i=0;break;case"pause":i=1;break;case"clear":i=2;break;case"stop":i=3;break}document.querySelectorAll(r[i]).forEach(s=>{t&&s.children[0].classList.add("animate-pulse")}),document.querySelectorAll(r.filter((s,a)=>a!=i).join(",")).forEach(s=>{s.children[0].classList.remove("animate-pulse"),s.children[1].classList.remove("animate-pulse")})}unfocusPlayButtons(){document.querySelectorAll('[id^="play-button-"]').forEach(e=>{e.children[0].classList.remove("fill-orange-300"),e.children[0].classList.remove("animate-pulse")})}updateEditorView(){this.view.dispatch({changes:{from:0,to:this.view.state.doc.toString().length,insert:this.currentFile().candidate}})}currentFile(){switch(this.editor_mode){case"global":return this.global_buffer;case"local":return this.local_buffer;case"init":return this.init_buffer;case"notes":return this.note_buffer}}loadUniverse(e,t=lE){console.log(e,t),this.currentFile().candidate=this.view.state.doc.toString();let r=e.trim();this.universes[r]===void 0&&(this.settings.universes[r]=t,this.universes[r]=t),this.selected_universe=r,this.settings.selected_universe=this.selected_universe,this.universe_viewer.innerHTML=`Topos: ${r}`,this.updateEditorView(),ls(this,this.universes[this.selected_universe.toString()].init)}openSettingsModal(){document.getElementById("modal-settings").classList.contains("invisible")?(document.getElementById("editor").classList.add("invisible"),document.getElementById("modal-settings").classList.remove("invisible")):this.closeSettingsModal()}closeSettingsModal(){document.getElementById("editor").classList.remove("invisible"),document.getElementById("modal-settings").classList.add("invisible")}openBuffersModal(){document.getElementById("modal-buffers").classList.contains("invisible")?(document.getElementById("editor").classList.add("invisible"),document.getElementById("modal-buffers").classList.remove("invisible"),document.getElementById("buffer-search").focus()):this.closeBuffersModal()}closeBuffersModal(){document.getElementById("buffer-search").value="",document.getElementById("editor").classList.remove("invisible"),document.getElementById("modal-buffers").classList.add("invisible")}flashBackground(e,t){this.view.dom.style.backgroundColor=e;const r=this.view.dom.getElementsByClassName("cm-gutter");Array.from(r).forEach(i=>i.style.backgroundColor=e),setTimeout(()=>{this.view.dom.style.backgroundColor="",Array.from(r).forEach(i=>i.style.backgroundColor="")},t)}}const mn=new oG;window.addEventListener("beforeunload",()=>(event.preventDefault(),mn.currentFile().candidate=mn.view.state.doc.toString(),mn.currentFile().committed=mn.view.state.doc.toString(),mn.settings.saveApplicationToLocalStorage(mn.universes,mn.settings),mn.clock.stop(),null)); +`}),r=r+"",e.innerHTML=r});this.universes={...this.settings.universes,...Um},this.selected_universe="Welcome",this.universe_viewer.innerHTML=`Topos: ${this.selected_universe}`;let e=nc[Math.floor(Math.random()*nc.length)];this.universes[this.selected_universe].global.committed=e,this.universes[this.selected_universe].global.candidate=e,this.line_numbers_checkbox.checked=this.settings.line_numbers,this.time_position_checkbox.checked=this.settings.time_position,this.tips_checkbox.checked=this.settings.tips,this.settings.time_position||document.getElementById("timeviewer").classList.add("hidden"),this.audioContext=new AudioContext({latencyHint:"playback"}),this.clock=new NP(this,this.audioContext),this.api=new iB(this),aB(this.api),nB(this.api),this.vimModeCompartment=new zn,this.hoveringCompartment=new zn,this.withLineNumbers=new zn,this.chosenLanguage=new zn,this.fontSize=new zn;const t=this.settings.vimMode?Hu():[],r=this.settings.line_numbers?AS():[],i=Pe.theme({"&":{fontSize:`${this.settings.font_size}px`},$content:{fontFamily:`${this.settings.font}, Menlo, Monaco, Lucida Console, monospace`,fontSize:`${this.settings.font_size}px`},".cm-gutters":{fontSize:`${this.settings.font_size}px`}});this.editorExtensions=[this.vimModeCompartment.of(t),this.withLineNumbers.of(r),this.fontSize.of(i),this.hoveringCompartment.of(this.settings.tips?pO:[]),iP,zD,this.chosenLanguage.of(Cm()),Pe.updateListener.of(c=>{})];let s=new zn;(async()=>{await TE()})(),this.docs=dE(this),window.addEventListener("keydown",c=>{c.key==="Tab"&&c.preventDefault(),c.ctrlKey&&c.key==="s"&&(c.preventDefault(),this.setButtonHighlighting("stop",!0),this.clock.stop()),c.ctrlKey&&c.key==="p"&&(c.preventDefault(),this.isPlaying?(this.isPlaying=!1,this.setButtonHighlighting("pause",!0),this.clock.pause()):(this.isPlaying=!0,this.setButtonHighlighting("play",!0),this.clock.start())),(c.key==="v"||c.key==="V")&&c.ctrlKey&&c.shiftKey&&(this.settings.vimMode=!this.settings.vimMode,c.preventDefault(),this.userPlugins=this.settings.vimMode?[]:[Hu()],this.view.dispatch({effects:s.reconfigure(this.userPlugins)})),(c.key==="Enter"||c.key==="Return")&&c.ctrlKey&&(c.preventDefault(),this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#404040",200)),(c.key==="Enter"&&c.shiftKey||c.key==="e"&&c.ctrlKey)&&(c.preventDefault(),this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#404040",200)),c.key==="Enter"&&c.shiftKey&&c.ctrlKey&&(c.preventDefault(),this.currentFile().candidate=this.view.state.doc.toString(),ls(this,this.currentFile()),this.flashBackground("#404040",200)),c.ctrlKey&&c.key==="b"&&(c.preventDefault(),this.hideDocumentation(),this.updateKnownUniversesView(),this.openBuffersModal()),c.shiftKey&&c.key==="Escape"&&this.openSettingsModal(),c.ctrlKey&&c.key==="l"&&(c.preventDefault(),this.changeModeFromInterface("local"),this.hideDocumentation(),this.view.focus()),c.ctrlKey&&c.key==="n"&&(c.preventDefault(),this.changeModeFromInterface("notes"),this.hideDocumentation(),this.view.focus()),c.ctrlKey&&c.key==="g"&&(c.preventDefault(),this.changeModeFromInterface("global"),this.hideDocumentation(),this.view.focus()),c.ctrlKey&&c.key==="i"&&(c.preventDefault(),this.changeModeFromInterface("init"),this.hideDocumentation(),this.changeToLocalBuffer(0),this.view.focus()),c.ctrlKey&&c.key==="d"&&(c.preventDefault(),this.showDocumentation()),[112,113,114,115,116,117,118,119,120].forEach((u,p)=>{c.keyCode===u&&(c.preventDefault(),c.ctrlKey?(c.preventDefault(),this.api.script(u-111)):(c.preventDefault(),this.changeModeFromInterface("local"),this.changeToLocalBuffer(p),this.hideDocumentation()))}),c.keyCode==121&&(c.preventDefault(),this.changeModeFromInterface("global"),this.hideDocumentation()),c.keyCode==122&&(c.preventDefault(),this.changeModeFromInterface("init"),this.hideDocumentation())});const o=document.querySelectorAll('[id^="tab-"]');for(let c=0;c{o[c].classList.add("bg-orange-300");for(let _=0;_{this.hideDocumentation(),this.updateKnownUniversesView(),this.openBuffersModal()}),this.play_buttons.forEach(c=>{c.addEventListener("click",()=>{this.isPlaying?(this.setButtonHighlighting("pause",!0),this.isPlaying=!this.isPlaying,this.clock.pause(),this.api.MidiConnection.sendStopMessage()):(this.setButtonHighlighting("play",!0),this.isPlaying=!this.isPlaying,this.clock.start(),this.api.MidiConnection.sendStartMessage())})}),this.clear_buttons.forEach(c=>{c.addEventListener("click",()=>{this.setButtonHighlighting("clear",!0),confirm("Do you want to reset the current universe?")&&(this.universes[this.selected_universe]=lE,this.updateEditorView())})}),this.documentation_button.addEventListener("click",()=>{this.showDocumentation()}),this.load_universe_button.addEventListener("click",()=>{let c=this.buffer_search.value;c.length>2&&c.length<20&&!c.includes(" ")&&(this.loadUniverse(c),this.settings.selected_universe=c,this.buffer_search.value="",this.closeBuffersModal(),this.view.focus(),this.emptyUrl())}),this.eval_button.addEventListener("click",()=>{this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#404040",200)}),this.stop_buttons.forEach(c=>{c.addEventListener("click",()=>{this.setButtonHighlighting("stop",!0),this.isPlaying=!1,this.clock.stop()})}),this.local_button.addEventListener("click",()=>this.changeModeFromInterface("local")),this.global_button.addEventListener("click",()=>this.changeModeFromInterface("global")),this.init_button.addEventListener("click",()=>this.changeModeFromInterface("init")),this.note_button.addEventListener("click",()=>this.changeModeFromInterface("notes")),this.settings_button.addEventListener("click",()=>{var p;if(this.font_size_slider.value=this.settings.font_size.toString(),this.font_size_witness.innerHTML=`Font Size: ${this.settings.font_size}px`,(p=this.font_size_witness)==null||p.setAttribute("style",`font-size: ${this.settings.font_size}px;`),this.line_numbers_checkbox.checked=this.settings.line_numbers,this.time_position_checkbox.checked=this.settings.time_position,this.tips_checkbox.checked=this.settings.tips,this.settings.vimMode){let m=document.getElementById("vim-mode-radio"),_=document.getElementById("normal-mode-radio");m.checked=!0,_.checked=!1}else{let m=document.getElementById("vim-mode-radio"),_=document.getElementById("normal-mode-radio");_.checked=!0,m.checked=!1}let c=document.getElementById("modal-settings"),u=document.getElementById("editor");c==null||c.classList.remove("invisible"),u==null||u.classList.add("invisible")}),this.close_settings_button.addEventListener("click",()=>{let c=document.getElementById("modal-settings"),u=document.getElementById("editor");c==null||c.classList.add("invisible"),u==null||u.classList.remove("invisible")}),this.close_universes_button.addEventListener("click",()=>{this.openBuffersModal()}),this.font_size_slider.addEventListener("input",()=>{const c=this.font_size_slider.value;this.settings.font_size=parseInt(c),this.font_size_witness.style.fontSize=`${c}px`,this.font_size_witness.innerHTML=`Font Size: ${c}px`;let u=Pe.theme({"&":{fontSize:c+"px"},"&content":{fontFamily:this.settings.font},".cm-gutters":{fontSize:c+"px"}});this.view.dispatch({effects:this.fontSize.reconfigure(u)}),this.settings.font_size=parseInt(c)}),this.share_button.addEventListener("click",async()=>{this.currentFile().candidate=mn.view.state.doc.toString(),this.currentFile().committed=mn.view.state.doc.toString(),this.settings.saveApplicationToLocalStorage(mn.universes,mn.settings),await this.share()}),this.normal_mode_button.addEventListener("click",()=>{this.settings.vimMode=!1,this.view.dispatch({effects:this.vimModeCompartment.reconfigure([])})}),this.line_numbers_checkbox.addEventListener("change",()=>{let c=!!this.line_numbers_checkbox.checked;this.settings.line_numbers=c,this.view.dispatch({effects:this.withLineNumbers.reconfigure(c?[AS()]:[])})}),this.time_position_checkbox.addEventListener("change",()=>{let c=document.getElementById("timeviewer"),u=!!this.time_position_checkbox.checked;this.settings.time_position=u,u?c.classList.remove("hidden"):c.classList.add("hidden")}),this.tips_checkbox.addEventListener("change",()=>{let c=!!this.tips_checkbox.checked;this.settings.tips=c,this.view.dispatch({effects:this.hoveringCompartment.reconfigure(c?pO:[])})}),this.vim_mode_button.addEventListener("click",()=>{this.settings.vimMode=!0,this.view.dispatch({effects:this.vimModeCompartment.reconfigure(Hu())})}),this.universe_creator.addEventListener("submit",c=>{c.preventDefault();let p=new FormData(this.universe_creator).get("universe");p&&p.length>2&&p.length<20&&(this.loadUniverse(p),this.settings.selected_universe=p,this.buffer_search.value="",this.closeBuffersModal(),this.view.focus())}),ls(this,this.universes[this.selected_universe.toString()].init),["introduction","interface","code","time","sound","samples","synths","chaining","patterns","ziffers","midi","functions","shortcuts","about","bonus"].forEach(c=>{let u="docs_"+c;document.getElementById(u).addEventListener("click",async()=>{u!=="docs_samples"?(this.currentDocumentationPane=c,this.updateDocumentationContent()):(console.log("Loading samples!"),await TE().then(()=>{this.docs=dE(this),this.currentDocumentationPane=c,this.updateDocumentationContent()}))})}),Object.entries(this.api).forEach(([c,u])=>{globalThis[c]=u}),this.state=_t.create({extensions:[...this.editorExtensions,Pe.lineWrapping,s.of(this.userPlugins),vi.highest(Ia.of([{key:"Ctrl-Enter",run:()=>!0}])),Ia.of([tM])],doc:this.universes[this.selected_universe].global.candidate}),this.view=new Pe({parent:document.getElementById("editor"),state:this.state}),this.changeModeFromInterface("global");let l=new URLSearchParams(window.location.search);if(l!==void 0){let c;if(l!==null){const u=l.get("universe");if(u!==null){let p=Uint8Array.from(atob(u),_=>_.charCodeAt(0));c=JSON.parse(NB(AB(p)));const m=OI({length:2,separator:"_",dictionaries:[bI,EI]});this.loadUniverse(m,c.universe),this.emptyUrl(),this.emptyUrl()}}}this.hydra=this.hydra_backend.synth}get note_buffer(){return this.universes[this.selected_universe.toString()].notes}get example_buffer(){return this.universes[this.selected_universe.toString()].example}get global_buffer(){return this.universes[this.selected_universe.toString()].global}get init_buffer(){return this.universes[this.selected_universe.toString()].init}get local_buffer(){return this.universes[this.selected_universe.toString()].locals[this.local_index]}async share(){async function e(a){const o=await new Promise(l=>{const c=new FileReader;c.onload=()=>l(c.result),c.readAsDataURL(new Blob([a]))});return o.slice(o.indexOf(",")+1)}let t=JSON.stringify({universe:this.settings.universes[this.selected_universe]}),r=vB(new TextEncoder().encode(t));const i=await e(r),s=new URL(window.location.href);s.searchParams.set("universe",i),window.history.replaceState({},"",s.toString()),navigator.clipboard.writeText(s.toString())}showDocumentation(){var e,t,r,i,s;(e=document.getElementById("app"))!=null&&e.classList.contains("hidden")?((t=document.getElementById("app"))==null||t.classList.remove("hidden"),(r=document.getElementById("documentation"))==null||r.classList.add("hidden"),this.exampleIsPlaying=!1):((i=document.getElementById("app"))==null||i.classList.add("hidden"),(s=document.getElementById("documentation"))==null||s.classList.remove("hidden"),this.updateDocumentationContent())}hideDocumentation(){var e,t,r;(e=document.getElementById("app"))!=null&&e.classList.contains("hidden")&&((t=document.getElementById("app"))==null||t.classList.remove("hidden"),(r=document.getElementById("documentation"))==null||r.classList.add("hidden"))}updateDocumentationContent(){const t=new zR.Converter({emoji:!0,moreStyling:!0,backslashEscapesHTMLTags:!0,extensions:[aG({auto_detection:!0}),...sG]}).makeHtml(this.docs[this.currentDocumentationPane]);document.getElementById("documentation-content").innerHTML=t}changeToLocalBuffer(e){const t=document.querySelectorAll('[id^="tab-"]'),r=t[e];r.classList.add("bg-orange-300");for(let s=0;s{t.forEach(s=>{let a=s.children[0];a.classList.contains("text-orange-300")&&(a.classList.remove("text-orange-300"),s.classList.remove("text-orange-300"))}),i.children[0].classList.remove("text-white"),i.children[0].classList.add("text-orange-300"),i.classList.add("text-orange-300"),i.classList.add("fill-orange-300")};switch(e){case"local":this.local_script_tabs.classList.contains("hidden")&&this.local_script_tabs.classList.remove("hidden"),this.editor_mode="local",this.local_index=0,this.changeToLocalBuffer(this.local_index),r(this.local_button);break;case"global":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="global",r(this.global_button);break;case"init":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="init",r(this.init_button);break;case"notes":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="notes",r(this.note_button);break}this.view.dispatch({effects:this.chosenLanguage.reconfigure(this.editor_mode=="notes"?[zk()]:[Cm()])}),this.updateEditorView()}setButtonHighlighting(e,t){document.getElementById("play-label").textContent=e!=="pause"?"Pause":"Play",e!=="pause"?(document.getElementById("pause-icon").classList.remove("hidden"),document.getElementById("play-icon").classList.add("hidden")):(document.getElementById("pause-icon").classList.add("hidden"),document.getElementById("play-icon").classList.remove("hidden")),e==="stop"&&(this.isPlaying==!1,document.getElementById("play-label").textContent="Play",document.getElementById("pause-icon").classList.add("hidden"),document.getElementById("play-icon").classList.remove("hidden")),this.flashBackground("#404040",200);const r=['[id^="play-button-"]','[id^="clear-button-"]','[id^="stop-button-"]'];let i;switch(e){case"play":i=0;break;case"pause":i=1;break;case"clear":i=2;break;case"stop":i=3;break}document.querySelectorAll(r[i]).forEach(s=>{t&&s.children[0].classList.add("animate-pulse")}),document.querySelectorAll(r.filter((s,a)=>a!=i).join(",")).forEach(s=>{s.children[0].classList.remove("animate-pulse"),s.children[1].classList.remove("animate-pulse")})}unfocusPlayButtons(){document.querySelectorAll('[id^="play-button-"]').forEach(e=>{e.children[0].classList.remove("fill-orange-300"),e.children[0].classList.remove("animate-pulse")})}updateEditorView(){this.view.dispatch({changes:{from:0,to:this.view.state.doc.toString().length,insert:this.currentFile().candidate}})}currentFile(){switch(this.editor_mode){case"global":return this.global_buffer;case"local":return this.local_buffer;case"init":return this.init_buffer;case"notes":return this.note_buffer}}loadUniverse(e,t=lE){console.log(e,t),this.currentFile().candidate=this.view.state.doc.toString();let r=e.trim();this.universes[r]===void 0&&(this.settings.universes[r]=t,this.universes[r]=t),this.selected_universe=r,this.settings.selected_universe=this.selected_universe,this.universe_viewer.innerHTML=`Topos: ${r}`,this.updateEditorView(),ls(this,this.universes[this.selected_universe.toString()].init)}openSettingsModal(){document.getElementById("modal-settings").classList.contains("invisible")?(document.getElementById("editor").classList.add("invisible"),document.getElementById("modal-settings").classList.remove("invisible")):this.closeSettingsModal()}closeSettingsModal(){document.getElementById("editor").classList.remove("invisible"),document.getElementById("modal-settings").classList.add("invisible")}openBuffersModal(){document.getElementById("modal-buffers").classList.contains("invisible")?(document.getElementById("editor").classList.add("invisible"),document.getElementById("modal-buffers").classList.remove("invisible"),document.getElementById("buffer-search").focus()):this.closeBuffersModal()}closeBuffersModal(){document.getElementById("buffer-search").value="",document.getElementById("editor").classList.remove("invisible"),document.getElementById("modal-buffers").classList.add("invisible")}flashBackground(e,t){this.view.dom.style.backgroundColor=e;const r=this.view.dom.getElementsByClassName("cm-gutter");Array.from(r).forEach(i=>i.style.backgroundColor=e),setTimeout(()=>{this.view.dom.style.backgroundColor="",Array.from(r).forEach(i=>i.style.backgroundColor="")},t)}}const mn=new oG;window.addEventListener("beforeunload",()=>(event.preventDefault(),mn.currentFile().candidate=mn.view.state.doc.toString(),mn.currentFile().committed=mn.view.state.doc.toString(),mn.settings.saveApplicationToLocalStorage(mn.universes,mn.settings),mn.clock.stop(),null)); diff --git a/index.html b/index.html index bfa92d5..1639d75 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - +