Ne&&(Ne=W,Je=[]),Je.push(q))}function Ur(q,ie,de){return new e(e.buildMessage(q,ie),q,ie,de)}function Fn(){var q,ie,de,ge=W*17+0,Ae=ye[ge];if(Ae)return W=Ae.nextPos,Ae.result;if(q=W,ie=[],de=yn(),de===a&&(de=zr(),de===a&&(de=An(),de===a&&(de=Kt(),de===a&&(de=dt())))),de!==a)for(;de!==a;)ie.push(de),de=yn(),de===a&&(de=zr(),de===a&&(de=An(),de===a&&(de=Kt(),de===a&&(de=dt()))));else ie=a;return ie!==a&&(_e=q,ie=nt(ie)),q=ie,ye[ge]={nextPos:W,result:q},q}function dt(){var q,ie,de=W*17+1,ge=ye[de];return ge?(W=ge.nextPos,ge.result):(q=W,G.test(i.charAt(W))?(ie=i.charAt(W),W++):(ie=a,Be(ne)),ie!==a&&(_e=q,ie=ze()),q=ie,ye[de]={nextPos:W,result:q},q)}function zr(){var q,ie=W*17+2,de=ye[ie];return de?(W=de.nextPos,de.result):(q=Rr(),q===a&&(q=Wt(),q===a&&(q=Ir(),q===a&&(q=Ii()))),ye[ie]={nextPos:W,result:q},q)}function Ir(){var q,ie,de,ge,Ae,Qe,Me=W*17+3,yt=ye[Me];return yt?(W=yt.nextPos,yt.result):(q=W,i.charCodeAt(W)===40?(ie=u,W++):(ie=a,Be(re)),ie!==a?(de=Wt(),de!==a?(i.charCodeAt(W)===44?(ge=p,W++):(ge=a,Be(ee)),ge!==a?(Ae=Wt(),Ae!==a?(i.charCodeAt(W)===41?(Qe=m,W++):(Qe=a,Be(B)),Qe!==a?(_e=q,q=St(de,Ae)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Me]={nextPos:W,result:q},q)}function Ii(){var q,ie,de,ge,Ae,Qe,Me=W*17+4,yt=ye[Me];return yt?(W=yt.nextPos,yt.result):(q=W,i.charCodeAt(W)===40?(ie=u,W++):(ie=a,Be(re)),ie!==a?(de=Rr(),de!==a?(i.charCodeAt(W)===44?(ge=p,W++):(ge=a,Be(ee)),ge!==a?(Ae=Rr(),Ae!==a?(i.charCodeAt(W)===41?(Qe=m,W++):(Qe=a,Be(B)),Qe!==a?(_e=q,q=mt(de,Ae)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Me]={nextPos:W,result:q},q)}function Rr(){var q,ie,de,ge,Ae,Qe,Me,yt=W*17+5,Nr=ye[yt];if(Nr)return W=Nr.nextPos,Nr.result;if(q=W,ie=W,de=[],te.test(i.charAt(W))?(ge=i.charAt(W),W++):(ge=a,Be(Q)),ge!==a)for(;ge!==a;)de.push(ge),te.test(i.charAt(W))?(ge=i.charAt(W),W++):(ge=a,Be(Q));else de=a;if(de!==a?(i.charCodeAt(W)===46?(ge=_,W++):(ge=a,Be(j)),ge!==a?(de=[de,ge],ie=de):(W=ie,ie=a)):(W=ie,ie=a),ie===a){for(ie=W,i.charCodeAt(W)===45?(de=T,W++):(de=a,Be(Z)),de===a&&(de=null),ge=[],te.test(i.charAt(W))?(Ae=i.charAt(W),W++):(Ae=a,Be(Q));Ae!==a;)ge.push(Ae),te.test(i.charAt(W))?(Ae=i.charAt(W),W++):(Ae=a,Be(Q));if(i.charCodeAt(W)===46?(Ae=_,W++):(Ae=a,Be(j)),Ae!==a){if(Qe=[],te.test(i.charAt(W))?(Me=i.charAt(W),W++):(Me=a,Be(Q)),Me!==a)for(;Me!==a;)Qe.push(Me),te.test(i.charAt(W))?(Me=i.charAt(W),W++):(Me=a,Be(Q));else Qe=a;Qe!==a?(de=[de,ge,Ae,Qe],ie=de):(W=ie,ie=a)}else W=ie,ie=a;if(ie===a)if(ie=W,i.charCodeAt(W)===46?(de=_,W++):(de=a,Be(j)),de!==a){if(ge=[],te.test(i.charAt(W))?(Ae=i.charAt(W),W++):(Ae=a,Be(Q)),Ae!==a)for(;Ae!==a;)ge.push(Ae),te.test(i.charAt(W))?(Ae=i.charAt(W),W++):(Ae=a,Be(Q));else ge=a;ge!==a?(de=[de,ge],ie=de):(W=ie,ie=a)}else W=ie,ie=a}return ie!==a&&(_e=q,ie=At()),q=ie,ye[yt]={nextPos:W,result:q},q}function Wt(){var q,ie,de,ge=W*17+6,Ae=ye[ge];if(Ae)return W=Ae.nextPos,Ae.result;if(q=W,i.charCodeAt(W)===45?W++:Be(Z),ie=[],te.test(i.charAt(W))?(de=i.charAt(W),W++):(de=a,Be(Q)),de!==a)for(;de!==a;)ie.push(de),te.test(i.charAt(W))?(de=i.charAt(W),W++):(de=a,Be(Q));else ie=a;return ie!==a?(_e=q,q=Rt()):(W=q,q=a),ye[ge]={nextPos:W,result:q},q}function yn(){var q,ie,de=W*17+7,ge=ye[de];return ge?(W=ge.nextPos,ge.result):(q=W,ie=ea(),ie===a&&(ie=li(),ie===a&&(ie=Ji(),ie===a&&(ie=cn()))),ie!==a&&(_e=q,ie=at(ie)),q=ie,ye[de]={nextPos:W,result:q},q)}function Ji(){var q,ie,de,ge,Ae=W*17+8,Qe=ye[Ae];return Qe?(W=Qe.nextPos,Qe.result):(q=W,ie=Wt(),ie===a&&(ie=Ir()),ie!==a?(i.charCodeAt(W)===47?(de=I,W++):(de=a,Be(ue)),de!==a?(ge=Wt(),ge===a&&(ge=Ir()),ge!==a?(_e=q,q=$e(ie,ge)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Ae]={nextPos:W,result:q},q)}function li(){var q,ie,de,ge,Ae=W*17+9,Qe=ye[Ae];return Qe?(W=Qe.nextPos,Qe.result):(q=W,ie=Wt(),ie===a&&(ie=Ir()),ie!==a?(i.charCodeAt(W)===92?(de=R,W++):(de=a,Be(le)),de!==a?(ge=Wt(),ge===a&&(ge=Ir()),ge!==a?(_e=q,q=hr(ie,ge)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Ae]={nextPos:W,result:q},q)}function ea(){var q,ie,de,ge,Ae,Qe,Me,yt,Nr=W*17+10,Hr=ye[Nr];return Hr?(W=Hr.nextPos,Hr.result):(q=W,ie=Wt(),ie===a&&(ie=Ir()),ie!==a?(i.charCodeAt(W)===92?(de=R,W++):(de=a,Be(le)),de!==a?(ge=Wt(),ge===a&&(ge=Ir()),ge!==a?(i.charCodeAt(W)===60?(Ae=L,W++):(Ae=a,Be(Ee)),Ae!==a?(Qe=Wt(),Qe===a&&(Qe=Ir()),Qe!==a?(i.charCodeAt(W)===47?W++:Be(ue),Me=Wt(),Me===a&&(Me=Ir()),Me===a&&(Me=null),i.charCodeAt(W)===62?(yt=$,W++):(yt=a,Be(De)),yt!==a?(_e=q,q=rt(ie,ge,Qe,Me)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Nr]={nextPos:W,result:q},q)}function cn(){var q,ie,de,ge,Ae=W*17+11,Qe=ye[Ae];return Qe?(W=Qe.nextPos,Qe.result):(q=W,ie=Wt(),ie!==a?(i.charCodeAt(W)===44?(de=p,W++):(de=a,Be(ee)),de!==a?(ge=Wt(),ge!==a?(_e=q,q=He(ie,ge)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Ae]={nextPos:W,result:q},q)}function ci(){var q,ie,de,ge=W*17+12,Ae=ye[ge];if(Ae)return W=Ae.nextPos,Ae.result;if(q=W,ie=[],de=Wt(),de===a&&(de=dt()),de!==a)for(;de!==a;)ie.push(de),de=Wt(),de===a&&(de=dt());else ie=a;return ie!==a&&(_e=q,ie=Br(ie)),q=ie,ye[ge]={nextPos:W,result:q},q}function An(){var q,ie,de,ge,Ae=W*17+13,Qe=ye[Ae];return Qe?(W=Qe.nextPos,Qe.result):(q=W,i.charCodeAt(W)===91?(ie=K,W++):(ie=a,Be(xe)),ie!==a?(de=ci(),de!==a?(i.charCodeAt(W)===62?(ge=$,W++):(ge=a,Be(De)),ge!==a?(_e=q,q=cr(de)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Ae]={nextPos:W,result:q},q)}function Kt(){var q,ie,de,ge,Ae,Qe,Me,yt,Nr=W*17+14,Hr=ye[Nr];if(Hr)return W=Hr.nextPos,Hr.result;if(q=W,ie=zr(),ie===a&&(ie=yn(),ie===a&&(ie=An(),ie===a)))for(ie=[],de=dt();de!==a;)ie.push(de),de=dt();if(ie!==a){if(de=[],ge=W,Ae=ui(),Ae!==a){for(Qe=[],Me=dt();Me!==a;)Qe.push(Me),Me=dt();if(Me=zr(),Me===a&&(Me=yn(),Me===a&&(Me=An(),Me===a&&(Me=di(),Me===a&&(Me=Kt(),Me===a)))))for(Me=[],yt=dt();yt!==a;)Me.push(yt),yt=dt();Me!==a?(Ae=[Ae,Qe,Me],ge=Ae):(W=ge,ge=a)}else W=ge,ge=a;if(ge!==a)for(;ge!==a;)if(de.push(ge),ge=W,Ae=ui(),Ae!==a){for(Qe=[],Me=dt();Me!==a;)Qe.push(Me),Me=dt();if(Me=zr(),Me===a&&(Me=yn(),Me===a&&(Me=An(),Me===a&&(Me=di(),Me===a&&(Me=Kt(),Me===a)))))for(Me=[],yt=dt();yt!==a;)Me.push(yt),yt=dt();Me!==a?(Ae=[Ae,Qe,Me],ge=Ae):(W=ge,ge=a)}else W=ge,ge=a;else de=a;de!==a?(_e=q,q=vr()):(W=q,q=a)}else W=q,q=a;return ye[Nr]={nextPos:W,result:q},q}function ui(){var q,ie=W*17+15,de=ye[ie];return de?(W=de.nextPos,de.result):(i.charCodeAt(W)===43?(q=f,W++):(q=a,Be(be)),q===a&&(i.charCodeAt(W)===45?(q=T,W++):(q=a,Be(Z)),q===a&&(i.charCodeAt(W)===42?(q=E,W++):(q=a,Be(Re)),q===a&&(i.charCodeAt(W)===37?(q=S,W++):(q=a,Be(ce)),q===a&&(i.charCodeAt(W)===38?(q=N,W++):(q=a,Be(ke)),q===a&&(i.charCodeAt(W)===124?(q=k,W++):(q=a,Be(Ze)),q===a&&(i.substr(W,2)===x?(q=x,W+=2):(q=a,Be(Le)),q===a&&(i.substr(W,2)===M?(q=M,W+=2):(q=a,Be(tt))))))))),ye[ie]={nextPos:W,result:q},q)}function di(){var q,ie,de,ge,Ae=W*17+16,Qe=ye[Ae];return Qe?(W=Qe.nextPos,Qe.result):(q=W,i.charCodeAt(W)===40?(ie=u,W++):(ie=a,Be(re)),ie!==a?(de=Kt(),de!==a?(i.charCodeAt(W)===41?(ge=m,W++):(ge=a,Be(B)),ge!==a?(ie=[ie,de,ge],q=ie):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Ae]={nextPos:W,result:q},q)}if(Ht=c(),Ht!==a&&W===i.length)return Ht;throw Ht!==a&&W{if(Object.prototype.hasOwnProperty.call(this,s)){const a=this[s];(a||a===0)&&(i[s]=this[s])}return i},{})}mapExisting(t,r){return t.reduce((s,a,o)=>{if(Object.prototype.hasOwnProperty.call(this,a)){const l=this[a];(l||l===0)&&(s[r[o]]=this[a])}return s},{})}};class ti extends ws{constructor(t){super(t);b(this,"pitch");b(this,"add");b(this,"freq");b(this,"note");b(this,"octave");b(this,"pitchOctave");b(this,"bend");b(this,"key");b(this,"parsedScale");b(this,"scaleName");Object.assign(this,t)}refresh(){this.evaluate()}evaluate(t={}){const r=ei(this);if(t.octave&&(r.octave=t.octave+(r.pitchOctave||0)),r.duration||(r.duration=t.duration||t.duration===0?t.duration:Jg),t.scale&&(r.parsedScale=cl(t.scale)),t.key&&(r.key=t.key),(t.soundIndex||t.soundIndex===0)&&(typeof t.soundIndex!="number"?r.soundIndex=t.soundIndex.evaluateValue():r.soundIndex=t.soundIndex),t.sound&&(typeof t.sound!="string"?r.sound=t.sound.evaluateValue():r.sound=t.sound),r.pitch||r.pitch===0){r.pitch instanceof Mc&&(r.pitch=r.pitch.evaluateValue());const[i,s]=r_(r.key,r.pitch,r.parsedScale,r.octave);r.note=r.add?i+r.add:i,r.freq=Zn(r.note),s&&(r.bend=s)}return r.soundIndex instanceof Mc&&(r.soundIndex=r.soundIndex.evaluateValue()),r}collect(t){return this[t]}scale(t){return this.scaleName!==t?(this.scaleName=t,this.parsedScale=vi(t),this.evaluate()):this}randomScale(){return this.parsedScale=QP(),this.evaluate()}}class WP extends ti{constructor(e){super(e),Object.assign(this,e)}evaluateValue(){return this.sound}}let XP=class extends ws{constructor(t){super(t);b(this,"item");Object.assign(this,t)}evaluate(t){let r=this.sound;return t?t.sound=r:t={sound:r},this.item.evaluate(t)}};class ZP extends ws{constructor(t){super(t);b(this,"item");Object.assign(this,t)}evaluate(t){return t?t.soundIndex=this.soundIndex:t={soundIndex:this.soundIndex},this.item.evaluate(t)}}class Ra extends ws{constructor(t){super(t);b(this,"pitches");b(this,"chordName");b(this,"inversion");b(this,"key");b(this,"scaleName");Object.assign(this,t),this.pitches&&this.pitches.length>0&&(this.duration=Math.max(...this.pitches.map(r=>r.duration)))}evaluate(t={}){const r=ei(this);return t.inversion||r.inversion?r.pitches=r.invert(t.inversion||r.inversion,t):r.pitches=r.pitches.map(i=>i.evaluate(t)),r.duration=Math.max(...r.pitches.map(i=>i.duration)),r}collect(t){return this.pitches.map(i=>i.collect(t))}notes(){return this.pitches.map(t=>t.note)}freqs(){return this.pitches.map(t=>t.freq)}midiChord(){return this.pitches.map(r=>r.mapExisting(["note","soundIndex"],["note","channel"]))}scale(t){return this.pitches.forEach(r=>r.scale(t)),this}invert(t,r={}){const i=t<0?this.pitches.reverse():this.pitches;for(let s=0;s s.evaluate(r))}voiceLeadFromNotes(t,r){this.pitches=this.pitches.map((i,s)=>{if(t[s]){const a=ru(t[s],r.key,r.scaleName),o=ei(i);return o.pitch=a.pc,o.octave=a.octave,o.add=a.add,o.text=a.text,o.note=t[s],o.freq=Zn(t[s]),o}else return ei(i)})}}class KP extends Ra{constructor(t){super(t);b(this,"roman");b(this,"romanNumeral");b(this,"octave");b(this,"chordOctave");Object.assign(this,t)}evaluate(t={}){const r=ei(this);r.romanNumeral=f3(r.roman);const i=r.key||t.key||60,s=r.scaleName||t.scale||"MAJOR",a=cl(s);let o=(r.chordOctave||0)+(t.octave||0);const c=(r.chordName?tu(r.romanNumeral,r.chordName,i,s,o):d3(r.romanNumeral,s,i,o)).map(u=>ru(u,i,s));if(r.pitches=c.map(u=>{const p=o+u.octave;return new ti({pitch:u.pc,octave:p,key:i,parsedScale:a,add:u.add,duration:this.duration}).evaluate(t)}),t.inversion||r.inversion){const u=t.inversion||r.inversion;r.pitches=r.invert(u,t)}return r.duration=Math.max(...r.pitches.map(u=>u.duration)),r}}class $m extends ws{constructor(e){super(e)}evaluate(e={}){return this.duration||(this.duration=e.duration||e.duration===0?e.duration:Jg),this}}class Mc extends ti{constructor(t){super(t);b(this,"min");b(this,"max");b(this,"randomSeed");b(this,"seededRandom");b(this,"random");Object.assign(this,t),t.min||(this.min=0),t.max||(this.max=o3(this.parsedScale)),this.seededRandom?this.random=this.seededRandom:this.random=Math.random}evaluate(t={}){this.pitch=this.evaluateValue();const r=new ti(this).evaluate(t);return r.type="Pitch",r.text=r.pitch.toString(),r}evaluateValue(){return Math.floor(this.random()*(this.max-this.min+1))+this.min}}class jP extends ii{constructor(t){super(t);b(this,"octave");Object.assign(this,t)}evaluate(t={}){t.octave=this.octave+(t.octave||0)}}class JP extends ii{constructor(t){super(t);b(this,"duration");Object.assign(this,t)}evaluate(t={}){t.duration=this.duration}}class mE extends ii{constructor(t){super(t);b(this,"times");b(this,"item");Object.assign(this,t)}evaluate(t={}){return[...Array(this.times)].map(()=>this.item).flat(1/0).map(i=>i.evaluate(t))}}class gE extends ii{constructor(t){super(t);b(this,"items");Object.assign(this,t)}evaluate(t={}){return this.items.map(r=>r.evaluate(t))}}class vI extends ii{constructor(t){super(t);b(this,"duration");b(this,"items");b(this,"evaluated");Object.assign(this,t)}evaluate(t={}){return t.subdivisions=!0,this.duration=t.duration||Jg,this.evaluated=this.items.map(r=>r.evaluate(t)).filter(r=>r).flat(1/0),this}}class e3 extends ii{constructor(t){super(t);b(this,"times");b(this,"items");Object.assign(this,t)}evaluate(t={}){const r=this.items.map(s=>s.evaluate(t));return[...Array(this.times)].map(()=>r).flat(1/0)}}class t3 extends ii{constructor(t){super(t);b(this,"left");b(this,"right");b(this,"operation");Object.assign(this,t)}evaluate(t={}){this.left.evaluate(t),this.right.evaluate(t);const r=MP[this.operation];return this.right.items.flatMap(a=>this.left.items.map(o=>[a.clone(),o.clone()])).map(a=>(a[0].pitch=r(a[0].pitch,a[1].pitch),a[0].evaluate(t)))}}class Io extends ws{constructor(t){super(t);b(this,"items");b(this,"index");Object.assign(this,t),this.items=this.items.filter(r=>r!==void 0),this.index=0}nextItem(t={}){let r=this.items[this.index%this.items.length];for(;r instanceof Io;)r=r.nextItem(t);return this.index=this.index+1,r instanceof ii?r.evaluate(t):r}evaluate(t={}){return this.nextItem(t)}evaluateValue(t={}){const r=this.nextItem(t);return r instanceof ii?r.evaluateValue():r}}const r_=(n,e,t,r=0,i=0,s=!1)=>{e=s&&e>0?e-1:e,n=typeof n=="string"?oi(n):n;const a=typeof t=="string"?vi(t):t,o=a.length;(e>=o||e<0)&&(r+=Math.floor(e/o),e=e<0?o-Math.abs(e)%o:e%o,e===o&&(e=0));let l=n+a.slice(0,e).reduce((c,u)=>c+u,0);return l=l+r*a.reduce((c,u)=>c+u,0)+i,Number.isInteger(l)?[l,void 0]:TI(l)},oi=n=>{const e=n.match(/^([a-gA-G])([#bs])?([1-9])?$/);if(e===null)return 60;const[,t,r,i]=e,s=i?parseInt(i,10):4,a=YP[r]||0,o=UP[t.toUpperCase()];return 12+s*12+o+a},TI=(n,e=1)=>{let t=8192;if(n%1!==0){const r=n>Math.round(n)?n:Math.round(n),i=n>Math.round(n)?Math.round(n):n,s=Zn(r)/Zn(i),a=1200*Math.log2(s);t=t+Math.floor(8191*(a/(100*e)))}return[n,t]},Zn=n=>440/32*2**((n-9)/12),r3=n=>12/Math.log(2)*Math.log(n/440)+69,CI=n=>1200*Math.log2(n),n3=function*(){var t;const n={};let e=2;for(;;){if(!(e in n))yield e,n[e*e]=[e];else{for(const r of n[e])(n[t=r+e]||(n[t]=[])).push(r);delete n[e]}e++}},i3=n=>{const e=n3();return Array.from({length:n},()=>e.next().value)},a3=n=>{const e=n.length,t=i3(e+1);let r=1;for(let i=0;i {n[0]!==0&&(n=[0,...n]);const e=[];for(let t=0;t typeof n=="string"?vi(n).length:n.length,yI=n=>[0,...n].reduce((e,t,r)=>{const i=r===0?0:t+e[r-1];return[...e,i]},[]),l3=n=>((n<0||n>4095)&&(console.log("Input number must be odd and between 0 and 4095. Using major (2741) instead."),n=2741),n%2===0&&console.log("Odd number doesnt create real scale"),(n>>>0).toString(2).padStart(12,"0").split("").reduce((t,r,i)=>r==="1"?[11-i,...t]:t,[])),c3=n=>{try{return t_(n)}catch{return[]}},cl=n=>{if(typeof n=="string"){if(e_(n))return vi(n);{const e=c3(n);return e&&e.length>0?e:vi("MAJOR")}}else if(typeof n=="number")return l3(n);return n},tu=(n,e="major",t=60,r="CHROMATIC",i=1)=>{const s=fE[e]||fE.major;t=typeof t=="string"?oi(t):t;const a=n_(r,t)[n-1],o=[];for(let l=0;l<=i;l++)for(const c of s)o.push(a+c+l*12);return o},u3=(n="major",e=60,t="MAJOR",r=1,i)=>{const s=tu(1,n,e,"CHROMATIC",r),a=typeof t=="string"?vi(t):t;return s.map(l=>{const c=ru(l,e,t);return new ti({text:c.text,note:l,pitch:c.pc,octave:c.octave,add:c.add,duration:i,scaleName:t,parsedScale:a,key:e})})},n_=(n,e=60,t=1)=>{const r=cl(n);let i=typeof e=="string"?oi(e):e;const s=[i];for(let a=0;a {const s=typeof t=="string"?oi(t):t;return i&&typeof e=="string"&&e.toUpperCase()==="CHROMATIC"&&(i="major"),i?tu(n,i,s,e,r):p3(n,s,e)},p3=(n,e=60,t="Major",r=3,i=2)=>{const s=typeof t=="string"?qP(t):t.length,a=Math.floor((r*i+n-1)/s)+1,o=n_(t,e,a),l=[];for(let c=n-1;l.length {const e=n.match(/([a-gA-G][#bs]?)([0-9])?([a-zA-Z0-9]+)/);if(e===null)return[60,64,67];let[,t,r,i]=e;const s=oi(t),a=r?parseInt(r,10):0;return tu(1,i,s,"CHROMATIC",a)},f3=n=>n.split("").map(t=>$P[t]).reduce((t,r,i,s)=>i (hE.includes(n)||(n=II(oi(n))),hE.indexOf(n)-6),II=n=>FP[n%12],m3=n=>{const e=II(n);return AI(e)},g3=(n,e)=>{let t;return typeof e=="string"?t=AI(e[0]):t=m3(e),(n*7+26-(11+t))%12+(11+t)},_3=(n,e=60)=>n<=0?0:Math.floor((n-e)/12),ru=(n,e=60,t="MAJOR")=>{function r(p){return p>0?"^".repeat(p):p<0?"_".repeat(Math.abs(p)):""}const i=typeof e=="number"?e:oi(e),s=zP(n-i,12),a=_3(n,i);if(typeof t=="string"&&t.toUpperCase()==="CHROMATIC")return{text:s.toString(),pc:s,octave:a,add:0};const o=["0","#0","1","#1","2","3","#3","4","#4","5","#5","6"],l=["0","b1","1","b2","2","3","b4","4","b5","5","b6","6"],c=g3(n,e);let u;if(c>=6&&c<=12&&l[s].length===2?u=l[s]:u=o[s],u.length>1){const p=u[0]==="#"?1:-1;return{text:r(a)+u,pc:parseInt(u[1]),octave:a,add:p}}return{text:r(a)+u,pc:parseInt(u),octave:a,add:0}},S3=(n,e,t)=>{const r=oi(n);return ru(r,e,t)},Gm=(n,e)=>n.map(t=>e+t%12).sort((t,r)=>t-r),O3=(n,e)=>{const t=n[0],r=Gm(n,t),i=Gm(e,t);return r.map((s,a)=>i[a]?i[a]-s:void 0)},E3=(n,e)=>{const t=n[0],r=n.map(a=>[a,Gm(n,t).indexOf(t+a%12)]),i=O3(n,e);return r.map(([a,o])=>i[o]?a+i[o]:a)},RI=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 ",!1),xe=It("[",!1),be=It("+",!1),Re=It("*",!1),ce=It("%",!1),ke=It("&",!1),Ze=It("|",!1),Le=It("<<",!1),tt=It(">>",!1),nt=function(q){return o3(q.filter(ie=>ie))},ze=function(){},St=function(q,ie){return Math.floor(Math.random()*(ie-q+1)+q)},mt=function(q,ie){return Math.random()*(ie-q)+q},At=function(){return parseFloat(ut())},Rt=function(){return parseInt(ut())},at=function(q){return CI(q)},$e=function(q,ie){return q/ie},hr=function(q,ie){return Math.pow(2,q/ie)},rt=function(q,ie,de,ge){var Ae=ge?de/ge:de;return Math.pow(Ae,q/ie)},He=function(q,ie){return parseFloat(q.toString()+"."+ie.toString())},Br=function(q){return q.filter(ie=>ie)},cr=function(q){return s3(q)},vr=function(){return EI(ut())},W=0,_e=0,we=[{line:1,column:1}],Ne=0,Je=[],ye={},Ht;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 ut(){return i.substring(_e,W)}function It(q,ie){return{type:"literal",text:q,ignoreCase:ie}}function Vr(q,ie,de){return{type:"class",parts:q,inverted:ie,ignoreCase:de}}function ht(){return{type:"end"}}function Zt(q){var ie=we[q],de;if(ie)return ie;for(de=q-1;!we[de];)de--;for(ie=we[de],ie={line:ie.line,column:ie.column};de Ne&&(Ne=W,Je=[]),Je.push(q))}function Ur(q,ie,de){return new e(e.buildMessage(q,ie),q,ie,de)}function Fn(){var q,ie,de,ge=W*17+0,Ae=ye[ge];if(Ae)return W=Ae.nextPos,Ae.result;if(q=W,ie=[],de=yn(),de===a&&(de=zr(),de===a&&(de=An(),de===a&&(de=Kt(),de===a&&(de=dt())))),de!==a)for(;de!==a;)ie.push(de),de=yn(),de===a&&(de=zr(),de===a&&(de=An(),de===a&&(de=Kt(),de===a&&(de=dt()))));else ie=a;return ie!==a&&(_e=q,ie=nt(ie)),q=ie,ye[ge]={nextPos:W,result:q},q}function dt(){var q,ie,de=W*17+1,ge=ye[de];return ge?(W=ge.nextPos,ge.result):(q=W,G.test(i.charAt(W))?(ie=i.charAt(W),W++):(ie=a,Be(ne)),ie!==a&&(_e=q,ie=ze()),q=ie,ye[de]={nextPos:W,result:q},q)}function zr(){var q,ie=W*17+2,de=ye[ie];return de?(W=de.nextPos,de.result):(q=Rr(),q===a&&(q=Wt(),q===a&&(q=Ir(),q===a&&(q=Ii()))),ye[ie]={nextPos:W,result:q},q)}function Ir(){var q,ie,de,ge,Ae,Qe,Me=W*17+3,yt=ye[Me];return yt?(W=yt.nextPos,yt.result):(q=W,i.charCodeAt(W)===40?(ie=u,W++):(ie=a,Be(re)),ie!==a?(de=Wt(),de!==a?(i.charCodeAt(W)===44?(ge=p,W++):(ge=a,Be(ee)),ge!==a?(Ae=Wt(),Ae!==a?(i.charCodeAt(W)===41?(Qe=m,W++):(Qe=a,Be(B)),Qe!==a?(_e=q,q=St(de,Ae)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Me]={nextPos:W,result:q},q)}function Ii(){var q,ie,de,ge,Ae,Qe,Me=W*17+4,yt=ye[Me];return yt?(W=yt.nextPos,yt.result):(q=W,i.charCodeAt(W)===40?(ie=u,W++):(ie=a,Be(re)),ie!==a?(de=Rr(),de!==a?(i.charCodeAt(W)===44?(ge=p,W++):(ge=a,Be(ee)),ge!==a?(Ae=Rr(),Ae!==a?(i.charCodeAt(W)===41?(Qe=m,W++):(Qe=a,Be(B)),Qe!==a?(_e=q,q=mt(de,Ae)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Me]={nextPos:W,result:q},q)}function Rr(){var q,ie,de,ge,Ae,Qe,Me,yt=W*17+5,Nr=ye[yt];if(Nr)return W=Nr.nextPos,Nr.result;if(q=W,ie=W,de=[],te.test(i.charAt(W))?(ge=i.charAt(W),W++):(ge=a,Be(Q)),ge!==a)for(;ge!==a;)de.push(ge),te.test(i.charAt(W))?(ge=i.charAt(W),W++):(ge=a,Be(Q));else de=a;if(de!==a?(i.charCodeAt(W)===46?(ge=_,W++):(ge=a,Be(j)),ge!==a?(de=[de,ge],ie=de):(W=ie,ie=a)):(W=ie,ie=a),ie===a){for(ie=W,i.charCodeAt(W)===45?(de=T,W++):(de=a,Be(Z)),de===a&&(de=null),ge=[],te.test(i.charAt(W))?(Ae=i.charAt(W),W++):(Ae=a,Be(Q));Ae!==a;)ge.push(Ae),te.test(i.charAt(W))?(Ae=i.charAt(W),W++):(Ae=a,Be(Q));if(i.charCodeAt(W)===46?(Ae=_,W++):(Ae=a,Be(j)),Ae!==a){if(Qe=[],te.test(i.charAt(W))?(Me=i.charAt(W),W++):(Me=a,Be(Q)),Me!==a)for(;Me!==a;)Qe.push(Me),te.test(i.charAt(W))?(Me=i.charAt(W),W++):(Me=a,Be(Q));else Qe=a;Qe!==a?(de=[de,ge,Ae,Qe],ie=de):(W=ie,ie=a)}else W=ie,ie=a;if(ie===a)if(ie=W,i.charCodeAt(W)===46?(de=_,W++):(de=a,Be(j)),de!==a){if(ge=[],te.test(i.charAt(W))?(Ae=i.charAt(W),W++):(Ae=a,Be(Q)),Ae!==a)for(;Ae!==a;)ge.push(Ae),te.test(i.charAt(W))?(Ae=i.charAt(W),W++):(Ae=a,Be(Q));else ge=a;ge!==a?(de=[de,ge],ie=de):(W=ie,ie=a)}else W=ie,ie=a}return ie!==a&&(_e=q,ie=At()),q=ie,ye[yt]={nextPos:W,result:q},q}function Wt(){var q,ie,de,ge=W*17+6,Ae=ye[ge];if(Ae)return W=Ae.nextPos,Ae.result;if(q=W,i.charCodeAt(W)===45?W++:Be(Z),ie=[],te.test(i.charAt(W))?(de=i.charAt(W),W++):(de=a,Be(Q)),de!==a)for(;de!==a;)ie.push(de),te.test(i.charAt(W))?(de=i.charAt(W),W++):(de=a,Be(Q));else ie=a;return ie!==a?(_e=q,q=Rt()):(W=q,q=a),ye[ge]={nextPos:W,result:q},q}function yn(){var q,ie,de=W*17+7,ge=ye[de];return ge?(W=ge.nextPos,ge.result):(q=W,ie=ea(),ie===a&&(ie=li(),ie===a&&(ie=Ji(),ie===a&&(ie=cn()))),ie!==a&&(_e=q,ie=at(ie)),q=ie,ye[de]={nextPos:W,result:q},q)}function Ji(){var q,ie,de,ge,Ae=W*17+8,Qe=ye[Ae];return Qe?(W=Qe.nextPos,Qe.result):(q=W,ie=Wt(),ie===a&&(ie=Ir()),ie!==a?(i.charCodeAt(W)===47?(de=I,W++):(de=a,Be(ue)),de!==a?(ge=Wt(),ge===a&&(ge=Ir()),ge!==a?(_e=q,q=$e(ie,ge)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Ae]={nextPos:W,result:q},q)}function li(){var q,ie,de,ge,Ae=W*17+9,Qe=ye[Ae];return Qe?(W=Qe.nextPos,Qe.result):(q=W,ie=Wt(),ie===a&&(ie=Ir()),ie!==a?(i.charCodeAt(W)===92?(de=R,W++):(de=a,Be(le)),de!==a?(ge=Wt(),ge===a&&(ge=Ir()),ge!==a?(_e=q,q=hr(ie,ge)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Ae]={nextPos:W,result:q},q)}function ea(){var q,ie,de,ge,Ae,Qe,Me,yt,Nr=W*17+10,Hr=ye[Nr];return Hr?(W=Hr.nextPos,Hr.result):(q=W,ie=Wt(),ie===a&&(ie=Ir()),ie!==a?(i.charCodeAt(W)===92?(de=R,W++):(de=a,Be(le)),de!==a?(ge=Wt(),ge===a&&(ge=Ir()),ge!==a?(i.charCodeAt(W)===60?(Ae=L,W++):(Ae=a,Be(Ee)),Ae!==a?(Qe=Wt(),Qe===a&&(Qe=Ir()),Qe!==a?(i.charCodeAt(W)===47?W++:Be(ue),Me=Wt(),Me===a&&(Me=Ir()),Me===a&&(Me=null),i.charCodeAt(W)===62?(yt=$,W++):(yt=a,Be(De)),yt!==a?(_e=q,q=rt(ie,ge,Qe,Me)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Nr]={nextPos:W,result:q},q)}function cn(){var q,ie,de,ge,Ae=W*17+11,Qe=ye[Ae];return Qe?(W=Qe.nextPos,Qe.result):(q=W,ie=Wt(),ie!==a?(i.charCodeAt(W)===44?(de=p,W++):(de=a,Be(ee)),de!==a?(ge=Wt(),ge!==a?(_e=q,q=He(ie,ge)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Ae]={nextPos:W,result:q},q)}function ci(){var q,ie,de,ge=W*17+12,Ae=ye[ge];if(Ae)return W=Ae.nextPos,Ae.result;if(q=W,ie=[],de=Wt(),de===a&&(de=dt()),de!==a)for(;de!==a;)ie.push(de),de=Wt(),de===a&&(de=dt());else ie=a;return ie!==a&&(_e=q,ie=Br(ie)),q=ie,ye[ge]={nextPos:W,result:q},q}function An(){var q,ie,de,ge,Ae=W*17+13,Qe=ye[Ae];return Qe?(W=Qe.nextPos,Qe.result):(q=W,i.charCodeAt(W)===91?(ie=K,W++):(ie=a,Be(xe)),ie!==a?(de=ci(),de!==a?(i.charCodeAt(W)===62?(ge=$,W++):(ge=a,Be(De)),ge!==a?(_e=q,q=cr(de)):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Ae]={nextPos:W,result:q},q)}function Kt(){var q,ie,de,ge,Ae,Qe,Me,yt,Nr=W*17+14,Hr=ye[Nr];if(Hr)return W=Hr.nextPos,Hr.result;if(q=W,ie=zr(),ie===a&&(ie=yn(),ie===a&&(ie=An(),ie===a)))for(ie=[],de=dt();de!==a;)ie.push(de),de=dt();if(ie!==a){if(de=[],ge=W,Ae=ui(),Ae!==a){for(Qe=[],Me=dt();Me!==a;)Qe.push(Me),Me=dt();if(Me=zr(),Me===a&&(Me=yn(),Me===a&&(Me=An(),Me===a&&(Me=di(),Me===a&&(Me=Kt(),Me===a)))))for(Me=[],yt=dt();yt!==a;)Me.push(yt),yt=dt();Me!==a?(Ae=[Ae,Qe,Me],ge=Ae):(W=ge,ge=a)}else W=ge,ge=a;if(ge!==a)for(;ge!==a;)if(de.push(ge),ge=W,Ae=ui(),Ae!==a){for(Qe=[],Me=dt();Me!==a;)Qe.push(Me),Me=dt();if(Me=zr(),Me===a&&(Me=yn(),Me===a&&(Me=An(),Me===a&&(Me=di(),Me===a&&(Me=Kt(),Me===a)))))for(Me=[],yt=dt();yt!==a;)Me.push(yt),yt=dt();Me!==a?(Ae=[Ae,Qe,Me],ge=Ae):(W=ge,ge=a)}else W=ge,ge=a;else de=a;de!==a?(_e=q,q=vr()):(W=q,q=a)}else W=q,q=a;return ye[Nr]={nextPos:W,result:q},q}function ui(){var q,ie=W*17+15,de=ye[ie];return de?(W=de.nextPos,de.result):(i.charCodeAt(W)===43?(q=f,W++):(q=a,Be(be)),q===a&&(i.charCodeAt(W)===45?(q=T,W++):(q=a,Be(Z)),q===a&&(i.charCodeAt(W)===42?(q=E,W++):(q=a,Be(Re)),q===a&&(i.charCodeAt(W)===37?(q=S,W++):(q=a,Be(ce)),q===a&&(i.charCodeAt(W)===38?(q=N,W++):(q=a,Be(ke)),q===a&&(i.charCodeAt(W)===124?(q=k,W++):(q=a,Be(Ze)),q===a&&(i.substr(W,2)===x?(q=x,W+=2):(q=a,Be(Le)),q===a&&(i.substr(W,2)===M?(q=M,W+=2):(q=a,Be(tt))))))))),ye[ie]={nextPos:W,result:q},q)}function di(){var q,ie,de,ge,Ae=W*17+16,Qe=ye[Ae];return Qe?(W=Qe.nextPos,Qe.result):(q=W,i.charCodeAt(W)===40?(ie=u,W++):(ie=a,Be(re)),ie!==a?(de=Kt(),de!==a?(i.charCodeAt(W)===41?(ge=m,W++):(ge=a,Be(B)),ge!==a?(ie=[ie,de,ge],q=ie):(W=q,q=a)):(W=q,q=a)):(W=q,q=a),ye[Ae]={nextPos:W,result:q},q)}if(Ht=c(),Ht!==a&&W===i.length)return Ht;throw Ht!==a&&W{if(Object.prototype.hasOwnProperty.call(this,s)){const a=this[s];(a||a===0)&&(i[s]=this[s])}return i},{})}mapExisting(t,r){return t.reduce((s,a,o)=>{if(Object.prototype.hasOwnProperty.call(this,a)){const l=this[a];(l||l===0)&&(s[r[o]]=this[a])}return s},{})}};class ti extends ws{constructor(t){super(t);b(this,"pitch");b(this,"add");b(this,"freq");b(this,"note");b(this,"octave");b(this,"pitchOctave");b(this,"bend");b(this,"key");b(this,"parsedScale");b(this,"scaleName");Object.assign(this,t)}refresh(){this.evaluate()}evaluate(t={}){const r=ei(this);if(t.octave&&(r.octave=t.octave+(r.pitchOctave||0)),r.duration||(r.duration=t.duration||t.duration===0?t.duration:Jg),t.scale&&(r.parsedScale=cl(t.scale)),t.key&&(r.key=t.key),(t.soundIndex||t.soundIndex===0)&&(typeof t.soundIndex!="number"?r.soundIndex=t.soundIndex.evaluateValue():r.soundIndex=t.soundIndex),t.sound&&(typeof t.sound!="string"?r.sound=t.sound.evaluateValue():r.sound=t.sound),r.pitch||r.pitch===0){r.pitch instanceof Mc&&(r.pitch=r.pitch.evaluateValue());const[i,s]=r_(r.key,r.pitch,r.parsedScale,r.octave);r.note=r.add?i+r.add:i,r.freq=Zn(r.note),s&&(r.bend=s)}return r.soundIndex instanceof Mc&&(r.soundIndex=r.soundIndex.evaluateValue()),r}collect(t){return this[t]}scale(t){return this.scaleName!==t?(this.scaleName=t,this.parsedScale=vi(t),this.evaluate()):this}randomScale(){return this.parsedScale=qP(),this.evaluate()}}class XP extends ti{constructor(e){super(e),Object.assign(this,e)}evaluateValue(){return this.sound}}let ZP=class extends ws{constructor(t){super(t);b(this,"item");Object.assign(this,t)}evaluate(t){let r=this.sound;return t?t.sound=r:t={sound:r},this.item.evaluate(t)}};class KP extends ws{constructor(t){super(t);b(this,"item");Object.assign(this,t)}evaluate(t){return t?t.soundIndex=this.soundIndex:t={soundIndex:this.soundIndex},this.item.evaluate(t)}}class Ra extends ws{constructor(t){super(t);b(this,"pitches");b(this,"chordName");b(this,"inversion");b(this,"key");b(this,"scaleName");Object.assign(this,t),this.pitches&&this.pitches.length>0&&(this.duration=Math.max(...this.pitches.map(r=>r.duration)))}evaluate(t={}){const r=ei(this);return t.inversion||r.inversion?r.pitches=r.invert(t.inversion||r.inversion,t):r.pitches=r.pitches.map(i=>i.evaluate(t)),r.duration=Math.max(...r.pitches.map(i=>i.duration)),r}collect(t){return this.pitches.map(i=>i.collect(t))}notes(){return this.pitches.map(t=>t.note)}freqs(){return this.pitches.map(t=>t.freq)}midiChord(){return this.pitches.map(r=>r.mapExisting(["note","soundIndex"],["note","channel"]))}scale(t){return this.pitches.forEach(r=>r.scale(t)),this}invert(t,r={}){const i=t<0?this.pitches.reverse():this.pitches;for(let s=0;s s.evaluate(r))}voiceLeadFromNotes(t,r){this.pitches=this.pitches.map((i,s)=>{if(t[s]){const a=ru(t[s],r.key,r.scaleName),o=ei(i);return o.pitch=a.pc,o.octave=a.octave,o.add=a.add,o.text=a.text,o.note=t[s],o.freq=Zn(t[s]),o}else return ei(i)})}}class jP extends Ra{constructor(t){super(t);b(this,"roman");b(this,"romanNumeral");b(this,"octave");b(this,"chordOctave");Object.assign(this,t)}evaluate(t={}){const r=ei(this);r.romanNumeral=m3(r.roman);const i=r.key||t.key||60,s=r.scaleName||t.scale||"MAJOR",a=cl(s);let o=(r.chordOctave||0)+(t.octave||0);const c=(r.chordName?tu(r.romanNumeral,r.chordName,i,s,o):p3(r.romanNumeral,s,i,o)).map(u=>ru(u,i,s));if(r.pitches=c.map(u=>{const p=o+u.octave;return new ti({pitch:u.pc,octave:p,key:i,parsedScale:a,add:u.add,duration:this.duration}).evaluate(t)}),t.inversion||r.inversion){const u=t.inversion||r.inversion;r.pitches=r.invert(u,t)}return r.duration=Math.max(...r.pitches.map(u=>u.duration)),r}}class $m extends ws{constructor(e){super(e)}evaluate(e={}){return this.duration||(this.duration=e.duration||e.duration===0?e.duration:Jg),this}}class Mc extends ti{constructor(t){super(t);b(this,"min");b(this,"max");b(this,"randomSeed");b(this,"seededRandom");b(this,"random");Object.assign(this,t),t.min||(this.min=0),t.max||(this.max=l3(this.parsedScale)),this.seededRandom?this.random=this.seededRandom:this.random=Math.random}evaluate(t={}){this.pitch=this.evaluateValue();const r=new ti(this).evaluate(t);return r.type="Pitch",r.text=r.pitch.toString(),r}evaluateValue(){return Math.floor(this.random()*(this.max-this.min+1))+this.min}}class JP extends ii{constructor(t){super(t);b(this,"octave");Object.assign(this,t)}evaluate(t={}){t.octave=this.octave+(t.octave||0)}}class e3 extends ii{constructor(t){super(t);b(this,"duration");Object.assign(this,t)}evaluate(t={}){t.duration=this.duration}}class mE extends ii{constructor(t){super(t);b(this,"times");b(this,"item");Object.assign(this,t)}evaluate(t={}){return[...Array(this.times)].map(()=>this.item).flat(1/0).map(i=>i.evaluate(t))}}class gE extends ii{constructor(t){super(t);b(this,"items");Object.assign(this,t)}evaluate(t={}){return this.items.map(r=>r.evaluate(t))}}class vI extends ii{constructor(t){super(t);b(this,"duration");b(this,"items");b(this,"evaluated");Object.assign(this,t)}evaluate(t={}){return t.subdivisions=!0,this.duration=t.duration||Jg,this.evaluated=this.items.map(r=>r.evaluate(t)).filter(r=>r).flat(1/0),this}}class t3 extends ii{constructor(t){super(t);b(this,"times");b(this,"items");Object.assign(this,t)}evaluate(t={}){const r=this.items.map(s=>s.evaluate(t));return[...Array(this.times)].map(()=>r).flat(1/0)}}class r3 extends ii{constructor(t){super(t);b(this,"left");b(this,"right");b(this,"operation");Object.assign(this,t)}evaluate(t={}){this.left.evaluate(t),this.right.evaluate(t);const r=PP[this.operation];return this.right.items.flatMap(a=>this.left.items.map(o=>[a.clone(),o.clone()])).map(a=>(a[0].pitch=r(a[0].pitch,a[1].pitch),a[0].evaluate(t)))}}class Io extends ws{constructor(t){super(t);b(this,"items");b(this,"index");Object.assign(this,t),this.items=this.items.filter(r=>r!==void 0),this.index=0}nextItem(t={}){let r=this.items[this.index%this.items.length];for(;r instanceof Io;)r=r.nextItem(t);return this.index=this.index+1,r instanceof ii?r.evaluate(t):r}evaluate(t={}){return this.nextItem(t)}evaluateValue(t={}){const r=this.nextItem(t);return r instanceof ii?r.evaluateValue():r}}const r_=(n,e,t,r=0,i=0,s=!1)=>{e=s&&e>0?e-1:e,n=typeof n=="string"?oi(n):n;const a=typeof t=="string"?vi(t):t,o=a.length;(e>=o||e<0)&&(r+=Math.floor(e/o),e=e<0?o-Math.abs(e)%o:e%o,e===o&&(e=0));let l=n+a.slice(0,e).reduce((c,u)=>c+u,0);return l=l+r*a.reduce((c,u)=>c+u,0)+i,Number.isInteger(l)?[l,void 0]:TI(l)},oi=n=>{const e=n.match(/^([a-gA-G])([#bs])?([1-9])?$/);if(e===null)return 60;const[,t,r,i]=e,s=i?parseInt(i,10):4,a=$P[r]||0,o=FP[t.toUpperCase()];return 12+s*12+o+a},TI=(n,e=1)=>{let t=8192;if(n%1!==0){const r=n>Math.round(n)?n:Math.round(n),i=n>Math.round(n)?Math.round(n):n,s=Zn(r)/Zn(i),a=1200*Math.log2(s);t=t+Math.floor(8191*(a/(100*e)))}return[n,t]},Zn=n=>440/32*2**((n-9)/12),n3=n=>12/Math.log(2)*Math.log(n/440)+69,CI=n=>1200*Math.log2(n),i3=function*(){var t;const n={};let e=2;for(;;){if(!(e in n))yield e,n[e*e]=[e];else{for(const r of n[e])(n[t=r+e]||(n[t]=[])).push(r);delete n[e]}e++}},a3=n=>{const e=i3();return Array.from({length:n},()=>e.next().value)},s3=n=>{const e=n.length,t=a3(e+1);let r=1;for(let i=0;i {n[0]!==0&&(n=[0,...n]);const e=[];for(let t=0;t typeof n=="string"?vi(n).length:n.length,yI=n=>[0,...n].reduce((e,t,r)=>{const i=r===0?0:t+e[r-1];return[...e,i]},[]),c3=n=>((n<0||n>4095)&&(console.log("Input number must be odd and between 0 and 4095. Using major (2741) instead."),n=2741),n%2===0&&console.log("Odd number doesnt create real scale"),(n>>>0).toString(2).padStart(12,"0").split("").reduce((t,r,i)=>r==="1"?[11-i,...t]:t,[])),u3=n=>{try{return t_(n)}catch{return[]}},cl=n=>{if(typeof n=="string"){if(e_(n))return vi(n);{const e=u3(n);return e&&e.length>0?e:vi("MAJOR")}}else if(typeof n=="number")return c3(n);return n},tu=(n,e="major",t=60,r="CHROMATIC",i=1)=>{const s=fE[e]||fE.major;t=typeof t=="string"?oi(t):t;const a=n_(r,t)[n-1],o=[];for(let l=0;l<=i;l++)for(const c of s)o.push(a+c+l*12);return o},d3=(n="major",e=60,t="MAJOR",r=1,i)=>{const s=tu(1,n,e,"CHROMATIC",r),a=typeof t=="string"?vi(t):t;return s.map(l=>{const c=ru(l,e,t);return new ti({text:c.text,note:l,pitch:c.pc,octave:c.octave,add:c.add,duration:i,scaleName:t,parsedScale:a,key:e})})},n_=(n,e=60,t=1)=>{const r=cl(n);let i=typeof e=="string"?oi(e):e;const s=[i];for(let a=0;a {const s=typeof t=="string"?oi(t):t;return i&&typeof e=="string"&&e.toUpperCase()==="CHROMATIC"&&(i="major"),i?tu(n,i,s,e,r):h3(n,s,e)},h3=(n,e=60,t="Major",r=3,i=2)=>{const s=typeof t=="string"?VP(t):t.length,a=Math.floor((r*i+n-1)/s)+1,o=n_(t,e,a),l=[];for(let c=n-1;l.length {const e=n.match(/([a-gA-G][#bs]?)([0-9])?([a-zA-Z0-9]+)/);if(e===null)return[60,64,67];let[,t,r,i]=e;const s=oi(t),a=r?parseInt(r,10):0;return tu(1,i,s,"CHROMATIC",a)},m3=n=>n.split("").map(t=>GP[t]).reduce((t,r,i,s)=>i (hE.includes(n)||(n=II(oi(n))),hE.indexOf(n)-6),II=n=>YP[n%12],g3=n=>{const e=II(n);return AI(e)},_3=(n,e)=>{let t;return typeof e=="string"?t=AI(e[0]):t=g3(e),(n*7+26-(11+t))%12+(11+t)},S3=(n,e=60)=>n<=0?0:Math.floor((n-e)/12),ru=(n,e=60,t="MAJOR")=>{function r(p){return p>0?"^".repeat(p):p<0?"_".repeat(Math.abs(p)):""}const i=typeof e=="number"?e:oi(e),s=HP(n-i,12),a=S3(n,i);if(typeof t=="string"&&t.toUpperCase()==="CHROMATIC")return{text:s.toString(),pc:s,octave:a,add:0};const o=["0","#0","1","#1","2","3","#3","4","#4","5","#5","6"],l=["0","b1","1","b2","2","3","b4","4","b5","5","b6","6"],c=_3(n,e);let u;if(c>=6&&c<=12&&l[s].length===2?u=l[s]:u=o[s],u.length>1){const p=u[0]==="#"?1:-1;return{text:r(a)+u,pc:parseInt(u[1]),octave:a,add:p}}return{text:r(a)+u,pc:parseInt(u),octave:a,add:0}},O3=(n,e,t)=>{const r=oi(n);return ru(r,e,t)},Gm=(n,e)=>n.map(t=>e+t%12).sort((t,r)=>t-r),E3=(n,e)=>{const t=n[0],r=Gm(n,t),i=Gm(e,t);return r.map((s,a)=>i[a]?i[a]-s:void 0)},b3=(n,e)=>{const t=n[0],r=n.map(a=>[a,Gm(n,t).indexOf(t+a%12)]),i=E3(n,e);return r.map(([a,o])=>i[o]?a+i[o]:a)},RI=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+" | "+_+` `+m+" | "+t("",l.column-1," ")+t("",I,"^")}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(I){return Array.isArray(I)?c(I[0])+"-"+c(I[1]):c(I)});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),I,R;if(T.sort(),T.length>0){for(I=1,R=1;I ",R="@",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",Re="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]/,Rt=/^[a-zA-Z0-9\-*+]/,at=/^[A-G]/,$e=/^[bs]/,hr=lt("-",!1),rt=Zr([["0","9"]],!1,!1),He=lt(".",!1),Br=zs("whitespace"),cr=Zr([" ",` -`,"\r"," "],!1,!1),vr=lt(",",!1),W=lt("|",!1),_e=Zr([["a","z"]],!1,!1),we=Zr([["a","z"],"_"],!1,!1),Ne=Zr([["a","z"],"_",["0","9"]],!1,!1),Je=lt("<",!1),ye=lt(">",!1),Ht=lt("@",!1),ut=lt(":",!1),It=Zr(["m","k","l","p","d","c","w","y","h","n","q","a","e","f","s","x","t","g","u","j","z","o"],!1,!1),Vr=lt("/",!1),ht=lt("(",!1),Zt=lt(")",!1),Ct=lt("[:",!1),Be=lt("]",!1),Ur=lt("[",!1),Fn=lt("{",!1),dt=lt("}",!1),zr=lt("+",!1),Ir=lt("*",!1),Ii=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=Zr([["a","z"],["A","Z"],["0","9"]],!1,!1),Kt=lt("#",!1),ui=lt("b",!1),di=Zr([["a","z"],["A","Z"],["0","9"],"-","*","+"],!1,!1),q=Zr([["A","G"]],!1,!1),ie=Zr(["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),Nr=lt("v",!1),Hr=function(v){return v.filter(w=>w)},Da=function(){return parseFloat(Yr())},ta=function(){return parseInt(Yr())},Ds=function(){return parseInt(Yr())},Wr=function(){},xs=function(v){return Ut(WP,{sound:v})},xa=function(){return Yr()},ka=function(v){return Ut(Io,{items:v})},ks=function(v){return v},La=function(v,w){return Ut(XP,{item:v,sound:w})},Ls=function(v,w){return Ut(ZP,{item:v,soundIndex:w})},Ma=function(v){return v},Fr=function(){return BP[Yr()]},Ms=function(v,w){return v/w},Ps=function(v){return v.filter(w=>w)},Pa=function(v){return Ut(Io,{items:v})},Ba=function(v,w){return w?Ut(mE,{item:v,times:w}):Ut(gE,{items:v})},Bs=function(v){return v},Ua=function(v,w,P){return Ut(t3,{left:v,operation:w,right:P})},Us=function(v,w){return Ut(e3,{items:v,times:w})},Fa=function(v){return Ut(vI,{items:v})},Fs=function(v){return v.map(w=>typeof w=="number"?w:void 0)},Ys=function(){return Math.ceil(EI(Yr()))},un=function(v){var w=v.filter(P=>P).map(P=>Ut(ti,{pitch:P[0]},P.toString()));return Ut(gE,{items:w})},bt=function(v){return v},$s=function(v){return v},Ri=function(){},Gs=function(v){return Ut(Io,{items:v})},pi=function(v){return Ut(jP,{octave:v})},Qs=function(){return Yr().split("").reduce((v,w)=>v+(w==="^"?1:-1),0)},Ni=function(){return Ut(Mc,{seededRandom:s.seededRandom})},Ya=function(v,w){return Ut(Mc,{min:v,max:w,seededRandom:s.seededRandom})},$a=function(v,w){return Ut(mE,{item:v,times:w})},qs=function(v){return Ut(JP,{duration:v})},wi=function(v){return v},Ga=function(v){return Ut($m,{duration:v})},Di=function(v,w,P,X){const oe=v?s.nodeOptions.octave+v:s.nodeOptions.octave;return Ut(ti,{duration:w,pitch:X,pitchOctave:oe,add:P})},xi=function(v){return v.reduce((w,P)=>w+(P==="#"?1:-1),0)},Qa=function(v,w,P){return Ut(Ra,{pitches:[v].concat(w),inversion:P})},ra=function(){return Yr()},hi=function(v){return v},fr=function(){return Yr()},qa=function(v,w,P,X,oe){const ve=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",gt=s.nodeOptions.key?s.nodeOptions.key:"C",hn=u3(X,P,ve,v,w),Zs=w||s.nodeOptions.duration,mR=v?s.nodeOptions.octave+v:s.nodeOptions.octave;return Ut(Ra,{duration:Zs,chordOctave:mR,pitches:hn,chordName:X,inversion:oe,scaleName:ve,key:gt})},Xr=function(v,w,P){const X=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",oe=s.nodeOptions.key?s.nodeOptions.key:"C";return Ut(KP,{roman:v,chordName:w,inversion:P,scaleName:X,key:oe})},na=function(v){const w=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",P=s.nodeOptions.key?s.nodeOptions.key:"C",X=S3(v,P,w);return Ut(ti,{pitch:X.pc,add:X.add,scaleName:w,key:P})},A=0,We=0,Va=[{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 Yr(){return i.substring(We,A)}function ul(){return d(We,A)}function lt(v,w){return{type:"literal",text:v,ignoreCase:w}}function Zr(v,w,P){return{type:"class",parts:v,inverted:w,ignoreCase:P}}function dl(){return{type:"end"}}function zs(v){return{type:"other",description:v}}function pl(v){var w=Va[v],P;if(w)return w;for(P=v-1;!Va[P];)P--;for(w=Va[P],w={line:w.line,column:w.column};P dn&&(dn=A,Vs=[]),Vs.push(v))}function g(v,w,P){return new e(e.buildMessage(v,w),v,w,P)}function O(){var v,w,P=A*56+0,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=Xt(),w!==a&&(We=v,w=Hr(w)),v=w,me[P]={nextPos:A,result:v},v)}function C(){var v,w,P,X,oe,ve,gt,hn=A*56+1,Zs=me[hn];if(Zs)return A=Zs.nextPos,Zs.result;for(v=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(ve=[],Le.test(i.charAt(A))?(gt=i.charAt(A),A++):(gt=a,Oe===0&&h(rt)),gt!==a)for(;gt!==a;)ve.push(gt),Le.test(i.charAt(A))?(gt=i.charAt(A),A++):(gt=a,Oe===0&&h(rt));else ve=a;ve!==a?(P=[P,X,oe,ve],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=v,w=Da()),v=w,me[hn]={nextPos:A,result:v},v}function y(){var v,w,P=A*56+2,X=me[P];return X?(A=X.nextPos,X.result):(v=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=v,v=ta()):(A=v,v=a),me[P]={nextPos:A,result:v},v)}function D(){var v,w,P,X=A*56+3,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=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=v,v=Ds()):(A=v,v=a),me[X]={nextPos:A,result:v},v}function F(){var v,w,P=A*56+4,X=me[P];return X?(A=X.nextPos,X.result):(Oe++,v=A,tt.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(cr)),w!==a&&(We=v,w=Wr()),v=w,Oe--,v===a&&(w=a,Oe===0&&h(Br)),me[P]={nextPos:A,result:v},v)}function U(){var v,w,P=A*56+8,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=H(),w!==a&&(We=v,w=xs(w)),v=w,me[P]={nextPos:A,result:v},v)}function H(){var v,w,P,X,oe,ve=A*56+10,gt=me[ve];if(gt)return A=gt.nextPos,gt.result;if(v=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=v,v=xa()}else A=v,v=a}else A=v,v=a;return me[ve]={nextPos:A,result:v},v}function z(){var v,w=A*56+11,P=me[w];return P?(A=P.nextPos,P.result):(v=pe(),v===a&&(v=he()),me[w]={nextPos:A,result:v},v)}function pe(){var v,w,P,X,oe=A*56+12,ve=me[oe];if(ve)return A=ve.nextPos,ve.result;if(v=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=I,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=v,v=ka(P)):(A=v,v=a)):(A=v,v=a)}else A=v,v=a;return me[oe]={nextPos:A,result:v},v}function he(){var v,w=A*56+13,P=me[w];return P?(A=P.nextPos,P.result):(v=H(),v===a&&(v=pe(),v===a&&(v=F())),me[w]={nextPos:A,result:v},v)}function se(){var v,w,P,X=A*56+14,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,i.charCodeAt(A)===64?(w=R,A++):(w=a,Oe===0&&h(Ht)),w!==a?(P=z(),P!==a?(We=v,v=ks(P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function ae(){var v,w=A*56+15,P=me[w];return P?(A=P.nextPos,P.result):(v=rr(),v===a&&(v=st(),v===a&&(v=qt(),v===a&&(v=ou(),v===a&&(v=Qt())))),me[w]={nextPos:A,result:v},v)}function Ce(){var v,w,P,X=A*56+16,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,w=ae(),w===a&&(w=Xs()),w!==a?(P=se(),P!==a?(We=v,v=La(w,P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function Se(){var v,w,P,X=A*56+17,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,w=Ce(),w===a&&(w=ae(),w===a&&(w=Xs())),w!==a?(P=qe(),P!==a?(We=v,v=Ls(w,P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function qe(){var v,w,P,X=A*56+18,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,i.charCodeAt(A)===58?(w=L,A++):(w=a,Oe===0&&h(ut)),w!==a?(P=Dt(),P!==a?(We=v,v=Ma(P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function je(){var v,w,P=A*56+19,X=me[P];return X?(A=X.nextPos,X.result):(v=A,mt.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(It)),w!==a&&(We=v,w=Fr()),v=w,me[P]={nextPos:A,result:v},v)}function Ue(){var v,w=A*56+20,P=me[w];return P?(A=P.nextPos,P.result):(v=Nt(),v===a&&(v=C(),v===a&&(v=je())),me[w]={nextPos:A,result:v},v)}function Nt(){var v,w,P,X,oe=A*56+21,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=A,w=D(),w!==a?(i.charCodeAt(A)===47?(P=$,A++):(P=a,Oe===0&&h(Vr)),P!==a?(X=D(),X!==a?(We=v,v=Ms(w,X)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function Xt(){var v,w,P,X=A*56+22,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=A,w=[],P=E_(),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=ou())))))))),P!==a)for(;P!==a;)w.push(P),P=E_(),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=ou()))))))));else w=a;return w!==a&&(We=v,w=Ps(w)),v=w,me[X]={nextPos:A,result:v},v}function Dt(){var v,w=A*56+23,P=me[w];return P?(A=P.nextPos,P.result):(v=F(),v===a&&(v=D(),v===a&&(v=O_(),v===a&&(v=cu(),v===a&&(v=er(),v===a&&(v=__()))))),me[w]={nextPos:A,result:v},v)}function er(){var v,w,P,X,oe=A*56+24,ve=me[oe];if(ve)return A=ve.nextPos,ve.result;if(v=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=I,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=v,v=Pa(P)):(A=v,v=a)):(A=v,v=a)}else A=v,v=a;return me[oe]={nextPos:A,result:v},v}function st(){var v,w,P,X,oe,ve=A*56+25,gt=me[ve];return gt?(A=gt.nextPos,gt.result):(v=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=v,v=Ba(P,X)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[ve]={nextPos:A,result:v},v)}function ft(){var v,w,P,X=A*56+26,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,i.charCodeAt(A)===58?(w=L,A++):(w=a,Oe===0&&h(ut)),w!==a?(P=D(),P!==a?(We=v,v=Bs(P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function rr(){var v,w,P,X,oe=A*56+27,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=A,w=st(),w!==a?(P=S_(),P!==a?(X=st(),X!==a?(We=v,v=Ua(w,P,X)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function Qt(){var v,w,P,X,oe,ve=A*56+28,gt=me[ve];return gt?(A=gt.nextPos,gt.result):(v=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=v,v=Us(P,X)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[ve]={nextPos:A,result:v},v)}function qt(){var v,w,P,X,oe=A*56+29,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=A,i.charCodeAt(A)===91?(w=N,A++):(w=a,Oe===0&&h(Ur)),w!==a?(P=Xt(),P!==a?(i.charCodeAt(A)===93?(X=S,A++):(X=a,Oe===0&&h(Be)),X!==a?(We=v,v=Fa(P)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function pn(){var v,w=A*56+30,P=me[w];return P?(A=P.nextPos,P.result):(v=D(),v===a&&(v=y()),me[w]={nextPos:A,result:v},v)}function Hs(){var v,w,P,X=A*56+31,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=A,w=[],P=hl(),P===a&&(P=pn()),P!==a)for(;P!==a;)w.push(P),P=hl(),P===a&&(P=pn());else w=a;return w!==a&&(We=v,w=Fs(w)),v=w,me[X]={nextPos:A,result:v},v}function hl(){var v,w,P,X,oe=A*56+32,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=A,i.charCodeAt(A)===40?A++:Oe===0&&h(ht),w=pn(),w!==a?(P=S_(),P!==a?(X=Hs(),X!==a?(i.charCodeAt(A)===41?A++:Oe===0&&h(Zt),We=v,v=Ys()):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function Ws(){var v,w,P,X,oe=A*56+33,ve=me[oe];if(ve)return A=ve.nextPos,ve.result;if(v=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=v,v=un(P)):(A=v,v=a)):(A=v,v=a)}else A=v,v=a;return me[oe]={nextPos:A,result:v},v}function __(){var v,w,P,X,oe=A*56+34,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=A,i.charCodeAt(A)===123?(w=k,A++):(w=a,Oe===0&&h(Fn)),w!==a?(P=D(),P===a&&(P=cu()),P!==a?(i.charCodeAt(A)===125?(X=x,A++):(X=a,Oe===0&&h(dt)),X!==a?(We=v,v=bt(P)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function S_(){var v,w=A*56+35,P=me[w];return P?(A=P.nextPos,P.result):(i.charCodeAt(A)===43?(v=M,A++):(v=a,Oe===0&&h(zr)),v===a&&(i.charCodeAt(A)===45?(v=u,A++):(v=a,Oe===0&&h(hr)),v===a&&(i.charCodeAt(A)===42?(v=G,A++):(v=a,Oe===0&&h(Ir)),v===a&&(i.charCodeAt(A)===47?(v=$,A++):(v=a,Oe===0&&h(Vr)),v===a&&(i.charCodeAt(A)===37?(v=te,A++):(v=a,Oe===0&&h(Ii)),v===a&&(i.charCodeAt(A)===94?(v=ne,A++):(v=a,Oe===0&&h(Rr)),v===a&&(i.charCodeAt(A)===124?(v=_,A++):(v=a,Oe===0&&h(W)),v===a&&(i.charCodeAt(A)===38?(v=re,A++):(v=a,Oe===0&&h(Wt)),v===a&&(i.substr(A,2)===ee?(v=ee,A+=2):(v=a,Oe===0&&h(yn)),v===a&&(i.substr(A,2)===B?(v=B,A+=2):(v=a,Oe===0&&h(Ji))))))))))),me[w]={nextPos:A,result:v},v)}function Xs(){var v,w,P=A*56+36,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=cR(),w===a&&(w=hR(),w===a&&(w=pR(),w===a&&(w=fR(),w===a&&(w=U(),w===a&&(w=dR(),w===a&&(w=fl(),w===a&&(w=sR(),w===a&&(w=F(),w===a&&(w=oR(),w===a&&(w=st(),w===a&&(w=Ws(),w===a&&(w=aR())))))))))))),w!==a&&(We=v,w=$s(w)),v=w,me[P]={nextPos:A,result:v},v)}function aR(){var v,w,P=A*56+37,X=me[P];return X?(A=X.nextPos,X.result):(v=A,i.charCodeAt(A)===124?(w=_,A++):(w=a,Oe===0&&h(W)),w!==a&&(We=v,w=Ri()),v=w,me[P]={nextPos:A,result:v},v)}function ou(){var v,w,P,X,oe=A*56+38,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=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=I,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=v,v=Gs(P)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function sR(){var v,w,P=A*56+39,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=lu(),w!==a&&(We=v,w=pi(w)),v=w,me[P]={nextPos:A,result:v},v)}function lu(){var v,w,P,X=A*56+40,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=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=v,w=Qs()),v=w,me[X]={nextPos:A,result:v},v}function O_(){var v,w,P=A*56+41,X=me[P];return X?(A=X.nextPos,X.result):(v=A,i.charCodeAt(A)===63?(w=j,A++):(w=a,Oe===0&&h(ea)),w!==a&&(We=v,w=Ni()),v=w,me[P]={nextPos:A,result:v},v)}function cu(){var v,w,P,X,oe,ve,gt=A*56+42,hn=me[gt];return hn?(A=hn.nextPos,hn.result):(v=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(vr)),X!==a?(oe=D(),oe!==a?(i.charCodeAt(A)===41?(ve=f,A++):(ve=a,Oe===0&&h(Zt)),ve!==a?(We=v,v=Ya(P,oe)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[gt]={nextPos:A,result:v},v)}function E_(){var v,w,P,X,oe=A*56+43,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=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=v,v=$a(w,X)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function oR(){var v,w,P=A*56+44,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=Ue(),w!==a&&(We=v,w=qs(w)),v=w,me[P]={nextPos:A,result:v},v)}function lR(){var v,w,P,X=A*56+45,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,w=Ue(),w!==a?(i.charCodeAt(A)===94?(P=ne,A++):(P=a,Oe===0&&h(Rr)),P!==a?(We=v,v=wi(w)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function cR(){var v,w,P,X,oe,ve=A*56+46,gt=me[ve];return gt?(A=gt.nextPos,gt.result):(v=A,w=lR(),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=v,v=Ga(w)):(A=v,v=a)):(A=v,v=a),me[ve]={nextPos:A,result:v},v)}function fl(){var v,w,P,X,oe,ve=A*56+47,gt=me[ve];return gt?(A=gt.nextPos,gt.result):(v=A,w=lu(),w===a&&(w=null),P=Ue(),P===a&&(P=null),X=uR(),X===a&&(X=null),oe=y(),oe===a&&(oe=O_(),oe===a&&(oe=cu(),oe===a&&(oe=__()))),oe!==a?(We=v,v=Di(w,P,X,oe)):(A=v,v=a),me[ve]={nextPos:A,result:v},v)}function uR(){var v,w,P,X=A*56+48,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=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=v,w=xi(w)),v=w,me[X]={nextPos:A,result:v},v}function dR(){var v,w,P,X,oe=A*56+49,ve=me[oe];if(ve)return A=ve.nextPos,ve.result;if(v=A,w=fl(),w!==a){if(P=[],X=fl(),X!==a)for(;X!==a;)P.push(X),X=fl();else P=a;P!==a?(X=uu(),X===a&&(X=null),We=v,v=Qa(w,P,X)):(A=v,v=a)}else A=v,v=a;return me[oe]={nextPos:A,result:v},v}function b_(){var v,w,P,X=A*56+50,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=A,w=[],Rt.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(di)),P!==a)for(;P!==a;)w.push(P),Rt.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(di));else w=a;return w!==a&&(We=v,w=ra()),v=w,me[X]={nextPos:A,result:v},v}function uu(){var v,w,P,X=A*56+51,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,i.charCodeAt(A)===37?(w=te,A++):(w=a,Oe===0&&h(Ii)),w!==a?(P=D(),P!==a?(We=v,v=hi(P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function v_(){var v,w,P=A*56+52,X=me[P];return X?(A=X.nextPos,X.result):(v=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=v,v=fr()):(A=v,v=a),me[P]={nextPos:A,result:v},v)}function pR(){var v,w,P,X,oe,ve,gt=A*56+53,hn=me[gt];return hn?(A=hn.nextPos,hn.result):(v=A,w=lu(),w===a&&(w=null),P=Ue(),P===a&&(P=null),X=v_(),X!==a?(i.charCodeAt(A)===94?A++:Oe===0&&h(Rr),oe=b_(),oe!==a?(ve=uu(),ve===a&&(ve=null),We=v,v=qa(w,P,X,oe,ve)):(A=v,v=a)):(A=v,v=a),me[gt]={nextPos:A,result:v},v)}function hR(){var v,w,P,X,oe=A*56+54,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=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=Re,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(Nr)))))))),w!==a?(i.charCodeAt(A)===94?A++:Oe===0&&h(Rr),P=b_(),P===a&&(P=null),X=uu(),X===a&&(X=null),We=v,v=Xr(w,P,X)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function fR(){var v,w,P=A*56+55,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=v_(),w!==a&&(We=v,w=na(w)),v=w,me[P]={nextPos:A,result:v},v)}var T_=s.nodeOptions||{};function Ut(v,w,P=void 0){w.text=P||Yr(),w.location=ul();for(var X in T_)(w[X]===void 0||w[X]===null)&&(w[X]=T_[X]);return new v(w)}if(ia=c(),ia!==a&&A===i.length)return ia;throw ia!==a&&A e.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=NI(r)),r}totalDuration(){return this.evaluated.reduce((t,r)=>t+r.collect("duration"),0)}lead(){let e=this.evaluated.findIndex(t=>t instanceof Ra);if(e>=0){for(let t=e+1;t<=this.evaluated.length;t++)if(this.evaluated[t]instanceof Ra){const r=this.evaluated[e],i=this.evaluated[t],s=E3(r.notes(),i.notes()),a=ei(i);a.voiceLeadFromNotes(s,this.options.nodeOptions),this.evaluated[t]=a,e=t}}return this}}const NI=(n,e=void 0)=>n.map(r=>{if(r instanceof vI){const i=r.evaluated.length,s=(e||r.duration)/i;return NI(r.evaluated,s)}else return r.duration=e||r.duration,r}).flat(1/0),T3=n=>{let e={};return HP.forEach(t=>{if(n[t]!==void 0){const r=n[t];e[t]=r,delete n[t]}}),e};class C3{constructor(e,t){b(this,"api");b(this,"settings");b(this,"midiAccess",null);b(this,"midiOutputs",[]);b(this,"currentOutputIndex",0);b(this,"scheduledNotes",{});b(this,"midiInputs",[]);b(this,"currentInputIndex");b(this,"bufferLength",512);b(this,"noteInputBuffer",[]);b(this,"ccInputBuffer",[]);b(this,"activeNotes",[]);b(this,"stickyNotes",[]);b(this,"lastNote");b(this,"lastCC",{});b(this,"lastNoteInChannel",{});b(this,"lastCCInChannel",{});b(this,"midiClockInputIndex");b(this,"midiClockInput");b(this,"lastTimestamp",0);b(this,"midiClockDelta",0);b(this,"lastBPM");b(this,"roundedBPM",0);b(this,"clockBuffer",[]);b(this,"clockBufferLength",24);b(this,"clockTicks",0);b(this,"clockErrorCount",0);b(this,"skipOnError",0);this.api=e,this.settings=t,this.lastBPM=e.bpm(),this.roundedBPM=this.lastBPM,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),this.midiInputs=Array.from(this.midiAccess.inputs.values()),this.midiInputs.length===0?console.warn("No MIDI inputs available."):this.updateInputSelects()}catch(e){console.error("Failed to initialize MIDI:",e)}}getCurrentMidiPort(){return this.midiOutputs.length>0&&this.currentOutputIndex>=0&&this.currentOutputIndex 0&&this.currentOutputIndex>=0&&this.currentOutputIndex 0){const e=document.getElementById("midi-clock-input"),t=document.getElementById("default-midi-input");e.innerHTML="",t.innerHTML="";const r=document.createElement("option");r.value="-1",r.text="Internal",e.appendChild(r);const i=document.createElement("option");if(i.value="-1",i.text="None",t.appendChild(i),this.midiInputs.forEach((s,a)=>{const o=document.createElement("option");o.value=a.toString(),o.text=s.name||a.toString(),e.appendChild(o),t.appendChild(o.cloneNode(!0))}),this.settings.midi_clock_input){const s=this.getMidiInputIndex(this.settings.midi_clock_input);e.value=s.toString(),s>0&&(this.midiClockInput=this.midiInputs[s],this.registerMidiInputListener(s))}else e.value="-1";if(this.settings.default_midi_input){const s=this.getMidiInputIndex(this.settings.default_midi_input);t.value=s.toString(),s>0&&(this.currentInputIndex=s,this.registerMidiInputListener(s))}else t.value="-1";e.addEventListener("change",s=>{const a=s.target.value;if(a==="-1")this.midiClockInput&&this.midiClockInputIndex!=this.currentInputIndex&&(this.midiClockInput.onmidimessage=null),this.midiClockInput=void 0,this.settings.midi_clock_input=void 0;else{const o=parseInt(a);this.midiClockInputIndex=o,this.midiClockInput&&this.midiClockInputIndex!=this.currentInputIndex&&(this.midiClockInput.onmidimessage=null),this.midiClockInput=this.midiInputs[o],this.registerMidiInputListener(o),this.settings.midi_clock_input=this.midiClockInput.name||void 0}}),t.addEventListener("change",s=>{const a=s.target.value;a==="-1"?(this.currentInputIndex&&this.currentInputIndex!=this.midiClockInputIndex&&this.unregisterMidiInputListener(this.currentInputIndex),this.currentInputIndex=void 0,this.settings.default_midi_input=void 0):(this.currentInputIndex&&this.currentInputIndex!=this.midiClockInputIndex&&this.unregisterMidiInputListener(this.currentInputIndex),this.currentInputIndex=parseInt(a),this.registerMidiInputListener(this.currentInputIndex),this.settings.default_midi_input=this.midiInputs[this.currentInputIndex].name||void 0)})}}registerMidiInputListener(e){if(e!==void 0){const t=this.midiInputs[e];t&&!t.onmidimessage&&(t.onmidimessage=r=>{const i=r;if(t.name===this.settings.midi_clock_input&&(i.data[0]===248?this.skipOnError>0?this.skipOnError-=1:this.onMidiClock(r.timeStamp):i.data[0]===250?(console.log("MIDI start received"),this.api.stop(),this.api.play()):i.data[0]===252?(console.log("MIDI stop received"),this.api.pause()):i.data[0]===251?(console.log("MIDI continue received"),this.api.play()):i.data[0]===254&&console.log("MIDI active sensing received")),t.name===this.settings.default_midi_input){if(i.data[0]>=144&&i.data[0]<=159){const s=i.data[0]-144+1,a=i.data[1],o=i.data[2];this.lastNote={note:a,velocity:o,channel:s,timestamp:r.timeStamp},this.lastNoteInChannel[s]={note:a,velocity:o,channel:s,timestamp:r.timeStamp},this.settings.midi_channels_scripts&&this.api.script(s),this.pushToMidiInputBuffer({note:a,velocity:o,channel:s,timestamp:r.timeStamp}),this.activeNotes.push({note:a,velocity:o,channel:s,timestamp:r.timeStamp}),this.removeFromStickyNotes(a,s)||this.stickyNotes.push({note:a,velocity:o,channel:s,timestamp:r.timeStamp})}if(i.data[0]>=128&&i.data[0]<=143){const s=i.data[0]-128+1,a=i.data[1];this.removeFromActiveNotes(a,s)}if(i.data[0]>=176&&i.data[0]<=191){const s=i.data[0]-176+1,a=i.data[1],o=i.data[2];this.lastCC[a]=o,this.lastCCInChannel[s]?this.lastCCInChannel[s][a]=o:(this.lastCCInChannel[s]={},this.lastCCInChannel[s][a]=o),this.pushToMidiCCBuffer({control:a,value:o,channel:s,timestamp:r.timeStamp})}}})}}removeFromActiveNotes(e,t){const r=this.activeNotes.findIndex(i=>i.note===e&&i.channel===t);r>=0&&this.activeNotes.splice(r,1)}removeFromStickyNotes(e,t){const r=this.stickyNotes.findIndex(i=>i.note===e&&i.channel===t);return r>=0?(this.stickyNotes.splice(r,1),!0):!1}stickyNotesFromChannel(e){return this.stickyNotes.filter(t=>t.channel===e)}activeNotesFromChannel(e){return this.activeNotes.filter(t=>t.channel===e)}killActiveNotes(){this.activeNotes=[]}killActiveNotesFromChannel(e){this.activeNotes=this.activeNotes.filter(t=>t.channel!==e)}pushToMidiInputBuffer(e){this.noteInputBuffer.push(e),this.noteInputBuffer.length>this.bufferLength&&this.noteInputBuffer.shift()}pushToMidiCCBuffer(e){this.ccInputBuffer.push(e),this.ccInputBuffer.length>this.bufferLength&&this.ccInputBuffer.shift()}findNoteFromBufferInChannel(e){const t=this.noteInputBuffer.findIndex(r=>r.channel===e);if(t>=0){const r=this.noteInputBuffer[t];return this.noteInputBuffer.splice(t,1),r}else return}findCCFromBufferInChannel(e){const t=this.ccInputBuffer.findIndex(r=>r.channel===e);if(t>=0){const r=this.ccInputBuffer[t];return this.ccInputBuffer.splice(t,1),r}else return}unregisterMidiInputListener(e){if(e!==void 0){const t=this.midiInputs[e];t&&(t.onmidimessage=null)}}onMidiClock(e){if(this.clockTicks+=1,this.lastTimestamp>0)if(this.lastTimestamp===e)this.clockErrorCount+=1;else if(this.clockErrorCount>0)console.log("Timestamp error count: ",this.clockErrorCount),console.log("Current timestamp: ",e),console.log("Last timestamp: ",this.lastTimestamp),console.log("Last delta: ",this.midiClockDelta),console.log("Current delta: ",e-this.lastTimestamp),console.log("BPMs",this.clockBuffer),this.clockErrorCount=0,this.skipOnError=this.settings.midi_clock_ppqn/4,e=0;else{this.midiClockDelta=e-this.lastTimestamp,this.lastBPM=60*(1e3/this.midiClockDelta/this.settings.midi_clock_ppqn),this.clockBuffer.push(this.lastBPM),this.clockBuffer.length>this.clockBufferLength&&this.clockBuffer.shift();const t=this.estimatedBPM();t!==this.roundedBPM&&(console.log("Esimated BPM: ",t),this.api.bpm(t),this.roundedBPM=t)}this.lastTimestamp=e}estimatedBPM(){const e=this.clockBuffer.reduce((t,r)=>t+r);return Math.round(e/this.clockBuffer.length)}sendMidiClock(){if(!this.midiClockInput){const e=this.midiOutputs[this.currentOutputIndex];e&&e.send([248])}}switchMidiOutput(e){const t=this.getMidiOutputIndex(e);return t!==-1?(this.currentOutputIndex=t,!0):!1}getMidiOutputIndex(e){if(typeof e=="number")return e<0||e>=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)}}getMidiInputIndex(e){if(typeof e=="number")return e<0||e>=this.midiInputs.length?(console.error(`Invalid MIDI input index. Index must be in the range 0-${this.midiInputs.length-1}.`),-1):e;{const t=this.midiInputs.findIndex(r=>r.name===e);return t!==-1?t:(console.error(`MIDI input "${e}" not found.`),-1)}}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 y3{constructor(e,t,r){b(this,"min");b(this,"max");b(this,"wrap");b(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.position this.max&&(this.position=this.max)}getPosition(){return this.position}toggleWrap(e){this.wrap=e}}class i_{constructor(e){b(this,"seedValue");b(this,"randomGen",Math.random);b(this,"app");b(this,"values",{});b(this,"odds",(e,t)=>this.randomGen() this);b(this,"almostNever",e=>this.odds(.025,e));b(this,"rarely",e=>this.odds(.1,e));b(this,"scarcely",e=>this.odds(.25,e));b(this,"sometimes",e=>this.odds(.5,e));b(this,"often",e=>this.odds(.75,e));b(this,"frequently",e=>this.odds(.9,e));b(this,"almostAlways",e=>this.odds(.985,e));b(this,"always",e=>this.modify(e));b(this,"modify",e=>e(this));b(this,"seed",e=>(this.seedValue=e.toString(),this.randomGen=this.app.api.localSeededRandom(this.seedValue),this));b(this,"clear",()=>(this.app.api.clearLocalSeed(this.seedValue),this));b(this,"apply",e=>this.modify(e));b(this,"length",e=>(this.values.length=e,this));this.app=e,this.app.api.currentSeed&&(this.randomGen=this.app.api.randomGen)}}class wI extends i_{constructor(t){super(t);b(this,"octave",t=>(this.values.octave=t,this.update(),this));b(this,"key",t=>(this.values.key=t,this.update(),this));b(this,"scale",t=>(e_(t)?(this.values.scaleName=t,this.values.parsedScale=vi(t)):this.values.parsedScale=t_(t),this.update(),this));b(this,"freq",t=>{this.values.freq=t;const r=r3(t);return r%1!==0?(this.values.note=Math.floor(r),this.values.bend=TI(r)[1]):this.values.note=r,this});b(this,"update",()=>{})}}let Dr=[],A3=(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=!Dr.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},I3=(n={})=>{let e=A3(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 R3=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]:[]},N3={c:0,d:2,e:4,f:5,g:7,a:9,b:11},w3={"#":1,b:-1,s:1,f:-1},nu=(n,e=3)=>{const[t,r,i=e]=R3(n);if(!t)throw new Error('not a note: "'+n+'"');const s=N3[t.toLowerCase()],a=(r==null?void 0:r.split("").reduce((o,l)=>o+w3[l],0))||0;return(Number(i)+1)*12+s+a},DI=n=>Math.pow(2,(n-69)/12)*440,Qm=(n,e,t)=>Math.min(Math.max(n,e),t),D3=n=>12*Math.log(n/440)/Math.LN2+69,x3=(n,e)=>{if(typeof n!="object")throw new Error("valueToMidi: expected object value");let{freq:t,note:r}=n;if(typeof t=="number")return D3(t);if(typeof r=="string")return nu(r);if(typeof r=="number")return r;if(!e)throw new Error("valueToMidi: expected freq or note to be set");return e},k3="data:application/javascript;base64,Ly8gTElDRU5TRSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2My4wIHNlZSBodHRwczovL2dpdGh1Yi5jb20vZGt0cjAvV2ViRGlydC9ibG9iL21haW4vTElDRU5TRQovLyBhbGwgdGhlIGNyZWRpdCBnb2VzIHRvIGRrdHIwJ3Mgd2ViZGlydDogaHR0cHM6Ly9naXRodWIuY29tL2RrdHIwL1dlYkRpcnQvYmxvYi81Y2UzZDY5ODM2MmM1NGQ2ZTFiNjhhY2M0N2ViMjk1NWFjNjJjNzkzL2Rpc3QvQXVkaW9Xb3JrbGV0cy5qcwovLyA8MwoKY2xhc3MgQ29hcnNlUHJvY2Vzc29yIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBzdGF0aWMgZ2V0IHBhcmFtZXRlckRlc2NyaXB0b3JzKCkgewogICAgcmV0dXJuIFt7IG5hbWU6ICdjb2Fyc2UnLCBkZWZhdWx0VmFsdWU6IDEgfV07CiAgfQoKICBjb25zdHJ1Y3RvcigpIHsKICAgIHN1cGVyKCk7CiAgICB0aGlzLm5vdFN0YXJ0ZWQgPSB0cnVlOwogIH0KCiAgcHJvY2VzcyhpbnB1dHMsIG91dHB1dHMsIHBhcmFtZXRlcnMpIHsKICAgIGNvbnN0IGlucHV0ID0gaW5wdXRzWzBdOwogICAgY29uc3Qgb3V0cHV0ID0gb3V0cHV0c1swXTsKICAgIGNvbnN0IGNvYXJzZSA9IHBhcmFtZXRlcnMuY29hcnNlOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBvdXRwdXRbMF1bMF0gPSBpbnB1dFswXVswXTsKICAgICAgZm9yIChsZXQgbiA9IDE7IG4gPCBibG9ja1NpemU7IG4rKykgewogICAgICAgIGZvciAobGV0IG8gPSAwOyBvIDwgb3V0cHV0Lmxlbmd0aDsgbysrKSB7CiAgICAgICAgICBvdXRwdXRbb11bbl0gPSBuICUgY29hcnNlID09IDAgPyBpbnB1dFswXVtuXSA6IG91dHB1dFtvXVtuIC0gMV07CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ2NvYXJzZS1wcm9jZXNzb3InLCBDb2Fyc2VQcm9jZXNzb3IpOwoKY2xhc3MgQ3J1c2hQcm9jZXNzb3IgZXh0ZW5kcyBBdWRpb1dvcmtsZXRQcm9jZXNzb3IgewogIHN0YXRpYyBnZXQgcGFyYW1ldGVyRGVzY3JpcHRvcnMoKSB7CiAgICByZXR1cm4gW3sgbmFtZTogJ2NydXNoJywgZGVmYXVsdFZhbHVlOiAwIH1dOwogIH0KCiAgY29uc3RydWN0b3IoKSB7CiAgICBzdXBlcigpOwogICAgdGhpcy5ub3RTdGFydGVkID0gdHJ1ZTsKICB9CgogIHByb2Nlc3MoaW5wdXRzLCBvdXRwdXRzLCBwYXJhbWV0ZXJzKSB7CiAgICBjb25zdCBpbnB1dCA9IGlucHV0c1swXTsKICAgIGNvbnN0IG91dHB1dCA9IG91dHB1dHNbMF07CiAgICBjb25zdCBjcnVzaCA9IHBhcmFtZXRlcnMuY3J1c2g7CiAgICBjb25zdCBibG9ja1NpemUgPSAxMjg7CiAgICBjb25zdCBoYXNJbnB1dCA9ICEoaW5wdXRbMF0gPT09IHVuZGVmaW5lZCk7CiAgICBpZiAoaGFzSW5wdXQpIHsKICAgICAgdGhpcy5ub3RTdGFydGVkID0gZmFsc2U7CiAgICAgIGlmIChjcnVzaC5sZW5ndGggPT09IDEpIHsKICAgICAgICBjb25zdCB4ID0gTWF0aC5wb3coMiwgY3J1c2hbMF0gLSAxKTsKICAgICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgICBjb25zdCB2YWx1ZSA9IE1hdGgucm91bmQoaW5wdXRbMF1bbl0gKiB4KSAvIHg7CiAgICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgICBvdXRwdXRbb11bbl0gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm9yIChsZXQgbiA9IDA7IG4gPCBibG9ja1NpemU7IG4rKykgewogICAgICAgICAgbGV0IHggPSBNYXRoLnBvdygyLCBjcnVzaFtuXSAtIDEpOwogICAgICAgICAgY29uc3QgdmFsdWUgPSBNYXRoLnJvdW5kKGlucHV0WzBdW25dICogeCkgLyB4OwogICAgICAgICAgZm9yIChsZXQgbyA9IDA7IG8gPCBvdXRwdXQubGVuZ3RoOyBvKyspIHsKICAgICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQpyZWdpc3RlclByb2Nlc3NvcignY3J1c2gtcHJvY2Vzc29yJywgQ3J1c2hQcm9jZXNzb3IpOwoKY2xhc3MgU2hhcGVQcm9jZXNzb3IgZXh0ZW5kcyBBdWRpb1dvcmtsZXRQcm9jZXNzb3IgewogIHN0YXRpYyBnZXQgcGFyYW1ldGVyRGVzY3JpcHRvcnMoKSB7CiAgICByZXR1cm4gW3sgbmFtZTogJ3NoYXBlJywgZGVmYXVsdFZhbHVlOiAwIH1dOwogIH0KCiAgY29uc3RydWN0b3IoKSB7CiAgICBzdXBlcigpOwogICAgdGhpcy5ub3RTdGFydGVkID0gdHJ1ZTsKICB9CgogIHByb2Nlc3MoaW5wdXRzLCBvdXRwdXRzLCBwYXJhbWV0ZXJzKSB7CiAgICBjb25zdCBpbnB1dCA9IGlucHV0c1swXTsKICAgIGNvbnN0IG91dHB1dCA9IG91dHB1dHNbMF07CiAgICBjb25zdCBzaGFwZTAgPSBwYXJhbWV0ZXJzLnNoYXBlWzBdOwogICAgY29uc3Qgc2hhcGUxID0gc2hhcGUwIDwgMSA/IHNoYXBlMCA6IDEuMCAtIDRlLTEwOwogICAgY29uc3Qgc2hhcGUgPSAoMi4wICogc2hhcGUxKSAvICgxLjAgLSBzaGFwZTEpOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgY29uc3QgdmFsdWUgPSAoKDEgKyBzaGFwZSkgKiBpbnB1dFswXVtuXSkgLyAoMSArIHNoYXBlICogTWF0aC5hYnMoaW5wdXRbMF1bbl0pKTsKICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ3NoYXBlLXByb2Nlc3NvcicsIFNoYXBlUHJvY2Vzc29yKTsK";function Pc(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)}}},L3=(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)}}},M3=(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 Zu(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=Qm(2**-_*t,0,2e4),I=Qm(2**(l-_)*t,0,2e4);return M3(m.frequency,i,s,a,o,T,I,c,u),m}return m}let P3=n=>console.log(n);const ys=(...n)=>P3(...n),a_=I3();function s_(n,e,t={}){a_.setKey(n,{onTrigger:e,data:t})}function SE(n){return a_.get()[n]}let Ku;const Jt=()=>(Ku||(Ku=new AudioContext),Ku);let Ul;const o_=()=>{const n=Jt();return Ul||(Ul=n.createGain(),Ul.connect(n.destination)),Ul};let ju;function B3(){return ju||(ju=Jt().audioWorklet.addModule(k3),ju)}function Ju(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 U3(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 B3().catch(t=>{console.warn("could not load AudioWorklet effects coarse, crush and shape",t)}))}async function F3(n){return new Promise(e=>{document.addEventListener("click",async function t(){await U3(n),e(),document.removeEventListener("click",t)})})}let oa={};function Y3(n,e,t,r){var i;if(t=Qm(t,0,.98),!oa[n]){const s=Jt().createFeedbackDelay(1,e,t);(i=s.start)==null||i.call(s,r),s.connect(o_()),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 $3(n,e=2){if(!la[n]){const t=Jt().createReverb(e);t.connect(o_()),la[n]=t}return la[n].duration!==e&&(la[n]=la[n].setDuration(e),la[n].duration=e),la[n]}let ca;function G3(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 ed(n,e,t){const r=Pc(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:I=1,lprelease:R=.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:Re=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(Pc(l)),p!==void 0){let at=()=>Zu(r,"lowpass",p,L,_,T,I,R,m,i,i+t,u);ze.push(at()),c==="24db"&&ze.push(at())}if(K!==void 0){let at=()=>Zu(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=()=>Zu(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(Ju(r,"coarse-processor",{coarse:B})),Q!==void 0&&ze.push(Ju(r,"crush-processor",{crush:Q})),j!==void 0&&ze.push(Ju(r,"shape-processor",{shape:j})),Z!==void 0){const at=r.createStereoPanner();at.pan.value=2*Z-1,ze.push(at)}const St=Pc(1);ze.push(St),St.connect(o_());let mt;if(le>0&&De>0&&Ee>0){const at=Y3(xe,De,Ee,i);mt=ed(St,at,le)}let At;if(be>0&&Re>0){const at=$3(xe,Re);At=ed(St,at,be)}let Rt;if(ke){const at=G3(2**(Ze+5));Rt=ed(St,at,ke)}ze.slice(1).reduce((at,$e)=>at.connect($e),ze[0]),Le=ze.concat([mt,At,Rt])},td={};function Q3(n,e){var t=e?1e3:1024;if(n =t);return n.toFixed(1)+" "+r[i]}const q3=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=x3({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=R=>nu(R)-l,I=Object.keys(s).filter(R=>!R.startsWith("_")).reduce((R,L,$)=>!R||Math.abs(T(L)) {const i=t?`sound "${t}:${r}"`:"sample";if(!td[n]){ys(`[sampler] load ${i}..`,"load-sample",{url:n});const s=Date.now();td[n]=fetch(n).then(a=>a.arrayBuffer()).then(async a=>{const o=Date.now()-s,l=Q3(a.byteLength);return ys(`[sampler] load ${i}... done! loaded ${l} in ${o}ms`,"loaded-sample",{url:n}),await e.decodeAudioData(a)})}return td[n]};function z3(n){const e=Jt(),t=e.createBuffer(n.numberOfChannels,n.length,e.sampleRate);for(let r=0;r Object.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 W3={};function X3(n){const e=Object.entries(W3).find(([t])=>n.startsWith(t));if(e)return e[1]}const pa=async(n,e=n._base||"",t={})=>{if(typeof n=="string"){const s=X3(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;H3(n,(s,a)=>s_(s,(o,l,c)=>Z3(o,l,c,a),{type:"sample",samples:a,baseUrl:e,prebake:r,tag:i}),e)},EE=[];async function Z3(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:I=0,begin:R=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 q3(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=R*x.buffer.duration;u&&(x.loop=!0,x.loopStart=I*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+($-R)*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 K3=(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)}},j3=(n,e,t,r="sine")=>{const i=n.frequency.value*e,s=i*t;return K3(i,s,r)};function J3(){["sine","square","triangle","sawtooth"].forEach(n=>{s_(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:I,fmwave:R="sine",vib:L=0,vibmod:$=.5}=t,{n:K,note:f,freq:E}=t;f=f||36,typeof f=="string"&&(f=nu(f)),!E&&typeof f=="number"&&(E=DI(f));const{node:S,stop:N}=tB({t:e,s:n,freq:E,vib:L,vibmod:$,partials:K});let k,x;if(c){const{node:ne,stop:re}=j3(S,l,c,R);[p,m,_,T,I].find(ee=>ee!==void 0)?(p=p??.001,m=m??.001,_=_??1,T=T??.001,I=I??1,x=qm(p,m,_,T,I,e),u==="exp"&&(x=L3(p,m,_,T,I,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=Pc(.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 eB(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 tB({s:n,freq:e,t,vib:r,vibmod:i,partials:s}){let a;!s||n==="sine"?(a=Jt().createOscillator(),a.type=n||"triangle"):a=eB(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 rB(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,I=0,R=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,R*=E,c*=500*f/E**3,T*=f/E,u*=f/E,p*=E,m=m*E|0,j=r+$+i+s+R|0;te 1?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*(te te?0:(te p&&(t+=u,k+=u,ne=0),m&&!(++re%m)&&(t=k,l=N,ne||(ne=1));return x}const nB=(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:I=0,noise:R=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=nu(r)),!i&&typeof r=="number"&&(i=DI(r)),t=t.replace("z_","");const k=["sine","triangle","sawtooth","tan","noise"].indexOf(t)||0;u=t==="square"?0:u;const x=rB(...S||[.25,s,i,a,N,c,k,u,p,m,_,T,I,R,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 iB(){["zzfx","z_sine","z_sawtooth","z_triangle","z_square","z_tan","z_noise"].forEach(n=>{s_(n,(e,t,r)=>{const{node:i}=nB({s:n,...t},e);return i.onended=()=>{i.disconnect(),r()},{node:i,stop:()=>{}}},{type:"synth",prebake:!0})})}class Vm extends wI{constructor(t,r){super(r);b(this,"volume",t=>this.updateValue("volume",t));b(this,"vol",this.volume);b(this,"zrand",t=>this.updateValue("zrand",t));b(this,"curve",t=>this.updateValue("curve",t));b(this,"slide",t=>this.updateValue("slide",t));b(this,"sld",this.slide);b(this,"deltaSlide",t=>this.updateValue("deltaSlide",t));b(this,"dslide",this.deltaSlide);b(this,"pitchJump",t=>this.updateValue("pitchJump",t));b(this,"pj",this.pitchJump);b(this,"pitchJumpTime",t=>this.updateValue("pitchJumpTime",t));b(this,"pjt",this.pitchJumpTime);b(this,"lfo",t=>this.updateValue("lfo",t));b(this,"noise",t=>this.updateValue("noise",t));b(this,"zmod",t=>this.updateValue("zmod",t));b(this,"zcrush",t=>this.updateValue("zcrush",t));b(this,"zdelay",t=>this.updateValue("zdelay",t));b(this,"sustainVolume",t=>this.updateValue("sustainVolume",t));b(this,"tremolo",t=>this.updateValue("tremolo",t));b(this,"dur",t=>this.updateValue("dur",t));b(this,"zzfx",t=>this.updateValue("zzfx",t));b(this,"fmi",t=>this.updateValue("fmi",t));b(this,"fmh",t=>this.updateValue("fmh",t));b(this,"fmenv",t=>this.updateValue("fmenv",t));b(this,"fmattack",t=>this.updateValue("fmattack",t));b(this,"fmatk",this.fmattack);b(this,"fmdecay",t=>this.updateValue("fmdecay",t));b(this,"fmdec",this.fmdecay);b(this,"fmsustain",t=>this.updateValue("fmsustain",t));b(this,"fmsus",this.fmsustain);b(this,"fmrelease",t=>this.updateValue("fmrelease",t));b(this,"fmrel",this.fmrelease);b(this,"fmvelocity",t=>this.updateValue("fmvelocity",t));b(this,"fmvel",this.fmvelocity);b(this,"fmwave",t=>this.updateValue("fmwave",t));b(this,"fmw",this.fmwave);b(this,"ftype",t=>this.updateValue("ftype",t));b(this,"fanchor",t=>this.updateValue("fanchor",t));b(this,"attack",t=>this.updateValue("attack",t));b(this,"atk",this.attack);b(this,"decay",t=>this.updateValue("decay",t));b(this,"dec",this.decay);b(this,"sustain",t=>this.updateValue("sustain",t));b(this,"sus",this.sustain);b(this,"release",t=>this.updateValue("release",t));b(this,"rel",this.release);b(this,"adsr",(t,r,i,s)=>(this.attack(t),this.decay(r),this.sustain(i),this.release(s),this));b(this,"lpenv",t=>this.updateValue("lpenv",t));b(this,"lpe",t=>this.updateValue("lpenv",t));b(this,"lpattack",t=>this.updateValue("lpattack",t));b(this,"lpa",this.lpattack);b(this,"lpdecay",t=>this.updateValue("lpdecay",t));b(this,"lpd",this.lpdecay);b(this,"lpsustain",t=>this.updateValue("lpsustain",t));b(this,"lps",this.lpsustain);b(this,"lprelease",t=>this.updateValue("lprelease",t));b(this,"lpr",this.lprelease);b(this,"cutoff",t=>this.updateValue("cutoff",t));b(this,"lpf",this.cutoff);b(this,"resonance",t=>this.updateValue("resonance",Math.min(Math.max(t,0),50)));b(this,"lpq",this.resonance);b(this,"lpadsr",(t,r,i,s,a)=>(this.lpenv(t),this.lpattack(r),this.lpdecay(i),this.lpsustain(s),this.lprelease(a),this));b(this,"hpenv",t=>this.updateValue("hpenv",t));b(this,"hpe",t=>this.updateValue("hpe",t));b(this,"hpattack",t=>this.updateValue("hpattack",t));b(this,"hpa",this.hpattack);b(this,"hpdecay",t=>this.updateValue("hpdecay",t));b(this,"hpd",this.hpdecay);b(this,"hpsustain",t=>this.updateValue("hpsustain",t));b(this,"hpsus",this.hpsustain);b(this,"hprelease",t=>this.updateValue("hprelease",t));b(this,"hpr",this.hprelease);b(this,"hcutoff",t=>this.updateValue("hcutoff",t));b(this,"hpf",this.hcutoff);b(this,"hresonance",t=>this.updateValue("hresonance",t));b(this,"hpq",this.hresonance);b(this,"hpadsr",(t,r,i,s,a)=>(this.hpenv(t),this.hpattack(r),this.hpdecay(i),this.hpsustain(s),this.hprelease(a),this));b(this,"bpenv",t=>this.updateValue("bpenv",t));b(this,"bpe",t=>this.updateValue("bpe",t));b(this,"bpattack",t=>this.updateValue("bpattack",t));b(this,"bpa",this.bpattack);b(this,"bpdecay",t=>this.updateValue("bpdecay",t));b(this,"bpd",this.bpdecay);b(this,"bpsustain",t=>this.updateValue("bpsustain",t));b(this,"bps",this.bpsustain);b(this,"bprelease",t=>this.updateValue("bprelease",t));b(this,"bpr",this.bprelease);b(this,"bandf",t=>this.updateValue("bandf",t));b(this,"bpf",this.bandf);b(this,"bandq",t=>this.updateValue("bandq",t));b(this,"bpq",this.bandq);b(this,"bpadsr",(t,r,i,s,a)=>(this.bpenv(t),this.bpattack(r),this.bpdecay(i),this.bpsustain(s),this.bprelease(a),this));b(this,"freq",t=>this.updateValue("freq",t));b(this,"f",this.freq);b(this,"vib",t=>this.updateValue("vib",t));b(this,"vibmod",t=>this.updateValue("vibmod",t));b(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});b(this,"loop",t=>this.updateValue("loop",t));b(this,"loopBegin",t=>this.updateValue("loopBegin",t));b(this,"loopEnd",t=>this.updateValue("loopEnd",t));b(this,"begin",t=>this.updateValue("begin",t));b(this,"end",t=>this.updateValue("end",t));b(this,"gain",t=>this.updateValue("gain",t));b(this,"dbgain",t=>this.updateValue("gain",Math.min(Math.pow(10,t/20),10)));b(this,"db",this.dbgain);b(this,"velocity",t=>this.updateValue("velocity",t));b(this,"vel",this.velocity);b(this,"pan",t=>this.updateValue("pan",t));b(this,"sound",t=>this.updateValue("s",t));b(this,"chord",(t,...r)=>(typeof t=="string"?t=h3(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)));b(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});b(this,"snd",this.sound);b(this,"nudge",t=>this.updateValue("nudge",t));b(this,"cut",t=>this.updateValue("cut",t));b(this,"clip",t=>this.updateValue("clip",t));b(this,"n",t=>this.updateValue("n",t));b(this,"note",t=>typeof t=="string"?this.updateValue("note",oi(t)):this.updateValue("note",t));b(this,"speed",t=>this.updateValue("speed",t));b(this,"spd",this.speed);b(this,"coarse",t=>this.updateValue("coarse",t));b(this,"crush",t=>this.updateValue("crush",t));b(this,"shape",t=>this.updateValue("shape",t));b(this,"vowel",t=>this.updateValue("vowel",t));b(this,"vow",this.vowel);b(this,"delay",t=>this.updateValue("delay",t));b(this,"del",this.delay);b(this,"delayfeedback",t=>this.updateValue("delayfeedback",t));b(this,"delayfb",this.delayfeedback);b(this,"delaytime",t=>this.updateValue("delaytime",t));b(this,"delayt",this.delaytime);b(this,"orbit",t=>this.updateValue("orbit",t));b(this,"o",this.orbit);b(this,"room",t=>this.updateValue("room",t));b(this,"rm",this.room);b(this,"size",t=>this.updateValue("size",t));b(this,"sz",this.size);b(this,"stretch",t=>(this.updateValue("unit","c"),this.updateValue("speed",1/t),this.updateValue("cut",t),this));b(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this.update(),this)});b(this,"update",()=>{const[t,r]=r_(this.values.key||"C4",this.values.pitch||0,this.values.parsedScale||"MAJOR",this.values.octave||0);this.values.freq=Zn(t)});b(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 zm extends wI{constructor(t,r){super(r);b(this,"midiConnection");b(this,"chord",t=>(this.values.chord=t,this));b(this,"note",t=>(this.values.note=t,this));b(this,"sustain",t=>(this.values.sustain=t,this));b(this,"channel",t=>(this.values.channel=t,this));b(this,"port",t=>(this.values.port=this.midiConnection.getMidiOutputIndex(t),this));b(this,"add",t=>(this.values.note+=t,this));b(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this.update(),this)});b(this,"bend",t=>(this.values.bend=t,this));b(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));b(this,"update",()=>{const[t,r]=r_(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)});b(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,xI=new Set,Hm=typeof process=="object"&&process?process:{},kI=(n,e,t,r)=>{typeof Hm.emitWarning=="function"?Hm.emitWarning(n,e,t,r):console.error(`[${t}] ${e}: ${n}`)};let Bc=globalThis.AbortController,bE=globalThis.AbortSignal;var dT;if(typeof Bc>"u"){bE=class{constructor(){b(this,"onabort");b(this,"_onabort",[]);b(this,"reason");b(this,"aborted",!1)}addEventListener(r,i){this._onabort.push(i)}},Bc=class{constructor(){b(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=((dT=Hm.env)==null?void 0:dT.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,kI("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 aB=n=>!xI.has(n),Pi=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),LI=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?ec:null:null;class ec extends Array{constructor(e){super(e),this.fill(0)}}var cs;const ha=class ha{constructor(e,t){b(this,"heap");b(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=LI(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 Wm=ha;var Nn,Jr,wn,Dn,us,nr,xn,ir,Mt,it,xr,en,Tr,dr,kn,pr,gi,_i,Ln,Mn,Gi,kr,Zo,Zm,Oa,Si,Ko,tn,Gc,MI,Ea,ds,jo,qn,Bi,Vn,Ui,Jo,Km,ps,tc,hs,rc,xt,Ft,el,jm,ba,Oo;const g_=class g_{constructor(e){ot(this,Zo);ot(this,Gc);ot(this,qn);ot(this,Vn);ot(this,Jo);ot(this,ps);ot(this,hs);ot(this,xt);ot(this,el);ot(this,ba);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);b(this,"ttl");b(this,"ttlResolution");b(this,"ttlAutopurge");b(this,"updateAgeOnGet");b(this,"updateAgeOnHas");b(this,"allowStale");b(this,"noDisposeOnSet");b(this,"noUpdateTTL");b(this,"maxEntrySize");b(this,"sizeCalculation");b(this,"noDeleteOnFetchRejection");b(this,"noDeleteOnStaleGet");b(this,"allowStaleOnFetchAbort");b(this,"allowStaleOnFetchRejection");b(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,xr,void 0);ot(this,en,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,kr,void 0);ot(this,Oa,()=>{});ot(this,Si,()=>{});ot(this,Ko,()=>{});ot(this,tn,()=>!1);ot(this,Ea,e=>{});ot(this,ds,(e,t,r)=>{});ot(this,jo,(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:I,fetchMethod:R,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?LI(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=I,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(R!==void 0&&typeof R!="function")throw new TypeError("fetchMethod must be a function if specified");if(Xe(this,us,R),Xe(this,Gi,!!R),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,xr,new S(t)),Xe(this,en,new S(t)),Xe(this,Tr,0),Xe(this,dr,0),Xe(this,kn,Wm.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,kr,!!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,Gc,MI).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,Zo,Zm).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";aB(N)&&(xI.add(N),kI("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",N,g_))}}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,xr),prev:V(e,en),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,rc).call(a,t,r,i,s)},moveToTail:t=>{var r;return Ve(r=e,ba,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,tn).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,tn).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,I,R;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,jo).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,tc).call(this,!1):V(this,nr),V(this,Mt)[p]=e,V(this,it)[p]=t,V(this,ir).set(e,p),V(this,xr)[V(this,dr)]=p,V(this,en)[p]=V(this,dr),Xe(this,dr,p),ml(this,nr)._++,V(this,ds).call(this,p,u,l),l&&(l.set="add"),c=!1;else{Ve(this,ba,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,kr)&&((_=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,kr)&&((I=V(this,pr))==null||I.push([L,e,"set"])));if(V(this,Ea).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,Zo,Zm).call(this),V(this,Ln)&&(c||V(this,Ko).call(this,p,i,s),l&&V(this,Si).call(this,l,p)),!a&&V(this,kr)&&V(this,pr)){const L=V(this,pr);let $;for(;$=L==null?void 0:L.shift();)(R=V(this,Dn))==null||R.call(this,...$)}return this}pop(){var e;try{for(;V(this,nr);){const t=V(this,it)[V(this,Tr)];if(Ve(this,ps,tc).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,kr)&&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,tn).call(this,s))i&&(i.has="stale",V(this,Si).call(this,i,s));else return r&&V(this,Oa).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,tn).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:I,forceRefresh:R=!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,rc).call(this,e,f,K,I);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,tn).call(this,f);if(!R&&!S)return L&&(L.fetch="hit"),Ve(this,ba,Oo).call(this,f),i&&V(this,Oa).call(this,f),L&&V(this,Si).call(this,L,f),E;const N=Ve(this,hs,rc).call(this,e,f,K,I),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,tn).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,ba,Oo).call(this,o),i&&V(this,Oa).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,Ea).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,kr))&&(V(this,Mn)&&((r=V(this,wn))==null||r.call(this,l,e,"delete")),V(this,kr)&&((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,en)[o]):o===V(this,Tr)?Xe(this,Tr,V(this,xr)[o]):(V(this,xr)[V(this,en)[o]]=V(this,xr)[o],V(this,en)[V(this,xr)[o]]=V(this,en)[o]),ml(this,nr)._--,V(this,kn).push(o)}}if(V(this,kr)&&((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,kr)&&((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,kr)&&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,xr=new WeakMap,en=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,kr=new WeakMap,Zo=new WeakSet,Zm=function(){const e=new ec(V(this,Nn)),t=new ec(V(this,Nn));Xe(this,Ln,e),Xe(this,_i,t),Xe(this,Ko,(s,a,o=lo.now())=>{if(t[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){const l=setTimeout(()=>{V(this,tn).call(this,s)&&this.delete(V(this,Mt)[s])},a+1);l.unref&&l.unref()}}),Xe(this,Oa,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,tn,s=>e[s]!==0&&t[s]!==0&&(r||i())-t[s]>e[s])},Oa=new WeakMap,Si=new WeakMap,Ko=new WeakMap,tn=new WeakMap,Gc=new WeakSet,MI=function(){const e=new ec(V(this,Nn));Xe(this,xn,0),Xe(this,gi,e),Xe(this,Ea,t=>{Xe(this,xn,V(this,xn)-e[t]),e[t]=0}),Xe(this,jo,(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,tc).call(this,!0)}Xe(this,xn,V(this,xn)+e[t]),i&&(i.entrySize=r,i.totalCalculatedSize=V(this,xn))})},Ea=new WeakMap,ds=new WeakMap,jo=new WeakMap,qn=new WeakSet,Bi=function*({allowStale:e=this.allowStale}={}){if(V(this,nr))for(let t=V(this,dr);!(!Ve(this,Jo,Km).call(this,t)||((e||!V(this,tn).call(this,t))&&(yield t),t===V(this,Tr)));)t=V(this,en)[t]},Vn=new WeakSet,Ui=function*({allowStale:e=this.allowStale}={}){if(V(this,nr))for(let t=V(this,Tr);!(!Ve(this,Jo,Km).call(this,t)||((e||!V(this,tn).call(this,t))&&(yield t),t===V(this,dr)));)t=V(this,xr)[t]},Jo=new WeakSet,Km=function(e){return e!==void 0&&V(this,ir).get(V(this,Mt)[e])===e},ps=new WeakSet,tc=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,kr))&&(V(this,Mn)&&((s=V(this,wn))==null||s.call(this,i,r,"evict")),V(this,kr)&&((a=V(this,pr))==null||a.push([i,r,"evict"]))),V(this,Ea).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,xr)[t]),V(this,ir).delete(r),ml(this,nr)._--,t},hs=new WeakSet,rc=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 Bc,{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=(I,R=!1)=>{const{aborted:L}=a.signal,$=r.ignoreFetchAbort&&I!==void 0;if(r.status&&(L&&!R?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,$&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),L&&!$&&!R)return p(a.signal.reason);const K=_;return V(this,it)[t]===_&&(I===void 0?K.__staleWhileFetching?V(this,it)[t]=K.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,I,l.options))),I},u=I=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=I),p(I)),p=I=>{const{aborted:R}=a.signal,L=R&&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 I},m=(I,R)=>{var $;const L=($=V(this,us))==null?void 0:$.call(this,e,s,l);L&&L instanceof Promise&&L.then(K=>I(K===void 0?void 0:K),R),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(I(void 0),r.allowStaleOnFetchAbort&&(I=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 Bc},el=new WeakSet,jm=function(e,t){V(this,en)[t]=e,V(this,xr)[e]=t},ba=new WeakSet,Oo=function(e){e!==V(this,dr)&&(e===V(this,Tr)?Xe(this,Tr,V(this,xr)[e]):Ve(this,el,jm).call(this,V(this,en)[e],V(this,xr)[e]),Ve(this,el,jm).call(this,V(this,dr),e),Xe(this,dr,e))};let Xm=g_;const Ro=class Ro{constructor(){b(this,"_fallbackMethod",()=>Ro.createSkipProxy());b(this,"out",()=>{})}};b(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 Uc=Ro;const No=class No extends i_{constructor(t,r){super(r);b(this,"_fallbackMethod",()=>No.createRestProxy(this.values.length,this.app));b(this,"out",()=>{});this.values.length=t}};b(No,"createRestProxy",(t,r)=>{const i=new No(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 Fc=No;class sB extends i_{constructor(t,r,i){super(i);b(this,"input");b(this,"ziffers");b(this,"initCallTime",0);b(this,"startCallTime",0);b(this,"lastCallTime",0);b(this,"waitTime",0);b(this,"startBeat",0);b(this,"played",!1);b(this,"current");b(this,"retro",!1);b(this,"index",-1);b(this,"zid","");b(this,"options",{});b(this,"skipIndex",0);b(this,"endTime",0);b(this,"next",()=>(this.current=this.ziffers.next(),this.played=!0,this.current));b(this,"pulseToSecond",t=>this.app.clock.convertPulseToSecond(t));b(this,"firstRun",()=>this.notStarted());b(this,"atTheBeginning",()=>this.skipIndex===0&&this.ziffers.index<=0);b(this,"origin",()=>this.app.clock.pulses_since_origin+1);b(this,"pulse",()=>this.app.clock.time_position.pulse);b(this,"beat",()=>this.app.clock.time_position.beat);b(this,"nextBeat",()=>this.app.clock.next_beat_in_ticks);b(this,"nextBeatInTicks",()=>this.app.clock.next_beat_in_ticks);b(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});b(this,"lead",()=>this.voiceleading());b(this,"invert",t=>(this.atTheBeginning()&&this.ziffers.invert(t),this));b(this,"out",()=>{});this.app=i,this.input=t,this.options=r,this.ziffers=new v3(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 Vm(s,this.app).sound(t||"sine")}else if(r instanceof Ra){const s=r.pitches.map(o=>o.getExisting("freq","pitch","key","scale","octave","parsedScale")),a={dur:i};return t&&(a.s=t),new Vm(a,this.app).chord(s)}else if(r instanceof $m)return Fc.createRestProxy(r.duration,this.app)}else return Uc.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 zm(i,this.app);return t?s.note(t):s}else{if(r instanceof $m)return Fc.createRestProxy(r.duration,this.app);if(r instanceof Ra){const s=r.midiChord();return new zm(i,this.app).chord(s)}}}else return Uc.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 oB=n=>n[0]==="{"&&n[n.length-1]==="}",co=(n,e)=>{if(oB(n)){const t=JSON.parse(n);return JSON.stringify({...t,...e})}else return JSON.stringify({...e,text:n})},lB=n=>{String.prototype.speak=function(){const e=JSON.parse(this.valueOf());new PI({...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 rd;class PI{constructor(e){b(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(),rd&&clearTimeout(rd),rd=setTimeout(()=>{r.speak(i)},200)):r.speak(i)}else t("No text provided")}));this.options=e}}async function vE(){return Promise.all([F3(),pa("github:tidalcycles/Dirt-Samples/master").then(()=>J3()),iB(),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 cB{constructor(e){b(this,"variables",{});b(this,"codeExamples",{});b(this,"counters",{});b(this,"_drunk",new y3(-100,100,!1));b(this,"randomGen",Math.random);b(this,"currentSeed");b(this,"localSeeds",new Map);b(this,"patternCache",new Xm({max:1e3,ttl:1e3*60*5}));b(this,"errorTimeoutID",0);b(this,"printTimeoutID",0);b(this,"MidiConnection");b(this,"load");b(this,"_loadUniverseFromInterface",e=>{this.app.loadUniverse(e),this.app.openBuffersModal()});b(this,"_deleteUniverseFromInterface",e=>{delete this.app.universes[e],this.app.settings.saveApplicationToLocalStorage(this.app.universes,this.app.settings),this.app.updateKnownUniversesView()});b(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()});b(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()});b(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,DP(this.app,e)});b(this,"_all_samples",()=>a_.get());b(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)});b(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)});b(this,"time",()=>this.app.audioContext.currentTime);b(this,"play",()=>{this.app.setButtonHighlighting("play",!0),this.MidiConnection.sendStartMessage(),this.app.clock.start()});b(this,"pause",()=>{this.app.setButtonHighlighting("pause",!0),this.MidiConnection.sendStopMessage(),this.app.clock.pause()});b(this,"stop",()=>{this.app.setButtonHighlighting("stop",!0),this.MidiConnection.sendStopMessage(),this.app.clock.stop()});b(this,"silence",this.stop);b(this,"hush",this.stop);b(this,"warp",e=>{this.app.clock.tick=e,this.app.clock.time_position=this.app.clock.convertTicksToTimeposition(e)});b(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)});b(this,"onmousemove",e=>{this.app._mouseX=e.pageX,this.app._mouseY=e.pageY});b(this,"mouseX",()=>this.app._mouseX);b(this,"mouseY",()=>this.app._mouseY);b(this,"noteX",()=>Math.floor(this.app._mouseX/document.body.clientWidth*127));b(this,"noteY",()=>Math.floor(this.app._mouseY/document.body.clientHeight*127));b(this,"script",(...e)=>{e.forEach(t=>{ls(this.app,this.app.universes[this.app.selected_universe].locals[t])})});b(this,"s",this.script);b(this,"delete_script",e=>{this.app.universes[this.app.selected_universe].locals[e]={candidate:"",committed:"",evaluations:0}});b(this,"cs",this.delete_script);b(this,"copy_script",(e,t)=>{this.app.universes[this.app.selected_universe].locals[t]={...this.app.universes[this.app.selected_universe].locals[e]}});b(this,"cps",this.copy_script);b(this,"copy_universe",(e,t)=>{this.app.universes[t]={...this.app.universes[e]}});b(this,"delete_universe",e=>{this.app.selected_universe===e&&(this.app.selected_universe="Default"),delete this.app.universes[e],this.app.settings.saveApplicationToLocalStorage(this.app.universes,this.app.settings),this.app.updateKnownUniversesView()});b(this,"big_bang",()=>{confirm("Are you sure you want to delete all universes?")&&(this.app.universes={...Ao},this.app.settings.saveApplicationToLocalStorage(this.app.universes,this.app.settings)),this.app.selected_universe="Default",this.app.updateKnownUniversesView()});b(this,"midi_outputs",()=>{this._logMessage(this.MidiConnection.listMidiOutputs())});b(this,"midi_output",e=>{e?this.MidiConnection.switchMidiOutput(e):console.log(this.MidiConnection.getCurrentMidiPort())});b(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 zm(e,this.app)));b(this,"sysex",e=>{this.MidiConnection.sendSysExMessage(e)});b(this,"pitch_bend",(e,t)=>{this.MidiConnection.sendPitchBend(e,t)});b(this,"program_change",(e,t)=>{this.MidiConnection.sendProgramChange(e,t)});b(this,"midi_clock",()=>{this.MidiConnection.sendMidiClock()});b(this,"control_change",({control:e=20,value:t=0,channel:r=0})=>{this.MidiConnection.sendMidiControlChange(e,t,r)});b(this,"midi_panic",()=>{this.MidiConnection.panic()});b(this,"active_note_events",e=>{let t;if(e?t=this.MidiConnection.activeNotesFromChannel(e):t=this.MidiConnection.activeNotes,t.length>0)return t});b(this,"active_notes",e=>{const t=this.active_note_events(e);if(t&&t.length>0)return t.map(r=>r.note)});b(this,"kill_active_notes",()=>{this.MidiConnection.activeNotes=[]});b(this,"sticky_notes",e=>{let t;if(e?t=this.MidiConnection.stickyNotesFromChannel(e):t=this.MidiConnection.stickyNotes,t.length>0)return t.map(r=>r.note)});b(this,"kill_sticky_notes",()=>{this.MidiConnection.stickyNotes=[]});b(this,"buffer",e=>e?this.MidiConnection.findNoteFromBufferInChannel(e)!==void 0:this.MidiConnection.noteInputBuffer.length>0);b(this,"buffer_event",e=>e?this.MidiConnection.findNoteFromBufferInChannel(e):this.MidiConnection.noteInputBuffer.shift());b(this,"buffer_note",e=>{const t=this.buffer_event(e);return t?t.note:void 0});b(this,"last_note_event",e=>e?this.MidiConnection.lastNoteInChannel[e]:this.MidiConnection.lastNote);b(this,"last_note",e=>{const t=this.last_note_event(e);return t?t.note:60});b(this,"last_cc",(e,t)=>t?this.MidiConnection.lastCCInChannel[t]?this.MidiConnection.lastCCInChannel[t][e]:64:this.MidiConnection.lastCC[e]||64);b(this,"has_cc",e=>e?this.MidiConnection.findCCFromBufferInChannel(e)!==void 0:this.MidiConnection.ccInputBuffer.length>0);b(this,"buffer_cc",e=>e?this.MidiConnection.findCCFromBufferInChannel(e):this.MidiConnection.ccInputBuffer.shift());b(this,"generateCacheKey",(...e)=>e.map(t=>JSON.stringify(t)).join(","));b(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 sB(e,t,this.app),this.app.api.patternCache.set(s,a)),typeof r=="number"&&(a.zid=i),a.updateLastCallTime(),r!==""&&a.sync("z0"),a});b(this,"z0",(e,t={})=>this.z(e,t,0));b(this,"z1",(e,t={})=>this.z(e,t,1));b(this,"z2",(e,t={})=>this.z(e,t,2));b(this,"z3",(e,t={})=>this.z(e,t,3));b(this,"z4",(e,t={})=>this.z(e,t,4));b(this,"z5",(e,t={})=>this.z(e,t,5));b(this,"z6",(e,t={})=>this.z(e,t,6));b(this,"z7",(e,t={})=>this.z(e,t,7));b(this,"z8",(e,t={})=>this.z(e,t,8));b(this,"z9",(e,t={})=>this.z(e,t,9));b(this,"z10",(e,t={})=>this.z(e,t,10));b(this,"z11",(e,t={})=>this.z(e,t,11));b(this,"z12",(e,t={})=>this.z(e,t,12));b(this,"z13",(e,t={})=>this.z(e,t,13));b(this,"z14",(e,t={})=>this.z(e,t,14));b(this,"z15",(e,t={})=>this.z(e,t,15));b(this,"z16",(e,t={})=>this.z(e,t,16));b(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));b(this,"$",this.counter);b(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);b(this,"drunk",e=>e!==void 0?(this._drunk.position=e,this._drunk.getPosition()):(this._drunk.step(),this._drunk.getPosition()));b(this,"drunk_max",e=>{this._drunk.max=e});b(this,"drunk_min",e=>{this._drunk.min=e});b(this,"drunk_wrap",e=>{this._drunk.toggleWrap(e)});b(this,"variable",(e,t)=>typeof e=="string"&&t===void 0?this.variables[e]:(this.variables[e]=t,this.variables[e]));b(this,"v",this.variable);b(this,"delete_variable",e=>{delete this.variables[e]});b(this,"dv",this.delete_variable);b(this,"clear_variables",()=>{this.variables={}});b(this,"cv",this.clear_variables);b(this,"randI",(e,t)=>Math.floor(this.randomGen()*(t-e+1))+e);b(this,"rand",(e,t)=>this.randomGen()*(t-e)+e);b(this,"irand",this.randI);b(this,"rI",this.randI);b(this,"r",this.rand);b(this,"ir",this.randI);b(this,"seed",e=>{typeof e=="number"&&(e=e.toString()),this.currentSeed!==e&&(this.currentSeed=e,this.randomGen=Ym(e))});b(this,"localSeededRandom",e=>{if(typeof e=="number"&&(e=e.toString()),this.localSeeds.has(e))return this.localSeeds.get(e);const t=Ym(e);return this.localSeeds.set(e,t),t});b(this,"clearLocalSeed",(e=void 0)=>{e&&this.localSeeds.delete(e.toString()),this.localSeeds.clear()});b(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));b(this,"cmp",this.clamp);b(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));b(this,"tempo",this.bpm);b(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));b(this,"ppqn",e=>e===void 0?this.app.clock.ppqn:(e<1&&console.log(`Setting ppqn to ${e}`),this.app.clock.ppqn=e,e));b(this,"time_signature",(e,t)=>{this.app.clock.time_signature=[e,t]});b(this,"prob",e=>this.randomGen()*100 this.randomGen()>.5);b(this,"odds",(e,t=1)=>this.randomGen() !1);b(this,"almostNever",(e=1)=>this.randomGen()<.025*this.ppqn()/(this.ppqn()*e));b(this,"rarely",(e=1)=>this.randomGen()<.1*this.ppqn()/(this.ppqn()*e));b(this,"scarcely",(e=1)=>this.randomGen()<.25*this.ppqn()/(this.ppqn()*e));b(this,"sometimes",(e=1)=>this.randomGen()<.5*this.ppqn()/(this.ppqn()*e));b(this,"often",(e=1)=>this.randomGen()<.75*this.ppqn()/(this.ppqn()*e));b(this,"frequently",(e=1)=>this.randomGen()<.9*this.ppqn()/(this.ppqn()*e));b(this,"almostAlways",(e=1)=>this.randomGen()<.985*this.ppqn()/(this.ppqn()*e));b(this,"always",(e=1)=>!0);b(this,"dice",e=>Math.floor(this.randomGen()*e)+1);b(this,"cbar",()=>this.app.clock.time_position.bar+1);b(this,"ctick",()=>this.app.clock.tick+1);b(this,"cpulse",()=>this.app.clock.time_position.pulse+1);b(this,"cbeat",()=>this.app.clock.time_position.beat+1);b(this,"ebeat",()=>this.app.clock.beats_since_origin+1);b(this,"epulse",()=>this.app.clock.pulses_since_origin+1);b(this,"nominator",()=>this.app.clock.time_signature[0]);b(this,"meter",()=>this.app.clock.time_signature[1]);b(this,"denominator",this.meter);b(this,"beat",(...e)=>e.map(r=>this.app.clock.pulses_since_origin%Math.floor(r*this.ppqn())===0).some(r=>r===!0));b(this,"b",this.beat);b(this,"pulse",(...e)=>e.map(r=>this.app.clock.pulses_since_origin%r===0).some(r=>r===!0));b(this,"flip",(e,t=50)=>{let r=e*2;const i=this.app.clock.pulses_since_origin,s=Math.floor(r*this.ppqn()),a=Math.floor(t/100*s);return i%s{let t=e*2;const r=this.app.clock.time_position.bar;return Math.floor(r/t)%2===0});b(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)});b(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)});b(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)});b(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)});b(this,"delay",(e,t)=>{setTimeout(t,e)});b(this,"delayr",(e,t,r)=>{[...Array(t).keys()].map(s=>e*s).forEach((s,a)=>{setTimeout(r,s)})});b(this,"euclid",(e,t,r,i=0)=>this._euclidean_cycle(t,r,i)[e%r]);b(this,"ec",this.euclid);b(this,"rhythm",(e,t,r,i=0)=>this.beat(e)&&this._euclidean_cycle(t,r,i).beat(e));b(this,"bin",(e,t)=>{let i=t.toString(2).split("").map(s=>s==="1");return i[e%i.length]});b(this,"binrhythm",(e,t)=>{let i=t.toString(2).split("").map(s=>s==="1");return this.beat(e)&&i.beat(e)});b(this,"line",(e,t,r=1)=>{const i=[];if(t>e&&r>0||t Math.sin(this.app.clock.ctx.currentTime*Math.PI*2*e)+t);b(this,"usine",(e=1,t=0)=>(this.sine(e,t)+1)/2);b(this,"saw",(e=1,t=0)=>this.app.clock.ctx.currentTime*e%1*2-1+t);b(this,"usaw",(e=1,t=0)=>(this.saw(e,t)+1)/2);b(this,"triangle",(e=1,t=0)=>Math.abs(this.saw(e,t))*2-1);b(this,"utriangle",(e=1,t=0)=>(this.triangle(e,t)+1)/2);b(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);b(this,"noise",()=>this.randomGen()*2-1);b(this,"min",(...e)=>Math.min(...e));b(this,"max",(...e)=>Math.max(...e));b(this,"mean",(...e)=>e.reduce((r,i)=>r+i,0)/e.length);b(this,"limit",(e,t,r)=>Math.min(Math.max(e,t),r));b(this,"abs",Math.abs);b(this,"speak",(e,t="en-US",r=0,i=1,s=1)=>{new PI({text:e,lang:t,voice:r,rate:i,pitch:s}).speak().then(()=>{}).catch(o=>{console.log(o)})});b(this,"stop_hydra",()=>{this.app.hydra.hush()});b(this,"sound",e=>new Vm(e,this.app));b(this,"snd",this.sound);b(this,"samples",pa);b(this,"log",e=>{console.log(e),this._logMessage(e)});b(this,"scale",n_);b(this,"rate",e=>{});b(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]});b(this,"seqbeat",(...e)=>e[this.app.clock.time_position.beat%e.length]);b(this,"seqbar",(...e)=>e[(this.app.clock.time_position.bar+1)%e.length]);this.app=e,this.MidiConnection=new C3(this,e.settings)}transmission(){return this.MidiConnection.activeNotes.length>0}_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 uB=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;r 100)throw new Error("Amount should be between 0 and 100");if(this.length<=1)return this;for(let t=0;t 1)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=yI(cl(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=yI(cl(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,tg[Bt]=((Li&65280)>>8|(Li&255)<<8)>>1}var ri=function(n,e,t){for(var r=n.length,i=0,s=new ln(e);i >l]=c}else for(o=new ln(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 Ho=new Sr(32);for(var Bt=0;Bt<32;++Bt)Ho[Bt]=5;var pB=ri(Ki,9,0),hB=ri(Ki,9,1),fB=ri(Ho,5,0),mB=ri(Ho,5,1),nd=function(n){for(var e=n[0],t=1;t e&&(e=n[t]);return e},Rn=function(n,e,t){var r=e/8|0;return(n[r]|n[r+1]<<8)>>(e&7)&t},id=function(n,e){var t=e/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(e&7)},c_=function(n){return(n+7)/8|0},u_=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},gB=["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"],$r=function(n,e,t){var r=new Error(e||gB[n]);if(r.code=n,Error.captureStackTrace&&Error.captureStackTrace(r,$r),!t)throw r;return r},d_=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,I=e.n,R=i*8;do{if(!m){c=Rn(n,u,1);var L=Rn(n,u+1,3);if(u+=3,L)if(L==1)m=hB,_=mB,T=9,I=5;else if(L==2){var E=Rn(n,u,31)+257,S=Rn(n,u+10,15)+4,N=E+Rn(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+Rn(n,u,3),u+=2,ee=k[M-1]):$==17?(B=3+Rn(n,u,7),u+=3):$==18&&(B=11+Rn(n,u,127),u+=7);B--;)k[M++]=ee}}var Q=k.subarray(0,E),j=k.subarray(E);T=nd(Q),I=nd(j),m=ri(Q,T,1),_=ri(j,I,1)}else $r(1);else{var $=c_(u)+4,K=n[$-4]|n[$-3]<<8,f=$+K;if(f>i){o&&$r(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>R){o&&$r(0);break}}a&&l(p+131072);for(var Z=(1<>4;if(u+=ee&15,u>R){o&&$r(0);break}if(ee||$r(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=iu[M];De=Rn(n,u,(1< >4;be||$r(3),u+=be&15;var j=dB[Re];if(Re>3){var xe=au[Re];j+=id(n,u)&(1< R){o&&$r(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},ad=function(n,e){for(var t=[],r=0;r m&&(m=s[r].s);var _=new ln(m+1),T=rg(t[u-1],_,0);if(T>e){var r=0,I=0,R=T-e,L=1< e)I+=L-(1< >=R;I>0;){var K=s[r].s;_[K] =0&&I;--r){var f=s[r].s;_[f]==e&&(--_[f],++I)}T=e}return{t:new Sr(_),l:T}},rg=function(n,e,t){return n.s==-1?Math.max(rg(n.l,e,t+1),rg(n.r,e,t+1)):e[n.s]=t},CE=function(n){for(var e=n.length;e&&!n[--e];);for(var t=new ln(++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;s 4&&!M[Jm[te-1]];--te);var ne=c+5<<3,re=po(i,Ki)+po(s,Ho)+a,ee=po(i,m)+po(s,I)+a+14+3*te+po(N,M)+2*N[16]+3*N[17]+7*N[18];if(l>=0&&ne<=re&&ne<=ee)return $I(e,u,n.subarray(l,l+c));var B,Q,j,Z;if(fi(e,u,1+(ee 15&&(fi(e,u,De[k]>>5&127),u+=De[k]>>12)}}else B=pB,Q=Ki,j=fB,Z=Ho;for(var k=0;k 255){var xe=be>>18&31;uo(e,u,B[xe+257]),u+=Q[xe+257],xe>7&&(fi(e,u,be>>23&31),u+=iu[xe]);var Re=be&31;uo(e,u,j[Re]),u+=Z[Re],Re>3&&(uo(e,u,be>>5&8191),u+=au[Re])}else uo(e,u,B[be]),u+=Q[be]}return uo(e,u,B[256]),u+Q[256]},_B=new l_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),GI=new Sr(0),SB=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=_B[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;be j){if(j=be,Z=le,be>Ee)break;for(var Re=Math.min(le,be-2),ce=0,Q=0;Q ce&&(ce=Le,ee=ke)}}}re=ee,ee=I[re],le+=re-ee&32767}if(Z){f[M++]=268435456|eg[j]<<18|TE[Z];var tt=eg[j]&31,nt=TE[Z]&31;k+=iu[tt]+au[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=$I(l,u+1,n.subarray(x,ze))}s.i=a}return u_(o,0,r+c_(u)+i)},OB=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}(),EB=function(){var n=-1;return{p:function(e){for(var t=n,r=0;r >>8;n=t},d:function(){return~n}}},bB=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 SB(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)},ng=function(n,e,t){for(;t;++e)n[e]=t,t>>>=8},vB=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&&ng(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)}},TB=function(n){(n[0]!=31||n[1]!=139||n[2]!=8)&&$r(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)},CB=function(n){var e=n.length;return(n[e-4]|n[e-3]<<8|n[e-2]<<16|n[e-1]<<24)>>>0},yB=function(n){return 10+(n.filename?n.filename.length+1:0)},AB=function(n,e){return((n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31)&&$r(6,"invalid zlib data"),(n[1]>>5&1)==+!e&&$r(6,"invalid zlib data: "+(n[1]&32?"need":"unexpected")+" dictionary"),(n[1]>>3&4)+2};function IB(n,e){return d_(n,{i:2},e&&e.out,e&&e.dictionary)}function RB(n,e){e||(e={});var t=EB(),r=n.length;t.p(n);var i=bB(n,e,yB(e),8),s=i.length;return vB(i,e),ng(i,s-8,t.d()),ng(i,s-4,r),i}function NB(n,e){var t=TB(n);return t+8>n.length&&$r(6,"invalid gzip data"),d_(n.subarray(t,-8),{i:2},e&&e.out||new Sr(CB(n)),e&&e.dictionary)}function wB(n,e){return d_(n.subarray(AB(n,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function DB(n,e){return n[0]==31&&n[1]==139&&n[2]==8?NB(n,e):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?IB(n,e):wB(n,e)}var ig=typeof TextDecoder<"u"&&new TextDecoder,xB=0;try{ig.decode(GI,{stream:!0}),xB=1}catch{}var kB=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:u_(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 LB(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;M 0){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""+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:' ',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),It=Zr(["m","k","l","p","d","c","w","y","h","n","q","a","e","f","s","x","t","g","u","j","z","o"],!1,!1),Vr=lt("/",!1),ht=lt("(",!1),Zt=lt(")",!1),Ct=lt("[:",!1),Be=lt("]",!1),Ur=lt("[",!1),Fn=lt("{",!1),dt=lt("}",!1),zr=lt("+",!1),Ir=lt("*",!1),Ii=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=Zr([["a","z"],["A","Z"],["0","9"]],!1,!1),Kt=lt("#",!1),ui=lt("b",!1),di=Zr([["a","z"],["A","Z"],["0","9"],"-","*","+"],!1,!1),q=Zr([["A","G"]],!1,!1),ie=Zr(["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),Nr=lt("v",!1),Hr=function(v){return v.filter(w=>w)},Da=function(){return parseFloat(Yr())},ta=function(){return parseInt(Yr())},Ds=function(){return parseInt(Yr())},Wr=function(){},xs=function(v){return Ut(XP,{sound:v})},xa=function(){return Yr()},ka=function(v){return Ut(Io,{items:v})},ks=function(v){return v},La=function(v,w){return Ut(ZP,{item:v,sound:w})},Ls=function(v,w){return Ut(KP,{item:v,soundIndex:w})},Ma=function(v){return v},Fr=function(){return UP[Yr()]},Ms=function(v,w){return v/w},Ps=function(v){return v.filter(w=>w)},Pa=function(v){return Ut(Io,{items:v})},Ba=function(v,w){return w?Ut(mE,{item:v,times:w}):Ut(gE,{items:v})},Bs=function(v){return v},Ua=function(v,w,P){return Ut(r3,{left:v,operation:w,right:P})},Us=function(v,w){return Ut(t3,{items:v,times:w})},Fa=function(v){return Ut(vI,{items:v})},Fs=function(v){return v.map(w=>typeof w=="number"?w:void 0)},Ys=function(){return Math.ceil(EI(Yr()))},un=function(v){var w=v.filter(P=>P).map(P=>Ut(ti,{pitch:P[0]},P.toString()));return Ut(gE,{items:w})},bt=function(v){return v},$s=function(v){return v},Ri=function(){},Gs=function(v){return Ut(Io,{items:v})},pi=function(v){return Ut(JP,{octave:v})},Qs=function(){return Yr().split("").reduce((v,w)=>v+(w==="^"?1:-1),0)},Ni=function(){return Ut(Mc,{seededRandom:s.seededRandom})},Ya=function(v,w){return Ut(Mc,{min:v,max:w,seededRandom:s.seededRandom})},$a=function(v,w){return Ut(mE,{item:v,times:w})},qs=function(v){return Ut(e3,{duration:v})},wi=function(v){return v},Ga=function(v){return Ut($m,{duration:v})},Di=function(v,w,P,X){const oe=v?s.nodeOptions.octave+v:s.nodeOptions.octave;return Ut(ti,{duration:w,pitch:X,pitchOctave:oe,add:P})},xi=function(v){return v.reduce((w,P)=>w+(P==="#"?1:-1),0)},Qa=function(v,w,P){return Ut(Ra,{pitches:[v].concat(w),inversion:P})},ra=function(){return Yr()},hi=function(v){return v},fr=function(){return Yr()},qa=function(v,w,P,X,oe){const ve=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",gt=s.nodeOptions.key?s.nodeOptions.key:"C",hn=d3(X,P,ve,v,w),Zs=w||s.nodeOptions.duration,mR=v?s.nodeOptions.octave+v:s.nodeOptions.octave;return Ut(Ra,{duration:Zs,chordOctave:mR,pitches:hn,chordName:X,inversion:oe,scaleName:ve,key:gt})},Xr=function(v,w,P){const X=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",oe=s.nodeOptions.key?s.nodeOptions.key:"C";return Ut(jP,{roman:v,chordName:w,inversion:P,scaleName:X,key:oe})},na=function(v){const w=s.nodeOptions.scaleName?s.nodeOptions.scaleName:"MAJOR",P=s.nodeOptions.key?s.nodeOptions.key:"C",X=O3(v,P,w);return Ut(ti,{pitch:X.pc,add:X.add,scaleName:w,key:P})},A=0,We=0,Va=[{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 Yr(){return i.substring(We,A)}function ul(){return d(We,A)}function lt(v,w){return{type:"literal",text:v,ignoreCase:w}}function Zr(v,w,P){return{type:"class",parts:v,inverted:w,ignoreCase:P}}function dl(){return{type:"end"}}function zs(v){return{type:"other",description:v}}function pl(v){var w=Va[v],P;if(w)return w;for(P=v-1;!Va[P];)P--;for(w=Va[P],w={line:w.line,column:w.column};P dn&&(dn=A,Vs=[]),Vs.push(v))}function g(v,w,P){return new e(e.buildMessage(v,w),v,w,P)}function O(){var v,w,P=A*56+0,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=Xt(),w!==a&&(We=v,w=Hr(w)),v=w,me[P]={nextPos:A,result:v},v)}function C(){var v,w,P,X,oe,ve,gt,hn=A*56+1,Zs=me[hn];if(Zs)return A=Zs.nextPos,Zs.result;for(v=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(ve=[],Le.test(i.charAt(A))?(gt=i.charAt(A),A++):(gt=a,Oe===0&&h(rt)),gt!==a)for(;gt!==a;)ve.push(gt),Le.test(i.charAt(A))?(gt=i.charAt(A),A++):(gt=a,Oe===0&&h(rt));else ve=a;ve!==a?(P=[P,X,oe,ve],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=v,w=Da()),v=w,me[hn]={nextPos:A,result:v},v}function y(){var v,w,P=A*56+2,X=me[P];return X?(A=X.nextPos,X.result):(v=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=v,v=ta()):(A=v,v=a),me[P]={nextPos:A,result:v},v)}function D(){var v,w,P,X=A*56+3,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=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=v,v=Ds()):(A=v,v=a),me[X]={nextPos:A,result:v},v}function F(){var v,w,P=A*56+4,X=me[P];return X?(A=X.nextPos,X.result):(Oe++,v=A,tt.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(cr)),w!==a&&(We=v,w=Wr()),v=w,Oe--,v===a&&(w=a,Oe===0&&h(Br)),me[P]={nextPos:A,result:v},v)}function U(){var v,w,P=A*56+8,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=H(),w!==a&&(We=v,w=xs(w)),v=w,me[P]={nextPos:A,result:v},v)}function H(){var v,w,P,X,oe,ve=A*56+10,gt=me[ve];if(gt)return A=gt.nextPos,gt.result;if(v=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=v,v=xa()}else A=v,v=a}else A=v,v=a;return me[ve]={nextPos:A,result:v},v}function z(){var v,w=A*56+11,P=me[w];return P?(A=P.nextPos,P.result):(v=pe(),v===a&&(v=he()),me[w]={nextPos:A,result:v},v)}function pe(){var v,w,P,X,oe=A*56+12,ve=me[oe];if(ve)return A=ve.nextPos,ve.result;if(v=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=I,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=v,v=ka(P)):(A=v,v=a)):(A=v,v=a)}else A=v,v=a;return me[oe]={nextPos:A,result:v},v}function he(){var v,w=A*56+13,P=me[w];return P?(A=P.nextPos,P.result):(v=H(),v===a&&(v=pe(),v===a&&(v=F())),me[w]={nextPos:A,result:v},v)}function se(){var v,w,P,X=A*56+14,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,i.charCodeAt(A)===64?(w=R,A++):(w=a,Oe===0&&h(Ht)),w!==a?(P=z(),P!==a?(We=v,v=ks(P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function ae(){var v,w=A*56+15,P=me[w];return P?(A=P.nextPos,P.result):(v=rr(),v===a&&(v=st(),v===a&&(v=qt(),v===a&&(v=ou(),v===a&&(v=Qt())))),me[w]={nextPos:A,result:v},v)}function Ce(){var v,w,P,X=A*56+16,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,w=ae(),w===a&&(w=Xs()),w!==a?(P=se(),P!==a?(We=v,v=La(w,P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function Se(){var v,w,P,X=A*56+17,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,w=Ce(),w===a&&(w=ae(),w===a&&(w=Xs())),w!==a?(P=qe(),P!==a?(We=v,v=Ls(w,P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function qe(){var v,w,P,X=A*56+18,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,i.charCodeAt(A)===58?(w=L,A++):(w=a,Oe===0&&h(ut)),w!==a?(P=Dt(),P!==a?(We=v,v=Ma(P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function je(){var v,w,P=A*56+19,X=me[P];return X?(A=X.nextPos,X.result):(v=A,mt.test(i.charAt(A))?(w=i.charAt(A),A++):(w=a,Oe===0&&h(It)),w!==a&&(We=v,w=Fr()),v=w,me[P]={nextPos:A,result:v},v)}function Ue(){var v,w=A*56+20,P=me[w];return P?(A=P.nextPos,P.result):(v=Nt(),v===a&&(v=C(),v===a&&(v=je())),me[w]={nextPos:A,result:v},v)}function Nt(){var v,w,P,X,oe=A*56+21,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=A,w=D(),w!==a?(i.charCodeAt(A)===47?(P=$,A++):(P=a,Oe===0&&h(Vr)),P!==a?(X=D(),X!==a?(We=v,v=Ms(w,X)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function Xt(){var v,w,P,X=A*56+22,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=A,w=[],P=E_(),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=ou())))))))),P!==a)for(;P!==a;)w.push(P),P=E_(),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=ou()))))))));else w=a;return w!==a&&(We=v,w=Ps(w)),v=w,me[X]={nextPos:A,result:v},v}function Dt(){var v,w=A*56+23,P=me[w];return P?(A=P.nextPos,P.result):(v=F(),v===a&&(v=D(),v===a&&(v=O_(),v===a&&(v=cu(),v===a&&(v=er(),v===a&&(v=__()))))),me[w]={nextPos:A,result:v},v)}function er(){var v,w,P,X,oe=A*56+24,ve=me[oe];if(ve)return A=ve.nextPos,ve.result;if(v=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=I,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=v,v=Pa(P)):(A=v,v=a)):(A=v,v=a)}else A=v,v=a;return me[oe]={nextPos:A,result:v},v}function st(){var v,w,P,X,oe,ve=A*56+25,gt=me[ve];return gt?(A=gt.nextPos,gt.result):(v=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=v,v=Ba(P,X)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[ve]={nextPos:A,result:v},v)}function ft(){var v,w,P,X=A*56+26,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,i.charCodeAt(A)===58?(w=L,A++):(w=a,Oe===0&&h(ut)),w!==a?(P=D(),P!==a?(We=v,v=Bs(P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function rr(){var v,w,P,X,oe=A*56+27,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=A,w=st(),w!==a?(P=S_(),P!==a?(X=st(),X!==a?(We=v,v=Ua(w,P,X)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function Qt(){var v,w,P,X,oe,ve=A*56+28,gt=me[ve];return gt?(A=gt.nextPos,gt.result):(v=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=v,v=Us(P,X)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[ve]={nextPos:A,result:v},v)}function qt(){var v,w,P,X,oe=A*56+29,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=A,i.charCodeAt(A)===91?(w=N,A++):(w=a,Oe===0&&h(Ur)),w!==a?(P=Xt(),P!==a?(i.charCodeAt(A)===93?(X=S,A++):(X=a,Oe===0&&h(Be)),X!==a?(We=v,v=Fa(P)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function pn(){var v,w=A*56+30,P=me[w];return P?(A=P.nextPos,P.result):(v=D(),v===a&&(v=y()),me[w]={nextPos:A,result:v},v)}function Hs(){var v,w,P,X=A*56+31,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=A,w=[],P=hl(),P===a&&(P=pn()),P!==a)for(;P!==a;)w.push(P),P=hl(),P===a&&(P=pn());else w=a;return w!==a&&(We=v,w=Fs(w)),v=w,me[X]={nextPos:A,result:v},v}function hl(){var v,w,P,X,oe=A*56+32,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=A,i.charCodeAt(A)===40?A++:Oe===0&&h(ht),w=pn(),w!==a?(P=S_(),P!==a?(X=Hs(),X!==a?(i.charCodeAt(A)===41?A++:Oe===0&&h(Zt),We=v,v=Ys()):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function Ws(){var v,w,P,X,oe=A*56+33,ve=me[oe];if(ve)return A=ve.nextPos,ve.result;if(v=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=v,v=un(P)):(A=v,v=a)):(A=v,v=a)}else A=v,v=a;return me[oe]={nextPos:A,result:v},v}function __(){var v,w,P,X,oe=A*56+34,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=A,i.charCodeAt(A)===123?(w=k,A++):(w=a,Oe===0&&h(Fn)),w!==a?(P=D(),P===a&&(P=cu()),P!==a?(i.charCodeAt(A)===125?(X=x,A++):(X=a,Oe===0&&h(dt)),X!==a?(We=v,v=bt(P)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function S_(){var v,w=A*56+35,P=me[w];return P?(A=P.nextPos,P.result):(i.charCodeAt(A)===43?(v=M,A++):(v=a,Oe===0&&h(zr)),v===a&&(i.charCodeAt(A)===45?(v=u,A++):(v=a,Oe===0&&h(hr)),v===a&&(i.charCodeAt(A)===42?(v=G,A++):(v=a,Oe===0&&h(Ir)),v===a&&(i.charCodeAt(A)===47?(v=$,A++):(v=a,Oe===0&&h(Vr)),v===a&&(i.charCodeAt(A)===37?(v=te,A++):(v=a,Oe===0&&h(Ii)),v===a&&(i.charCodeAt(A)===94?(v=ne,A++):(v=a,Oe===0&&h(Rr)),v===a&&(i.charCodeAt(A)===124?(v=_,A++):(v=a,Oe===0&&h(W)),v===a&&(i.charCodeAt(A)===38?(v=re,A++):(v=a,Oe===0&&h(Wt)),v===a&&(i.substr(A,2)===ee?(v=ee,A+=2):(v=a,Oe===0&&h(yn)),v===a&&(i.substr(A,2)===B?(v=B,A+=2):(v=a,Oe===0&&h(Ji))))))))))),me[w]={nextPos:A,result:v},v)}function Xs(){var v,w,P=A*56+36,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=cR(),w===a&&(w=hR(),w===a&&(w=pR(),w===a&&(w=fR(),w===a&&(w=U(),w===a&&(w=dR(),w===a&&(w=fl(),w===a&&(w=sR(),w===a&&(w=F(),w===a&&(w=oR(),w===a&&(w=st(),w===a&&(w=Ws(),w===a&&(w=aR())))))))))))),w!==a&&(We=v,w=$s(w)),v=w,me[P]={nextPos:A,result:v},v)}function aR(){var v,w,P=A*56+37,X=me[P];return X?(A=X.nextPos,X.result):(v=A,i.charCodeAt(A)===124?(w=_,A++):(w=a,Oe===0&&h(W)),w!==a&&(We=v,w=Ri()),v=w,me[P]={nextPos:A,result:v},v)}function ou(){var v,w,P,X,oe=A*56+38,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=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=I,A++):(X=a,Oe===0&&h(ye)),X!==a?(We=v,v=Gs(P)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function sR(){var v,w,P=A*56+39,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=lu(),w!==a&&(We=v,w=pi(w)),v=w,me[P]={nextPos:A,result:v},v)}function lu(){var v,w,P,X=A*56+40,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=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=v,w=Qs()),v=w,me[X]={nextPos:A,result:v},v}function O_(){var v,w,P=A*56+41,X=me[P];return X?(A=X.nextPos,X.result):(v=A,i.charCodeAt(A)===63?(w=j,A++):(w=a,Oe===0&&h(ea)),w!==a&&(We=v,w=Ni()),v=w,me[P]={nextPos:A,result:v},v)}function cu(){var v,w,P,X,oe,ve,gt=A*56+42,hn=me[gt];return hn?(A=hn.nextPos,hn.result):(v=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(vr)),X!==a?(oe=D(),oe!==a?(i.charCodeAt(A)===41?(ve=f,A++):(ve=a,Oe===0&&h(Zt)),ve!==a?(We=v,v=Ya(P,oe)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[gt]={nextPos:A,result:v},v)}function E_(){var v,w,P,X,oe=A*56+43,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=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=v,v=$a(w,X)):(A=v,v=a)):(A=v,v=a)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function oR(){var v,w,P=A*56+44,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=Ue(),w!==a&&(We=v,w=qs(w)),v=w,me[P]={nextPos:A,result:v},v)}function lR(){var v,w,P,X=A*56+45,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,w=Ue(),w!==a?(i.charCodeAt(A)===94?(P=ne,A++):(P=a,Oe===0&&h(Rr)),P!==a?(We=v,v=wi(w)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function cR(){var v,w,P,X,oe,ve=A*56+46,gt=me[ve];return gt?(A=gt.nextPos,gt.result):(v=A,w=lR(),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=v,v=Ga(w)):(A=v,v=a)):(A=v,v=a),me[ve]={nextPos:A,result:v},v)}function fl(){var v,w,P,X,oe,ve=A*56+47,gt=me[ve];return gt?(A=gt.nextPos,gt.result):(v=A,w=lu(),w===a&&(w=null),P=Ue(),P===a&&(P=null),X=uR(),X===a&&(X=null),oe=y(),oe===a&&(oe=O_(),oe===a&&(oe=cu(),oe===a&&(oe=__()))),oe!==a?(We=v,v=Di(w,P,X,oe)):(A=v,v=a),me[ve]={nextPos:A,result:v},v)}function uR(){var v,w,P,X=A*56+48,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=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=v,w=xi(w)),v=w,me[X]={nextPos:A,result:v},v}function dR(){var v,w,P,X,oe=A*56+49,ve=me[oe];if(ve)return A=ve.nextPos,ve.result;if(v=A,w=fl(),w!==a){if(P=[],X=fl(),X!==a)for(;X!==a;)P.push(X),X=fl();else P=a;P!==a?(X=uu(),X===a&&(X=null),We=v,v=Qa(w,P,X)):(A=v,v=a)}else A=v,v=a;return me[oe]={nextPos:A,result:v},v}function b_(){var v,w,P,X=A*56+50,oe=me[X];if(oe)return A=oe.nextPos,oe.result;if(v=A,w=[],Rt.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(di)),P!==a)for(;P!==a;)w.push(P),Rt.test(i.charAt(A))?(P=i.charAt(A),A++):(P=a,Oe===0&&h(di));else w=a;return w!==a&&(We=v,w=ra()),v=w,me[X]={nextPos:A,result:v},v}function uu(){var v,w,P,X=A*56+51,oe=me[X];return oe?(A=oe.nextPos,oe.result):(v=A,i.charCodeAt(A)===37?(w=te,A++):(w=a,Oe===0&&h(Ii)),w!==a?(P=D(),P!==a?(We=v,v=hi(P)):(A=v,v=a)):(A=v,v=a),me[X]={nextPos:A,result:v},v)}function v_(){var v,w,P=A*56+52,X=me[P];return X?(A=X.nextPos,X.result):(v=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=v,v=fr()):(A=v,v=a),me[P]={nextPos:A,result:v},v)}function pR(){var v,w,P,X,oe,ve,gt=A*56+53,hn=me[gt];return hn?(A=hn.nextPos,hn.result):(v=A,w=lu(),w===a&&(w=null),P=Ue(),P===a&&(P=null),X=v_(),X!==a?(i.charCodeAt(A)===94?A++:Oe===0&&h(Rr),oe=b_(),oe!==a?(ve=uu(),ve===a&&(ve=null),We=v,v=qa(w,P,X,oe,ve)):(A=v,v=a)):(A=v,v=a),me[gt]={nextPos:A,result:v},v)}function hR(){var v,w,P,X,oe=A*56+54,ve=me[oe];return ve?(A=ve.nextPos,ve.result):(v=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=Re,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(Nr)))))))),w!==a?(i.charCodeAt(A)===94?A++:Oe===0&&h(Rr),P=b_(),P===a&&(P=null),X=uu(),X===a&&(X=null),We=v,v=Xr(w,P,X)):(A=v,v=a),me[oe]={nextPos:A,result:v},v)}function fR(){var v,w,P=A*56+55,X=me[P];return X?(A=X.nextPos,X.result):(v=A,w=v_(),w!==a&&(We=v,w=na(w)),v=w,me[P]={nextPos:A,result:v},v)}var T_=s.nodeOptions||{};function Ut(v,w,P=void 0){w.text=P||Yr(),w.location=ul();for(var X in T_)(w[X]===void 0||w[X]===null)&&(w[X]=T_[X]);return new v(w)}if(ia=c(),ia!==a&&A===i.length)return ia;throw ia!==a&&A e.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=NI(r)),r}totalDuration(){return this.evaluated.reduce((t,r)=>t+r.collect("duration"),0)}lead(){let e=this.evaluated.findIndex(t=>t instanceof Ra);if(e>=0){for(let t=e+1;t<=this.evaluated.length;t++)if(this.evaluated[t]instanceof Ra){const r=this.evaluated[e],i=this.evaluated[t],s=b3(r.notes(),i.notes()),a=ei(i);a.voiceLeadFromNotes(s,this.options.nodeOptions),this.evaluated[t]=a,e=t}}return this}}const NI=(n,e=void 0)=>n.map(r=>{if(r instanceof vI){const i=r.evaluated.length,s=(e||r.duration)/i;return NI(r.evaluated,s)}else return r.duration=e||r.duration,r}).flat(1/0),C3=n=>{let e={};return WP.forEach(t=>{if(n[t]!==void 0){const r=n[t];e[t]=r,delete n[t]}}),e};class y3{constructor(e,t){b(this,"api");b(this,"settings");b(this,"midiAccess",null);b(this,"midiOutputs",[]);b(this,"currentOutputIndex",0);b(this,"scheduledNotes",{});b(this,"midiInputs",[]);b(this,"currentInputIndex");b(this,"bufferLength",512);b(this,"noteInputBuffer",[]);b(this,"ccInputBuffer",[]);b(this,"activeNotes",[]);b(this,"stickyNotes",[]);b(this,"lastNote");b(this,"lastCC",{});b(this,"lastNoteInChannel",{});b(this,"lastCCInChannel",{});b(this,"midiClockInputIndex");b(this,"midiClockInput");b(this,"lastTimestamp",0);b(this,"midiClockDelta",0);b(this,"lastBPM");b(this,"roundedBPM",0);b(this,"clockBuffer",[]);b(this,"clockBufferLength",24);b(this,"clockTicks",0);b(this,"clockErrorCount",0);b(this,"skipOnError",0);this.api=e,this.settings=t,this.lastBPM=e.bpm(),this.roundedBPM=this.lastBPM,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),this.midiInputs=Array.from(this.midiAccess.inputs.values()),this.midiInputs.length===0?console.warn("No MIDI inputs available."):this.updateInputSelects()}catch(e){console.error("Failed to initialize MIDI:",e)}}getCurrentMidiPort(){return this.midiOutputs.length>0&&this.currentOutputIndex>=0&&this.currentOutputIndex 0&&this.currentOutputIndex>=0&&this.currentOutputIndex 0){const e=document.getElementById("midi-clock-input"),t=document.getElementById("default-midi-input");e.innerHTML="",t.innerHTML="";const r=document.createElement("option");r.value="-1",r.text="Internal",e.appendChild(r);const i=document.createElement("option");if(i.value="-1",i.text="None",t.appendChild(i),this.midiInputs.forEach((s,a)=>{const o=document.createElement("option");o.value=a.toString(),o.text=s.name||a.toString(),e.appendChild(o),t.appendChild(o.cloneNode(!0))}),this.settings.midi_clock_input){const s=this.getMidiInputIndex(this.settings.midi_clock_input);e.value=s.toString(),s>0&&(this.midiClockInput=this.midiInputs[s],this.registerMidiInputListener(s))}else e.value="-1";if(this.settings.default_midi_input){const s=this.getMidiInputIndex(this.settings.default_midi_input);t.value=s.toString(),s>0&&(this.currentInputIndex=s,this.registerMidiInputListener(s))}else t.value="-1";e.addEventListener("change",s=>{const a=s.target.value;if(a==="-1")this.midiClockInput&&this.midiClockInputIndex!=this.currentInputIndex&&(this.midiClockInput.onmidimessage=null),this.midiClockInput=void 0,this.settings.midi_clock_input=void 0;else{const o=parseInt(a);this.midiClockInputIndex=o,this.midiClockInput&&this.midiClockInputIndex!=this.currentInputIndex&&(this.midiClockInput.onmidimessage=null),this.midiClockInput=this.midiInputs[o],this.registerMidiInputListener(o),this.settings.midi_clock_input=this.midiClockInput.name||void 0}}),t.addEventListener("change",s=>{const a=s.target.value;a==="-1"?(this.currentInputIndex&&this.currentInputIndex!=this.midiClockInputIndex&&this.unregisterMidiInputListener(this.currentInputIndex),this.currentInputIndex=void 0,this.settings.default_midi_input=void 0):(this.currentInputIndex&&this.currentInputIndex!=this.midiClockInputIndex&&this.unregisterMidiInputListener(this.currentInputIndex),this.currentInputIndex=parseInt(a),this.registerMidiInputListener(this.currentInputIndex),this.settings.default_midi_input=this.midiInputs[this.currentInputIndex].name||void 0)})}}registerMidiInputListener(e){if(e!==void 0){const t=this.midiInputs[e];t&&!t.onmidimessage&&(t.onmidimessage=r=>{const i=r;if(t.name===this.settings.midi_clock_input&&(i.data[0]===248?this.skipOnError>0?this.skipOnError-=1:this.onMidiClock(r.timeStamp):i.data[0]===250?(console.log("MIDI start received"),this.api.stop(),this.api.play()):i.data[0]===252?(console.log("MIDI stop received"),this.api.pause()):i.data[0]===251?(console.log("MIDI continue received"),this.api.play()):i.data[0]===254&&console.log("MIDI active sensing received")),t.name===this.settings.default_midi_input){if(i.data[0]>=144&&i.data[0]<=159){const s=i.data[0]-144+1,a=i.data[1],o=i.data[2];this.lastNote={note:a,velocity:o,channel:s,timestamp:r.timeStamp},this.lastNoteInChannel[s]={note:a,velocity:o,channel:s,timestamp:r.timeStamp},this.settings.midi_channels_scripts&&this.api.script(s),this.pushToMidiInputBuffer({note:a,velocity:o,channel:s,timestamp:r.timeStamp}),this.activeNotes.push({note:a,velocity:o,channel:s,timestamp:r.timeStamp}),this.removeFromStickyNotes(a,s)||this.stickyNotes.push({note:a,velocity:o,channel:s,timestamp:r.timeStamp})}if(i.data[0]>=128&&i.data[0]<=143){const s=i.data[0]-128+1,a=i.data[1];this.removeFromActiveNotes(a,s)}if(i.data[0]>=176&&i.data[0]<=191){const s=i.data[0]-176+1,a=i.data[1],o=i.data[2];this.lastCC[a]=o,this.lastCCInChannel[s]?this.lastCCInChannel[s][a]=o:(this.lastCCInChannel[s]={},this.lastCCInChannel[s][a]=o),this.pushToMidiCCBuffer({control:a,value:o,channel:s,timestamp:r.timeStamp})}}})}}removeFromActiveNotes(e,t){const r=this.activeNotes.findIndex(i=>i.note===e&&i.channel===t);r>=0&&this.activeNotes.splice(r,1)}removeFromStickyNotes(e,t){const r=this.stickyNotes.findIndex(i=>i.note===e&&i.channel===t);return r>=0?(this.stickyNotes.splice(r,1),!0):!1}stickyNotesFromChannel(e){return this.stickyNotes.filter(t=>t.channel===e)}activeNotesFromChannel(e){return this.activeNotes.filter(t=>t.channel===e)}killActiveNotes(){this.activeNotes=[]}killActiveNotesFromChannel(e){this.activeNotes=this.activeNotes.filter(t=>t.channel!==e)}pushToMidiInputBuffer(e){this.noteInputBuffer.push(e),this.noteInputBuffer.length>this.bufferLength&&this.noteInputBuffer.shift()}pushToMidiCCBuffer(e){this.ccInputBuffer.push(e),this.ccInputBuffer.length>this.bufferLength&&this.ccInputBuffer.shift()}findNoteFromBufferInChannel(e){const t=this.noteInputBuffer.findIndex(r=>r.channel===e);if(t>=0){const r=this.noteInputBuffer[t];return this.noteInputBuffer.splice(t,1),r}else return}findCCFromBufferInChannel(e){const t=this.ccInputBuffer.findIndex(r=>r.channel===e);if(t>=0){const r=this.ccInputBuffer[t];return this.ccInputBuffer.splice(t,1),r}else return}unregisterMidiInputListener(e){if(e!==void 0){const t=this.midiInputs[e];t&&(t.onmidimessage=null)}}onMidiClock(e){if(this.clockTicks+=1,this.lastTimestamp>0)if(this.lastTimestamp===e)this.clockErrorCount+=1;else if(this.clockErrorCount>0)console.log("Timestamp error count: ",this.clockErrorCount),console.log("Current timestamp: ",e),console.log("Last timestamp: ",this.lastTimestamp),console.log("Last delta: ",this.midiClockDelta),console.log("Current delta: ",e-this.lastTimestamp),console.log("BPMs",this.clockBuffer),this.clockErrorCount=0,this.skipOnError=this.settings.midi_clock_ppqn/4,e=0;else{this.midiClockDelta=e-this.lastTimestamp,this.lastBPM=60*(1e3/this.midiClockDelta/this.settings.midi_clock_ppqn),this.clockBuffer.push(this.lastBPM),this.clockBuffer.length>this.clockBufferLength&&this.clockBuffer.shift();const t=this.estimatedBPM();t!==this.roundedBPM&&(console.log("Esimated BPM: ",t),this.api.bpm(t),this.roundedBPM=t)}this.lastTimestamp=e}estimatedBPM(){const e=this.clockBuffer.reduce((t,r)=>t+r);return Math.round(e/this.clockBuffer.length)}sendMidiClock(){if(!this.midiClockInput){const e=this.midiOutputs[this.currentOutputIndex];e&&e.send([248])}}switchMidiOutput(e){const t=this.getMidiOutputIndex(e);return t!==-1?(this.currentOutputIndex=t,!0):!1}getMidiOutputIndex(e){if(typeof e=="number")return e<0||e>=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)}}getMidiInputIndex(e){if(typeof e=="number")return e<0||e>=this.midiInputs.length?(console.error(`Invalid MIDI input index. Index must be in the range 0-${this.midiInputs.length-1}.`),-1):e;{const t=this.midiInputs.findIndex(r=>r.name===e);return t!==-1?t:(console.error(`MIDI input "${e}" not found.`),-1)}}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 A3{constructor(e,t,r){b(this,"min");b(this,"max");b(this,"wrap");b(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.position this.max&&(this.position=this.max)}getPosition(){return this.position}toggleWrap(e){this.wrap=e}}class i_{constructor(e){b(this,"seedValue");b(this,"randomGen",Math.random);b(this,"app");b(this,"values",{});b(this,"odds",(e,t)=>this.randomGen() this);b(this,"almostNever",e=>this.odds(.025,e));b(this,"rarely",e=>this.odds(.1,e));b(this,"scarcely",e=>this.odds(.25,e));b(this,"sometimes",e=>this.odds(.5,e));b(this,"often",e=>this.odds(.75,e));b(this,"frequently",e=>this.odds(.9,e));b(this,"almostAlways",e=>this.odds(.985,e));b(this,"always",e=>this.modify(e));b(this,"modify",e=>e(this));b(this,"seed",e=>(this.seedValue=e.toString(),this.randomGen=this.app.api.localSeededRandom(this.seedValue),this));b(this,"clear",()=>(this.app.api.clearLocalSeed(this.seedValue),this));b(this,"apply",e=>this.modify(e));b(this,"length",e=>(this.values.length=e,this));this.app=e,this.app.api.currentSeed&&(this.randomGen=this.app.api.randomGen)}}class wI extends i_{constructor(t){super(t);b(this,"octave",t=>(this.values.octave=t,this.update(),this));b(this,"key",t=>(this.values.key=t,this.update(),this));b(this,"scale",t=>(e_(t)?(this.values.scaleName=t,this.values.parsedScale=vi(t)):this.values.parsedScale=t_(t),this.update(),this));b(this,"freq",t=>{this.values.freq=t;const r=n3(t);return r%1!==0?(this.values.note=Math.floor(r),this.values.bend=TI(r)[1]):this.values.note=r,this});b(this,"update",()=>{})}}let Dr=[],I3=(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=!Dr.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},R3=(n={})=>{let e=I3(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 N3=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]:[]},w3={c:0,d:2,e:4,f:5,g:7,a:9,b:11},D3={"#":1,b:-1,s:1,f:-1},nu=(n,e=3)=>{const[t,r,i=e]=N3(n);if(!t)throw new Error('not a note: "'+n+'"');const s=w3[t.toLowerCase()],a=(r==null?void 0:r.split("").reduce((o,l)=>o+D3[l],0))||0;return(Number(i)+1)*12+s+a},DI=n=>Math.pow(2,(n-69)/12)*440,Qm=(n,e,t)=>Math.min(Math.max(n,e),t),x3=n=>12*Math.log(n/440)/Math.LN2+69,k3=(n,e)=>{if(typeof n!="object")throw new Error("valueToMidi: expected object value");let{freq:t,note:r}=n;if(typeof t=="number")return x3(t);if(typeof r=="string")return nu(r);if(typeof r=="number")return r;if(!e)throw new Error("valueToMidi: expected freq or note to be set");return e},L3="data:application/javascript;base64,Ly8gTElDRU5TRSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2My4wIHNlZSBodHRwczovL2dpdGh1Yi5jb20vZGt0cjAvV2ViRGlydC9ibG9iL21haW4vTElDRU5TRQovLyBhbGwgdGhlIGNyZWRpdCBnb2VzIHRvIGRrdHIwJ3Mgd2ViZGlydDogaHR0cHM6Ly9naXRodWIuY29tL2RrdHIwL1dlYkRpcnQvYmxvYi81Y2UzZDY5ODM2MmM1NGQ2ZTFiNjhhY2M0N2ViMjk1NWFjNjJjNzkzL2Rpc3QvQXVkaW9Xb3JrbGV0cy5qcwovLyA8MwoKY2xhc3MgQ29hcnNlUHJvY2Vzc29yIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBzdGF0aWMgZ2V0IHBhcmFtZXRlckRlc2NyaXB0b3JzKCkgewogICAgcmV0dXJuIFt7IG5hbWU6ICdjb2Fyc2UnLCBkZWZhdWx0VmFsdWU6IDEgfV07CiAgfQoKICBjb25zdHJ1Y3RvcigpIHsKICAgIHN1cGVyKCk7CiAgICB0aGlzLm5vdFN0YXJ0ZWQgPSB0cnVlOwogIH0KCiAgcHJvY2VzcyhpbnB1dHMsIG91dHB1dHMsIHBhcmFtZXRlcnMpIHsKICAgIGNvbnN0IGlucHV0ID0gaW5wdXRzWzBdOwogICAgY29uc3Qgb3V0cHV0ID0gb3V0cHV0c1swXTsKICAgIGNvbnN0IGNvYXJzZSA9IHBhcmFtZXRlcnMuY29hcnNlOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBvdXRwdXRbMF1bMF0gPSBpbnB1dFswXVswXTsKICAgICAgZm9yIChsZXQgbiA9IDE7IG4gPCBibG9ja1NpemU7IG4rKykgewogICAgICAgIGZvciAobGV0IG8gPSAwOyBvIDwgb3V0cHV0Lmxlbmd0aDsgbysrKSB7CiAgICAgICAgICBvdXRwdXRbb11bbl0gPSBuICUgY29hcnNlID09IDAgPyBpbnB1dFswXVtuXSA6IG91dHB1dFtvXVtuIC0gMV07CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ2NvYXJzZS1wcm9jZXNzb3InLCBDb2Fyc2VQcm9jZXNzb3IpOwoKY2xhc3MgQ3J1c2hQcm9jZXNzb3IgZXh0ZW5kcyBBdWRpb1dvcmtsZXRQcm9jZXNzb3IgewogIHN0YXRpYyBnZXQgcGFyYW1ldGVyRGVzY3JpcHRvcnMoKSB7CiAgICByZXR1cm4gW3sgbmFtZTogJ2NydXNoJywgZGVmYXVsdFZhbHVlOiAwIH1dOwogIH0KCiAgY29uc3RydWN0b3IoKSB7CiAgICBzdXBlcigpOwogICAgdGhpcy5ub3RTdGFydGVkID0gdHJ1ZTsKICB9CgogIHByb2Nlc3MoaW5wdXRzLCBvdXRwdXRzLCBwYXJhbWV0ZXJzKSB7CiAgICBjb25zdCBpbnB1dCA9IGlucHV0c1swXTsKICAgIGNvbnN0IG91dHB1dCA9IG91dHB1dHNbMF07CiAgICBjb25zdCBjcnVzaCA9IHBhcmFtZXRlcnMuY3J1c2g7CiAgICBjb25zdCBibG9ja1NpemUgPSAxMjg7CiAgICBjb25zdCBoYXNJbnB1dCA9ICEoaW5wdXRbMF0gPT09IHVuZGVmaW5lZCk7CiAgICBpZiAoaGFzSW5wdXQpIHsKICAgICAgdGhpcy5ub3RTdGFydGVkID0gZmFsc2U7CiAgICAgIGlmIChjcnVzaC5sZW5ndGggPT09IDEpIHsKICAgICAgICBjb25zdCB4ID0gTWF0aC5wb3coMiwgY3J1c2hbMF0gLSAxKTsKICAgICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgICBjb25zdCB2YWx1ZSA9IE1hdGgucm91bmQoaW5wdXRbMF1bbl0gKiB4KSAvIHg7CiAgICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgICBvdXRwdXRbb11bbl0gPSB2YWx1ZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm9yIChsZXQgbiA9IDA7IG4gPCBibG9ja1NpemU7IG4rKykgewogICAgICAgICAgbGV0IHggPSBNYXRoLnBvdygyLCBjcnVzaFtuXSAtIDEpOwogICAgICAgICAgY29uc3QgdmFsdWUgPSBNYXRoLnJvdW5kKGlucHV0WzBdW25dICogeCkgLyB4OwogICAgICAgICAgZm9yIChsZXQgbyA9IDA7IG8gPCBvdXRwdXQubGVuZ3RoOyBvKyspIHsKICAgICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQpyZWdpc3RlclByb2Nlc3NvcignY3J1c2gtcHJvY2Vzc29yJywgQ3J1c2hQcm9jZXNzb3IpOwoKY2xhc3MgU2hhcGVQcm9jZXNzb3IgZXh0ZW5kcyBBdWRpb1dvcmtsZXRQcm9jZXNzb3IgewogIHN0YXRpYyBnZXQgcGFyYW1ldGVyRGVzY3JpcHRvcnMoKSB7CiAgICByZXR1cm4gW3sgbmFtZTogJ3NoYXBlJywgZGVmYXVsdFZhbHVlOiAwIH1dOwogIH0KCiAgY29uc3RydWN0b3IoKSB7CiAgICBzdXBlcigpOwogICAgdGhpcy5ub3RTdGFydGVkID0gdHJ1ZTsKICB9CgogIHByb2Nlc3MoaW5wdXRzLCBvdXRwdXRzLCBwYXJhbWV0ZXJzKSB7CiAgICBjb25zdCBpbnB1dCA9IGlucHV0c1swXTsKICAgIGNvbnN0IG91dHB1dCA9IG91dHB1dHNbMF07CiAgICBjb25zdCBzaGFwZTAgPSBwYXJhbWV0ZXJzLnNoYXBlWzBdOwogICAgY29uc3Qgc2hhcGUxID0gc2hhcGUwIDwgMSA/IHNoYXBlMCA6IDEuMCAtIDRlLTEwOwogICAgY29uc3Qgc2hhcGUgPSAoMi4wICogc2hhcGUxKSAvICgxLjAgLSBzaGFwZTEpOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgY29uc3QgdmFsdWUgPSAoKDEgKyBzaGFwZSkgKiBpbnB1dFswXVtuXSkgLyAoMSArIHNoYXBlICogTWF0aC5hYnMoaW5wdXRbMF1bbl0pKTsKICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ3NoYXBlLXByb2Nlc3NvcicsIFNoYXBlUHJvY2Vzc29yKTsK";function Pc(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)}}},M3=(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)}}},P3=(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 Zu(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=Qm(2**-_*t,0,2e4),I=Qm(2**(l-_)*t,0,2e4);return P3(m.frequency,i,s,a,o,T,I,c,u),m}return m}let B3=n=>console.log(n);const ys=(...n)=>B3(...n),a_=R3();function s_(n,e,t={}){a_.setKey(n,{onTrigger:e,data:t})}function SE(n){return a_.get()[n]}let Ku;const Jt=()=>(Ku||(Ku=new AudioContext),Ku);let Ul;const o_=()=>{const n=Jt();return Ul||(Ul=n.createGain(),Ul.connect(n.destination)),Ul};let ju;function U3(){return ju||(ju=Jt().audioWorklet.addModule(L3),ju)}function Ju(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 F3(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 U3().catch(t=>{console.warn("could not load AudioWorklet effects coarse, crush and shape",t)}))}async function Y3(n){return new Promise(e=>{document.addEventListener("click",async function t(){await F3(n),e(),document.removeEventListener("click",t)})})}let oa={};function $3(n,e,t,r){var i;if(t=Qm(t,0,.98),!oa[n]){const s=Jt().createFeedbackDelay(1,e,t);(i=s.start)==null||i.call(s,r),s.connect(o_()),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 G3(n,e=2){if(!la[n]){const t=Jt().createReverb(e);t.connect(o_()),la[n]=t}return la[n].duration!==e&&(la[n]=la[n].setDuration(e),la[n].duration=e),la[n]}let ca;function Q3(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 ed(n,e,t){const r=Pc(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:I=1,lprelease:R=.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:Re=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(Pc(l)),p!==void 0){let at=()=>Zu(r,"lowpass",p,L,_,T,I,R,m,i,i+t,u);ze.push(at()),c==="24db"&&ze.push(at())}if(K!==void 0){let at=()=>Zu(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=()=>Zu(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(Ju(r,"coarse-processor",{coarse:B})),Q!==void 0&&ze.push(Ju(r,"crush-processor",{crush:Q})),j!==void 0&&ze.push(Ju(r,"shape-processor",{shape:j})),Z!==void 0){const at=r.createStereoPanner();at.pan.value=2*Z-1,ze.push(at)}const St=Pc(1);ze.push(St),St.connect(o_());let mt;if(le>0&&De>0&&Ee>0){const at=$3(xe,De,Ee,i);mt=ed(St,at,le)}let At;if(be>0&&Re>0){const at=G3(xe,Re);At=ed(St,at,be)}let Rt;if(ke){const at=Q3(2**(Ze+5));Rt=ed(St,at,ke)}ze.slice(1).reduce((at,$e)=>at.connect($e),ze[0]),Le=ze.concat([mt,At,Rt])},td={};function q3(n,e){var t=e?1e3:1024;if(n =t);return n.toFixed(1)+" "+r[i]}const V3=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=k3({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=R=>nu(R)-l,I=Object.keys(s).filter(R=>!R.startsWith("_")).reduce((R,L,$)=>!R||Math.abs(T(L)) {const i=t?`sound "${t}:${r}"`:"sample";if(!td[n]){ys(`[sampler] load ${i}..`,"load-sample",{url:n});const s=Date.now();td[n]=fetch(n).then(a=>a.arrayBuffer()).then(async a=>{const o=Date.now()-s,l=q3(a.byteLength);return ys(`[sampler] load ${i}... done! loaded ${l} in ${o}ms`,"loaded-sample",{url:n}),await e.decodeAudioData(a)})}return td[n]};function H3(n){const e=Jt(),t=e.createBuffer(n.numberOfChannels,n.length,e.sampleRate);for(let r=0;r Object.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 X3={};function Z3(n){const e=Object.entries(X3).find(([t])=>n.startsWith(t));if(e)return e[1]}const pa=async(n,e=n._base||"",t={})=>{if(typeof n=="string"){const s=Z3(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;W3(n,(s,a)=>s_(s,(o,l,c)=>K3(o,l,c,a),{type:"sample",samples:a,baseUrl:e,prebake:r,tag:i}),e)},EE=[];async function K3(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:I=0,begin:R=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 V3(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=R*x.buffer.duration;u&&(x.loop=!0,x.loopStart=I*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+($-R)*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 j3=(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)}},J3=(n,e,t,r="sine")=>{const i=n.frequency.value*e,s=i*t;return j3(i,s,r)};function eB(){["sine","square","triangle","sawtooth"].forEach(n=>{s_(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:I,fmwave:R="sine",vib:L=0,vibmod:$=.5}=t,{n:K,note:f,freq:E}=t;f=f||36,typeof f=="string"&&(f=nu(f)),!E&&typeof f=="number"&&(E=DI(f));const{node:S,stop:N}=rB({t:e,s:n,freq:E,vib:L,vibmod:$,partials:K});let k,x;if(c){const{node:ne,stop:re}=J3(S,l,c,R);[p,m,_,T,I].find(ee=>ee!==void 0)?(p=p??.001,m=m??.001,_=_??1,T=T??.001,I=I??1,x=qm(p,m,_,T,I,e),u==="exp"&&(x=M3(p,m,_,T,I,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=Pc(.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 tB(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 rB({s:n,freq:e,t,vib:r,vibmod:i,partials:s}){let a;!s||n==="sine"?(a=Jt().createOscillator(),a.type=n||"triangle"):a=tB(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 nB(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,I=0,R=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,R*=E,c*=500*f/E**3,T*=f/E,u*=f/E,p*=E,m=m*E|0,j=r+$+i+s+R|0;te 1?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*(te te?0:(te p&&(t+=u,k+=u,ne=0),m&&!(++re%m)&&(t=k,l=N,ne||(ne=1));return x}const iB=(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:I=0,noise:R=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=nu(r)),!i&&typeof r=="number"&&(i=DI(r)),t=t.replace("z_","");const k=["sine","triangle","sawtooth","tan","noise"].indexOf(t)||0;u=t==="square"?0:u;const x=nB(...S||[.25,s,i,a,N,c,k,u,p,m,_,T,I,R,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 aB(){["zzfx","z_sine","z_sawtooth","z_triangle","z_square","z_tan","z_noise"].forEach(n=>{s_(n,(e,t,r)=>{const{node:i}=iB({s:n,...t},e);return i.onended=()=>{i.disconnect(),r()},{node:i,stop:()=>{}}},{type:"synth",prebake:!0})})}class Vm extends wI{constructor(t,r){super(r);b(this,"volume",t=>this.updateValue("volume",t));b(this,"vol",this.volume);b(this,"zrand",t=>this.updateValue("zrand",t));b(this,"curve",t=>this.updateValue("curve",t));b(this,"slide",t=>this.updateValue("slide",t));b(this,"sld",this.slide);b(this,"deltaSlide",t=>this.updateValue("deltaSlide",t));b(this,"dslide",this.deltaSlide);b(this,"pitchJump",t=>this.updateValue("pitchJump",t));b(this,"pj",this.pitchJump);b(this,"pitchJumpTime",t=>this.updateValue("pitchJumpTime",t));b(this,"pjt",this.pitchJumpTime);b(this,"lfo",t=>this.updateValue("lfo",t));b(this,"noise",t=>this.updateValue("noise",t));b(this,"zmod",t=>this.updateValue("zmod",t));b(this,"zcrush",t=>this.updateValue("zcrush",t));b(this,"zdelay",t=>this.updateValue("zdelay",t));b(this,"sustainVolume",t=>this.updateValue("sustainVolume",t));b(this,"tremolo",t=>this.updateValue("tremolo",t));b(this,"dur",t=>this.updateValue("dur",t));b(this,"zzfx",t=>this.updateValue("zzfx",t));b(this,"fmi",t=>this.updateValue("fmi",t));b(this,"fmh",t=>this.updateValue("fmh",t));b(this,"fmenv",t=>this.updateValue("fmenv",t));b(this,"fmattack",t=>this.updateValue("fmattack",t));b(this,"fmatk",this.fmattack);b(this,"fmdecay",t=>this.updateValue("fmdecay",t));b(this,"fmdec",this.fmdecay);b(this,"fmsustain",t=>this.updateValue("fmsustain",t));b(this,"fmsus",this.fmsustain);b(this,"fmrelease",t=>this.updateValue("fmrelease",t));b(this,"fmrel",this.fmrelease);b(this,"fmvelocity",t=>this.updateValue("fmvelocity",t));b(this,"fmvel",this.fmvelocity);b(this,"fmwave",t=>this.updateValue("fmwave",t));b(this,"fmw",this.fmwave);b(this,"ftype",t=>this.updateValue("ftype",t));b(this,"fanchor",t=>this.updateValue("fanchor",t));b(this,"attack",t=>this.updateValue("attack",t));b(this,"atk",this.attack);b(this,"decay",t=>this.updateValue("decay",t));b(this,"dec",this.decay);b(this,"sustain",t=>this.updateValue("sustain",t));b(this,"sus",this.sustain);b(this,"release",t=>this.updateValue("release",t));b(this,"rel",this.release);b(this,"adsr",(t,r,i,s)=>(this.attack(t),this.decay(r),this.sustain(i),this.release(s),this));b(this,"lpenv",t=>this.updateValue("lpenv",t));b(this,"lpe",t=>this.updateValue("lpenv",t));b(this,"lpattack",t=>this.updateValue("lpattack",t));b(this,"lpa",this.lpattack);b(this,"lpdecay",t=>this.updateValue("lpdecay",t));b(this,"lpd",this.lpdecay);b(this,"lpsustain",t=>this.updateValue("lpsustain",t));b(this,"lps",this.lpsustain);b(this,"lprelease",t=>this.updateValue("lprelease",t));b(this,"lpr",this.lprelease);b(this,"cutoff",t=>this.updateValue("cutoff",t));b(this,"lpf",this.cutoff);b(this,"resonance",t=>this.updateValue("resonance",Math.min(Math.max(t,0),50)));b(this,"lpq",this.resonance);b(this,"lpadsr",(t,r,i,s,a)=>(this.lpenv(t),this.lpattack(r),this.lpdecay(i),this.lpsustain(s),this.lprelease(a),this));b(this,"hpenv",t=>this.updateValue("hpenv",t));b(this,"hpe",t=>this.updateValue("hpe",t));b(this,"hpattack",t=>this.updateValue("hpattack",t));b(this,"hpa",this.hpattack);b(this,"hpdecay",t=>this.updateValue("hpdecay",t));b(this,"hpd",this.hpdecay);b(this,"hpsustain",t=>this.updateValue("hpsustain",t));b(this,"hpsus",this.hpsustain);b(this,"hprelease",t=>this.updateValue("hprelease",t));b(this,"hpr",this.hprelease);b(this,"hcutoff",t=>this.updateValue("hcutoff",t));b(this,"hpf",this.hcutoff);b(this,"hresonance",t=>this.updateValue("hresonance",t));b(this,"hpq",this.hresonance);b(this,"hpadsr",(t,r,i,s,a)=>(this.hpenv(t),this.hpattack(r),this.hpdecay(i),this.hpsustain(s),this.hprelease(a),this));b(this,"bpenv",t=>this.updateValue("bpenv",t));b(this,"bpe",t=>this.updateValue("bpe",t));b(this,"bpattack",t=>this.updateValue("bpattack",t));b(this,"bpa",this.bpattack);b(this,"bpdecay",t=>this.updateValue("bpdecay",t));b(this,"bpd",this.bpdecay);b(this,"bpsustain",t=>this.updateValue("bpsustain",t));b(this,"bps",this.bpsustain);b(this,"bprelease",t=>this.updateValue("bprelease",t));b(this,"bpr",this.bprelease);b(this,"bandf",t=>this.updateValue("bandf",t));b(this,"bpf",this.bandf);b(this,"bandq",t=>this.updateValue("bandq",t));b(this,"bpq",this.bandq);b(this,"bpadsr",(t,r,i,s,a)=>(this.bpenv(t),this.bpattack(r),this.bpdecay(i),this.bpsustain(s),this.bprelease(a),this));b(this,"freq",t=>this.updateValue("freq",t));b(this,"f",this.freq);b(this,"vib",t=>this.updateValue("vib",t));b(this,"vibmod",t=>this.updateValue("vibmod",t));b(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});b(this,"loop",t=>this.updateValue("loop",t));b(this,"loopBegin",t=>this.updateValue("loopBegin",t));b(this,"loopEnd",t=>this.updateValue("loopEnd",t));b(this,"begin",t=>this.updateValue("begin",t));b(this,"end",t=>this.updateValue("end",t));b(this,"gain",t=>this.updateValue("gain",t));b(this,"dbgain",t=>this.updateValue("gain",Math.min(Math.pow(10,t/20),10)));b(this,"db",this.dbgain);b(this,"velocity",t=>this.updateValue("velocity",t));b(this,"vel",this.velocity);b(this,"pan",t=>this.updateValue("pan",t));b(this,"sound",t=>this.updateValue("s",t));b(this,"chord",(t,...r)=>(typeof t=="string"?t=f3(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)));b(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});b(this,"snd",this.sound);b(this,"nudge",t=>this.updateValue("nudge",t));b(this,"cut",t=>this.updateValue("cut",t));b(this,"clip",t=>this.updateValue("clip",t));b(this,"n",t=>this.updateValue("n",t));b(this,"note",t=>typeof t=="string"?this.updateValue("note",oi(t)):this.updateValue("note",t));b(this,"speed",t=>this.updateValue("speed",t));b(this,"spd",this.speed);b(this,"coarse",t=>this.updateValue("coarse",t));b(this,"crush",t=>this.updateValue("crush",t));b(this,"shape",t=>this.updateValue("shape",t));b(this,"vowel",t=>this.updateValue("vowel",t));b(this,"vow",this.vowel);b(this,"delay",t=>this.updateValue("delay",t));b(this,"del",this.delay);b(this,"delayfeedback",t=>this.updateValue("delayfeedback",t));b(this,"delayfb",this.delayfeedback);b(this,"delaytime",t=>this.updateValue("delaytime",t));b(this,"delayt",this.delaytime);b(this,"orbit",t=>this.updateValue("orbit",t));b(this,"o",this.orbit);b(this,"room",t=>this.updateValue("room",t));b(this,"rm",this.room);b(this,"size",t=>this.updateValue("size",t));b(this,"sz",this.size);b(this,"stretch",t=>(this.updateValue("unit","c"),this.updateValue("speed",1/t),this.updateValue("cut",t),this));b(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this.update(),this)});b(this,"update",()=>{const[t,r]=r_(this.values.key||"C4",this.values.pitch||0,this.values.parsedScale||"MAJOR",this.values.octave||0);this.values.freq=Zn(t)});b(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 zm extends wI{constructor(t,r){super(r);b(this,"midiConnection");b(this,"chord",t=>(this.values.chord=t,this));b(this,"note",t=>(this.values.note=t,this));b(this,"sustain",t=>(this.values.sustain=t,this));b(this,"channel",t=>(this.values.channel=t,this));b(this,"port",t=>(this.values.port=this.midiConnection.getMidiOutputIndex(t),this));b(this,"add",t=>(this.values.note+=t,this));b(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this.update(),this)});b(this,"bend",t=>(this.values.bend=t,this));b(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));b(this,"update",()=>{const[t,r]=r_(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)});b(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,xI=new Set,Hm=typeof process=="object"&&process?process:{},kI=(n,e,t,r)=>{typeof Hm.emitWarning=="function"?Hm.emitWarning(n,e,t,r):console.error(`[${t}] ${e}: ${n}`)};let Bc=globalThis.AbortController,bE=globalThis.AbortSignal;var dT;if(typeof Bc>"u"){bE=class{constructor(){b(this,"onabort");b(this,"_onabort",[]);b(this,"reason");b(this,"aborted",!1)}addEventListener(r,i){this._onabort.push(i)}},Bc=class{constructor(){b(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=((dT=Hm.env)==null?void 0:dT.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,kI("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 sB=n=>!xI.has(n),Pi=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),LI=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?ec:null:null;class ec extends Array{constructor(e){super(e),this.fill(0)}}var cs;const ha=class ha{constructor(e,t){b(this,"heap");b(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=LI(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 Wm=ha;var Nn,Jr,wn,Dn,us,nr,xn,ir,Mt,it,xr,en,Tr,dr,kn,pr,gi,_i,Ln,Mn,Gi,kr,Zo,Zm,Oa,Si,Ko,tn,Gc,MI,Ea,ds,jo,qn,Bi,Vn,Ui,Jo,Km,ps,tc,hs,rc,xt,Ft,el,jm,ba,Oo;const g_=class g_{constructor(e){ot(this,Zo);ot(this,Gc);ot(this,qn);ot(this,Vn);ot(this,Jo);ot(this,ps);ot(this,hs);ot(this,xt);ot(this,el);ot(this,ba);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);b(this,"ttl");b(this,"ttlResolution");b(this,"ttlAutopurge");b(this,"updateAgeOnGet");b(this,"updateAgeOnHas");b(this,"allowStale");b(this,"noDisposeOnSet");b(this,"noUpdateTTL");b(this,"maxEntrySize");b(this,"sizeCalculation");b(this,"noDeleteOnFetchRejection");b(this,"noDeleteOnStaleGet");b(this,"allowStaleOnFetchAbort");b(this,"allowStaleOnFetchRejection");b(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,xr,void 0);ot(this,en,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,kr,void 0);ot(this,Oa,()=>{});ot(this,Si,()=>{});ot(this,Ko,()=>{});ot(this,tn,()=>!1);ot(this,Ea,e=>{});ot(this,ds,(e,t,r)=>{});ot(this,jo,(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:I,fetchMethod:R,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?LI(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=I,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(R!==void 0&&typeof R!="function")throw new TypeError("fetchMethod must be a function if specified");if(Xe(this,us,R),Xe(this,Gi,!!R),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,xr,new S(t)),Xe(this,en,new S(t)),Xe(this,Tr,0),Xe(this,dr,0),Xe(this,kn,Wm.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,kr,!!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,Gc,MI).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,Zo,Zm).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";sB(N)&&(xI.add(N),kI("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",N,g_))}}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,xr),prev:V(e,en),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,rc).call(a,t,r,i,s)},moveToTail:t=>{var r;return Ve(r=e,ba,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,tn).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,tn).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,I,R;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,jo).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,tc).call(this,!1):V(this,nr),V(this,Mt)[p]=e,V(this,it)[p]=t,V(this,ir).set(e,p),V(this,xr)[V(this,dr)]=p,V(this,en)[p]=V(this,dr),Xe(this,dr,p),ml(this,nr)._++,V(this,ds).call(this,p,u,l),l&&(l.set="add"),c=!1;else{Ve(this,ba,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,kr)&&((_=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,kr)&&((I=V(this,pr))==null||I.push([L,e,"set"])));if(V(this,Ea).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,Zo,Zm).call(this),V(this,Ln)&&(c||V(this,Ko).call(this,p,i,s),l&&V(this,Si).call(this,l,p)),!a&&V(this,kr)&&V(this,pr)){const L=V(this,pr);let $;for(;$=L==null?void 0:L.shift();)(R=V(this,Dn))==null||R.call(this,...$)}return this}pop(){var e;try{for(;V(this,nr);){const t=V(this,it)[V(this,Tr)];if(Ve(this,ps,tc).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,kr)&&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,tn).call(this,s))i&&(i.has="stale",V(this,Si).call(this,i,s));else return r&&V(this,Oa).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,tn).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:I,forceRefresh:R=!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,rc).call(this,e,f,K,I);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,tn).call(this,f);if(!R&&!S)return L&&(L.fetch="hit"),Ve(this,ba,Oo).call(this,f),i&&V(this,Oa).call(this,f),L&&V(this,Si).call(this,L,f),E;const N=Ve(this,hs,rc).call(this,e,f,K,I),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,tn).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,ba,Oo).call(this,o),i&&V(this,Oa).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,Ea).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,kr))&&(V(this,Mn)&&((r=V(this,wn))==null||r.call(this,l,e,"delete")),V(this,kr)&&((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,en)[o]):o===V(this,Tr)?Xe(this,Tr,V(this,xr)[o]):(V(this,xr)[V(this,en)[o]]=V(this,xr)[o],V(this,en)[V(this,xr)[o]]=V(this,en)[o]),ml(this,nr)._--,V(this,kn).push(o)}}if(V(this,kr)&&((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,kr)&&((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,kr)&&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,xr=new WeakMap,en=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,kr=new WeakMap,Zo=new WeakSet,Zm=function(){const e=new ec(V(this,Nn)),t=new ec(V(this,Nn));Xe(this,Ln,e),Xe(this,_i,t),Xe(this,Ko,(s,a,o=lo.now())=>{if(t[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){const l=setTimeout(()=>{V(this,tn).call(this,s)&&this.delete(V(this,Mt)[s])},a+1);l.unref&&l.unref()}}),Xe(this,Oa,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,tn,s=>e[s]!==0&&t[s]!==0&&(r||i())-t[s]>e[s])},Oa=new WeakMap,Si=new WeakMap,Ko=new WeakMap,tn=new WeakMap,Gc=new WeakSet,MI=function(){const e=new ec(V(this,Nn));Xe(this,xn,0),Xe(this,gi,e),Xe(this,Ea,t=>{Xe(this,xn,V(this,xn)-e[t]),e[t]=0}),Xe(this,jo,(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,tc).call(this,!0)}Xe(this,xn,V(this,xn)+e[t]),i&&(i.entrySize=r,i.totalCalculatedSize=V(this,xn))})},Ea=new WeakMap,ds=new WeakMap,jo=new WeakMap,qn=new WeakSet,Bi=function*({allowStale:e=this.allowStale}={}){if(V(this,nr))for(let t=V(this,dr);!(!Ve(this,Jo,Km).call(this,t)||((e||!V(this,tn).call(this,t))&&(yield t),t===V(this,Tr)));)t=V(this,en)[t]},Vn=new WeakSet,Ui=function*({allowStale:e=this.allowStale}={}){if(V(this,nr))for(let t=V(this,Tr);!(!Ve(this,Jo,Km).call(this,t)||((e||!V(this,tn).call(this,t))&&(yield t),t===V(this,dr)));)t=V(this,xr)[t]},Jo=new WeakSet,Km=function(e){return e!==void 0&&V(this,ir).get(V(this,Mt)[e])===e},ps=new WeakSet,tc=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,kr))&&(V(this,Mn)&&((s=V(this,wn))==null||s.call(this,i,r,"evict")),V(this,kr)&&((a=V(this,pr))==null||a.push([i,r,"evict"]))),V(this,Ea).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,xr)[t]),V(this,ir).delete(r),ml(this,nr)._--,t},hs=new WeakSet,rc=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 Bc,{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=(I,R=!1)=>{const{aborted:L}=a.signal,$=r.ignoreFetchAbort&&I!==void 0;if(r.status&&(L&&!R?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,$&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),L&&!$&&!R)return p(a.signal.reason);const K=_;return V(this,it)[t]===_&&(I===void 0?K.__staleWhileFetching?V(this,it)[t]=K.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,I,l.options))),I},u=I=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=I),p(I)),p=I=>{const{aborted:R}=a.signal,L=R&&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 I},m=(I,R)=>{var $;const L=($=V(this,us))==null?void 0:$.call(this,e,s,l);L&&L instanceof Promise&&L.then(K=>I(K===void 0?void 0:K),R),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(I(void 0),r.allowStaleOnFetchAbort&&(I=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 Bc},el=new WeakSet,jm=function(e,t){V(this,en)[t]=e,V(this,xr)[e]=t},ba=new WeakSet,Oo=function(e){e!==V(this,dr)&&(e===V(this,Tr)?Xe(this,Tr,V(this,xr)[e]):Ve(this,el,jm).call(this,V(this,en)[e],V(this,xr)[e]),Ve(this,el,jm).call(this,V(this,dr),e),Xe(this,dr,e))};let Xm=g_;const Ro=class Ro{constructor(){b(this,"_fallbackMethod",()=>Ro.createSkipProxy());b(this,"out",()=>{})}};b(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 Uc=Ro;const No=class No extends i_{constructor(t,r){super(r);b(this,"_fallbackMethod",()=>No.createRestProxy(this.values.length,this.app));b(this,"out",()=>{});this.values.length=t}};b(No,"createRestProxy",(t,r)=>{const i=new No(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 Fc=No;class oB extends i_{constructor(t,r,i){super(i);b(this,"input");b(this,"ziffers");b(this,"initCallTime",0);b(this,"startCallTime",0);b(this,"lastCallTime",0);b(this,"waitTime",0);b(this,"startBeat",0);b(this,"played",!1);b(this,"current");b(this,"retro",!1);b(this,"index",-1);b(this,"zid","");b(this,"options",{});b(this,"skipIndex",0);b(this,"endTime",0);b(this,"next",()=>(this.current=this.ziffers.next(),this.played=!0,this.current));b(this,"pulseToSecond",t=>this.app.clock.convertPulseToSecond(t));b(this,"firstRun",()=>this.notStarted());b(this,"atTheBeginning",()=>this.skipIndex===0&&this.ziffers.index<=0);b(this,"origin",()=>this.app.clock.pulses_since_origin+1);b(this,"pulse",()=>this.app.clock.time_position.pulse);b(this,"beat",()=>this.app.clock.time_position.beat);b(this,"nextBeat",()=>this.app.clock.next_beat_in_ticks);b(this,"nextBeatInTicks",()=>this.app.clock.next_beat_in_ticks);b(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});b(this,"lead",()=>this.voiceleading());b(this,"invert",t=>(this.atTheBeginning()&&this.ziffers.invert(t),this));b(this,"out",()=>{});this.app=i,this.input=t,this.options=r,this.ziffers=new T3(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 Vm(s,this.app).sound(t||"sine")}else if(r instanceof Ra){const s=r.pitches.map(o=>o.getExisting("freq","pitch","key","scale","octave","parsedScale")),a={dur:i};return t&&(a.s=t),new Vm(a,this.app).chord(s)}else if(r instanceof $m)return Fc.createRestProxy(r.duration,this.app)}else return Uc.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 zm(i,this.app);return t?s.note(t):s}else{if(r instanceof $m)return Fc.createRestProxy(r.duration,this.app);if(r instanceof Ra){const s=r.midiChord();return new zm(i,this.app).chord(s)}}}else return Uc.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 lB=n=>n[0]==="{"&&n[n.length-1]==="}",co=(n,e)=>{if(lB(n)){const t=JSON.parse(n);return JSON.stringify({...t,...e})}else return JSON.stringify({...e,text:n})},cB=n=>{String.prototype.speak=function(){const e=JSON.parse(this.valueOf());new PI({...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 rd;class PI{constructor(e){b(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(),rd&&clearTimeout(rd),rd=setTimeout(()=>{r.speak(i)},200)):r.speak(i)}else t("No text provided")}));this.options=e}}async function vE(){return Promise.all([Y3(),pa("github:tidalcycles/Dirt-Samples/master").then(()=>eB()),aB(),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 uB{constructor(e){b(this,"variables",{});b(this,"codeExamples",{});b(this,"counters",{});b(this,"_drunk",new A3(-100,100,!1));b(this,"randomGen",Math.random);b(this,"currentSeed");b(this,"localSeeds",new Map);b(this,"patternCache",new Xm({max:1e3,ttl:1e3*60*5}));b(this,"errorTimeoutID",0);b(this,"printTimeoutID",0);b(this,"MidiConnection");b(this,"load");b(this,"_loadUniverseFromInterface",e=>{this.app.loadUniverse(e),this.app.openBuffersModal()});b(this,"_deleteUniverseFromInterface",e=>{delete this.app.universes[e],this.app.settings.saveApplicationToLocalStorage(this.app.universes,this.app.settings),this.app.updateKnownUniversesView()});b(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()});b(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()});b(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,xP(this.app,e)});b(this,"_all_samples",()=>a_.get());b(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)});b(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)});b(this,"time",()=>this.app.audioContext.currentTime);b(this,"play",()=>{this.app.setButtonHighlighting("play",!0),this.MidiConnection.sendStartMessage(),this.app.clock.start()});b(this,"pause",()=>{this.app.setButtonHighlighting("pause",!0),this.MidiConnection.sendStopMessage(),this.app.clock.pause()});b(this,"stop",()=>{this.app.setButtonHighlighting("stop",!0),this.MidiConnection.sendStopMessage(),this.app.clock.stop()});b(this,"silence",this.stop);b(this,"hush",this.stop);b(this,"warp",e=>{this.app.clock.tick=e,this.app.clock.time_position=this.app.clock.convertTicksToTimeposition(e)});b(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)});b(this,"onmousemove",e=>{this.app._mouseX=e.pageX,this.app._mouseY=e.pageY});b(this,"mouseX",()=>this.app._mouseX);b(this,"mouseY",()=>this.app._mouseY);b(this,"noteX",()=>Math.floor(this.app._mouseX/document.body.clientWidth*127));b(this,"noteY",()=>Math.floor(this.app._mouseY/document.body.clientHeight*127));b(this,"script",(...e)=>{e.forEach(t=>{ls(this.app,this.app.universes[this.app.selected_universe].locals[t])})});b(this,"s",this.script);b(this,"delete_script",e=>{this.app.universes[this.app.selected_universe].locals[e]={candidate:"",committed:"",evaluations:0}});b(this,"cs",this.delete_script);b(this,"copy_script",(e,t)=>{this.app.universes[this.app.selected_universe].locals[t]={...this.app.universes[this.app.selected_universe].locals[e]}});b(this,"cps",this.copy_script);b(this,"copy_universe",(e,t)=>{this.app.universes[t]={...this.app.universes[e]}});b(this,"delete_universe",e=>{this.app.selected_universe===e&&(this.app.selected_universe="Default"),delete this.app.universes[e],this.app.settings.saveApplicationToLocalStorage(this.app.universes,this.app.settings),this.app.updateKnownUniversesView()});b(this,"big_bang",()=>{confirm("Are you sure you want to delete all universes?")&&(this.app.universes={...Ao},this.app.settings.saveApplicationToLocalStorage(this.app.universes,this.app.settings)),this.app.selected_universe="Default",this.app.updateKnownUniversesView()});b(this,"midi_outputs",()=>{this._logMessage(this.MidiConnection.listMidiOutputs())});b(this,"midi_output",e=>{e?this.MidiConnection.switchMidiOutput(e):console.log(this.MidiConnection.getCurrentMidiPort())});b(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 zm(e,this.app)));b(this,"sysex",e=>{this.MidiConnection.sendSysExMessage(e)});b(this,"pitch_bend",(e,t)=>{this.MidiConnection.sendPitchBend(e,t)});b(this,"program_change",(e,t)=>{this.MidiConnection.sendProgramChange(e,t)});b(this,"midi_clock",()=>{this.MidiConnection.sendMidiClock()});b(this,"control_change",({control:e=20,value:t=0,channel:r=0})=>{this.MidiConnection.sendMidiControlChange(e,t,r)});b(this,"midi_panic",()=>{this.MidiConnection.panic()});b(this,"active_note_events",e=>{let t;if(e?t=this.MidiConnection.activeNotesFromChannel(e):t=this.MidiConnection.activeNotes,t.length>0)return t});b(this,"active_notes",e=>{const t=this.active_note_events(e);if(t&&t.length>0)return t.map(r=>r.note)});b(this,"kill_active_notes",()=>{this.MidiConnection.activeNotes=[]});b(this,"sticky_notes",e=>{let t;if(e?t=this.MidiConnection.stickyNotesFromChannel(e):t=this.MidiConnection.stickyNotes,t.length>0)return t.map(r=>r.note)});b(this,"kill_sticky_notes",()=>{this.MidiConnection.stickyNotes=[]});b(this,"buffer",e=>e?this.MidiConnection.findNoteFromBufferInChannel(e)!==void 0:this.MidiConnection.noteInputBuffer.length>0);b(this,"buffer_event",e=>e?this.MidiConnection.findNoteFromBufferInChannel(e):this.MidiConnection.noteInputBuffer.shift());b(this,"buffer_note",e=>{const t=this.buffer_event(e);return t?t.note:void 0});b(this,"last_note_event",e=>e?this.MidiConnection.lastNoteInChannel[e]:this.MidiConnection.lastNote);b(this,"last_note",e=>{const t=this.last_note_event(e);return t?t.note:60});b(this,"last_cc",(e,t)=>t?this.MidiConnection.lastCCInChannel[t]?this.MidiConnection.lastCCInChannel[t][e]:64:this.MidiConnection.lastCC[e]||64);b(this,"has_cc",e=>e?this.MidiConnection.findCCFromBufferInChannel(e)!==void 0:this.MidiConnection.ccInputBuffer.length>0);b(this,"buffer_cc",e=>e?this.MidiConnection.findCCFromBufferInChannel(e):this.MidiConnection.ccInputBuffer.shift());b(this,"generateCacheKey",(...e)=>e.map(t=>JSON.stringify(t)).join(","));b(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 oB(e,t,this.app),this.app.api.patternCache.set(s,a)),typeof r=="number"&&(a.zid=i),a.updateLastCallTime(),r!==""&&a.sync("z0"),a});b(this,"z0",(e,t={})=>this.z(e,t,0));b(this,"z1",(e,t={})=>this.z(e,t,1));b(this,"z2",(e,t={})=>this.z(e,t,2));b(this,"z3",(e,t={})=>this.z(e,t,3));b(this,"z4",(e,t={})=>this.z(e,t,4));b(this,"z5",(e,t={})=>this.z(e,t,5));b(this,"z6",(e,t={})=>this.z(e,t,6));b(this,"z7",(e,t={})=>this.z(e,t,7));b(this,"z8",(e,t={})=>this.z(e,t,8));b(this,"z9",(e,t={})=>this.z(e,t,9));b(this,"z10",(e,t={})=>this.z(e,t,10));b(this,"z11",(e,t={})=>this.z(e,t,11));b(this,"z12",(e,t={})=>this.z(e,t,12));b(this,"z13",(e,t={})=>this.z(e,t,13));b(this,"z14",(e,t={})=>this.z(e,t,14));b(this,"z15",(e,t={})=>this.z(e,t,15));b(this,"z16",(e,t={})=>this.z(e,t,16));b(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));b(this,"$",this.counter);b(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);b(this,"drunk",e=>e!==void 0?(this._drunk.position=e,this._drunk.getPosition()):(this._drunk.step(),this._drunk.getPosition()));b(this,"drunk_max",e=>{this._drunk.max=e});b(this,"drunk_min",e=>{this._drunk.min=e});b(this,"drunk_wrap",e=>{this._drunk.toggleWrap(e)});b(this,"variable",(e,t)=>typeof e=="string"&&t===void 0?this.variables[e]:(this.variables[e]=t,this.variables[e]));b(this,"v",this.variable);b(this,"delete_variable",e=>{delete this.variables[e]});b(this,"dv",this.delete_variable);b(this,"clear_variables",()=>{this.variables={}});b(this,"cv",this.clear_variables);b(this,"randI",(e,t)=>Math.floor(this.randomGen()*(t-e+1))+e);b(this,"rand",(e,t)=>this.randomGen()*(t-e)+e);b(this,"irand",this.randI);b(this,"rI",this.randI);b(this,"r",this.rand);b(this,"ir",this.randI);b(this,"seed",e=>{typeof e=="number"&&(e=e.toString()),this.currentSeed!==e&&(this.currentSeed=e,this.randomGen=Ym(e))});b(this,"localSeededRandom",e=>{if(typeof e=="number"&&(e=e.toString()),this.localSeeds.has(e))return this.localSeeds.get(e);const t=Ym(e);return this.localSeeds.set(e,t),t});b(this,"clearLocalSeed",(e=void 0)=>{e&&this.localSeeds.delete(e.toString()),this.localSeeds.clear()});b(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));b(this,"cmp",this.clamp);b(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));b(this,"tempo",this.bpm);b(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));b(this,"ppqn",e=>e===void 0?this.app.clock.ppqn:(e<1&&console.log(`Setting ppqn to ${e}`),this.app.clock.ppqn=e,e));b(this,"time_signature",(e,t)=>{this.app.clock.time_signature=[e,t]});b(this,"prob",e=>this.randomGen()*100 this.randomGen()>.5);b(this,"odds",(e,t=1)=>this.randomGen() !1);b(this,"almostNever",(e=1)=>this.randomGen()<.025*this.ppqn()/(this.ppqn()*e));b(this,"rarely",(e=1)=>this.randomGen()<.1*this.ppqn()/(this.ppqn()*e));b(this,"scarcely",(e=1)=>this.randomGen()<.25*this.ppqn()/(this.ppqn()*e));b(this,"sometimes",(e=1)=>this.randomGen()<.5*this.ppqn()/(this.ppqn()*e));b(this,"often",(e=1)=>this.randomGen()<.75*this.ppqn()/(this.ppqn()*e));b(this,"frequently",(e=1)=>this.randomGen()<.9*this.ppqn()/(this.ppqn()*e));b(this,"almostAlways",(e=1)=>this.randomGen()<.985*this.ppqn()/(this.ppqn()*e));b(this,"always",(e=1)=>!0);b(this,"dice",e=>Math.floor(this.randomGen()*e)+1);b(this,"cbar",()=>this.app.clock.time_position.bar+1);b(this,"ctick",()=>this.app.clock.tick+1);b(this,"cpulse",()=>this.app.clock.time_position.pulse+1);b(this,"cbeat",()=>this.app.clock.time_position.beat+1);b(this,"ebeat",()=>this.app.clock.beats_since_origin+1);b(this,"epulse",()=>this.app.clock.pulses_since_origin+1);b(this,"nominator",()=>this.app.clock.time_signature[0]);b(this,"meter",()=>this.app.clock.time_signature[1]);b(this,"denominator",this.meter);b(this,"beat",(...e)=>e.map(r=>this.app.clock.pulses_since_origin%Math.floor(r*this.ppqn())===0).some(r=>r===!0));b(this,"b",this.beat);b(this,"pulse",(...e)=>e.map(r=>this.app.clock.pulses_since_origin%r===0).some(r=>r===!0));b(this,"flip",(e,t=50)=>{let r=e*2;const i=this.app.clock.pulses_since_origin,s=Math.floor(r*this.ppqn()),a=Math.floor(t/100*s);return i%s{let t=e*2;const r=this.app.clock.time_position.bar;return Math.floor(r/t)%2===0});b(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)});b(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)});b(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)});b(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)});b(this,"delay",(e,t)=>{setTimeout(t,e)});b(this,"delayr",(e,t,r)=>{[...Array(t).keys()].map(s=>e*s).forEach((s,a)=>{setTimeout(r,s)})});b(this,"euclid",(e,t,r,i=0)=>this._euclidean_cycle(t,r,i)[e%r]);b(this,"ec",this.euclid);b(this,"rhythm",(e,t,r,i=0)=>this.beat(e)&&this._euclidean_cycle(t,r,i).beat(e));b(this,"bin",(e,t)=>{let i=t.toString(2).split("").map(s=>s==="1");return i[e%i.length]});b(this,"binrhythm",(e,t)=>{let i=t.toString(2).split("").map(s=>s==="1");return this.beat(e)&&i.beat(e)});b(this,"line",(e,t,r=1)=>{const i=[];if(t>e&&r>0||t Math.sin(this.app.clock.ctx.currentTime*Math.PI*2*e)+t);b(this,"usine",(e=1,t=0)=>(this.sine(e,t)+1)/2);b(this,"saw",(e=1,t=0)=>this.app.clock.ctx.currentTime*e%1*2-1+t);b(this,"usaw",(e=1,t=0)=>(this.saw(e,t)+1)/2);b(this,"triangle",(e=1,t=0)=>Math.abs(this.saw(e,t))*2-1);b(this,"utriangle",(e=1,t=0)=>(this.triangle(e,t)+1)/2);b(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);b(this,"noise",()=>this.randomGen()*2-1);b(this,"min",(...e)=>Math.min(...e));b(this,"max",(...e)=>Math.max(...e));b(this,"mean",(...e)=>e.reduce((r,i)=>r+i,0)/e.length);b(this,"limit",(e,t,r)=>Math.min(Math.max(e,t),r));b(this,"abs",Math.abs);b(this,"speak",(e,t="en-US",r=0,i=1,s=1)=>{new PI({text:e,lang:t,voice:r,rate:i,pitch:s}).speak().then(()=>{}).catch(o=>{console.log(o)})});b(this,"stop_hydra",()=>{this.app.hydra.hush()});b(this,"sound",e=>new Vm(e,this.app));b(this,"snd",this.sound);b(this,"samples",pa);b(this,"log",e=>{console.log(e),this._logMessage(e)});b(this,"scale",n_);b(this,"rate",e=>{});b(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]});b(this,"seqbeat",(...e)=>e[this.app.clock.time_position.beat%e.length]);b(this,"seqbar",(...e)=>e[(this.app.clock.time_position.bar+1)%e.length]);this.app=e,this.MidiConnection=new y3(this,e.settings)}transmission(){return this.MidiConnection.activeNotes.length>0}_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 dB=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;r 100)throw new Error("Amount should be between 0 and 100");if(this.length<=1)return this;for(let t=0;t 1)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=yI(cl(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=yI(cl(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,tg[Bt]=((Li&65280)>>8|(Li&255)<<8)>>1}var ri=function(n,e,t){for(var r=n.length,i=0,s=new ln(e);i >l]=c}else for(o=new ln(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 Ho=new Sr(32);for(var Bt=0;Bt<32;++Bt)Ho[Bt]=5;var hB=ri(Ki,9,0),fB=ri(Ki,9,1),mB=ri(Ho,5,0),gB=ri(Ho,5,1),nd=function(n){for(var e=n[0],t=1;t e&&(e=n[t]);return e},Rn=function(n,e,t){var r=e/8|0;return(n[r]|n[r+1]<<8)>>(e&7)&t},id=function(n,e){var t=e/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(e&7)},c_=function(n){return(n+7)/8|0},u_=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},_B=["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"],$r=function(n,e,t){var r=new Error(e||_B[n]);if(r.code=n,Error.captureStackTrace&&Error.captureStackTrace(r,$r),!t)throw r;return r},d_=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,I=e.n,R=i*8;do{if(!m){c=Rn(n,u,1);var L=Rn(n,u+1,3);if(u+=3,L)if(L==1)m=fB,_=gB,T=9,I=5;else if(L==2){var E=Rn(n,u,31)+257,S=Rn(n,u+10,15)+4,N=E+Rn(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+Rn(n,u,3),u+=2,ee=k[M-1]):$==17?(B=3+Rn(n,u,7),u+=3):$==18&&(B=11+Rn(n,u,127),u+=7);B--;)k[M++]=ee}}var Q=k.subarray(0,E),j=k.subarray(E);T=nd(Q),I=nd(j),m=ri(Q,T,1),_=ri(j,I,1)}else $r(1);else{var $=c_(u)+4,K=n[$-4]|n[$-3]<<8,f=$+K;if(f>i){o&&$r(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>R){o&&$r(0);break}}a&&l(p+131072);for(var Z=(1<>4;if(u+=ee&15,u>R){o&&$r(0);break}if(ee||$r(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=iu[M];De=Rn(n,u,(1< >4;be||$r(3),u+=be&15;var j=pB[Re];if(Re>3){var xe=au[Re];j+=id(n,u)&(1< R){o&&$r(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},ad=function(n,e){for(var t=[],r=0;r m&&(m=s[r].s);var _=new ln(m+1),T=rg(t[u-1],_,0);if(T>e){var r=0,I=0,R=T-e,L=1< e)I+=L-(1< >=R;I>0;){var K=s[r].s;_[K] =0&&I;--r){var f=s[r].s;_[f]==e&&(--_[f],++I)}T=e}return{t:new Sr(_),l:T}},rg=function(n,e,t){return n.s==-1?Math.max(rg(n.l,e,t+1),rg(n.r,e,t+1)):e[n.s]=t},CE=function(n){for(var e=n.length;e&&!n[--e];);for(var t=new ln(++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;s 4&&!M[Jm[te-1]];--te);var ne=c+5<<3,re=po(i,Ki)+po(s,Ho)+a,ee=po(i,m)+po(s,I)+a+14+3*te+po(N,M)+2*N[16]+3*N[17]+7*N[18];if(l>=0&&ne<=re&&ne<=ee)return $I(e,u,n.subarray(l,l+c));var B,Q,j,Z;if(fi(e,u,1+(ee 15&&(fi(e,u,De[k]>>5&127),u+=De[k]>>12)}}else B=hB,Q=Ki,j=mB,Z=Ho;for(var k=0;k 255){var xe=be>>18&31;uo(e,u,B[xe+257]),u+=Q[xe+257],xe>7&&(fi(e,u,be>>23&31),u+=iu[xe]);var Re=be&31;uo(e,u,j[Re]),u+=Z[Re],Re>3&&(uo(e,u,be>>5&8191),u+=au[Re])}else uo(e,u,B[be]),u+=Q[be]}return uo(e,u,B[256]),u+Q[256]},SB=new l_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),GI=new Sr(0),OB=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=SB[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;be j){if(j=be,Z=le,be>Ee)break;for(var Re=Math.min(le,be-2),ce=0,Q=0;Q ce&&(ce=Le,ee=ke)}}}re=ee,ee=I[re],le+=re-ee&32767}if(Z){f[M++]=268435456|eg[j]<<18|TE[Z];var tt=eg[j]&31,nt=TE[Z]&31;k+=iu[tt]+au[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=$I(l,u+1,n.subarray(x,ze))}s.i=a}return u_(o,0,r+c_(u)+i)},EB=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}(),bB=function(){var n=-1;return{p:function(e){for(var t=n,r=0;r >>8;n=t},d:function(){return~n}}},vB=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 OB(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)},ng=function(n,e,t){for(;t;++e)n[e]=t,t>>>=8},TB=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&&ng(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)}},CB=function(n){(n[0]!=31||n[1]!=139||n[2]!=8)&&$r(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)},yB=function(n){var e=n.length;return(n[e-4]|n[e-3]<<8|n[e-2]<<16|n[e-1]<<24)>>>0},AB=function(n){return 10+(n.filename?n.filename.length+1:0)},IB=function(n,e){return((n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31)&&$r(6,"invalid zlib data"),(n[1]>>5&1)==+!e&&$r(6,"invalid zlib data: "+(n[1]&32?"need":"unexpected")+" dictionary"),(n[1]>>3&4)+2};function RB(n,e){return d_(n,{i:2},e&&e.out,e&&e.dictionary)}function NB(n,e){e||(e={});var t=bB(),r=n.length;t.p(n);var i=vB(n,e,AB(e),8),s=i.length;return TB(i,e),ng(i,s-8,t.d()),ng(i,s-4,r),i}function wB(n,e){var t=CB(n);return t+8>n.length&&$r(6,"invalid gzip data"),d_(n.subarray(t,-8),{i:2},e&&e.out||new Sr(yB(n)),e&&e.dictionary)}function DB(n,e){return d_(n.subarray(IB(n,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function xB(n,e){return n[0]==31&&n[1]==139&&n[2]==8?wB(n,e):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?RB(n,e):DB(n,e)}var ig=typeof TextDecoder<"u"&&new TextDecoder,kB=0;try{ig.decode(GI,{stream:!0}),kB=1}catch{}var LB=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:u_(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 MB(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;M 0){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""+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:' ',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
"+E.preList[S]+""}),r.subParser("makeMarkdown.strikethrough",function(f,E){var S="";if(f.hasChildNodes()){S+="~~";for(var N=f.childNodes,k=N.length,x=0;x tr>th"),x=f.querySelectorAll("tbody>tr"),M,G;for(M=0;M j&&(j=Z)}for(M=0;M /g,"\\$1>"),E=E.replace(/^#/gm,"\\#"),E=E.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),E=E.replace(/^( {0,3}\d+)\./gm,"$1\\."),E=E.replace(/^( {0,3})([+-])/gm,"$1\\$2"),E=E.replace(/]([\s]*)\(/g,"\\]$1\\("),E=E.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),E});var K=this;n.exports?n.exports=r:K.showdown=r}).call(nc)})(qI);var VI=qI.exports;const zI=QI(VI);function sd(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}sd.proto=function(){return RegExp.escape=sd,sd};var Yc={exports:{}};/*! https://mths.be/he v1.2.0 by @mathias | MIT license */Yc.exports;(function(n,e){(function(t){var r=e,i=n&&n.exports==r&&n,s=typeof nc=="object"&&nc;(s.global===s||s.window===s)&&(t=s);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=/[\x01-\x7F]/g,l=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,c=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,u={"":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot"," ":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp"," ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr",ª:"ordf",á:"aacute",Á:"Aacute",à:"agrave",À:"Agrave",ă:"abreve",Ă:"Abreve",â:"acirc",Â:"Acirc",å:"aring",Å:"angst",ä:"auml",Ä:"Auml",ã:"atilde",Ã:"Atilde",ą:"aogon",Ą:"Aogon",ā:"amacr",Ā:"Amacr",æ:"aelig",Æ:"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf",ℬ:"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf",ℭ:"Cfr","𝒞":"Cscr",ℂ:"Copf",ć:"cacute",Ć:"Cacute",ĉ:"ccirc",Ĉ:"Ccirc",č:"ccaron",Č:"Ccaron",ċ:"cdot",Ċ:"Cdot",ç:"ccedil",Ç:"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf",ď:"dcaron",Ď:"Dcaron",đ:"dstrok",Đ:"Dstrok",ð:"eth",Ð:"ETH","ⅇ":"ee",ℯ:"escr","𝔢":"efr","𝕖":"eopf",ℰ:"Escr","𝔈":"Efr","𝔼":"Eopf",é:"eacute",É:"Eacute",è:"egrave",È:"Egrave",ê:"ecirc",Ê:"Ecirc",ě:"ecaron",Ě:"Ecaron",ë:"euml",Ë:"Euml",ė:"edot",Ė:"Edot",ę:"eogon",Ę:"Eogon",ē:"emacr",Ē:"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf",ℱ:"Fscr",ff:"fflig",ffi:"ffilig",ffl:"ffllig",fi:"filig",fj:"fjlig",fl:"fllig",ƒ:"fnof",ℊ:"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr",ǵ:"gacute",ğ:"gbreve",Ğ:"Gbreve",ĝ:"gcirc",Ĝ:"Gcirc",ġ:"gdot",Ġ:"Gdot",Ģ:"Gcedil","𝔥":"hfr",ℎ:"planckh","𝒽":"hscr","𝕙":"hopf",ℋ:"Hscr",ℌ:"Hfr",ℍ:"Hopf",ĥ:"hcirc",Ĥ:"Hcirc",ℏ:"hbar",ħ:"hstrok",Ħ:"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf",ℐ:"Iscr",ℑ:"Im",í:"iacute",Í:"Iacute",ì:"igrave",Ì:"Igrave",î:"icirc",Î:"Icirc",ï:"iuml",Ï:"Iuml",ĩ:"itilde",Ĩ:"Itilde",İ:"Idot",į:"iogon",Į:"Iogon",ī:"imacr",Ī:"Imacr",ij:"ijlig",IJ:"IJlig",ı:"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf",ĵ:"jcirc",Ĵ:"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr",ķ:"kcedil",Ķ:"Kcedil","𝔩":"lfr","𝓁":"lscr",ℓ:"ell","𝕝":"lopf",ℒ:"Lscr","𝔏":"Lfr","𝕃":"Lopf",ĺ:"lacute",Ĺ:"Lacute",ľ:"lcaron",Ľ:"Lcaron",ļ:"lcedil",Ļ:"Lcedil",ł:"lstrok",Ł:"Lstrok",ŀ:"lmidot",Ŀ:"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf",ℳ:"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr",ℕ:"Nopf","𝒩":"Nscr","𝔑":"Nfr",ń:"nacute",Ń:"Nacute",ň:"ncaron",Ň:"Ncaron",ñ:"ntilde",Ñ:"Ntilde",ņ:"ncedil",Ņ:"Ncedil","№":"numero",ŋ:"eng",Ŋ:"ENG","𝕠":"oopf","𝔬":"ofr",ℴ:"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf",º:"ordm",ó:"oacute",Ó:"Oacute",ò:"ograve",Ò:"Ograve",ô:"ocirc",Ô:"Ocirc",ö:"ouml",Ö:"Ouml",ő:"odblac",Ő:"Odblac",õ:"otilde",Õ:"Otilde",ø:"oslash",Ø:"Oslash",ō:"omacr",Ō:"Omacr",œ:"oelig",Œ:"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf",ℙ:"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr",ℚ:"Qopf",ĸ:"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr",ℛ:"Rscr",ℜ:"Re",ℝ:"Ropf",ŕ:"racute",Ŕ:"Racute",ř:"rcaron",Ř:"Rcaron",ŗ:"rcedil",Ŗ:"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS",ś:"sacute",Ś:"Sacute",ŝ:"scirc",Ŝ:"Scirc",š:"scaron",Š:"Scaron",ş:"scedil",Ş:"Scedil",ß:"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf",ť:"tcaron",Ť:"Tcaron",ţ:"tcedil",Ţ:"Tcedil","™":"trade",ŧ:"tstrok",Ŧ:"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr",ú:"uacute",Ú:"Uacute",ù:"ugrave",Ù:"Ugrave",ŭ:"ubreve",Ŭ:"Ubreve",û:"ucirc",Û:"Ucirc",ů:"uring",Ů:"Uring",ü:"uuml",Ü:"Uuml",ű:"udblac",Ű:"Udblac",ũ:"utilde",Ũ:"Utilde",ų:"uogon",Ų:"Uogon",ū:"umacr",Ū:"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr",ŵ:"wcirc",Ŵ:"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf",ý:"yacute",Ý:"Yacute",ŷ:"ycirc",Ŷ:"Ycirc",ÿ:"yuml",Ÿ:"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf",ℨ:"Zfr",ℤ:"Zopf","𝒵":"Zscr",ź:"zacute",Ź:"Zacute",ž:"zcaron",Ž:"Zcaron",ż:"zdot",Ż:"Zdot",Ƶ:"imped",þ:"thorn",Þ:"THORN",ʼn:"napos",α:"alpha",Α:"Alpha",β:"beta",Β:"Beta",γ:"gamma",Γ:"Gamma",δ:"delta",Δ:"Delta",ε:"epsi","ϵ":"epsiv",Ε:"Epsilon",ϝ:"gammad",Ϝ:"Gammad",ζ:"zeta",Ζ:"Zeta",η:"eta",Η:"Eta",θ:"theta",ϑ:"thetav",Θ:"Theta",ι:"iota",Ι:"Iota",κ:"kappa",ϰ:"kappav",Κ:"Kappa",λ:"lambda",Λ:"Lambda",μ:"mu",µ:"micro",Μ:"Mu",ν:"nu",Ν:"Nu",ξ:"xi",Ξ:"Xi",ο:"omicron",Ο:"Omicron",π:"pi",ϖ:"piv",Π:"Pi",ρ:"rho",ϱ:"rhov",Ρ:"Rho",σ:"sigma",Σ:"Sigma",ς:"sigmaf",τ:"tau",Τ:"Tau",υ:"upsi",Υ:"Upsilon",ϒ:"Upsi",φ:"phi",ϕ:"phiv",Φ:"Phi",χ:"chi",Χ:"Chi",ψ:"psi",Ψ:"Psi",ω:"omega",Ω:"ohm",а:"acy",А:"Acy",б:"bcy",Б:"Bcy",в:"vcy",В:"Vcy",г:"gcy",Г:"Gcy",ѓ:"gjcy",Ѓ:"GJcy",д:"dcy",Д:"Dcy",ђ:"djcy",Ђ:"DJcy",е:"iecy",Е:"IEcy",ё:"iocy",Ё:"IOcy",є:"jukcy",Є:"Jukcy",ж:"zhcy",Ж:"ZHcy",з:"zcy",З:"Zcy",ѕ:"dscy",Ѕ:"DScy",и:"icy",И:"Icy",і:"iukcy",І:"Iukcy",ї:"yicy",Ї:"YIcy",й:"jcy",Й:"Jcy",ј:"jsercy",Ј:"Jsercy",к:"kcy",К:"Kcy",ќ:"kjcy",Ќ:"KJcy",л:"lcy",Л:"Lcy",љ:"ljcy",Љ:"LJcy",м:"mcy",М:"Mcy",н:"ncy",Н:"Ncy",њ:"njcy",Њ:"NJcy",о:"ocy",О:"Ocy",п:"pcy",П:"Pcy",р:"rcy",Р:"Rcy",с:"scy",С:"Scy",т:"tcy",Т:"Tcy",ћ:"tshcy",Ћ:"TSHcy",у:"ucy",У:"Ucy",ў:"ubrcy",Ў:"Ubrcy",ф:"fcy",Ф:"Fcy",х:"khcy",Х:"KHcy",ц:"tscy",Ц:"TScy",ч:"chcy",Ч:"CHcy",џ:"dzcy",Џ:"DZcy",ш:"shcy",Ш:"SHcy",щ:"shchcy",Щ:"SHCHcy",ъ:"hardcy",Ъ:"HARDcy",ы:"ycy",Ы:"Ycy",ь:"softcy",Ь:"SOFTcy",э:"ecy",Э:"Ecy",ю:"yucy",Ю:"YUcy",я:"yacy",Я:"YAcy",ℵ:"aleph",ℶ:"beth",ℷ:"gimel",ℸ:"daleth"},p=/["&'<>`]/g,m={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},_=/(?:[xX][^a-fA-F0-9]|[^0-9xX])/,T=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,I=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|([0-9]+)(;?)|[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,R={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` -`,nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"",zwnj:""},L={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},$={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},K=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],f=String.fromCharCode,E={},S=E.hasOwnProperty,N=function(Z,ue){return S.call(Z,ue)},k=function(Z,ue){for(var le=-1,Ee=Z.length;++le =55296&&Z<=57343||Z>1114111?(ue&&ne("character reference outside the permissible Unicode range"),"�"):N($,Z)?(ue&&ne("disallowed character reference"),$[Z]):(ue&&k(K,Z)&&ne("disallowed character reference"),Z>65535&&(Z-=65536,le+=f(Z>>>10&1023|55296),Z=56320|Z&1023),le+=f(Z),le)},G=function(Z){return""+Z.toString(16).toUpperCase()+";"},te=function(Z){return""+Z+";"},ne=function(Z){throw Error("Parse error: "+Z)},re=function(Z,ue){ue=x(ue,re.options);var le=ue.strict;le&&T.test(Z)&&ne("forbidden code point");var Ee=ue.encodeEverything,De=ue.useNamedReferences,xe=ue.allowUnsafeSymbols,be=ue.decimal?te:G,Re=function(ce){return be(ce.charCodeAt(0))};return Ee?(Z=Z.replace(o,function(ce){return De&&N(u,ce)?"&"+u[ce]+";":Re(ce)}),De&&(Z=Z.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),De&&(Z=Z.replace(c,function(ce){return"&"+u[ce]+";"}))):De?(xe||(Z=Z.replace(p,function(ce){return"&"+u[ce]+";"})),Z=Z.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),Z=Z.replace(c,function(ce){return"&"+u[ce]+";"})):xe||(Z=Z.replace(p,Re)),Z.replace(a,function(ce){var ke=ce.charCodeAt(0),Ze=ce.charCodeAt(1),Le=(ke-55296)*1024+Ze-56320+65536;return be(Le)}).replace(l,Re)};re.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var ee=function(Z,ue){ue=x(ue,ee.options);var le=ue.strict;return le&&_.test(Z)&&ne("malformed character reference"),Z.replace(I,function(Ee,De,xe,be,Re,ce,ke,Ze,Le){var tt,nt,ze,St,mt,At;return De?(mt=De,R[mt]):xe?(mt=xe,At=be,At&&ue.isAttributeValue?(le&&At=="="&&ne("`&` did not start a character reference"),Ee):(le&&ne("named character reference was not terminated by a semicolon"),L[mt]+(At||""))):Re?(ze=Re,nt=ce,le&&!nt&&ne("character reference was not terminated by a semicolon"),tt=parseInt(ze,10),M(tt,le)):ke?(St=ke,nt=Ze,le&&!nt&&ne("character reference was not terminated by a semicolon"),tt=parseInt(St,16),M(tt,le)):(le&&ne("named character reference was not terminated by a semicolon"),Ee)})};ee.options={isAttributeValue:!1,strict:!1};var B=function(Z){return Z.replace(p,function(ue){return m[ue]})},Q={version:"1.2.0",encode:re,decode:ee,escape:B,unescape:ee};if(r&&!r.nodeType)if(i)i.exports=Q;else for(var j in Q)N(Q,j)&&(r[j]=Q[j]);else t.he=Q})(nc)})(Yc,Yc.exports);var MB=Yc.exports,AE=MB,PB={decode:function(e){return AE.decode(e)},encode:function(e){return AE.encode(e)}};function HI(n){return n instanceof Map?n.clear=n.delete=n.set=function(){throw new Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=function(){throw new Error("set is read-only")}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach(e=>{const t=n[e],r=typeof t;(r==="object"||r==="function")&&!Object.isFrozen(t)&&HI(t)}),n}class IE{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function WI(n){return n.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function qi(n,...e){const t=Object.create(null);for(const r in n)t[r]=n[r];return e.forEach(function(r){for(const i in r)t[i]=r[i]}),t}const BB="",RE=n=>!!n.scope,UB=(n,{prefix:e})=>{if(n.startsWith("language:"))return n.replace("language:","language-");if(n.includes(".")){const t=n.split(".");return[`${e}${t.shift()}`,...t.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${e}${n}`};class FB{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=WI(e)}openNode(e){if(!RE(e))return;const t=UB(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){RE(e)&&(this.buffer+=BB)}value(){return this.buffer}span(e){this.buffer+=``}}const NE=(n={})=>{const e={children:[]};return Object.assign(e,n),e};class p_{constructor(){this.rootNode=NE(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=NE({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t=="string"?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(r=>this._walk(e,r)),e.closeNode(t)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(t=>typeof t=="string")?e.children=[e.children.join("")]:e.children.forEach(t=>{p_._collapse(t)}))}}class YB extends p_{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const r=e.root;t&&(r.scope=`language:${t}`),this.add(r)}toHTML(){return new FB(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Wo(n){return n?typeof n=="string"?n:n.source:null}function XI(n){return wa("(?=",n,")")}function $B(n){return wa("(?:",n,")*")}function GB(n){return wa("(?:",n,")?")}function wa(...n){return n.map(t=>Wo(t)).join("")}function QB(n){const e=n[n.length-1];return typeof e=="object"&&e.constructor===Object?(n.splice(n.length-1,1),e):{}}function h_(...n){return"("+(QB(n).capture?"":"?:")+n.map(r=>Wo(r)).join("|")+")"}function ZI(n){return new RegExp(n.toString()+"|").exec("").length-1}function qB(n,e){const t=n&&n.exec(e);return t&&t.index===0}const VB=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function f_(n,{joinWith:e}){let t=0;return n.map(r=>{t+=1;const i=t;let s=Wo(r),a="";for(;s.length>0;){const o=VB.exec(s);if(!o){a+=s;break}a+=s.substring(0,o.index),s=s.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?a+="\\"+String(Number(o[1])+i):(a+=o[0],o[0]==="("&&t++)}return a}).map(r=>`(${r})`).join(e)}const zB=/\b\B/,KI="[a-zA-Z]\\w*",m_="[a-zA-Z_]\\w*",jI="\\b\\d+(\\.\\d+)?",JI="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",eR="\\b(0b[01]+)",HB="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",WB=(n={})=>{const e=/^#![ ]*\//;return n.binary&&(n.begin=wa(e,/.*\b/,n.binary,/\b.*/)),qi({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,r)=>{t.index!==0&&r.ignoreMatch()}},n)},Xo={begin:"\\\\[\\s\\S]",relevance:0},XB={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Xo]},ZB={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Xo]},KB={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},su=function(n,e,t={}){const r=qi({scope:"comment",begin:n,end:e,contains:[]},t);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=h_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:wa(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},jB=su("//","$"),JB=su("/\\*","\\*/"),eU=su("#","$"),tU={scope:"number",begin:jI,relevance:0},rU={scope:"number",begin:JI,relevance:0},nU={scope:"number",begin:eR,relevance:0},iU={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Xo,{begin:/\[/,end:/\]/,relevance:0,contains:[Xo]}]}]},aU={scope:"title",begin:KI,relevance:0},sU={scope:"title",begin:m_,relevance:0},oU={begin:"\\.\\s*"+m_,relevance:0},lU=function(n){return Object.assign(n,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var Fl=Object.freeze({__proto__:null,MATCH_NOTHING_RE:zB,IDENT_RE:KI,UNDERSCORE_IDENT_RE:m_,NUMBER_RE:jI,C_NUMBER_RE:JI,BINARY_NUMBER_RE:eR,RE_STARTERS_RE:HB,SHEBANG:WB,BACKSLASH_ESCAPE:Xo,APOS_STRING_MODE:XB,QUOTE_STRING_MODE:ZB,PHRASAL_WORDS_MODE:KB,COMMENT:su,C_LINE_COMMENT_MODE:jB,C_BLOCK_COMMENT_MODE:JB,HASH_COMMENT_MODE:eU,NUMBER_MODE:tU,C_NUMBER_MODE:rU,BINARY_NUMBER_MODE:nU,REGEXP_MODE:iU,TITLE_MODE:aU,UNDERSCORE_TITLE_MODE:sU,METHOD_GUARD:oU,END_SAME_AS_BEGIN:lU});function cU(n,e){n.input[n.index-1]==="."&&e.ignoreMatch()}function uU(n,e){n.className!==void 0&&(n.scope=n.className,delete n.className)}function dU(n,e){e&&n.beginKeywords&&(n.begin="\\b("+n.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",n.__beforeBegin=cU,n.keywords=n.keywords||n.beginKeywords,delete n.beginKeywords,n.relevance===void 0&&(n.relevance=0))}function pU(n,e){Array.isArray(n.illegal)&&(n.illegal=h_(...n.illegal))}function hU(n,e){if(n.match){if(n.begin||n.end)throw new Error("begin & end are not supported with match");n.begin=n.match,delete n.match}}function fU(n,e){n.relevance===void 0&&(n.relevance=1)}const mU=(n,e)=>{if(!n.beforeMatch)return;if(n.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},n);Object.keys(n).forEach(r=>{delete n[r]}),n.keywords=t.keywords,n.begin=wa(t.beforeMatch,XI(t.begin)),n.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},n.relevance=0,delete t.beforeMatch},gU=["of","and","for","in","not","or","if","then","parent","list","value"],_U="keyword";function tR(n,e,t=_U){const r=Object.create(null);return typeof n=="string"?i(t,n.split(" ")):Array.isArray(n)?i(t,n):Object.keys(n).forEach(function(s){Object.assign(r,tR(n[s],e,s))}),r;function i(s,a){e&&(a=a.map(o=>o.toLowerCase())),a.forEach(function(o){const l=o.split("|");r[l[0]]=[s,SU(l[0],l[1])]})}}function SU(n,e){return e?Number(e):OU(n)?0:1}function OU(n){return gU.includes(n.toLowerCase())}const wE={},Ta=n=>{console.error(n)},DE=(n,...e)=>{console.log(`WARN: ${n}`,...e)},Ha=(n,e)=>{wE[`${n}/${e}`]||(console.log(`Deprecated as of ${n}. ${e}`),wE[`${n}/${e}`]=!0)},$c=new Error;function rR(n,e,{key:t}){let r=0;const i=n[t],s={},a={};for(let o=1;o<=e.length;o++)a[o+r]=i[o],s[o+r]=!0,r+=ZI(e[o-1]);n[t]=a,n[t]._emit=s,n[t]._multi=!0}function EU(n){if(Array.isArray(n.begin)){if(n.skip||n.excludeBegin||n.returnBegin)throw Ta("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),$c;if(typeof n.beginScope!="object"||n.beginScope===null)throw Ta("beginScope must be object"),$c;rR(n,n.begin,{key:"beginScope"}),n.begin=f_(n.begin,{joinWith:""})}}function bU(n){if(Array.isArray(n.end)){if(n.skip||n.excludeEnd||n.returnEnd)throw Ta("skip, excludeEnd, returnEnd not compatible with endScope: {}"),$c;if(typeof n.endScope!="object"||n.endScope===null)throw Ta("endScope must be object"),$c;rR(n,n.end,{key:"endScope"}),n.end=f_(n.end,{joinWith:""})}}function vU(n){n.scope&&typeof n.scope=="object"&&n.scope!==null&&(n.beginScope=n.scope,delete n.scope)}function TU(n){vU(n),typeof n.beginScope=="string"&&(n.beginScope={_wrap:n.beginScope}),typeof n.endScope=="string"&&(n.endScope={_wrap:n.endScope}),EU(n),bU(n)}function CU(n){function e(a,o){return new RegExp(Wo(a),"m"+(n.case_insensitive?"i":"")+(n.unicodeRegex?"u":"")+(o?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=ZI(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=e(f_(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const c=l.findIndex((p,m)=>m>0&&p!==void 0),u=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new t;return this.rules.slice(o).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(o);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(o)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(a){const o=new r;return a.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),a.terminatorEnd&&o.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&o.addRule(a.illegal,{type:"illegal"}),o}function s(a,o){const l=a;if(a.isCompiled)return l;[uU,hU,TU,mU].forEach(u=>u(a,o)),n.compilerExtensions.forEach(u=>u(a,o)),a.__beforeBegin=null,[dU,pU,fU].forEach(u=>u(a,o)),a.isCompiled=!0;let c=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),c=a.keywords.$pattern,delete a.keywords.$pattern),c=c||/\w+/,a.keywords&&(a.keywords=tR(a.keywords,n.case_insensitive)),l.keywordPatternRe=e(c,!0),o&&(a.begin||(a.begin=/\B|\b/),l.beginRe=e(l.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(l.endRe=e(l.end)),l.terminatorEnd=Wo(l.end)||"",a.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(l.illegalRe=e(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(u){return yU(u==="self"?a:u)})),a.contains.forEach(function(u){s(u,l)}),a.starts&&s(a.starts,o),l.matcher=i(l),l}if(n.compilerExtensions||(n.compilerExtensions=[]),n.contains&&n.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return n.classNameAliases=qi(n.classNameAliases||{}),s(n)}function nR(n){return n?n.endsWithParent||nR(n.starts):!1}function yU(n){return n.variants&&!n.cachedVariants&&(n.cachedVariants=n.variants.map(function(e){return qi(n,{variants:null},e)})),n.cachedVariants?n.cachedVariants:nR(n)?qi(n,{starts:n.starts?qi(n.starts):null}):Object.isFrozen(n)?qi(n):n}var AU="11.8.0";class IU extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const od=WI,xE=qi,kE=Symbol("nomatch"),RU=7,iR=function(n){const e=Object.create(null),t=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:YB};function l(Q){return o.noHighlightRe.test(Q)}function c(Q){let j=Q.className+" ";j+=Q.parentNode?Q.parentNode.className:"";const Z=o.languageDetectRe.exec(j);if(Z){const ue=x(Z[1]);return ue||(DE(s.replace("{}",Z[1])),DE("Falling back to no-highlight mode for this block.",Q)),ue?Z[1]:"no-highlight"}return j.split(/\s+/).find(ue=>l(ue)||x(ue))}function u(Q,j,Z){let ue="",le="";typeof j=="object"?(ue=Q,Z=j.ignoreIllegals,le=j.language):(Ha("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ha("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),le=Q,ue=j),Z===void 0&&(Z=!0);const Ee={code:ue,language:le};ee("before:highlight",Ee);const De=Ee.result?Ee.result:p(Ee.language,Ee.code,Z);return De.code=Ee.code,ee("after:highlight",De),De}function p(Q,j,Z,ue){const le=Object.create(null);function Ee(_e,we){return _e.keywords[we]}function De(){if(!$e.keywords){rt.addText(He);return}let _e=0;$e.keywordPatternRe.lastIndex=0;let we=$e.keywordPatternRe.exec(He),Ne="";for(;we;){Ne+=He.substring(_e,we.index);const Je=At.case_insensitive?we[0].toLowerCase():we[0],ye=Ee($e,Je);if(ye){const[Ht,ut]=ye;if(rt.addText(Ne),Ne="",le[Je]=(le[Je]||0)+1,le[Je]<=RU&&(Br+=ut),Ht.startsWith("_"))Ne+=we[0];else{const It=At.classNameAliases[Ht]||Ht;Re(we[0],It)}}else Ne+=we[0];_e=$e.keywordPatternRe.lastIndex,we=$e.keywordPatternRe.exec(He)}Ne+=He.substring(_e),rt.addText(Ne)}function xe(){if(He==="")return;let _e=null;if(typeof $e.subLanguage=="string"){if(!e[$e.subLanguage]){rt.addText(He);return}_e=p($e.subLanguage,He,!0,hr[$e.subLanguage]),hr[$e.subLanguage]=_e._top}else _e=_(He,$e.subLanguage.length?$e.subLanguage:null);$e.relevance>0&&(Br+=_e.relevance),rt.__addSublanguage(_e._emitter,_e.language)}function be(){$e.subLanguage!=null?xe():De(),He=""}function Re(_e,we){_e!==""&&(rt.startScope(we),rt.addText(_e),rt.endScope())}function ce(_e,we){let Ne=1;const Je=we.length-1;for(;Ne<=Je;){if(!_e._emit[Ne]){Ne++;continue}const ye=At.classNameAliases[_e[Ne]]||_e[Ne],Ht=we[Ne];ye?Re(Ht,ye):(He=Ht,De(),He=""),Ne++}}function ke(_e,we){return _e.scope&&typeof _e.scope=="string"&&rt.openNode(At.classNameAliases[_e.scope]||_e.scope),_e.beginScope&&(_e.beginScope._wrap?(Re(He,At.classNameAliases[_e.beginScope._wrap]||_e.beginScope._wrap),He=""):_e.beginScope._multi&&(ce(_e.beginScope,we),He="")),$e=Object.create(_e,{parent:{value:$e}}),$e}function Ze(_e,we,Ne){let Je=qB(_e.endRe,Ne);if(Je){if(_e["on:end"]){const ye=new IE(_e);_e["on:end"](we,ye),ye.isMatchIgnored&&(Je=!1)}if(Je){for(;_e.endsParent&&_e.parent;)_e=_e.parent;return _e}}if(_e.endsWithParent)return Ze(_e.parent,we,Ne)}function Le(_e){return $e.matcher.regexIndex===0?(He+=_e[0],1):(W=!0,0)}function tt(_e){const we=_e[0],Ne=_e.rule,Je=new IE(Ne),ye=[Ne.__beforeBegin,Ne["on:begin"]];for(const Ht of ye)if(Ht&&(Ht(_e,Je),Je.isMatchIgnored))return Le(we);return Ne.skip?He+=we:(Ne.excludeBegin&&(He+=we),be(),!Ne.returnBegin&&!Ne.excludeBegin&&(He=we)),ke(Ne,_e),Ne.returnBegin?0:we.length}function nt(_e){const we=_e[0],Ne=j.substring(_e.index),Je=Ze($e,_e,Ne);if(!Je)return kE;const ye=$e;$e.endScope&&$e.endScope._wrap?(be(),Re(we,$e.endScope._wrap)):$e.endScope&&$e.endScope._multi?(be(),ce($e.endScope,_e)):ye.skip?He+=we:(ye.returnEnd||ye.excludeEnd||(He+=we),be(),ye.excludeEnd&&(He=we));do $e.scope&&rt.closeNode(),!$e.skip&&!$e.subLanguage&&(Br+=$e.relevance),$e=$e.parent;while($e!==Je.parent);return Je.starts&&ke(Je.starts,_e),ye.returnEnd?0:we.length}function ze(){const _e=[];for(let we=$e;we!==At;we=we.parent)we.scope&&_e.unshift(we.scope);_e.forEach(we=>rt.openNode(we))}let St={};function mt(_e,we){const Ne=we&&we[0];if(He+=_e,Ne==null)return be(),0;if(St.type==="begin"&&we.type==="end"&&St.index===we.index&&Ne===""){if(He+=j.slice(we.index,we.index+1),!i){const Je=new Error(`0 width match regex (${Q})`);throw Je.languageName=Q,Je.badRule=St.rule,Je}return 1}if(St=we,we.type==="begin")return tt(we);if(we.type==="illegal"&&!Z){const Je=new Error('Illegal lexeme "'+Ne+'" for mode "'+($e.scope||" ")+'"');throw Je.mode=$e,Je}else if(we.type==="end"){const Je=nt(we);if(Je!==kE)return Je}if(we.type==="illegal"&&Ne==="")return 1;if(vr>1e5&&vr>we.index*3)throw new Error("potential infinite loop, way more iterations than matches");return He+=Ne,Ne.length}const At=x(Q);if(!At)throw Ta(s.replace("{}",Q)),new Error('Unknown language: "'+Q+'"');const Rt=CU(At);let at="",$e=ue||Rt;const hr={},rt=new o.__emitter(o);ze();let He="",Br=0,cr=0,vr=0,W=!1;try{if(At.__emitTokens)At.__emitTokens(j,rt);else{for($e.matcher.considerAll();;){vr++,W?W=!1:$e.matcher.considerAll(),$e.matcher.lastIndex=cr;const _e=$e.matcher.exec(j);if(!_e)break;const we=j.substring(cr,_e.index),Ne=mt(we,_e);cr=_e.index+Ne}mt(j.substring(cr))}return rt.finalize(),at=rt.toHTML(),{language:Q,value:at,relevance:Br,illegal:!1,_emitter:rt,_top:$e}}catch(_e){if(_e.message&&_e.message.includes("Illegal"))return{language:Q,value:od(j),illegal:!0,relevance:0,_illegalBy:{message:_e.message,index:cr,context:j.slice(cr-100,cr+100),mode:_e.mode,resultSoFar:at},_emitter:rt};if(i)return{language:Q,value:od(j),illegal:!1,relevance:0,errorRaised:_e,_emitter:rt,_top:$e};throw _e}}function m(Q){const j={value:od(Q),illegal:!1,relevance:0,_top:a,_emitter:new o.__emitter(o)};return j._emitter.addText(Q),j}function _(Q,j){j=j||o.languages||Object.keys(e);const Z=m(Q),ue=j.filter(x).filter(G).map(be=>p(be,Q,!1));ue.unshift(Z);const le=ue.sort((be,Re)=>{if(be.relevance!==Re.relevance)return Re.relevance-be.relevance;if(be.language&&Re.language){if(x(be.language).supersetOf===Re.language)return 1;if(x(Re.language).supersetOf===be.language)return-1}return 0}),[Ee,De]=le,xe=Ee;return xe.secondBest=De,xe}function T(Q,j,Z){const ue=j&&t[j]||Z;Q.classList.add("hljs"),Q.classList.add(`language-${ue}`)}function I(Q){let j=null;const Z=c(Q);if(l(Z))return;if(ee("before:highlightElement",{el:Q,language:Z}),Q.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Q)),o.throwUnescapedHTML))throw new IU("One of your code blocks includes unescaped HTML.",Q.innerHTML);j=Q;const ue=j.textContent,le=Z?u(ue,{language:Z,ignoreIllegals:!0}):_(ue);Q.innerHTML=le.value,T(Q,Z,le.language),Q.result={language:le.language,re:le.relevance,relevance:le.relevance},le.secondBest&&(Q.secondBest={language:le.secondBest.language,relevance:le.secondBest.relevance}),ee("after:highlightElement",{el:Q,result:le,text:ue})}function R(Q){o=xE(o,Q)}const L=()=>{f(),Ha("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function $(){f(),Ha("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let K=!1;function f(){if(document.readyState==="loading"){K=!0;return}document.querySelectorAll(o.cssSelector).forEach(I)}function E(){K&&f()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",E,!1);function S(Q,j){let Z=null;try{Z=j(n)}catch(ue){if(Ta("Language definition for '{}' could not be registered.".replace("{}",Q)),i)Ta(ue);else throw ue;Z=a}Z.name||(Z.name=Q),e[Q]=Z,Z.rawDefinition=j.bind(null,n),Z.aliases&&M(Z.aliases,{languageName:Q})}function N(Q){delete e[Q];for(const j of Object.keys(t))t[j]===Q&&delete t[j]}function k(){return Object.keys(e)}function x(Q){return Q=(Q||"").toLowerCase(),e[Q]||e[t[Q]]}function M(Q,{languageName:j}){typeof Q=="string"&&(Q=[Q]),Q.forEach(Z=>{t[Z.toLowerCase()]=j})}function G(Q){const j=x(Q);return j&&!j.disableAutodetect}function te(Q){Q["before:highlightBlock"]&&!Q["before:highlightElement"]&&(Q["before:highlightElement"]=j=>{Q["before:highlightBlock"](Object.assign({block:j.el},j))}),Q["after:highlightBlock"]&&!Q["after:highlightElement"]&&(Q["after:highlightElement"]=j=>{Q["after:highlightBlock"](Object.assign({block:j.el},j))})}function ne(Q){te(Q),r.push(Q)}function re(Q){const j=r.indexOf(Q);j!==-1&&r.splice(j,1)}function ee(Q,j){const Z=Q;r.forEach(function(ue){ue[Z]&&ue[Z](j)})}function B(Q){return Ha("10.7.0","highlightBlock will be removed entirely in v12.0"),Ha("10.7.0","Please use highlightElement now."),I(Q)}Object.assign(n,{highlight:u,highlightAuto:_,highlightAll:f,highlightElement:I,highlightBlock:B,configure:R,initHighlighting:L,initHighlightingOnLoad:$,registerLanguage:S,unregisterLanguage:N,listLanguages:k,getLanguage:x,registerAliases:M,autoDetection:G,inherit:xE,addPlugin:ne,removePlugin:re}),n.debugMode=function(){i=!1},n.safeMode=function(){i=!0},n.versionString=AU,n.regex={concat:wa,lookahead:XI,either:h_,optional:GB,anyNumberOfTimes:$B};for(const Q in Fl)typeof Fl[Q]=="object"&&HI(Fl[Q]);return Object.assign(n,Fl),n},As=iR({});As.newInstance=()=>iR({});var NU=As;As.HighlightJS=As;As.default=As;var ld,LE;function wU(){if(LE)return ld;LE=1;function n(e){const t="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+",s="далее "+"возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ",l="загрузитьизфайла "+"вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ",c="разделительстраниц разделительстрок символтабуляции ",u="ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон ",p="acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища ",m="wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ",_=c+u+p+m,T="webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля ",I="автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени форматкартинки ширинаподчиненныхэлементовформы ",R="виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента ",L="авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных ",$="использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц ",K="отображениевремениэлементовпланировщика ",f="типфайлаформатированногодокумента ",E="обходрезультатазапроса типзаписизапроса ",S="видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов ",N="доступкфайлу режимдиалогавыборафайла режимоткрытияфайла ",k="типизмеренияпостроителязапроса ",x="видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений ",M="wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs форматдатыjson экранированиесимволовjson ",G="видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных использованиеусловногооформлениякомпоновкиданных ",te="важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты статусразборапочтовогосообщения ",ne="режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации ",re="расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии типхранилищасертификатовкриптографии ",ee="кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip режимсохраненияпутейzip уровеньсжатияzip ",B="звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp ",Q="направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса ",j="httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса типномерадокумента типномеразадачи типформы удалениедвижений ",Z="важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты",ue=T+I+R+L+$+K+f+E+S+N+k+x+M+G+te+ne+re+ee+B+Q+j+Z,De="comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных "+"comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура фиксированноесоответствие фиксированныймассив ",xe="null истина ложь неопределено",be=e.inherit(e.NUMBER_MODE),Re={className:"string",begin:'"|\\|',end:'"|$',contains:[{begin:'""'}]},ce={begin:"'",end:"'",excludeBegin:!0,excludeEnd:!0,contains:[{className:"number",begin:"\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}"}]},ke=e.inherit(e.C_LINE_COMMENT_MODE),Ze={className:"meta",begin:"#|&",end:"$",keywords:{$pattern:t,keyword:s+l},contains:[ke]},Le={className:"symbol",begin:"~",end:";|:",excludeEnd:!0},tt={className:"function",variants:[{begin:"процедура|функция",end:"\\)",keywords:"процедура функция"},{begin:"конецпроцедуры|конецфункции",keywords:"конецпроцедуры конецфункции"}],contains:[{begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"params",begin:t,end:",",excludeEnd:!0,endsWithParent:!0,keywords:{$pattern:t,keyword:"знач",literal:xe},contains:[be,Re,ce]},ke]},e.inherit(e.TITLE_MODE,{begin:t})]};return{name:"1C:Enterprise",case_insensitive:!0,keywords:{$pattern:t,keyword:s,built_in:_,class:ue,type:De,literal:xe},contains:[Ze,tt,ke,Le,be,Re,ce]}}return ld=n,ld}var cd,ME;function DU(){if(ME)return cd;ME=1;function n(e){const t=e.regex,r=/^[a-zA-Z][a-zA-Z0-9-]*/,i=["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],s=e.COMMENT(/;/,/$/),a={scope:"symbol",match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},o={scope:"symbol",match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},l={scope:"symbol",match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/},c={scope:"symbol",match:/%[si](?=".*")/},u={scope:"attribute",match:t.concat(r,/(?=\s*=)/)};return{name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,keywords:i,contains:[{scope:"operator",match:/=\/?/},u,s,a,o,l,c,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}return cd=n,cd}var ud,PE;function xU(){if(PE)return ud;PE=1;function n(e){const t=e.regex,r=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"];return{name:"Apache Access Log",contains:[{className:"number",begin:/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,relevance:5},{className:"number",begin:/\b\d+\b/,relevance:0},{className:"string",begin:t.concat(/"/,t.either(...r)),end:/"/,keywords:r,illegal:/\n/,relevance:5,contains:[{begin:/HTTP\/[12]\.\d'/,relevance:5}]},{className:"string",begin:/\[\d[^\]\n]{8,}\]/,illegal:/\n/,relevance:1},{className:"string",begin:/\[/,end:/\]/,illegal:/\n/,relevance:0},{className:"string",begin:/"Mozilla\/\d\.\d \(/,end:/"/,illegal:/\n/,relevance:3},{className:"string",begin:/"/,end:/"/,illegal:/\n/,relevance:0}]}}return ud=n,ud}var dd,BE;function kU(){if(BE)return dd;BE=1;function n(e){const t=e.regex,r=/[a-zA-Z_$][a-zA-Z0-9_$]*/,i=t.concat(r,t.concat("(\\.",r,")*")),s=/([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)/,a={className:"rest_arg",begin:/[.]{3}/,end:r,relevance:10};return{name:"ActionScript",aliases:["as"],keywords:{keyword:["as","break","case","catch","class","const","continue","default","delete","do","dynamic","each","else","extends","final","finally","for","function","get","if","implements","import","in","include","instanceof","interface","internal","is","namespace","native","new","override","package","private","protected","public","return","set","static","super","switch","this","throw","try","typeof","use","var","void","while","with"],literal:["true","false","null","undefined"]},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{match:[/\bpackage/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{match:[/\b(?:class|interface|extends|implements)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{className:"meta",beginKeywords:"import include",end:/;/,keywords:{keyword:"import include"}},{beginKeywords:"function",end:/[{;]/,excludeEnd:!0,illegal:/\S/,contains:[e.inherit(e.TITLE_MODE,{className:"title.function"}),{className:"params",begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a]},{begin:t.concat(/:\s*/,s)}]},e.METHOD_GUARD],illegal:/#/}}return dd=n,dd}var pd,UE;function LU(){if(UE)return pd;UE=1;function n(e){const t="\\d(_|\\d)*",r="[eE][-+]?"+t,i=t+"(\\."+t+")?("+r+")?",s="\\w+",o="\\b("+(t+"#"+s+"(\\."+s+")?#("+r+")?")+"|"+i+")",l="[A-Za-z](_?[A-Za-z0-9.])*",c=`[]\\{\\}%#'"`,u=e.COMMENT("--","$"),p={begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:c,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:l,endsParent:!0,relevance:0}]};return{name:"Ada",case_insensitive:!0,keywords:{keyword:["abort","else","new","return","abs","elsif","not","reverse","abstract","end","accept","entry","select","access","exception","of","separate","aliased","exit","or","some","all","others","subtype","and","for","out","synchronized","array","function","overriding","at","tagged","generic","package","task","begin","goto","pragma","terminate","body","private","then","if","procedure","type","case","in","protected","constant","interface","is","raise","use","declare","range","delay","limited","record","when","delta","loop","rem","while","digits","renames","with","do","mod","requeue","xor"],literal:["True","False"]},contains:[u,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:o,relevance:0},{className:"symbol",begin:"'"+l},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:c},{begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overriding function procedure with is renames return",returnBegin:!0,contains:[u,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:c},p,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:c}]},{className:"type",begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:c},p]}}return pd=n,pd}var hd,FE;function MU(){if(FE)return hd;FE=1;function n(e){const t={className:"built_in",begin:"\\b(void|bool|int8|int16|int32|int64|int|uint8|uint16|uint32|uint64|uint|string|ref|array|double|float|auto|dictionary)"},r={className:"symbol",begin:"[a-zA-Z0-9_]+@"},i={className:"keyword",begin:"<",end:">",contains:[t,r]};return t.contains=[i],r.contains=[i],{name:"AngelScript",aliases:["asc"],keywords:["for","in|0","break","continue","while","do|0","return","if","else","case","switch","namespace","is","cast","or","and","xor","not","get|0","in","inout|10","out","override","set|0","private","public","const","default|0","final","shared","external","mixin|10","enum","typedef","funcdef","this","super","import","from","interface","abstract|0","try","catch","protected","explicit","property"],illegal:"(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])",contains:[{className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"""',end:'"""'},{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:"^\\s*\\[",end:"\\]"},{beginKeywords:"interface namespace",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]},{beginKeywords:"class",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+",contains:[{begin:"[:,]\\s*",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]}]}]},t,r,{className:"literal",begin:"\\b(null|true|false)"},{className:"number",relevance:0,begin:"(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)"}]}}return hd=n,hd}var fd,YE;function PU(){if(YE)return fd;YE=1;function n(e){const t={className:"number",begin:/[$%]\d+/},r={className:"number",begin:/\b\d+/},i={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/},s={className:"number",begin:/:\d{1,5}/};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[i,s,e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{_:["order","deny","allow","setenv","rewriterule","rewriteengine","rewritecond","documentroot","sethandler","errordocument","loadmodule","options","header","listen","serverroot","servername"]},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",t]},i,r,e.QUOTE_STRING_MODE]}}],illegal:/\S/}}return fd=n,fd}var md,$E;function BU(){if($E)return md;$E=1;function n(e){const t=e.regex,r=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),i={className:"params",begin:/\(/,end:/\)/,contains:["self",e.C_NUMBER_MODE,r]},s=e.COMMENT(/--/,/$/),a=e.COMMENT(/\(\*/,/\*\)/,{contains:["self",s]}),o=[s,a,e.HASH_COMMENT_MODE],l=[/apart from/,/aside from/,/instead of/,/out of/,/greater than/,/isn't|(doesn't|does not) (equal|come before|come after|contain)/,/(greater|less) than( or equal)?/,/(starts?|ends|begins?) with/,/contained by/,/comes (before|after)/,/a (ref|reference)/,/POSIX (file|path)/,/(date|time) string/,/quoted form/],c=[/clipboard info/,/the clipboard/,/info for/,/list (disks|folder)/,/mount volume/,/path to/,/(close|open for) access/,/(get|set) eof/,/current date/,/do shell script/,/get volume settings/,/random number/,/set volume/,/system attribute/,/system info/,/time to GMT/,/(load|run|store) script/,/scripting components/,/ASCII (character|number)/,/localized string/,/choose (application|color|file|file name|folder|from list|remote application|URL)/,/display (alert|dialog)/];return{name:"AppleScript",aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name|0 paragraph paragraphs rest reverse running time version weekday word words year"},contains:[r,e.C_NUMBER_MODE,{className:"built_in",begin:t.concat(/\b/,t.either(...c),/\b/)},{className:"built_in",begin:/^\s*return\b/},{className:"literal",begin:/\b(text item delimiters|current application|missing value)\b/},{className:"keyword",begin:t.concat(/\b/,t.either(...l),/\b/)},{beginKeywords:"on",illegal:/[${=;\n]/,contains:[e.UNDERSCORE_TITLE_MODE,i]},...o],illegal:/\/\/|->|=>|\[\[/}}return md=n,md}var gd,GE;function UU(){if(GE)return gd;GE=1;function n(e){const t="[A-Za-z_][0-9A-Za-z_]*",r={keyword:["if","for","while","var","new","function","do","return","void","else","break"],literal:["BackSlash","DoubleQuote","false","ForwardSlash","Infinity","NaN","NewLine","null","PI","SingleQuote","Tab","TextFormatting","true","undefined"],built_in:["Abs","Acos","All","Angle","Any","Area","AreaGeodetic","Array","Asin","Atan","Atan2","Attachments","Average","Back","Bearing","Boolean","Buffer","BufferGeodetic","Ceil","Centroid","Clip","Concatenate","Console","Constrain","Contains","ConvertDirection","Cos","Count","Crosses","Cut","Date","DateAdd","DateDiff","Day","Decode","DefaultValue","Densify","DensifyGeodetic","Dictionary","Difference","Disjoint","Distance","DistanceGeodetic","Distinct","Domain","DomainCode","DomainName","EnvelopeIntersects","Equals","Erase","Exp","Expects","Extent","Feature","FeatureSet","FeatureSetByAssociation","FeatureSetById","FeatureSetByName","FeatureSetByPortalItem","FeatureSetByRelationshipName","Filter","Find","First","Floor","FromCharCode","FromCodePoint","FromJSON","GdbVersion","Generalize","Geometry","GetFeatureSet","GetUser","GroupBy","Guid","Hash","HasKey","Hour","IIf","Includes","IndexOf","Insert","Intersection","Intersects","IsEmpty","IsNan","ISOMonth","ISOWeek","ISOWeekday","ISOYear","IsSelfIntersecting","IsSimple","Left|0","Length","Length3D","LengthGeodetic","Log","Lower","Map","Max","Mean","Mid","Millisecond","Min","Minute","Month","MultiPartToSinglePart","Multipoint","NextSequenceValue","None","Now","Number","Offset|0","OrderBy","Overlaps","Point","Polygon","Polyline","Pop","Portal","Pow","Proper","Push","Random","Reduce","Relate","Replace","Resize","Reverse","Right|0","RingIsClockwise","Rotate","Round","Schema","Second","SetGeometry","Simplify","Sin","Slice","Sort","Splice","Split","Sqrt","Stdev","SubtypeCode","SubtypeName","Subtypes","Sum","SymmetricDifference","Tan","Text","Timestamp","ToCharCode","ToCodePoint","Today","ToHex","ToLocal","Top|0","Touches","ToUTC","TrackAccelerationAt","TrackAccelerationWindow","TrackCurrentAcceleration","TrackCurrentDistance","TrackCurrentSpeed","TrackCurrentTime","TrackDistanceAt","TrackDistanceWindow","TrackDuration","TrackFieldWindow","TrackGeometryWindow","TrackIndex","TrackSpeedAt","TrackSpeedWindow","TrackStartTime","TrackWindow","Trim","TypeOf","Union","Upper","UrlEncode","Variance","Week","Weekday","When","Within","Year"]},i={className:"symbol",begin:"\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+"},s={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},a={className:"subst",begin:"\\$\\{",end:"\\}",keywords:r,contains:[]},o={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,a]};a.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,s,e.REGEXP_MODE];const l=a.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{name:"ArcGIS Arcade",case_insensitive:!0,keywords:r,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,s,{begin:/[{,]\s*/,relevance:0,contains:[{begin:t+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:t,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(return)\\b)\\s*",keywords:"return",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+t+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:l}]}]}],relevance:0},{beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{className:"title.function",begin:t}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:l}],illegal:/\[|%/},{begin:/\$[(.]/}],illegal:/#(?!!)/}}return gd=n,gd}var _d,QE;function FU(){if(QE)return _d;QE=1;function n(t){const r=t.regex,i=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="<[^<>]+>",l="(?!struct)("+s+"|"+r.optional(a)+"[a-zA-Z_]\\w*"+r.optional(o)+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+u+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},m={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},_={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},i,t.C_BLOCK_COMMENT_MODE]},T={className:"title",begin:r.optional(a)+t.IDENT_RE,relevance:0},I=r.optional(a)+t.IDENT_RE+"\\s*\\(",R=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],L=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],$=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],K=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],S={type:L,keyword:R,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:$},N={className:"function.dispatch",relevance:0,keywords:{_hint:K},begin:r.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,r.lookahead(/(<[^<>]+>|)\s*\(/))},k=[N,_,c,i,t.C_BLOCK_COMMENT_MODE,m,p],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:k.concat([{begin:/\(/,end:/\)/,keywords:S,contains:k.concat(["self"]),relevance:0}]),relevance:0},M={className:"function",begin:"("+l+"[\\*&\\s]+)+"+I,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:S,relevance:0},{begin:I,returnBegin:!0,contains:[T],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,m]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[i,t.C_BLOCK_COMMENT_MODE,p,m,c,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",i,t.C_BLOCK_COMMENT_MODE,p,m,c]}]},c,i,t.C_BLOCK_COMMENT_MODE,_]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:S,illegal:"",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(x,M,N,k,[_,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:S,contains:["self",c]},{begin:t.IDENT_RE+"::",keywords:S},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function e(t){const r={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},i=n(t),s=i.keywords;return s.type=[...s.type,...r.type],s.literal=[...s.literal,...r.literal],s.built_in=[...s.built_in,...r.built_in],s._hints=r._hints,i.name="Arduino",i.aliases=["ino"],i.supersetOf="cpp",i}return _d=e,_d}var Sd,qE;function YU(){if(qE)return Sd;qE=1;function n(e){const t={variants:[e.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,excludeBegin:!0}),e.COMMENT("[;@]","$",{relevance:0}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+e.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},t,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}return Sd=n,Sd}var Od,VE;function $U(){if(VE)return Od;VE=1;function n(e){const t=e.regex,r=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|[0-9]+;|[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),c=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[a,c,l,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[a,o,c,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/ The Great
Topos Opera
Act IThe Great... The Great
Topos Opera
Act IIThe Great... The Great
Topos Opera
Act IIIThe Great... Random
testsRandom... Sent by
Santa
ClausSent by... Modular Set
Part IModular Set... Modular Set
Part I (Alt)Modular Set... Modular Set
Part IIModular Set... TOPOS: AN INTERFACE TO MANY UNIVERSESTOPOS: AN INTERFACE TO MANY UNIVERSES DNB for
toddlersDNB for... Techno set:
IntroductionTechno set:... Techno Set:
ContinuationTechno Set:... Techno Set:
EndingTechno Set:... Samba &
Bossa Nova
ExperimentsSamba &... Synths,
Succulents,
CoffeeSynths,... Topos
Jungle
MusicTopos... Orchestral
Music &
TrumpetsOrchestral... \ No newline at end of file diff --git a/index.html b/index.html index 177f3b8..6642fe7 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - + Text is not SVG - cannot display