@vue-skuilder/courseware 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/default/questions/fillIn/index.d.ts +4 -4
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.mjs +96 -93
- package/dist/index.mjs.map +1 -1
- package/dist/typing/questions/falling-letters/FallingLetters.vue.d.ts +26 -9
- package/dist/typing/questions/falling-letters/FallingLetters.vue.d.ts.map +1 -1
- package/dist/typing/questions/falling-letters/FallingLettersQuestion.d.ts +32 -0
- package/dist/typing/questions/falling-letters/FallingLettersQuestion.d.ts.map +1 -0
- package/dist/typing/questions/falling-letters/index.d.ts +1 -143
- package/dist/typing/questions/falling-letters/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs.js
CHANGED
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
//! momentjs.com
|
|
72
72
|
var Hs,Ys;function Us(){return Hs.apply(null,arguments)}function Gs(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function Ws(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function $s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ks(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if($s(e,t))return!1;return!0}function Qs(e){return void 0===e}function Xs(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function Zs(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function Js(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function ea(e,t){for(var n in t)$s(t,n)&&(e[n]=t[n]);return $s(t,"toString")&&(e.toString=t.toString),$s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function ta(e,t,n,r){return xc(e,t,n,r,!0).utc()}function na(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function ra(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());return r&&(t=na(e),n=Ys.call(t.parsedDateParts,(function(e){return null!=e})),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?r:(e._isValid=r,e._isValid)}function ia(e){var t=ta(NaN);return null!=e?ea(na(t),e):na(t).userInvalidated=!0,t}Ys=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var sa=Us.momentProperties=[],aa=!1;function oa(e,t){var n,r,i,s=sa.length;if(Qs(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Qs(t._i)||(e._i=t._i),Qs(t._f)||(e._f=t._f),Qs(t._l)||(e._l=t._l),Qs(t._strict)||(e._strict=t._strict),Qs(t._tzm)||(e._tzm=t._tzm),Qs(t._isUTC)||(e._isUTC=t._isUTC),Qs(t._offset)||(e._offset=t._offset),Qs(t._pf)||(e._pf=na(t)),Qs(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)Qs(i=t[r=sa[n]])||(e[r]=i);return e}function ca(e){oa(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===aa&&(aa=!0,Us.updateOffset(this),aa=!1)}function la(e){return e instanceof ca||null!=e&&null!=e._isAMomentObject}function ua(e){!1===Us.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function ha(e,t){var n=!0;return ea((function(){if(null!=Us.deprecationHandler&&Us.deprecationHandler(null,e),n){var r,i,s,a=[],o=arguments.length;for(i=0;i<o;i++){if(r="","object"==typeof arguments[i]){for(s in r+="\n["+i+"] ",arguments[0])$s(arguments[0],s)&&(r+=s+": "+arguments[0][s]+", ");r=r.slice(0,-2)}else r=arguments[i];a.push(r)}ua(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var da,fa={};function pa(e,t){null!=Us.deprecationHandler&&Us.deprecationHandler(e,t),fa[e]||(ua(t),fa[e]=!0)}function ma(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function ga(e,t){var n,r=ea({},e);for(n in t)$s(t,n)&&(Ws(e[n])&&Ws(t[n])?(r[n]={},ea(r[n],e[n]),ea(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)$s(e,n)&&!$s(t,n)&&Ws(e[n])&&(r[n]=ea({},r[n]));return r}function va(e){null!=e&&this.set(e)}Us.suppressDeprecationWarnings=!1,Us.deprecationHandler=null,da=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)$s(e,t)&&n.push(t);return n};function ba(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var ya=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,_a=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,wa={},xa={};function ka(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(xa[e]=i),t&&(xa[t[0]]=function(){return ba(i.apply(this,arguments),t[1],t[2])}),n&&(xa[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function Sa(e,t){return e.isValid()?(t=Ca(t,e.localeData()),wa[t]=wa[t]||function(e){var t,n,r,i=e.match(ya);for(t=0,n=i.length;t<n;t++)xa[i[t]]?i[t]=xa[i[t]]:i[t]=(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,s="";for(r=0;r<n;r++)s+=ma(i[r])?i[r].call(t,e):i[r];return s}}(t),wa[t](e)):e.localeData().invalidDate()}function Ca(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(_a.lastIndex=0;n>=0&&_a.test(e);)e=e.replace(_a,r),_a.lastIndex=0,n-=1;return e}var Ma={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ea(e){return"string"==typeof e?Ma[e]||Ma[e.toLowerCase()]:void 0}function Ta(e){var t,n,r={};for(n in e)$s(e,n)&&(t=Ea(n))&&(r[t]=e[n]);return r}var Pa={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var Aa,Na=/\d/,Ia=/\d\d/,Oa=/\d{3}/,Da=/\d{4}/,La=/[+-]?\d{6}/,Ba=/\d\d?/,Va=/\d\d\d\d?/,Ra=/\d\d\d\d\d\d?/,Fa=/\d{1,3}/,za=/\d{1,4}/,ja=/[+-]?\d{1,6}/,qa=/\d+/,Ha=/[+-]?\d+/,Ya=/Z|[+-]\d\d:?\d\d/gi,Ua=/Z|[+-]\d\d(?::?\d\d)?/gi,Ga=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Wa=/^[1-9]\d?/,$a=/^([1-9]\d|\d)/;function Ka(e,t,n){Aa[e]=ma(t)?t:function(e,r){return e&&n?n:t}}function Qa(e,t){return $s(Aa,e)?Aa[e](t._strict,t._locale):new RegExp(Xa(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function Xa(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Za(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ja(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Za(t)),n}Aa={};var eo={};function to(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),Xs(t)&&(i=function(e,n){n[t]=Ja(e)}),r=e.length,n=0;n<r;n++)eo[e[n]]=i}function no(e,t){to(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function ro(e,t,n){null!=t&&$s(eo,e)&&eo[e](t,n._a,n,e)}function io(e){return e%4==0&&e%100!=0||e%400==0}var so=0,ao=1,oo=2,co=3,lo=4,uo=5,ho=6,fo=7,po=8;function mo(e){return io(e)?366:365}ka("Y",0,0,(function(){var e=this.year();return e<=9999?ba(e,4):"+"+e})),ka(0,["YY",2],0,(function(){return this.year()%100})),ka(0,["YYYY",4],0,"year"),ka(0,["YYYYY",5],0,"year"),ka(0,["YYYYYY",6,!0],0,"year"),Ka("Y",Ha),Ka("YY",Ba,Ia),Ka("YYYY",za,Da),Ka("YYYYY",ja,La),Ka("YYYYYY",ja,La),to(["YYYYY","YYYYYY"],so),to("YYYY",(function(e,t){t[so]=2===e.length?Us.parseTwoDigitYear(e):Ja(e)})),to("YY",(function(e,t){t[so]=Us.parseTwoDigitYear(e)})),to("Y",(function(e,t){t[so]=parseInt(e,10)})),Us.parseTwoDigitYear=function(e){return Ja(e)+(Ja(e)>68?1900:2e3)};var go,vo=bo("FullYear",!0);function bo(e,t){return function(n){return null!=n?(_o(this,e,n),Us.updateOffset(this,t),this):yo(this,e)}}function yo(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function _o(e,t,n){var r,i,s,a,o;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,a=e.month(),o=29!==(o=e.date())||1!==a||io(s)?o:28,i?r.setUTCFullYear(s,a,o):r.setFullYear(s,a,o)}}function wo(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?io(e)?29:28:31-r%7%2}go=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},ka("M",["MM",2],"Mo",(function(){return this.month()+1})),ka("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),ka("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),Ka("M",Ba,Wa),Ka("MM",Ba,Ia),Ka("MMM",(function(e,t){return t.monthsShortRegex(e)})),Ka("MMMM",(function(e,t){return t.monthsRegex(e)})),to(["M","MM"],(function(e,t){t[ao]=Ja(e)-1})),to(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[ao]=i:na(n).invalidMonth=e}));var xo="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ko="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),So=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Co=Ga,Mo=Ga;function Eo(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=ta([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=go.call(this._shortMonthsParse,a))?i:null:-1!==(i=go.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=go.call(this._shortMonthsParse,a))||-1!==(i=go.call(this._longMonthsParse,a))?i:null:-1!==(i=go.call(this._longMonthsParse,a))||-1!==(i=go.call(this._shortMonthsParse,a))?i:null}function To(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Ja(t);else if(!Xs(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,wo(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Po(e){return null!=e?(To(this,e),Us.updateOffset(this,!0),this):yo(this,"Month")}function Ao(){function e(e,t){return t.length-e.length}var t,n,r,i,s=[],a=[],o=[];for(t=0;t<12;t++)n=ta([2e3,t]),r=Xa(this.monthsShort(n,"")),i=Xa(this.months(n,"")),s.push(r),a.push(i),o.push(i),o.push(r);s.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function No(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Io(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Oo(e,t,n){var r=7+t-n;return-((7+Io(e,0,r).getUTCDay()-t)%7)+r-1}function Do(e,t,n,r,i){var s,a,o=1+7*(t-1)+(7+n-r)%7+Oo(e,r,i);return o<=0?a=mo(s=e-1)+o:o>mo(e)?(s=e+1,a=o-mo(e)):(s=e,a=o),{year:s,dayOfYear:a}}function Lo(e,t,n){var r,i,s=Oo(e.year(),t,n),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?r=a+Bo(i=e.year()-1,t,n):a>Bo(e.year(),t,n)?(r=a-Bo(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Bo(e,t,n){var r=Oo(e,t,n),i=Oo(e+1,t,n);return(mo(e)-r+i)/7}ka("w",["ww",2],"wo","week"),ka("W",["WW",2],"Wo","isoWeek"),Ka("w",Ba,Wa),Ka("ww",Ba,Ia),Ka("W",Ba,Wa),Ka("WW",Ba,Ia),no(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=Ja(e)}));function Vo(e,t){return e.slice(t,7).concat(e.slice(0,t))}ka("d",0,"do","day"),ka("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),ka("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),ka("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),ka("e",0,0,"weekday"),ka("E",0,0,"isoWeekday"),Ka("d",Ba),Ka("e",Ba),Ka("E",Ba),Ka("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ka("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ka("dddd",(function(e,t){return t.weekdaysRegex(e)})),no(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:na(n).invalidWeekday=e})),no(["d","e","E"],(function(e,t,n,r){t[r]=Ja(e)}));var Ro="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fo="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),jo=Ga,qo=Ga,Ho=Ga;function Yo(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=ta([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=go.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=go.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=go.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=go.call(this._weekdaysParse,a))||-1!==(i=go.call(this._shortWeekdaysParse,a))||-1!==(i=go.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=go.call(this._shortWeekdaysParse,a))||-1!==(i=go.call(this._weekdaysParse,a))||-1!==(i=go.call(this._minWeekdaysParse,a))?i:null:-1!==(i=go.call(this._minWeekdaysParse,a))||-1!==(i=go.call(this._weekdaysParse,a))||-1!==(i=go.call(this._shortWeekdaysParse,a))?i:null}function Uo(){function e(e,t){return t.length-e.length}var t,n,r,i,s,a=[],o=[],c=[],l=[];for(t=0;t<7;t++)n=ta([2e3,1]).day(t),r=Xa(this.weekdaysMin(n,"")),i=Xa(this.weekdaysShort(n,"")),s=Xa(this.weekdays(n,"")),a.push(r),o.push(i),c.push(s),l.push(r),l.push(i),l.push(s);a.sort(e),o.sort(e),c.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Go(){return this.hours()%12||12}function Wo(e,t){ka(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function $o(e,t){return t._meridiemParse}ka("H",["HH",2],0,"hour"),ka("h",["hh",2],0,Go),ka("k",["kk",2],0,(function(){return this.hours()||24})),ka("hmm",0,0,(function(){return""+Go.apply(this)+ba(this.minutes(),2)})),ka("hmmss",0,0,(function(){return""+Go.apply(this)+ba(this.minutes(),2)+ba(this.seconds(),2)})),ka("Hmm",0,0,(function(){return""+this.hours()+ba(this.minutes(),2)})),ka("Hmmss",0,0,(function(){return""+this.hours()+ba(this.minutes(),2)+ba(this.seconds(),2)})),Wo("a",!0),Wo("A",!1),Ka("a",$o),Ka("A",$o),Ka("H",Ba,$a),Ka("h",Ba,Wa),Ka("k",Ba,Wa),Ka("HH",Ba,Ia),Ka("hh",Ba,Ia),Ka("kk",Ba,Ia),Ka("hmm",Va),Ka("hmmss",Ra),Ka("Hmm",Va),Ka("Hmmss",Ra),to(["H","HH"],co),to(["k","kk"],(function(e,t,n){var r=Ja(e);t[co]=24===r?0:r})),to(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),to(["h","hh"],(function(e,t,n){t[co]=Ja(e),na(n).bigHour=!0})),to("hmm",(function(e,t,n){var r=e.length-2;t[co]=Ja(e.substr(0,r)),t[lo]=Ja(e.substr(r)),na(n).bigHour=!0})),to("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[co]=Ja(e.substr(0,r)),t[lo]=Ja(e.substr(r,2)),t[uo]=Ja(e.substr(i)),na(n).bigHour=!0})),to("Hmm",(function(e,t,n){var r=e.length-2;t[co]=Ja(e.substr(0,r)),t[lo]=Ja(e.substr(r))})),to("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[co]=Ja(e.substr(0,r)),t[lo]=Ja(e.substr(r,2)),t[uo]=Ja(e.substr(i))}));var Ko=bo("Hours",!0);var Qo,Xo={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xo,monthsShort:ko,week:{dow:0,doy:6},weekdays:Ro,weekdaysMin:zo,weekdaysShort:Fo,meridiemParse:/[ap]\.?m?\.?/i},Zo={},Jo={};function ec(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function tc(e){return e?e.toLowerCase().replace("_","-"):e}function nc(e){var t=null;if(void 0===Zo[e]&&"undefined"!=typeof module&&module&&module.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(e))try{t=Qo._abbr,require("./locale/"+e),rc(t)}catch(n){Zo[e]=null}return Zo[e]}function rc(e,t){var n;return e&&((n=Qs(t)?sc(e):ic(e,t))?Qo=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Qo._abbr}function ic(e,t){if(null!==t){var n,r=Xo;if(t.abbr=e,null!=Zo[e])pa("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Zo[e]._config;else if(null!=t.parentLocale)if(null!=Zo[t.parentLocale])r=Zo[t.parentLocale]._config;else{if(null==(n=nc(t.parentLocale)))return Jo[t.parentLocale]||(Jo[t.parentLocale]=[]),Jo[t.parentLocale].push({name:e,config:t}),null;r=n._config}return Zo[e]=new va(ga(r,t)),Jo[e]&&Jo[e].forEach((function(e){ic(e.name,e.config)})),rc(e),Zo[e]}return delete Zo[e],null}function sc(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qo;if(!Gs(e)){if(t=nc(e))return t;e=[e]}return function(e){for(var t,n,r,i,s=0;s<e.length;){for(t=(i=tc(e[s]).split("-")).length,n=(n=tc(e[s+1]))?n.split("-"):null;t>0;){if(r=nc(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&ec(i,n)>=t-1)break;t--}s++}return Qo}(e)}function ac(e){var t,n=e._a;return n&&-2===na(e).overflow&&(t=n[ao]<0||n[ao]>11?ao:n[oo]<1||n[oo]>wo(n[so],n[ao])?oo:n[co]<0||n[co]>24||24===n[co]&&(0!==n[lo]||0!==n[uo]||0!==n[ho])?co:n[lo]<0||n[lo]>59?lo:n[uo]<0||n[uo]>59?uo:n[ho]<0||n[ho]>999?ho:-1,na(e)._overflowDayOfYear&&(t<so||t>oo)&&(t=oo),na(e)._overflowWeeks&&-1===t&&(t=fo),na(e)._overflowWeekday&&-1===t&&(t=po),na(e).overflow=t),e}var oc=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,cc=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,lc=/Z|[+-]\d\d(?::?\d\d)?/,uc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],hc=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],dc=/^\/?Date\((-?\d+)/i,fc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,pc={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function mc(e){var t,n,r,i,s,a,o=e._i,c=oc.exec(o)||cc.exec(o),l=uc.length,u=hc.length;if(c){for(na(e).iso=!0,t=0,n=l;t<n;t++)if(uc[t][1].exec(c[1])){i=uc[t][0],r=!1!==uc[t][2];break}if(null==i)return void(e._isValid=!1);if(c[3]){for(t=0,n=u;t<n;t++)if(hc[t][1].exec(c[3])){s=(c[2]||" ")+hc[t][0];break}if(null==s)return void(e._isValid=!1)}if(!r&&null!=s)return void(e._isValid=!1);if(c[4]){if(!lc.exec(c[4]))return void(e._isValid=!1);a="Z"}e._f=i+(s||"")+(a||""),_c(e)}else e._isValid=!1}function gc(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function vc(e){var t,n,r,i,s,a,o,c,l=fc.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){if(n=l[4],r=l[3],i=l[2],s=l[5],a=l[6],o=l[7],c=[gc(n),ko.indexOf(r),parseInt(i,10),parseInt(s,10),parseInt(a,10)],o&&c.push(parseInt(o,10)),t=c,!function(e,t,n){return!e||Fo.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(na(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return pc[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(l[8],l[9],l[10]),e._d=Io.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),na(e).rfc2822=!0}else e._isValid=!1}function bc(e,t,n){return null!=e?e:null!=t?t:n}function yc(e){var t,n,r,i,s,a=[];if(!e._d){for(r=function(e){var t=new Date(Us.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[oo]&&null==e._a[ao]&&function(e){var t,n,r,i,s,a,o,c,l;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(s=1,a=4,n=bc(t.GG,e._a[so],Lo(kc(),1,4).year),r=bc(t.W,1),((i=bc(t.E,1))<1||i>7)&&(c=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,l=Lo(kc(),s,a),n=bc(t.gg,e._a[so],l.year),r=bc(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(c=!0):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(c=!0)):i=s);r<1||r>Bo(n,s,a)?na(e)._overflowWeeks=!0:null!=c?na(e)._overflowWeekday=!0:(o=Do(n,r,i,s,a),e._a[so]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(s=bc(e._a[so],r[so]),(e._dayOfYear>mo(s)||0===e._dayOfYear)&&(na(e)._overflowDayOfYear=!0),n=Io(s,0,e._dayOfYear),e._a[ao]=n.getUTCMonth(),e._a[oo]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[co]&&0===e._a[lo]&&0===e._a[uo]&&0===e._a[ho]&&(e._nextDay=!0,e._a[co]=0),e._d=(e._useUTC?Io:No).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[co]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(na(e).weekdayMismatch=!0)}}function _c(e){if(e._f!==Us.ISO_8601)if(e._f!==Us.RFC_2822){e._a=[],na(e).empty=!0;var t,n,r,i,s,a,o,c=""+e._i,l=c.length,u=0;for(o=(r=Ca(e._f,e._locale).match(ya)||[]).length,t=0;t<o;t++)i=r[t],(n=(c.match(Qa(i,e))||[])[0])&&((s=c.substr(0,c.indexOf(n))).length>0&&na(e).unusedInput.push(s),c=c.slice(c.indexOf(n)+n.length),u+=n.length),xa[i]?(n?na(e).empty=!1:na(e).unusedTokens.push(i),ro(i,n,e)):e._strict&&!n&&na(e).unusedTokens.push(i);na(e).charsLeftOver=l-u,c.length>0&&na(e).unusedInput.push(c),e._a[co]<=12&&!0===na(e).bigHour&&e._a[co]>0&&(na(e).bigHour=void 0),na(e).parsedDateParts=e._a.slice(0),na(e).meridiem=e._meridiem,e._a[co]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[co],e._meridiem),null!==(a=na(e).era)&&(e._a[so]=e._locale.erasConvertYear(a,e._a[so])),yc(e),ac(e)}else vc(e);else mc(e)}function wc(e){var t=e._i,n=e._f;return e._locale=e._locale||sc(e._l),null===t||void 0===n&&""===t?ia({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),la(t)?new ca(ac(t)):(Zs(t)?e._d=t:Gs(n)?function(e){var t,n,r,i,s,a,o=!1,c=e._f.length;if(0===c)return na(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<c;i++)s=0,a=!1,t=oa({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],_c(t),ra(t)&&(a=!0),s+=na(t).charsLeftOver,s+=10*na(t).unusedTokens.length,na(t).score=s,o?s<r&&(r=s,n=t):(null==r||s<r||a)&&(r=s,n=t,a&&(o=!0));ea(e,n||t)}(e):n?_c(e):function(e){var t=e._i;Qs(t)?e._d=new Date(Us.now()):Zs(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=dc.exec(e._i);null===t?(mc(e),!1===e._isValid&&(delete e._isValid,vc(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:Us.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):Gs(t)?(e._a=Js(t.slice(0),(function(e){return parseInt(e,10)})),yc(e)):Ws(t)?function(e){if(!e._d){var t=Ta(e._i),n=void 0===t.day?t.date:t.day;e._a=Js([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),yc(e)}}(e):Xs(t)?e._d=new Date(t):Us.createFromInputFallback(e)}(e),ra(e)||(e._d=null),e))}function xc(e,t,n,r,i){var s,a={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(Ws(e)&&Ks(e)||Gs(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,(s=new ca(ac(wc(a))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function kc(e,t,n,r){return xc(e,t,n,r,!1)}Us.createFromInputFallback=ha("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),Us.ISO_8601=function(){},Us.RFC_2822=function(){};var Sc=ha("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=kc.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:ia()})),Cc=ha("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=kc.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:ia()}));function Mc(e,t){var n,r;if(1===t.length&&Gs(t[0])&&(t=t[0]),!t.length)return kc();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Ec=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Tc(e){var t=Ta(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,i=Ec.length;for(t in e)if($s(e,t)&&(-1===go.call(Ec,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Ec[n]]){if(r)return!1;parseFloat(e[Ec[n]])!==Ja(e[Ec[n]])&&(r=!0)}return!0}(t),this._milliseconds=+u+1e3*l+6e4*c+1e3*o*60*60,this._days=+a+7*s,this._months=+i+3*r+12*n,this._data={},this._locale=sc(),this._bubble()}function Pc(e){return e instanceof Tc}function Ac(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Nc(e,t){ka(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+ba(~~(e/60),2)+t+ba(~~e%60,2)}))}Nc("Z",":"),Nc("ZZ",""),Ka("Z",Ua),Ka("ZZ",Ua),to(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Oc(Ua,e)}));var Ic=/([\+\-]|\d\d)/gi;function Oc(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(Ic)||["-",0,0])[1]+Ja(n[2]))?0:"+"===n[0]?r:-r}function Dc(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(la(e)||Zs(e)?e.valueOf():kc(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Us.updateOffset(n,!1),n):kc(e).local()}function Lc(e){return-Math.round(e._d.getTimezoneOffset())}function Bc(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}Us.updateOffset=function(){};var Vc=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Rc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Fc(e,t){var n,r,i,s=e,a=null;return Pc(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:Xs(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(a=Vc.exec(e))?(n="-"===a[1]?-1:1,s={y:0,d:Ja(a[oo])*n,h:Ja(a[co])*n,m:Ja(a[lo])*n,s:Ja(a[uo])*n,ms:Ja(Ac(1e3*a[ho]))*n}):(a=Rc.exec(e))?(n="-"===a[1]?-1:1,s={y:zc(a[2],n),M:zc(a[3],n),w:zc(a[4],n),d:zc(a[5],n),h:zc(a[6],n),m:zc(a[7],n),s:zc(a[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Dc(t,e),e.isBefore(t)?n=jc(e,t):((n=jc(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(kc(s.from),kc(s.to)),(s={}).ms=i.milliseconds,s.M=i.months),r=new Tc(s),Pc(e)&&$s(e,"_locale")&&(r._locale=e._locale),Pc(e)&&$s(e,"_isValid")&&(r._isValid=e._isValid),r}function zc(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function jc(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function qc(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(pa(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Hc(this,Fc(n,r),e),this}}function Hc(e,t,n,r){var i=t._milliseconds,s=Ac(t._days),a=Ac(t._months);e.isValid()&&(r=null==r||r,a&&To(e,yo(e,"Month")+a*n),s&&_o(e,"Date",yo(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&Us.updateOffset(e,s||a))}Fc.fn=Tc.prototype,Fc.invalid=function(){return Fc(NaN)};var Yc=qc(1,"add"),Uc=qc(-1,"subtract");function Gc(e){return"string"==typeof e||e instanceof String}function Wc(e){return la(e)||Zs(e)||Gc(e)||Xs(e)||function(e){var t=Gs(e),n=!1;t&&(n=0===e.filter((function(t){return!Xs(t)&&Gc(e)})).length);return t&&n}(e)||function(e){var t,n,r=Ws(e)&&!Ks(e),i=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=s.length;for(t=0;t<a;t+=1)n=s[t],i=i||$s(e,n);return r&&i}(e)||null==e}function $c(e,t){if(e.date()<t.date())return-$c(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Kc(e){var t;return void 0===e?this._locale._abbr:(null!=(t=sc(e))&&(this._locale=t),this)}Us.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",Us.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Qc=ha("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function Xc(){return this._locale}var Zc=1e3,Jc=6e4,el=36e5,tl=126227808e5;function nl(e,t){return(e%t+t)%t}function rl(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-tl:new Date(e,t,n).valueOf()}function il(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-tl:Date.UTC(e,t,n)}function sl(e,t){return t.erasAbbrRegex(e)}function al(){var e,t,n,r,i,s=[],a=[],o=[],c=[],l=this.eras();for(e=0,t=l.length;e<t;++e)n=Xa(l[e].name),r=Xa(l[e].abbr),i=Xa(l[e].narrow),a.push(n),s.push(r),o.push(i),c.push(n),c.push(r),c.push(i);this._erasRegex=new RegExp("^("+c.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function ol(e,t){ka(0,[e,e.length],0,t)}function cl(e,t,n,r,i){var s;return null==e?Lo(this,r,i).year:(t>(s=Bo(e,r,i))&&(t=s),ll.call(this,e,t,n,r,i))}function ll(e,t,n,r,i){var s=Do(e,t,n,r,i),a=Io(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}ka("N",0,0,"eraAbbr"),ka("NN",0,0,"eraAbbr"),ka("NNN",0,0,"eraAbbr"),ka("NNNN",0,0,"eraName"),ka("NNNNN",0,0,"eraNarrow"),ka("y",["y",1],"yo","eraYear"),ka("y",["yy",2],0,"eraYear"),ka("y",["yyy",3],0,"eraYear"),ka("y",["yyyy",4],0,"eraYear"),Ka("N",sl),Ka("NN",sl),Ka("NNN",sl),Ka("NNNN",(function(e,t){return t.erasNameRegex(e)})),Ka("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),to(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?na(n).era=i:na(n).invalidEra=e})),Ka("y",qa),Ka("yy",qa),Ka("yyy",qa),Ka("yyyy",qa),Ka("yo",(function(e,t){return t._eraYearOrdinalRegex||qa})),to(["y","yy","yyy","yyyy"],so),to(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[so]=n._locale.eraYearOrdinalParse(e,i):t[so]=parseInt(e,10)})),ka(0,["gg",2],0,(function(){return this.weekYear()%100})),ka(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ol("gggg","weekYear"),ol("ggggg","weekYear"),ol("GGGG","isoWeekYear"),ol("GGGGG","isoWeekYear"),Ka("G",Ha),Ka("g",Ha),Ka("GG",Ba,Ia),Ka("gg",Ba,Ia),Ka("GGGG",za,Da),Ka("gggg",za,Da),Ka("GGGGG",ja,La),Ka("ggggg",ja,La),no(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=Ja(e)})),no(["gg","GG"],(function(e,t,n,r){t[r]=Us.parseTwoDigitYear(e)})),ka("Q",0,"Qo","quarter"),Ka("Q",Na),to("Q",(function(e,t){t[ao]=3*(Ja(e)-1)})),ka("D",["DD",2],"Do","date"),Ka("D",Ba,Wa),Ka("DD",Ba,Ia),Ka("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),to(["D","DD"],oo),to("Do",(function(e,t){t[oo]=Ja(e.match(Ba)[0])}));var ul=bo("Date",!0);ka("DDD",["DDDD",3],"DDDo","dayOfYear"),Ka("DDD",Fa),Ka("DDDD",Oa),to(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=Ja(e)})),ka("m",["mm",2],0,"minute"),Ka("m",Ba,$a),Ka("mm",Ba,Ia),to(["m","mm"],lo);var hl=bo("Minutes",!1);ka("s",["ss",2],0,"second"),Ka("s",Ba,$a),Ka("ss",Ba,Ia),to(["s","ss"],uo);var dl,fl,pl=bo("Seconds",!1);for(ka("S",0,0,(function(){return~~(this.millisecond()/100)})),ka(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),ka(0,["SSS",3],0,"millisecond"),ka(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),ka(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),ka(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),ka(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),ka(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),ka(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Ka("S",Fa,Na),Ka("SS",Fa,Ia),Ka("SSS",Fa,Oa),dl="SSSS";dl.length<=9;dl+="S")Ka(dl,qa);function ml(e,t){t[ho]=Ja(1e3*("0."+e))}for(dl="S";dl.length<=9;dl+="S")to(dl,ml);fl=bo("Milliseconds",!1),ka("z",0,0,"zoneAbbr"),ka("zz",0,0,"zoneName");var gl=ca.prototype;function vl(e){return e}gl.add=Yc,gl.calendar=function(e,t){1===arguments.length&&(arguments[0]?Wc(arguments[0])?(e=arguments[0],t=void 0):function(e){var t,n=Ws(e)&&!Ks(e),r=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<i.length;t+=1)r=r||$s(e,i[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||kc(),r=Dc(n,this).startOf("day"),i=Us.calendarFormat(this,r)||"sameElse",s=t&&(ma(t[i])?t[i].call(this,n):t[i]);return this.format(s||this.localeData().calendar(i,this,kc(n)))},gl.clone=function(){return new ca(this)},gl.diff=function(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(!(r=Dc(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=Ea(t)){case"year":s=$c(this,r)/12;break;case"month":s=$c(this,r);break;case"quarter":s=$c(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:Za(s)},gl.endOf=function(e){var t,n;if(void 0===(e=Ea(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?il:rl,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=el-nl(t+(this._isUTC?0:this.utcOffset()*Jc),el)-1;break;case"minute":t=this._d.valueOf(),t+=Jc-nl(t,Jc)-1;break;case"second":t=this._d.valueOf(),t+=Zc-nl(t,Zc)-1}return this._d.setTime(t),Us.updateOffset(this,!0),this},gl.format=function(e){e||(e=this.isUtc()?Us.defaultFormatUtc:Us.defaultFormat);var t=Sa(this,e);return this.localeData().postformat(t)},gl.from=function(e,t){return this.isValid()&&(la(e)&&e.isValid()||kc(e).isValid())?Fc({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gl.fromNow=function(e){return this.from(kc(),e)},gl.to=function(e,t){return this.isValid()&&(la(e)&&e.isValid()||kc(e).isValid())?Fc({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gl.toNow=function(e){return this.to(kc(),e)},gl.get=function(e){return ma(this[e=Ea(e)])?this[e]():this},gl.invalidAt=function(){return na(this).overflow},gl.isAfter=function(e,t){var n=la(e)?e:kc(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Ea(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},gl.isBefore=function(e,t){var n=la(e)?e:kc(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Ea(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},gl.isBetween=function(e,t,n,r){var i=la(e)?e:kc(e),s=la(t)?t:kc(t);return!!(this.isValid()&&i.isValid()&&s.isValid())&&(("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(s,n):!this.isAfter(s,n)))},gl.isSame=function(e,t){var n,r=la(e)?e:kc(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=Ea(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},gl.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},gl.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},gl.isValid=function(){return ra(this)},gl.lang=Qc,gl.locale=Kc,gl.localeData=Xc,gl.max=Cc,gl.min=Sc,gl.parsingFlags=function(){return ea({},na(this))},gl.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)$s(e,t)&&n.push({unit:t,priority:Pa[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=Ta(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(ma(this[e=Ea(e)]))return this[e](t);return this},gl.startOf=function(e){var t,n;if(void 0===(e=Ea(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?il:rl,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=nl(t+(this._isUTC?0:this.utcOffset()*Jc),el);break;case"minute":t=this._d.valueOf(),t-=nl(t,Jc);break;case"second":t=this._d.valueOf(),t-=nl(t,Zc)}return this._d.setTime(t),Us.updateOffset(this,!0),this},gl.subtract=Uc,gl.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},gl.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},gl.toDate=function(){return new Date(this.valueOf())},gl.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Sa(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ma(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Sa(n,"Z")):Sa(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},gl.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(gl[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),gl.toJSON=function(){return this.isValid()?this.toISOString():null},gl.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gl.unix=function(){return Math.floor(this.valueOf()/1e3)},gl.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gl.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gl.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},gl.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},gl.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},gl.eraYear=function(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-Us(i[e].since).year())*n+i[e].offset;return this.year()},gl.year=vo,gl.isLeapYear=function(){return io(this.year())},gl.weekYear=function(e){return cl.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},gl.isoWeekYear=function(e){return cl.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},gl.quarter=gl.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},gl.month=Po,gl.daysInMonth=function(){return wo(this.year(),this.month())},gl.week=gl.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},gl.isoWeek=gl.isoWeeks=function(e){var t=Lo(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},gl.weeksInYear=function(){var e=this.localeData()._week;return Bo(this.year(),e.dow,e.doy)},gl.weeksInWeekYear=function(){var e=this.localeData()._week;return Bo(this.weekYear(),e.dow,e.doy)},gl.isoWeeksInYear=function(){return Bo(this.year(),1,4)},gl.isoWeeksInISOWeekYear=function(){return Bo(this.isoWeekYear(),1,4)},gl.date=ul,gl.day=gl.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=yo(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},gl.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},gl.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},gl.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},gl.hour=gl.hours=Ko,gl.minute=gl.minutes=hl,gl.second=gl.seconds=pl,gl.millisecond=gl.milliseconds=fl,gl.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Oc(Ua,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Lc(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Hc(this,Fc(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Us.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Lc(this)},gl.utc=function(e){return this.utcOffset(0,e)},gl.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Lc(this),"m")),this},gl.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Oc(Ya,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},gl.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?kc(e).utcOffset():0,(this.utcOffset()-e)%60==0)},gl.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gl.isLocal=function(){return!!this.isValid()&&!this._isUTC},gl.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gl.isUtc=Bc,gl.isUTC=Bc,gl.zoneAbbr=function(){return this._isUTC?"UTC":""},gl.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gl.dates=ha("dates accessor is deprecated. Use date instead.",ul),gl.months=ha("months accessor is deprecated. Use month instead",Po),gl.years=ha("years accessor is deprecated. Use year instead",vo),gl.zone=ha("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),gl.isDSTShifted=ha("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!Qs(this._isDSTShifted))return this._isDSTShifted;var e,t={};return oa(t,this),(t=wc(t))._a?(e=t._isUTC?ta(t._a):kc(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var n,r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(n=0;n<r;n++)Ja(e[n])!==Ja(t[n])&&s++;return s+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var bl=va.prototype;function yl(e,t,n,r){var i=sc(),s=ta().set(r,t);return i[n](s,e)}function _l(e,t,n){if(Xs(e)&&(t=e,e=void 0),e=e||"",null!=t)return yl(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=yl(e,r,n,"month");return i}function wl(e,t,n,r){"boolean"==typeof e?(Xs(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,Xs(t)&&(n=t,t=void 0),t=t||"");var i,s=sc(),a=e?s._week.dow:0,o=[];if(null!=n)return yl(t,(n+a)%7,r,"day");for(i=0;i<7;i++)o[i]=yl(t,(i+a)%7,r,"day");return o}bl.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ma(r)?r.call(t,n):r},bl.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ya).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},bl.invalidDate=function(){return this._invalidDate},bl.ordinal=function(e){return this._ordinal.replace("%d",e)},bl.preparse=vl,bl.postformat=vl,bl.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return ma(i)?i(e,t,n,r):i.replace(/%d/i,e)},bl.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return ma(n)?n(t):n.replace(/%s/i,t)},bl.set=function(e){var t,n;for(n in e)$s(e,n)&&(ma(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},bl.eras=function(e,t){var n,r,i,s=this._eras||sc("en")._eras;for(n=0,r=s.length;n<r;++n){if("string"==typeof s[n].since)i=Us(s[n].since).startOf("day"),s[n].since=i.valueOf();switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=Us(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf()}}return s},bl.erasParse=function(e,t,n){var r,i,s,a,o,c=this.eras();for(e=e.toUpperCase(),r=0,i=c.length;r<i;++r)if(s=c[r].name.toUpperCase(),a=c[r].abbr.toUpperCase(),o=c[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return c[r];break;case"NNNN":if(s===e)return c[r];break;case"NNNNN":if(o===e)return c[r]}else if([s,a,o].indexOf(e)>=0)return c[r]},bl.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?Us(e.since).year():Us(e.since).year()+(t-e.offset)*n},bl.erasAbbrRegex=function(e){return $s(this,"_erasAbbrRegex")||al.call(this),e?this._erasAbbrRegex:this._erasRegex},bl.erasNameRegex=function(e){return $s(this,"_erasNameRegex")||al.call(this),e?this._erasNameRegex:this._erasRegex},bl.erasNarrowRegex=function(e){return $s(this,"_erasNarrowRegex")||al.call(this),e?this._erasNarrowRegex:this._erasRegex},bl.months=function(e,t){return e?Gs(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||So).test(t)?"format":"standalone"][e.month()]:Gs(this._months)?this._months:this._months.standalone},bl.monthsShort=function(e,t){return e?Gs(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[So.test(t)?"format":"standalone"][e.month()]:Gs(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},bl.monthsParse=function(e,t,n){var r,i,s;if(this._monthsParseExact)return Eo.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=ta([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},bl.monthsRegex=function(e){return this._monthsParseExact?($s(this,"_monthsRegex")||Ao.call(this),e?this._monthsStrictRegex:this._monthsRegex):($s(this,"_monthsRegex")||(this._monthsRegex=Mo),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},bl.monthsShortRegex=function(e){return this._monthsParseExact?($s(this,"_monthsRegex")||Ao.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):($s(this,"_monthsShortRegex")||(this._monthsShortRegex=Co),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},bl.week=function(e){return Lo(e,this._week.dow,this._week.doy).week},bl.firstDayOfYear=function(){return this._week.doy},bl.firstDayOfWeek=function(){return this._week.dow},bl.weekdays=function(e,t){var n=Gs(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Vo(n,this._week.dow):e?n[e.day()]:n},bl.weekdaysMin=function(e){return!0===e?Vo(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},bl.weekdaysShort=function(e){return!0===e?Vo(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},bl.weekdaysParse=function(e,t,n){var r,i,s;if(this._weekdaysParseExact)return Yo.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ta([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},bl.weekdaysRegex=function(e){return this._weekdaysParseExact?($s(this,"_weekdaysRegex")||Uo.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):($s(this,"_weekdaysRegex")||(this._weekdaysRegex=jo),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},bl.weekdaysShortRegex=function(e){return this._weekdaysParseExact?($s(this,"_weekdaysRegex")||Uo.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):($s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qo),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},bl.weekdaysMinRegex=function(e){return this._weekdaysParseExact?($s(this,"_weekdaysRegex")||Uo.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):($s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ho),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},bl.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},bl.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},rc("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Ja(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),Us.lang=ha("moment.lang is deprecated. Use moment.locale instead.",rc),Us.langData=ha("moment.langData is deprecated. Use moment.localeData instead.",sc);var xl=Math.abs;function kl(e,t,n,r){var i=Fc(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Sl(e){return e<0?Math.floor(e):Math.ceil(e)}function Cl(e){return 4800*e/146097}function Ml(e){return 146097*e/4800}function El(e){return function(){return this.as(e)}}var Tl=El("ms"),Pl=El("s"),Al=El("m"),Nl=El("h"),Il=El("d"),Ol=El("w"),Dl=El("M"),Ll=El("Q"),Bl=El("y"),Vl=Tl;function Rl(e){return function(){return this.isValid()?this._data[e]:NaN}}var Fl=Rl("milliseconds"),zl=Rl("seconds"),jl=Rl("minutes"),ql=Rl("hours"),Hl=Rl("days"),Yl=Rl("months"),Ul=Rl("years");var Gl=Math.round,Wl={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $l(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var Kl=Math.abs;function Ql(e){return(e>0)-(e<0)||+e}function Xl(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,a,o,c=Kl(this._milliseconds)/1e3,l=Kl(this._days),u=Kl(this._months),h=this.asSeconds();return h?(e=Za(c/60),t=Za(e/60),c%=60,e%=60,n=Za(u/12),u%=12,r=c?c.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",s=Ql(this._months)!==Ql(h)?"-":"",a=Ql(this._days)!==Ql(h)?"-":"",o=Ql(this._milliseconds)!==Ql(h)?"-":"",i+"P"+(n?s+n+"Y":"")+(u?s+u+"M":"")+(l?a+l+"D":"")+(t||e||c?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(c?o+r+"S":"")):"P0D"}var Zl=Tc.prototype;Zl.isValid=function(){return this._isValid},Zl.abs=function(){var e=this._data;return this._milliseconds=xl(this._milliseconds),this._days=xl(this._days),this._months=xl(this._months),e.milliseconds=xl(e.milliseconds),e.seconds=xl(e.seconds),e.minutes=xl(e.minutes),e.hours=xl(e.hours),e.months=xl(e.months),e.years=xl(e.years),this},Zl.add=function(e,t){return kl(this,e,t,1)},Zl.subtract=function(e,t){return kl(this,e,t,-1)},Zl.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=Ea(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Cl(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ml(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Zl.asMilliseconds=Tl,Zl.asSeconds=Pl,Zl.asMinutes=Al,Zl.asHours=Nl,Zl.asDays=Il,Zl.asWeeks=Ol,Zl.asMonths=Dl,Zl.asQuarters=Ll,Zl.asYears=Bl,Zl.valueOf=Vl,Zl._bubble=function(){var e,t,n,r,i,s=this._milliseconds,a=this._days,o=this._months,c=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*Sl(Ml(o)+a),a=0,o=0),c.milliseconds=s%1e3,e=Za(s/1e3),c.seconds=e%60,t=Za(e/60),c.minutes=t%60,n=Za(t/60),c.hours=n%24,a+=Za(n/24),o+=i=Za(Cl(a)),a-=Sl(Ml(i)),r=Za(o/12),o%=12,c.days=a,c.months=o,c.years=r,this},Zl.clone=function(){return Fc(this)},Zl.get=function(e){return e=Ea(e),this.isValid()?this[e+"s"]():NaN},Zl.milliseconds=Fl,Zl.seconds=zl,Zl.minutes=jl,Zl.hours=ql,Zl.days=Hl,Zl.weeks=function(){return Za(this.days()/7)},Zl.months=Yl,Zl.years=Ul,Zl.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,s=Wl;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(s=Object.assign({},Wl,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),r=function(e,t,n,r){var i=Fc(e).abs(),s=Gl(i.as("s")),a=Gl(i.as("m")),o=Gl(i.as("h")),c=Gl(i.as("d")),l=Gl(i.as("M")),u=Gl(i.as("w")),h=Gl(i.as("y")),d=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||c<=1&&["d"]||c<n.d&&["dd",c];return null!=n.w&&(d=d||u<=1&&["w"]||u<n.w&&["ww",u]),(d=d||l<=1&&["M"]||l<n.M&&["MM",l]||h<=1&&["y"]||["yy",h])[2]=t,d[3]=+e>0,d[4]=r,$l.apply(null,d)}(this,!i,s,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},Zl.toISOString=Xl,Zl.toString=Xl,Zl.toJSON=Xl,Zl.locale=Kc,Zl.localeData=Xc,Zl.toIsoString=ha("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Xl),Zl.lang=Qc,ka("X",0,0,"unix"),ka("x",0,0,"valueOf"),Ka("x",Ha),Ka("X",/[+-]?\d+(\.\d{1,3})?/),to("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),to("x",(function(e,t,n){n._d=new Date(Ja(e))})),
|
|
73
73
|
//! moment.js
|
|
74
|
-
Us.version="2.30.1",Hs=kc,Us.fn=gl,Us.min=function(){return Mc("isBefore",[].slice.call(arguments,0))},Us.max=function(){return Mc("isAfter",[].slice.call(arguments,0))},Us.now=function(){return Date.now?Date.now():+new Date},Us.utc=ta,Us.unix=function(e){return kc(1e3*e)},Us.months=function(e,t){return _l(e,t,"months")},Us.isDate=Zs,Us.locale=rc,Us.invalid=ia,Us.duration=Fc,Us.isMoment=la,Us.weekdays=function(e,t,n){return wl(e,t,n,"weekdays")},Us.parseZone=function(){return kc.apply(null,arguments).parseZone()},Us.localeData=sc,Us.isDuration=Pc,Us.monthsShort=function(e,t){return _l(e,t,"monthsShort")},Us.weekdaysMin=function(e,t,n){return wl(e,t,n,"weekdaysMin")},Us.defineLocale=ic,Us.updateLocale=function(e,t){if(null!=t){var n,r,i=Xo;null!=Zo[e]&&null!=Zo[e].parentLocale?Zo[e].set(ga(Zo[e]._config,t)):(null!=(r=nc(e))&&(i=r._config),t=ga(i,t),null==r&&(t.abbr=e),(n=new va(t)).parentLocale=Zo[e],Zo[e]=n),rc(e)}else null!=Zo[e]&&(null!=Zo[e].parentLocale?(Zo[e]=Zo[e].parentLocale,e===rc()&&rc(e)):null!=Zo[e]&&delete Zo[e]);return Zo[e]},Us.locales=function(){return da(Zo)},Us.weekdaysShort=function(e,t,n){return wl(e,t,n,"weekdaysShort")},Us.normalizeUnits=Ea,Us.relativeTimeRounding=function(e){return void 0===e?Gl:"function"==typeof e&&(Gl=e,!0)},Us.relativeTimeThreshold=function(e,t){return void 0!==Wl[e]&&(void 0===t?Wl[e]:(Wl[e]=t,"s"===e&&(Wl.ss=t-1),!0))},Us.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},Us.prototype=gl,Us.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Jl=n.defineComponent({name:"SyllableSeqVis",props:{seq:{type:Object,required:!0},lastTSsuggestion:{type:Number,required:!1,default:0}},setup(e){const t=n.ref(0),r=n.ref(0),i=n.ref(0),s=n.ref(500),a=n.computed((()=>{const t=e.seq.syllables[e.seq.syllables.length-1].timestamp;return Math.max(1,t,e.lastTSsuggestion)})),o=n.computed((()=>{let t=0,n=500;return e.seq.syllables.forEach((e=>{e.notes.forEach((e=>{e.note.number>t&&(t=e.note.number),e.note.number<n&&(n=e.note.number)}))})),Math.max(3*(t-n)+10,0)})),c=()=>{try{t.value=e.seq.syllables[0].timestamp;const n=e.seq.syllables[e.seq.syllables.length-1].timestamp,i=t.value+e.lastTSsuggestion;r.value=Math.max(n,i)}catch(n){console.log(`[SyllableSeqVis] Error updating bounds: ${n}`)}e.seq.syllables.forEach((e=>{e.notes.forEach((e=>{e.note.number>i.value&&(i.value=e.note.number),e.note.number<s.value&&(s.value=e.note.number)}))}))};return n.onMounted((()=>{console.log(`SyllableSeqVis created w/ input: \n${e.seq}`),c()})),{firstTS:t,lastTS:r,high:i,low:s,sayNote:e=>{console.log(`${JSON.stringify(e)}`)},getLastTS:a,getHeight:o,updateBounds:c}}}),eu=["height"],tu=["cx","cy","alt","fill","stroke","onMouseenter"];const nu=C(Jl,[["render",function(e,t,r,i,s,a){return n.openBlock(),n.createElementBlock("div",null,[(n.openBlock(),n.createElementBlock("svg",{width:510,height:Math.max(3*(e.high-e.low)+10,0)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.seq.syllables,(t=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.notes,(r=>(n.openBlock(),n.createElementBlock("circle",{key:t.timestamp+"-"+r.note.number,cx:500*(t.timestamp-e.firstTS)/(e.lastTS-e.firstTS)+4,cy:3*(e.high-r.note.number)+4,alt:r.note.name,r:"3",fill:r.isCorrect?"black":r.isMissing?"none":"red",stroke:r.isMissing?"red":"none",onMouseenter:t=>e.sayNote(r)},null,40,tu)))),128))],64)))),256))],8,eu))])}],["__scopeId","data-v-2f79c080"]]),ru=n.defineComponent({name:"NoteDisplay",props:{chroma:{type:Number,required:!0}},setup:e=>({style:t=>{let n="#ffffff";return t===e.chroma?n="#1976D2":1!==t&&3!==t&&6!==t&&8!==t&&10!==t&&-2!==t||(n="#000000"),{fill:n,"fill-opacity":1,stroke:"#000000","stroke-width":.79375,"stroke-miterlimit":4,"stroke-dasharray":"none","stroke-opacity":1}},white:-1,black:-2})}),iu={id:"svg8",width:"300px",height:"auto","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape","sodipodi:docname":"keys.svg","inkscape:version":"1.0rc1 (09960d6f05, 2020-04-09)",version:"1.1",viewBox:"0 0 175.24936 73.594925"},su={id:"metadata5"},au={id:"layer1",transform:"translate(167.75219,-151.96011)","inkscape:groupmode":"layer","inkscape:label":"Layer 1"};const ou=C(ru,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("sodipodi:namedview"),c=n.resolveComponent("dc:format"),l=n.resolveComponent("dc:type"),u=n.resolveComponent("dc:title"),h=n.resolveComponent("cc:Work"),d=n.resolveComponent("rdf:RDF");return n.openBlock(),n.createElementBlock("svg",iu,[t[1]||(t[1]=n.createElementVNode("defs",{id:"defs2"},null,-1)),n.createVNode(o,{id:"base","inkscape:window-maximized":"1","inkscape:window-y":"726","inkscape:window-x":"1491","inkscape:window-height":"1321","inkscape:window-width":"2400",showborder:"false",showgrid:"false","inkscape:document-rotation":"0","inkscape:current-layer":"layer1","inkscape:document-units":"mm","inkscape:cy":"255.88343","inkscape:cx":"754.94284","inkscape:zoom":"0.98994949","inkscape:pageshadow":"2","inkscape:pageopacity":"0.0",borderopacity:"1.0",bordercolor:"#666666",pagecolor:"#ffffff"}),n.createElementVNode("metadata",su,[n.createVNode(d,null,{default:n.withCtx((()=>[n.createVNode(h,{"rdf:about":""},{default:n.withCtx((()=>[n.createVNode(c,null,{default:n.withCtx((()=>t[0]||(t[0]=[n.createTextVNode("image/svg+xml")]))),_:1}),n.createVNode(l,{"rdf:resource":"http://purl.org/dc/dcmitype/StillImage"}),n.createVNode(u)])),_:1})])),_:1})]),n.createElementVNode("g",au,[n.createElementVNode("rect",{id:"rect845",y:"152.19064",x:"-150.12129",height:"73.220116",width:"17.486626",style:n.normalizeStyle(e.style(0))},null,4),n.createElementVNode("rect",{id:"rect845-9",style:n.normalizeStyle(e.style(2)),width:"17.486626",height:"73.220116",x:"-132.63466",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-6",style:n.normalizeStyle(e.style(4)),width:"17.486626",height:"73.220116",x:"-115.14803",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-4",style:n.normalizeStyle(e.style(5)),width:"17.486626",height:"73.220116",x:"-97.661407",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-92",style:n.normalizeStyle(e.style(7)),width:"17.486626",height:"73.220116",x:"-80.174782",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-3",style:n.normalizeStyle(e.style(9)),width:"17.486626",height:"73.220116",x:"-62.688156",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-0",style:n.normalizeStyle(e.style(11)),width:"17.486626",height:"73.220116",x:"-45.20153",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-30",style:n.normalizeStyle(e.style(e.white)),width:"17.486626",height:"73.220116",x:"-27.714905",y:"152.10745"},null,4),n.createElementVNode("rect",{id:"rect898",ry:"0",y:"152.10744",x:"-138.43532",height:"54.415863",width:"10.466455",style:n.normalizeStyle(e.style(1))},null,4),n.createElementVNode("rect",{id:"rect898-3",style:n.normalizeStyle(e.style(3)),width:"10.466455",height:"54.415863",x:"-120.84978",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect898-7",style:n.normalizeStyle(e.style(6)),width:"10.466455",height:"54.415863",x:"-85.678711",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect898-8",style:n.normalizeStyle(e.style(8)),width:"10.466455",height:"54.415863",x:"-68.09317",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect898-1",style:n.normalizeStyle(e.style(10)),width:"10.466455",height:"54.415863",x:"-50.507633",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect845-30-1",y:"152.10745",x:"-10.228278",height:"73.220116",width:"17.486626",style:n.normalizeStyle(e.style(e.white))},null,4),n.createElementVNode("rect",{id:"rect845-30-9",y:"152.10744",x:"-167.60791",height:"73.220116",width:"17.486626",style:n.normalizeStyle(e.style(e.white))},null,4),n.createElementVNode("rect",{id:"rect898-4",style:n.normalizeStyle(e.style(e.black)),width:"10.466455",height:"54.415863",x:"-15.336554",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect898-74",style:n.normalizeStyle(e.style(e.black)),width:"4.4679713",height:"54.415863",x:"-167.60791",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect898-10",style:n.normalizeStyle(e.style(e.black)),width:"5.1863246",height:"54.507248",x:"2.2092075",y:"152.06175",ry:"0"},null,4)])])}]]),cu=n.defineComponent({name:"Playback",components:{SyllableSeqVis:nu,NoteDisplay:ou},props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"Playback"),s=r.useQuestionView(i),o=n.ref(),c=n.ref(!1),l=n.ref("notSet"),u=n.ref(!1),h=n.ref(0),d=n.ref(Us.utc()),f=n.ref(0),p=n.ref(0),m=n.ref(zs([])),g=n.ref(!1),v=n.ref(zs([])),b=n.ref(0),y=n.ref(""),_=n.ref(0),w=n.ref(0),x=n.ref(),k=n.ref();s.question.value=new wu(e.data);const S=n.computed((()=>new wu(e.data))),C=n.computed((()=>zs(S.value.midi).syllables[0].notes.length>1?"Lowest note of first chord:":"First note:")),M=n.computed((()=>c.value?zs(S.value.midi).rootNote.number%12:0)),E=()=>{var e,t,n;l.value?l.value!==(null==(e=o.value)?void 0:e.state)&&(c.value=!1,l.value=(null==(t=o.value)?void 0:t.state)||"notSet",c.value=!0):(l.value=(null==(n=o.value)?void 0:n.state)||"notSet",c.value=!0),i.logger.log(`Playback is running init with state: ${l.value}`),"ready"===l.value&&(f.value=S.value.duration,P())},T=()=>{try{x.value&&(x.value.style.animationName="",requestAnimationFrame((()=>{requestAnimationFrame((()=>{x.value&&(x.value.style.animationDuration=f.value+"ms",x.value.style.animationName="progress")}))})))}catch{setTimeout(T,50)}},P=()=>{var e,t,n;null==(e=o.value)||e.stopRecording(),null==(t=o.value)||t.eraseRecording(),d.value=Us.utc(),_.value=0,w.value=0,u.value=!1,h.value=0,T(),null==(n=o.value)||n.play(S.value.midi),setTimeout((()=>{i.logger.log("done playback..."),(()=>{var e,t,n;null==(e=o.value)||e.record(),u.value=!0,null==(t=o.value)||t.addNoteonListenter((e=>{var t;_.value++,v.value.append(e),null==(t=k.value)||t.updateBounds(),_.value+w.value>=S.value.midi.length&&A()})),null==(n=o.value)||n.addNoteoffListenter((()=>{w.value++,_.value+w.value>=S.value.midi.length&&A()}))})()}),S.value.lastNoteOnTimestamp)},A=()=>{var e;if(!(null==(e=o.value)?void 0:e.recording))return!1;const t=zs(S.value.midi),n=zs(o.value.recording);return m.value=t.grade(n),v.value=zs([]),!!s.submitAnswer(o.value.recording).isCorrect||(p.value++,g.value=!0,p.value<s.maxAttemptsPerView.value&&P(),!1)},N=()=>{_.value>0?A():P()};return n.onMounted((async()=>{try{o.value=await qs.instance(),o.value.setStateChangeListener((()=>{E()})),c.value=!0}catch(e){r.alertUser({status:a.Status.error,text:"Midi device not supported"}),y.value=JSON.stringify(e),l.value="notsupported",c.value=!0}E(),r.SkldrMouseTrap.addBinding([{hotkey:"space",callback:N,command:"Clear attempt or play again"}])})),n.onBeforeUnmount((()=>{r.SkldrMouseTrap.removeBinding("space")})),{...i,...s,initialized:c,state:l,recording:u,inputSeq:v,lastTSsuggestion:b,gradedSeq:m,graded:g,promptText:C,firstNoteChroma:M,progressBar:x,inputVisRef:k,clearAttempt:N,notesOn:_}}}),lu={key:0,"data-viewable":"Playback"},uu={key:0},hu={class:"text-h4"},du={class:"text-h5"},fu={key:0},pu={class:"progressContainer"},mu={id:"progress",ref:"progressBar"},gu={key:1},vu={key:2};const bu=C(cu,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("note-display"),c=n.resolveComponent("v-icon"),l=n.resolveComponent("v-btn"),u=n.resolveComponent("syllable-seq-vis");return e.initialized?(n.openBlock(),n.createElementBlock("div",lu,["ready"===e.state?(n.openBlock(),n.createElementBlock("div",uu,[n.createElementVNode("div",hu,[n.createTextVNode(n.toDisplayString(e.promptText)+" ",1),n.createVNode(o,{chroma:e.firstNoteChroma},null,8,["chroma"])]),n.createElementVNode("div",du,[t[0]||(t[0]=n.createTextVNode("Listen...")),e.recording?(n.openBlock(),n.createElementBlock("span",fu," and Repeat")):n.createCommentVNode("",!0)]),n.createElementVNode("div",pu,[n.createElementVNode("div",mu,null,512)]),n.createVNode(l,{color:"primary",autofocus:"",onClick:e.clearAttempt},{default:n.withCtx((()=>[t[2]||(t[2]=n.createTextVNode(" Play again ")),n.createVNode(c,{end:""},{default:n.withCtx((()=>t[1]||(t[1]=[n.createTextVNode("volume_up")]))),_:1})])),_:1},8,["onClick"]),(n.openBlock(),n.createBlock(u,{key:0,ref:"inputVisRef",seq:e.inputSeq,"last-t-ssuggestion":e.lastTSsuggestion},null,8,["seq","last-t-ssuggestion"])),e.graded?(n.openBlock(),n.createBlock(u,{key:1,seq:e.gradedSeq},null,8,["seq"])):n.createCommentVNode("",!0)])):"nodevice"===e.state?(n.openBlock(),n.createElementBlock("div",gu,"No midi device detected. Please attach one!")):"notsupported"===e.state?(n.openBlock(),n.createElementBlock("div",vu,t[3]||(t[3]=[n.createElementVNode("p",null,"This exercise requires a midi input device, which is not supported by this browser ☹",-1),n.createElementVNode("div",null,[n.createElementVNode("p",null,"Please try again with one of the following browsers:"),n.createElementVNode("ul",null,[n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://www.google.com/chrome/"},"Google Chrome")]),n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://www.microsoft.com/edge"},"Microsoft Edge")]),n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://brave.com/"},"Brave")])])],-1)]))):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)}]]),yu=[{name:"Melody",type:a.FieldType.MIDI}],_u=class _EchoQuestion extends r.Question{constructor(e){super(e),t(this,"midi"),this.midi=e[0].Melody}get duration(){return this.midi.reduce(((e,t)=>t.timestamp>e.timestamp?t:e)).timestamp}get lastNoteOnTimestamp(){return this.midi.filter((e=>"noteon"===e.type)).reduce(((e,t)=>t.timestamp>e.timestamp?t:e)).timestamp}isCorrect(e){const t=zs(this.midi),n=zs(e);try{return t.grade(n).isCorrect()}catch(r){return console.log("ERROR grading this midi sequence!",r),!1}}dataShapes(){return _EchoQuestion.dataShapes}views(){return _EchoQuestion.views}};t(_u,"dataShapes",[{fields:yu,name:a.DataShapeName.PIANO_Echo}]),t(_u,"views",[bu]);let wu=_u;const xu=n.defineComponent({name:"NotePlayback",components:{},props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"NotePlayback"),s=r.useQuestionView(i),a=n.ref(),o=n.ref(!1),c=n.ref(!1),l=n.ref(0),u=n.ref(Us.utc()),h=n.ref(0),d=n.ref(zs([])),f=n.ref(!1),p=n.ref(zs([])),m=n.ref("");s.question.value=new Nu(e.data);const g=n.computed((()=>new Nu(e.data))),v=()=>{var e,t;null==(e=a.value)||e.stopRecording(),null==(t=a.value)||t.eraseRecording(),u.value=Us.utc(),c.value=!1,l.value=0,(()=>{var e,t,n;null==(e=a.value)||e.record(),c.value=!0,null==(t=a.value)||t.addNoteonListenter((e=>{p.value.append(e)})),null==(n=a.value)||n.addNoteoffListenter((()=>{var e,t,n,r;(null==(t=null==(e=a.value)?void 0:e.recording)?void 0:t.length)&&(null==(r=null==(n=a.value)?void 0:n.recording)?void 0:r.length)>=2&&b()}))})()},b=()=>{var e;return!!(null==(e=a.value)?void 0:e.recording)&&(p.value=zs([]),!!s.submitAnswer(a.value.recording).isCorrect||(h.value++,f.value=!0,h.value<s.maxAttemptsPerView.value&&v(),!1))};return n.onMounted((async()=>{try{a.value=await qs.instance(),m.value=g.value.note,v(),o.value=!0}catch(e){i.logger.error("Failed to initialize MIDI:",e)}})),{...i,...s,initialized:o,recording:c,inputSeq:p,gradedSeq:d,graded:f,note:m,attempts:h}}}),ku={"data-viewable":"NotePlayback"},Su={class:"text-h4"},Cu={class:"font-weight-bold"},Mu={key:0,id:"svg8",width:"300px",height:"auto","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape","sodipodi:docname":"keys.svg","inkscape:version":"1.0rc1 (09960d6f05, 2020-04-09)",version:"1.1",viewBox:"0 0 175.24936 73.594925"},Eu={id:"metadata5"};const Tu=C(xu,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("sodipodi:namedview"),c=n.resolveComponent("dc:format"),l=n.resolveComponent("dc:type"),u=n.resolveComponent("dc:title"),h=n.resolveComponent("cc:Work"),d=n.resolveComponent("rdf:RDF");return n.openBlock(),n.createElementBlock("div",ku,[n.createElementVNode("div",Su,[t[0]||(t[0]=n.createTextVNode(" Play the note: ")),n.createElementVNode("span",Cu,n.toDisplayString(e.note),1)]),e.graded?(n.openBlock(),n.createElementBlock("svg",Mu,[t[2]||(t[2]=n.createElementVNode("defs",{id:"defs2"},null,-1)),n.createVNode(o,{id:"base","inkscape:window-maximized":"1","inkscape:window-y":"726","inkscape:window-x":"1491","inkscape:window-height":"1321","inkscape:window-width":"2400",showborder:"false",showgrid:"false","inkscape:document-rotation":"0","inkscape:current-layer":"layer1","inkscape:document-units":"mm","inkscape:cy":"255.88343","inkscape:cx":"754.94284","inkscape:zoom":"0.98994949","inkscape:pageshadow":"2","inkscape:pageopacity":"0.0",borderopacity:"1.0",bordercolor:"#666666",pagecolor:"#ffffff"}),n.createElementVNode("metadata",Eu,[n.createVNode(d,null,{default:n.withCtx((()=>[n.createVNode(h,{"rdf:about":""},{default:n.withCtx((()=>[n.createVNode(c,null,{default:n.withCtx((()=>t[1]||(t[1]=[n.createTextVNode("image/svg+xml")]))),_:1}),n.createVNode(l,{"rdf:resource":"http://purl.org/dc/dcmitype/StillImage"}),n.createVNode(u)])),_:1})])),_:1})]),t[3]||(t[3]=n.createElementVNode("g",{id:"layer1",transform:"translate(167.75219,-151.96011)","inkscape:groupmode":"layer","inkscape:label":"Layer 1"},[n.createElementVNode("rect",{id:"rect845",y:"152.19064",x:"-150.12129",height:"73.220116",width:"17.486626",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),n.createElementVNode("rect",{id:"rect845-9",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-132.63466",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-6",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-115.14803",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-0",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-45.20153",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-92",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-80.174782",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-3",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-62.688156",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-4",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-97.661407",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-30",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-27.714905",y:"152.10745"}),n.createElementVNode("rect",{id:"rect898",ry:"0",y:"152.10744",x:"-138.43532",height:"54.415863",width:"10.466455",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),n.createElementVNode("rect",{id:"rect898-3",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"10.466455",height:"54.415863",x:"-120.84978",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect898-7",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"10.466455",height:"54.415863",x:"-85.678711",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect898-8",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"10.466455",height:"54.415863",x:"-68.09317",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect898-1",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"10.466455",height:"54.415863",x:"-50.507633",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect845-30-1",y:"152.10745",x:"-10.228278",height:"73.220116",width:"17.486626",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),n.createElementVNode("rect",{id:"rect845-30-9",y:"152.10744",x:"-167.60791",height:"73.220116",width:"17.486626",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),n.createElementVNode("rect",{id:"rect898-4",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"10.466455",height:"54.415863",x:"-15.336554",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect898-74",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"4.4679713",height:"54.415863",x:"-167.60791",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect898-10",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"5.1863246",height:"54.507248",x:"2.2092075",y:"152.06175",ry:"0"})],-1))])):n.createCommentVNode("",!0)])}]]),Pu=[{name:"Note",type:a.FieldType.STRING}],Au=class _PlayNote extends r.Question{constructor(e){super(e),t(this,"note"),this.note=e[0].Note}isCorrect(e){return e[0].note.name===this.note}dataShapes(){return _PlayNote.dataShapes}views(){return _PlayNote.views}};t(Au,"dataShapes",[{fields:Pu,name:a.DataShapeName.PIANO_PlayNote}]),t(Au,"seedData",["A","B","C","D","E","F","G","A♯","C♯","D♯","F♯","G♯","D♭","E♭","G♭","A♭","B♭"].map((e=>({Note:e})))),t(Au,"views",[Tu]);let Nu=Au;const Iu=new CourseWare("piano",[wu,Nu]),Ou=n.defineComponent({name:"IdentifyChroma",components:{RadioMultipleChoice:r.RadioMultipleChoice},props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"IdentifyChroma"),s=r.useQuestionView(i),a=n.ref(""),o=n.ref(new AudioContext);s.question.value=new Fu(e.data);const c=n.computed((()=>s.question.value));n.onMounted((()=>{(e=>{const t=[];let n=e/2;for(;n>100;)t.push(n),n/=2;t.push(e);let r=2*e;for(;r<5e3;)t.push(r),r*=2;return t})(295).forEach((e=>(e=>{const t=o.value.createOscillator();t.type="sine",t.frequency.value=e;const n=o.value.createGain();console.log("Max Gain: "+n.gain.maxValue),n.gain.setValueAtTime(0,0),n.gain.linearRampToValueAtTime(.5,15),t.connect(n),n.connect(o.value.destination),t.start(0),t.stop(14)})(e)))}));return{...i,...s,answer:a,question:c,submit:()=>{c.value&&c.value.isCorrect(a.value)}}}}),Du={"data-viewable":"IdentifyChroma"};const Lu=C(Ou,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("radio-multiple-choice");return n.openBlock(),n.createElementBlock("div",Du,[e.question?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t[0]||(t[0]=n.createTextVNode(" What note is being played? ")),n.createVNode(o,{"choice-list":e.question.choiceList},null,8,["choice-list"])],64)):n.createCommentVNode("",!0)])}]]);var Bu=(e=>(e.A="A",e.B="B",e.C="C",e.D="D",e.E="E",e.F="F",e.G="G",e))(Bu||{});const Vu=[{name:"Chroma",type:a.FieldType.STRING,validator:{test:e=>Object.values(Bu).includes(e)?{status:a.Status.ok,msg:""}:{status:a.Status.error,msg:"That's not a chroma!"},instructions:"Enter a valid musical note (A-G)"}}],Ru=class _ChromaQuestion extends r.Question{constructor(e){super(e),t(this,"chroma"),this.chroma=e[0].Chroma}get baseFreq(){const e=440;return"A"===this.chroma?e:"B"===this.chroma?e*Math.pow(2,2/12):"C"===this.chroma?e*Math.pow(2,.25):e}get choiceList(){return b.shuffle([this.chroma.toString(),"test","options","are","fun"])}isCorrect(e){return e.choiceList[e.selection]===this.chroma.toString()}dataShapes(){return _ChromaQuestion.dataShapes}views(){return _ChromaQuestion.views}};t(Ru,"dataShapes",[{fields:Vu,name:a.DataShapeName.PITCH_chroma}]),t(Ru,"views",[Lu]);let Fu=Ru;const zu=new CourseWare("pitch",[Fu]);var ju,qu,Hu,Yu,Uu,Gu,Wu,$u,Ku,Qu,Xu,Zu,Ju,eh,th,nh,rh,ih,sh,ah,oh,ch,lh,uh;function hh(){if(Yu)return Hu;Yu=1;return Hu=function(e,t){var n=this;if(t||(t={}),n.qpm=t.qpm?parseInt(t.qpm,10):null,!n.qpm){var r=e.metaText?e.metaText.tempo:null;n.qpm=e.getBpm(r)}n.extraMeasuresAtBeginning=t.extraMeasuresAtBeginning?parseInt(t.extraMeasuresAtBeginning,10):0,n.beatCallback=t.beatCallback,n.eventCallback=t.eventCallback,n.lineEndCallback=t.lineEndCallback,n.lineEndAnticipation=t.lineEndAnticipation?parseInt(t.lineEndAnticipation,10):0,n.beatSubdivisions=t.beatSubdivisions?parseInt(t.beatSubdivisions,10):1,n.joggerTimer=null,n.replaceTarget=function(e){n.noteTimings=e.setTiming(n.qpm,n.extraMeasuresAtBeginning),0===e.noteTimings.length&&(n.noteTimings=e.setTiming(0,0)),n.lineEndCallback&&(n.lineEndTimings=function(e,t){for(var n=[],r=null,i=0;i<e.length;i++){var s=e[i];"end"!==s.type&&s.top!==r&&(n.push({measureNumber:s.measureNumber,milliseconds:s.milliseconds-t,top:s.top,bottom:s.top+s.height}),r=s.top)}return n}(e.noteTimings,n.lineEndAnticipation)),n.startTime=null,n.currentBeat=0,n.currentEvent=0,n.currentLine=0,n.currentTime=0,n.isPaused=!1,n.isRunning=!1,n.pausedPercent=null,n.justUnpaused=!1,n.newSeekPercent=0,n.lastTimestamp=0,0!==n.noteTimings.length&&(n.millisecondsPerBeat=1e3/(n.qpm/60)/n.beatSubdivisions,n.lastMoment=n.noteTimings[n.noteTimings.length-1].milliseconds,n.totalBeats=Math.round(n.lastMoment/n.millisecondsPerBeat))},n.replaceTarget(e),n.doTiming=function(e){if(n.lastTimestamp!==e&&(n.lastTimestamp=e,n.startTime||(n.startTime=e),!n.isPaused&&n.isRunning)){for(n.currentTime=e-n.startTime,n.currentTime+=16;n.noteTimings.length>n.currentEvent&&n.noteTimings[n.currentEvent].milliseconds<n.currentTime;){if(n.eventCallback&&"event"===n.noteTimings[n.currentEvent].type){var t=n.startTime;n.eventCallback(n.noteTimings[n.currentEvent]),t!==n.startTime&&(n.currentTime=e-n.startTime)}n.currentEvent++}if(n.lineEndCallback&&n.lineEndTimings.length>n.currentLine&&n.lineEndTimings[n.currentLine].milliseconds<n.currentTime&&n.currentEvent<n.noteTimings.length){var r=n.noteTimings[n.currentEvent].milliseconds===n.currentTime?n.noteTimings[n.currentEvent]:n.noteTimings[n.currentEvent-1];n.lineEndCallback(n.lineEndTimings[n.currentLine],r,{line:n.currentLine,endTimings:n.lineEndTimings,currentTime:n.currentTime}),n.currentLine++}if(n.currentTime<n.lastMoment){if(requestAnimationFrame(n.doTiming),n.currentBeat*n.millisecondsPerBeat<n.currentTime){var i=n.doBeatCallback(e);null!==i&&(n.currentTime=i)}}else if(n.currentBeat<=n.totalBeats&&n.beatCallback){var s=n.doBeatCallback(e);null!==s&&(n.currentTime=s),requestAnimationFrame(n.doTiming)}if(n.currentTime>=n.lastMoment)if(n.eventCallback){var a=n.eventCallback(null);n.shouldStop(a).then((function(e){e&&n.stop()}))}else n.stop()}},n.shouldStop=function(e){return new Promise((function(t){return e?"continue"===e?t(!1):void(e.then&&e.then((function(e){t("continue"!==e)}))):t(!0)}))},n.doBeatCallback=function(e){if(n.beatCallback){for(var t,r,i=n.currentEvent;i<n.noteTimings.length&&null===n.noteTimings[i].left;)i++;if(i<n.noteTimings.length){for(t=n.noteTimings[i].milliseconds,i=Math.max(0,n.currentEvent-1);i>=0&&null===n.noteTimings[i].left;)i--;r=n.noteTimings[i]}var s={},a={};if(r){s.top=r.top,s.height=r.height;var o=Math.max(0,e-n.startTime-r.milliseconds),c=t-r.milliseconds,l=r.endX-r.left,u=c?o*l/c:0;s.left=r.left+u,0===n.currentEvent&&r.milliseconds>e-n.startTime&&(s.left=void 0),a={timestamp:e,startTime:n.startTime,ev:r,endMs:t,offMs:o,offPx:u,gapMs:c,gapPx:l}}else a={timestamp:e,startTime:n.startTime};var h=n.startTime;if(n.beatCallback(n.currentBeat/n.beatSubdivisions,n.totalBeats/n.beatSubdivisions,n.lastMoment,s,a),h!==n.startTime)return e-n.startTime;n.currentBeat++}return null};n.animationJogger=function(){n.isRunning&&(n.doTiming(performance.now()),n.joggerTimer=setTimeout(n.animationJogger,60))},n.start=function(e,t){if(n.isRunning=!0,n.isPaused&&(n.isPaused=!1,void 0===e&&(n.justUnpaused=!0)),e)n.setProgress(e,t);else if(0===e)n.reset();else if(null!==n.pausedPercent){var r=performance.now();n.currentTime=n.lastMoment*n.pausedPercent,n.startTime=r-n.currentTime,n.pausedPercent=null,n.reportNext=!0}requestAnimationFrame(n.doTiming),n.joggerTimer=setTimeout(n.animationJogger,60)},n.pause=function(){n.isPaused=!0;var e=performance.now();n.pausedPercent=(e-n.startTime)/n.lastMoment,n.isRunning=!1,n.joggerTimer&&(clearTimeout(n.joggerTimer),n.joggerTimer=null)},n.currentMillisecond=function(){return n.currentTime},n.reset=function(){n.currentBeat=0,n.currentEvent=0,n.currentLine=0,n.startTime=null,n.pausedPercent=null},n.stop=function(){n.pause(),n.reset()},n.setProgress=function(e,t){var r;switch(t){case"seconds":n.currentTime=1e3*e,n.currentTime<0&&(n.currentTime=0),n.currentTime>n.lastMoment&&(n.currentTime=n.lastMoment),r=n.currentTime/n.lastMoment;break;case"beats":n.currentTime=e*n.millisecondsPerBeat*n.beatSubdivisions,n.currentTime<0&&(n.currentTime=0),n.currentTime>n.lastMoment&&(n.currentTime=n.lastMoment),r=n.currentTime/n.lastMoment;break;default:(r=e)<0&&(r=0),r>1&&(r=1),n.currentTime=n.lastMoment*r}n.isRunning||(n.pausedPercent=r);var i=performance.now();for(n.startTime=i-n.currentTime,n.currentEvent,n.currentEvent=0;n.noteTimings.length>n.currentEvent&&n.noteTimings[n.currentEvent].milliseconds<n.currentTime;)n.currentEvent++;if(n.lineEndCallback)for(n.currentLine=0;n.lineEndTimings.length>n.currentLine&&n.lineEndTimings[n.currentLine].milliseconds+n.lineEndAnticipation<n.currentTime;)n.currentLine++;var s=n.currentBeat;n.currentBeat=Math.floor(n.currentTime/n.millisecondsPerBeat),n.beatCallback&&s!==n.currentBeat&&n.doBeatCallback(n.startTime+n.currentTime),n.eventCallback&&n.currentEvent>=0&&"event"===n.noteTimings[n.currentEvent].type&&n.eventCallback(n.noteTimings[n.currentEvent]),n.lineEndCallback&&n.lineEndCallback(n.lineEndTimings[n.currentLine],n.noteTimings[n.currentEvent],{line:n.currentLine,endTimings:n.lineEndTimings}),n.joggerTimer=setTimeout(n.animationJogger,60)}}}function dh(){if(Gu)return Uu;Gu=1;var e,t,n=hh(),r={};return r.startAnimation=function(r,i,s){function a(e){for(var t=0;t<e.length;t++){var n=e[t];n.classList.contains("abcjs-bar")||(n.style.display="none")}}var o;function c(e){s.hideCurrentMeasure?function(e){a(r.querySelectorAll(e))}(e):s.hideFinishedMeasures&&function(e){o&&a(r.querySelectorAll(o)),o=e}(e)}e&&(e.stop(),e=void 0),s.showCursor&&((t=r.querySelector(".abcjs-cursor"))||((t=document.createElement("DIV")).className="abcjs-cursor cursor",t.style.position="absolute",r.appendChild(t),r.style.position="relative")),(e=new n(i,{qpm:s.bpm,eventCallback:function(n){if(n){if(n.measureStart){var r=".abcjs-l"+(i=n).line+".abcjs-m"+i.measureNumber;r&&c(r)}t&&(t.style.left=n.left+"px",t.style.top=n.top+"px",t.style.width=n.width+"px",t.style.height=n.height+"px")}else e.stop(),e=void 0;var i}})).start()},r.pauseAnimation=function(t){e&&(t?e.pause():e.start())},r.stopAnimation=function(){e&&(e.stop(),e=void 0)},Uu=r}function fh(){if($u)return Wu;$u=1;var e={cloneArray:function(e){for(var t=[],n=0;n<e.length;n++)t.push(Object.assign({},e[n]));return t},cloneHashOfHash:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=Object.assign({},e[n]));return t},cloneHashOfArrayOfHash:function(t){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e.cloneArray(t[r]));return n},strip:function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")},startsWith:function(e,t){return 0===e.indexOf(t)},endsWith:function(e,t){var n=e.length-t.length;return n>=0&&e.lastIndexOf(t)===n},last:function(e){return 0===e.length?null:e[e.length-1]}};return Wu=e}function ph(){if(Qu)return Ku;Qu=1;var e=fh(),t={};return function(){var n,r,i,s,a;t.initialize=function(e,t,o,c,l){n=e,r=t,s=c,a=l,(i=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},i.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},i.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},i.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},i.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},i.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},i.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},s.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},s.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},s.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},s.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},s.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},s.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},s.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},s.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},s.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},s.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},s.formatting.annotationfont=i.annotationfont,s.formatting.gchordfont=i.gchordfont,s.formatting.historyfont=i.historyfont,s.formatting.infofont=i.infofont,s.formatting.measurefont=i.measurefont,s.formatting.partsfont=i.partsfont,s.formatting.repeatfont=i.repeatfont,s.formatting.textfont=i.textfont,s.formatting.tripletfont=i.tripletfont,s.formatting.vocalfont=i.vocalfont,s.formatting.wordsfont=i.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,t,n,i,s){function a(){var a=parseInt(e[0].token);return e.shift(),t?0===e.length?{face:t.face,weight:t.weight,style:t.style,decoration:t.decoration,size:a}:1===e.length&&"box"===e[0].token&&o[s]?{face:t.face,weight:t.weight,style:t.style,decoration:t.decoration,size:a,box:!0}:(r("Extra parameters in font definition.",n,i),{face:t.face,weight:t.weight,style:t.style,decoration:t.decoration,size:a}):(r("Can't set just the size of the font since there is no default value.",n,i),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:a})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return a();r("Expected font size number after *.",n,i)}if("number"===e[0].type)return a();for(var c,l=[],u="normal",h="normal",d="none",f=!1,p="face",m=!1;e.length;){var g=e.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?r("Font size specified twice in font definition.",n,i):c=g.token,p="modifier"):"bold"===v?u="bold":"italic"===v?h="italic":"underline"===v?d="underline":"box"===v?(o[s]?f=!0:r('This font style doesn\'t support "box"',n,i),p="finished"):"utf"===v?(g=e.shift(),p="size"):r("Unknown parameter "+g.token+" in font definition.",n,i);break;case"size":"number"===g.type?c?r("Font size specified twice in font definition.",n,i):c=g.token:r("Expected font size in font definition.",n,i),p="modifier";break;case"modifier":"bold"===v?u="bold":"italic"===v?h="italic":"underline"===v?d="underline":"box"===v?(o[s]?f=!0:r('This font style doesn\'t support "box"',n,i),p="finished"):r("Unknown parameter "+g.token+" in font definition.",n,i);break;case"finished":r('Extra characters found after "box" in font definition.',n,i)}}void 0===c?t?c=t.size:(r("Must specify the size of the font since there is no default value.",n,i),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(t?l=t.face:(r("Must specify the name of the font since there is no default value.",n,i),l="sans-serif"));var b=function(e){switch(e){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}}(l),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=u,y.style=h,y.decoration=d,y.size=c,f&&(y.box=!0),y)},l=function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(i[e]=c(t,i[e],n,0,e),i.is_in_header&&(s.formatting[e]=i[e]),null)},u=function(e,t){var n="";t.forEach((function(e){n+=e.token}));var r=parseFloat(n);if(isNaN(r)||0===r)return'Directive "'+e+'" requires a number as a parameter.';s.formatting.scale=r},h=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],d=function(e,t,n,r,s){if(1!==n.length||"number"!==n[0].type)return'Directive "'+t+'" requires a number as a parameter.';var a=n[0].intt;return void 0!==r&&a<r?'Directive "'+t+'" requires a number greater than or equal to '+r+" as a parameter.":void 0!==s&&a>s?'Directive "'+t+'" requires a number less than or equal to '+s+" as a parameter.":(i[e]=a,null)},f=function(e,t,n){if(1===n.length&&("true"===n[0].token||"false"===n[0].token))return i[e]="true"===n[0].token,null;var r=d(e,t,n,0,1);return null!==r?r:(i[e]=1===i[e],null)},p=function(e,t,n,r){if(1!==n.length)return'Directive "'+t+'" requires one of [ '+r.join(", ")+" ] as a parameter.";for(var s=n[0].token,a=!1,o=0;!a&&o<r.length;o++)r[o]===s&&(a=!0);return a?(i[e]=s,null):'Directive "'+t+'" requires one of [ '+r.join(", ")+" ] as a parameter."},m=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],g=["gchord","ptstress","beatstring"],v=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],b=["program"],y=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],_=["beat"],w=["drone"],x=["portamento"],k=["expand","grace","trim"],S=["drum","chordname"],C=["bassprog","chordprog"];t.parseFontChangeLine=function(e){var t=(e=e.replace(/\$\$/g,"")).split("$");if(t.length>1&&i.setfont){var n=[];""!==t[0]&&n.push({text:t[0]});for(var r=1;r<t.length;r++)if("0"===t[r][0])n.push({text:t[r].substring(1).replace(/\x03/g,"$$")});else{var s=parseInt(t[r][0],10);i.setfont[s]?n.push({font:i.setfont[s],text:t[r].substring(1).replace(/\x03/g,"$$")}):n[n.length-1].text+="$"+t[r].replace(/\x03/g,"$$")}return n}return e.replace(/\x03/g,"$$")};var M=["auto","above","below","hidden"];function E(e){if(0===e.length)return{value:1};if(1===e.length)if("number"===e[0].type){if(e[0].floatt>=0||e[0].floatt<=1)return{value:e[0].floatt}}else{if("false"===e[0].token)return{value:0};if("true"===e[0].token)return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+e[0].token+")"}}t.addDirective=function(o){var T=n.tokenize(o,0,o.length);if(0===T.length||"alpha"!==T[0].type)return null;var P=o.substring(o.indexOf(T[0].token)+T[0].token.length);P=n.stripComment(P);var A,N=T.shift().token.toLowerCase(),I="";switch(N){case"bagpipes":s.formatting.bagpipes=!0;break;case"flatbeams":s.formatting.flatbeams=!0;break;case"jazzchords":s.formatting.jazzchords=!0;break;case"accentAbove":s.formatting.accentAbove=!0;break;case"germanAlphabet":s.formatting.germanAlphabet=!0;break;case"landscape":i.landscape=!0;break;case"papersize":i.papersize=P;break;case"graceslurs":if(1!==T.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===T[0].token||"false"===T[0].token)s.formatting.graceSlurs=!1;else{if("1"!==T[0].token&&"true"!==T[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+T[0].token+")";s.formatting.graceSlurs=!0}break;case"lineThickness":var O=E(T);if(void 0!==O.value&&(s.formatting.lineThickness=O.value),O.error)return O.error;break;case"stretchlast":var D=E(T);if(void 0!==D.value&&(s.formatting.stretchlast=D.value),D.error)return D.error;break;case"titlecaps":i.titlecaps=!0;break;case"titleleft":s.formatting.titleleft=!0;break;case"measurebox":s.formatting.measurebox=!0;break;case"vocal":return p("vocalPosition",N,T,M);case"dynamic":return p("dynamicPosition",N,T,M);case"gchord":return p("chordPosition",N,T,M);case"ornament":return p("ornamentPosition",N,T,M);case"volume":return p("volumePosition",N,T,M);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(e,t){var r=n.getMeasurement(t);return 0===r.used||0!==t.length?'Directive "'+e+'" requires a measurement as a parameter.':(s.formatting[e]=r.value,null)}(N,T);case"voicescale":if(1!==T.length||"number"!==T[0].type)return"voicescale requires one float as a parameter";var L=T.shift();return i.currentVoice&&(i.currentVoice.scale=L.floatt,a.changeVoiceScale(i.currentVoice.scale)),null;case"voicecolor":if(1!==T.length)return"voicecolor requires one string as a parameter";var B=T.shift();return i.currentVoice&&(i.currentVoice.color=B.token,a.changeVoiceColor(i.currentVoice.color)),null;case"vskip":var V=Math.round(function(e,t){var r=n.getMeasurement(t);return 0===r.used||0!==t.length?{error:'Directive "'+e+'" requires a measurement as a parameter.'}:r.value}(N,T));return V.error?V.error:(a.addSpacing(V),null);case"scale":u(N,T);break;case"sep":if(0===T.length)a.addSeparator(14,14,85,{startChar:i.iChar,endChar:i.iChar+5});else{var R=n.getMeasurement(T);if(0===R.used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var F=R.value;if(0===(R=n.getMeasurement(T)).used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var z=R.value;if(0===(R=n.getMeasurement(T)).used||0!==T.length)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var j=R.value;a.addSeparator(F,z,j,{startChar:i.iChar,endChar:i.iChar+P.length})}break;case"barsperstaff":if(null!==(I=d("barsperstaff",N,T)))return I;break;case"staffnonote":if(1!==T.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===T[0].token)i.staffnonote=!0;else{if("1"!==T[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+T[0].token+")";i.staffnonote=!1}break;case"printtempo":if(null!==(I=f("printTempo",N,T)))return I;break;case"partsbox":if(null!==(I=f("partsBox",N,T)))return I;i.partsfont.box=i.partsBox;break;case"freegchord":if(null!==(I=f("freegchord",N,T)))return I;break;case"measurenb":case"barnumbers":if(null!==(I=d("barNumbers",N,T)))return I;break;case"setbarnb":if(1!==T.length||"number"!==T[0].type)return"Directive setbarnb requires a number as a parameter.";i.currBarNumber=a.setBarNumberImmediate(T[0].intt);break;case"begintext":var q="";for(A=n.nextLine();A&&0!==A.indexOf("%%endtext");)e.startsWith(A,"%%")?q+=A.substring(2)+"\n":q+=A+"\n",A=n.nextLine();a.addText(q,{startChar:i.iChar,endChar:i.iChar+q.length+7});break;case"continueall":i.continueall=!0;break;case"beginps":for(A=n.nextLine();A&&0!==A.indexOf("%%endps");)n.nextLine();r("Postscript ignored",o,0);break;case"deco":P.length>0&&i.ignoredDecorations.push(P.substring(0,P.indexOf(" "))),r("Decoration redefinition ignored",o,0);break;case"text":var H=n.translateString(P);a.addText(t.parseFontChangeLine(H),{startChar:i.iChar,endChar:i.iChar+P.length+7});break;case"center":var Y=n.translateString(P);a.addCentered(t.parseFontChangeLine(Y));break;case"font":break;case"setfont":var U=n.tokenize(P,0,P.length);if(U.length>=4&&"-"===U[0].token&&"number"===U[1].type){var G=parseInt(U[1].token);G>=1&&G<=9&&(i.setfont||(i.setfont=[]),U.shift(),U.shift(),i.setfont[G]=c(U,i.setfont[G],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(N,T,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(s.formatting[e]=c(t,s.formatting[e],n,0,e),null)}(N,T,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",T,o);case"staves":case"score":i.score_is_present=!0;for(var W,$=function(t,n,r,s,a){(n||0===i.staves.length)&&i.staves.push({index:i.staves.length,numVoices:0});var o=e.last(i.staves);void 0!==r&&void 0===o.bracket&&(o.bracket=r),void 0!==s&&void 0===o.brace&&(o.brace=s),a&&(o.connectBarLines="end"),void 0===i.voices[t]&&(i.voices[t]={staffNum:o.index,index:o.numVoices},o.numVoices++)},K=!1,Q=!1,X=!1,Z=!1,J=!1,ee=!1,te=!1,ne=function(){if(te=!0,W){var e="start";W.staffNum>0&&("start"!==i.staves[W.staffNum-1].connectBarLines&&"continue"!==i.staves[W.staffNum-1].connectBarLines||(e="continue")),i.staves[W.staffNum].connectBarLines=e}};T.length;){var re=T.shift();switch(re.token){case"(":K?r("Can't nest parenthesis in %%score",o,re.start):(K=!0,Z=!0);break;case")":!K||Z?r("Unexpected close parenthesis in %%score",o,re.start):K=!1;break;case"[":Q?r("Can't nest brackets in %%score",o,re.start):(Q=!0,J=!0);break;case"]":!Q||J?r("Unexpected close bracket in %%score",o,re.start):(Q=!1,i.staves[W.staffNum].bracket="end");break;case"{":X?r("Can't nest braces in %%score",o,re.start):(X=!0,ee=!0);break;case"}":!X||ee?r("Unexpected close brace in %%score",o,re.start):(X=!1,i.staves[W.staffNum].brace="end");break;case"|":ne();break;default:for(var ie="";("alpha"===re.type||"number"===re.type)&&(ie+=re.token,re.continueId);)re=T.shift();$(ie,!K||Z,J?"start":Q?"continue":void 0,ee?"start":X?"continue":void 0,te),Z=!1,J=!1,ee=!1,te=!1,W=i.voices[ie],"staves"===N&&ne()}}break;case"newpage":var se=n.getInt(P);a.addNewPage(0===se.digits?-1:se.value);break;case"abc":var ae=P.split(" ");switch(ae[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var oe=ae.shift();a.addMetaText(N+oe,ae.join(" "),{startChar:i.iChar,endChar:i.iChar+P.length+5});break;default:return"Unknown directive: "+N+ae[0]}break;case"header":case"footer":var ce=n.getMeat(P,0,P.length);'"'===(ce=P.substring(ce.start,ce.end))[0]&&'"'===ce[ce.length-1]&&(ce=ce.substring(1,ce.length-1));var le=ce.split("\t"),ue={};ue=1===le.length?{left:"",center:le[0],right:""}:2===le.length?{left:le[0],center:le[1],right:""}:{left:le[0],center:le[1],right:le[2]},le.length>3&&r("Too many tabs in "+N+": "+le.length+" found.",P,0),a.addMetaTextObj(N,ue,{startChar:i.iChar,endChar:i.iChar+o.length});break;case"midi":var he=n.tokenize(P,0,P.length,!0);he.length>0&&"="===he[0].token&&he.shift(),0===he.length?r("Expected midi command",P,0):function(e,t,n){var i=e.shift().token,s=[];if(m.indexOf(i)>=0)0!==e.length&&r("Unexpected parameter in MIDI "+i,n,0);else if(g.indexOf(i)>=0)1!==e.length?r("Expected one parameter in MIDI "+i,n,0):s.push(e[0].token);else if(v.indexOf(i)>=0)1!==e.length?r("Expected one parameter in MIDI "+i,n,0):"number"!==e[0].type?r("Expected one integer parameter in MIDI "+i,n,0):s.push(e[0].intt);else if(b.indexOf(i)>=0)1!==e.length&&2!==e.length?r("Expected one or two parameters in MIDI "+i,n,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?r("Expected integer parameter in MIDI "+i,n,0):(s.push(e[0].intt),2===e.length&&s.push(e[1].intt));else if(y.indexOf(i)>=0)2!==e.length?r("Expected two parameters in MIDI "+i,n,0):"number"!==e[0].type||"number"!==e[1].type?r("Expected two integer parameters in MIDI "+i,n,0):(s.push(e[0].intt),s.push(e[1].intt));else if(x.indexOf(i)>=0)2!==e.length?r("Expected two parameters in MIDI "+i,n,0):"alpha"!==e[0].type||"number"!==e[1].type?r("Expected one string and one integer parameters in MIDI "+i,n,0):(s.push(e[0].token),s.push(e[1].intt));else if("drummap"===i)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(t.formatting||(t.formatting={}),t.formatting.midi||(t.formatting.midi={}),t.formatting.midi.drummap||(t.formatting.midi.drummap={}),t.formatting.midi.drummap[e[0].token]=e[1].intt,s=t.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(t.formatting||(t.formatting={}),t.formatting.midi||(t.formatting.midi={}),t.formatting.midi.drummap||(t.formatting.midi.drummap={}),t.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,s=t.formatting.midi.drummap):r("Expected one note name and one integer parameter in MIDI "+i,n,0);else if(k.indexOf(i)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?r("Expected fraction parameter in MIDI "+i,n,0):(s.push(e[0].intt),s.push(e[2].intt));else if(_.indexOf(i)>=0)4!==e.length?r("Expected four parameters in MIDI "+i,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?r("Expected four integer parameters in MIDI "+i,n,0):(s.push(e[0].intt),s.push(e[1].intt),s.push(e[2].intt),s.push(e[3].intt));else if(w.indexOf(i)>=0)5!==e.length?r("Expected five parameters in MIDI "+i,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?r("Expected five integer parameters in MIDI "+i,n,0):(s.push(e[0].intt),s.push(e[1].intt),s.push(e[2].intt),s.push(e[3].intt),s.push(e[4].intt));else if(b.indexOf(i)>=0)1!==e.length||4!==e.length?r("Expected one or two parameters in MIDI "+i,n,0):"number"!==e[0].type?r("Expected integer parameter in MIDI "+i,n,0):4===e.length?("octave"!==e[1].token&&r("Expected octave parameter in MIDI "+i,n,0),"="!==e[2].token&&r("Expected octave parameter in MIDI "+i,n,0),"number"!==e[3].type&&r("Expected integer parameter for octave in MIDI "+i,n,0)):(s.push(e[0].intt),4===e.length&&s.push(e[3].intt));else if(S.indexOf(i)>=0)if(e.length<2)r("Expected string parameter and at least one integer parameter in MIDI "+i,n,0);else if("alpha"!==e[0].type)r("Expected string parameter and at least one integer parameter in MIDI "+i,n,0);else{var o=e.shift();for(s.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&r("Expected integer parameter in MIDI "+i,n,0),s.push(o.intt)}else if(C.indexOf(i)>=0)if(1!==e.length&&2!==e.length)r("Expected one or two parameters in MIDI "+i,n,0);else if("number"!==e[0].type)r("Expected integer parameter in MIDI "+i,n,0);else if(2===e.length&&"alpha"!==e[1].type)r("Expected alpha parameter in MIDI "+i,n,0);else if(s.push(e[0].intt),2===e.length){var c=e[1].token;-1!=c.indexOf("octave=")?(c=c.replace("octave=",""),c=parseInt(c),isNaN(c)?r("Expected octave value in MIDI"+i):(c<-1&&(r("Expected octave= in MIDI "+i+" to be >= -1 (recv:"+c+")"),c=-1),c>3&&(r("Expected octave= in MIDI "+i+" to be <= 3 (recv:"+c+")"),c=3),s.push(c))):r("Expected octave= in MIDI"+i)}a.hasBeginMusic()?a.appendElement("midi",-1,-1,{cmd:i,params:s}):(void 0===t.formatting.midi&&(t.formatting.midi={}),t.formatting.midi[i]=s)}(he,s,P);break;case"percmap":var de=function(e){var t=e.split(/\s+/);if(2!==t.length&&3!==t.length)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var n=t[0],r=parseInt(t[1],10);if((isNaN(r)||r<35||r>81)&&t[1]&&(r=h.indexOf(t[1].toLowerCase())+35),isNaN(r)||r<35||r>81)return{error:'Expected drum name, received "'+t[1]+'"'};var i={sound:r};return 3===t.length&&(i.noteHead=t[2]),{key:n,value:i}}(P);de.error?r(de.error,o,8):(s.formatting.percmap||(s.formatting.percmap={}),s.formatting.percmap[de.key]=de.value);break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":s.formatting[N]=P;break;default:return"Unknown directive: "+N}return null},t.globalFormatting=function(e){for(var t in e)if(e.hasOwnProperty(t)){var a,o=""+e[t],c=n.tokenize(o,0,o.length);switch(t){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":l(t,c,o);break;case"scale":u(t,c);break;case"partsbox":null!==(a=f("partsBox",t,c))&&r(a),i.partsfont.box=i.partsBox;break;case"freegchord":null!==(a=f("freegchord",t,c))&&r(a);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||r('Directive "'+t+'" requires a number as a parameter.'),s.formatting.fontboxpadding=c[0].floatt;break;case"stafftopmargin":1===c.length&&"number"===c[0].type||r('Directive "'+t+'" requires a number as a parameter.'),s.formatting.stafftopmargin=c[0].floatt;break;case"stretchlast":var h=E(c);if(void 0!==h.value&&(s.formatting.stretchlast=h.value),h.error)return h.error;break;default:r("Formatting directive unrecognized: ",t,0)}}}}(),Ku=t}function mh(){if(eh)return Ju;eh=1;var e=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],t=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],n=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],r=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];return Ju=function(i,s,a,o){if(!s||s%12==0)return i;for(;s<0;)s+=12;s>11&&(s%=12);var c=i.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!c)return i;var l,u=c[1],h=c[2],d=c[3],f=c[4];return(l=e.indexOf(u))<0&&(l=t.indexOf(u)),l<0&&(l=n.indexOf(u)),l<0&&(l=r.indexOf(u)),l<0||(l+=s,l%=12,i=a?o?r[l]:t[l]:o?n[l]:e[l],h&&(i+=h),d&&((l=e.indexOf(d))<0&&(l=t.indexOf(d)),l<0&&(l=n.indexOf(d)),l<0&&(l=r.indexOf(d)),i+="/",l>=0?(l+=s,l%=12,i+=a?o?r[l]:t[l]:o?n[l]:e[l]):i+=d),f&&(i+=f)),i}}function gh(){if(nh)return th;nh=1;var e={C:{modes:["CMaj","Amin","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","Bbmin","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","Bmin","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","Cmin","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","C#min","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","Dmin","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","Ebmin","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","Emin","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","Fmin","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","F#min","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","Gmin","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","G#min","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","A#min","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","D#min","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","Abmin","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},t=null;return th={relativeMajor:function(n){t||function(){t={};for(var n=Object.keys(e),r=0;r<n.length;r++){var i=e[n[r]];t[n[r].toLowerCase()]=n[r];for(var s=0;s<i.modes.length;s++){var a=i.modes[s].toLowerCase();t[a]=n[r]}}}();var r=n.toLowerCase().match(/([a-g][b#]?)(maj|min|mix|dor|phr|lyd|loc|m)?/);if(!r||!r[2])return n;r=r[1]+r[2];var i=t[r];return i||n},relativeMode:function(t,n){var r=e[t];if(!r)return t;if(""===n)return t;var i=n.toLowerCase().match(/^(maj|min|mix|dor|phr|lyd|loc|m)/);if(!i)return t;for(var s=i[1],a=0;a<r.modes.length;a++){var o=r.modes[a],c=o.toLowerCase().indexOf(s);if(-1!==c&&c===o.length-s.length)return o.substring(0,o.length-s.length)}return t},transposeKey:function(t,n){var r=e[t];if(!r)return t;for(;n<0;)n+=12;for(var i=(r.stepsFromC+n)%12,s=0;s<Object.keys(e).length;s++){var a=Object.keys(e)[s];if(e[a].stepsFromC===i)return a}return t}}}function vh(){if(ih)return rh;ih=1;var{relativeMajor:e}=gh(),t={acc:"sharp",note:"f"},n={acc:"sharp",note:"c"},r={acc:"sharp",note:"g"},i={acc:"sharp",note:"d"},s={acc:"sharp",note:"A"},a={acc:"sharp",note:"e"},o={acc:"flat",note:"B"},c={acc:"flat",note:"e"},l={acc:"flat",note:"A"},u={acc:"flat",note:"d"},h={acc:"flat",note:"G"},d={acc:"flat",note:"c"},f={"C#":[t,n,r,i,s,a,{acc:"sharp",note:"B"}],"F#":[t,n,r,i,s,a],B:[t,n,r,i,s],E:[t,n,r,i],A:[t,n,r],D:[t,n],G:[t],C:[],F:[o],Bb:[o,c],Eb:[o,c,l],Cm:[o,c,l],Ab:[o,c,l,u],Db:[o,c,l,u,h],Gb:[o,c,l,u,h,d],Cb:[o,c,l,u,h,d,{acc:"flat",note:"F"}],"A#":[o,c],"B#":[],"D#":[o,c,l],"E#":[o],"G#":[o,c,l,u],none:[]};return rh=function(t){var n=f[e(t)];return n?JSON.parse(JSON.stringify(n)):null}}function bh(){if(ah)return sh;ah=1;var e=function(){if(Zu)return Xu;Zu=1;var e={};const t=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];return e.pitchIndex=function(e){return t.indexOf(e)},e.noteName=function(e){return t[e]},Xu=e}(),t=mh(),n=vh(),r={},i={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},s=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],a=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];r.keySignature=function(e,t,r,o,c){if("perc"===e.clef.type||"none"===e.clef.type)return{accidentals:n(t),root:r,acc:o};c||(c=0),e.localTransposeVerticalMovement=0,e.localTransposePreferFlats=!1;var l=n(t);if(!l)return e.key;if(e.localTranspose=(e.globalTranspose?e.globalTranspose:0)+c,!e.localTranspose)return{accidentals:l,root:r,acc:o};if(e.globalTransposeOrigKeySig=l,e.localTranspose%12==0)return e.localTransposeVerticalMovement=e.localTranspose/12*7,{accidentals:l,root:r,acc:o};var u=t[0];"b"===t[1]||"#"===t[1]?(u+=t[1],t=t.substr(2)):t=t.substr(1);var h=i[u],d=void 0!==h;d||(h=0,u="C",t="");for(var f=h+e.localTranspose;f<0;)f+=12;f>11&&(f%=12);var p="m"===t[0]?a[f]:s[f],m=p+t,g=n(m);g.length>0&&"flat"===g[0].acc&&(e.localTransposePreferFlats=!0);var v=m.charCodeAt(0)-u.charCodeAt(0);return e.localTranspose>0?v<0?v+=7:0===v&&("#"!==u[1]&&"b"!==m[1]||(v+=7)):e.localTranspose<0&&(v>0?v-=7:0===v&&("b"!==u[1]&&"#"!==m[1]||(v-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=v+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=v+7*Math.ceil(e.localTranspose/12),d?{accidentals:g,root:p[0],acc:p.length>1?p[1]:""}:{accidentals:[],root:r,acc:o}},r.chordName=function(e,n){return t(n,e.localTranspose,e.localTransposePreferFlats,e.freegchord)};var o=["c","d","e","f","g","a","b"];var c={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},l={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},u={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return r.note=function(t,n){if(t.localTranspose&&"perc"!==t.clef.type){var r=n.pitch;if(t.localTransposeVerticalMovement&&(n.pitch=n.pitch+t.localTransposeVerticalMovement,n.name)){var i=n.accidental?n.name.substring(1):n.name,s=n.accidental?n.name[0]:"",a=e.pitchIndex(i);n.name=s+e.noteName(a+t.localTransposeVerticalMovement)}if(n.accidental){var h=function(e,t,n,r,i){for(var s=o[(e+49)%7],a=0,l=0;l<r.length;l++)r[l].note.toLowerCase()===s&&(a=c[r[l].acc]);for(var u=c[n]-a,h=o[(t+49)%7],d=0,f=0;f<i.accidentals.length;f++)i.accidentals[f].note.toLowerCase()===h&&(d=c[i.accidentals[f].acc]);var p=u+d;return p<-2&&(t--,p+="c"===h||"f"===h?1:2),p>2&&(t++,p-="b"===h||"e"===h?1:2),[t,p]}(r,n.pitch,n.accidental,t.globalTransposeOrigKeySig,t.targetKey);n.pitch=h[0],n.accidental=l[h[1]],n.name&&(n.name=u[h[1]]+n.name.replace(/[_^=]/g,""))}}},sh=r}function yh(){if(ch)return oh;ch=1;var e=ph(),t=bh(),n={};return function(){var r,i,s,a;n.initialize=function(e,t,n,o,c){r=e,i=t,s=n,a=c},n.standardKey=function(e,n,r,i){return t.keySignature(s,e,n,r,i)};var o={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(e,t){var n=o[e];return(n?n.mid:0)+t};n.fixClef=function(e){var t=o[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},n.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return e.accidentals.forEach((function(e){t.accidentals.push(Object.assign({},e))})),t};var l={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};n.addPosToKey=function(e,t){var n=e.verticalPos;t.accidentals.forEach((function(e){var t=l[e.note];t-=n,e.verticalPos=t})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){var t=l[e.note];t-=n,e.verticalPos=t})),n<-10?(t.accidentals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):n<-4?(t.accidentals.forEach((function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):n>=7&&(t.accidentals.forEach((function(e){e.verticalPos+=7})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos+=7})))},n.fixKey=function(e,t){var r=Object.assign({},t);return n.addPosToKey(e,r),r};var u=function(e){var t=0,n=e[t++];"^"!==n&&"_"!==n||(n=e[t++]);var r=l[n];for(void 0===r&&(r=6);t<e.length;t++)if(","===e[t])r-=7;else{if("'"!==e[t])break;r+=7}return{mid:r-6,str:e.substring(t)}};n.parseKey=function(t,a){0===t.length&&(t="none");var o=r.tokenize(t,0,t.length),l={};if(0===o.length)return i("Must pass in key signature.",t,0),l;switch(o[0].token){case"HP":e.addDirective("bagpipes"),s.key={root:"HP",accidentals:[],acc:"",mode:""},l.foundKey=!0,o.shift();break;case"Hp":e.addDirective("bagpipes"),s.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},l.foundKey=!0,o.shift();break;case"none":s.key={root:"none",accidentals:[],acc:"",mode:""},l.foundKey=!0,o.shift();break;default:var u=r.getKeyPitch(o[0].token);if(u.len>0){l.foundKey=!0;var h="",d="";o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift();var f=u.token;if(o.length>0){var p=r.getSharpFlat(o[0].token);if(p.len>0&&(o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift(),f+=p.token,h=p.token),o.length>0){var m=r.getMode(o[0].token);m.len>0&&(o.shift(),f+=m.token,d=m.token)}if(void 0===n.standardKey(f,u.token,h,0))return i("Unsupported key signature: "+f,t,0),l}var g,v=n.deepCopyKey(s.key),b=!a&&s.globalTranspose?-s.globalTranspose:0;if(a&&(g=s.globalTransposeOrigKeySig),s.key=n.deepCopyKey(n.standardKey(f,u.token,h,b)),a&&(s.globalTransposeOrigKeySig=g),s.key.mode=d,v){for(var y,_=0;_<s.key.accidentals.length;_++)for(y=0;y<v.accidentals.length;y++)v.accidentals[y].note&&s.key.accidentals[_].note.toLowerCase()===v.accidentals[y].note.toLowerCase()&&(v.accidentals[y].note=null);for(y=0;y<v.accidentals.length;y++)v.accidentals[y].note&&(s.key.impliedNaturals||(s.key.impliedNaturals=[]),s.key.impliedNaturals.push({acc:"natural",note:v.accidentals[y].note}))}}}if(0===o.length)return l;if("exp"===o[0].token&&o.shift(),0===o.length)return l;if("oct"===o[0].token&&o.shift(),0===o.length)return l;var w,x=r.getKeyAccidentals2(o);if(x.warn&&i(x.warn,t,0),x.accs){l.foundKey||(l.foundKey=!0,s.key={root:"none",acc:"",mode:"",accidentals:[]}),function(e){for(var t=0;t<e.length;t++)"b"===e[t].note?e[t].note="B":"a"===e[t].note?e[t].note="A":"F"===e[t].note?e[t].note="f":"E"===e[t].note?e[t].note="e":"D"===e[t].note?e[t].note="d":"C"===e[t].note?e[t].note="c":"G"===e[t].note&&"sharp"===e[t].acc?e[t].note="g":"g"===e[t].note&&"flat"===e[t].acc&&(e[t].note="G")}(x.accs);for(var k=0;k<x.accs.length;k++){for(var S=!1,C=0;C<s.key.accidentals.length&&!S;C++)s.key.accidentals[C].note===x.accs[k].note&&(S=!0,s.key.accidentals[C].acc!==x.accs[k].acc&&(s.key.accidentals[C].acc=x.accs[k].acc,s.key.explicitAccidentals||(s.key.explicitAccidentals=[]),s.key.explicitAccidentals.push(x.accs[k])));if(!S&&(s.key.explicitAccidentals||(s.key.explicitAccidentals=[]),s.key.explicitAccidentals.push(x.accs[k]),s.key.accidentals.push(x.accs[k]),s.key.impliedNaturals))for(var M=0;M<s.key.impliedNaturals.length;M++)s.key.impliedNaturals[M].note===x.accs[k].note&&s.key.impliedNaturals.splice(M,1)}}for(;o.length>0;)switch(o[0].token){case"m":case"middle":if(o.shift(),0===o.length)return i("Expected = after middle",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after middle",t,w.start);break}if(0===o.length)return i("Expected parameter after middle=",t,0),l;var E=r.getPitchFromTokens(o);E.warn&&i(E.warn,t,0),E.position&&(s.clef.verticalPos=E.position-6);break;case"transpose":if(o.shift(),0===o.length)return i("Expected = after transpose",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after transpose",t,w.start);break}if(0===o.length)return i("Expected parameter after transpose=",t,0),l;if("number"!==o[0].type){i("Expected number after transpose",t,o[0].start);break}s.clef.transpose=o[0].intt,o.shift();break;case"stafflines":if(o.shift(),0===o.length)return i("Expected = after stafflines",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after stafflines",t,w.start);break}if(0===o.length)return i("Expected parameter after stafflines=",t,0),l;if("number"!==o[0].type){i("Expected number after stafflines",t,o[0].start);break}s.clef.stafflines=o[0].intt,o.shift();break;case"staffscale":if(o.shift(),0===o.length)return i("Expected = after staffscale",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after staffscale",t,w.start);break}if(0===o.length)return i("Expected parameter after staffscale=",t,0),l;if("number"!==o[0].type){i("Expected number after staffscale",t,o[0].start);break}s.clef.staffscale=o[0].floatt,o.shift();break;case"octave":if(o.shift(),0===o.length)return i("Expected = after octave",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after octave",t,w.start);break}if(0===o.length)return i("Expected parameter after octave=",t,0),l;if("number"!==o[0].type){i("Expected number after octave",t,o[0].start);break}s.octave=o[0].intt,o.shift();break;case"style":if(o.shift(),0===o.length)return i("Expected = after style",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after style",t,w.start);break}if(0===o.length)return i("Expected parameter after style=",t,0),l;switch(o[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":s.style=o[0].token,o.shift();break;default:i("error parsing style element: "+o[0].token,t,o[0].start)}break;case"clef":if(o.shift(),0===o.length)return i("Expected = after clef",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after clef",t,w.start);break}if(0===o.length)return i("Expected parameter after clef=",t,0),l;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var T=o.shift();switch(T.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":case"c":T.token="alto";break;case"F":case"f":T.token="bass";break;case"G":case"g":T.token="treble";break;default:i("Expected clef name. Found "+T.token,t,T.start)}o.length>0&&"number"===o[0].type&&(T.token+=o[0].token,o.shift()),o.length>1&&("-"===o[0].token||"+"===o[0].token||"^"===o[0].token||"_"===o[0].token)&&"8"===o[1].token&&(T.token+=o[0].token+o[1].token,o.shift(),o.shift()),s.clef={type:T.token,verticalPos:c(T.token,0)},s.currentVoice&&void 0!==s.currentVoice.transpose&&(s.clef.transpose=s.currentVoice.transpose),l.foundClef=!0;break;default:i("Unknown parameter: "+o[0].token,t,o[0].start),o.shift()}return l};n.parseVoice=function(e,t,n){var o=r.getMeat(e,t,n),l=o.start,h=o.end,d=r.getToken(e,l,h);if(0!==d.length){var f=!1;void 0===s.voices[d]&&(s.voices[d]={},f=!0,s.score_is_present&&i("Can't have an unknown V: id when the %score directive is present",e,l)),l+=d.length,l+=r.eatWhiteSpace(e,l);for(var p={startStaff:f},m=function(t){var n=r.getVoiceToken(e,l,h);void 0!==n.warn?i("Expected value for "+t+" in voice: "+n.warn,e,l):void 0!==n.err?i("Expected value for "+t+" in voice: "+n.err,e,l):0===n.token.length&&'"'!==e[l]?i("Expected value for "+t+" in voice",e,l):p[t]=n.token,l+=n.len},g=function(t,n,a){var o=r.getVoiceToken(e,l,h);void 0!==o.warn?i("Expected value for "+n+" in voice: "+o.warn,e,l):void 0!==o.err?i("Expected value for "+n+" in voice: "+o.err,e,l):0===o.token.length&&'"'!==e[l]?i("Expected value for "+n+" in voice",e,l):(o.token=parseFloat(o.token),s.voices[t][n]=o.token),l+=o.len},v=function(t,n){var s=r.getVoiceToken(e,l,h);if(void 0!==s.warn)i("Expected value for "+t+" in voice: "+s.warn,e,l);else if(void 0!==s.err)i("Expected value for "+t+" in voice: "+s.err,e,l);else{if(0!==s.token.length||'"'===e[l])return s.token;i("Expected value for "+t+" in voice",e,l)}l+=s.len},b=function(t,n){var a=r.getVoiceToken(e,l,h);if(void 0!==a.warn)i("Expected one of (_B, _E, _b, _e) for "+n+" in voice: "+a.warn,e,l);else if(0===a.token.length&&'"'!==e[l])i("Expected one of (_B, _E, _b, _e) for "+n+" in voice",e,l);else{var o={_B:2,_E:9,_b:-10,_e:-3}[a.token];o?s.voices[t][n]=o:i("Expected one of (_B, _E, _b, _e) for "+n+" in voice",e,l)}l+=a.len};l<h;){var y=r.getVoiceToken(e,l,h);if(l+=y.len,y.warn)i("Error parsing voice: "+y.warn,e,l);else{var _=null;switch(y.token){case"clef":case"cl":m("clef");var w=0;void 0!==p.clef&&(p.clef=p.clef.replace(/[',]/g,""),-1!==p.clef.indexOf("+16")&&(w+=14,p.clef=p.clef.replace("+16","")),p.verticalPos=c(p.clef,w));break;case"treble":case"bass":case"tenor":case"alto":case"perc":case"none":case"treble'":case"bass'":case"tenor'":case"alto'":case"none'":case"treble''":case"bass''":case"tenor''":case"alto''":case"none''":case"treble,":case"bass,":case"tenor,":case"alto,":case"none,":case"treble,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":p.clef=y.token.replace(/[',]/g,""),p.verticalPos=c(p.clef,0),s.voices[d].clef=y.token;break;case"staves":case"stave":case"stv":m("staves");break;case"brace":case"brc":m("brace");break;case"bracket":case"brk":m("bracket");break;case"name":case"nm":m("name");break;case"subname":case"sname":case"snm":m("subname");break;case"merge":p.startStaff=!1;break;case"stem":case"stems":void 0!==(_=r.getVoiceToken(e,l,h)).warn?i("Expected value for stems in voice: "+_.warn,e,l):void 0!==_.err?i("Expected value for stems in voice: "+_.err,e,l):"up"===_.token||"down"===_.token?s.voices[d].stem=_.token:i("Expected up or down for voice stem",e,l),l+=_.len;break;case"up":case"down":s.voices[d].stem=y.token;break;case"middle":case"m":m("verticalPos"),p.verticalPos=u(p.verticalPos).mid;break;case"gchords":case"gch":s.voices[d].suppressChords=!0,"0"===(_=r.getVoiceToken(e,l,h)).token&&(l+=_.len);break;case"space":case"spc":m("spacing");break;case"scale":g(d,"scale");break;case"score":b(d,"scoreTranspose");break;case"transpose":g(d,"transpose");break;case"stafflines":g(d,"stafflines");break;case"staffscale":g(d,"staffscale");break;case"octave":g(d,"octave");break;case"volume":g(d,"volume");break;case"cue":var x=v("cue");s.voices[d].scale="on"===x?.6:1;break;case"style":void 0!==(_=r.getVoiceToken(e,l,h)).warn?i("Expected value for style in voice: "+_.warn,e,l):void 0!==_.err?i("Expected value for style in voice: "+_.err,e,l):"normal"===_.token||"harmonic"===_.token||"rhythm"===_.token||"x"===_.token||"triangle"===_.token?s.voices[d].style=_.token:i("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",e,l),l+=_.len}}l+=r.eatWhiteSpace(e,l)}if((p.startStaff||0===s.staves.length)&&(s.staves.push({index:s.staves.length,meter:s.origMeter}),s.score_is_present||(s.staves[s.staves.length-1].numVoices=0)),void 0===s.voices[d].staffNum){s.voices[d].staffNum=s.staves.length-1;var k=0;for(var S in s.voices)s.voices.hasOwnProperty(S)&&s.voices[S].staffNum===s.voices[d].staffNum&&k++;s.voices[d].index=k-1}var C=s.staves[s.voices[d].staffNum];return s.score_is_present||C.numVoices++,p.clef&&(C.clef={type:p.clef,verticalPos:p.verticalPos}),p.spacing&&(C.spacing_below_offset=p.spacing),p.verticalPos&&(C.verticalPos=p.verticalPos),p.name&&(C.name?C.name.push(p.name):C.name=[p.name]),p.subname&&(C.subname?C.subname.push(p.subname):C.subname=[p.subname]),function(e){var t=s.voices[e];if(!s.currentVoice||s.currentVoice.index!==t.index||s.currentVoice.staffNum!==t.staffNum)return s.currentVoice=t,a.setCurrentVoice(t.staffNum,t.index,e)}(d)}i("Expected a voice id",e,l)}}(),oh=n}function _h(){if(uh)return lh;uh=1;var e=fh(),t=ph(),n=yh();return lh=function(r,i,s,a,o){this.reset=function(e,r,i,s){n.initialize(e,r,i,s,o),t.initialize(e,r,i,s,o)},this.reset(r,i,s,a),this.setTitle=function(e,t){s.hasMainTitle?o.addSubtitle(e,{startChar:s.iChar,endChar:s.iChar+t+2}):(o.addMetaText("title",e,{startChar:s.iChar,endChar:s.iChar+t+2}),s.hasMainTitle=!0)},this.setMeter=function(e){if("C"===(e=r.stripComment(e)))return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"common_time"};if("C|"===e)return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"cut_time"};if("o"===e)return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===e)return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===e)return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===e)return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===e.length||"none"===e.toLowerCase())return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),null;var t=r.tokenize(e,0,e.length);try{var n=function(){var e=function(){var e={value:0,num:""},n=t.shift();for("("===n.token&&(n=t.shift());;){if("number"!==n.type)throw"Expected top number of meter";if(e.value+=parseInt(n.token),e.num+=n.token,0===t.length||"/"===t[0].token)return e;if(")"===(n=t.shift()).token){if(0===t.length||"/"===t[0].token)return e;throw"Unexpected paren in meter"}if("."!==n.token&&"+"!==n.token)throw"Expected top number of meter";if(e.num+=n.token,0===t.length)throw"Expected top number of meter";n=t.shift()}return e}();if(0===t.length)return e;var n=t.shift();if("/"!==n.token)throw"Expected slash in meter";if("number"!==(n=t.shift()).type)throw"Expected bottom number of meter";return e.den=n.token,e.value=e.value/parseInt(e.den),e};if(0===t.length)throw"Expected meter definition in M: line";for(var a={type:"specified",value:[]},o=0;;){var c=n();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),a.value.push(l),0===t.length)break}return!0===s.havent_set_length&&(s.default_length=o<.75?.0625:.125,s.havent_set_length=!1),a}catch(u){i(u,e,0)}return null},this.calcTempo=function(e){var t=1/4;s.meter&&"specified"===s.meter.type?t=1/parseInt(s.meter.value[0].den):s.origMeter&&"specified"===s.origMeter.type&&(t=1/parseInt(s.origMeter.value[0].den));for(var n=0;n<e.duration;n++)e.duration[n]=t*e.duration[n];return e},this.resolveTempo=function(){s.tempo&&(this.calcTempo(s.tempo),a.metaText.tempo=s.tempo,delete s.tempo)},this.addUserDefinition=function(t,n,r){var a=t.indexOf("=",n);if(-1!==a){var o=e.strip(t.substring(n,a)),c=e.strip(t.substring(a+1));if(1===o.length){-1!=="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~".indexOf(o)?0!==c.length?(void 0===s.macros&&(s.macros={}),s.macros[o]=c):i("Missing macro definition",t,n):i("Macro definitions must be H-Y, h-w, or tilde",t,n)}else i("Macro definitions can only be one character",t,n)}else i("Need an = in a macro definition",t,n)},this.setDefaultLength=function(e,t,n){var r=e.substring(t,n).replace(/ /g,"").split("/");if(2===r.length){var i=parseInt(r[0]),a=parseInt(r[1]);a>0&&(s.default_length=i/a,s.havent_set_length=!1)}else 1===r.length&&"1"===r[0]&&(s.default_length=1,s.havent_set_length=!1)};var c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(e,t,n,a){try{var o=r.tokenize(e,t,n);if(0===o.length)throw"Missing parameter in Q: field";var l={startChar:a+t-2,endChar:a+n},u=!0,h=o.shift();if("quote"===h.type&&(l.preString=h.token,h=o.shift(),0===o.length))return c[l.preString.toLowerCase()]&&(l.bpm=c[l.preString.toLowerCase()],l.suppressBpm=!0),{type:"immediate",tempo:l};if("alpha"===h.type&&"C"===h.token){if(0===o.length)throw"Missing tempo after C in Q: field";if("punct"===(h=o.shift()).type&&"="===h.token){if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(h=o.shift()).type)throw"Expected number after = in Q: field";l.duration=[1],l.bpm=parseInt(h.token)}else{if("number"!==h.type)throw"Expected number or equal after C in Q: field";if(l.duration=[parseInt(h.token)],0===o.length)throw"Missing = after duration in Q: field";if("punct"!==(h=o.shift()).type||"="!==h.token)throw"Expected = after duration in Q: field";if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(h=o.shift()).type)throw"Expected number after = in Q: field";l.bpm=parseInt(h.token)}}else{if("number"!==h.type)throw"Unknown value in Q: field";var d=parseInt(h.token);if(0===o.length||"quote"===o[0].type)l.duration=[1],l.bpm=d;else{if(u=!1,"punct"!==(h=o.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=o.shift()).type)throw"Expected fraction in Q: field";var f=parseInt(h.token);for(l.duration=[d/f];o.length>0&&"="!==o[0].token&&"quote"!==o[0].type;){if("number"!==(h=o.shift()).type)throw"Expected fraction in Q: field";if(d=parseInt(h.token),"punct"!==(h=o.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=o.shift()).type)throw"Expected fraction in Q: field";f=parseInt(h.token),l.duration.push(d/f)}if("punct"!==(h=o.shift()).type&&"="!==h.token)throw"Expected = in Q: field";if("number"!==(h=o.shift()).type)throw"Expected tempo in Q: field";l.bpm=parseInt(h.token)}}if(0!==o.length&&("quote"===(h=o.shift()).type&&(l.postString=h.token,h=o.shift()),0!==o.length))throw"Unexpected string at end of Q: field";return!1===s.printTempo&&(l.suppress=!0),{type:u?"delaySet":"immediate",tempo:l}}catch(p){return i(p,e,t),{type:"none"}}},this.letter_to_inline_header=function(e,c,l){var u=!1,h=r.eatWhiteSpace(e,c);if(c+=h,e.length>=c+5&&"["===e[c]&&":"===e[c+2]){var d=e.indexOf("]",c),f=s.iChar+c,p=s.iChar+d+1;switch(e.substring(c,c+3)){case"[I:":var m=t.addDirective(e.substring(c+3,d));return m&&i(m,e,c),[d-c+1+h];case"[M:":var g=this.setMeter(e.substring(c+3,d));return o.hasBeginMusic()&&g?o.appendStartingElement("meter",f,p,g):s.meter=g,[d-c+1+h];case"[K:":var v=n.parseKey(e.substring(c+3,d),!0);return v.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",f,p,s.clef),v.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",f,p,n.fixKey(s.clef,s.key)),[d-c+1+h];case"[P:":var b=t.parseFontChangeLine(e.substring(c+3,d));return l||a.lines.length<=a.lineNum?s.partForNextLine={title:b,startChar:f,endChar:p}:o.appendElement("part",f,p,{title:b}),[d-c+1+h];case"[L:":return this.setDefaultLength(e,c+3,d),[d-c+1+h];case"[Q:":if(d>0){var y=this.setTempo(e,c+3,d,s.iChar);return"delaySet"===y.type?o.hasBeginMusic()?o.appendElement("tempo",f,p,this.calcTempo(y.tempo)):s.tempoForNextLine=["tempo",f,p,this.calcTempo(y.tempo)]:"immediate"===y.type&&(!l&&o.hasBeginMusic()?o.appendElement("tempo",f,p,y.tempo):s.tempoForNextLine=["tempo",f,p,y.tempo]),[d-c+1+h,e[c+1],e.substring(c+3,d)]}break;case"[V:":if(d>0)return u=n.parseVoice(e,c+3,d),[d-c+1+h,e[c+1],e.substring(c+3,d),u];break;case"[r:":return[d-c+1+h]}}return[0]},this.letter_to_body_header=function(r,a){var c=!1;if(r.length>=a+3)switch(r.substring(a,a+2)){case"I:":var l=t.addDirective(r.substring(a+2));return l&&i(l,r,a),[r.length];case"M:":var u=this.setMeter(r.substring(a+2));return o.hasBeginMusic()&&u&&o.appendStartingElement("meter",s.iChar+a,s.iChar+r.length,u),[r.length];case"K:":var h=n.parseKey(r.substring(a+2),o.hasBeginMusic());return h.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",s.iChar+a,s.iChar+r.length,s.clef),h.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",s.iChar+a,s.iChar+r.length,n.fixKey(s.clef,s.key)),[r.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",s.iChar+a,s.iChar+r.length,{title:r.substring(a+2)}),[r.length];case"L:":return this.setDefaultLength(r,a+2,r.length),[r.length];case"Q:":var d=r.indexOf("",a+2);-1===d&&(d=r.length);var f=this.setTempo(r,a+2,d,s.iChar);return"delaySet"===f.type?o.appendElement("tempo",s.iChar+a,s.iChar+r.length,this.calcTempo(f.tempo)):"immediate"===f.type&&o.appendElement("tempo",s.iChar+a,s.iChar+r.length,f.tempo),[d,r[a],e.strip(r.substring(a+2))];case"V:":return c=n.parseVoice(r,a+2,r.length),[r.length,r[a],e.strip(r.substring(a+2)),c]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(e){var c=l[e[0]],u=e.length-2,h=r.translateString(r.stripComment(e.substring(2)));if("unalignedWords"===c||"notes"===c)o.addMetaTextArray(c,t.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+e.length});else if(void 0!==c)o.addMetaText(c,t.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+e.length});else{var d=s.iChar,f=d+e.length;switch(e[0]){case"H":for(o.addMetaTextArray("history",t.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+e.length}),e=r.peekLine();e&&":"!==e[1];)r.nextLine(),o.addMetaTextArray("history",t.parseFontChangeLine(r.translateString(r.stripComment(e))),{startChar:s.iChar,endChar:s.iChar+e.length}),e=r.peekLine();break;case"K":this.resolveTempo();var p=n.parseKey(e.substring(2),!1);!s.is_in_header&&o.hasBeginMusic()&&(p.foundClef&&o.appendStartingElement("clef",d,f,s.clef),p.foundKey&&o.appendStartingElement("key",d,f,n.fixKey(s.clef,s.key))),s.is_in_header=!1;break;case"L":this.setDefaultLength(e,2,e.length);break;case"M":s.origMeter=s.meter=this.setMeter(e.substring(2));break;case"P":s.is_in_header?o.addMetaText("partOrder",t.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+e.length}):s.partForNextLine={title:h,startChar:d,endChar:f};break;case"Q":var m=this.setTempo(e,2,e.length,s.iChar);"delaySet"===m.type?s.tempo=m.tempo:"immediate"===m.type&&(a.metaText.tempo?s.tempoForNextLine=["tempo",d,f,m.tempo]:a.metaText.tempo=m.tempo);break;case"T":s.titlecaps&&(h=h.toUpperCase()),this.setTitle(t.parseFontChangeLine(r.theReverser(h)),u);break;case"U":this.addUserDefinition(e,2,e.length);break;case"V":if(n.parseVoice(e,2,e.length),!s.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":i("Ignored header",e,0);break;default:return{regular:!0}}}return{}}}}var wh,xh,kh,Sh,Ch,Mh,Eh,Th,Ph,Ah,Nh,Ih,Oh,Dh,Lh,Bh,Vh,Rh,Fh,zh,jh,qh,Hh,Yh,Uh,Gh,Wh,$h,Kh,Qh,Xh,Zh,Jh,ed,td,nd,rd,id,sd,ad,od,cd,ld,ud,hd,dd,fd,pd,md,gd,vd,bd,yd,_d,wd,xd,kd,Sd,Cd,Md,Ed,Td,Pd,Ad,Nd,Id,Od,Dd,Ld,Bd,Vd,Rd,Fd,zd,jd,qd,Hd,Yd,Ud,Gd,Wd,$d,Kd,Qd,Xd,Zd,Jd,ef,tf,nf,rf,sf,af,of,cf,lf,uf,hf,df,ff,pf,mf,gf,vf,bf,yf,_f,wf,xf,kf,Sf,Cf,Mf,Ef,Tf,Pf,Af,Nf,If,Of,Df,Lf,Bf,Vf,Rf,Ff,zf,jf,qf,Hf,Yf,Uf,Gf,Wf,$f,Kf,Qf,Xf,Zf,Jf,ep,tp,np,rp,ip,sp,ap,op,cp,lp,up,hp,dp,fp,pp,mp,gp,vp,bp,yp,_p,wp,xp,kp,Sp,Cp,Mp,Ep,Tp,Pp,Ap,Np,Ip,Op,Dp,Lp,Bp,Vp,Rp,Fp,zp,jp,qp,Hp,Yp,Up,Gp,Wp,$p,Kp,Qp,Xp,Zp,Jp,em,tm,nm,rm,im,sm,am,om,cm,lm,um,hm,dm,fm,pm,mm,gm,vm,bm,ym,_m,wm,xm,km,Sm,Cm,Mm,Em,Tm,Pm,Am,Nm,Im,Om,Dm,Lm,Bm,Vm,Rm,Fm,zm,jm,qm,Hm,Ym,Um,Gm,Wm,$m,Km,Qm,Xm,Zm,Jm,eg,tg,ng,rg,ig,sg,ag,og,cg,lg,ug,hg,dg,fg,pg,mg,gg,vg,bg,yg,_g,wg={};function xg(){if(kh)return xh;kh=1;var e,t,n,r,i,s,a=yh(),o=bh(),{legalAccents:c,volumeDecorations:l,dynamicDecorations:u,accentPseudonyms:h,accentDynamicPseudonyms:d,nonDecorations:f,durations:p,pitches:m,rests:g,accMap:v,tripletQ:b}=(wh||(wh=1,wg.legalAccents=["trill","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x","style=triangle","D.C.alcoda","D.C.alfine","D.S.alcoda","D.S.alfine","editorial","courtesy"],wg.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],wg.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],wg.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],wg.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],wg.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",wg.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],wg.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},wg.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},wg.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},wg.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),wg),y=function(a,o,c,l,u,h){e=a,t=o,n=c,r=l,i=u,s=h,this.lineContinuation=!1},_=function(e,t,n){if(void 0===e.inTie[t])return!1;var r=e.currentVoice?100*e.currentVoice.staffNum+e.currentVoice.index:0;return!(!e.inTie[t][r]||void 0===n.pitches&&"spacer"===n.rest.type)},w={};y.prototype.parseMusic=function(a){s.resolveTempo(),n.is_in_header=!1;for(var o=0,c=n.iChar;e.isWhiteSpace(a[o])&&o<a.length;)o++;if(o!==a.length&&"%"!==a[o]){var l=n.start_new_line;void 0===n.continueall?n.start_new_line=!0:n.start_new_line=!1;var u=0,h=s.letter_to_body_header(a,o);h[0]>0&&(o+=h[0],"V"===h[1]&&this.startNewLine());for(var d=0;o<a.length;){var m=o;if("%"===a[o])break;var g=s.letter_to_inline_header(a,o,l);if(g[0]>0)o+=g[0],"V"===g[1]&&(l=!0);else{var v;for((!i.hasBeginMusic()||l&&!this.lineContinuation)&&(this.startNewLine(),l=!1);;)if((v=e.eatWhiteSpace(a,o))>0&&(o+=v),o>0&&""===a[o-1]&&(v=s.letter_to_body_header(a,o))[0]>0&&("V"===v[1]&&this.startNewLine(),o=v[0],n.start_new_line=!1),(v=T(a,o))[0]>0&&(o+=v[0]),(v=k(a,o))[0]>0){w.chord||(w.chord=[]);var b=e.translateString(v[1]);b=b.replace(/;/g,"\n");for(var y=!1,L=0;L<w.chord.length;L++)w.chord[L].position===v[2]&&(y=!0,w.chord[L].name+="\n"+b);!1===y&&(null===v[2]&&v[3]?w.chord.push({name:b,rel_position:v[3]}):w.chord.push({name:b,position:v[2]})),o+=v[0];var B=e.skipWhiteSpace(a.substring(o));B>0&&(w.force_end_beam_last=!0),o+=B}else if((v=-1===f.indexOf(a[o])?E(a,o):[0])[0]>0)null===v[1]?o+1<a.length&&this.startNewLine():v[1].length>0&&(0===v[1].indexOf("style=")?w.style=v[1].substr(6):(void 0===w.decoration&&(w.decoration=[]),"beambr1"===v[1]?w.beambr=1:"beambr2"===v[1]?w.beambr=2:w.decoration.push(v[1]))),o+=v[0];else{if(!((v=S(a,o))[0]>0))break;w.gracenotes=v[1],o+=v[0]}if((v=P(a,o))[0]>0){d=0,void 0!==w.gracenotes&&(w.rest={type:"spacer"},w.duration=.125,n.addFormattingOptions(w,r.formatting,"note"),i.appendElement("note",c+o,c+o+v[0],w),n.measureNotEmpty=!0,w={});var V={type:v[1]};0===V.type.length?t("Unknown bar type",a,o):(n.inEnding&&"bar_thin"!==V.type&&(V.endEnding=!0,n.inEnding=!1),v[2]&&(V.startEnding=v[2],n.inEnding&&(V.endEnding=!0),n.inEnding=!0,"bar_right_repeat"===v[1]?n.restoreStartEndingHoldOvers():n.duplicateStartEndingHoldOvers()),void 0!==w.decoration&&(V.decoration=w.decoration),void 0!==w.chord&&(V.chord=w.chord),V.startEnding&&void 0===n.barFirstEndingNum?n.barFirstEndingNum=n.currBarNumber:V.startEnding&&V.endEnding&&n.barFirstEndingNum?n.currBarNumber=n.barFirstEndingNum:V.endEnding&&(n.barFirstEndingNum=void 0),"bar_invisible"!==V.type&&n.measureNotEmpty&&D()&&(n.currBarNumber++,n.barNumbers&&n.currBarNumber%n.barNumbers==0&&(V.barNumber=n.currBarNumber)),n.addFormattingOptions(w,r.formatting,"bar"),i.appendElement("bar",c+m,c+o+v[0],V),n.measureNotEmpty=!1,w={}),o+=v[0]}else if("&"===a[o])(v=C(a,o))[0]>0&&(i.appendElement("overlay",c,c+1,{}),o+=1,d++);else{if((v=A(a,o)).consumed>0&&(void 0!==v.startSlur&&(w.startSlur=v.startSlur),v.dottedSlur&&(w.dottedSlur=!0),void 0!==v.triplet&&(u>0?t("Can't nest triplets",a,o):(w.startTriplet=v.triplet,w.tripletMultiplier=v.tripletQ/v.triplet,w.tripletR=v.num_notes,u=void 0===v.num_notes?v.triplet:v.num_notes)),o+=v.consumed),"["===a[o]){o++;for(var R=null,F=!1,z=!1;!z;){var j=E(a,o);j[0]>0&&(o+=j[0]);var q=I(a,o,{},!1);if(null!==q&&void 0!==q.pitch)j[0]>0&&0!==j[1].indexOf("style=")&&(void 0===w.decoration&&(w.decoration=[]),w.decoration.push(j[1])),q.end_beam&&(w.end_beam=!0,delete q.end_beam),void 0===w.pitches?(w.duration=q.duration,w.pitches=[q]):w.pitches.push(q),delete q.duration,j[0]>0&&0===j[1].indexOf("style=")&&(w.pitches[w.pitches.length-1].style=j[1].substr(6)),n.inTieChord[w.pitches.length]&&(q.endTie=!0,n.inTieChord[w.pitches.length]=void 0),q.startTie&&(n.inTieChord[w.pitches.length]=!0),o=q.endChar,delete q.endChar;else if(" "===a[o])t("Spaces are not allowed in chords",a,o),o++;else{if(o<a.length&&"]"===a[o]){o++,0!==n.next_note_duration&&(w.duration=w.duration*n.next_note_duration,n.next_note_duration=0),_(n,d,w)&&(w.pitches.forEach((function(e){e.endTie=!0})),x(n,d,!1)),u>0&&(!w.rest||"spacer"!==w.rest.type)&&0===--u&&(w.endTriplet=!0);for(var H=!1;o<a.length&&!H;){switch(a[o]){case" ":case"\t":N(w);break;case")":void 0===w.endSlur?w.endSlur=1:w.endSlur++;break;case"-":w.pitches.forEach((function(e){e.startTie={}})),x(n,d,!0);break;case">":case"<":var Y=O(a,o);o+=Y[0]-1,n.next_note_duration=Y[2],R?R*=Y[1]:R=Y[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var U=e.getFraction(a,o);R=U.value;var G=a[o=U.index];" "===G&&(F=!0),"-"===G||")"===G||" "===G||"<"===G||">"===G?o--:H=!0;break;case"0":R=0;break;default:H=!0}H||o++}}else t("Expected ']' to end the chords",a,o);void 0!==w.pitches&&(null!==R&&(w.duration=w.duration*R,F&&N(w)),n.addFormattingOptions(w,r.formatting,"note"),i.appendElement("note",c+m,c+o,w),n.measureNotEmpty=!0,w={}),z=!0}}}else{var W={},$=I(a,o,W,!0);if(void 0!==W.endTie&&x(n,d,!0),null!==$)void 0!==$.pitch?(w.pitches=[{}],void 0!==$.accidental&&(w.pitches[0].accidental=$.accidental),w.pitches[0].pitch=$.pitch,w.pitches[0].name=$.name,($.midipitch||0===$.midipitch)&&(w.pitches[0].midipitch=$.midipitch),void 0!==$.endSlur&&(w.pitches[0].endSlur=$.endSlur),void 0!==$.endTie&&(w.pitches[0].endTie=$.endTie),void 0!==$.startSlur&&(w.pitches[0].startSlur=$.startSlur),void 0!==w.startSlur&&(w.pitches[0].startSlur=w.startSlur),void 0!==w.dottedSlur&&(w.pitches[0].dottedSlur=!0),void 0!==$.startTie&&(w.pitches[0].startTie=$.startTie),void 0!==w.startTie&&(w.pitches[0].startTie=w.startTie)):(w.rest=$.rest,"multimeasure"===$.rest.type&&D()&&(n.currBarNumber+=$.rest.text-1),void 0!==$.endSlur&&(w.endSlur=$.endSlur),void 0!==$.endTie&&(w.rest.endTie=$.endTie),void 0!==$.startSlur&&(w.startSlur=$.startSlur),void 0!==$.startTie&&(w.rest.startTie=$.startTie),void 0!==w.startTie&&(w.rest.startTie=w.startTie)),void 0!==$.chord&&(w.chord=$.chord),void 0!==$.duration&&(w.duration=$.duration),void 0!==$.decoration&&(w.decoration=$.decoration),void 0!==$.graceNotes&&(w.graceNotes=$.graceNotes),delete w.startSlur,delete w.dottedSlur,_(n,d,w)&&(void 0!==w.pitches?w.pitches[0].endTie=!0:"spacer"!==w.rest.type&&(w.rest.endTie=!0),x(n,d,!1)),($.startTie||w.startTie)&&x(n,d,!0),o=$.endChar,u>0&&(!$.rest||"spacer"!==$.rest.type)&&0===--u&&(w.endTriplet=!0),$.end_beam&&N(w),w.rest&&"rest"===w.rest.type&&1===w.duration&&M(n)<=1&&(w.rest.type="whole",w.duration=M(n)),w.duration<1&&-1===p.indexOf(w.duration)&&0!==w.duration&&(w.rest&&"spacer"===w.rest.type||t("Duration not representable: "+a.substring(m,o),a,o)),n.addFormattingOptions(w,r.formatting,"note"),i.appendElement("note",c+m,c+o,w)||(this.startNewLine(),i.appendElement("note",c+m,c+o,w)),n.measureNotEmpty=!0,w={}}o===m&&(" "!==a[o]&&"`"!==a[o]&&t("Unknown character ignored",a,o),o++)}}}this.lineContinuation=a.indexOf("")>=0||h[0]>0,this.lineContinuation||(w={})}};var x=function(e,t,n){var r=e.currentVoice?100*e.currentVoice.staffNum+e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][r]=n},k=function(r,i){if('"'===r[i]){var s=e.getBrackettedSubstring(r,i,5);if(s[2]||t("Missing the closing quote while parsing the chord symbol",r,i),s[0]>0&&s[1].length>0&&"^"===s[1][0])s[1]=s[1].substring(1),s[2]="above";else if(s[0]>0&&s[1].length>0&&"_"===s[1][0])s[1]=s[1].substring(1),s[2]="below";else if(s[0]>0&&s[1].length>0&&"<"===s[1][0])s[1]=s[1].substring(1),s[2]="left";else if(s[0]>0&&s[1].length>0&&">"===s[1][0])s[1]=s[1].substring(1),s[2]="right";else if(s[0]>0&&s[1].length>0&&"@"===s[1][0]){s[1]=s[1].substring(1);var a=e.getFloat(s[1]);if(0===a.digits)return t("Missing first position in absolutely positioned annotation.",r,i),s[1]=s[1].replace("@",""),s[2]="above",s;if(s[1]=s[1].substring(a.digits),","!==s[1][0])return t("Missing comma absolutely positioned annotation.",r,i),s[1]=s[1].replace("@",""),s[2]="above",s;s[1]=s[1].substring(1);var c=e.getFloat(s[1]);if(0===c.digits)return t("Missing second position in absolutely positioned annotation.",r,i),s[1]=s[1].replace("@",""),s[2]="above",s;s[1]=s[1].substring(c.digits);var l=e.skipWhiteSpace(s[1]);s[1]=s[1].substring(l),s[2]=null,s[3]={x:a.value,y:c.value}}else!0!==n.freegchord&&(s[1]=s[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),s[1]=s[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),s[1]=s[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),s[1]=s[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),s[1]=s[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),s[1]=s[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),s[2]="default",s[1]=o.chordName(n,s[1]);return s}return[0,""]},S=function(r,i){if("{"===r[i]){var s=e.getBrackettedSubstring(r,i,1,"}");s[2]||t("Missing the closing '}' while parsing grace note",r,i),")"===r[i+s[0]]&&(s[0]++,s[1]+=")");for(var a=[],o=0,c=!1;o<s[1].length;){var l=!1;"/"===s[1][o]&&(l=!0,o++);var u=I(s[1],o,{},!1);null!==u?(u.duration=u.duration/(8*n.default_length),l&&(u.acciaccatura=!0),u.rest?t("Rests not allowed as grace notes '"+s[1][o]+"' while parsing grace note",r,i):a.push(u),c&&(u.endTie=!0,c=!1),u.startTie&&(c=!0),o=u.endChar,delete u.endChar,u.end_beam&&(u.endBeam=!0,delete u.end_beam)):(" "===s[1][o]?a.length>0&&(a[a.length-1].endBeam=!0):t("Unknown character '"+s[1][o]+"' while parsing grace note",r,i),o++)}if(a.length)return[s[0],a]}return[0]};function C(e,t){if("&"===e[t]){for(var n=t;e[t]&&":"!==e[t]&&"|"!==e[t];)t++;return[t-n,e.substring(n+1,t)]}return[0]}function M(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var E=function(r,i){var s=n.macros[r[i]];if(void 0!==s)return"!"!==s[0]&&"+"!==s[0]||(s=s.substring(1)),"!"!==s[s.length-1]&&"+"!==s[s.length-1]||(s=s.substring(0,s.length-1)),c.includes(s)?[1,s]:l.includes(s)?("hidden"===n.volumePosition&&(s=""),[1,s]):u.includes(s)?("hidden"===n.dynamicPosition&&(s=""),[1,s]):(n.ignoredDecorations.includes(s)||t("Unknown macro: "+s,r,i),[1,""]);switch(r[i]){case".":if("("===r[i+1]||"-"===r[i+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var a=e.getBrackettedSubstring(r,i,5);if(a[1].length>1&&("^"===a[1][0]||"_"===a[1][0])&&(a[1]=a[1].substring(1)),c.includes(a[1]))return a;if(l.includes(a[1]))return"hidden"===n.volumePosition&&(a[1]=""),a;if(u.includes(a[1]))return"hidden"===n.dynamicPosition&&(a[1]=""),a;var o=h.findIndex((function(e){return a[1]===e[0]}));return o>=0?(a[1]=h[o][1],a):(o=d.findIndex((function(e){return a[1]===e[0]})))>=0?(a[1]=d[o][1],"hidden"===n.dynamicPosition&&(a[1]=""),a):"!"!==r[i]||1!==a[0]&&"!"===r[i+a[0]-1]?(t("Unknown decoration: "+a[1],r,i),a[1]="",a):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"]}return[0,0]},T=function(t,n){for(var r=n;e.isWhiteSpace(t[n]);)n++;return[n-r]},P=function(n,r){var i=e.getBarLine(n,r);if(0===i.len)return[0,""];if(i.warn)return t(i.warn,n,r),[i.len,""];for(var s=0;s<n.length&&" "===n[r+i.len+s];s++);var a=i.len;if("["===n[r+i.len+s]&&(i.len+=s+1),'"'===n[r+i.len]&&"["===n[r+i.len-1]){var o=e.getBrackettedSubstring(n,r+i.len,5);return[i.len+o[0],i.token,o[1]]}var c=e.getTokenOf(n.substring(r+i.len),"1234567890-,");return 0===c.len||"-"===c.token[0]?[a,i.token]:[i.len+c.len,i.token,c.token]},A=function(n,r){var i={},s=r;for("."===n[r]&&"("===n[r+1]&&(i.dottedSlur=!0,r++);"("===n[r]||e.isWhiteSpace(n[r]);)"("===n[r]&&(r+1<n.length&&n[r+1]>="2"&&n[r+1]<="9"?(void 0!==i.triplet?t("Can't nest triplets",n,r):(i.triplet=n[r+1]-"0",i.tripletQ=b[i.triplet],i.num_notes=i.triplet,r+2<n.length&&":"===n[r+2]&&(r+3<n.length&&":"===n[r+3]?r+4<n.length&&n[r+4]>="1"&&n[r+4]<="9"?(i.num_notes=n[r+4]-"0",r+=3):t("expected number after the two colons after the triplet to mark the duration",n,r):r+3<n.length&&n[r+3]>="1"&&n[r+3]<="9"?(i.tripletQ=n[r+3]-"0",r+4<n.length&&":"===n[r+4]?r+5<n.length&&n[r+5]>="1"&&n[r+5]<="9"&&(i.num_notes=n[r+5]-"0",r+=4):r+=2):t("expected number after the triplet to mark the duration",n,r))),r++):void 0===i.startSlur?i.startSlur=1:i.startSlur++),r++;return i.consumed=r-s,i};y.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};n.partForNextLine.title&&(e.part=n.partForNextLine),e.clef=n.currentVoice&&void 0!==n.staves[n.currentVoice.staffNum].clef?Object.assign({},n.staves[n.currentVoice.staffNum].clef):Object.assign({},n.clef);var t=n.currentVoice?n.currentVoice.scoreTranspose:0;if(e.key=a.standardKey(n.key.root+n.key.acc+n.key.mode,n.key.root,n.key.acc,t),e.key.mode=n.key.mode,n.key.impliedNaturals&&(e.key.impliedNaturals=n.key.impliedNaturals),n.key.explicitAccidentals)for(var r=0;r<n.key.explicitAccidentals.length;r++){for(var s=!1,o=0;o<e.key.accidentals.length;o++)e.key.accidentals[o].note===n.key.explicitAccidentals[r].note&&(e.key.accidentals[o].acc=n.key.explicitAccidentals[r].acc,s=!0);s||e.key.accidentals.push(n.key.explicitAccidentals[r])}if(n.targetKey=e.key,e.key.explicitAccidentals&&delete e.key.explicitAccidentals,a.addPosToKey(e.clef,e.key),null!==n.meter?(n.currentVoice?(n.staves.forEach((function(e){e.meter=n.meter})),e.meter=n.staves[n.currentVoice.staffNum].meter,n.staves[n.currentVoice.staffNum].meter=null):e.meter=n.meter,n.meter=null):n.currentVoice&&n.staves[n.currentVoice.staffNum].meter&&(e.meter=n.staves[n.currentVoice.staffNum].meter,n.staves[n.currentVoice.staffNum].meter=null),n.currentVoice&&n.currentVoice.name&&(e.name=n.currentVoice.name),n.vocalfont&&(e.vocalfont=n.vocalfont),n.tripletfont&&(e.tripletfont=n.tripletfont),n.gchordfont&&(e.gchordfont=n.gchordfont),n.style&&(e.style=n.style),n.currentVoice){var c=n.staves[n.currentVoice.staffNum];c.brace&&(e.brace=c.brace),c.bracket&&(e.bracket=c.bracket),c.connectBarLines&&(e.connectBarLines=c.connectBarLines),c.name&&(e.name=c.name[n.currentVoice.index]),c.subname&&(e.subname=c.subname[n.currentVoice.index]),n.currentVoice.stem&&(e.stem=n.currentVoice.stem),n.currentVoice.stafflines&&(e.stafflines=n.currentVoice.stafflines),n.currentVoice.staffscale&&(e.staffscale=n.currentVoice.staffscale),n.currentVoice.scale&&(e.scale=n.currentVoice.scale),n.currentVoice.color&&(e.color=n.currentVoice.color),n.currentVoice.style&&(e.style=n.currentVoice.style),n.currentVoice.transpose&&(e.clef.transpose=n.currentVoice.transpose),e.currentVoice=n.currentVoice;for(var l=Object.keys(n.voices),u=0;u<l.length;u++)e.currentVoice.staffNum===n.voices[l[u]].staffNum&&e.currentVoice.index===n.voices[l[u]].index&&(e.currentVoiceName=l[u])}0===n.barNumbers&&D()&&1!==n.currBarNumber&&(e.barNumber=n.currBarNumber),i.startNewLine(e),n.key.impliedNaturals&&delete n.key.impliedNaturals,n.partForNextLine={},4===n.tempoForNextLine.length&&i.appendElement(n.tempoForNextLine[0],n.tempoForNextLine[1],n.tempoForNextLine[2],n.tempoForNextLine[3]),n.tempoForNextLine=[]};var N=function(e){return void 0!==e.duration&&e.duration<.25&&(e.end_beam=!0),e},I=function(t,s,a,c){var l,u=function(e){return"octave"===e||"duration"===e||"Zduration"===e||"broken_rhythm"===e||"end_slur"===e};"."===t[s]&&"-"===t[s+1]&&(l=!0,s++);for(var h="startSlur",d=!1;;){switch(t[s]){case"(":if("startSlur"!==h)return u(h)?(a.endChar=s,a):null;void 0===a.startSlur?a.startSlur=1:a.startSlur++;break;case")":if(!u(h))return null;void 0===a.endSlur?a.endSlur=1:a.endSlur++;break;case"^":if("startSlur"===h)a.accidental="sharp",h="sharp2";else{if("sharp2"!==h)return u(h)?(a.endChar=s,a):null;a.accidental="dblsharp",h="pitch"}break;case"_":if("startSlur"===h)a.accidental="flat",h="flat2";else{if("flat2"!==h)return u(h)?(a.endChar=s,a):null;a.accidental="dblflat",h="pitch"}break;case"=":if("startSlur"!==h)return u(h)?(a.endChar=s,a):null;a.accidental="natural",h="pitch";break;case"A":case"B":case"C":case"D":case"E":case"F":case"G":case"a":case"b":case"c":case"d":case"e":case"f":case"g":if("startSlur"!==h&&"sharp2"!==h&&"flat2"!==h&&"pitch"!==h)return u(h)?(a.endChar=s,a):null;if(a.pitch=m[t[s]],a.pitch+=7*(n.currentVoice&&void 0!==n.currentVoice.octave?n.currentVoice.octave:n.octave),a.name=t[s],a.accidental&&(a.name=v[a.accidental]+a.name),o.note(n,a),h="octave",c&&0!==n.next_note_duration?(a.duration=n.default_length*n.next_note_duration,n.next_note_duration=0,d=!0):a.duration=n.default_length,n.clef&&"perc"===n.clef.type||n.currentVoice&&"perc"===n.currentVoice.clef){var f=t[s];a.accidental&&(f=v[a.accidental]+f),r.formatting&&r.formatting.midi&&r.formatting.midi.drummap&&(a.midipitch=r.formatting.midi.drummap[f])}break;case",":if("octave"!==h)return u(h)?(a.endChar=s,a):null;a.pitch-=7,a.name+=",";break;case"'":if("octave"!==h)return u(h)?(a.endChar=s,a):null;a.pitch+=7,a.name+="'";break;case"x":case"X":case"y":case"z":case"Z":if("startSlur"!==h)return u(h)?(a.endChar=s,a):null;a.rest={type:g[t[s]]},delete a.accidental,delete a.startSlur,delete a.startTie,delete a.endSlur,delete a.endTie,delete a.end_beam,delete a.grace_notes,a.rest.type.indexOf("multimeasure")>=0?(a.duration=r.getBarLength(),a.rest.text=1,h="Zduration"):(c&&0!==n.next_note_duration?(a.duration=n.default_length*n.next_note_duration,n.next_note_duration=0,d=!0):a.duration=n.default_length,h="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===h||"duration"===h){var p=e.getFraction(t,s);for(a.duration=a.duration*p.value,a.endChar=p.index;p.index<t.length&&(e.isWhiteSpace(t[p.index])||"-"===t[p.index]);)"-"===t[p.index]?a.startTie={}:a=N(a),p.index++;s=p.index-1,h="broken_rhythm"}else if("sharp2"===h)a.accidental="quartersharp",h="pitch";else{if("flat2"!==h){if("Zduration"===h){var b=e.getNumber(t,s);return a.duration=b.num*r.getBarLength(),a.rest.text=b.num,a.endChar=b.index,a}return null}a.accidental="quarterflat",h="pitch"}break;case"-":if("startSlur"===h)i.addTieToLastNote(l),a.endTie=!0;else{if("octave"!==h&&"duration"!==h&&"end_slur"!==h)return"broken_rhythm"===h?(a.endChar=s,a):null;if(a.startTie={},d||!c)return e.isWhiteSpace(t[s+1])&&N(a),a.endChar=s+1,a;h="broken_rhythm"}break;case" ":case"\t":if(!u(h))return null;a.end_beam=!0,l=!1;do{"."===t[s]&&"-"===t[s+1]&&(l=!0,s++),"-"===t[s]&&(a.startTie={},l&&(a.startTie.style="dotted")),s++}while(s<t.length&&(e.isWhiteSpace(t[s])||"-"===t[s])||"."===t[s]&&"-"===t[s+1]);if(a.endChar=s,d||!c||"<"!==t[s]&&">"!==t[s])return a;s--,h="broken_rhythm";break;case">":case"<":if(!u(h))return null;if(!c)return a.endChar=s,a;var y=O(t,s);s+=y[0]-1,n.next_note_duration=y[2],a.duration=y[1]*a.duration,h="end_slur";break;default:return u(h)?(a.endChar=s,a):null}if(++s===t.length)return u(h)?(a.endChar=s,a):null}return null},O=function(e,t){switch(e[t]){case">":return t<e.length-2&&">"===e[t+1]&&">"===e[t+2]?[3,1.875,.125]:t<e.length-1&&">"===e[t+1]?[2,1.75,.25]:[1,1.5,.5];case"<":return t<e.length-2&&"<"===e[t+1]&&"<"===e[t+2]?[3,.125,1.875]:t<e.length-1&&"<"===e[t+1]?[2,.25,1.75]:[1,.5,1.5]}return null};function D(){return void 0===n.currentVoice||0===n.currentVoice.staffNum&&0===n.currentVoice.index}return xh=y}function kg(){if(Eh)return Mh;function e(e,t){for(var n=[],r=[],i=0,s=0;s<e.length;s++){var a=e[s],o=i+a;if(o<t)i=o;else t-i<o-t&&i>0?(n.push(s-1),r.push(Math.round(i-a)),i=a):s<e.length-1&&(n.push(s),r.push(Math.round(i)),i=0)}return r.push(Math.round(i)),{lineBreaks:n,totals:r}}function t(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function n(e,n,r,i,s,a,o,c,l,u,h){for(var d=u;d<e.length;d++){var f=e[d];r+=f,i+=f;var p=Math.abs(r-n[c]);if(Math.abs(p-a)<n[0]/10)if(p<a){var m=t(s),g=t(l);g.push(d-1),m.push(i-f),h.push({accumulator:r,lineAccumulator:f,lineWidths:m,lastVariance:Math.abs(r-n[c+1]),highestVariance:Math.max(o,a),currLine:c+1,lineBreaks:g,startIndex:d+1})}else p>a&&d<e.length-1&&(m=t(s),g=t(l),h.push({accumulator:r,lineAccumulator:i,lineWidths:m,lastVariance:p,highestVariance:Math.max(o,p),currLine:c,lineBreaks:g,startIndex:d+1}));p>a?(l.push(d-1),c++,o=Math.max(o,a),a=Math.abs(r-n[c]),s.push(i-f),i=f):a=p}s.push(i)}function r(e,t,r,i){for(var s=Math.ceil(e.total/t),a=Math.floor(e.total/s),o=[],c=0;c<s;c++)o.push(a*(c+1));var l=[];l.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var u=0;u<l.length;)n(e.measureWidths,o,l[u].accumulator,l[u].lineAccumulator,l[u].lineWidths,l[u].lastVariance,l[u].highestVariance,l[u].currLine,l[u].lineBreaks,l[u].startIndex,l),u++;for(c=0;c<l.length;c++){var h=l[c];h.variances=[],h.aveVariance=0;for(var d=0;d<h.lineWidths.length;d++){var f=h.lineWidths[d];h.variances.push(f-o[0]),h.aveVariance+=Math.abs(f-o[0])}h.aveVariance=h.aveVariance/h.lineWidths.length,i.attempts.push({type:"optimizeLineWidths",lineBreaks:h.lineBreaks,variances:h.variances,aveVariance:h.aveVariance,widths:e.measureWidths})}var p=9999999,m=-1;for(c=0;c<l.length;c++)(h=l[c]).aveVariance<p&&(p=h.aveVariance,m=c);return{failed:!1,lineBreaks:l[m].lineBreaks,variance:l[m].highestVariance}}function i(e,t,n){for(var r=[],i=[],s=0,a=!1,o=0;o<e.length;o++)(s+=e[o])>t&&(a=!0),o%n==n-1&&(o!==e.length-1&&r.push(o),i.push(Math.round(s)),s=0);return{failed:a,totals:i,lineBreaks:r}}return Eh=1,Mh={wrapLines:function(e,t,n){if(t&&0!==e.lines.length){var r=e.deline({lineBreaks:!1}),i=function(e,t){for(var n=[],r=0,i=0,s=0,a=0;a<e.length;a++){var o=e[a];if(o.staff){var c=i,l=t[r];r++;for(var u=0;u<o.staff.length;u++)for(var h=o.staff[u],d=0;d<h.voices.length;d++){s=c;for(var f=0,p=0,m=h.voices[d],g=0,v=0;v<m.length;v++){"bar"===m[v].el_type&&(l[p]===f&&(n.push({ogLine:a,line:s,staff:u,voice:d,start:g,end:v}),g=v+1,s++,i=Math.max(i,s),p++),f++)}n.push({ogLine:a,line:s,staff:u,voice:d,start:g,end:m.length}),s++,i=Math.max(i,s)}}else n.push({ogLine:a,line:s}),s++,i=Math.max(i,s)}return n}(r,t);e.lines=function(e,t,n){for(var r=[],i=[],s=[],a=1,o=0;o<t.length;o++){var c=t[o];if(e[c.ogLine].staff){var l=e[c.ogLine].staff[c.staff];if(r[c.line]||(r[c.line]={staff:[]}),!r[c.line].staff[c.staff]){r[c.line].staff[c.staff]={voices:[]},void 0!==n&&0===c.staff&&c.line>0&&(r[c.line].staff[c.staff].barNumber=a);for(var u=Object.keys(l),h=0;h<u.length;h++){var d="voices"===u[h];"meter"===u[h]&&0!==c.line&&(d=!0),d||(r[c.line].staff[c.staff][u[h]]=l[u[h]])}i[c.staff]&&(r[c.line].staff[c.staff].key=i[c.staff])}r[c.line].staff[c.staff].voices[c.voice]||(r[c.line].staff[c.staff].voices[c.voice]=[]),r[c.line].staff[c.staff].voices[c.voice]=e[c.ogLine].staff[c.staff].voices[c.voice].slice(c.start,c.end+1),s[10*c.staff+c.voice]&&r[c.line].staff[c.staff].voices[c.voice].unshift({el_type:"stem",direction:s[10*c.staff+c.voice].direction});for(var f=r[c.line].staff[c.staff].voices[c.voice],p=f.length-1;p>=0;p--)if("key"===f[p].el_type){i[c.staff]={root:f[p].root,acc:f[p].acc,mode:f[p].mode,accidentals:f[p].accidentals.filter((function(e){return"natural"!==e.acc}))};break}for(p=f.length-1;p>=0;p--)if("stem"===f[p].el_type){s[10*c.staff+c.voice]={direction:f[p].direction};break}if(void 0!==n&&0===c.staff&&0===c.voice)for(p=0;p<f.length;p++)"bar"===f[p].el_type&&(a++,p===f.length-1?delete f[p].barNumber:f[p].barNumber=a)}else r[c.line]=e[c.ogLine]}for(var m=0;m<r.length;m++)r[m].staff&&(r[m].staff=r[m].staff.filter((function(e){return null!=e})));return r}(r,i,n),e.lineBreaks=i}},calcLineWraps:function(t,n,s){if(0===n.length||s.staffwidth<n[0].left)return{reParse:!1,explanation:"Staff width is narrower than the margin",revisedParams:s};var a=s.scale?Math.max(s.scale,.1):1,o=s.wrap.minSpacing?Math.max(parseFloat(s.wrap.minSpacing),1):1,c=s.wrap.minSpacingLimit?Math.max(parseFloat(s.wrap.minSpacingLimit),1):o-.1,l=s.wrap.maxSpacing?Math.max(parseFloat(s.wrap.maxSpacing),1):void 0;s.wrap.lastLineLimit&&!l&&(l=Math.max(parseFloat(s.wrap.lastLineLimit),1));for(var u=s.wrap.preferredMeasuresPerLine?Math.max(parseInt(s.wrap.preferredMeasuresPerLine,10),0):void 0,h=[],d=[],f=0;f<n.length;f++){var p=n[f],m=s.staffwidth-p.left,g=m/o/a,v=m/c/a,b={widths:p,lineBreakPoint:g,minLineSize:m/l/a,attempts:[],staffWidth:s.staffwidth,minWidth:Math.round(v)},y=null;if(u){var _=i(p.measureWidths,g,u);b.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:u,lineBreaks:_.lineBreaks,failed:_.failed,totals:_.totals}),_.failed||(y=_.lineBreaks)}if(!y){var w=e(p.measureWidths,g);b.attempts.push({type:"Free Form",lineBreaks:w.lineBreaks,totals:w.totals}),(y=w.lineBreaks).length>0&&p.measureWidths.length<25&&(w=r(p,g,0,b),b.attempts.push({type:"Optimize",failed:w.failed,reason:w.reason,lineBreaks:w.lineBreaks,totals:w.totals}),w.failed||(y=w.lineBreaks))}h.push(y),d.push(b)}var x=function(e,t,n){var r={lineBreaks:e,staffwidth:t};for(var i in n)n.hasOwnProperty(i)&&"wrap"!==i&&"staffwidth"!==i&&(r[i]=n[i]);return{revisedParams:r}}(h,s.staffwidth,s);return x.explanation=d,x.reParse=!0,x}}}function Sg(){if(Ph)return Th;Ph=1;var e={FONTEM:360,FONTSIZE:30};return e.STEP=93*e.FONTSIZE/720,e.SPACE=10,e.TOPNOTE=15,e.STAVEHEIGHT=100,e.INDENT=50,Th=e}function Cg(){if(Nh)return Ah;var e;Nh=1;var t=fh();return function(){var n=1,r=128;function i(e,t,n){for(var r=0,i=t+1;i<e.length;i++)if("note"===e[i].el_type&&r++,e[i].decoration&&e[i].decoration.indexOf(n)>=0)return r;return r}function s(e,t,n){for(var r=Math.min(e.length,t+3),i=t;i<r;i++)if("note"===e[i].el_type&&e[i].decoration)for(var s=0;s<e[i].decoration.length;s++)if(n.indexOf(e[i].decoration[s])>=0)return e[i].decoration[s];return null}function a(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=n.length-1;r>=0&&"bar"!==n[r].el_type;)n[r].noChordVoice=!0,r--}function o(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function c(e,t){var n=1/4;e.duration&&(n=e.duration[0]);var r=60;return e.bpm&&(r=e.bpm),n*r/t}function l(e){var t;switch(e.type){case"common_time":t={el_type:"meter",num:4,den:4};break;case"cut_time":t={el_type:"meter",num:2,den:2};break;case"specified":t={el_type:"meter",num:e.value[0].num,den:e.value[0].den};break;default:t={el_type:"meter"}}return n=t.num/t.den,t}function u(e){for(var t=[],n=0;n<e.length;n++)"natural"!==e[n].acc&&t.push(e[n]);return t}function h(e,t){f(e,"HP"===t.root?{el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}:{el_type:"key",accidentals:u(t.accidentals)})}function d(e,t){f(e,l(t))}function f(e,t){for(var n=e.length-1;n>=0;n--)if(e[n].el_type===t.el_type)return void(JSON.stringify(e[n])!==JSON.stringify(t)&&e.push(t));e.push(t)}e=function(e,u){var p,m=(u=u||{}).program||0,g=u.midiTranspose||0;e.visualTranspose&&(g-=e.visualTranspose);var v=u.channel||0,b=!1,y=u.drum||"",_=u.drumBars||1,w=u.drumIntro||0,x=""!==y,k=!!u.drumOff,S=[];m=parseInt(m,10),g=parseInt(g,10),10===(v=parseInt(v,10))&&(m=r),y=y.split(" "),_=parseInt(_,10),w=parseInt(w,10);var C=e.formatting.bagpipes;C&&(m=71);var M=[];if(e.formatting.midi){var E=e.formatting.midi;E.program&&E.program.length>0&&(m=E.program[0],E.program.length>1&&(m=E.program[1],v=E.program[0]),b=!0),E.transpose&&(g=E.transpose[0]),E.channel&&(v=E.channel[0],b=!0),E.drum&&(y=E.drum),E.drumbars&&(_=E.drumbars[0]),E.drumon&&(x=!0),10===v&&(m=r),E.beat&&M.push({el_type:"beat",beats:E.beat}),E.nobeataccents&&M.push({el_type:"beataccents",value:!1})}p=u.qpm?parseInt(u.qpm,10):e.metaText.tempo?c(e.metaText.tempo,e.getBeatLength()):u.defaultQpm?u.defaultQpm:180;var T=[];C&&T.push({el_type:"bagpipes"}),T.push({el_type:"instrument",program:m}),v&&T.push({el_type:"channel",channel:v}),g&&T.push({el_type:"transpose",transpose:g}),T.push({el_type:"tempo",qpm:p});for(var P=0;P<M.length;P++)T.push(M[P]);var A,N=[],I=[],O=[],D=[0],L={};L[0]={el_type:"tempo",qpm:p,timing:0};for(var B=[],V=[],R=!1,F=e.lines,z=0;z<F.length;z++){var j=F[z];if(j.staff){let n=function(e){var t,n={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]};if(e.decoration)if(e.decoration.indexOf("pppp")>=0?t="pppp":e.decoration.indexOf("ppp")>=0?t="ppp":e.decoration.indexOf("pp")>=0?t="pp":e.decoration.indexOf("p")>=0?t="p":e.decoration.indexOf("mp")>=0?t="mp":e.decoration.indexOf("mf")>=0?t="mf":e.decoration.indexOf("f")>=0?t="f":e.decoration.indexOf("ff")>=0?t="ff":e.decoration.indexOf("fff")>=0?t="fff":e.decoration.indexOf("ffff")>=0&&(t="ffff"),t&&(A=n[t].slice(0),N[H].push({el_type:"beat",beats:A.slice(0)}),I[G]=!1,O[G]=!1),e.decoration.indexOf("crescendo(")>=0){var r=i(W,ee,"crescendo)"),a=Math.min(127,A[0]+50),o=s(W,ee+r+1,Object.keys(n));o&&(a=n[o][0]),I[G]=r>0&&Math.floor((a-A[0])/r),O[G]=!1}else if(e.decoration.indexOf("crescendo)")>=0)I[G]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var c=i(W,ee,"diminuendo)"),l=Math.max(15,A[0]-50),u=s(W,ee+c+1,Object.keys(n));u&&(l=n[u][0]),I[G]=!1,O[G]=c>0&&Math.floor((l-A[0])/c)}else e.decoration.indexOf("diminuendo)")>=0&&(O[G]=!1)};for(var q=j.staff,H=0,Y=0;Y<q.length;Y++){var U=q[Y];if(!U.clef||"TAB"!==U.clef.type)for(var G=0;G<U.voices.length;G++){var W=U.voices[G];if(!N[H]){N[H]=[].concat(JSON.parse(JSON.stringify(T)));var $=o(j.staff,H);$&&N[H].unshift({el_type:"name",trackName:$})}if(g&&"perc"===U.clef.type&&N[H].push({el_type:"transpose",transpose:0}),U.clef&&"perc"===U.clef.type&&!b)for(var K=0;K<N[H].length;K++)"instrument"===N[H][K].el_type&&(N[H][K].program=r);else U.key&&h(N[H],U.key);U.meter&&d(N[H],U.meter),!R&&x&&(N[H].push({el_type:"drum",params:{pattern:y,bars:_,on:x,intro:w}}),R=!0),U.clef&&"perc"!==U.clef.type&&U.clef.transpose&&(U.clef.el_type="clef",N[H].push({el_type:"transpose",transpose:U.clef.transpose})),U.clef&&U.clef.type&&(U.clef.type.indexOf("-8")>=0?N[H].push({el_type:"transpose",transpose:-12}):U.clef.type.indexOf("+8")>=0&&N[H].push({el_type:"transpose",transpose:12})),e.formatting.midi&&e.formatting.midi.drumoff&&(N[H].push({el_type:"bar"}),N[H].push({el_type:"drum",params:{pattern:"",on:!1}}));var Q=0,X=0,Z=0,J=0;A=[105,95,85,1];for(var ee=0;ee<W.length;ee++){var te=W[ee];switch(te.el_type){case"note":if(I[G]&&(A[0]+=I[G],A[1]+=I[G],A[2]+=I[G],N[H].push({el_type:"beat",beats:A.slice(0)})),O[G]&&(A[0]+=O[G],A[1]+=O[G],A[2]+=O[G],N[H].push({el_type:"beat",beats:A.slice(0)})),n(te),!te.rest||"spacer"!==te.rest.type){var ne={elem:te,el_type:"note",timing:D[H]};if(te.style?ne.style=te.style:S[H]&&(ne.style=S[H]),ne.duration=0===te.duration?.25:te.duration,te.startTriplet){if(X=te.tripletMultiplier,Z=te.startTriplet*X*te.duration,te.startTriplet!==te.tripletR&&ee+te.tripletR<=W.length){for(var re=0,ie=ee;ie<ee+te.tripletR;ie++)re+=W[ie].duration;Z=X*re}ne.duration=ne.duration*X,ne.duration=Math.round(1e6*ne.duration)/1e6,J=ne.duration}else X&&(te.endTriplet?(X=0,ne.duration=Math.round(1e6*(Z-J))/1e6):(ne.duration=ne.duration*X,ne.duration=Math.round(1e6*ne.duration)/1e6,J+=ne.duration));te.rest&&(ne.rest=te.rest),te.decoration&&(ne.decoration=te.decoration.slice(0)),te.pitches&&(ne.pitches=t.cloneArray(te.pitches)),te.gracenotes&&(ne.gracenotes=t.cloneArray(te.gracenotes)),te.chord&&(ne.chord=t.cloneArray(te.chord)),N[H].push(ne),"rhythm"===te.style&&a(N),Q++,D[H]+=ne.duration}break;case"key":case"keySignature":h(N[H],te);break;case"meter":d(N[H],te);break;case"clef":te.transpose&&N[H].push({el_type:"transpose",transpose:te.transpose}),te.type&&(te.type.indexOf("-8")>=0?N[H].push({el_type:"transpose",transpose:-12}):te.type.indexOf("+8")>=0&&N[H].push({el_type:"transpose",transpose:12}));break;case"tempo":p=c(te,e.getBeatLength()),N[H].push({el_type:"tempo",qpm:p,timing:D[H]}),L[""+D[H]]={el_type:"tempo",qpm:p,timing:D[H]};break;case"bar":Q>0&&N[H].push({el_type:"bar"}),n(te),Q=0;var se="bar_right_repeat"===te.type||"bar_dbl_repeat"===te.type,ae="1"===te.startEnding,oe="bar_left_repeat"===te.type||"bar_dbl_repeat"===te.type||"bar_right_repeat"===te.type;if(se){var ce=B[H];ce||(ce=0);var le=V[H];le||(le=N[H].length);for(var ue=ce;ue<le;ue++){var he=Object.assign({},N[H][ue]);he.pitches&&(he.pitches=t.cloneArray(he.pitches)),N[H].push(he)}V[H]=void 0,B[H]=void 0}ae&&(V[H]=N[H].length),oe&&(B[H]=N[H].length);break;case"style":S[H]=te.head;break;case"timeSignature":N[H].push(l(te));break;case"part":case"stem":case"scale":case"break":case"font":break;case"midi":var de=!1;switch(te.cmd){case"drumon":x=!0,de=!0;break;case"drumoff":x=!1,de=!0;break;case"drum":y=te.params,de=!0;break;case"drumbars":_=te.params[0],de=!0;break;case"drummap":break;case"channel":10===te.params[0]&&N[H].push({el_type:"instrument",program:r});break;case"program":f(N[H],{el_type:"instrument",program:te.params[0]}),b=!0;break;case"transpose":N[H].push({el_type:"transpose",transpose:te.params[0]});break;case"gchordoff":N[H].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":N[H].push({el_type:"gchordOn",tacet:!1});break;case"beat":N[H].push({el_type:"beat",beats:te.params});break;case"nobeataccents":N[H].push({el_type:"beataccents",value:!1});break;case"beataccents":N[H].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":N[H].push({el_type:te.cmd,volume:te.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":case"gchordbars":N[H].push({el_type:te.cmd,param:te.params[0]});break;case"bassprog":case"chordprog":N[H].push({el_type:te.cmd,value:te.params[0],octaveShift:te.params[1]});break;default:console.log("MIDI seq: midi cmd not handled: ",te.cmd,te)}de&&(N[0].push({el_type:"drum",params:{pattern:y,bars:_,intro:w,on:x}}),R=!0);break;default:console.log("MIDI: element type "+te.el_type+" not handled.")}}D[++H]||(D[H]=0)}}}}if(function(e,t){if(!t||0===t.length)return;for(var n=Object.keys(t),r=0;r<e.length;r++)for(var i=e[r],s=t[0]?t[0].qpm:0,a=0;a<i.length;a++){var o=i[a];"tempo"===o.el_type&&(s=o.qpm),n.indexOf(""+o.timing)>=0&&s!==t[""+o.timing].qpm&&(s=t[""+o.timing].qpm,"tempo"===o.el_type?(o.qpm=t[""+o.timing].qpm,a++):(e[r].splice(a,0,{el_type:"tempo",qpm:t[""+o.timing].qpm,timing:o.timing}),a+=2))}}(N,L),w)for(var fe=e.getPickupLength(),pe=0;pe<N.length;pe++){for(var me=0;"note"!==N[pe][me].el_type&&N[pe].length>me;)me++;if(N[pe].length>me){for(ie=0;ie<w;ie++)0===fe||ie<w-1?(N[pe].splice(me,0,{el_type:"note",rest:{type:"rest"},duration:n},{el_type:"bar"}),me+=2):N[pe].splice(me++,0,{el_type:"note",rest:{type:"rest"},duration:n-fe});k&&(x=!1,N[pe].splice(me++,0,{el_type:"drum",params:{pattern:y,bars:_,intro:w,on:x}}),k=!1)}}return N.length>0&&N[0].length>0&&(N[0][0].pickupLength=e.getPickupLength()),N}}(),Ah=e}function Mg(){if(Lh)return Dh;Lh=1;var e={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};return Dh=function(t){var n=(t.accidental?t.accidental[0]:"x")+t.verticalPos;return e[n]}}function Eg(){if(Vh)return Bh;var e;Vh=1;var t=function(){if(Oh)return Ih;Oh=1;var e=function(e,t,n,i){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=e,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!t,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=i,this.tempoChangeFactor=1,this.bassInstrument=n.bassprog&&n.bassprog.length>=1?n.bassprog[0]:0,this.chordInstrument=n.chordprog&&n.chordprog.length>=1?n.chordprog[0]:0,this.bassOctaveShift=n.bassprog&&2===n.bassprog.length?n.bassprog[1]:0,this.chordOctaveShift=n.chordprog&&2===n.chordprog.length?n.chordprog[1]:0,this.boomVolume=n.bassvol&&1===n.bassvol.length?n.bassvol[0]:64,this.chickVolume=n.chordvol&&1===n.chordvol.length?n.chordvol[0]:48,n.gchord&&n.gchord.length>0?this.overridePattern=r(n.gchord[0]):this.overridePattern=void 0};function t(e,t,r,i){var s=[];if(!e)return s;t.indexOf("boom")>=0?s.push(r?e.boom:e.boom2):i&&s.push(e.boom);var a=e.chick.length;if(t.indexOf("chick")>=0)for(var o=0;o<a;o++)s.push(e.chick[o]);switch(t){case"DO":s.push(e.chick[0]);break;case"MI":s.push(e.chick[1]);break;case"SOL":s.push(n(e,2));break;case"TI":s.push(n(e,3));break;case"TOP":s.push(n(e,4));break;case"do":s.push(e.chick[0]+12);break;case"mi":s.push(e.chick[1]+12);break;case"sol":s.push(n(e,2)+12);break;case"ti":s.push(n(e,3)+12);break;case"top":s.push(n(e,4)+12)}return s}function n(e,t){var n=Math.floor(t/e.chick.length);return e.chick[t%e.chick.length]+12*n}function r(e){for(var t=[],n=0;n<e.length;n++)switch(e[n]){case"z":case"2":t.push("");break;case"c":t.push("chick");break;case"b":t.push("boom&chick");break;case"f":t.push("boom");break;case"G":t.push("DO");break;case"H":t.push("MI");break;case"I":t.push("SOL");break;case"J":t.push("TI");break;case"K":t.push("TOP");break;case"g":t.push("do");break;case"h":t.push("mi");break;case"i":t.push("sol");break;case"j":t.push("ti");break;case"k":t.push("top")}return t}function i(e){return e/1e6}function s(e,t){return Math.round(e*t*1e6)/1e6}return e.prototype.setMeter=function(e){this.meter=e},e.prototype.setTempoChangeFactor=function(e){this.tempoChangeFactor=e},e.prototype.setLastBarTime=function(e){this.lastBarTime=e},e.prototype.setTranspose=function(e){this.transpose=e},e.prototype.setRhythmHead=function(e,t){this.hasRhythmHead=e;var n=[];if(e&&this.lastChord&&this.lastChord.chick)for(var r=0;r<this.lastChord.chick.length;r++){var i=Object.assign({},t.pitches[0]);i.actualPitch=this.lastChord.chick[r],n.push(i)}return n},e.prototype.barEnd=function(e){this.chordTrack.length>0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,i(e.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},e.prototype.gChordOn=function(e){this.chordsOff||(this.gChordTacet=e.tacet)},e.prototype.paramChange=function(e){switch(e.el_type){case"gchord":e.param&&e.param.length>0?this.overridePattern=r(e.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.bassOctaveShift=e.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.chordOctaveShift=e.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=e.param;break;case"chordvol":this.chickVolume=e.param;break;default:console.log("unhandled midi param",e)}},e.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},e.prototype.addTrack=function(e){this.chordTrackEmpty()||e.push(this.chordTrack)},e.prototype.findChord=function(e){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!e.chord||0===e.chord.length)return null;for(var t=0;t<e.chord.length;t++){var n=e.chord[t];if("default"===n.position)return n.name;if(this.breakSynonyms.indexOf(n.name.toLowerCase())>=0)return"break"}return null},e.prototype.interpretChord=function(e){if(0!==e.length){if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-2)).length)return;t=e.substring(0,1)}var n=this.basses[t];if(n){for(var r=this.transpose;r<-8;)r+=12;for(;r>8;)r-=12;(n+=r)<33?n+=12:n>44&&(n-=12);var i,s=n,a=(n+=12*this.bassOctaveShift)-5;1===e.length&&(i=this.chordNotes(n,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(s--,n--,a--,o=o.substring(1)):"#"!==c&&"♯"!==c||(s++,n++,a++,o=o.substring(1));var l=o.split("/");if((i=this.chordNotes(s,l[0])).length>=3&&(a=a+(i[2]-i[0])-7),2===l.length&&this.basses[l[1].substring(0,1)]){var u={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;n=this.basses[l[1].substring(0,1)]+u+r,a=n+=12*this.bassOctaveShift}return{boom:n,boom2:a,chick:i}}}},e.prototype.chordNotes=function(e,t){var n=this.chordIntervals[t];n||(n="ma"===t.slice(0,2).toLowerCase()||"M"===t[0]?this.chordIntervals.M:"m"===t[0]||"-"===t[0]?this.chordIntervals.m:this.chordIntervals.M),e+=12,e+=12*this.chordOctaveShift;for(var r=[],i=0;i<n.length;i++)r.push(e+n[i]);return r},e.prototype.writeNote=function(e,t,n,r,i,a){void 0!==e&&this.chordTrack.push({cmd:"note",pitch:e,volume:n,start:this.lastBarTime+r*s(t,this.tempoChangeFactor),duration:s(i,this.tempoChangeFactor),gap:0,instrument:a})},e.prototype.chordTrackEmpty=function(){for(var e=!0,t=0;t<this.chordTrack.length&&e;t++)"note"===this.chordTrack[t].cmd&&(e=!1);return e},e.prototype.resolveChords=function(e,n){if(!this.hasRhythmHead){var r=this.meter.num,i=this.meter.den,s=1/i/2,a=parseInt(r,10)/parseInt(i,10)-(n-e)/this.tempoChangeFactor;Math.abs(a)<1e-5&&(a=0),0!==this.currentChords.length&&0===this.currentChords[0].beat||this.currentChords.unshift({beat:0,chord:this.chordLastBar});var o=function(e,t){var n=[];if(0===e.length)return n;for(var r=e[0].chord,i=1;i<e.length;i++){for(var s=e[i];n.length<s.beat;)n.push(r);r=s.chord}for(;n.length<t;)n.push(r);return n}(this.currentChords,8*r/i),c=this.overridePattern?this.overridePattern:this.rhythmPatterns[r+"/"+i];if(a){c=[];for(var l=(n-e)/this.tempoChangeFactor*8,u=0;u<l/2;u+=2)c.push("chick"),c.push("")}if(!c)for(c=[],u=0;u<8*r/i/2;u++)c.push("chick"),c.push("");var h=!0,d=Math.min(c.length,o.length);for(u=0;u<d;u++){u>0&&o[u-1]&&o[u]&&o[u-1].boom!==o[u].boom&&(h=!0);var f=c[u],p=f.indexOf("boom")>=0,m=!p&&0!==u&&c[0].indexOf("boom")>=0&&(!o[u-1]||o[u-1].boom!==o[u].boom),g=t(o[u],f,h,m);p&&(h=!1);for(var v=0;v<g.length;v++)this.writeNote(g[v],.125,p||m?this.boomVolume:this.chickVolume,u,s,p||m?this.bassInstrument:this.chordInstrument),m?m=!1:p=!1}}},e.prototype.processChord=function(e){if(!this.chordTrackFinished){var t,n=this.findChord(e);if(n){var r=this.interpretChord(n);if(r){0===this.chordTrack.length&&this.chordTrack.push({cmd:"program",channel:this.chordChannel,instrument:this.chordInstrument}),this.lastChord=r;var s=(t=this.lastBarTime,8*(i(e.time)-t));this.currentChords.push({chord:this.lastChord,beat:s,start:i(e.time)})}}}},e.prototype.breakSynonyms=["break","(break)","no chord","n.c.","tacet"],e.prototype.basses={A:33,B:35,C:36,D:38,E:40,F:41,G:43},e.prototype.chordIntervals={dim:[0,3,6],"°":[0,3,6],"˚":[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"˚7":[0,3,6,9],"ø7":[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7♭5":[0,3,6,10],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"7b5":[0,4,6,10],"7(b5)":[0,4,6,10],"7♭5":[0,4,6,10],"7(b9,b5)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7(#9,b5)":[0,4,6,10,15],"7#9b5":[0,4,6,10,15],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],m:[0,3,7],"-":[0,3,7],m6:[0,3,7,9],"-6":[0,3,7,9],m7:[0,3,7,10],"-7":[0,3,7,10],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"-6/9":[0,3,7,9,14],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-maj7":[0,3,7,11],"-9+7":[0,3,7,11,13],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-maj9":[0,3,7,11,14],"-∆9":[0,3,7,11,14],mM9:[0,3,7,11,14],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],"6add9":[0,4,7,9,14],69:[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,7,10,14,17],13:[0,4,7,10,14,21],"7b9":[0,4,7,10,13],"7♭9":[0,4,7,10,13],"7(b9)":[0,4,7,10,13],"7(#9)":[0,4,7,10,15],"7#9":[0,4,7,10,15],"(13)":[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7(#9,b13)":[0,4,7,10,15,20],"7(#11)":[0,4,7,10,14,18],"7#11":[0,4,7,10,14,18],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"9(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"13(#11)":[0,4,7,10,18,21],"13#11":[0,4,7,10,18,21],maj7:[0,4,7,11],"∆7":[0,4,7,11],"Δ7":[0,4,7,11],maj9:[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7(11)":[0,4,7,11,17],"maj7(#11)":[0,4,7,11,18],"maj7(13)":[0,4,7,14,21],"maj7(9,13)":[0,4,7,11,14,21],"7sus4":[0,5,7,10],m7sus4:[0,3,7,10,17],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,10,14],"13sus4":[0,5,7,10,14,21],aug7:[0,4,8,10],"+7":[0,4,8,10],"+":[0,4,8],"7#5":[0,4,8,10],"7♯5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9♯5":[0,4,8,10,14],"9+5":[0,4,8,10,14],"-7(#5)":[0,3,8,10],"-7#5":[0,3,8,10],"7(#5)":[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"maj7(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5,#11)":[0,4,8,11,18],"maj7#5#11":[0,4,8,11,18],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,21],"13#5":[0,4,8,10,14,21],5:[0,7],"5(8)":[0,7,12],"5add8":[0,7,12]},e.prototype.rhythmPatterns={"2/2":["boom","","","","chick","","",""],"3/2":["boom","","","","chick","","","","chick","","",""],"4/2":["boom","","","","chick","","","","boom","","","","chick","","",""],"2/4":["boom","","chick",""],"3/4":["boom","","chick","","chick",""],"4/4":["boom","","chick","","boom","","chick",""],"5/4":["boom","","chick","","chick","","boom","","chick",""],"6/4":["boom","","chick","","boom","","chick","","boom","","chick",""],"3/8":["boom","","chick"],"5/8":["boom","chick","chick","boom","chick"],"6/8":["boom","","chick","boom","","chick"],"7/8":["boom","chick","chick","boom","chick","boom","chick"],"9/8":["boom","","chick","boom","","chick","boom","","chick"],"10/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick"],"11/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick","chick"],"12/8":["boom","","chick","boom","","chick","boom","","chick","boom","","chick"]},Ih=e}(),n=Mg();return function(){var r,i,s,a,o,c,l,u,h,d,f,p,m,g,v,b,y,_=1,w={num:4,den:4},x=128,k=!0,S=105,C=95,M=85,E=.25,T=0,P={},A=0;function N(e){for(var t=u.length-1;t>=0;t--)if("program"===u[t].cmd)return void(u[t].channel=e)}function I(e){return e/1e6}function O(e){return Math.round(e*_*1e6)/1e6}function D(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return e.num%3==0?.375:.125;case 16:return.125}return.25}function L(e,t){var n=t.start,r=t.duration,i=O(1/32);switch(e){case"trill":for(var s=2;r>0;)u.push({cmd:"note",pitch:t.pitch+s,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),s=2===s?0:2,r-=i,n+=i;break;case"mordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,u.push({cmd:"note",pitch:t.pitch+2,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:r,gap:0,instrument:l});break;case"lowermordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,u.push({cmd:"note",pitch:t.pitch-2,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:r,gap:0,instrument:l});break;case"turn":i=t.duration/4,u.push({cmd:"note",pitch:t.pitch+2,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n+i,duration:i,gap:0,instrument:l,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:n+2*i,duration:i,gap:0,instrument:l,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n+3*i,duration:i,gap:0,instrument:l,style:"decoration"});break;case"roll":for(;r>0;)u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=2*i,n+=2*i}}function B(e,t){var r,i=function(e,t){if(t)return 0;var n;if(null!=m)n=m,m=void 0;else if(k)if(A>e)n=M;else{var r=(e-p)/D(w);n=0===r?S:parseInt(r,10)===r?C:M}else n=C;return g&&(n+=g,g=void 0),n<0&&(n=0),n>127&&(n=127),t?0:n}(I(e.time),t);if(f.processChord(e),e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(r=function(e,t){for(var r,i=0,s=[],a=0;a<e.length;a++)i+=(r=e[a]).duration;var o=t/2/i;for(a=0;a<e.length;a++){var c=R(r=e[a]);if(l===x&&y){var u=n(r);u&&y[u]&&(c=y[u].sound)}var h={pitch:c,duration:r.duration*o};h=z(h),s.push(h)}return s}(e.gracenotes,e.pitches[0].duration),e.elem&&(e.elem.midiGraceNotePitches=function(e,t,n,r){var i=[];n=Math.round(n);for(var s=0;s<e.length;s++){var a=e[s];u.push({cmd:"note",pitch:a.pitch,volume:n,start:t,duration:a.duration,gap:0,instrument:r,style:"grace"}),i.push({pitch:a.pitch,durationInMeasures:a.duration,volume:n,instrument:r}),t+=a.duration}return i}(r,I(e.time),2*i/3,l))),e.elem){var s=I(e.time),a=s/E/o*60*1e3;if(void 0===e.elem.currentTrackMilliseconds)e.elem.currentTrackMilliseconds=a,e.elem.currentTrackWholeNotes=s;else if(void 0===e.elem.currentTrackMilliseconds.length)e.elem.currentTrackMilliseconds!==a&&(e.elem.currentTrackMilliseconds=[e.elem.currentTrackMilliseconds,a],e.elem.currentTrackWholeNotes=[e.elem.currentTrackWholeNotes,s]);else{for(var c=!1,h=0;h<e.elem.currentTrackMilliseconds.length;h++)e.elem.currentTrackMilliseconds[h]===a&&(c=!0);c||(e.elem.currentTrackMilliseconds.push(a),e.elem.currentTrackWholeNotes.push(s))}}if(e.pitches){var v="",b=function(e,t){var n={};if(e.decoration)for(var r=0;r<e.decoration.length;r++)"staccato"===e.decoration[r]?n.thisBreakBetweenNotes="staccato":"tenuto"===e.decoration[r]?n.thisBreakBetweenNotes="tenuto":"accent"===e.decoration[r]?n.velocity=Math.min(127,1.5*t):"trill"===e.decoration[r]?n.noteModification="trill":"lowermordent"===e.decoration[r]?n.noteModification="lowermordent":"uppermordent"===e.decoration[r]||"mordent"===e.decoration[r]?n.noteModification="mordent":"turn"===e.decoration[r]?n.noteModification="turn":"roll"===e.decoration[r]&&(n.noteModification="roll");return n}(e,i);b.thisBreakBetweenNotes&&(v=b.thisBreakBetweenNotes),b.velocity&&(i=b.velocity);var _=e.pitches;"rhythm"===e.style&&(_=f.setRhythmHead(!0,e)),e.elem&&(e.elem.midiPitches=[]);for(var P=0;P<_.length;P++){var N=_[P];if(N){N.startSlur&&(T+=N.startSlur.length),N.endSlur&&(T-=N.endSlur.length);var B=N.actualPitch?N.actualPitch:R(N);if(l===x&&y){var V=n(N);V&&y[V]&&(B=y[V].sound)}var F={cmd:"note",pitch:B,volume:i,start:I(e.time),duration:O(N.duration),instrument:l,startChar:e.elem.startChar,endChar:e.elem.endChar};if(F=z(F),e.gracenotes&&(F.duration=F.duration/2,F.start=F.start+F.duration),e.elem&&e.elem.midiPitches.push(F),b.noteModification)L(b.noteModification,F);else{switch(T>0?F.endType="tenuto":v&&(F.endType=v),F.endType){case"tenuto":F.gap=-.001;break;case"staccato":var j=.4*F.duration;F.gap=o/60*j;break;default:F.gap=0}u.push(F)}}}u.length}var q=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);d=Math.max(d,I(e.time)+O(q))}e=function(e,n,x,O){n||(n={}),O||(O={}),r=[],i=[0,0,0,0,0,0,0],a=[],o=n.qpm,_=1,c=void 0,l=void 0,u=void 0,h=void 0,d=0,y=x,w={num:4,den:4},k=!0,S=105,C=95,M=85,E=.25,m=void 0,g=void 0,T=0,v=[],P={},b=1,e.length>0&&e[0].length>0&&(A=e[0][0].pickupLength),void 0===n.bassprog||O.bassprog||(O.bassprog=[n.bassprog]),void 0===n.bassvol||O.bassvol||(O.bassvol=[n.bassvol]),void 0===n.chordprog||O.chordprog||(O.chordprog=[n.chordprog]),void 0===n.chordvol||O.chordvol||(O.chordvol=[n.chordvol]),void 0===n.gchord||O.gchord||(O.gchord=[n.gchord]),f=new t(e.length,n.chordsOff,O,w),function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n],i={},s=t.qpm,a=0,o=1,c=0;c<r.length;c++){var l=r[c];if("tempo"!==l.el_type){l.time=a;var u=l.duration?l.duration:0;if(a+=Math.round(u*o*1e6),l.pitches){for(var h=0;h<l.pitches.length;h++){var d=l.pitches[h];if(d)if(d.duration=l.duration,d.startTie)void 0===i[d.pitch]?i[d.pitch]={el:c,pitch:h}:(r[i[d.pitch].el].pitches[i[d.pitch].pitch].duration+=d.duration,l.pitches[h]=null);else if(d.endTie){var f=i[d.pitch];if(f){var p=d.duration;delete r[f.el].pitches[f.pitch].startTie,r[f.el].pitches[f.pitch].duration+=p,l.pitches[h]=null,delete i[d.pitch]}else delete d.endTie}}delete l.duration}}else s?o=l.qpm?s/l.qpm:1:s=l.qpm}for(var m in i)if(i.hasOwnProperty(m)){var g=i[m];delete r[g.el].pitches[g.pitch].startTie}}}(e,n);for(var L=0;L<e.length;L++){s=0,f.setTranspose(s);var V=e[L];u=[{cmd:"program",channel:L,instrument:c}],h=void 0,p=0,f.setLastBarTime(0);var R=!1;(!0===n.voicesOff||n.voicesOff&&n.voicesOff.length&&n.voicesOff.indexOf(L)>=0)&&(R=!0);for(var z=0;z<V.length;z++){var j=V[z];switch(j.el_type){case"name":h={cmd:"text",type:"name",text:j.trackName};break;case"note":B(j,R);break;case"key":i=F(j);break;case"meter":w=j,f.setMeter(w),E=D(w),H();break;case"tempo":o?_=j.qpm?o/j.qpm:1:o=j.qpm,f.setTempoChangeFactor(_);break;case"transpose":s=j.transpose,f.setTranspose(s);break;case"bar":f.barEnd(j),r=[],0===L&&Y(e.length+1),f.setRhythmHead(!1),p=I(j.time),f.setLastBarTime(p);break;case"bagpipes":break;case"instrument":if(void 0===c&&(c=j.program),l=j.program,u.length>0&&"program"===u[u.length-1].cmd)u[u.length-1].instrument=j.program;else{var U;for(U=u.length-1;U>=0&&"program"!==u[U].cmd;U--);(U<0||u[U].instrument!==j.program)&&u.push({cmd:"program",channel:0,instrument:j.program})}break;case"channel":N(j.channel);break;case"drum":P=q(j.params),H();break;case"gchordOn":f.gChordOn(j);break;case"beat":S=j.beats[0],C=j.beats[1],M=j.beats[2];break;case"vol":m=j.volume;break;case"volinc":g=j.volume;break;case"beataccents":k=j.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":f.paramChange(j);break;default:console.log("MIDI creation. Unknown el_type: "+j.el_type+"\n")}}void 0===u[0].instrument&&(u[0].instrument=c||0),h&&u.unshift(h),a.push(u),f.finish(),v.length}return n.detuneOctave&&function(e,t){for(var n={},r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++){var s=e[r][i];"note"===s.cmd&&(void 0===n[s.start]&&(n[s.start]=[]),n[s.start].push({track:r,event:i,pitch:s.pitch}))}var a=Object.keys(n);for(r=0;r<a.length;r++){var o=n[a[r]];if(o.length>1){var c=(o=o.sort((function(e,t){return e.pitch-t.pitch})))[o.length-1],l=c.pitch%12,u=!1;for(i=0;!u&&i<o.length-1;i++)o[i].pitch%12===l&&(u=!0);if(u){var h=e[c.track][c.event];h.cents||(h.cents=0),h.cents+=t}}}}(a,parseInt(n.detuneOctave,10)),f.addTrack(a),v.length>0&&a.push(v),{tempo:o,instrument:c,tracks:a,totalDuration:d}};var V=[0,2,4,5,7,9,11];function R(e){if(void 0!==e.midipitch)return e.midipitch;var t=e.pitch;if(e.accidental)switch(e.accidental){case"sharp":r[t]=1;break;case"flat":r[t]=-1;break;case"natural":r[t]=0;break;case"dblsharp":r[t]=2;break;case"dblflat":r[t]=-2;break;case"quartersharp":r[t]=.25;break;case"quarterflat":r[t]=-.25}var n=12*function(e){return Math.floor(e/7)}(t)+V[j(t)]+60;return void 0!==r[t]?n+=r[t]:n+=i[j(t)],n+=s}function F(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var n=0;n<e.accidentals.length;n++){var r,i=e.accidentals[n];switch(i.acc){case"flat":r=-1;break;case"quarterflat":r=-.25;break;case"sharp":r=1;break;case"quartersharp":r=.25;break;default:r=0}t[j(i.note.toLowerCase().charCodeAt(0)-"c".charCodeAt(0))]+=r}return t}function z(e){var t=""+e.pitch;return t.indexOf(".75")>=0?(e.pitch=Math.round(e.pitch),e.cents=-50):t.indexOf(".25")>=0&&(e.pitch=Math.round(e.pitch),e.cents=50),e}function j(e){return(e%=7)<0&&(e+=7),e}function q(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],n=[],r="",i=0,s=0;s<t.length;s++)if("d"===t[s]&&i++,"d"===t[s]||"z"===t[s])0!==r.length?(n.push(r),r=t[s]):r+=t[s];else{if(0===r.length)return{on:!1};r+=t[s]}if(0!==r.length&&n.push(r),e.pattern.length!==2*i+1)return{on:!1};for(var a={on:!0,bars:e.bars,pattern:[]},o=D(w),c=0,l=0;l<n.length;l++){r=n[l];for(var u=1,h=!1,d=0,f=1;f<r.length;f++)switch(r[f]){case"/":0!==d&&(u*=d),d=0,h=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d=10*d+r[f];break;default:return{on:!1}}h?(0===d&&(d=2),u/=d):d&&(u*=d),"d"===r[0]?(a.pattern.push({len:u*o,pitch:e.pattern[1+c],velocity:e.pattern[1+c+i]}),c++):a.pattern.push({len:u*o,pitch:null})}return b=e.bars?e.bars:1,a}function H(){if(P&&P.pattern){for(var e=P,t=0,n=w.num/w.den,r=0;r<e.pattern.length;r++)t+=e.pattern[r].len;var i=t/b/n;for(r=0;r<e.pattern.length;r++)e.pattern[r].len=e.pattern[r].len/i;P=e}}function Y(e){if(0!==v.length||P.on){var t=w.num/w.den;if(0===v.length){if(d<t)return;v.push({cmd:"program",channel:e,instrument:x})}if(P.on)for(var n=p,r=0;r<P.pattern.length;r++){var i=O(P.pattern[r].len);P.pattern[r].pitch&&v.push({cmd:"note",pitch:P.pattern[r].pitch,volume:P.pattern[r].velocity,start:n,duration:i,gap:0,instrument:x}),n+=i}}}}(),Bh=e}function Tg(){if(jh)return zh;jh=1;var e=fh(),t=Sg(),n=Cg(),r=Eg(),i=function(){if(Fh)return Rh;function e(e,t){return"abselem"===e?"abselem":t}function t(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var n=0;n<t.length;n++)t[n].unshift(e)}function n(e,t){e.el_type="key",e.startChar=-1,e.endChar=-1;for(var n=0;n<t.length;n++)t[n].unshift(e)}function r(e,t){e.el_type="clef",e.startChar=-1,e.endChar=-1;for(var n=0;n<t.length;n++)t[n].unshift(e)}function i(e,t,n){e.el_type="font",e.type=n,e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function s(t,n){return!t||JSON.stringify(t,e)===JSON.stringify(n,e)}function a(e){for(var t={},n=Object.keys(e),r=0;r<n.length;r++)if("staff"!==n[r])t[n[r]]=e[n[r]];else{t.staff=[];for(var i=0;i<e.staff.length;i++){for(var s={},a=Object.keys(e.staff[i]),o=0;o<a.length;o++)if("voices"!==a[o])s[a[o]]=e.staff[i][a[o]];else{s.voices=[];for(var c=0;c<e.staff[i].voices.length;c++)s.voices.push([].concat(e.staff[i].voices[c]))}t.staff.push(s)}}return t}return Fh=1,Rh=function(e,o){o||(o={});for(var c=!!o.lineBreaks,l=[],u=!1,h=[],d=[],f=[],p=[],m=[],g=[],v=[],b=0;b<e.length;b++){var y=e[b];if(y.staff){if(u&&!y.vskip)for(var _=l[l.length-1],w=0;w<_.staff.length;w++){var x=y.staff[w],k=_.staff[w];if(x&&(s(x.meter,h[w])||(t(x.meter,x.voices),h[w]=x.meter,delete x.meter),s(x.key,d[w])||(n(x.key,x.voices),d[w]=x.key,delete x.key),x.title&&(k.abbrevTitle=x.title),s(x.clef,f[w])||(r(x.clef,x.voices),f[w]=x.clef,delete x.clef),s(x.vocalfont,p[w])||(i(x.vocalfont,x.voices,"vocalfont"),p[w]=x.vocalfont,delete x.vocalfont),s(x.gchordfont,m[w])||(i(x.gchordfont,x.voices,"gchordfont"),m[w]=x.gchordfont,delete x.gchordfont),s(x.tripletfont,g[w])||(i(x.tripletfont,x.voices,"tripletfont"),g[w]=x.tripletfont,delete x.tripletfont),s(x.annotationfont,v[w])||(i(x.annotationfont,x.voices,"annotationfont"),v[w]=x.annotationfont,delete x.annotationfont)),x)for(var S=0;S<k.voices.length;S++){var C=k.voices[S],M=x.voices[S];c&&C.push({el_type:"break"}),M&&(k.voices[S]=C.concat(M))}}else{for(var E=0;E<y.staff.length;E++)d[E]=y.staff[E].key,h[E]=y.staff[E].meter,f[E]=y.staff[E].clef;l.push(a(y))}u=!0}else u=!1,l.push(y)}return l}}();return zh=function(){function s(e,t,n,r){for(var i=0;i<r.length;i++)e[n][r[i]]=t[n][r[i]]}function a(e,t){for(;t<e.length&&null===e[t].left;)t++;return e[t]}this.reset=function(){this.version="1.1.0",this.media="screen",this.metaText={},this.metaTextInfo={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0,this.runningFonts={},delete this.visualTranspose},this.reset(),this.copyTopInfo=function(e){var t=["tempo","title","header","rhythm","origin","composer","author","partOrder"];s(this,e,"metaText",t),s(this,e,"metaTextInfo",t)},this.copyBottomInfo=function(e){var t=["unalignedWords","book","source","discography","notes","transcription","history","abc-copyright","abc-creator","abc-edited-by","footer"];s(this,e,"metaText",t),s(this,e,"metaTextInfo",t)},this.getBeatLength=function(){var e=this.getMeterFraction(),t=1;return(6===e.num||9===e.num||12===e.num||3===e.num&&8===e.den)&&(t=3),t/e.den},this.getPickupLength=function(){var e=this.getBarLength(),t=function(e,t){for(var n=0,r=0;r<e.length;r++)if(e[r].staff)for(var i=0;i<e[r].staff.length;i++)for(var s=0;s<e[r].staff[i].voices.length;s++)for(var a=e[r].staff[i].voices[s],o=1,c=0;c<a.length;c++){var l=a[c].rest&&"spacer"===a[c].rest.type;if(a[c].startTriplet&&(o=a[c].tripletMultiplier),a[c].duration&&!l&&"tempo"!==a[c].el_type&&(n+=a[c].duration*o),a[c].endTriplet&&(o=1),n>=t&&(n-=t),"bar"===a[c].el_type)return n}return n}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var n=this.metaText?this.metaText.tempo:null;t=this.getBpm(n)}return t<=0&&(t=1),6e4*(this.getBeatsPerMeasure()/t)},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++){var r=t.staff[n].meter;if(r)return r}}return{type:"common_time"}},this.getMeterFraction=function(){var e=this.getMeter(),t=4,n=4;return e&&("specified"===e.type?(t=parseInt(e.value[0].num,10),n=parseInt(e.value[0].den,10)):"cut_time"===e.type?(t=2,n=2):"common_time"===e.type&&(t=4,n=4)),this.meter={num:t,den:n},this.meter},this.getKeySignature=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++)if(t.staff[n].key)return t.staff[n].key}return{}},this.getElementFromChar=function(e){for(var t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.staff)for(var r=0;r<n.staff.length;r++)for(var i=n.staff[r],s=0;s<i.voices.length;s++)for(var a=i.voices[s],o=0;o<a.length;o++){var c=a[o];if(c.startChar&&c.endChar&&c.startChar<=e&&c.endChar>e)return c}}return null},this.addElementToEvents=function(t,n,r,i,s,a,o,c,l,u){if(n.hint)return{isTiedState:void 0,duration:0};var h=n.durationClass?n.durationClass:n.duration;if(n.abcelem.rest&&"spacer"===n.abcelem.rest.type&&(h=0),h>0){for(var d=[],f=0;f<n.elemset.length;f++)null!==n.elemset[f]&&d.push(n.elemset[f]);var p=n.startTie;if(void 0!==l)t["event"+l].elements.push(d),u&&(t["event"+r]||(t["event"+r]={type:"event",milliseconds:r,line:a,measureNumber:o,top:i,height:s,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),t["event"+r].measureStart=!0,u=!1),p||(l=void 0);else{if(t["event"+r]){if(t["event"+r].left?t["event"+r].left=Math.min(t["event"+r].left,n.x):t["event"+r].left=n.x,t["event"+r].elements.push(d),t["event"+r].startCharArray.push(n.abcelem.startChar),t["event"+r].endCharArray.push(n.abcelem.endChar),null===t["event"+r].startChar&&(t["event"+r].startChar=n.abcelem.startChar),null===t["event"+r].endChar&&(t["event"+r].endChar=n.abcelem.endChar),n.abcelem.midiPitches&&n.abcelem.midiPitches.length){t["event"+r].midiPitches||(t["event"+r].midiPitches=[]);for(f=0;f<n.abcelem.midiPitches.length;f++)t["event"+r].midiPitches.push(n.abcelem.midiPitches[f])}if(n.abcelem.midiGraceNotePitches&&n.abcelem.midiGraceNotePitches.length){t["event"+r].midiGraceNotePitches||(t["event"+r].midiGraceNotePitches=[]);for(var m=0;m<n.abcelem.midiGraceNotePitches.length;m++)t["event"+r].midiGraceNotePitches.push(n.abcelem.midiGraceNotePitches[m])}}else t["event"+r]={type:"event",milliseconds:r,line:a,measureNumber:o,top:i,height:s,left:n.x,width:n.w,elements:[d],startChar:n.abcelem.startChar,endChar:n.abcelem.endChar,startCharArray:[n.abcelem.startChar],endCharArray:[n.abcelem.endChar],midiPitches:n.abcelem.midiPitches?e.cloneArray(n.abcelem.midiPitches):[]},n.abcelem.midiGraceNotePitches&&(t["event"+r].midiGraceNotePitches=e.cloneArray(n.abcelem.midiGraceNotePitches));u&&(t["event"+r].measureStart=!0,u=!1)}}return{isTiedState:l,duration:h/c,nextIsBar:u||"bar"===n.type}},this.makeVoicesArray=function(){for(var e=[],n=[],r={},i=0;i<this.engraver.staffgroups.length;i++){var s=this.engraver.staffgroups[i];if(s&&s.staffs&&s.staffs.length>0)for(var a=s.staffs[0],o=a.absoluteY,c=o-a.top*t.STEP,l=s.staffs[s.staffs.length-1],u=(o=l.absoluteY)-l.bottom*t.STEP-c,h=s.voices,d=0;d<h.length;d++)if(!h[d].staff||!h[d].staff.isTabStaff){var f=!1;e[d]||(e[d]=[]),void 0===n[d]&&(n[d]=0);for(var p=h[d].children,m=0;m<p.length;m++)"tempo"===p[m].type&&(r[n[d]]=this.getBpm(p[m].abcelem)),e[d].push({top:c,height:u,line:s.line,measureNumber:n[d],elem:p[m]}),"bar"===p[m].type&&f&&n[d]++,"note"!==p[m].type&&"rest"!==p[m].type||(f=!0)}}return this.tempoLocations=r,e},this.setupEvents=function(e,t,n,r){r||(r=1);for(var i,s=[],o={},c=e,l=!0,u=this.makeVoicesArray(),h=0,d=0;d<u.length;d++){var f=c,p=Math.round(1e3*f),m=0,g=-1,v=u[d],b=n;t=this.getBeatLength()*b/60;for(var y=-1,_=0;_<v.length;_++){var w=v[_].measureNumber;y!==w&&this.tempoLocations[w]&&(b=this.tempoLocations[w],t=r*this.getBeatLength()*b/60,y=w);var x,k=v[_].elem,S=this.addElementToEvents(o,k,p,v[_].top,v[_].height,v[_].line,v[_].measureNumber,t,i,l);if(i=S.isTiedState,l=S.nextIsBar,f+=S.duration,k.duration>0&&o["event"+p]&&(x="event"+p),p=Math.round(1e3*f),"bar"===k.type){var C=k.abcelem.type,M="bar_right_repeat"===C||"bar_dbl_repeat"===C,E="1"===k.abcelem.startEnding,T="bar_left_repeat"===C||"bar_dbl_repeat"===C||"bar_right_repeat"===C;if(M){_>0&&(o[x].endX=k.x),-1===g&&(g=_);var P=0;y=-1;for(var A=m;A<g;A++){y!==(w=v[A].measureNumber)&&this.tempoLocations[w]&&(b=this.tempoLocations[w],t=r*this.getBeatLength()*b/60,y=w);var N=v[A].elem;i=(S=this.addElementToEvents(o,N,p,v[A].top,v[A].height,v[A].line,v[A].measureNumber,t,i,l)).isTiedState,l=S.nextIsBar,f+=S.duration,P=p,p=Math.round(1e3*f)}o["event"+P]&&(o["event"+P].endX=v[g].elem.x),l=!0,g=-1}E&&(g=_),T&&(m=_)}}h=Math.max(h,p)}return function(e){for(var t,n,r,i,s=e.length-1;s>=0;s--){var a=e[s];"bar"===a.type?(a.top=r,a.nextTop=t,t=r,a.bottom=i,a.nextBottom=n,n=i):"event"===a.type&&(r=a.top,i=a.top+a.height)}}(s=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t.sort((function(e,t){var n=e.milliseconds-t.milliseconds;return 0!==n?n:"bar"===e.type?-1:1}))}(o)),function(e,t){if(t.length<1)return;for(var n=0;n<t.length-1;n++){var r=t[n],i=a(t,n+1);if(null!==r.left){var s=i&&r.top===i.top?i.left:e[r.line].staffGroup.w;void 0!==r.endX?s>r.left&&(r.endX=Math.min(r.endX,s)):r.endX=s}}var o=t[t.length-1];o.endX=e[o.line].staffGroup.w}(this.lines,s),s.push({type:"end",milliseconds:h}),this.addUsefulCallbackInfo(s,b*r),s},this.addUsefulCallbackInfo=function(e,t){for(var n=this.millisecondsPerMeasure(t),r=0;r<e.length;r++){e[r].millisecondsPerMeasure=n}},this.getBpm=function(e){var t;if(e||(e=this.metaText?this.metaText.tempo:null),e){t=e.bpm;var n=this.getBeatLength();t=t*(e.duration&&e.duration.length>0?e.duration[0]:n)/n}if(!t){t=180;var r=this.getMeterFraction();r&&3!==r.num&&r.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var n=this.metaText?this.metaText.tempo:null,r=this.getBpm(n),i=1;e?n&&(i=e/r):e=r;var s=this.getBeatLength(),a=e/60,o=this.getBarLength()/s*t/a;o&&(o-=this.getPickupLength()/s/a);var c=s*a;return this.noteTimings=this.setupEvents(o,c,e,i),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*a):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=n(this,e);return r(t,e,this.formatting.percmap,this.formatting.midi)},this.deline=function(e){return i(this.lines,e)},this.findSelectableElement=function(e){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(e):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}}}function Pg(){if(Hh)return qh;Hh=1;var e=yh();function t(e){if(!e)return!1;if("string"==typeof e)return!1;for(var t=0;t<e.length;t++)if("string"!=typeof e[t])return!1;return!0}function n(e){for(var t=!1,n=[],i=0;i<e.lines.length;i++){var s=e.lines[i];if(s.staff)for(var a=0;a<s.staff.length;a++){for(var o=s.staff[a],c=[],l=0;l<o.voices.length;l++){var u=o.voices[l];c.push({hasOverlay:!1,voice:[],snip:[]}),n[i]=0;for(var h=0,d=!1,f=-1,p=0;p<u.length;p++){var m=u[p];if("overlay"!==m.el_type||d)"bar"===m.el_type?(d?(d=!1,c[l].snip.push({start:f,len:p-f}),c[l].voice.push(m)):(h>0&&c[l].voice.push({el_type:"note",duration:h,rest:{type:"invisible"},startChar:m.startChar,endChar:m.endChar}),c[l].voice.push(m)),h=0):"note"===m.el_type?d?c[l].voice.push(m):(h+=m.duration,n[i]+=m.duration):"scale"!==m.el_type&&"stem"!==m.el_type&&"overlay"!==m.el_type&&"style"!==m.el_type&&"transpose"!==m.el_type&&"color"!==m.el_type||c[l].voice.push(m);else{t=!0,d=!0,f=p,c[l].hasOverlay=!0;for(var g=0;g<i;g++)n[g]&&e.lines[g].staff&&o.voices.length>=e.lines[g].staff[0].voices.length&&e.lines[g].staff[0].voices.push([{el_type:"note",duration:n[g],rest:{type:"invisible"},startChar:m.startChar,endChar:m.endChar}])}}c[l].hasOverlay&&0===c[l].snip.length&&c[l].snip.push({start:f,len:u.length-f})}for(l=0;l<c.length;l++){var v=c[l];if(v.hasOverlay){v.voice.splice(0,0,{el_type:"stem",direction:"down"}),o.voices.push(v.voice);for(var b=v.snip.length-1;b>=0;b--){var y=v.snip[b];o.voices[l].splice(y.start,y.len),o.voices[l].splice(y.start+1,0,{el_type:"stem",direction:"auto"});var _=r(o.voices[l],y.start);o.voices[l].splice(_,0,{el_type:"stem",direction:"up"})}for(b=0;b<o.voices[o.voices.length-1].length;b++){o.voices[o.voices.length-1][b]=Object.assign({},o.voices[o.voices.length-1][b]);var w=o.voices[o.voices.length-1][b];"bar"===w.el_type&&w.startEnding&&delete w.startEnding,"bar"===w.el_type&&w.endEnding&&delete w.endEnding}}}}}return t}function r(e,t){for(var n=t-1;n>0&&"bar"!==e[n].el_type;n--);return n}function a(e,t,n,r){var i;r[t]||(r[t]=[]),r[t][n]||(r[t][n]=[]);for(var s=function(e,s,a){if(void 0===r[t][n][a]){for(i=0;i<r[t][n].length;i++)if(void 0!==r[t][n][i]){a=i;break}if(void 0===r[t][n][a]){var o=100*a+1;e.endSlur.forEach((function(e){o===e&&--o})),r[t][n][a]=[o]}}for(var c,l=0;l<s;l++)c=r[t][n][a].pop(),e.endSlur.push(c);return 0===r[t][n][a].length&&delete r[t][n][a],c},a=function(e,i,s,a){e.startSlur=[],void 0===r[t][n][s]&&(r[t][n][s]=[]);for(var o=100*s+1,c=0;c<i;c++)a&&(a.forEach((function(e){o===e&&++o})),a.forEach((function(e){o===e&&++o})),a.forEach((function(e){o===e&&++o}))),r[t][n][s].forEach((function(e){o===e&&++o})),r[t][n][s].forEach((function(e){o===e&&++o})),r[t][n][s].push(o),e.startSlur.push({label:o}),e.dottedSlur&&(e.startSlur[e.startSlur.length-1].style="dotted",delete e.dottedSlur),o++},o=0;o<e.length;o++){var c=e[o];if("note"===c.el_type){if(c.gracenotes)for(var l=0;l<c.gracenotes.length;l++){if(c.gracenotes[l].endSlur){var u=c.gracenotes[l].endSlur;c.gracenotes[l].endSlur=[];for(var h=0;h<u;h++)s(c.gracenotes[l],1,20)}c.gracenotes[l].startSlur&&(i=c.gracenotes[l].startSlur,a(c.gracenotes[l],i,20))}if(c.endSlur&&(i=c.endSlur,c.endSlur=[],s(c,i,0)),c.startSlur&&a(c,i=c.startSlur,0),c.pitches){for(var d=[],f=0;f<c.pitches.length;f++)if(c.pitches[f].endSlur){var p=c.pitches[f].endSlur;c.pitches[f].endSlur=[];for(var m=0;m<p;m++){var g=s(c.pitches[f],1,f+1);d.push(g)}}for(f=0;f<c.pitches.length;f++)c.pitches[f].startSlur&&(i=c.pitches[f].startSlur,a(c.pitches[f],i,f+1,d));c.gracenotes&&c.pitches[0].endSlur&&100===c.pitches[0].endSlur[0]&&c.pitches[0].startSlur&&(c.gracenotes[0].endSlur?c.gracenotes[0].endSlur.push(c.pitches[0].startSlur[0].label):c.gracenotes[0].endSlur=[c.pitches[0].startSlur[0].label],1===c.pitches[0].endSlur.length?delete c.pitches[0].endSlur:100===c.pitches[0].endSlur[0]?c.pitches[0].endSlur.shift():100===c.pitches[0].endSlur[c.pitches[0].endSlur.length-1]&&c.pitches[0].endSlur.pop(),1===r[t][n][1].length?delete r[t][n][1]:r[t][n][1].pop())}}}}function o(e,t){for(i=0;i<e.length;i++)if(void 0!==e[i].staff)for(s=0;s<e[i].staff.length;s++){var n=[];for(v=0;v<e[i].staff[s].voices.length;v++)for(var r=e[i].staff[s].voices[v],a=0,o=0;o<r.length;o++)if("bar"===r[o].el_type){if(++a>=t&&o<r.length-1){var l=c(e,i);if(!l){var u=JSON.parse(JSON.stringify(e[i]));e.push(Object.assign({},u)),l=e[e.length-1];for(var h=0;h<l.staff.length;h++)for(var d=0;d<l.staff[h].voices.length;d++)l.staff[h].voices[d]=[]}var f=o+1,p=e[i].staff[s].voices[v].slice(f);return e[i].staff[s].voices[v]=e[i].staff[s].voices[v].slice(0,f),l.staff[s].voices[v]=n.concat(p.concat(l.staff[s].voices[v])),!0}}else r[o].duration||n.push(r[o])}return!1}function c(e,t){for(t++;e.length>t;){if(e[t].staff)return e[t];t++}return null}function l(e){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function u(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type||"bar"===e[t].el_type)return!0;return!1}function h(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type&&(void 0===e[t].rest||void 0!==e[t].chord))return!0;return!1}function d(e,t){e.vskipPending&&(t.vskip=e.vskipPending,delete e.vskipPending),e.lines.push(t)}function f(e){void 0!==e.potentialStartBeam&&void 0!==e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function p(e,t,n){if(e.runningFonts[t]){for(var r=!1,i=Object.keys(n),s=0;s<i.length;s++)e.runningFonts[t][i[s]]!==n[i[s]]&&(r=!0);r&&(e.lines[e.lineNum].staff[e.staffNum][t]=n)}e.runningFonts[t]=n}function m(e,t,n){var r=t.lines[t.lineNum].staff[t.staffNum];if(r.voices[t.voiceNum]=[],r.title||(r.title=[]),r.title[t.voiceNum]={name:n.name,subname:n.subname},n.style&&e.appendElement("style",null,null,{head:n.style}),n.stem)e.appendElement("stem",null,null,{direction:n.stem});else if(t.voiceNum>0){if(void 0!==r.voices[0]){for(var i=!1,s=0;s<r.voices[0].length;s++)"stem"===r.voices[0].el_type&&(i=!0);if(!i){r.voices[0].splice(0,0,{el_type:"stem",direction:"up"})}}e.appendElement("stem",null,null,{direction:"down"})}n.scale&&e.appendElement("scale",null,null,{size:n.scale}),n.color&&e.appendElement("color",null,null,{color:n.color})}function g(e,t,n){n.key&&n.key.impliedNaturals&&(n.key.accidentals=n.key.accidentals.concat(n.key.impliedNaturals),delete n.key.impliedNaturals),t.lines[t.lineNum].staff[t.staffNum]={voices:[],clef:n.clef,key:n.key,workingClef:n.clef};var r=t.lines[t.lineNum].staff[t.staffNum];void 0!==n.stafflines&&(r.clef.stafflines=n.stafflines,r.workingClef.stafflines=n.stafflines),n.staffscale&&(r.staffscale=n.staffscale),n.annotationfont&&p(t,"annotationfont",n.annotationfont),n.gchordfont&&p(t,"gchordfont",n.gchordfont),n.tripletfont&&p(t,"tripletfont",n.tripletfont),n.vocalfont&&p(t,"vocalfont",n.vocalfont),n.bracket&&(r.bracket=n.bracket),n.brace&&(r.brace=n.brace),n.connectBarLines&&(r.connectBarLines=n.connectBarLines),n.barNumber&&(r.barNumber=n.barNumber),m(e,t,n),n.part&&e.appendElement("part",n.part.startChar,n.part.endChar,{title:n.part.title}),void 0!==n.meter&&(r.meter=n.meter),t.vskipPending&&(t.lines[t.lineNum].vskip=t.vskipPending,delete t.vskipPending)}return qh=function(r){var i=this,s={},p="";r.reset(),this.setVisualTranspose=function(e){e&&(r.visualTranspose=e)},this.cleanUp=function(i,s,d){l(r),delete r.runningFonts,function(e){t(e.metaText.notes)&&(e.metaText.notes=e.metaText.notes.join("\n"));t(e.metaText.history)&&(e.metaText.history=e.metaText.history.join("\n"))}(r),r.metaText.tempo&&r.metaText.tempo.bpm&&!r.metaText.tempo.duration&&(r.metaText.tempo.duration=[r.getBeatLength()]);var f,p,m=!1;for(b=0;b<r.lines.length;b++)if(void 0!==r.lines[b].staff){var g=!1;for(f=0;f<r.lines[b].staff.length;f++)if(void 0===r.lines[b].staff[f])m=!0,r.lines[b].staff[f]=null;else for(p=0;p<r.lines[b].staff[f].voices.length;p++)void 0===r.lines[b].staff[f].voices[p]?r.lines[b].staff[f].voices[p]=[]:u(r.lines[b].staff[f].voices[p])&&(g=!0);g||(r.lines[b]=null,m=!0)}if(m&&(r.lines=r.lines.filter((function(e){return!!e})),r.lines.forEach((function(e){e.staff&&(e.staff=e.staff.filter((function(e){return!!e})))}))),i)for(;o(r.lines,i););if(s){for(m=!1,b=0;b<r.lines.length;b++)if(void 0!==r.lines[b].staff)for(f=0;f<r.lines[b].staff.length;f++){var v=!1;for(p=0;p<r.lines[b].staff[f].voices.length;p++)h(r.lines[b].staff[f].voices[p])&&(v=!0);v||(m=!0,r.lines[b].staff[f]=null)}m&&r.lines.forEach((function(e){e.staff&&(e.staff=e.staff.filter((function(e){return!!e})))}))}for(function(e){for(var t=!0,n=0;n<e.length;n++){var r=e[n];if(r.staff){for(var i=0;i<r.staff.length;i++){var s=r.staff[i];if(s.title){for(var a=!1,o=0;o<s.title.length;o++)s.title[o]?(s.title[o]=t?s.title[o].name:s.title[o].subname,s.title[o]?a=!0:s.title[o]=""):s.title[o]="";a||delete s.title}}t=!1}}}(r.lines),b=0;b<r.lines.length;b++)if(r.lines[b].staff)for(f=0;f<r.lines[b].staff.length;f++)delete r.lines[b].staff[f].workingClef;for(;n(r););for(var b=0;b<r.lines.length;b++){var y=r.lines[b].staff;if(y)for(r.staffNum=0;r.staffNum<y.length;r.staffNum++)for(y[r.staffNum].clef&&e.fixClef(y[r.staffNum].clef),r.voiceNum=0;r.voiceNum<y[r.staffNum].voices.length;r.voiceNum++){var _=y[r.staffNum].voices[r.voiceNum];a(_,r.staffNum,r.voiceNum,d);for(var w=0;w<_.length;w++)"clef"===_[w].el_type&&e.fixClef(_[w]);if(_.length>0&&_[_.length-1].barNumber){var x=c(r.lines,b);x&&(x.staff[0].barNumber=_[_.length-1].barNumber),delete _[_.length-1].barNumber}}}return delete r.staffNum,delete r.voiceNum,delete r.lineNum,delete r.potentialStartBeam,delete r.potentialEndBeam,delete r.vskipPending,d},this.addTieToLastNote=function(e){var t=function(e){if(!e.lines[e.lineNum])return null;if(!e.lines[e.lineNum].staff)return null;if(!e.lines[e.lineNum].staff[e.staffNum])return null;var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum];if(!t)return null;for(var n=t.length-1;n>=0;n--){var r=t[n];if("note"===r.el_type)return r}return null}(r);return!!(t&&t.pitches&&t.pitches.length>0)&&(t.pitches[0].startTie={},e&&(t.pitches[0].startTie.style="dotted"),!0)},this.appendElement=function(e,t,n,a){var o;(a.el_type=e,null!==t&&(a.startChar=t),null!==n&&(a.endChar=n),"note"===e)?((o=a).duration?o.duration:0)>=.25||a.force_end_beam_last&&void 0!==r.potentialStartBeam?f(r):a.end_beam&&void 0!==r.potentialStartBeam?void 0===a.rest?function(e,t){t.potentialStartBeam.startBeam=!0,e.endBeam=!0,delete t.potentialStartBeam,delete t.potentialEndBeam}(a,r):f(r):void 0===a.rest&&(void 0===r.potentialStartBeam?a.end_beam||(r.potentialStartBeam=a,delete r.potentialEndBeam):r.potentialEndBeam=a):f(r);return delete a.end_beam,delete a.force_end_beam_last,a.rest&&"invisible"===a.rest.type&&delete a.decoration,!(r.lines.length<=r.lineNum||r.lines[r.lineNum].staff.length<=r.staffNum)&&(function(e,t,n,r,i){var s=t.lines[t.lineNum].staff[t.staffNum];if(void 0!==n.pitches){var a=s.workingClef.verticalPos;n.pitches.forEach((function(e){e.verticalPos=e.pitch-a}))}if(void 0!==n.gracenotes){var o=s.workingClef.verticalPos;n.gracenotes.forEach((function(e){e.verticalPos=e.pitch-o}))}s.voices.length<=t.voiceNum&&(r[i]||(r[i]={}),m(e,t,r[i]));s.voices[t.voiceNum].push(n)}(i,r,a,s,p),!0)},this.appendStartingElement=function(e,t,n,i){var s;l(r),"key"===e&&(s=i.impliedNaturals,delete i.impliedNaturals,delete i.explicitAccidentals);var a=Object.assign({},i);if(r.lines[r.lineNum]){var o=r.lines[r.lineNum].staff;if(o){o.length<=r.staffNum&&(o[r.staffNum]={},o[r.staffNum].clef=Object.assign({},o[0].clef),o[r.staffNum].key=Object.assign({},o[0].key),o[0].meter&&(o[r.staffNum].meter=Object.assign({},o[0].meter)),o[r.staffNum].workingClef=Object.assign({},o[0].workingClef),o[r.staffNum].voices=[[]]),"clef"===e&&(o[r.staffNum].workingClef=a);for(var c=o[r.staffNum].voices[r.voiceNum],u=0;u<c.length;u++){if("note"===c[u].el_type||"bar"===c[u].el_type)return a.el_type=e,a.startChar=t,a.endChar=n,s&&(a.accidentals=s.concat(a.accidentals)),void c.push(a);if(c[u].el_type===e)return a.el_type=e,a.startChar=t,a.endChar=n,s&&(a.accidentals=s.concat(a.accidentals)),void(c[u]=a)}o[r.staffNum][e]=i}}},this.addSubtitle=function(e,t){d(r,{subtitle:{text:e,startChar:t.startChar,endChar:t.endChar}})},this.addSpacing=function(e){r.vskipPending=e},this.addNewPage=function(e){d(r,{newpage:e})},this.addSeparator=function(e,t,n,i){d(r,{separator:{spaceAbove:Math.round(e),spaceBelow:Math.round(t),lineLength:Math.round(n),startChar:i.startChar,endChar:i.endChar}})},this.addText=function(e,t){d(r,{text:{text:e,startChar:t.startChar,endChar:t.endChar}})},this.addCentered=function(e){d(r,{text:[{text:e,center:!0}]})},this.changeVoiceScale=function(e){i.appendElement("scale",null,null,{size:e})},this.changeVoiceColor=function(e){i.appendElement("color",null,null,{color:e})},this.startNewLine=function(e){l(r),e.currentVoiceName&&(p=e.currentVoiceName,s[e.currentVoiceName]=e),void 0===r.lines[r.lineNum]?function(e,t,n){t.lines[t.lineNum]={staff:[]},g(e,t,n)}(i,r,e):void 0===r.lines[r.lineNum].staff?(r.lineNum++,this.startNewLine(e)):void 0===r.lines[r.lineNum].staff[r.staffNum]?g(i,r,e):void 0===r.lines[r.lineNum].staff[r.staffNum].voices[r.voiceNum]?m(i,r,e):u(r.lines[r.lineNum].staff[r.staffNum].voices[r.voiceNum])?(r.lineNum++,this.startNewLine(e)):e.part&&i.appendElement("part",e.part.startChar,e.part.endChar,{title:e.part.title})},this.setRunningFont=function(e,t){r.runningFonts[e]=t},this.setBarNumberImmediate=function(e){var t=this.getCurrentVoice();if(t&&t.length>0){var n=t[t.length-1];if("bar"!==n.el_type)return e-1;void 0!==n.barNumber&&(n.barNumber=e)}return e},this.hasBeginMusic=function(){for(var e=0;e<r.lines.length;e++)if(r.lines[e].staff)return!0;return!1},this.isFirstLine=function(e){for(var t=e-1;t>=0;t--)if(void 0!==r.lines[t].staff)return!1;return!0},this.getCurrentVoice=function(){var e=function(e,t){for(;t>=0;){if(e[t].staff)return e[t];t--}return null}(r.lines,r.lineNum);if(!e)return null;var t=e.staff[r.staffNum];return t&&void 0!==t.voices[r.voiceNum]?t.voices[r.voiceNum]:null},this.setCurrentVoice=function(e,t,n){r.staffNum=e,r.voiceNum=t,p=n;for(var i=0;i<r.lines.length;i++)if(r.lines[i].staff&&(void 0===r.lines[i].staff[e]||void 0===r.lines[i].staff[e].voices[t]||!u(r.lines[i].staff[e].voices[t])))return r.lineNum=i,!(r.lines[i].staff[e]&&!r.lines[i].staff[e].voices[t]);return r.lineNum=i,!1},this.addMetaText=function(e,t,n){void 0===r.metaText[e]?(r.metaText[e]=t,r.metaTextInfo[e]=n):("string"==typeof r.metaText[e]&&"string"==typeof t?r.metaText[e]+="\n"+t:("string"===r.metaText[e]&&(r.metaText[e]=[{text:r.metaText[e]}]),"string"==typeof t&&(t=[{text:t}]),r.metaText[e]=r.metaText[e].concat(t)),r.metaTextInfo[e].endChar=n.endChar)},this.addMetaTextArray=function(e,t,n){void 0===r.metaText[e]?(r.metaText[e]=[t],r.metaTextInfo[e]=n):(r.metaText[e].push(t),r.metaTextInfo[e].endChar=n.endChar)},this.addMetaTextObj=function(e,t,n){r.metaText[e]=t,r.metaTextInfo[e]=n}}}function Ag(){if(Uh)return Yh;Uh=1;var e=fh(),t=ph(),n=_h(),r=xg(),i=function(){if(Ch)return Sh;Ch=1;var e=fh(),t=function(t,n){this.lineIndex=0,this.lines=t,this.multilineVars=n,this.skipWhiteSpace=function(e){for(var t=0;t<e.length;t++)if(!this.isWhiteSpace(e[t]))return t;return e.length};var r=function(e,t){return t>=e.length};this.eatWhiteSpace=function(e,t){for(var n=t;n<e.length;n++)if(!this.isWhiteSpace(e[n]))return n-t;return n-t},this.getKeyPitch=function(e){var t=this.skipWhiteSpace(e);if(r(e,t))return{len:0};switch(e[t]){case"A":return{len:t+1,token:"A"};case"B":return{len:t+1,token:"B"};case"C":return{len:t+1,token:"C"};case"D":return{len:t+1,token:"D"};case"E":return{len:t+1,token:"E"};case"F":return{len:t+1,token:"F"};case"G":return{len:t+1,token:"G"}}return{len:0}},this.getSharpFlat=function(e){if("bass"===e)return{len:0};switch(e[0]){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(e){var t=function(e,t){for(;t<e.length&&(e[t]>="a"&&e[t]<="z"||e[t]>="A"&&e[t]<="Z");)t++;return t},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var i=e.substring(n,n+3).toLowerCase();switch((i.length>1&&" "===i[1]||"^"===i[1]||"_"===i[1]||"="===i[1])&&(i=i[0]),i){case"mix":return{len:t(e,n),token:"Mix"};case"dor":return{len:t(e,n),token:"Dor"};case"phr":return{len:t(e,n),token:"Phr"};case"lyd":return{len:t(e,n),token:"Lyd"};case"loc":return{len:t(e,n),token:"Loc"};case"aeo":case"min":case"m":return{len:t(e,n),token:"m"};case"maj":case"ion":return{len:t(e,n),token:""}}return{len:0}},this.getClef=function(t,n){var i=t,s=this.skipWhiteSpace(t);if(r(t,s))return{len:0};var a=!1,o=t.substring(s);if(e.startsWith(o,"clef=")&&(a=!0,o=o.substring(5),s+=5),0===o.length&&a)return{len:s+5,warn:"No clef specified: "+i};var c=this.skipWhiteSpace(o);if(r(o,c))return{len:0};c>0&&(s+=c,o=o.substring(c));var l=null;if(e.startsWith(o,"treble"))l="treble";else if(e.startsWith(o,"bass3"))l="bass3";else if(e.startsWith(o,"bass"))l="bass";else if(e.startsWith(o,"tenor"))l="tenor";else if(e.startsWith(o,"alto2"))l="alto2";else if(e.startsWith(o,"alto1"))l="alto1";else if(e.startsWith(o,"alto"))l="alto";else if(!n&&a&&e.startsWith(o,"none"))l="none";else if(e.startsWith(o,"perc"))l="perc";else if(!n&&a&&e.startsWith(o,"C"))l="tenor";else if(!n&&a&&e.startsWith(o,"F"))l="bass";else{if(n||!a||!e.startsWith(o,"G"))return{len:s+5,warn:"Unknown clef specified: "+i};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:s+l.length,token:l,explicit:a}},this.getBarLine=function(e,t){switch(e[t]){case"]":switch(e[++t]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return e[++t]>="1"&&e[t]<="9"||'"'===e[t]?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}case":":switch(e[++t]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(e[++t]){case"]":return"|"===e[++t]&&":"===e[++t]?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};case"|":return":"===e[++t]?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}default:return{len:1,warn:"Unknown bar symbol"}}case"[":if("|"!==e[++t])return e[t]>="1"&&e[t]<="9"||'"'===e[t]?{len:1,token:"bar_invisible"}:{len:0};switch(e[++t]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}case"|":switch(e[++t]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return":"===e[++t]?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var n=0;":"===e[t+n];)n++;return{len:1+n,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var n=0;n<e.length;n++)if(t.indexOf(e[n])<0)return{len:n,token:e.substring(0,n)};return{len:n,token:e}},this.getToken=function(e,t,n){for(var r=t;r<n&&!this.isWhiteSpace(e[r]);)r++;return e.substring(t,r)},this.isMatch=function(t,n){var i=this.skipWhiteSpace(t);return r(t,i)?0:e.startsWith(t.substring(i),n)?i+n.length:0},this.getPitchFromTokens=function(e){var t={};if(t.position={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11}[e[0].token],void 0===t.position)return{warn:"Pitch expected. Found: "+e[0].token};for(e.shift();e.length;)switch(e[0].token){case",":t.position-=7,e.shift();break;case"'":t.position+=7,e.shift();break;default:return t}return t},this.getKeyAccidentals2=function(e){for(var t;e.length>0;){var n;if("^"===e[0].token){if(n="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token){case"^":n="dblsharp",e.shift();break;case"/":n="quartersharp",e.shift()}}else if("="===e[0].token)n="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(n="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token){case"_":n="dblflat",e.shift();break;case"/":n="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===t&&(t=[]),t.push({acc:n,note:e[0].token[0]}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+n+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(e){var t={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var i=null;switch(e[n]){case"^":case"_":case"=":i=e[n];break;default:return{len:0}}if(n++,r(e,n))return{len:1,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[i],note:e[n]}};case"^":case"_":case"/":if(i+=e[n],n++,r(e,n))return{len:2,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[i],note:e[n]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,n){var r=e.indexOf("%",t);for(r>=0&&r<n&&(n=r);t<n&&(" "===e[t]||"\t"===e[t]||""===e[t]);)t++;for(;t<n&&(" "===e[n-1]||"\t"===e[n-1]||""===e[n-1]);)n--;return{start:t,end:n}};var i=function(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"},s=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,t,n,r){var a=this.getMeat(e,t,n);t=a.start,n=a.end;for(var o,c=[];t<n;){if('"'===e[t]){for(o=t+1;o<n&&'"'!==e[o];)o++;c.push({type:"quote",token:e.substring(t+1,o),start:t+1,end:o}),o++}else if(i(e[t])){if(o=t+1,r)for(;o<n&&!this.isWhiteSpace(e[o]);)o++;else for(;o<n&&i(e[o]);)o++;c.push({type:"alpha",token:e.substring(t,o),continueId:s(e[o]),start:t,end:o}),t=o+1}else if("."===e[t]&&s(e[o+1])){o=t+1;for(var l;o<n&&s(e[o]);)o++;l=parseFloat(e.substring(t,o)),c.push({type:"number",token:e.substring(t,o),intt:null,floatt:l,continueId:i(e[o]),start:t,end:o}),t=o+1}else if(s(e[t])||"-"===e[t]&&s(e[o+1])){o=t+1;for(var u,h=null;o<n&&s(e[o]);)o++;if("."===e[o]&&s(e[o+1]))for(o++;o<n&&s(e[o]);)o++;else h=parseInt(e.substring(t,o));u=parseFloat(e.substring(t,o)),c.push({type:"number",token:e.substring(t,o),intt:h,floatt:u,continueId:i(e[o]),start:t,end:o}),t=o+1}else" "===e[t]||"\t"===e[t]||c.push({type:"punct",token:e[t],start:t,end:t+1}),o=t+1;t=o}return c},this.getVoiceToken=function(e,t,n){for(var r=t;r<n&&this.isWhiteSpace(e[r])||"="===e[r];)r++;if('"'===e[r]){var i=e.indexOf('"',r+1);return-1===i||i>=n?{len:1,err:"Missing close quote"}:{len:i-t+1,token:this.translateString(e.substring(r+1,i))}}for(var s=r;s<n&&!this.isWhiteSpace(e[s])&&"="!==e[s];)s++;return{len:s-t+1,token:e.substring(r,s)}};var a={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å",aa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å",AA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~N":"Ñ","~n":"ñ","=s":"š",vs:"š",DH:"Ð",dh:"ð",HO:"Ő",Ho:"ő",HU:"Ű",Hu:"ű","'Y":"Ý","'y":"ý","^Y":"Ŷ","^y":"ŷ",'"Y':"Ÿ",'"y':"ÿ",vS:"Š",vZ:"Ž",vz:"ž"},o={"#":"♯",b:"♭","=":"♮"},c={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:" ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};function l(e){const t=/^(\d+)\./.exec(e);return t?t[1]:null}this.translateString=function(e){var t=e.split("\\");if(1===t.length)return e;var n=null;return t.forEach((function(e){if(null===n)n=e;else{var t=a[e.substring(0,2)];void 0!==t?n+=t+e.substring(2):void 0!==(t=c[e.substring(0,3)])?n+=t+e.substring(3):(t=o[e.substring(0,1)],n+=void 0!==t?t+e.substring(1):"\\"+e)}})),n},this.getNumber=function(e,t){for(var n=0;t<e.length;)switch(e[t]){case"0":n*=10,t++;break;case"1":n=10*n+1,t++;break;case"2":n=10*n+2,t++;break;case"3":n=10*n+3,t++;break;case"4":n=10*n+4,t++;break;case"5":n=10*n+5,t++;break;case"6":n=10*n+6,t++;break;case"7":n=10*n+7,t++;break;case"8":n=10*n+8,t++;break;case"9":n=10*n+9,t++;break;default:return{num:n,index:t}}return{num:n,index:t}},this.getFraction=function(e,t){var n=1,r=1;if("/"!==e[t]){var i=this.getNumber(e,t);n=i.num,t=i.index}if("/"===e[t]){if("/"===e[++t]){for(var s=.5;"/"===e[t++];)s/=2;return{value:n*s,index:t-1}}var a=t,o=this.getNumber(e,t);0===o.num&&a===t&&(o.num=2),0!==o.num&&(r=o.num),t=o.index}return{value:n/r,index:t}};var u=[{match:/,\s*[Tt]he$/,replace:"The "},{match:/,\s*[Aa]$/,replace:"A "},{match:/,\s*[Aa]n$/,replace:"An "}];this.theReverser=function(e){for(var t=0;t<u.length;t++){var n=u[t],r=e.match(n.match);if(r){var i=l(e);i&&(e=(e=e.replace(i+".","")).trim());var s=r[0].length,a=n.replace+e.substring(0,e.length-s);return i&&(a=i+". "+a),a}}return e},this.stripComment=function(t){var n=t.indexOf("%");return n>=0?e.strip(t.substring(0,n)):e.strip(t)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var n=""+t;return{value:t,digits:e.indexOf(n)+n.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var n=""+t;return{value:t,digits:e.indexOf(n)+n.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,n="";if("-"===e[0].token)e.shift(),n="-",t++;else if("number"!==e[0].type)return{used:0};if(n+=e.shift().token,0===e.length)return{used:1,value:parseInt(n)};var r=e.shift();if("."===r.token){if(t++,0===e.length)return{used:t,value:parseInt(n)};if("number"===e[0].type&&(n=n+"."+(r=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(n)};r=e.shift()}switch(r.token){case"pt":case"px":return{used:t+1,value:parseFloat(n)};case"cm":return{used:t+1,value:parseFloat(n)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(n)};default:return e.unshift(r),{used:t,value:parseFloat(n)}}};var h=function(e){return(e=e.replace(/\\n/g,"\n")).replace(/\\"/g,'"')};this.getBrackettedSubstring=function(e,t,n,r){for(var i=r||e[t],s=t+1,a=!1;s<e.length&&(a||e[s]!==i);)a="\\"===e[s],++s;return e[s]===i?[s-t+1,h(e.substring(t+1,s)),!0]:((s=t+n)>e.length-1&&(s=e.length-1),[s-t+1,h(e.substring(t+1,s)),!1])}};return t.prototype.peekLine=function(){return this.lines[this.lineIndex]},t.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex<this.lines.length){var e=this.lines[this.lineIndex];return this.lineIndex++,e}return null},Sh=t}(),s=kg(),a=Tg(),o=Pg();return Yh=function(){var c,l=new a,u=new o(l),h="",d="";function f(e,t,n){e.positioning||(e.positioning={}),e.positioning[t]=n}function p(e,t,n){e.fonts||(e.fonts={}),e.fonts[t]=n}this.getTune=function(){var e={formatting:l.formatting,lines:l.lines,media:l.media,metaText:l.metaText,metaTextInfo:l.metaTextInfo,version:l.version,addElementToEvents:l.addElementToEvents,addUsefulCallbackInfo:l.addUsefulCallbackInfo,getTotalTime:l.getTotalTime,getTotalBeats:l.getTotalBeats,getBarLength:l.getBarLength,getBeatLength:l.getBeatLength,getBeatsPerMeasure:l.getBeatsPerMeasure,getBpm:l.getBpm,getMeter:l.getMeter,getMeterFraction:l.getMeterFraction,getPickupLength:l.getPickupLength,getKeySignature:l.getKeySignature,getElementFromChar:l.getElementFromChar,makeVoicesArray:l.makeVoicesArray,millisecondsPerMeasure:l.millisecondsPerMeasure,setupEvents:l.setupEvents,setTiming:l.setTiming,setUpAudio:l.setUpAudio,deline:l.deline,findSelectableElement:l.findSelectableElement,getSelectableArray:l.getSelectableArray};return l.lineBreaks&&(e.lineBreaks=l.lineBreaks),l.visualTranspose&&(e.visualTranspose=l.visualTranspose),e};var m,g,v={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||(this[e].face!==t[e].face||(this[e].size!==t[e].size||(this[e].style!==t[e].style||this[e].weight!==t[e].weight)))},addFormattingOptions:function(e,t,n){"note"===n?("auto"!==this.vocalPosition&&f(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&p(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&p(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&p(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&p(e,"tripletfont",this.tripletfont)):"bar"===n&&("auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&p(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&p(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e<this.inTie.length;e++)if(this.endingHoldOver.inTie.push([]),this.inTie[e])for(var t=0;t<this.inTie[e].length;t++)this.endingHoldOver.inTie[e].push(this.inTie[e][t]);for(var n in this.inTieChord)this.inTieChord.hasOwnProperty(n)&&(this.endingHoldOver.inTieChord[n]=this.inTieChord[n])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var e=0;e<this.endingHoldOver.inTie.length;e++){this.inTie.push([]);for(var t=0;t<this.endingHoldOver.inTie[e].length;t++)this.inTie[e].push(this.endingHoldOver.inTie[e][t])}for(var n in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(n)&&(this.inTieChord[n]=this.endingHoldOver.inTieChord[n])}}},b=function(e){var t=e.replace(/\x12/g," ");return(t=(t=t.replace(/&/g,"&")).replace(/</g,"<")).replace(/>/g,">")},y=function(e,t,n){t||(t=" ");var r=t[n];" "!==r&&r||(r="SPACE");var i,s=b(t.substring(n-64,n))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+r+"</span>"+b(t.substring(n+1).substring(0,64));!function(e){v.warnings||(v.warnings=[]),v.warnings.push(e)}("Music Line:"+c.lineIndex+":"+(n+1)+": "+e+": "+s),i={message:e,line:t,startChar:v.iChar+n,column:n},v.warningObjects||(v.warningObjects=[]),v.warningObjects.push(i)};this.getWarnings=function(){return v.warnings},this.getWarningObjects=function(){return v.warningObjects};var _=function(t,n){if(n.indexOf("")>=0)h+=n;else if(n=h+n,h="",t){"-"!==(n=e.strip(n))[n.length-1]&&(n+=" ");for(var r=[],i=0,s=!1,a=function(t){var a=e.strip(n.substring(i,t));if(a=a.replace(/\\([-_*|~])/g,"$1"),i=t+1,a.length>0){s&&(a=a.replace(/~/g," "));var o=n[t];return"_"!==o&&"-"!==o&&(o=" "),r.push({syllable:c.translateString(a),divider:o}),s=!1,!0}return!1},o=!1,l=0;l<n.length;l++){switch(n[l]){case" ":case"":a(l);break;case"-":!o&&!a(l)&&r.length>0&&(e.last(r).divider="-",r.push({skip:!0,to:"next"}));break;case"_":o||(a(l),r.push({skip:!0,to:"slur"}));break;case"*":o||(a(l),r.push({skip:!0,to:"next"}));break;case"|":o||(a(l),r.push({skip:!0,to:"bar"}));break;case"~":o||(s=!0)}o="\\"===n[l]}t.forEach((function(e){if(0!==r.length)if(r[0].skip){switch(r[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&r.shift();break;case"bar":"bar"===e.el_type&&r.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=r.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add words before the first line of music",t,0)},w=function(t,n){if(n.indexOf("")>=0)d+=n;else if(n=d+n,d="",t){"-"!==(n=e.strip(n))[n.length-1]&&(n+=" ");for(var r=[],i=0,s=!1,a=function(t){var a=e.strip(n.substring(i,t));if(i=t+1,a.length>0){s&&(a=a.replace(/~/g," "));var o=n[t];return"_"!==o&&"-"!==o&&(o=" "),r.push({syllable:c.translateString(a),divider:o}),s=!1,!0}return!1},o=0;o<n.length;o++)switch(n[o]){case" ":case"":a(o);break;case"-":!a(o)&&r.length>0&&(e.last(r).divider="-",r.push({skip:!0,to:"next"}));break;case"_":a(o),r.push({skip:!0,to:"slur"});break;case"*":a(o),r.push({skip:!0,to:"next"});break;case"|":a(o),r.push({skip:!0,to:"bar"});break;case"~":s=!0}t.forEach((function(e){if(0!==r.length)if(r[0].skip)switch(r[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&r.shift();break;case"bar":"bar"===e.el_type&&r.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=r.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add symbols before the first line of music",t,0)},x=function(n){if(e.startsWith(n,"%%")){var r=t.addDirective(n.substring(2));r&&y(r,n,2)}else{var i=n.indexOf("%");if(i>=0&&(n=n.substring(0,i)),0!==(n=n.replace(/\s+$/,"")).length)if(h)_(u.getCurrentVoice(),n.substring(2));else if(d)w(u.getCurrentVoice(),n.substring(2));else if(n.length<2||":"!==n[1]||g.lineContinuation)g.parseMusic(n);else{var s=m.parseHeader(n);s.regular&&g.parseMusic(n),s.newline&&g.startNewLine(),s.words&&_(u.getCurrentVoice(),n.substring(2)),s.symbols&&w(u.getCurrentVoice(),n.substring(2))}}};function k(e,t){e.push({el_type:"hint"});for(var n=0;n<t.length;n++){var r=t[n],i=Object.assign({},r);if(e.push(i),"bar"===r.el_type)return}}function S(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(i)for(var s=0;s<i.voices.length;s++){var a=i.voices[s],o=r.voices[s];o&&k(o,a)}}}this.parse=function(a,o,f){o||(o={}),f||(f=0),l.reset();var p=(a=a.replace(/\r\n?/g,"\n")+"\n").split("\n\\");if(p.length>1){for(var b=1;b<p.length;b++)for(;p[b].length>0&&"\n"!==p[b][0];)p[b]=p[b].substr(1),p[b-1]+=" ";a=p.join(" ")}var k=(a=a.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,n){return t+""+(n?Array(n.length+1).join(" "):"")+"\n"}))).split("\n");0===e.last(k).length&&k.pop(),c=new i(k,v),m=new n(c,y,v,l,u),g=new r(c,y,v,l,u,m),o.print&&(l.media="print"),v.reset(),v.iChar=f,o.visualTranspose?(v.globalTranspose=parseInt(o.visualTranspose),0===v.globalTranspose?v.globalTranspose=void 0:u.setVisualTranspose(o.visualTranspose)):v.globalTranspose=void 0,o.lineBreaks&&(v.lineBreaks=o.lineBreaks),m.reset(c,y,v,l);try{o.format&&t.globalFormatting(o.format);for(var C=c.nextLine();C;){if(o.header_only&&!1===v.is_in_header)throw"normal_abort";if(o.stop_on_warning&&v.warnings)throw"normal_abort";var M=v.is_in_header;x(C),M&&!v.is_in_header&&(u.setRunningFont("annotationfont",v.annotationfont),u.setRunningFont("gchordfont",v.gchordfont),u.setRunningFont("tripletfont",v.tripletfont),u.setRunningFont("vocalfont",v.vocalfont)),C=c.nextLine()}h&&_(u.getCurrentVoice(),""),d&&w(u.getCurrentVoice(),""),v.openSlurs=u.cleanUp(v.barsperstaff,v.staffnonote,v.openSlurs)}catch(A){if("normal_abort"!==A)throw A}var E=792,T=612;switch(v.papersize){case"legal":E=1008,T=612;break;case"A4":E=842.4,T=597.6}if(v.landscape){var P=E;E=T,T=P}l.formatting.pagewidth||(l.formatting.pagewidth=T),l.formatting.pageheight||(l.formatting.pageheight=E),o.hint_measures&&function(){for(var e=0;e<l.lines.length;e++){var t=l.lines[e].staff;if(t){for(var n=e+1;n<l.lines.length&&void 0===l.lines[n].staff;)n++;n<l.lines.length&&S(t,l.lines[n].staff)}}}(),s.wrapLines(l,v.lineBreaks,v.barNumbers)}}}function Ng(){if(Xh)return Qh;Xh=1;var e=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return e.prototype.addChild=function(e){if("bar"===e.type){for(var t=!0,n=0;t&&n<this.children.length;n++)this.children[n].type.indexOf("staff-extra")<0&&"tempo"!==this.children[n].type&&(t=!1);t||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=e,this.setRange(e)},e.prototype.setLimit=function(e,t){var n=t.specialY;n||(n=t),n[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],n[e]):this.specialY[e]=n[e])},e.prototype.adjustRange=function(e){void 0!==e.bottom&&(this.bottom=Math.min(this.bottom,e.bottom)),void 0!==e.top&&(this.top=Math.max(this.top,e.top))},e.prototype.setRange=function(e){this.adjustRange(e),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},e.prototype.addOther=function(e){this.otherchildren.push(e),this.setRange(e)},e.prototype.addBeam=function(e){this.beams.push(e)},e.prototype.setWidth=function(e){this.w=e},Qh=e}function Ig(){if(Jh)return Zh;Jh=1;return Zh=function(e,t,n,r){if(e)for(var i=0;i<e.length;i++){var s=e[i],a=s.getAttribute("highlight");a||(a="fill"),s.setAttribute(a,r);var o=s.getAttribute("class");o||(o=""),o=(o=o.replace(n,"")).replace(t,""),t.length>0&&(o.length>0&&" "!==o[o.length-1]&&(o+=" "),o+=t),s.setAttribute("class",o)}}}function Og(){if(td)return ed;td=1;var e=Ig();return ed=function(t,n){void 0===t&&(t="abcjs-note_selected"),void 0===n&&(n="#ff0000"),e(this.elemset,t,"",n)}}function Dg(){if(rd)return nd;rd=1;var e=Ig();return nd=function(t,n){void 0===t&&(t="abcjs-note_selected"),void 0===n&&(n="#000000"),e(this.elemset,"",t,n)}}function Lg(){if(sd)return id;sd=1;var e=Og(),t=Dg(),n=function(e,t,n,r,i,s){s||(s={}),this.tuneNumber=i,this.abcelem=e,this.duration=t,this.durationClass=s.durationClassOveride?s.durationClassOveride:this.duration,this.minspacing=n||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=r,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return n.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},n.prototype.addExtra=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top),void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom),e.dx<this.extraw&&(this.extraw=e.dx),this.extra[this.extra.length]=e,this._addChild(e)},n.prototype.addHead=function(e){e.dx<this.extraw&&(this.extraw=e.dx),this.heads[this.heads.length]=e,this.addRight(e)},n.prototype.addRight=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0!==e.top&&(void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top)),void 0!==e.bottom&&(void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom)),e.dx+e.w>this.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},n.prototype.addFixed=function(e){this._addChild(e)},n.prototype.addFixedX=function(e){this._addChild(e)},n.prototype.addCentered=function(e){var t=e.w/2;-t<this.extraw&&(this.extraw=-t),this.extra[this.extra.length]=e,e.dx+t>this.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},n.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},n.prototype._addChild=function(e){var t=!0;"clef"==this.abcelem.el_type&&"barNumber"==e.type&&(t=!1),e.parent=this,this.children[this.children.length]=e,t&&this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},n.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},n.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},n.prototype.setX=function(e){this.x=e;for(var t=0;t<this.children.length;t++)this.children[t].setX(e)},n.prototype.center=function(e,t){var n=(t.x-e.x)/2+e.x;this.x=n-this.w/2;for(var r=0;r<this.children.length;r++)this.children[r].setX(this.x)},n.prototype.setHint=function(){this.hint=!0},n.prototype.highlight=function(t,n){e.bind(this)(t,n)},n.prototype.unhighlight=function(e,n){t.bind(this)(e,n)},id=n}function Bg(){if(od)return ad;od=1;var e=function(e,t,n,r,i){switch(i=i||{},this.x=0,this.c=e,this.dx=t,this.w=n,this.pitch=r,this.scalex=i.scalex||1,this.scaley=i.scaley||1,this.type=i.type||"symbol",this.pitch2=i.pitch2,this.linewidth=i.linewidth,this.klass=i.klass,this.anchor=i.anchor?i.anchor:"middle",this.top=r,void 0!==this.pitch2&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=r,void 0!==this.pitch2&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),i.thickness&&(this.top+=i.thickness/2,this.bottom-=i.thickness/2),i.stemHeight&&(i.stemHeight>0?this.top+=i.stemHeight:this.bottom+=i.stemHeight),i.dim&&(this.dim=i.dim),i.position&&(this.position=i.position),this.height=i.height?i.height:4,i.top&&(this.top=i.top),i.bottom&&(this.bottom=i.bottom),i.name?this.name=i.name:this.c?this.name=this.c:this.name=this.type,i.realWidth?this.realWidth=i.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":i.position&&"below"===i.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};return e.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e="chord"===this.type?this.realWidth/2:0,t=this.x-e-0;return{left:t,right:t+this.realWidth+0}},e.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},e.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},e.prototype.getLane=function(){return void 0===this.lane?0:this.lane},e.prototype.setX=function(e){this.x=e+this.dx},ad=e}function Vg(){if(hd)return ud;hd=1;var e=Ng(),t=function(){if(ld)return cd;ld=1;var e=Lg(),t=Bg();function n(e,t){for(var n in t)t.hasOwnProperty(n)&&(Array.isArray(t[n])||null!=(r=t[n])&&r.constructor===Object||(e[n]=t[n]));var r}function r(t){var r=new e("",0,0,"",0);return n(r,t),r.top=0,r.bottom=-1,t.abcelem&&(r.abcelem={},n(r.abcelem,t.abcelem),"note"===r.abcelem.el_type&&(r.abcelem.el_type="tabNumber")),t.cloned=r,r}function i(e,i){var s=r(e);if(i)for(var a=e.children,o=!0,c=0;c<a.length;c++){var l=a[c],u=new t("",0,0,0,"");n(u,l),o=i.tablature.setRelative(l,u,o),s.children.push(u)}return s}function s(n,r,i){var s="tab.tiny",a=7.5;n.isTabBig&&(s="tab.big",a=10);var o={el_type:"tab",icon:s,Ypos:a};if(a+=n.tabSymbolOffset,!n.hideTabSymbol){var c=new e(o,0,0,"symbol",0);c.x=r;var l=new t(s,0,0,7.5,"tab");l.x=i,c.children.push(l),"tab"==c.abcelem.el_type&&(l.pitch=a)}return c}function a(e){if(e.extra)for(var t=0;t<e.extra.length;t++){var n=e.extra[t];if("lyric"==n.type)return{bottom:n.bottom,height:n.height}}return null}function o(){this.accidentals=null}function c(e,n,r,i,s){var a=i.num;null!=i.note.quarter&&(a=a.toString(),a+=i.note.quarter);var o=e.semantics.stringToPitch(i.str);r.notes.push({num:a,str:i.str,pitch:i.note.emit()});var c=new t(a,0,0,o+.3,{type:"tabNumber"});return c.x=n,c.isGrace=s,c.isAltered=i.note.isAltered,c}function l(e,t){var n=0;if(e.extra)for(var r=0;r<e.extra.length;r++)if(e.extra[r].c.indexOf("noteheads")>=0){if(n===t)return e.extra[r].x+e.extra[r].w/2;n++}return-1}function u(e){if(e.abcelem){var t=e.abcelem;if(t.rest)return t.gracenotes}return null}function h(e,t,n){var r=e.semantics.notesToNumber(t,n);if(r.error)return e.setError(r.error),r;if(r.graces&&r.notes){var i=r.notes.length-1;r.notes[i].graces=r.graces}return r}function d(e,t,n,r,i){for(var s=0;s<r.length;s++){var a={el_type:"note",startChar:n.abcelem.startChar,endChar:n.abcelem.endChar,notes:[],grace:!0},o=c(e,l(n,s),a,r[s],!0);t.children.push(o),i.push(a)}}return o.prototype.build=function(e,t,n,o,f,p,m){!function(e){for(var t=0;t<e.length;t++)e[t].tabNameInfos||0}(t);var g=t[f+o],v=t[m],b=null,y=null;"clef"!=g.children[0].abcelem.el_type&&"none"!=p&&g.children.splice(0,0,p);for(var _=0;_<g.children.length;_++){var w=g.children[_],x=w.x,k=x;switch(w.isClef&&(v.children.push(s(e,x,k)),w.abcelem.type.indexOf("-8")>=0&&(e.semantics.clefTranspose=-12),w.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),w.type){case"staff-extra key-signature":this.accidentals=w.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var S=!1;_===g.children.length-1&&(S=!0);var C=i(w,e);if(C.abcelem.barNumber){delete C.abcelem.barNumber;for(var M=0;M<C.children.length;M++)if("barNumber"===C.children[M].type){C.children.splice(M,1);break}}C.abcelem.lastBar=S,v.children.push(C),n.push({el_type:w.abcelem.el_type,type:w.abcelem.type,endChar:w.abcelem.endChar,startChar:w.abcelem.startChar,abselem:C});break;case"rest":var E=u(w);if(E){if((b=h(e,null,E)).error)return;L={el_type:"note",startChar:w.abcelem.startChar,endChar:w.abcelem.endChar,notes:[],grace:!0},d(e,T,w,b.graces,n)}break;case"note":var T=r(w);T.x=w.heads[0].x+w.heads[0].w/2,T.lyricDim=a(w);var P=w.abcelem.pitches,A=w.abcelem.gracenotes;if(T.type="tabNumber",(b=h(e,P,A)).error)return;if(b.graces){var N=b.notes.length-1;b.notes[N].graces=b.graces}y={el_type:"note",startChar:w.abcelem.startChar,endChar:w.abcelem.endChar,notes:[]};for(var I=0;I<b.notes.length;I++){var O=b.notes[I];if(O.graces)for(var D=0;D<O.graces.length;D++){var L={el_type:"note",startChar:w.abcelem.startChar,endChar:w.abcelem.endChar,notes:[],grace:!0},B=c(e,l(w,D),L,O.graces[D],!0);T.children.push(B),n.push(L)}var V=c(e,T.x+w.heads[I].dx,y,O,!1);T.children.push(V)}y.notes.length>0&&(y.abselem=T,n.push(y),v.children.push(T))}}},cd=o}(),n=Sg();function r(e,t,n){var r=e.semantics,i=t.controller.getTextSize,s=r.tabInfos(e),a=!0;if(r.suppress(e)&&(a=!1),a){var o=i.calc(s,"tablabelfont","text instrumentname");return n.tabNameInfos={textSize:{height:o.height,width:o.width},name:s},o.height}return 0}function i(e,t){return!!t[e].isTabStaff&&(e===t.length-1||!t[e+1].isTabStaff)}function s(e,t){for(var n=t;n>=0;n--)if(!e[n].isTabStaff)return n;return-1}function a(e,t){return"clef"===e[t].children[0].abcelem.el_type?null:0==t?"none":e[t-1].children[0]}return ud=function(o,c,l,u){var h=new t,d={clef:{type:"TAB"}},f=o.linePitch*o.nbLines,p=l.staff;if(p){var m=p[0];if(m&&m.clef&&0==m.clef.stafflines)return void o.setError("No tablatures when stafflines=0");p.splice(p.length,0,d)}var g=l.staffGroup,v=g.voices,b=function(e){for(var t=0,n=0;n<e.children.length;n++){var r=e.children[n];r.specialY&&r.specialY.lyricHeightBelow>t&&(t=r.specialY.lyricHeightBelow)}return t}(v[0]),y=u,_=g.staffs[y],w=f+3-_.bottom-b;_.isTabStaff&&(w=_.top);var x={bottom:-1,isTabStaff:!0,specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0},lines:o.nbLines,linePitch:o.linePitch,dy:.15,top:w},k=function(e,t){for(var n=0,r=0,s=0;;){if(!t[n])return-1;if(t[n].isTabStaff||(s=t[n].voices.length),t[n].isTabStaff){if(r++,i(n,t)&&r<s)return n+1}else if(r=0,n>=e){if(n+1==t.length)return n+1;if(!t[n+1].isTabStaff)return n+1}if(++n>t.length)return-1}}(u,g.staffs);if(-1!==k){x.parentIndex=k-1,g.staffs.splice(k,0,x),g.height+=f+3;var S=function(e,t){for(var n=t;n>=0;n--)if(!e[n].isTabStaff)return e[n];return null}(g.staffs,k),C=1;(function(e,t){return 1===function(e){for(var t=0,n=0;n<e.length;n++)e[n].isTabStaff||t++;return t}(e)&&t.voices.length>1})(g.staffs,S)&&(C=S.voices.length),d.voices=[];for(var M=0;M<C;M++){var E=new e(0,0);M>0&&(E.duplicate=!0);var T=r(o,c,E)/n.STEP;T=Math.max(T,1),g.staffs[u].top+=1,g.height+=T,E.staff=x;var P=v.length;v.splice(v.length,0,E);var A=a(v,M+u);d.voices[M]=[],h.build(o,v,d.voices[M],M,u,A,P)}!function(e){for(var t=0;t<e.length;t++)if(e[t].isTabStaff){var n=s(e,t);e[t].hasStaff=e[n],e[n].hasTab||(e[n].hasTab=[]),e[n].hasTab.push(e[t])}}(g.staffs)}}}function Rg(){if(fd)return dd;fd=1;var e={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},t=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];return dd={noteToMidi:function(n){var r=n.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(r&&5===r.length){var i=e[r[1]];return 48+t.indexOf(r[2])+i+12*(r[4].length-r[3].length)}return 0},midiToNote:function(e){e=parseInt(e,10);var n=Math.floor(e/12),r=e%12,i=t[r];if("-"===i&&(i="^"+t[r-1]),n>4)for(i=i.toLowerCase(),n-=5;n>0;)i+="'",n--;else for(;n<4;)i+=",",n++;return i}}}function Fg(){if(md)return pd;md=1;var{noteToMidi:e,midiToNote:t}=Rg();function n(n,r){var i=e(n);r&&(i+=r);var s,a=t(i),o=!1,c=!1,l=null,u=null,h=!1,d=0;n.startsWith("_")?(o=!0,d=-1,"/"==n[1]?(o=!1,u="v",d=0):"_"==n[1]&&(h=!0,d-=1)):n.startsWith("^")?(c=!0,d=1,"/"==n[1]?(c=!1,u="^",d=0):"^"==n[1]&&(h=!0,d+=1)):n.startsWith("=")&&(l=!0,d=0),((s=o||c||null!=u)||l)&&(a=null!=u||h?n.slice(2):n.slice(1));var f=(a.match(/,/g)||[]).length,p=(a.match(/'/g)||[]).length;this.pitch=i,this.pitchAltered=0,this.name=a,this.acc=d,this.isSharp=c,this.isKeySharp=!1,this.isDouble=h,this.isAltered=s,this.isFlat=o,this.isKeyFlat=!1,this.natural=l,this.quarter=u,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=p}return n.prototype.sameNoteAs=function(e){return e.pitch===this.pitch},n.prototype.isLowerThan=function(e){return e.pitch>this.pitch},n.prototype.checkKeyAccidentals=function(e,t){if(!this.isAltered&&!this.natural)if(t[this.name.toUpperCase()])switch(t[this.name.toUpperCase()]){case"__":return this.acc=-2,void(this.pitchAltered=-2);case"_":return this.acc=-1,void(this.pitchAltered=-1);case"=":return this.acc=0,void(this.pitchAltered=0);case"^":return this.acc=1,void(this.pitchAltered=1);case"^^":return this.acc=2,void(this.pitchAltered=2)}else if(e)for(var n=this.name,r=0;r<e.length;r++){var i=e[r];n==i.note.toUpperCase()&&("flat"==i.acc&&(this.acc=-1,this.isKeyFlat=!0,this.pitchAltered=-1),"sharp"==i.acc&&(this.acc=1,this.isKeySharp=!0,this.pitchAltered=1))}},n.prototype.getAccidentalEquiv=function(){var e,t,r=((t=new n((e=this).name)).pitch=e.pitch,t.hasComma=e.hasComma,t.isLower=e.isLower,t.isQuoted=e.isQuoted,t.isSharp=e.isSharp,t.isKeySharp=e.isKeySharp,t.isFlat=e.isFlat,t.isKeyFlat=e.isKeyFlat,t);return r.isSharp||r.isKeySharp?((r=r.nextNote()).isFlat=!0,r.isSharp=!1,r.isKeySharp=!1):(r.isFlat||r.isKeyFlat)&&((r=r.prevNote()).isSharp=!0,r.isFlat=!1,r.isKeyFlat=!1),r},n.prototype.nextNote=function(){return new n(t(this.pitch+1+this.pitchAltered))},n.prototype.prevNote=function(){return new n(t(this.pitch-1+this.pitchAltered))},n.prototype.emitNoAccidentals=function(){var e=this.name;this.isLower&&(e=e.toLowerCase());for(var t=0;t<this.isQuoted;t++)e+="'";for(var n=0;n<this.hasComma;n++)e+=",";return e},n.prototype.emit=function(){var e=this.name;(this.isSharp||this.isKeySharp)&&(e="^"+e,this.isDouble&&(e="^"+e)),(this.isFlat||this.isKeyFlat)&&(e="_"+e,this.isDouble&&(e="_"+e)),this.quarter&&(e="^"==this.quarter?"^/"+e:"_/"+e),this.natural&&(e="="+e);for(var t=1;t<=this.hasComma;t++)e+=",";if(this.isLower){e=e.toLowerCase();for(var n=1;n<=this.isQuoted;n++)e+="'"}return e},pd=n}function zg(){if(yd)return bd;yd=1;const{noteToMidi:e}=Rg();var t=Fg(),n=function(){if(vd)return gd;vd=1;var e=Fg(),t=["A","B","C","D","E","F","G"];return gd=function(n,r){var i=new e(n),s=new e(r);if(s.isLowerThan(i)){var a=i.emit();return{error:"Invalid string Instrument tuning : "+s.emit()+" string lower than "+a+" string"}}var o=[],c=t.indexOf(i.name),l=t.indexOf(s.name);if(-1==c||-1==l)return o;for(var u=!1;!u;)o.push(i.emit()),(i=i.nextNote()).sameNoteAs(s)&&(u=!0);return o}}();function r(e,n){for(var r=[],a=0;a<n.length;a++)if(!n[a].endTie){var o=new t(n[a].name,e.clefTranspose);o.checkKeyAccidentals(e.accidentals,e.measureAccidentals);var c=s(e,o);r.push(c)}return function(e,t){for(var n=0;n<t.length-1;n++){var r=t[n],s=t[n+1];if(r.str==s.str){if(r.str==e.strings.length-1)return r.num="?",void(s.num="?");s.num<r.num?(s.str++,s=i(e,s.note,s.str,e.secondPos,e.strings[s.str].length)):(r.str++,r=i(e,r.note,r.str,e.secondPos,e.strings[r.str].length)),t[n]=r,t[n+1]=s}}}(e,r),r}function i(e,t,n,r,i){var s=e.strings;t.checkKeyAccidentals(e.accidentals,e.measureAccidentals),r&&(s=r);var a=t.emitNoAccidentals(),o=s[n].indexOf(a),c=t.acc;if(-1!=o){if(r&&(o+=i),(t.isFlat||-1==t.acc)&&0==o){var l=t.getAccidentalEquiv();o=s[++n].indexOf(l.emit()),c=0}return{num:o+c,str:n,note:t}}return null}function s(e,t){var n;(t.isAltered||t.natural)&&(t.isFlat?n=t.isDouble?"__":"_":t.isSharp?n=t.isDouble?"^^":"^":t.natural&&(n="="),e.measureAccidentals[t.name.toUpperCase()]=n);for(var r=e.stringPitches.length-1;r>=0;r--)if(t.pitch+t.pitchAltered>=e.stringPitches[r]){var i=t.pitch+t.pitchAltered-e.stringPitches[r];return"^"===t.quarter?i-=.5:"v"===t.quarter&&(i+=.5),{num:Math.round(i),str:e.stringPitches.length-1-r,note:t}}return{num:"?",str:e.stringPitches.length-1,note:t}}function a(e,t){var n={num:"?",str:0,note:t};e.push(n),e.error=t.emit()+": unexpected note for instrument"}function o(r){var i=r.tuning,s=r.capo,a=r.params.highestNote;this.linePitch=r.linePitch,this.highestNote="a'",a&&(this.highestNote=a),this.measureAccidentals={},this.capo=0,s&&(this.capo=parseInt(s,10)),this.transpose=r.transpose?r.transpose:0,this.tuning=i,this.stringPitches=[];for(var o=0;o<this.tuning.length;o++){var c=e(this.tuning[o])+this.capo;this.stringPitches.push(c)}if(this.capo>0&&(this.capoTuning=function(e){var n=null,r=e.tuning;if(e.capo>0){n=[];for(var i=0;i<r.length;i++){for(var s=new t(r[i]),a=0;a<e.capo;a++)s=s.nextNote();n[i]=s.emit()}}return n}(this)),this.strings=function(e){var t=[],r=e.tuning;e.capo>0&&(r=e.capoTuning);for(var i=r.length-1,s=0;s<r.length;s++){var a=e.highestNote;s!=r.length-1&&(a=r[s+1]);var o=n(r[s],a);if(o.error)return o;t[i--]=o}return t}(this),this.strings.error)return r.setError(this.strings.error),void(r.inError=!0);this.secondPos=function(e){var t=[];t[0]=[];for(var n=e.strings,r=1;r<n.length;r++)t[r]=n[r-1];return t}(this)}return o.prototype.stringToPitch=function(e){return 5.3+(this.strings.length-1-e)*this.linePitch},o.prototype.notesToNumber=function(e,n){var i,o,c=null,l=null;if(e&&(l=[],e.length>1?(l=r(this,e)).error&&(c=l.error):e[0].endTie||((i=new t(e[0].name,this.clefTranspose)).checkKeyAccidentals(this.accidentals,this.measureAccidentals),(o=s(this,i))?l.push(o):(a(l,i),c=l.error))),c)return l;var u=null;if(n){u=[];for(var h=0;h<n.length;h++)(i=new t(n[h].name,this.clefTranspose)).checkKeyAccidentals(this.accidentals,this.measureAccidentals),(o=s(this,i))?u.push(o):(a(u,i),c=l.error)}return{notes:l,graces:u,error:c}},o.prototype.toString=function(){for(var e=[],t=0;t<this.tuning.length;t++){var n=this.tuning[t].replaceAll(",","").replaceAll("'","").toUpperCase();"_"===n[0]?n=n[1]+"b ":"^"===n[0]&&(n=n[1]+"# "),e.push(n)}return e.join("")},o.prototype.tabInfos=function(e){var t=e.params.label;if(t){var n="";return-1!=t.indexOf("%T")&&(n=this.toString(),e.capo>0&&(n+=" capo:"+e.capo),t=t.replace("%T",n)),t}return""},o.prototype.suppress=function(e){return!!e.params.suppress},bd=o}function jg(){if(wd)return _d;wd=1;var e=function(){if(Kh)return $h;function e(e,t){this.numLines=e,this.lineSpace=t,this.verticalSize=this.numLines*this.lineSpace,this.bar={pitch:3,pitch2:t*e,height:5}}return Kh=1,e.prototype.bypass=function(e){var t=e.staffGroup.voices;return!!(t.length>0&&t[0].isPercussion)},e.prototype.setRelative=function(e,t,n){switch(e.type){case"bar":t.pitch=this.bar.pitch,t.pitch2=this.bar.pitch2,t.height=this.height;break;case"symbol":var r=this.bar.pitch2/2;if("dots.dot"==e.name)return n?(t.pitch=r,!1):(t.pitch=r+this.lineSpace,!0)}return n},$h=e}(),t=Vg(),n=zg();function r(){}r.prototype.init=function(t,r,i,s){this.tune=t,this.params=i,this.tuneNumber=r,this.inError=!1,this.abcTune=t,this.linePitch=3,this.nbLines=s.defaultTuning.length,this.isTabBig=s.isTabBig,this.tabSymbolOffset=s.tabSymbolOffset,this.capo=i.capo,this.transpose=i.visualTranspose,this.hideTabSymbol=i.hideTabSymbol,this.tablature=new e(this.nbLines,this.linePitch);var a=i.tuning;a||(a=s.defaultTuning),this.tuning=a,this.semantics=new n(this)},r.prototype.setError=function(e){e&&(this.error=e,this.inError=!0,this.tune.warnings?this.tune.warnings.push(e):this.tune.warnings=[e])},r.prototype.render=function(e,n,r){this.inError||this.tablature.bypass(n)||t(this,e,n,r)};return _d=function(){return{name:"StringTab",tablature:r}}}function qg(){if(kd)return xd;kd=1;var e=jg(),t={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}};return xd={inited:!1,plugins:{},register:function(e){var t=e.name,n=e.tablature;this.plugins[t]=n},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(n,r,i){this.inited||(this.register(new e),this.inited=!0);var s=null;if(i.tablature){var a=i.tablature;s=[];for(var o=0;o<a.length;o++){var c=a[o],l=c.instrument;if(null==l)return this.setError(n,"tablature 'instrument' is missing"),s;var u=t[l],h=null;if(u&&(h=this.plugins[u.name]),h){0!=i.visualTranspose&&(c.visualTranspose=i.visualTranspose),c.abcSrc=i.tablature.abcSrc;var d={classz:h,tuneNumber:r,params:c,instance:null,tabType:u};s.push(d)}else{if(""!==l)return this.setError(n,"Undefined tablature plugin: "+l),s;s.push(null)}}}return s},layoutTablatures:function(e,t){var n=t.tablatures,r=0;if(n&&n.length>0)for(var i=n.length,s=0;s<i;++s)n[s]&&n[s].params.firstStaffOnly&&(n[s].params.suppress=!1);for(var a=0;a<t.lines.length;a++){var o=t.lines[a];if(o.staff&&r++,r>1&&n&&n.length>0)for(i=n.length,s=0;s<i;++s)n[s].params.firstStaffOnly&&(n[s].params.suppress=!0);var c=o.staff;if(c)for(var l=c.length,u=0;u<c.length;u++)if(n[u]&&u<l){var h=n[u];null==h.instance&&(h.instance=new h.classz,h.instance.init(t,h.tuneNumber,h.params,h.tabType)),h.instance.render(e,o,u)}}}}}function Hg(){if(Cd)return Sd;Cd=1;var e=Ag(),t=function(){if(Wh)return Gh;Wh=1;var e=fh();return Gh=function(t){for(var n="",r=t.match(/(\s*)/),i=(t=e.strip(t)).split("\nX:"),s=1;s<i.length;s++)i[s]="X:"+i[s];var a=r?r[0].length:0,o=[];i.forEach((function(e){o.push({abc:e,startPos:a}),a+=e.length+1})),o.length>1&&!e.startsWith(o[0].abc,"X:")&&o.shift().abc.split("\n").forEach((function(t){e.startsWith(t,"%%")&&(n+=t+"\n")}));var c=n;return o.forEach((function(t){var r=t.abc.indexOf("\n\n");r>0&&(t.abc=t.abc.substring(0,r)),t.pure=t.abc,t.abc=n+t.abc,t.title="";var i=t.pure.split("T:");i.length>1&&(i=i[1].split("\n"),t.title=e.strip(i[0]));var s=t.pure.substring(2,t.pure.indexOf("\n"));t.id=e.strip(s)})),{header:c,tunes:o}}}(),n=qg(),r={};return function(){r.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var i=r.TuneBook=function(e){var n=t(e);this.header=n.header,this.tunes=n.tunes};i.prototype.getTuneById=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].id===""+e)return this.tunes[t];return null},i.prototype.getTuneByTitle=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].title===e)return this.tunes[t];return null},r.parseOnly=function(e,t){for(var n=r.numberOfTunes(e),i=[],s=0;s<n;s++)i.push(1);return r.renderEngine((function(){}),i,e,t)},r.renderEngine=function(t,r,s,a){var o=[];if(void 0!==r&&void 0!==s){var c;(!(c=r)||c.propertyIsEnumerable("length")||"object"!=typeof c||"number"!=typeof c.length)&&(r=[r]),void 0===a&&(a={});for(var l=a.startingTune?parseInt(a.startingTune,10):0,u=new i(s),h=new e,d=0;d<r.length;d++){var f=r[d];if("*"===f||"string"==typeof f&&(f=document.getElementById(f)),f)if(l>=0&&l<u.tunes.length){h.parse(u.tunes[l].abc,a,u.tunes[l].startPos-u.header.length);var p=h.getTune();a.tablature&&(p.tablatures=n.preparePlugins(p,l,a));var m=h.getWarnings();m&&(p.warnings=m);var g=t(f,p,d,u.tunes[l].abc);o.push(g||p)}else f.innerHTML&&(f.innerHTML="");l++}return o}},r.extractMeasures=function(e){for(var t=[],n=new i(e),s=0;s<n.tunes.length;s++){for(var a=n.tunes[s],o=a.abc.split("K:"),c=o[1].split("\n"),l=o[0]+"K:"+c[0]+"\n",u=null,h=null,d=null,f=[],p=!1,m=r.parseOnly(a.abc)[0],g=m.getPickupLength()>0,v=0;v<m.lines.length;v++){var b=m.lines[v];if(b.staff)for(var y=0;y<1;y++)for(var _=b.staff[y],w=0;w<1;w++)for(var x=_.voices[w],k=0;k<x.length;k++){var S=x[k];if(null===d&&S.startChar>=0&&(d=S.startChar,h=void 0===S.chord?u:null),S.chord&&(u=S),"bar"===S.el_type){if(p){var C={abc:a.abc.substring(d,S.endChar)};(u=h&&h.chord&&h.chord.length>0?h.chord[0].name:null)&&(C.lastChord=u),S.startEnding&&(C.startEnding=S.startEnding),S.endEnding&&(C.endEnding=S.endEnding),f.push(C),d=null,p=!1}}else"note"===S.el_type&&(p=!0)}}t.push({header:l,measures:f,hasPickup:g})}return t}}(),Sd=r}function Yg(){if(Ed)return Md;Ed=1;var e,t=vh(),{relativeMajor:n,transposeKey:r,relativeMode:i}=gh(),s=mh();return function(){function a(e,t,n){var r=[],i=t.getKeySignature();if("Hp"===i.root||"HP"===i.root)return r;r=r.concat(function(e,t){for(var n=[],r=e.split("K:"),i=r[0].length,s=1;s<r.length;s++){var a=r[s],o=a.match(/^( *)([A-G])([#b]?)(\w*)/);if(o){var c=i+2+o[1].length,l=o[2]+o[3]+o[4],u=f({root:o[2],acc:o[3],mode:o[4]},t),h=u.root+u.acc+u.mode;n.push({start:c,end:c+l.length,note:h})}i+=a.length+2}return n}(e,n));for(var s=0;s<t.lines.length;s++){var a=t.lines[s].staff;if(a)for(var c=0;c<a.length;c++){var l=a[c];"perc"!==l.clef.type&&(r=r.concat(o(e,l.voices,l.key,n)))}}return r}function o(e,t,n,r){for(var i=[],s=f(n,r),a=0;a<t.length;a++)i=i.concat(u(e,t[a],n.root,c(n),s,r));return i}function c(e){for(var t={},n=0;n<e.accidentals.length;n++){var r=e.accidentals[n];"flat"===r.acc?t[r.note.toUpperCase()]="_":"sharp"===r.acc&&(t[r.note.toUpperCase()]="^")}return t}function l(e,t,n){var r=h.indexOf(e.root)-h.indexOf(t);return"none"===t&&(r=h.indexOf(e.root)),0===r?n>2?r+=7:-12===n&&(r-=7):n>0&&r<0?r+=7:n<0&&r>0&&(r-=7),n>12?r+=7:n<-12&&(r-=7),r}function u(e,t,n,r,i,a){for(var o=[],u=l(i,n,a),h={},d={},m=0;m<t.length;m++){var g=t[m];if(g.chord)for(var v=0;v<g.chord.length;v++){var b=g.chord[v];if("default"===b.position){var k=i.accidentals.length&&"flat"===i.accidentals[0].acc,S=s(b.name,a,k,!0);(S=S.replace(/♭/g,"b").replace(/♯/g,"#"))!==b.name&&o.push(x(e,g.startChar,g.endChar,S))}}if("note"===g.el_type&&g.pitches){for(var C=0;C<g.pitches.length;C++){var M=y(g.pitches[C].name,n,r,h);M.acc&&(h[M.name.toUpperCase()]=M.acc);var E=p(M,i,u,d);E.acc&&(d[E.upper]=E.acc),o.push(_(e,g.startChar,g.endChar,E.acc+E.name,C))}if(g.gracenotes)for(var T=0;T<g.gracenotes.length;T++){var P=y(g.gracenotes[T].name,n,r,h);P.acc&&(h[P.name.toUpperCase()]=P.acc);var A=p(P,i,u,h);A.acc&&(d[A.upper]=A.acc),o.push(w(e,g.startChar,g.endChar,A.acc+A.name,T))}}else"bar"===g.el_type?(h={},d={}):"keySignature"===g.el_type&&(n=g.root,r=c(g),u=l(i=f(g,a),n,a))}return o}e=function(e,o,c){if("TEST"===o)return{keyAccidentals:t,relativeMajor:n,transposeKey:r,relativeMode:i,transposeChordName:s};c=parseInt(c,10);var l,u=[];for(l=0;l<o.length;l++)u=u.concat(a(e,o[l],c));u=u.sort((function(e,t){return t.start-e.start}));var h=e.split("");for(l=0;l<u.length;l++){var d=u[l];h.splice(d.start,d.end-d.start,d.note)}return h.join("")};var h="CDEFGAB",d=[",,,,",",,,",",,",",","","'","''","'''","''''"];function f(e,s){if("none"===e.root)return{root:r("C",s),mode:"",acc:"",accidentals:[]};var a=n(e.root+e.acc+e.mode),o=r(a,s),c=i(o,e.mode),l=t(o);return{root:c[0],mode:e.mode,acc:c.length>1?c[1]:"",accidentals:l}}function p(e,t,n,r){for(var i=e.pitch,s=h.indexOf(e.name),a=(h.indexOf(t.root)+i)%7,o=s+n,c=e.oct;o>6;)c++,o-=7;for(;o<0;)c--,o+=7;for(var l=h[a],u="",d=e.adj,f="=",m=0;m<t.accidentals.length;m++)if(t.accidentals[m].note.toLowerCase()===l.toLowerCase()){d+="flat"===t.accidentals[m].acc?-1:1,f="flat"===t.accidentals[m].acc?"_":"^";break}switch(d){case-2:u="__";break;case-1:u="_";break;case 0:u="=";break;case 1:u="^";break;case 2:u="^^";break;case-3:return(g={}).pitch=e.pitch-1,g.oct=e.oct,g.name=h[h.indexOf(e.name)-1],g.name||(g.name="B",g.oct--),"B"===g.name||"E"===g.name?g.adj=e.adj+1:g.adj=e.adj+2,p(g,t,n+1,r);case 3:var g;return(g={}).pitch=e.pitch+1,g.oct=e.oct,g.name=h[h.indexOf(e.name)+1],g.name||(g.name="C",g.oct++),"C"===g.name||"F"===g.name?g.adj=e.adj-1:g.adj=e.adj-2,p(g,t,n+1,r)}switch(r[l]!==u&&(r[l]||u!==f)||e.courtesy||(u=""),c){case 0:l+=",,,";break;case 1:l+=",,";break;case 2:l+=",";break;case 4:l=l.toLowerCase();break;case 5:l=l.toLowerCase()+"'";break;case 6:l=l.toLowerCase()+"''";break;case 7:l=l.toLowerCase()+"'''";break;case 8:l=l.toLowerCase()+"''''"}return c>4&&(l=l.toLowerCase()),{acc:u,name:l,upper:l.toUpperCase()}}var m=/([_^=]*)([A-Ga-g])([,']*)/,g=/([_^=]*[A-Ga-g][,']*)(\d*\/*\d*)([\>\<\-\)\.\s\\]*)/,v=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/,b=/(\s*)$/;function y(e,t,n,r){var i="none"===t?0:h.indexOf(t),s=e.match(m),a=s[2].toUpperCase(),o=h.indexOf(a)-i;o<0&&(o+=7);var c=d.indexOf(s[3]);a===s[2]&&c--;var l=r[a]||n[a]||"=";return{acc:s[1],name:a,pitch:o,oct:c,adj:k(s[1],n[a],r[a]),courtesy:s[1]===l}}function _(e,t,n,r,i){var s=e.substring(t,n),a=s.match(new RegExp(g.source+b.source),"");if(a){var o=a[1].length,c=a[2].length+a[3].length+a[4].length;t+=n-t-o-c,n-=c}else{if(a=s.match(new RegExp(/([^\[]*)/.source+/\[/.source+v.source+v.source+v.source+v.source+v.source+v.source+v.source+v.source+/\-?](\d*\/*\d*)?([\>\<\-\)]*)/.source+b.source))){for(var l=1+a[1].length,u=0;u<i;u++)a[3*u+2]&&(l+=a[3*u+2].length),a[3*u+3]&&(l+=a[3*u+3].length),a[3*u+4]&&(l+=a[3*u+4].length);n=(t+=l)+(a[3*i+2]?a[3*i+2].length:0)}}return{start:t,end:n,note:r}}function w(e,t,n,r,i){var s=/(\/*)/,a=e.substring(t,n).match(new RegExp(/([^\{]*)/.source+/\{/.source+s.source+v.source+s.source+v.source+s.source+v.source+s.source+v.source+s.source+v.source+s.source+v.source+s.source+v.source+s.source+v.source+/\}/.source));if(a){for(var o=1+a[1].length,c=0;c<i;c++)a[3*c+2]&&(o+=a[3*c+2].length),a[3*c+3]&&(o+=a[3*c+3].length),a[3*c+4]&&(o+=a[3*c+4].length),a[3*c+5]&&(o+=a[3*c+5].length);a[3*i+2]&&(o+=a[3*c+2].length),t+=o;var l=a[3*i+3]?a[3*i+3].length:0;l+=a[3*i+4]?a[3*i+4].length:0,n=t+(l+=a[3*i+5]?a[3*i+5].length:0)}return{start:t,end:n,note:r}}function x(e,t,n,r){var i=e.substring(t,n).match(/([^"]+)?(".+")+/);return i[1]&&(t+=i[1].length),{start:t+1,end:(n=t+i[2].length)-1,note:r}}function k(e,t,n){if(!e&&n&&(e=n),!e)return 0;switch(t){case void 0:switch(e){case"__":return-2;case"_":return-1;case"=":default:return 0;case"^":return 1;case"^^":return 2}case"_":switch(e){case"__":return-1;case"_":default:return 0;case"=":return 1;case"^":return 2;case"^^":return 3}case"^":switch(e){case"__":return-3;case"_":return-2;case"=":return-1;case"^":default:return 0;case"^^":return 1}}return 0}}(),Md=e}function Ug(){if(Od)return Id;Od=1;var e=Sg(),t={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"tab.big":{d:[["M",20.16,-21.66],["c",.24,-.09,.66,.09,.78,.36],["c",.09,.21,.09,.24,-.18,.54],["c",-.78,.81,-1.86,1.44,-2.94,1.71],["c",-.87,.24,-1.71,.24,-2.55,.03],["l",-.06,-.03],["l",-.18,.99],["c",-.33,1.98,-.75,4.26,-.96,5.04],["c",-.42,1.65,-1.26,3.18,-2.28,4.14],["c",-.57,.57,-1.17,.9,-1.86,1.08],["c",-.18,.06,-.33,.06,-.66,.06],["c",-.54,0,-.78,-.03,-1.23,-.27],["c",-.39,-.18,-.66,-.39,-1.38,-.99],["c",-.3,-.24,-.66,-.51,-.75,-.57],["c",-.21,-.15,-.27,-.24,-.24,-.45],["c",.06,-.27,.36,-.6,.6,-.66],["c",.18,-.03,.33,.06,.9,.57],["c",.48,.42,.72,.57,.93,.69],["c",.66,.33,1.38,.21,1.95,-.36],["c",.63,-.6,1.05,-1.62,1.23,-3],["c",.03,-.18,.09,-.66,.09,-1.11],["c",.09,-1.56,.33,-3.81,.57,-5.49],["c",.06,-.33,.09,-.63,.09,-.63],["c",-.03,-.03,-.81,-.12,-1.02,-.12],["c",-.57,0,-1.32,.12,-1.8,.33],["c",-.87,.3,-1.35,.78,-1.5,1.41],["c",-.18,.63,.09,1.26,.66,1.65],["c",.12,.06,.15,.12,.18,.24],["c",.09,.27,.06,.57,-.09,.75],["c",-.03,.06,-.12,.09,-.27,.15],["c",-.72,.21,-1.44,.15,-2.1,-.18],["c",-.54,-.27,-.96,-.66,-1.2,-1.14],["c",-.39,-.75,-.33,-1.74,.15,-2.52],["c",.27,-.42,.84,-.93,1.41,-1.23],["c",1.17,-.57,2.88,-.9,4.8,-.9],["c",.69,0,.78,0,1.08,.06],["c",.45,.09,1.11,.3,2.07,.6],["c",1.47,.48,1.83,.57,2.55,.54],["c",1.02,-.06,2.04,-.45,2.94,-1.11],["c",.12,-.09,.24,-.18,.27,-.18],["z"],["m",-5.88,13.05],["c",.21,-.03,.81,0,1.08,.06],["c",.48,.12,.9,.42,.99,.69],["c",.03,.09,.03,.15,0,.27],["c",0,.09,-.03,.57,-.06,1.08],["c",-.09,2.19,-.24,5.76,-.39,8.28],["c",-.06,1.53,-.06,1.77,.03,2.01],["c",.09,.18,.15,.24,.3,.3],["c",.24,.12,.54,.06,1.23,-.27],["c",.57,-.27,.66,-.3,.75,-.24],["c",.09,.06,.18,.3,.18,.45],["c",0,.33,-.15,.51,-.45,.63],["c",-.12,.03,-.39,.15,-.6,.27],["c",-1.17,.6,-1.38,.69,-1.8,.72],["c",-.45,.03,-.78,-.09,-1.08,-.39],["c",-.39,-.42,-.66,-1.2,-1.02,-3.12],["c",-.24,-1.23,-.36,-2.07,-.54,-3.75],["l",0,-.18],["l",-.36,.45],["c",-.6,.75,-1.32,1.59,-1.95,2.25],["c",-.15,.18,-.27,.3,-.27,.33],["c",0,0,.06,.09,.15,.18],["c",.24,.33,.6,.57,1.05,.69],["c",.18,.06,.3,.06,.69,.06],["l",.48,.03],["l",.06,.12],["c",.15,.27,.03,.72,-.21,.9],["c",-.18,.12,-.93,.27,-1.41,.27],["c",-.84,0,-1.59,-.3,-1.98,-.84],["l",-.12,-.15],["l",-.45,.42],["c",-.99,.87,-1.53,1.32,-2.16,1.74],["c",-.78,.51,-1.5,.84,-2.1,.93],["c",-.69,.12,-1.2,.03,-1.95,-.42],["c",-.21,-.12,-.51,-.27,-.66,-.36],["c",-.24,-.12,-.3,-.18,-.33,-.24],["c",-.12,-.27,.15,-.78,.45,-.93],["c",.24,-.12,.33,-.09,.9,.18],["c",.6,.3,.84,.39,1.2,.36],["c",.87,-.09,1.77,-.69,3.24,-2.31],["c",2.67,-2.85,4.59,-5.94,5.7,-9.15],["c",.15,-.45,.24,-.63,.42,-.81],["c",.21,-.24,.6,-.45,.99,-.51],["z"],["m",-3.99,16.05],["c",.18,0,.69,-.03,1.17,0],["c",3.27,.03,5.37,.75,6,2.07],["c",.45,.99,.12,2.4,-.81,3.42],["c",-.24,.27,-.57,.57,-.84,.75],["c",-.09,.06,-.18,.09,-.18,.12],["c",0,0,.18,.03,.42,.09],["c",1.23,.3,2.01,.81,2.37,1.59],["c",.27,.54,.3,1.32,.09,2.1],["c",-.12,.36,-.45,1.05,-.69,1.35],["c",-.87,1.17,-2.1,1.92,-3.54,2.25],["c",-.36,.06,-.48,.06,-.96,.06],["c",-.45,0,-.66,0,-.84,-.03],["c",-.84,-.18,-1.47,-.51,-2.07,-1.11],["c",-.33,-.33,-.45,-.51,-.45,-.63],["c",0,-.06,.03,-.15,.06,-.24],["c",.18,-.33,.69,-.6,.93,-.48],["c",.03,.03,.15,.12,.27,.24],["c",.39,.42,.99,.57,1.62,.45],["c",1.05,-.21,1.98,-1.02,2.31,-2.01],["c",.48,-1.53,-.48,-2.55,-2.58,-2.67],["c",-.21,0,-.36,-.03,-.42,-.06],["c",-.15,-.09,-.21,-.51,-.06,-.78],["c",.12,-.27,.24,-.33,.6,-.36],["c",.57,-.06,1.11,-.42,1.5,-.99],["c",.48,-.72,.54,-1.59,.18,-2.31],["c",-.12,-.21,-.45,-.54,-.69,-.69],["c",-.33,-.21,-.93,-.45,-1.35,-.51],["l",-.12,-.03],["l",-.06,.48],["c",-.54,2.94,-1.14,6.24,-1.29,6.75],["c",-.33,1.35,-.93,2.61,-1.65,3.6],["c",-.3,.36,-.81,.9,-1.14,1.14],["c",-.3,.24,-.84,.48,-1.14,.57],["c",-.33,.09,-.96,.09,-1.26,.03],["c",-.45,-.12,-.87,-.39,-1.53,-.96],["c",-.24,-.15,-.51,-.39,-.63,-.48],["c",-.3,-.21,-.33,-.33,-.21,-.63],["c",.12,-.18,.27,-.36,.42,-.45],["c",.27,-.12,.36,-.09,.87,.33],["c",.78,.6,1.08,.75,1.65,.72],["c",.45,-.03,.81,-.21,1.17,-.54],["c",.87,-.9,1.38,-2.85,1.38,-5.37],["c",0,-.6,.03,-1.11,.12,-2.04],["c",.06,-.69,.24,-2.01,.33,-2.58],["c",.06,-.24,.06,-.42,.06,-.42],["c",0,0,-.12,.03,-.21,.09],["c",-1.44,.57,-2.16,1.65,-1.74,2.55],["c",.09,.15,.18,.24,.27,.33],["c",.24,.21,.3,.27,.33,.39],["c",.06,.24,0,.63,-.15,.78],["c",-.09,.12,-.54,.21,-.96,.24],["c",-1.02,.03,-2.01,-.48,-2.43,-1.32],["c",-.21,-.45,-.27,-.9,-.15,-1.44],["c",.06,-.27,.21,-.66,.39,-.93],["c",.87,-1.29,3,-2.22,5.64,-2.43],["z"]],w:19.643,h:43.325},"tab.tiny":{d:[["M",16.02,-17.25],["c",.12,-.09,.15,-.09,.27,-.09],["c",.21,.03,.51,.3,.51,.45],["c",0,.06,-.12,.18,-.3,.36],["c",-1.11,1.08,-2.55,1.59,-3.84,1.41],["c",-.15,-.03,-.33,-.06,-.39,-.09],["c",-.06,-.03,-.09,-.03,-.12,-.03],["c",0,0,-.06,.42,-.15,.93],["c",-.33,2.01,-.66,3.69,-.84,4.26],["c",-.42,1.41,-1.23,2.67,-2.16,3.33],["c",-.27,.18,-.75,.42,-.99,.48],["c",-.3,.09,-.72,.09,-1.02,.06],["c",-.45,-.09,-.84,-.33,-1.53,-.9],["c",-.21,-.18,-.51,-.39,-.63,-.48],["c",-.27,-.21,-.3,-.24,-.3,-.36],["c",0,-.12,.09,-.36,.18,-.45],["c",.09,-.09,.27,-.18,.36,-.18],["c",.12,0,.3,.12,.66,.45],["c",.57,.51,.87,.69,1.23,.72],["c",.93,.06,1.68,-.78,1.98,-2.37],["c",.09,-.39,.15,-.75,.18,-1.53],["c",.06,-.99,.24,-2.79,.42,-4.05],["c",.03,-.3,.06,-.57,.06,-.6],["c",0,-.06,-.03,-.09,-.15,-.12],["c",-.9,-.18,-2.13,.06,-2.76,.57],["c",-.36,.3,-.51,.6,-.51,1.02],["c",0,.45,.15,.75,.48,.99],["c",.06,.06,.15,.18,.18,.24],["c",.12,.24,.03,.63,-.15,.69],["c",-.24,.12,-.6,.15,-.9,.15],["c",-.36,-.03,-.57,-.09,-.87,-.24],["c",-.78,-.36,-1.23,-1.11,-1.2,-1.92],["c",.12,-1.53,1.74,-2.49,4.62,-2.7],["c",1.2,-.09,1.47,-.03,3.33,.57],["c",.9,.3,1.14,.36,1.56,.39],["c",.45,0,.93,-.06,1.38,-.21],["c",.51,-.18,.81,-.33,1.41,-.75],["z"],["m",-4.68,10.38],["c",.39,-.06,.84,0,1.2,.15],["c",.24,.12,.36,.21,.45,.36],["l",.09,.09],["l",-.06,1.41],["c",-.09,2.19,-.18,3.96,-.27,5.49],["c",-.03,.78,-.06,1.59,-.06,1.86],["c",0,.42,0,.48,.06,.57],["c",.06,.18,.18,.24,.36,.27],["c",.18,0,.39,-.06,.84,-.27],["c",.45,-.21,.54,-.24,.63,-.18],["c",.12,.12,.15,.54,.03,.69],["c",-.03,.03,-.15,.12,-.27,.18],["c",-.15,.03,-.3,.12,-.36,.15],["c",-.87,.45,-1.02,.51,-1.26,.57],["c",-.33,.09,-.6,.06,-.84,-.06],["c",-.42,-.18,-.63,-.6,-.87,-1.44],["c",-.3,-1.23,-.57,-2.97,-.66,-4.08],["c",0,-.18,-.03,-.3,-.03,-.33],["l",-.06,.06],["c",-.18,.27,-1.11,1.38,-1.68,2.01],["l",-.33,.33],["l",.06,.09],["c",.06,.15,.27,.33,.48,.42],["c",.27,.18,.51,.24,.96,.27],["l",.39,0],["l",.03,.12],["c",.12,.21,.03,.57,-.15,.69],["c",-.03,.03,-.21,.09,-.36,.15],["c",-.27,.06,-.39,.06,-.75,.06],["c",-.48,0,-.75,-.03,-1.08,-.21],["c",-.21,-.12,-.51,-.36,-.57,-.48],["l",-.03,-.09],["l",-.39,.36],["c",-1.47,1.35,-2.49,1.98,-3.42,2.13],["c",-.54,.09,-.96,-.03,-1.62,-.39],["c",-.21,-.15,-.45,-.27,-.54,-.3],["c",-.18,-.09,-.21,-.21,-.12,-.45],["c",.06,-.27,.33,-.48,.54,-.48],["c",.03,0,.27,.09,.48,.21],["c",.48,.24,.69,.27,.99,.27],["c",.6,-.06,1.17,-.42,2.1,-1.35],["c",2.22,-2.22,4.02,-4.98,4.95,-7.59],["c",.21,-.57,.3,-.78,.48,-.93],["c",.15,-.15,.42,-.27,.66,-.33],["z"],["m",-3.06,12.84],["c",.27,-.03,1.68,0,2.01,.03],["c",1.92,.18,3.15,.69,3.63,1.5],["c",.18,.33,.24,.51,.21,.93],["c",0,.45,-.06,.72,-.24,1.11],["c",-.24,.51,-.69,1.02,-1.17,1.35],["c",-.21,.15,-.21,.15,-.12,.18],["c",.72,.15,1.11,.3,1.5,.57],["c",.39,.24,.63,.57,.75,.96],["c",.09,.3,.09,.96,0,1.29],["c",-.15,.57,-.39,1.05,-.78,1.5],["c",-.66,.75,-1.62,1.32,-2.61,1.53],["c",-.27,.06,-.42,.06,-.84,.06],["c",-.48,0,-.57,0,-.81,-.06],["c",-.6,-.18,-1.05,-.42,-1.47,-.81],["c",-.36,-.39,-.42,-.51,-.3,-.75],["c",.12,-.21,.39,-.39,.6,-.39],["c",.09,0,.15,.03,.33,.18],["c",.12,.12,.27,.24,.36,.27],["c",.96,.48,2.46,-.33,2.82,-1.5],["c",.24,-.81,-.03,-1.44,-.69,-1.77],["c",-.39,-.21,-1.02,-.33,-1.53,-.33],["c",-.18,0,-.21,0,-.27,-.09],["c",-.06,-.09,-.06,-.3,-.03,-.48],["c",.06,-.18,.18,-.36,.33,-.36],["c",.39,-.06,.51,-.09,.72,-.18],["c",.69,-.36,1.11,-1.23,.99,-2.01],["c",-.09,-.51,-.42,-.9,-.93,-1.17],["c",-.24,-.12,-.6,-.27,-.87,-.3],["c",-.09,-.03,-.09,-.03,-.12,.12],["c",0,.09,-.21,1.11,-.42,2.25],["c",-.66,3.75,-.72,3.99,-1.26,5.07],["c",-.9,1.89,-2.25,2.85,-3.48,2.61],["c",-.39,-.09,-.69,-.27,-1.38,-.84],["c",-.63,-.51,-.63,-.48,-.63,-.6],["c",0,-.18,.18,-.48,.39,-.57],["c",.21,-.12,.3,-.09,.81,.33],["c",.15,.15,.39,.3,.54,.36],["c",.18,.12,.27,.12,.48,.15],["c",.99,.06,1.71,-.78,2.04,-2.46],["c",.12,-.66,.18,-1.14,.21,-2.22],["c",.03,-1.23,.12,-2.25,.36,-3.63],["c",.03,-.24,.06,-.45,.06,-.48],["c",-.06,-.03,-.66,.27,-.9,.42],["c",-.06,.06,-.21,.18,-.33,.3],["c",-.57,.57,-.6,1.35,-.06,1.74],["c",.18,.12,.24,.24,.21,.51],["c",-.03,.3,-.15,.42,-.57,.48],["c",-1.11,.24,-2.22,-.42,-2.43,-1.38],["c",-.09,-.45,.03,-1.02,.3,-1.47],["c",.18,-.24,.6,-.63,.9,-.84],["c",.9,-.6,2.28,-1.02,3.69,-1.11],["z"]],w:15.709,h:34.656},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.85,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84},"noteheads.slash.whole":{d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},"noteheads.slash.quarter":{d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},"noteheads.harmonic.quarter":{d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165},"noteheads.triangle.quarter":{d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9}},n=function(e){for(var t=[],n=0,r=e.length;n<r;n++){t[n]=[];for(var i=0,s=e[n].length;i<s;i++)t[n][i]=e[n][i]}return t};return Id={printSymbol:function(e,r,i,s,a){if(!t[i])return null;var o=n(t[i].d);o[0][1]+=e,o[0][2]+=r;for(var c="",l=0;l<o.length;l++)c+=o[l].join(" ");return a.path=c,s.path(a)},getPathForSymbol:function(e,r,i,s,a){if(s=s||1,a=a||1,!t[i])return null;var o=n(t[i].d);return 1===s&&1===a||function(e,t,n){for(var r=0,i=e.length;r<i;r++){var s,a,o=e[r];for(s=1,a=o.length;s<a;s++)o[s]*=s%2?t:n}}(o,s,a),o[0][1]+=e,o[0][2]+=r,o},getSymbolWidth:function(e){return t[e]?t[e].w:0},symbolHeightInPitches:function(n){return(t[n]?t[n].h:0)/e.STEP},getSymbolAlign:function(e){return"scripts"===e.substring(0,7)&&"scripts.roll"!==e?"center":"left"},getYCorr:function(e){switch(e){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"flags.d64th":case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"timesig.common":case"timesig.cut":default:return 0;case"flags.d32nd":case"rests.half":case"rests.8th":case"rests.quarter":case"rests.16th":case"rests.32nd":case"rests.64th":case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"flags.u32nd":case"rests.whole":case"scripts.dfermata":return 1;case"flags.u64th":return 3;case"f":case"m":case"p":case"s":case"z":return-4}},setSymbol:function(e,n){t[e]=n}}}function Gg(){if(Kd)return $d;Kd=1;var e=function(e){this.type="TieElem",this.anchor1=e.anchor1,this.anchor2=e.anchor2,e.isGrace&&(this.isGrace=!0),e.fixedY&&(this.fixedY=!0),e.stemDir&&(this.stemDir=e.stemDir),void 0!==e.voiceNumber&&(this.voiceNumber=e.voiceNumber),void 0!==e.style&&(this.dotted=!0),this.internalNotes=[]};return e.prototype.addInternalNote=function(e){this.internalNotes.push(e)},e.prototype.setEndAnchor=function(e){this.anchor2=e,this.anchor1?(this.top=Math.max(this.anchor1.pitch,this.anchor2.pitch)+4,this.bottom=Math.min(this.anchor1.pitch,this.anchor2.pitch)-4):(this.top=this.anchor2.pitch+4,this.bottom=this.anchor2.pitch-4)},e.prototype.setStartX=function(e){this.startLimitX=e},e.prototype.setEndX=function(e){this.endLimitX=e},e.prototype.setHint=function(){this.hint=!0},e.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},e.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;t<this.internalNotes.length;t++){"down"===this.internalNotes[t].stemDir&&(e=!0)}this.above=e}},e.prototype.calcX=function(e,t){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.anchor2?this.startX=this.anchor2.x-20:this.startX=e,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=t},e.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0},e.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&"up"===this.anchor1.stemDir&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var e=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,t=(this.anchor2.highestVert+this.anchor2.pitch)/2;if(this.above&&"up"===this.anchor2.stemDir&&!this.fixedY&&!e&&t<this.startY?(this.endY=t,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&e?this.anchor2.highestVert:this.anchor2.pitch,1===this.anchor1.scalex){var n=!!this.anchor1.parent.beam,r=!!this.anchor2.parent.beam;if(n)this.anchor1.parent===this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1]||(this.above?this.startY=this.anchor1.parent.fixed.t:this.startY=this.anchor1.parent.fixed.b);if(r)this.anchor2.parent===this.anchor2.parent.beam.elems[0]||(this.above?this.endY=this.anchor2.parent.fixed.t:this.endY=this.anchor2.parent.fixed.b)}}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},e.prototype.avoidCollisionAbove=function(){if(this.above){for(var e=-50,t=0;t<this.internalNotes.length;t++)this.internalNotes[t].highestVert>e&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},e.prototype.getYBounds=function(){var e,t;return this.isTie?(this.calcTieDirection(),this.calcX(10,1e3),this.calcTieY()):(this.calcSlurDirection(),this.calcX(10,1e3),this.calcSlurY()),this.above?e=(t=Math.min(this.startY,this.endY))+3:t=(e=Math.min(this.startY,this.endY))-3,[e,t]},$d=e}function Wg(){if(Xd)return Qd;Xd=1;var e=Hd?qd:(Hd=1,qd=function(e,t,n){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===n?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}),t=Ud?Yd:(Ud=1,Yd=function(e,t,n,r){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=n,"above"===r?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}),n=Wd?Gd:(Wd=1,Gd=function(e,t){this.type="GlissandoElem",this.anchor1=e,this.anchor2=t}),r=Ug(),i=Bg(),s=Gg(),a=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},o=function(e,t,n,s,a){function o(e,t){var o="down"===a?function(){if(0===s.heads.length)return 2;for(var e=s.heads[0].pitch,t=1;t<s.heads.length;t++)e=Math.min(e,s.heads[t].pitch);return e}()+1:function(){if(0===s.heads.length)return 10;for(var e=s.heads[0].pitch,t=1;t<s.heads.length;t++)e=Math.max(e,s.heads[t].pitch);return e}()+9;"down"!==a&&1===t&&o--;var c=n/2;c+="down"===a?-5:3;for(var l=0;l<t;l++)o-=1,s.addFixedX(new i(e,c,r.getSymbolWidth(e),o))}for(var c=0;c<e.length;c++)switch(e[c]){case"/":o("flags.ugrace",1);break;case"//":o("flags.ugrace",2);break;case"///":o("flags.ugrace",3);break;case"////":o("flags.ugrace",4)}};return a.prototype.dynamicDecoration=function(e,r,i,s){for(var a,o,c,l=0;l<r.length;l++)switch(r[l]){case"diminuendo(":this.startDiminuendoX=i,a=void 0;break;case"diminuendo)":a={start:this.startDiminuendoX,stop:i},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=i,o=void 0;break;case"crescendo)":o={start:this.startCrescendoX,stop:i},this.startCrescendoX=void 0;break;case"~(":case"glissando(":this.startGlissandoX=i,c=void 0;break;case"~)":case"glissando)":c={start:this.startGlissandoX,stop:i},this.startGlissandoX=void 0}a&&e.addOther(new t(a.start,a.stop,">",s)),o&&e.addOther(new t(o.start,o.stop,"<",s)),c&&e.addOther(new n(c.start,c.stop))},a.prototype.createDecoration=function(t,n,a,c,l,u,h,d,f,p,m){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(t,n,r,i){for(var s=0;s<n.length;s++)switch(n[s]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var a=new e(r,n[s],i);t.addOther(a)}}(t,n,l,f.volumePosition),this.dynamicDecoration(t,n,l,f.dynamicPosition),o(n,0,c,l,h);var g=function(e,t,n,a,o,c,l,u,h){for(var d,f=0;f<t.length;f++){if("staccato"===t[f]||"tenuto"===t[f]||"accent"===t[f]&&!h){var p="scripts."+t[f];if("accent"===t[f]&&(p="scripts.sforzato"),d=void 0===d?"down"===l?n+2:u-2:"down"===l?d+2:d-2,"accent"===t[f])"up"===l?d--:d++;else switch(d){case 2:case 4:case 6:case 8:case 10:"up"===l?d--:d++}n>9&&d++;var m=a/2;"center"!==r.getSymbolAlign(p)&&(m-=r.getSymbolWidth(p)/2),o.addFixedX(new i(p,m,r.getSymbolWidth(p),d))}if("slide"===t[f]&&o.heads[0]){var g=o.heads[0].pitch,v=new i("",-c-15,0,(g-=2)-1),b=new i("",-c-5,0,g+1);o.addFixedX(v),o.addFixedX(b),e.addOther(new s({anchor1:v,anchor2:b,fixedY:!0}))}}return void 0===d&&(d=n),{above:d,below:o.bottom}}(t,n,a,c,l,u,h,d,m);g.above=Math.max(g.above,this.minTop),g.below=Math.min(g.below,d),function(e,t,n,s,a,o,c,l){function u(e,t){"above"===e?s.above+=t:s.below-=t}function h(e){var t;return"above"===e?(t=s.above)<o&&(t=o):(t=s.below)>c&&(t=c),t}function d(e,r,s){var a=h(r);n.addFixedX(new i(e,t/2,0,a+2,{type:"decoration",klass:"ornament",thickness:3,anchor:s})),u(r,5)}function f(e,s){var a=t/2;"center"!==r.getSymbolAlign(e)&&(a-=r.getSymbolWidth(e)/2);var o=r.symbolHeightInPitches(e)+1,c=h(s);c="above"===s?c+o/2:c-o/2,n.addFixedX(new i(e,a,r.getSymbolWidth(e),c,{klass:"ornament",thickness:r.symbolHeightInPitches(e),position:s})),u(s,o)}for(var p={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},m=!1,g=0;g<e.length;g++)switch(e[g]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":d(e[g],a,"middle"),m=!0;break;case"D.C.alcoda":d("D.C. al coda",a,"end"),m=!0;break;case"D.C.alfine":d("D.C. al fine",a,"end"),m=!0;break;case"D.S.alcoda":d("D.S. al coda",a,"end"),m=!0;break;case"D.S.alfine":d("D.S. al fine",a,"end"),m=!0;break;case"fine":d("FINE",a,"middle"),m=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"roll":case"irishroll":case"marcato":case"dmarcato":case"turn":case"uppermordent":case"pralltriller":case"mordent":case"lowermordent":case"downbow":case"upbow":case"fermata":case"breath":case"umarcato":case"coda":case"segno":f(p[e[g]],a),m=!0;break;case"invertedfermata":f(p[e[g]],"below"),m=!0;break;case"mark":n.klass="mark";break;case"accent":l&&(f("scripts.sforzato",a),m=!0)}}(n,c,l,g,f.ornamentPosition,this.minTop,d,m),function(e,t,n){for(var s=0;s<e.length;s++)if("arpeggio"===e[s])for(var a=t.abcelem.minpitch-1;a<=t.abcelem.maxpitch;a+=2)t.addExtra(new i("scripts.arpeggio",2*-r.getSymbolWidth("scripts.arpeggio")-n,0,a+2,{klass:"ornament",thickness:r.symbolHeightInPitches("scripts.arpeggio")}))}(n,l,u)},Qd=a}function $g(){if(rf)return nf;rf=1;var e=tf?ef:(tf=1,ef=function(e){for(var t=0,n=0;n<e.voices.length;n++){var r=e.voices[n].staff;e.voices[n].duplicate||(t+=r.top,t+=-r.bottom)}return t}),t=function(e){this.getTextSize=e,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};return t.prototype.setLimit=function(e,t){t.specialY[e]&&(t.staff.specialY[e]?t.staff.specialY[e]=Math.max(t.staff.specialY[e],t.specialY[e]):t.staff.specialY[e]=t.specialY[e])},t.prototype.addVoice=function(e,t,n){var r=this.voices.length;this.voices[r]=e,this.staffs[t]?this.staffs[t].voices.push(r):this.staffs[this.staffs.length]={top:10,bottom:2,lines:n,voices:[r],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},e.staff=this.staffs[t]},t.prototype.setHeight=function(){this.height=e(this)},t.prototype.setWidth=function(e){this.w=e;for(var t=0;t<this.voices.length;t++)this.voices[t].setWidth(e)},t.prototype.setStaffLimits=function(e){e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},nf=t}function Kg(){if(df)return hf;df=1;var e=Bg(),t=Sg();const n=function(){if(uf)return lf;function e(e){switch(e){case"B#":return"H#";case"B♯":return"H♯";case"B":return"H";case"Bb":case"B♭":return"B"}return e}return uf=1,lf=function(t,n,r){var i=t.split("\n");for(let s=0;s<i.length;s++){let t=i[s].match(/^([ABCDEFG][♯♭]?)?([^\/]+)?(\/([ABCDEFG][#b♯♭]?))?/);if(!t)continue;let a=t[1]||"",o=t[2]||"",c=t[4]||"";r&&(a=e(a),c=e(c));const l=n?"":"",u=c?"/"+c:"";i[s]=[a,o,u].join(l)}return i.join("\n")}}();function r(r,i,s,a,o,c,l,u,h,d,f,p,m,g,v){for(var b=r.split("\n"),y=b.length-1;y>=0;y--){var _,w=b[y],x=0;a||(w=n(w,g,v));var k=u.calc(w,o,c),S=k.width,C=k.height/t.STEP;switch(i){case"left":x=-(f+=S+7),_=d.averagepitch,h.addExtra(new e(w,x,S+4,_,{type:"text",height:C,dim:l,position:"left"}));break;case"right":x=p+=4,_=d.averagepitch,h.addRight(new e(w,x,S+4,_,{type:"text",height:C,dim:l,position:"right"}));break;case"below":h.addRight(new e(w,0,0,void 0,{type:"text",position:"below",height:C,dim:l,realWidth:S}));break;case"above":h.addRight(new e(w,0,0,void 0,{type:"text",position:"above",height:C,dim:l,realWidth:S}));break;default:if(s){var M=s.y+3*t.STEP;h.addRight(new e(w,x+s.x,0,d.minpitch+M/t.STEP,{position:"relative",type:"text",height:C,dim:l}))}else{var E="above";d.positioning&&d.positioning.chordPosition&&(E=d.positioning.chordPosition),"hidden"!==E&&h.addCentered(new e(w,m/2,S,void 0,{type:"chord",position:E,height:C,dim:l,realWidth:S}))}}}return{roomTaken:f,roomTakenRight:p}}return hf=function(e,t,n,i,s,a,o,c){for(var l=0;l<n.chord.length;l++){var u,h,d=n.chord[l].position,f=n.chord[l].rel_position,p="left"===d||"right"===d||"below"===d||"above"===d||!!f;p?(u="annotationfont",h="abcjs-annotation"):(u="gchordfont",h="abcjs-chord");var m,g=e.attr(u,h),v=n.chord[l].name;if("string"==typeof v)i=(m=r(v,d,f,p,u,h,g,e,t,n,i,s,a,o,c)).roomTaken,s=m.roomTakenRight;else for(var b=0;b<v.length;b++)i=(m=r(v[b].text,d,f,p,u,h,g,e,t,n,i,s,a,o,c)).roomTaken,s=m.roomTakenRight}return{roomTaken:i,roomTakenRight:s}}}function Qg(){if(pf)return ff;pf=1;var e=Lg(),t=function(){if(Pd)return Td;Pd=1;var e=function(e,t,n,r){this.type="BeamElem",this.isflat=!!n,this.isgrace=!(!t||"grace"!==t),this.forceup=!!(this.isgrace||t&&"up"===t),this.forcedown=!(!t||"down"!==t),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=e,this.beams=[],r&&r.duration?(this.duration=r.duration,r.startTriplet&&(this.duration*=r.tripletMultiplier),this.duration=Math.round(1e3*this.duration)/1e3):this.duration=0};function t(e,t){return t?e/t:0}return e.prototype.setHint=function(){this.hint=!0},e.prototype.runningDirection=function(e){var t=e.averagepitch;void 0!==t&&(this.total=Math.round(this.total+t),this.count||(this.count=0),this.count++)},e.prototype.add=function(e){var t=e.abcelem.averagepitch;void 0!==t&&(e.abcelem.rest||(this.allrests=!1),e.beam=this,this.elems.push(e),this.total=Math.round(this.total+t),(void 0===this.min||e.abcelem.minpitch<this.min)&&(this.min=e.abcelem.minpitch),(void 0===this.max||e.abcelem.maxpitch>this.max)&&(this.max=e.abcelem.maxpitch))},e.prototype.addBeam=function(e){this.beams.push(e)},e.prototype.setStemDirection=function(){this.average=t(this.total,this.count),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6,delete this.count,this.total=0},e.prototype.calcDir=function(){this.average=t(this.total,this.elems.length),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6;for(var e=this.stemsUp?"up":"down",n=0;n<this.elems.length;n++)for(var r=0;r<this.elems[n].heads.length;r++)this.elems[n].heads[r].stemDir=e},Td=e}(),n=function(){if(Nd)return Ad;Nd=1;var e=function(e,t){this.startVoice=e,this.type=t};return e.prototype.setBottomStaff=function(e){this.endVoice=e,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},e.prototype.continuing=function(e){this.lastContinuedVoice=e},e.prototype.getWidth=function(){return 10},e.prototype.isStartVoice=function(e){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===e)},Ad=e}(),r=function(){if(Ld)return Dd;Ld=1;var e=Lg(),t=Ug(),n=Bg();return Dd=function(r,i){var s,a=0;r.el_type="clef";var o=new e(r,0,10,"staff-extra clef",i);switch(o.isClef=!0,r.type){case"treble":s="clefs.G";break;case"tenor":case"alto":s="clefs.C";break;case"bass":s="clefs.F";break;case"treble+8":s="clefs.G",a=1;break;case"tenor+8":case"alto+8":s="clefs.C",a=1;break;case"bass+8":s="clefs.F",a=1;break;case"treble-8":s="clefs.G",a=-1;break;case"tenor-8":case"alto-8":s="clefs.C",a=-1;break;case"bass-8":s="clefs.F",a=-1;break;case"none":return null;case"perc":s="clefs.perc";break;default:o.addFixed(new n("clef="+r.type,0,0,void 0,{type:"debug"}))}if(s){var c=t.symbolHeightInPitches(s),l=function(e){switch(e){case"clefs.G":return-5;case"clefs.C":case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}(s);if(o.addRight(new n(s,5,t.getSymbolWidth(s),r.clefPos,{top:c+r.clefPos+l,bottom:r.clefPos+l})),0!==a){var u=2/3,h=(t.getSymbolWidth(s)-t.getSymbolWidth("8")*u)/2,d=a>0?o.top+3:o.bottom-1,f=a>0?o.top+3:o.bottom-3,p=f-2;"bass-8"===r.type&&(d=3,h=0),o.addRight(new n("8",5+h,t.getSymbolWidth("8")*u,d,{scalex:u,scaley:u,top:f,bottom:p}))}}return o}}(),i=function(){if(Vd)return Bd;Vd=1;var e=Lg(),t=Ug(),n=Bg();return Bd=function(r,i){if(r.el_type="keySignature",!r.accidentals||0===r.accidentals.length)return null;var s=new e(r,0,10,"staff-extra key-signature",i);s.isKeySig=!0;var a=0;return r.accidentals.forEach((function(e){var r,i=0;switch(e.acc){case"sharp":r="accidentals.sharp",i=-3;break;case"natural":r="accidentals.nat";break;case"flat":r="accidentals.flat",i=-1.2;break;case"quartersharp":r="accidentals.halfsharp",i=-2.5;break;case"quarterflat":r="accidentals.halfflat",i=-1.2;break;default:r="accidentals.flat"}s.addRight(new n(r,a,t.getSymbolWidth(r),e.verticalPos,{thickness:t.symbolHeightInPitches(r),top:e.verticalPos+t.symbolHeightInPitches(r)+i,bottom:e.verticalPos+i})),a+=t.getSymbolWidth(r)+2}),this),s}}(),s=function(){if(Fd)return Rd;Fd=1;var e=Ug(),t=Bg();return Rd=function(n,r,i,s){s||(s={});var a,o=void 0!==s.dir?s.dir:null,c=void 0!==s.headx?s.headx:0,l=void 0!==s.extrax?s.extrax:0,u=void 0!==s.flag?s.flag:null,h=void 0!==s.dot?s.dot:0,d=void 0!==s.dotshiftx?s.dotshiftx:0,f=void 0!==s.scale?s.scale:1,p=void 0!==s.accidentalSlot?s.accidentalSlot:[],m=void 0!==s.shouldExtendStem&&s.shouldExtendStem,g=void 0===s.printAccidentals||s.printAccidentals,v=i.verticalPos,b=0,y=0,_=0;if(void 0===r)n.addFixed(new t("pitch is undefined",0,0,0,{type:"debug"}));else if(""===r)a=new t(null,0,0,v);else{var w=c;if(i.printer_shift){var x="same"===i.printer_shift?1:0;w="down"===o?-e.getSymbolWidth(r)*f+x:e.getSymbolWidth(r)*f-x}var k={scalex:f,scaley:f,thickness:e.symbolHeightInPitches(r)*f,name:i.name};if((a=new t(r,w,e.getSymbolWidth(r)*f,v,k)).stemDir=o,u){var S=v+("down"===o?-7:7)*f;m&&("down"===o&&S>6&&(S=6),"up"===o&&S<6&&(S=6));var C="down"===o?c:c+a.w-.6;n.addRight(new t(u,C,e.getSymbolWidth(u)*f,S,{scalex:f,scaley:f}))}for(y=a.w+d-2+5*h;h>0;h--){var M=1-Math.abs(v)%2;n.addRight(new t("dots.dot",a.w+d-2+5*h,e.getSymbolWidth("dots.dot"),v+M))}}if(a&&(a.highestVert=i.highestVert),g&&i.accidental){var E;switch(i.accidental){case"quartersharp":E="accidentals.halfsharp";break;case"dblsharp":E="accidentals.dblsharp";break;case"sharp":E="accidentals.sharp";break;case"quarterflat":E="accidentals.halfflat";break;case"flat":E="accidentals.flat";break;case"dblflat":E="accidentals.dblflat";break;case"natural":E="accidentals.nat"}for(var T=!1,P=l,A=0;A<p.length;A++)if(v-p[A][0]>=6){p[A][0]=v,P=p[A][1],T=!0;break}!1===T&&(P-=e.getSymbolWidth(E)*f+2,p.push([v,P]),b=e.getSymbolWidth(E)*f+2);var N=e.symbolHeightInPitches(E);n.addExtra(new t(E,P,e.getSymbolWidth(E),v,{scalex:f,scaley:f,top:v+N/2,bottom:v-N/2})),_=e.getSymbolWidth(E)/2}return{notehead:a,accidentalshiftx:b,dotshiftx:y,extraLeft:_}}}(),a=function(){if(jd)return zd;jd=1;var e=Lg(),t=Ug(),n=Bg();return zd=function(r,i){r.el_type="timeSignature";var s=new e(r,0,10,"staff-extra time-signature",i);if("specified"===r.type)for(var a=0,o=0;o<r.value.length;o++)if(0!==o&&(s.addRight(new n("+",a+1,t.getSymbolWidth("+"),6,{thickness:t.symbolHeightInPitches("+")})),a+=t.getSymbolWidth("+")+2),r.value[o].den){for(var c=0,l=0;l<r.value[o].num.length;l++)c+=t.getSymbolWidth(r.value[o].num[l]);var u=0;for(l=0;l<r.value[o].num.length;l++)u+=t.getSymbolWidth(r.value[o].den[l]);var h=Math.max(c,u);s.addRight(new n(r.value[o].num,a+(h-c)/2,c,8,{thickness:t.symbolHeightInPitches(r.value[o].num[0])})),s.addRight(new n(r.value[o].den,a+(h-u)/2,u,4,{thickness:t.symbolHeightInPitches(r.value[o].den[0])})),a+=h}else{for(var d=0,f=0;f<r.value[o].num.length;f++)d+=t.getSymbolWidth(r.value[o].num[f]);s.addRight(new n(r.value[o].num,a,d,6,{thickness:t.symbolHeightInPitches(r.value[o].num[0])})),a+=d}else"common_time"===r.type?s.addRight(new n("timesig.common",0,t.getSymbolWidth("timesig.common"),6,{thickness:t.symbolHeightInPitches("timesig.common")})):"cut_time"===r.type?s.addRight(new n("timesig.cut",0,t.getSymbolWidth("timesig.cut"),6,{thickness:t.symbolHeightInPitches("timesig.cut")})):"tempus_imperfectum"===r.type?s.addRight(new n("timesig.imperfectum",0,t.getSymbolWidth("timesig.imperfectum"),6,{thickness:t.symbolHeightInPitches("timesig.imperfectum")})):"tempus_imperfectum_prolatio"===r.type?s.addRight(new n("timesig.imperfectum2",0,t.getSymbolWidth("timesig.imperfectum2"),6,{thickness:t.symbolHeightInPitches("timesig.imperfectum2")})):"tempus_perfectum"===r.type?s.addRight(new n("timesig.perfectum",0,t.getSymbolWidth("timesig.perfectum"),6,{thickness:t.symbolHeightInPitches("timesig.perfectum")})):"tempus_perfectum_prolatio"===r.type?s.addRight(new n("timesig.perfectum2",0,t.getSymbolWidth("timesig.perfectum2"),6,{thickness:t.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",r);return s}}(),o=Wg(),c=Jd?Zd:(Jd=1,Zd=function(e,t,n){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=n,this.endingHeightAbove=5,this.pitch=void 0}),l=Ug(),u=Bg(),h=Sg(),d=$g(),f=function(){if(af)return sf;af=1;var e=Lg(),t=Bg(),n=function(e,t,n){this.type="TempoElement",this.tempo=e,this.tempo.type="tempo",this.tuneNumber=t,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(n,e,t))};return n.prototype.setX=function(e){this.x=e},n.prototype.createNote=function(n,r,i){var s,a,o,c=.75,l=r.duration[0],u=new e(r,l,1,"tempo",i);l<=1/32?(o="noteheads.quarter",a="flags.u32nd",s=0):l<=1/16?(o="noteheads.quarter",a="flags.u16th",s=0):l<=3/32?(o="noteheads.quarter",a="flags.u16nd",s=1):l<=1/8?(o="noteheads.quarter",a="flags.u8th",s=0):l<=3/16?(o="noteheads.quarter",a="flags.u8th",s=1):l<=1/4?(o="noteheads.quarter",s=0):l<=3/8?(o="noteheads.quarter",s=1):l<=.5?(o="noteheads.half",s=0):l<=3/4?(o="noteheads.half",s=1):l<=1?(o="noteheads.whole",s=0):l<=1.5?(o="noteheads.whole",s=1):l<=2?(o="noteheads.dbl",s=0):(o="noteheads.dbl",s=1);var h,d=n(u,o,{verticalPos:0},{dir:"up",flag:a,dot:s,scale:c}).notehead;if(u.addHead(d),"noteheads.whole"!==o&&"noteheads.dbl"!==o){var f=d.dx+d.w;h=new t(null,f,0,.25,{type:"stem",pitch2:3.75,linewidth:-.6}),u.addRight(h)}return u},sf=n}(),p=Gg(),m=function(){if(cf)return of;cf=1;var e=function(e,t,n){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=n.flatBeams};return e.prototype.isClosed=function(){return!!this.anchor2},e.prototype.middleNote=function(e){this.middleElems.push(e)},e.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&"up"!==this.anchor1.stemDir||(this.endingHeightAbove=4)},of=e}(),g=Ng(),v=Kg(),b=Mg(),y=fh(),_=function(e){var t=0;return e.duration&&(t=e.duration),t},w=!1,x={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},triangle:{"-1":"noteheads.triangle.quarter",0:"noteheads.triangle.quarter",1:"noteheads.triangle.quarter",2:"noteheads.triangle.quarter",3:"noteheads.triangle.quarter",4:"noteheads.triangle.quarter",5:"noteheads.triangle.quarter",6:"noteheads.triangle.quarter",7:"noteheads.triangle.quarter",nostem:"noteheads.triangle.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}},k=function(e,t,n){this.decoration=new o,this.getTextSize=e,this.tuneNumber=t,this.isBagpipes=n.bagpipes,this.flatBeams=n.flatbeams,this.graceSlurs=n.graceSlurs,this.percmap=n.percmap,this.initialClef=n.initialClef,this.jazzchords=!!n.jazzchords,this.accentAbove=!!n.accentAbove,this.germanAlphabet=!!n.germanAlphabet,this.reset()};function S(e,t){var n=e[t];if("note"!==n.el_type||!n.startBeam||n.endBeam)return{count:1,elem:n};for(var r=[];t<e.length&&"note"===e[t].el_type&&(r.push(e[t]),!e[t].endBeam);)t++;return{count:r.length,elem:r}}function C(e){if(e.pitches){M(e);for(var t=0,n=0;n<e.pitches.length;n++)t+=e.pitches[n].verticalPos;e.averagepitch=t/e.pitches.length,e.minpitch=e.pitches[0].verticalPos,e.maxpitch=e.pitches[e.pitches.length-1].verticalPos}}k.prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.voiceColor=void 0,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.colorByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},k.prototype.setStemHeight=function(e){this.stemHeight=Math.round(10*e/h.STEP)/10},k.prototype.getCurrentVoiceId=function(e,t){return"s"+e+"v"+t},k.prototype.pushCrossLineElems=function(e,t){this.slursbyvoice[this.getCurrentVoiceId(e,t)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(e,t)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(e,t)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(e,t)]=this.voiceScale,this.voiceColor&&(this.colorByVoice[this.getCurrentVoiceId(e,t)]=this.voiceColor)},k.prototype.popCrossLineElems=function(e,t){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(e,t)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(e,t)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(e,t)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(e,t)],void 0===this.voiceScale&&(this.voiceScale=1),this.voiceColor=this.colorByVoice[this.getCurrentVoiceId(e,t)]},k.prototype.containsLyrics=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e[t].voices.length;n++)for(var r=0;r<e[t].voices[n].length;r++){var i=e[t].voices[n][r];if(i.lyric)return void(i.positioning&&"below"!==i.positioning.vocalPosition||(this.hasVocals=!0))}},k.prototype.createABCLine=function(e,t,n){this.minY=2,this.containsLyrics(e);var r=new d(this.getTextSize);this.tempoSet=!1;for(var i=0;i<e.length;i++)w&&this.restoreState(),w=!1,this.createABCStaff(r,e[i],t,i,n);return r},k.prototype.createABCStaff=function(e,t,s,o,c){e.getTextSize.updateFonts(t);for(var l=0;l<t.voices.length;l++){var u=new g(l,t.voices.length);0===l?(u.barfrom="start"===t.connectBarLines||"continue"===t.connectBarLines,u.barto="continue"===t.connectBarLines||"end"===t.connectBarLines):u.duplicate=!0,t.title&&t.title[l]&&(u.header=t.title[l].replace(/\\n/g,"\n"),u.headerPosition=6+e.getTextSize.baselineToCenter(u.header,"voicefont","staff-extra voice-name",l,t.voices.length)/h.STEP),t.clef&&"perc"===t.clef.type&&(u.isPercussion=!0);var d=(!this.initialClef||0===c)&&r(t.clef,this.tuneNumber);d&&(0===l&&t.barNumber&&this.addMeasureNumber(t.barNumber,d),u.addChild(d),this.startlimitelem=d);var f=i(t.key,this.tuneNumber);if(f&&(u.addChild(f),this.startlimitelem=f),t.meter){"specified"===t.meter.type?this.measureLength=t.meter.value[0].num/t.meter.value[0].den:this.measureLength=1;var p=a(t.meter,this.tuneNumber);u.addChild(p),this.startlimitelem=p}u.duplicate&&(u.children=[]);var m=t.clef.stafflines||0===t.clef.stafflines?t.clef.stafflines:5;e.addVoice(u,o,m);var v=1===m;this.createABCVoice(t.voices[l],s,o,l,v,u),e.setStaffLimits(u),0===l&&("start"===t.brace||!e.brace&&t.brace?(e.brace||(e.brace=[]),e.brace.push(new n(u,"brace"))):"end"===t.brace&&e.brace?e.brace[e.brace.length-1].setBottomStaff(u):"continue"===t.brace&&e.brace&&e.brace[e.brace.length-1].continuing(u),"start"===t.bracket||!e.bracket&&t.bracket?(e.bracket||(e.bracket=[]),e.bracket.push(new n(u,"bracket"))):"end"===t.bracket&&e.bracket?e.bracket[e.bracket.length-1].setBottomStaff(u):"continue"===t.bracket&&e.bracket&&e.bracket[e.bracket.length-1].continuing(u))}},k.prototype.createABCVoice=function(t,n,r,i,a,o){this.popCrossLineElems(r,i),this.stemdir=this.isBagpipes?"down":null,this.abcline=t,this.partstartelem&&(this.partstartelem=new c("",null,null),o.addOther(this.partstartelem));var l=o.voicetotal<2?-1:o.voicenumber;for(var u in this.slurs)this.slurs.hasOwnProperty(u)&&(this.slurs[u]=new p({force:this.slurs[u].force,voiceNumber:l,stemDir:this.slurs[u].stemDir,style:this.slurs[u].dotted}),w&&this.slurs[u].setHint(),o.addOther(this.slurs[u]));for(var h=0;h<this.ties.length;h++)this.ties[h]=new p({force:this.ties[h].force,stemDir:this.ties[h].stemDir,voiceNumber:l,style:this.ties[h].dotted}),w&&this.ties[h].setHint(),o.addOther(this.ties[h]);for(var d=0;d<this.abcline.length;d++)C(this.abcline[d]),this.minY=Math.min(this.abcline[d].minpitch,this.minY);for(var m=0===r,g=0;g<this.abcline.length;){var v=S(this.abcline,g),b=this.createABCElement(m,a,o,v.elem);if(b)for(h=0;h<b.length;h++){if(!this.tempoSet&&n&&!n.suppress){this.tempoSet=!0;var y=new e(n,0,0,"tempo",this.tuneNumber,{});y.addFixedX(new f(n,this.tuneNumber,s)),o.addChild(y)}o.addChild(b[h])}g+=v.count}this.pushCrossLineElems(r,i)},k.prototype.saveState=function(){this.tiesSave=y.cloneArray(this.ties),this.slursSave=y.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=y.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=y.cloneHashOfArrayOfHash(this.tiesbyvoice)},k.prototype.restoreState=function(){this.ties=y.cloneArray(this.tiesSave),this.slurs=y.cloneHashOfHash(this.slursSave),this.slursbyvoice=y.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=y.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},k.prototype.createABCElement=function(t,n,o,c){var l=[];switch(c.el_type){case void 0:l=this.createBeam(n,o,c);break;case"note":l[0]=this.createNote(c,!1,n,o),this.triplet&&this.triplet.isClosed()&&(o.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":l[0]=this.createBarLine(o,c,t),o.duplicate&&l.length>0&&(l[0].invisible=!0);break;case"meter":l[0]=a(c,this.tuneNumber),this.startlimitelem=l[0],o.duplicate&&l.length>0&&(l[0].invisible=!0);break;case"clef":if(l[0]=r(c,this.tuneNumber),!l[0])return null;o.duplicate&&l.length>0&&(l[0].invisible=!0);break;case"key":var d=i(c,this.tuneNumber);d&&(l[0]=d,this.startlimitelem=l[0]),o.duplicate&&l.length>0&&(l[0].invisible=!0);break;case"stem":this.stemdir="auto"===c.direction?void 0:c.direction;break;case"part":var p=new e(c,0,0,"part",this.tuneNumber),m=this.getTextSize.calc(c.title,"partsfont","part");p.addFixedX(new u(c.title,0,0,void 0,{type:"part",height:m.height/h.STEP})),l[0]=p;break;case"tempo":var g=new e(c,0,0,"tempo",this.tuneNumber);g.addFixedX(new f(c,this.tuneNumber,s)),l[0]=g;break;case"style":"normal"===c.head?delete this.style:this.style=c.head;break;case"hint":w=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=c.size;break;case"color":this.voiceColor=c.color,o.color=this.voiceColor;break;default:var v=new e(c,0,0,"unsupported",this.tuneNumber);v.addFixed(new u("element type "+c.el_type,0,0,void 0,{type:"debug"})),l[0]=v}return l},k.prototype.createBeam=function(e,n,r){var i=[],s=new t(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);w&&s.setHint();for(var a=0;a<r.length;a++)s.runningDirection(r[a]);s.setStemDirection();var o=this.stemdir;for(this.stemdir=s.stemsUp?"up":"down",a=0;a<r.length;a++){var c=r[a],l=this.createNote(c,!0,e,n);i.push(l),s.add(l),this.triplet&&this.triplet.isClosed()&&(n.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return s.calcDir(),n.addBeam(s),this.stemdir=o,i};var M=function(e){var t;do{t=!0;for(var n=0;n<e.pitches.length-1;n++)if(e.pitches[n].pitch>e.pitches[n+1].pitch){t=!1;var r=e.pitches[n];e.pitches[n]=e.pitches[n+1],e.pitches[n+1]=r}}while(!t)},E=function(e,t,n,r,i,s,a,o,c){for(var l=n;l>11;l--)l%2!=0||r||e.addFixed(new u(null,o,(i+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||r||e.addFixed(new u(null,o,(i+4)*c,l,{type:"ledger"}));for(l=0;l<s.length;l++){var h=i;"down"===a&&(h=-h),e.addFixed(new u(null,h+o,(i+4)*c,s[l],{type:"ledger"}))}};function T(e,t){for(var n=0;n<e.length;n++)if(JSON.stringify(e[n])===JSON.stringify(t))return;e.push(t)}return k.prototype.addGraceNotes=function(e,n,r,i,a,o,c){var h=.6;a=Math.round(.7*a);var d,f,m=null;e.gracenotes.length>1&&(m=new t(a,"grace",o),w&&m.setHint(),m.mainNote=r);var g=[];for(f=e.gracenotes.length-1;f>=0;f--)c+=10,g[f]=c,e.gracenotes[f].accidental&&(c+=7);for(f=0;f<e.gracenotes.length;f++){var v=e.gracenotes[f].verticalPos;d=m?null:x.uflags[o?5:3];var b=s(r,"noteheads.quarter",e.gracenotes[f],{dir:"up",headx:-g[f],extrax:-g[f],flag:d,scale:h*this.voiceScale,accidentalSlot:[]});b.notehead.highestVert=b.notehead.pitch+a;var y=b.notehead;if(this.addSlursAndTies(r,e.gracenotes[f],y,n,"up",!0),r.addExtra(y),e.gracenotes[f].acciaccatura){var _=e.gracenotes[f].verticalPos+4.2,k=m?5:6;r.addRight(new u("flags.ugrace",-g[f]+k,0,_,{scalex:h,scaley:h}))}if(m){var S=e.gracenotes[f].duration/2;o&&(S/=2);var C={heads:[y],abcelem:{averagepitch:v,minpitch:v,maxpitch:v,duration:S}};m.add(C)}else{var M=v+1/3*h,T=v+4.2,P=y.dx+y.w;r.addExtra(new u(null,P,0,M,{type:"stem",pitch2:T,linewidth:-.6}))}E(r,v,v,!1,l.getSymbolWidth("noteheads.quarter"),[],!0,y.dx-1,.6);var A=e.rest&&("spacer"===e.rest.type||"invisible"===e.rest.type);0!==f||o||!this.graceSlurs||A||n.addOther(new p({anchor1:y,anchor2:i,isGrace:!0}))}return m&&(m.calcDir(),n.addBeam(m)),c},k.prototype.addNoteToAbcElement=function(e,t,n,r,i,a,o,c,h){var d,f,p,m,g,v=0,y=0,w=0,k=[],S=[],C=0,M=t.averagepitch>=6?"down":"up";for(r&&(M=r),(i=t.style?t.style:i)&&"normal"!==i||(i="note"),(m=a?x[i].nostem:x[i][-o])||console.log("noteSymbol:",i,o,a),g="down"===M?t.pitches.length-2:1;"down"===M?g>=0:g<t.pitches.length;g="down"===M?g-1:g+1){var E=t.pitches["down"===M?g+1:g-1],P=t.pitches[g],A="down"===M?E.pitch-P.pitch:P.pitch-E.pitch;A<=1&&!E.printer_shift&&(P.printer_shift=A?"different":"same",(P.verticalPos>11||P.verticalPos<1)&&k.push(P.verticalPos-P.verticalPos%2),"down"===M?y=l.getSymbolWidth(m)+2:v=l.getSymbolWidth(m)+2)}var N=t.pitches.length;for(g=0;g<t.pitches.length;g++){var I,O;if(!c)I="down"===M&&0!==g||"up"===M&&g!==N-1?null:x["down"===M?"dflags":"uflags"][-o];if(t.pitches[g].style)O=x[t.pitches[g].style][-o];else if(h.isPercussion&&this.percmap){O=m;var D=this.percmap[b(t.pitches[g])];D&&D.noteHead&&x[D.noteHead]&&(O=x[D.noteHead][-o])}else O=m;if(t.pitches[g].highestVert=t.pitches[g].verticalPos,("up"===r||"up"===M)&&0===g||("down"===r||"down"===M)&&g===N-1){if((t.startSlur||1===N)&&(t.pitches[g].highestVert=t.pitches[N-1].verticalPos,_(t)<1&&("up"===r||"up"===M)&&(t.pitches[g].highestVert+=6)),t.startSlur)for(t.pitches[g].startSlur||(t.pitches[g].startSlur=[]),p=0;p<t.startSlur.length;p++)T(t.pitches[g].startSlur,t.startSlur[p]);if(t.endSlur)for(t.pitches[g].highestVert=t.pitches[N-1].verticalPos,_(t)<1&&("up"===r||"up"===M)&&(t.pitches[g].highestVert+=6),t.pitches[g].endSlur||(t.pitches[g].endSlur=[]),p=0;p<t.endSlur.length;p++)T(t.pitches[g].endSlur,t.endSlur[p])}var L=!c&&o<=-1,B=s(e,O,t.pitches[g],{dir:M,extrax:-y,flag:I,dot:n,dotshiftx:v,scale:this.voiceScale,accidentalSlot:S,shouldExtendStem:!r,printAccidentals:!h.isPercussion});C=Math.max(l.getSymbolWidth(O),C),e.extraw-=B.extraLeft,(d=B.notehead)&&(this.addSlursAndTies(e,t.pitches[g],d,h,L?M:null,!1),t.gracenotes&&t.gracenotes.length>0&&(d.bottom=d.bottom-1),e.addHead(d)),y+=B.accidentalshiftx,w=Math.max(w,B.dotshiftx)}if(L){var V=Math.round(70*this.voiceScale)/10,R="down"===M?t.minpitch-V:t.minpitch+1/3;R>6&&!r&&(R=6);var F="down"===M?t.maxpitch-1/3:t.maxpitch+V;F<6&&!r&&(F=6);var z="down"===M||0===e.heads.length?0:e.heads[0].w,j="down"===M?1:-1;d&&"noteheads.slash.quarter"===d.c&&("down"===M?F-=1:R+=1),d&&"noteheads.triangle.quarter"===d.c&&("down"===M?F-=.7:R-=1.2),e.addRight(new u(null,z,0,R,{type:"stem",pitch2:F,linewidth:j,bottom:R-1})),f=Math.min(R,F)}return{noteHead:d,roomTaken:y,roomTakenRight:w,min:f,additionalLedgers:k,dir:M,symbolWidth:C}},k.prototype.addLyric=function(e,t){var n="";t.lyric.forEach((function(e){var t=" "===e.divider?"":e.divider;n+=e.syllable+t+"\n"}));var r=this.getTextSize.calc(n,"vocalfont","lyric"),i=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new u(n,0,r.width,void 0,{type:"lyric",position:i,height:r.height/h.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},k.prototype.createNote=function(t,n,r,i){var a,o=null,c=0,h=0,d=0,f=[],p=_(t),g=!1;0===p&&(g=!0,p=.25,n=!0);for(var b=Math.floor(Math.log(p)/Math.log(2)),y=0,k=Math.pow(2,b),S=k/2;k<p;y++,k+=S,S/=2);t.startTriplet&&(this.tripletmultiplier=t.tripletMultiplier);var C=p*this.tripletmultiplier;t.rest&&"multimeasure"===t.rest.type&&(C=1),t.rest&&"invisible-multimeasure"===t.rest.type&&(C=this.measureLength*t.rest.text);var M=t.rest?"rest":"note",T=new e(t,C,1,M,this.tuneNumber,{durationClassOveride:t.duration*this.tripletmultiplier});if(w&&T.setHint(),t.rest){this.measureLength===p&&"invisible"!==t.rest.type&&"spacer"!==t.rest.type&&t.rest.type.indexOf("multimeasure")<0&&(t.rest.type="whole");var P=function(e,t,n,r,i,a,o,c,h){var d,f,p,m,g=7;switch(i&&("down"===a&&(g=3),"up"===a&&(g=11)),o&&(g=n<.5||n<1?7:5),t.rest.type){case"whole":d=x.rest[0],t.averagepitch=g,t.minpitch=g,t.maxpitch=g,r=0;break;case"rest":d="rhythm"===t.style?x.rhythm[-c]:x.rest[-c],t.averagepitch=g,t.minpitch=g,t.maxpitch=g;break;case"invisible":case"invisible-multimeasure":case"spacer":d="",t.averagepitch=g,t.minpitch=g,t.maxpitch=g;break;case"multimeasure":d=x.rest.multi,t.averagepitch=g,t.minpitch=g,t.maxpitch=g,r=0;var v=l.getSymbolWidth(d);e.addHead(new u(d,v,2*v,7));var b=new u(""+t.rest.text,v,v,16,{type:"multimeasure-text"});e.addExtra(b)}if(t.rest.type.indexOf("multimeasure")<0&&"invisible"!==t.rest.type){var y=s(e,d,{verticalPos:g},{dot:r,scale:h});(f=y.notehead)&&(e.addHead(f),p=y.accidentalshiftx,m=y.dotshiftx)}return{noteHead:f,roomTaken:p,roomTakenRight:m}}(T,t,p,y,i.voicetotal>1,this.stemdir,r,b,this.voiceScale);o=P.noteHead,c=P.roomTaken,h=P.roomTakenRight}else{var A=this.addNoteToAbcElement(T,t,y,this.stemdir,this.style,g,b,n,i);void 0!==A.min&&(this.minY=Math.min(A.min,this.minY)),o=A.noteHead,c=A.roomTaken,h=A.roomTakenRight,f=A.additionalLedgers,a=A.dir,d=A.symbolWidth}if(void 0!==t.lyric&&this.addLyric(T,t),void 0!==t.gracenotes&&(c+=this.addGraceNotes(t,i,T,o,this.stemHeight*this.voiceScale,this.isBagpipes,c)),t.decoration){var N=n&&"up"!==a?Math.min(-3,T.bottom-6):T.bottom;this.decoration.createDecoration(i,t.decoration,T.top,o?o.w:0,T,c,a,N,t.positioning,this.hasVocals,this.accentAbove)}if(t.barNumber&&T.addFixed(new u(t.barNumber,-10,0,0,{type:"barNumber"})),E(T,t.minpitch,t.maxpitch,t.rest,d,f,a,-2,1),void 0!==t.chord){var I=v(this.getTextSize,T,t,c,h,d,this.jazzchords,this.germanAlphabet);c=I.roomTaken,h=I.roomTakenRight}return t.startTriplet&&(this.triplet=new m(t.startTriplet,o,{flatBeams:this.flatBeams})),t.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(o),!this.triplet||t.startTriplet||t.endTriplet||t.rest&&"spacer"===t.rest.type||this.triplet.middleNote(o),T},k.prototype.addSlursAndTies=function(e,t,n,r,i,s){if(t.endTie&&this.ties.length>0){for(var a=!1,o=0;o<this.ties.length;o++)if(this.ties[o].anchor1&&this.ties[o].anchor1.pitch===n.pitch){this.ties[o].setEndAnchor(n),r.setRange(this.ties[o]),this.ties.splice(o,1),a=!0;break}a||(this.ties[0].setEndAnchor(n),r.setRange(this.ties[0]),this.ties.splice(0,1))}var c,l,u=r.voicetotal<2?-1:r.voicenumber;if(t.startTie){var h=new p({anchor1:n,force:"down"===this.stemdir||"up"===this.stemdir,stemDir:this.stemdir,isGrace:s,voiceNumber:u,style:t.startTie.style});w&&h.setHint(),this.ties[this.ties.length]=h,r.addOther(h),e.startTie=!0}if(t.endSlur)for(var d=0;d<t.endSlur.length;d++)l=t.endSlur[d],this.slurs[l]?((c=this.slurs[l]).setEndAnchor(n),r.setRange(c),delete this.slurs[l]):(c=new p({anchor2:n,stemDir:this.stemdir,voiceNumber:u}),w&&c.setHint(),r.addOther(c)),this.startlimitelem&&c.setStartX(this.startlimitelem);else if(!s)for(var f in this.slurs)this.slurs.hasOwnProperty(f)&&this.slurs[f].addInternalNote(n);if(t.startSlur)for(d=0;d<t.startSlur.length;d++)l=t.startSlur[d].label,c=new p({anchor1:n,stemDir:this.stemdir,voiceNumber:u,style:t.startSlur[d].style}),w&&c.setHint(),this.slurs[l]=c,r.addOther(c)},k.prototype.addMeasureNumber=function(e,t){var n=this.getTextSize.calc(e,"measurefont","bar-number"),r=0;t.isClef&&(r+=n.width/2);var i=n.width>10&&"treble"===t.abcelem.type?13.5:11;t.addFixed(new u(e,r,n.width,i+n.height/h.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},k.prototype.createBarLine=function(t,n,r){var i=new e(n,0,10,"bar",this.tuneNumber),s=null,a=0;n.barNumber&&this.addMeasureNumber(n.barNumber,i);var o="bar_right_repeat"===n.type||"bar_dbl_repeat"===n.type,l="bar_left_repeat"!==n.type&&"bar_thick_thin"!==n.type&&"bar_invisible"!==n.type,h="bar_right_repeat"===n.type||"bar_dbl_repeat"===n.type||"bar_left_repeat"===n.type||"bar_thin_thick"===n.type||"bar_thick_thin"===n.type,d="bar_left_repeat"===n.type||"bar_thick_thin"===n.type||"bar_thin_thin"===n.type||"bar_dbl_repeat"===n.type,f="bar_left_repeat"===n.type||"bar_dbl_repeat"===n.type;if(o||f){for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].setEndX(i);this.startlimitelem=i}if(o&&(i.addRight(new u("dots.dot",a,1,7)),i.addRight(new u("dots.dot",a,1,5)),a+=6),l&&(s=new u(null,a,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(s)),"bar_invisible"===n.type&&(s=new u(null,a,1,2,{type:"none",pitch2:10,linewidth:.6}),i.addRight(s)),n.decoration&&this.decoration.createDecoration(t,n.decoration,12,h?3:1,i,0,"down",2,n.positioning,this.hasVocals,this.accentAbove),h&&(s=new u(null,a+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),i.addRight(s),a+=5),this.partstartelem&&n.endEnding&&(this.partstartelem.anchor2=s,this.partstartelem=null),d&&(s=new u(null,a+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(s)),f&&(a+=3,i.addRight(new u("dots.dot",a,1,7)),i.addRight(new u("dots.dot",a,1,5))),n.startEnding&&r){var m=this.getTextSize.calc(n.startEnding,"repeatfont","").width;i.minspacing+=m+10,this.partstartelem=new c(n.startEnding,s,null),t.addOther(this.partstartelem)}return i.extraw-=5,void 0!==n.chord&&v(this.getTextSize,i,n,0,0,0,!1,this.germanAlphabet),i},ff=k}function Xg(){if(bf)return vf;bf=1;var e=Sg(),t=function(){if(gf)return mf;gf=1;var e="http://www.w3.org/2000/svg";function t(e){this.svg=s(),this.currentGroup=[],e.appendChild(this.svg)}function n(e,t,n){var r=n-e;return"M "+e+" "+t+" l "+r+" 0 l 0 1 l "+-r+" 0 z "}function r(e,t,n){var r=n-t;return"M "+e+" "+t+" l 0 "+r+" l 1 0 l 0 "+-r+" z "}t.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=s(),this.currentGroup=[],e&&(e.innerHTML="",e.appendChild(this.svg))}},t.prototype.setTitle=function(e){var t=document.createElement("title"),n=document.createTextNode(e);t.appendChild(n),this.svg.insertBefore(t,this.svg.firstChild)},t.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var n=this.svg.parentNode.getAttribute("class");n?n.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",n+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var r=t/e*100;this.svg.parentNode.style["padding-bottom"]=r+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},t.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},t.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)},t.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},t.prototype.insertStyles=function(t){var n=document.createElementNS(e,"style");n.textContent=t,this.svg.insertBefore(n,this.svg.firstChild)},t.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},t.prototype.rect=function(e){var t=[],i=e.x,s=e.y,a=e.x+e.width,o=e.y+e.height;return t.push(n(i,s,a)),t.push(n(i,o,a)),t.push(r(a,s,o)),t.push(r(i,o,s)),this.path({path:t.join(" "),stroke:"none","data-name":e["data-name"]})},t.prototype.dottedLine=function(t){var n=document.createElementNS(e,"line");n.setAttribute("x1",t.x1),n.setAttribute("x2",t.x2),n.setAttribute("y1",t.y1),n.setAttribute("y2",t.y2),n.setAttribute("stroke",t.stroke),n.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(n,this.svg.firstChild)},t.prototype.rectBeneath=function(t){var n=document.createElementNS(e,"rect");n.setAttribute("x",t.x),n.setAttribute("width",t.width),n.setAttribute("y",t.y),n.setAttribute("height",t.height),t.stroke&&n.setAttribute("stroke",t.stroke),t["stroke-opacity"]&&n.setAttribute("stroke-opacity",t["stroke-opacity"]),t.fill&&n.setAttribute("fill",t.fill),t["fill-opacity"]&&n.setAttribute("fill-opacity",t["fill-opacity"]),this.svg.insertBefore(n,this.svg.firstChild)},t.prototype.text=function(t,n,r){var i=document.createElementNS(e,"text");for(var s in i.setAttribute("stroke","none"),n)n.hasOwnProperty(s)&&i.setAttribute(s,n[s]);for(var a=(""+t).split("\n"),o=0;o<a.length;o++){var c=document.createElementNS(e,"tspan");if(c.setAttribute("x",n.x?n.x:0),0!==o&&c.setAttribute("dy","1.2em"),-1!==a[o].indexOf("")){var l=a[o].split("");if(c.textContent=l[0],l[1]){var u=document.createElementNS(e,"tspan");u.setAttribute("dy","-0.3em"),u.setAttribute("style","font-size:0.7em"),u.textContent=l[1],c.appendChild(u)}if(l[2]){var h=l[1]?"0.4em":"0.1em",d=document.createElementNS(e,"tspan");d.setAttribute("dy",h),d.setAttribute("style","font-size:0.7em"),d.textContent=l[2],c.appendChild(d)}}else c.textContent=a[o];i.appendChild(c)}return r?r.appendChild(i):this.append(i),i},t.prototype.richTextLine=function(t,n,r,i,s,a){var o=document.createElementNS(e,"text");o.setAttribute("stroke","none"),o.setAttribute("class",i),o.setAttribute("x",n),o.setAttribute("y",r),o.setAttribute("text-anchor",s),o.setAttribute("dominant-baseline","middle");for(var c=0;c<t.length;c++){for(var l=t[c],u=document.createElementNS(e,"tspan"),h=Object.keys(l.attrs),d=0;d<h.length;d++){var f=l.attrs[h[d]];""!==f&&u.setAttribute(h[d],f)}u.textContent=l.content,o.appendChild(u)}return a?a.appendChild(o):this.append(o),o},t.prototype.guessWidth=function(e,t){var n,r=this.createDummySvg(),i=this.text(e,t,r);try{n=i.getBBox(),n=isNaN(n.height)||!n.height?{width:t["font-size"]/2,height:t["font-size"]+2}:{width:n.width,height:n.height}}catch(s){n={width:t["font-size"]/2,height:t["font-size"]+2}}return r.removeChild(i),n},t.prototype.createDummySvg=function(){return this.dummySvg||(this.dummySvg=s(),this.dummySvg.setAttribute("style",["display: block !important;","height: 1px;","width: 1px;","position: absolute;"].join("")),document.querySelector("body").appendChild(this.dummySvg)),this.dummySvg};var i={};function s(){var t=document.createElementNS(e,"svg");return t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),t.setAttribute("role","img"),t.setAttribute("fill","currentColor"),t.setAttribute("stroke","currentColor"),t}return t.prototype.getTextSize=function(e,t,n){if("number"==typeof e&&(e=""+e),!e||e.match(/^\s+$/))return{width:0,height:0};var r;if(e.length<20&&(r=e+JSON.stringify(t),i[r]))return i[r];var s,a=!n;n||(n=this.text(e,t));try{s=n.getBBox(),s=isNaN(s.height)||!s.height?this.guessWidth(e,t):{width:s.width,height:s.height}}catch(o){s=this.guessWidth(e,t)}return a&&(this.currentGroup.length>0?this.currentGroup[0].removeChild(n):this.svg.removeChild(n)),r&&(i[r]=s),s},t.prototype.openGroup=function(t){t=t||{};var n=document.createElementNS(e,"g");return t.klass&&n.setAttribute("class",t.klass),t.fill&&n.setAttribute("fill",t.fill),t.stroke&&n.setAttribute("stroke",t.stroke),t["data-name"]&&n.setAttribute("data-name",t["data-name"]),t.prepend?this.prepend(n):this.append(n),this.currentGroup.unshift(n),n},t.prototype.closeGroup=function(){var e=this.currentGroup.shift();return e&&0===e.children.length?(e.parentElement.removeChild(e),null):e},t.prototype.path=function(t){var n=document.createElementNS(e,"path");for(var r in t)t.hasOwnProperty(r)&&("path"===r?n.setAttributeNS(null,"d",t.path):"klass"===r?n.setAttributeNS(null,"class",t[r]):void 0!==t[r]&&n.setAttributeNS(null,r,t[r]));return this.append(n),n},t.prototype.pathToBack=function(t){var n=document.createElementNS(e,"path");for(var r in t)t.hasOwnProperty(r)&&("path"===r?n.setAttributeNS(null,"d",t.path):"klass"===r?n.setAttributeNS(null,"class",t[r]):n.setAttributeNS(null,r,t[r]));return this.prepend(n),n},t.prototype.lineToBack=function(t){for(var n=document.createElementNS(e,"line"),r=Object.keys(t),i=0;i<r.length;i++)n.setAttribute(r[i],t[r[i]]);return this.prepend(n),n},t.prototype.append=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.appendChild(e)},t.prototype.prepend=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},t.prototype.setAttributeOnElement=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttributeNS(null,n,t[n])},t.prototype.moveElementToChild=function(e,t){e.appendChild(t)},mf=t}(),n=function(n){this.paper=new t(n),this.controller=null,this.space=3*e.SPACE,this.padding={},this.reset(),this.firefox112=navigator.userAgent.indexOf("Firefox/112.0")>=0};return n.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},n.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},n.prototype.setLineThickness=function(e){this.lineThickness=e},n.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},n.prototype.setPadding=function(e){function t(t,n,r,i,s){void 0!==e.formatting[r]?t.padding[n]=e.formatting[r]:void 0!==t.paddingOverride[n]?t.padding[n]=t.paddingOverride[n]:t.isPrint?t.padding[n]=i:t.padding[n]=s}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},n.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},n.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},n.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.stafftopmargin&&(this.spacing.staffTopMargin=4*e.stafftopmargin/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},n.prototype.calcY=function(t){return this.y-t*e.STEP},n.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},n.prototype.absolutemoveY=function(e){this.y=e},vf=n}function Zg(){if(Mf)return Cf;return Mf=1,Cf=function(e,t,n){if(t.text){t.marginLeft||(t.marginLeft=0),t.klass||(t.klass=""),t.anchor||(t.anchor="start"),t.info||(t.info={startChar:-2,endChar:-2}),t.marginTop&&e.push({move:t.marginTop});var r={left:t.marginLeft,text:t.text,font:t.font,anchor:t.anchor,startChar:t.info.startChar,endChar:t.info.endChar,"dominant-baseline":t["dominant-baseline"]};t.absElemType&&(r.absElemType=t.absElemType),!t.inGroup&&t.klass&&(r.klass=t.klass),t.name&&(r.name=t.name),e.push(r);var i=n.calc("A",t.font,t.klass),s=t.text.split("\n").length;if("\n"===t.text[t.text.length-1]&&s--,!t.noMove){var a=1.1*i.height*s;e.push({move:Math.round(a)}),t.marginBottom&&e.push({move:t.marginBottom})}}}}function Jg(){if(Tf)return Ef;Tf=1;const e=Zg();return Ef=function(t,n,r,i,s,a,o,c){var l=c.calc("i",r,i);if(""===n)t.push({move:l.height});else{if("string"==typeof n)return void e(t,{marginLeft:a,text:n,font:r,klass:i,marginTop:o.marginTop,anchor:o.anchor,absElemType:o.absElemType,info:o.info,name:s},c);o.marginTop&&t.push({move:o.marginTop});var u=0,h={left:a,anchor:o.anchor,phrases:[]};i&&(h.klass=i),t.push(h);for(var d=0;d<n.length;d++){var f=n[d],p=f.font?f.font:c.attr(r,i).font,m={content:f.text};p&&(m.attrs={"font-family":c.getFamily(p.face),"font-size":p.size,"font-weight":p.weight,"font-style":p.style,"font-decoration":p.decoration}),h.phrases.push(m);var g=c.calc(f.text,p,i);u=Math.max(u,g.height)," "===f.text[f.text.length-1]&&l.width}t.push({move:u})}}}function ev(){if(Df)return Of;function e(e,t,n,r){if(0===e.indexOf(t)){var i=e.replace(t,""),s=parseInt(i,10);""+s===i&&(n[r]=s)}}return Df=1,Of=function(t,n){var r=[];if(t.absEl.elemset){for(var i={},s=0;s<t.absEl.elemset.length;s++){var a=t.absEl.elemset[s];if(a)for(var o=a.getAttribute("class").split(" "),c=0;c<o.length;c++)i[o[c]]=!0}for(var l=0;l<Object.keys(i).length;l++)r.push(Object.keys(i)[l])}for(var u={},h=0;h<r.length;h++)e(r[h],"abcjs-v",u,"voice"),e(r[h],"abcjs-l",u,"line"),e(r[h],"abcjs-m",u,"measure");t.staffPos&&(u.staffPos=t.staffPos);for(var d=n.target;d&&d.dataset&&!d.dataset.name&&"svg"!==d.tagName.toLowerCase();)d=d.parentNode;for(var f=n.target;f&&f.dataset&&!f.dataset.index&&"svg"!==f.tagName.toLowerCase();)f=f.parentNode;return f&&f.dataset&&(u.name=f.dataset.name,u.clickedName=d.dataset.name,u.parentClasses=f.classList),d&&d.classList&&(u.clickedClasses=d.classList),u.selectableElement=t.svgEl,{classes:r,analysis:u}}}function tv(){if(Bf)return Lf;Bf=1;var e=Sg(),t=ev();function n(e){"keyboard"===this.dragMechanism&&0!==this.dragYStep&&this.dragTarget&&h.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,e),this.dragYStep=0}function r(e){switch(e.keyCode){case 38:case 40:e.preventDefault()}}function i(t){var n=!1,r=t.target.dataset.index;switch(t.keyCode){case 13:case 32:n=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragMechanism="keyboard",l.bind(this)(t);break;case 38:n=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*e.STEP+")"));break;case 40:n=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragMechanism="keyboard",this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*e.STEP+")"));break;case 9:0!==this.dragYStep&&l.bind(this)(t)}n&&t.preventDefault()}function s(e,t){var n,r,i,s=function(e,t){if(!t)return-1;for(var n=0;n<e.length;n++)if(t.dataset.index===e[n].svgEl.dataset.index)return n;return-1}(e.selectables,function(e){if(!e)return null;if("svg"===e.tagName)return e;if(!e.getAttribute)return null;for(var t=e.getAttribute("selectable");!t;)t=!e.parentElement||"svg"===(e=e.parentElement).tagName||e.getAttribute("selectable");return e}(t.target));return s>=0?(i=function(e,t,n){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY||Math.abs(t.layerY/n-t.offsetY)<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[s].svgEl.getBBox(),t,e.scale),n=i[0],r=i[1]):(i=function(e){var t,n,r=1,i=1,s=e.target.closest("svg"),a=0;return s&&s.viewBox&&s.viewBox.baseVal&&(0!==s.viewBox.baseVal.width&&(r=s.viewBox.baseVal.width/s.clientWidth),0!==s.viewBox.baseVal.height&&(i=s.viewBox.baseVal.height/s.clientHeight),a=s.viewBox.baseVal.y),e.target&&"svg"===e.target.tagName?(t=e.offsetX,n=e.offsetY):(t=e.layerX,n=e.layerY),[t*=r,(n*=i)+a]}(t),s=function(e,t,n){for(var r=9999999,i=-1,s=0;s<e.selectables.length&&r>0;s++){var a=e.selectables[s];if(e.getDim(a),a.dim.left<t&&a.dim.right>t&&a.dim.top<n&&a.dim.bottom>n)i=s,r=0;else if(a.dim.top<n&&a.dim.bottom>n){var o=Math.min(Math.abs(a.dim.left-t),Math.abs(a.dim.right-t));o<r&&(r=o,i=s)}else if(a.dim.left<t&&a.dim.right>t){var c=Math.min(Math.abs(a.dim.top-n),Math.abs(a.dim.bottom-n));c<r&&(r=c,i=s)}else{var l=Math.abs(t-a.dim.left)>Math.abs(t-a.dim.right)?Math.abs(t-a.dim.right):Math.abs(t-a.dim.left),u=Math.abs(n-a.dim.top)>Math.abs(n-a.dim.bottom)?Math.abs(n-a.dim.bottom):Math.abs(n-a.dim.top),h=Math.sqrt(l*l+u*u);h<r&&(r=h,i=s)}}return i>=0&&r<=12?i:-1}(e,n=i[0],r=i[1])),{x:n,y:r,clickedOn:s}}function a(e){if(e&&e.target&&e.touches&&!(e.touches.length<1)){var t=e.target.getBoundingClientRect(),n=e.touches[0].pageX-t.left,r=e.touches[0].pageY-t.top;e.touches[0].offsetX=n,e.touches[0].offsetY=r,e.touches[0].layerX=e.touches[0].pageX,e.touches[0].layerY=e.touches[0].pageY}}function o(e){var t=e;"touchstart"===e.type&&(a(e),e.touches.length>0&&(t=e.touches[0]));var n=s(this,t);n.clickedOn>=0&&("touchstart"===e.type||0===e.button)&&this.selectables[n.clickedOn]&&(this.dragTarget=this.selectables[n.clickedOn],this.dragIndex=n.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:n.x,y:n.y},this.dragging&&this.dragTarget.isDraggable&&(!function(e,t){if(e){var n=p(e.svg);n[t]=!0,m(e.svg,n)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function c(t){var n=t;if("touchmove"===t.type&&(a(t),t.touches.length>0&&(n=t.touches[0])),this.lastTouchMove=t,this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism&&this.dragMouseStart){var r=s(this,n),i=Math.round((r.y-this.dragMouseStart.y)/e.STEP);i!==this.dragYStep&&(this.dragYStep=i,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+i*e.STEP+")"))}}function l(e){var t=e;"touchend"===e.type&&this.lastTouchMove&&(a(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(t=this.lastTouchMove.touches[0])),this.dragTarget&&(d.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),h.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,t),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var n=p(e.svg);delete n[t],m(e.svg,n)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function u(e){e>=0&&e<this.selectables.length&&(this.dragTarget=this.selectables[e],this.dragIndex=e,this.dragMechanism="keyboard",l.bind(this)({target:this.dragTarget.svgEl}))}function h(e,n,r,i,s){for(var a=t(e,s),o=a.classes,c=a.analysis,l=0;l<this.listeners.length;l++)this.listeners[l](e.absEl.abcelem,e.absEl.tuneNumber,o.join(" "),c,{step:n,max:r,index:i,setSelection:u.bind(this)},s)}function d(){for(var e=0;e<this.selected.length;e++)this.selected[e].unhighlight(void 0,this.renderer.foregroundColor);this.selected=[]}function f(e,t){d.bind(this)();for(var n=0;n<this.staffgroups.length;n++)for(var r=this.staffgroups[n].voices,i=0;i<r.length;i++)for(var s=r[i].children,a=0;a<s.length;a++){var o=s[a].abcelem.startChar,c=s[a].abcelem.endChar;(t>o&&e<c||t===e&&t===c)&&(this.selected[this.selected.length]=s[a],s[a].highlight(void 0,this.selectionColor))}}function p(e){var t=e.getAttribute("class");t||(t="");for(var n=t.split(" "),r={},i=0;i<n.length;i++)r[n[i]]=!0;return r}function m(e,t){var n=[];for(var r in t)t.hasOwnProperty(r)&&n.push(r);e.setAttribute("class",n.join(" "))}return Lf=function(e,t){if(e.rangeHighlight=f,e.dragging)for(var s=0;s<e.selectables.length;s++){var a=e.selectables[s];"true"===a.svgEl.getAttribute("selectable")&&(a.svgEl.setAttribute("tabindex",0),a.svgEl.setAttribute("data-index",s),a.svgEl.addEventListener("keydown",r.bind(e)),a.svgEl.addEventListener("keyup",i.bind(e)),a.svgEl.addEventListener("focus",n.bind(e)))}for(var u=0;u<t.length;u++)t[u].addEventListener("touchstart",o.bind(e),{passive:!0}),t[u].addEventListener("touchmove",c.bind(e),{passive:!0}),t[u].addEventListener("touchend",l.bind(e),{passive:!0}),t[u].addEventListener("mousedown",o.bind(e)),t[u].addEventListener("mousemove",c.bind(e)),t[u].addEventListener("mouseup",l.bind(e))}}function nv(){if(Rf)return Vf;return Rf=1,Vf=function(e,t,n,r,i){return t+(r-t)/(n-e)*(i-e)}}function rv(){if(zf)return Ff;zf=1;var e=Bg(),t=Sg(),n=nv(),r=function(e){return void 0===e?0:Math.floor(Math.log(e)/Math.log(2))};function i(e,t,n,r){if(!e.children)return r;for(var i=0;i<e.children.length;i++){var s=e.children[i];t&&void 0!==s.top&&"flags.ugrace"===s.c?r=Math.max(r,s.top-n):t||void 0===s.bottom||"flags.ugrace"!==s.c||(r=Math.max(r,n-s.bottom+7))}return r}function s(e,t,n){var r=t.heads[e?0:t.heads.length-1],i=n.heads[e?0:n.heads.length-1],s=r.x;e&&(s+=r.w-.6);var a=i.x;return[s,a+=e?i.w:.6]}return Ff=function(a){if(0!==a.elems.length&&!a.allrests){var o=function(e,n){var r=e?t.STEP:-t.STEP;n&&(r*=.4);return r}(a.stemsUp,a.isgrace),c=a.elems[0],l=a.elems[a.elems.length-1],u=0,h=a.stemsUp?c.abcelem.maxpitch:c.abcelem.minpitch;u=i(c,a.stemsUp,h,u),u=i(l,a.stemsUp,h,u),u=Math.max(a.stemHeight,u+3);var d=function(e,t,n,r,i,s,a,o,c,l){var u=n-2,h=n-2,d=Math.round(r?Math.max(e+u,c+h):Math.min(e-u,o-h)),f=function(e,t,n,r){if(r)return 0;var i=e-t,s=n/2;i>s&&(i=s);i<-s&&(i=-s);return i}(i,s,t,a),p=d+Math.floor(f/2),m=d+Math.floor(-f/2);l||(r&&d<6||!r&&d>6)&&(p=6,m=6);return[p,m]}(a.average,a.elems.length,u,a.stemsUp,c.abcelem.averagepitch,l.abcelem.averagepitch,a.isflat,a.min,a.max,a.isgrace),f=s(a.stemsUp,c,l);a.addBeam({startX:f[0],endX:f[1],startY:d[0],endY:d[1],dy:o});for(var p=function(e,t,i,a,o){for(var c=[],l=[],u=0;u<e.length;u++){var h=e[u];if(!h.abcelem.rest){var d=h.heads[t?0:h.heads.length-1],f=d.x+(t?d.w:0),p=n(i.startX,i.startY,i.endX,i.endY,f),m=t?-1.5:1.5;a&&(m=2*m/3);var g=h.abcelem.duration;0===g&&(g=.25);for(var v=r(g);v<-3;v++){var b=-4-v;if(l[b]?l[b].single=!1:l[b]={x:f+(t?-.6:0),y:p+m*(b+1),durlog:v,single:!0},u>0&&h.abcelem.beambr&&h.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=s(t,e[u-1],h);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=h.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var _=l.length-1;_>=0;_--)if(u===e.length-1||r(e[u+1].abcelem.duration)>-_-4){var w=f,x=p+m*(_+1);l[_].single&&(w=0===u?f+5:f-5,x=n(i.startX,i.startY,i.endX,i.endY,w)+m*(_+1));var k={startX:l[_].x,endX:w,startY:l[_].y,endY:x,dy:o};if(void 0!==l[_].split){var S=l[_].split;k.endX<=S[S.length-1]&&(S[S.length-1]-=h.w),S.push(k.endX),k.split=l[_].split}c.push(k),l=l.slice(0,_)}}}return c}(a.elems,a.stemsUp,a.beams[0],a.isgrace,o),m=0;m<p.length;m++)a.addBeam(p[m]);!function(r,i,s,a,o){for(var c=0;c<r.length;c++){var l=r[c];if(!l.abcelem.rest){var u=!l.addExtra,h=u?o:l,d=l.heads[i?0:l.heads.length-1],f=.2,p=d.pitch+(i?f:-f),m=i?d.w:0;u||(m+=d.dx);var g=d.x+m,v=n(s.startX,s.startY,s.endX,s.endY,g),b=i?-.6:.6;i||(v-=a/2/t.STEP),u&&(m+=l.heads[0].dx),"noteheads.slash.quarter"===d.c&&(i?p+=1:p-=1);var y=new e(null,m,0,p,{type:"stem",pitch2:v,linewidth:b});y.setX(h.x),h.addRight(y)}}}(a.elems,a.stemsUp,a.beams[0],o,a.mainNote)}}}function iv(){if(qf)return jf;qf=1;var e=nv();function t(e){return e.stemsUp}return jf=function(n){if(n.anchor1&&n.anchor2){n.hasBeam=!!n.anchor1.parent.beam&&n.anchor1.parent.beam===n.anchor2.parent.beam;var r=n.anchor1.parent.beam;if(!n.hasBeam||r.elems[0]===n.anchor1.parent&&r.elems[r.elems.length-1]===n.anchor2.parent||(n.hasBeam=!1),n.hasBeam){var i=t(r)?n.anchor1.x+n.anchor1.w:n.anchor1.x;n.yTextPos=function(t,n,r){if(0===r.beams.length)return 0;r=r.beams[0];var i=t+(n-t)/2;return e(r.startX,r.startY,r.endX,r.endY,i)}(i,n.anchor2.x,r),n.yTextPos+=t(r)?3:-2,n.xTextPos=(o=i,c=n.anchor2.x,o+(c-o)/2),n.top=n.yTextPos+1,n.bottom=n.yTextPos-2,t(r)&&(n.endingHeightAbove=4)}else{n.startNote=Math.max(n.anchor1.parent.top,9)+4,n.endNote=Math.max(n.anchor2.parent.top,9)+4,"rest"===n.anchor1.parent.type&&"rest"!==n.anchor2.parent.type?n.startNote=n.endNote:"rest"===n.anchor2.parent.type&&"rest"!==n.anchor1.parent.type&&(n.endNote=n.startNote);for(var s=0,a=0;a<n.middleElems.length;a++)s=Math.max(s,n.middleElems[a].top);((s+=4)>n.startNote||s>n.endNote)&&(n.startNote=s,n.endNote=s),n.flatBeams&&(n.startNote=Math.max(n.startNote,n.endNote),n.endNote=Math.max(n.startNote,n.endNote)),n.yTextPos=n.startNote+(n.endNote-n.startNote)/2,n.xTextPos=n.anchor1.x+(n.anchor2.x+n.anchor2.w-n.anchor1.x)/2,n.top=n.yTextPos+1}}var o,c;delete n.middleElems,delete n.flatBeams}}function sv(){if(Yf)return Hf;Yf=1;var e=rv(),t=nv(),n=iv();function r(e){for(var t=0;t<e.elems.length;t++){var n=e.elems[t];if(n.top)for(var r=a(n,e),i=0;i<n.children.length;i++){var s=n.children[i];if("ornament"===s.klass&&"below"!==s.position&&s.bottom-1.5<r){var o=r-s.bottom+1.5;s.bottom+=o,s.top+=o,s.pitch+=o,r=n.top=s.top}}}}function i(e,t){var n=t.getChordDim();if(n){for(var r=0;r<e.length;r++){if(e[r]<n.left)return r>0&&t.putChordInLane(r),void(e[r]=n.right)}e.push(n.right),t.putChordInLane(e.length-1)}}function s(e){for(var t=0,n=0;n<e.children.length;n++){e.children[n].chordHeightBelow&&t++}return t}function a(e,n){return n=n.beams[0],t(n.startX,n.startY,n.endX,n.endY,e.x)}return Hf=function(t){for(var a=0;a<t.beams.length;a++)if("BeamElem"===t.beams[a].type){e(t.beams[a]),r(t.beams[a]);for(var o=0;o<t.beams[a].elems.length;o++)t.adjustRange(t.beams[a].elems[o])}for(t.staff.specialY.chordLines=function(e){var t,n,r,a=[0],o=[0];for(t=0;t<e.length;t++){for(n=0;n<e[t].children.length;n++)(r=e[t].children[n]).chordHeightAbove&&i(a,r);for(n=e[t].children.length-1;n>=0;n--)(r=e[t].children[n]).chordHeightBelow&&i(o,r)}(a.length>1||o.length>1)&&function(e,t){for(var n=0;n<e.length;n++){s(e[n]);for(var r=0;r<e[n].children.length;r++){var i=e[n].children[r];i.chordHeightAbove&&i.invertLane(t)}}}(e,a.length,o.length);return{above:a.length,below:o.length}}(t.children),a=0;a<t.otherchildren.length;a++){var c=t.otherchildren[a];"TripletElem"===c.type&&(n(c),t.adjustRange(c))}t.staff.top=Math.max(t.staff.top,t.top),t.staff.bottom=Math.min(t.staff.bottom,t.bottom)}}function av(){if(Qf)return Kf;Qf=1;var e=function(){if($f)return Wf;$f=1;var e=function(){};return e.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},e.layoutEnded=function(e){return e.i>=e.children.length},e.getNextX=function(e){return Math.max(e.minx,e.nextx)},e.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},e.layoutOneItem=function(e,t,n,r,i){var s=n.children[n.i];if(!s)return 0;var a=e-n.minx,o=n.durationindex+s.duration>0?r:0;if("note"===s.abcelem.el_type&&!s.abcelem.rest&&0!==n.voicenumber&&i){var c=i.children[i.i],l=c&&(s.abcelem.maxpitch<=c.abcelem.maxpitch+1&&s.abcelem.maxpitch>=c.abcelem.minpitch-1||s.abcelem.minpitch<=c.abcelem.maxpitch+1&&s.abcelem.minpitch>=c.abcelem.minpitch-1);if(l&&s.abcelem.minpitch===c.abcelem.minpitch&&s.abcelem.maxpitch===c.abcelem.maxpitch&&c.heads&&c.heads.length>0&&s.heads&&s.heads.length>0&&c.heads[0].c===s.heads[0].c&&(l=!1),l){var u=c.heads&&c.heads.length>0?c.heads[0].realWidth:c.fixed.w;s.adjustedWidth||(s.adjustedWidth=u+s.w),s.w=s.adjustedWidth;for(var h=0;h<s.children.length;h++){var d=s.children[h];d.name.indexOf("accidental")<0&&(d.adjustedWidth||(d.adjustedWidth=d.dx+u),d.dx=d.adjustedWidth)}}}var f=function(e,t){var n=0;return"note"!==e.type&&"bar"!==e.type||(n=t),-e.extraw+n}(s,o);return a<f&&(0===n.i||"bar"!==s.type||"part"!==n.children[n.i-1].type&&"tempo"!==n.children[n.i-1].type)&&(e+=f-a),s.setX(e),n.spacingduration=s.duration,n.minx=e+function(e){return e.w}(s),n.i!==n.children.length-1&&(n.minx+=s.minspacing),this.updateNextX(e,t,n),e},e.shiftRight=function(e,t){var n=t.children[t.i];n&&(n.setX(n.x+e),t.minx+=e,t.nextx+=e)},e.updateNextX=function(e,t,n){n.nextx=e+t*this.getSpacingUnits(n)},e.updateIndices=function(e){this.layoutEnded(e)||(e.durationindex+=e.children[e.i].duration,"bar"===e.children[e.i].type&&(e.durationindex=Math.round(64*e.durationindex)/64),e.i++)},Wf=e}();function t(t){for(var n=0;n<t.length;n++)if(!e.layoutEnded(t[n]))return!1;return!0}function n(e){return e.durationindex-(e.children[e.i]&&e.children[e.i].duration>0?0:5e-7)}function r(e,t){return!!(e&&e.staff&&e.staff.voices&&0!==e.staff.voices.length)&&(!!(t&&t.staff&&t.staff.voices&&0!==t.staff.voices.length)&&e.staff.voices[0]===t.staff.voices[0])}return Kf=function(i,s,a,o,c){var l,u=0,h=1e3,d=c;o.startx=d;var f=0;for(a&&console.log("init layout",i),l=0;l<o.voices.length;l++)e.beginLayout(d,o.voices[l]);for(var p=0;!t(o.voices);){for(f=null,l=0;l<o.voices.length;l++)e.layoutEnded(o.voices[l])||f&&!(n(o.voices[l])<f)||(f=n(o.voices[l]));var m=[],g=[];for(l=0;l<o.voices.length;l++){n(o.voices[l])-f>1e-7?g.push(o.voices[l]):m.push(o.voices[l])}p=0;var v=0;for(l=0;l<m.length;l++)e.getNextX(m[l])>d&&(d=e.getNextX(m[l]),p=e.getSpacingUnits(m[l]),v=m[l].spacingduration);u+=p,h=Math.min(h,p),a&&console.log("currentduration: ",f,u,h);var b=void 0;for(l=0;l<m.length;l++){var y=m[l];0===y.voicenumber&&(b=l);var _=void 0!==b&&m[b].voicenumber!==y.voicenumber?m[b]:void 0;r(y,_)||(_=void 0);var w=e.layoutOneItem(d,i,y,s,_),x=w-d;if(x>0){d=w;for(var k=0;k<l;k++)e.shiftRight(x,m[k])}}for(l=0;l<g.length;l++)g[l].spacingduration-=v,e.updateNextX(d,i,g[l]);for(l=0;l<m.length;l++){var S=m[l];e.updateIndices(S)}}for(l=0;l<o.voices.length;l++)e.getNextX(o.voices[l])>d&&(d=e.getNextX(o.voices[l]),p=e.getSpacingUnits(o.voices[l]));return function(e){for(var t=0,n=0;n<e.length;n++){var r=e[n];if(r.children.length>0){var i=r.children.length-1,s=r.children[i];if("bar"===s.abcelem.el_type){var a=s.children[0].x;a>t?t=a:s.children[0].x=t}}}}(o.voices),u+=p,o.setWidth(d),{spacingUnits:u,minSpace:h}}}function ov(){if(Zf)return Xf;function e(e,t,n){if(t)for(var r=0;r<t.length;r++)if(t[r].header){var i=n.calc(t[r].header,"voicefont","");e=Math.max(e,i.width)}return e}function t(e,t,r){if(e)for(var i=0;i<e.length;i++)n(t,e[i]),r=Math.max(r,e[i].getWidth());return r}function n(e,t){t.x=e}return Zf=1,Xf=function(n,r,i,s,a){var o,c,l=n.padding.left,u=0;for(o=0;o<i.length;o++)i[o].header&&(c=r.calc(i[o].header,"voicefont",""),u=Math.max(u,c.width));u=e(u,s,r),(u=e(u,a,r))&&(u+=r.calc("A","voicefont","").width);var h=0;return h=t(s,l+=u,h),l+(h=t(a,l,h))}}function cv(){if(ep)return Jf;ep=1;var e=ov();return Jf=function(t,n,r){var i=e(t,n.getTextSize,n.voices,n.brace,n.bracket),s=function(e,t){for(var n=0,r=0,i=0;i<e.voices.length;i++){for(var s=0,a=e.voices[i],o=0;o<a.children.length;o++){var c=a.children[o];if(s+=c.duration,c.duration){var l=(c.w+t)/c.duration;n=Math.max(n,l)}}r=Math.max(r,s)}return{totalDuration:r,minSpacing:n}}(n,r.minPadding),a=s.totalDuration,o=s.minSpacing*a;r.minWidth&&(o=Math.max(o,r.minWidth));var c=r.minPadding?r.minPadding/2:2;n.startx=i,n.w=o+i;for(var l=0;l<n.voices.length;l++){var u=n.voices[l];u.startx=i,u.w=o+i;for(var h=i,d=!1,f=0,p=0;p<u.children.length;p++){var m=u.children[p];d||(0!==m.duration?(d=!0,f=(o+i-h)/a,n.gridStart=h):(m.x=h,h+=m.w+m.minspacing)),d&&("center"===r.align?m.x=h+m.duration*f/2-m.w/2:0===m.duration?m.x=h+1-m.w:m.x=h+c-m.extraw,h+=m.duration*f);for(var g=0;g<m.children.length;g++){var v=m.children[g],b=v.dx?v.dx:0;v.x=m.x+b}}n.gridEnd=h}return o}}function lv(){if(np)return tp;np=1;var e=sv(),t=function(){if(Gf)return Uf;Gf=1;var e=Sg(),t=1;function n(e,n,r,i){if(e.specialY[r]){var s=e.specialY[r];i&&(s*=i),e.top+=s+t,n[r]=e.top}}function r(e,t,n){var r,c;for(r=0;r<t.children.length;r++)i(e,c=t.children[r],n);for(r=0;r<t.otherchildren.length;r++)switch((c=t.otherchildren[r]).type){case"CrescendoElem":s(e,c);break;case"DynamicDecoration":a(e,c);break;case"EndingElem":o(e,c);break;case"TieElem":var l=c.getYBounds();t.staff.top=Math.max(t.staff.top,l[0]),t.staff.top=Math.max(t.staff.top,l[1]),t.staff.bottom=Math.min(t.staff.bottom,l[0]),t.staff.bottom=Math.min(t.staff.bottom,l[1])}}function i(e,t,n){for(var r=0;r<t.children.length;r++){var i=t.children[r];for(var s in t.specialY)t.specialY.hasOwnProperty(s)&&i[s]&&(i.pitch=e[s],void 0===i.top&&("TempoElement"===i.type?c(e,i):l(e,i,n),t.pushTop(i.top),t.pushBottom(i.bottom)))}}function s(e,t){t.dynamicHeightAbove?t.pitch=e.dynamicHeightAbove:t.pitch=e.dynamicHeightBelow}function a(e,t){t.volumeHeightAbove?t.pitch=e.volumeHeightAbove:t.pitch=e.volumeHeightBelow}function o(e,t){t.pitch=e.endingHeightAbove-2}function c(e,t){if(t.pitch=e.tempoHeightAbove,t.top=e.tempoHeightAbove,t.bottom=e.tempoHeightAbove,t.note){var n=t.pitch-t.totalHeightInPitches+1;t.note.top=n,t.note.bottom=n;for(var r=0;r<t.note.children.length;r++){var i=t.note.children[r];i.top+=n,i.bottom+=n,i.pitch+=n,void 0!==i.pitch2&&(i.pitch2+=n)}}}function l(t,n,r){switch(n.type){case"part":n.top=t.partHeightAbove+n.height,n.bottom=t.partHeightAbove;break;case"text":case"chord":n.chordHeightAbove?(n.top=t.chordHeightAbove,n.bottom=t.chordHeightAbove):(n.top=t.chordHeightBelow,n.bottom=t.chordHeightBelow);break;case"lyric":n.lyricHeightAbove?(n.top=t.lyricHeightAbove,n.bottom=t.lyricHeightAbove):(n.top=t.lyricHeightBelow+r.vocal/e.STEP,n.bottom=t.lyricHeightBelow+r.vocal/e.STEP,n.pitch-=r.vocal/e.STEP);break;case"debug":n.top=t.chordHeightAbove,n.bottom=t.chordHeightAbove}void 0!==n.pitch&&void 0!==n.top||console.error("RelativeElement position not set.",n.type,n.pitch,n.top,t)}return Uf=function(i,s){for(var a,o=0;o<s.staffs.length;o++){var c=s.staffs[o],l={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(i.showDebug&&i.showDebug.indexOf("box")>=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),n(c,l,"lyricHeightAbove"),n(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+t,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+t,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(n(c,l,"dynamicHeightAbove"),n(c,l,"volumeHeightAbove")),n(c,l,"partHeightAbove"),n(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=i.spacing.vocal/e.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+t),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var u=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(u*=c.specialY.chordLines.below),c.bottom-=u+t}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+t):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+t):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+t),i.showDebug&&i.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var h=0;h<c.voices.length;h++)r(l,s.voices[c.voices[h]],i.spacing);if(void 0!==a){var d=a+(c.top-10),f=i.spacing.systemStaffSeparation/e.STEP-d;f>0&&(c.top+=f)}c.top+=i.spacing.staffTopMargin/e.STEP,a=2-c.bottom}}}(),n=av(),r=ov(),i=cv(),s=function(e,t,i,s,o,c,l){for(var u=r(e,s.getTextSize,s.voices,s.brace,s.bracket),h=i,d=0;d<8;d++){var f=n(h,e.minPadding,l,s,u);if(null===(h=a(c,o.stretchlast,t+e.padding.left,s.w,h,f.spacingUnits,f.minSpace,e.padding.left+e.padding.right)))break}return function(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=1;r<n.children.length-1;r++){var i=n.children[r];if(i.abcelem.rest&&("whole"===i.abcelem.rest.type||"multimeasure"===i.abcelem.rest.type)){var s=n.children[r-1],a=n.children[r+1];i.center(s,a)}}}(s.voices),s.w-u};function a(e,t,n,r,i,s,a,o){if(e)if(void 0===t){if(r/n<.66)return null}else if(!(1-(r+o)/n<t))return null;return Math.abs(n-r)<2?null:s>0?((i=(n-(r-s*i))/s)*a>50&&(i=50/a),i):null}return tp=function(n,r,a,o,c,l){var u,h,d=a;for(u=0;u<r.lines.length;u++){var f;if((h=r.lines[u]).staff)f=void 0!==l?i(n,h.staffGroup,l):s(n,d,o,h.staffGroup,r.formatting,u===r.lines.length-1,!1),Math.round(f)>Math.round(d)&&(d=f,c&&(u=-1))}for(u=0;u<r.lines.length;u++)if((h=r.lines[u]).staffGroup&&h.staffGroup.voices){for(var p=0;p<h.staffGroup.voices.length;p++)e(h.staffGroup.voices[p]);t(n,h.staffGroup)}for(u=0;u<r.lines.length;u++)(h=r.lines[u]).staffGroup&&h.staffGroup.setHeight();return d}}function uv(){if(up)return lp;up=1;return lp=function(){for(var e,t,n,r,i,s=0,a=arguments[s++],o=[];a;){if(t=/^[^\x25]+/.exec(a))o.push(t[0]);else if(t=/^\x25{2}/.exec(a))o.push("%");else{if(!(t=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(a)))throw"Huh ?!";if(null==(e=arguments[t[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(t[7])&&"number"!=typeof e)throw"Expecting number but found "+typeof e;switch(t[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=t[6]?e.toExponential(t[6]):e.toExponential();break;case"f":e=t[6]?parseFloat(e).toFixed(t[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&t[6]?e.substring(0,t[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(t[7])&&t[2]&&e>0?"+"+e:e,r=t[3]?"0"==t[3]?"0":t[3][1]:" ",i=t[5]-String(e).length,n=t[5]?str_repeat(r,i):"",o.push(t[4]?e+n:n+e)}a=a.substring(t[0].length)}return o.join("")},lp}function hv(){if(dp)return hp;return dp=1,hp=function(e){return parseFloat(e.toFixed(2))}}function dv(){if(pp)return fp;pp=1;var e=hv();return fp=function(t,n,r){var i,s=n.y;if(n.phrases)return c=t.paper.richTextLine(n.phrases,n.x,n.y,n.klass,n.anchor);if(n.lane){var a=.25*n.dim.font.size;s+=(n.dim.font.size+a)*n.lane}n.dim?(i=n.dim).attr.class=n.klass:i=t.controller.getFontAndAttr.calc(n.type,n.klass),n.anchor&&(i.attr["text-anchor"]=n.anchor),n["dominant-baseline"]&&(i.attr["dominant-baseline"]=n["dominant-baseline"]),i.attr.x=n.x,i.attr.y=s,n.centerVertically||(i.attr.y+=i.font.size),"debugfont"===n.type&&(console.log("Debug msg: "+n.text),i.attr.stroke="#ff0000"),n.cursor&&(i.attr.cursor=n.cursor);var o=n.text.replace(/\n\n/g,"\n \n");o=o.replace(/^\n/," \n"),i.font.box&&(r||t.paper.openGroup({klass:i.attr.class,fill:t.foregroundColor,"data-name":n.name}),"end"===i.attr["text-anchor"]?i.attr.x-=i.font.padding:"start"===i.attr["text-anchor"]&&(i.attr.x+=i.font.padding),i.attr.y+=i.font.padding,delete i.attr.class),n.noClass&&delete i.attr.class,i.attr.x=e(i.attr.x),i.attr.y=e(i.attr.y),n.name&&(i.attr["data-name"]=n.name);var c=t.paper.text(o,i.attr);if(i.font.box){var l=c.getBBox(),u=0;"middle"===i.attr["text-anchor"]?u=l.width/2+i.font.padding:"end"===i.attr["text-anchor"]&&(u=l.width+2*i.font.padding);var h=0;n.centerVertically&&(h=l.height-i.font.padding),t.paper.rect({"data-name":"box",x:Math.round(n.x-u),y:Math.round(s-h),width:Math.round(l.width+2*i.font.padding),height:Math.round(l.height+2*i.font.padding)}),r||(c=t.paper.closeGroup())}return c}}function fv(){if(gp)return mp;gp=1;var e=uv(),t=Sg(),n=dv();function r(t,n,r,i){return e("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t+r[0],n+i[0],t+r[1],n+i[1],t+r[2],n+i[2],t+r[3],n+i[3],t+r[4],n+i[4],t+r[5],n+i[5],t+r[6],n+i[6])}var i=function(i,s,a,o,c,l,u){var h;if(l){i.paper.openGroup({klass:i.controller.classes.generate("staff-extra voice-name"),"data-name":c});var d=a+(o-a)/2;d-=i.controller.getTextSize.baselineToCenter(l,"voicefont","staff-extra voice-name",0,1),n(i,{x:i.padding.left,y:d,text:l,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return"brace"===c?h=function(e,t,n,i,s){var a=i-n,o=r(t,n,[7.5,-8,21,0,18.5,-10.5,7.5],[0,a/5.5,a/3.14,a/2,a/2.93,a/4.88,0]);return o+=r(t,n,[0,17.5,-7.5,6.6,-5,20,0],[a/2,a/1.46,a/1.22,a,a/1.19,a/1.42,a/2]),e.paper.path({path:o,stroke:e.foregroundColor,fill:e.foregroundColor,class:e.controller.classes.generate(s),"data-name":s})}(i,s,a,o,c):"bracket"===c&&(h=function(n,r,i,s,a){r+=t.STEP;var o=.75*t.STEP,c=.75*t.STEP,l=s-i,u=e("M %f %f l %f %f l %f %f l %f %f z",r,i-c,0,l+2*c,o,0,0,-(l+2*c)),h=2*t.STEP,d=t.STEP;return u+=e("M %f %f q %f %f %f %f q %f %f %f %f z",r+o,i-c,.6*h,.2*d,h,-d,.1*-h,.3*d,-h,d+t.STEP),u+=e("M %f %f q %f %f %f %f q %f %f %f %f z",r+o,i+c+l,.6*h,.2*-d,h,d,.1*-h,.3*-d,-h,-d-t.STEP),n.paper.path({path:u,stroke:n.foregroundColor,fill:n.foregroundColor,class:n.controller.classes.generate(a),"data-name":a})}(i,s,a,o,c)),l&&(h=i.paper.closeGroup()),u.wrapSvgEl({el_type:c,startChar:-1,endChar:-1},h),h};return mp=function(e,n,r){var s=n.startVoice.staff.absoluteY-10*t.STEP;return n.endVoice&&n.endVoice.staff?n.endY=n.endVoice.staff.absoluteY-2*t.STEP:n.lastContinuedVoice&&n.lastContinuedVoice.staff?n.endY=n.lastContinuedVoice.staff.absoluteY-2*t.STEP:n.endY=n.startVoice.staff.absoluteY-2*t.STEP,i(e,n.x,s,n.endY,n.type,n.header,r)}}function pv(){if(bp)return vp;return bp=1,vp=function(e,t,n){return e.paper.path(t)}}function mv(){if(_p)return yp;_p=1;var e=uv(),t=pv(),n=hv();function r(e,t,r){return n(e+r*t)}var i=[[3.5,-4.8]],s=[[1.5,-1],[.3,-.3],[-3.5,3.8]],a=[[-1.5,2]],o=[[3,4],[3,-4]],c=[[-3,4],[-3,-4]];function l(e,t){for(var n="",i=0;i<e.length;i++)n+="l"+e[i][0]+" "+r(e[i][1],t,e[i][0]);return n}var u=function(n,r,u,h,d){var f,p=e("M %f %f",r,u);for(p+=l(i,d),f=0;f<h;f++)p+=l(o,d);for(p+=l(s,d),f=0;f<h;f++)p+=l(c,d);return p+=l(a,d)+"z",t(n,{path:p,highlight:"stroke",stroke:n.foregroundColor,class:n.controller.classes.generate("decoration"),"data-name":"glissando"})};return yp=function(e,t,n){t.anchor1&&t.anchor2&&t.anchor1.heads&&t.anchor2.heads&&0!==t.anchor1.heads.length&&0!==t.anchor2.heads.length||window.console.error("Glissando Element not set.");var i=e.calcY(t.anchor1.heads[0].pitch),s=e.calcY(t.anchor2.heads[0].pitch),a=t.anchor1.x+t.anchor1.w/2,o=t.anchor2.x+t.anchor2.w/2,c=function(e,t,n,r){var i=n-e,s=r-t;return Math.sqrt(i*i+s*s)}(a,i,o,s),l=t.anchor1.w/2+4,h=t.anchor2.w/2+4,d=function(e,t,n,r){return(r-t)/(n-e)}(a,i,o,s),f=r(i,d,l);r(s,d,-h);var p,m,g=(p=c-l-h,m=5,Math.max(2,Math.floor((p-2*m)/6))),v=u(e,a+l,f,g,d);return n.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},v),[v]}}function gv(){if(Sp)return kp;Sp=1;var e=hv();function t(){this.ingroup=!1}t.prototype.beginGroup=function(e,t){this.paper=e,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0,this.paper.openGroup()},t.prototype.isInGroup=function(){return this.ingroup},t.prototype.addPath=function(t){if(0!==(t=t||[]).length){t[0][0]="m",t[0][1]=e(t[0][1]-this.lastM[0]),t[0][2]=e(t[0][2]-this.lastM[1]),this.lastM[0]+=t[0][1],this.lastM[1]+=t[0][2],this.path.push(t[0]);for(var n=1,r=t.length;n<r;n++)"m"===t[n][0]&&(this.lastM[0]+=t[n][1],this.lastM[1]+=t[n][2]),this.path.push(t[n])}},t.prototype.endGroup=function(e,t){this.ingroup=!1;for(var n=0;n<this.path.length;n++)this.path[n].join(" ");this.path=[];var r=this.paper.closeGroup();return r&&(r.setAttribute("class",this.controller.classes.generate(e)),r.setAttribute("fill",this.controller.renderer.foregroundColor),r.setAttribute("stroke","none"),r.setAttribute("data-name",t)),r};var n=new t;return kp=n}function vv(){if(Mp)return Cp;Mp=1;var e=dv(),t=Ug(),n=gv();function r(e,t,n){var r=n;return"f"===e&&"f"===t&&(r=2*r/3),"p"===e&&"p"===t&&(r=5*r/6),"f"===e&&"z"===t&&(r=5*r/8),r}return Cp=function(i,s,a,o,c){var l,u;if(!o)return null;if(o.length>1&&o.indexOf(".")<0){var h=n.isInGroup()?"":c.klass;i.paper.openGroup({"data-name":c.name,klass:h});for(var d=0,f=0;f<o.length;f++){var p=o[f];u=t.getYCorr(p),(l=t.printSymbol(s+d,i.calcY(a+u),p,i.paper,{stroke:c.stroke,fill:c.fill}))?f<o.length-1&&(d+=r(p,o[f+1],t.getSymbolWidth(p))):e(i,{x:s,y:i.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"},!1)}return i.paper.closeGroup()}return u=t.getYCorr(o),(l=n.isInGroup()?t.printSymbol(s,i.calcY(a+u),o,i.paper,{"data-name":c.name}):t.printSymbol(s,i.calcY(a+u),o,i.paper,{klass:c.klass,stroke:c.stroke,fill:c.fill,"data-name":c.name}))?l:(e(i,{x:s,y:i.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"},!1),null)}}function bv(){if(Ap)return Pp;Ap=1;var e=uv(),t=dv(),n=pv(),r=hv();function i(t,n,i,s){return e("M %f %f L %f %f",r(t),r(n),r(i),r(s))}return Pp=function(e,r,s){e.paper.openGroup({klass:e.controller.classes.generate("triplet "+r.durationClass),"data-name":"triplet"}),r.hasBeam||function(e,t,r,s,a){r=e.calcY(r),a=e.calcY(a);var o=5,c="";c+=i(t,r,t,r+o),c+=i(s,a,s,a+o);var l=t+(s-t)/2,u=8,h=(a-r)/(s-t),d=l-u;c+=i(t,r,d,r+(d-t)*h);var f=l+u;c+=i(f,r+(f-t)*h,s,a),n(e,{path:c,stroke:e.foregroundColor,"data-name":"triplet-bracket"})}(e,r.anchor1.x,r.startNote,r.anchor2.x+r.anchor2.w,r.endNote),t(e,{x:r.xTextPos,y:e.calcY(r.yTextPos-1),text:""+r.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0,name:""+r.number},!0);var a=e.paper.closeGroup();return s.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},a),a}}function yv(){if(Rp)return Vp;Rp=1;var e=gv(),t=hv();return Vp=function(n,r,i,s,a,o,c){if(i<0||s<a){var l=t(a);a=t(s),s=l}else s=t(s),a=t(a);r=t(r);var u=t(r+i);if(n.firefox112){var h={x1:r+=i/2,x2:r,y1:s,y2:a,stroke:n.foregroundColor,"stroke-width":Math.abs(i)};return o&&(h.class=o),c&&(h["data-name"]=c),n.paper.lineToBack(h)}for(var d=[["M",r,s],["L",r,a],["L",u,a],["L",u,s],["z"]],f=(h={path:""},0);f<d.length;f++)h.path+=d[f].join(" ");return o&&(h.class=o),c&&(h["data-name"]=c),e.isInGroup()||(h.stroke="none",h.fill=n.foregroundColor),n.paper.pathToBack(h)}}function _v(){if(qp)return jp;qp=1;var e=function(){if(zp)return Fp;zp=1;var e=uv(),t=hv();return Fp=function(n,r,i,s,a,o,c){var l=n.foregroundColor;r=t(r),i=t(i);var u=t(s-c),h=t(s+c);if(n.firefox112){var d={x1:r,x2:i,y1:s+=c/2,y2:s,stroke:n.foregroundColor,"stroke-width":Math.abs(2*c)};return a&&(d.class=a),o&&(d["data-name"]=o),n.paper.lineToBack(d)}var f={path:e("M %f %f L %f %f L %f %f L %f %f z",r,u,i,u,i,h,r,h),stroke:"none",fill:l};return o&&(f["data-name"]=o),a&&(f.class=a),n.paper.pathToBack(f)}}();return jp=function(t,n,r,i,s,a,o){var c=t.calcY(i);return e(t,n,r,c,s,a,o)}}function wv(){if(Yp)return Hp;Yp=1;var e=dv(),t=yv(),n=_v(),r=vv();return Hp=function(i,s,a){void 0===s.pitch&&window.console.error(s.type+" Relative Element y-coordinate not set.");var o=i.calcY(s.pitch);switch(s.type){case"symbol":if(null===s.c)return null;var c="symbol";s.klass&&(c+=" "+s.klass),s.graphelem=r(i,s.x,s.pitch,s.c,{scalex:s.scalex,scaley:s.scaley,klass:i.controller.classes.generate(c),name:s.name});break;case"debug":s.graphelem=e(i,{x:s.x,y:i.calcY(15),text:""+s.c,type:"debugfont",klass:i.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:s.dim},!1);break;case"tabNumber":var l="tabnumberfont",u="abcjs-tab-number";s.isGrace&&(l="tabgracefont",o+=2.5,u="tab-grace"),s.graphelem=e(i,{x:s.x,y:o,text:""+s.c,type:l,klass:i.controller.classes.generate(u),anchor:"middle",centerVertically:!1,dim:s.dim,cursor:"default"},!1);break;case"barNumber":s.graphelem=e(i,{x:s.x,y:o,text:""+s.c,type:"measurefont",klass:i.controller.classes.generate("bar-number"),anchor:"middle",dim:s.dim,name:"bar-number"},!0);break;case"lyric":s.graphelem=e(i,{x:s.x,y:o,text:s.c,type:"vocalfont",klass:i.controller.classes.generate("lyric"),anchor:"middle",dim:s.dim,name:"lyric"},!1);break;case"chord":s.graphelem=e(i,{x:s.x,y:o,text:s.c,type:"gchordfont",klass:i.controller.classes.generate("chord"),anchor:"middle",dim:s.dim,lane:s.getLane(),name:"chord"},!1);break;case"decoration":s.graphelem=e(i,{x:s.x,y:o+6,text:s.c,type:"annotationfont",klass:i.controller.classes.generate("annotation"),anchor:s.anchor,centerVertically:!0,dim:s.dim},!1);break;case"text":s.graphelem=e(i,{x:s.x,y:o,text:s.c,type:"annotationfont",klass:i.controller.classes.generate("annotation"),anchor:"start",centerVertically:s.centerVertically,dim:s.dim,lane:s.getLane(),name:"annotation"},!1);break;case"multimeasure-text":s.graphelem=e(i,{x:s.x+s.w/2,y:o,text:s.c,type:"tempofont",klass:i.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:s.dim},!1);break;case"part":s.graphelem=e(i,{x:s.x,y:o,text:s.c,type:"partsfont",klass:i.controller.classes.generate("part"),anchor:"start",dim:s.dim,name:s.c},!0);break;case"bar":s.graphelem=t(i,s.x,s.linewidth+i.lineThickness,o,a||i.calcY(s.pitch2),null,"bar");break;case"stem":var h=s.linewidth>0?s.linewidth+i.lineThickness:s.linewidth-i.lineThickness;s.graphelem=t(i,s.x,h,o,i.calcY(s.pitch2),"abcjs-stem","stem");break;case"ledger":s.graphelem=n(i,s.x,s.x+s.w,s.pitch,"abcjs-ledger","ledger",.35+i.lineThickness)}return 1!==s.scalex&&s.graphelem&&function(e,t,n,r,i,s){e.setAttributeOnElement(t,{style:"transform:scale("+n+","+r+");transform-origin:"+i+"px "+s+"px;"})}(i.paper,s.graphelem,s.scalex,s.scaley,s.x,o),s.graphelem}}function xv(){if($p)return Wp;$p=1;var e=function(){if(Gp)return Up;Gp=1;var e=wv(),t=dv();return Up=function(n,r){var i=r.x;void 0===r.pitch&&window.console.error("Tempo Element y-coordinate not set."),r.tempo.el_type="tempo";var s,a=n.calcY(r.pitch)+2;if(r.tempo.preString){s=t(n,{x:i,y:a,text:r.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0);var o=n.controller.getTextSize.calc(r.tempo.preString,"tempofont","tempo",s).width;i+=o+o/r.tempo.preString.length}if(r.note){r.note.setX(i);for(var c=0;c<r.note.children.length;c++)e(n,r.note.children[c],i);i+=r.note.w+5;var l="= "+r.tempo.bpm;s=t(n,{x:i,y:a,text:l,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"beats"});var u=n.controller.getTextSize.calc(l,"tempofont","tempo",s).width;i+=u+u/l.length}r.tempo.postString&&t(n,{x:i,y:a,text:r.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"post"},!0)}}(),t=wv(),n=Sg(),r=Ig(),i=gv();return Wp=function(s,a,o,c,l){if(!a.invisible){var u=a.children.length>0&&"TempoElement"===a.children[0].type;a.elemset=[],i.beginGroup(s.paper,s.controller);for(var h=0;h<a.children.length;h++){var d=a.children[h];if("TempoElement"===d.type)e(s,d);else{var f=t(s,d,o);"symbol"===d.type&&d.c&&d.c.indexOf("notehead")>=0&&f.setAttribute("class","abcjs-notehead")}}var p=a.type;if(("note"===a.type||"rest"===a.type)&&(a.counters=s.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*a.durationClass)/1e3).replace(/\./g,"-"),a.abcelem.pitches))for(var m=0;m<a.abcelem.pitches.length;m++)p+=" p"+a.abcelem.pitches[m].pitch;var g=i.endGroup(p,a.type);if(g){if(a.cloned&&(a.cloned.overrideClasses=g.className.baseVal),a.overrideClasses){var v=g.classList&&g.classList.length>0?g.classList[0]+" ":"";g.setAttribute("class",v+a.overrideClasses)}if(u)a.startChar=a.abcelem.startChar,a.endChar=a.abcelem.endChar,c.add(a,g,!1,l);else{a.elemset.push(g);var b=!1;"note"!==a.type&&"tabNumber"!==a.type||(b=!0),c.add(a,g,b,l)}}else a.elemset.length>0&&c.add(a,a.elemset[0],"note"===a.type,l);if(a.klass&&r(a.elemset,"mark","","#00ff00"),a.hint&&r(a.elemset,"abcjs-hint","",null),a.abcelem.abselem=a,a.heads&&a.heads.length>0){a.notePositions=[];for(var y=0;y<a.heads.length;y++)a.notePositions.push({x:a.heads[y].x+a.heads[y].w/2,y:l.zero-a.heads[y].pitch*n.STEP})}}}}function kv(){if(Qp)return Kp;Qp=1;var e=mv(),t=function(){if(xp)return wp;xp=1;var e=uv(),t=pv(),n=hv(),r=function(r,i,s,a,o,c,l){i=n(i),s=n(s),a=n(a),o=n(o),c=n(c),l=n(l);var u=e("M %f %f L %f %f M %f %f L %f %f",c,i,l,s,c,a,l,o);return t(r,{path:u,highlight:"stroke",stroke:r.foregroundColor,class:r.controller.classes.generate("dynamics decoration"),"data-name":"dynamics"})};return wp=function(e,t,n){void 0===t.pitch&&window.console.error("Crescendo Element y-coordinate not set.");var i,s=e.calcY(t.pitch)+4,a=t.anchor1?t.anchor1.x:0,o=t.anchor2?t.anchor2.x:800;return i="<"===t.dir?r(e,s+4,s,s+4,s+8,a,o):r(e,s,s+4,s+8,s+4,a,o),n.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},i),[i]}}(),n=function(){if(Tp)return Ep;Tp=1;var e=vv();return Ep=function(t,n,r){void 0===n.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var i=e(t,n.anchor.x,n.pitch,n.dec,{scalex:1,scaley:1,klass:t.controller.classes.generate("decoration dynamics"),fill:t.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:n.dec},i),[i]}}(),r=bv(),i=function(){if(Ip)return Np;Ip=1;var e=uv(),t=dv(),n=pv(),r=hv();return Np=function(i,s,a,o,c){void 0===s.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=r(i.calcY(s.pitch)),u="";s.anchor1&&(a=r(s.anchor1.x+s.anchor1.w),u+=e("M %f %f L %f %f ",a,l,a,r(l+20))),s.anchor2&&(o=r(s.anchor2.x),u+=e("M %f %f L %f %f ",o,l,o,r(l+20))),u+=e("M %f %f L %f %f ",a,l,o,l),i.paper.openGroup({klass:i.controller.classes.generate("ending"),"data-name":"ending"}),n(i,{path:u,stroke:i.foregroundColor,fill:i.foregroundColor,"data-name":"line"}),s.anchor1&&t(i,{x:r(a+5),y:r(i.calcY(s.pitch-.5)),text:s.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:s.text});var h=i.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},h),[h]}}(),s=function(){if(Dp)return Op;Dp=1;var e=uv(),t=hv(),n=function(e,t,n){e.anchor1&&e.anchor2?e.anchor1.pitch===e.anchor2.pitch&&0===e.internalNotes.length?e.isTie=!0:e.isTie=!1:e.isTie=!0,e.isTie?(e.calcTieDirection(),e.calcX(t,n),e.calcTieY()):(e.calcSlurDirection(),e.calcX(t,n),e.calcSlurY()),e.avoidCollisionAbove()},r=function(n,r,i,s,a,o,c,l,u){var h=l?1.2:1.5;r=t(r+6),i=t(i+4),s+=o?h:-h,a+=o?h:-h;var d,f=t(n.calcY(s)),p=t(n.calcY(a)),m=i-r,g=p-f,v=Math.sqrt(m*m+g*g),b=m/v,y=g/v,_=v/3.5,w=l?10:25,x=(o?-1:1)*Math.min(w,Math.max(4,_)),k=t(r+_*b-x*y),S=t(f+_*y+x*b),C=t(i-_*b-x*y),M=t(p-_*y+x*b);if(c?c+=" slur":c="slur",c+=l?" tie":" legato",u){c+=" dotted";var E=e("M %f %f C %f %f %f %f %f %f",r,f,k,S,C,M,i,p);d=n.paper.path({path:E,stroke:n.foregroundColor,fill:"none","stroke-dasharray":"5 5",class:n.controller.classes.generate(c),"data-name":l?"tie":"slur"})}else{var T=e("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",r,f,k,S,C,M,i,p,t(C-2*y),t(M+2*b),t(k-2*y),t(S+2*b),r,f);d=n.paper.path({path:T,stroke:"none",fill:n.foregroundColor,class:n.controller.classes.generate(c),"data-name":l?"tie":"slur"})}return d};return Op=function(e,t,i,s,a){n(t,i,s);var o="";t.anchor1?o+="abcjs-start-m"+t.anchor1.parent.counters.measure+"-n"+t.anchor1.parent.counters.note:o+="abcjs-start-edge",t.anchor2?o+=" abcjs-end-m"+t.anchor2.parent.counters.measure+"-n"+t.anchor2.parent.counters.note:o+=" abcjs-end-edge",t.hint&&(o="abcjs-hint");var c=t.fixedY?1.5:0,l=r(e,t.startX,t.endX,t.startY+c,t.endY+c,t.above,o,t.isTie,t.dotted),u=-1;t.anchor1&&!t.isTie&&(u=t.anchor1.parent.abcelem.startChar-1);var h=-1;return t.anchor2&&!t.isTie&&(h=t.anchor2.parent.abcelem.endChar+1),a.wrapSvgEl({el_type:"slur",startChar:u,endChar:h},l),[l]}}(),a=function(){if(Bp)return Lp;Bp=1;var e=pv(),t=hv();function n(e,n,r,i,s,a){r=t(e.calcY(r)),s=t(e.calcY(s)),n=t(n),i=t(i);var o=t(r+a);return"M"+n+" "+r+" L"+i+" "+s+"L"+i+" "+t(s+a)+" L"+n+" "+o+"z"}function r(e,t,n,r,i){return(i-n)/(r-t)}function i(e,t,n,r){return t+(r-e)*n}return Lp=function(t,s){if(0!==s.beams.length){for(var a="",o=0;o<s.beams.length;o++){var c=s.beams[o];if(c.split){for(var l=r(t,c.startX,c.startY,c.endX,c.endY),u=[],h=0;h<c.split.length;h+=2)u.push([c.split[h],c.split[h+1]]);for(h=0;h<u.length;h++){var d=i(c.startX,c.startY,l,u[h][0]),f=i(c.startX,c.startY,l,u[h][1]);a+=n(t,u[h][0],d,u[h][1],f,c.dy)}}else a+=n(t,c.startX,c.startY,c.endX,c.endY,c.dy)}var p=("abcjs-d"+s.duration).replace(/\./g,"-"),m=t.controller.classes.generate("beam-elem "+p);return[e(t,{path:a,stroke:"none",fill:t.foregroundColor,class:m})]}}}(),o=dv(),c=xv();function l(e){return"rest"===e.type&&!(!e.abcelem||!e.abcelem.rest||"spacer"===e.abcelem.rest.type)}return Kp=function(u,h,d,f,p){var m=h.w-1;u.staffbottom=h.staff.bottom;var g,v,b=u.foregroundColor;if(h.color&&(u.foregroundColor=h.color),h.header){var y=o(u,{x:u.padding.left,y:u.calcY(h.headerPosition),text:h.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0,name:"voice-name"},!0);f.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:h.header},y)}var _=!1;for(g=0;g<h.children.length;g++){"note"!==(v=h.children[g]).type&&"rest"!==v.type||(_=!0);var w=!1;"staff-extra"===v.type||u.controller.classes.isInMeasure()||(u.controller.classes.startMeasure(),w=!0),h.staff.isTabStaff&&(v.invisible=!1,"bar"==v.type&&v.abcelem.lastBar&&(d=h.topLine)),c(u,v,h.barto||g===h.children.length-1?d:0,f,p),("note"===v.type||l(v))&&u.controller.classes.incrNote(),"bar"===v.type&&!w&&_&&u.controller.classes.incrMeasure()}for(u.controller.classes.startMeasure(),g=0;g<h.beams.length;g++){var x=h.beams[g];"bar"===x?u.controller.classes.incrMeasure():a(u,x,f)}for(u.controller.classes.startMeasure(),g=0;g<h.otherchildren.length;g++)if("bar"===(v=h.otherchildren[g]))u.controller.classes.incrMeasure();else switch(v.type){case"GlissandoElem":v.elemset=e(u,v,f);break;case"CrescendoElem":v.elemset=t(u,v,f);break;case"DynamicDecoration":v.elemset=n(u,v,f);break;case"TripletElem":r(u,v,f);break;case"EndingElem":v.elemset=i(u,v,h.startx+10,m,f);break;case"TieElem":v.elemset=s(u,v,h.startx+10,m,f);break;default:console.log(v),c(u,v,h.startx+10,m,f,p)}u.foregroundColor=b}}function Sv(){if(im)return rm;im=1;var e=nm?tm:(nm=1,tm=function(e,t){var n=Math.round(e.y),r=(e.controller.width-t)/2,i=r+t,s="M "+r+" "+n+" L "+i+" "+n+" L "+i+" "+(n+1)+" L "+r+" "+(n+1)+" L "+r+" "+n+" z";e.paper.pathToBack({path:s,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}),t=dv();return rm=function(n,r,i){for(var s=0;s<r.rows.length;s++){var a=r.rows[s];if(a.absmove)n.absolutemoveY(a.absmove);else if(a.move)n.moveY(a.move);else if(a.text||a.phrases){var o=a.left?a.left:0,c=t(n,{x:o,y:n.y,text:a.text,phrases:a.phrases,"dominant-baseline":a["dominant-baseline"],type:a.font,klass:a.klass,name:a.name,anchor:a.anchor});a.absElemType&&i.wrapSvgEl({el_type:a.absElemType,name:a.name,startChar:a.startChar,endChar:a.endChar,text:a.text},c)}else if(a.separator)e(n,a.separator);else if(a.startGroup)n.paper.openGroup({klass:a.klass,"data-name":a.name});else if(a.endGroup){var l=n.paper.closeGroup();a.absElemType&&i.wrapSvgEl({el_type:a.absElemType,name:a.name,startChar:a.startChar,endChar:a.endChar,text:""},l)}}}}function Cv(){if(am)return sm;am=1;var e=Sg(),t=fv(),n=kv(),r=function(){if(Zp)return Xp;Zp=1;var e=_v();return Xp=function(t,n,r,i,s,a){var o="abcjs-top-line",c=2;s&&(c=s),t.paper.openGroup({prepend:!0,klass:t.controller.classes.generate("abcjs-staff")});var l=0,u=0;if(1===i)e(t,n,r,6,o,null,a+t.lineThickness),l=t.calcY(10),u=t.calcY(2);else for(var h=i-1;h>=0;h--){var d=(h+1)*c;u=t.calcY(d),0===l&&(l=u),e(t,n,r,d,o,null,a+t.lineThickness),o=void 0}return t.paper.closeGroup(),[l,u]}}(),i=em?Jp:(em=1,Jp=function(e,t,n){var r=e.paper.rectBeneath(t);return n&&e.paper.text(n,{x:0,y:t.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),r}),s=yv(),a=Sv();function o(n,r,i,s,a){if(i)for(var o=0;o<i.length;o++)i[o].isStartVoice(s)&&(i[o].startY=r-10*e.STEP,i[o].elemset=t(n,i[o],a))}function c(t,n,r){for(var s=0;s<r.length;s++)for(var a=n[r[s]].children,o=0;o<a.length;o++){var c=a[o],l=c.getFixedCoords();if(!c.invisible&&void 0!==l.t&&void 0!==l.b){var u=(l.t-l.b)*e.STEP;i(t,{x:l.x,y:t.calcY(l.t),width:l.w,height:u,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var h=0;h<c.children.length;h++){var d=c.children[h],f=d.getChordDim();if(f){var p=t.calcY(d.pitch);p+=d.dim.font.size*d.getLane(),i(t,{x:f.left,y:p,width:f.right-f.left,height:d.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}return sm=function(t,l,u,h){for(var d,f,p,m=t.y,g=0;g<l.staffs.length;g++){var v=l.staffs[g];t.moveY(e.STEP,v.top),v.absoluteY=t.y,t.showDebug&&(t.showDebug.indexOf("box")>=0&&v.voices&&c(t,l.voices,v.voices),t.showDebug.indexOf("grid")>=0&&(t.paper.dottedLine({x1:t.padding.left,x2:t.padding.left+t.controller.width,y1:m,y2:m,stroke:"#0000ff"}),i(t,{x:t.padding.left,y:t.calcY(v.originalTop),width:t.controller.width,height:t.calcY(v.originalBottom)-t.calcY(v.originalTop),fill:t.foregroundColor,stroke:t.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),d=0,E(v,"chordHeightAbove"),E(v,"chordHeightBelow"),E(v,"dynamicHeightAbove"),E(v,"dynamicHeightBelow"),E(v,"endingHeightAbove"),E(v,"lyricHeightAbove"),E(v,"lyricHeightBelow"),E(v,"partHeightAbove"),E(v,"tempoHeightAbove"),E(v,"volumeHeightAbove"),E(v,"volumeHeightBelow"))),t.moveY(e.STEP,-v.bottom),t.showDebug&&t.showDebug.indexOf("grid")>=0&&t.paper.dottedLine({x1:t.padding.left,x2:t.padding.left+t.controller.width,y1:t.y,y2:t.y,stroke:"#0000aa"})}for(var b=2,y=0,_=0;_<l.voices.length;_++){var w=l.voices[_].staff,x=l.voices[_].tabNameInfos;if(t.y=w.absoluteY,t.controller.classes.incrVoice(),!l.voices[_].duplicate){if(f||(f=t.calcY(10)),p=t.calcY(b),0!==w.lines){w.linePitch&&(b=w.linePitch),t.controller.classes.newMeasure();var k=r(t,l.startx,l.w,w.lines,w.linePitch,.35);p=k[1],w.bottomLine=p,w.topLine=k[0],w.hasTab&&(y=w.topLine),w.hasStaff&&(y=w.hasStaff.topLine,l.voices[_].barto=!0,l.voices[_].topLine=f)}o(t,w.absoluteY,l.brace,_,u),o(t,w.absoluteY,l.bracket,_,u)}n(t,l.voices[_],y,u,{top:m,zero:t.y,height:l.height*e.STEP});var S=0;if(x){var C={rows:[]};C.rows.push({absmove:p+2});C.rows.push({left:l.startx+8,text:x.name,font:"tablabelfont",klass:"text instrument-name",anchor:"start"}),C.rows.push({move:x.textSize.height}),a(t,C),S=x.textSize.height}t.controller.classes.newMeasure(),l.voices[_].duplicate||(y=t.calcY(2+S))}t.controller.classes.newMeasure();var M=l.staffs.length;function E(n,r){var s=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(n.positionY&&n.positionY[r]){var a=n.specialY[r]*e.STEP;"chordHeightAbove"===r&&n.specialY.chordLines&&n.specialY.chordLines.above&&(a*=n.specialY.chordLines.above),"chordHeightBelow"===r&&n.specialY.chordLines&&n.specialY.chordLines.below&&(a*=n.specialY.chordLines.below),i(t,{x:t.padding.left,y:t.calcY(n.positionY[r]),width:t.controller.width,height:a,fill:s[d],stroke:s[d],"fill-opacity":.4,"stroke-opacity":.4},r.substr(0,4)),(d+=1)>6&&(d=0)}}M>1&&(f=l.staffs[0].topLine,p=l.staffs[M-1].bottomLine,s(t,l.startx,.6,f,p,null)),t.y=m}}function Mv(){if(dm)return hm;dm=1;var e=Cv(),t=cm?om:(cm=1,om=function(e,t,n,r){var i=(t+e.padding.left+e.padding.right)*n,s=(e.y+e.padding.bottom)*n;if(e.isPrint&&(s=Math.max(s,1056)),""!==e.ariaLabel){var a="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(a+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(a);var o=e.ariaLabel?e.ariaLabel:a;e.paper.setAttribute("aria-label",o)}e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var c={overflow:"hidden"};"resize"===r?e.paper.setResponsiveWidth(i,s):(c.width="",c.height=s+"px",n<1?(c.width=i+"px",e.paper.setSize(i/n,s/n)):e.paper.setSize(i,s)),e.paper.setScale(n),e.paper.setParentStyles(c)}),n=Sv(),r=Sg(),i=function(){if(um)return lm;um=1;var e=Og(),t=Dg();function n(e,t,n){this.elements=[],this.paper=e,this.tuneNumber=n,this.selectTypes=t}return n.prototype.getElements=function(){return this.elements},n.prototype.add=function(e,t,n,r){if(this.canSelect(e)){var i;i=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,i);var s={absEl:e,svgEl:t,isDraggable:n};void 0!==r&&(s.staffPos=r),this.elements.push(s)}},n.prototype.canSelect=function(e){return!(!1===this.selectTypes||!e||!e.abcelem||!0!==this.selectTypes&&!(void 0===this.selectTypes?"note"===e.abcelem.el_type||"tabNumber"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0))},n.prototype.wrapSvgEl=function(n,r){var i={tuneNumber:this.tuneNumber,abcelem:n,elemset:[r],highlight:e,unhighlight:t};this.add(i,r,!1)},lm=n}();function s(t,n,i,s){e(t,n,i,s);var a=n.height*r.STEP;return t.y+=a,n}function a(e,t,n,i){var s=-(n.staffs[n.staffs.length-1].bottom-2),a=(i.staffs[0].top-10+s)*r.STEP;a<t&&e.moveY(t-a)}return hm=function(e,r,o,c,l,u,h,d,f,p){var m=new i(e.paper,d,f),g={};r.shouldAddClasses&&(g.klass="abcjs-meta-top"),e.paper.openGroup(g),e.moveY(e.padding.top),n(e,o.topText,m),e.paper.closeGroup(),e.moveY(e.spacing.music);for(var v=[],b=0;b<o.lines.length;b++){r.incrLine();var y=o.lines[b];if(y.staff){r.shouldAddClasses&&(g.klass="abcjs-staff-wrapper abcjs-l"+r.lineNumber),e.paper.openGroup(g),y.vskip&&e.moveY(y.vskip),v.length>=1&&a(e,e.spacing.staffSeparation,v[v.length-1],y.staffGroup);var _=s(e,y.staffGroup,m,b);_.line=p+b,v.push(_),e.paper.closeGroup()}else y.nonMusic&&(r.shouldAddClasses&&(g.klass="abcjs-non-music"),e.paper.openGroup(g),n(e,y.nonMusic,m),e.paper.closeGroup())}return r.reset(),o.bottomText&&o.bottomText.rows&&o.bottomText.rows.length>0&&(r.shouldAddClasses&&(g.klass="abcjs-meta-bottom"),e.paper.openGroup(g),e.moveY(24),n(e,o.bottomText,m),e.paper.closeGroup()),t(e,l,h,u),{staffgroups:v,selectables:m.getElements()}}}function Ev(){if(gm)return mm;gm=1;var e=Sg(),t=Qg(),n=Xg(),r=_f?yf:(_f=1,yf=function(e,t,n,r,i,s){var a,o=e.text;this.rows=[],t&&this.rows.push({move:t});var c=n.calc("textfont","defined-text");if(""===o)this.rows.push({move:2*c.attr["font-size"]});else if("string"==typeof o)this.rows.push({move:c.attr["font-size"]/2}),this.rows.push({left:r,text:o,font:"textfont",klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),a=s.calc(o,"textfont","defined-text"),this.rows.push({move:a.height});else if(o){for(var l=0,u=r,h="textfont",d=0;d<o.length;d++)h=o[d].font?o[d].font:"textfont",this.rows.push({left:u,text:o[d].text,font:h,klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),u+=(a=s.calc(o[d].text,n.calc(h,"defined-text").font,"defined-text")).width+a.height/2,l=Math.max(l,a.height);this.rows.push({move:l})}else if(1===e.length){var f=i/2;this.rows.push({left:f,text:e[0].text,font:"textfont",klass:"defined-text",anchor:"middle",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),a=s.calc(e[0].text,"textfont","defined-text"),this.rows.push({move:a.height})}}),i=xf?wf:(xf=1,wf=function(e,t,n){this.rows=[],e&&this.rows.push({move:e}),this.rows.push({separator:t,absElemType:"separator"}),n&&this.rows.push({move:n})}),s=Sf?kf:(Sf=1,kf=function(e,t,n,r,i,s){this.rows=[],e&&this.rows.push({move:e});var a=t.titleleft?"start":"middle",o=t.titleleft?i:r;this.rows.push({left:o,text:n.text,font:"subtitlefont",klass:"text subtitle",anchor:a,startChar:n.startChar,endChar:n.endChar,absElemType:"subtitle",name:"subtitle"});var c=s.calc(n.text,"subtitlefont","text subtitle");this.rows.push({move:c.height})}),a=function(){if(Af)return Pf;Af=1;const e=Zg(),t=Jg();return Pf=function(n,r,i,s,a,o,c,l,u,h){if(this.rows=[],n.header&&o){var d=h.calc("X","headerfont","abcjs-header abcjs-meta-top").height;e(this.rows,{marginLeft:c,text:n.header.left,font:"headerfont",klass:"header meta-top",marginTop:-d,info:r.header,name:"header"},h),e(this.rows,{marginLeft:c+a/2,text:n.header.center,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"middle",info:r.header,name:"header"},h),e(this.rows,{marginLeft:c+a,text:n.header.right,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"end",info:r.header,name:"header"},h)}o&&this.rows.push({move:l.top});var f=i.titleleft?"start":"middle",p=i.titleleft?c:c+a/2;if(n.title){var m=u?"abcjs-title":"";t(this.rows,n.title,"titlefont",m,"title",p,{marginTop:l.title,anchor:f,absElemType:"title",info:r.title},h)}if(s.length)for(var g=0;g<s.length&&s[g].subtitle;)m=u?"abcjs-text abcjs-subtitle":"",t(this.rows,s[g].subtitle.text,"subtitlefont",m,"subtitle",p,{marginTop:l.subtitle,anchor:f,absElemType:"subtitle",info:s[g].subtitle},h),g++;if(n.rhythm||n.origin||n.composer){if(this.rows.push({move:l.composer}),n.rhythm&&n.rhythm.length>0){var v=!(!n.composer&&!n.origin);m=u?"abcjs-rhythm":"",e(this.rows,{marginLeft:c,text:n.rhythm,font:"infofont",klass:m,absElemType:"rhythm",noMove:v,info:r.rhythm,name:"rhythm"},h)}n.composer&&n.composer,n.origin&&n.origin;var b=n.composer?n.composer:"";n.origin&&("string"==typeof b&&"string"==typeof n.origin?b+=" ("+n.origin+")":"string"==typeof b&&"string"!=typeof n.origin?((b=[{text:b}]).push({text:" ("}),(b=b.concat(n.origin)).push({text:")"})):(b.push({text:" ("}),(b=b.concat(n.origin)).push({text:")"}))),b&&(m=u?"abcjs-composer":"",t(this.rows,b,"composerfont",m,"composer",c+a,{anchor:"end",absElemType:"composer",info:r.composer,ingroup:!0},h))}n.author&&n.author.length>0&&(m=u?"abcjs-author":"",t(this.rows,n.author,"composerfont",m,"author",c+a,{anchor:"end",absElemType:"author",info:r.author},h)),n.partOrder&&n.partOrder.length>0&&(m=u?"abcjs-part-order":"",t(this.rows,n.partOrder,"partsfont",m,"part-order",c,{absElemType:"partOrder",info:r.partOrder,anchor:"start"},h))}}(),o=function(){if(If)return Nf;If=1;const e=Zg(),t=Jg();function n(e,t,n,r,i,s,a){this.rows=[],e.unalignedWords&&e.unalignedWords.length>0&&this.unalignedWords(e.unalignedWords,r,i,s,a),this.extraText(e,r,i,s,a),e.footer&&n&&this.footer(e.footer,t,r,a)}function r(e,n,r,i,s,a,o){r&&(n&&(r="string"==typeof r?n+r:[{text:n}].concat(r)),t(e,r,"historyfont",s=a?"abcjs-extra-text "+s:"","description",i,{absElemType:"extraText",anchor:"start"},o))}function i(n,r,i,s,a,o,c,l,u,h,d,f){if(i){l=d?"abcjs-extra-text "+l:"";var p=f.calc("A",a,l);if("string"==typeof i)r&&(i=r+"\n"+i),e(n,{marginLeft:s,text:i,font:a,absElemType:"extraText",name:u,"dominant-baseline":"middle",klass:l},f);else{n.push({startGroup:c,klass:l,name:u}),n.push({move:h.info}),r&&(e(n,{marginLeft:s,text:r,font:a,absElemType:"extraText",name:u,"dominant-baseline":"middle"},f),n.push({move:3*p.height/4}));for(var m=0;m<i.length;m++)t(n,i[m],a,"",u,s,{anchor:"start"},f),m<i.length-1&&"string"==typeof i[m]&&"string"!=typeof i[m+1]&&n.push({move:3*p.height/4});n.push({endGroup:c,absElemType:o,startChar:-1,endChar:-1,name:u}),n.push({move:p.height})}}}return n.prototype.unalignedWords=function(e,t,n,r,s){var a=r?"abcjs-unaligned-words":"",o="wordsfont",c=s.calc("i",o,a);this.rows.push({move:n.words}),i(this.rows,"",e,t,o,"unalignedWords","unalignedWords",a,"unalignedWords",n,r,s),this.rows.push({move:c.height})},n.prototype.extraText=function(e,t,n,s,a){r(this.rows,"Book: ",e.book,t,"abcjs-book",s,a),r(this.rows,"Source: ",e.source,t,"abcjs-source",s,a),r(this.rows,"Discography: ",e.discography,t,"abcjs-discography",s,a),i(this.rows,"Notes:",e.notes,t,"historyfont","extraText","notes","abcjs-notes","description",n,s,a),r(this.rows,"Transcription: ",e.transcription,t,"abcjs-transcription",s,a),i(this.rows,"History:",e.history,t,"historyfont","extraText","history","abcjs-history","description",n,s,a),r(this.rows,"Copyright: ",e["abc-copyright"],t,"abcjs-copyright",s,a),r(this.rows,"Creator: ",e["abc-creator"],t,"abcjs-creator",s,a),r(this.rows,"Edited By: ",e["abc-edited-by"],t,"abcjs-edited-by",s,a)},n.prototype.footer=function(t,n,r,i){var s="header meta-bottom",a="footerfont";this.rows.push({startGroup:"footer",klass:s}),e(this.rows,{marginLeft:r,text:t.left,font:a,klass:s,name:"footer"},i),e(this.rows,{marginLeft:r+n/2,text:t.center,font:a,klass:s,anchor:"middle",name:"footer"},i),e(this.rows,{marginLeft:r+n,text:t.right,font:a,klass:s,anchor:"end",name:"footer"},i)},Nf=n}(),c=tv(),l=lv(),u=function(){if(ip)return rp;ip=1;var e=function(e){this.shouldAddClasses=e.shouldAddClasses,this.reset()};return e.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null},e.prototype.incrLine=function(){null===this.lineNumber?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},e.prototype.incrVoice=function(){null===this.voiceNumber?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},e.prototype.isInMeasure=function(){return null!==this.measureNumber},e.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null},e.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},e.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},e.prototype.incrNote=function(){this.noteNumber++},e.prototype.measureTotal=function(){for(var e=0,t=0;t<this.lineNumber;t++)e+=this.measureTotalPerLine[t]?this.measureTotalPerLine[t]:0;return this.measureNumber&&(e+=this.measureNumber),e},e.prototype.getCurrent=function(e){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}},e.prototype.generate=function(e){if(!this.shouldAddClasses)return"";var t=[];if(e&&e.length>0&&t.push(e),"abcjs-tab-number"===e)return t.join(" ");if("text instrument-name"===e)return"abcjs-text abcjs-instrument-name";if(null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var n=0;n<t.length;n++)0!==t[n].indexOf("abcjs-")&&t[n].length>0&&(t[n]="abcjs-"+t[n])}return t.join(" ")},rp=e}(),h=function(){if(ap)return sp;ap=1;var e=function(e,t){this.formatting=e,this.classes=t};return e.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},e.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},e.prototype.calc=function(e,t){var n;n="string"==typeof e?(n=this.formatting[e])?{face:n.face,size:Math.round(4*n.size/3),decoration:n.decoration,style:n.style,weight:n.weight,box:n.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var r=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return n.padding=n.size*r,{font:n,attr:{"font-size":n.size,"font-style":n.style,"font-family":this.getFamily(n.face),"font-weight":n.weight,"text-decoration":n.decoration,class:this.classes.generate(t)}}},sp=e}(),d=function(){if(cp)return op;cp=1;var e=function(e,t){this.getFontAndAttr=e,this.svg=t};return e.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},e.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},e.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},e.prototype.calc=function(e,t,n,r){var i;i="string"==typeof t?this.attr(t,n):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":this.getFamily(t.face),"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(n)}};var s=this.svg.getTextSize(e,i.attr,r);return i.font.box?{height:s.height+4*i.font.padding,width:s.width+4*i.font.padding}:s},e.prototype.baselineToCenter=function(e,t,n,r,i){return.5*this.calc(e,t,n).height+(i-r-2)*this.attr(t,n).font.size},op=e}(),f=Mv(),p=qg(),m=function(){if(pm)return fm;pm=1;var e=ev();return fm=function(t){for(var n=t;n&&n.attributes&&"svg"!==n.tagName.toLowerCase()&&!n.attributes.selectable;)n=n.parentNode;if(n&&n.attributes&&n.attributes.selectable){var r=n.attributes["data-index"].nodeValue;if(r&&(r=parseInt(r,10))>=0&&r<this.selectables.length){var i=this.selectables[r],s=e(i,t);return s.index=r,s.element=i,s}}return null}}(),g=function(t,r){r=r||{},this.findSelectableElement=m,this.oneSvgPerLine=r.oneSvgPerLine,this.selectionColor=r.selectionColor,this.dragColor=r.dragColor?r.dragColor:r.selectionColor,this.dragging=!!r.dragging,this.selectTypes=r.selectTypes,this.responsive=r.responsive,this.space=3*e.SPACE,this.initialClef=r.initialClef,this.timeBasedLayout=r.timeBasedLayout,this.expandToWidest=!!r.expandToWidest,this.scale=r.scale?parseFloat(r.scale):0,this.classes=new u({shouldAddClasses:r.add_classes}),this.scale>.1||(this.scale=void 0),r.staffwidth?(this.staffwidthScreen=r.staffwidth,this.staffwidthPrint=r.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],r.clickListener&&this.addSelectListener(r.clickListener),this.renderer=new n(t),this.renderer.setPaddingOverride(r),r.showDebug&&(this.renderer.showDebug=r.showDebug),r.jazzchords&&(this.jazzchords=r.jazzchords),r.accentAbove&&(this.accentAbove=r.accentAbove),r.germanAlphabet&&(this.germanAlphabet=r.germanAlphabet),r.lineThickness&&(this.lineThickness=r.lineThickness),this.renderer.controller=this,this.renderer.foregroundColor=r.foregroundColor?r.foregroundColor:"currentColor",void 0!==r.ariaLabel&&(this.renderer.ariaLabel=r.ariaLabel),this.renderer.minPadding=r.minPadding?r.minPadding:0,this.reset()};function v(e){for(var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=0;n<e.attributes.length;n++){var r=e.attributes[n];"height"!==r.name&&"aria-label"!=r.name&&t.setAttribute(r.name,r.value)}return t}return g.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0,this.lineThickness&&this.renderer.setLineThickness(this.lineThickness)},g.prototype.engraveABC=function(e,t,n){void 0===e[0]&&(e=[e]),this.reset();for(var r=0;r<e.length;r++)void 0===t&&(t=r),this.getFontAndAttr=new h(e[r].formatting,this.classes),this.getTextSize=new d(this.getFontAndAttr,this.renderer.paper),this.engraveTune(e[r],t,n)},g.prototype.adjustNonScaledItems=function(e){this.width/=e,this.renderer.adjustNonScaledItems(e)},g.prototype.getMeasureWidths=function(e){this.reset(),this.getFontAndAttr=new h(e.formatting,this.classes),this.getTextSize=new d(this.getFontAndAttr,this.renderer.paper);var t=this.jazzchords;this.setupTune(e,0),this.constructTuneElements(e),l(this.renderer,e,0,this.space,this.timeBasedLayout);for(var n,r=[],i=!0,s=0;s<e.lines.length;s++){var a=e.lines[s];if(a.staff){if(i&&(n={left:0,measureWidths:[],total:0},r.push(n),i=!1),a.staffGroup.voices.length>0)for(var o=a.staffGroup.voices[0],c=!1,u=0,f=0;f<o.children.length;f++){var p=o.children[f];c||p.isClef||p.isKeySig||(c=!0,n.left=p.x,u=p.x),"bar"===p.type&&(n.measureWidths.push(p.x-u),n.total+=p.x-u,u=p.x)}}else i=!0}return this.jazzchords=t,r},g.prototype.setupTune=function(e,n){this.classes.reset(),void 0!==e.formatting.jazzchords&&(this.jazzchords=e.formatting.jazzchords),void 0!==e.formatting.accentAbove&&(this.accentAbove=e.formatting.accentAbove),this.renderer.newTune(e),this.engraver=new t(this.getTextSize,n,{bagpipes:e.formatting.bagpipes,flatbeams:e.formatting.flatbeams,graceSlurs:!1!==e.formatting.graceSlurs,percmap:e.formatting.percmap,initialClef:this.initialClef,jazzchords:this.jazzchords,timeBasedLayout:this.timeBasedLayout,accentAbove:this.accentAbove,germanAlphabet:this.germanAlphabet}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=e.getMeterFraction().num/e.getMeterFraction().den,e.formatting.staffwidth?this.width=1.33*e.formatting.staffwidth:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var r=e.formatting.scale?e.formatting.scale:this.scale;return"resize"===this.responsive&&(r=void 0),void 0===r&&(r=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(r),r},g.prototype.constructTuneElements=function(e){var t,n;e.topText=new a(e.metaText,e.metaTextInfo,e.formatting,e.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize);var c=!1,l=!1;for(t=0;t<e.lines.length;t++)if((n=e.lines[t]).staff)l=!0,n.staffGroup=this.engraver.createABCLine(n.staff,c?null:e.metaText.tempo,t),c=!0;else if(n.subtitle){if(l){var u=this.width/2+this.renderer.padding.left;n.nonMusic=new s(this.renderer.spacing.subtitle,e.formatting,n.subtitle,u,this.renderer.padding.left,this.getTextSize)}}else void 0!==n.text?(l=!0,n.nonMusic=new r(n.text,n.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):void 0!==n.separator&&n.separator.lineLength&&(l=!0,n.nonMusic=new i(n.separator.spaceAbove,n.separator.lineLength,n.separator.spaceBelow));e.bottomText=new o(e.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize)},g.prototype.engraveTune=function(e,t,n){var r=this.jazzchords,i=this.setupTune(e,t);this.constructTuneElements(e);var s=l(this.renderer,e,this.width,this.space,this.expandToWidest,this.timeBasedLayout);if(this.expandToWidest&&s>this.width+1&&(e.topText=new a(e.metaText,e.metaTextInfo,e.formatting,e.lines,s,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),e.lines&&e.lines.length>0))for(var o=e.lines.length,u=0;u<o;++u){var h=e.lines[u];if(h.nonMusic&&h.nonMusic.rows&&h.nonMusic.rows.length>0)for(var d=h.nonMusic.rows.length,m=0;m<d;++m){var g=h.nonMusic.rows[m];g.left&&(h.subtitle||h.text&&h.text.length>0&&h.text[0].center)&&(g.left=s/2+this.renderer.padding.left)}}e.tablatures&&p.layoutTablatures(this.renderer,e);var b=f(this.renderer,this.classes,e,this.width,s,this.responsive,i,this.selectTypes,t,n);if(this.staffgroups=b.staffgroups,this.selectables=b.selectables,this.oneSvgPerLine){var y=this.renderer.paper.svg.parentNode;this.svgs=function(e,t,n,r,i){n||(n="Untitled");var s=t.querySelector("svg");"resize"===r&&(t.style.paddingBottom="");for(var a=s.querySelector("style"),o="resize"===r?s.viewBox.baseVal.width:s.getAttribute("width"),c=t.querySelectorAll("svg > g"),l=0,u=[],h=0;h<c.length;h++){var d=c[h],f=d.getBBox(),p=f.y-l,m=f.height+p,g=document.createElement("div"),b="overflow: hidden;";"resize"!==r&&(b+="height:"+m*i+"px;"),g.setAttribute("style",b);var y=v(s),_='Sheet Music for "'+n+'" section '+(h+1);y.setAttribute("aria-label",_),"resize"!==r&&y.setAttribute("height",m),"resize"===r&&(y.style.position="");var w=e.firefox112?m+1:m;y.setAttribute("viewBox","0 "+l+" "+o+" "+w),y.appendChild(a.cloneNode(!0));var x=document.createElement("title");x.innerText=_,y.appendChild(x),y.appendChild(d),g.appendChild(y),u.push(y),t.appendChild(g),l=f.y+f.height}return t.removeChild(s),u}(this.renderer,y,e.metaText.title,this.responsive,i)}else this.svgs=[this.renderer.paper.svg];c(this,this.svgs),this.jazzchords=r},g.prototype.getDim=function(e){if(!e.dim){var t=e.svgEl.getBBox();e.dim={left:Math.round(t.x),top:Math.round(t.y),right:Math.round(t.x+t.width),bottom:Math.round(t.y+t.height)}}return e.dim},g.prototype.addSelectListener=function(e){this.listeners[this.listeners.length]=e},mm=g}function Tv(){if(bm)return vm;bm=1;var e=Hg();Tg();var t=Ev(),n=Ag(),r=kg(),i={};function s(){var e=window.innerWidth;for(var t in i)if(i.hasOwnProperty(t)){var n=i[t];e-=2*n.offsetLeft,n.style.width=e+"px"}}try{window.addEventListener("resize",s),window.addEventListener("orientationChange",s)}catch(o){}function a(e,n,r,s,a){r.viewportHorizontal?(e.innerHTML='<div class="abcjs-inner"></div>',r.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",i[e.id]=e,e=e.children[0]):r.viewportVertical?(e.innerHTML='<div class="abcjs-inner scroll-amount"></div>',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var o=new t(e,r);(o.engraveABC(n,s,a),n.engraver=o,r.viewportVertical||r.viewportHorizontal)&&(e.parentNode.style.width=e.style.width)}return vm=function(i,s,o,c,l){var u,h={};if(o){for(u in o)o.hasOwnProperty(u)&&(h[u]=o[u]);h.warnings_id&&h.tablature&&(h.tablature.warning_id=h.warnings_id)}if(c)for(u in c)c.hasOwnProperty(u)&&("listener"===u?c[u].highlight&&(h.clickListener=c[u].highlight):h[u]=c[u]);if(l)for(u in l)l.hasOwnProperty(u)&&(h[u]=l[u]);return e.renderEngine((function(e,i,s,o){var c=!1;return"*"===e&&(c=!0,(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e)),!c&&h.wrap&&h.staffwidth?(i=function(e,i,s,o,c){var l=new t(e,c),u=l.getMeasureWidths(i),h=r.calcLineWraps(i,u,c);if(h.reParse){var d=new n;d.parse(o,h.revisedParams),i=d.getTune();var f=d.getWarnings();f&&(i.warnings=f)}c.afterParsing&&c.afterParsing(i,s,o);return a(e,i,h.revisedParams,s,0),i.explanation=h.explanation,i}(e,i,s,o,h),i):(h.afterParsing&&h.afterParsing(i,s,o),a(e,i,h,s,0),c&&e.parentNode.removeChild(e),null)}),i,s,h)}}function Pv(){if(xm)return wm;xm=1;return wm={}}function Av(){if(Mm)return Cm;Mm=1;return Cm=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"]}function Nv(){if(Am)return Pm;return Am=1,Pm=function(e){if(e)window.abcjsAudioContext=e;else if(!window.abcjsAudioContext){var t=window.AudioContext||window.webkitAudioContext;if(!t)return!1;window.abcjsAudioContext=new t}return"suspended"!==window.abcjsAudioContext.state}}function Iv(){if(Im)return Nm;Im=1;var e=Nv();return Nm=function(){return window.abcjsAudioContext||e(),window.abcjsAudioContext}}function Ov(){if(Dm)return Om;Dm=1;var e=Iv();return Om=function(){if(!window.Promise)return!1;if(!(window.AudioContext||window.webkitAudioContext||navigator.mozAudioContext||navigator.msAudioContext))return!1;var t=e();return t?void 0!==t.resume:void 0}}function Dv(){if(Bm)return Lm;Bm=1;return Lm={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"}}function Lv(){if(Rm)return Vm;Rm=1;return Vm=function(e){return window.URL.createObjectURL(function(e){var t,n,r=e[0],i=r.numberOfChannels,s=r.length*i*2+44,a=new ArrayBuffer(s),o=new DataView(a),c=[],l=0,u=0;for(d(1179011410),d(s-8),d(1163280727),d(544501094),d(16),h(1),h(i),d(r.sampleRate),d(2*r.sampleRate*i),h(2*i),h(16),d(1635017060),d(s-u-4),t=0;t<i;t++)c.push(r.getChannelData(t));for(;u<s;){for(t=0;t<c.length;t++)n=0|(.5+(n=Math.max(-1,Math.min(1,c[t][l])))<0?32768*n:32767*n),o.setInt16(u,n,!0),u+=2;l++}return new Blob([a],{type:"audio/wav"});function h(e){o.setUint16(u,e,!0),u+=2}function d(e){o.setUint32(u,e,!0),u+=4}}(e.audioBuffers))}}function Bv(){if(zm)return Fm;return zm=1,Fm=function(e){return Math.pow(2,e/1200)}}function Vv(){if(Ym)return Hm;Ym=1;var e=function(){if(Sm)return km;Sm=1;var e=Pv();return km=function(t,n,r,i){e[n]||(e[n]={});var s=e[n];return s[r]||(s[r]=new Promise((function(e,s){var a=new XMLHttpRequest;let o=t+n+"-mp3/"+r+".mp3";a.open("GET",o,!0),a.responseType="arraybuffer",a.onload=function(){if(200===a.status){var t=i.decodeAudioData(a.response,(function(t){e({instrument:n,name:r,status:"loaded",audioBuffer:t})}),(function(){s(Error("Can't decode sound at "+o))}));t&&"function"==typeof t.catch&&t.catch(s)}else s(Error("Can't load sound at "+o+" status="+a.status))},a.onerror=function(){s(Error("Can't load sound at "+o))},a.send()})).catch((e=>{throw console.error("Didn't load note",n,r,":",e.message),e}))),s[r]}}(),t=function(){if(Tm)return Em;Tm=1;var e=Av();return Em=function(t){for(var n=[],r=0;r<t.tracks.length;r++)n.push([]);var i=e[0];return t.tracks.forEach((function(t,r){t.forEach((function(t){switch(t.cmd){case"note":var s=void 0!==t.instrument?e[t.instrument]:i;if(t.duration>0){var a=t.gap?t.gap:0,o=t.duration;a=Math.min(a,2*o/3);var c={pitch:t.pitch,instrument:s,start:Math.round(1e6*t.start)/1e6,end:Math.round(1e6*(t.start+o-a))/1e6,volume:t.volume};t.startChar&&(c.startChar=t.startChar),t.endChar&&(c.endChar=t.endChar),t.style&&(c.style=t.style),t.cents&&(c.cents=t.cents),n[r].push(c)}break;case"program":i=e[t.instrument];break;case"text":break;default:console.log("Unhandled midi event",t)}}))})),n}}(),n=Nv(),r=Iv(),i=Ov(),s=Dv(),a=Av(),o=Lv(),c=function(){if(qm)return jm;qm=1;var e=Pv(),t=Dv(),n=Bv(),r=function(e,t,n){for(var r=0;r<2;r++)for(var i=t.getChannelData(r),s=e.getChannelData(r),a=0;a<i.length;a++)s[a+n]+=i[a]};return jm=function(i,s,a,o,c,l,u,h,d){var f=window.OfflineAudioContext||window.webkitOfflineAudioContext,p=a.len*a.tempoMultiplier;l&&(p+=l/1e3),(p-=h)<0&&(p=.005);var m=new f(2,Math.floor((p+u)*s),s),g=t[a.pitch];if(!e[a.instrument])return d&&d("placeNote skipped (instrument empty): "+a.instrument+":"+g),Promise.resolve();var v=e[a.instrument][g];return v?v.then((function(e){var t=m.createBufferSource();t.buffer=e.audioBuffer;var h,f=a.volume/96*c;return t.gainNode=m.createGain(),a.pan&&m.createStereoPanner&&(t.panNode=m.createStereoPanner(),t.panNode.pan.setValueAtTime(a.pan,0)),t.gainNode.gain.value=f,t.gainNode.gain.linearRampToValueAtTime(t.gainNode.gain.value,p),t.gainNode.gain.linearRampToValueAtTime(0,p+u),a.cents&&(t.playbackRate.value=n(a.cents)),t.panNode?(t.panNode.connect(m.destination),t.gainNode.connect(t.panNode)):t.gainNode.connect(m.destination),t.connect(t.gainNode),t.start(0),t.noteOff?t.noteOff(p+u):t.stop(p+u),m.oncomplete=function(e){if(e.renderedBuffer&&e.renderedBuffer.getChannelData)for(var t=0;t<o.length;t++){var n=o[t]*a.tempoMultiplier;l&&(n-=l/1e3),n<0&&(n=0),n=Math.floor(n*s),r(i,e.renderedBuffer,n)}d&&d("placeNote: "+a.instrument+":"+g),h()},m.startRendering(),new Promise((function(e){h=e}))})).catch((function(e){return d&&d("placeNote catch: "+e.message),Promise.resolve()})):(d&&d("placeNote skipped: "+a.instrument+":"+g),Promise.resolve())}}(),l=Pv(),u="MIDI is not supported in this browser.",h="https://paulrosen.github.io/midi-js-soundfonts/abcjs/",d="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/";return Hm=function(){var f=this;f.audioBufferPossible=void 0,f.directSource=[],f.startTimeSec=void 0,f.pausedTimeSec=void 0,f.audioBuffers=[],f.duration=void 0,f.isRunning=!1,f.options=void 0,f.pickupLength=0,f.init=function(e){e||(e={}),e.options&&(f.options=e.options),n(e.audioContext);var t=r().currentTime;if(f.debugCallback=e.debugCallback,f.debugCallback&&f.debugCallback("init called"),f.audioBufferPossible=f._deviceCapable(),!f.audioBufferPossible)return Promise.reject({status:"NotSupported",message:u});var i=e.options?e.options:{};f.soundFontUrl=i.soundFontUrl?i.soundFontUrl:d,"/"!==f.soundFontUrl[f.soundFontUrl.length-1]&&(f.soundFontUrl+="/"),i.soundFontVolumeMultiplier||0===i.soundFontVolumeMultiplier?f.soundFontVolumeMultiplier=i.soundFontVolumeMultiplier:f.soundFontUrl===d||"https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/"===f.soundFontUrl?f.soundFontVolumeMultiplier=3:f.soundFontUrl===h?f.soundFontVolumeMultiplier=.4:f.soundFontVolumeMultiplier=1,i.programOffsets?f.programOffsets=i.programOffsets:f.soundFontUrl===h?f.programOffsets={bright_acoustic_piano:20,honkytonk_piano:20,electric_piano_1:30,electric_piano_2:30,harpsichord:40,clavinet:20,celesta:20,glockenspiel:40,vibraphone:30,marimba:35,xylophone:30,tubular_bells:35,dulcimer:30,drawbar_organ:20,percussive_organ:25,rock_organ:20,church_organ:40,reed_organ:40,accordion:40,harmonica:40,acoustic_guitar_nylon:20,acoustic_guitar_steel:30,electric_guitar_jazz:25,electric_guitar_clean:15,electric_guitar_muted:35,overdriven_guitar:25,distortion_guitar:20,guitar_harmonics:30,electric_bass_finger:15,electric_bass_pick:30,fretless_bass:40,violin:105,viola:50,cello:40,contrabass:60,trumpet:10,trombone:90,alto_sax:20,tenor_sax:20,clarinet:20,flute:50,banjo:50,woodblock:20}:f.programOffsets={};var o=void 0!==i.fadeLength?parseInt(i.fadeLength,10):NaN;if(f.fadeLength=isNaN(o)?200:o,o=void 0!==i.noteEnd?parseInt(i.noteEnd,10):NaN,f.noteEnd=isNaN(o)?0:o,f.pan=i.pan,f.meterSize=1,e.visualObj){f.flattened=e.visualObj.setUpAudio(i),e.visualObj.getMeterFraction().den&&(f.meterSize=e.visualObj.getMeterFraction().num/e.visualObj.getMeterFraction().den),f.pickupLength=e.visualObj.getPickupLength()}else{if(!e.sequence)return Promise.reject(new Error("Must pass in either a visualObj or a sequence"));f.flattened=e.sequence}f.millisecondsPerMeasure=e.millisecondsPerMeasure?e.millisecondsPerMeasure:e.visualObj?e.visualObj.millisecondsPerMeasure(f.flattened.tempo):1e3,f.beatsPerMeasure=e.visualObj?e.visualObj.getBeatsPerMeasure():4,f.sequenceCallback=i.sequenceCallback,f.callbackContext=i.callbackContext,f.onEnded=i.onEnded,f.meterFraction=e.visualObj?e.visualObj.getMeterFraction():{den:1};var c={},p=[],m=[],g=a[0];f.flattened.tracks.forEach((function(e){e.forEach((function(e){if("program"===e.cmd&&a[e.instrument]&&(g=a[e.instrument]),void 0!==e.pitch){var t=e.pitch,n=s[t],r=void 0!==e.instrument?a[e.instrument]:g;if(n)if(c[r]||(c[r]={}),l[r]&&l[r][n]){var i=r+":"+n;p.indexOf(i)<0&&p.push(i)}else c[r][n]=!0;else{var o=r+":"+n;console.log("Can't find note: ",t,o),m.indexOf(o)<0&&m.push(o)}}}))})),f.debugCallback&&f.debugCallback("note gathering time = "+Math.floor(1e3*(r().currentTime-t))+"ms"),t=r().currentTime;var v=[];Object.keys(c).forEach((function(e){Object.keys(c[e]).forEach((function(t){v.push({instrument:e,note:t})}))})),f.debugCallback&&f.debugCallback("notes "+JSON.stringify(v));for(var b=[],y=0;y<v.length;y+=256)b.push(v.slice(y,y+256));return new Promise((function(e,n){var i={cached:p,error:m,loaded:[]},s=0,a=function(){f.debugCallback&&f.debugCallback("loadBatch idx="+s+" len="+b.length),s<b.length?f._loadBatch(b[s],f.soundFontUrl,t).then((function(e){f.debugCallback&&f.debugCallback("loadBatch then"),t=r().currentTime,e&&(e.error&&(i.error=i.error.concat(e.error)),e.loaded&&(i.loaded=i.loaded.concat(e.loaded))),s++,a()}),n):(f.debugCallback&&f.debugCallback("resolve init"),e(i))};a()}))},f._loadBatch=function(t,n,i,s){var a=[];return t.forEach((function(t){f.debugCallback&&f.debugCallback("getNote "+t.instrument+":"+t.note),a.push(e(n,t.instrument,t.note,r()))})),Promise.all(a).then((function(e){f.debugCallback&&f.debugCallback("mp3 load time = "+Math.floor(1e3*(r().currentTime-i))+"ms");for(var a=[],o=[],c=[],l=[],u=0;u<e.length;u++){var h=e[u],d=h.instrument+":"+h.name;"loaded"===h.status?a.push(d):"pending"===h.status?c.push(d):"cached"===h.status?o.push(d):l.push(d+" "+h.message)}if(c.length>0){if(f.debugCallback&&f.debugCallback("pending "+JSON.stringify(c)),s?s*=2:s=50,s<9e4)return new Promise((function(e,t){setTimeout((function(){var r=[];for(u=0;u<c.length;u++)d=c[u].split(":"),r.push({instrument:d[0],note:d[1]});f.debugCallback&&f.debugCallback("retry "+JSON.stringify(r)),f._loadBatch(r,n,i,s).then((function(t){e(t)})).catch((function(e){t(e)}))}),s)}));for(var p=[],m=0;m<t.length;m++)p.push(t[m].instrument+"/"+t[m].note);return f.debugCallback&&f.debugCallback("loadBatch timeout"),Promise.reject(new Error("timeout attempting to load: "+p.join(", ")))}return f.debugCallback&&f.debugCallback("loadBatch resolve"),Promise.resolve({loaded:a,cached:o,error:l})})).catch((function(e){f.debugCallback&&f.debugCallback("loadBatch catch "+e.message)}))},f.prime=function(){var e=f.fadeLength/1e3;return f.isRunning=!1,f.audioBufferPossible?(f.debugCallback&&f.debugCallback("prime called"),new Promise((function(n){var i=r().currentTime,s=f.millisecondsPerMeasure/1e3/f.meterSize;if(f.duration=f.flattened.totalDuration*s,f.duration<=0)return f.audioBuffers=[],n({status:"empty",seconds:0});f.duration+=e;var a=Math.floor(r().sampleRate*f.duration);f.stop();var o=t(f.flattened);f.options.swing&&function(e,t,n,r){if(4!=n.den&&8!=n.den)return;if(t=parseFloat(t),isNaN(t)||t<=50)return;t>75&&(t=75);t=t/50-1;var i=0,s=.25;8===n.den&&(s/=2);for(var a=s/2,o=a*t,c=0;c<e.length;c++)for(var l=e[c],u=0;u<l.length;u++){var h=l[u];if((h.start-r)%a==0&&(h.start-r)%s!=0&&(0==u||l[u-1].start<=l[u].start-a)&&(u==l.length-1||l[u+1].start>=l[u].start+a)){var d=h.start;h.start+=o,h.volume*=1+i,u>0&&l[u-1].end==d&&(l[u-1].end=h.start,l[u-1].volume*=1-i)}}}(o,f.options.swing,f.meterFraction,f.pickupLength),f.sequenceCallback&&f.sequenceCallback(o,f.callbackContext);var l=function(e,t){if(null==t)return null;var n=[];if(t.length){for(var r=0;r<e;r++)if(r<t.length){var i=parseFloat(t[r]);i<-1?i=-1:i>1&&(i=1),n.push(i)}else n.push(0);return n}var s=parseFloat(t);if(s*(e-1)>2)return null;for(var a=e%2==0,o=a?0-s/2:0,c=o+s,l=0;l<e;l++)(a=l%2==0)?(n.push(o),o-=s):(n.push(c),c+=s);return n}(o.length,f.pan),u={};o.forEach((function(e,t){var n=l&&l.length>t?l[t]:0;e.forEach((function(e){var t=e.instrument+":"+e.pitch+":"+e.volume+":"+Math.round(1e3*(e.end-e.start))/1e3+":"+n+":"+s+":"+(e.cents?e.cents:0);f.debugCallback&&f.debugCallback("noteMapTrack "+t),u[t]||(u[t]=[]),u[t].push(e.start)}))}));for(var h=[],d=r().createBuffer(2,a,r().sampleRate),p=0;p<Object.keys(u).length;p++){var m=Object.keys(u)[p],g=m.split(":"),v=void 0!==g[6]?parseFloat(g[6]):0;g={instrument:g[0],pitch:parseInt(g[1],10),volume:parseInt(g[2],10),len:parseFloat(g[3]),pan:parseFloat(g[4]),tempoMultiplier:parseFloat(g[5]),cents:v},h.push(c(d,r().sampleRate,g,u[m],f.soundFontVolumeMultiplier,f.programOffsets[g.instrument],e,f.noteEnd/1e3,f.debugCallback))}function b(e){var t=e&&e.audioBuffers&&e.audioBuffers.length>0?e.audioBuffers[0].duration:0;return{status:r().state,duration:t}}f.audioBuffers=[d],f.debugCallback&&(f.debugCallback("sampleRate = "+r().sampleRate),f.debugCallback("totalSamples = "+a),f.debugCallback("creationTime = "+Math.floor(1e3*(r().currentTime-i))+"ms")),Promise.all(h).then((function(){"suspended"===r().state?r().resume().then((function(){n(b(f))})):"interrupted"===r().state?r().suspend().then((function(){r().resume().then((function(){n(b(f))}))})):n(b(f))}))}))):Promise.reject(new Error(u))},f.start=function(){if(!f.audioBufferPossible)throw new Error(u);f.debugCallback&&f.debugCallback("start called");var e=f.pausedTimeSec?f.pausedTimeSec:0;f._kickOffSound(e),f.startTimeSec=r().currentTime-e,f.pausedTimeSec=void 0,f.debugCallback&&f.debugCallback("MIDI STARTED",f.startTimeSec)},f.pause=function(){if(!f.audioBufferPossible)throw new Error(u);return f.debugCallback&&f.debugCallback("pause called"),f.pausedTimeSec=f.stop(),f.pausedTimeSec},f.resume=function(){f.start()},f.seek=function(e,t){var n;switch(t){case"seconds":n=e;break;case"beats":n=e*f.millisecondsPerMeasure/f.beatsPerMeasure/1e3;break;default:n=(f.duration-f.fadeLength/1e3)*e}if(!f.audioBufferPossible)throw new Error(u);f.debugCallback&&f.debugCallback("seek called sec="+n),f.isRunning?(f.stop(),f._kickOffSound(n)):f.pausedTimeSec=n,f.pausedTimeSec=n},f.stop=function(){return f.isRunning=!1,f.pausedTimeSec=void 0,f.directSource.forEach((function(e){try{e.stop()}catch(t){console.log("direct source didn't stop:",t)}})),f.directSource=[],r().currentTime-f.startTimeSec},f.finished=function(){f.startTimeSec=void 0,f.pausedTimeSec=void 0,f.isRunning=!1},f.download=function(){return o(f)},f.getAudioBuffer=function(){return f.audioBuffers[0]},f.getIsRunning=function(){return f.isRunning},f._deviceCapable=function(){return!!i()||(console.warn(u),f.debugCallback&&f.debugCallback(u),!1)},f._kickOffSound=function(e){f.isRunning=!0,f.directSource=[],f.audioBuffers.forEach((function(e,t){f.directSource[t]=r().createBufferSource(),f.directSource[t].buffer=e,f.directSource[t].connect(r().destination)})),f.directSource.forEach((function(t){t.start(0,e)})),f.onEnded&&(f.directSource[0].onended=function(){f.onEnded(f.callbackContext)})}}}function Rv(){if(Gm)return Um;Gm=1;return Um=function(){var e=this;e.tracks=[],e.totalDuration=0,e.currentInstrument=[],e.starts=[],e.addTrack=function(){return e.tracks.push([]),e.currentInstrument.push(0),e.starts.push(0),e.tracks.length-1},e.setInstrument=function(t,n){e.tracks[t].push({channel:0,cmd:"program",instrument:n}),e.currentInstrument[t]=n},e.appendNote=function(t,n,r,i,s){var a={cmd:"note",duration:r,gap:0,instrument:e.currentInstrument[t],pitch:n,start:e.starts[t],volume:i};s&&(a.cents=s),e.tracks[t].push(a),e.starts[t]+=r,e.totalDuration=Math.max(e.totalDuration,e.starts[t])}}}function Fv(){if(ig)return rg;ig=1;var e=Ov(),t=Nv(),n=Iv(),r=$m?Wm:($m=1,Wm='\n<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" preserveAspectRatio="xMidYMid meet">\n\t<g transform="translate(0,700) scale(0.1,-0.1)" >\n\t<path d="M3111 6981 c-20 -37 -90 -55 -364 -96 -120 -18 -190 -33 -244 -55\n\t-42 -17 -124 -42 -182 -56 -78 -18 -119 -34 -157 -60 -28 -19 -86 -46 -128\n\t-60 -43 -13 -107 -42 -144 -64 -37 -23 -84 -46 -106 -52 -21 -7 -56 -29 -79\n\t-50 -22 -22 -61 -50 -86 -63 -26 -13 -67 -40 -91 -60 -24 -20 -65 -47 -90 -60\n\t-25 -13 -53 -31 -61 -41 -8 -9 -32 -30 -54 -46 -75 -54 -486 -460 -512 -507\n\t-15 -25 -48 -69 -75 -98 -26 -28 -48 -57 -48 -63 0 -6 -18 -29 -39 -53 -21\n\t-23 -56 -71 -77 -107 -20 -36 -50 -80 -65 -97 -16 -18 -33 -52 -40 -75 -12\n\t-47 -47 -115 -84 -166 -13 -18 -30 -56 -38 -83 -8 -27 -34 -80 -56 -118 -33\n\t-53 -46 -91 -62 -167 -12 -63 -34 -127 -59 -179 -42 -84 -60 -166 -60 -270 0\n\t-90 26 -122 125 -154 54 -17 96 -19 430 -20 305 -1 381 2 430 14 82 22 140 51\n\t153 78 6 12 22 47 37 77 14 30 38 77 54 103 15 27 34 73 40 103 7 30 28 78 48\n\t107 19 28 44 74 55 101 10 28 34 67 53 87 18 20 49 61 68 90 19 30 44 63 57\n\t74 13 11 36 40 52 65 59 94 232 270 306 313 20 11 57 37 82 58 25 20 70 52\n\t100 72 30 19 66 47 79 61 13 14 49 35 80 46 30 12 80 37 111 56 31 19 95 45\n\t143 58 48 12 110 37 139 55 63 40 127 55 323 76 83 9 208 28 279 41 156 29\n\t165 29 330 4 453 -71 514 -84 606 -130 31 -16 83 -36 116 -45 32 -9 84 -34\n\t115 -56 31 -21 82 -48 113 -60 32 -11 72 -33 89 -48 18 -16 59 -45 92 -65 33\n\t-21 74 -51 90 -66 17 -15 49 -40 73 -54 52 -32 65 -61 50 -113 -8 -31 -61 -90\n\t-277 -308 -300 -303 -361 -382 -369 -481 -2 -29 0 -66 6 -81 13 -40 88 -138\n\t115 -151 12 -6 54 -26 92 -44 l70 -33 945 -2 c520 -1 975 2 1012 7 64 8 191\n\t50 231 76 11 7 33 34 50 60 22 34 42 51 65 58 l32 9 0 1101 0 1102 -32 9 c-21\n\t7 -44 26 -64 55 -60 84 -77 97 -140 110 -44 9 -76 10 -127 2 -59 -9 -77 -17\n\t-134 -62 -37 -28 -172 -155 -301 -281 -129 -127 -249 -237 -267 -245 -25 -10\n\t-41 -11 -71 -2 -58 15 -112 45 -124 69 -6 11 -35 35 -64 54 -28 18 -58 41 -66\n\t50 -8 9 -41 35 -75 58 -33 22 -77 56 -99 75 -21 18 -64 46 -95 61 -31 14 -73\n\t39 -93 55 -20 15 -70 40 -110 55 -40 15 -97 44 -127 64 -29 21 -78 44 -107 53\n\t-30 8 -77 31 -105 51 -42 28 -73 39 -173 60 -68 14 -154 39 -196 58 -95 43\n\t-131 51 -343 76 -209 24 -242 32 -279 70 l-30 29 -328 0 c-312 0 -330 -1 -339\n\t-19z"></path>\n\t<path d="M254 2875 c-89 -16 -107 -26 -145 -78 -32 -44 -62 -66 -91 -67 -17 0\n\t-18 -61 -18 -1140 l0 -1140 24 0 c16 0 41 -17 72 -50 40 -42 61 -55 117 -72\n\tl69 -21 82 23 c44 12 96 30 114 39 18 9 148 132 290 272 141 141 267 261 279\n\t268 51 26 86 14 176 -61 32 -26 62 -48 66 -48 5 0 36 -25 70 -55 34 -30 74\n\t-61 89 -69 15 -8 37 -28 50 -45 12 -17 50 -45 84 -62 34 -17 78 -44 98 -60 19\n\t-16 61 -37 93 -48 32 -11 81 -37 107 -56 27 -20 76 -45 109 -56 33 -12 75 -31\n\t93 -44 62 -45 93 -58 191 -82 54 -12 130 -37 168 -54 68 -29 180 -58 226 -59\n\t62 0 183 -64 183 -96 0 -12 88 -14 639 -14 l639 0 12 30 c18 44 76 66 233 89\n\t89 14 160 30 200 47 34 15 106 42 159 60 54 18 112 44 130 57 47 35 85 52 146\n\t67 29 7 76 28 105 48 29 20 77 48 107 63 30 15 66 39 80 54 14 15 50 40 81 56\n\t31 15 78 46 104 69 26 22 61 46 79 54 17 7 43 26 56 42 14 16 41 41 60 56 64\n\t48 380 362 408 405 15 23 40 51 55 63 15 12 36 38 46 58 11 21 37 57 58 82 22\n\t25 49 62 62 83 13 20 38 56 57 78 19 23 50 74 69 113 19 39 46 86 59 104 14\n\t18 34 62 46 98 12 36 32 77 45 92 31 38 60 97 80 167 9 33 26 76 37 95 29 50\n\t47 103 68 206 10 52 32 117 51 155 29 56 33 74 34 140 0 94 -10 108 -101 138\n\t-61 20 -83 21 -463 21 -226 0 -421 -4 -451 -10 -63 -12 -86 -30 -110 -85 -10\n\t-22 -33 -63 -52 -92 -21 -31 -42 -80 -53 -123 -11 -44 -32 -93 -56 -128 -20\n\t-32 -47 -83 -59 -115 -12 -32 -37 -77 -56 -100 -19 -23 -50 -65 -69 -94 -19\n\t-29 -44 -57 -54 -63 -11 -5 -29 -27 -42 -47 -52 -85 -234 -277 -300 -315 -25\n\t-15 -53 -38 -62 -51 -9 -14 -42 -39 -74 -57 -32 -18 -75 -48 -95 -66 -21 -18\n\t-59 -44 -85 -58 -26 -13 -72 -40 -100 -59 -35 -24 -78 -41 -128 -52 -47 -11\n\t-99 -31 -139 -56 -69 -42 -94 -49 -391 -110 -245 -51 -425 -66 -595 -50 -168\n\t16 -230 27 -330 61 -47 16 -123 35 -170 44 -98 17 -123 25 -172 58 -20 14 -71\n\t37 -114 53 -44 15 -95 40 -115 56 -20 16 -70 42 -110 59 -40 16 -88 45 -108\n\t63 -20 19 -55 46 -78 61 -24 14 -49 35 -55 47 -7 11 -34 33 -60 49 -50 31 -65\n\t61 -53 102 4 13 130 147 281 298 236 238 277 283 299 335 15 32 35 71 46 86\n\t12 18 19 44 19 76 0 42 -8 63 -53 138 -92 151 11 139 -1207 141 -798 2 -1030\n\t0 -1086 -11z"></path>\n\t</g>\n</svg>\n'),i=Qm?Km:(Qm=1,Km='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-play-svg">\n <g>\n <polygon points="4 0 23 12.5 4 25"/>\n </g>\n</svg>\n'),s=Zm?Xm:(Zm=1,Xm='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-pause-svg">\n <g>\n <rect width="8.23" height="25"/>\n <rect width="8.23" height="25" x="17"/>\n </g>\n</svg>\n'),a=eg?Jm:(eg=1,Jm='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="abcjs-loading-svg">\n <circle cx="50" cy="50" fill="none" stroke-width="20" r="35" stroke-dasharray="160 55"></circle>\n</svg>\n'),o=ng?tg:(ng=1,tg='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25">\n <g>\n <polygon points="5 12.5 24 0 24 25"/>\n <rect width="3" height="25" x="0" y="0"/>\n </g>\n</svg>\n');function c(r,i,s,a,o){var c=!0;if(n()?c="suspended"===n().state:t(),!e())throw{status:"NotSupported",message:"This browser does not support audio."};(c||o)&&s&&s.classList.add("abcjs-loading"),c?n().resume().then((function(){a?a().then((function(e){l(r,i,s,o)})):l(r,i,s,o)})):l(r,i,s,o)}function l(e,t,n,r){r?e(t).then((function(){n&&n.classList.remove("abcjs-loading")})):(e(t),n&&n.classList.remove("abcjs-loading"))}return rg=function(e,l){var u=this;if("string"==typeof e){var h=e;if(!(e=document.querySelector(h)))throw new Error('Cannot find element "'+h+'" in the DOM.')}else if(!(e instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(u.parent=e,u.options={},l&&(u.options=Object.assign({},l)),u.options.ac&&t(u.options.ac),function(e,t){var n=!!t.loopHandler,c=!!t.restartHandler,l=!!t.playHandler||!!t.playPromiseHandler,u=!!t.progressHandler,h=!!t.warpHandler,d=!1!==t.hasClock,f='<div class="abcjs-inline-audio">\n';if(n){var p=t.repeatTitle?t.repeatTitle:"Click to toggle play once/repeat.";f+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+p+'" aria-label="'+(t.repeatAria?t.repeatAria:p)+'">'+r+"</button>\n"}if(c){var m=t.restartTitle?t.restartTitle:"Click to go to beginning.";f+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+m+'" aria-label="'+(t.restartAria?t.restartAria:m)+'">'+o+"</button>\n"}if(l){var g=t.playTitle?t.playTitle:"Click to play/pause.";f+='<button type="button" class="abcjs-midi-start abcjs-btn" title="'+g+'" aria-label="'+(t.playAria?t.playAria:g)+'">'+i+s+a+"</button>\n"}if(u){var v=t.randomTitle?t.randomTitle:"Click to change the playback position.";f+='<button type="button" class="abcjs-midi-progress-background" title="'+v+'" aria-label="'+(t.randomAria?t.randomAria:v)+'"><span class="abcjs-midi-progress-indicator"></span></button>\n'}d&&(f+='<span class="abcjs-midi-clock"></span>\n');if(h){var b=t.warpTitle?t.warpTitle:"Change the playback speed.";f+='<span class="abcjs-tempo-wrapper"><label><input class="abcjs-midi-tempo" type="number" min="1" max="300" value="100" title="'+b+'" aria-label="'+(t.warpAria?t.warpAria:b)+'">%</label><span> (<span class="abcjs-midi-current-tempo"></span> '+(t.bpm?t.bpm:"BPM")+")</span></span>\n"}f+='<div class="abcjs-css-warning" style="font-size: 12px;color:red;border: 1px solid red;text-align: center;width: 300px;margin-top: 4px;font-weight: bold;border-radius: 4px;">CSS required: load abcjs-audio.css</div>',f+="</div>\n",e.innerHTML=f}(u.parent,u.options),function(e){var t=!!e.options.loopHandler,n=!!e.options.restartHandler,r=!!e.options.playHandler||!!e.options.playPromiseHandler,i=!!e.options.progressHandler,s=!!e.options.warpHandler,a=e.parent.querySelector(".abcjs-midi-start");t&&e.parent.querySelector(".abcjs-midi-loop").addEventListener("click",(function(t){c(e.options.loopHandler,t,a,e.options.afterResume)}));n&&e.parent.querySelector(".abcjs-midi-reset").addEventListener("click",(function(t){c(e.options.restartHandler,t,a,e.options.afterResume)}));r&&a.addEventListener("click",(function(t){c(e.options.playPromiseHandler||e.options.playHandler,t,a,e.options.afterResume,!!e.options.playPromiseHandler)}));i&&e.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",(function(t){c(e.options.progressHandler,t,a,e.options.afterResume)}));s&&e.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",(function(t){c(e.options.warpHandler,t,a,e.options.afterResume)}))}(u),u.disable=function(e){var t=u.parent.querySelector(".abcjs-inline-audio");e?t.classList.add("abcjs-disabled"):t.classList.remove("abcjs-disabled")},u.setWarp=function(e,t){u.parent.querySelector(".abcjs-midi-tempo").value=Math.round(t),u.setTempo(e)},u.setTempo=function(e){var t=u.parent.querySelector(".abcjs-midi-current-tempo");t&&(t.innerHTML=Math.round(e))},u.resetAll=function(){for(var e=u.parent.querySelectorAll(".abcjs-pushed"),t=0;t<e.length;t++){e[t].classList.remove("abcjs-pushed")}},u.pushPlay=function(e){var t=u.parent.querySelector(".abcjs-midi-start");t&&(e?t.classList.add("abcjs-pushed"):t.classList.remove("abcjs-pushed"))},u.pushLoop=function(e){var t=u.parent.querySelector(".abcjs-midi-loop");t&&(e?t.classList.add("abcjs-pushed"):t.classList.remove("abcjs-pushed"))},u.setProgress=function(e,t){var n=u.parent.querySelector(".abcjs-midi-progress-background"),r=u.parent.querySelector(".abcjs-midi-progress-indicator");if(n&&r){var i=n.clientWidth*e;r.style.left=i+"px";var s=u.parent.querySelector(".abcjs-midi-clock");if(s){var a=t*e/1e3,o=Math.floor(a/60),c=Math.floor(a%60),l=c<10?"0"+c:c;s.innerHTML=o+":"+l}}},u.options.afterResume){var d=!1;u.options.ac?d="suspended"!==u.options.ac.state:n()&&(d="suspended"!==n().state),d&&u.options.afterResume()}}}function zv(){if(cg)return og;cg=1;var e=Fv(),t=Vv(),n=hh(),r=Iv();return og=function(){var i=this;i.warp=100,i.cursorControl=null,i.visualObj=null,i.timer=null,i.midiBuffer=null,i.options=null,i.currentTempo=null,i.control=null,i.isLooping=!1,i.isStarted=!1,i.isLoaded=!1,i.isLoading=!1,i.load=function(t,n,r){r||(r={}),void 0===r.displayPlay&&(r.displayPlay=!0),void 0===r.displayProgress&&(r.displayProgress=!0),i.control=new e(t,{loopHandler:r.displayLoop?i.toggleLoop:void 0,restartHandler:r.displayRestart?i.restart:void 0,playPromiseHandler:r.displayPlay?i.play:void 0,progressHandler:r.displayProgress?i.randomAccess:void 0,warpHandler:r.displayWarp?i.onWarp:void 0,afterResume:i.init}),i.cursorControl=n,i.disable(!0)},i.disable=function(e){i.control&&i.control.disable(e)},i.setTune=function(e,t,n){return i.visualObj=e,i.disable(!1),i.options=n||{},i.control&&(i.pause(),i.setProgress(0,1),i.control.resetAll(),i.restart(),i.isStarted=!1),i.isLooping=!1,t?i.go():Promise.resolve({status:"no-audio-context"})},i.go=function(){i.isLoading=!0;var e,s=100*i.visualObj.millisecondsPerMeasure()/i.warp;return i.currentTempo=Math.round(i.visualObj.getBeatsPerMeasure()/s*6e4),i.control&&i.control.setTempo(i.currentTempo),i.percent=0,i.midiBuffer||(i.midiBuffer=new t),r().resume().then((function(e){return i.midiBuffer.init({visualObj:i.visualObj,options:i.options,millisecondsPerMeasure:s})})).then((function(t){return e=t,i.midiBuffer.prime()})).then((function(){var t=16;return i.cursorControl&&void 0!==i.cursorControl.beatSubdivisions&&parseInt(i.cursorControl.beatSubdivisions,10)>=1&&parseInt(i.cursorControl.beatSubdivisions,10)<=64&&(t=parseInt(i.cursorControl.beatSubdivisions,10)),i.timer=new n(i.visualObj,{beatCallback:i.beatCallback,eventCallback:i.eventCallback,lineEndCallback:i.lineEndCallback,qpm:i.currentTempo,extraMeasuresAtBeginning:i.cursorControl?i.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:i.cursorControl?i.cursorControl.lineEndAnticipation:0,beatSubdivisions:t}),i.cursorControl&&i.cursorControl.onReady&&"function"==typeof i.cursorControl.onReady&&i.cursorControl.onReady(i),i.isLoaded=!0,i.isLoading=!1,Promise.resolve({status:"created",notesStatus:e})}))},i.destroy=function(){i.timer&&(i.timer.reset(),i.timer.stop(),i.timer=null),i.midiBuffer&&(i.midiBuffer.stop(),i.midiBuffer=null),i.setProgress(0,1),i.control&&i.control.resetAll()},i.play=function(){return i.runWhenReady(i._play,void 0)},i.runWhenReady=function(e,t){return i.visualObj?i.isLoading?(n=500,new Promise((function(e){setTimeout(e,n)}))).then((function(){return i.isLoading?i.runWhenReady(e,t):e(t)})):i.isLoaded?e(t):i.go().then((function(){return e(t)})):Promise.resolve({status:"loading"});var n},i._play=function(){return r().resume().then((function(){return i.isStarted=!i.isStarted,i.isStarted?(i.cursorControl&&i.cursorControl.onStart&&"function"==typeof i.cursorControl.onStart&&i.cursorControl.onStart(),i.midiBuffer.start(),i.timer.start(i.percent),i.control&&i.control.pushPlay(!0)):i.pause(),Promise.resolve({status:"ok"})}))},i.pause=function(){i.timer&&(i.timer.pause(),i.midiBuffer.pause(),i.control&&i.control.pushPlay(!1))},i.toggleLoop=function(){i.isLooping=!i.isLooping,i.control&&i.control.pushLoop(i.isLooping)},i.restart=function(){i.timer&&(i.timer.setProgress(0),i.midiBuffer.seek(0))},i.randomAccess=function(e){return i.runWhenReady(i._randomAccess,e)},i._randomAccess=function(e){var t=e.target.classList.contains("abcjs-midi-progress-indicator")?e.target.parentNode:e.target,n=(e.x-t.getBoundingClientRect().left)/t.offsetWidth;return n<0&&(n=0),n>1&&(n=1),i.seek(n),Promise.resolve({status:"ok"})},i.seek=function(e,t){i.timer&&i.midiBuffer&&(i.timer.setProgress(e,t),i.midiBuffer.seek(e,t))},i.setWarp=function(e){if(parseInt(e,10)>0){i.warp=parseInt(e,10);var t=i.isStarted,n=i.percent;return i.destroy(),i.isStarted=!1,i.go().then((function(){return i.setProgress(n,1e3*i.midiBuffer.duration),i.control&&i.control.setWarp(i.currentTempo,i.warp),t?i.play().then((function(){return i.seek(n),Promise.resolve()})):(i.seek(n),Promise.resolve())}))}return Promise.resolve()},i.onWarp=function(e){var t=e.target.value;return i.setWarp(t)},i.setProgress=function(e,t){i.percent=e,i.control&&i.control.setProgress(e,t)},i.finished=function(){if(i.timer.reset(),i.isLooping)return i.timer.start(0),i.midiBuffer.finished(),i.midiBuffer.start(),"continue";i.timer.stop(),i.isStarted&&(i.control&&i.control.pushPlay(!1),i.isStarted=!1,i.midiBuffer.finished(),i.cursorControl&&i.cursorControl.onFinished&&"function"==typeof i.cursorControl.onFinished&&i.cursorControl.onFinished(),i.setProgress(0,1))},i.beatCallback=function(e,t,n,r){var s=e/t;i.setProgress(s,n),i.cursorControl&&i.cursorControl.onBeat&&"function"==typeof i.cursorControl.onBeat&&i.cursorControl.onBeat(e,t,n,r)},i.eventCallback=function(e){if(!e)return i.finished();i.cursorControl&&i.cursorControl.onEvent&&"function"==typeof i.cursorControl.onEvent&&i.cursorControl.onEvent(e)},i.lineEndCallback=function(e,t){i.cursorControl&&i.cursorControl.onLineEnd&&"function"==typeof i.cursorControl.onLineEnd&&i.cursorControl.onLineEnd(e,t)},i.getUrl=function(){return i.midiBuffer.download()},i.download=function(e){var t=i.getUrl(),n=document.createElement("a");document.body.appendChild(n),n.setAttribute("style","display: none;"),n.href=t,n.download=e||"output.wav",n.click(),window.URL.revokeObjectURL(t),document.body.removeChild(n)}}}function jv(){if(ug)return lg;ug=1;var e,t=Bv();return function(){function n(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n]);return e}function r(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}r.prototype.setTempo=function(e){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+s(Math.round(6e7/e),6),this.endTrack())},r.prototype.setGlobalInfo=function(e,t,n,r){if(0===this.trackcount){this.startTrack();var a=Math.round(6e7/e);this.track+="%00%FF%51%03"+s(a,6),n&&(this.track+=function(e){if(!e||!e.accidentals)return"";for(var t="%00%FF%59%02",n=0,r=256,i=0;i<e.accidentals.length;i++)"sharp"===e.accidentals[i].acc?n++:"flat"===e.accidentals[i].acc&&r--;var a=s(256!==r?r:n,2),o="m"===e.mode?"%01":"%00";return t+a+o}(n)),r&&(this.track+=function(e){var t,n="%00%FF%58%04"+s(e.num,2),r={1:0,2:1,4:2,8:3,16:4,32:5}[e.den];if(!r)return"";switch(n+=s(r,2),e.num+"/"+e.den){case"2/4":case"3/4":case"4/4":case"5/4":t=24;break;case"6/4":t=72;break;case"2/2":case"3/2":case"4/2":t=48;break;case"3/8":case"6/8":case"9/8":case"12/8":t=36}return t?(n+=s(t,2))+"%08":""}(r)),t&&(this.track+=i(t,"%01")),this.endTrack()}},r.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},r.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var e=s(this.track.length/3+4,8);this.track="MTrk"+e+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},r.prototype.setText=function(e,t){if("name"===e)this.trackName=i(t,"%03")},r.prototype.setInstrument=function(e){this.trackInstrument="%00%C0"+s(e,2),this.instrument=e},r.prototype.setChannel=function(e,t){this.channel=e;var n="%00%B"+this.channel.toString(16);this.track+=n+"%79%00",this.track+=n+"%40%00",this.track+=n+"%5B%30",t||(t=0),t=Math.round(64*(t+1)),this.track+=n+"%0A"+s(t,2),this.track+=n+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};function i(e,t){for(var n="",r=0;r<e.length;r++)n+=s(e.charCodeAt(r),2);return"%00%FF"+t+s(n.length/3,2)+n}function s(e,t){var n=e.toString(16);for(n=n.split(".")[0];n.length<t;)n="0"+n;return n.length>t&&(n=n.substring(0,t)),function(e){for(var t="",n=0;n<e.length;n+=2)t+="%",t+=e.substr(n,2);return t}(n)}function a(e){var t=(e=Math.round(e))%128;return s(2*(e-t)+t,4)}function o(e){var t=0,n=[];for(e=Math.round(e);0!==e;)n.push(127&e),e>>=7;for(var r=n.length-1;r>=0;r--){t<<=8;var i=n[r];0!==r&&(i|=128),t|=i}var a=t.toString(16).length;return s(t,a+=a%2)}r.prototype.startNote=function(e,n,r){if(this.track+=o(this.silencelength),this.silencelength=0,r){this.track+="%e"+this.channel.toString(16);var i=Math.round(4096*t(r));this.track+=a(8192+i),this.track+=o(0),this.noteWarped[e]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+e.toString(16)+s(n,2)},r.prototype.endNote=function(e){this.track+=o(this.silencelength),this.silencelength=0,this.noteWarped[e]&&(this.track+="%e"+this.channel.toString(16),this.track+=a(8192),this.track+=o(0),this.noteWarped[e]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+e.toString(16)+"%00"},r.prototype.addRest=function(e){this.silencelength+=e,this.silencelength<0&&(this.silencelength=0)},r.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+s(this.trackcount,4)+"%01%e0"+this.trackstrings},r.prototype.embed=function(e,t){var r=this.getData(),i=n(document.createElement("a"),{href:r});if(i.innerHTML="download midi",e.insertBefore(i,e.firstChild),!t){var s=n(document.createElement("embed"),{src:r,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});e.insertBefore(s,e.firstChild)}},e=function(){return new r}}(),lg=e}function qv(){if(pg)return fg;pg=1;var e=Hg(),t=function(){if(dg)return hg;dg=1;var e,t=jv();return function(){function n(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;i++)r[i]=parseFloat(r[i]);r.sort((function(e,t){return e-t}));for(var s=0,a=0;a<r.length;a++){var o=t[r[a]];if(r[a]>s){var c=(r[a]-s)*n;e.addRest(c),s=r[a]}for(var l=0;l<o.length;l++){var u=o[l];u.volume?e.startNote(u.pitch,u.volume,u.cents):e.endNote(u.pitch)}}}e=function(e,r){void 0===r&&(r={});var i=e.setUpAudio(r),s=t(),a=e.metaText?e.metaText.title:void 0;a&&a.length>128&&(a=a.substring(0,124)+"...");var o=e.getKeySignature(),c=e.getMeterFraction(),l=i.tempo,u=l/60;8==c.den&&(u=(l=6e4/(e.millisecondsPerMeasure()/c.num)/2)/60),s.setGlobalInfo(l,a,o,c);for(var h=0;h<i.tracks.length;h++){s.startTrack();for(var d={},f=0;f<i.tracks[h].length;f++){var p=i.tracks[h][f];switch(p.cmd){case"text":s.setText(p.type,p.text);break;case"program":var m=0;r.pan&&r.pan.length>h&&(m=r.pan[h]),128===p.instrument?(s.setChannel(9,m),s.setInstrument(0)):(s.setChannel(p.channel,m),s.setInstrument(p.instrument));break;case"note":var g=p.gap*u,v=p.start,b=v+p.duration-g;d[v]||(d[v]=[]),d[v].push({pitch:p.pitch,volume:p.volume,cents:p.cents}),d[b]||(d[b]=[]),d[b].push({pitch:p.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+p.cmd)}}n(s,d,1920),s.endTrack()}return s.getData()}}(),hg=e}();var n=function(e,t,n,r){var i=["abcjs-download-midi","abcjs-midi-"+r];t.downloadClass&&i.push(t.downloadClass);var s='<div class="'+i.join(" ")+'">';t.preTextDownload&&(s+=t.preTextDownload);var a,o,c=e.metaText&&e.metaText.title?e.metaText.title:"Untitled";return a=t.downloadLabel&&((o=t.downloadLabel)&&"[object Function]"==={}.toString.call(o))?t.downloadLabel(e,r):t.downloadLabel?t.downloadLabel.replace(/%T/,c):'Download MIDI for "'+c+'"',c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"),s+='<a download="'+(t.fileName?t.fileName:c+".midi")+'" href="'+n+'">'+a+"</a>",t.postTextDownload&&(s+=t.postTextDownload),s+"</div>"};return fg=function(r,i){var s={};if(i)for(var a in i)i.hasOwnProperty(a)&&(s[a]=i[a]);function o(e,r,i){var a=t(r,s);switch(s.midiOutputType){case"encoded":return a;case"binary":var o=a.replace("data:audio/midi,","");o=(o=o.replace(/MThd/g,"%4d%54%68%64")).replace(/MTrk/g,"%4d%54%72%6b");for(var c=new ArrayBuffer(o.length/3),l=new Uint8Array(c),u=0;u<o.length/3;u++){var h=3*u+1,d=parseInt(o.substring(h,h+2),16);l[u]=d}return l;default:return n(r,s,a,i)}}return s.generateInline=!1,"string"==typeof r?e.renderEngine(o,"*",r,s):o(0,r,0)},fg}function Hv(){if(gg)return mg;gg=1;try{if("function"!=typeof window.CustomEvent){var e=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n};e.prototype=window.Event.prototype,window.CustomEvent=e}}catch(n){}var t=function(e){this.textarea="string"==typeof e?document.getElementById(e):e,this.initialText=this.textarea.value,this.isDragging=!1};return t.prototype.addSelectionListener=function(e){this.textarea.onmousemove=function(t){this.isDragging&&e.fireSelectionChanged()}},t.prototype.addChangeListener=function(e){this.changelistener=e,this.textarea.onkeyup=function(){e.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,e.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,e.fireChanged()},this.textarea.onchange=function(){e.fireChanged()}},t.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},t.prototype.setSelection=function(e,t){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(e,t);else if(this.textarea.createTextRange){var n=this.textarea.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select()}this.textarea.focus()},t.prototype.getString=function(){return this.textarea.value},t.prototype.setString=function(e){this.textarea.value=e,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},t.prototype.getElem=function(){return this.textarea},mg=t}const Yv=u(function(){if(_g)return yg;_g=1;var e=qu?ju:(qu=1,ju="6.4.4"),t=dh(),n=Hg(),r=Cg(),i=Yg(),s={};s.signature="abcjs-basic v"+e,Object.keys(t).forEach((function(e){s[e]=t[e]})),Object.keys(n).forEach((function(e){s[e]=n[e]})),s.renderAbc=Tv(),s.tuneMetrics=function(){if(_m)return ym;_m=1;var e=Hg(),t=Ev();return ym=function(n,r){return e.renderEngine((function(e,n,i,s){(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e);var a=new t(e,r).getMeasureWidths(n);return e.parentNode.removeChild(e),{sections:a}}),"*",n,r)}}(),s.TimingCallbacks=hh();var a=Ug();s.setGlyph=a.setSymbol,s.strTranspose=i;var o=Vv(),c=Av(),l=Dv(),u=Rv(),h=Fv(),d=Nv(),f=Iv(),p=Ov(),m=function(){if(ag)return sg;ag=1;var e=Rv(),t=Vv(),n=Iv();function r(e,n,r,i){var s=new t;return s.init({sequence:e,millisecondsPerMeasure:n,options:{soundFontUrl:r},debugCallback:i}).then((function(){return s.prime()})).then((function(){return s.start(),Promise.resolve()}))}return sg=function(t,i,s,a,o){for(var c=new e,l=0;l<t.length;l++){var u=t[l],h=c.addTrack();if(c.setInstrument(h,u.instrument),0===l&&i)for(var d=0;d<i.length;d++){var f=i[d];c.appendNote(h,f.pitch,1/64,f.volume,f.cents)}c.appendNote(h,u.pitch,u.duration,u.volume,u.cents)}var p=n();return"suspended"===p.state?p.resume().then((function(){return r(c,s,a,o)})):r(c,s,a,o)}}(),g=zv(),v=qv(),b=jv();return s.synth={CreateSynth:o,instrumentIndexToName:c,pitchToNoteName:l,SynthController:g,SynthSequence:u,CreateSynthControl:h,registerAudioContext:d,activeAudioContext:f,supportsAudio:p,playEvent:m,getMidiFile:v,sequence:r,midiRenderer:b},s.Editor=function(){if(bg)return vg;bg=1;var e=fh(),t=zv(),n=Ov(),r=Tv(),i=Hv(),s=function(t,r){this.abcjsParams=function(e){var t,n={};if(e.abcjsParams)for(t in e.abcjsParams)e.abcjsParams.hasOwnProperty(t)&&(n[t]=e.abcjsParams[t]);if(e.midi_options)for(t in e.midi_options)e.midi_options.hasOwnProperty(t)&&(n[t]=e.midi_options[t]);if(e.parser_options)for(t in e.parser_options)e.parser_options.hasOwnProperty(t)&&(n[t]=e.parser_options[t]);if(e.render_options)for(t in e.render_options)e.render_options.hasOwnProperty(t)&&(n[t]=e.render_options[t]);return n.tablature&&e.warnings_id&&(n.tablature.warnings_id=e.warnings_id),n}(r),r.indicate_changed&&(this.indicate_changed=!0),this.editarea="string"==typeof t?new i(t):t,this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),r.canvas_id?this.div=r.canvas_id:r.paper_id?this.div=r.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),"string"==typeof this.div&&(this.div=document.getElementById(this.div)),r.selectionChangeCallback&&(this.selectionChangeCallback=r.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),r.synth&&n()&&(this.synth={el:r.synth.el,cursorControl:r.synth.cursorControl,options:r.synth.options}),r.generate_midi&&(this.generate_midi=r.generate_midi,this.abcjsParams.generateDownload&&("string"==typeof r.midi_download_id?this.downloadMidi=document.getElementById(r.midi_download_id):r.midi_download_id&&(this.downloadMidi=r.midi_download_id)),!1!==this.abcjsParams.generateInline&&("string"==typeof r.midi_id?this.inlineMidi=document.getElementById(r.midi_id):r.midi_id&&(this.inlineMidi=r.midi_id))),r.warnings_id?"string"==typeof r.warnings_id?this.warningsdiv=document.getElementById(r.warnings_id):this.warningsdiv=r.warnings_id:r.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=r.onchange,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(e,t){var n,r;return n=t,(r=e.className).length>0&&(r===n||new RegExp("(^|\\s)"+n+"(\\s|$)").test(r))||(e.className+=(e.className?" ":"")+t),e},this.removeClassName=function(t,n){return t.className=e.strip(t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ")),t},this.setReadOnly=function(e){var t="abc_textarea_readonly",n=this.editarea.getElem();e?(n.setAttribute("readonly","yes"),this.addClassName(n,t)):(n.removeAttribute("readonly"),this.removeClassName(n,t))}};return s.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var e=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(e)}if(this.synth){var n=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new t,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],n,this.synth.options)}},s.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=r(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi()}catch(e){console.error("ABCJS error: ",e),this.warnings||(this.warnings=[]),this.warnings.push(e.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.updateSelection(),this.bReentry=!1}},s.prototype.paramChanged=function(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this.abcjsParams[t]=e[t]);this.currentAbc="",this.fireChanged()},s.prototype.synthParamChanged=function(e){if(this.synth){if(this.synth.options={},e)for(var t in e)e.hasOwnProperty(t)&&(this.synth.options[t]=e[t]);this.currentAbc="",this.fireChanged()}},s.prototype.parseABC=function(){var e=this.editarea.getString();return e===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=e,!0)},s.prototype.updateSelection=function(){var e=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(e.start,e.end)}catch(t){}this.selectionChangeCallback&&this.selectionChangeCallback(e.start,e.end)},s.prototype.fireSelectionChanged=function(){this.updateSelection()},s.prototype.setDirtyStyle=function(t){if(void 0!==this.indicate_changed){var n,r,i,s,a="abc_textarea_dirty",o=this.editarea.getElem();t?(i=r=a,(s=(n=o).className).length>0&&(s===i||new RegExp("(^|\\s)"+i+"(\\s|$)").test(s))||(n.className+=(n.className?" ":"")+r)):function(t,n){t.className=e.strip(t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," "))}(o,a)}},s.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var e=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((function(){e.modelChanged()}),300);var t=this.isDirty();this.wasDirty!==t&&(this.wasDirty=t,this.setDirtyStyle(t)),this.onchangeCallback&&this.onchangeCallback(this)}},s.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},s.prototype.isDirty=function(){return void 0!==this.indicate_changed&&this.editarea.initialText!==this.editarea.getString()},s.prototype.highlight=function(e,t,n,r,i,s){this.editarea.setSelection(e.startChar,e.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(e.startChar,e.endChar),this.clientClickListener&&this.clientClickListener(e,t,n,r,i,s)},s.prototype.pause=function(e){this.bIsPaused=e,e||this.fireChanged()},s.prototype.millisecondsPerMeasure=function(){return this.synth&&this.synth.synthControl&&this.synth.synthControl.visualObj?this.synth.synthControl.visualObj.millisecondsPerMeasure():0},s.prototype.pauseMidi=function(e){this.midiPause=e,e||this.redrawMidi()},vg=s}(),s.EditArea=Hv(),yg=s}()),Uv=n.defineComponent({name:"MusicScoreRenderer",props:{abcString:{type:String,required:!0}},mounted(){Yv.renderAbc("abc",this.abcString)}}),Gv={id:"abc"};const Wv=C(Uv,[["render",function(e,t,r,i,s,a){return n.openBlock(),n.createElementBlock("div",Gv)}]]);const $v=n.defineComponent({name:"IdentifyKeyView",components:{RadioMultipleChoice:r.RadioMultipleChoice,MusicScoreRenderer:Wv},props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"IdentifyKeyView"),s=r.useQuestionView(i),a=n.ref("");s.question.value=new Jv(e.data);const o=n.computed((()=>s.question.value)),c=n.computed((()=>{var e,t;const n=function(){const e=[];for(let t=0;t<5;t++)e.push(Xv[Math.floor(Math.random()*Xv.length)]);return e}();return n.includes((null==(e=o.value)?void 0:e.key)||"")||(n[Math.floor(Math.random()*n.length)]=(null==(t=o.value)?void 0:t.key)||""),n}));return{...i,...s,answer:a,question:o,choices:c,submit:()=>{}}}}),Kv={"data-viewable":"IdentifyKeyView"};const Qv=C($v,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("MusicScoreRenderer"),c=n.resolveComponent("RadioMultipleChoice");return n.openBlock(),n.createElementBlock("div",Kv,[e.question?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(o,{"key-signature":`X:1\nK:${e.question.key}\n||`,"abc-string":"''"},null,8,["key-signature"]),t[0]||(t[0]=n.createTextVNode(" This signature is for the major key: _____ ")),n.createVNode(c,{"choice-list":e.choices},null,8,["choice-list"])],64)):n.createCommentVNode("",!0)])}]]),Xv=["C","G","D","A","E","B","F#","C#","F","Bb","Eb","Ab","Db","Gb","Cb"],Zv=class _IdentifyKeyQuestion extends r.Question{constructor(e){super(e),t(this,"key"),this.key=_IdentifyKeyQuestion.getKey(e[0].key)}static getKey(e){return Xv[e]}isCorrect(e){return console.log(`answer: ${JSON.stringify(e)}, key: ${this.key}`),this.key===e.choiceList[e.selection]}dataShapes(){return _IdentifyKeyQuestion.dataShapes}views(){return _IdentifyKeyQuestion.views}};t(Zv,"dataShapes",[{name:a.DataShapeName.SIGHTSING_IdentifyKey,fields:[{name:"key",type:a.FieldType.NUMBER,validator:{test:e=>{const t=parseInt(e);return t>=0&&t<=Xv.length?{msg:"",status:a.Status.ok}:{msg:"Please enter a number between 0 and 11",status:a.Status.error}}}}]}]),t(Zv,"views",[Qv]);let Jv=Zv;const eb=new CourseWare("sightSing",[Jv]),tb=n.defineComponent({name:"LetterQuestionView",props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"LetterQuestionView"),s=r.useQuestionView(i),a=n.ref(null);s.question.value=new sb(e.data);const o=n.computed((()=>s.question.value)),c=e=>{var t;if(!o.value)return;const n=e.key.toLowerCase(),r=o.value.letter.toLowerCase();if(n===r){null==(t=a.value)||t.classList.add("pressed");const e=t=>{var i;t.key.toLowerCase()===r&&(null==(i=a.value)||i.classList.remove("pressed"),s.submitAnswer(n),window.removeEventListener("keyup",e))};window.addEventListener("keyup",e)}else s.submitAnswer(n)};return n.onMounted((()=>{window.addEventListener("keypress",c)})),n.onUnmounted((()=>{window.removeEventListener("keypress",c)})),{...s,...i,letterDisplay:a,question:o}}}),nb={"data-viewable":"LetterQuestionView"};const rb=C(tb,[["render",function(e,t,r,i,s,a){return n.openBlock(),n.createElementBlock("div",nb,[e.question?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t[0]||(t[0]=n.createElementVNode("p",{class:"text-h5"},"Type this letter!",-1)),n.createElementVNode("div",{ref:"letterDisplay",class:"letter-display"},n.toDisplayString(e.question.letter),513)],64)):n.createCommentVNode("",!0)])}],["__scopeId","data-v-4ae4db54"]]),ib=class _TypeLetterQuestion extends r.Question{constructor(e){super(e),t(this,"letter"),this.letter=e[0].letter}evaluate(e,t){return{isCorrect:this.isCorrect(e),performance:this.displayedSkill(e,t)}}displayedSkill(e,t){if(this.isCorrect(e)){if(t<3e3)return 1;{const e=1-(t-3e3)/7e3*.75;return Math.max(.25,e)}}return 0}dataShapes(){return _TypeLetterQuestion.dataShapes}views(){return _TypeLetterQuestion.views}isCorrect(e){const t=e.toLowerCase()===this.letter.toLowerCase();return console.log(`singleLetter Q isCorrect: ${t}`),t}};t(ib,"dataShapes",[{name:a.DataShapeName.TYPING_singleLetter,fields:[{name:"letter",type:a.FieldType.STRING,validator:{instructions:"Enter a single letter",test:function(e){return e&&1===e.length&&/[a-zA-Z]/.test(e)?{status:a.Status.ok,msg:""}:{status:a.Status.error,msg:"Input must be a single letter"}}}}]}]),t(ib,"views",[rb]),t(ib,"acceptsUserData",!0),t(ib,"seedData",function(){const e=[];for(let t=0;t<26;t++)e.push({letter:String.fromCharCode(65+t)});return e}());let sb=ib;const ab=n.defineComponent({name:"FallingLettersView",props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"FallingLettersView"),s=r.useQuestionView(i),a=n.ref(null),o=n.ref([]),c=n.ref(!1),l=n.ref(""),u=n.ref(30),h=n.ref(0),d=n.ref([]),f=n.ref([]),p=n.ref({currentSpeed:2,letterId:0,gameLoop:null,lastSpawn:0,lastUpdate:0,spawnInterval:1e3}),m=e=>{if(c.value)return;const t=(e-p.value.lastUpdate)/1e3;if(p.value.lastUpdate=e,u.value-=t,s.question.value&&(p.value.currentSpeed+=s.question.value.acceleration*t),u.value<=0)return c.value=!0,l.value="You Win!",void s.submitAnswer({lettersTyped:h.value,win:!0,percentage:1});e-p.value.lastSpawn>=p.value.spawnInterval&&((()=>{if(!a.value)return;const e={id:p.value.letterId++,char:String.fromCharCode(65+Math.floor(26*Math.random())),x:Math.random()*(a.value.clientWidth-30),y:-30};o.value.push(e)})(),p.value.lastSpawn=e,p.value.spawnInterval=Math.max(500,p.value.spawnInterval-10)),a.value&&(o.value=o.value.filter((e=>{return e.y+=p.value.currentSpeed,!(e.y>a.value.clientHeight)||(c.value=!0,l.value="Game Over!",s.submitAnswer({lettersTyped:h.value,percentage:u.value/((null==(t=s.question.value)?void 0:t.gameLength)||30),win:!1}),!1);var t}))),p.value.gameLoop=requestAnimationFrame(m)},g=e=>{if(c.value)return;const t=e.key.toUpperCase(),n=o.value.findIndex((e=>e.char===t));-1!==n&&(f.value.push({id:Date.now(),x:o.value[n].x,y:o.value[n].y}),setTimeout((()=>{f.value=f.value.filter((e=>e.id!==f.value[f.value.length-1].id))}),300),o.value.splice(n,1),h.value++)};return n.onMounted((()=>{try{s.question.value=new vb(e.data),s.maxAttemptsPerView.value=1,window.addEventListener("keypress",g),d.value=Array.from({length:7},((e,t)=>({id:t,left:20+t*Math.random()*30-10,height:100+120*Math.random(),scale:1+2*Math.random()}))),s.question.value?(u.value=s.question.value.gameLength,h.value=0,o.value=[],c.value=!1,l.value="",p.value={currentSpeed:s.question.value.initialSpeed,letterId:0,gameLoop:null,lastSpawn:performance.now(),lastUpdate:performance.now(),spawnInterval:1e3*s.question.value.spawnInterval},p.value.gameLoop=requestAnimationFrame(m)):i.logger.error("Question not initialized")}catch(t){i.logger.error("Error initializing game:",t)}})),n.onUnmounted((()=>{window.removeEventListener("keypress",g),p.value.gameLoop&&cancelAnimationFrame(p.value.gameLoop)})),{...s,gameArea:a,letters:o,gameOver:c,gameOverMessage:l,timeLeft:u,score:h,treePositions:d,explosions:f}}}),ob={class:"game-container"},cb={class:"stats"},lb={class:"time"},ub={class:"score"},hb={ref:"gameArea",class:"game-area"},db={class:"letter-text"},fb={class:"trees"},pb={key:0,class:"game-over"};const mb=C(ab,[["render",function(e,t,r,i,s,a){return n.openBlock(),n.createElementBlock("div",ob,[n.createElementVNode("div",cb,[n.createElementVNode("div",lb,"Time: "+n.toDisplayString(e.timeLeft.toFixed(1))+"s",1),n.createElementVNode("div",ub,"Score: "+n.toDisplayString(e.score),1)]),n.createElementVNode("div",hb,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.letters,(e=>(n.openBlock(),n.createElementBlock("div",{key:e.id,class:"falling-letter",style:n.normalizeStyle({left:e.x+"px",top:e.y+"px"})},[t[0]||(t[0]=n.createElementVNode("div",{class:"meteor-effect"},null,-1)),n.createElementVNode("span",db,n.toDisplayString(e.char),1)],4)))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.explosions,(e=>(n.openBlock(),n.createElementBlock("div",{key:e.id,class:"explosion",style:n.normalizeStyle({left:e.x+"px",top:e.y+"px"})},[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(12,(e=>n.createElementVNode("div",{key:e,class:"particle"}))),64))],4)))),128)),t[2]||(t[2]=n.createElementVNode("div",{class:"grass-container"},[n.createElementVNode("div",{class:"grass"}),n.createElementVNode("div",{class:"grass-overlay"})],-1)),n.createElementVNode("div",fb,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.treePositions,(e=>(n.openBlock(),n.createElementBlock("div",{key:e.id,class:"tree",style:n.normalizeStyle({left:`${e.left}%`,height:`${e.height}px`,transform:`scale(${e.scale})`})},t[1]||(t[1]=[n.createElementVNode("div",{class:"tree-crown"},null,-1),n.createElementVNode("div",{class:"tree-trunk"},null,-1)]),4)))),128))])],512),e.gameOver?(n.openBlock(),n.createElementBlock("div",pb,n.toDisplayString(e.gameOverMessage),1)):n.createCommentVNode("",!0)])}],["__scopeId","data-v-3c9f2af5"]]),gb=class _FallingLettersQuestion extends r.Question{constructor(e){super(e),t(this,"gameLength"),t(this,"initialSpeed"),t(this,"acceleration"),t(this,"spawnInterval"),this.gameLength=e[0].gameLength,this.initialSpeed=e[0].initialSpeed,this.acceleration=e[0].acceleration,this.spawnInterval=e[0].spawnInterval}evaluate(e){return{isCorrect:this.isCorrect(e),performance:this.displayedSkill(e)}}displayedSkill(e){return e.win?1:e.percentage}dataShapes(){return _FallingLettersQuestion.dataShapes}views(){return _FallingLettersQuestion.views}isCorrect(e){return e.win}};t(gb,"dataShapes",[{name:a.DataShapeName.TYPING_fallingLetters,fields:[{name:"gameLength",type:a.FieldType.NUMBER},{name:"initialSpeed",type:a.FieldType.NUMBER},{name:"acceleration",type:a.FieldType.NUMBER},{name:"spawnInterval",type:a.FieldType.NUMBER,validator:{instructions:"How often should a new letter spawn? (in seconds)",test:e=>{if("string"==typeof e){return parseFloat(e)>0?{status:a.Status.ok,msg:""}:{status:a.Status.error,msg:"Must be greater than 0"}}return{status:a.Status.error,msg:"Unexpected non-string input."}},placeholder:"1"}}]}]),t(gb,"views",[mb]),t(gb,"acceptsUserData",!0),t(gb,"seedData",[{gameLength:30,initialSpeed:2,acceleration:.1,spawnInterval:1}]);let vb=gb;const bb=new CourseWare("typing",[sb,vb]),yb=n.defineComponent({name:"IdentifyVocab",components:{AudioAutoPlayer:r.AudioAutoPlayer,UserInputString:r.UserInputString},props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"IdentifyVocab"),s=r.useQuestionView(i),a=n.ref("");s.question.value=new Cb(e.data);const o=n.computed((()=>s.question.value));return{...i,...s,answer:a,question:o,submit:()=>{o.value&&s.submitAnswer(a.value)}}}}),_b={"data-viewable":"IdentifyVocab"},wb={key:0,class:"text-h6"};const xb=C(yb,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("UserInputString"),c=n.resolveComponent("center"),l=n.resolveComponent("audio-auto-player");return n.openBlock(),n.createElementBlock("div",_b,[e.question?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t[1]||(t[1]=n.createElementVNode("span",{class:"text-h5"}," Spell the word: ",-1)),n.createVNode(o,{modelValue:e.answer,"onUpdate:modelValue":t[0]||(t[0]=t=>e.answer=t)},null,8,["modelValue"]),n.createVNode(c,null,{default:n.withCtx((()=>[e.priorAttempts?(n.openBlock(),n.createElementBlock("span",wb,n.toDisplayString(e.question.word),1)):n.createCommentVNode("",!0)])),_:1}),n.createVNode(c,null,{default:n.withCtx((()=>[n.createVNode(l,{src:[e.getURL("WordAudio"),e.getURL("SentenceAudio"),e.getURL("WordAudio")]},null,8,["src"])])),_:1})],64)):n.createCommentVNode("",!0)])}]]),kb=[{name:"Word",type:a.FieldType.STRING,validator:a.Validators.NonEmptyString},{name:"ExampleSentence",type:a.FieldType.STRING},{name:"WordAudio",type:a.FieldType.AUDIO},{name:"SentenceAudio",type:a.FieldType.AUDIO}],Sb=class _SpellingQuestion extends r.Question{constructor(e){super(e),t(this,"word"),t(this,"sentence"),t(this,"audio_word"),t(this,"audio_sentence"),this.word=e[0].Word,this.sentence=e[0].Sentence,this.audio_word=e[0].WordAudio,this.audio_sentence=e[0].SentenceAudio}isCorrect(e){return e===this.word}dataShapes(){return _SpellingQuestion.dataShapes}views(){return _SpellingQuestion.views}};t(Sb,"dataShapes",[{fields:kb,name:a.DataShapeName.WORDWORK_Spelling}]),t(Sb,"views",[xb]);let Cb=Sb;const Mb=new CourseWare("wordWork",[Cb]),Eb=n.defineComponent({name:"PianoRangeVisualizer",props:{lowestNote:{type:Number,required:!0},highestNote:{type:Number,required:!0},maxWidth:{type:Number,default:1e3}},setup(e){const t=n.ref(null),r=n.ref(800),i=n.computed((()=>{let e=0;for(let t=21;t<=108;t++)c(t)&&e++;return e})),s=n.computed((()=>Math.min(22,r.value/Math.max(25,i.value)))),a=n.computed((()=>.6*s.value)),o=n.computed((()=>Math.min(e.maxWidth,s.value*i.value+10))),c=e=>[0,2,4,5,7,9,11].includes(e%12);return n.onMounted((()=>{if(t.value){r.value=t.value.clientWidth;new ResizeObserver((e=>{for(const t of e)r.value=t.contentRect.width})).observe(t.value)}})),{pianoWrapper:t,keyHeight:100,blackKeyHeight:60,whiteKeyWidth:s,blackKeyWidth:a,svgWidth:o,isWhiteKey:c,getKeyPosition:e=>{let t=0;for(let n=21;n<e;n++)c(n)&&t++;return c(e)?t*s.value:t*s.value-a.value/2},getNoteLabel:e=>{const t=e%12,n=Math.floor(e/12)-1;return`${["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"][t]}${n}`}}}}),Tb={class:"piano-range-container"},Pb={class:"piano-wrapper",ref:"pianoWrapper"},Ab=["width","height"],Nb={class:"background-keys",opacity:"0.15"},Ib=["x","width","height"],Ob=["x","width","height"],Db={class:"selected-range"},Lb=["x","width","height"],Bb=["x","width","height"],Vb={class:"range-markers"},Rb=["x","height"],Fb=["x","height"],zb=["x","y"],jb=["x","y"];const qb=C(Eb,[["render",function(e,t,r,i,s,a){return n.openBlock(),n.createElementBlock("div",Tb,[n.createElementVNode("div",Pb,[(n.openBlock(),n.createElementBlock("svg",{width:e.svgWidth,height:e.keyHeight+20,class:"piano-svg"},[n.createElementVNode("g",Nb,[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(88,(t=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:`bg-${t}`},[e.isWhiteKey(t+20)?(n.openBlock(),n.createElementBlock("rect",{key:0,x:e.getKeyPosition(t+20),y:"0",width:e.whiteKeyWidth,height:e.keyHeight,class:"white-key",stroke:"#999","stroke-width":"1"},null,8,Ib)):n.createCommentVNode("",!0)],64)))),64)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(88,(t=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:`bg-black-${t}`},[e.isWhiteKey(t+20)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("rect",{key:0,x:e.getKeyPosition(t+20),y:"0",width:e.blackKeyWidth,height:e.blackKeyHeight,class:"black-key"},null,8,Ob))],64)))),64))]),n.createElementVNode("g",Db,[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(128,(t=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:`white-${t}`},[e.isWhiteKey(t)&&t>=e.lowestNote&&t<=e.highestNote?(n.openBlock(),n.createElementBlock("rect",{key:0,x:e.getKeyPosition(t),y:"0",width:e.whiteKeyWidth,height:e.keyHeight,class:"white-key active",stroke:"#666","stroke-width":"1"},null,8,Lb)):n.createCommentVNode("",!0)],64)))),64)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(128,(t=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:`black-${t}`},[!e.isWhiteKey(t)&&t>=e.lowestNote&&t<=e.highestNote?(n.openBlock(),n.createElementBlock("rect",{key:0,x:e.getKeyPosition(t),y:"0",width:e.blackKeyWidth,height:e.blackKeyHeight,class:"black-key active"},null,8,Bb)):n.createCommentVNode("",!0)],64)))),64))]),n.createElementVNode("g",Vb,[n.createElementVNode("rect",{x:e.getKeyPosition(e.lowestNote)-2,y:"0",width:4,height:e.keyHeight+5,class:"range-marker start"},null,8,Rb),n.createElementVNode("rect",{x:e.getKeyPosition(e.highestNote)+e.whiteKeyWidth-2,y:"0",width:4,height:e.keyHeight+5,class:"range-marker end"},null,8,Fb)]),n.createElementVNode("text",{x:e.getKeyPosition(e.lowestNote)+3,y:e.keyHeight+12,class:"note-label"},n.toDisplayString(e.getNoteLabel(e.lowestNote)),9,zb),n.createElementVNode("text",{x:e.getKeyPosition(e.highestNote)+e.whiteKeyWidth-3,y:e.keyHeight+12,"text-anchor":"end",class:"note-label"},n.toDisplayString(e.getNoteLabel(e.highestNote)),9,jb)],8,Ab))],512)])}],["__scopeId","data-v-4b232a8b"]]),Hb=n.defineComponent({name:"MidiConfig",components:{PianoRangeVisualizer:qb},props:{_id:{type:String,required:!0},user:{type:Object,required:!0}},setup(e){const t=n.ref(),i=n.ref(!0),s=n.ref([]),o=n.ref([]),l=n.ref(""),u=n.ref(""),h=n.ref(!1),d=n.ref(""),f=n.ref(""),p=n.ref(!1),m=n.ref("full-88"),g=n.ref(21),v=n.ref(108),b=n.ref(""),y=n.ref(0),_=n.ref(0),w=n.ref([]),x=n.ref([{title:"Full 88-key Piano (A0-C8)",value:"full-88"},{title:"76-key Keyboard (E1-G7)",value:"76-key"},{title:"61-key Keyboard (C2-C7)",value:"61-key"},{title:"49-key Keyboard (C3-C7)",value:"49-key"},{title:"37-key Keyboard (C3-C6)",value:"37-key"},{title:"25-key Keyboard (C4-C6)",value:"25-key"},{title:"Custom Range",value:"custom"}]),k=()=>{p.value=l.value!==d.value||u.value!==f.value||m.value!==b.value||"custom"===m.value&&(g.value!==y.value||v.value!==_.value)},S=e=>{r.alertUser({text:`I hear a ${e.note.name}!`,status:a.Status.ok})};n.watch(l,(()=>{var e;null==(e=t.value)||e.selectInput(l.value),k()})),n.watch(u,(()=>{var e;null==(e=t.value)||e.selectOutput(u.value),k()}));return n.onMounted((async()=>{var n,r;(()=>{const e=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],t=[];for(let n=0;n<=127;n++){const r=Math.floor(n/12)-1,i=e[n%12];t.push({title:`${i}${r} (${n})`,value:n})}w.value=t})();try{t.value=await qs.instance(),i.value="ready"===t.value.state||"nodevice"===t.value.state}catch(a){console.log(`Error on midi Init: ${a}`),i.value=!1}i.value&&(null==(n=t.value)||n.addNoteonListenter(S),t.value?(s.value=t.value.inputs.filter((e=>"connected"===e.state)).map((e=>({title:`${e.manufacturer}: ${e.name}`,value:e.id}))),o.value=null==(r=t.value)?void 0:r.outputs.filter((e=>"connected"===e.state)).map((e=>({title:`${e.manufacturer}: ${e.name}`,value:e.id})))):(s.value=[{title:"No inputs available",value:""}],o.value=[{title:"No outputs available",value:""}]),await(async()=>{const t=await(await e.user.getCourseInterface(e._id)).getCourseSettings();if(null==t?void 0:t.midiinput){const e=t.midiinput.toString();s.value.some((t=>t.value===e))&&(l.value=e,d.value=e)}if(null==t?void 0:t.midioutput){const e=t.midioutput.toString();o.value.some((t=>t.value===e))&&(u.value=e,f.value=e)}(null==t?void 0:t.keyboardRange)&&(b.value=t.keyboardRange.toString(),m.value=b.value),(null==t?void 0:t.lowestNote)&&(y.value=parseInt(t.lowestNote.toString()),g.value=y.value),(null==t?void 0:t.highestNote)&&(_.value=parseInt(t.highestNote.toString()),v.value=_.value),(null==t?void 0:t.lowestNote)&&(null==t?void 0:t.highestNote)&&!(null==t?void 0:t.keyboardRange)&&(m.value="custom"),p.value=!1})(),!l.value&&s.value.length>0&&(l.value=s.value[0].value),!u.value&&o.value.length>0&&(u.value=o.value[0].value))})),{midiSupported:i,inputs:s,outputs:o,selectedInput:l,selectedOutput:u,updatePending:h,playSound:()=>{var e;null==(e=t.value)||e.play([{note:{number:64,name:"E",octave:4},type:"noteon",velocity:.4251968503937008,timestamp:0},{note:{number:64,name:"E",octave:4},velocity:.3779527559055118,type:"noteoff",timestamp:511.90500000002794},{note:{number:60,name:"C",octave:4},type:"noteon",velocity:.5275590551181102,timestamp:535.8800000001211},{note:{number:60,name:"C",octave:4},velocity:.33858267716535434,type:"noteoff",timestamp:674.9899999999907},{note:{number:60,name:"C",octave:4},type:"noteon",velocity:.5590551181102362,timestamp:1070.8800000000047},{note:{number:60,name:"C",octave:4},velocity:.3464566929133858,type:"noteoff",timestamp:1214.8999999999069},{note:{number:64,name:"E",octave:4},type:"noteon",velocity:.5118110236220472,timestamp:1424.9400000000605},{note:{number:64,name:"E",octave:4},velocity:.2755905511811024,type:"noteoff",timestamp:1576.9150000000373},{note:{number:62,name:"D",octave:4},type:"noteon",velocity:.3937007874015748,timestamp:1756.9149999999208},{note:{number:62,name:"D",octave:4},velocity:.36220472440944884,type:"noteoff",timestamp:1926.9899999998743},{note:{number:60,name:"C",octave:4},type:"noteon",velocity:.5196850393700787,timestamp:1970.9600000000792},{note:{number:60,name:"C",octave:4},velocity:.36220472440944884,type:"noteoff",timestamp:2126.009999999893},{note:{number:60,name:"C",octave:4},type:"noteon",velocity:.5984251968503937,timestamp:2502.0050000000047},{note:{number:60,name:"C",octave:4},velocity:.3858267716535433,type:"noteoff",timestamp:2853.920000000042},{note:{number:67,name:"G",octave:4},type:"noteon",velocity:.6850393700787402,timestamp:2875.8649999999907},{note:{number:67,name:"G",octave:4},velocity:.6377952755905512,type:"noteoff",timestamp:4497.004999999888}])},saveSettings:async()=>{h.value=!0;(await c.getDataLayer().getUserDB().getCourseInterface(e._id)).updateCourseSettings([{key:"midiinput",value:l.value},{key:"midioutput",value:u.value},{key:"keyboardRange",value:m.value},{key:"lowestNote",value:g.value},{key:"highestNote",value:v.value}]),d.value=l.value,f.value=u.value,b.value=m.value,y.value=g.value,_.value=v.value,p.value=!1,h.value=!1,r.alertUser({text:"Settings updated.",status:a.Status.ok})},configChanged:p,lowestNote:g,highestNote:v,keyboardRangeOptions:x,selectedKeyboardRange:m,noteOptions:w,updateCustomRangeFromPreset:()=>{switch(m.value){case"full-88":g.value=21,v.value=108;break;case"76-key":g.value=28,v.value=103;break;case"61-key":g.value=36,v.value=96;break;case"49-key":g.value=48,v.value=96;break;case"37-key":g.value=48,v.value=84;break;case"25-key":g.value=60,v.value=84}k()},updateRangeAndCheckChanges:()=>{g.value>=v.value&&(v.value=g.value+12),k()}}}}),Yb={key:0,class:"custom-range-inputs d-flex gap-4"},Ub={class:"d-flex justify-space-between mt-3"},Gb={key:1};const Wb=C(Hb,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("v-toolbar-title"),c=n.resolveComponent("v-toolbar"),l=n.resolveComponent("v-select"),u=n.resolveComponent("v-divider"),h=n.resolveComponent("piano-range-visualizer"),d=n.resolveComponent("v-btn"),f=n.resolveComponent("v-form"),p=n.resolveComponent("v-card-text"),m=n.resolveComponent("v-card");return n.openBlock(),n.createBlock(m,null,{default:n.withCtx((()=>[n.createVNode(c,{dense:""},{default:n.withCtx((()=>[n.createVNode(o,null,{default:n.withCtx((()=>t[5]||(t[5]=[n.createTextVNode("Configure Midi Device")]))),_:1})])),_:1}),n.createVNode(p,null,{default:n.withCtx((()=>[e.midiSupported?(n.openBlock(),n.createBlock(f,{key:0,onsubmit:"return false;"},{default:n.withCtx((()=>[n.createVNode(l,{modelValue:e.selectedInput,"onUpdate:modelValue":t[0]||(t[0]=t=>e.selectedInput=t),items:e.inputs,label:"Select Input",hint:"Play some notes on your input device to test the connection"},null,8,["modelValue","items"]),n.createVNode(l,{modelValue:e.selectedOutput,"onUpdate:modelValue":t[1]||(t[1]=t=>e.selectedOutput=t),items:e.outputs,label:"Select Output"},null,8,["modelValue","items"]),n.createVNode(u,{class:"my-4"}),t[8]||(t[8]=n.createElementVNode("h3",{class:"text-subtitle-1 mb-2"},"Keyboard Range",-1)),n.createVNode(l,{modelValue:e.selectedKeyboardRange,"onUpdate:modelValue":[t[2]||(t[2]=t=>e.selectedKeyboardRange=t),e.updateCustomRangeFromPreset],items:e.keyboardRangeOptions,label:"Select Keyboard Range"},null,8,["modelValue","items","onUpdate:modelValue"]),"custom"===e.selectedKeyboardRange?(n.openBlock(),n.createElementBlock("div",Yb,[n.createVNode(l,{modelValue:e.lowestNote,"onUpdate:modelValue":[t[3]||(t[3]=t=>e.lowestNote=t),e.updateRangeAndCheckChanges],items:e.noteOptions,label:"Lowest Note"},null,8,["modelValue","items","onUpdate:modelValue"]),n.createVNode(l,{modelValue:e.highestNote,"onUpdate:modelValue":[t[4]||(t[4]=t=>e.highestNote=t),e.updateRangeAndCheckChanges],items:e.noteOptions,label:"Highest Note"},null,8,["modelValue","items","onUpdate:modelValue"])])):n.createCommentVNode("",!0),n.createVNode(h,{"lowest-note":e.lowestNote,"highest-note":e.highestNote},null,8,["lowest-note","highest-note"]),n.createElementVNode("div",Ub,[n.createVNode(d,{color:"primary",onClick:e.playSound},{default:n.withCtx((()=>t[6]||(t[6]=[n.createTextVNode("Test midi output")]))),_:1},8,["onClick"]),n.createVNode(d,{loading:e.updatePending,disabled:!e.configChanged&&!e.updatePending,color:"info",class:"save-button",onClick:e.saveSettings},{default:n.withCtx((()=>t[7]||(t[7]=[n.createTextVNode(" Save these settings ")]))),_:1},8,["loading","disabled","onClick"])])])),_:1})):(n.openBlock(),n.createElementBlock("div",Gb,t[9]||(t[9]=[n.createElementVNode("p",null,"This quilt requires a midi input device, which is not supported by this browser.",-1),n.createElementVNode("div",null,[n.createElementVNode("p",null,"Try one of the following browsers:"),n.createElementVNode("ul",null,[n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://www.google.com/chrome/"},"Google Chrome")]),n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://www.microsoft.com/edge"},"Microsoft Edge")]),n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://brave.com/"},"Brave")])])],-1)])))])),_:1})])),_:1})}],["__scopeId","data-v-6ee9020f"]]),$b=r.useQuestionView;class AllCourseWare{constructor(e){t(this,"courseWareList"),t(this,"cachedRawViews",null),this.courseWareList=e}get courses(){return this.courseWareList}getCourseWare(e){return this.courseWareList.find((t=>t.name===e))}allViewsRaw(){if(!this.cachedRawViews){const e=this.allViews();this.cachedRawViews=Object.fromEntries(Object.entries(e).map((([e,t])=>[e,n.markRaw(t)])))}return this.cachedRawViews}allViews(){const e={};return this.courseWareList.forEach((t=>{Object.assign(e,t.allViewsMap)})),e}getView(e){let t;t="string"==typeof e?a.NameSpacer.getViewDescriptor(e):e;const n=this.getCourseWare(t.course);if(n){const e=n.getQuestion(t.questionType);if(e){const r=e.views.find((e=>e.name===t.view));if(r)return r;throw console.error(`QuestionView ${t.view} not found in course ${t.course}\n\n descriptor: ${JSON.stringify(t)}\n\n course: ${n.name}\n question: ${e.name}\n views: ${e.views.map((e=>e.name)).join(", ")}\n `),new Error(`view ${t.view} does not exist.`)}throw console.error(`Question ${t.questionType} not found in course ${t.course}\n\n descriptor: ${JSON.stringify(t)}\n\n course: ${n.name}\n questions: ${n.questions.map((e=>e.name)).join(", ")}\n `),new Error(`question ${t.questionType} does not exist.`)}throw console.error(`Course ${t.course} not found.\n\n descriptor: ${JSON.stringify(t)}`),new Error(`course ${t.course} does not exist.`)}toString(){let e="";return this.courses.forEach((t=>{e+=`Course: ${t.name}\n`,t.questions.forEach((t=>{e+=` Question: ${t.name}\n`,t.views.forEach((t=>{e+=` View: ${t.name}\n`}))}))})),e}allDataShapesRaw(){const e=[];return this.courseWareList.forEach((t=>{t.questions.forEach((t=>{t.dataShapes.forEach((t=>{e.includes(t)||e.push(t)}))}))})),e}allDataShapes(){const e=[];return this.courseWareList.forEach((t=>{t.questions.forEach((n=>{n.dataShapes.forEach((r=>{-1===e.findIndex((e=>e.course===t.name&&e.dataShape===r.name))&&e.push({course:t.name,dataShape:r.name,displayable:n})}))}))})),e}getDataShape(e){let t;if(this.getCourseWare(e.course).questions.forEach((n=>{n.dataShapes.forEach((n=>{n.name===e.dataShape&&(t=n)}))})),t)return t;throw new Error(`DataShape ${a.NameSpacer.getDataShapeString(e)} not found`)}}const Kb=new AllCourseWare([vi,Mb,Un,D,Iu,zu,eb,On,bb]);Object.defineProperty(exports,"Displayable",{enumerable:!0,get:()=>r.Displayable}),Object.defineProperty(exports,"Question",{enumerable:!0,get:()=>r.Question}),Object.defineProperty(exports,"useViewable",{enumerable:!0,get:()=>r.useViewable}),exports.BlanksCardDataShapes=o.BlanksCardDataShapes,exports.AllCourseWare=AllCourseWare,exports.BlanksCard=O,exports.CourseWare=CourseWare,exports.MidiConfig=Wb,exports.SkMidi=qs,exports.SyllableSeqVis=nu,exports.SyllableSequence=SyllableSequence,exports.allCourseWare=Kb,exports.chess=On,exports.eventsToSyllableSequence=zs,exports.french=Un,exports.gradeSpellingAttempt=k,exports.math=vi,exports.piano=Iu,exports.pitch=zu,exports.sightSing=eb,exports.transposeSyllableSeq=function(e,t){return e.map((e=>function(e,t){const n={...e},r=Vs.transpose(e.note.name+e.note.octave,ds.fromSemitones(t));return n.note={name:Vs.pitchClass(r),number:e.note.number+t,octave:Vs.octave(r)},n}(e,t)))},exports.typing=bb,exports.useQuestionView=$b,exports.wordWork=Mb;
|
|
74
|
+
Us.version="2.30.1",Hs=kc,Us.fn=gl,Us.min=function(){return Mc("isBefore",[].slice.call(arguments,0))},Us.max=function(){return Mc("isAfter",[].slice.call(arguments,0))},Us.now=function(){return Date.now?Date.now():+new Date},Us.utc=ta,Us.unix=function(e){return kc(1e3*e)},Us.months=function(e,t){return _l(e,t,"months")},Us.isDate=Zs,Us.locale=rc,Us.invalid=ia,Us.duration=Fc,Us.isMoment=la,Us.weekdays=function(e,t,n){return wl(e,t,n,"weekdays")},Us.parseZone=function(){return kc.apply(null,arguments).parseZone()},Us.localeData=sc,Us.isDuration=Pc,Us.monthsShort=function(e,t){return _l(e,t,"monthsShort")},Us.weekdaysMin=function(e,t,n){return wl(e,t,n,"weekdaysMin")},Us.defineLocale=ic,Us.updateLocale=function(e,t){if(null!=t){var n,r,i=Xo;null!=Zo[e]&&null!=Zo[e].parentLocale?Zo[e].set(ga(Zo[e]._config,t)):(null!=(r=nc(e))&&(i=r._config),t=ga(i,t),null==r&&(t.abbr=e),(n=new va(t)).parentLocale=Zo[e],Zo[e]=n),rc(e)}else null!=Zo[e]&&(null!=Zo[e].parentLocale?(Zo[e]=Zo[e].parentLocale,e===rc()&&rc(e)):null!=Zo[e]&&delete Zo[e]);return Zo[e]},Us.locales=function(){return da(Zo)},Us.weekdaysShort=function(e,t,n){return wl(e,t,n,"weekdaysShort")},Us.normalizeUnits=Ea,Us.relativeTimeRounding=function(e){return void 0===e?Gl:"function"==typeof e&&(Gl=e,!0)},Us.relativeTimeThreshold=function(e,t){return void 0!==Wl[e]&&(void 0===t?Wl[e]:(Wl[e]=t,"s"===e&&(Wl.ss=t-1),!0))},Us.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},Us.prototype=gl,Us.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Jl=n.defineComponent({name:"SyllableSeqVis",props:{seq:{type:Object,required:!0},lastTSsuggestion:{type:Number,required:!1,default:0}},setup(e){const t=n.ref(0),r=n.ref(0),i=n.ref(0),s=n.ref(500),a=n.computed((()=>{const t=e.seq.syllables[e.seq.syllables.length-1].timestamp;return Math.max(1,t,e.lastTSsuggestion)})),o=n.computed((()=>{let t=0,n=500;return e.seq.syllables.forEach((e=>{e.notes.forEach((e=>{e.note.number>t&&(t=e.note.number),e.note.number<n&&(n=e.note.number)}))})),Math.max(3*(t-n)+10,0)})),c=()=>{try{t.value=e.seq.syllables[0].timestamp;const n=e.seq.syllables[e.seq.syllables.length-1].timestamp,i=t.value+e.lastTSsuggestion;r.value=Math.max(n,i)}catch(n){console.log(`[SyllableSeqVis] Error updating bounds: ${n}`)}e.seq.syllables.forEach((e=>{e.notes.forEach((e=>{e.note.number>i.value&&(i.value=e.note.number),e.note.number<s.value&&(s.value=e.note.number)}))}))};return n.onMounted((()=>{console.log(`SyllableSeqVis created w/ input: \n${e.seq}`),c()})),{firstTS:t,lastTS:r,high:i,low:s,sayNote:e=>{console.log(`${JSON.stringify(e)}`)},getLastTS:a,getHeight:o,updateBounds:c}}}),eu=["height"],tu=["cx","cy","alt","fill","stroke","onMouseenter"];const nu=C(Jl,[["render",function(e,t,r,i,s,a){return n.openBlock(),n.createElementBlock("div",null,[(n.openBlock(),n.createElementBlock("svg",{width:510,height:Math.max(3*(e.high-e.low)+10,0)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.seq.syllables,(t=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.notes,(r=>(n.openBlock(),n.createElementBlock("circle",{key:t.timestamp+"-"+r.note.number,cx:500*(t.timestamp-e.firstTS)/(e.lastTS-e.firstTS)+4,cy:3*(e.high-r.note.number)+4,alt:r.note.name,r:"3",fill:r.isCorrect?"black":r.isMissing?"none":"red",stroke:r.isMissing?"red":"none",onMouseenter:t=>e.sayNote(r)},null,40,tu)))),128))],64)))),256))],8,eu))])}],["__scopeId","data-v-2f79c080"]]),ru=n.defineComponent({name:"NoteDisplay",props:{chroma:{type:Number,required:!0}},setup:e=>({style:t=>{let n="#ffffff";return t===e.chroma?n="#1976D2":1!==t&&3!==t&&6!==t&&8!==t&&10!==t&&-2!==t||(n="#000000"),{fill:n,"fill-opacity":1,stroke:"#000000","stroke-width":.79375,"stroke-miterlimit":4,"stroke-dasharray":"none","stroke-opacity":1}},white:-1,black:-2})}),iu={id:"svg8",width:"300px",height:"auto","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape","sodipodi:docname":"keys.svg","inkscape:version":"1.0rc1 (09960d6f05, 2020-04-09)",version:"1.1",viewBox:"0 0 175.24936 73.594925"},su={id:"metadata5"},au={id:"layer1",transform:"translate(167.75219,-151.96011)","inkscape:groupmode":"layer","inkscape:label":"Layer 1"};const ou=C(ru,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("sodipodi:namedview"),c=n.resolveComponent("dc:format"),l=n.resolveComponent("dc:type"),u=n.resolveComponent("dc:title"),h=n.resolveComponent("cc:Work"),d=n.resolveComponent("rdf:RDF");return n.openBlock(),n.createElementBlock("svg",iu,[t[1]||(t[1]=n.createElementVNode("defs",{id:"defs2"},null,-1)),n.createVNode(o,{id:"base","inkscape:window-maximized":"1","inkscape:window-y":"726","inkscape:window-x":"1491","inkscape:window-height":"1321","inkscape:window-width":"2400",showborder:"false",showgrid:"false","inkscape:document-rotation":"0","inkscape:current-layer":"layer1","inkscape:document-units":"mm","inkscape:cy":"255.88343","inkscape:cx":"754.94284","inkscape:zoom":"0.98994949","inkscape:pageshadow":"2","inkscape:pageopacity":"0.0",borderopacity:"1.0",bordercolor:"#666666",pagecolor:"#ffffff"}),n.createElementVNode("metadata",su,[n.createVNode(d,null,{default:n.withCtx((()=>[n.createVNode(h,{"rdf:about":""},{default:n.withCtx((()=>[n.createVNode(c,null,{default:n.withCtx((()=>t[0]||(t[0]=[n.createTextVNode("image/svg+xml")]))),_:1}),n.createVNode(l,{"rdf:resource":"http://purl.org/dc/dcmitype/StillImage"}),n.createVNode(u)])),_:1})])),_:1})]),n.createElementVNode("g",au,[n.createElementVNode("rect",{id:"rect845",y:"152.19064",x:"-150.12129",height:"73.220116",width:"17.486626",style:n.normalizeStyle(e.style(0))},null,4),n.createElementVNode("rect",{id:"rect845-9",style:n.normalizeStyle(e.style(2)),width:"17.486626",height:"73.220116",x:"-132.63466",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-6",style:n.normalizeStyle(e.style(4)),width:"17.486626",height:"73.220116",x:"-115.14803",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-4",style:n.normalizeStyle(e.style(5)),width:"17.486626",height:"73.220116",x:"-97.661407",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-92",style:n.normalizeStyle(e.style(7)),width:"17.486626",height:"73.220116",x:"-80.174782",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-3",style:n.normalizeStyle(e.style(9)),width:"17.486626",height:"73.220116",x:"-62.688156",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-0",style:n.normalizeStyle(e.style(11)),width:"17.486626",height:"73.220116",x:"-45.20153",y:"152.19064"},null,4),n.createElementVNode("rect",{id:"rect845-30",style:n.normalizeStyle(e.style(e.white)),width:"17.486626",height:"73.220116",x:"-27.714905",y:"152.10745"},null,4),n.createElementVNode("rect",{id:"rect898",ry:"0",y:"152.10744",x:"-138.43532",height:"54.415863",width:"10.466455",style:n.normalizeStyle(e.style(1))},null,4),n.createElementVNode("rect",{id:"rect898-3",style:n.normalizeStyle(e.style(3)),width:"10.466455",height:"54.415863",x:"-120.84978",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect898-7",style:n.normalizeStyle(e.style(6)),width:"10.466455",height:"54.415863",x:"-85.678711",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect898-8",style:n.normalizeStyle(e.style(8)),width:"10.466455",height:"54.415863",x:"-68.09317",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect898-1",style:n.normalizeStyle(e.style(10)),width:"10.466455",height:"54.415863",x:"-50.507633",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect845-30-1",y:"152.10745",x:"-10.228278",height:"73.220116",width:"17.486626",style:n.normalizeStyle(e.style(e.white))},null,4),n.createElementVNode("rect",{id:"rect845-30-9",y:"152.10744",x:"-167.60791",height:"73.220116",width:"17.486626",style:n.normalizeStyle(e.style(e.white))},null,4),n.createElementVNode("rect",{id:"rect898-4",style:n.normalizeStyle(e.style(e.black)),width:"10.466455",height:"54.415863",x:"-15.336554",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect898-74",style:n.normalizeStyle(e.style(e.black)),width:"4.4679713",height:"54.415863",x:"-167.60791",y:"152.10744",ry:"0"},null,4),n.createElementVNode("rect",{id:"rect898-10",style:n.normalizeStyle(e.style(e.black)),width:"5.1863246",height:"54.507248",x:"2.2092075",y:"152.06175",ry:"0"},null,4)])])}]]),cu=n.defineComponent({name:"Playback",components:{SyllableSeqVis:nu,NoteDisplay:ou},props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"Playback"),s=r.useQuestionView(i),o=n.ref(),c=n.ref(!1),l=n.ref("notSet"),u=n.ref(!1),h=n.ref(0),d=n.ref(Us.utc()),f=n.ref(0),p=n.ref(0),m=n.ref(zs([])),g=n.ref(!1),v=n.ref(zs([])),b=n.ref(0),y=n.ref(""),_=n.ref(0),w=n.ref(0),x=n.ref(),k=n.ref();s.question.value=new wu(e.data);const S=n.computed((()=>new wu(e.data))),C=n.computed((()=>zs(S.value.midi).syllables[0].notes.length>1?"Lowest note of first chord:":"First note:")),M=n.computed((()=>c.value?zs(S.value.midi).rootNote.number%12:0)),E=()=>{var e,t,n;l.value?l.value!==(null==(e=o.value)?void 0:e.state)&&(c.value=!1,l.value=(null==(t=o.value)?void 0:t.state)||"notSet",c.value=!0):(l.value=(null==(n=o.value)?void 0:n.state)||"notSet",c.value=!0),i.logger.log(`Playback is running init with state: ${l.value}`),"ready"===l.value&&(f.value=S.value.duration,P())},T=()=>{try{x.value&&(x.value.style.animationName="",requestAnimationFrame((()=>{requestAnimationFrame((()=>{x.value&&(x.value.style.animationDuration=f.value+"ms",x.value.style.animationName="progress")}))})))}catch{setTimeout(T,50)}},P=()=>{var e,t,n;null==(e=o.value)||e.stopRecording(),null==(t=o.value)||t.eraseRecording(),d.value=Us.utc(),_.value=0,w.value=0,u.value=!1,h.value=0,T(),null==(n=o.value)||n.play(S.value.midi),setTimeout((()=>{i.logger.log("done playback..."),(()=>{var e,t,n;null==(e=o.value)||e.record(),u.value=!0,null==(t=o.value)||t.addNoteonListenter((e=>{var t;_.value++,v.value.append(e),null==(t=k.value)||t.updateBounds(),_.value+w.value>=S.value.midi.length&&A()})),null==(n=o.value)||n.addNoteoffListenter((()=>{w.value++,_.value+w.value>=S.value.midi.length&&A()}))})()}),S.value.lastNoteOnTimestamp)},A=()=>{var e;if(!(null==(e=o.value)?void 0:e.recording))return!1;const t=zs(S.value.midi),n=zs(o.value.recording);return m.value=t.grade(n),v.value=zs([]),!!s.submitAnswer(o.value.recording).isCorrect||(p.value++,g.value=!0,p.value<s.maxAttemptsPerView.value&&P(),!1)},N=()=>{_.value>0?A():P()};return n.onMounted((async()=>{try{o.value=await qs.instance(),o.value.setStateChangeListener((()=>{E()})),c.value=!0}catch(e){r.alertUser({status:a.Status.error,text:"Midi device not supported"}),y.value=JSON.stringify(e),l.value="notsupported",c.value=!0}E(),r.SkldrMouseTrap.addBinding([{hotkey:"space",callback:N,command:"Clear attempt or play again"}])})),n.onBeforeUnmount((()=>{r.SkldrMouseTrap.removeBinding("space")})),{...i,...s,initialized:c,state:l,recording:u,inputSeq:v,lastTSsuggestion:b,gradedSeq:m,graded:g,promptText:C,firstNoteChroma:M,progressBar:x,inputVisRef:k,clearAttempt:N,notesOn:_}}}),lu={key:0,"data-viewable":"Playback"},uu={key:0},hu={class:"text-h4"},du={class:"text-h5"},fu={key:0},pu={class:"progressContainer"},mu={id:"progress",ref:"progressBar"},gu={key:1},vu={key:2};const bu=C(cu,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("note-display"),c=n.resolveComponent("v-icon"),l=n.resolveComponent("v-btn"),u=n.resolveComponent("syllable-seq-vis");return e.initialized?(n.openBlock(),n.createElementBlock("div",lu,["ready"===e.state?(n.openBlock(),n.createElementBlock("div",uu,[n.createElementVNode("div",hu,[n.createTextVNode(n.toDisplayString(e.promptText)+" ",1),n.createVNode(o,{chroma:e.firstNoteChroma},null,8,["chroma"])]),n.createElementVNode("div",du,[t[0]||(t[0]=n.createTextVNode("Listen...")),e.recording?(n.openBlock(),n.createElementBlock("span",fu," and Repeat")):n.createCommentVNode("",!0)]),n.createElementVNode("div",pu,[n.createElementVNode("div",mu,null,512)]),n.createVNode(l,{color:"primary",autofocus:"",onClick:e.clearAttempt},{default:n.withCtx((()=>[t[2]||(t[2]=n.createTextVNode(" Play again ")),n.createVNode(c,{end:""},{default:n.withCtx((()=>t[1]||(t[1]=[n.createTextVNode("volume_up")]))),_:1})])),_:1},8,["onClick"]),(n.openBlock(),n.createBlock(u,{key:0,ref:"inputVisRef",seq:e.inputSeq,"last-t-ssuggestion":e.lastTSsuggestion},null,8,["seq","last-t-ssuggestion"])),e.graded?(n.openBlock(),n.createBlock(u,{key:1,seq:e.gradedSeq},null,8,["seq"])):n.createCommentVNode("",!0)])):"nodevice"===e.state?(n.openBlock(),n.createElementBlock("div",gu,"No midi device detected. Please attach one!")):"notsupported"===e.state?(n.openBlock(),n.createElementBlock("div",vu,t[3]||(t[3]=[n.createElementVNode("p",null,"This exercise requires a midi input device, which is not supported by this browser ☹",-1),n.createElementVNode("div",null,[n.createElementVNode("p",null,"Please try again with one of the following browsers:"),n.createElementVNode("ul",null,[n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://www.google.com/chrome/"},"Google Chrome")]),n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://www.microsoft.com/edge"},"Microsoft Edge")]),n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://brave.com/"},"Brave")])])],-1)]))):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)}]]),yu=[{name:"Melody",type:a.FieldType.MIDI}],_u=class _EchoQuestion extends r.Question{constructor(e){super(e),t(this,"midi"),this.midi=e[0].Melody}get duration(){return this.midi.reduce(((e,t)=>t.timestamp>e.timestamp?t:e)).timestamp}get lastNoteOnTimestamp(){return this.midi.filter((e=>"noteon"===e.type)).reduce(((e,t)=>t.timestamp>e.timestamp?t:e)).timestamp}isCorrect(e){const t=zs(this.midi),n=zs(e);try{return t.grade(n).isCorrect()}catch(r){return console.log("ERROR grading this midi sequence!",r),!1}}dataShapes(){return _EchoQuestion.dataShapes}views(){return _EchoQuestion.views}};t(_u,"dataShapes",[{fields:yu,name:a.DataShapeName.PIANO_Echo}]),t(_u,"views",[bu]);let wu=_u;const xu=n.defineComponent({name:"NotePlayback",components:{},props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"NotePlayback"),s=r.useQuestionView(i),a=n.ref(),o=n.ref(!1),c=n.ref(!1),l=n.ref(0),u=n.ref(Us.utc()),h=n.ref(0),d=n.ref(zs([])),f=n.ref(!1),p=n.ref(zs([])),m=n.ref("");s.question.value=new Nu(e.data);const g=n.computed((()=>new Nu(e.data))),v=()=>{var e,t;null==(e=a.value)||e.stopRecording(),null==(t=a.value)||t.eraseRecording(),u.value=Us.utc(),c.value=!1,l.value=0,(()=>{var e,t,n;null==(e=a.value)||e.record(),c.value=!0,null==(t=a.value)||t.addNoteonListenter((e=>{p.value.append(e)})),null==(n=a.value)||n.addNoteoffListenter((()=>{var e,t,n,r;(null==(t=null==(e=a.value)?void 0:e.recording)?void 0:t.length)&&(null==(r=null==(n=a.value)?void 0:n.recording)?void 0:r.length)>=2&&b()}))})()},b=()=>{var e;return!!(null==(e=a.value)?void 0:e.recording)&&(p.value=zs([]),!!s.submitAnswer(a.value.recording).isCorrect||(h.value++,f.value=!0,h.value<s.maxAttemptsPerView.value&&v(),!1))};return n.onMounted((async()=>{try{a.value=await qs.instance(),m.value=g.value.note,v(),o.value=!0}catch(e){i.logger.error("Failed to initialize MIDI:",e)}})),{...i,...s,initialized:o,recording:c,inputSeq:p,gradedSeq:d,graded:f,note:m,attempts:h}}}),ku={"data-viewable":"NotePlayback"},Su={class:"text-h4"},Cu={class:"font-weight-bold"},Mu={key:0,id:"svg8",width:"300px",height:"auto","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape","sodipodi:docname":"keys.svg","inkscape:version":"1.0rc1 (09960d6f05, 2020-04-09)",version:"1.1",viewBox:"0 0 175.24936 73.594925"},Eu={id:"metadata5"};const Tu=C(xu,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("sodipodi:namedview"),c=n.resolveComponent("dc:format"),l=n.resolveComponent("dc:type"),u=n.resolveComponent("dc:title"),h=n.resolveComponent("cc:Work"),d=n.resolveComponent("rdf:RDF");return n.openBlock(),n.createElementBlock("div",ku,[n.createElementVNode("div",Su,[t[0]||(t[0]=n.createTextVNode(" Play the note: ")),n.createElementVNode("span",Cu,n.toDisplayString(e.note),1)]),e.graded?(n.openBlock(),n.createElementBlock("svg",Mu,[t[2]||(t[2]=n.createElementVNode("defs",{id:"defs2"},null,-1)),n.createVNode(o,{id:"base","inkscape:window-maximized":"1","inkscape:window-y":"726","inkscape:window-x":"1491","inkscape:window-height":"1321","inkscape:window-width":"2400",showborder:"false",showgrid:"false","inkscape:document-rotation":"0","inkscape:current-layer":"layer1","inkscape:document-units":"mm","inkscape:cy":"255.88343","inkscape:cx":"754.94284","inkscape:zoom":"0.98994949","inkscape:pageshadow":"2","inkscape:pageopacity":"0.0",borderopacity:"1.0",bordercolor:"#666666",pagecolor:"#ffffff"}),n.createElementVNode("metadata",Eu,[n.createVNode(d,null,{default:n.withCtx((()=>[n.createVNode(h,{"rdf:about":""},{default:n.withCtx((()=>[n.createVNode(c,null,{default:n.withCtx((()=>t[1]||(t[1]=[n.createTextVNode("image/svg+xml")]))),_:1}),n.createVNode(l,{"rdf:resource":"http://purl.org/dc/dcmitype/StillImage"}),n.createVNode(u)])),_:1})])),_:1})]),t[3]||(t[3]=n.createElementVNode("g",{id:"layer1",transform:"translate(167.75219,-151.96011)","inkscape:groupmode":"layer","inkscape:label":"Layer 1"},[n.createElementVNode("rect",{id:"rect845",y:"152.19064",x:"-150.12129",height:"73.220116",width:"17.486626",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),n.createElementVNode("rect",{id:"rect845-9",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-132.63466",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-6",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-115.14803",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-0",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-45.20153",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-92",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-80.174782",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-3",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-62.688156",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-4",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-97.661407",y:"152.19064"}),n.createElementVNode("rect",{id:"rect845-30",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"17.486626",height:"73.220116",x:"-27.714905",y:"152.10745"}),n.createElementVNode("rect",{id:"rect898",ry:"0",y:"152.10744",x:"-138.43532",height:"54.415863",width:"10.466455",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),n.createElementVNode("rect",{id:"rect898-3",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"10.466455",height:"54.415863",x:"-120.84978",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect898-7",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"10.466455",height:"54.415863",x:"-85.678711",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect898-8",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"10.466455",height:"54.415863",x:"-68.09317",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect898-1",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"10.466455",height:"54.415863",x:"-50.507633",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect845-30-1",y:"152.10745",x:"-10.228278",height:"73.220116",width:"17.486626",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),n.createElementVNode("rect",{id:"rect845-30-9",y:"152.10744",x:"-167.60791",height:"73.220116",width:"17.486626",style:{fill:"#ffffff","fill-opacity":"0",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),n.createElementVNode("rect",{id:"rect898-4",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"10.466455",height:"54.415863",x:"-15.336554",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect898-74",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"4.4679713",height:"54.415863",x:"-167.60791",y:"152.10744",ry:"0"}),n.createElementVNode("rect",{id:"rect898-10",style:{fill:"#000000","fill-opacity":"1",stroke:"#000000","stroke-width":"0.79375","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},width:"5.1863246",height:"54.507248",x:"2.2092075",y:"152.06175",ry:"0"})],-1))])):n.createCommentVNode("",!0)])}]]),Pu=[{name:"Note",type:a.FieldType.STRING}],Au=class _PlayNote extends r.Question{constructor(e){super(e),t(this,"note"),this.note=e[0].Note}isCorrect(e){return e[0].note.name===this.note}dataShapes(){return _PlayNote.dataShapes}views(){return _PlayNote.views}};t(Au,"dataShapes",[{fields:Pu,name:a.DataShapeName.PIANO_PlayNote}]),t(Au,"seedData",["A","B","C","D","E","F","G","A♯","C♯","D♯","F♯","G♯","D♭","E♭","G♭","A♭","B♭"].map((e=>({Note:e})))),t(Au,"views",[Tu]);let Nu=Au;const Iu=new CourseWare("piano",[wu,Nu]),Ou=n.defineComponent({name:"IdentifyChroma",components:{RadioMultipleChoice:r.RadioMultipleChoice},props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"IdentifyChroma"),s=r.useQuestionView(i),a=n.ref(""),o=n.ref(new AudioContext);s.question.value=new Fu(e.data);const c=n.computed((()=>s.question.value));n.onMounted((()=>{(e=>{const t=[];let n=e/2;for(;n>100;)t.push(n),n/=2;t.push(e);let r=2*e;for(;r<5e3;)t.push(r),r*=2;return t})(295).forEach((e=>(e=>{const t=o.value.createOscillator();t.type="sine",t.frequency.value=e;const n=o.value.createGain();console.log("Max Gain: "+n.gain.maxValue),n.gain.setValueAtTime(0,0),n.gain.linearRampToValueAtTime(.5,15),t.connect(n),n.connect(o.value.destination),t.start(0),t.stop(14)})(e)))}));return{...i,...s,answer:a,question:c,submit:()=>{c.value&&c.value.isCorrect(a.value)}}}}),Du={"data-viewable":"IdentifyChroma"};const Lu=C(Ou,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("radio-multiple-choice");return n.openBlock(),n.createElementBlock("div",Du,[e.question?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t[0]||(t[0]=n.createTextVNode(" What note is being played? ")),n.createVNode(o,{"choice-list":e.question.choiceList},null,8,["choice-list"])],64)):n.createCommentVNode("",!0)])}]]);var Bu=(e=>(e.A="A",e.B="B",e.C="C",e.D="D",e.E="E",e.F="F",e.G="G",e))(Bu||{});const Vu=[{name:"Chroma",type:a.FieldType.STRING,validator:{test:e=>Object.values(Bu).includes(e)?{status:a.Status.ok,msg:""}:{status:a.Status.error,msg:"That's not a chroma!"},instructions:"Enter a valid musical note (A-G)"}}],Ru=class _ChromaQuestion extends r.Question{constructor(e){super(e),t(this,"chroma"),this.chroma=e[0].Chroma}get baseFreq(){const e=440;return"A"===this.chroma?e:"B"===this.chroma?e*Math.pow(2,2/12):"C"===this.chroma?e*Math.pow(2,.25):e}get choiceList(){return b.shuffle([this.chroma.toString(),"test","options","are","fun"])}isCorrect(e){return e.choiceList[e.selection]===this.chroma.toString()}dataShapes(){return _ChromaQuestion.dataShapes}views(){return _ChromaQuestion.views}};t(Ru,"dataShapes",[{fields:Vu,name:a.DataShapeName.PITCH_chroma}]),t(Ru,"views",[Lu]);let Fu=Ru;const zu=new CourseWare("pitch",[Fu]);var ju,qu,Hu,Yu,Uu,Gu,Wu,$u,Ku,Qu,Xu,Zu,Ju,eh,th,nh,rh,ih,sh,ah,oh,ch,lh,uh;function hh(){if(Yu)return Hu;Yu=1;return Hu=function(e,t){var n=this;if(t||(t={}),n.qpm=t.qpm?parseInt(t.qpm,10):null,!n.qpm){var r=e.metaText?e.metaText.tempo:null;n.qpm=e.getBpm(r)}n.extraMeasuresAtBeginning=t.extraMeasuresAtBeginning?parseInt(t.extraMeasuresAtBeginning,10):0,n.beatCallback=t.beatCallback,n.eventCallback=t.eventCallback,n.lineEndCallback=t.lineEndCallback,n.lineEndAnticipation=t.lineEndAnticipation?parseInt(t.lineEndAnticipation,10):0,n.beatSubdivisions=t.beatSubdivisions?parseInt(t.beatSubdivisions,10):1,n.joggerTimer=null,n.replaceTarget=function(e){n.noteTimings=e.setTiming(n.qpm,n.extraMeasuresAtBeginning),0===e.noteTimings.length&&(n.noteTimings=e.setTiming(0,0)),n.lineEndCallback&&(n.lineEndTimings=function(e,t){for(var n=[],r=null,i=0;i<e.length;i++){var s=e[i];"end"!==s.type&&s.top!==r&&(n.push({measureNumber:s.measureNumber,milliseconds:s.milliseconds-t,top:s.top,bottom:s.top+s.height}),r=s.top)}return n}(e.noteTimings,n.lineEndAnticipation)),n.startTime=null,n.currentBeat=0,n.currentEvent=0,n.currentLine=0,n.currentTime=0,n.isPaused=!1,n.isRunning=!1,n.pausedPercent=null,n.justUnpaused=!1,n.newSeekPercent=0,n.lastTimestamp=0,0!==n.noteTimings.length&&(n.millisecondsPerBeat=1e3/(n.qpm/60)/n.beatSubdivisions,n.lastMoment=n.noteTimings[n.noteTimings.length-1].milliseconds,n.totalBeats=Math.round(n.lastMoment/n.millisecondsPerBeat))},n.replaceTarget(e),n.doTiming=function(e){if(n.lastTimestamp!==e&&(n.lastTimestamp=e,n.startTime||(n.startTime=e),!n.isPaused&&n.isRunning)){for(n.currentTime=e-n.startTime,n.currentTime+=16;n.noteTimings.length>n.currentEvent&&n.noteTimings[n.currentEvent].milliseconds<n.currentTime;){if(n.eventCallback&&"event"===n.noteTimings[n.currentEvent].type){var t=n.startTime;n.eventCallback(n.noteTimings[n.currentEvent]),t!==n.startTime&&(n.currentTime=e-n.startTime)}n.currentEvent++}if(n.lineEndCallback&&n.lineEndTimings.length>n.currentLine&&n.lineEndTimings[n.currentLine].milliseconds<n.currentTime&&n.currentEvent<n.noteTimings.length){var r=n.noteTimings[n.currentEvent].milliseconds===n.currentTime?n.noteTimings[n.currentEvent]:n.noteTimings[n.currentEvent-1];n.lineEndCallback(n.lineEndTimings[n.currentLine],r,{line:n.currentLine,endTimings:n.lineEndTimings,currentTime:n.currentTime}),n.currentLine++}if(n.currentTime<n.lastMoment){if(requestAnimationFrame(n.doTiming),n.currentBeat*n.millisecondsPerBeat<n.currentTime){var i=n.doBeatCallback(e);null!==i&&(n.currentTime=i)}}else if(n.currentBeat<=n.totalBeats&&n.beatCallback){var s=n.doBeatCallback(e);null!==s&&(n.currentTime=s),requestAnimationFrame(n.doTiming)}if(n.currentTime>=n.lastMoment)if(n.eventCallback){var a=n.eventCallback(null);n.shouldStop(a).then((function(e){e&&n.stop()}))}else n.stop()}},n.shouldStop=function(e){return new Promise((function(t){return e?"continue"===e?t(!1):void(e.then&&e.then((function(e){t("continue"!==e)}))):t(!0)}))},n.doBeatCallback=function(e){if(n.beatCallback){for(var t,r,i=n.currentEvent;i<n.noteTimings.length&&null===n.noteTimings[i].left;)i++;if(i<n.noteTimings.length){for(t=n.noteTimings[i].milliseconds,i=Math.max(0,n.currentEvent-1);i>=0&&null===n.noteTimings[i].left;)i--;r=n.noteTimings[i]}var s={},a={};if(r){s.top=r.top,s.height=r.height;var o=Math.max(0,e-n.startTime-r.milliseconds),c=t-r.milliseconds,l=r.endX-r.left,u=c?o*l/c:0;s.left=r.left+u,0===n.currentEvent&&r.milliseconds>e-n.startTime&&(s.left=void 0),a={timestamp:e,startTime:n.startTime,ev:r,endMs:t,offMs:o,offPx:u,gapMs:c,gapPx:l}}else a={timestamp:e,startTime:n.startTime};var h=n.startTime;if(n.beatCallback(n.currentBeat/n.beatSubdivisions,n.totalBeats/n.beatSubdivisions,n.lastMoment,s,a),h!==n.startTime)return e-n.startTime;n.currentBeat++}return null};n.animationJogger=function(){n.isRunning&&(n.doTiming(performance.now()),n.joggerTimer=setTimeout(n.animationJogger,60))},n.start=function(e,t){if(n.isRunning=!0,n.isPaused&&(n.isPaused=!1,void 0===e&&(n.justUnpaused=!0)),e)n.setProgress(e,t);else if(0===e)n.reset();else if(null!==n.pausedPercent){var r=performance.now();n.currentTime=n.lastMoment*n.pausedPercent,n.startTime=r-n.currentTime,n.pausedPercent=null,n.reportNext=!0}requestAnimationFrame(n.doTiming),n.joggerTimer=setTimeout(n.animationJogger,60)},n.pause=function(){n.isPaused=!0;var e=performance.now();n.pausedPercent=(e-n.startTime)/n.lastMoment,n.isRunning=!1,n.joggerTimer&&(clearTimeout(n.joggerTimer),n.joggerTimer=null)},n.currentMillisecond=function(){return n.currentTime},n.reset=function(){n.currentBeat=0,n.currentEvent=0,n.currentLine=0,n.startTime=null,n.pausedPercent=null},n.stop=function(){n.pause(),n.reset()},n.setProgress=function(e,t){var r;switch(t){case"seconds":n.currentTime=1e3*e,n.currentTime<0&&(n.currentTime=0),n.currentTime>n.lastMoment&&(n.currentTime=n.lastMoment),r=n.currentTime/n.lastMoment;break;case"beats":n.currentTime=e*n.millisecondsPerBeat*n.beatSubdivisions,n.currentTime<0&&(n.currentTime=0),n.currentTime>n.lastMoment&&(n.currentTime=n.lastMoment),r=n.currentTime/n.lastMoment;break;default:(r=e)<0&&(r=0),r>1&&(r=1),n.currentTime=n.lastMoment*r}n.isRunning||(n.pausedPercent=r);var i=performance.now();for(n.startTime=i-n.currentTime,n.currentEvent,n.currentEvent=0;n.noteTimings.length>n.currentEvent&&n.noteTimings[n.currentEvent].milliseconds<n.currentTime;)n.currentEvent++;if(n.lineEndCallback)for(n.currentLine=0;n.lineEndTimings.length>n.currentLine&&n.lineEndTimings[n.currentLine].milliseconds+n.lineEndAnticipation<n.currentTime;)n.currentLine++;var s=n.currentBeat;n.currentBeat=Math.floor(n.currentTime/n.millisecondsPerBeat),n.beatCallback&&s!==n.currentBeat&&n.doBeatCallback(n.startTime+n.currentTime),n.eventCallback&&n.currentEvent>=0&&"event"===n.noteTimings[n.currentEvent].type&&n.eventCallback(n.noteTimings[n.currentEvent]),n.lineEndCallback&&n.lineEndCallback(n.lineEndTimings[n.currentLine],n.noteTimings[n.currentEvent],{line:n.currentLine,endTimings:n.lineEndTimings}),n.joggerTimer=setTimeout(n.animationJogger,60)}}}function dh(){if(Gu)return Uu;Gu=1;var e,t,n=hh(),r={};return r.startAnimation=function(r,i,s){function a(e){for(var t=0;t<e.length;t++){var n=e[t];n.classList.contains("abcjs-bar")||(n.style.display="none")}}var o;function c(e){s.hideCurrentMeasure?function(e){a(r.querySelectorAll(e))}(e):s.hideFinishedMeasures&&function(e){o&&a(r.querySelectorAll(o)),o=e}(e)}e&&(e.stop(),e=void 0),s.showCursor&&((t=r.querySelector(".abcjs-cursor"))||((t=document.createElement("DIV")).className="abcjs-cursor cursor",t.style.position="absolute",r.appendChild(t),r.style.position="relative")),(e=new n(i,{qpm:s.bpm,eventCallback:function(n){if(n){if(n.measureStart){var r=".abcjs-l"+(i=n).line+".abcjs-m"+i.measureNumber;r&&c(r)}t&&(t.style.left=n.left+"px",t.style.top=n.top+"px",t.style.width=n.width+"px",t.style.height=n.height+"px")}else e.stop(),e=void 0;var i}})).start()},r.pauseAnimation=function(t){e&&(t?e.pause():e.start())},r.stopAnimation=function(){e&&(e.stop(),e=void 0)},Uu=r}function fh(){if($u)return Wu;$u=1;var e={cloneArray:function(e){for(var t=[],n=0;n<e.length;n++)t.push(Object.assign({},e[n]));return t},cloneHashOfHash:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=Object.assign({},e[n]));return t},cloneHashOfArrayOfHash:function(t){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e.cloneArray(t[r]));return n},strip:function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")},startsWith:function(e,t){return 0===e.indexOf(t)},endsWith:function(e,t){var n=e.length-t.length;return n>=0&&e.lastIndexOf(t)===n},last:function(e){return 0===e.length?null:e[e.length-1]}};return Wu=e}function ph(){if(Qu)return Ku;Qu=1;var e=fh(),t={};return function(){var n,r,i,s,a;t.initialize=function(e,t,o,c,l){n=e,r=t,s=c,a=l,(i=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},i.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},i.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},i.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},i.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},i.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},i.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},s.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},s.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},s.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},s.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},s.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},s.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},s.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},s.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},s.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},s.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},s.formatting.annotationfont=i.annotationfont,s.formatting.gchordfont=i.gchordfont,s.formatting.historyfont=i.historyfont,s.formatting.infofont=i.infofont,s.formatting.measurefont=i.measurefont,s.formatting.partsfont=i.partsfont,s.formatting.repeatfont=i.repeatfont,s.formatting.textfont=i.textfont,s.formatting.tripletfont=i.tripletfont,s.formatting.vocalfont=i.vocalfont,s.formatting.wordsfont=i.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,t,n,i,s){function a(){var a=parseInt(e[0].token);return e.shift(),t?0===e.length?{face:t.face,weight:t.weight,style:t.style,decoration:t.decoration,size:a}:1===e.length&&"box"===e[0].token&&o[s]?{face:t.face,weight:t.weight,style:t.style,decoration:t.decoration,size:a,box:!0}:(r("Extra parameters in font definition.",n,i),{face:t.face,weight:t.weight,style:t.style,decoration:t.decoration,size:a}):(r("Can't set just the size of the font since there is no default value.",n,i),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:a})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return a();r("Expected font size number after *.",n,i)}if("number"===e[0].type)return a();for(var c,l=[],u="normal",h="normal",d="none",f=!1,p="face",m=!1;e.length;){var g=e.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?r("Font size specified twice in font definition.",n,i):c=g.token,p="modifier"):"bold"===v?u="bold":"italic"===v?h="italic":"underline"===v?d="underline":"box"===v?(o[s]?f=!0:r('This font style doesn\'t support "box"',n,i),p="finished"):"utf"===v?(g=e.shift(),p="size"):r("Unknown parameter "+g.token+" in font definition.",n,i);break;case"size":"number"===g.type?c?r("Font size specified twice in font definition.",n,i):c=g.token:r("Expected font size in font definition.",n,i),p="modifier";break;case"modifier":"bold"===v?u="bold":"italic"===v?h="italic":"underline"===v?d="underline":"box"===v?(o[s]?f=!0:r('This font style doesn\'t support "box"',n,i),p="finished"):r("Unknown parameter "+g.token+" in font definition.",n,i);break;case"finished":r('Extra characters found after "box" in font definition.',n,i)}}void 0===c?t?c=t.size:(r("Must specify the size of the font since there is no default value.",n,i),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(t?l=t.face:(r("Must specify the name of the font since there is no default value.",n,i),l="sans-serif"));var b=function(e){switch(e){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}}(l),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=u,y.style=h,y.decoration=d,y.size=c,f&&(y.box=!0),y)},l=function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(i[e]=c(t,i[e],n,0,e),i.is_in_header&&(s.formatting[e]=i[e]),null)},u=function(e,t){var n="";t.forEach((function(e){n+=e.token}));var r=parseFloat(n);if(isNaN(r)||0===r)return'Directive "'+e+'" requires a number as a parameter.';s.formatting.scale=r},h=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],d=function(e,t,n,r,s){if(1!==n.length||"number"!==n[0].type)return'Directive "'+t+'" requires a number as a parameter.';var a=n[0].intt;return void 0!==r&&a<r?'Directive "'+t+'" requires a number greater than or equal to '+r+" as a parameter.":void 0!==s&&a>s?'Directive "'+t+'" requires a number less than or equal to '+s+" as a parameter.":(i[e]=a,null)},f=function(e,t,n){if(1===n.length&&("true"===n[0].token||"false"===n[0].token))return i[e]="true"===n[0].token,null;var r=d(e,t,n,0,1);return null!==r?r:(i[e]=1===i[e],null)},p=function(e,t,n,r){if(1!==n.length)return'Directive "'+t+'" requires one of [ '+r.join(", ")+" ] as a parameter.";for(var s=n[0].token,a=!1,o=0;!a&&o<r.length;o++)r[o]===s&&(a=!0);return a?(i[e]=s,null):'Directive "'+t+'" requires one of [ '+r.join(", ")+" ] as a parameter."},m=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],g=["gchord","ptstress","beatstring"],v=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],b=["program"],y=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],_=["beat"],w=["drone"],x=["portamento"],k=["expand","grace","trim"],S=["drum","chordname"],C=["bassprog","chordprog"];t.parseFontChangeLine=function(e){var t=(e=e.replace(/\$\$/g,"")).split("$");if(t.length>1&&i.setfont){var n=[];""!==t[0]&&n.push({text:t[0]});for(var r=1;r<t.length;r++)if("0"===t[r][0])n.push({text:t[r].substring(1).replace(/\x03/g,"$$")});else{var s=parseInt(t[r][0],10);i.setfont[s]?n.push({font:i.setfont[s],text:t[r].substring(1).replace(/\x03/g,"$$")}):n[n.length-1].text+="$"+t[r].replace(/\x03/g,"$$")}return n}return e.replace(/\x03/g,"$$")};var M=["auto","above","below","hidden"];function E(e){if(0===e.length)return{value:1};if(1===e.length)if("number"===e[0].type){if(e[0].floatt>=0||e[0].floatt<=1)return{value:e[0].floatt}}else{if("false"===e[0].token)return{value:0};if("true"===e[0].token)return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+e[0].token+")"}}t.addDirective=function(o){var T=n.tokenize(o,0,o.length);if(0===T.length||"alpha"!==T[0].type)return null;var P=o.substring(o.indexOf(T[0].token)+T[0].token.length);P=n.stripComment(P);var A,N=T.shift().token.toLowerCase(),I="";switch(N){case"bagpipes":s.formatting.bagpipes=!0;break;case"flatbeams":s.formatting.flatbeams=!0;break;case"jazzchords":s.formatting.jazzchords=!0;break;case"accentAbove":s.formatting.accentAbove=!0;break;case"germanAlphabet":s.formatting.germanAlphabet=!0;break;case"landscape":i.landscape=!0;break;case"papersize":i.papersize=P;break;case"graceslurs":if(1!==T.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===T[0].token||"false"===T[0].token)s.formatting.graceSlurs=!1;else{if("1"!==T[0].token&&"true"!==T[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+T[0].token+")";s.formatting.graceSlurs=!0}break;case"lineThickness":var O=E(T);if(void 0!==O.value&&(s.formatting.lineThickness=O.value),O.error)return O.error;break;case"stretchlast":var D=E(T);if(void 0!==D.value&&(s.formatting.stretchlast=D.value),D.error)return D.error;break;case"titlecaps":i.titlecaps=!0;break;case"titleleft":s.formatting.titleleft=!0;break;case"measurebox":s.formatting.measurebox=!0;break;case"vocal":return p("vocalPosition",N,T,M);case"dynamic":return p("dynamicPosition",N,T,M);case"gchord":return p("chordPosition",N,T,M);case"ornament":return p("ornamentPosition",N,T,M);case"volume":return p("volumePosition",N,T,M);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(e,t){var r=n.getMeasurement(t);return 0===r.used||0!==t.length?'Directive "'+e+'" requires a measurement as a parameter.':(s.formatting[e]=r.value,null)}(N,T);case"voicescale":if(1!==T.length||"number"!==T[0].type)return"voicescale requires one float as a parameter";var L=T.shift();return i.currentVoice&&(i.currentVoice.scale=L.floatt,a.changeVoiceScale(i.currentVoice.scale)),null;case"voicecolor":if(1!==T.length)return"voicecolor requires one string as a parameter";var B=T.shift();return i.currentVoice&&(i.currentVoice.color=B.token,a.changeVoiceColor(i.currentVoice.color)),null;case"vskip":var V=Math.round(function(e,t){var r=n.getMeasurement(t);return 0===r.used||0!==t.length?{error:'Directive "'+e+'" requires a measurement as a parameter.'}:r.value}(N,T));return V.error?V.error:(a.addSpacing(V),null);case"scale":u(N,T);break;case"sep":if(0===T.length)a.addSeparator(14,14,85,{startChar:i.iChar,endChar:i.iChar+5});else{var R=n.getMeasurement(T);if(0===R.used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var F=R.value;if(0===(R=n.getMeasurement(T)).used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var z=R.value;if(0===(R=n.getMeasurement(T)).used||0!==T.length)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var j=R.value;a.addSeparator(F,z,j,{startChar:i.iChar,endChar:i.iChar+P.length})}break;case"barsperstaff":if(null!==(I=d("barsperstaff",N,T)))return I;break;case"staffnonote":if(1!==T.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===T[0].token)i.staffnonote=!0;else{if("1"!==T[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+T[0].token+")";i.staffnonote=!1}break;case"printtempo":if(null!==(I=f("printTempo",N,T)))return I;break;case"partsbox":if(null!==(I=f("partsBox",N,T)))return I;i.partsfont.box=i.partsBox;break;case"freegchord":if(null!==(I=f("freegchord",N,T)))return I;break;case"measurenb":case"barnumbers":if(null!==(I=d("barNumbers",N,T)))return I;break;case"setbarnb":if(1!==T.length||"number"!==T[0].type)return"Directive setbarnb requires a number as a parameter.";i.currBarNumber=a.setBarNumberImmediate(T[0].intt);break;case"begintext":var q="";for(A=n.nextLine();A&&0!==A.indexOf("%%endtext");)e.startsWith(A,"%%")?q+=A.substring(2)+"\n":q+=A+"\n",A=n.nextLine();a.addText(q,{startChar:i.iChar,endChar:i.iChar+q.length+7});break;case"continueall":i.continueall=!0;break;case"beginps":for(A=n.nextLine();A&&0!==A.indexOf("%%endps");)n.nextLine();r("Postscript ignored",o,0);break;case"deco":P.length>0&&i.ignoredDecorations.push(P.substring(0,P.indexOf(" "))),r("Decoration redefinition ignored",o,0);break;case"text":var H=n.translateString(P);a.addText(t.parseFontChangeLine(H),{startChar:i.iChar,endChar:i.iChar+P.length+7});break;case"center":var Y=n.translateString(P);a.addCentered(t.parseFontChangeLine(Y));break;case"font":break;case"setfont":var U=n.tokenize(P,0,P.length);if(U.length>=4&&"-"===U[0].token&&"number"===U[1].type){var G=parseInt(U[1].token);G>=1&&G<=9&&(i.setfont||(i.setfont=[]),U.shift(),U.shift(),i.setfont[G]=c(U,i.setfont[G],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(N,T,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(s.formatting[e]=c(t,s.formatting[e],n,0,e),null)}(N,T,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",T,o);case"staves":case"score":i.score_is_present=!0;for(var W,$=function(t,n,r,s,a){(n||0===i.staves.length)&&i.staves.push({index:i.staves.length,numVoices:0});var o=e.last(i.staves);void 0!==r&&void 0===o.bracket&&(o.bracket=r),void 0!==s&&void 0===o.brace&&(o.brace=s),a&&(o.connectBarLines="end"),void 0===i.voices[t]&&(i.voices[t]={staffNum:o.index,index:o.numVoices},o.numVoices++)},K=!1,Q=!1,X=!1,Z=!1,J=!1,ee=!1,te=!1,ne=function(){if(te=!0,W){var e="start";W.staffNum>0&&("start"!==i.staves[W.staffNum-1].connectBarLines&&"continue"!==i.staves[W.staffNum-1].connectBarLines||(e="continue")),i.staves[W.staffNum].connectBarLines=e}};T.length;){var re=T.shift();switch(re.token){case"(":K?r("Can't nest parenthesis in %%score",o,re.start):(K=!0,Z=!0);break;case")":!K||Z?r("Unexpected close parenthesis in %%score",o,re.start):K=!1;break;case"[":Q?r("Can't nest brackets in %%score",o,re.start):(Q=!0,J=!0);break;case"]":!Q||J?r("Unexpected close bracket in %%score",o,re.start):(Q=!1,i.staves[W.staffNum].bracket="end");break;case"{":X?r("Can't nest braces in %%score",o,re.start):(X=!0,ee=!0);break;case"}":!X||ee?r("Unexpected close brace in %%score",o,re.start):(X=!1,i.staves[W.staffNum].brace="end");break;case"|":ne();break;default:for(var ie="";("alpha"===re.type||"number"===re.type)&&(ie+=re.token,re.continueId);)re=T.shift();$(ie,!K||Z,J?"start":Q?"continue":void 0,ee?"start":X?"continue":void 0,te),Z=!1,J=!1,ee=!1,te=!1,W=i.voices[ie],"staves"===N&&ne()}}break;case"newpage":var se=n.getInt(P);a.addNewPage(0===se.digits?-1:se.value);break;case"abc":var ae=P.split(" ");switch(ae[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var oe=ae.shift();a.addMetaText(N+oe,ae.join(" "),{startChar:i.iChar,endChar:i.iChar+P.length+5});break;default:return"Unknown directive: "+N+ae[0]}break;case"header":case"footer":var ce=n.getMeat(P,0,P.length);'"'===(ce=P.substring(ce.start,ce.end))[0]&&'"'===ce[ce.length-1]&&(ce=ce.substring(1,ce.length-1));var le=ce.split("\t"),ue={};ue=1===le.length?{left:"",center:le[0],right:""}:2===le.length?{left:le[0],center:le[1],right:""}:{left:le[0],center:le[1],right:le[2]},le.length>3&&r("Too many tabs in "+N+": "+le.length+" found.",P,0),a.addMetaTextObj(N,ue,{startChar:i.iChar,endChar:i.iChar+o.length});break;case"midi":var he=n.tokenize(P,0,P.length,!0);he.length>0&&"="===he[0].token&&he.shift(),0===he.length?r("Expected midi command",P,0):function(e,t,n){var i=e.shift().token,s=[];if(m.indexOf(i)>=0)0!==e.length&&r("Unexpected parameter in MIDI "+i,n,0);else if(g.indexOf(i)>=0)1!==e.length?r("Expected one parameter in MIDI "+i,n,0):s.push(e[0].token);else if(v.indexOf(i)>=0)1!==e.length?r("Expected one parameter in MIDI "+i,n,0):"number"!==e[0].type?r("Expected one integer parameter in MIDI "+i,n,0):s.push(e[0].intt);else if(b.indexOf(i)>=0)1!==e.length&&2!==e.length?r("Expected one or two parameters in MIDI "+i,n,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?r("Expected integer parameter in MIDI "+i,n,0):(s.push(e[0].intt),2===e.length&&s.push(e[1].intt));else if(y.indexOf(i)>=0)2!==e.length?r("Expected two parameters in MIDI "+i,n,0):"number"!==e[0].type||"number"!==e[1].type?r("Expected two integer parameters in MIDI "+i,n,0):(s.push(e[0].intt),s.push(e[1].intt));else if(x.indexOf(i)>=0)2!==e.length?r("Expected two parameters in MIDI "+i,n,0):"alpha"!==e[0].type||"number"!==e[1].type?r("Expected one string and one integer parameters in MIDI "+i,n,0):(s.push(e[0].token),s.push(e[1].intt));else if("drummap"===i)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(t.formatting||(t.formatting={}),t.formatting.midi||(t.formatting.midi={}),t.formatting.midi.drummap||(t.formatting.midi.drummap={}),t.formatting.midi.drummap[e[0].token]=e[1].intt,s=t.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(t.formatting||(t.formatting={}),t.formatting.midi||(t.formatting.midi={}),t.formatting.midi.drummap||(t.formatting.midi.drummap={}),t.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,s=t.formatting.midi.drummap):r("Expected one note name and one integer parameter in MIDI "+i,n,0);else if(k.indexOf(i)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?r("Expected fraction parameter in MIDI "+i,n,0):(s.push(e[0].intt),s.push(e[2].intt));else if(_.indexOf(i)>=0)4!==e.length?r("Expected four parameters in MIDI "+i,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?r("Expected four integer parameters in MIDI "+i,n,0):(s.push(e[0].intt),s.push(e[1].intt),s.push(e[2].intt),s.push(e[3].intt));else if(w.indexOf(i)>=0)5!==e.length?r("Expected five parameters in MIDI "+i,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?r("Expected five integer parameters in MIDI "+i,n,0):(s.push(e[0].intt),s.push(e[1].intt),s.push(e[2].intt),s.push(e[3].intt),s.push(e[4].intt));else if(b.indexOf(i)>=0)1!==e.length||4!==e.length?r("Expected one or two parameters in MIDI "+i,n,0):"number"!==e[0].type?r("Expected integer parameter in MIDI "+i,n,0):4===e.length?("octave"!==e[1].token&&r("Expected octave parameter in MIDI "+i,n,0),"="!==e[2].token&&r("Expected octave parameter in MIDI "+i,n,0),"number"!==e[3].type&&r("Expected integer parameter for octave in MIDI "+i,n,0)):(s.push(e[0].intt),4===e.length&&s.push(e[3].intt));else if(S.indexOf(i)>=0)if(e.length<2)r("Expected string parameter and at least one integer parameter in MIDI "+i,n,0);else if("alpha"!==e[0].type)r("Expected string parameter and at least one integer parameter in MIDI "+i,n,0);else{var o=e.shift();for(s.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&r("Expected integer parameter in MIDI "+i,n,0),s.push(o.intt)}else if(C.indexOf(i)>=0)if(1!==e.length&&2!==e.length)r("Expected one or two parameters in MIDI "+i,n,0);else if("number"!==e[0].type)r("Expected integer parameter in MIDI "+i,n,0);else if(2===e.length&&"alpha"!==e[1].type)r("Expected alpha parameter in MIDI "+i,n,0);else if(s.push(e[0].intt),2===e.length){var c=e[1].token;-1!=c.indexOf("octave=")?(c=c.replace("octave=",""),c=parseInt(c),isNaN(c)?r("Expected octave value in MIDI"+i):(c<-1&&(r("Expected octave= in MIDI "+i+" to be >= -1 (recv:"+c+")"),c=-1),c>3&&(r("Expected octave= in MIDI "+i+" to be <= 3 (recv:"+c+")"),c=3),s.push(c))):r("Expected octave= in MIDI"+i)}a.hasBeginMusic()?a.appendElement("midi",-1,-1,{cmd:i,params:s}):(void 0===t.formatting.midi&&(t.formatting.midi={}),t.formatting.midi[i]=s)}(he,s,P);break;case"percmap":var de=function(e){var t=e.split(/\s+/);if(2!==t.length&&3!==t.length)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var n=t[0],r=parseInt(t[1],10);if((isNaN(r)||r<35||r>81)&&t[1]&&(r=h.indexOf(t[1].toLowerCase())+35),isNaN(r)||r<35||r>81)return{error:'Expected drum name, received "'+t[1]+'"'};var i={sound:r};return 3===t.length&&(i.noteHead=t[2]),{key:n,value:i}}(P);de.error?r(de.error,o,8):(s.formatting.percmap||(s.formatting.percmap={}),s.formatting.percmap[de.key]=de.value);break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":s.formatting[N]=P;break;default:return"Unknown directive: "+N}return null},t.globalFormatting=function(e){for(var t in e)if(e.hasOwnProperty(t)){var a,o=""+e[t],c=n.tokenize(o,0,o.length);switch(t){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":l(t,c,o);break;case"scale":u(t,c);break;case"partsbox":null!==(a=f("partsBox",t,c))&&r(a),i.partsfont.box=i.partsBox;break;case"freegchord":null!==(a=f("freegchord",t,c))&&r(a);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||r('Directive "'+t+'" requires a number as a parameter.'),s.formatting.fontboxpadding=c[0].floatt;break;case"stafftopmargin":1===c.length&&"number"===c[0].type||r('Directive "'+t+'" requires a number as a parameter.'),s.formatting.stafftopmargin=c[0].floatt;break;case"stretchlast":var h=E(c);if(void 0!==h.value&&(s.formatting.stretchlast=h.value),h.error)return h.error;break;default:r("Formatting directive unrecognized: ",t,0)}}}}(),Ku=t}function mh(){if(eh)return Ju;eh=1;var e=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],t=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],n=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],r=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];return Ju=function(i,s,a,o){if(!s||s%12==0)return i;for(;s<0;)s+=12;s>11&&(s%=12);var c=i.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!c)return i;var l,u=c[1],h=c[2],d=c[3],f=c[4];return(l=e.indexOf(u))<0&&(l=t.indexOf(u)),l<0&&(l=n.indexOf(u)),l<0&&(l=r.indexOf(u)),l<0||(l+=s,l%=12,i=a?o?r[l]:t[l]:o?n[l]:e[l],h&&(i+=h),d&&((l=e.indexOf(d))<0&&(l=t.indexOf(d)),l<0&&(l=n.indexOf(d)),l<0&&(l=r.indexOf(d)),i+="/",l>=0?(l+=s,l%=12,i+=a?o?r[l]:t[l]:o?n[l]:e[l]):i+=d),f&&(i+=f)),i}}function gh(){if(nh)return th;nh=1;var e={C:{modes:["CMaj","Amin","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","Bbmin","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","Bmin","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","Cmin","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","C#min","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","Dmin","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","Ebmin","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","Emin","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","Fmin","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","F#min","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","Gmin","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","G#min","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","A#min","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","D#min","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","Abmin","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},t=null;return th={relativeMajor:function(n){t||function(){t={};for(var n=Object.keys(e),r=0;r<n.length;r++){var i=e[n[r]];t[n[r].toLowerCase()]=n[r];for(var s=0;s<i.modes.length;s++){var a=i.modes[s].toLowerCase();t[a]=n[r]}}}();var r=n.toLowerCase().match(/([a-g][b#]?)(maj|min|mix|dor|phr|lyd|loc|m)?/);if(!r||!r[2])return n;r=r[1]+r[2];var i=t[r];return i||n},relativeMode:function(t,n){var r=e[t];if(!r)return t;if(""===n)return t;var i=n.toLowerCase().match(/^(maj|min|mix|dor|phr|lyd|loc|m)/);if(!i)return t;for(var s=i[1],a=0;a<r.modes.length;a++){var o=r.modes[a],c=o.toLowerCase().indexOf(s);if(-1!==c&&c===o.length-s.length)return o.substring(0,o.length-s.length)}return t},transposeKey:function(t,n){var r=e[t];if(!r)return t;for(;n<0;)n+=12;for(var i=(r.stepsFromC+n)%12,s=0;s<Object.keys(e).length;s++){var a=Object.keys(e)[s];if(e[a].stepsFromC===i)return a}return t}}}function vh(){if(ih)return rh;ih=1;var{relativeMajor:e}=gh(),t={acc:"sharp",note:"f"},n={acc:"sharp",note:"c"},r={acc:"sharp",note:"g"},i={acc:"sharp",note:"d"},s={acc:"sharp",note:"A"},a={acc:"sharp",note:"e"},o={acc:"flat",note:"B"},c={acc:"flat",note:"e"},l={acc:"flat",note:"A"},u={acc:"flat",note:"d"},h={acc:"flat",note:"G"},d={acc:"flat",note:"c"},f={"C#":[t,n,r,i,s,a,{acc:"sharp",note:"B"}],"F#":[t,n,r,i,s,a],B:[t,n,r,i,s],E:[t,n,r,i],A:[t,n,r],D:[t,n],G:[t],C:[],F:[o],Bb:[o,c],Eb:[o,c,l],Cm:[o,c,l],Ab:[o,c,l,u],Db:[o,c,l,u,h],Gb:[o,c,l,u,h,d],Cb:[o,c,l,u,h,d,{acc:"flat",note:"F"}],"A#":[o,c],"B#":[],"D#":[o,c,l],"E#":[o],"G#":[o,c,l,u],none:[]};return rh=function(t){var n=f[e(t)];return n?JSON.parse(JSON.stringify(n)):null}}function bh(){if(ah)return sh;ah=1;var e=function(){if(Zu)return Xu;Zu=1;var e={};const t=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];return e.pitchIndex=function(e){return t.indexOf(e)},e.noteName=function(e){return t[e]},Xu=e}(),t=mh(),n=vh(),r={},i={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},s=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],a=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];r.keySignature=function(e,t,r,o,c){if("perc"===e.clef.type||"none"===e.clef.type)return{accidentals:n(t),root:r,acc:o};c||(c=0),e.localTransposeVerticalMovement=0,e.localTransposePreferFlats=!1;var l=n(t);if(!l)return e.key;if(e.localTranspose=(e.globalTranspose?e.globalTranspose:0)+c,!e.localTranspose)return{accidentals:l,root:r,acc:o};if(e.globalTransposeOrigKeySig=l,e.localTranspose%12==0)return e.localTransposeVerticalMovement=e.localTranspose/12*7,{accidentals:l,root:r,acc:o};var u=t[0];"b"===t[1]||"#"===t[1]?(u+=t[1],t=t.substr(2)):t=t.substr(1);var h=i[u],d=void 0!==h;d||(h=0,u="C",t="");for(var f=h+e.localTranspose;f<0;)f+=12;f>11&&(f%=12);var p="m"===t[0]?a[f]:s[f],m=p+t,g=n(m);g.length>0&&"flat"===g[0].acc&&(e.localTransposePreferFlats=!0);var v=m.charCodeAt(0)-u.charCodeAt(0);return e.localTranspose>0?v<0?v+=7:0===v&&("#"!==u[1]&&"b"!==m[1]||(v+=7)):e.localTranspose<0&&(v>0?v-=7:0===v&&("b"!==u[1]&&"#"!==m[1]||(v-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=v+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=v+7*Math.ceil(e.localTranspose/12),d?{accidentals:g,root:p[0],acc:p.length>1?p[1]:""}:{accidentals:[],root:r,acc:o}},r.chordName=function(e,n){return t(n,e.localTranspose,e.localTransposePreferFlats,e.freegchord)};var o=["c","d","e","f","g","a","b"];var c={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},l={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},u={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return r.note=function(t,n){if(t.localTranspose&&"perc"!==t.clef.type){var r=n.pitch;if(t.localTransposeVerticalMovement&&(n.pitch=n.pitch+t.localTransposeVerticalMovement,n.name)){var i=n.accidental?n.name.substring(1):n.name,s=n.accidental?n.name[0]:"",a=e.pitchIndex(i);n.name=s+e.noteName(a+t.localTransposeVerticalMovement)}if(n.accidental){var h=function(e,t,n,r,i){for(var s=o[(e+49)%7],a=0,l=0;l<r.length;l++)r[l].note.toLowerCase()===s&&(a=c[r[l].acc]);for(var u=c[n]-a,h=o[(t+49)%7],d=0,f=0;f<i.accidentals.length;f++)i.accidentals[f].note.toLowerCase()===h&&(d=c[i.accidentals[f].acc]);var p=u+d;return p<-2&&(t--,p+="c"===h||"f"===h?1:2),p>2&&(t++,p-="b"===h||"e"===h?1:2),[t,p]}(r,n.pitch,n.accidental,t.globalTransposeOrigKeySig,t.targetKey);n.pitch=h[0],n.accidental=l[h[1]],n.name&&(n.name=u[h[1]]+n.name.replace(/[_^=]/g,""))}}},sh=r}function yh(){if(ch)return oh;ch=1;var e=ph(),t=bh(),n={};return function(){var r,i,s,a;n.initialize=function(e,t,n,o,c){r=e,i=t,s=n,a=c},n.standardKey=function(e,n,r,i){return t.keySignature(s,e,n,r,i)};var o={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(e,t){var n=o[e];return(n?n.mid:0)+t};n.fixClef=function(e){var t=o[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},n.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return e.accidentals.forEach((function(e){t.accidentals.push(Object.assign({},e))})),t};var l={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};n.addPosToKey=function(e,t){var n=e.verticalPos;t.accidentals.forEach((function(e){var t=l[e.note];t-=n,e.verticalPos=t})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){var t=l[e.note];t-=n,e.verticalPos=t})),n<-10?(t.accidentals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):n<-4?(t.accidentals.forEach((function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):n>=7&&(t.accidentals.forEach((function(e){e.verticalPos+=7})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos+=7})))},n.fixKey=function(e,t){var r=Object.assign({},t);return n.addPosToKey(e,r),r};var u=function(e){var t=0,n=e[t++];"^"!==n&&"_"!==n||(n=e[t++]);var r=l[n];for(void 0===r&&(r=6);t<e.length;t++)if(","===e[t])r-=7;else{if("'"!==e[t])break;r+=7}return{mid:r-6,str:e.substring(t)}};n.parseKey=function(t,a){0===t.length&&(t="none");var o=r.tokenize(t,0,t.length),l={};if(0===o.length)return i("Must pass in key signature.",t,0),l;switch(o[0].token){case"HP":e.addDirective("bagpipes"),s.key={root:"HP",accidentals:[],acc:"",mode:""},l.foundKey=!0,o.shift();break;case"Hp":e.addDirective("bagpipes"),s.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},l.foundKey=!0,o.shift();break;case"none":s.key={root:"none",accidentals:[],acc:"",mode:""},l.foundKey=!0,o.shift();break;default:var u=r.getKeyPitch(o[0].token);if(u.len>0){l.foundKey=!0;var h="",d="";o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift();var f=u.token;if(o.length>0){var p=r.getSharpFlat(o[0].token);if(p.len>0&&(o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift(),f+=p.token,h=p.token),o.length>0){var m=r.getMode(o[0].token);m.len>0&&(o.shift(),f+=m.token,d=m.token)}if(void 0===n.standardKey(f,u.token,h,0))return i("Unsupported key signature: "+f,t,0),l}var g,v=n.deepCopyKey(s.key),b=!a&&s.globalTranspose?-s.globalTranspose:0;if(a&&(g=s.globalTransposeOrigKeySig),s.key=n.deepCopyKey(n.standardKey(f,u.token,h,b)),a&&(s.globalTransposeOrigKeySig=g),s.key.mode=d,v){for(var y,_=0;_<s.key.accidentals.length;_++)for(y=0;y<v.accidentals.length;y++)v.accidentals[y].note&&s.key.accidentals[_].note.toLowerCase()===v.accidentals[y].note.toLowerCase()&&(v.accidentals[y].note=null);for(y=0;y<v.accidentals.length;y++)v.accidentals[y].note&&(s.key.impliedNaturals||(s.key.impliedNaturals=[]),s.key.impliedNaturals.push({acc:"natural",note:v.accidentals[y].note}))}}}if(0===o.length)return l;if("exp"===o[0].token&&o.shift(),0===o.length)return l;if("oct"===o[0].token&&o.shift(),0===o.length)return l;var w,x=r.getKeyAccidentals2(o);if(x.warn&&i(x.warn,t,0),x.accs){l.foundKey||(l.foundKey=!0,s.key={root:"none",acc:"",mode:"",accidentals:[]}),function(e){for(var t=0;t<e.length;t++)"b"===e[t].note?e[t].note="B":"a"===e[t].note?e[t].note="A":"F"===e[t].note?e[t].note="f":"E"===e[t].note?e[t].note="e":"D"===e[t].note?e[t].note="d":"C"===e[t].note?e[t].note="c":"G"===e[t].note&&"sharp"===e[t].acc?e[t].note="g":"g"===e[t].note&&"flat"===e[t].acc&&(e[t].note="G")}(x.accs);for(var k=0;k<x.accs.length;k++){for(var S=!1,C=0;C<s.key.accidentals.length&&!S;C++)s.key.accidentals[C].note===x.accs[k].note&&(S=!0,s.key.accidentals[C].acc!==x.accs[k].acc&&(s.key.accidentals[C].acc=x.accs[k].acc,s.key.explicitAccidentals||(s.key.explicitAccidentals=[]),s.key.explicitAccidentals.push(x.accs[k])));if(!S&&(s.key.explicitAccidentals||(s.key.explicitAccidentals=[]),s.key.explicitAccidentals.push(x.accs[k]),s.key.accidentals.push(x.accs[k]),s.key.impliedNaturals))for(var M=0;M<s.key.impliedNaturals.length;M++)s.key.impliedNaturals[M].note===x.accs[k].note&&s.key.impliedNaturals.splice(M,1)}}for(;o.length>0;)switch(o[0].token){case"m":case"middle":if(o.shift(),0===o.length)return i("Expected = after middle",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after middle",t,w.start);break}if(0===o.length)return i("Expected parameter after middle=",t,0),l;var E=r.getPitchFromTokens(o);E.warn&&i(E.warn,t,0),E.position&&(s.clef.verticalPos=E.position-6);break;case"transpose":if(o.shift(),0===o.length)return i("Expected = after transpose",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after transpose",t,w.start);break}if(0===o.length)return i("Expected parameter after transpose=",t,0),l;if("number"!==o[0].type){i("Expected number after transpose",t,o[0].start);break}s.clef.transpose=o[0].intt,o.shift();break;case"stafflines":if(o.shift(),0===o.length)return i("Expected = after stafflines",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after stafflines",t,w.start);break}if(0===o.length)return i("Expected parameter after stafflines=",t,0),l;if("number"!==o[0].type){i("Expected number after stafflines",t,o[0].start);break}s.clef.stafflines=o[0].intt,o.shift();break;case"staffscale":if(o.shift(),0===o.length)return i("Expected = after staffscale",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after staffscale",t,w.start);break}if(0===o.length)return i("Expected parameter after staffscale=",t,0),l;if("number"!==o[0].type){i("Expected number after staffscale",t,o[0].start);break}s.clef.staffscale=o[0].floatt,o.shift();break;case"octave":if(o.shift(),0===o.length)return i("Expected = after octave",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after octave",t,w.start);break}if(0===o.length)return i("Expected parameter after octave=",t,0),l;if("number"!==o[0].type){i("Expected number after octave",t,o[0].start);break}s.octave=o[0].intt,o.shift();break;case"style":if(o.shift(),0===o.length)return i("Expected = after style",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after style",t,w.start);break}if(0===o.length)return i("Expected parameter after style=",t,0),l;switch(o[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":s.style=o[0].token,o.shift();break;default:i("error parsing style element: "+o[0].token,t,o[0].start)}break;case"clef":if(o.shift(),0===o.length)return i("Expected = after clef",t,0),l;if("="!==(w=o.shift()).token){i("Expected = after clef",t,w.start);break}if(0===o.length)return i("Expected parameter after clef=",t,0),l;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var T=o.shift();switch(T.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":case"c":T.token="alto";break;case"F":case"f":T.token="bass";break;case"G":case"g":T.token="treble";break;default:i("Expected clef name. Found "+T.token,t,T.start)}o.length>0&&"number"===o[0].type&&(T.token+=o[0].token,o.shift()),o.length>1&&("-"===o[0].token||"+"===o[0].token||"^"===o[0].token||"_"===o[0].token)&&"8"===o[1].token&&(T.token+=o[0].token+o[1].token,o.shift(),o.shift()),s.clef={type:T.token,verticalPos:c(T.token,0)},s.currentVoice&&void 0!==s.currentVoice.transpose&&(s.clef.transpose=s.currentVoice.transpose),l.foundClef=!0;break;default:i("Unknown parameter: "+o[0].token,t,o[0].start),o.shift()}return l};n.parseVoice=function(e,t,n){var o=r.getMeat(e,t,n),l=o.start,h=o.end,d=r.getToken(e,l,h);if(0!==d.length){var f=!1;void 0===s.voices[d]&&(s.voices[d]={},f=!0,s.score_is_present&&i("Can't have an unknown V: id when the %score directive is present",e,l)),l+=d.length,l+=r.eatWhiteSpace(e,l);for(var p={startStaff:f},m=function(t){var n=r.getVoiceToken(e,l,h);void 0!==n.warn?i("Expected value for "+t+" in voice: "+n.warn,e,l):void 0!==n.err?i("Expected value for "+t+" in voice: "+n.err,e,l):0===n.token.length&&'"'!==e[l]?i("Expected value for "+t+" in voice",e,l):p[t]=n.token,l+=n.len},g=function(t,n,a){var o=r.getVoiceToken(e,l,h);void 0!==o.warn?i("Expected value for "+n+" in voice: "+o.warn,e,l):void 0!==o.err?i("Expected value for "+n+" in voice: "+o.err,e,l):0===o.token.length&&'"'!==e[l]?i("Expected value for "+n+" in voice",e,l):(o.token=parseFloat(o.token),s.voices[t][n]=o.token),l+=o.len},v=function(t,n){var s=r.getVoiceToken(e,l,h);if(void 0!==s.warn)i("Expected value for "+t+" in voice: "+s.warn,e,l);else if(void 0!==s.err)i("Expected value for "+t+" in voice: "+s.err,e,l);else{if(0!==s.token.length||'"'===e[l])return s.token;i("Expected value for "+t+" in voice",e,l)}l+=s.len},b=function(t,n){var a=r.getVoiceToken(e,l,h);if(void 0!==a.warn)i("Expected one of (_B, _E, _b, _e) for "+n+" in voice: "+a.warn,e,l);else if(0===a.token.length&&'"'!==e[l])i("Expected one of (_B, _E, _b, _e) for "+n+" in voice",e,l);else{var o={_B:2,_E:9,_b:-10,_e:-3}[a.token];o?s.voices[t][n]=o:i("Expected one of (_B, _E, _b, _e) for "+n+" in voice",e,l)}l+=a.len};l<h;){var y=r.getVoiceToken(e,l,h);if(l+=y.len,y.warn)i("Error parsing voice: "+y.warn,e,l);else{var _=null;switch(y.token){case"clef":case"cl":m("clef");var w=0;void 0!==p.clef&&(p.clef=p.clef.replace(/[',]/g,""),-1!==p.clef.indexOf("+16")&&(w+=14,p.clef=p.clef.replace("+16","")),p.verticalPos=c(p.clef,w));break;case"treble":case"bass":case"tenor":case"alto":case"perc":case"none":case"treble'":case"bass'":case"tenor'":case"alto'":case"none'":case"treble''":case"bass''":case"tenor''":case"alto''":case"none''":case"treble,":case"bass,":case"tenor,":case"alto,":case"none,":case"treble,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":p.clef=y.token.replace(/[',]/g,""),p.verticalPos=c(p.clef,0),s.voices[d].clef=y.token;break;case"staves":case"stave":case"stv":m("staves");break;case"brace":case"brc":m("brace");break;case"bracket":case"brk":m("bracket");break;case"name":case"nm":m("name");break;case"subname":case"sname":case"snm":m("subname");break;case"merge":p.startStaff=!1;break;case"stem":case"stems":void 0!==(_=r.getVoiceToken(e,l,h)).warn?i("Expected value for stems in voice: "+_.warn,e,l):void 0!==_.err?i("Expected value for stems in voice: "+_.err,e,l):"up"===_.token||"down"===_.token?s.voices[d].stem=_.token:i("Expected up or down for voice stem",e,l),l+=_.len;break;case"up":case"down":s.voices[d].stem=y.token;break;case"middle":case"m":m("verticalPos"),p.verticalPos=u(p.verticalPos).mid;break;case"gchords":case"gch":s.voices[d].suppressChords=!0,"0"===(_=r.getVoiceToken(e,l,h)).token&&(l+=_.len);break;case"space":case"spc":m("spacing");break;case"scale":g(d,"scale");break;case"score":b(d,"scoreTranspose");break;case"transpose":g(d,"transpose");break;case"stafflines":g(d,"stafflines");break;case"staffscale":g(d,"staffscale");break;case"octave":g(d,"octave");break;case"volume":g(d,"volume");break;case"cue":var x=v("cue");s.voices[d].scale="on"===x?.6:1;break;case"style":void 0!==(_=r.getVoiceToken(e,l,h)).warn?i("Expected value for style in voice: "+_.warn,e,l):void 0!==_.err?i("Expected value for style in voice: "+_.err,e,l):"normal"===_.token||"harmonic"===_.token||"rhythm"===_.token||"x"===_.token||"triangle"===_.token?s.voices[d].style=_.token:i("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",e,l),l+=_.len}}l+=r.eatWhiteSpace(e,l)}if((p.startStaff||0===s.staves.length)&&(s.staves.push({index:s.staves.length,meter:s.origMeter}),s.score_is_present||(s.staves[s.staves.length-1].numVoices=0)),void 0===s.voices[d].staffNum){s.voices[d].staffNum=s.staves.length-1;var k=0;for(var S in s.voices)s.voices.hasOwnProperty(S)&&s.voices[S].staffNum===s.voices[d].staffNum&&k++;s.voices[d].index=k-1}var C=s.staves[s.voices[d].staffNum];return s.score_is_present||C.numVoices++,p.clef&&(C.clef={type:p.clef,verticalPos:p.verticalPos}),p.spacing&&(C.spacing_below_offset=p.spacing),p.verticalPos&&(C.verticalPos=p.verticalPos),p.name&&(C.name?C.name.push(p.name):C.name=[p.name]),p.subname&&(C.subname?C.subname.push(p.subname):C.subname=[p.subname]),function(e){var t=s.voices[e];if(!s.currentVoice||s.currentVoice.index!==t.index||s.currentVoice.staffNum!==t.staffNum)return s.currentVoice=t,a.setCurrentVoice(t.staffNum,t.index,e)}(d)}i("Expected a voice id",e,l)}}(),oh=n}function _h(){if(uh)return lh;uh=1;var e=fh(),t=ph(),n=yh();return lh=function(r,i,s,a,o){this.reset=function(e,r,i,s){n.initialize(e,r,i,s,o),t.initialize(e,r,i,s,o)},this.reset(r,i,s,a),this.setTitle=function(e,t){s.hasMainTitle?o.addSubtitle(e,{startChar:s.iChar,endChar:s.iChar+t+2}):(o.addMetaText("title",e,{startChar:s.iChar,endChar:s.iChar+t+2}),s.hasMainTitle=!0)},this.setMeter=function(e){if("C"===(e=r.stripComment(e)))return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"common_time"};if("C|"===e)return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"cut_time"};if("o"===e)return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===e)return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===e)return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===e)return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===e.length||"none"===e.toLowerCase())return!0===s.havent_set_length&&(s.default_length=.125,s.havent_set_length=!1),null;var t=r.tokenize(e,0,e.length);try{var n=function(){var e=function(){var e={value:0,num:""},n=t.shift();for("("===n.token&&(n=t.shift());;){if("number"!==n.type)throw"Expected top number of meter";if(e.value+=parseInt(n.token),e.num+=n.token,0===t.length||"/"===t[0].token)return e;if(")"===(n=t.shift()).token){if(0===t.length||"/"===t[0].token)return e;throw"Unexpected paren in meter"}if("."!==n.token&&"+"!==n.token)throw"Expected top number of meter";if(e.num+=n.token,0===t.length)throw"Expected top number of meter";n=t.shift()}return e}();if(0===t.length)return e;var n=t.shift();if("/"!==n.token)throw"Expected slash in meter";if("number"!==(n=t.shift()).type)throw"Expected bottom number of meter";return e.den=n.token,e.value=e.value/parseInt(e.den),e};if(0===t.length)throw"Expected meter definition in M: line";for(var a={type:"specified",value:[]},o=0;;){var c=n();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),a.value.push(l),0===t.length)break}return!0===s.havent_set_length&&(s.default_length=o<.75?.0625:.125,s.havent_set_length=!1),a}catch(u){i(u,e,0)}return null},this.calcTempo=function(e){var t=1/4;s.meter&&"specified"===s.meter.type?t=1/parseInt(s.meter.value[0].den):s.origMeter&&"specified"===s.origMeter.type&&(t=1/parseInt(s.origMeter.value[0].den));for(var n=0;n<e.duration;n++)e.duration[n]=t*e.duration[n];return e},this.resolveTempo=function(){s.tempo&&(this.calcTempo(s.tempo),a.metaText.tempo=s.tempo,delete s.tempo)},this.addUserDefinition=function(t,n,r){var a=t.indexOf("=",n);if(-1!==a){var o=e.strip(t.substring(n,a)),c=e.strip(t.substring(a+1));if(1===o.length){-1!=="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~".indexOf(o)?0!==c.length?(void 0===s.macros&&(s.macros={}),s.macros[o]=c):i("Missing macro definition",t,n):i("Macro definitions must be H-Y, h-w, or tilde",t,n)}else i("Macro definitions can only be one character",t,n)}else i("Need an = in a macro definition",t,n)},this.setDefaultLength=function(e,t,n){var r=e.substring(t,n).replace(/ /g,"").split("/");if(2===r.length){var i=parseInt(r[0]),a=parseInt(r[1]);a>0&&(s.default_length=i/a,s.havent_set_length=!1)}else 1===r.length&&"1"===r[0]&&(s.default_length=1,s.havent_set_length=!1)};var c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(e,t,n,a){try{var o=r.tokenize(e,t,n);if(0===o.length)throw"Missing parameter in Q: field";var l={startChar:a+t-2,endChar:a+n},u=!0,h=o.shift();if("quote"===h.type&&(l.preString=h.token,h=o.shift(),0===o.length))return c[l.preString.toLowerCase()]&&(l.bpm=c[l.preString.toLowerCase()],l.suppressBpm=!0),{type:"immediate",tempo:l};if("alpha"===h.type&&"C"===h.token){if(0===o.length)throw"Missing tempo after C in Q: field";if("punct"===(h=o.shift()).type&&"="===h.token){if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(h=o.shift()).type)throw"Expected number after = in Q: field";l.duration=[1],l.bpm=parseInt(h.token)}else{if("number"!==h.type)throw"Expected number or equal after C in Q: field";if(l.duration=[parseInt(h.token)],0===o.length)throw"Missing = after duration in Q: field";if("punct"!==(h=o.shift()).type||"="!==h.token)throw"Expected = after duration in Q: field";if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(h=o.shift()).type)throw"Expected number after = in Q: field";l.bpm=parseInt(h.token)}}else{if("number"!==h.type)throw"Unknown value in Q: field";var d=parseInt(h.token);if(0===o.length||"quote"===o[0].type)l.duration=[1],l.bpm=d;else{if(u=!1,"punct"!==(h=o.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=o.shift()).type)throw"Expected fraction in Q: field";var f=parseInt(h.token);for(l.duration=[d/f];o.length>0&&"="!==o[0].token&&"quote"!==o[0].type;){if("number"!==(h=o.shift()).type)throw"Expected fraction in Q: field";if(d=parseInt(h.token),"punct"!==(h=o.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=o.shift()).type)throw"Expected fraction in Q: field";f=parseInt(h.token),l.duration.push(d/f)}if("punct"!==(h=o.shift()).type&&"="!==h.token)throw"Expected = in Q: field";if("number"!==(h=o.shift()).type)throw"Expected tempo in Q: field";l.bpm=parseInt(h.token)}}if(0!==o.length&&("quote"===(h=o.shift()).type&&(l.postString=h.token,h=o.shift()),0!==o.length))throw"Unexpected string at end of Q: field";return!1===s.printTempo&&(l.suppress=!0),{type:u?"delaySet":"immediate",tempo:l}}catch(p){return i(p,e,t),{type:"none"}}},this.letter_to_inline_header=function(e,c,l){var u=!1,h=r.eatWhiteSpace(e,c);if(c+=h,e.length>=c+5&&"["===e[c]&&":"===e[c+2]){var d=e.indexOf("]",c),f=s.iChar+c,p=s.iChar+d+1;switch(e.substring(c,c+3)){case"[I:":var m=t.addDirective(e.substring(c+3,d));return m&&i(m,e,c),[d-c+1+h];case"[M:":var g=this.setMeter(e.substring(c+3,d));return o.hasBeginMusic()&&g?o.appendStartingElement("meter",f,p,g):s.meter=g,[d-c+1+h];case"[K:":var v=n.parseKey(e.substring(c+3,d),!0);return v.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",f,p,s.clef),v.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",f,p,n.fixKey(s.clef,s.key)),[d-c+1+h];case"[P:":var b=t.parseFontChangeLine(e.substring(c+3,d));return l||a.lines.length<=a.lineNum?s.partForNextLine={title:b,startChar:f,endChar:p}:o.appendElement("part",f,p,{title:b}),[d-c+1+h];case"[L:":return this.setDefaultLength(e,c+3,d),[d-c+1+h];case"[Q:":if(d>0){var y=this.setTempo(e,c+3,d,s.iChar);return"delaySet"===y.type?o.hasBeginMusic()?o.appendElement("tempo",f,p,this.calcTempo(y.tempo)):s.tempoForNextLine=["tempo",f,p,this.calcTempo(y.tempo)]:"immediate"===y.type&&(!l&&o.hasBeginMusic()?o.appendElement("tempo",f,p,y.tempo):s.tempoForNextLine=["tempo",f,p,y.tempo]),[d-c+1+h,e[c+1],e.substring(c+3,d)]}break;case"[V:":if(d>0)return u=n.parseVoice(e,c+3,d),[d-c+1+h,e[c+1],e.substring(c+3,d),u];break;case"[r:":return[d-c+1+h]}}return[0]},this.letter_to_body_header=function(r,a){var c=!1;if(r.length>=a+3)switch(r.substring(a,a+2)){case"I:":var l=t.addDirective(r.substring(a+2));return l&&i(l,r,a),[r.length];case"M:":var u=this.setMeter(r.substring(a+2));return o.hasBeginMusic()&&u&&o.appendStartingElement("meter",s.iChar+a,s.iChar+r.length,u),[r.length];case"K:":var h=n.parseKey(r.substring(a+2),o.hasBeginMusic());return h.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",s.iChar+a,s.iChar+r.length,s.clef),h.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",s.iChar+a,s.iChar+r.length,n.fixKey(s.clef,s.key)),[r.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",s.iChar+a,s.iChar+r.length,{title:r.substring(a+2)}),[r.length];case"L:":return this.setDefaultLength(r,a+2,r.length),[r.length];case"Q:":var d=r.indexOf("",a+2);-1===d&&(d=r.length);var f=this.setTempo(r,a+2,d,s.iChar);return"delaySet"===f.type?o.appendElement("tempo",s.iChar+a,s.iChar+r.length,this.calcTempo(f.tempo)):"immediate"===f.type&&o.appendElement("tempo",s.iChar+a,s.iChar+r.length,f.tempo),[d,r[a],e.strip(r.substring(a+2))];case"V:":return c=n.parseVoice(r,a+2,r.length),[r.length,r[a],e.strip(r.substring(a+2)),c]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(e){var c=l[e[0]],u=e.length-2,h=r.translateString(r.stripComment(e.substring(2)));if("unalignedWords"===c||"notes"===c)o.addMetaTextArray(c,t.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+e.length});else if(void 0!==c)o.addMetaText(c,t.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+e.length});else{var d=s.iChar,f=d+e.length;switch(e[0]){case"H":for(o.addMetaTextArray("history",t.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+e.length}),e=r.peekLine();e&&":"!==e[1];)r.nextLine(),o.addMetaTextArray("history",t.parseFontChangeLine(r.translateString(r.stripComment(e))),{startChar:s.iChar,endChar:s.iChar+e.length}),e=r.peekLine();break;case"K":this.resolveTempo();var p=n.parseKey(e.substring(2),!1);!s.is_in_header&&o.hasBeginMusic()&&(p.foundClef&&o.appendStartingElement("clef",d,f,s.clef),p.foundKey&&o.appendStartingElement("key",d,f,n.fixKey(s.clef,s.key))),s.is_in_header=!1;break;case"L":this.setDefaultLength(e,2,e.length);break;case"M":s.origMeter=s.meter=this.setMeter(e.substring(2));break;case"P":s.is_in_header?o.addMetaText("partOrder",t.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+e.length}):s.partForNextLine={title:h,startChar:d,endChar:f};break;case"Q":var m=this.setTempo(e,2,e.length,s.iChar);"delaySet"===m.type?s.tempo=m.tempo:"immediate"===m.type&&(a.metaText.tempo?s.tempoForNextLine=["tempo",d,f,m.tempo]:a.metaText.tempo=m.tempo);break;case"T":s.titlecaps&&(h=h.toUpperCase()),this.setTitle(t.parseFontChangeLine(r.theReverser(h)),u);break;case"U":this.addUserDefinition(e,2,e.length);break;case"V":if(n.parseVoice(e,2,e.length),!s.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":i("Ignored header",e,0);break;default:return{regular:!0}}}return{}}}}var wh,xh,kh,Sh,Ch,Mh,Eh,Th,Ph,Ah,Nh,Ih,Oh,Dh,Lh,Bh,Vh,Rh,Fh,zh,jh,qh,Hh,Yh,Uh,Gh,Wh,$h,Kh,Qh,Xh,Zh,Jh,ed,td,nd,rd,id,sd,ad,od,cd,ld,ud,hd,dd,fd,pd,md,gd,vd,bd,yd,_d,wd,xd,kd,Sd,Cd,Md,Ed,Td,Pd,Ad,Nd,Id,Od,Dd,Ld,Bd,Vd,Rd,Fd,zd,jd,qd,Hd,Yd,Ud,Gd,Wd,$d,Kd,Qd,Xd,Zd,Jd,ef,tf,nf,rf,sf,af,of,cf,lf,uf,hf,df,ff,pf,mf,gf,vf,bf,yf,_f,wf,xf,kf,Sf,Cf,Mf,Ef,Tf,Pf,Af,Nf,If,Of,Df,Lf,Bf,Vf,Rf,Ff,zf,jf,qf,Hf,Yf,Uf,Gf,Wf,$f,Kf,Qf,Xf,Zf,Jf,ep,tp,np,rp,ip,sp,ap,op,cp,lp,up,hp,dp,fp,pp,mp,gp,vp,bp,yp,_p,wp,xp,kp,Sp,Cp,Mp,Ep,Tp,Pp,Ap,Np,Ip,Op,Dp,Lp,Bp,Vp,Rp,Fp,zp,jp,qp,Hp,Yp,Up,Gp,Wp,$p,Kp,Qp,Xp,Zp,Jp,em,tm,nm,rm,im,sm,am,om,cm,lm,um,hm,dm,fm,pm,mm,gm,vm,bm,ym,_m,wm,xm,km,Sm,Cm,Mm,Em,Tm,Pm,Am,Nm,Im,Om,Dm,Lm,Bm,Vm,Rm,Fm,zm,jm,qm,Hm,Ym,Um,Gm,Wm,$m,Km,Qm,Xm,Zm,Jm,eg,tg,ng,rg,ig,sg,ag,og,cg,lg,ug,hg,dg,fg,pg,mg,gg,vg,bg,yg,_g,wg={};function xg(){if(kh)return xh;kh=1;var e,t,n,r,i,s,a=yh(),o=bh(),{legalAccents:c,volumeDecorations:l,dynamicDecorations:u,accentPseudonyms:h,accentDynamicPseudonyms:d,nonDecorations:f,durations:p,pitches:m,rests:g,accMap:v,tripletQ:b}=(wh||(wh=1,wg.legalAccents=["trill","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x","style=triangle","D.C.alcoda","D.C.alfine","D.S.alcoda","D.S.alfine","editorial","courtesy"],wg.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],wg.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],wg.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],wg.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],wg.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",wg.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],wg.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},wg.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},wg.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},wg.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),wg),y=function(a,o,c,l,u,h){e=a,t=o,n=c,r=l,i=u,s=h,this.lineContinuation=!1},_=function(e,t,n){if(void 0===e.inTie[t])return!1;var r=e.currentVoice?100*e.currentVoice.staffNum+e.currentVoice.index:0;return!(!e.inTie[t][r]||void 0===n.pitches&&"spacer"===n.rest.type)},w={};y.prototype.parseMusic=function(a){s.resolveTempo(),n.is_in_header=!1;for(var o=0,c=n.iChar;e.isWhiteSpace(a[o])&&o<a.length;)o++;if(o!==a.length&&"%"!==a[o]){var l=n.start_new_line;void 0===n.continueall?n.start_new_line=!0:n.start_new_line=!1;var u=0,h=s.letter_to_body_header(a,o);h[0]>0&&(o+=h[0],"V"===h[1]&&this.startNewLine());for(var d=0;o<a.length;){var m=o;if("%"===a[o])break;var g=s.letter_to_inline_header(a,o,l);if(g[0]>0)o+=g[0],"V"===g[1]&&(l=!0);else{var v;for((!i.hasBeginMusic()||l&&!this.lineContinuation)&&(this.startNewLine(),l=!1);;)if((v=e.eatWhiteSpace(a,o))>0&&(o+=v),o>0&&""===a[o-1]&&(v=s.letter_to_body_header(a,o))[0]>0&&("V"===v[1]&&this.startNewLine(),o=v[0],n.start_new_line=!1),(v=T(a,o))[0]>0&&(o+=v[0]),(v=k(a,o))[0]>0){w.chord||(w.chord=[]);var b=e.translateString(v[1]);b=b.replace(/;/g,"\n");for(var y=!1,L=0;L<w.chord.length;L++)w.chord[L].position===v[2]&&(y=!0,w.chord[L].name+="\n"+b);!1===y&&(null===v[2]&&v[3]?w.chord.push({name:b,rel_position:v[3]}):w.chord.push({name:b,position:v[2]})),o+=v[0];var B=e.skipWhiteSpace(a.substring(o));B>0&&(w.force_end_beam_last=!0),o+=B}else if((v=-1===f.indexOf(a[o])?E(a,o):[0])[0]>0)null===v[1]?o+1<a.length&&this.startNewLine():v[1].length>0&&(0===v[1].indexOf("style=")?w.style=v[1].substr(6):(void 0===w.decoration&&(w.decoration=[]),"beambr1"===v[1]?w.beambr=1:"beambr2"===v[1]?w.beambr=2:w.decoration.push(v[1]))),o+=v[0];else{if(!((v=S(a,o))[0]>0))break;w.gracenotes=v[1],o+=v[0]}if((v=P(a,o))[0]>0){d=0,void 0!==w.gracenotes&&(w.rest={type:"spacer"},w.duration=.125,n.addFormattingOptions(w,r.formatting,"note"),i.appendElement("note",c+o,c+o+v[0],w),n.measureNotEmpty=!0,w={});var V={type:v[1]};0===V.type.length?t("Unknown bar type",a,o):(n.inEnding&&"bar_thin"!==V.type&&(V.endEnding=!0,n.inEnding=!1),v[2]&&(V.startEnding=v[2],n.inEnding&&(V.endEnding=!0),n.inEnding=!0,"bar_right_repeat"===v[1]?n.restoreStartEndingHoldOvers():n.duplicateStartEndingHoldOvers()),void 0!==w.decoration&&(V.decoration=w.decoration),void 0!==w.chord&&(V.chord=w.chord),V.startEnding&&void 0===n.barFirstEndingNum?n.barFirstEndingNum=n.currBarNumber:V.startEnding&&V.endEnding&&n.barFirstEndingNum?n.currBarNumber=n.barFirstEndingNum:V.endEnding&&(n.barFirstEndingNum=void 0),"bar_invisible"!==V.type&&n.measureNotEmpty&&D()&&(n.currBarNumber++,n.barNumbers&&n.currBarNumber%n.barNumbers==0&&(V.barNumber=n.currBarNumber)),n.addFormattingOptions(w,r.formatting,"bar"),i.appendElement("bar",c+m,c+o+v[0],V),n.measureNotEmpty=!1,w={}),o+=v[0]}else if("&"===a[o])(v=C(a,o))[0]>0&&(i.appendElement("overlay",c,c+1,{}),o+=1,d++);else{if((v=A(a,o)).consumed>0&&(void 0!==v.startSlur&&(w.startSlur=v.startSlur),v.dottedSlur&&(w.dottedSlur=!0),void 0!==v.triplet&&(u>0?t("Can't nest triplets",a,o):(w.startTriplet=v.triplet,w.tripletMultiplier=v.tripletQ/v.triplet,w.tripletR=v.num_notes,u=void 0===v.num_notes?v.triplet:v.num_notes)),o+=v.consumed),"["===a[o]){o++;for(var R=null,F=!1,z=!1;!z;){var j=E(a,o);j[0]>0&&(o+=j[0]);var q=I(a,o,{},!1);if(null!==q&&void 0!==q.pitch)j[0]>0&&0!==j[1].indexOf("style=")&&(void 0===w.decoration&&(w.decoration=[]),w.decoration.push(j[1])),q.end_beam&&(w.end_beam=!0,delete q.end_beam),void 0===w.pitches?(w.duration=q.duration,w.pitches=[q]):w.pitches.push(q),delete q.duration,j[0]>0&&0===j[1].indexOf("style=")&&(w.pitches[w.pitches.length-1].style=j[1].substr(6)),n.inTieChord[w.pitches.length]&&(q.endTie=!0,n.inTieChord[w.pitches.length]=void 0),q.startTie&&(n.inTieChord[w.pitches.length]=!0),o=q.endChar,delete q.endChar;else if(" "===a[o])t("Spaces are not allowed in chords",a,o),o++;else{if(o<a.length&&"]"===a[o]){o++,0!==n.next_note_duration&&(w.duration=w.duration*n.next_note_duration,n.next_note_duration=0),_(n,d,w)&&(w.pitches.forEach((function(e){e.endTie=!0})),x(n,d,!1)),u>0&&(!w.rest||"spacer"!==w.rest.type)&&0===--u&&(w.endTriplet=!0);for(var H=!1;o<a.length&&!H;){switch(a[o]){case" ":case"\t":N(w);break;case")":void 0===w.endSlur?w.endSlur=1:w.endSlur++;break;case"-":w.pitches.forEach((function(e){e.startTie={}})),x(n,d,!0);break;case">":case"<":var Y=O(a,o);o+=Y[0]-1,n.next_note_duration=Y[2],R?R*=Y[1]:R=Y[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var U=e.getFraction(a,o);R=U.value;var G=a[o=U.index];" "===G&&(F=!0),"-"===G||")"===G||" "===G||"<"===G||">"===G?o--:H=!0;break;case"0":R=0;break;default:H=!0}H||o++}}else t("Expected ']' to end the chords",a,o);void 0!==w.pitches&&(null!==R&&(w.duration=w.duration*R,F&&N(w)),n.addFormattingOptions(w,r.formatting,"note"),i.appendElement("note",c+m,c+o,w),n.measureNotEmpty=!0,w={}),z=!0}}}else{var W={},$=I(a,o,W,!0);if(void 0!==W.endTie&&x(n,d,!0),null!==$)void 0!==$.pitch?(w.pitches=[{}],void 0!==$.accidental&&(w.pitches[0].accidental=$.accidental),w.pitches[0].pitch=$.pitch,w.pitches[0].name=$.name,($.midipitch||0===$.midipitch)&&(w.pitches[0].midipitch=$.midipitch),void 0!==$.endSlur&&(w.pitches[0].endSlur=$.endSlur),void 0!==$.endTie&&(w.pitches[0].endTie=$.endTie),void 0!==$.startSlur&&(w.pitches[0].startSlur=$.startSlur),void 0!==w.startSlur&&(w.pitches[0].startSlur=w.startSlur),void 0!==w.dottedSlur&&(w.pitches[0].dottedSlur=!0),void 0!==$.startTie&&(w.pitches[0].startTie=$.startTie),void 0!==w.startTie&&(w.pitches[0].startTie=w.startTie)):(w.rest=$.rest,"multimeasure"===$.rest.type&&D()&&(n.currBarNumber+=$.rest.text-1),void 0!==$.endSlur&&(w.endSlur=$.endSlur),void 0!==$.endTie&&(w.rest.endTie=$.endTie),void 0!==$.startSlur&&(w.startSlur=$.startSlur),void 0!==$.startTie&&(w.rest.startTie=$.startTie),void 0!==w.startTie&&(w.rest.startTie=w.startTie)),void 0!==$.chord&&(w.chord=$.chord),void 0!==$.duration&&(w.duration=$.duration),void 0!==$.decoration&&(w.decoration=$.decoration),void 0!==$.graceNotes&&(w.graceNotes=$.graceNotes),delete w.startSlur,delete w.dottedSlur,_(n,d,w)&&(void 0!==w.pitches?w.pitches[0].endTie=!0:"spacer"!==w.rest.type&&(w.rest.endTie=!0),x(n,d,!1)),($.startTie||w.startTie)&&x(n,d,!0),o=$.endChar,u>0&&(!$.rest||"spacer"!==$.rest.type)&&0===--u&&(w.endTriplet=!0),$.end_beam&&N(w),w.rest&&"rest"===w.rest.type&&1===w.duration&&M(n)<=1&&(w.rest.type="whole",w.duration=M(n)),w.duration<1&&-1===p.indexOf(w.duration)&&0!==w.duration&&(w.rest&&"spacer"===w.rest.type||t("Duration not representable: "+a.substring(m,o),a,o)),n.addFormattingOptions(w,r.formatting,"note"),i.appendElement("note",c+m,c+o,w)||(this.startNewLine(),i.appendElement("note",c+m,c+o,w)),n.measureNotEmpty=!0,w={}}o===m&&(" "!==a[o]&&"`"!==a[o]&&t("Unknown character ignored",a,o),o++)}}}this.lineContinuation=a.indexOf("")>=0||h[0]>0,this.lineContinuation||(w={})}};var x=function(e,t,n){var r=e.currentVoice?100*e.currentVoice.staffNum+e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][r]=n},k=function(r,i){if('"'===r[i]){var s=e.getBrackettedSubstring(r,i,5);if(s[2]||t("Missing the closing quote while parsing the chord symbol",r,i),s[0]>0&&s[1].length>0&&"^"===s[1][0])s[1]=s[1].substring(1),s[2]="above";else if(s[0]>0&&s[1].length>0&&"_"===s[1][0])s[1]=s[1].substring(1),s[2]="below";else if(s[0]>0&&s[1].length>0&&"<"===s[1][0])s[1]=s[1].substring(1),s[2]="left";else if(s[0]>0&&s[1].length>0&&">"===s[1][0])s[1]=s[1].substring(1),s[2]="right";else if(s[0]>0&&s[1].length>0&&"@"===s[1][0]){s[1]=s[1].substring(1);var a=e.getFloat(s[1]);if(0===a.digits)return t("Missing first position in absolutely positioned annotation.",r,i),s[1]=s[1].replace("@",""),s[2]="above",s;if(s[1]=s[1].substring(a.digits),","!==s[1][0])return t("Missing comma absolutely positioned annotation.",r,i),s[1]=s[1].replace("@",""),s[2]="above",s;s[1]=s[1].substring(1);var c=e.getFloat(s[1]);if(0===c.digits)return t("Missing second position in absolutely positioned annotation.",r,i),s[1]=s[1].replace("@",""),s[2]="above",s;s[1]=s[1].substring(c.digits);var l=e.skipWhiteSpace(s[1]);s[1]=s[1].substring(l),s[2]=null,s[3]={x:a.value,y:c.value}}else!0!==n.freegchord&&(s[1]=s[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),s[1]=s[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),s[1]=s[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),s[1]=s[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),s[1]=s[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),s[1]=s[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),s[2]="default",s[1]=o.chordName(n,s[1]);return s}return[0,""]},S=function(r,i){if("{"===r[i]){var s=e.getBrackettedSubstring(r,i,1,"}");s[2]||t("Missing the closing '}' while parsing grace note",r,i),")"===r[i+s[0]]&&(s[0]++,s[1]+=")");for(var a=[],o=0,c=!1;o<s[1].length;){var l=!1;"/"===s[1][o]&&(l=!0,o++);var u=I(s[1],o,{},!1);null!==u?(u.duration=u.duration/(8*n.default_length),l&&(u.acciaccatura=!0),u.rest?t("Rests not allowed as grace notes '"+s[1][o]+"' while parsing grace note",r,i):a.push(u),c&&(u.endTie=!0,c=!1),u.startTie&&(c=!0),o=u.endChar,delete u.endChar,u.end_beam&&(u.endBeam=!0,delete u.end_beam)):(" "===s[1][o]?a.length>0&&(a[a.length-1].endBeam=!0):t("Unknown character '"+s[1][o]+"' while parsing grace note",r,i),o++)}if(a.length)return[s[0],a]}return[0]};function C(e,t){if("&"===e[t]){for(var n=t;e[t]&&":"!==e[t]&&"|"!==e[t];)t++;return[t-n,e.substring(n+1,t)]}return[0]}function M(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var E=function(r,i){var s=n.macros[r[i]];if(void 0!==s)return"!"!==s[0]&&"+"!==s[0]||(s=s.substring(1)),"!"!==s[s.length-1]&&"+"!==s[s.length-1]||(s=s.substring(0,s.length-1)),c.includes(s)?[1,s]:l.includes(s)?("hidden"===n.volumePosition&&(s=""),[1,s]):u.includes(s)?("hidden"===n.dynamicPosition&&(s=""),[1,s]):(n.ignoredDecorations.includes(s)||t("Unknown macro: "+s,r,i),[1,""]);switch(r[i]){case".":if("("===r[i+1]||"-"===r[i+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var a=e.getBrackettedSubstring(r,i,5);if(a[1].length>1&&("^"===a[1][0]||"_"===a[1][0])&&(a[1]=a[1].substring(1)),c.includes(a[1]))return a;if(l.includes(a[1]))return"hidden"===n.volumePosition&&(a[1]=""),a;if(u.includes(a[1]))return"hidden"===n.dynamicPosition&&(a[1]=""),a;var o=h.findIndex((function(e){return a[1]===e[0]}));return o>=0?(a[1]=h[o][1],a):(o=d.findIndex((function(e){return a[1]===e[0]})))>=0?(a[1]=d[o][1],"hidden"===n.dynamicPosition&&(a[1]=""),a):"!"!==r[i]||1!==a[0]&&"!"===r[i+a[0]-1]?(t("Unknown decoration: "+a[1],r,i),a[1]="",a):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"]}return[0,0]},T=function(t,n){for(var r=n;e.isWhiteSpace(t[n]);)n++;return[n-r]},P=function(n,r){var i=e.getBarLine(n,r);if(0===i.len)return[0,""];if(i.warn)return t(i.warn,n,r),[i.len,""];for(var s=0;s<n.length&&" "===n[r+i.len+s];s++);var a=i.len;if("["===n[r+i.len+s]&&(i.len+=s+1),'"'===n[r+i.len]&&"["===n[r+i.len-1]){var o=e.getBrackettedSubstring(n,r+i.len,5);return[i.len+o[0],i.token,o[1]]}var c=e.getTokenOf(n.substring(r+i.len),"1234567890-,");return 0===c.len||"-"===c.token[0]?[a,i.token]:[i.len+c.len,i.token,c.token]},A=function(n,r){var i={},s=r;for("."===n[r]&&"("===n[r+1]&&(i.dottedSlur=!0,r++);"("===n[r]||e.isWhiteSpace(n[r]);)"("===n[r]&&(r+1<n.length&&n[r+1]>="2"&&n[r+1]<="9"?(void 0!==i.triplet?t("Can't nest triplets",n,r):(i.triplet=n[r+1]-"0",i.tripletQ=b[i.triplet],i.num_notes=i.triplet,r+2<n.length&&":"===n[r+2]&&(r+3<n.length&&":"===n[r+3]?r+4<n.length&&n[r+4]>="1"&&n[r+4]<="9"?(i.num_notes=n[r+4]-"0",r+=3):t("expected number after the two colons after the triplet to mark the duration",n,r):r+3<n.length&&n[r+3]>="1"&&n[r+3]<="9"?(i.tripletQ=n[r+3]-"0",r+4<n.length&&":"===n[r+4]?r+5<n.length&&n[r+5]>="1"&&n[r+5]<="9"&&(i.num_notes=n[r+5]-"0",r+=4):r+=2):t("expected number after the triplet to mark the duration",n,r))),r++):void 0===i.startSlur?i.startSlur=1:i.startSlur++),r++;return i.consumed=r-s,i};y.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};n.partForNextLine.title&&(e.part=n.partForNextLine),e.clef=n.currentVoice&&void 0!==n.staves[n.currentVoice.staffNum].clef?Object.assign({},n.staves[n.currentVoice.staffNum].clef):Object.assign({},n.clef);var t=n.currentVoice?n.currentVoice.scoreTranspose:0;if(e.key=a.standardKey(n.key.root+n.key.acc+n.key.mode,n.key.root,n.key.acc,t),e.key.mode=n.key.mode,n.key.impliedNaturals&&(e.key.impliedNaturals=n.key.impliedNaturals),n.key.explicitAccidentals)for(var r=0;r<n.key.explicitAccidentals.length;r++){for(var s=!1,o=0;o<e.key.accidentals.length;o++)e.key.accidentals[o].note===n.key.explicitAccidentals[r].note&&(e.key.accidentals[o].acc=n.key.explicitAccidentals[r].acc,s=!0);s||e.key.accidentals.push(n.key.explicitAccidentals[r])}if(n.targetKey=e.key,e.key.explicitAccidentals&&delete e.key.explicitAccidentals,a.addPosToKey(e.clef,e.key),null!==n.meter?(n.currentVoice?(n.staves.forEach((function(e){e.meter=n.meter})),e.meter=n.staves[n.currentVoice.staffNum].meter,n.staves[n.currentVoice.staffNum].meter=null):e.meter=n.meter,n.meter=null):n.currentVoice&&n.staves[n.currentVoice.staffNum].meter&&(e.meter=n.staves[n.currentVoice.staffNum].meter,n.staves[n.currentVoice.staffNum].meter=null),n.currentVoice&&n.currentVoice.name&&(e.name=n.currentVoice.name),n.vocalfont&&(e.vocalfont=n.vocalfont),n.tripletfont&&(e.tripletfont=n.tripletfont),n.gchordfont&&(e.gchordfont=n.gchordfont),n.style&&(e.style=n.style),n.currentVoice){var c=n.staves[n.currentVoice.staffNum];c.brace&&(e.brace=c.brace),c.bracket&&(e.bracket=c.bracket),c.connectBarLines&&(e.connectBarLines=c.connectBarLines),c.name&&(e.name=c.name[n.currentVoice.index]),c.subname&&(e.subname=c.subname[n.currentVoice.index]),n.currentVoice.stem&&(e.stem=n.currentVoice.stem),n.currentVoice.stafflines&&(e.stafflines=n.currentVoice.stafflines),n.currentVoice.staffscale&&(e.staffscale=n.currentVoice.staffscale),n.currentVoice.scale&&(e.scale=n.currentVoice.scale),n.currentVoice.color&&(e.color=n.currentVoice.color),n.currentVoice.style&&(e.style=n.currentVoice.style),n.currentVoice.transpose&&(e.clef.transpose=n.currentVoice.transpose),e.currentVoice=n.currentVoice;for(var l=Object.keys(n.voices),u=0;u<l.length;u++)e.currentVoice.staffNum===n.voices[l[u]].staffNum&&e.currentVoice.index===n.voices[l[u]].index&&(e.currentVoiceName=l[u])}0===n.barNumbers&&D()&&1!==n.currBarNumber&&(e.barNumber=n.currBarNumber),i.startNewLine(e),n.key.impliedNaturals&&delete n.key.impliedNaturals,n.partForNextLine={},4===n.tempoForNextLine.length&&i.appendElement(n.tempoForNextLine[0],n.tempoForNextLine[1],n.tempoForNextLine[2],n.tempoForNextLine[3]),n.tempoForNextLine=[]};var N=function(e){return void 0!==e.duration&&e.duration<.25&&(e.end_beam=!0),e},I=function(t,s,a,c){var l,u=function(e){return"octave"===e||"duration"===e||"Zduration"===e||"broken_rhythm"===e||"end_slur"===e};"."===t[s]&&"-"===t[s+1]&&(l=!0,s++);for(var h="startSlur",d=!1;;){switch(t[s]){case"(":if("startSlur"!==h)return u(h)?(a.endChar=s,a):null;void 0===a.startSlur?a.startSlur=1:a.startSlur++;break;case")":if(!u(h))return null;void 0===a.endSlur?a.endSlur=1:a.endSlur++;break;case"^":if("startSlur"===h)a.accidental="sharp",h="sharp2";else{if("sharp2"!==h)return u(h)?(a.endChar=s,a):null;a.accidental="dblsharp",h="pitch"}break;case"_":if("startSlur"===h)a.accidental="flat",h="flat2";else{if("flat2"!==h)return u(h)?(a.endChar=s,a):null;a.accidental="dblflat",h="pitch"}break;case"=":if("startSlur"!==h)return u(h)?(a.endChar=s,a):null;a.accidental="natural",h="pitch";break;case"A":case"B":case"C":case"D":case"E":case"F":case"G":case"a":case"b":case"c":case"d":case"e":case"f":case"g":if("startSlur"!==h&&"sharp2"!==h&&"flat2"!==h&&"pitch"!==h)return u(h)?(a.endChar=s,a):null;if(a.pitch=m[t[s]],a.pitch+=7*(n.currentVoice&&void 0!==n.currentVoice.octave?n.currentVoice.octave:n.octave),a.name=t[s],a.accidental&&(a.name=v[a.accidental]+a.name),o.note(n,a),h="octave",c&&0!==n.next_note_duration?(a.duration=n.default_length*n.next_note_duration,n.next_note_duration=0,d=!0):a.duration=n.default_length,n.clef&&"perc"===n.clef.type||n.currentVoice&&"perc"===n.currentVoice.clef){var f=t[s];a.accidental&&(f=v[a.accidental]+f),r.formatting&&r.formatting.midi&&r.formatting.midi.drummap&&(a.midipitch=r.formatting.midi.drummap[f])}break;case",":if("octave"!==h)return u(h)?(a.endChar=s,a):null;a.pitch-=7,a.name+=",";break;case"'":if("octave"!==h)return u(h)?(a.endChar=s,a):null;a.pitch+=7,a.name+="'";break;case"x":case"X":case"y":case"z":case"Z":if("startSlur"!==h)return u(h)?(a.endChar=s,a):null;a.rest={type:g[t[s]]},delete a.accidental,delete a.startSlur,delete a.startTie,delete a.endSlur,delete a.endTie,delete a.end_beam,delete a.grace_notes,a.rest.type.indexOf("multimeasure")>=0?(a.duration=r.getBarLength(),a.rest.text=1,h="Zduration"):(c&&0!==n.next_note_duration?(a.duration=n.default_length*n.next_note_duration,n.next_note_duration=0,d=!0):a.duration=n.default_length,h="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===h||"duration"===h){var p=e.getFraction(t,s);for(a.duration=a.duration*p.value,a.endChar=p.index;p.index<t.length&&(e.isWhiteSpace(t[p.index])||"-"===t[p.index]);)"-"===t[p.index]?a.startTie={}:a=N(a),p.index++;s=p.index-1,h="broken_rhythm"}else if("sharp2"===h)a.accidental="quartersharp",h="pitch";else{if("flat2"!==h){if("Zduration"===h){var b=e.getNumber(t,s);return a.duration=b.num*r.getBarLength(),a.rest.text=b.num,a.endChar=b.index,a}return null}a.accidental="quarterflat",h="pitch"}break;case"-":if("startSlur"===h)i.addTieToLastNote(l),a.endTie=!0;else{if("octave"!==h&&"duration"!==h&&"end_slur"!==h)return"broken_rhythm"===h?(a.endChar=s,a):null;if(a.startTie={},d||!c)return e.isWhiteSpace(t[s+1])&&N(a),a.endChar=s+1,a;h="broken_rhythm"}break;case" ":case"\t":if(!u(h))return null;a.end_beam=!0,l=!1;do{"."===t[s]&&"-"===t[s+1]&&(l=!0,s++),"-"===t[s]&&(a.startTie={},l&&(a.startTie.style="dotted")),s++}while(s<t.length&&(e.isWhiteSpace(t[s])||"-"===t[s])||"."===t[s]&&"-"===t[s+1]);if(a.endChar=s,d||!c||"<"!==t[s]&&">"!==t[s])return a;s--,h="broken_rhythm";break;case">":case"<":if(!u(h))return null;if(!c)return a.endChar=s,a;var y=O(t,s);s+=y[0]-1,n.next_note_duration=y[2],a.duration=y[1]*a.duration,h="end_slur";break;default:return u(h)?(a.endChar=s,a):null}if(++s===t.length)return u(h)?(a.endChar=s,a):null}return null},O=function(e,t){switch(e[t]){case">":return t<e.length-2&&">"===e[t+1]&&">"===e[t+2]?[3,1.875,.125]:t<e.length-1&&">"===e[t+1]?[2,1.75,.25]:[1,1.5,.5];case"<":return t<e.length-2&&"<"===e[t+1]&&"<"===e[t+2]?[3,.125,1.875]:t<e.length-1&&"<"===e[t+1]?[2,.25,1.75]:[1,.5,1.5]}return null};function D(){return void 0===n.currentVoice||0===n.currentVoice.staffNum&&0===n.currentVoice.index}return xh=y}function kg(){if(Eh)return Mh;function e(e,t){for(var n=[],r=[],i=0,s=0;s<e.length;s++){var a=e[s],o=i+a;if(o<t)i=o;else t-i<o-t&&i>0?(n.push(s-1),r.push(Math.round(i-a)),i=a):s<e.length-1&&(n.push(s),r.push(Math.round(i)),i=0)}return r.push(Math.round(i)),{lineBreaks:n,totals:r}}function t(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function n(e,n,r,i,s,a,o,c,l,u,h){for(var d=u;d<e.length;d++){var f=e[d];r+=f,i+=f;var p=Math.abs(r-n[c]);if(Math.abs(p-a)<n[0]/10)if(p<a){var m=t(s),g=t(l);g.push(d-1),m.push(i-f),h.push({accumulator:r,lineAccumulator:f,lineWidths:m,lastVariance:Math.abs(r-n[c+1]),highestVariance:Math.max(o,a),currLine:c+1,lineBreaks:g,startIndex:d+1})}else p>a&&d<e.length-1&&(m=t(s),g=t(l),h.push({accumulator:r,lineAccumulator:i,lineWidths:m,lastVariance:p,highestVariance:Math.max(o,p),currLine:c,lineBreaks:g,startIndex:d+1}));p>a?(l.push(d-1),c++,o=Math.max(o,a),a=Math.abs(r-n[c]),s.push(i-f),i=f):a=p}s.push(i)}function r(e,t,r,i){for(var s=Math.ceil(e.total/t),a=Math.floor(e.total/s),o=[],c=0;c<s;c++)o.push(a*(c+1));var l=[];l.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var u=0;u<l.length;)n(e.measureWidths,o,l[u].accumulator,l[u].lineAccumulator,l[u].lineWidths,l[u].lastVariance,l[u].highestVariance,l[u].currLine,l[u].lineBreaks,l[u].startIndex,l),u++;for(c=0;c<l.length;c++){var h=l[c];h.variances=[],h.aveVariance=0;for(var d=0;d<h.lineWidths.length;d++){var f=h.lineWidths[d];h.variances.push(f-o[0]),h.aveVariance+=Math.abs(f-o[0])}h.aveVariance=h.aveVariance/h.lineWidths.length,i.attempts.push({type:"optimizeLineWidths",lineBreaks:h.lineBreaks,variances:h.variances,aveVariance:h.aveVariance,widths:e.measureWidths})}var p=9999999,m=-1;for(c=0;c<l.length;c++)(h=l[c]).aveVariance<p&&(p=h.aveVariance,m=c);return{failed:!1,lineBreaks:l[m].lineBreaks,variance:l[m].highestVariance}}function i(e,t,n){for(var r=[],i=[],s=0,a=!1,o=0;o<e.length;o++)(s+=e[o])>t&&(a=!0),o%n==n-1&&(o!==e.length-1&&r.push(o),i.push(Math.round(s)),s=0);return{failed:a,totals:i,lineBreaks:r}}return Eh=1,Mh={wrapLines:function(e,t,n){if(t&&0!==e.lines.length){var r=e.deline({lineBreaks:!1}),i=function(e,t){for(var n=[],r=0,i=0,s=0,a=0;a<e.length;a++){var o=e[a];if(o.staff){var c=i,l=t[r];r++;for(var u=0;u<o.staff.length;u++)for(var h=o.staff[u],d=0;d<h.voices.length;d++){s=c;for(var f=0,p=0,m=h.voices[d],g=0,v=0;v<m.length;v++){"bar"===m[v].el_type&&(l[p]===f&&(n.push({ogLine:a,line:s,staff:u,voice:d,start:g,end:v}),g=v+1,s++,i=Math.max(i,s),p++),f++)}n.push({ogLine:a,line:s,staff:u,voice:d,start:g,end:m.length}),s++,i=Math.max(i,s)}}else n.push({ogLine:a,line:s}),s++,i=Math.max(i,s)}return n}(r,t);e.lines=function(e,t,n){for(var r=[],i=[],s=[],a=1,o=0;o<t.length;o++){var c=t[o];if(e[c.ogLine].staff){var l=e[c.ogLine].staff[c.staff];if(r[c.line]||(r[c.line]={staff:[]}),!r[c.line].staff[c.staff]){r[c.line].staff[c.staff]={voices:[]},void 0!==n&&0===c.staff&&c.line>0&&(r[c.line].staff[c.staff].barNumber=a);for(var u=Object.keys(l),h=0;h<u.length;h++){var d="voices"===u[h];"meter"===u[h]&&0!==c.line&&(d=!0),d||(r[c.line].staff[c.staff][u[h]]=l[u[h]])}i[c.staff]&&(r[c.line].staff[c.staff].key=i[c.staff])}r[c.line].staff[c.staff].voices[c.voice]||(r[c.line].staff[c.staff].voices[c.voice]=[]),r[c.line].staff[c.staff].voices[c.voice]=e[c.ogLine].staff[c.staff].voices[c.voice].slice(c.start,c.end+1),s[10*c.staff+c.voice]&&r[c.line].staff[c.staff].voices[c.voice].unshift({el_type:"stem",direction:s[10*c.staff+c.voice].direction});for(var f=r[c.line].staff[c.staff].voices[c.voice],p=f.length-1;p>=0;p--)if("key"===f[p].el_type){i[c.staff]={root:f[p].root,acc:f[p].acc,mode:f[p].mode,accidentals:f[p].accidentals.filter((function(e){return"natural"!==e.acc}))};break}for(p=f.length-1;p>=0;p--)if("stem"===f[p].el_type){s[10*c.staff+c.voice]={direction:f[p].direction};break}if(void 0!==n&&0===c.staff&&0===c.voice)for(p=0;p<f.length;p++)"bar"===f[p].el_type&&(a++,p===f.length-1?delete f[p].barNumber:f[p].barNumber=a)}else r[c.line]=e[c.ogLine]}for(var m=0;m<r.length;m++)r[m].staff&&(r[m].staff=r[m].staff.filter((function(e){return null!=e})));return r}(r,i,n),e.lineBreaks=i}},calcLineWraps:function(t,n,s){if(0===n.length||s.staffwidth<n[0].left)return{reParse:!1,explanation:"Staff width is narrower than the margin",revisedParams:s};var a=s.scale?Math.max(s.scale,.1):1,o=s.wrap.minSpacing?Math.max(parseFloat(s.wrap.minSpacing),1):1,c=s.wrap.minSpacingLimit?Math.max(parseFloat(s.wrap.minSpacingLimit),1):o-.1,l=s.wrap.maxSpacing?Math.max(parseFloat(s.wrap.maxSpacing),1):void 0;s.wrap.lastLineLimit&&!l&&(l=Math.max(parseFloat(s.wrap.lastLineLimit),1));for(var u=s.wrap.preferredMeasuresPerLine?Math.max(parseInt(s.wrap.preferredMeasuresPerLine,10),0):void 0,h=[],d=[],f=0;f<n.length;f++){var p=n[f],m=s.staffwidth-p.left,g=m/o/a,v=m/c/a,b={widths:p,lineBreakPoint:g,minLineSize:m/l/a,attempts:[],staffWidth:s.staffwidth,minWidth:Math.round(v)},y=null;if(u){var _=i(p.measureWidths,g,u);b.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:u,lineBreaks:_.lineBreaks,failed:_.failed,totals:_.totals}),_.failed||(y=_.lineBreaks)}if(!y){var w=e(p.measureWidths,g);b.attempts.push({type:"Free Form",lineBreaks:w.lineBreaks,totals:w.totals}),(y=w.lineBreaks).length>0&&p.measureWidths.length<25&&(w=r(p,g,0,b),b.attempts.push({type:"Optimize",failed:w.failed,reason:w.reason,lineBreaks:w.lineBreaks,totals:w.totals}),w.failed||(y=w.lineBreaks))}h.push(y),d.push(b)}var x=function(e,t,n){var r={lineBreaks:e,staffwidth:t};for(var i in n)n.hasOwnProperty(i)&&"wrap"!==i&&"staffwidth"!==i&&(r[i]=n[i]);return{revisedParams:r}}(h,s.staffwidth,s);return x.explanation=d,x.reParse=!0,x}}}function Sg(){if(Ph)return Th;Ph=1;var e={FONTEM:360,FONTSIZE:30};return e.STEP=93*e.FONTSIZE/720,e.SPACE=10,e.TOPNOTE=15,e.STAVEHEIGHT=100,e.INDENT=50,Th=e}function Cg(){if(Nh)return Ah;var e;Nh=1;var t=fh();return function(){var n=1,r=128;function i(e,t,n){for(var r=0,i=t+1;i<e.length;i++)if("note"===e[i].el_type&&r++,e[i].decoration&&e[i].decoration.indexOf(n)>=0)return r;return r}function s(e,t,n){for(var r=Math.min(e.length,t+3),i=t;i<r;i++)if("note"===e[i].el_type&&e[i].decoration)for(var s=0;s<e[i].decoration.length;s++)if(n.indexOf(e[i].decoration[s])>=0)return e[i].decoration[s];return null}function a(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=n.length-1;r>=0&&"bar"!==n[r].el_type;)n[r].noChordVoice=!0,r--}function o(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function c(e,t){var n=1/4;e.duration&&(n=e.duration[0]);var r=60;return e.bpm&&(r=e.bpm),n*r/t}function l(e){var t;switch(e.type){case"common_time":t={el_type:"meter",num:4,den:4};break;case"cut_time":t={el_type:"meter",num:2,den:2};break;case"specified":t={el_type:"meter",num:e.value[0].num,den:e.value[0].den};break;default:t={el_type:"meter"}}return n=t.num/t.den,t}function u(e){for(var t=[],n=0;n<e.length;n++)"natural"!==e[n].acc&&t.push(e[n]);return t}function h(e,t){f(e,"HP"===t.root?{el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}:{el_type:"key",accidentals:u(t.accidentals)})}function d(e,t){f(e,l(t))}function f(e,t){for(var n=e.length-1;n>=0;n--)if(e[n].el_type===t.el_type)return void(JSON.stringify(e[n])!==JSON.stringify(t)&&e.push(t));e.push(t)}e=function(e,u){var p,m=(u=u||{}).program||0,g=u.midiTranspose||0;e.visualTranspose&&(g-=e.visualTranspose);var v=u.channel||0,b=!1,y=u.drum||"",_=u.drumBars||1,w=u.drumIntro||0,x=""!==y,k=!!u.drumOff,S=[];m=parseInt(m,10),g=parseInt(g,10),10===(v=parseInt(v,10))&&(m=r),y=y.split(" "),_=parseInt(_,10),w=parseInt(w,10);var C=e.formatting.bagpipes;C&&(m=71);var M=[];if(e.formatting.midi){var E=e.formatting.midi;E.program&&E.program.length>0&&(m=E.program[0],E.program.length>1&&(m=E.program[1],v=E.program[0]),b=!0),E.transpose&&(g=E.transpose[0]),E.channel&&(v=E.channel[0],b=!0),E.drum&&(y=E.drum),E.drumbars&&(_=E.drumbars[0]),E.drumon&&(x=!0),10===v&&(m=r),E.beat&&M.push({el_type:"beat",beats:E.beat}),E.nobeataccents&&M.push({el_type:"beataccents",value:!1})}p=u.qpm?parseInt(u.qpm,10):e.metaText.tempo?c(e.metaText.tempo,e.getBeatLength()):u.defaultQpm?u.defaultQpm:180;var T=[];C&&T.push({el_type:"bagpipes"}),T.push({el_type:"instrument",program:m}),v&&T.push({el_type:"channel",channel:v}),g&&T.push({el_type:"transpose",transpose:g}),T.push({el_type:"tempo",qpm:p});for(var P=0;P<M.length;P++)T.push(M[P]);var A,N=[],I=[],O=[],D=[0],L={};L[0]={el_type:"tempo",qpm:p,timing:0};for(var B=[],V=[],R=!1,F=e.lines,z=0;z<F.length;z++){var j=F[z];if(j.staff){let n=function(e){var t,n={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]};if(e.decoration)if(e.decoration.indexOf("pppp")>=0?t="pppp":e.decoration.indexOf("ppp")>=0?t="ppp":e.decoration.indexOf("pp")>=0?t="pp":e.decoration.indexOf("p")>=0?t="p":e.decoration.indexOf("mp")>=0?t="mp":e.decoration.indexOf("mf")>=0?t="mf":e.decoration.indexOf("f")>=0?t="f":e.decoration.indexOf("ff")>=0?t="ff":e.decoration.indexOf("fff")>=0?t="fff":e.decoration.indexOf("ffff")>=0&&(t="ffff"),t&&(A=n[t].slice(0),N[H].push({el_type:"beat",beats:A.slice(0)}),I[G]=!1,O[G]=!1),e.decoration.indexOf("crescendo(")>=0){var r=i(W,ee,"crescendo)"),a=Math.min(127,A[0]+50),o=s(W,ee+r+1,Object.keys(n));o&&(a=n[o][0]),I[G]=r>0&&Math.floor((a-A[0])/r),O[G]=!1}else if(e.decoration.indexOf("crescendo)")>=0)I[G]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var c=i(W,ee,"diminuendo)"),l=Math.max(15,A[0]-50),u=s(W,ee+c+1,Object.keys(n));u&&(l=n[u][0]),I[G]=!1,O[G]=c>0&&Math.floor((l-A[0])/c)}else e.decoration.indexOf("diminuendo)")>=0&&(O[G]=!1)};for(var q=j.staff,H=0,Y=0;Y<q.length;Y++){var U=q[Y];if(!U.clef||"TAB"!==U.clef.type)for(var G=0;G<U.voices.length;G++){var W=U.voices[G];if(!N[H]){N[H]=[].concat(JSON.parse(JSON.stringify(T)));var $=o(j.staff,H);$&&N[H].unshift({el_type:"name",trackName:$})}if(g&&"perc"===U.clef.type&&N[H].push({el_type:"transpose",transpose:0}),U.clef&&"perc"===U.clef.type&&!b)for(var K=0;K<N[H].length;K++)"instrument"===N[H][K].el_type&&(N[H][K].program=r);else U.key&&h(N[H],U.key);U.meter&&d(N[H],U.meter),!R&&x&&(N[H].push({el_type:"drum",params:{pattern:y,bars:_,on:x,intro:w}}),R=!0),U.clef&&"perc"!==U.clef.type&&U.clef.transpose&&(U.clef.el_type="clef",N[H].push({el_type:"transpose",transpose:U.clef.transpose})),U.clef&&U.clef.type&&(U.clef.type.indexOf("-8")>=0?N[H].push({el_type:"transpose",transpose:-12}):U.clef.type.indexOf("+8")>=0&&N[H].push({el_type:"transpose",transpose:12})),e.formatting.midi&&e.formatting.midi.drumoff&&(N[H].push({el_type:"bar"}),N[H].push({el_type:"drum",params:{pattern:"",on:!1}}));var Q=0,X=0,Z=0,J=0;A=[105,95,85,1];for(var ee=0;ee<W.length;ee++){var te=W[ee];switch(te.el_type){case"note":if(I[G]&&(A[0]+=I[G],A[1]+=I[G],A[2]+=I[G],N[H].push({el_type:"beat",beats:A.slice(0)})),O[G]&&(A[0]+=O[G],A[1]+=O[G],A[2]+=O[G],N[H].push({el_type:"beat",beats:A.slice(0)})),n(te),!te.rest||"spacer"!==te.rest.type){var ne={elem:te,el_type:"note",timing:D[H]};if(te.style?ne.style=te.style:S[H]&&(ne.style=S[H]),ne.duration=0===te.duration?.25:te.duration,te.startTriplet){if(X=te.tripletMultiplier,Z=te.startTriplet*X*te.duration,te.startTriplet!==te.tripletR&&ee+te.tripletR<=W.length){for(var re=0,ie=ee;ie<ee+te.tripletR;ie++)re+=W[ie].duration;Z=X*re}ne.duration=ne.duration*X,ne.duration=Math.round(1e6*ne.duration)/1e6,J=ne.duration}else X&&(te.endTriplet?(X=0,ne.duration=Math.round(1e6*(Z-J))/1e6):(ne.duration=ne.duration*X,ne.duration=Math.round(1e6*ne.duration)/1e6,J+=ne.duration));te.rest&&(ne.rest=te.rest),te.decoration&&(ne.decoration=te.decoration.slice(0)),te.pitches&&(ne.pitches=t.cloneArray(te.pitches)),te.gracenotes&&(ne.gracenotes=t.cloneArray(te.gracenotes)),te.chord&&(ne.chord=t.cloneArray(te.chord)),N[H].push(ne),"rhythm"===te.style&&a(N),Q++,D[H]+=ne.duration}break;case"key":case"keySignature":h(N[H],te);break;case"meter":d(N[H],te);break;case"clef":te.transpose&&N[H].push({el_type:"transpose",transpose:te.transpose}),te.type&&(te.type.indexOf("-8")>=0?N[H].push({el_type:"transpose",transpose:-12}):te.type.indexOf("+8")>=0&&N[H].push({el_type:"transpose",transpose:12}));break;case"tempo":p=c(te,e.getBeatLength()),N[H].push({el_type:"tempo",qpm:p,timing:D[H]}),L[""+D[H]]={el_type:"tempo",qpm:p,timing:D[H]};break;case"bar":Q>0&&N[H].push({el_type:"bar"}),n(te),Q=0;var se="bar_right_repeat"===te.type||"bar_dbl_repeat"===te.type,ae="1"===te.startEnding,oe="bar_left_repeat"===te.type||"bar_dbl_repeat"===te.type||"bar_right_repeat"===te.type;if(se){var ce=B[H];ce||(ce=0);var le=V[H];le||(le=N[H].length);for(var ue=ce;ue<le;ue++){var he=Object.assign({},N[H][ue]);he.pitches&&(he.pitches=t.cloneArray(he.pitches)),N[H].push(he)}V[H]=void 0,B[H]=void 0}ae&&(V[H]=N[H].length),oe&&(B[H]=N[H].length);break;case"style":S[H]=te.head;break;case"timeSignature":N[H].push(l(te));break;case"part":case"stem":case"scale":case"break":case"font":break;case"midi":var de=!1;switch(te.cmd){case"drumon":x=!0,de=!0;break;case"drumoff":x=!1,de=!0;break;case"drum":y=te.params,de=!0;break;case"drumbars":_=te.params[0],de=!0;break;case"drummap":break;case"channel":10===te.params[0]&&N[H].push({el_type:"instrument",program:r});break;case"program":f(N[H],{el_type:"instrument",program:te.params[0]}),b=!0;break;case"transpose":N[H].push({el_type:"transpose",transpose:te.params[0]});break;case"gchordoff":N[H].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":N[H].push({el_type:"gchordOn",tacet:!1});break;case"beat":N[H].push({el_type:"beat",beats:te.params});break;case"nobeataccents":N[H].push({el_type:"beataccents",value:!1});break;case"beataccents":N[H].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":N[H].push({el_type:te.cmd,volume:te.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":case"gchordbars":N[H].push({el_type:te.cmd,param:te.params[0]});break;case"bassprog":case"chordprog":N[H].push({el_type:te.cmd,value:te.params[0],octaveShift:te.params[1]});break;default:console.log("MIDI seq: midi cmd not handled: ",te.cmd,te)}de&&(N[0].push({el_type:"drum",params:{pattern:y,bars:_,intro:w,on:x}}),R=!0);break;default:console.log("MIDI: element type "+te.el_type+" not handled.")}}D[++H]||(D[H]=0)}}}}if(function(e,t){if(!t||0===t.length)return;for(var n=Object.keys(t),r=0;r<e.length;r++)for(var i=e[r],s=t[0]?t[0].qpm:0,a=0;a<i.length;a++){var o=i[a];"tempo"===o.el_type&&(s=o.qpm),n.indexOf(""+o.timing)>=0&&s!==t[""+o.timing].qpm&&(s=t[""+o.timing].qpm,"tempo"===o.el_type?(o.qpm=t[""+o.timing].qpm,a++):(e[r].splice(a,0,{el_type:"tempo",qpm:t[""+o.timing].qpm,timing:o.timing}),a+=2))}}(N,L),w)for(var fe=e.getPickupLength(),pe=0;pe<N.length;pe++){for(var me=0;"note"!==N[pe][me].el_type&&N[pe].length>me;)me++;if(N[pe].length>me){for(ie=0;ie<w;ie++)0===fe||ie<w-1?(N[pe].splice(me,0,{el_type:"note",rest:{type:"rest"},duration:n},{el_type:"bar"}),me+=2):N[pe].splice(me++,0,{el_type:"note",rest:{type:"rest"},duration:n-fe});k&&(x=!1,N[pe].splice(me++,0,{el_type:"drum",params:{pattern:y,bars:_,intro:w,on:x}}),k=!1)}}return N.length>0&&N[0].length>0&&(N[0][0].pickupLength=e.getPickupLength()),N}}(),Ah=e}function Mg(){if(Lh)return Dh;Lh=1;var e={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};return Dh=function(t){var n=(t.accidental?t.accidental[0]:"x")+t.verticalPos;return e[n]}}function Eg(){if(Vh)return Bh;var e;Vh=1;var t=function(){if(Oh)return Ih;Oh=1;var e=function(e,t,n,i){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=e,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!t,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=i,this.tempoChangeFactor=1,this.bassInstrument=n.bassprog&&n.bassprog.length>=1?n.bassprog[0]:0,this.chordInstrument=n.chordprog&&n.chordprog.length>=1?n.chordprog[0]:0,this.bassOctaveShift=n.bassprog&&2===n.bassprog.length?n.bassprog[1]:0,this.chordOctaveShift=n.chordprog&&2===n.chordprog.length?n.chordprog[1]:0,this.boomVolume=n.bassvol&&1===n.bassvol.length?n.bassvol[0]:64,this.chickVolume=n.chordvol&&1===n.chordvol.length?n.chordvol[0]:48,n.gchord&&n.gchord.length>0?this.overridePattern=r(n.gchord[0]):this.overridePattern=void 0};function t(e,t,r,i){var s=[];if(!e)return s;t.indexOf("boom")>=0?s.push(r?e.boom:e.boom2):i&&s.push(e.boom);var a=e.chick.length;if(t.indexOf("chick")>=0)for(var o=0;o<a;o++)s.push(e.chick[o]);switch(t){case"DO":s.push(e.chick[0]);break;case"MI":s.push(e.chick[1]);break;case"SOL":s.push(n(e,2));break;case"TI":s.push(n(e,3));break;case"TOP":s.push(n(e,4));break;case"do":s.push(e.chick[0]+12);break;case"mi":s.push(e.chick[1]+12);break;case"sol":s.push(n(e,2)+12);break;case"ti":s.push(n(e,3)+12);break;case"top":s.push(n(e,4)+12)}return s}function n(e,t){var n=Math.floor(t/e.chick.length);return e.chick[t%e.chick.length]+12*n}function r(e){for(var t=[],n=0;n<e.length;n++)switch(e[n]){case"z":case"2":t.push("");break;case"c":t.push("chick");break;case"b":t.push("boom&chick");break;case"f":t.push("boom");break;case"G":t.push("DO");break;case"H":t.push("MI");break;case"I":t.push("SOL");break;case"J":t.push("TI");break;case"K":t.push("TOP");break;case"g":t.push("do");break;case"h":t.push("mi");break;case"i":t.push("sol");break;case"j":t.push("ti");break;case"k":t.push("top")}return t}function i(e){return e/1e6}function s(e,t){return Math.round(e*t*1e6)/1e6}return e.prototype.setMeter=function(e){this.meter=e},e.prototype.setTempoChangeFactor=function(e){this.tempoChangeFactor=e},e.prototype.setLastBarTime=function(e){this.lastBarTime=e},e.prototype.setTranspose=function(e){this.transpose=e},e.prototype.setRhythmHead=function(e,t){this.hasRhythmHead=e;var n=[];if(e&&this.lastChord&&this.lastChord.chick)for(var r=0;r<this.lastChord.chick.length;r++){var i=Object.assign({},t.pitches[0]);i.actualPitch=this.lastChord.chick[r],n.push(i)}return n},e.prototype.barEnd=function(e){this.chordTrack.length>0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,i(e.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},e.prototype.gChordOn=function(e){this.chordsOff||(this.gChordTacet=e.tacet)},e.prototype.paramChange=function(e){switch(e.el_type){case"gchord":e.param&&e.param.length>0?this.overridePattern=r(e.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.bassOctaveShift=e.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.chordOctaveShift=e.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=e.param;break;case"chordvol":this.chickVolume=e.param;break;default:console.log("unhandled midi param",e)}},e.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},e.prototype.addTrack=function(e){this.chordTrackEmpty()||e.push(this.chordTrack)},e.prototype.findChord=function(e){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!e.chord||0===e.chord.length)return null;for(var t=0;t<e.chord.length;t++){var n=e.chord[t];if("default"===n.position)return n.name;if(this.breakSynonyms.indexOf(n.name.toLowerCase())>=0)return"break"}return null},e.prototype.interpretChord=function(e){if(0!==e.length){if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-2)).length)return;t=e.substring(0,1)}var n=this.basses[t];if(n){for(var r=this.transpose;r<-8;)r+=12;for(;r>8;)r-=12;(n+=r)<33?n+=12:n>44&&(n-=12);var i,s=n,a=(n+=12*this.bassOctaveShift)-5;1===e.length&&(i=this.chordNotes(n,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(s--,n--,a--,o=o.substring(1)):"#"!==c&&"♯"!==c||(s++,n++,a++,o=o.substring(1));var l=o.split("/");if((i=this.chordNotes(s,l[0])).length>=3&&(a=a+(i[2]-i[0])-7),2===l.length&&this.basses[l[1].substring(0,1)]){var u={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;n=this.basses[l[1].substring(0,1)]+u+r,a=n+=12*this.bassOctaveShift}return{boom:n,boom2:a,chick:i}}}},e.prototype.chordNotes=function(e,t){var n=this.chordIntervals[t];n||(n="ma"===t.slice(0,2).toLowerCase()||"M"===t[0]?this.chordIntervals.M:"m"===t[0]||"-"===t[0]?this.chordIntervals.m:this.chordIntervals.M),e+=12,e+=12*this.chordOctaveShift;for(var r=[],i=0;i<n.length;i++)r.push(e+n[i]);return r},e.prototype.writeNote=function(e,t,n,r,i,a){void 0!==e&&this.chordTrack.push({cmd:"note",pitch:e,volume:n,start:this.lastBarTime+r*s(t,this.tempoChangeFactor),duration:s(i,this.tempoChangeFactor),gap:0,instrument:a})},e.prototype.chordTrackEmpty=function(){for(var e=!0,t=0;t<this.chordTrack.length&&e;t++)"note"===this.chordTrack[t].cmd&&(e=!1);return e},e.prototype.resolveChords=function(e,n){if(!this.hasRhythmHead){var r=this.meter.num,i=this.meter.den,s=1/i/2,a=parseInt(r,10)/parseInt(i,10)-(n-e)/this.tempoChangeFactor;Math.abs(a)<1e-5&&(a=0),0!==this.currentChords.length&&0===this.currentChords[0].beat||this.currentChords.unshift({beat:0,chord:this.chordLastBar});var o=function(e,t){var n=[];if(0===e.length)return n;for(var r=e[0].chord,i=1;i<e.length;i++){for(var s=e[i];n.length<s.beat;)n.push(r);r=s.chord}for(;n.length<t;)n.push(r);return n}(this.currentChords,8*r/i),c=this.overridePattern?this.overridePattern:this.rhythmPatterns[r+"/"+i];if(a){c=[];for(var l=(n-e)/this.tempoChangeFactor*8,u=0;u<l/2;u+=2)c.push("chick"),c.push("")}if(!c)for(c=[],u=0;u<8*r/i/2;u++)c.push("chick"),c.push("");var h=!0,d=Math.min(c.length,o.length);for(u=0;u<d;u++){u>0&&o[u-1]&&o[u]&&o[u-1].boom!==o[u].boom&&(h=!0);var f=c[u],p=f.indexOf("boom")>=0,m=!p&&0!==u&&c[0].indexOf("boom")>=0&&(!o[u-1]||o[u-1].boom!==o[u].boom),g=t(o[u],f,h,m);p&&(h=!1);for(var v=0;v<g.length;v++)this.writeNote(g[v],.125,p||m?this.boomVolume:this.chickVolume,u,s,p||m?this.bassInstrument:this.chordInstrument),m?m=!1:p=!1}}},e.prototype.processChord=function(e){if(!this.chordTrackFinished){var t,n=this.findChord(e);if(n){var r=this.interpretChord(n);if(r){0===this.chordTrack.length&&this.chordTrack.push({cmd:"program",channel:this.chordChannel,instrument:this.chordInstrument}),this.lastChord=r;var s=(t=this.lastBarTime,8*(i(e.time)-t));this.currentChords.push({chord:this.lastChord,beat:s,start:i(e.time)})}}}},e.prototype.breakSynonyms=["break","(break)","no chord","n.c.","tacet"],e.prototype.basses={A:33,B:35,C:36,D:38,E:40,F:41,G:43},e.prototype.chordIntervals={dim:[0,3,6],"°":[0,3,6],"˚":[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"˚7":[0,3,6,9],"ø7":[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7♭5":[0,3,6,10],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"7b5":[0,4,6,10],"7(b5)":[0,4,6,10],"7♭5":[0,4,6,10],"7(b9,b5)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7(#9,b5)":[0,4,6,10,15],"7#9b5":[0,4,6,10,15],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],m:[0,3,7],"-":[0,3,7],m6:[0,3,7,9],"-6":[0,3,7,9],m7:[0,3,7,10],"-7":[0,3,7,10],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"-6/9":[0,3,7,9,14],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-maj7":[0,3,7,11],"-9+7":[0,3,7,11,13],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-maj9":[0,3,7,11,14],"-∆9":[0,3,7,11,14],mM9:[0,3,7,11,14],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],"6add9":[0,4,7,9,14],69:[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,7,10,14,17],13:[0,4,7,10,14,21],"7b9":[0,4,7,10,13],"7♭9":[0,4,7,10,13],"7(b9)":[0,4,7,10,13],"7(#9)":[0,4,7,10,15],"7#9":[0,4,7,10,15],"(13)":[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7(#9,b13)":[0,4,7,10,15,20],"7(#11)":[0,4,7,10,14,18],"7#11":[0,4,7,10,14,18],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"9(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"13(#11)":[0,4,7,10,18,21],"13#11":[0,4,7,10,18,21],maj7:[0,4,7,11],"∆7":[0,4,7,11],"Δ7":[0,4,7,11],maj9:[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7(11)":[0,4,7,11,17],"maj7(#11)":[0,4,7,11,18],"maj7(13)":[0,4,7,14,21],"maj7(9,13)":[0,4,7,11,14,21],"7sus4":[0,5,7,10],m7sus4:[0,3,7,10,17],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,10,14],"13sus4":[0,5,7,10,14,21],aug7:[0,4,8,10],"+7":[0,4,8,10],"+":[0,4,8],"7#5":[0,4,8,10],"7♯5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9♯5":[0,4,8,10,14],"9+5":[0,4,8,10,14],"-7(#5)":[0,3,8,10],"-7#5":[0,3,8,10],"7(#5)":[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"maj7(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5,#11)":[0,4,8,11,18],"maj7#5#11":[0,4,8,11,18],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,21],"13#5":[0,4,8,10,14,21],5:[0,7],"5(8)":[0,7,12],"5add8":[0,7,12]},e.prototype.rhythmPatterns={"2/2":["boom","","","","chick","","",""],"3/2":["boom","","","","chick","","","","chick","","",""],"4/2":["boom","","","","chick","","","","boom","","","","chick","","",""],"2/4":["boom","","chick",""],"3/4":["boom","","chick","","chick",""],"4/4":["boom","","chick","","boom","","chick",""],"5/4":["boom","","chick","","chick","","boom","","chick",""],"6/4":["boom","","chick","","boom","","chick","","boom","","chick",""],"3/8":["boom","","chick"],"5/8":["boom","chick","chick","boom","chick"],"6/8":["boom","","chick","boom","","chick"],"7/8":["boom","chick","chick","boom","chick","boom","chick"],"9/8":["boom","","chick","boom","","chick","boom","","chick"],"10/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick"],"11/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick","chick"],"12/8":["boom","","chick","boom","","chick","boom","","chick","boom","","chick"]},Ih=e}(),n=Mg();return function(){var r,i,s,a,o,c,l,u,h,d,f,p,m,g,v,b,y,_=1,w={num:4,den:4},x=128,k=!0,S=105,C=95,M=85,E=.25,T=0,P={},A=0;function N(e){for(var t=u.length-1;t>=0;t--)if("program"===u[t].cmd)return void(u[t].channel=e)}function I(e){return e/1e6}function O(e){return Math.round(e*_*1e6)/1e6}function D(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return e.num%3==0?.375:.125;case 16:return.125}return.25}function L(e,t){var n=t.start,r=t.duration,i=O(1/32);switch(e){case"trill":for(var s=2;r>0;)u.push({cmd:"note",pitch:t.pitch+s,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),s=2===s?0:2,r-=i,n+=i;break;case"mordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,u.push({cmd:"note",pitch:t.pitch+2,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:r,gap:0,instrument:l});break;case"lowermordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,u.push({cmd:"note",pitch:t.pitch-2,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:r,gap:0,instrument:l});break;case"turn":i=t.duration/4,u.push({cmd:"note",pitch:t.pitch+2,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n+i,duration:i,gap:0,instrument:l,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:n+2*i,duration:i,gap:0,instrument:l,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n+3*i,duration:i,gap:0,instrument:l,style:"decoration"});break;case"roll":for(;r>0;)u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=2*i,n+=2*i}}function B(e,t){var r,i=function(e,t){if(t)return 0;var n;if(null!=m)n=m,m=void 0;else if(k)if(A>e)n=M;else{var r=(e-p)/D(w);n=0===r?S:parseInt(r,10)===r?C:M}else n=C;return g&&(n+=g,g=void 0),n<0&&(n=0),n>127&&(n=127),t?0:n}(I(e.time),t);if(f.processChord(e),e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(r=function(e,t){for(var r,i=0,s=[],a=0;a<e.length;a++)i+=(r=e[a]).duration;var o=t/2/i;for(a=0;a<e.length;a++){var c=R(r=e[a]);if(l===x&&y){var u=n(r);u&&y[u]&&(c=y[u].sound)}var h={pitch:c,duration:r.duration*o};h=z(h),s.push(h)}return s}(e.gracenotes,e.pitches[0].duration),e.elem&&(e.elem.midiGraceNotePitches=function(e,t,n,r){var i=[];n=Math.round(n);for(var s=0;s<e.length;s++){var a=e[s];u.push({cmd:"note",pitch:a.pitch,volume:n,start:t,duration:a.duration,gap:0,instrument:r,style:"grace"}),i.push({pitch:a.pitch,durationInMeasures:a.duration,volume:n,instrument:r}),t+=a.duration}return i}(r,I(e.time),2*i/3,l))),e.elem){var s=I(e.time),a=s/E/o*60*1e3;if(void 0===e.elem.currentTrackMilliseconds)e.elem.currentTrackMilliseconds=a,e.elem.currentTrackWholeNotes=s;else if(void 0===e.elem.currentTrackMilliseconds.length)e.elem.currentTrackMilliseconds!==a&&(e.elem.currentTrackMilliseconds=[e.elem.currentTrackMilliseconds,a],e.elem.currentTrackWholeNotes=[e.elem.currentTrackWholeNotes,s]);else{for(var c=!1,h=0;h<e.elem.currentTrackMilliseconds.length;h++)e.elem.currentTrackMilliseconds[h]===a&&(c=!0);c||(e.elem.currentTrackMilliseconds.push(a),e.elem.currentTrackWholeNotes.push(s))}}if(e.pitches){var v="",b=function(e,t){var n={};if(e.decoration)for(var r=0;r<e.decoration.length;r++)"staccato"===e.decoration[r]?n.thisBreakBetweenNotes="staccato":"tenuto"===e.decoration[r]?n.thisBreakBetweenNotes="tenuto":"accent"===e.decoration[r]?n.velocity=Math.min(127,1.5*t):"trill"===e.decoration[r]?n.noteModification="trill":"lowermordent"===e.decoration[r]?n.noteModification="lowermordent":"uppermordent"===e.decoration[r]||"mordent"===e.decoration[r]?n.noteModification="mordent":"turn"===e.decoration[r]?n.noteModification="turn":"roll"===e.decoration[r]&&(n.noteModification="roll");return n}(e,i);b.thisBreakBetweenNotes&&(v=b.thisBreakBetweenNotes),b.velocity&&(i=b.velocity);var _=e.pitches;"rhythm"===e.style&&(_=f.setRhythmHead(!0,e)),e.elem&&(e.elem.midiPitches=[]);for(var P=0;P<_.length;P++){var N=_[P];if(N){N.startSlur&&(T+=N.startSlur.length),N.endSlur&&(T-=N.endSlur.length);var B=N.actualPitch?N.actualPitch:R(N);if(l===x&&y){var V=n(N);V&&y[V]&&(B=y[V].sound)}var F={cmd:"note",pitch:B,volume:i,start:I(e.time),duration:O(N.duration),instrument:l,startChar:e.elem.startChar,endChar:e.elem.endChar};if(F=z(F),e.gracenotes&&(F.duration=F.duration/2,F.start=F.start+F.duration),e.elem&&e.elem.midiPitches.push(F),b.noteModification)L(b.noteModification,F);else{switch(T>0?F.endType="tenuto":v&&(F.endType=v),F.endType){case"tenuto":F.gap=-.001;break;case"staccato":var j=.4*F.duration;F.gap=o/60*j;break;default:F.gap=0}u.push(F)}}}u.length}var q=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);d=Math.max(d,I(e.time)+O(q))}e=function(e,n,x,O){n||(n={}),O||(O={}),r=[],i=[0,0,0,0,0,0,0],a=[],o=n.qpm,_=1,c=void 0,l=void 0,u=void 0,h=void 0,d=0,y=x,w={num:4,den:4},k=!0,S=105,C=95,M=85,E=.25,m=void 0,g=void 0,T=0,v=[],P={},b=1,e.length>0&&e[0].length>0&&(A=e[0][0].pickupLength),void 0===n.bassprog||O.bassprog||(O.bassprog=[n.bassprog]),void 0===n.bassvol||O.bassvol||(O.bassvol=[n.bassvol]),void 0===n.chordprog||O.chordprog||(O.chordprog=[n.chordprog]),void 0===n.chordvol||O.chordvol||(O.chordvol=[n.chordvol]),void 0===n.gchord||O.gchord||(O.gchord=[n.gchord]),f=new t(e.length,n.chordsOff,O,w),function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n],i={},s=t.qpm,a=0,o=1,c=0;c<r.length;c++){var l=r[c];if("tempo"!==l.el_type){l.time=a;var u=l.duration?l.duration:0;if(a+=Math.round(u*o*1e6),l.pitches){for(var h=0;h<l.pitches.length;h++){var d=l.pitches[h];if(d)if(d.duration=l.duration,d.startTie)void 0===i[d.pitch]?i[d.pitch]={el:c,pitch:h}:(r[i[d.pitch].el].pitches[i[d.pitch].pitch].duration+=d.duration,l.pitches[h]=null);else if(d.endTie){var f=i[d.pitch];if(f){var p=d.duration;delete r[f.el].pitches[f.pitch].startTie,r[f.el].pitches[f.pitch].duration+=p,l.pitches[h]=null,delete i[d.pitch]}else delete d.endTie}}delete l.duration}}else s?o=l.qpm?s/l.qpm:1:s=l.qpm}for(var m in i)if(i.hasOwnProperty(m)){var g=i[m];delete r[g.el].pitches[g.pitch].startTie}}}(e,n);for(var L=0;L<e.length;L++){s=0,f.setTranspose(s);var V=e[L];u=[{cmd:"program",channel:L,instrument:c}],h=void 0,p=0,f.setLastBarTime(0);var R=!1;(!0===n.voicesOff||n.voicesOff&&n.voicesOff.length&&n.voicesOff.indexOf(L)>=0)&&(R=!0);for(var z=0;z<V.length;z++){var j=V[z];switch(j.el_type){case"name":h={cmd:"text",type:"name",text:j.trackName};break;case"note":B(j,R);break;case"key":i=F(j);break;case"meter":w=j,f.setMeter(w),E=D(w),H();break;case"tempo":o?_=j.qpm?o/j.qpm:1:o=j.qpm,f.setTempoChangeFactor(_);break;case"transpose":s=j.transpose,f.setTranspose(s);break;case"bar":f.barEnd(j),r=[],0===L&&Y(e.length+1),f.setRhythmHead(!1),p=I(j.time),f.setLastBarTime(p);break;case"bagpipes":break;case"instrument":if(void 0===c&&(c=j.program),l=j.program,u.length>0&&"program"===u[u.length-1].cmd)u[u.length-1].instrument=j.program;else{var U;for(U=u.length-1;U>=0&&"program"!==u[U].cmd;U--);(U<0||u[U].instrument!==j.program)&&u.push({cmd:"program",channel:0,instrument:j.program})}break;case"channel":N(j.channel);break;case"drum":P=q(j.params),H();break;case"gchordOn":f.gChordOn(j);break;case"beat":S=j.beats[0],C=j.beats[1],M=j.beats[2];break;case"vol":m=j.volume;break;case"volinc":g=j.volume;break;case"beataccents":k=j.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":f.paramChange(j);break;default:console.log("MIDI creation. Unknown el_type: "+j.el_type+"\n")}}void 0===u[0].instrument&&(u[0].instrument=c||0),h&&u.unshift(h),a.push(u),f.finish(),v.length}return n.detuneOctave&&function(e,t){for(var n={},r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++){var s=e[r][i];"note"===s.cmd&&(void 0===n[s.start]&&(n[s.start]=[]),n[s.start].push({track:r,event:i,pitch:s.pitch}))}var a=Object.keys(n);for(r=0;r<a.length;r++){var o=n[a[r]];if(o.length>1){var c=(o=o.sort((function(e,t){return e.pitch-t.pitch})))[o.length-1],l=c.pitch%12,u=!1;for(i=0;!u&&i<o.length-1;i++)o[i].pitch%12===l&&(u=!0);if(u){var h=e[c.track][c.event];h.cents||(h.cents=0),h.cents+=t}}}}(a,parseInt(n.detuneOctave,10)),f.addTrack(a),v.length>0&&a.push(v),{tempo:o,instrument:c,tracks:a,totalDuration:d}};var V=[0,2,4,5,7,9,11];function R(e){if(void 0!==e.midipitch)return e.midipitch;var t=e.pitch;if(e.accidental)switch(e.accidental){case"sharp":r[t]=1;break;case"flat":r[t]=-1;break;case"natural":r[t]=0;break;case"dblsharp":r[t]=2;break;case"dblflat":r[t]=-2;break;case"quartersharp":r[t]=.25;break;case"quarterflat":r[t]=-.25}var n=12*function(e){return Math.floor(e/7)}(t)+V[j(t)]+60;return void 0!==r[t]?n+=r[t]:n+=i[j(t)],n+=s}function F(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var n=0;n<e.accidentals.length;n++){var r,i=e.accidentals[n];switch(i.acc){case"flat":r=-1;break;case"quarterflat":r=-.25;break;case"sharp":r=1;break;case"quartersharp":r=.25;break;default:r=0}t[j(i.note.toLowerCase().charCodeAt(0)-"c".charCodeAt(0))]+=r}return t}function z(e){var t=""+e.pitch;return t.indexOf(".75")>=0?(e.pitch=Math.round(e.pitch),e.cents=-50):t.indexOf(".25")>=0&&(e.pitch=Math.round(e.pitch),e.cents=50),e}function j(e){return(e%=7)<0&&(e+=7),e}function q(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],n=[],r="",i=0,s=0;s<t.length;s++)if("d"===t[s]&&i++,"d"===t[s]||"z"===t[s])0!==r.length?(n.push(r),r=t[s]):r+=t[s];else{if(0===r.length)return{on:!1};r+=t[s]}if(0!==r.length&&n.push(r),e.pattern.length!==2*i+1)return{on:!1};for(var a={on:!0,bars:e.bars,pattern:[]},o=D(w),c=0,l=0;l<n.length;l++){r=n[l];for(var u=1,h=!1,d=0,f=1;f<r.length;f++)switch(r[f]){case"/":0!==d&&(u*=d),d=0,h=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d=10*d+r[f];break;default:return{on:!1}}h?(0===d&&(d=2),u/=d):d&&(u*=d),"d"===r[0]?(a.pattern.push({len:u*o,pitch:e.pattern[1+c],velocity:e.pattern[1+c+i]}),c++):a.pattern.push({len:u*o,pitch:null})}return b=e.bars?e.bars:1,a}function H(){if(P&&P.pattern){for(var e=P,t=0,n=w.num/w.den,r=0;r<e.pattern.length;r++)t+=e.pattern[r].len;var i=t/b/n;for(r=0;r<e.pattern.length;r++)e.pattern[r].len=e.pattern[r].len/i;P=e}}function Y(e){if(0!==v.length||P.on){var t=w.num/w.den;if(0===v.length){if(d<t)return;v.push({cmd:"program",channel:e,instrument:x})}if(P.on)for(var n=p,r=0;r<P.pattern.length;r++){var i=O(P.pattern[r].len);P.pattern[r].pitch&&v.push({cmd:"note",pitch:P.pattern[r].pitch,volume:P.pattern[r].velocity,start:n,duration:i,gap:0,instrument:x}),n+=i}}}}(),Bh=e}function Tg(){if(jh)return zh;jh=1;var e=fh(),t=Sg(),n=Cg(),r=Eg(),i=function(){if(Fh)return Rh;function e(e,t){return"abselem"===e?"abselem":t}function t(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var n=0;n<t.length;n++)t[n].unshift(e)}function n(e,t){e.el_type="key",e.startChar=-1,e.endChar=-1;for(var n=0;n<t.length;n++)t[n].unshift(e)}function r(e,t){e.el_type="clef",e.startChar=-1,e.endChar=-1;for(var n=0;n<t.length;n++)t[n].unshift(e)}function i(e,t,n){e.el_type="font",e.type=n,e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function s(t,n){return!t||JSON.stringify(t,e)===JSON.stringify(n,e)}function a(e){for(var t={},n=Object.keys(e),r=0;r<n.length;r++)if("staff"!==n[r])t[n[r]]=e[n[r]];else{t.staff=[];for(var i=0;i<e.staff.length;i++){for(var s={},a=Object.keys(e.staff[i]),o=0;o<a.length;o++)if("voices"!==a[o])s[a[o]]=e.staff[i][a[o]];else{s.voices=[];for(var c=0;c<e.staff[i].voices.length;c++)s.voices.push([].concat(e.staff[i].voices[c]))}t.staff.push(s)}}return t}return Fh=1,Rh=function(e,o){o||(o={});for(var c=!!o.lineBreaks,l=[],u=!1,h=[],d=[],f=[],p=[],m=[],g=[],v=[],b=0;b<e.length;b++){var y=e[b];if(y.staff){if(u&&!y.vskip)for(var _=l[l.length-1],w=0;w<_.staff.length;w++){var x=y.staff[w],k=_.staff[w];if(x&&(s(x.meter,h[w])||(t(x.meter,x.voices),h[w]=x.meter,delete x.meter),s(x.key,d[w])||(n(x.key,x.voices),d[w]=x.key,delete x.key),x.title&&(k.abbrevTitle=x.title),s(x.clef,f[w])||(r(x.clef,x.voices),f[w]=x.clef,delete x.clef),s(x.vocalfont,p[w])||(i(x.vocalfont,x.voices,"vocalfont"),p[w]=x.vocalfont,delete x.vocalfont),s(x.gchordfont,m[w])||(i(x.gchordfont,x.voices,"gchordfont"),m[w]=x.gchordfont,delete x.gchordfont),s(x.tripletfont,g[w])||(i(x.tripletfont,x.voices,"tripletfont"),g[w]=x.tripletfont,delete x.tripletfont),s(x.annotationfont,v[w])||(i(x.annotationfont,x.voices,"annotationfont"),v[w]=x.annotationfont,delete x.annotationfont)),x)for(var S=0;S<k.voices.length;S++){var C=k.voices[S],M=x.voices[S];c&&C.push({el_type:"break"}),M&&(k.voices[S]=C.concat(M))}}else{for(var E=0;E<y.staff.length;E++)d[E]=y.staff[E].key,h[E]=y.staff[E].meter,f[E]=y.staff[E].clef;l.push(a(y))}u=!0}else u=!1,l.push(y)}return l}}();return zh=function(){function s(e,t,n,r){for(var i=0;i<r.length;i++)e[n][r[i]]=t[n][r[i]]}function a(e,t){for(;t<e.length&&null===e[t].left;)t++;return e[t]}this.reset=function(){this.version="1.1.0",this.media="screen",this.metaText={},this.metaTextInfo={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0,this.runningFonts={},delete this.visualTranspose},this.reset(),this.copyTopInfo=function(e){var t=["tempo","title","header","rhythm","origin","composer","author","partOrder"];s(this,e,"metaText",t),s(this,e,"metaTextInfo",t)},this.copyBottomInfo=function(e){var t=["unalignedWords","book","source","discography","notes","transcription","history","abc-copyright","abc-creator","abc-edited-by","footer"];s(this,e,"metaText",t),s(this,e,"metaTextInfo",t)},this.getBeatLength=function(){var e=this.getMeterFraction(),t=1;return(6===e.num||9===e.num||12===e.num||3===e.num&&8===e.den)&&(t=3),t/e.den},this.getPickupLength=function(){var e=this.getBarLength(),t=function(e,t){for(var n=0,r=0;r<e.length;r++)if(e[r].staff)for(var i=0;i<e[r].staff.length;i++)for(var s=0;s<e[r].staff[i].voices.length;s++)for(var a=e[r].staff[i].voices[s],o=1,c=0;c<a.length;c++){var l=a[c].rest&&"spacer"===a[c].rest.type;if(a[c].startTriplet&&(o=a[c].tripletMultiplier),a[c].duration&&!l&&"tempo"!==a[c].el_type&&(n+=a[c].duration*o),a[c].endTriplet&&(o=1),n>=t&&(n-=t),"bar"===a[c].el_type)return n}return n}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var n=this.metaText?this.metaText.tempo:null;t=this.getBpm(n)}return t<=0&&(t=1),6e4*(this.getBeatsPerMeasure()/t)},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++){var r=t.staff[n].meter;if(r)return r}}return{type:"common_time"}},this.getMeterFraction=function(){var e=this.getMeter(),t=4,n=4;return e&&("specified"===e.type?(t=parseInt(e.value[0].num,10),n=parseInt(e.value[0].den,10)):"cut_time"===e.type?(t=2,n=2):"common_time"===e.type&&(t=4,n=4)),this.meter={num:t,den:n},this.meter},this.getKeySignature=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++)if(t.staff[n].key)return t.staff[n].key}return{}},this.getElementFromChar=function(e){for(var t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.staff)for(var r=0;r<n.staff.length;r++)for(var i=n.staff[r],s=0;s<i.voices.length;s++)for(var a=i.voices[s],o=0;o<a.length;o++){var c=a[o];if(c.startChar&&c.endChar&&c.startChar<=e&&c.endChar>e)return c}}return null},this.addElementToEvents=function(t,n,r,i,s,a,o,c,l,u){if(n.hint)return{isTiedState:void 0,duration:0};var h=n.durationClass?n.durationClass:n.duration;if(n.abcelem.rest&&"spacer"===n.abcelem.rest.type&&(h=0),h>0){for(var d=[],f=0;f<n.elemset.length;f++)null!==n.elemset[f]&&d.push(n.elemset[f]);var p=n.startTie;if(void 0!==l)t["event"+l].elements.push(d),u&&(t["event"+r]||(t["event"+r]={type:"event",milliseconds:r,line:a,measureNumber:o,top:i,height:s,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),t["event"+r].measureStart=!0,u=!1),p||(l=void 0);else{if(t["event"+r]){if(t["event"+r].left?t["event"+r].left=Math.min(t["event"+r].left,n.x):t["event"+r].left=n.x,t["event"+r].elements.push(d),t["event"+r].startCharArray.push(n.abcelem.startChar),t["event"+r].endCharArray.push(n.abcelem.endChar),null===t["event"+r].startChar&&(t["event"+r].startChar=n.abcelem.startChar),null===t["event"+r].endChar&&(t["event"+r].endChar=n.abcelem.endChar),n.abcelem.midiPitches&&n.abcelem.midiPitches.length){t["event"+r].midiPitches||(t["event"+r].midiPitches=[]);for(f=0;f<n.abcelem.midiPitches.length;f++)t["event"+r].midiPitches.push(n.abcelem.midiPitches[f])}if(n.abcelem.midiGraceNotePitches&&n.abcelem.midiGraceNotePitches.length){t["event"+r].midiGraceNotePitches||(t["event"+r].midiGraceNotePitches=[]);for(var m=0;m<n.abcelem.midiGraceNotePitches.length;m++)t["event"+r].midiGraceNotePitches.push(n.abcelem.midiGraceNotePitches[m])}}else t["event"+r]={type:"event",milliseconds:r,line:a,measureNumber:o,top:i,height:s,left:n.x,width:n.w,elements:[d],startChar:n.abcelem.startChar,endChar:n.abcelem.endChar,startCharArray:[n.abcelem.startChar],endCharArray:[n.abcelem.endChar],midiPitches:n.abcelem.midiPitches?e.cloneArray(n.abcelem.midiPitches):[]},n.abcelem.midiGraceNotePitches&&(t["event"+r].midiGraceNotePitches=e.cloneArray(n.abcelem.midiGraceNotePitches));u&&(t["event"+r].measureStart=!0,u=!1)}}return{isTiedState:l,duration:h/c,nextIsBar:u||"bar"===n.type}},this.makeVoicesArray=function(){for(var e=[],n=[],r={},i=0;i<this.engraver.staffgroups.length;i++){var s=this.engraver.staffgroups[i];if(s&&s.staffs&&s.staffs.length>0)for(var a=s.staffs[0],o=a.absoluteY,c=o-a.top*t.STEP,l=s.staffs[s.staffs.length-1],u=(o=l.absoluteY)-l.bottom*t.STEP-c,h=s.voices,d=0;d<h.length;d++)if(!h[d].staff||!h[d].staff.isTabStaff){var f=!1;e[d]||(e[d]=[]),void 0===n[d]&&(n[d]=0);for(var p=h[d].children,m=0;m<p.length;m++)"tempo"===p[m].type&&(r[n[d]]=this.getBpm(p[m].abcelem)),e[d].push({top:c,height:u,line:s.line,measureNumber:n[d],elem:p[m]}),"bar"===p[m].type&&f&&n[d]++,"note"!==p[m].type&&"rest"!==p[m].type||(f=!0)}}return this.tempoLocations=r,e},this.setupEvents=function(e,t,n,r){r||(r=1);for(var i,s=[],o={},c=e,l=!0,u=this.makeVoicesArray(),h=0,d=0;d<u.length;d++){var f=c,p=Math.round(1e3*f),m=0,g=-1,v=u[d],b=n;t=this.getBeatLength()*b/60;for(var y=-1,_=0;_<v.length;_++){var w=v[_].measureNumber;y!==w&&this.tempoLocations[w]&&(b=this.tempoLocations[w],t=r*this.getBeatLength()*b/60,y=w);var x,k=v[_].elem,S=this.addElementToEvents(o,k,p,v[_].top,v[_].height,v[_].line,v[_].measureNumber,t,i,l);if(i=S.isTiedState,l=S.nextIsBar,f+=S.duration,k.duration>0&&o["event"+p]&&(x="event"+p),p=Math.round(1e3*f),"bar"===k.type){var C=k.abcelem.type,M="bar_right_repeat"===C||"bar_dbl_repeat"===C,E="1"===k.abcelem.startEnding,T="bar_left_repeat"===C||"bar_dbl_repeat"===C||"bar_right_repeat"===C;if(M){_>0&&(o[x].endX=k.x),-1===g&&(g=_);var P=0;y=-1;for(var A=m;A<g;A++){y!==(w=v[A].measureNumber)&&this.tempoLocations[w]&&(b=this.tempoLocations[w],t=r*this.getBeatLength()*b/60,y=w);var N=v[A].elem;i=(S=this.addElementToEvents(o,N,p,v[A].top,v[A].height,v[A].line,v[A].measureNumber,t,i,l)).isTiedState,l=S.nextIsBar,f+=S.duration,P=p,p=Math.round(1e3*f)}o["event"+P]&&(o["event"+P].endX=v[g].elem.x),l=!0,g=-1}E&&(g=_),T&&(m=_)}}h=Math.max(h,p)}return function(e){for(var t,n,r,i,s=e.length-1;s>=0;s--){var a=e[s];"bar"===a.type?(a.top=r,a.nextTop=t,t=r,a.bottom=i,a.nextBottom=n,n=i):"event"===a.type&&(r=a.top,i=a.top+a.height)}}(s=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t.sort((function(e,t){var n=e.milliseconds-t.milliseconds;return 0!==n?n:"bar"===e.type?-1:1}))}(o)),function(e,t){if(t.length<1)return;for(var n=0;n<t.length-1;n++){var r=t[n],i=a(t,n+1);if(null!==r.left){var s=i&&r.top===i.top?i.left:e[r.line].staffGroup.w;void 0!==r.endX?s>r.left&&(r.endX=Math.min(r.endX,s)):r.endX=s}}var o=t[t.length-1];o.endX=e[o.line].staffGroup.w}(this.lines,s),s.push({type:"end",milliseconds:h}),this.addUsefulCallbackInfo(s,b*r),s},this.addUsefulCallbackInfo=function(e,t){for(var n=this.millisecondsPerMeasure(t),r=0;r<e.length;r++){e[r].millisecondsPerMeasure=n}},this.getBpm=function(e){var t;if(e||(e=this.metaText?this.metaText.tempo:null),e){t=e.bpm;var n=this.getBeatLength();t=t*(e.duration&&e.duration.length>0?e.duration[0]:n)/n}if(!t){t=180;var r=this.getMeterFraction();r&&3!==r.num&&r.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var n=this.metaText?this.metaText.tempo:null,r=this.getBpm(n),i=1;e?n&&(i=e/r):e=r;var s=this.getBeatLength(),a=e/60,o=this.getBarLength()/s*t/a;o&&(o-=this.getPickupLength()/s/a);var c=s*a;return this.noteTimings=this.setupEvents(o,c,e,i),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*a):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=n(this,e);return r(t,e,this.formatting.percmap,this.formatting.midi)},this.deline=function(e){return i(this.lines,e)},this.findSelectableElement=function(e){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(e):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}}}function Pg(){if(Hh)return qh;Hh=1;var e=yh();function t(e){if(!e)return!1;if("string"==typeof e)return!1;for(var t=0;t<e.length;t++)if("string"!=typeof e[t])return!1;return!0}function n(e){for(var t=!1,n=[],i=0;i<e.lines.length;i++){var s=e.lines[i];if(s.staff)for(var a=0;a<s.staff.length;a++){for(var o=s.staff[a],c=[],l=0;l<o.voices.length;l++){var u=o.voices[l];c.push({hasOverlay:!1,voice:[],snip:[]}),n[i]=0;for(var h=0,d=!1,f=-1,p=0;p<u.length;p++){var m=u[p];if("overlay"!==m.el_type||d)"bar"===m.el_type?(d?(d=!1,c[l].snip.push({start:f,len:p-f}),c[l].voice.push(m)):(h>0&&c[l].voice.push({el_type:"note",duration:h,rest:{type:"invisible"},startChar:m.startChar,endChar:m.endChar}),c[l].voice.push(m)),h=0):"note"===m.el_type?d?c[l].voice.push(m):(h+=m.duration,n[i]+=m.duration):"scale"!==m.el_type&&"stem"!==m.el_type&&"overlay"!==m.el_type&&"style"!==m.el_type&&"transpose"!==m.el_type&&"color"!==m.el_type||c[l].voice.push(m);else{t=!0,d=!0,f=p,c[l].hasOverlay=!0;for(var g=0;g<i;g++)n[g]&&e.lines[g].staff&&o.voices.length>=e.lines[g].staff[0].voices.length&&e.lines[g].staff[0].voices.push([{el_type:"note",duration:n[g],rest:{type:"invisible"},startChar:m.startChar,endChar:m.endChar}])}}c[l].hasOverlay&&0===c[l].snip.length&&c[l].snip.push({start:f,len:u.length-f})}for(l=0;l<c.length;l++){var v=c[l];if(v.hasOverlay){v.voice.splice(0,0,{el_type:"stem",direction:"down"}),o.voices.push(v.voice);for(var b=v.snip.length-1;b>=0;b--){var y=v.snip[b];o.voices[l].splice(y.start,y.len),o.voices[l].splice(y.start+1,0,{el_type:"stem",direction:"auto"});var _=r(o.voices[l],y.start);o.voices[l].splice(_,0,{el_type:"stem",direction:"up"})}for(b=0;b<o.voices[o.voices.length-1].length;b++){o.voices[o.voices.length-1][b]=Object.assign({},o.voices[o.voices.length-1][b]);var w=o.voices[o.voices.length-1][b];"bar"===w.el_type&&w.startEnding&&delete w.startEnding,"bar"===w.el_type&&w.endEnding&&delete w.endEnding}}}}}return t}function r(e,t){for(var n=t-1;n>0&&"bar"!==e[n].el_type;n--);return n}function a(e,t,n,r){var i;r[t]||(r[t]=[]),r[t][n]||(r[t][n]=[]);for(var s=function(e,s,a){if(void 0===r[t][n][a]){for(i=0;i<r[t][n].length;i++)if(void 0!==r[t][n][i]){a=i;break}if(void 0===r[t][n][a]){var o=100*a+1;e.endSlur.forEach((function(e){o===e&&--o})),r[t][n][a]=[o]}}for(var c,l=0;l<s;l++)c=r[t][n][a].pop(),e.endSlur.push(c);return 0===r[t][n][a].length&&delete r[t][n][a],c},a=function(e,i,s,a){e.startSlur=[],void 0===r[t][n][s]&&(r[t][n][s]=[]);for(var o=100*s+1,c=0;c<i;c++)a&&(a.forEach((function(e){o===e&&++o})),a.forEach((function(e){o===e&&++o})),a.forEach((function(e){o===e&&++o}))),r[t][n][s].forEach((function(e){o===e&&++o})),r[t][n][s].forEach((function(e){o===e&&++o})),r[t][n][s].push(o),e.startSlur.push({label:o}),e.dottedSlur&&(e.startSlur[e.startSlur.length-1].style="dotted",delete e.dottedSlur),o++},o=0;o<e.length;o++){var c=e[o];if("note"===c.el_type){if(c.gracenotes)for(var l=0;l<c.gracenotes.length;l++){if(c.gracenotes[l].endSlur){var u=c.gracenotes[l].endSlur;c.gracenotes[l].endSlur=[];for(var h=0;h<u;h++)s(c.gracenotes[l],1,20)}c.gracenotes[l].startSlur&&(i=c.gracenotes[l].startSlur,a(c.gracenotes[l],i,20))}if(c.endSlur&&(i=c.endSlur,c.endSlur=[],s(c,i,0)),c.startSlur&&a(c,i=c.startSlur,0),c.pitches){for(var d=[],f=0;f<c.pitches.length;f++)if(c.pitches[f].endSlur){var p=c.pitches[f].endSlur;c.pitches[f].endSlur=[];for(var m=0;m<p;m++){var g=s(c.pitches[f],1,f+1);d.push(g)}}for(f=0;f<c.pitches.length;f++)c.pitches[f].startSlur&&(i=c.pitches[f].startSlur,a(c.pitches[f],i,f+1,d));c.gracenotes&&c.pitches[0].endSlur&&100===c.pitches[0].endSlur[0]&&c.pitches[0].startSlur&&(c.gracenotes[0].endSlur?c.gracenotes[0].endSlur.push(c.pitches[0].startSlur[0].label):c.gracenotes[0].endSlur=[c.pitches[0].startSlur[0].label],1===c.pitches[0].endSlur.length?delete c.pitches[0].endSlur:100===c.pitches[0].endSlur[0]?c.pitches[0].endSlur.shift():100===c.pitches[0].endSlur[c.pitches[0].endSlur.length-1]&&c.pitches[0].endSlur.pop(),1===r[t][n][1].length?delete r[t][n][1]:r[t][n][1].pop())}}}}function o(e,t){for(i=0;i<e.length;i++)if(void 0!==e[i].staff)for(s=0;s<e[i].staff.length;s++){var n=[];for(v=0;v<e[i].staff[s].voices.length;v++)for(var r=e[i].staff[s].voices[v],a=0,o=0;o<r.length;o++)if("bar"===r[o].el_type){if(++a>=t&&o<r.length-1){var l=c(e,i);if(!l){var u=JSON.parse(JSON.stringify(e[i]));e.push(Object.assign({},u)),l=e[e.length-1];for(var h=0;h<l.staff.length;h++)for(var d=0;d<l.staff[h].voices.length;d++)l.staff[h].voices[d]=[]}var f=o+1,p=e[i].staff[s].voices[v].slice(f);return e[i].staff[s].voices[v]=e[i].staff[s].voices[v].slice(0,f),l.staff[s].voices[v]=n.concat(p.concat(l.staff[s].voices[v])),!0}}else r[o].duration||n.push(r[o])}return!1}function c(e,t){for(t++;e.length>t;){if(e[t].staff)return e[t];t++}return null}function l(e){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function u(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type||"bar"===e[t].el_type)return!0;return!1}function h(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type&&(void 0===e[t].rest||void 0!==e[t].chord))return!0;return!1}function d(e,t){e.vskipPending&&(t.vskip=e.vskipPending,delete e.vskipPending),e.lines.push(t)}function f(e){void 0!==e.potentialStartBeam&&void 0!==e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function p(e,t,n){if(e.runningFonts[t]){for(var r=!1,i=Object.keys(n),s=0;s<i.length;s++)e.runningFonts[t][i[s]]!==n[i[s]]&&(r=!0);r&&(e.lines[e.lineNum].staff[e.staffNum][t]=n)}e.runningFonts[t]=n}function m(e,t,n){var r=t.lines[t.lineNum].staff[t.staffNum];if(r.voices[t.voiceNum]=[],r.title||(r.title=[]),r.title[t.voiceNum]={name:n.name,subname:n.subname},n.style&&e.appendElement("style",null,null,{head:n.style}),n.stem)e.appendElement("stem",null,null,{direction:n.stem});else if(t.voiceNum>0){if(void 0!==r.voices[0]){for(var i=!1,s=0;s<r.voices[0].length;s++)"stem"===r.voices[0].el_type&&(i=!0);if(!i){r.voices[0].splice(0,0,{el_type:"stem",direction:"up"})}}e.appendElement("stem",null,null,{direction:"down"})}n.scale&&e.appendElement("scale",null,null,{size:n.scale}),n.color&&e.appendElement("color",null,null,{color:n.color})}function g(e,t,n){n.key&&n.key.impliedNaturals&&(n.key.accidentals=n.key.accidentals.concat(n.key.impliedNaturals),delete n.key.impliedNaturals),t.lines[t.lineNum].staff[t.staffNum]={voices:[],clef:n.clef,key:n.key,workingClef:n.clef};var r=t.lines[t.lineNum].staff[t.staffNum];void 0!==n.stafflines&&(r.clef.stafflines=n.stafflines,r.workingClef.stafflines=n.stafflines),n.staffscale&&(r.staffscale=n.staffscale),n.annotationfont&&p(t,"annotationfont",n.annotationfont),n.gchordfont&&p(t,"gchordfont",n.gchordfont),n.tripletfont&&p(t,"tripletfont",n.tripletfont),n.vocalfont&&p(t,"vocalfont",n.vocalfont),n.bracket&&(r.bracket=n.bracket),n.brace&&(r.brace=n.brace),n.connectBarLines&&(r.connectBarLines=n.connectBarLines),n.barNumber&&(r.barNumber=n.barNumber),m(e,t,n),n.part&&e.appendElement("part",n.part.startChar,n.part.endChar,{title:n.part.title}),void 0!==n.meter&&(r.meter=n.meter),t.vskipPending&&(t.lines[t.lineNum].vskip=t.vskipPending,delete t.vskipPending)}return qh=function(r){var i=this,s={},p="";r.reset(),this.setVisualTranspose=function(e){e&&(r.visualTranspose=e)},this.cleanUp=function(i,s,d){l(r),delete r.runningFonts,function(e){t(e.metaText.notes)&&(e.metaText.notes=e.metaText.notes.join("\n"));t(e.metaText.history)&&(e.metaText.history=e.metaText.history.join("\n"))}(r),r.metaText.tempo&&r.metaText.tempo.bpm&&!r.metaText.tempo.duration&&(r.metaText.tempo.duration=[r.getBeatLength()]);var f,p,m=!1;for(b=0;b<r.lines.length;b++)if(void 0!==r.lines[b].staff){var g=!1;for(f=0;f<r.lines[b].staff.length;f++)if(void 0===r.lines[b].staff[f])m=!0,r.lines[b].staff[f]=null;else for(p=0;p<r.lines[b].staff[f].voices.length;p++)void 0===r.lines[b].staff[f].voices[p]?r.lines[b].staff[f].voices[p]=[]:u(r.lines[b].staff[f].voices[p])&&(g=!0);g||(r.lines[b]=null,m=!0)}if(m&&(r.lines=r.lines.filter((function(e){return!!e})),r.lines.forEach((function(e){e.staff&&(e.staff=e.staff.filter((function(e){return!!e})))}))),i)for(;o(r.lines,i););if(s){for(m=!1,b=0;b<r.lines.length;b++)if(void 0!==r.lines[b].staff)for(f=0;f<r.lines[b].staff.length;f++){var v=!1;for(p=0;p<r.lines[b].staff[f].voices.length;p++)h(r.lines[b].staff[f].voices[p])&&(v=!0);v||(m=!0,r.lines[b].staff[f]=null)}m&&r.lines.forEach((function(e){e.staff&&(e.staff=e.staff.filter((function(e){return!!e})))}))}for(function(e){for(var t=!0,n=0;n<e.length;n++){var r=e[n];if(r.staff){for(var i=0;i<r.staff.length;i++){var s=r.staff[i];if(s.title){for(var a=!1,o=0;o<s.title.length;o++)s.title[o]?(s.title[o]=t?s.title[o].name:s.title[o].subname,s.title[o]?a=!0:s.title[o]=""):s.title[o]="";a||delete s.title}}t=!1}}}(r.lines),b=0;b<r.lines.length;b++)if(r.lines[b].staff)for(f=0;f<r.lines[b].staff.length;f++)delete r.lines[b].staff[f].workingClef;for(;n(r););for(var b=0;b<r.lines.length;b++){var y=r.lines[b].staff;if(y)for(r.staffNum=0;r.staffNum<y.length;r.staffNum++)for(y[r.staffNum].clef&&e.fixClef(y[r.staffNum].clef),r.voiceNum=0;r.voiceNum<y[r.staffNum].voices.length;r.voiceNum++){var _=y[r.staffNum].voices[r.voiceNum];a(_,r.staffNum,r.voiceNum,d);for(var w=0;w<_.length;w++)"clef"===_[w].el_type&&e.fixClef(_[w]);if(_.length>0&&_[_.length-1].barNumber){var x=c(r.lines,b);x&&(x.staff[0].barNumber=_[_.length-1].barNumber),delete _[_.length-1].barNumber}}}return delete r.staffNum,delete r.voiceNum,delete r.lineNum,delete r.potentialStartBeam,delete r.potentialEndBeam,delete r.vskipPending,d},this.addTieToLastNote=function(e){var t=function(e){if(!e.lines[e.lineNum])return null;if(!e.lines[e.lineNum].staff)return null;if(!e.lines[e.lineNum].staff[e.staffNum])return null;var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum];if(!t)return null;for(var n=t.length-1;n>=0;n--){var r=t[n];if("note"===r.el_type)return r}return null}(r);return!!(t&&t.pitches&&t.pitches.length>0)&&(t.pitches[0].startTie={},e&&(t.pitches[0].startTie.style="dotted"),!0)},this.appendElement=function(e,t,n,a){var o;(a.el_type=e,null!==t&&(a.startChar=t),null!==n&&(a.endChar=n),"note"===e)?((o=a).duration?o.duration:0)>=.25||a.force_end_beam_last&&void 0!==r.potentialStartBeam?f(r):a.end_beam&&void 0!==r.potentialStartBeam?void 0===a.rest?function(e,t){t.potentialStartBeam.startBeam=!0,e.endBeam=!0,delete t.potentialStartBeam,delete t.potentialEndBeam}(a,r):f(r):void 0===a.rest&&(void 0===r.potentialStartBeam?a.end_beam||(r.potentialStartBeam=a,delete r.potentialEndBeam):r.potentialEndBeam=a):f(r);return delete a.end_beam,delete a.force_end_beam_last,a.rest&&"invisible"===a.rest.type&&delete a.decoration,!(r.lines.length<=r.lineNum||r.lines[r.lineNum].staff.length<=r.staffNum)&&(function(e,t,n,r,i){var s=t.lines[t.lineNum].staff[t.staffNum];if(void 0!==n.pitches){var a=s.workingClef.verticalPos;n.pitches.forEach((function(e){e.verticalPos=e.pitch-a}))}if(void 0!==n.gracenotes){var o=s.workingClef.verticalPos;n.gracenotes.forEach((function(e){e.verticalPos=e.pitch-o}))}s.voices.length<=t.voiceNum&&(r[i]||(r[i]={}),m(e,t,r[i]));s.voices[t.voiceNum].push(n)}(i,r,a,s,p),!0)},this.appendStartingElement=function(e,t,n,i){var s;l(r),"key"===e&&(s=i.impliedNaturals,delete i.impliedNaturals,delete i.explicitAccidentals);var a=Object.assign({},i);if(r.lines[r.lineNum]){var o=r.lines[r.lineNum].staff;if(o){o.length<=r.staffNum&&(o[r.staffNum]={},o[r.staffNum].clef=Object.assign({},o[0].clef),o[r.staffNum].key=Object.assign({},o[0].key),o[0].meter&&(o[r.staffNum].meter=Object.assign({},o[0].meter)),o[r.staffNum].workingClef=Object.assign({},o[0].workingClef),o[r.staffNum].voices=[[]]),"clef"===e&&(o[r.staffNum].workingClef=a);for(var c=o[r.staffNum].voices[r.voiceNum],u=0;u<c.length;u++){if("note"===c[u].el_type||"bar"===c[u].el_type)return a.el_type=e,a.startChar=t,a.endChar=n,s&&(a.accidentals=s.concat(a.accidentals)),void c.push(a);if(c[u].el_type===e)return a.el_type=e,a.startChar=t,a.endChar=n,s&&(a.accidentals=s.concat(a.accidentals)),void(c[u]=a)}o[r.staffNum][e]=i}}},this.addSubtitle=function(e,t){d(r,{subtitle:{text:e,startChar:t.startChar,endChar:t.endChar}})},this.addSpacing=function(e){r.vskipPending=e},this.addNewPage=function(e){d(r,{newpage:e})},this.addSeparator=function(e,t,n,i){d(r,{separator:{spaceAbove:Math.round(e),spaceBelow:Math.round(t),lineLength:Math.round(n),startChar:i.startChar,endChar:i.endChar}})},this.addText=function(e,t){d(r,{text:{text:e,startChar:t.startChar,endChar:t.endChar}})},this.addCentered=function(e){d(r,{text:[{text:e,center:!0}]})},this.changeVoiceScale=function(e){i.appendElement("scale",null,null,{size:e})},this.changeVoiceColor=function(e){i.appendElement("color",null,null,{color:e})},this.startNewLine=function(e){l(r),e.currentVoiceName&&(p=e.currentVoiceName,s[e.currentVoiceName]=e),void 0===r.lines[r.lineNum]?function(e,t,n){t.lines[t.lineNum]={staff:[]},g(e,t,n)}(i,r,e):void 0===r.lines[r.lineNum].staff?(r.lineNum++,this.startNewLine(e)):void 0===r.lines[r.lineNum].staff[r.staffNum]?g(i,r,e):void 0===r.lines[r.lineNum].staff[r.staffNum].voices[r.voiceNum]?m(i,r,e):u(r.lines[r.lineNum].staff[r.staffNum].voices[r.voiceNum])?(r.lineNum++,this.startNewLine(e)):e.part&&i.appendElement("part",e.part.startChar,e.part.endChar,{title:e.part.title})},this.setRunningFont=function(e,t){r.runningFonts[e]=t},this.setBarNumberImmediate=function(e){var t=this.getCurrentVoice();if(t&&t.length>0){var n=t[t.length-1];if("bar"!==n.el_type)return e-1;void 0!==n.barNumber&&(n.barNumber=e)}return e},this.hasBeginMusic=function(){for(var e=0;e<r.lines.length;e++)if(r.lines[e].staff)return!0;return!1},this.isFirstLine=function(e){for(var t=e-1;t>=0;t--)if(void 0!==r.lines[t].staff)return!1;return!0},this.getCurrentVoice=function(){var e=function(e,t){for(;t>=0;){if(e[t].staff)return e[t];t--}return null}(r.lines,r.lineNum);if(!e)return null;var t=e.staff[r.staffNum];return t&&void 0!==t.voices[r.voiceNum]?t.voices[r.voiceNum]:null},this.setCurrentVoice=function(e,t,n){r.staffNum=e,r.voiceNum=t,p=n;for(var i=0;i<r.lines.length;i++)if(r.lines[i].staff&&(void 0===r.lines[i].staff[e]||void 0===r.lines[i].staff[e].voices[t]||!u(r.lines[i].staff[e].voices[t])))return r.lineNum=i,!(r.lines[i].staff[e]&&!r.lines[i].staff[e].voices[t]);return r.lineNum=i,!1},this.addMetaText=function(e,t,n){void 0===r.metaText[e]?(r.metaText[e]=t,r.metaTextInfo[e]=n):("string"==typeof r.metaText[e]&&"string"==typeof t?r.metaText[e]+="\n"+t:("string"===r.metaText[e]&&(r.metaText[e]=[{text:r.metaText[e]}]),"string"==typeof t&&(t=[{text:t}]),r.metaText[e]=r.metaText[e].concat(t)),r.metaTextInfo[e].endChar=n.endChar)},this.addMetaTextArray=function(e,t,n){void 0===r.metaText[e]?(r.metaText[e]=[t],r.metaTextInfo[e]=n):(r.metaText[e].push(t),r.metaTextInfo[e].endChar=n.endChar)},this.addMetaTextObj=function(e,t,n){r.metaText[e]=t,r.metaTextInfo[e]=n}}}function Ag(){if(Uh)return Yh;Uh=1;var e=fh(),t=ph(),n=_h(),r=xg(),i=function(){if(Ch)return Sh;Ch=1;var e=fh(),t=function(t,n){this.lineIndex=0,this.lines=t,this.multilineVars=n,this.skipWhiteSpace=function(e){for(var t=0;t<e.length;t++)if(!this.isWhiteSpace(e[t]))return t;return e.length};var r=function(e,t){return t>=e.length};this.eatWhiteSpace=function(e,t){for(var n=t;n<e.length;n++)if(!this.isWhiteSpace(e[n]))return n-t;return n-t},this.getKeyPitch=function(e){var t=this.skipWhiteSpace(e);if(r(e,t))return{len:0};switch(e[t]){case"A":return{len:t+1,token:"A"};case"B":return{len:t+1,token:"B"};case"C":return{len:t+1,token:"C"};case"D":return{len:t+1,token:"D"};case"E":return{len:t+1,token:"E"};case"F":return{len:t+1,token:"F"};case"G":return{len:t+1,token:"G"}}return{len:0}},this.getSharpFlat=function(e){if("bass"===e)return{len:0};switch(e[0]){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(e){var t=function(e,t){for(;t<e.length&&(e[t]>="a"&&e[t]<="z"||e[t]>="A"&&e[t]<="Z");)t++;return t},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var i=e.substring(n,n+3).toLowerCase();switch((i.length>1&&" "===i[1]||"^"===i[1]||"_"===i[1]||"="===i[1])&&(i=i[0]),i){case"mix":return{len:t(e,n),token:"Mix"};case"dor":return{len:t(e,n),token:"Dor"};case"phr":return{len:t(e,n),token:"Phr"};case"lyd":return{len:t(e,n),token:"Lyd"};case"loc":return{len:t(e,n),token:"Loc"};case"aeo":case"min":case"m":return{len:t(e,n),token:"m"};case"maj":case"ion":return{len:t(e,n),token:""}}return{len:0}},this.getClef=function(t,n){var i=t,s=this.skipWhiteSpace(t);if(r(t,s))return{len:0};var a=!1,o=t.substring(s);if(e.startsWith(o,"clef=")&&(a=!0,o=o.substring(5),s+=5),0===o.length&&a)return{len:s+5,warn:"No clef specified: "+i};var c=this.skipWhiteSpace(o);if(r(o,c))return{len:0};c>0&&(s+=c,o=o.substring(c));var l=null;if(e.startsWith(o,"treble"))l="treble";else if(e.startsWith(o,"bass3"))l="bass3";else if(e.startsWith(o,"bass"))l="bass";else if(e.startsWith(o,"tenor"))l="tenor";else if(e.startsWith(o,"alto2"))l="alto2";else if(e.startsWith(o,"alto1"))l="alto1";else if(e.startsWith(o,"alto"))l="alto";else if(!n&&a&&e.startsWith(o,"none"))l="none";else if(e.startsWith(o,"perc"))l="perc";else if(!n&&a&&e.startsWith(o,"C"))l="tenor";else if(!n&&a&&e.startsWith(o,"F"))l="bass";else{if(n||!a||!e.startsWith(o,"G"))return{len:s+5,warn:"Unknown clef specified: "+i};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:s+l.length,token:l,explicit:a}},this.getBarLine=function(e,t){switch(e[t]){case"]":switch(e[++t]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return e[++t]>="1"&&e[t]<="9"||'"'===e[t]?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}case":":switch(e[++t]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(e[++t]){case"]":return"|"===e[++t]&&":"===e[++t]?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};case"|":return":"===e[++t]?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}default:return{len:1,warn:"Unknown bar symbol"}}case"[":if("|"!==e[++t])return e[t]>="1"&&e[t]<="9"||'"'===e[t]?{len:1,token:"bar_invisible"}:{len:0};switch(e[++t]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}case"|":switch(e[++t]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return":"===e[++t]?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var n=0;":"===e[t+n];)n++;return{len:1+n,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var n=0;n<e.length;n++)if(t.indexOf(e[n])<0)return{len:n,token:e.substring(0,n)};return{len:n,token:e}},this.getToken=function(e,t,n){for(var r=t;r<n&&!this.isWhiteSpace(e[r]);)r++;return e.substring(t,r)},this.isMatch=function(t,n){var i=this.skipWhiteSpace(t);return r(t,i)?0:e.startsWith(t.substring(i),n)?i+n.length:0},this.getPitchFromTokens=function(e){var t={};if(t.position={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11}[e[0].token],void 0===t.position)return{warn:"Pitch expected. Found: "+e[0].token};for(e.shift();e.length;)switch(e[0].token){case",":t.position-=7,e.shift();break;case"'":t.position+=7,e.shift();break;default:return t}return t},this.getKeyAccidentals2=function(e){for(var t;e.length>0;){var n;if("^"===e[0].token){if(n="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token){case"^":n="dblsharp",e.shift();break;case"/":n="quartersharp",e.shift()}}else if("="===e[0].token)n="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(n="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token){case"_":n="dblflat",e.shift();break;case"/":n="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===t&&(t=[]),t.push({acc:n,note:e[0].token[0]}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+n+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(e){var t={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var i=null;switch(e[n]){case"^":case"_":case"=":i=e[n];break;default:return{len:0}}if(n++,r(e,n))return{len:1,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[i],note:e[n]}};case"^":case"_":case"/":if(i+=e[n],n++,r(e,n))return{len:2,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[i],note:e[n]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,n){var r=e.indexOf("%",t);for(r>=0&&r<n&&(n=r);t<n&&(" "===e[t]||"\t"===e[t]||""===e[t]);)t++;for(;t<n&&(" "===e[n-1]||"\t"===e[n-1]||""===e[n-1]);)n--;return{start:t,end:n}};var i=function(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"},s=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,t,n,r){var a=this.getMeat(e,t,n);t=a.start,n=a.end;for(var o,c=[];t<n;){if('"'===e[t]){for(o=t+1;o<n&&'"'!==e[o];)o++;c.push({type:"quote",token:e.substring(t+1,o),start:t+1,end:o}),o++}else if(i(e[t])){if(o=t+1,r)for(;o<n&&!this.isWhiteSpace(e[o]);)o++;else for(;o<n&&i(e[o]);)o++;c.push({type:"alpha",token:e.substring(t,o),continueId:s(e[o]),start:t,end:o}),t=o+1}else if("."===e[t]&&s(e[o+1])){o=t+1;for(var l;o<n&&s(e[o]);)o++;l=parseFloat(e.substring(t,o)),c.push({type:"number",token:e.substring(t,o),intt:null,floatt:l,continueId:i(e[o]),start:t,end:o}),t=o+1}else if(s(e[t])||"-"===e[t]&&s(e[o+1])){o=t+1;for(var u,h=null;o<n&&s(e[o]);)o++;if("."===e[o]&&s(e[o+1]))for(o++;o<n&&s(e[o]);)o++;else h=parseInt(e.substring(t,o));u=parseFloat(e.substring(t,o)),c.push({type:"number",token:e.substring(t,o),intt:h,floatt:u,continueId:i(e[o]),start:t,end:o}),t=o+1}else" "===e[t]||"\t"===e[t]||c.push({type:"punct",token:e[t],start:t,end:t+1}),o=t+1;t=o}return c},this.getVoiceToken=function(e,t,n){for(var r=t;r<n&&this.isWhiteSpace(e[r])||"="===e[r];)r++;if('"'===e[r]){var i=e.indexOf('"',r+1);return-1===i||i>=n?{len:1,err:"Missing close quote"}:{len:i-t+1,token:this.translateString(e.substring(r+1,i))}}for(var s=r;s<n&&!this.isWhiteSpace(e[s])&&"="!==e[s];)s++;return{len:s-t+1,token:e.substring(r,s)}};var a={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å",aa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å",AA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~N":"Ñ","~n":"ñ","=s":"š",vs:"š",DH:"Ð",dh:"ð",HO:"Ő",Ho:"ő",HU:"Ű",Hu:"ű","'Y":"Ý","'y":"ý","^Y":"Ŷ","^y":"ŷ",'"Y':"Ÿ",'"y':"ÿ",vS:"Š",vZ:"Ž",vz:"ž"},o={"#":"♯",b:"♭","=":"♮"},c={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:" ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};function l(e){const t=/^(\d+)\./.exec(e);return t?t[1]:null}this.translateString=function(e){var t=e.split("\\");if(1===t.length)return e;var n=null;return t.forEach((function(e){if(null===n)n=e;else{var t=a[e.substring(0,2)];void 0!==t?n+=t+e.substring(2):void 0!==(t=c[e.substring(0,3)])?n+=t+e.substring(3):(t=o[e.substring(0,1)],n+=void 0!==t?t+e.substring(1):"\\"+e)}})),n},this.getNumber=function(e,t){for(var n=0;t<e.length;)switch(e[t]){case"0":n*=10,t++;break;case"1":n=10*n+1,t++;break;case"2":n=10*n+2,t++;break;case"3":n=10*n+3,t++;break;case"4":n=10*n+4,t++;break;case"5":n=10*n+5,t++;break;case"6":n=10*n+6,t++;break;case"7":n=10*n+7,t++;break;case"8":n=10*n+8,t++;break;case"9":n=10*n+9,t++;break;default:return{num:n,index:t}}return{num:n,index:t}},this.getFraction=function(e,t){var n=1,r=1;if("/"!==e[t]){var i=this.getNumber(e,t);n=i.num,t=i.index}if("/"===e[t]){if("/"===e[++t]){for(var s=.5;"/"===e[t++];)s/=2;return{value:n*s,index:t-1}}var a=t,o=this.getNumber(e,t);0===o.num&&a===t&&(o.num=2),0!==o.num&&(r=o.num),t=o.index}return{value:n/r,index:t}};var u=[{match:/,\s*[Tt]he$/,replace:"The "},{match:/,\s*[Aa]$/,replace:"A "},{match:/,\s*[Aa]n$/,replace:"An "}];this.theReverser=function(e){for(var t=0;t<u.length;t++){var n=u[t],r=e.match(n.match);if(r){var i=l(e);i&&(e=(e=e.replace(i+".","")).trim());var s=r[0].length,a=n.replace+e.substring(0,e.length-s);return i&&(a=i+". "+a),a}}return e},this.stripComment=function(t){var n=t.indexOf("%");return n>=0?e.strip(t.substring(0,n)):e.strip(t)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var n=""+t;return{value:t,digits:e.indexOf(n)+n.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var n=""+t;return{value:t,digits:e.indexOf(n)+n.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,n="";if("-"===e[0].token)e.shift(),n="-",t++;else if("number"!==e[0].type)return{used:0};if(n+=e.shift().token,0===e.length)return{used:1,value:parseInt(n)};var r=e.shift();if("."===r.token){if(t++,0===e.length)return{used:t,value:parseInt(n)};if("number"===e[0].type&&(n=n+"."+(r=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(n)};r=e.shift()}switch(r.token){case"pt":case"px":return{used:t+1,value:parseFloat(n)};case"cm":return{used:t+1,value:parseFloat(n)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(n)};default:return e.unshift(r),{used:t,value:parseFloat(n)}}};var h=function(e){return(e=e.replace(/\\n/g,"\n")).replace(/\\"/g,'"')};this.getBrackettedSubstring=function(e,t,n,r){for(var i=r||e[t],s=t+1,a=!1;s<e.length&&(a||e[s]!==i);)a="\\"===e[s],++s;return e[s]===i?[s-t+1,h(e.substring(t+1,s)),!0]:((s=t+n)>e.length-1&&(s=e.length-1),[s-t+1,h(e.substring(t+1,s)),!1])}};return t.prototype.peekLine=function(){return this.lines[this.lineIndex]},t.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex<this.lines.length){var e=this.lines[this.lineIndex];return this.lineIndex++,e}return null},Sh=t}(),s=kg(),a=Tg(),o=Pg();return Yh=function(){var c,l=new a,u=new o(l),h="",d="";function f(e,t,n){e.positioning||(e.positioning={}),e.positioning[t]=n}function p(e,t,n){e.fonts||(e.fonts={}),e.fonts[t]=n}this.getTune=function(){var e={formatting:l.formatting,lines:l.lines,media:l.media,metaText:l.metaText,metaTextInfo:l.metaTextInfo,version:l.version,addElementToEvents:l.addElementToEvents,addUsefulCallbackInfo:l.addUsefulCallbackInfo,getTotalTime:l.getTotalTime,getTotalBeats:l.getTotalBeats,getBarLength:l.getBarLength,getBeatLength:l.getBeatLength,getBeatsPerMeasure:l.getBeatsPerMeasure,getBpm:l.getBpm,getMeter:l.getMeter,getMeterFraction:l.getMeterFraction,getPickupLength:l.getPickupLength,getKeySignature:l.getKeySignature,getElementFromChar:l.getElementFromChar,makeVoicesArray:l.makeVoicesArray,millisecondsPerMeasure:l.millisecondsPerMeasure,setupEvents:l.setupEvents,setTiming:l.setTiming,setUpAudio:l.setUpAudio,deline:l.deline,findSelectableElement:l.findSelectableElement,getSelectableArray:l.getSelectableArray};return l.lineBreaks&&(e.lineBreaks=l.lineBreaks),l.visualTranspose&&(e.visualTranspose=l.visualTranspose),e};var m,g,v={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||(this[e].face!==t[e].face||(this[e].size!==t[e].size||(this[e].style!==t[e].style||this[e].weight!==t[e].weight)))},addFormattingOptions:function(e,t,n){"note"===n?("auto"!==this.vocalPosition&&f(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&p(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&p(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&p(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&p(e,"tripletfont",this.tripletfont)):"bar"===n&&("auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&p(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&p(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e<this.inTie.length;e++)if(this.endingHoldOver.inTie.push([]),this.inTie[e])for(var t=0;t<this.inTie[e].length;t++)this.endingHoldOver.inTie[e].push(this.inTie[e][t]);for(var n in this.inTieChord)this.inTieChord.hasOwnProperty(n)&&(this.endingHoldOver.inTieChord[n]=this.inTieChord[n])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var e=0;e<this.endingHoldOver.inTie.length;e++){this.inTie.push([]);for(var t=0;t<this.endingHoldOver.inTie[e].length;t++)this.inTie[e].push(this.endingHoldOver.inTie[e][t])}for(var n in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(n)&&(this.inTieChord[n]=this.endingHoldOver.inTieChord[n])}}},b=function(e){var t=e.replace(/\x12/g," ");return(t=(t=t.replace(/&/g,"&")).replace(/</g,"<")).replace(/>/g,">")},y=function(e,t,n){t||(t=" ");var r=t[n];" "!==r&&r||(r="SPACE");var i,s=b(t.substring(n-64,n))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+r+"</span>"+b(t.substring(n+1).substring(0,64));!function(e){v.warnings||(v.warnings=[]),v.warnings.push(e)}("Music Line:"+c.lineIndex+":"+(n+1)+": "+e+": "+s),i={message:e,line:t,startChar:v.iChar+n,column:n},v.warningObjects||(v.warningObjects=[]),v.warningObjects.push(i)};this.getWarnings=function(){return v.warnings},this.getWarningObjects=function(){return v.warningObjects};var _=function(t,n){if(n.indexOf("")>=0)h+=n;else if(n=h+n,h="",t){"-"!==(n=e.strip(n))[n.length-1]&&(n+=" ");for(var r=[],i=0,s=!1,a=function(t){var a=e.strip(n.substring(i,t));if(a=a.replace(/\\([-_*|~])/g,"$1"),i=t+1,a.length>0){s&&(a=a.replace(/~/g," "));var o=n[t];return"_"!==o&&"-"!==o&&(o=" "),r.push({syllable:c.translateString(a),divider:o}),s=!1,!0}return!1},o=!1,l=0;l<n.length;l++){switch(n[l]){case" ":case"":a(l);break;case"-":!o&&!a(l)&&r.length>0&&(e.last(r).divider="-",r.push({skip:!0,to:"next"}));break;case"_":o||(a(l),r.push({skip:!0,to:"slur"}));break;case"*":o||(a(l),r.push({skip:!0,to:"next"}));break;case"|":o||(a(l),r.push({skip:!0,to:"bar"}));break;case"~":o||(s=!0)}o="\\"===n[l]}t.forEach((function(e){if(0!==r.length)if(r[0].skip){switch(r[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&r.shift();break;case"bar":"bar"===e.el_type&&r.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=r.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add words before the first line of music",t,0)},w=function(t,n){if(n.indexOf("")>=0)d+=n;else if(n=d+n,d="",t){"-"!==(n=e.strip(n))[n.length-1]&&(n+=" ");for(var r=[],i=0,s=!1,a=function(t){var a=e.strip(n.substring(i,t));if(i=t+1,a.length>0){s&&(a=a.replace(/~/g," "));var o=n[t];return"_"!==o&&"-"!==o&&(o=" "),r.push({syllable:c.translateString(a),divider:o}),s=!1,!0}return!1},o=0;o<n.length;o++)switch(n[o]){case" ":case"":a(o);break;case"-":!a(o)&&r.length>0&&(e.last(r).divider="-",r.push({skip:!0,to:"next"}));break;case"_":a(o),r.push({skip:!0,to:"slur"});break;case"*":a(o),r.push({skip:!0,to:"next"});break;case"|":a(o),r.push({skip:!0,to:"bar"});break;case"~":s=!0}t.forEach((function(e){if(0!==r.length)if(r[0].skip)switch(r[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&r.shift();break;case"bar":"bar"===e.el_type&&r.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=r.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add symbols before the first line of music",t,0)},x=function(n){if(e.startsWith(n,"%%")){var r=t.addDirective(n.substring(2));r&&y(r,n,2)}else{var i=n.indexOf("%");if(i>=0&&(n=n.substring(0,i)),0!==(n=n.replace(/\s+$/,"")).length)if(h)_(u.getCurrentVoice(),n.substring(2));else if(d)w(u.getCurrentVoice(),n.substring(2));else if(n.length<2||":"!==n[1]||g.lineContinuation)g.parseMusic(n);else{var s=m.parseHeader(n);s.regular&&g.parseMusic(n),s.newline&&g.startNewLine(),s.words&&_(u.getCurrentVoice(),n.substring(2)),s.symbols&&w(u.getCurrentVoice(),n.substring(2))}}};function k(e,t){e.push({el_type:"hint"});for(var n=0;n<t.length;n++){var r=t[n],i=Object.assign({},r);if(e.push(i),"bar"===r.el_type)return}}function S(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(i)for(var s=0;s<i.voices.length;s++){var a=i.voices[s],o=r.voices[s];o&&k(o,a)}}}this.parse=function(a,o,f){o||(o={}),f||(f=0),l.reset();var p=(a=a.replace(/\r\n?/g,"\n")+"\n").split("\n\\");if(p.length>1){for(var b=1;b<p.length;b++)for(;p[b].length>0&&"\n"!==p[b][0];)p[b]=p[b].substr(1),p[b-1]+=" ";a=p.join(" ")}var k=(a=a.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,n){return t+""+(n?Array(n.length+1).join(" "):"")+"\n"}))).split("\n");0===e.last(k).length&&k.pop(),c=new i(k,v),m=new n(c,y,v,l,u),g=new r(c,y,v,l,u,m),o.print&&(l.media="print"),v.reset(),v.iChar=f,o.visualTranspose?(v.globalTranspose=parseInt(o.visualTranspose),0===v.globalTranspose?v.globalTranspose=void 0:u.setVisualTranspose(o.visualTranspose)):v.globalTranspose=void 0,o.lineBreaks&&(v.lineBreaks=o.lineBreaks),m.reset(c,y,v,l);try{o.format&&t.globalFormatting(o.format);for(var C=c.nextLine();C;){if(o.header_only&&!1===v.is_in_header)throw"normal_abort";if(o.stop_on_warning&&v.warnings)throw"normal_abort";var M=v.is_in_header;x(C),M&&!v.is_in_header&&(u.setRunningFont("annotationfont",v.annotationfont),u.setRunningFont("gchordfont",v.gchordfont),u.setRunningFont("tripletfont",v.tripletfont),u.setRunningFont("vocalfont",v.vocalfont)),C=c.nextLine()}h&&_(u.getCurrentVoice(),""),d&&w(u.getCurrentVoice(),""),v.openSlurs=u.cleanUp(v.barsperstaff,v.staffnonote,v.openSlurs)}catch(A){if("normal_abort"!==A)throw A}var E=792,T=612;switch(v.papersize){case"legal":E=1008,T=612;break;case"A4":E=842.4,T=597.6}if(v.landscape){var P=E;E=T,T=P}l.formatting.pagewidth||(l.formatting.pagewidth=T),l.formatting.pageheight||(l.formatting.pageheight=E),o.hint_measures&&function(){for(var e=0;e<l.lines.length;e++){var t=l.lines[e].staff;if(t){for(var n=e+1;n<l.lines.length&&void 0===l.lines[n].staff;)n++;n<l.lines.length&&S(t,l.lines[n].staff)}}}(),s.wrapLines(l,v.lineBreaks,v.barNumbers)}}}function Ng(){if(Xh)return Qh;Xh=1;var e=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return e.prototype.addChild=function(e){if("bar"===e.type){for(var t=!0,n=0;t&&n<this.children.length;n++)this.children[n].type.indexOf("staff-extra")<0&&"tempo"!==this.children[n].type&&(t=!1);t||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=e,this.setRange(e)},e.prototype.setLimit=function(e,t){var n=t.specialY;n||(n=t),n[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],n[e]):this.specialY[e]=n[e])},e.prototype.adjustRange=function(e){void 0!==e.bottom&&(this.bottom=Math.min(this.bottom,e.bottom)),void 0!==e.top&&(this.top=Math.max(this.top,e.top))},e.prototype.setRange=function(e){this.adjustRange(e),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},e.prototype.addOther=function(e){this.otherchildren.push(e),this.setRange(e)},e.prototype.addBeam=function(e){this.beams.push(e)},e.prototype.setWidth=function(e){this.w=e},Qh=e}function Ig(){if(Jh)return Zh;Jh=1;return Zh=function(e,t,n,r){if(e)for(var i=0;i<e.length;i++){var s=e[i],a=s.getAttribute("highlight");a||(a="fill"),s.setAttribute(a,r);var o=s.getAttribute("class");o||(o=""),o=(o=o.replace(n,"")).replace(t,""),t.length>0&&(o.length>0&&" "!==o[o.length-1]&&(o+=" "),o+=t),s.setAttribute("class",o)}}}function Og(){if(td)return ed;td=1;var e=Ig();return ed=function(t,n){void 0===t&&(t="abcjs-note_selected"),void 0===n&&(n="#ff0000"),e(this.elemset,t,"",n)}}function Dg(){if(rd)return nd;rd=1;var e=Ig();return nd=function(t,n){void 0===t&&(t="abcjs-note_selected"),void 0===n&&(n="#000000"),e(this.elemset,"",t,n)}}function Lg(){if(sd)return id;sd=1;var e=Og(),t=Dg(),n=function(e,t,n,r,i,s){s||(s={}),this.tuneNumber=i,this.abcelem=e,this.duration=t,this.durationClass=s.durationClassOveride?s.durationClassOveride:this.duration,this.minspacing=n||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=r,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return n.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},n.prototype.addExtra=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top),void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom),e.dx<this.extraw&&(this.extraw=e.dx),this.extra[this.extra.length]=e,this._addChild(e)},n.prototype.addHead=function(e){e.dx<this.extraw&&(this.extraw=e.dx),this.heads[this.heads.length]=e,this.addRight(e)},n.prototype.addRight=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0!==e.top&&(void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top)),void 0!==e.bottom&&(void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom)),e.dx+e.w>this.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},n.prototype.addFixed=function(e){this._addChild(e)},n.prototype.addFixedX=function(e){this._addChild(e)},n.prototype.addCentered=function(e){var t=e.w/2;-t<this.extraw&&(this.extraw=-t),this.extra[this.extra.length]=e,e.dx+t>this.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},n.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},n.prototype._addChild=function(e){var t=!0;"clef"==this.abcelem.el_type&&"barNumber"==e.type&&(t=!1),e.parent=this,this.children[this.children.length]=e,t&&this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},n.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},n.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},n.prototype.setX=function(e){this.x=e;for(var t=0;t<this.children.length;t++)this.children[t].setX(e)},n.prototype.center=function(e,t){var n=(t.x-e.x)/2+e.x;this.x=n-this.w/2;for(var r=0;r<this.children.length;r++)this.children[r].setX(this.x)},n.prototype.setHint=function(){this.hint=!0},n.prototype.highlight=function(t,n){e.bind(this)(t,n)},n.prototype.unhighlight=function(e,n){t.bind(this)(e,n)},id=n}function Bg(){if(od)return ad;od=1;var e=function(e,t,n,r,i){switch(i=i||{},this.x=0,this.c=e,this.dx=t,this.w=n,this.pitch=r,this.scalex=i.scalex||1,this.scaley=i.scaley||1,this.type=i.type||"symbol",this.pitch2=i.pitch2,this.linewidth=i.linewidth,this.klass=i.klass,this.anchor=i.anchor?i.anchor:"middle",this.top=r,void 0!==this.pitch2&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=r,void 0!==this.pitch2&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),i.thickness&&(this.top+=i.thickness/2,this.bottom-=i.thickness/2),i.stemHeight&&(i.stemHeight>0?this.top+=i.stemHeight:this.bottom+=i.stemHeight),i.dim&&(this.dim=i.dim),i.position&&(this.position=i.position),this.height=i.height?i.height:4,i.top&&(this.top=i.top),i.bottom&&(this.bottom=i.bottom),i.name?this.name=i.name:this.c?this.name=this.c:this.name=this.type,i.realWidth?this.realWidth=i.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":i.position&&"below"===i.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};return e.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e="chord"===this.type?this.realWidth/2:0,t=this.x-e-0;return{left:t,right:t+this.realWidth+0}},e.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},e.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},e.prototype.getLane=function(){return void 0===this.lane?0:this.lane},e.prototype.setX=function(e){this.x=e+this.dx},ad=e}function Vg(){if(hd)return ud;hd=1;var e=Ng(),t=function(){if(ld)return cd;ld=1;var e=Lg(),t=Bg();function n(e,t){for(var n in t)t.hasOwnProperty(n)&&(Array.isArray(t[n])||null!=(r=t[n])&&r.constructor===Object||(e[n]=t[n]));var r}function r(t){var r=new e("",0,0,"",0);return n(r,t),r.top=0,r.bottom=-1,t.abcelem&&(r.abcelem={},n(r.abcelem,t.abcelem),"note"===r.abcelem.el_type&&(r.abcelem.el_type="tabNumber")),t.cloned=r,r}function i(e,i){var s=r(e);if(i)for(var a=e.children,o=!0,c=0;c<a.length;c++){var l=a[c],u=new t("",0,0,0,"");n(u,l),o=i.tablature.setRelative(l,u,o),s.children.push(u)}return s}function s(n,r,i){var s="tab.tiny",a=7.5;n.isTabBig&&(s="tab.big",a=10);var o={el_type:"tab",icon:s,Ypos:a};if(a+=n.tabSymbolOffset,!n.hideTabSymbol){var c=new e(o,0,0,"symbol",0);c.x=r;var l=new t(s,0,0,7.5,"tab");l.x=i,c.children.push(l),"tab"==c.abcelem.el_type&&(l.pitch=a)}return c}function a(e){if(e.extra)for(var t=0;t<e.extra.length;t++){var n=e.extra[t];if("lyric"==n.type)return{bottom:n.bottom,height:n.height}}return null}function o(){this.accidentals=null}function c(e,n,r,i,s){var a=i.num;null!=i.note.quarter&&(a=a.toString(),a+=i.note.quarter);var o=e.semantics.stringToPitch(i.str);r.notes.push({num:a,str:i.str,pitch:i.note.emit()});var c=new t(a,0,0,o+.3,{type:"tabNumber"});return c.x=n,c.isGrace=s,c.isAltered=i.note.isAltered,c}function l(e,t){var n=0;if(e.extra)for(var r=0;r<e.extra.length;r++)if(e.extra[r].c.indexOf("noteheads")>=0){if(n===t)return e.extra[r].x+e.extra[r].w/2;n++}return-1}function u(e){if(e.abcelem){var t=e.abcelem;if(t.rest)return t.gracenotes}return null}function h(e,t,n){var r=e.semantics.notesToNumber(t,n);if(r.error)return e.setError(r.error),r;if(r.graces&&r.notes){var i=r.notes.length-1;r.notes[i].graces=r.graces}return r}function d(e,t,n,r,i){for(var s=0;s<r.length;s++){var a={el_type:"note",startChar:n.abcelem.startChar,endChar:n.abcelem.endChar,notes:[],grace:!0},o=c(e,l(n,s),a,r[s],!0);t.children.push(o),i.push(a)}}return o.prototype.build=function(e,t,n,o,f,p,m){!function(e){for(var t=0;t<e.length;t++)e[t].tabNameInfos||0}(t);var g=t[f+o],v=t[m],b=null,y=null;"clef"!=g.children[0].abcelem.el_type&&"none"!=p&&g.children.splice(0,0,p);for(var _=0;_<g.children.length;_++){var w=g.children[_],x=w.x,k=x;switch(w.isClef&&(v.children.push(s(e,x,k)),w.abcelem.type.indexOf("-8")>=0&&(e.semantics.clefTranspose=-12),w.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),w.type){case"staff-extra key-signature":this.accidentals=w.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var S=!1;_===g.children.length-1&&(S=!0);var C=i(w,e);if(C.abcelem.barNumber){delete C.abcelem.barNumber;for(var M=0;M<C.children.length;M++)if("barNumber"===C.children[M].type){C.children.splice(M,1);break}}C.abcelem.lastBar=S,v.children.push(C),n.push({el_type:w.abcelem.el_type,type:w.abcelem.type,endChar:w.abcelem.endChar,startChar:w.abcelem.startChar,abselem:C});break;case"rest":var E=u(w);if(E){if((b=h(e,null,E)).error)return;L={el_type:"note",startChar:w.abcelem.startChar,endChar:w.abcelem.endChar,notes:[],grace:!0},d(e,T,w,b.graces,n)}break;case"note":var T=r(w);T.x=w.heads[0].x+w.heads[0].w/2,T.lyricDim=a(w);var P=w.abcelem.pitches,A=w.abcelem.gracenotes;if(T.type="tabNumber",(b=h(e,P,A)).error)return;if(b.graces){var N=b.notes.length-1;b.notes[N].graces=b.graces}y={el_type:"note",startChar:w.abcelem.startChar,endChar:w.abcelem.endChar,notes:[]};for(var I=0;I<b.notes.length;I++){var O=b.notes[I];if(O.graces)for(var D=0;D<O.graces.length;D++){var L={el_type:"note",startChar:w.abcelem.startChar,endChar:w.abcelem.endChar,notes:[],grace:!0},B=c(e,l(w,D),L,O.graces[D],!0);T.children.push(B),n.push(L)}var V=c(e,T.x+w.heads[I].dx,y,O,!1);T.children.push(V)}y.notes.length>0&&(y.abselem=T,n.push(y),v.children.push(T))}}},cd=o}(),n=Sg();function r(e,t,n){var r=e.semantics,i=t.controller.getTextSize,s=r.tabInfos(e),a=!0;if(r.suppress(e)&&(a=!1),a){var o=i.calc(s,"tablabelfont","text instrumentname");return n.tabNameInfos={textSize:{height:o.height,width:o.width},name:s},o.height}return 0}function i(e,t){return!!t[e].isTabStaff&&(e===t.length-1||!t[e+1].isTabStaff)}function s(e,t){for(var n=t;n>=0;n--)if(!e[n].isTabStaff)return n;return-1}function a(e,t){return"clef"===e[t].children[0].abcelem.el_type?null:0==t?"none":e[t-1].children[0]}return ud=function(o,c,l,u){var h=new t,d={clef:{type:"TAB"}},f=o.linePitch*o.nbLines,p=l.staff;if(p){var m=p[0];if(m&&m.clef&&0==m.clef.stafflines)return void o.setError("No tablatures when stafflines=0");p.splice(p.length,0,d)}var g=l.staffGroup,v=g.voices,b=function(e){for(var t=0,n=0;n<e.children.length;n++){var r=e.children[n];r.specialY&&r.specialY.lyricHeightBelow>t&&(t=r.specialY.lyricHeightBelow)}return t}(v[0]),y=u,_=g.staffs[y],w=f+3-_.bottom-b;_.isTabStaff&&(w=_.top);var x={bottom:-1,isTabStaff:!0,specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0},lines:o.nbLines,linePitch:o.linePitch,dy:.15,top:w},k=function(e,t){for(var n=0,r=0,s=0;;){if(!t[n])return-1;if(t[n].isTabStaff||(s=t[n].voices.length),t[n].isTabStaff){if(r++,i(n,t)&&r<s)return n+1}else if(r=0,n>=e){if(n+1==t.length)return n+1;if(!t[n+1].isTabStaff)return n+1}if(++n>t.length)return-1}}(u,g.staffs);if(-1!==k){x.parentIndex=k-1,g.staffs.splice(k,0,x),g.height+=f+3;var S=function(e,t){for(var n=t;n>=0;n--)if(!e[n].isTabStaff)return e[n];return null}(g.staffs,k),C=1;(function(e,t){return 1===function(e){for(var t=0,n=0;n<e.length;n++)e[n].isTabStaff||t++;return t}(e)&&t.voices.length>1})(g.staffs,S)&&(C=S.voices.length),d.voices=[];for(var M=0;M<C;M++){var E=new e(0,0);M>0&&(E.duplicate=!0);var T=r(o,c,E)/n.STEP;T=Math.max(T,1),g.staffs[u].top+=1,g.height+=T,E.staff=x;var P=v.length;v.splice(v.length,0,E);var A=a(v,M+u);d.voices[M]=[],h.build(o,v,d.voices[M],M,u,A,P)}!function(e){for(var t=0;t<e.length;t++)if(e[t].isTabStaff){var n=s(e,t);e[t].hasStaff=e[n],e[n].hasTab||(e[n].hasTab=[]),e[n].hasTab.push(e[t])}}(g.staffs)}}}function Rg(){if(fd)return dd;fd=1;var e={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},t=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];return dd={noteToMidi:function(n){var r=n.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(r&&5===r.length){var i=e[r[1]];return 48+t.indexOf(r[2])+i+12*(r[4].length-r[3].length)}return 0},midiToNote:function(e){e=parseInt(e,10);var n=Math.floor(e/12),r=e%12,i=t[r];if("-"===i&&(i="^"+t[r-1]),n>4)for(i=i.toLowerCase(),n-=5;n>0;)i+="'",n--;else for(;n<4;)i+=",",n++;return i}}}function Fg(){if(md)return pd;md=1;var{noteToMidi:e,midiToNote:t}=Rg();function n(n,r){var i=e(n);r&&(i+=r);var s,a=t(i),o=!1,c=!1,l=null,u=null,h=!1,d=0;n.startsWith("_")?(o=!0,d=-1,"/"==n[1]?(o=!1,u="v",d=0):"_"==n[1]&&(h=!0,d-=1)):n.startsWith("^")?(c=!0,d=1,"/"==n[1]?(c=!1,u="^",d=0):"^"==n[1]&&(h=!0,d+=1)):n.startsWith("=")&&(l=!0,d=0),((s=o||c||null!=u)||l)&&(a=null!=u||h?n.slice(2):n.slice(1));var f=(a.match(/,/g)||[]).length,p=(a.match(/'/g)||[]).length;this.pitch=i,this.pitchAltered=0,this.name=a,this.acc=d,this.isSharp=c,this.isKeySharp=!1,this.isDouble=h,this.isAltered=s,this.isFlat=o,this.isKeyFlat=!1,this.natural=l,this.quarter=u,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=p}return n.prototype.sameNoteAs=function(e){return e.pitch===this.pitch},n.prototype.isLowerThan=function(e){return e.pitch>this.pitch},n.prototype.checkKeyAccidentals=function(e,t){if(!this.isAltered&&!this.natural)if(t[this.name.toUpperCase()])switch(t[this.name.toUpperCase()]){case"__":return this.acc=-2,void(this.pitchAltered=-2);case"_":return this.acc=-1,void(this.pitchAltered=-1);case"=":return this.acc=0,void(this.pitchAltered=0);case"^":return this.acc=1,void(this.pitchAltered=1);case"^^":return this.acc=2,void(this.pitchAltered=2)}else if(e)for(var n=this.name,r=0;r<e.length;r++){var i=e[r];n==i.note.toUpperCase()&&("flat"==i.acc&&(this.acc=-1,this.isKeyFlat=!0,this.pitchAltered=-1),"sharp"==i.acc&&(this.acc=1,this.isKeySharp=!0,this.pitchAltered=1))}},n.prototype.getAccidentalEquiv=function(){var e,t,r=((t=new n((e=this).name)).pitch=e.pitch,t.hasComma=e.hasComma,t.isLower=e.isLower,t.isQuoted=e.isQuoted,t.isSharp=e.isSharp,t.isKeySharp=e.isKeySharp,t.isFlat=e.isFlat,t.isKeyFlat=e.isKeyFlat,t);return r.isSharp||r.isKeySharp?((r=r.nextNote()).isFlat=!0,r.isSharp=!1,r.isKeySharp=!1):(r.isFlat||r.isKeyFlat)&&((r=r.prevNote()).isSharp=!0,r.isFlat=!1,r.isKeyFlat=!1),r},n.prototype.nextNote=function(){return new n(t(this.pitch+1+this.pitchAltered))},n.prototype.prevNote=function(){return new n(t(this.pitch-1+this.pitchAltered))},n.prototype.emitNoAccidentals=function(){var e=this.name;this.isLower&&(e=e.toLowerCase());for(var t=0;t<this.isQuoted;t++)e+="'";for(var n=0;n<this.hasComma;n++)e+=",";return e},n.prototype.emit=function(){var e=this.name;(this.isSharp||this.isKeySharp)&&(e="^"+e,this.isDouble&&(e="^"+e)),(this.isFlat||this.isKeyFlat)&&(e="_"+e,this.isDouble&&(e="_"+e)),this.quarter&&(e="^"==this.quarter?"^/"+e:"_/"+e),this.natural&&(e="="+e);for(var t=1;t<=this.hasComma;t++)e+=",";if(this.isLower){e=e.toLowerCase();for(var n=1;n<=this.isQuoted;n++)e+="'"}return e},pd=n}function zg(){if(yd)return bd;yd=1;const{noteToMidi:e}=Rg();var t=Fg(),n=function(){if(vd)return gd;vd=1;var e=Fg(),t=["A","B","C","D","E","F","G"];return gd=function(n,r){var i=new e(n),s=new e(r);if(s.isLowerThan(i)){var a=i.emit();return{error:"Invalid string Instrument tuning : "+s.emit()+" string lower than "+a+" string"}}var o=[],c=t.indexOf(i.name),l=t.indexOf(s.name);if(-1==c||-1==l)return o;for(var u=!1;!u;)o.push(i.emit()),(i=i.nextNote()).sameNoteAs(s)&&(u=!0);return o}}();function r(e,n){for(var r=[],a=0;a<n.length;a++)if(!n[a].endTie){var o=new t(n[a].name,e.clefTranspose);o.checkKeyAccidentals(e.accidentals,e.measureAccidentals);var c=s(e,o);r.push(c)}return function(e,t){for(var n=0;n<t.length-1;n++){var r=t[n],s=t[n+1];if(r.str==s.str){if(r.str==e.strings.length-1)return r.num="?",void(s.num="?");s.num<r.num?(s.str++,s=i(e,s.note,s.str,e.secondPos,e.strings[s.str].length)):(r.str++,r=i(e,r.note,r.str,e.secondPos,e.strings[r.str].length)),t[n]=r,t[n+1]=s}}}(e,r),r}function i(e,t,n,r,i){var s=e.strings;t.checkKeyAccidentals(e.accidentals,e.measureAccidentals),r&&(s=r);var a=t.emitNoAccidentals(),o=s[n].indexOf(a),c=t.acc;if(-1!=o){if(r&&(o+=i),(t.isFlat||-1==t.acc)&&0==o){var l=t.getAccidentalEquiv();o=s[++n].indexOf(l.emit()),c=0}return{num:o+c,str:n,note:t}}return null}function s(e,t){var n;(t.isAltered||t.natural)&&(t.isFlat?n=t.isDouble?"__":"_":t.isSharp?n=t.isDouble?"^^":"^":t.natural&&(n="="),e.measureAccidentals[t.name.toUpperCase()]=n);for(var r=e.stringPitches.length-1;r>=0;r--)if(t.pitch+t.pitchAltered>=e.stringPitches[r]){var i=t.pitch+t.pitchAltered-e.stringPitches[r];return"^"===t.quarter?i-=.5:"v"===t.quarter&&(i+=.5),{num:Math.round(i),str:e.stringPitches.length-1-r,note:t}}return{num:"?",str:e.stringPitches.length-1,note:t}}function a(e,t){var n={num:"?",str:0,note:t};e.push(n),e.error=t.emit()+": unexpected note for instrument"}function o(r){var i=r.tuning,s=r.capo,a=r.params.highestNote;this.linePitch=r.linePitch,this.highestNote="a'",a&&(this.highestNote=a),this.measureAccidentals={},this.capo=0,s&&(this.capo=parseInt(s,10)),this.transpose=r.transpose?r.transpose:0,this.tuning=i,this.stringPitches=[];for(var o=0;o<this.tuning.length;o++){var c=e(this.tuning[o])+this.capo;this.stringPitches.push(c)}if(this.capo>0&&(this.capoTuning=function(e){var n=null,r=e.tuning;if(e.capo>0){n=[];for(var i=0;i<r.length;i++){for(var s=new t(r[i]),a=0;a<e.capo;a++)s=s.nextNote();n[i]=s.emit()}}return n}(this)),this.strings=function(e){var t=[],r=e.tuning;e.capo>0&&(r=e.capoTuning);for(var i=r.length-1,s=0;s<r.length;s++){var a=e.highestNote;s!=r.length-1&&(a=r[s+1]);var o=n(r[s],a);if(o.error)return o;t[i--]=o}return t}(this),this.strings.error)return r.setError(this.strings.error),void(r.inError=!0);this.secondPos=function(e){var t=[];t[0]=[];for(var n=e.strings,r=1;r<n.length;r++)t[r]=n[r-1];return t}(this)}return o.prototype.stringToPitch=function(e){return 5.3+(this.strings.length-1-e)*this.linePitch},o.prototype.notesToNumber=function(e,n){var i,o,c=null,l=null;if(e&&(l=[],e.length>1?(l=r(this,e)).error&&(c=l.error):e[0].endTie||((i=new t(e[0].name,this.clefTranspose)).checkKeyAccidentals(this.accidentals,this.measureAccidentals),(o=s(this,i))?l.push(o):(a(l,i),c=l.error))),c)return l;var u=null;if(n){u=[];for(var h=0;h<n.length;h++)(i=new t(n[h].name,this.clefTranspose)).checkKeyAccidentals(this.accidentals,this.measureAccidentals),(o=s(this,i))?u.push(o):(a(u,i),c=l.error)}return{notes:l,graces:u,error:c}},o.prototype.toString=function(){for(var e=[],t=0;t<this.tuning.length;t++){var n=this.tuning[t].replaceAll(",","").replaceAll("'","").toUpperCase();"_"===n[0]?n=n[1]+"b ":"^"===n[0]&&(n=n[1]+"# "),e.push(n)}return e.join("")},o.prototype.tabInfos=function(e){var t=e.params.label;if(t){var n="";return-1!=t.indexOf("%T")&&(n=this.toString(),e.capo>0&&(n+=" capo:"+e.capo),t=t.replace("%T",n)),t}return""},o.prototype.suppress=function(e){return!!e.params.suppress},bd=o}function jg(){if(wd)return _d;wd=1;var e=function(){if(Kh)return $h;function e(e,t){this.numLines=e,this.lineSpace=t,this.verticalSize=this.numLines*this.lineSpace,this.bar={pitch:3,pitch2:t*e,height:5}}return Kh=1,e.prototype.bypass=function(e){var t=e.staffGroup.voices;return!!(t.length>0&&t[0].isPercussion)},e.prototype.setRelative=function(e,t,n){switch(e.type){case"bar":t.pitch=this.bar.pitch,t.pitch2=this.bar.pitch2,t.height=this.height;break;case"symbol":var r=this.bar.pitch2/2;if("dots.dot"==e.name)return n?(t.pitch=r,!1):(t.pitch=r+this.lineSpace,!0)}return n},$h=e}(),t=Vg(),n=zg();function r(){}r.prototype.init=function(t,r,i,s){this.tune=t,this.params=i,this.tuneNumber=r,this.inError=!1,this.abcTune=t,this.linePitch=3,this.nbLines=s.defaultTuning.length,this.isTabBig=s.isTabBig,this.tabSymbolOffset=s.tabSymbolOffset,this.capo=i.capo,this.transpose=i.visualTranspose,this.hideTabSymbol=i.hideTabSymbol,this.tablature=new e(this.nbLines,this.linePitch);var a=i.tuning;a||(a=s.defaultTuning),this.tuning=a,this.semantics=new n(this)},r.prototype.setError=function(e){e&&(this.error=e,this.inError=!0,this.tune.warnings?this.tune.warnings.push(e):this.tune.warnings=[e])},r.prototype.render=function(e,n,r){this.inError||this.tablature.bypass(n)||t(this,e,n,r)};return _d=function(){return{name:"StringTab",tablature:r}}}function qg(){if(kd)return xd;kd=1;var e=jg(),t={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}};return xd={inited:!1,plugins:{},register:function(e){var t=e.name,n=e.tablature;this.plugins[t]=n},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(n,r,i){this.inited||(this.register(new e),this.inited=!0);var s=null;if(i.tablature){var a=i.tablature;s=[];for(var o=0;o<a.length;o++){var c=a[o],l=c.instrument;if(null==l)return this.setError(n,"tablature 'instrument' is missing"),s;var u=t[l],h=null;if(u&&(h=this.plugins[u.name]),h){0!=i.visualTranspose&&(c.visualTranspose=i.visualTranspose),c.abcSrc=i.tablature.abcSrc;var d={classz:h,tuneNumber:r,params:c,instance:null,tabType:u};s.push(d)}else{if(""!==l)return this.setError(n,"Undefined tablature plugin: "+l),s;s.push(null)}}}return s},layoutTablatures:function(e,t){var n=t.tablatures,r=0;if(n&&n.length>0)for(var i=n.length,s=0;s<i;++s)n[s]&&n[s].params.firstStaffOnly&&(n[s].params.suppress=!1);for(var a=0;a<t.lines.length;a++){var o=t.lines[a];if(o.staff&&r++,r>1&&n&&n.length>0)for(i=n.length,s=0;s<i;++s)n[s].params.firstStaffOnly&&(n[s].params.suppress=!0);var c=o.staff;if(c)for(var l=c.length,u=0;u<c.length;u++)if(n[u]&&u<l){var h=n[u];null==h.instance&&(h.instance=new h.classz,h.instance.init(t,h.tuneNumber,h.params,h.tabType)),h.instance.render(e,o,u)}}}}}function Hg(){if(Cd)return Sd;Cd=1;var e=Ag(),t=function(){if(Wh)return Gh;Wh=1;var e=fh();return Gh=function(t){for(var n="",r=t.match(/(\s*)/),i=(t=e.strip(t)).split("\nX:"),s=1;s<i.length;s++)i[s]="X:"+i[s];var a=r?r[0].length:0,o=[];i.forEach((function(e){o.push({abc:e,startPos:a}),a+=e.length+1})),o.length>1&&!e.startsWith(o[0].abc,"X:")&&o.shift().abc.split("\n").forEach((function(t){e.startsWith(t,"%%")&&(n+=t+"\n")}));var c=n;return o.forEach((function(t){var r=t.abc.indexOf("\n\n");r>0&&(t.abc=t.abc.substring(0,r)),t.pure=t.abc,t.abc=n+t.abc,t.title="";var i=t.pure.split("T:");i.length>1&&(i=i[1].split("\n"),t.title=e.strip(i[0]));var s=t.pure.substring(2,t.pure.indexOf("\n"));t.id=e.strip(s)})),{header:c,tunes:o}}}(),n=qg(),r={};return function(){r.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var i=r.TuneBook=function(e){var n=t(e);this.header=n.header,this.tunes=n.tunes};i.prototype.getTuneById=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].id===""+e)return this.tunes[t];return null},i.prototype.getTuneByTitle=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].title===e)return this.tunes[t];return null},r.parseOnly=function(e,t){for(var n=r.numberOfTunes(e),i=[],s=0;s<n;s++)i.push(1);return r.renderEngine((function(){}),i,e,t)},r.renderEngine=function(t,r,s,a){var o=[];if(void 0!==r&&void 0!==s){var c;(!(c=r)||c.propertyIsEnumerable("length")||"object"!=typeof c||"number"!=typeof c.length)&&(r=[r]),void 0===a&&(a={});for(var l=a.startingTune?parseInt(a.startingTune,10):0,u=new i(s),h=new e,d=0;d<r.length;d++){var f=r[d];if("*"===f||"string"==typeof f&&(f=document.getElementById(f)),f)if(l>=0&&l<u.tunes.length){h.parse(u.tunes[l].abc,a,u.tunes[l].startPos-u.header.length);var p=h.getTune();a.tablature&&(p.tablatures=n.preparePlugins(p,l,a));var m=h.getWarnings();m&&(p.warnings=m);var g=t(f,p,d,u.tunes[l].abc);o.push(g||p)}else f.innerHTML&&(f.innerHTML="");l++}return o}},r.extractMeasures=function(e){for(var t=[],n=new i(e),s=0;s<n.tunes.length;s++){for(var a=n.tunes[s],o=a.abc.split("K:"),c=o[1].split("\n"),l=o[0]+"K:"+c[0]+"\n",u=null,h=null,d=null,f=[],p=!1,m=r.parseOnly(a.abc)[0],g=m.getPickupLength()>0,v=0;v<m.lines.length;v++){var b=m.lines[v];if(b.staff)for(var y=0;y<1;y++)for(var _=b.staff[y],w=0;w<1;w++)for(var x=_.voices[w],k=0;k<x.length;k++){var S=x[k];if(null===d&&S.startChar>=0&&(d=S.startChar,h=void 0===S.chord?u:null),S.chord&&(u=S),"bar"===S.el_type){if(p){var C={abc:a.abc.substring(d,S.endChar)};(u=h&&h.chord&&h.chord.length>0?h.chord[0].name:null)&&(C.lastChord=u),S.startEnding&&(C.startEnding=S.startEnding),S.endEnding&&(C.endEnding=S.endEnding),f.push(C),d=null,p=!1}}else"note"===S.el_type&&(p=!0)}}t.push({header:l,measures:f,hasPickup:g})}return t}}(),Sd=r}function Yg(){if(Ed)return Md;Ed=1;var e,t=vh(),{relativeMajor:n,transposeKey:r,relativeMode:i}=gh(),s=mh();return function(){function a(e,t,n){var r=[],i=t.getKeySignature();if("Hp"===i.root||"HP"===i.root)return r;r=r.concat(function(e,t){for(var n=[],r=e.split("K:"),i=r[0].length,s=1;s<r.length;s++){var a=r[s],o=a.match(/^( *)([A-G])([#b]?)(\w*)/);if(o){var c=i+2+o[1].length,l=o[2]+o[3]+o[4],u=f({root:o[2],acc:o[3],mode:o[4]},t),h=u.root+u.acc+u.mode;n.push({start:c,end:c+l.length,note:h})}i+=a.length+2}return n}(e,n));for(var s=0;s<t.lines.length;s++){var a=t.lines[s].staff;if(a)for(var c=0;c<a.length;c++){var l=a[c];"perc"!==l.clef.type&&(r=r.concat(o(e,l.voices,l.key,n)))}}return r}function o(e,t,n,r){for(var i=[],s=f(n,r),a=0;a<t.length;a++)i=i.concat(u(e,t[a],n.root,c(n),s,r));return i}function c(e){for(var t={},n=0;n<e.accidentals.length;n++){var r=e.accidentals[n];"flat"===r.acc?t[r.note.toUpperCase()]="_":"sharp"===r.acc&&(t[r.note.toUpperCase()]="^")}return t}function l(e,t,n){var r=h.indexOf(e.root)-h.indexOf(t);return"none"===t&&(r=h.indexOf(e.root)),0===r?n>2?r+=7:-12===n&&(r-=7):n>0&&r<0?r+=7:n<0&&r>0&&(r-=7),n>12?r+=7:n<-12&&(r-=7),r}function u(e,t,n,r,i,a){for(var o=[],u=l(i,n,a),h={},d={},m=0;m<t.length;m++){var g=t[m];if(g.chord)for(var v=0;v<g.chord.length;v++){var b=g.chord[v];if("default"===b.position){var k=i.accidentals.length&&"flat"===i.accidentals[0].acc,S=s(b.name,a,k,!0);(S=S.replace(/♭/g,"b").replace(/♯/g,"#"))!==b.name&&o.push(x(e,g.startChar,g.endChar,S))}}if("note"===g.el_type&&g.pitches){for(var C=0;C<g.pitches.length;C++){var M=y(g.pitches[C].name,n,r,h);M.acc&&(h[M.name.toUpperCase()]=M.acc);var E=p(M,i,u,d);E.acc&&(d[E.upper]=E.acc),o.push(_(e,g.startChar,g.endChar,E.acc+E.name,C))}if(g.gracenotes)for(var T=0;T<g.gracenotes.length;T++){var P=y(g.gracenotes[T].name,n,r,h);P.acc&&(h[P.name.toUpperCase()]=P.acc);var A=p(P,i,u,h);A.acc&&(d[A.upper]=A.acc),o.push(w(e,g.startChar,g.endChar,A.acc+A.name,T))}}else"bar"===g.el_type?(h={},d={}):"keySignature"===g.el_type&&(n=g.root,r=c(g),u=l(i=f(g,a),n,a))}return o}e=function(e,o,c){if("TEST"===o)return{keyAccidentals:t,relativeMajor:n,transposeKey:r,relativeMode:i,transposeChordName:s};c=parseInt(c,10);var l,u=[];for(l=0;l<o.length;l++)u=u.concat(a(e,o[l],c));u=u.sort((function(e,t){return t.start-e.start}));var h=e.split("");for(l=0;l<u.length;l++){var d=u[l];h.splice(d.start,d.end-d.start,d.note)}return h.join("")};var h="CDEFGAB",d=[",,,,",",,,",",,",",","","'","''","'''","''''"];function f(e,s){if("none"===e.root)return{root:r("C",s),mode:"",acc:"",accidentals:[]};var a=n(e.root+e.acc+e.mode),o=r(a,s),c=i(o,e.mode),l=t(o);return{root:c[0],mode:e.mode,acc:c.length>1?c[1]:"",accidentals:l}}function p(e,t,n,r){for(var i=e.pitch,s=h.indexOf(e.name),a=(h.indexOf(t.root)+i)%7,o=s+n,c=e.oct;o>6;)c++,o-=7;for(;o<0;)c--,o+=7;for(var l=h[a],u="",d=e.adj,f="=",m=0;m<t.accidentals.length;m++)if(t.accidentals[m].note.toLowerCase()===l.toLowerCase()){d+="flat"===t.accidentals[m].acc?-1:1,f="flat"===t.accidentals[m].acc?"_":"^";break}switch(d){case-2:u="__";break;case-1:u="_";break;case 0:u="=";break;case 1:u="^";break;case 2:u="^^";break;case-3:return(g={}).pitch=e.pitch-1,g.oct=e.oct,g.name=h[h.indexOf(e.name)-1],g.name||(g.name="B",g.oct--),"B"===g.name||"E"===g.name?g.adj=e.adj+1:g.adj=e.adj+2,p(g,t,n+1,r);case 3:var g;return(g={}).pitch=e.pitch+1,g.oct=e.oct,g.name=h[h.indexOf(e.name)+1],g.name||(g.name="C",g.oct++),"C"===g.name||"F"===g.name?g.adj=e.adj-1:g.adj=e.adj-2,p(g,t,n+1,r)}switch(r[l]!==u&&(r[l]||u!==f)||e.courtesy||(u=""),c){case 0:l+=",,,";break;case 1:l+=",,";break;case 2:l+=",";break;case 4:l=l.toLowerCase();break;case 5:l=l.toLowerCase()+"'";break;case 6:l=l.toLowerCase()+"''";break;case 7:l=l.toLowerCase()+"'''";break;case 8:l=l.toLowerCase()+"''''"}return c>4&&(l=l.toLowerCase()),{acc:u,name:l,upper:l.toUpperCase()}}var m=/([_^=]*)([A-Ga-g])([,']*)/,g=/([_^=]*[A-Ga-g][,']*)(\d*\/*\d*)([\>\<\-\)\.\s\\]*)/,v=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/,b=/(\s*)$/;function y(e,t,n,r){var i="none"===t?0:h.indexOf(t),s=e.match(m),a=s[2].toUpperCase(),o=h.indexOf(a)-i;o<0&&(o+=7);var c=d.indexOf(s[3]);a===s[2]&&c--;var l=r[a]||n[a]||"=";return{acc:s[1],name:a,pitch:o,oct:c,adj:k(s[1],n[a],r[a]),courtesy:s[1]===l}}function _(e,t,n,r,i){var s=e.substring(t,n),a=s.match(new RegExp(g.source+b.source),"");if(a){var o=a[1].length,c=a[2].length+a[3].length+a[4].length;t+=n-t-o-c,n-=c}else{if(a=s.match(new RegExp(/([^\[]*)/.source+/\[/.source+v.source+v.source+v.source+v.source+v.source+v.source+v.source+v.source+/\-?](\d*\/*\d*)?([\>\<\-\)]*)/.source+b.source))){for(var l=1+a[1].length,u=0;u<i;u++)a[3*u+2]&&(l+=a[3*u+2].length),a[3*u+3]&&(l+=a[3*u+3].length),a[3*u+4]&&(l+=a[3*u+4].length);n=(t+=l)+(a[3*i+2]?a[3*i+2].length:0)}}return{start:t,end:n,note:r}}function w(e,t,n,r,i){var s=/(\/*)/,a=e.substring(t,n).match(new RegExp(/([^\{]*)/.source+/\{/.source+s.source+v.source+s.source+v.source+s.source+v.source+s.source+v.source+s.source+v.source+s.source+v.source+s.source+v.source+s.source+v.source+/\}/.source));if(a){for(var o=1+a[1].length,c=0;c<i;c++)a[3*c+2]&&(o+=a[3*c+2].length),a[3*c+3]&&(o+=a[3*c+3].length),a[3*c+4]&&(o+=a[3*c+4].length),a[3*c+5]&&(o+=a[3*c+5].length);a[3*i+2]&&(o+=a[3*c+2].length),t+=o;var l=a[3*i+3]?a[3*i+3].length:0;l+=a[3*i+4]?a[3*i+4].length:0,n=t+(l+=a[3*i+5]?a[3*i+5].length:0)}return{start:t,end:n,note:r}}function x(e,t,n,r){var i=e.substring(t,n).match(/([^"]+)?(".+")+/);return i[1]&&(t+=i[1].length),{start:t+1,end:(n=t+i[2].length)-1,note:r}}function k(e,t,n){if(!e&&n&&(e=n),!e)return 0;switch(t){case void 0:switch(e){case"__":return-2;case"_":return-1;case"=":default:return 0;case"^":return 1;case"^^":return 2}case"_":switch(e){case"__":return-1;case"_":default:return 0;case"=":return 1;case"^":return 2;case"^^":return 3}case"^":switch(e){case"__":return-3;case"_":return-2;case"=":return-1;case"^":default:return 0;case"^^":return 1}}return 0}}(),Md=e}function Ug(){if(Od)return Id;Od=1;var e=Sg(),t={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"tab.big":{d:[["M",20.16,-21.66],["c",.24,-.09,.66,.09,.78,.36],["c",.09,.21,.09,.24,-.18,.54],["c",-.78,.81,-1.86,1.44,-2.94,1.71],["c",-.87,.24,-1.71,.24,-2.55,.03],["l",-.06,-.03],["l",-.18,.99],["c",-.33,1.98,-.75,4.26,-.96,5.04],["c",-.42,1.65,-1.26,3.18,-2.28,4.14],["c",-.57,.57,-1.17,.9,-1.86,1.08],["c",-.18,.06,-.33,.06,-.66,.06],["c",-.54,0,-.78,-.03,-1.23,-.27],["c",-.39,-.18,-.66,-.39,-1.38,-.99],["c",-.3,-.24,-.66,-.51,-.75,-.57],["c",-.21,-.15,-.27,-.24,-.24,-.45],["c",.06,-.27,.36,-.6,.6,-.66],["c",.18,-.03,.33,.06,.9,.57],["c",.48,.42,.72,.57,.93,.69],["c",.66,.33,1.38,.21,1.95,-.36],["c",.63,-.6,1.05,-1.62,1.23,-3],["c",.03,-.18,.09,-.66,.09,-1.11],["c",.09,-1.56,.33,-3.81,.57,-5.49],["c",.06,-.33,.09,-.63,.09,-.63],["c",-.03,-.03,-.81,-.12,-1.02,-.12],["c",-.57,0,-1.32,.12,-1.8,.33],["c",-.87,.3,-1.35,.78,-1.5,1.41],["c",-.18,.63,.09,1.26,.66,1.65],["c",.12,.06,.15,.12,.18,.24],["c",.09,.27,.06,.57,-.09,.75],["c",-.03,.06,-.12,.09,-.27,.15],["c",-.72,.21,-1.44,.15,-2.1,-.18],["c",-.54,-.27,-.96,-.66,-1.2,-1.14],["c",-.39,-.75,-.33,-1.74,.15,-2.52],["c",.27,-.42,.84,-.93,1.41,-1.23],["c",1.17,-.57,2.88,-.9,4.8,-.9],["c",.69,0,.78,0,1.08,.06],["c",.45,.09,1.11,.3,2.07,.6],["c",1.47,.48,1.83,.57,2.55,.54],["c",1.02,-.06,2.04,-.45,2.94,-1.11],["c",.12,-.09,.24,-.18,.27,-.18],["z"],["m",-5.88,13.05],["c",.21,-.03,.81,0,1.08,.06],["c",.48,.12,.9,.42,.99,.69],["c",.03,.09,.03,.15,0,.27],["c",0,.09,-.03,.57,-.06,1.08],["c",-.09,2.19,-.24,5.76,-.39,8.28],["c",-.06,1.53,-.06,1.77,.03,2.01],["c",.09,.18,.15,.24,.3,.3],["c",.24,.12,.54,.06,1.23,-.27],["c",.57,-.27,.66,-.3,.75,-.24],["c",.09,.06,.18,.3,.18,.45],["c",0,.33,-.15,.51,-.45,.63],["c",-.12,.03,-.39,.15,-.6,.27],["c",-1.17,.6,-1.38,.69,-1.8,.72],["c",-.45,.03,-.78,-.09,-1.08,-.39],["c",-.39,-.42,-.66,-1.2,-1.02,-3.12],["c",-.24,-1.23,-.36,-2.07,-.54,-3.75],["l",0,-.18],["l",-.36,.45],["c",-.6,.75,-1.32,1.59,-1.95,2.25],["c",-.15,.18,-.27,.3,-.27,.33],["c",0,0,.06,.09,.15,.18],["c",.24,.33,.6,.57,1.05,.69],["c",.18,.06,.3,.06,.69,.06],["l",.48,.03],["l",.06,.12],["c",.15,.27,.03,.72,-.21,.9],["c",-.18,.12,-.93,.27,-1.41,.27],["c",-.84,0,-1.59,-.3,-1.98,-.84],["l",-.12,-.15],["l",-.45,.42],["c",-.99,.87,-1.53,1.32,-2.16,1.74],["c",-.78,.51,-1.5,.84,-2.1,.93],["c",-.69,.12,-1.2,.03,-1.95,-.42],["c",-.21,-.12,-.51,-.27,-.66,-.36],["c",-.24,-.12,-.3,-.18,-.33,-.24],["c",-.12,-.27,.15,-.78,.45,-.93],["c",.24,-.12,.33,-.09,.9,.18],["c",.6,.3,.84,.39,1.2,.36],["c",.87,-.09,1.77,-.69,3.24,-2.31],["c",2.67,-2.85,4.59,-5.94,5.7,-9.15],["c",.15,-.45,.24,-.63,.42,-.81],["c",.21,-.24,.6,-.45,.99,-.51],["z"],["m",-3.99,16.05],["c",.18,0,.69,-.03,1.17,0],["c",3.27,.03,5.37,.75,6,2.07],["c",.45,.99,.12,2.4,-.81,3.42],["c",-.24,.27,-.57,.57,-.84,.75],["c",-.09,.06,-.18,.09,-.18,.12],["c",0,0,.18,.03,.42,.09],["c",1.23,.3,2.01,.81,2.37,1.59],["c",.27,.54,.3,1.32,.09,2.1],["c",-.12,.36,-.45,1.05,-.69,1.35],["c",-.87,1.17,-2.1,1.92,-3.54,2.25],["c",-.36,.06,-.48,.06,-.96,.06],["c",-.45,0,-.66,0,-.84,-.03],["c",-.84,-.18,-1.47,-.51,-2.07,-1.11],["c",-.33,-.33,-.45,-.51,-.45,-.63],["c",0,-.06,.03,-.15,.06,-.24],["c",.18,-.33,.69,-.6,.93,-.48],["c",.03,.03,.15,.12,.27,.24],["c",.39,.42,.99,.57,1.62,.45],["c",1.05,-.21,1.98,-1.02,2.31,-2.01],["c",.48,-1.53,-.48,-2.55,-2.58,-2.67],["c",-.21,0,-.36,-.03,-.42,-.06],["c",-.15,-.09,-.21,-.51,-.06,-.78],["c",.12,-.27,.24,-.33,.6,-.36],["c",.57,-.06,1.11,-.42,1.5,-.99],["c",.48,-.72,.54,-1.59,.18,-2.31],["c",-.12,-.21,-.45,-.54,-.69,-.69],["c",-.33,-.21,-.93,-.45,-1.35,-.51],["l",-.12,-.03],["l",-.06,.48],["c",-.54,2.94,-1.14,6.24,-1.29,6.75],["c",-.33,1.35,-.93,2.61,-1.65,3.6],["c",-.3,.36,-.81,.9,-1.14,1.14],["c",-.3,.24,-.84,.48,-1.14,.57],["c",-.33,.09,-.96,.09,-1.26,.03],["c",-.45,-.12,-.87,-.39,-1.53,-.96],["c",-.24,-.15,-.51,-.39,-.63,-.48],["c",-.3,-.21,-.33,-.33,-.21,-.63],["c",.12,-.18,.27,-.36,.42,-.45],["c",.27,-.12,.36,-.09,.87,.33],["c",.78,.6,1.08,.75,1.65,.72],["c",.45,-.03,.81,-.21,1.17,-.54],["c",.87,-.9,1.38,-2.85,1.38,-5.37],["c",0,-.6,.03,-1.11,.12,-2.04],["c",.06,-.69,.24,-2.01,.33,-2.58],["c",.06,-.24,.06,-.42,.06,-.42],["c",0,0,-.12,.03,-.21,.09],["c",-1.44,.57,-2.16,1.65,-1.74,2.55],["c",.09,.15,.18,.24,.27,.33],["c",.24,.21,.3,.27,.33,.39],["c",.06,.24,0,.63,-.15,.78],["c",-.09,.12,-.54,.21,-.96,.24],["c",-1.02,.03,-2.01,-.48,-2.43,-1.32],["c",-.21,-.45,-.27,-.9,-.15,-1.44],["c",.06,-.27,.21,-.66,.39,-.93],["c",.87,-1.29,3,-2.22,5.64,-2.43],["z"]],w:19.643,h:43.325},"tab.tiny":{d:[["M",16.02,-17.25],["c",.12,-.09,.15,-.09,.27,-.09],["c",.21,.03,.51,.3,.51,.45],["c",0,.06,-.12,.18,-.3,.36],["c",-1.11,1.08,-2.55,1.59,-3.84,1.41],["c",-.15,-.03,-.33,-.06,-.39,-.09],["c",-.06,-.03,-.09,-.03,-.12,-.03],["c",0,0,-.06,.42,-.15,.93],["c",-.33,2.01,-.66,3.69,-.84,4.26],["c",-.42,1.41,-1.23,2.67,-2.16,3.33],["c",-.27,.18,-.75,.42,-.99,.48],["c",-.3,.09,-.72,.09,-1.02,.06],["c",-.45,-.09,-.84,-.33,-1.53,-.9],["c",-.21,-.18,-.51,-.39,-.63,-.48],["c",-.27,-.21,-.3,-.24,-.3,-.36],["c",0,-.12,.09,-.36,.18,-.45],["c",.09,-.09,.27,-.18,.36,-.18],["c",.12,0,.3,.12,.66,.45],["c",.57,.51,.87,.69,1.23,.72],["c",.93,.06,1.68,-.78,1.98,-2.37],["c",.09,-.39,.15,-.75,.18,-1.53],["c",.06,-.99,.24,-2.79,.42,-4.05],["c",.03,-.3,.06,-.57,.06,-.6],["c",0,-.06,-.03,-.09,-.15,-.12],["c",-.9,-.18,-2.13,.06,-2.76,.57],["c",-.36,.3,-.51,.6,-.51,1.02],["c",0,.45,.15,.75,.48,.99],["c",.06,.06,.15,.18,.18,.24],["c",.12,.24,.03,.63,-.15,.69],["c",-.24,.12,-.6,.15,-.9,.15],["c",-.36,-.03,-.57,-.09,-.87,-.24],["c",-.78,-.36,-1.23,-1.11,-1.2,-1.92],["c",.12,-1.53,1.74,-2.49,4.62,-2.7],["c",1.2,-.09,1.47,-.03,3.33,.57],["c",.9,.3,1.14,.36,1.56,.39],["c",.45,0,.93,-.06,1.38,-.21],["c",.51,-.18,.81,-.33,1.41,-.75],["z"],["m",-4.68,10.38],["c",.39,-.06,.84,0,1.2,.15],["c",.24,.12,.36,.21,.45,.36],["l",.09,.09],["l",-.06,1.41],["c",-.09,2.19,-.18,3.96,-.27,5.49],["c",-.03,.78,-.06,1.59,-.06,1.86],["c",0,.42,0,.48,.06,.57],["c",.06,.18,.18,.24,.36,.27],["c",.18,0,.39,-.06,.84,-.27],["c",.45,-.21,.54,-.24,.63,-.18],["c",.12,.12,.15,.54,.03,.69],["c",-.03,.03,-.15,.12,-.27,.18],["c",-.15,.03,-.3,.12,-.36,.15],["c",-.87,.45,-1.02,.51,-1.26,.57],["c",-.33,.09,-.6,.06,-.84,-.06],["c",-.42,-.18,-.63,-.6,-.87,-1.44],["c",-.3,-1.23,-.57,-2.97,-.66,-4.08],["c",0,-.18,-.03,-.3,-.03,-.33],["l",-.06,.06],["c",-.18,.27,-1.11,1.38,-1.68,2.01],["l",-.33,.33],["l",.06,.09],["c",.06,.15,.27,.33,.48,.42],["c",.27,.18,.51,.24,.96,.27],["l",.39,0],["l",.03,.12],["c",.12,.21,.03,.57,-.15,.69],["c",-.03,.03,-.21,.09,-.36,.15],["c",-.27,.06,-.39,.06,-.75,.06],["c",-.48,0,-.75,-.03,-1.08,-.21],["c",-.21,-.12,-.51,-.36,-.57,-.48],["l",-.03,-.09],["l",-.39,.36],["c",-1.47,1.35,-2.49,1.98,-3.42,2.13],["c",-.54,.09,-.96,-.03,-1.62,-.39],["c",-.21,-.15,-.45,-.27,-.54,-.3],["c",-.18,-.09,-.21,-.21,-.12,-.45],["c",.06,-.27,.33,-.48,.54,-.48],["c",.03,0,.27,.09,.48,.21],["c",.48,.24,.69,.27,.99,.27],["c",.6,-.06,1.17,-.42,2.1,-1.35],["c",2.22,-2.22,4.02,-4.98,4.95,-7.59],["c",.21,-.57,.3,-.78,.48,-.93],["c",.15,-.15,.42,-.27,.66,-.33],["z"],["m",-3.06,12.84],["c",.27,-.03,1.68,0,2.01,.03],["c",1.92,.18,3.15,.69,3.63,1.5],["c",.18,.33,.24,.51,.21,.93],["c",0,.45,-.06,.72,-.24,1.11],["c",-.24,.51,-.69,1.02,-1.17,1.35],["c",-.21,.15,-.21,.15,-.12,.18],["c",.72,.15,1.11,.3,1.5,.57],["c",.39,.24,.63,.57,.75,.96],["c",.09,.3,.09,.96,0,1.29],["c",-.15,.57,-.39,1.05,-.78,1.5],["c",-.66,.75,-1.62,1.32,-2.61,1.53],["c",-.27,.06,-.42,.06,-.84,.06],["c",-.48,0,-.57,0,-.81,-.06],["c",-.6,-.18,-1.05,-.42,-1.47,-.81],["c",-.36,-.39,-.42,-.51,-.3,-.75],["c",.12,-.21,.39,-.39,.6,-.39],["c",.09,0,.15,.03,.33,.18],["c",.12,.12,.27,.24,.36,.27],["c",.96,.48,2.46,-.33,2.82,-1.5],["c",.24,-.81,-.03,-1.44,-.69,-1.77],["c",-.39,-.21,-1.02,-.33,-1.53,-.33],["c",-.18,0,-.21,0,-.27,-.09],["c",-.06,-.09,-.06,-.3,-.03,-.48],["c",.06,-.18,.18,-.36,.33,-.36],["c",.39,-.06,.51,-.09,.72,-.18],["c",.69,-.36,1.11,-1.23,.99,-2.01],["c",-.09,-.51,-.42,-.9,-.93,-1.17],["c",-.24,-.12,-.6,-.27,-.87,-.3],["c",-.09,-.03,-.09,-.03,-.12,.12],["c",0,.09,-.21,1.11,-.42,2.25],["c",-.66,3.75,-.72,3.99,-1.26,5.07],["c",-.9,1.89,-2.25,2.85,-3.48,2.61],["c",-.39,-.09,-.69,-.27,-1.38,-.84],["c",-.63,-.51,-.63,-.48,-.63,-.6],["c",0,-.18,.18,-.48,.39,-.57],["c",.21,-.12,.3,-.09,.81,.33],["c",.15,.15,.39,.3,.54,.36],["c",.18,.12,.27,.12,.48,.15],["c",.99,.06,1.71,-.78,2.04,-2.46],["c",.12,-.66,.18,-1.14,.21,-2.22],["c",.03,-1.23,.12,-2.25,.36,-3.63],["c",.03,-.24,.06,-.45,.06,-.48],["c",-.06,-.03,-.66,.27,-.9,.42],["c",-.06,.06,-.21,.18,-.33,.3],["c",-.57,.57,-.6,1.35,-.06,1.74],["c",.18,.12,.24,.24,.21,.51],["c",-.03,.3,-.15,.42,-.57,.48],["c",-1.11,.24,-2.22,-.42,-2.43,-1.38],["c",-.09,-.45,.03,-1.02,.3,-1.47],["c",.18,-.24,.6,-.63,.9,-.84],["c",.9,-.6,2.28,-1.02,3.69,-1.11],["z"]],w:15.709,h:34.656},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.85,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84},"noteheads.slash.whole":{d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},"noteheads.slash.quarter":{d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},"noteheads.harmonic.quarter":{d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165},"noteheads.triangle.quarter":{d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9}},n=function(e){for(var t=[],n=0,r=e.length;n<r;n++){t[n]=[];for(var i=0,s=e[n].length;i<s;i++)t[n][i]=e[n][i]}return t};return Id={printSymbol:function(e,r,i,s,a){if(!t[i])return null;var o=n(t[i].d);o[0][1]+=e,o[0][2]+=r;for(var c="",l=0;l<o.length;l++)c+=o[l].join(" ");return a.path=c,s.path(a)},getPathForSymbol:function(e,r,i,s,a){if(s=s||1,a=a||1,!t[i])return null;var o=n(t[i].d);return 1===s&&1===a||function(e,t,n){for(var r=0,i=e.length;r<i;r++){var s,a,o=e[r];for(s=1,a=o.length;s<a;s++)o[s]*=s%2?t:n}}(o,s,a),o[0][1]+=e,o[0][2]+=r,o},getSymbolWidth:function(e){return t[e]?t[e].w:0},symbolHeightInPitches:function(n){return(t[n]?t[n].h:0)/e.STEP},getSymbolAlign:function(e){return"scripts"===e.substring(0,7)&&"scripts.roll"!==e?"center":"left"},getYCorr:function(e){switch(e){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"flags.d64th":case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"timesig.common":case"timesig.cut":default:return 0;case"flags.d32nd":case"rests.half":case"rests.8th":case"rests.quarter":case"rests.16th":case"rests.32nd":case"rests.64th":case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"flags.u32nd":case"rests.whole":case"scripts.dfermata":return 1;case"flags.u64th":return 3;case"f":case"m":case"p":case"s":case"z":return-4}},setSymbol:function(e,n){t[e]=n}}}function Gg(){if(Kd)return $d;Kd=1;var e=function(e){this.type="TieElem",this.anchor1=e.anchor1,this.anchor2=e.anchor2,e.isGrace&&(this.isGrace=!0),e.fixedY&&(this.fixedY=!0),e.stemDir&&(this.stemDir=e.stemDir),void 0!==e.voiceNumber&&(this.voiceNumber=e.voiceNumber),void 0!==e.style&&(this.dotted=!0),this.internalNotes=[]};return e.prototype.addInternalNote=function(e){this.internalNotes.push(e)},e.prototype.setEndAnchor=function(e){this.anchor2=e,this.anchor1?(this.top=Math.max(this.anchor1.pitch,this.anchor2.pitch)+4,this.bottom=Math.min(this.anchor1.pitch,this.anchor2.pitch)-4):(this.top=this.anchor2.pitch+4,this.bottom=this.anchor2.pitch-4)},e.prototype.setStartX=function(e){this.startLimitX=e},e.prototype.setEndX=function(e){this.endLimitX=e},e.prototype.setHint=function(){this.hint=!0},e.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},e.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;t<this.internalNotes.length;t++){"down"===this.internalNotes[t].stemDir&&(e=!0)}this.above=e}},e.prototype.calcX=function(e,t){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.anchor2?this.startX=this.anchor2.x-20:this.startX=e,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=t},e.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0},e.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&"up"===this.anchor1.stemDir&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var e=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,t=(this.anchor2.highestVert+this.anchor2.pitch)/2;if(this.above&&"up"===this.anchor2.stemDir&&!this.fixedY&&!e&&t<this.startY?(this.endY=t,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&e?this.anchor2.highestVert:this.anchor2.pitch,1===this.anchor1.scalex){var n=!!this.anchor1.parent.beam,r=!!this.anchor2.parent.beam;if(n)this.anchor1.parent===this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1]||(this.above?this.startY=this.anchor1.parent.fixed.t:this.startY=this.anchor1.parent.fixed.b);if(r)this.anchor2.parent===this.anchor2.parent.beam.elems[0]||(this.above?this.endY=this.anchor2.parent.fixed.t:this.endY=this.anchor2.parent.fixed.b)}}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},e.prototype.avoidCollisionAbove=function(){if(this.above){for(var e=-50,t=0;t<this.internalNotes.length;t++)this.internalNotes[t].highestVert>e&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},e.prototype.getYBounds=function(){var e,t;return this.isTie?(this.calcTieDirection(),this.calcX(10,1e3),this.calcTieY()):(this.calcSlurDirection(),this.calcX(10,1e3),this.calcSlurY()),this.above?e=(t=Math.min(this.startY,this.endY))+3:t=(e=Math.min(this.startY,this.endY))-3,[e,t]},$d=e}function Wg(){if(Xd)return Qd;Xd=1;var e=Hd?qd:(Hd=1,qd=function(e,t,n){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===n?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}),t=Ud?Yd:(Ud=1,Yd=function(e,t,n,r){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=n,"above"===r?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}),n=Wd?Gd:(Wd=1,Gd=function(e,t){this.type="GlissandoElem",this.anchor1=e,this.anchor2=t}),r=Ug(),i=Bg(),s=Gg(),a=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},o=function(e,t,n,s,a){function o(e,t){var o="down"===a?function(){if(0===s.heads.length)return 2;for(var e=s.heads[0].pitch,t=1;t<s.heads.length;t++)e=Math.min(e,s.heads[t].pitch);return e}()+1:function(){if(0===s.heads.length)return 10;for(var e=s.heads[0].pitch,t=1;t<s.heads.length;t++)e=Math.max(e,s.heads[t].pitch);return e}()+9;"down"!==a&&1===t&&o--;var c=n/2;c+="down"===a?-5:3;for(var l=0;l<t;l++)o-=1,s.addFixedX(new i(e,c,r.getSymbolWidth(e),o))}for(var c=0;c<e.length;c++)switch(e[c]){case"/":o("flags.ugrace",1);break;case"//":o("flags.ugrace",2);break;case"///":o("flags.ugrace",3);break;case"////":o("flags.ugrace",4)}};return a.prototype.dynamicDecoration=function(e,r,i,s){for(var a,o,c,l=0;l<r.length;l++)switch(r[l]){case"diminuendo(":this.startDiminuendoX=i,a=void 0;break;case"diminuendo)":a={start:this.startDiminuendoX,stop:i},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=i,o=void 0;break;case"crescendo)":o={start:this.startCrescendoX,stop:i},this.startCrescendoX=void 0;break;case"~(":case"glissando(":this.startGlissandoX=i,c=void 0;break;case"~)":case"glissando)":c={start:this.startGlissandoX,stop:i},this.startGlissandoX=void 0}a&&e.addOther(new t(a.start,a.stop,">",s)),o&&e.addOther(new t(o.start,o.stop,"<",s)),c&&e.addOther(new n(c.start,c.stop))},a.prototype.createDecoration=function(t,n,a,c,l,u,h,d,f,p,m){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(t,n,r,i){for(var s=0;s<n.length;s++)switch(n[s]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var a=new e(r,n[s],i);t.addOther(a)}}(t,n,l,f.volumePosition),this.dynamicDecoration(t,n,l,f.dynamicPosition),o(n,0,c,l,h);var g=function(e,t,n,a,o,c,l,u,h){for(var d,f=0;f<t.length;f++){if("staccato"===t[f]||"tenuto"===t[f]||"accent"===t[f]&&!h){var p="scripts."+t[f];if("accent"===t[f]&&(p="scripts.sforzato"),d=void 0===d?"down"===l?n+2:u-2:"down"===l?d+2:d-2,"accent"===t[f])"up"===l?d--:d++;else switch(d){case 2:case 4:case 6:case 8:case 10:"up"===l?d--:d++}n>9&&d++;var m=a/2;"center"!==r.getSymbolAlign(p)&&(m-=r.getSymbolWidth(p)/2),o.addFixedX(new i(p,m,r.getSymbolWidth(p),d))}if("slide"===t[f]&&o.heads[0]){var g=o.heads[0].pitch,v=new i("",-c-15,0,(g-=2)-1),b=new i("",-c-5,0,g+1);o.addFixedX(v),o.addFixedX(b),e.addOther(new s({anchor1:v,anchor2:b,fixedY:!0}))}}return void 0===d&&(d=n),{above:d,below:o.bottom}}(t,n,a,c,l,u,h,d,m);g.above=Math.max(g.above,this.minTop),g.below=Math.min(g.below,d),function(e,t,n,s,a,o,c,l){function u(e,t){"above"===e?s.above+=t:s.below-=t}function h(e){var t;return"above"===e?(t=s.above)<o&&(t=o):(t=s.below)>c&&(t=c),t}function d(e,r,s){var a=h(r);n.addFixedX(new i(e,t/2,0,a+2,{type:"decoration",klass:"ornament",thickness:3,anchor:s})),u(r,5)}function f(e,s){var a=t/2;"center"!==r.getSymbolAlign(e)&&(a-=r.getSymbolWidth(e)/2);var o=r.symbolHeightInPitches(e)+1,c=h(s);c="above"===s?c+o/2:c-o/2,n.addFixedX(new i(e,a,r.getSymbolWidth(e),c,{klass:"ornament",thickness:r.symbolHeightInPitches(e),position:s})),u(s,o)}for(var p={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},m=!1,g=0;g<e.length;g++)switch(e[g]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":d(e[g],a,"middle"),m=!0;break;case"D.C.alcoda":d("D.C. al coda",a,"end"),m=!0;break;case"D.C.alfine":d("D.C. al fine",a,"end"),m=!0;break;case"D.S.alcoda":d("D.S. al coda",a,"end"),m=!0;break;case"D.S.alfine":d("D.S. al fine",a,"end"),m=!0;break;case"fine":d("FINE",a,"middle"),m=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"roll":case"irishroll":case"marcato":case"dmarcato":case"turn":case"uppermordent":case"pralltriller":case"mordent":case"lowermordent":case"downbow":case"upbow":case"fermata":case"breath":case"umarcato":case"coda":case"segno":f(p[e[g]],a),m=!0;break;case"invertedfermata":f(p[e[g]],"below"),m=!0;break;case"mark":n.klass="mark";break;case"accent":l&&(f("scripts.sforzato",a),m=!0)}}(n,c,l,g,f.ornamentPosition,this.minTop,d,m),function(e,t,n){for(var s=0;s<e.length;s++)if("arpeggio"===e[s])for(var a=t.abcelem.minpitch-1;a<=t.abcelem.maxpitch;a+=2)t.addExtra(new i("scripts.arpeggio",2*-r.getSymbolWidth("scripts.arpeggio")-n,0,a+2,{klass:"ornament",thickness:r.symbolHeightInPitches("scripts.arpeggio")}))}(n,l,u)},Qd=a}function $g(){if(rf)return nf;rf=1;var e=tf?ef:(tf=1,ef=function(e){for(var t=0,n=0;n<e.voices.length;n++){var r=e.voices[n].staff;e.voices[n].duplicate||(t+=r.top,t+=-r.bottom)}return t}),t=function(e){this.getTextSize=e,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};return t.prototype.setLimit=function(e,t){t.specialY[e]&&(t.staff.specialY[e]?t.staff.specialY[e]=Math.max(t.staff.specialY[e],t.specialY[e]):t.staff.specialY[e]=t.specialY[e])},t.prototype.addVoice=function(e,t,n){var r=this.voices.length;this.voices[r]=e,this.staffs[t]?this.staffs[t].voices.push(r):this.staffs[this.staffs.length]={top:10,bottom:2,lines:n,voices:[r],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},e.staff=this.staffs[t]},t.prototype.setHeight=function(){this.height=e(this)},t.prototype.setWidth=function(e){this.w=e;for(var t=0;t<this.voices.length;t++)this.voices[t].setWidth(e)},t.prototype.setStaffLimits=function(e){e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},nf=t}function Kg(){if(df)return hf;df=1;var e=Bg(),t=Sg();const n=function(){if(uf)return lf;function e(e){switch(e){case"B#":return"H#";case"B♯":return"H♯";case"B":return"H";case"Bb":case"B♭":return"B"}return e}return uf=1,lf=function(t,n,r){var i=t.split("\n");for(let s=0;s<i.length;s++){let t=i[s].match(/^([ABCDEFG][♯♭]?)?([^\/]+)?(\/([ABCDEFG][#b♯♭]?))?/);if(!t)continue;let a=t[1]||"",o=t[2]||"",c=t[4]||"";r&&(a=e(a),c=e(c));const l=n?"":"",u=c?"/"+c:"";i[s]=[a,o,u].join(l)}return i.join("\n")}}();function r(r,i,s,a,o,c,l,u,h,d,f,p,m,g,v){for(var b=r.split("\n"),y=b.length-1;y>=0;y--){var _,w=b[y],x=0;a||(w=n(w,g,v));var k=u.calc(w,o,c),S=k.width,C=k.height/t.STEP;switch(i){case"left":x=-(f+=S+7),_=d.averagepitch,h.addExtra(new e(w,x,S+4,_,{type:"text",height:C,dim:l,position:"left"}));break;case"right":x=p+=4,_=d.averagepitch,h.addRight(new e(w,x,S+4,_,{type:"text",height:C,dim:l,position:"right"}));break;case"below":h.addRight(new e(w,0,0,void 0,{type:"text",position:"below",height:C,dim:l,realWidth:S}));break;case"above":h.addRight(new e(w,0,0,void 0,{type:"text",position:"above",height:C,dim:l,realWidth:S}));break;default:if(s){var M=s.y+3*t.STEP;h.addRight(new e(w,x+s.x,0,d.minpitch+M/t.STEP,{position:"relative",type:"text",height:C,dim:l}))}else{var E="above";d.positioning&&d.positioning.chordPosition&&(E=d.positioning.chordPosition),"hidden"!==E&&h.addCentered(new e(w,m/2,S,void 0,{type:"chord",position:E,height:C,dim:l,realWidth:S}))}}}return{roomTaken:f,roomTakenRight:p}}return hf=function(e,t,n,i,s,a,o,c){for(var l=0;l<n.chord.length;l++){var u,h,d=n.chord[l].position,f=n.chord[l].rel_position,p="left"===d||"right"===d||"below"===d||"above"===d||!!f;p?(u="annotationfont",h="abcjs-annotation"):(u="gchordfont",h="abcjs-chord");var m,g=e.attr(u,h),v=n.chord[l].name;if("string"==typeof v)i=(m=r(v,d,f,p,u,h,g,e,t,n,i,s,a,o,c)).roomTaken,s=m.roomTakenRight;else for(var b=0;b<v.length;b++)i=(m=r(v[b].text,d,f,p,u,h,g,e,t,n,i,s,a,o,c)).roomTaken,s=m.roomTakenRight}return{roomTaken:i,roomTakenRight:s}}}function Qg(){if(pf)return ff;pf=1;var e=Lg(),t=function(){if(Pd)return Td;Pd=1;var e=function(e,t,n,r){this.type="BeamElem",this.isflat=!!n,this.isgrace=!(!t||"grace"!==t),this.forceup=!!(this.isgrace||t&&"up"===t),this.forcedown=!(!t||"down"!==t),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=e,this.beams=[],r&&r.duration?(this.duration=r.duration,r.startTriplet&&(this.duration*=r.tripletMultiplier),this.duration=Math.round(1e3*this.duration)/1e3):this.duration=0};function t(e,t){return t?e/t:0}return e.prototype.setHint=function(){this.hint=!0},e.prototype.runningDirection=function(e){var t=e.averagepitch;void 0!==t&&(this.total=Math.round(this.total+t),this.count||(this.count=0),this.count++)},e.prototype.add=function(e){var t=e.abcelem.averagepitch;void 0!==t&&(e.abcelem.rest||(this.allrests=!1),e.beam=this,this.elems.push(e),this.total=Math.round(this.total+t),(void 0===this.min||e.abcelem.minpitch<this.min)&&(this.min=e.abcelem.minpitch),(void 0===this.max||e.abcelem.maxpitch>this.max)&&(this.max=e.abcelem.maxpitch))},e.prototype.addBeam=function(e){this.beams.push(e)},e.prototype.setStemDirection=function(){this.average=t(this.total,this.count),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6,delete this.count,this.total=0},e.prototype.calcDir=function(){this.average=t(this.total,this.elems.length),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6;for(var e=this.stemsUp?"up":"down",n=0;n<this.elems.length;n++)for(var r=0;r<this.elems[n].heads.length;r++)this.elems[n].heads[r].stemDir=e},Td=e}(),n=function(){if(Nd)return Ad;Nd=1;var e=function(e,t){this.startVoice=e,this.type=t};return e.prototype.setBottomStaff=function(e){this.endVoice=e,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},e.prototype.continuing=function(e){this.lastContinuedVoice=e},e.prototype.getWidth=function(){return 10},e.prototype.isStartVoice=function(e){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===e)},Ad=e}(),r=function(){if(Ld)return Dd;Ld=1;var e=Lg(),t=Ug(),n=Bg();return Dd=function(r,i){var s,a=0;r.el_type="clef";var o=new e(r,0,10,"staff-extra clef",i);switch(o.isClef=!0,r.type){case"treble":s="clefs.G";break;case"tenor":case"alto":s="clefs.C";break;case"bass":s="clefs.F";break;case"treble+8":s="clefs.G",a=1;break;case"tenor+8":case"alto+8":s="clefs.C",a=1;break;case"bass+8":s="clefs.F",a=1;break;case"treble-8":s="clefs.G",a=-1;break;case"tenor-8":case"alto-8":s="clefs.C",a=-1;break;case"bass-8":s="clefs.F",a=-1;break;case"none":return null;case"perc":s="clefs.perc";break;default:o.addFixed(new n("clef="+r.type,0,0,void 0,{type:"debug"}))}if(s){var c=t.symbolHeightInPitches(s),l=function(e){switch(e){case"clefs.G":return-5;case"clefs.C":case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}(s);if(o.addRight(new n(s,5,t.getSymbolWidth(s),r.clefPos,{top:c+r.clefPos+l,bottom:r.clefPos+l})),0!==a){var u=2/3,h=(t.getSymbolWidth(s)-t.getSymbolWidth("8")*u)/2,d=a>0?o.top+3:o.bottom-1,f=a>0?o.top+3:o.bottom-3,p=f-2;"bass-8"===r.type&&(d=3,h=0),o.addRight(new n("8",5+h,t.getSymbolWidth("8")*u,d,{scalex:u,scaley:u,top:f,bottom:p}))}}return o}}(),i=function(){if(Vd)return Bd;Vd=1;var e=Lg(),t=Ug(),n=Bg();return Bd=function(r,i){if(r.el_type="keySignature",!r.accidentals||0===r.accidentals.length)return null;var s=new e(r,0,10,"staff-extra key-signature",i);s.isKeySig=!0;var a=0;return r.accidentals.forEach((function(e){var r,i=0;switch(e.acc){case"sharp":r="accidentals.sharp",i=-3;break;case"natural":r="accidentals.nat";break;case"flat":r="accidentals.flat",i=-1.2;break;case"quartersharp":r="accidentals.halfsharp",i=-2.5;break;case"quarterflat":r="accidentals.halfflat",i=-1.2;break;default:r="accidentals.flat"}s.addRight(new n(r,a,t.getSymbolWidth(r),e.verticalPos,{thickness:t.symbolHeightInPitches(r),top:e.verticalPos+t.symbolHeightInPitches(r)+i,bottom:e.verticalPos+i})),a+=t.getSymbolWidth(r)+2}),this),s}}(),s=function(){if(Fd)return Rd;Fd=1;var e=Ug(),t=Bg();return Rd=function(n,r,i,s){s||(s={});var a,o=void 0!==s.dir?s.dir:null,c=void 0!==s.headx?s.headx:0,l=void 0!==s.extrax?s.extrax:0,u=void 0!==s.flag?s.flag:null,h=void 0!==s.dot?s.dot:0,d=void 0!==s.dotshiftx?s.dotshiftx:0,f=void 0!==s.scale?s.scale:1,p=void 0!==s.accidentalSlot?s.accidentalSlot:[],m=void 0!==s.shouldExtendStem&&s.shouldExtendStem,g=void 0===s.printAccidentals||s.printAccidentals,v=i.verticalPos,b=0,y=0,_=0;if(void 0===r)n.addFixed(new t("pitch is undefined",0,0,0,{type:"debug"}));else if(""===r)a=new t(null,0,0,v);else{var w=c;if(i.printer_shift){var x="same"===i.printer_shift?1:0;w="down"===o?-e.getSymbolWidth(r)*f+x:e.getSymbolWidth(r)*f-x}var k={scalex:f,scaley:f,thickness:e.symbolHeightInPitches(r)*f,name:i.name};if((a=new t(r,w,e.getSymbolWidth(r)*f,v,k)).stemDir=o,u){var S=v+("down"===o?-7:7)*f;m&&("down"===o&&S>6&&(S=6),"up"===o&&S<6&&(S=6));var C="down"===o?c:c+a.w-.6;n.addRight(new t(u,C,e.getSymbolWidth(u)*f,S,{scalex:f,scaley:f}))}for(y=a.w+d-2+5*h;h>0;h--){var M=1-Math.abs(v)%2;n.addRight(new t("dots.dot",a.w+d-2+5*h,e.getSymbolWidth("dots.dot"),v+M))}}if(a&&(a.highestVert=i.highestVert),g&&i.accidental){var E;switch(i.accidental){case"quartersharp":E="accidentals.halfsharp";break;case"dblsharp":E="accidentals.dblsharp";break;case"sharp":E="accidentals.sharp";break;case"quarterflat":E="accidentals.halfflat";break;case"flat":E="accidentals.flat";break;case"dblflat":E="accidentals.dblflat";break;case"natural":E="accidentals.nat"}for(var T=!1,P=l,A=0;A<p.length;A++)if(v-p[A][0]>=6){p[A][0]=v,P=p[A][1],T=!0;break}!1===T&&(P-=e.getSymbolWidth(E)*f+2,p.push([v,P]),b=e.getSymbolWidth(E)*f+2);var N=e.symbolHeightInPitches(E);n.addExtra(new t(E,P,e.getSymbolWidth(E),v,{scalex:f,scaley:f,top:v+N/2,bottom:v-N/2})),_=e.getSymbolWidth(E)/2}return{notehead:a,accidentalshiftx:b,dotshiftx:y,extraLeft:_}}}(),a=function(){if(jd)return zd;jd=1;var e=Lg(),t=Ug(),n=Bg();return zd=function(r,i){r.el_type="timeSignature";var s=new e(r,0,10,"staff-extra time-signature",i);if("specified"===r.type)for(var a=0,o=0;o<r.value.length;o++)if(0!==o&&(s.addRight(new n("+",a+1,t.getSymbolWidth("+"),6,{thickness:t.symbolHeightInPitches("+")})),a+=t.getSymbolWidth("+")+2),r.value[o].den){for(var c=0,l=0;l<r.value[o].num.length;l++)c+=t.getSymbolWidth(r.value[o].num[l]);var u=0;for(l=0;l<r.value[o].num.length;l++)u+=t.getSymbolWidth(r.value[o].den[l]);var h=Math.max(c,u);s.addRight(new n(r.value[o].num,a+(h-c)/2,c,8,{thickness:t.symbolHeightInPitches(r.value[o].num[0])})),s.addRight(new n(r.value[o].den,a+(h-u)/2,u,4,{thickness:t.symbolHeightInPitches(r.value[o].den[0])})),a+=h}else{for(var d=0,f=0;f<r.value[o].num.length;f++)d+=t.getSymbolWidth(r.value[o].num[f]);s.addRight(new n(r.value[o].num,a,d,6,{thickness:t.symbolHeightInPitches(r.value[o].num[0])})),a+=d}else"common_time"===r.type?s.addRight(new n("timesig.common",0,t.getSymbolWidth("timesig.common"),6,{thickness:t.symbolHeightInPitches("timesig.common")})):"cut_time"===r.type?s.addRight(new n("timesig.cut",0,t.getSymbolWidth("timesig.cut"),6,{thickness:t.symbolHeightInPitches("timesig.cut")})):"tempus_imperfectum"===r.type?s.addRight(new n("timesig.imperfectum",0,t.getSymbolWidth("timesig.imperfectum"),6,{thickness:t.symbolHeightInPitches("timesig.imperfectum")})):"tempus_imperfectum_prolatio"===r.type?s.addRight(new n("timesig.imperfectum2",0,t.getSymbolWidth("timesig.imperfectum2"),6,{thickness:t.symbolHeightInPitches("timesig.imperfectum2")})):"tempus_perfectum"===r.type?s.addRight(new n("timesig.perfectum",0,t.getSymbolWidth("timesig.perfectum"),6,{thickness:t.symbolHeightInPitches("timesig.perfectum")})):"tempus_perfectum_prolatio"===r.type?s.addRight(new n("timesig.perfectum2",0,t.getSymbolWidth("timesig.perfectum2"),6,{thickness:t.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",r);return s}}(),o=Wg(),c=Jd?Zd:(Jd=1,Zd=function(e,t,n){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=n,this.endingHeightAbove=5,this.pitch=void 0}),l=Ug(),u=Bg(),h=Sg(),d=$g(),f=function(){if(af)return sf;af=1;var e=Lg(),t=Bg(),n=function(e,t,n){this.type="TempoElement",this.tempo=e,this.tempo.type="tempo",this.tuneNumber=t,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(n,e,t))};return n.prototype.setX=function(e){this.x=e},n.prototype.createNote=function(n,r,i){var s,a,o,c=.75,l=r.duration[0],u=new e(r,l,1,"tempo",i);l<=1/32?(o="noteheads.quarter",a="flags.u32nd",s=0):l<=1/16?(o="noteheads.quarter",a="flags.u16th",s=0):l<=3/32?(o="noteheads.quarter",a="flags.u16nd",s=1):l<=1/8?(o="noteheads.quarter",a="flags.u8th",s=0):l<=3/16?(o="noteheads.quarter",a="flags.u8th",s=1):l<=1/4?(o="noteheads.quarter",s=0):l<=3/8?(o="noteheads.quarter",s=1):l<=.5?(o="noteheads.half",s=0):l<=3/4?(o="noteheads.half",s=1):l<=1?(o="noteheads.whole",s=0):l<=1.5?(o="noteheads.whole",s=1):l<=2?(o="noteheads.dbl",s=0):(o="noteheads.dbl",s=1);var h,d=n(u,o,{verticalPos:0},{dir:"up",flag:a,dot:s,scale:c}).notehead;if(u.addHead(d),"noteheads.whole"!==o&&"noteheads.dbl"!==o){var f=d.dx+d.w;h=new t(null,f,0,.25,{type:"stem",pitch2:3.75,linewidth:-.6}),u.addRight(h)}return u},sf=n}(),p=Gg(),m=function(){if(cf)return of;cf=1;var e=function(e,t,n){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=n.flatBeams};return e.prototype.isClosed=function(){return!!this.anchor2},e.prototype.middleNote=function(e){this.middleElems.push(e)},e.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&"up"!==this.anchor1.stemDir||(this.endingHeightAbove=4)},of=e}(),g=Ng(),v=Kg(),b=Mg(),y=fh(),_=function(e){var t=0;return e.duration&&(t=e.duration),t},w=!1,x={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},triangle:{"-1":"noteheads.triangle.quarter",0:"noteheads.triangle.quarter",1:"noteheads.triangle.quarter",2:"noteheads.triangle.quarter",3:"noteheads.triangle.quarter",4:"noteheads.triangle.quarter",5:"noteheads.triangle.quarter",6:"noteheads.triangle.quarter",7:"noteheads.triangle.quarter",nostem:"noteheads.triangle.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}},k=function(e,t,n){this.decoration=new o,this.getTextSize=e,this.tuneNumber=t,this.isBagpipes=n.bagpipes,this.flatBeams=n.flatbeams,this.graceSlurs=n.graceSlurs,this.percmap=n.percmap,this.initialClef=n.initialClef,this.jazzchords=!!n.jazzchords,this.accentAbove=!!n.accentAbove,this.germanAlphabet=!!n.germanAlphabet,this.reset()};function S(e,t){var n=e[t];if("note"!==n.el_type||!n.startBeam||n.endBeam)return{count:1,elem:n};for(var r=[];t<e.length&&"note"===e[t].el_type&&(r.push(e[t]),!e[t].endBeam);)t++;return{count:r.length,elem:r}}function C(e){if(e.pitches){M(e);for(var t=0,n=0;n<e.pitches.length;n++)t+=e.pitches[n].verticalPos;e.averagepitch=t/e.pitches.length,e.minpitch=e.pitches[0].verticalPos,e.maxpitch=e.pitches[e.pitches.length-1].verticalPos}}k.prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.voiceColor=void 0,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.colorByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},k.prototype.setStemHeight=function(e){this.stemHeight=Math.round(10*e/h.STEP)/10},k.prototype.getCurrentVoiceId=function(e,t){return"s"+e+"v"+t},k.prototype.pushCrossLineElems=function(e,t){this.slursbyvoice[this.getCurrentVoiceId(e,t)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(e,t)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(e,t)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(e,t)]=this.voiceScale,this.voiceColor&&(this.colorByVoice[this.getCurrentVoiceId(e,t)]=this.voiceColor)},k.prototype.popCrossLineElems=function(e,t){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(e,t)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(e,t)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(e,t)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(e,t)],void 0===this.voiceScale&&(this.voiceScale=1),this.voiceColor=this.colorByVoice[this.getCurrentVoiceId(e,t)]},k.prototype.containsLyrics=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e[t].voices.length;n++)for(var r=0;r<e[t].voices[n].length;r++){var i=e[t].voices[n][r];if(i.lyric)return void(i.positioning&&"below"!==i.positioning.vocalPosition||(this.hasVocals=!0))}},k.prototype.createABCLine=function(e,t,n){this.minY=2,this.containsLyrics(e);var r=new d(this.getTextSize);this.tempoSet=!1;for(var i=0;i<e.length;i++)w&&this.restoreState(),w=!1,this.createABCStaff(r,e[i],t,i,n);return r},k.prototype.createABCStaff=function(e,t,s,o,c){e.getTextSize.updateFonts(t);for(var l=0;l<t.voices.length;l++){var u=new g(l,t.voices.length);0===l?(u.barfrom="start"===t.connectBarLines||"continue"===t.connectBarLines,u.barto="continue"===t.connectBarLines||"end"===t.connectBarLines):u.duplicate=!0,t.title&&t.title[l]&&(u.header=t.title[l].replace(/\\n/g,"\n"),u.headerPosition=6+e.getTextSize.baselineToCenter(u.header,"voicefont","staff-extra voice-name",l,t.voices.length)/h.STEP),t.clef&&"perc"===t.clef.type&&(u.isPercussion=!0);var d=(!this.initialClef||0===c)&&r(t.clef,this.tuneNumber);d&&(0===l&&t.barNumber&&this.addMeasureNumber(t.barNumber,d),u.addChild(d),this.startlimitelem=d);var f=i(t.key,this.tuneNumber);if(f&&(u.addChild(f),this.startlimitelem=f),t.meter){"specified"===t.meter.type?this.measureLength=t.meter.value[0].num/t.meter.value[0].den:this.measureLength=1;var p=a(t.meter,this.tuneNumber);u.addChild(p),this.startlimitelem=p}u.duplicate&&(u.children=[]);var m=t.clef.stafflines||0===t.clef.stafflines?t.clef.stafflines:5;e.addVoice(u,o,m);var v=1===m;this.createABCVoice(t.voices[l],s,o,l,v,u),e.setStaffLimits(u),0===l&&("start"===t.brace||!e.brace&&t.brace?(e.brace||(e.brace=[]),e.brace.push(new n(u,"brace"))):"end"===t.brace&&e.brace?e.brace[e.brace.length-1].setBottomStaff(u):"continue"===t.brace&&e.brace&&e.brace[e.brace.length-1].continuing(u),"start"===t.bracket||!e.bracket&&t.bracket?(e.bracket||(e.bracket=[]),e.bracket.push(new n(u,"bracket"))):"end"===t.bracket&&e.bracket?e.bracket[e.bracket.length-1].setBottomStaff(u):"continue"===t.bracket&&e.bracket&&e.bracket[e.bracket.length-1].continuing(u))}},k.prototype.createABCVoice=function(t,n,r,i,a,o){this.popCrossLineElems(r,i),this.stemdir=this.isBagpipes?"down":null,this.abcline=t,this.partstartelem&&(this.partstartelem=new c("",null,null),o.addOther(this.partstartelem));var l=o.voicetotal<2?-1:o.voicenumber;for(var u in this.slurs)this.slurs.hasOwnProperty(u)&&(this.slurs[u]=new p({force:this.slurs[u].force,voiceNumber:l,stemDir:this.slurs[u].stemDir,style:this.slurs[u].dotted}),w&&this.slurs[u].setHint(),o.addOther(this.slurs[u]));for(var h=0;h<this.ties.length;h++)this.ties[h]=new p({force:this.ties[h].force,stemDir:this.ties[h].stemDir,voiceNumber:l,style:this.ties[h].dotted}),w&&this.ties[h].setHint(),o.addOther(this.ties[h]);for(var d=0;d<this.abcline.length;d++)C(this.abcline[d]),this.minY=Math.min(this.abcline[d].minpitch,this.minY);for(var m=0===r,g=0;g<this.abcline.length;){var v=S(this.abcline,g),b=this.createABCElement(m,a,o,v.elem);if(b)for(h=0;h<b.length;h++){if(!this.tempoSet&&n&&!n.suppress){this.tempoSet=!0;var y=new e(n,0,0,"tempo",this.tuneNumber,{});y.addFixedX(new f(n,this.tuneNumber,s)),o.addChild(y)}o.addChild(b[h])}g+=v.count}this.pushCrossLineElems(r,i)},k.prototype.saveState=function(){this.tiesSave=y.cloneArray(this.ties),this.slursSave=y.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=y.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=y.cloneHashOfArrayOfHash(this.tiesbyvoice)},k.prototype.restoreState=function(){this.ties=y.cloneArray(this.tiesSave),this.slurs=y.cloneHashOfHash(this.slursSave),this.slursbyvoice=y.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=y.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},k.prototype.createABCElement=function(t,n,o,c){var l=[];switch(c.el_type){case void 0:l=this.createBeam(n,o,c);break;case"note":l[0]=this.createNote(c,!1,n,o),this.triplet&&this.triplet.isClosed()&&(o.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":l[0]=this.createBarLine(o,c,t),o.duplicate&&l.length>0&&(l[0].invisible=!0);break;case"meter":l[0]=a(c,this.tuneNumber),this.startlimitelem=l[0],o.duplicate&&l.length>0&&(l[0].invisible=!0);break;case"clef":if(l[0]=r(c,this.tuneNumber),!l[0])return null;o.duplicate&&l.length>0&&(l[0].invisible=!0);break;case"key":var d=i(c,this.tuneNumber);d&&(l[0]=d,this.startlimitelem=l[0]),o.duplicate&&l.length>0&&(l[0].invisible=!0);break;case"stem":this.stemdir="auto"===c.direction?void 0:c.direction;break;case"part":var p=new e(c,0,0,"part",this.tuneNumber),m=this.getTextSize.calc(c.title,"partsfont","part");p.addFixedX(new u(c.title,0,0,void 0,{type:"part",height:m.height/h.STEP})),l[0]=p;break;case"tempo":var g=new e(c,0,0,"tempo",this.tuneNumber);g.addFixedX(new f(c,this.tuneNumber,s)),l[0]=g;break;case"style":"normal"===c.head?delete this.style:this.style=c.head;break;case"hint":w=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=c.size;break;case"color":this.voiceColor=c.color,o.color=this.voiceColor;break;default:var v=new e(c,0,0,"unsupported",this.tuneNumber);v.addFixed(new u("element type "+c.el_type,0,0,void 0,{type:"debug"})),l[0]=v}return l},k.prototype.createBeam=function(e,n,r){var i=[],s=new t(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);w&&s.setHint();for(var a=0;a<r.length;a++)s.runningDirection(r[a]);s.setStemDirection();var o=this.stemdir;for(this.stemdir=s.stemsUp?"up":"down",a=0;a<r.length;a++){var c=r[a],l=this.createNote(c,!0,e,n);i.push(l),s.add(l),this.triplet&&this.triplet.isClosed()&&(n.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return s.calcDir(),n.addBeam(s),this.stemdir=o,i};var M=function(e){var t;do{t=!0;for(var n=0;n<e.pitches.length-1;n++)if(e.pitches[n].pitch>e.pitches[n+1].pitch){t=!1;var r=e.pitches[n];e.pitches[n]=e.pitches[n+1],e.pitches[n+1]=r}}while(!t)},E=function(e,t,n,r,i,s,a,o,c){for(var l=n;l>11;l--)l%2!=0||r||e.addFixed(new u(null,o,(i+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||r||e.addFixed(new u(null,o,(i+4)*c,l,{type:"ledger"}));for(l=0;l<s.length;l++){var h=i;"down"===a&&(h=-h),e.addFixed(new u(null,h+o,(i+4)*c,s[l],{type:"ledger"}))}};function T(e,t){for(var n=0;n<e.length;n++)if(JSON.stringify(e[n])===JSON.stringify(t))return;e.push(t)}return k.prototype.addGraceNotes=function(e,n,r,i,a,o,c){var h=.6;a=Math.round(.7*a);var d,f,m=null;e.gracenotes.length>1&&(m=new t(a,"grace",o),w&&m.setHint(),m.mainNote=r);var g=[];for(f=e.gracenotes.length-1;f>=0;f--)c+=10,g[f]=c,e.gracenotes[f].accidental&&(c+=7);for(f=0;f<e.gracenotes.length;f++){var v=e.gracenotes[f].verticalPos;d=m?null:x.uflags[o?5:3];var b=s(r,"noteheads.quarter",e.gracenotes[f],{dir:"up",headx:-g[f],extrax:-g[f],flag:d,scale:h*this.voiceScale,accidentalSlot:[]});b.notehead.highestVert=b.notehead.pitch+a;var y=b.notehead;if(this.addSlursAndTies(r,e.gracenotes[f],y,n,"up",!0),r.addExtra(y),e.gracenotes[f].acciaccatura){var _=e.gracenotes[f].verticalPos+4.2,k=m?5:6;r.addRight(new u("flags.ugrace",-g[f]+k,0,_,{scalex:h,scaley:h}))}if(m){var S=e.gracenotes[f].duration/2;o&&(S/=2);var C={heads:[y],abcelem:{averagepitch:v,minpitch:v,maxpitch:v,duration:S}};m.add(C)}else{var M=v+1/3*h,T=v+4.2,P=y.dx+y.w;r.addExtra(new u(null,P,0,M,{type:"stem",pitch2:T,linewidth:-.6}))}E(r,v,v,!1,l.getSymbolWidth("noteheads.quarter"),[],!0,y.dx-1,.6);var A=e.rest&&("spacer"===e.rest.type||"invisible"===e.rest.type);0!==f||o||!this.graceSlurs||A||n.addOther(new p({anchor1:y,anchor2:i,isGrace:!0}))}return m&&(m.calcDir(),n.addBeam(m)),c},k.prototype.addNoteToAbcElement=function(e,t,n,r,i,a,o,c,h){var d,f,p,m,g,v=0,y=0,w=0,k=[],S=[],C=0,M=t.averagepitch>=6?"down":"up";for(r&&(M=r),(i=t.style?t.style:i)&&"normal"!==i||(i="note"),(m=a?x[i].nostem:x[i][-o])||console.log("noteSymbol:",i,o,a),g="down"===M?t.pitches.length-2:1;"down"===M?g>=0:g<t.pitches.length;g="down"===M?g-1:g+1){var E=t.pitches["down"===M?g+1:g-1],P=t.pitches[g],A="down"===M?E.pitch-P.pitch:P.pitch-E.pitch;A<=1&&!E.printer_shift&&(P.printer_shift=A?"different":"same",(P.verticalPos>11||P.verticalPos<1)&&k.push(P.verticalPos-P.verticalPos%2),"down"===M?y=l.getSymbolWidth(m)+2:v=l.getSymbolWidth(m)+2)}var N=t.pitches.length;for(g=0;g<t.pitches.length;g++){var I,O;if(!c)I="down"===M&&0!==g||"up"===M&&g!==N-1?null:x["down"===M?"dflags":"uflags"][-o];if(t.pitches[g].style)O=x[t.pitches[g].style][-o];else if(h.isPercussion&&this.percmap){O=m;var D=this.percmap[b(t.pitches[g])];D&&D.noteHead&&x[D.noteHead]&&(O=x[D.noteHead][-o])}else O=m;if(t.pitches[g].highestVert=t.pitches[g].verticalPos,("up"===r||"up"===M)&&0===g||("down"===r||"down"===M)&&g===N-1){if((t.startSlur||1===N)&&(t.pitches[g].highestVert=t.pitches[N-1].verticalPos,_(t)<1&&("up"===r||"up"===M)&&(t.pitches[g].highestVert+=6)),t.startSlur)for(t.pitches[g].startSlur||(t.pitches[g].startSlur=[]),p=0;p<t.startSlur.length;p++)T(t.pitches[g].startSlur,t.startSlur[p]);if(t.endSlur)for(t.pitches[g].highestVert=t.pitches[N-1].verticalPos,_(t)<1&&("up"===r||"up"===M)&&(t.pitches[g].highestVert+=6),t.pitches[g].endSlur||(t.pitches[g].endSlur=[]),p=0;p<t.endSlur.length;p++)T(t.pitches[g].endSlur,t.endSlur[p])}var L=!c&&o<=-1,B=s(e,O,t.pitches[g],{dir:M,extrax:-y,flag:I,dot:n,dotshiftx:v,scale:this.voiceScale,accidentalSlot:S,shouldExtendStem:!r,printAccidentals:!h.isPercussion});C=Math.max(l.getSymbolWidth(O),C),e.extraw-=B.extraLeft,(d=B.notehead)&&(this.addSlursAndTies(e,t.pitches[g],d,h,L?M:null,!1),t.gracenotes&&t.gracenotes.length>0&&(d.bottom=d.bottom-1),e.addHead(d)),y+=B.accidentalshiftx,w=Math.max(w,B.dotshiftx)}if(L){var V=Math.round(70*this.voiceScale)/10,R="down"===M?t.minpitch-V:t.minpitch+1/3;R>6&&!r&&(R=6);var F="down"===M?t.maxpitch-1/3:t.maxpitch+V;F<6&&!r&&(F=6);var z="down"===M||0===e.heads.length?0:e.heads[0].w,j="down"===M?1:-1;d&&"noteheads.slash.quarter"===d.c&&("down"===M?F-=1:R+=1),d&&"noteheads.triangle.quarter"===d.c&&("down"===M?F-=.7:R-=1.2),e.addRight(new u(null,z,0,R,{type:"stem",pitch2:F,linewidth:j,bottom:R-1})),f=Math.min(R,F)}return{noteHead:d,roomTaken:y,roomTakenRight:w,min:f,additionalLedgers:k,dir:M,symbolWidth:C}},k.prototype.addLyric=function(e,t){var n="";t.lyric.forEach((function(e){var t=" "===e.divider?"":e.divider;n+=e.syllable+t+"\n"}));var r=this.getTextSize.calc(n,"vocalfont","lyric"),i=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new u(n,0,r.width,void 0,{type:"lyric",position:i,height:r.height/h.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},k.prototype.createNote=function(t,n,r,i){var a,o=null,c=0,h=0,d=0,f=[],p=_(t),g=!1;0===p&&(g=!0,p=.25,n=!0);for(var b=Math.floor(Math.log(p)/Math.log(2)),y=0,k=Math.pow(2,b),S=k/2;k<p;y++,k+=S,S/=2);t.startTriplet&&(this.tripletmultiplier=t.tripletMultiplier);var C=p*this.tripletmultiplier;t.rest&&"multimeasure"===t.rest.type&&(C=1),t.rest&&"invisible-multimeasure"===t.rest.type&&(C=this.measureLength*t.rest.text);var M=t.rest?"rest":"note",T=new e(t,C,1,M,this.tuneNumber,{durationClassOveride:t.duration*this.tripletmultiplier});if(w&&T.setHint(),t.rest){this.measureLength===p&&"invisible"!==t.rest.type&&"spacer"!==t.rest.type&&t.rest.type.indexOf("multimeasure")<0&&(t.rest.type="whole");var P=function(e,t,n,r,i,a,o,c,h){var d,f,p,m,g=7;switch(i&&("down"===a&&(g=3),"up"===a&&(g=11)),o&&(g=n<.5||n<1?7:5),t.rest.type){case"whole":d=x.rest[0],t.averagepitch=g,t.minpitch=g,t.maxpitch=g,r=0;break;case"rest":d="rhythm"===t.style?x.rhythm[-c]:x.rest[-c],t.averagepitch=g,t.minpitch=g,t.maxpitch=g;break;case"invisible":case"invisible-multimeasure":case"spacer":d="",t.averagepitch=g,t.minpitch=g,t.maxpitch=g;break;case"multimeasure":d=x.rest.multi,t.averagepitch=g,t.minpitch=g,t.maxpitch=g,r=0;var v=l.getSymbolWidth(d);e.addHead(new u(d,v,2*v,7));var b=new u(""+t.rest.text,v,v,16,{type:"multimeasure-text"});e.addExtra(b)}if(t.rest.type.indexOf("multimeasure")<0&&"invisible"!==t.rest.type){var y=s(e,d,{verticalPos:g},{dot:r,scale:h});(f=y.notehead)&&(e.addHead(f),p=y.accidentalshiftx,m=y.dotshiftx)}return{noteHead:f,roomTaken:p,roomTakenRight:m}}(T,t,p,y,i.voicetotal>1,this.stemdir,r,b,this.voiceScale);o=P.noteHead,c=P.roomTaken,h=P.roomTakenRight}else{var A=this.addNoteToAbcElement(T,t,y,this.stemdir,this.style,g,b,n,i);void 0!==A.min&&(this.minY=Math.min(A.min,this.minY)),o=A.noteHead,c=A.roomTaken,h=A.roomTakenRight,f=A.additionalLedgers,a=A.dir,d=A.symbolWidth}if(void 0!==t.lyric&&this.addLyric(T,t),void 0!==t.gracenotes&&(c+=this.addGraceNotes(t,i,T,o,this.stemHeight*this.voiceScale,this.isBagpipes,c)),t.decoration){var N=n&&"up"!==a?Math.min(-3,T.bottom-6):T.bottom;this.decoration.createDecoration(i,t.decoration,T.top,o?o.w:0,T,c,a,N,t.positioning,this.hasVocals,this.accentAbove)}if(t.barNumber&&T.addFixed(new u(t.barNumber,-10,0,0,{type:"barNumber"})),E(T,t.minpitch,t.maxpitch,t.rest,d,f,a,-2,1),void 0!==t.chord){var I=v(this.getTextSize,T,t,c,h,d,this.jazzchords,this.germanAlphabet);c=I.roomTaken,h=I.roomTakenRight}return t.startTriplet&&(this.triplet=new m(t.startTriplet,o,{flatBeams:this.flatBeams})),t.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(o),!this.triplet||t.startTriplet||t.endTriplet||t.rest&&"spacer"===t.rest.type||this.triplet.middleNote(o),T},k.prototype.addSlursAndTies=function(e,t,n,r,i,s){if(t.endTie&&this.ties.length>0){for(var a=!1,o=0;o<this.ties.length;o++)if(this.ties[o].anchor1&&this.ties[o].anchor1.pitch===n.pitch){this.ties[o].setEndAnchor(n),r.setRange(this.ties[o]),this.ties.splice(o,1),a=!0;break}a||(this.ties[0].setEndAnchor(n),r.setRange(this.ties[0]),this.ties.splice(0,1))}var c,l,u=r.voicetotal<2?-1:r.voicenumber;if(t.startTie){var h=new p({anchor1:n,force:"down"===this.stemdir||"up"===this.stemdir,stemDir:this.stemdir,isGrace:s,voiceNumber:u,style:t.startTie.style});w&&h.setHint(),this.ties[this.ties.length]=h,r.addOther(h),e.startTie=!0}if(t.endSlur)for(var d=0;d<t.endSlur.length;d++)l=t.endSlur[d],this.slurs[l]?((c=this.slurs[l]).setEndAnchor(n),r.setRange(c),delete this.slurs[l]):(c=new p({anchor2:n,stemDir:this.stemdir,voiceNumber:u}),w&&c.setHint(),r.addOther(c)),this.startlimitelem&&c.setStartX(this.startlimitelem);else if(!s)for(var f in this.slurs)this.slurs.hasOwnProperty(f)&&this.slurs[f].addInternalNote(n);if(t.startSlur)for(d=0;d<t.startSlur.length;d++)l=t.startSlur[d].label,c=new p({anchor1:n,stemDir:this.stemdir,voiceNumber:u,style:t.startSlur[d].style}),w&&c.setHint(),this.slurs[l]=c,r.addOther(c)},k.prototype.addMeasureNumber=function(e,t){var n=this.getTextSize.calc(e,"measurefont","bar-number"),r=0;t.isClef&&(r+=n.width/2);var i=n.width>10&&"treble"===t.abcelem.type?13.5:11;t.addFixed(new u(e,r,n.width,i+n.height/h.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},k.prototype.createBarLine=function(t,n,r){var i=new e(n,0,10,"bar",this.tuneNumber),s=null,a=0;n.barNumber&&this.addMeasureNumber(n.barNumber,i);var o="bar_right_repeat"===n.type||"bar_dbl_repeat"===n.type,l="bar_left_repeat"!==n.type&&"bar_thick_thin"!==n.type&&"bar_invisible"!==n.type,h="bar_right_repeat"===n.type||"bar_dbl_repeat"===n.type||"bar_left_repeat"===n.type||"bar_thin_thick"===n.type||"bar_thick_thin"===n.type,d="bar_left_repeat"===n.type||"bar_thick_thin"===n.type||"bar_thin_thin"===n.type||"bar_dbl_repeat"===n.type,f="bar_left_repeat"===n.type||"bar_dbl_repeat"===n.type;if(o||f){for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].setEndX(i);this.startlimitelem=i}if(o&&(i.addRight(new u("dots.dot",a,1,7)),i.addRight(new u("dots.dot",a,1,5)),a+=6),l&&(s=new u(null,a,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(s)),"bar_invisible"===n.type&&(s=new u(null,a,1,2,{type:"none",pitch2:10,linewidth:.6}),i.addRight(s)),n.decoration&&this.decoration.createDecoration(t,n.decoration,12,h?3:1,i,0,"down",2,n.positioning,this.hasVocals,this.accentAbove),h&&(s=new u(null,a+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),i.addRight(s),a+=5),this.partstartelem&&n.endEnding&&(this.partstartelem.anchor2=s,this.partstartelem=null),d&&(s=new u(null,a+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(s)),f&&(a+=3,i.addRight(new u("dots.dot",a,1,7)),i.addRight(new u("dots.dot",a,1,5))),n.startEnding&&r){var m=this.getTextSize.calc(n.startEnding,"repeatfont","").width;i.minspacing+=m+10,this.partstartelem=new c(n.startEnding,s,null),t.addOther(this.partstartelem)}return i.extraw-=5,void 0!==n.chord&&v(this.getTextSize,i,n,0,0,0,!1,this.germanAlphabet),i},ff=k}function Xg(){if(bf)return vf;bf=1;var e=Sg(),t=function(){if(gf)return mf;gf=1;var e="http://www.w3.org/2000/svg";function t(e){this.svg=s(),this.currentGroup=[],e.appendChild(this.svg)}function n(e,t,n){var r=n-e;return"M "+e+" "+t+" l "+r+" 0 l 0 1 l "+-r+" 0 z "}function r(e,t,n){var r=n-t;return"M "+e+" "+t+" l 0 "+r+" l 1 0 l 0 "+-r+" z "}t.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=s(),this.currentGroup=[],e&&(e.innerHTML="",e.appendChild(this.svg))}},t.prototype.setTitle=function(e){var t=document.createElement("title"),n=document.createTextNode(e);t.appendChild(n),this.svg.insertBefore(t,this.svg.firstChild)},t.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var n=this.svg.parentNode.getAttribute("class");n?n.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",n+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var r=t/e*100;this.svg.parentNode.style["padding-bottom"]=r+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},t.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},t.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)},t.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},t.prototype.insertStyles=function(t){var n=document.createElementNS(e,"style");n.textContent=t,this.svg.insertBefore(n,this.svg.firstChild)},t.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},t.prototype.rect=function(e){var t=[],i=e.x,s=e.y,a=e.x+e.width,o=e.y+e.height;return t.push(n(i,s,a)),t.push(n(i,o,a)),t.push(r(a,s,o)),t.push(r(i,o,s)),this.path({path:t.join(" "),stroke:"none","data-name":e["data-name"]})},t.prototype.dottedLine=function(t){var n=document.createElementNS(e,"line");n.setAttribute("x1",t.x1),n.setAttribute("x2",t.x2),n.setAttribute("y1",t.y1),n.setAttribute("y2",t.y2),n.setAttribute("stroke",t.stroke),n.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(n,this.svg.firstChild)},t.prototype.rectBeneath=function(t){var n=document.createElementNS(e,"rect");n.setAttribute("x",t.x),n.setAttribute("width",t.width),n.setAttribute("y",t.y),n.setAttribute("height",t.height),t.stroke&&n.setAttribute("stroke",t.stroke),t["stroke-opacity"]&&n.setAttribute("stroke-opacity",t["stroke-opacity"]),t.fill&&n.setAttribute("fill",t.fill),t["fill-opacity"]&&n.setAttribute("fill-opacity",t["fill-opacity"]),this.svg.insertBefore(n,this.svg.firstChild)},t.prototype.text=function(t,n,r){var i=document.createElementNS(e,"text");for(var s in i.setAttribute("stroke","none"),n)n.hasOwnProperty(s)&&i.setAttribute(s,n[s]);for(var a=(""+t).split("\n"),o=0;o<a.length;o++){var c=document.createElementNS(e,"tspan");if(c.setAttribute("x",n.x?n.x:0),0!==o&&c.setAttribute("dy","1.2em"),-1!==a[o].indexOf("")){var l=a[o].split("");if(c.textContent=l[0],l[1]){var u=document.createElementNS(e,"tspan");u.setAttribute("dy","-0.3em"),u.setAttribute("style","font-size:0.7em"),u.textContent=l[1],c.appendChild(u)}if(l[2]){var h=l[1]?"0.4em":"0.1em",d=document.createElementNS(e,"tspan");d.setAttribute("dy",h),d.setAttribute("style","font-size:0.7em"),d.textContent=l[2],c.appendChild(d)}}else c.textContent=a[o];i.appendChild(c)}return r?r.appendChild(i):this.append(i),i},t.prototype.richTextLine=function(t,n,r,i,s,a){var o=document.createElementNS(e,"text");o.setAttribute("stroke","none"),o.setAttribute("class",i),o.setAttribute("x",n),o.setAttribute("y",r),o.setAttribute("text-anchor",s),o.setAttribute("dominant-baseline","middle");for(var c=0;c<t.length;c++){for(var l=t[c],u=document.createElementNS(e,"tspan"),h=Object.keys(l.attrs),d=0;d<h.length;d++){var f=l.attrs[h[d]];""!==f&&u.setAttribute(h[d],f)}u.textContent=l.content,o.appendChild(u)}return a?a.appendChild(o):this.append(o),o},t.prototype.guessWidth=function(e,t){var n,r=this.createDummySvg(),i=this.text(e,t,r);try{n=i.getBBox(),n=isNaN(n.height)||!n.height?{width:t["font-size"]/2,height:t["font-size"]+2}:{width:n.width,height:n.height}}catch(s){n={width:t["font-size"]/2,height:t["font-size"]+2}}return r.removeChild(i),n},t.prototype.createDummySvg=function(){return this.dummySvg||(this.dummySvg=s(),this.dummySvg.setAttribute("style",["display: block !important;","height: 1px;","width: 1px;","position: absolute;"].join("")),document.querySelector("body").appendChild(this.dummySvg)),this.dummySvg};var i={};function s(){var t=document.createElementNS(e,"svg");return t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),t.setAttribute("role","img"),t.setAttribute("fill","currentColor"),t.setAttribute("stroke","currentColor"),t}return t.prototype.getTextSize=function(e,t,n){if("number"==typeof e&&(e=""+e),!e||e.match(/^\s+$/))return{width:0,height:0};var r;if(e.length<20&&(r=e+JSON.stringify(t),i[r]))return i[r];var s,a=!n;n||(n=this.text(e,t));try{s=n.getBBox(),s=isNaN(s.height)||!s.height?this.guessWidth(e,t):{width:s.width,height:s.height}}catch(o){s=this.guessWidth(e,t)}return a&&(this.currentGroup.length>0?this.currentGroup[0].removeChild(n):this.svg.removeChild(n)),r&&(i[r]=s),s},t.prototype.openGroup=function(t){t=t||{};var n=document.createElementNS(e,"g");return t.klass&&n.setAttribute("class",t.klass),t.fill&&n.setAttribute("fill",t.fill),t.stroke&&n.setAttribute("stroke",t.stroke),t["data-name"]&&n.setAttribute("data-name",t["data-name"]),t.prepend?this.prepend(n):this.append(n),this.currentGroup.unshift(n),n},t.prototype.closeGroup=function(){var e=this.currentGroup.shift();return e&&0===e.children.length?(e.parentElement.removeChild(e),null):e},t.prototype.path=function(t){var n=document.createElementNS(e,"path");for(var r in t)t.hasOwnProperty(r)&&("path"===r?n.setAttributeNS(null,"d",t.path):"klass"===r?n.setAttributeNS(null,"class",t[r]):void 0!==t[r]&&n.setAttributeNS(null,r,t[r]));return this.append(n),n},t.prototype.pathToBack=function(t){var n=document.createElementNS(e,"path");for(var r in t)t.hasOwnProperty(r)&&("path"===r?n.setAttributeNS(null,"d",t.path):"klass"===r?n.setAttributeNS(null,"class",t[r]):n.setAttributeNS(null,r,t[r]));return this.prepend(n),n},t.prototype.lineToBack=function(t){for(var n=document.createElementNS(e,"line"),r=Object.keys(t),i=0;i<r.length;i++)n.setAttribute(r[i],t[r[i]]);return this.prepend(n),n},t.prototype.append=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.appendChild(e)},t.prototype.prepend=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},t.prototype.setAttributeOnElement=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttributeNS(null,n,t[n])},t.prototype.moveElementToChild=function(e,t){e.appendChild(t)},mf=t}(),n=function(n){this.paper=new t(n),this.controller=null,this.space=3*e.SPACE,this.padding={},this.reset(),this.firefox112=navigator.userAgent.indexOf("Firefox/112.0")>=0};return n.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},n.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},n.prototype.setLineThickness=function(e){this.lineThickness=e},n.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},n.prototype.setPadding=function(e){function t(t,n,r,i,s){void 0!==e.formatting[r]?t.padding[n]=e.formatting[r]:void 0!==t.paddingOverride[n]?t.padding[n]=t.paddingOverride[n]:t.isPrint?t.padding[n]=i:t.padding[n]=s}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},n.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},n.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},n.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.stafftopmargin&&(this.spacing.staffTopMargin=4*e.stafftopmargin/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},n.prototype.calcY=function(t){return this.y-t*e.STEP},n.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},n.prototype.absolutemoveY=function(e){this.y=e},vf=n}function Zg(){if(Mf)return Cf;return Mf=1,Cf=function(e,t,n){if(t.text){t.marginLeft||(t.marginLeft=0),t.klass||(t.klass=""),t.anchor||(t.anchor="start"),t.info||(t.info={startChar:-2,endChar:-2}),t.marginTop&&e.push({move:t.marginTop});var r={left:t.marginLeft,text:t.text,font:t.font,anchor:t.anchor,startChar:t.info.startChar,endChar:t.info.endChar,"dominant-baseline":t["dominant-baseline"]};t.absElemType&&(r.absElemType=t.absElemType),!t.inGroup&&t.klass&&(r.klass=t.klass),t.name&&(r.name=t.name),e.push(r);var i=n.calc("A",t.font,t.klass),s=t.text.split("\n").length;if("\n"===t.text[t.text.length-1]&&s--,!t.noMove){var a=1.1*i.height*s;e.push({move:Math.round(a)}),t.marginBottom&&e.push({move:t.marginBottom})}}}}function Jg(){if(Tf)return Ef;Tf=1;const e=Zg();return Ef=function(t,n,r,i,s,a,o,c){var l=c.calc("i",r,i);if(""===n)t.push({move:l.height});else{if("string"==typeof n)return void e(t,{marginLeft:a,text:n,font:r,klass:i,marginTop:o.marginTop,anchor:o.anchor,absElemType:o.absElemType,info:o.info,name:s},c);o.marginTop&&t.push({move:o.marginTop});var u=0,h={left:a,anchor:o.anchor,phrases:[]};i&&(h.klass=i),t.push(h);for(var d=0;d<n.length;d++){var f=n[d],p=f.font?f.font:c.attr(r,i).font,m={content:f.text};p&&(m.attrs={"font-family":c.getFamily(p.face),"font-size":p.size,"font-weight":p.weight,"font-style":p.style,"font-decoration":p.decoration}),h.phrases.push(m);var g=c.calc(f.text,p,i);u=Math.max(u,g.height)," "===f.text[f.text.length-1]&&l.width}t.push({move:u})}}}function ev(){if(Df)return Of;function e(e,t,n,r){if(0===e.indexOf(t)){var i=e.replace(t,""),s=parseInt(i,10);""+s===i&&(n[r]=s)}}return Df=1,Of=function(t,n){var r=[];if(t.absEl.elemset){for(var i={},s=0;s<t.absEl.elemset.length;s++){var a=t.absEl.elemset[s];if(a)for(var o=a.getAttribute("class").split(" "),c=0;c<o.length;c++)i[o[c]]=!0}for(var l=0;l<Object.keys(i).length;l++)r.push(Object.keys(i)[l])}for(var u={},h=0;h<r.length;h++)e(r[h],"abcjs-v",u,"voice"),e(r[h],"abcjs-l",u,"line"),e(r[h],"abcjs-m",u,"measure");t.staffPos&&(u.staffPos=t.staffPos);for(var d=n.target;d&&d.dataset&&!d.dataset.name&&"svg"!==d.tagName.toLowerCase();)d=d.parentNode;for(var f=n.target;f&&f.dataset&&!f.dataset.index&&"svg"!==f.tagName.toLowerCase();)f=f.parentNode;return f&&f.dataset&&(u.name=f.dataset.name,u.clickedName=d.dataset.name,u.parentClasses=f.classList),d&&d.classList&&(u.clickedClasses=d.classList),u.selectableElement=t.svgEl,{classes:r,analysis:u}}}function tv(){if(Bf)return Lf;Bf=1;var e=Sg(),t=ev();function n(e){"keyboard"===this.dragMechanism&&0!==this.dragYStep&&this.dragTarget&&h.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,e),this.dragYStep=0}function r(e){switch(e.keyCode){case 38:case 40:e.preventDefault()}}function i(t){var n=!1,r=t.target.dataset.index;switch(t.keyCode){case 13:case 32:n=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragMechanism="keyboard",l.bind(this)(t);break;case 38:n=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*e.STEP+")"));break;case 40:n=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragMechanism="keyboard",this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*e.STEP+")"));break;case 9:0!==this.dragYStep&&l.bind(this)(t)}n&&t.preventDefault()}function s(e,t){var n,r,i,s=function(e,t){if(!t)return-1;for(var n=0;n<e.length;n++)if(t.dataset.index===e[n].svgEl.dataset.index)return n;return-1}(e.selectables,function(e){if(!e)return null;if("svg"===e.tagName)return e;if(!e.getAttribute)return null;for(var t=e.getAttribute("selectable");!t;)t=!e.parentElement||"svg"===(e=e.parentElement).tagName||e.getAttribute("selectable");return e}(t.target));return s>=0?(i=function(e,t,n){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY||Math.abs(t.layerY/n-t.offsetY)<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[s].svgEl.getBBox(),t,e.scale),n=i[0],r=i[1]):(i=function(e){var t,n,r=1,i=1,s=e.target.closest("svg"),a=0;return s&&s.viewBox&&s.viewBox.baseVal&&(0!==s.viewBox.baseVal.width&&(r=s.viewBox.baseVal.width/s.clientWidth),0!==s.viewBox.baseVal.height&&(i=s.viewBox.baseVal.height/s.clientHeight),a=s.viewBox.baseVal.y),e.target&&"svg"===e.target.tagName?(t=e.offsetX,n=e.offsetY):(t=e.layerX,n=e.layerY),[t*=r,(n*=i)+a]}(t),s=function(e,t,n){for(var r=9999999,i=-1,s=0;s<e.selectables.length&&r>0;s++){var a=e.selectables[s];if(e.getDim(a),a.dim.left<t&&a.dim.right>t&&a.dim.top<n&&a.dim.bottom>n)i=s,r=0;else if(a.dim.top<n&&a.dim.bottom>n){var o=Math.min(Math.abs(a.dim.left-t),Math.abs(a.dim.right-t));o<r&&(r=o,i=s)}else if(a.dim.left<t&&a.dim.right>t){var c=Math.min(Math.abs(a.dim.top-n),Math.abs(a.dim.bottom-n));c<r&&(r=c,i=s)}else{var l=Math.abs(t-a.dim.left)>Math.abs(t-a.dim.right)?Math.abs(t-a.dim.right):Math.abs(t-a.dim.left),u=Math.abs(n-a.dim.top)>Math.abs(n-a.dim.bottom)?Math.abs(n-a.dim.bottom):Math.abs(n-a.dim.top),h=Math.sqrt(l*l+u*u);h<r&&(r=h,i=s)}}return i>=0&&r<=12?i:-1}(e,n=i[0],r=i[1])),{x:n,y:r,clickedOn:s}}function a(e){if(e&&e.target&&e.touches&&!(e.touches.length<1)){var t=e.target.getBoundingClientRect(),n=e.touches[0].pageX-t.left,r=e.touches[0].pageY-t.top;e.touches[0].offsetX=n,e.touches[0].offsetY=r,e.touches[0].layerX=e.touches[0].pageX,e.touches[0].layerY=e.touches[0].pageY}}function o(e){var t=e;"touchstart"===e.type&&(a(e),e.touches.length>0&&(t=e.touches[0]));var n=s(this,t);n.clickedOn>=0&&("touchstart"===e.type||0===e.button)&&this.selectables[n.clickedOn]&&(this.dragTarget=this.selectables[n.clickedOn],this.dragIndex=n.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:n.x,y:n.y},this.dragging&&this.dragTarget.isDraggable&&(!function(e,t){if(e){var n=p(e.svg);n[t]=!0,m(e.svg,n)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function c(t){var n=t;if("touchmove"===t.type&&(a(t),t.touches.length>0&&(n=t.touches[0])),this.lastTouchMove=t,this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism&&this.dragMouseStart){var r=s(this,n),i=Math.round((r.y-this.dragMouseStart.y)/e.STEP);i!==this.dragYStep&&(this.dragYStep=i,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+i*e.STEP+")"))}}function l(e){var t=e;"touchend"===e.type&&this.lastTouchMove&&(a(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(t=this.lastTouchMove.touches[0])),this.dragTarget&&(d.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),h.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,t),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var n=p(e.svg);delete n[t],m(e.svg,n)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function u(e){e>=0&&e<this.selectables.length&&(this.dragTarget=this.selectables[e],this.dragIndex=e,this.dragMechanism="keyboard",l.bind(this)({target:this.dragTarget.svgEl}))}function h(e,n,r,i,s){for(var a=t(e,s),o=a.classes,c=a.analysis,l=0;l<this.listeners.length;l++)this.listeners[l](e.absEl.abcelem,e.absEl.tuneNumber,o.join(" "),c,{step:n,max:r,index:i,setSelection:u.bind(this)},s)}function d(){for(var e=0;e<this.selected.length;e++)this.selected[e].unhighlight(void 0,this.renderer.foregroundColor);this.selected=[]}function f(e,t){d.bind(this)();for(var n=0;n<this.staffgroups.length;n++)for(var r=this.staffgroups[n].voices,i=0;i<r.length;i++)for(var s=r[i].children,a=0;a<s.length;a++){var o=s[a].abcelem.startChar,c=s[a].abcelem.endChar;(t>o&&e<c||t===e&&t===c)&&(this.selected[this.selected.length]=s[a],s[a].highlight(void 0,this.selectionColor))}}function p(e){var t=e.getAttribute("class");t||(t="");for(var n=t.split(" "),r={},i=0;i<n.length;i++)r[n[i]]=!0;return r}function m(e,t){var n=[];for(var r in t)t.hasOwnProperty(r)&&n.push(r);e.setAttribute("class",n.join(" "))}return Lf=function(e,t){if(e.rangeHighlight=f,e.dragging)for(var s=0;s<e.selectables.length;s++){var a=e.selectables[s];"true"===a.svgEl.getAttribute("selectable")&&(a.svgEl.setAttribute("tabindex",0),a.svgEl.setAttribute("data-index",s),a.svgEl.addEventListener("keydown",r.bind(e)),a.svgEl.addEventListener("keyup",i.bind(e)),a.svgEl.addEventListener("focus",n.bind(e)))}for(var u=0;u<t.length;u++)t[u].addEventListener("touchstart",o.bind(e),{passive:!0}),t[u].addEventListener("touchmove",c.bind(e),{passive:!0}),t[u].addEventListener("touchend",l.bind(e),{passive:!0}),t[u].addEventListener("mousedown",o.bind(e)),t[u].addEventListener("mousemove",c.bind(e)),t[u].addEventListener("mouseup",l.bind(e))}}function nv(){if(Rf)return Vf;return Rf=1,Vf=function(e,t,n,r,i){return t+(r-t)/(n-e)*(i-e)}}function rv(){if(zf)return Ff;zf=1;var e=Bg(),t=Sg(),n=nv(),r=function(e){return void 0===e?0:Math.floor(Math.log(e)/Math.log(2))};function i(e,t,n,r){if(!e.children)return r;for(var i=0;i<e.children.length;i++){var s=e.children[i];t&&void 0!==s.top&&"flags.ugrace"===s.c?r=Math.max(r,s.top-n):t||void 0===s.bottom||"flags.ugrace"!==s.c||(r=Math.max(r,n-s.bottom+7))}return r}function s(e,t,n){var r=t.heads[e?0:t.heads.length-1],i=n.heads[e?0:n.heads.length-1],s=r.x;e&&(s+=r.w-.6);var a=i.x;return[s,a+=e?i.w:.6]}return Ff=function(a){if(0!==a.elems.length&&!a.allrests){var o=function(e,n){var r=e?t.STEP:-t.STEP;n&&(r*=.4);return r}(a.stemsUp,a.isgrace),c=a.elems[0],l=a.elems[a.elems.length-1],u=0,h=a.stemsUp?c.abcelem.maxpitch:c.abcelem.minpitch;u=i(c,a.stemsUp,h,u),u=i(l,a.stemsUp,h,u),u=Math.max(a.stemHeight,u+3);var d=function(e,t,n,r,i,s,a,o,c,l){var u=n-2,h=n-2,d=Math.round(r?Math.max(e+u,c+h):Math.min(e-u,o-h)),f=function(e,t,n,r){if(r)return 0;var i=e-t,s=n/2;i>s&&(i=s);i<-s&&(i=-s);return i}(i,s,t,a),p=d+Math.floor(f/2),m=d+Math.floor(-f/2);l||(r&&d<6||!r&&d>6)&&(p=6,m=6);return[p,m]}(a.average,a.elems.length,u,a.stemsUp,c.abcelem.averagepitch,l.abcelem.averagepitch,a.isflat,a.min,a.max,a.isgrace),f=s(a.stemsUp,c,l);a.addBeam({startX:f[0],endX:f[1],startY:d[0],endY:d[1],dy:o});for(var p=function(e,t,i,a,o){for(var c=[],l=[],u=0;u<e.length;u++){var h=e[u];if(!h.abcelem.rest){var d=h.heads[t?0:h.heads.length-1],f=d.x+(t?d.w:0),p=n(i.startX,i.startY,i.endX,i.endY,f),m=t?-1.5:1.5;a&&(m=2*m/3);var g=h.abcelem.duration;0===g&&(g=.25);for(var v=r(g);v<-3;v++){var b=-4-v;if(l[b]?l[b].single=!1:l[b]={x:f+(t?-.6:0),y:p+m*(b+1),durlog:v,single:!0},u>0&&h.abcelem.beambr&&h.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=s(t,e[u-1],h);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=h.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var _=l.length-1;_>=0;_--)if(u===e.length-1||r(e[u+1].abcelem.duration)>-_-4){var w=f,x=p+m*(_+1);l[_].single&&(w=0===u?f+5:f-5,x=n(i.startX,i.startY,i.endX,i.endY,w)+m*(_+1));var k={startX:l[_].x,endX:w,startY:l[_].y,endY:x,dy:o};if(void 0!==l[_].split){var S=l[_].split;k.endX<=S[S.length-1]&&(S[S.length-1]-=h.w),S.push(k.endX),k.split=l[_].split}c.push(k),l=l.slice(0,_)}}}return c}(a.elems,a.stemsUp,a.beams[0],a.isgrace,o),m=0;m<p.length;m++)a.addBeam(p[m]);!function(r,i,s,a,o){for(var c=0;c<r.length;c++){var l=r[c];if(!l.abcelem.rest){var u=!l.addExtra,h=u?o:l,d=l.heads[i?0:l.heads.length-1],f=.2,p=d.pitch+(i?f:-f),m=i?d.w:0;u||(m+=d.dx);var g=d.x+m,v=n(s.startX,s.startY,s.endX,s.endY,g),b=i?-.6:.6;i||(v-=a/2/t.STEP),u&&(m+=l.heads[0].dx),"noteheads.slash.quarter"===d.c&&(i?p+=1:p-=1);var y=new e(null,m,0,p,{type:"stem",pitch2:v,linewidth:b});y.setX(h.x),h.addRight(y)}}}(a.elems,a.stemsUp,a.beams[0],o,a.mainNote)}}}function iv(){if(qf)return jf;qf=1;var e=nv();function t(e){return e.stemsUp}return jf=function(n){if(n.anchor1&&n.anchor2){n.hasBeam=!!n.anchor1.parent.beam&&n.anchor1.parent.beam===n.anchor2.parent.beam;var r=n.anchor1.parent.beam;if(!n.hasBeam||r.elems[0]===n.anchor1.parent&&r.elems[r.elems.length-1]===n.anchor2.parent||(n.hasBeam=!1),n.hasBeam){var i=t(r)?n.anchor1.x+n.anchor1.w:n.anchor1.x;n.yTextPos=function(t,n,r){if(0===r.beams.length)return 0;r=r.beams[0];var i=t+(n-t)/2;return e(r.startX,r.startY,r.endX,r.endY,i)}(i,n.anchor2.x,r),n.yTextPos+=t(r)?3:-2,n.xTextPos=(o=i,c=n.anchor2.x,o+(c-o)/2),n.top=n.yTextPos+1,n.bottom=n.yTextPos-2,t(r)&&(n.endingHeightAbove=4)}else{n.startNote=Math.max(n.anchor1.parent.top,9)+4,n.endNote=Math.max(n.anchor2.parent.top,9)+4,"rest"===n.anchor1.parent.type&&"rest"!==n.anchor2.parent.type?n.startNote=n.endNote:"rest"===n.anchor2.parent.type&&"rest"!==n.anchor1.parent.type&&(n.endNote=n.startNote);for(var s=0,a=0;a<n.middleElems.length;a++)s=Math.max(s,n.middleElems[a].top);((s+=4)>n.startNote||s>n.endNote)&&(n.startNote=s,n.endNote=s),n.flatBeams&&(n.startNote=Math.max(n.startNote,n.endNote),n.endNote=Math.max(n.startNote,n.endNote)),n.yTextPos=n.startNote+(n.endNote-n.startNote)/2,n.xTextPos=n.anchor1.x+(n.anchor2.x+n.anchor2.w-n.anchor1.x)/2,n.top=n.yTextPos+1}}var o,c;delete n.middleElems,delete n.flatBeams}}function sv(){if(Yf)return Hf;Yf=1;var e=rv(),t=nv(),n=iv();function r(e){for(var t=0;t<e.elems.length;t++){var n=e.elems[t];if(n.top)for(var r=a(n,e),i=0;i<n.children.length;i++){var s=n.children[i];if("ornament"===s.klass&&"below"!==s.position&&s.bottom-1.5<r){var o=r-s.bottom+1.5;s.bottom+=o,s.top+=o,s.pitch+=o,r=n.top=s.top}}}}function i(e,t){var n=t.getChordDim();if(n){for(var r=0;r<e.length;r++){if(e[r]<n.left)return r>0&&t.putChordInLane(r),void(e[r]=n.right)}e.push(n.right),t.putChordInLane(e.length-1)}}function s(e){for(var t=0,n=0;n<e.children.length;n++){e.children[n].chordHeightBelow&&t++}return t}function a(e,n){return n=n.beams[0],t(n.startX,n.startY,n.endX,n.endY,e.x)}return Hf=function(t){for(var a=0;a<t.beams.length;a++)if("BeamElem"===t.beams[a].type){e(t.beams[a]),r(t.beams[a]);for(var o=0;o<t.beams[a].elems.length;o++)t.adjustRange(t.beams[a].elems[o])}for(t.staff.specialY.chordLines=function(e){var t,n,r,a=[0],o=[0];for(t=0;t<e.length;t++){for(n=0;n<e[t].children.length;n++)(r=e[t].children[n]).chordHeightAbove&&i(a,r);for(n=e[t].children.length-1;n>=0;n--)(r=e[t].children[n]).chordHeightBelow&&i(o,r)}(a.length>1||o.length>1)&&function(e,t){for(var n=0;n<e.length;n++){s(e[n]);for(var r=0;r<e[n].children.length;r++){var i=e[n].children[r];i.chordHeightAbove&&i.invertLane(t)}}}(e,a.length,o.length);return{above:a.length,below:o.length}}(t.children),a=0;a<t.otherchildren.length;a++){var c=t.otherchildren[a];"TripletElem"===c.type&&(n(c),t.adjustRange(c))}t.staff.top=Math.max(t.staff.top,t.top),t.staff.bottom=Math.min(t.staff.bottom,t.bottom)}}function av(){if(Qf)return Kf;Qf=1;var e=function(){if($f)return Wf;$f=1;var e=function(){};return e.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},e.layoutEnded=function(e){return e.i>=e.children.length},e.getNextX=function(e){return Math.max(e.minx,e.nextx)},e.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},e.layoutOneItem=function(e,t,n,r,i){var s=n.children[n.i];if(!s)return 0;var a=e-n.minx,o=n.durationindex+s.duration>0?r:0;if("note"===s.abcelem.el_type&&!s.abcelem.rest&&0!==n.voicenumber&&i){var c=i.children[i.i],l=c&&(s.abcelem.maxpitch<=c.abcelem.maxpitch+1&&s.abcelem.maxpitch>=c.abcelem.minpitch-1||s.abcelem.minpitch<=c.abcelem.maxpitch+1&&s.abcelem.minpitch>=c.abcelem.minpitch-1);if(l&&s.abcelem.minpitch===c.abcelem.minpitch&&s.abcelem.maxpitch===c.abcelem.maxpitch&&c.heads&&c.heads.length>0&&s.heads&&s.heads.length>0&&c.heads[0].c===s.heads[0].c&&(l=!1),l){var u=c.heads&&c.heads.length>0?c.heads[0].realWidth:c.fixed.w;s.adjustedWidth||(s.adjustedWidth=u+s.w),s.w=s.adjustedWidth;for(var h=0;h<s.children.length;h++){var d=s.children[h];d.name.indexOf("accidental")<0&&(d.adjustedWidth||(d.adjustedWidth=d.dx+u),d.dx=d.adjustedWidth)}}}var f=function(e,t){var n=0;return"note"!==e.type&&"bar"!==e.type||(n=t),-e.extraw+n}(s,o);return a<f&&(0===n.i||"bar"!==s.type||"part"!==n.children[n.i-1].type&&"tempo"!==n.children[n.i-1].type)&&(e+=f-a),s.setX(e),n.spacingduration=s.duration,n.minx=e+function(e){return e.w}(s),n.i!==n.children.length-1&&(n.minx+=s.minspacing),this.updateNextX(e,t,n),e},e.shiftRight=function(e,t){var n=t.children[t.i];n&&(n.setX(n.x+e),t.minx+=e,t.nextx+=e)},e.updateNextX=function(e,t,n){n.nextx=e+t*this.getSpacingUnits(n)},e.updateIndices=function(e){this.layoutEnded(e)||(e.durationindex+=e.children[e.i].duration,"bar"===e.children[e.i].type&&(e.durationindex=Math.round(64*e.durationindex)/64),e.i++)},Wf=e}();function t(t){for(var n=0;n<t.length;n++)if(!e.layoutEnded(t[n]))return!1;return!0}function n(e){return e.durationindex-(e.children[e.i]&&e.children[e.i].duration>0?0:5e-7)}function r(e,t){return!!(e&&e.staff&&e.staff.voices&&0!==e.staff.voices.length)&&(!!(t&&t.staff&&t.staff.voices&&0!==t.staff.voices.length)&&e.staff.voices[0]===t.staff.voices[0])}return Kf=function(i,s,a,o,c){var l,u=0,h=1e3,d=c;o.startx=d;var f=0;for(a&&console.log("init layout",i),l=0;l<o.voices.length;l++)e.beginLayout(d,o.voices[l]);for(var p=0;!t(o.voices);){for(f=null,l=0;l<o.voices.length;l++)e.layoutEnded(o.voices[l])||f&&!(n(o.voices[l])<f)||(f=n(o.voices[l]));var m=[],g=[];for(l=0;l<o.voices.length;l++){n(o.voices[l])-f>1e-7?g.push(o.voices[l]):m.push(o.voices[l])}p=0;var v=0;for(l=0;l<m.length;l++)e.getNextX(m[l])>d&&(d=e.getNextX(m[l]),p=e.getSpacingUnits(m[l]),v=m[l].spacingduration);u+=p,h=Math.min(h,p),a&&console.log("currentduration: ",f,u,h);var b=void 0;for(l=0;l<m.length;l++){var y=m[l];0===y.voicenumber&&(b=l);var _=void 0!==b&&m[b].voicenumber!==y.voicenumber?m[b]:void 0;r(y,_)||(_=void 0);var w=e.layoutOneItem(d,i,y,s,_),x=w-d;if(x>0){d=w;for(var k=0;k<l;k++)e.shiftRight(x,m[k])}}for(l=0;l<g.length;l++)g[l].spacingduration-=v,e.updateNextX(d,i,g[l]);for(l=0;l<m.length;l++){var S=m[l];e.updateIndices(S)}}for(l=0;l<o.voices.length;l++)e.getNextX(o.voices[l])>d&&(d=e.getNextX(o.voices[l]),p=e.getSpacingUnits(o.voices[l]));return function(e){for(var t=0,n=0;n<e.length;n++){var r=e[n];if(r.children.length>0){var i=r.children.length-1,s=r.children[i];if("bar"===s.abcelem.el_type){var a=s.children[0].x;a>t?t=a:s.children[0].x=t}}}}(o.voices),u+=p,o.setWidth(d),{spacingUnits:u,minSpace:h}}}function ov(){if(Zf)return Xf;function e(e,t,n){if(t)for(var r=0;r<t.length;r++)if(t[r].header){var i=n.calc(t[r].header,"voicefont","");e=Math.max(e,i.width)}return e}function t(e,t,r){if(e)for(var i=0;i<e.length;i++)n(t,e[i]),r=Math.max(r,e[i].getWidth());return r}function n(e,t){t.x=e}return Zf=1,Xf=function(n,r,i,s,a){var o,c,l=n.padding.left,u=0;for(o=0;o<i.length;o++)i[o].header&&(c=r.calc(i[o].header,"voicefont",""),u=Math.max(u,c.width));u=e(u,s,r),(u=e(u,a,r))&&(u+=r.calc("A","voicefont","").width);var h=0;return h=t(s,l+=u,h),l+(h=t(a,l,h))}}function cv(){if(ep)return Jf;ep=1;var e=ov();return Jf=function(t,n,r){var i=e(t,n.getTextSize,n.voices,n.brace,n.bracket),s=function(e,t){for(var n=0,r=0,i=0;i<e.voices.length;i++){for(var s=0,a=e.voices[i],o=0;o<a.children.length;o++){var c=a.children[o];if(s+=c.duration,c.duration){var l=(c.w+t)/c.duration;n=Math.max(n,l)}}r=Math.max(r,s)}return{totalDuration:r,minSpacing:n}}(n,r.minPadding),a=s.totalDuration,o=s.minSpacing*a;r.minWidth&&(o=Math.max(o,r.minWidth));var c=r.minPadding?r.minPadding/2:2;n.startx=i,n.w=o+i;for(var l=0;l<n.voices.length;l++){var u=n.voices[l];u.startx=i,u.w=o+i;for(var h=i,d=!1,f=0,p=0;p<u.children.length;p++){var m=u.children[p];d||(0!==m.duration?(d=!0,f=(o+i-h)/a,n.gridStart=h):(m.x=h,h+=m.w+m.minspacing)),d&&("center"===r.align?m.x=h+m.duration*f/2-m.w/2:0===m.duration?m.x=h+1-m.w:m.x=h+c-m.extraw,h+=m.duration*f);for(var g=0;g<m.children.length;g++){var v=m.children[g],b=v.dx?v.dx:0;v.x=m.x+b}}n.gridEnd=h}return o}}function lv(){if(np)return tp;np=1;var e=sv(),t=function(){if(Gf)return Uf;Gf=1;var e=Sg(),t=1;function n(e,n,r,i){if(e.specialY[r]){var s=e.specialY[r];i&&(s*=i),e.top+=s+t,n[r]=e.top}}function r(e,t,n){var r,c;for(r=0;r<t.children.length;r++)i(e,c=t.children[r],n);for(r=0;r<t.otherchildren.length;r++)switch((c=t.otherchildren[r]).type){case"CrescendoElem":s(e,c);break;case"DynamicDecoration":a(e,c);break;case"EndingElem":o(e,c);break;case"TieElem":var l=c.getYBounds();t.staff.top=Math.max(t.staff.top,l[0]),t.staff.top=Math.max(t.staff.top,l[1]),t.staff.bottom=Math.min(t.staff.bottom,l[0]),t.staff.bottom=Math.min(t.staff.bottom,l[1])}}function i(e,t,n){for(var r=0;r<t.children.length;r++){var i=t.children[r];for(var s in t.specialY)t.specialY.hasOwnProperty(s)&&i[s]&&(i.pitch=e[s],void 0===i.top&&("TempoElement"===i.type?c(e,i):l(e,i,n),t.pushTop(i.top),t.pushBottom(i.bottom)))}}function s(e,t){t.dynamicHeightAbove?t.pitch=e.dynamicHeightAbove:t.pitch=e.dynamicHeightBelow}function a(e,t){t.volumeHeightAbove?t.pitch=e.volumeHeightAbove:t.pitch=e.volumeHeightBelow}function o(e,t){t.pitch=e.endingHeightAbove-2}function c(e,t){if(t.pitch=e.tempoHeightAbove,t.top=e.tempoHeightAbove,t.bottom=e.tempoHeightAbove,t.note){var n=t.pitch-t.totalHeightInPitches+1;t.note.top=n,t.note.bottom=n;for(var r=0;r<t.note.children.length;r++){var i=t.note.children[r];i.top+=n,i.bottom+=n,i.pitch+=n,void 0!==i.pitch2&&(i.pitch2+=n)}}}function l(t,n,r){switch(n.type){case"part":n.top=t.partHeightAbove+n.height,n.bottom=t.partHeightAbove;break;case"text":case"chord":n.chordHeightAbove?(n.top=t.chordHeightAbove,n.bottom=t.chordHeightAbove):(n.top=t.chordHeightBelow,n.bottom=t.chordHeightBelow);break;case"lyric":n.lyricHeightAbove?(n.top=t.lyricHeightAbove,n.bottom=t.lyricHeightAbove):(n.top=t.lyricHeightBelow+r.vocal/e.STEP,n.bottom=t.lyricHeightBelow+r.vocal/e.STEP,n.pitch-=r.vocal/e.STEP);break;case"debug":n.top=t.chordHeightAbove,n.bottom=t.chordHeightAbove}void 0!==n.pitch&&void 0!==n.top||console.error("RelativeElement position not set.",n.type,n.pitch,n.top,t)}return Uf=function(i,s){for(var a,o=0;o<s.staffs.length;o++){var c=s.staffs[o],l={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(i.showDebug&&i.showDebug.indexOf("box")>=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),n(c,l,"lyricHeightAbove"),n(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+t,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+t,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(n(c,l,"dynamicHeightAbove"),n(c,l,"volumeHeightAbove")),n(c,l,"partHeightAbove"),n(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=i.spacing.vocal/e.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+t),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var u=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(u*=c.specialY.chordLines.below),c.bottom-=u+t}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+t):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+t):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+t),i.showDebug&&i.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var h=0;h<c.voices.length;h++)r(l,s.voices[c.voices[h]],i.spacing);if(void 0!==a){var d=a+(c.top-10),f=i.spacing.systemStaffSeparation/e.STEP-d;f>0&&(c.top+=f)}c.top+=i.spacing.staffTopMargin/e.STEP,a=2-c.bottom}}}(),n=av(),r=ov(),i=cv(),s=function(e,t,i,s,o,c,l){for(var u=r(e,s.getTextSize,s.voices,s.brace,s.bracket),h=i,d=0;d<8;d++){var f=n(h,e.minPadding,l,s,u);if(null===(h=a(c,o.stretchlast,t+e.padding.left,s.w,h,f.spacingUnits,f.minSpace,e.padding.left+e.padding.right)))break}return function(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=1;r<n.children.length-1;r++){var i=n.children[r];if(i.abcelem.rest&&("whole"===i.abcelem.rest.type||"multimeasure"===i.abcelem.rest.type)){var s=n.children[r-1],a=n.children[r+1];i.center(s,a)}}}(s.voices),s.w-u};function a(e,t,n,r,i,s,a,o){if(e)if(void 0===t){if(r/n<.66)return null}else if(!(1-(r+o)/n<t))return null;return Math.abs(n-r)<2?null:s>0?((i=(n-(r-s*i))/s)*a>50&&(i=50/a),i):null}return tp=function(n,r,a,o,c,l){var u,h,d=a;for(u=0;u<r.lines.length;u++){var f;if((h=r.lines[u]).staff)f=void 0!==l?i(n,h.staffGroup,l):s(n,d,o,h.staffGroup,r.formatting,u===r.lines.length-1,!1),Math.round(f)>Math.round(d)&&(d=f,c&&(u=-1))}for(u=0;u<r.lines.length;u++)if((h=r.lines[u]).staffGroup&&h.staffGroup.voices){for(var p=0;p<h.staffGroup.voices.length;p++)e(h.staffGroup.voices[p]);t(n,h.staffGroup)}for(u=0;u<r.lines.length;u++)(h=r.lines[u]).staffGroup&&h.staffGroup.setHeight();return d}}function uv(){if(up)return lp;up=1;return lp=function(){for(var e,t,n,r,i,s=0,a=arguments[s++],o=[];a;){if(t=/^[^\x25]+/.exec(a))o.push(t[0]);else if(t=/^\x25{2}/.exec(a))o.push("%");else{if(!(t=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(a)))throw"Huh ?!";if(null==(e=arguments[t[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(t[7])&&"number"!=typeof e)throw"Expecting number but found "+typeof e;switch(t[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=t[6]?e.toExponential(t[6]):e.toExponential();break;case"f":e=t[6]?parseFloat(e).toFixed(t[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&t[6]?e.substring(0,t[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(t[7])&&t[2]&&e>0?"+"+e:e,r=t[3]?"0"==t[3]?"0":t[3][1]:" ",i=t[5]-String(e).length,n=t[5]?str_repeat(r,i):"",o.push(t[4]?e+n:n+e)}a=a.substring(t[0].length)}return o.join("")},lp}function hv(){if(dp)return hp;return dp=1,hp=function(e){return parseFloat(e.toFixed(2))}}function dv(){if(pp)return fp;pp=1;var e=hv();return fp=function(t,n,r){var i,s=n.y;if(n.phrases)return c=t.paper.richTextLine(n.phrases,n.x,n.y,n.klass,n.anchor);if(n.lane){var a=.25*n.dim.font.size;s+=(n.dim.font.size+a)*n.lane}n.dim?(i=n.dim).attr.class=n.klass:i=t.controller.getFontAndAttr.calc(n.type,n.klass),n.anchor&&(i.attr["text-anchor"]=n.anchor),n["dominant-baseline"]&&(i.attr["dominant-baseline"]=n["dominant-baseline"]),i.attr.x=n.x,i.attr.y=s,n.centerVertically||(i.attr.y+=i.font.size),"debugfont"===n.type&&(console.log("Debug msg: "+n.text),i.attr.stroke="#ff0000"),n.cursor&&(i.attr.cursor=n.cursor);var o=n.text.replace(/\n\n/g,"\n \n");o=o.replace(/^\n/," \n"),i.font.box&&(r||t.paper.openGroup({klass:i.attr.class,fill:t.foregroundColor,"data-name":n.name}),"end"===i.attr["text-anchor"]?i.attr.x-=i.font.padding:"start"===i.attr["text-anchor"]&&(i.attr.x+=i.font.padding),i.attr.y+=i.font.padding,delete i.attr.class),n.noClass&&delete i.attr.class,i.attr.x=e(i.attr.x),i.attr.y=e(i.attr.y),n.name&&(i.attr["data-name"]=n.name);var c=t.paper.text(o,i.attr);if(i.font.box){var l=c.getBBox(),u=0;"middle"===i.attr["text-anchor"]?u=l.width/2+i.font.padding:"end"===i.attr["text-anchor"]&&(u=l.width+2*i.font.padding);var h=0;n.centerVertically&&(h=l.height-i.font.padding),t.paper.rect({"data-name":"box",x:Math.round(n.x-u),y:Math.round(s-h),width:Math.round(l.width+2*i.font.padding),height:Math.round(l.height+2*i.font.padding)}),r||(c=t.paper.closeGroup())}return c}}function fv(){if(gp)return mp;gp=1;var e=uv(),t=Sg(),n=dv();function r(t,n,r,i){return e("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t+r[0],n+i[0],t+r[1],n+i[1],t+r[2],n+i[2],t+r[3],n+i[3],t+r[4],n+i[4],t+r[5],n+i[5],t+r[6],n+i[6])}var i=function(i,s,a,o,c,l,u){var h;if(l){i.paper.openGroup({klass:i.controller.classes.generate("staff-extra voice-name"),"data-name":c});var d=a+(o-a)/2;d-=i.controller.getTextSize.baselineToCenter(l,"voicefont","staff-extra voice-name",0,1),n(i,{x:i.padding.left,y:d,text:l,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return"brace"===c?h=function(e,t,n,i,s){var a=i-n,o=r(t,n,[7.5,-8,21,0,18.5,-10.5,7.5],[0,a/5.5,a/3.14,a/2,a/2.93,a/4.88,0]);return o+=r(t,n,[0,17.5,-7.5,6.6,-5,20,0],[a/2,a/1.46,a/1.22,a,a/1.19,a/1.42,a/2]),e.paper.path({path:o,stroke:e.foregroundColor,fill:e.foregroundColor,class:e.controller.classes.generate(s),"data-name":s})}(i,s,a,o,c):"bracket"===c&&(h=function(n,r,i,s,a){r+=t.STEP;var o=.75*t.STEP,c=.75*t.STEP,l=s-i,u=e("M %f %f l %f %f l %f %f l %f %f z",r,i-c,0,l+2*c,o,0,0,-(l+2*c)),h=2*t.STEP,d=t.STEP;return u+=e("M %f %f q %f %f %f %f q %f %f %f %f z",r+o,i-c,.6*h,.2*d,h,-d,.1*-h,.3*d,-h,d+t.STEP),u+=e("M %f %f q %f %f %f %f q %f %f %f %f z",r+o,i+c+l,.6*h,.2*-d,h,d,.1*-h,.3*-d,-h,-d-t.STEP),n.paper.path({path:u,stroke:n.foregroundColor,fill:n.foregroundColor,class:n.controller.classes.generate(a),"data-name":a})}(i,s,a,o,c)),l&&(h=i.paper.closeGroup()),u.wrapSvgEl({el_type:c,startChar:-1,endChar:-1},h),h};return mp=function(e,n,r){var s=n.startVoice.staff.absoluteY-10*t.STEP;return n.endVoice&&n.endVoice.staff?n.endY=n.endVoice.staff.absoluteY-2*t.STEP:n.lastContinuedVoice&&n.lastContinuedVoice.staff?n.endY=n.lastContinuedVoice.staff.absoluteY-2*t.STEP:n.endY=n.startVoice.staff.absoluteY-2*t.STEP,i(e,n.x,s,n.endY,n.type,n.header,r)}}function pv(){if(bp)return vp;return bp=1,vp=function(e,t,n){return e.paper.path(t)}}function mv(){if(_p)return yp;_p=1;var e=uv(),t=pv(),n=hv();function r(e,t,r){return n(e+r*t)}var i=[[3.5,-4.8]],s=[[1.5,-1],[.3,-.3],[-3.5,3.8]],a=[[-1.5,2]],o=[[3,4],[3,-4]],c=[[-3,4],[-3,-4]];function l(e,t){for(var n="",i=0;i<e.length;i++)n+="l"+e[i][0]+" "+r(e[i][1],t,e[i][0]);return n}var u=function(n,r,u,h,d){var f,p=e("M %f %f",r,u);for(p+=l(i,d),f=0;f<h;f++)p+=l(o,d);for(p+=l(s,d),f=0;f<h;f++)p+=l(c,d);return p+=l(a,d)+"z",t(n,{path:p,highlight:"stroke",stroke:n.foregroundColor,class:n.controller.classes.generate("decoration"),"data-name":"glissando"})};return yp=function(e,t,n){t.anchor1&&t.anchor2&&t.anchor1.heads&&t.anchor2.heads&&0!==t.anchor1.heads.length&&0!==t.anchor2.heads.length||window.console.error("Glissando Element not set.");var i=e.calcY(t.anchor1.heads[0].pitch),s=e.calcY(t.anchor2.heads[0].pitch),a=t.anchor1.x+t.anchor1.w/2,o=t.anchor2.x+t.anchor2.w/2,c=function(e,t,n,r){var i=n-e,s=r-t;return Math.sqrt(i*i+s*s)}(a,i,o,s),l=t.anchor1.w/2+4,h=t.anchor2.w/2+4,d=function(e,t,n,r){return(r-t)/(n-e)}(a,i,o,s),f=r(i,d,l);r(s,d,-h);var p,m,g=(p=c-l-h,m=5,Math.max(2,Math.floor((p-2*m)/6))),v=u(e,a+l,f,g,d);return n.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},v),[v]}}function gv(){if(Sp)return kp;Sp=1;var e=hv();function t(){this.ingroup=!1}t.prototype.beginGroup=function(e,t){this.paper=e,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0,this.paper.openGroup()},t.prototype.isInGroup=function(){return this.ingroup},t.prototype.addPath=function(t){if(0!==(t=t||[]).length){t[0][0]="m",t[0][1]=e(t[0][1]-this.lastM[0]),t[0][2]=e(t[0][2]-this.lastM[1]),this.lastM[0]+=t[0][1],this.lastM[1]+=t[0][2],this.path.push(t[0]);for(var n=1,r=t.length;n<r;n++)"m"===t[n][0]&&(this.lastM[0]+=t[n][1],this.lastM[1]+=t[n][2]),this.path.push(t[n])}},t.prototype.endGroup=function(e,t){this.ingroup=!1;for(var n=0;n<this.path.length;n++)this.path[n].join(" ");this.path=[];var r=this.paper.closeGroup();return r&&(r.setAttribute("class",this.controller.classes.generate(e)),r.setAttribute("fill",this.controller.renderer.foregroundColor),r.setAttribute("stroke","none"),r.setAttribute("data-name",t)),r};var n=new t;return kp=n}function vv(){if(Mp)return Cp;Mp=1;var e=dv(),t=Ug(),n=gv();function r(e,t,n){var r=n;return"f"===e&&"f"===t&&(r=2*r/3),"p"===e&&"p"===t&&(r=5*r/6),"f"===e&&"z"===t&&(r=5*r/8),r}return Cp=function(i,s,a,o,c){var l,u;if(!o)return null;if(o.length>1&&o.indexOf(".")<0){var h=n.isInGroup()?"":c.klass;i.paper.openGroup({"data-name":c.name,klass:h});for(var d=0,f=0;f<o.length;f++){var p=o[f];u=t.getYCorr(p),(l=t.printSymbol(s+d,i.calcY(a+u),p,i.paper,{stroke:c.stroke,fill:c.fill}))?f<o.length-1&&(d+=r(p,o[f+1],t.getSymbolWidth(p))):e(i,{x:s,y:i.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"},!1)}return i.paper.closeGroup()}return u=t.getYCorr(o),(l=n.isInGroup()?t.printSymbol(s,i.calcY(a+u),o,i.paper,{"data-name":c.name}):t.printSymbol(s,i.calcY(a+u),o,i.paper,{klass:c.klass,stroke:c.stroke,fill:c.fill,"data-name":c.name}))?l:(e(i,{x:s,y:i.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"},!1),null)}}function bv(){if(Ap)return Pp;Ap=1;var e=uv(),t=dv(),n=pv(),r=hv();function i(t,n,i,s){return e("M %f %f L %f %f",r(t),r(n),r(i),r(s))}return Pp=function(e,r,s){e.paper.openGroup({klass:e.controller.classes.generate("triplet "+r.durationClass),"data-name":"triplet"}),r.hasBeam||function(e,t,r,s,a){r=e.calcY(r),a=e.calcY(a);var o=5,c="";c+=i(t,r,t,r+o),c+=i(s,a,s,a+o);var l=t+(s-t)/2,u=8,h=(a-r)/(s-t),d=l-u;c+=i(t,r,d,r+(d-t)*h);var f=l+u;c+=i(f,r+(f-t)*h,s,a),n(e,{path:c,stroke:e.foregroundColor,"data-name":"triplet-bracket"})}(e,r.anchor1.x,r.startNote,r.anchor2.x+r.anchor2.w,r.endNote),t(e,{x:r.xTextPos,y:e.calcY(r.yTextPos-1),text:""+r.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0,name:""+r.number},!0);var a=e.paper.closeGroup();return s.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},a),a}}function yv(){if(Rp)return Vp;Rp=1;var e=gv(),t=hv();return Vp=function(n,r,i,s,a,o,c){if(i<0||s<a){var l=t(a);a=t(s),s=l}else s=t(s),a=t(a);r=t(r);var u=t(r+i);if(n.firefox112){var h={x1:r+=i/2,x2:r,y1:s,y2:a,stroke:n.foregroundColor,"stroke-width":Math.abs(i)};return o&&(h.class=o),c&&(h["data-name"]=c),n.paper.lineToBack(h)}for(var d=[["M",r,s],["L",r,a],["L",u,a],["L",u,s],["z"]],f=(h={path:""},0);f<d.length;f++)h.path+=d[f].join(" ");return o&&(h.class=o),c&&(h["data-name"]=c),e.isInGroup()||(h.stroke="none",h.fill=n.foregroundColor),n.paper.pathToBack(h)}}function _v(){if(qp)return jp;qp=1;var e=function(){if(zp)return Fp;zp=1;var e=uv(),t=hv();return Fp=function(n,r,i,s,a,o,c){var l=n.foregroundColor;r=t(r),i=t(i);var u=t(s-c),h=t(s+c);if(n.firefox112){var d={x1:r,x2:i,y1:s+=c/2,y2:s,stroke:n.foregroundColor,"stroke-width":Math.abs(2*c)};return a&&(d.class=a),o&&(d["data-name"]=o),n.paper.lineToBack(d)}var f={path:e("M %f %f L %f %f L %f %f L %f %f z",r,u,i,u,i,h,r,h),stroke:"none",fill:l};return o&&(f["data-name"]=o),a&&(f.class=a),n.paper.pathToBack(f)}}();return jp=function(t,n,r,i,s,a,o){var c=t.calcY(i);return e(t,n,r,c,s,a,o)}}function wv(){if(Yp)return Hp;Yp=1;var e=dv(),t=yv(),n=_v(),r=vv();return Hp=function(i,s,a){void 0===s.pitch&&window.console.error(s.type+" Relative Element y-coordinate not set.");var o=i.calcY(s.pitch);switch(s.type){case"symbol":if(null===s.c)return null;var c="symbol";s.klass&&(c+=" "+s.klass),s.graphelem=r(i,s.x,s.pitch,s.c,{scalex:s.scalex,scaley:s.scaley,klass:i.controller.classes.generate(c),name:s.name});break;case"debug":s.graphelem=e(i,{x:s.x,y:i.calcY(15),text:""+s.c,type:"debugfont",klass:i.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:s.dim},!1);break;case"tabNumber":var l="tabnumberfont",u="abcjs-tab-number";s.isGrace&&(l="tabgracefont",o+=2.5,u="tab-grace"),s.graphelem=e(i,{x:s.x,y:o,text:""+s.c,type:l,klass:i.controller.classes.generate(u),anchor:"middle",centerVertically:!1,dim:s.dim,cursor:"default"},!1);break;case"barNumber":s.graphelem=e(i,{x:s.x,y:o,text:""+s.c,type:"measurefont",klass:i.controller.classes.generate("bar-number"),anchor:"middle",dim:s.dim,name:"bar-number"},!0);break;case"lyric":s.graphelem=e(i,{x:s.x,y:o,text:s.c,type:"vocalfont",klass:i.controller.classes.generate("lyric"),anchor:"middle",dim:s.dim,name:"lyric"},!1);break;case"chord":s.graphelem=e(i,{x:s.x,y:o,text:s.c,type:"gchordfont",klass:i.controller.classes.generate("chord"),anchor:"middle",dim:s.dim,lane:s.getLane(),name:"chord"},!1);break;case"decoration":s.graphelem=e(i,{x:s.x,y:o+6,text:s.c,type:"annotationfont",klass:i.controller.classes.generate("annotation"),anchor:s.anchor,centerVertically:!0,dim:s.dim},!1);break;case"text":s.graphelem=e(i,{x:s.x,y:o,text:s.c,type:"annotationfont",klass:i.controller.classes.generate("annotation"),anchor:"start",centerVertically:s.centerVertically,dim:s.dim,lane:s.getLane(),name:"annotation"},!1);break;case"multimeasure-text":s.graphelem=e(i,{x:s.x+s.w/2,y:o,text:s.c,type:"tempofont",klass:i.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:s.dim},!1);break;case"part":s.graphelem=e(i,{x:s.x,y:o,text:s.c,type:"partsfont",klass:i.controller.classes.generate("part"),anchor:"start",dim:s.dim,name:s.c},!0);break;case"bar":s.graphelem=t(i,s.x,s.linewidth+i.lineThickness,o,a||i.calcY(s.pitch2),null,"bar");break;case"stem":var h=s.linewidth>0?s.linewidth+i.lineThickness:s.linewidth-i.lineThickness;s.graphelem=t(i,s.x,h,o,i.calcY(s.pitch2),"abcjs-stem","stem");break;case"ledger":s.graphelem=n(i,s.x,s.x+s.w,s.pitch,"abcjs-ledger","ledger",.35+i.lineThickness)}return 1!==s.scalex&&s.graphelem&&function(e,t,n,r,i,s){e.setAttributeOnElement(t,{style:"transform:scale("+n+","+r+");transform-origin:"+i+"px "+s+"px;"})}(i.paper,s.graphelem,s.scalex,s.scaley,s.x,o),s.graphelem}}function xv(){if($p)return Wp;$p=1;var e=function(){if(Gp)return Up;Gp=1;var e=wv(),t=dv();return Up=function(n,r){var i=r.x;void 0===r.pitch&&window.console.error("Tempo Element y-coordinate not set."),r.tempo.el_type="tempo";var s,a=n.calcY(r.pitch)+2;if(r.tempo.preString){s=t(n,{x:i,y:a,text:r.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0);var o=n.controller.getTextSize.calc(r.tempo.preString,"tempofont","tempo",s).width;i+=o+o/r.tempo.preString.length}if(r.note){r.note.setX(i);for(var c=0;c<r.note.children.length;c++)e(n,r.note.children[c],i);i+=r.note.w+5;var l="= "+r.tempo.bpm;s=t(n,{x:i,y:a,text:l,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"beats"});var u=n.controller.getTextSize.calc(l,"tempofont","tempo",s).width;i+=u+u/l.length}r.tempo.postString&&t(n,{x:i,y:a,text:r.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"post"},!0)}}(),t=wv(),n=Sg(),r=Ig(),i=gv();return Wp=function(s,a,o,c,l){if(!a.invisible){var u=a.children.length>0&&"TempoElement"===a.children[0].type;a.elemset=[],i.beginGroup(s.paper,s.controller);for(var h=0;h<a.children.length;h++){var d=a.children[h];if("TempoElement"===d.type)e(s,d);else{var f=t(s,d,o);"symbol"===d.type&&d.c&&d.c.indexOf("notehead")>=0&&f.setAttribute("class","abcjs-notehead")}}var p=a.type;if(("note"===a.type||"rest"===a.type)&&(a.counters=s.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*a.durationClass)/1e3).replace(/\./g,"-"),a.abcelem.pitches))for(var m=0;m<a.abcelem.pitches.length;m++)p+=" p"+a.abcelem.pitches[m].pitch;var g=i.endGroup(p,a.type);if(g){if(a.cloned&&(a.cloned.overrideClasses=g.className.baseVal),a.overrideClasses){var v=g.classList&&g.classList.length>0?g.classList[0]+" ":"";g.setAttribute("class",v+a.overrideClasses)}if(u)a.startChar=a.abcelem.startChar,a.endChar=a.abcelem.endChar,c.add(a,g,!1,l);else{a.elemset.push(g);var b=!1;"note"!==a.type&&"tabNumber"!==a.type||(b=!0),c.add(a,g,b,l)}}else a.elemset.length>0&&c.add(a,a.elemset[0],"note"===a.type,l);if(a.klass&&r(a.elemset,"mark","","#00ff00"),a.hint&&r(a.elemset,"abcjs-hint","",null),a.abcelem.abselem=a,a.heads&&a.heads.length>0){a.notePositions=[];for(var y=0;y<a.heads.length;y++)a.notePositions.push({x:a.heads[y].x+a.heads[y].w/2,y:l.zero-a.heads[y].pitch*n.STEP})}}}}function kv(){if(Qp)return Kp;Qp=1;var e=mv(),t=function(){if(xp)return wp;xp=1;var e=uv(),t=pv(),n=hv(),r=function(r,i,s,a,o,c,l){i=n(i),s=n(s),a=n(a),o=n(o),c=n(c),l=n(l);var u=e("M %f %f L %f %f M %f %f L %f %f",c,i,l,s,c,a,l,o);return t(r,{path:u,highlight:"stroke",stroke:r.foregroundColor,class:r.controller.classes.generate("dynamics decoration"),"data-name":"dynamics"})};return wp=function(e,t,n){void 0===t.pitch&&window.console.error("Crescendo Element y-coordinate not set.");var i,s=e.calcY(t.pitch)+4,a=t.anchor1?t.anchor1.x:0,o=t.anchor2?t.anchor2.x:800;return i="<"===t.dir?r(e,s+4,s,s+4,s+8,a,o):r(e,s,s+4,s+8,s+4,a,o),n.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},i),[i]}}(),n=function(){if(Tp)return Ep;Tp=1;var e=vv();return Ep=function(t,n,r){void 0===n.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var i=e(t,n.anchor.x,n.pitch,n.dec,{scalex:1,scaley:1,klass:t.controller.classes.generate("decoration dynamics"),fill:t.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:n.dec},i),[i]}}(),r=bv(),i=function(){if(Ip)return Np;Ip=1;var e=uv(),t=dv(),n=pv(),r=hv();return Np=function(i,s,a,o,c){void 0===s.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=r(i.calcY(s.pitch)),u="";s.anchor1&&(a=r(s.anchor1.x+s.anchor1.w),u+=e("M %f %f L %f %f ",a,l,a,r(l+20))),s.anchor2&&(o=r(s.anchor2.x),u+=e("M %f %f L %f %f ",o,l,o,r(l+20))),u+=e("M %f %f L %f %f ",a,l,o,l),i.paper.openGroup({klass:i.controller.classes.generate("ending"),"data-name":"ending"}),n(i,{path:u,stroke:i.foregroundColor,fill:i.foregroundColor,"data-name":"line"}),s.anchor1&&t(i,{x:r(a+5),y:r(i.calcY(s.pitch-.5)),text:s.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:s.text});var h=i.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},h),[h]}}(),s=function(){if(Dp)return Op;Dp=1;var e=uv(),t=hv(),n=function(e,t,n){e.anchor1&&e.anchor2?e.anchor1.pitch===e.anchor2.pitch&&0===e.internalNotes.length?e.isTie=!0:e.isTie=!1:e.isTie=!0,e.isTie?(e.calcTieDirection(),e.calcX(t,n),e.calcTieY()):(e.calcSlurDirection(),e.calcX(t,n),e.calcSlurY()),e.avoidCollisionAbove()},r=function(n,r,i,s,a,o,c,l,u){var h=l?1.2:1.5;r=t(r+6),i=t(i+4),s+=o?h:-h,a+=o?h:-h;var d,f=t(n.calcY(s)),p=t(n.calcY(a)),m=i-r,g=p-f,v=Math.sqrt(m*m+g*g),b=m/v,y=g/v,_=v/3.5,w=l?10:25,x=(o?-1:1)*Math.min(w,Math.max(4,_)),k=t(r+_*b-x*y),S=t(f+_*y+x*b),C=t(i-_*b-x*y),M=t(p-_*y+x*b);if(c?c+=" slur":c="slur",c+=l?" tie":" legato",u){c+=" dotted";var E=e("M %f %f C %f %f %f %f %f %f",r,f,k,S,C,M,i,p);d=n.paper.path({path:E,stroke:n.foregroundColor,fill:"none","stroke-dasharray":"5 5",class:n.controller.classes.generate(c),"data-name":l?"tie":"slur"})}else{var T=e("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",r,f,k,S,C,M,i,p,t(C-2*y),t(M+2*b),t(k-2*y),t(S+2*b),r,f);d=n.paper.path({path:T,stroke:"none",fill:n.foregroundColor,class:n.controller.classes.generate(c),"data-name":l?"tie":"slur"})}return d};return Op=function(e,t,i,s,a){n(t,i,s);var o="";t.anchor1?o+="abcjs-start-m"+t.anchor1.parent.counters.measure+"-n"+t.anchor1.parent.counters.note:o+="abcjs-start-edge",t.anchor2?o+=" abcjs-end-m"+t.anchor2.parent.counters.measure+"-n"+t.anchor2.parent.counters.note:o+=" abcjs-end-edge",t.hint&&(o="abcjs-hint");var c=t.fixedY?1.5:0,l=r(e,t.startX,t.endX,t.startY+c,t.endY+c,t.above,o,t.isTie,t.dotted),u=-1;t.anchor1&&!t.isTie&&(u=t.anchor1.parent.abcelem.startChar-1);var h=-1;return t.anchor2&&!t.isTie&&(h=t.anchor2.parent.abcelem.endChar+1),a.wrapSvgEl({el_type:"slur",startChar:u,endChar:h},l),[l]}}(),a=function(){if(Bp)return Lp;Bp=1;var e=pv(),t=hv();function n(e,n,r,i,s,a){r=t(e.calcY(r)),s=t(e.calcY(s)),n=t(n),i=t(i);var o=t(r+a);return"M"+n+" "+r+" L"+i+" "+s+"L"+i+" "+t(s+a)+" L"+n+" "+o+"z"}function r(e,t,n,r,i){return(i-n)/(r-t)}function i(e,t,n,r){return t+(r-e)*n}return Lp=function(t,s){if(0!==s.beams.length){for(var a="",o=0;o<s.beams.length;o++){var c=s.beams[o];if(c.split){for(var l=r(t,c.startX,c.startY,c.endX,c.endY),u=[],h=0;h<c.split.length;h+=2)u.push([c.split[h],c.split[h+1]]);for(h=0;h<u.length;h++){var d=i(c.startX,c.startY,l,u[h][0]),f=i(c.startX,c.startY,l,u[h][1]);a+=n(t,u[h][0],d,u[h][1],f,c.dy)}}else a+=n(t,c.startX,c.startY,c.endX,c.endY,c.dy)}var p=("abcjs-d"+s.duration).replace(/\./g,"-"),m=t.controller.classes.generate("beam-elem "+p);return[e(t,{path:a,stroke:"none",fill:t.foregroundColor,class:m})]}}}(),o=dv(),c=xv();function l(e){return"rest"===e.type&&!(!e.abcelem||!e.abcelem.rest||"spacer"===e.abcelem.rest.type)}return Kp=function(u,h,d,f,p){var m=h.w-1;u.staffbottom=h.staff.bottom;var g,v,b=u.foregroundColor;if(h.color&&(u.foregroundColor=h.color),h.header){var y=o(u,{x:u.padding.left,y:u.calcY(h.headerPosition),text:h.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0,name:"voice-name"},!0);f.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:h.header},y)}var _=!1;for(g=0;g<h.children.length;g++){"note"!==(v=h.children[g]).type&&"rest"!==v.type||(_=!0);var w=!1;"staff-extra"===v.type||u.controller.classes.isInMeasure()||(u.controller.classes.startMeasure(),w=!0),h.staff.isTabStaff&&(v.invisible=!1,"bar"==v.type&&v.abcelem.lastBar&&(d=h.topLine)),c(u,v,h.barto||g===h.children.length-1?d:0,f,p),("note"===v.type||l(v))&&u.controller.classes.incrNote(),"bar"===v.type&&!w&&_&&u.controller.classes.incrMeasure()}for(u.controller.classes.startMeasure(),g=0;g<h.beams.length;g++){var x=h.beams[g];"bar"===x?u.controller.classes.incrMeasure():a(u,x,f)}for(u.controller.classes.startMeasure(),g=0;g<h.otherchildren.length;g++)if("bar"===(v=h.otherchildren[g]))u.controller.classes.incrMeasure();else switch(v.type){case"GlissandoElem":v.elemset=e(u,v,f);break;case"CrescendoElem":v.elemset=t(u,v,f);break;case"DynamicDecoration":v.elemset=n(u,v,f);break;case"TripletElem":r(u,v,f);break;case"EndingElem":v.elemset=i(u,v,h.startx+10,m,f);break;case"TieElem":v.elemset=s(u,v,h.startx+10,m,f);break;default:console.log(v),c(u,v,h.startx+10,m,f,p)}u.foregroundColor=b}}function Sv(){if(im)return rm;im=1;var e=nm?tm:(nm=1,tm=function(e,t){var n=Math.round(e.y),r=(e.controller.width-t)/2,i=r+t,s="M "+r+" "+n+" L "+i+" "+n+" L "+i+" "+(n+1)+" L "+r+" "+(n+1)+" L "+r+" "+n+" z";e.paper.pathToBack({path:s,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}),t=dv();return rm=function(n,r,i){for(var s=0;s<r.rows.length;s++){var a=r.rows[s];if(a.absmove)n.absolutemoveY(a.absmove);else if(a.move)n.moveY(a.move);else if(a.text||a.phrases){var o=a.left?a.left:0,c=t(n,{x:o,y:n.y,text:a.text,phrases:a.phrases,"dominant-baseline":a["dominant-baseline"],type:a.font,klass:a.klass,name:a.name,anchor:a.anchor});a.absElemType&&i.wrapSvgEl({el_type:a.absElemType,name:a.name,startChar:a.startChar,endChar:a.endChar,text:a.text},c)}else if(a.separator)e(n,a.separator);else if(a.startGroup)n.paper.openGroup({klass:a.klass,"data-name":a.name});else if(a.endGroup){var l=n.paper.closeGroup();a.absElemType&&i.wrapSvgEl({el_type:a.absElemType,name:a.name,startChar:a.startChar,endChar:a.endChar,text:""},l)}}}}function Cv(){if(am)return sm;am=1;var e=Sg(),t=fv(),n=kv(),r=function(){if(Zp)return Xp;Zp=1;var e=_v();return Xp=function(t,n,r,i,s,a){var o="abcjs-top-line",c=2;s&&(c=s),t.paper.openGroup({prepend:!0,klass:t.controller.classes.generate("abcjs-staff")});var l=0,u=0;if(1===i)e(t,n,r,6,o,null,a+t.lineThickness),l=t.calcY(10),u=t.calcY(2);else for(var h=i-1;h>=0;h--){var d=(h+1)*c;u=t.calcY(d),0===l&&(l=u),e(t,n,r,d,o,null,a+t.lineThickness),o=void 0}return t.paper.closeGroup(),[l,u]}}(),i=em?Jp:(em=1,Jp=function(e,t,n){var r=e.paper.rectBeneath(t);return n&&e.paper.text(n,{x:0,y:t.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),r}),s=yv(),a=Sv();function o(n,r,i,s,a){if(i)for(var o=0;o<i.length;o++)i[o].isStartVoice(s)&&(i[o].startY=r-10*e.STEP,i[o].elemset=t(n,i[o],a))}function c(t,n,r){for(var s=0;s<r.length;s++)for(var a=n[r[s]].children,o=0;o<a.length;o++){var c=a[o],l=c.getFixedCoords();if(!c.invisible&&void 0!==l.t&&void 0!==l.b){var u=(l.t-l.b)*e.STEP;i(t,{x:l.x,y:t.calcY(l.t),width:l.w,height:u,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var h=0;h<c.children.length;h++){var d=c.children[h],f=d.getChordDim();if(f){var p=t.calcY(d.pitch);p+=d.dim.font.size*d.getLane(),i(t,{x:f.left,y:p,width:f.right-f.left,height:d.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}return sm=function(t,l,u,h){for(var d,f,p,m=t.y,g=0;g<l.staffs.length;g++){var v=l.staffs[g];t.moveY(e.STEP,v.top),v.absoluteY=t.y,t.showDebug&&(t.showDebug.indexOf("box")>=0&&v.voices&&c(t,l.voices,v.voices),t.showDebug.indexOf("grid")>=0&&(t.paper.dottedLine({x1:t.padding.left,x2:t.padding.left+t.controller.width,y1:m,y2:m,stroke:"#0000ff"}),i(t,{x:t.padding.left,y:t.calcY(v.originalTop),width:t.controller.width,height:t.calcY(v.originalBottom)-t.calcY(v.originalTop),fill:t.foregroundColor,stroke:t.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),d=0,E(v,"chordHeightAbove"),E(v,"chordHeightBelow"),E(v,"dynamicHeightAbove"),E(v,"dynamicHeightBelow"),E(v,"endingHeightAbove"),E(v,"lyricHeightAbove"),E(v,"lyricHeightBelow"),E(v,"partHeightAbove"),E(v,"tempoHeightAbove"),E(v,"volumeHeightAbove"),E(v,"volumeHeightBelow"))),t.moveY(e.STEP,-v.bottom),t.showDebug&&t.showDebug.indexOf("grid")>=0&&t.paper.dottedLine({x1:t.padding.left,x2:t.padding.left+t.controller.width,y1:t.y,y2:t.y,stroke:"#0000aa"})}for(var b=2,y=0,_=0;_<l.voices.length;_++){var w=l.voices[_].staff,x=l.voices[_].tabNameInfos;if(t.y=w.absoluteY,t.controller.classes.incrVoice(),!l.voices[_].duplicate){if(f||(f=t.calcY(10)),p=t.calcY(b),0!==w.lines){w.linePitch&&(b=w.linePitch),t.controller.classes.newMeasure();var k=r(t,l.startx,l.w,w.lines,w.linePitch,.35);p=k[1],w.bottomLine=p,w.topLine=k[0],w.hasTab&&(y=w.topLine),w.hasStaff&&(y=w.hasStaff.topLine,l.voices[_].barto=!0,l.voices[_].topLine=f)}o(t,w.absoluteY,l.brace,_,u),o(t,w.absoluteY,l.bracket,_,u)}n(t,l.voices[_],y,u,{top:m,zero:t.y,height:l.height*e.STEP});var S=0;if(x){var C={rows:[]};C.rows.push({absmove:p+2});C.rows.push({left:l.startx+8,text:x.name,font:"tablabelfont",klass:"text instrument-name",anchor:"start"}),C.rows.push({move:x.textSize.height}),a(t,C),S=x.textSize.height}t.controller.classes.newMeasure(),l.voices[_].duplicate||(y=t.calcY(2+S))}t.controller.classes.newMeasure();var M=l.staffs.length;function E(n,r){var s=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(n.positionY&&n.positionY[r]){var a=n.specialY[r]*e.STEP;"chordHeightAbove"===r&&n.specialY.chordLines&&n.specialY.chordLines.above&&(a*=n.specialY.chordLines.above),"chordHeightBelow"===r&&n.specialY.chordLines&&n.specialY.chordLines.below&&(a*=n.specialY.chordLines.below),i(t,{x:t.padding.left,y:t.calcY(n.positionY[r]),width:t.controller.width,height:a,fill:s[d],stroke:s[d],"fill-opacity":.4,"stroke-opacity":.4},r.substr(0,4)),(d+=1)>6&&(d=0)}}M>1&&(f=l.staffs[0].topLine,p=l.staffs[M-1].bottomLine,s(t,l.startx,.6,f,p,null)),t.y=m}}function Mv(){if(dm)return hm;dm=1;var e=Cv(),t=cm?om:(cm=1,om=function(e,t,n,r){var i=(t+e.padding.left+e.padding.right)*n,s=(e.y+e.padding.bottom)*n;if(e.isPrint&&(s=Math.max(s,1056)),""!==e.ariaLabel){var a="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(a+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(a);var o=e.ariaLabel?e.ariaLabel:a;e.paper.setAttribute("aria-label",o)}e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var c={overflow:"hidden"};"resize"===r?e.paper.setResponsiveWidth(i,s):(c.width="",c.height=s+"px",n<1?(c.width=i+"px",e.paper.setSize(i/n,s/n)):e.paper.setSize(i,s)),e.paper.setScale(n),e.paper.setParentStyles(c)}),n=Sv(),r=Sg(),i=function(){if(um)return lm;um=1;var e=Og(),t=Dg();function n(e,t,n){this.elements=[],this.paper=e,this.tuneNumber=n,this.selectTypes=t}return n.prototype.getElements=function(){return this.elements},n.prototype.add=function(e,t,n,r){if(this.canSelect(e)){var i;i=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,i);var s={absEl:e,svgEl:t,isDraggable:n};void 0!==r&&(s.staffPos=r),this.elements.push(s)}},n.prototype.canSelect=function(e){return!(!1===this.selectTypes||!e||!e.abcelem||!0!==this.selectTypes&&!(void 0===this.selectTypes?"note"===e.abcelem.el_type||"tabNumber"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0))},n.prototype.wrapSvgEl=function(n,r){var i={tuneNumber:this.tuneNumber,abcelem:n,elemset:[r],highlight:e,unhighlight:t};this.add(i,r,!1)},lm=n}();function s(t,n,i,s){e(t,n,i,s);var a=n.height*r.STEP;return t.y+=a,n}function a(e,t,n,i){var s=-(n.staffs[n.staffs.length-1].bottom-2),a=(i.staffs[0].top-10+s)*r.STEP;a<t&&e.moveY(t-a)}return hm=function(e,r,o,c,l,u,h,d,f,p){var m=new i(e.paper,d,f),g={};r.shouldAddClasses&&(g.klass="abcjs-meta-top"),e.paper.openGroup(g),e.moveY(e.padding.top),n(e,o.topText,m),e.paper.closeGroup(),e.moveY(e.spacing.music);for(var v=[],b=0;b<o.lines.length;b++){r.incrLine();var y=o.lines[b];if(y.staff){r.shouldAddClasses&&(g.klass="abcjs-staff-wrapper abcjs-l"+r.lineNumber),e.paper.openGroup(g),y.vskip&&e.moveY(y.vskip),v.length>=1&&a(e,e.spacing.staffSeparation,v[v.length-1],y.staffGroup);var _=s(e,y.staffGroup,m,b);_.line=p+b,v.push(_),e.paper.closeGroup()}else y.nonMusic&&(r.shouldAddClasses&&(g.klass="abcjs-non-music"),e.paper.openGroup(g),n(e,y.nonMusic,m),e.paper.closeGroup())}return r.reset(),o.bottomText&&o.bottomText.rows&&o.bottomText.rows.length>0&&(r.shouldAddClasses&&(g.klass="abcjs-meta-bottom"),e.paper.openGroup(g),e.moveY(24),n(e,o.bottomText,m),e.paper.closeGroup()),t(e,l,h,u),{staffgroups:v,selectables:m.getElements()}}}function Ev(){if(gm)return mm;gm=1;var e=Sg(),t=Qg(),n=Xg(),r=_f?yf:(_f=1,yf=function(e,t,n,r,i,s){var a,o=e.text;this.rows=[],t&&this.rows.push({move:t});var c=n.calc("textfont","defined-text");if(""===o)this.rows.push({move:2*c.attr["font-size"]});else if("string"==typeof o)this.rows.push({move:c.attr["font-size"]/2}),this.rows.push({left:r,text:o,font:"textfont",klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),a=s.calc(o,"textfont","defined-text"),this.rows.push({move:a.height});else if(o){for(var l=0,u=r,h="textfont",d=0;d<o.length;d++)h=o[d].font?o[d].font:"textfont",this.rows.push({left:u,text:o[d].text,font:h,klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),u+=(a=s.calc(o[d].text,n.calc(h,"defined-text").font,"defined-text")).width+a.height/2,l=Math.max(l,a.height);this.rows.push({move:l})}else if(1===e.length){var f=i/2;this.rows.push({left:f,text:e[0].text,font:"textfont",klass:"defined-text",anchor:"middle",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),a=s.calc(e[0].text,"textfont","defined-text"),this.rows.push({move:a.height})}}),i=xf?wf:(xf=1,wf=function(e,t,n){this.rows=[],e&&this.rows.push({move:e}),this.rows.push({separator:t,absElemType:"separator"}),n&&this.rows.push({move:n})}),s=Sf?kf:(Sf=1,kf=function(e,t,n,r,i,s){this.rows=[],e&&this.rows.push({move:e});var a=t.titleleft?"start":"middle",o=t.titleleft?i:r;this.rows.push({left:o,text:n.text,font:"subtitlefont",klass:"text subtitle",anchor:a,startChar:n.startChar,endChar:n.endChar,absElemType:"subtitle",name:"subtitle"});var c=s.calc(n.text,"subtitlefont","text subtitle");this.rows.push({move:c.height})}),a=function(){if(Af)return Pf;Af=1;const e=Zg(),t=Jg();return Pf=function(n,r,i,s,a,o,c,l,u,h){if(this.rows=[],n.header&&o){var d=h.calc("X","headerfont","abcjs-header abcjs-meta-top").height;e(this.rows,{marginLeft:c,text:n.header.left,font:"headerfont",klass:"header meta-top",marginTop:-d,info:r.header,name:"header"},h),e(this.rows,{marginLeft:c+a/2,text:n.header.center,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"middle",info:r.header,name:"header"},h),e(this.rows,{marginLeft:c+a,text:n.header.right,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"end",info:r.header,name:"header"},h)}o&&this.rows.push({move:l.top});var f=i.titleleft?"start":"middle",p=i.titleleft?c:c+a/2;if(n.title){var m=u?"abcjs-title":"";t(this.rows,n.title,"titlefont",m,"title",p,{marginTop:l.title,anchor:f,absElemType:"title",info:r.title},h)}if(s.length)for(var g=0;g<s.length&&s[g].subtitle;)m=u?"abcjs-text abcjs-subtitle":"",t(this.rows,s[g].subtitle.text,"subtitlefont",m,"subtitle",p,{marginTop:l.subtitle,anchor:f,absElemType:"subtitle",info:s[g].subtitle},h),g++;if(n.rhythm||n.origin||n.composer){if(this.rows.push({move:l.composer}),n.rhythm&&n.rhythm.length>0){var v=!(!n.composer&&!n.origin);m=u?"abcjs-rhythm":"",e(this.rows,{marginLeft:c,text:n.rhythm,font:"infofont",klass:m,absElemType:"rhythm",noMove:v,info:r.rhythm,name:"rhythm"},h)}n.composer&&n.composer,n.origin&&n.origin;var b=n.composer?n.composer:"";n.origin&&("string"==typeof b&&"string"==typeof n.origin?b+=" ("+n.origin+")":"string"==typeof b&&"string"!=typeof n.origin?((b=[{text:b}]).push({text:" ("}),(b=b.concat(n.origin)).push({text:")"})):(b.push({text:" ("}),(b=b.concat(n.origin)).push({text:")"}))),b&&(m=u?"abcjs-composer":"",t(this.rows,b,"composerfont",m,"composer",c+a,{anchor:"end",absElemType:"composer",info:r.composer,ingroup:!0},h))}n.author&&n.author.length>0&&(m=u?"abcjs-author":"",t(this.rows,n.author,"composerfont",m,"author",c+a,{anchor:"end",absElemType:"author",info:r.author},h)),n.partOrder&&n.partOrder.length>0&&(m=u?"abcjs-part-order":"",t(this.rows,n.partOrder,"partsfont",m,"part-order",c,{absElemType:"partOrder",info:r.partOrder,anchor:"start"},h))}}(),o=function(){if(If)return Nf;If=1;const e=Zg(),t=Jg();function n(e,t,n,r,i,s,a){this.rows=[],e.unalignedWords&&e.unalignedWords.length>0&&this.unalignedWords(e.unalignedWords,r,i,s,a),this.extraText(e,r,i,s,a),e.footer&&n&&this.footer(e.footer,t,r,a)}function r(e,n,r,i,s,a,o){r&&(n&&(r="string"==typeof r?n+r:[{text:n}].concat(r)),t(e,r,"historyfont",s=a?"abcjs-extra-text "+s:"","description",i,{absElemType:"extraText",anchor:"start"},o))}function i(n,r,i,s,a,o,c,l,u,h,d,f){if(i){l=d?"abcjs-extra-text "+l:"";var p=f.calc("A",a,l);if("string"==typeof i)r&&(i=r+"\n"+i),e(n,{marginLeft:s,text:i,font:a,absElemType:"extraText",name:u,"dominant-baseline":"middle",klass:l},f);else{n.push({startGroup:c,klass:l,name:u}),n.push({move:h.info}),r&&(e(n,{marginLeft:s,text:r,font:a,absElemType:"extraText",name:u,"dominant-baseline":"middle"},f),n.push({move:3*p.height/4}));for(var m=0;m<i.length;m++)t(n,i[m],a,"",u,s,{anchor:"start"},f),m<i.length-1&&"string"==typeof i[m]&&"string"!=typeof i[m+1]&&n.push({move:3*p.height/4});n.push({endGroup:c,absElemType:o,startChar:-1,endChar:-1,name:u}),n.push({move:p.height})}}}return n.prototype.unalignedWords=function(e,t,n,r,s){var a=r?"abcjs-unaligned-words":"",o="wordsfont",c=s.calc("i",o,a);this.rows.push({move:n.words}),i(this.rows,"",e,t,o,"unalignedWords","unalignedWords",a,"unalignedWords",n,r,s),this.rows.push({move:c.height})},n.prototype.extraText=function(e,t,n,s,a){r(this.rows,"Book: ",e.book,t,"abcjs-book",s,a),r(this.rows,"Source: ",e.source,t,"abcjs-source",s,a),r(this.rows,"Discography: ",e.discography,t,"abcjs-discography",s,a),i(this.rows,"Notes:",e.notes,t,"historyfont","extraText","notes","abcjs-notes","description",n,s,a),r(this.rows,"Transcription: ",e.transcription,t,"abcjs-transcription",s,a),i(this.rows,"History:",e.history,t,"historyfont","extraText","history","abcjs-history","description",n,s,a),r(this.rows,"Copyright: ",e["abc-copyright"],t,"abcjs-copyright",s,a),r(this.rows,"Creator: ",e["abc-creator"],t,"abcjs-creator",s,a),r(this.rows,"Edited By: ",e["abc-edited-by"],t,"abcjs-edited-by",s,a)},n.prototype.footer=function(t,n,r,i){var s="header meta-bottom",a="footerfont";this.rows.push({startGroup:"footer",klass:s}),e(this.rows,{marginLeft:r,text:t.left,font:a,klass:s,name:"footer"},i),e(this.rows,{marginLeft:r+n/2,text:t.center,font:a,klass:s,anchor:"middle",name:"footer"},i),e(this.rows,{marginLeft:r+n,text:t.right,font:a,klass:s,anchor:"end",name:"footer"},i)},Nf=n}(),c=tv(),l=lv(),u=function(){if(ip)return rp;ip=1;var e=function(e){this.shouldAddClasses=e.shouldAddClasses,this.reset()};return e.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null},e.prototype.incrLine=function(){null===this.lineNumber?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},e.prototype.incrVoice=function(){null===this.voiceNumber?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},e.prototype.isInMeasure=function(){return null!==this.measureNumber},e.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null},e.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},e.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},e.prototype.incrNote=function(){this.noteNumber++},e.prototype.measureTotal=function(){for(var e=0,t=0;t<this.lineNumber;t++)e+=this.measureTotalPerLine[t]?this.measureTotalPerLine[t]:0;return this.measureNumber&&(e+=this.measureNumber),e},e.prototype.getCurrent=function(e){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}},e.prototype.generate=function(e){if(!this.shouldAddClasses)return"";var t=[];if(e&&e.length>0&&t.push(e),"abcjs-tab-number"===e)return t.join(" ");if("text instrument-name"===e)return"abcjs-text abcjs-instrument-name";if(null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var n=0;n<t.length;n++)0!==t[n].indexOf("abcjs-")&&t[n].length>0&&(t[n]="abcjs-"+t[n])}return t.join(" ")},rp=e}(),h=function(){if(ap)return sp;ap=1;var e=function(e,t){this.formatting=e,this.classes=t};return e.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},e.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},e.prototype.calc=function(e,t){var n;n="string"==typeof e?(n=this.formatting[e])?{face:n.face,size:Math.round(4*n.size/3),decoration:n.decoration,style:n.style,weight:n.weight,box:n.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var r=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return n.padding=n.size*r,{font:n,attr:{"font-size":n.size,"font-style":n.style,"font-family":this.getFamily(n.face),"font-weight":n.weight,"text-decoration":n.decoration,class:this.classes.generate(t)}}},sp=e}(),d=function(){if(cp)return op;cp=1;var e=function(e,t){this.getFontAndAttr=e,this.svg=t};return e.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},e.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},e.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},e.prototype.calc=function(e,t,n,r){var i;i="string"==typeof t?this.attr(t,n):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":this.getFamily(t.face),"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(n)}};var s=this.svg.getTextSize(e,i.attr,r);return i.font.box?{height:s.height+4*i.font.padding,width:s.width+4*i.font.padding}:s},e.prototype.baselineToCenter=function(e,t,n,r,i){return.5*this.calc(e,t,n).height+(i-r-2)*this.attr(t,n).font.size},op=e}(),f=Mv(),p=qg(),m=function(){if(pm)return fm;pm=1;var e=ev();return fm=function(t){for(var n=t;n&&n.attributes&&"svg"!==n.tagName.toLowerCase()&&!n.attributes.selectable;)n=n.parentNode;if(n&&n.attributes&&n.attributes.selectable){var r=n.attributes["data-index"].nodeValue;if(r&&(r=parseInt(r,10))>=0&&r<this.selectables.length){var i=this.selectables[r],s=e(i,t);return s.index=r,s.element=i,s}}return null}}(),g=function(t,r){r=r||{},this.findSelectableElement=m,this.oneSvgPerLine=r.oneSvgPerLine,this.selectionColor=r.selectionColor,this.dragColor=r.dragColor?r.dragColor:r.selectionColor,this.dragging=!!r.dragging,this.selectTypes=r.selectTypes,this.responsive=r.responsive,this.space=3*e.SPACE,this.initialClef=r.initialClef,this.timeBasedLayout=r.timeBasedLayout,this.expandToWidest=!!r.expandToWidest,this.scale=r.scale?parseFloat(r.scale):0,this.classes=new u({shouldAddClasses:r.add_classes}),this.scale>.1||(this.scale=void 0),r.staffwidth?(this.staffwidthScreen=r.staffwidth,this.staffwidthPrint=r.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],r.clickListener&&this.addSelectListener(r.clickListener),this.renderer=new n(t),this.renderer.setPaddingOverride(r),r.showDebug&&(this.renderer.showDebug=r.showDebug),r.jazzchords&&(this.jazzchords=r.jazzchords),r.accentAbove&&(this.accentAbove=r.accentAbove),r.germanAlphabet&&(this.germanAlphabet=r.germanAlphabet),r.lineThickness&&(this.lineThickness=r.lineThickness),this.renderer.controller=this,this.renderer.foregroundColor=r.foregroundColor?r.foregroundColor:"currentColor",void 0!==r.ariaLabel&&(this.renderer.ariaLabel=r.ariaLabel),this.renderer.minPadding=r.minPadding?r.minPadding:0,this.reset()};function v(e){for(var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=0;n<e.attributes.length;n++){var r=e.attributes[n];"height"!==r.name&&"aria-label"!=r.name&&t.setAttribute(r.name,r.value)}return t}return g.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0,this.lineThickness&&this.renderer.setLineThickness(this.lineThickness)},g.prototype.engraveABC=function(e,t,n){void 0===e[0]&&(e=[e]),this.reset();for(var r=0;r<e.length;r++)void 0===t&&(t=r),this.getFontAndAttr=new h(e[r].formatting,this.classes),this.getTextSize=new d(this.getFontAndAttr,this.renderer.paper),this.engraveTune(e[r],t,n)},g.prototype.adjustNonScaledItems=function(e){this.width/=e,this.renderer.adjustNonScaledItems(e)},g.prototype.getMeasureWidths=function(e){this.reset(),this.getFontAndAttr=new h(e.formatting,this.classes),this.getTextSize=new d(this.getFontAndAttr,this.renderer.paper);var t=this.jazzchords;this.setupTune(e,0),this.constructTuneElements(e),l(this.renderer,e,0,this.space,this.timeBasedLayout);for(var n,r=[],i=!0,s=0;s<e.lines.length;s++){var a=e.lines[s];if(a.staff){if(i&&(n={left:0,measureWidths:[],total:0},r.push(n),i=!1),a.staffGroup.voices.length>0)for(var o=a.staffGroup.voices[0],c=!1,u=0,f=0;f<o.children.length;f++){var p=o.children[f];c||p.isClef||p.isKeySig||(c=!0,n.left=p.x,u=p.x),"bar"===p.type&&(n.measureWidths.push(p.x-u),n.total+=p.x-u,u=p.x)}}else i=!0}return this.jazzchords=t,r},g.prototype.setupTune=function(e,n){this.classes.reset(),void 0!==e.formatting.jazzchords&&(this.jazzchords=e.formatting.jazzchords),void 0!==e.formatting.accentAbove&&(this.accentAbove=e.formatting.accentAbove),this.renderer.newTune(e),this.engraver=new t(this.getTextSize,n,{bagpipes:e.formatting.bagpipes,flatbeams:e.formatting.flatbeams,graceSlurs:!1!==e.formatting.graceSlurs,percmap:e.formatting.percmap,initialClef:this.initialClef,jazzchords:this.jazzchords,timeBasedLayout:this.timeBasedLayout,accentAbove:this.accentAbove,germanAlphabet:this.germanAlphabet}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=e.getMeterFraction().num/e.getMeterFraction().den,e.formatting.staffwidth?this.width=1.33*e.formatting.staffwidth:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var r=e.formatting.scale?e.formatting.scale:this.scale;return"resize"===this.responsive&&(r=void 0),void 0===r&&(r=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(r),r},g.prototype.constructTuneElements=function(e){var t,n;e.topText=new a(e.metaText,e.metaTextInfo,e.formatting,e.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize);var c=!1,l=!1;for(t=0;t<e.lines.length;t++)if((n=e.lines[t]).staff)l=!0,n.staffGroup=this.engraver.createABCLine(n.staff,c?null:e.metaText.tempo,t),c=!0;else if(n.subtitle){if(l){var u=this.width/2+this.renderer.padding.left;n.nonMusic=new s(this.renderer.spacing.subtitle,e.formatting,n.subtitle,u,this.renderer.padding.left,this.getTextSize)}}else void 0!==n.text?(l=!0,n.nonMusic=new r(n.text,n.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):void 0!==n.separator&&n.separator.lineLength&&(l=!0,n.nonMusic=new i(n.separator.spaceAbove,n.separator.lineLength,n.separator.spaceBelow));e.bottomText=new o(e.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize)},g.prototype.engraveTune=function(e,t,n){var r=this.jazzchords,i=this.setupTune(e,t);this.constructTuneElements(e);var s=l(this.renderer,e,this.width,this.space,this.expandToWidest,this.timeBasedLayout);if(this.expandToWidest&&s>this.width+1&&(e.topText=new a(e.metaText,e.metaTextInfo,e.formatting,e.lines,s,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),e.lines&&e.lines.length>0))for(var o=e.lines.length,u=0;u<o;++u){var h=e.lines[u];if(h.nonMusic&&h.nonMusic.rows&&h.nonMusic.rows.length>0)for(var d=h.nonMusic.rows.length,m=0;m<d;++m){var g=h.nonMusic.rows[m];g.left&&(h.subtitle||h.text&&h.text.length>0&&h.text[0].center)&&(g.left=s/2+this.renderer.padding.left)}}e.tablatures&&p.layoutTablatures(this.renderer,e);var b=f(this.renderer,this.classes,e,this.width,s,this.responsive,i,this.selectTypes,t,n);if(this.staffgroups=b.staffgroups,this.selectables=b.selectables,this.oneSvgPerLine){var y=this.renderer.paper.svg.parentNode;this.svgs=function(e,t,n,r,i){n||(n="Untitled");var s=t.querySelector("svg");"resize"===r&&(t.style.paddingBottom="");for(var a=s.querySelector("style"),o="resize"===r?s.viewBox.baseVal.width:s.getAttribute("width"),c=t.querySelectorAll("svg > g"),l=0,u=[],h=0;h<c.length;h++){var d=c[h],f=d.getBBox(),p=f.y-l,m=f.height+p,g=document.createElement("div"),b="overflow: hidden;";"resize"!==r&&(b+="height:"+m*i+"px;"),g.setAttribute("style",b);var y=v(s),_='Sheet Music for "'+n+'" section '+(h+1);y.setAttribute("aria-label",_),"resize"!==r&&y.setAttribute("height",m),"resize"===r&&(y.style.position="");var w=e.firefox112?m+1:m;y.setAttribute("viewBox","0 "+l+" "+o+" "+w),y.appendChild(a.cloneNode(!0));var x=document.createElement("title");x.innerText=_,y.appendChild(x),y.appendChild(d),g.appendChild(y),u.push(y),t.appendChild(g),l=f.y+f.height}return t.removeChild(s),u}(this.renderer,y,e.metaText.title,this.responsive,i)}else this.svgs=[this.renderer.paper.svg];c(this,this.svgs),this.jazzchords=r},g.prototype.getDim=function(e){if(!e.dim){var t=e.svgEl.getBBox();e.dim={left:Math.round(t.x),top:Math.round(t.y),right:Math.round(t.x+t.width),bottom:Math.round(t.y+t.height)}}return e.dim},g.prototype.addSelectListener=function(e){this.listeners[this.listeners.length]=e},mm=g}function Tv(){if(bm)return vm;bm=1;var e=Hg();Tg();var t=Ev(),n=Ag(),r=kg(),i={};function s(){var e=window.innerWidth;for(var t in i)if(i.hasOwnProperty(t)){var n=i[t];e-=2*n.offsetLeft,n.style.width=e+"px"}}try{window.addEventListener("resize",s),window.addEventListener("orientationChange",s)}catch(o){}function a(e,n,r,s,a){r.viewportHorizontal?(e.innerHTML='<div class="abcjs-inner"></div>',r.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",i[e.id]=e,e=e.children[0]):r.viewportVertical?(e.innerHTML='<div class="abcjs-inner scroll-amount"></div>',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var o=new t(e,r);(o.engraveABC(n,s,a),n.engraver=o,r.viewportVertical||r.viewportHorizontal)&&(e.parentNode.style.width=e.style.width)}return vm=function(i,s,o,c,l){var u,h={};if(o){for(u in o)o.hasOwnProperty(u)&&(h[u]=o[u]);h.warnings_id&&h.tablature&&(h.tablature.warning_id=h.warnings_id)}if(c)for(u in c)c.hasOwnProperty(u)&&("listener"===u?c[u].highlight&&(h.clickListener=c[u].highlight):h[u]=c[u]);if(l)for(u in l)l.hasOwnProperty(u)&&(h[u]=l[u]);return e.renderEngine((function(e,i,s,o){var c=!1;return"*"===e&&(c=!0,(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e)),!c&&h.wrap&&h.staffwidth?(i=function(e,i,s,o,c){var l=new t(e,c),u=l.getMeasureWidths(i),h=r.calcLineWraps(i,u,c);if(h.reParse){var d=new n;d.parse(o,h.revisedParams),i=d.getTune();var f=d.getWarnings();f&&(i.warnings=f)}c.afterParsing&&c.afterParsing(i,s,o);return a(e,i,h.revisedParams,s,0),i.explanation=h.explanation,i}(e,i,s,o,h),i):(h.afterParsing&&h.afterParsing(i,s,o),a(e,i,h,s,0),c&&e.parentNode.removeChild(e),null)}),i,s,h)}}function Pv(){if(xm)return wm;xm=1;return wm={}}function Av(){if(Mm)return Cm;Mm=1;return Cm=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"]}function Nv(){if(Am)return Pm;return Am=1,Pm=function(e){if(e)window.abcjsAudioContext=e;else if(!window.abcjsAudioContext){var t=window.AudioContext||window.webkitAudioContext;if(!t)return!1;window.abcjsAudioContext=new t}return"suspended"!==window.abcjsAudioContext.state}}function Iv(){if(Im)return Nm;Im=1;var e=Nv();return Nm=function(){return window.abcjsAudioContext||e(),window.abcjsAudioContext}}function Ov(){if(Dm)return Om;Dm=1;var e=Iv();return Om=function(){if(!window.Promise)return!1;if(!(window.AudioContext||window.webkitAudioContext||navigator.mozAudioContext||navigator.msAudioContext))return!1;var t=e();return t?void 0!==t.resume:void 0}}function Dv(){if(Bm)return Lm;Bm=1;return Lm={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"}}function Lv(){if(Rm)return Vm;Rm=1;return Vm=function(e){return window.URL.createObjectURL(function(e){var t,n,r=e[0],i=r.numberOfChannels,s=r.length*i*2+44,a=new ArrayBuffer(s),o=new DataView(a),c=[],l=0,u=0;for(d(1179011410),d(s-8),d(1163280727),d(544501094),d(16),h(1),h(i),d(r.sampleRate),d(2*r.sampleRate*i),h(2*i),h(16),d(1635017060),d(s-u-4),t=0;t<i;t++)c.push(r.getChannelData(t));for(;u<s;){for(t=0;t<c.length;t++)n=0|(.5+(n=Math.max(-1,Math.min(1,c[t][l])))<0?32768*n:32767*n),o.setInt16(u,n,!0),u+=2;l++}return new Blob([a],{type:"audio/wav"});function h(e){o.setUint16(u,e,!0),u+=2}function d(e){o.setUint32(u,e,!0),u+=4}}(e.audioBuffers))}}function Bv(){if(zm)return Fm;return zm=1,Fm=function(e){return Math.pow(2,e/1200)}}function Vv(){if(Ym)return Hm;Ym=1;var e=function(){if(Sm)return km;Sm=1;var e=Pv();return km=function(t,n,r,i){e[n]||(e[n]={});var s=e[n];return s[r]||(s[r]=new Promise((function(e,s){var a=new XMLHttpRequest;let o=t+n+"-mp3/"+r+".mp3";a.open("GET",o,!0),a.responseType="arraybuffer",a.onload=function(){if(200===a.status){var t=i.decodeAudioData(a.response,(function(t){e({instrument:n,name:r,status:"loaded",audioBuffer:t})}),(function(){s(Error("Can't decode sound at "+o))}));t&&"function"==typeof t.catch&&t.catch(s)}else s(Error("Can't load sound at "+o+" status="+a.status))},a.onerror=function(){s(Error("Can't load sound at "+o))},a.send()})).catch((e=>{throw console.error("Didn't load note",n,r,":",e.message),e}))),s[r]}}(),t=function(){if(Tm)return Em;Tm=1;var e=Av();return Em=function(t){for(var n=[],r=0;r<t.tracks.length;r++)n.push([]);var i=e[0];return t.tracks.forEach((function(t,r){t.forEach((function(t){switch(t.cmd){case"note":var s=void 0!==t.instrument?e[t.instrument]:i;if(t.duration>0){var a=t.gap?t.gap:0,o=t.duration;a=Math.min(a,2*o/3);var c={pitch:t.pitch,instrument:s,start:Math.round(1e6*t.start)/1e6,end:Math.round(1e6*(t.start+o-a))/1e6,volume:t.volume};t.startChar&&(c.startChar=t.startChar),t.endChar&&(c.endChar=t.endChar),t.style&&(c.style=t.style),t.cents&&(c.cents=t.cents),n[r].push(c)}break;case"program":i=e[t.instrument];break;case"text":break;default:console.log("Unhandled midi event",t)}}))})),n}}(),n=Nv(),r=Iv(),i=Ov(),s=Dv(),a=Av(),o=Lv(),c=function(){if(qm)return jm;qm=1;var e=Pv(),t=Dv(),n=Bv(),r=function(e,t,n){for(var r=0;r<2;r++)for(var i=t.getChannelData(r),s=e.getChannelData(r),a=0;a<i.length;a++)s[a+n]+=i[a]};return jm=function(i,s,a,o,c,l,u,h,d){var f=window.OfflineAudioContext||window.webkitOfflineAudioContext,p=a.len*a.tempoMultiplier;l&&(p+=l/1e3),(p-=h)<0&&(p=.005);var m=new f(2,Math.floor((p+u)*s),s),g=t[a.pitch];if(!e[a.instrument])return d&&d("placeNote skipped (instrument empty): "+a.instrument+":"+g),Promise.resolve();var v=e[a.instrument][g];return v?v.then((function(e){var t=m.createBufferSource();t.buffer=e.audioBuffer;var h,f=a.volume/96*c;return t.gainNode=m.createGain(),a.pan&&m.createStereoPanner&&(t.panNode=m.createStereoPanner(),t.panNode.pan.setValueAtTime(a.pan,0)),t.gainNode.gain.value=f,t.gainNode.gain.linearRampToValueAtTime(t.gainNode.gain.value,p),t.gainNode.gain.linearRampToValueAtTime(0,p+u),a.cents&&(t.playbackRate.value=n(a.cents)),t.panNode?(t.panNode.connect(m.destination),t.gainNode.connect(t.panNode)):t.gainNode.connect(m.destination),t.connect(t.gainNode),t.start(0),t.noteOff?t.noteOff(p+u):t.stop(p+u),m.oncomplete=function(e){if(e.renderedBuffer&&e.renderedBuffer.getChannelData)for(var t=0;t<o.length;t++){var n=o[t]*a.tempoMultiplier;l&&(n-=l/1e3),n<0&&(n=0),n=Math.floor(n*s),r(i,e.renderedBuffer,n)}d&&d("placeNote: "+a.instrument+":"+g),h()},m.startRendering(),new Promise((function(e){h=e}))})).catch((function(e){return d&&d("placeNote catch: "+e.message),Promise.resolve()})):(d&&d("placeNote skipped: "+a.instrument+":"+g),Promise.resolve())}}(),l=Pv(),u="MIDI is not supported in this browser.",h="https://paulrosen.github.io/midi-js-soundfonts/abcjs/",d="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/";return Hm=function(){var f=this;f.audioBufferPossible=void 0,f.directSource=[],f.startTimeSec=void 0,f.pausedTimeSec=void 0,f.audioBuffers=[],f.duration=void 0,f.isRunning=!1,f.options=void 0,f.pickupLength=0,f.init=function(e){e||(e={}),e.options&&(f.options=e.options),n(e.audioContext);var t=r().currentTime;if(f.debugCallback=e.debugCallback,f.debugCallback&&f.debugCallback("init called"),f.audioBufferPossible=f._deviceCapable(),!f.audioBufferPossible)return Promise.reject({status:"NotSupported",message:u});var i=e.options?e.options:{};f.soundFontUrl=i.soundFontUrl?i.soundFontUrl:d,"/"!==f.soundFontUrl[f.soundFontUrl.length-1]&&(f.soundFontUrl+="/"),i.soundFontVolumeMultiplier||0===i.soundFontVolumeMultiplier?f.soundFontVolumeMultiplier=i.soundFontVolumeMultiplier:f.soundFontUrl===d||"https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/"===f.soundFontUrl?f.soundFontVolumeMultiplier=3:f.soundFontUrl===h?f.soundFontVolumeMultiplier=.4:f.soundFontVolumeMultiplier=1,i.programOffsets?f.programOffsets=i.programOffsets:f.soundFontUrl===h?f.programOffsets={bright_acoustic_piano:20,honkytonk_piano:20,electric_piano_1:30,electric_piano_2:30,harpsichord:40,clavinet:20,celesta:20,glockenspiel:40,vibraphone:30,marimba:35,xylophone:30,tubular_bells:35,dulcimer:30,drawbar_organ:20,percussive_organ:25,rock_organ:20,church_organ:40,reed_organ:40,accordion:40,harmonica:40,acoustic_guitar_nylon:20,acoustic_guitar_steel:30,electric_guitar_jazz:25,electric_guitar_clean:15,electric_guitar_muted:35,overdriven_guitar:25,distortion_guitar:20,guitar_harmonics:30,electric_bass_finger:15,electric_bass_pick:30,fretless_bass:40,violin:105,viola:50,cello:40,contrabass:60,trumpet:10,trombone:90,alto_sax:20,tenor_sax:20,clarinet:20,flute:50,banjo:50,woodblock:20}:f.programOffsets={};var o=void 0!==i.fadeLength?parseInt(i.fadeLength,10):NaN;if(f.fadeLength=isNaN(o)?200:o,o=void 0!==i.noteEnd?parseInt(i.noteEnd,10):NaN,f.noteEnd=isNaN(o)?0:o,f.pan=i.pan,f.meterSize=1,e.visualObj){f.flattened=e.visualObj.setUpAudio(i),e.visualObj.getMeterFraction().den&&(f.meterSize=e.visualObj.getMeterFraction().num/e.visualObj.getMeterFraction().den),f.pickupLength=e.visualObj.getPickupLength()}else{if(!e.sequence)return Promise.reject(new Error("Must pass in either a visualObj or a sequence"));f.flattened=e.sequence}f.millisecondsPerMeasure=e.millisecondsPerMeasure?e.millisecondsPerMeasure:e.visualObj?e.visualObj.millisecondsPerMeasure(f.flattened.tempo):1e3,f.beatsPerMeasure=e.visualObj?e.visualObj.getBeatsPerMeasure():4,f.sequenceCallback=i.sequenceCallback,f.callbackContext=i.callbackContext,f.onEnded=i.onEnded,f.meterFraction=e.visualObj?e.visualObj.getMeterFraction():{den:1};var c={},p=[],m=[],g=a[0];f.flattened.tracks.forEach((function(e){e.forEach((function(e){if("program"===e.cmd&&a[e.instrument]&&(g=a[e.instrument]),void 0!==e.pitch){var t=e.pitch,n=s[t],r=void 0!==e.instrument?a[e.instrument]:g;if(n)if(c[r]||(c[r]={}),l[r]&&l[r][n]){var i=r+":"+n;p.indexOf(i)<0&&p.push(i)}else c[r][n]=!0;else{var o=r+":"+n;console.log("Can't find note: ",t,o),m.indexOf(o)<0&&m.push(o)}}}))})),f.debugCallback&&f.debugCallback("note gathering time = "+Math.floor(1e3*(r().currentTime-t))+"ms"),t=r().currentTime;var v=[];Object.keys(c).forEach((function(e){Object.keys(c[e]).forEach((function(t){v.push({instrument:e,note:t})}))})),f.debugCallback&&f.debugCallback("notes "+JSON.stringify(v));for(var b=[],y=0;y<v.length;y+=256)b.push(v.slice(y,y+256));return new Promise((function(e,n){var i={cached:p,error:m,loaded:[]},s=0,a=function(){f.debugCallback&&f.debugCallback("loadBatch idx="+s+" len="+b.length),s<b.length?f._loadBatch(b[s],f.soundFontUrl,t).then((function(e){f.debugCallback&&f.debugCallback("loadBatch then"),t=r().currentTime,e&&(e.error&&(i.error=i.error.concat(e.error)),e.loaded&&(i.loaded=i.loaded.concat(e.loaded))),s++,a()}),n):(f.debugCallback&&f.debugCallback("resolve init"),e(i))};a()}))},f._loadBatch=function(t,n,i,s){var a=[];return t.forEach((function(t){f.debugCallback&&f.debugCallback("getNote "+t.instrument+":"+t.note),a.push(e(n,t.instrument,t.note,r()))})),Promise.all(a).then((function(e){f.debugCallback&&f.debugCallback("mp3 load time = "+Math.floor(1e3*(r().currentTime-i))+"ms");for(var a=[],o=[],c=[],l=[],u=0;u<e.length;u++){var h=e[u],d=h.instrument+":"+h.name;"loaded"===h.status?a.push(d):"pending"===h.status?c.push(d):"cached"===h.status?o.push(d):l.push(d+" "+h.message)}if(c.length>0){if(f.debugCallback&&f.debugCallback("pending "+JSON.stringify(c)),s?s*=2:s=50,s<9e4)return new Promise((function(e,t){setTimeout((function(){var r=[];for(u=0;u<c.length;u++)d=c[u].split(":"),r.push({instrument:d[0],note:d[1]});f.debugCallback&&f.debugCallback("retry "+JSON.stringify(r)),f._loadBatch(r,n,i,s).then((function(t){e(t)})).catch((function(e){t(e)}))}),s)}));for(var p=[],m=0;m<t.length;m++)p.push(t[m].instrument+"/"+t[m].note);return f.debugCallback&&f.debugCallback("loadBatch timeout"),Promise.reject(new Error("timeout attempting to load: "+p.join(", ")))}return f.debugCallback&&f.debugCallback("loadBatch resolve"),Promise.resolve({loaded:a,cached:o,error:l})})).catch((function(e){f.debugCallback&&f.debugCallback("loadBatch catch "+e.message)}))},f.prime=function(){var e=f.fadeLength/1e3;return f.isRunning=!1,f.audioBufferPossible?(f.debugCallback&&f.debugCallback("prime called"),new Promise((function(n){var i=r().currentTime,s=f.millisecondsPerMeasure/1e3/f.meterSize;if(f.duration=f.flattened.totalDuration*s,f.duration<=0)return f.audioBuffers=[],n({status:"empty",seconds:0});f.duration+=e;var a=Math.floor(r().sampleRate*f.duration);f.stop();var o=t(f.flattened);f.options.swing&&function(e,t,n,r){if(4!=n.den&&8!=n.den)return;if(t=parseFloat(t),isNaN(t)||t<=50)return;t>75&&(t=75);t=t/50-1;var i=0,s=.25;8===n.den&&(s/=2);for(var a=s/2,o=a*t,c=0;c<e.length;c++)for(var l=e[c],u=0;u<l.length;u++){var h=l[u];if((h.start-r)%a==0&&(h.start-r)%s!=0&&(0==u||l[u-1].start<=l[u].start-a)&&(u==l.length-1||l[u+1].start>=l[u].start+a)){var d=h.start;h.start+=o,h.volume*=1+i,u>0&&l[u-1].end==d&&(l[u-1].end=h.start,l[u-1].volume*=1-i)}}}(o,f.options.swing,f.meterFraction,f.pickupLength),f.sequenceCallback&&f.sequenceCallback(o,f.callbackContext);var l=function(e,t){if(null==t)return null;var n=[];if(t.length){for(var r=0;r<e;r++)if(r<t.length){var i=parseFloat(t[r]);i<-1?i=-1:i>1&&(i=1),n.push(i)}else n.push(0);return n}var s=parseFloat(t);if(s*(e-1)>2)return null;for(var a=e%2==0,o=a?0-s/2:0,c=o+s,l=0;l<e;l++)(a=l%2==0)?(n.push(o),o-=s):(n.push(c),c+=s);return n}(o.length,f.pan),u={};o.forEach((function(e,t){var n=l&&l.length>t?l[t]:0;e.forEach((function(e){var t=e.instrument+":"+e.pitch+":"+e.volume+":"+Math.round(1e3*(e.end-e.start))/1e3+":"+n+":"+s+":"+(e.cents?e.cents:0);f.debugCallback&&f.debugCallback("noteMapTrack "+t),u[t]||(u[t]=[]),u[t].push(e.start)}))}));for(var h=[],d=r().createBuffer(2,a,r().sampleRate),p=0;p<Object.keys(u).length;p++){var m=Object.keys(u)[p],g=m.split(":"),v=void 0!==g[6]?parseFloat(g[6]):0;g={instrument:g[0],pitch:parseInt(g[1],10),volume:parseInt(g[2],10),len:parseFloat(g[3]),pan:parseFloat(g[4]),tempoMultiplier:parseFloat(g[5]),cents:v},h.push(c(d,r().sampleRate,g,u[m],f.soundFontVolumeMultiplier,f.programOffsets[g.instrument],e,f.noteEnd/1e3,f.debugCallback))}function b(e){var t=e&&e.audioBuffers&&e.audioBuffers.length>0?e.audioBuffers[0].duration:0;return{status:r().state,duration:t}}f.audioBuffers=[d],f.debugCallback&&(f.debugCallback("sampleRate = "+r().sampleRate),f.debugCallback("totalSamples = "+a),f.debugCallback("creationTime = "+Math.floor(1e3*(r().currentTime-i))+"ms")),Promise.all(h).then((function(){"suspended"===r().state?r().resume().then((function(){n(b(f))})):"interrupted"===r().state?r().suspend().then((function(){r().resume().then((function(){n(b(f))}))})):n(b(f))}))}))):Promise.reject(new Error(u))},f.start=function(){if(!f.audioBufferPossible)throw new Error(u);f.debugCallback&&f.debugCallback("start called");var e=f.pausedTimeSec?f.pausedTimeSec:0;f._kickOffSound(e),f.startTimeSec=r().currentTime-e,f.pausedTimeSec=void 0,f.debugCallback&&f.debugCallback("MIDI STARTED",f.startTimeSec)},f.pause=function(){if(!f.audioBufferPossible)throw new Error(u);return f.debugCallback&&f.debugCallback("pause called"),f.pausedTimeSec=f.stop(),f.pausedTimeSec},f.resume=function(){f.start()},f.seek=function(e,t){var n;switch(t){case"seconds":n=e;break;case"beats":n=e*f.millisecondsPerMeasure/f.beatsPerMeasure/1e3;break;default:n=(f.duration-f.fadeLength/1e3)*e}if(!f.audioBufferPossible)throw new Error(u);f.debugCallback&&f.debugCallback("seek called sec="+n),f.isRunning?(f.stop(),f._kickOffSound(n)):f.pausedTimeSec=n,f.pausedTimeSec=n},f.stop=function(){return f.isRunning=!1,f.pausedTimeSec=void 0,f.directSource.forEach((function(e){try{e.stop()}catch(t){console.log("direct source didn't stop:",t)}})),f.directSource=[],r().currentTime-f.startTimeSec},f.finished=function(){f.startTimeSec=void 0,f.pausedTimeSec=void 0,f.isRunning=!1},f.download=function(){return o(f)},f.getAudioBuffer=function(){return f.audioBuffers[0]},f.getIsRunning=function(){return f.isRunning},f._deviceCapable=function(){return!!i()||(console.warn(u),f.debugCallback&&f.debugCallback(u),!1)},f._kickOffSound=function(e){f.isRunning=!0,f.directSource=[],f.audioBuffers.forEach((function(e,t){f.directSource[t]=r().createBufferSource(),f.directSource[t].buffer=e,f.directSource[t].connect(r().destination)})),f.directSource.forEach((function(t){t.start(0,e)})),f.onEnded&&(f.directSource[0].onended=function(){f.onEnded(f.callbackContext)})}}}function Rv(){if(Gm)return Um;Gm=1;return Um=function(){var e=this;e.tracks=[],e.totalDuration=0,e.currentInstrument=[],e.starts=[],e.addTrack=function(){return e.tracks.push([]),e.currentInstrument.push(0),e.starts.push(0),e.tracks.length-1},e.setInstrument=function(t,n){e.tracks[t].push({channel:0,cmd:"program",instrument:n}),e.currentInstrument[t]=n},e.appendNote=function(t,n,r,i,s){var a={cmd:"note",duration:r,gap:0,instrument:e.currentInstrument[t],pitch:n,start:e.starts[t],volume:i};s&&(a.cents=s),e.tracks[t].push(a),e.starts[t]+=r,e.totalDuration=Math.max(e.totalDuration,e.starts[t])}}}function Fv(){if(ig)return rg;ig=1;var e=Ov(),t=Nv(),n=Iv(),r=$m?Wm:($m=1,Wm='\n<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" preserveAspectRatio="xMidYMid meet">\n\t<g transform="translate(0,700) scale(0.1,-0.1)" >\n\t<path d="M3111 6981 c-20 -37 -90 -55 -364 -96 -120 -18 -190 -33 -244 -55\n\t-42 -17 -124 -42 -182 -56 -78 -18 -119 -34 -157 -60 -28 -19 -86 -46 -128\n\t-60 -43 -13 -107 -42 -144 -64 -37 -23 -84 -46 -106 -52 -21 -7 -56 -29 -79\n\t-50 -22 -22 -61 -50 -86 -63 -26 -13 -67 -40 -91 -60 -24 -20 -65 -47 -90 -60\n\t-25 -13 -53 -31 -61 -41 -8 -9 -32 -30 -54 -46 -75 -54 -486 -460 -512 -507\n\t-15 -25 -48 -69 -75 -98 -26 -28 -48 -57 -48 -63 0 -6 -18 -29 -39 -53 -21\n\t-23 -56 -71 -77 -107 -20 -36 -50 -80 -65 -97 -16 -18 -33 -52 -40 -75 -12\n\t-47 -47 -115 -84 -166 -13 -18 -30 -56 -38 -83 -8 -27 -34 -80 -56 -118 -33\n\t-53 -46 -91 -62 -167 -12 -63 -34 -127 -59 -179 -42 -84 -60 -166 -60 -270 0\n\t-90 26 -122 125 -154 54 -17 96 -19 430 -20 305 -1 381 2 430 14 82 22 140 51\n\t153 78 6 12 22 47 37 77 14 30 38 77 54 103 15 27 34 73 40 103 7 30 28 78 48\n\t107 19 28 44 74 55 101 10 28 34 67 53 87 18 20 49 61 68 90 19 30 44 63 57\n\t74 13 11 36 40 52 65 59 94 232 270 306 313 20 11 57 37 82 58 25 20 70 52\n\t100 72 30 19 66 47 79 61 13 14 49 35 80 46 30 12 80 37 111 56 31 19 95 45\n\t143 58 48 12 110 37 139 55 63 40 127 55 323 76 83 9 208 28 279 41 156 29\n\t165 29 330 4 453 -71 514 -84 606 -130 31 -16 83 -36 116 -45 32 -9 84 -34\n\t115 -56 31 -21 82 -48 113 -60 32 -11 72 -33 89 -48 18 -16 59 -45 92 -65 33\n\t-21 74 -51 90 -66 17 -15 49 -40 73 -54 52 -32 65 -61 50 -113 -8 -31 -61 -90\n\t-277 -308 -300 -303 -361 -382 -369 -481 -2 -29 0 -66 6 -81 13 -40 88 -138\n\t115 -151 12 -6 54 -26 92 -44 l70 -33 945 -2 c520 -1 975 2 1012 7 64 8 191\n\t50 231 76 11 7 33 34 50 60 22 34 42 51 65 58 l32 9 0 1101 0 1102 -32 9 c-21\n\t7 -44 26 -64 55 -60 84 -77 97 -140 110 -44 9 -76 10 -127 2 -59 -9 -77 -17\n\t-134 -62 -37 -28 -172 -155 -301 -281 -129 -127 -249 -237 -267 -245 -25 -10\n\t-41 -11 -71 -2 -58 15 -112 45 -124 69 -6 11 -35 35 -64 54 -28 18 -58 41 -66\n\t50 -8 9 -41 35 -75 58 -33 22 -77 56 -99 75 -21 18 -64 46 -95 61 -31 14 -73\n\t39 -93 55 -20 15 -70 40 -110 55 -40 15 -97 44 -127 64 -29 21 -78 44 -107 53\n\t-30 8 -77 31 -105 51 -42 28 -73 39 -173 60 -68 14 -154 39 -196 58 -95 43\n\t-131 51 -343 76 -209 24 -242 32 -279 70 l-30 29 -328 0 c-312 0 -330 -1 -339\n\t-19z"></path>\n\t<path d="M254 2875 c-89 -16 -107 -26 -145 -78 -32 -44 -62 -66 -91 -67 -17 0\n\t-18 -61 -18 -1140 l0 -1140 24 0 c16 0 41 -17 72 -50 40 -42 61 -55 117 -72\n\tl69 -21 82 23 c44 12 96 30 114 39 18 9 148 132 290 272 141 141 267 261 279\n\t268 51 26 86 14 176 -61 32 -26 62 -48 66 -48 5 0 36 -25 70 -55 34 -30 74\n\t-61 89 -69 15 -8 37 -28 50 -45 12 -17 50 -45 84 -62 34 -17 78 -44 98 -60 19\n\t-16 61 -37 93 -48 32 -11 81 -37 107 -56 27 -20 76 -45 109 -56 33 -12 75 -31\n\t93 -44 62 -45 93 -58 191 -82 54 -12 130 -37 168 -54 68 -29 180 -58 226 -59\n\t62 0 183 -64 183 -96 0 -12 88 -14 639 -14 l639 0 12 30 c18 44 76 66 233 89\n\t89 14 160 30 200 47 34 15 106 42 159 60 54 18 112 44 130 57 47 35 85 52 146\n\t67 29 7 76 28 105 48 29 20 77 48 107 63 30 15 66 39 80 54 14 15 50 40 81 56\n\t31 15 78 46 104 69 26 22 61 46 79 54 17 7 43 26 56 42 14 16 41 41 60 56 64\n\t48 380 362 408 405 15 23 40 51 55 63 15 12 36 38 46 58 11 21 37 57 58 82 22\n\t25 49 62 62 83 13 20 38 56 57 78 19 23 50 74 69 113 19 39 46 86 59 104 14\n\t18 34 62 46 98 12 36 32 77 45 92 31 38 60 97 80 167 9 33 26 76 37 95 29 50\n\t47 103 68 206 10 52 32 117 51 155 29 56 33 74 34 140 0 94 -10 108 -101 138\n\t-61 20 -83 21 -463 21 -226 0 -421 -4 -451 -10 -63 -12 -86 -30 -110 -85 -10\n\t-22 -33 -63 -52 -92 -21 -31 -42 -80 -53 -123 -11 -44 -32 -93 -56 -128 -20\n\t-32 -47 -83 -59 -115 -12 -32 -37 -77 -56 -100 -19 -23 -50 -65 -69 -94 -19\n\t-29 -44 -57 -54 -63 -11 -5 -29 -27 -42 -47 -52 -85 -234 -277 -300 -315 -25\n\t-15 -53 -38 -62 -51 -9 -14 -42 -39 -74 -57 -32 -18 -75 -48 -95 -66 -21 -18\n\t-59 -44 -85 -58 -26 -13 -72 -40 -100 -59 -35 -24 -78 -41 -128 -52 -47 -11\n\t-99 -31 -139 -56 -69 -42 -94 -49 -391 -110 -245 -51 -425 -66 -595 -50 -168\n\t16 -230 27 -330 61 -47 16 -123 35 -170 44 -98 17 -123 25 -172 58 -20 14 -71\n\t37 -114 53 -44 15 -95 40 -115 56 -20 16 -70 42 -110 59 -40 16 -88 45 -108\n\t63 -20 19 -55 46 -78 61 -24 14 -49 35 -55 47 -7 11 -34 33 -60 49 -50 31 -65\n\t61 -53 102 4 13 130 147 281 298 236 238 277 283 299 335 15 32 35 71 46 86\n\t12 18 19 44 19 76 0 42 -8 63 -53 138 -92 151 11 139 -1207 141 -798 2 -1030\n\t0 -1086 -11z"></path>\n\t</g>\n</svg>\n'),i=Qm?Km:(Qm=1,Km='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-play-svg">\n <g>\n <polygon points="4 0 23 12.5 4 25"/>\n </g>\n</svg>\n'),s=Zm?Xm:(Zm=1,Xm='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-pause-svg">\n <g>\n <rect width="8.23" height="25"/>\n <rect width="8.23" height="25" x="17"/>\n </g>\n</svg>\n'),a=eg?Jm:(eg=1,Jm='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="abcjs-loading-svg">\n <circle cx="50" cy="50" fill="none" stroke-width="20" r="35" stroke-dasharray="160 55"></circle>\n</svg>\n'),o=ng?tg:(ng=1,tg='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25">\n <g>\n <polygon points="5 12.5 24 0 24 25"/>\n <rect width="3" height="25" x="0" y="0"/>\n </g>\n</svg>\n');function c(r,i,s,a,o){var c=!0;if(n()?c="suspended"===n().state:t(),!e())throw{status:"NotSupported",message:"This browser does not support audio."};(c||o)&&s&&s.classList.add("abcjs-loading"),c?n().resume().then((function(){a?a().then((function(e){l(r,i,s,o)})):l(r,i,s,o)})):l(r,i,s,o)}function l(e,t,n,r){r?e(t).then((function(){n&&n.classList.remove("abcjs-loading")})):(e(t),n&&n.classList.remove("abcjs-loading"))}return rg=function(e,l){var u=this;if("string"==typeof e){var h=e;if(!(e=document.querySelector(h)))throw new Error('Cannot find element "'+h+'" in the DOM.')}else if(!(e instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(u.parent=e,u.options={},l&&(u.options=Object.assign({},l)),u.options.ac&&t(u.options.ac),function(e,t){var n=!!t.loopHandler,c=!!t.restartHandler,l=!!t.playHandler||!!t.playPromiseHandler,u=!!t.progressHandler,h=!!t.warpHandler,d=!1!==t.hasClock,f='<div class="abcjs-inline-audio">\n';if(n){var p=t.repeatTitle?t.repeatTitle:"Click to toggle play once/repeat.";f+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+p+'" aria-label="'+(t.repeatAria?t.repeatAria:p)+'">'+r+"</button>\n"}if(c){var m=t.restartTitle?t.restartTitle:"Click to go to beginning.";f+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+m+'" aria-label="'+(t.restartAria?t.restartAria:m)+'">'+o+"</button>\n"}if(l){var g=t.playTitle?t.playTitle:"Click to play/pause.";f+='<button type="button" class="abcjs-midi-start abcjs-btn" title="'+g+'" aria-label="'+(t.playAria?t.playAria:g)+'">'+i+s+a+"</button>\n"}if(u){var v=t.randomTitle?t.randomTitle:"Click to change the playback position.";f+='<button type="button" class="abcjs-midi-progress-background" title="'+v+'" aria-label="'+(t.randomAria?t.randomAria:v)+'"><span class="abcjs-midi-progress-indicator"></span></button>\n'}d&&(f+='<span class="abcjs-midi-clock"></span>\n');if(h){var b=t.warpTitle?t.warpTitle:"Change the playback speed.";f+='<span class="abcjs-tempo-wrapper"><label><input class="abcjs-midi-tempo" type="number" min="1" max="300" value="100" title="'+b+'" aria-label="'+(t.warpAria?t.warpAria:b)+'">%</label><span> (<span class="abcjs-midi-current-tempo"></span> '+(t.bpm?t.bpm:"BPM")+")</span></span>\n"}f+='<div class="abcjs-css-warning" style="font-size: 12px;color:red;border: 1px solid red;text-align: center;width: 300px;margin-top: 4px;font-weight: bold;border-radius: 4px;">CSS required: load abcjs-audio.css</div>',f+="</div>\n",e.innerHTML=f}(u.parent,u.options),function(e){var t=!!e.options.loopHandler,n=!!e.options.restartHandler,r=!!e.options.playHandler||!!e.options.playPromiseHandler,i=!!e.options.progressHandler,s=!!e.options.warpHandler,a=e.parent.querySelector(".abcjs-midi-start");t&&e.parent.querySelector(".abcjs-midi-loop").addEventListener("click",(function(t){c(e.options.loopHandler,t,a,e.options.afterResume)}));n&&e.parent.querySelector(".abcjs-midi-reset").addEventListener("click",(function(t){c(e.options.restartHandler,t,a,e.options.afterResume)}));r&&a.addEventListener("click",(function(t){c(e.options.playPromiseHandler||e.options.playHandler,t,a,e.options.afterResume,!!e.options.playPromiseHandler)}));i&&e.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",(function(t){c(e.options.progressHandler,t,a,e.options.afterResume)}));s&&e.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",(function(t){c(e.options.warpHandler,t,a,e.options.afterResume)}))}(u),u.disable=function(e){var t=u.parent.querySelector(".abcjs-inline-audio");e?t.classList.add("abcjs-disabled"):t.classList.remove("abcjs-disabled")},u.setWarp=function(e,t){u.parent.querySelector(".abcjs-midi-tempo").value=Math.round(t),u.setTempo(e)},u.setTempo=function(e){var t=u.parent.querySelector(".abcjs-midi-current-tempo");t&&(t.innerHTML=Math.round(e))},u.resetAll=function(){for(var e=u.parent.querySelectorAll(".abcjs-pushed"),t=0;t<e.length;t++){e[t].classList.remove("abcjs-pushed")}},u.pushPlay=function(e){var t=u.parent.querySelector(".abcjs-midi-start");t&&(e?t.classList.add("abcjs-pushed"):t.classList.remove("abcjs-pushed"))},u.pushLoop=function(e){var t=u.parent.querySelector(".abcjs-midi-loop");t&&(e?t.classList.add("abcjs-pushed"):t.classList.remove("abcjs-pushed"))},u.setProgress=function(e,t){var n=u.parent.querySelector(".abcjs-midi-progress-background"),r=u.parent.querySelector(".abcjs-midi-progress-indicator");if(n&&r){var i=n.clientWidth*e;r.style.left=i+"px";var s=u.parent.querySelector(".abcjs-midi-clock");if(s){var a=t*e/1e3,o=Math.floor(a/60),c=Math.floor(a%60),l=c<10?"0"+c:c;s.innerHTML=o+":"+l}}},u.options.afterResume){var d=!1;u.options.ac?d="suspended"!==u.options.ac.state:n()&&(d="suspended"!==n().state),d&&u.options.afterResume()}}}function zv(){if(cg)return og;cg=1;var e=Fv(),t=Vv(),n=hh(),r=Iv();return og=function(){var i=this;i.warp=100,i.cursorControl=null,i.visualObj=null,i.timer=null,i.midiBuffer=null,i.options=null,i.currentTempo=null,i.control=null,i.isLooping=!1,i.isStarted=!1,i.isLoaded=!1,i.isLoading=!1,i.load=function(t,n,r){r||(r={}),void 0===r.displayPlay&&(r.displayPlay=!0),void 0===r.displayProgress&&(r.displayProgress=!0),i.control=new e(t,{loopHandler:r.displayLoop?i.toggleLoop:void 0,restartHandler:r.displayRestart?i.restart:void 0,playPromiseHandler:r.displayPlay?i.play:void 0,progressHandler:r.displayProgress?i.randomAccess:void 0,warpHandler:r.displayWarp?i.onWarp:void 0,afterResume:i.init}),i.cursorControl=n,i.disable(!0)},i.disable=function(e){i.control&&i.control.disable(e)},i.setTune=function(e,t,n){return i.visualObj=e,i.disable(!1),i.options=n||{},i.control&&(i.pause(),i.setProgress(0,1),i.control.resetAll(),i.restart(),i.isStarted=!1),i.isLooping=!1,t?i.go():Promise.resolve({status:"no-audio-context"})},i.go=function(){i.isLoading=!0;var e,s=100*i.visualObj.millisecondsPerMeasure()/i.warp;return i.currentTempo=Math.round(i.visualObj.getBeatsPerMeasure()/s*6e4),i.control&&i.control.setTempo(i.currentTempo),i.percent=0,i.midiBuffer||(i.midiBuffer=new t),r().resume().then((function(e){return i.midiBuffer.init({visualObj:i.visualObj,options:i.options,millisecondsPerMeasure:s})})).then((function(t){return e=t,i.midiBuffer.prime()})).then((function(){var t=16;return i.cursorControl&&void 0!==i.cursorControl.beatSubdivisions&&parseInt(i.cursorControl.beatSubdivisions,10)>=1&&parseInt(i.cursorControl.beatSubdivisions,10)<=64&&(t=parseInt(i.cursorControl.beatSubdivisions,10)),i.timer=new n(i.visualObj,{beatCallback:i.beatCallback,eventCallback:i.eventCallback,lineEndCallback:i.lineEndCallback,qpm:i.currentTempo,extraMeasuresAtBeginning:i.cursorControl?i.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:i.cursorControl?i.cursorControl.lineEndAnticipation:0,beatSubdivisions:t}),i.cursorControl&&i.cursorControl.onReady&&"function"==typeof i.cursorControl.onReady&&i.cursorControl.onReady(i),i.isLoaded=!0,i.isLoading=!1,Promise.resolve({status:"created",notesStatus:e})}))},i.destroy=function(){i.timer&&(i.timer.reset(),i.timer.stop(),i.timer=null),i.midiBuffer&&(i.midiBuffer.stop(),i.midiBuffer=null),i.setProgress(0,1),i.control&&i.control.resetAll()},i.play=function(){return i.runWhenReady(i._play,void 0)},i.runWhenReady=function(e,t){return i.visualObj?i.isLoading?(n=500,new Promise((function(e){setTimeout(e,n)}))).then((function(){return i.isLoading?i.runWhenReady(e,t):e(t)})):i.isLoaded?e(t):i.go().then((function(){return e(t)})):Promise.resolve({status:"loading"});var n},i._play=function(){return r().resume().then((function(){return i.isStarted=!i.isStarted,i.isStarted?(i.cursorControl&&i.cursorControl.onStart&&"function"==typeof i.cursorControl.onStart&&i.cursorControl.onStart(),i.midiBuffer.start(),i.timer.start(i.percent),i.control&&i.control.pushPlay(!0)):i.pause(),Promise.resolve({status:"ok"})}))},i.pause=function(){i.timer&&(i.timer.pause(),i.midiBuffer.pause(),i.control&&i.control.pushPlay(!1))},i.toggleLoop=function(){i.isLooping=!i.isLooping,i.control&&i.control.pushLoop(i.isLooping)},i.restart=function(){i.timer&&(i.timer.setProgress(0),i.midiBuffer.seek(0))},i.randomAccess=function(e){return i.runWhenReady(i._randomAccess,e)},i._randomAccess=function(e){var t=e.target.classList.contains("abcjs-midi-progress-indicator")?e.target.parentNode:e.target,n=(e.x-t.getBoundingClientRect().left)/t.offsetWidth;return n<0&&(n=0),n>1&&(n=1),i.seek(n),Promise.resolve({status:"ok"})},i.seek=function(e,t){i.timer&&i.midiBuffer&&(i.timer.setProgress(e,t),i.midiBuffer.seek(e,t))},i.setWarp=function(e){if(parseInt(e,10)>0){i.warp=parseInt(e,10);var t=i.isStarted,n=i.percent;return i.destroy(),i.isStarted=!1,i.go().then((function(){return i.setProgress(n,1e3*i.midiBuffer.duration),i.control&&i.control.setWarp(i.currentTempo,i.warp),t?i.play().then((function(){return i.seek(n),Promise.resolve()})):(i.seek(n),Promise.resolve())}))}return Promise.resolve()},i.onWarp=function(e){var t=e.target.value;return i.setWarp(t)},i.setProgress=function(e,t){i.percent=e,i.control&&i.control.setProgress(e,t)},i.finished=function(){if(i.timer.reset(),i.isLooping)return i.timer.start(0),i.midiBuffer.finished(),i.midiBuffer.start(),"continue";i.timer.stop(),i.isStarted&&(i.control&&i.control.pushPlay(!1),i.isStarted=!1,i.midiBuffer.finished(),i.cursorControl&&i.cursorControl.onFinished&&"function"==typeof i.cursorControl.onFinished&&i.cursorControl.onFinished(),i.setProgress(0,1))},i.beatCallback=function(e,t,n,r){var s=e/t;i.setProgress(s,n),i.cursorControl&&i.cursorControl.onBeat&&"function"==typeof i.cursorControl.onBeat&&i.cursorControl.onBeat(e,t,n,r)},i.eventCallback=function(e){if(!e)return i.finished();i.cursorControl&&i.cursorControl.onEvent&&"function"==typeof i.cursorControl.onEvent&&i.cursorControl.onEvent(e)},i.lineEndCallback=function(e,t){i.cursorControl&&i.cursorControl.onLineEnd&&"function"==typeof i.cursorControl.onLineEnd&&i.cursorControl.onLineEnd(e,t)},i.getUrl=function(){return i.midiBuffer.download()},i.download=function(e){var t=i.getUrl(),n=document.createElement("a");document.body.appendChild(n),n.setAttribute("style","display: none;"),n.href=t,n.download=e||"output.wav",n.click(),window.URL.revokeObjectURL(t),document.body.removeChild(n)}}}function jv(){if(ug)return lg;ug=1;var e,t=Bv();return function(){function n(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n]);return e}function r(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}r.prototype.setTempo=function(e){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+s(Math.round(6e7/e),6),this.endTrack())},r.prototype.setGlobalInfo=function(e,t,n,r){if(0===this.trackcount){this.startTrack();var a=Math.round(6e7/e);this.track+="%00%FF%51%03"+s(a,6),n&&(this.track+=function(e){if(!e||!e.accidentals)return"";for(var t="%00%FF%59%02",n=0,r=256,i=0;i<e.accidentals.length;i++)"sharp"===e.accidentals[i].acc?n++:"flat"===e.accidentals[i].acc&&r--;var a=s(256!==r?r:n,2),o="m"===e.mode?"%01":"%00";return t+a+o}(n)),r&&(this.track+=function(e){var t,n="%00%FF%58%04"+s(e.num,2),r={1:0,2:1,4:2,8:3,16:4,32:5}[e.den];if(!r)return"";switch(n+=s(r,2),e.num+"/"+e.den){case"2/4":case"3/4":case"4/4":case"5/4":t=24;break;case"6/4":t=72;break;case"2/2":case"3/2":case"4/2":t=48;break;case"3/8":case"6/8":case"9/8":case"12/8":t=36}return t?(n+=s(t,2))+"%08":""}(r)),t&&(this.track+=i(t,"%01")),this.endTrack()}},r.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},r.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var e=s(this.track.length/3+4,8);this.track="MTrk"+e+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},r.prototype.setText=function(e,t){if("name"===e)this.trackName=i(t,"%03")},r.prototype.setInstrument=function(e){this.trackInstrument="%00%C0"+s(e,2),this.instrument=e},r.prototype.setChannel=function(e,t){this.channel=e;var n="%00%B"+this.channel.toString(16);this.track+=n+"%79%00",this.track+=n+"%40%00",this.track+=n+"%5B%30",t||(t=0),t=Math.round(64*(t+1)),this.track+=n+"%0A"+s(t,2),this.track+=n+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};function i(e,t){for(var n="",r=0;r<e.length;r++)n+=s(e.charCodeAt(r),2);return"%00%FF"+t+s(n.length/3,2)+n}function s(e,t){var n=e.toString(16);for(n=n.split(".")[0];n.length<t;)n="0"+n;return n.length>t&&(n=n.substring(0,t)),function(e){for(var t="",n=0;n<e.length;n+=2)t+="%",t+=e.substr(n,2);return t}(n)}function a(e){var t=(e=Math.round(e))%128;return s(2*(e-t)+t,4)}function o(e){var t=0,n=[];for(e=Math.round(e);0!==e;)n.push(127&e),e>>=7;for(var r=n.length-1;r>=0;r--){t<<=8;var i=n[r];0!==r&&(i|=128),t|=i}var a=t.toString(16).length;return s(t,a+=a%2)}r.prototype.startNote=function(e,n,r){if(this.track+=o(this.silencelength),this.silencelength=0,r){this.track+="%e"+this.channel.toString(16);var i=Math.round(4096*t(r));this.track+=a(8192+i),this.track+=o(0),this.noteWarped[e]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+e.toString(16)+s(n,2)},r.prototype.endNote=function(e){this.track+=o(this.silencelength),this.silencelength=0,this.noteWarped[e]&&(this.track+="%e"+this.channel.toString(16),this.track+=a(8192),this.track+=o(0),this.noteWarped[e]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+e.toString(16)+"%00"},r.prototype.addRest=function(e){this.silencelength+=e,this.silencelength<0&&(this.silencelength=0)},r.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+s(this.trackcount,4)+"%01%e0"+this.trackstrings},r.prototype.embed=function(e,t){var r=this.getData(),i=n(document.createElement("a"),{href:r});if(i.innerHTML="download midi",e.insertBefore(i,e.firstChild),!t){var s=n(document.createElement("embed"),{src:r,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});e.insertBefore(s,e.firstChild)}},e=function(){return new r}}(),lg=e}function qv(){if(pg)return fg;pg=1;var e=Hg(),t=function(){if(dg)return hg;dg=1;var e,t=jv();return function(){function n(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;i++)r[i]=parseFloat(r[i]);r.sort((function(e,t){return e-t}));for(var s=0,a=0;a<r.length;a++){var o=t[r[a]];if(r[a]>s){var c=(r[a]-s)*n;e.addRest(c),s=r[a]}for(var l=0;l<o.length;l++){var u=o[l];u.volume?e.startNote(u.pitch,u.volume,u.cents):e.endNote(u.pitch)}}}e=function(e,r){void 0===r&&(r={});var i=e.setUpAudio(r),s=t(),a=e.metaText?e.metaText.title:void 0;a&&a.length>128&&(a=a.substring(0,124)+"...");var o=e.getKeySignature(),c=e.getMeterFraction(),l=i.tempo,u=l/60;8==c.den&&(u=(l=6e4/(e.millisecondsPerMeasure()/c.num)/2)/60),s.setGlobalInfo(l,a,o,c);for(var h=0;h<i.tracks.length;h++){s.startTrack();for(var d={},f=0;f<i.tracks[h].length;f++){var p=i.tracks[h][f];switch(p.cmd){case"text":s.setText(p.type,p.text);break;case"program":var m=0;r.pan&&r.pan.length>h&&(m=r.pan[h]),128===p.instrument?(s.setChannel(9,m),s.setInstrument(0)):(s.setChannel(p.channel,m),s.setInstrument(p.instrument));break;case"note":var g=p.gap*u,v=p.start,b=v+p.duration-g;d[v]||(d[v]=[]),d[v].push({pitch:p.pitch,volume:p.volume,cents:p.cents}),d[b]||(d[b]=[]),d[b].push({pitch:p.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+p.cmd)}}n(s,d,1920),s.endTrack()}return s.getData()}}(),hg=e}();var n=function(e,t,n,r){var i=["abcjs-download-midi","abcjs-midi-"+r];t.downloadClass&&i.push(t.downloadClass);var s='<div class="'+i.join(" ")+'">';t.preTextDownload&&(s+=t.preTextDownload);var a,o,c=e.metaText&&e.metaText.title?e.metaText.title:"Untitled";return a=t.downloadLabel&&((o=t.downloadLabel)&&"[object Function]"==={}.toString.call(o))?t.downloadLabel(e,r):t.downloadLabel?t.downloadLabel.replace(/%T/,c):'Download MIDI for "'+c+'"',c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"),s+='<a download="'+(t.fileName?t.fileName:c+".midi")+'" href="'+n+'">'+a+"</a>",t.postTextDownload&&(s+=t.postTextDownload),s+"</div>"};return fg=function(r,i){var s={};if(i)for(var a in i)i.hasOwnProperty(a)&&(s[a]=i[a]);function o(e,r,i){var a=t(r,s);switch(s.midiOutputType){case"encoded":return a;case"binary":var o=a.replace("data:audio/midi,","");o=(o=o.replace(/MThd/g,"%4d%54%68%64")).replace(/MTrk/g,"%4d%54%72%6b");for(var c=new ArrayBuffer(o.length/3),l=new Uint8Array(c),u=0;u<o.length/3;u++){var h=3*u+1,d=parseInt(o.substring(h,h+2),16);l[u]=d}return l;default:return n(r,s,a,i)}}return s.generateInline=!1,"string"==typeof r?e.renderEngine(o,"*",r,s):o(0,r,0)},fg}function Hv(){if(gg)return mg;gg=1;try{if("function"!=typeof window.CustomEvent){var e=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n};e.prototype=window.Event.prototype,window.CustomEvent=e}}catch(n){}var t=function(e){this.textarea="string"==typeof e?document.getElementById(e):e,this.initialText=this.textarea.value,this.isDragging=!1};return t.prototype.addSelectionListener=function(e){this.textarea.onmousemove=function(t){this.isDragging&&e.fireSelectionChanged()}},t.prototype.addChangeListener=function(e){this.changelistener=e,this.textarea.onkeyup=function(){e.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,e.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,e.fireChanged()},this.textarea.onchange=function(){e.fireChanged()}},t.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},t.prototype.setSelection=function(e,t){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(e,t);else if(this.textarea.createTextRange){var n=this.textarea.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select()}this.textarea.focus()},t.prototype.getString=function(){return this.textarea.value},t.prototype.setString=function(e){this.textarea.value=e,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},t.prototype.getElem=function(){return this.textarea},mg=t}const Yv=u(function(){if(_g)return yg;_g=1;var e=qu?ju:(qu=1,ju="6.4.4"),t=dh(),n=Hg(),r=Cg(),i=Yg(),s={};s.signature="abcjs-basic v"+e,Object.keys(t).forEach((function(e){s[e]=t[e]})),Object.keys(n).forEach((function(e){s[e]=n[e]})),s.renderAbc=Tv(),s.tuneMetrics=function(){if(_m)return ym;_m=1;var e=Hg(),t=Ev();return ym=function(n,r){return e.renderEngine((function(e,n,i,s){(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e);var a=new t(e,r).getMeasureWidths(n);return e.parentNode.removeChild(e),{sections:a}}),"*",n,r)}}(),s.TimingCallbacks=hh();var a=Ug();s.setGlyph=a.setSymbol,s.strTranspose=i;var o=Vv(),c=Av(),l=Dv(),u=Rv(),h=Fv(),d=Nv(),f=Iv(),p=Ov(),m=function(){if(ag)return sg;ag=1;var e=Rv(),t=Vv(),n=Iv();function r(e,n,r,i){var s=new t;return s.init({sequence:e,millisecondsPerMeasure:n,options:{soundFontUrl:r},debugCallback:i}).then((function(){return s.prime()})).then((function(){return s.start(),Promise.resolve()}))}return sg=function(t,i,s,a,o){for(var c=new e,l=0;l<t.length;l++){var u=t[l],h=c.addTrack();if(c.setInstrument(h,u.instrument),0===l&&i)for(var d=0;d<i.length;d++){var f=i[d];c.appendNote(h,f.pitch,1/64,f.volume,f.cents)}c.appendNote(h,u.pitch,u.duration,u.volume,u.cents)}var p=n();return"suspended"===p.state?p.resume().then((function(){return r(c,s,a,o)})):r(c,s,a,o)}}(),g=zv(),v=qv(),b=jv();return s.synth={CreateSynth:o,instrumentIndexToName:c,pitchToNoteName:l,SynthController:g,SynthSequence:u,CreateSynthControl:h,registerAudioContext:d,activeAudioContext:f,supportsAudio:p,playEvent:m,getMidiFile:v,sequence:r,midiRenderer:b},s.Editor=function(){if(bg)return vg;bg=1;var e=fh(),t=zv(),n=Ov(),r=Tv(),i=Hv(),s=function(t,r){this.abcjsParams=function(e){var t,n={};if(e.abcjsParams)for(t in e.abcjsParams)e.abcjsParams.hasOwnProperty(t)&&(n[t]=e.abcjsParams[t]);if(e.midi_options)for(t in e.midi_options)e.midi_options.hasOwnProperty(t)&&(n[t]=e.midi_options[t]);if(e.parser_options)for(t in e.parser_options)e.parser_options.hasOwnProperty(t)&&(n[t]=e.parser_options[t]);if(e.render_options)for(t in e.render_options)e.render_options.hasOwnProperty(t)&&(n[t]=e.render_options[t]);return n.tablature&&e.warnings_id&&(n.tablature.warnings_id=e.warnings_id),n}(r),r.indicate_changed&&(this.indicate_changed=!0),this.editarea="string"==typeof t?new i(t):t,this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),r.canvas_id?this.div=r.canvas_id:r.paper_id?this.div=r.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),"string"==typeof this.div&&(this.div=document.getElementById(this.div)),r.selectionChangeCallback&&(this.selectionChangeCallback=r.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),r.synth&&n()&&(this.synth={el:r.synth.el,cursorControl:r.synth.cursorControl,options:r.synth.options}),r.generate_midi&&(this.generate_midi=r.generate_midi,this.abcjsParams.generateDownload&&("string"==typeof r.midi_download_id?this.downloadMidi=document.getElementById(r.midi_download_id):r.midi_download_id&&(this.downloadMidi=r.midi_download_id)),!1!==this.abcjsParams.generateInline&&("string"==typeof r.midi_id?this.inlineMidi=document.getElementById(r.midi_id):r.midi_id&&(this.inlineMidi=r.midi_id))),r.warnings_id?"string"==typeof r.warnings_id?this.warningsdiv=document.getElementById(r.warnings_id):this.warningsdiv=r.warnings_id:r.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=r.onchange,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(e,t){var n,r;return n=t,(r=e.className).length>0&&(r===n||new RegExp("(^|\\s)"+n+"(\\s|$)").test(r))||(e.className+=(e.className?" ":"")+t),e},this.removeClassName=function(t,n){return t.className=e.strip(t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ")),t},this.setReadOnly=function(e){var t="abc_textarea_readonly",n=this.editarea.getElem();e?(n.setAttribute("readonly","yes"),this.addClassName(n,t)):(n.removeAttribute("readonly"),this.removeClassName(n,t))}};return s.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var e=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(e)}if(this.synth){var n=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new t,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],n,this.synth.options)}},s.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=r(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi()}catch(e){console.error("ABCJS error: ",e),this.warnings||(this.warnings=[]),this.warnings.push(e.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.updateSelection(),this.bReentry=!1}},s.prototype.paramChanged=function(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this.abcjsParams[t]=e[t]);this.currentAbc="",this.fireChanged()},s.prototype.synthParamChanged=function(e){if(this.synth){if(this.synth.options={},e)for(var t in e)e.hasOwnProperty(t)&&(this.synth.options[t]=e[t]);this.currentAbc="",this.fireChanged()}},s.prototype.parseABC=function(){var e=this.editarea.getString();return e===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=e,!0)},s.prototype.updateSelection=function(){var e=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(e.start,e.end)}catch(t){}this.selectionChangeCallback&&this.selectionChangeCallback(e.start,e.end)},s.prototype.fireSelectionChanged=function(){this.updateSelection()},s.prototype.setDirtyStyle=function(t){if(void 0!==this.indicate_changed){var n,r,i,s,a="abc_textarea_dirty",o=this.editarea.getElem();t?(i=r=a,(s=(n=o).className).length>0&&(s===i||new RegExp("(^|\\s)"+i+"(\\s|$)").test(s))||(n.className+=(n.className?" ":"")+r)):function(t,n){t.className=e.strip(t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," "))}(o,a)}},s.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var e=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((function(){e.modelChanged()}),300);var t=this.isDirty();this.wasDirty!==t&&(this.wasDirty=t,this.setDirtyStyle(t)),this.onchangeCallback&&this.onchangeCallback(this)}},s.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},s.prototype.isDirty=function(){return void 0!==this.indicate_changed&&this.editarea.initialText!==this.editarea.getString()},s.prototype.highlight=function(e,t,n,r,i,s){this.editarea.setSelection(e.startChar,e.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(e.startChar,e.endChar),this.clientClickListener&&this.clientClickListener(e,t,n,r,i,s)},s.prototype.pause=function(e){this.bIsPaused=e,e||this.fireChanged()},s.prototype.millisecondsPerMeasure=function(){return this.synth&&this.synth.synthControl&&this.synth.synthControl.visualObj?this.synth.synthControl.visualObj.millisecondsPerMeasure():0},s.prototype.pauseMidi=function(e){this.midiPause=e,e||this.redrawMidi()},vg=s}(),s.EditArea=Hv(),yg=s}()),Uv=n.defineComponent({name:"MusicScoreRenderer",props:{abcString:{type:String,required:!0}},mounted(){Yv.renderAbc("abc",this.abcString)}}),Gv={id:"abc"};const Wv=C(Uv,[["render",function(e,t,r,i,s,a){return n.openBlock(),n.createElementBlock("div",Gv)}]]);const $v=n.defineComponent({name:"IdentifyKeyView",components:{RadioMultipleChoice:r.RadioMultipleChoice,MusicScoreRenderer:Wv},props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"IdentifyKeyView"),s=r.useQuestionView(i),a=n.ref("");s.question.value=new Jv(e.data);const o=n.computed((()=>s.question.value)),c=n.computed((()=>{var e,t;const n=function(){const e=[];for(let t=0;t<5;t++)e.push(Xv[Math.floor(Math.random()*Xv.length)]);return e}();return n.includes((null==(e=o.value)?void 0:e.key)||"")||(n[Math.floor(Math.random()*n.length)]=(null==(t=o.value)?void 0:t.key)||""),n}));return{...i,...s,answer:a,question:o,choices:c,submit:()=>{}}}}),Kv={"data-viewable":"IdentifyKeyView"};const Qv=C($v,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("MusicScoreRenderer"),c=n.resolveComponent("RadioMultipleChoice");return n.openBlock(),n.createElementBlock("div",Kv,[e.question?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(o,{"key-signature":`X:1\nK:${e.question.key}\n||`,"abc-string":"''"},null,8,["key-signature"]),t[0]||(t[0]=n.createTextVNode(" This signature is for the major key: _____ ")),n.createVNode(c,{"choice-list":e.choices},null,8,["choice-list"])],64)):n.createCommentVNode("",!0)])}]]),Xv=["C","G","D","A","E","B","F#","C#","F","Bb","Eb","Ab","Db","Gb","Cb"],Zv=class _IdentifyKeyQuestion extends r.Question{constructor(e){super(e),t(this,"key"),this.key=_IdentifyKeyQuestion.getKey(e[0].key)}static getKey(e){return Xv[e]}isCorrect(e){return console.log(`answer: ${JSON.stringify(e)}, key: ${this.key}`),this.key===e.choiceList[e.selection]}dataShapes(){return _IdentifyKeyQuestion.dataShapes}views(){return _IdentifyKeyQuestion.views}};t(Zv,"dataShapes",[{name:a.DataShapeName.SIGHTSING_IdentifyKey,fields:[{name:"key",type:a.FieldType.NUMBER,validator:{test:e=>{const t=parseInt(e);return t>=0&&t<=Xv.length?{msg:"",status:a.Status.ok}:{msg:"Please enter a number between 0 and 11",status:a.Status.error}}}}]}]),t(Zv,"views",[Qv]);let Jv=Zv;const eb=new CourseWare("sightSing",[Jv]),tb=n.defineComponent({name:"LetterQuestionView",props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"LetterQuestionView"),s=r.useQuestionView(i),a=n.ref(null);s.question.value=new sb(e.data);const o=n.computed((()=>s.question.value)),c=e=>{var t;if(!o.value)return;const n=e.key.toLowerCase(),r=o.value.letter.toLowerCase();if(n===r){null==(t=a.value)||t.classList.add("pressed");const e=t=>{var i;t.key.toLowerCase()===r&&(null==(i=a.value)||i.classList.remove("pressed"),s.submitAnswer(n),window.removeEventListener("keyup",e))};window.addEventListener("keyup",e)}else s.submitAnswer(n)};return n.onMounted((()=>{window.addEventListener("keypress",c)})),n.onUnmounted((()=>{window.removeEventListener("keypress",c)})),{...s,...i,letterDisplay:a,question:o}}}),nb={"data-viewable":"LetterQuestionView"};const rb=C(tb,[["render",function(e,t,r,i,s,a){return n.openBlock(),n.createElementBlock("div",nb,[e.question?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t[0]||(t[0]=n.createElementVNode("p",{class:"text-h5"},"Type this letter!",-1)),n.createElementVNode("div",{ref:"letterDisplay",class:"letter-display"},n.toDisplayString(e.question.letter),513)],64)):n.createCommentVNode("",!0)])}],["__scopeId","data-v-4ae4db54"]]),ib=class _TypeLetterQuestion extends r.Question{constructor(e){super(e),t(this,"letter"),this.letter=e[0].letter}evaluate(e,t){return{isCorrect:this.isCorrect(e),performance:this.displayedSkill(e,t)}}displayedSkill(e,t){if(this.isCorrect(e)){if(t<3e3)return 1;{const e=1-(t-3e3)/7e3*.75;return Math.max(.25,e)}}return 0}dataShapes(){return _TypeLetterQuestion.dataShapes}views(){return _TypeLetterQuestion.views}isCorrect(e){const t=e.toLowerCase()===this.letter.toLowerCase();return console.log(`singleLetter Q isCorrect: ${t}`),t}};t(ib,"dataShapes",[{name:a.DataShapeName.TYPING_singleLetter,fields:[{name:"letter",type:a.FieldType.STRING,validator:{instructions:"Enter a single letter",test:function(e){return e&&1===e.length&&/[a-zA-Z]/.test(e)?{status:a.Status.ok,msg:""}:{status:a.Status.error,msg:"Input must be a single letter"}}}}]}]),t(ib,"views",[rb]),t(ib,"acceptsUserData",!0),t(ib,"seedData",function(){const e=[];for(let t=0;t<26;t++)e.push({letter:String.fromCharCode(65+t)});return e}());let sb=ib;const ab=class _FallingLettersQuestion extends r.Question{constructor(e){super(e),t(this,"gameLength"),t(this,"initialSpeed"),t(this,"acceleration"),t(this,"spawnInterval"),this.gameLength=e[0].gameLength,this.initialSpeed=e[0].initialSpeed,this.acceleration=e[0].acceleration,this.spawnInterval=e[0].spawnInterval}evaluate(e){return{isCorrect:this.isCorrect(e),performance:this.displayedSkill(e)}}displayedSkill(e){return e.win?1:e.percentage}dataShapes(){return _FallingLettersQuestion.dataShapes}views(){return _FallingLettersQuestion.views}isCorrect(e){return e.win}};t(ab,"dataShapes",[{name:a.DataShapeName.TYPING_fallingLetters,fields:[{name:"gameLength",type:a.FieldType.NUMBER},{name:"initialSpeed",type:a.FieldType.NUMBER},{name:"acceleration",type:a.FieldType.NUMBER},{name:"spawnInterval",type:a.FieldType.NUMBER,validator:{instructions:"How often should a new letter spawn? (in seconds)",test:e=>{if("string"==typeof e){return parseFloat(e)>0?{status:a.Status.ok,msg:""}:{status:a.Status.error,msg:"Must be greater than 0"}}return{status:a.Status.error,msg:"Unexpected non-string input."}},placeholder:"1"}}]}]),t(ab,"views",[]),t(ab,"acceptsUserData",!0),t(ab,"seedData",[{gameLength:30,initialSpeed:2,acceleration:.1,spawnInterval:1}]);let ob=ab;const cb=n.defineComponent({name:"FallingLettersView",emits:["emitResponse"],props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"FallingLettersView"),s=r.useQuestionView(i),a=n.ref(null),o=n.ref([]),c=n.ref(!1),l=n.ref(""),u=n.ref(30),h=n.ref(0),d=n.ref([]),f=n.ref([]),p=n.ref({currentSpeed:2,letterId:0,gameLoop:null,lastSpawn:0,lastUpdate:0,spawnInterval:1e3}),m=e=>{if(c.value)return;const t=(e-p.value.lastUpdate)/1e3;if(p.value.lastUpdate=e,u.value-=t,s.question.value&&(p.value.currentSpeed+=s.question.value.acceleration*t),u.value<=0)return c.value=!0,l.value="You Win!",void s.submitAnswer({lettersTyped:h.value,win:!0,percentage:1});e-p.value.lastSpawn>=p.value.spawnInterval&&((()=>{if(!a.value)return;const e={id:p.value.letterId++,char:String.fromCharCode(65+Math.floor(26*Math.random())),x:Math.random()*(a.value.clientWidth-30),y:-30};o.value.push(e)})(),p.value.lastSpawn=e,p.value.spawnInterval=Math.max(500,p.value.spawnInterval-10)),a.value&&(o.value=o.value.filter((e=>{return e.y+=p.value.currentSpeed,!(e.y>a.value.clientHeight)||(c.value=!0,l.value="Game Over!",s.submitAnswer({lettersTyped:h.value,percentage:u.value/((null==(t=s.question.value)?void 0:t.gameLength)||30),win:!1}),!1);var t}))),p.value.gameLoop=requestAnimationFrame(m)},g=e=>{if(c.value)return;const t=e.key.toUpperCase(),n=o.value.findIndex((e=>e.char===t));-1!==n&&(f.value.push({id:Date.now(),x:o.value[n].x,y:o.value[n].y}),setTimeout((()=>{f.value=f.value.filter((e=>e.id!==f.value[f.value.length-1].id))}),300),o.value.splice(n,1),h.value++)};return n.onMounted((()=>{try{s.question.value=new ob(e.data),s.maxAttemptsPerView.value=1,window.addEventListener("keypress",g),d.value=Array.from({length:7},((e,t)=>({id:t,left:20+t*Math.random()*30-10,height:100+120*Math.random(),scale:1+2*Math.random()}))),s.question.value?(u.value=s.question.value.gameLength,h.value=0,o.value=[],c.value=!1,l.value="",p.value={currentSpeed:s.question.value.initialSpeed,letterId:0,gameLoop:null,lastSpawn:performance.now(),lastUpdate:performance.now(),spawnInterval:1e3*s.question.value.spawnInterval},p.value.gameLoop=requestAnimationFrame(m)):i.logger.error("Question not initialized")}catch(t){i.logger.error("Error initializing game:",t)}})),n.onUnmounted((()=>{window.removeEventListener("keypress",g),p.value.gameLoop&&cancelAnimationFrame(p.value.gameLoop)})),{...s,gameArea:a,letters:o,gameOver:c,gameOverMessage:l,timeLeft:u,score:h,treePositions:d,explosions:f}}}),lb={class:"game-container"},ub={class:"stats"},hb={class:"time"},db={class:"score"},fb={ref:"gameArea",class:"game-area"},pb={class:"letter-text"},mb={class:"trees"},gb={key:0,class:"game-over"};const vb=C(cb,[["render",function(e,t,r,i,s,a){return n.openBlock(),n.createElementBlock("div",lb,[n.createElementVNode("div",ub,[n.createElementVNode("div",hb,"Time: "+n.toDisplayString(e.timeLeft.toFixed(1))+"s",1),n.createElementVNode("div",db,"Score: "+n.toDisplayString(e.score),1)]),n.createElementVNode("div",fb,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.letters,(e=>(n.openBlock(),n.createElementBlock("div",{key:e.id,class:"falling-letter",style:n.normalizeStyle({left:e.x+"px",top:e.y+"px"})},[t[0]||(t[0]=n.createElementVNode("div",{class:"meteor-effect"},null,-1)),n.createElementVNode("span",pb,n.toDisplayString(e.char),1)],4)))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.explosions,(e=>(n.openBlock(),n.createElementBlock("div",{key:e.id,class:"explosion",style:n.normalizeStyle({left:e.x+"px",top:e.y+"px"})},[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(12,(e=>n.createElementVNode("div",{key:e,class:"particle"}))),64))],4)))),128)),t[2]||(t[2]=n.createElementVNode("div",{class:"grass-container"},[n.createElementVNode("div",{class:"grass"}),n.createElementVNode("div",{class:"grass-overlay"})],-1)),n.createElementVNode("div",mb,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.treePositions,(e=>(n.openBlock(),n.createElementBlock("div",{key:e.id,class:"tree",style:n.normalizeStyle({left:`${e.left}%`,height:`${e.height}px`,transform:`scale(${e.scale})`})},t[1]||(t[1]=[n.createElementVNode("div",{class:"tree-crown"},null,-1),n.createElementVNode("div",{class:"tree-trunk"},null,-1)]),4)))),128))])],512),e.gameOver?(n.openBlock(),n.createElementBlock("div",gb,n.toDisplayString(e.gameOverMessage),1)):n.createCommentVNode("",!0)])}],["__scopeId","data-v-41b85e8b"]]);ob.views=[vb];const bb=new CourseWare("typing",[sb,ob]),yb=n.defineComponent({name:"IdentifyVocab",components:{AudioAutoPlayer:r.AudioAutoPlayer,UserInputString:r.UserInputString},props:{data:{type:Array,required:!0},modifyDifficulty:{type:Number,required:!1,default:0}},setup(e,{emit:t}){const i=r.useViewable(e,t,"IdentifyVocab"),s=r.useQuestionView(i),a=n.ref("");s.question.value=new Cb(e.data);const o=n.computed((()=>s.question.value));return{...i,...s,answer:a,question:o,submit:()=>{o.value&&s.submitAnswer(a.value)}}}}),_b={"data-viewable":"IdentifyVocab"},wb={key:0,class:"text-h6"};const xb=C(yb,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("UserInputString"),c=n.resolveComponent("center"),l=n.resolveComponent("audio-auto-player");return n.openBlock(),n.createElementBlock("div",_b,[e.question?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t[1]||(t[1]=n.createElementVNode("span",{class:"text-h5"}," Spell the word: ",-1)),n.createVNode(o,{modelValue:e.answer,"onUpdate:modelValue":t[0]||(t[0]=t=>e.answer=t)},null,8,["modelValue"]),n.createVNode(c,null,{default:n.withCtx((()=>[e.priorAttempts?(n.openBlock(),n.createElementBlock("span",wb,n.toDisplayString(e.question.word),1)):n.createCommentVNode("",!0)])),_:1}),n.createVNode(c,null,{default:n.withCtx((()=>[n.createVNode(l,{src:[e.getURL("WordAudio"),e.getURL("SentenceAudio"),e.getURL("WordAudio")]},null,8,["src"])])),_:1})],64)):n.createCommentVNode("",!0)])}]]),kb=[{name:"Word",type:a.FieldType.STRING,validator:a.Validators.NonEmptyString},{name:"ExampleSentence",type:a.FieldType.STRING},{name:"WordAudio",type:a.FieldType.AUDIO},{name:"SentenceAudio",type:a.FieldType.AUDIO}],Sb=class _SpellingQuestion extends r.Question{constructor(e){super(e),t(this,"word"),t(this,"sentence"),t(this,"audio_word"),t(this,"audio_sentence"),this.word=e[0].Word,this.sentence=e[0].Sentence,this.audio_word=e[0].WordAudio,this.audio_sentence=e[0].SentenceAudio}isCorrect(e){return e===this.word}dataShapes(){return _SpellingQuestion.dataShapes}views(){return _SpellingQuestion.views}};t(Sb,"dataShapes",[{fields:kb,name:a.DataShapeName.WORDWORK_Spelling}]),t(Sb,"views",[xb]);let Cb=Sb;const Mb=new CourseWare("wordWork",[Cb]),Eb=n.defineComponent({name:"PianoRangeVisualizer",props:{lowestNote:{type:Number,required:!0},highestNote:{type:Number,required:!0},maxWidth:{type:Number,default:1e3}},setup(e){const t=n.ref(null),r=n.ref(800),i=n.computed((()=>{let e=0;for(let t=21;t<=108;t++)c(t)&&e++;return e})),s=n.computed((()=>Math.min(22,r.value/Math.max(25,i.value)))),a=n.computed((()=>.6*s.value)),o=n.computed((()=>Math.min(e.maxWidth,s.value*i.value+10))),c=e=>[0,2,4,5,7,9,11].includes(e%12);return n.onMounted((()=>{if(t.value){r.value=t.value.clientWidth;new ResizeObserver((e=>{for(const t of e)r.value=t.contentRect.width})).observe(t.value)}})),{pianoWrapper:t,keyHeight:100,blackKeyHeight:60,whiteKeyWidth:s,blackKeyWidth:a,svgWidth:o,isWhiteKey:c,getKeyPosition:e=>{let t=0;for(let n=21;n<e;n++)c(n)&&t++;return c(e)?t*s.value:t*s.value-a.value/2},getNoteLabel:e=>{const t=e%12,n=Math.floor(e/12)-1;return`${["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"][t]}${n}`}}}}),Tb={class:"piano-range-container"},Pb={class:"piano-wrapper",ref:"pianoWrapper"},Ab=["width","height"],Nb={class:"background-keys",opacity:"0.15"},Ib=["x","width","height"],Ob=["x","width","height"],Db={class:"selected-range"},Lb=["x","width","height"],Bb=["x","width","height"],Vb={class:"range-markers"},Rb=["x","height"],Fb=["x","height"],zb=["x","y"],jb=["x","y"];const qb=C(Eb,[["render",function(e,t,r,i,s,a){return n.openBlock(),n.createElementBlock("div",Tb,[n.createElementVNode("div",Pb,[(n.openBlock(),n.createElementBlock("svg",{width:e.svgWidth,height:e.keyHeight+20,class:"piano-svg"},[n.createElementVNode("g",Nb,[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(88,(t=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:`bg-${t}`},[e.isWhiteKey(t+20)?(n.openBlock(),n.createElementBlock("rect",{key:0,x:e.getKeyPosition(t+20),y:"0",width:e.whiteKeyWidth,height:e.keyHeight,class:"white-key",stroke:"#999","stroke-width":"1"},null,8,Ib)):n.createCommentVNode("",!0)],64)))),64)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(88,(t=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:`bg-black-${t}`},[e.isWhiteKey(t+20)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("rect",{key:0,x:e.getKeyPosition(t+20),y:"0",width:e.blackKeyWidth,height:e.blackKeyHeight,class:"black-key"},null,8,Ob))],64)))),64))]),n.createElementVNode("g",Db,[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(128,(t=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:`white-${t}`},[e.isWhiteKey(t)&&t>=e.lowestNote&&t<=e.highestNote?(n.openBlock(),n.createElementBlock("rect",{key:0,x:e.getKeyPosition(t),y:"0",width:e.whiteKeyWidth,height:e.keyHeight,class:"white-key active",stroke:"#666","stroke-width":"1"},null,8,Lb)):n.createCommentVNode("",!0)],64)))),64)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(128,(t=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:`black-${t}`},[!e.isWhiteKey(t)&&t>=e.lowestNote&&t<=e.highestNote?(n.openBlock(),n.createElementBlock("rect",{key:0,x:e.getKeyPosition(t),y:"0",width:e.blackKeyWidth,height:e.blackKeyHeight,class:"black-key active"},null,8,Bb)):n.createCommentVNode("",!0)],64)))),64))]),n.createElementVNode("g",Vb,[n.createElementVNode("rect",{x:e.getKeyPosition(e.lowestNote)-2,y:"0",width:4,height:e.keyHeight+5,class:"range-marker start"},null,8,Rb),n.createElementVNode("rect",{x:e.getKeyPosition(e.highestNote)+e.whiteKeyWidth-2,y:"0",width:4,height:e.keyHeight+5,class:"range-marker end"},null,8,Fb)]),n.createElementVNode("text",{x:e.getKeyPosition(e.lowestNote)+3,y:e.keyHeight+12,class:"note-label"},n.toDisplayString(e.getNoteLabel(e.lowestNote)),9,zb),n.createElementVNode("text",{x:e.getKeyPosition(e.highestNote)+e.whiteKeyWidth-3,y:e.keyHeight+12,"text-anchor":"end",class:"note-label"},n.toDisplayString(e.getNoteLabel(e.highestNote)),9,jb)],8,Ab))],512)])}],["__scopeId","data-v-4b232a8b"]]),Hb=n.defineComponent({name:"MidiConfig",components:{PianoRangeVisualizer:qb},props:{_id:{type:String,required:!0},user:{type:Object,required:!0}},setup(e){const t=n.ref(),i=n.ref(!0),s=n.ref([]),o=n.ref([]),l=n.ref(""),u=n.ref(""),h=n.ref(!1),d=n.ref(""),f=n.ref(""),p=n.ref(!1),m=n.ref("full-88"),g=n.ref(21),v=n.ref(108),b=n.ref(""),y=n.ref(0),_=n.ref(0),w=n.ref([]),x=n.ref([{title:"Full 88-key Piano (A0-C8)",value:"full-88"},{title:"76-key Keyboard (E1-G7)",value:"76-key"},{title:"61-key Keyboard (C2-C7)",value:"61-key"},{title:"49-key Keyboard (C3-C7)",value:"49-key"},{title:"37-key Keyboard (C3-C6)",value:"37-key"},{title:"25-key Keyboard (C4-C6)",value:"25-key"},{title:"Custom Range",value:"custom"}]),k=()=>{p.value=l.value!==d.value||u.value!==f.value||m.value!==b.value||"custom"===m.value&&(g.value!==y.value||v.value!==_.value)},S=e=>{r.alertUser({text:`I hear a ${e.note.name}!`,status:a.Status.ok})};n.watch(l,(()=>{var e;null==(e=t.value)||e.selectInput(l.value),k()})),n.watch(u,(()=>{var e;null==(e=t.value)||e.selectOutput(u.value),k()}));return n.onMounted((async()=>{var n,r;(()=>{const e=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],t=[];for(let n=0;n<=127;n++){const r=Math.floor(n/12)-1,i=e[n%12];t.push({title:`${i}${r} (${n})`,value:n})}w.value=t})();try{t.value=await qs.instance(),i.value="ready"===t.value.state||"nodevice"===t.value.state}catch(a){console.log(`Error on midi Init: ${a}`),i.value=!1}i.value&&(null==(n=t.value)||n.addNoteonListenter(S),t.value?(s.value=t.value.inputs.filter((e=>"connected"===e.state)).map((e=>({title:`${e.manufacturer}: ${e.name}`,value:e.id}))),o.value=null==(r=t.value)?void 0:r.outputs.filter((e=>"connected"===e.state)).map((e=>({title:`${e.manufacturer}: ${e.name}`,value:e.id})))):(s.value=[{title:"No inputs available",value:""}],o.value=[{title:"No outputs available",value:""}]),await(async()=>{const t=await(await e.user.getCourseInterface(e._id)).getCourseSettings();if(null==t?void 0:t.midiinput){const e=t.midiinput.toString();s.value.some((t=>t.value===e))&&(l.value=e,d.value=e)}if(null==t?void 0:t.midioutput){const e=t.midioutput.toString();o.value.some((t=>t.value===e))&&(u.value=e,f.value=e)}(null==t?void 0:t.keyboardRange)&&(b.value=t.keyboardRange.toString(),m.value=b.value),(null==t?void 0:t.lowestNote)&&(y.value=parseInt(t.lowestNote.toString()),g.value=y.value),(null==t?void 0:t.highestNote)&&(_.value=parseInt(t.highestNote.toString()),v.value=_.value),(null==t?void 0:t.lowestNote)&&(null==t?void 0:t.highestNote)&&!(null==t?void 0:t.keyboardRange)&&(m.value="custom"),p.value=!1})(),!l.value&&s.value.length>0&&(l.value=s.value[0].value),!u.value&&o.value.length>0&&(u.value=o.value[0].value))})),{midiSupported:i,inputs:s,outputs:o,selectedInput:l,selectedOutput:u,updatePending:h,playSound:()=>{var e;null==(e=t.value)||e.play([{note:{number:64,name:"E",octave:4},type:"noteon",velocity:.4251968503937008,timestamp:0},{note:{number:64,name:"E",octave:4},velocity:.3779527559055118,type:"noteoff",timestamp:511.90500000002794},{note:{number:60,name:"C",octave:4},type:"noteon",velocity:.5275590551181102,timestamp:535.8800000001211},{note:{number:60,name:"C",octave:4},velocity:.33858267716535434,type:"noteoff",timestamp:674.9899999999907},{note:{number:60,name:"C",octave:4},type:"noteon",velocity:.5590551181102362,timestamp:1070.8800000000047},{note:{number:60,name:"C",octave:4},velocity:.3464566929133858,type:"noteoff",timestamp:1214.8999999999069},{note:{number:64,name:"E",octave:4},type:"noteon",velocity:.5118110236220472,timestamp:1424.9400000000605},{note:{number:64,name:"E",octave:4},velocity:.2755905511811024,type:"noteoff",timestamp:1576.9150000000373},{note:{number:62,name:"D",octave:4},type:"noteon",velocity:.3937007874015748,timestamp:1756.9149999999208},{note:{number:62,name:"D",octave:4},velocity:.36220472440944884,type:"noteoff",timestamp:1926.9899999998743},{note:{number:60,name:"C",octave:4},type:"noteon",velocity:.5196850393700787,timestamp:1970.9600000000792},{note:{number:60,name:"C",octave:4},velocity:.36220472440944884,type:"noteoff",timestamp:2126.009999999893},{note:{number:60,name:"C",octave:4},type:"noteon",velocity:.5984251968503937,timestamp:2502.0050000000047},{note:{number:60,name:"C",octave:4},velocity:.3858267716535433,type:"noteoff",timestamp:2853.920000000042},{note:{number:67,name:"G",octave:4},type:"noteon",velocity:.6850393700787402,timestamp:2875.8649999999907},{note:{number:67,name:"G",octave:4},velocity:.6377952755905512,type:"noteoff",timestamp:4497.004999999888}])},saveSettings:async()=>{h.value=!0;(await c.getDataLayer().getUserDB().getCourseInterface(e._id)).updateCourseSettings([{key:"midiinput",value:l.value},{key:"midioutput",value:u.value},{key:"keyboardRange",value:m.value},{key:"lowestNote",value:g.value},{key:"highestNote",value:v.value}]),d.value=l.value,f.value=u.value,b.value=m.value,y.value=g.value,_.value=v.value,p.value=!1,h.value=!1,r.alertUser({text:"Settings updated.",status:a.Status.ok})},configChanged:p,lowestNote:g,highestNote:v,keyboardRangeOptions:x,selectedKeyboardRange:m,noteOptions:w,updateCustomRangeFromPreset:()=>{switch(m.value){case"full-88":g.value=21,v.value=108;break;case"76-key":g.value=28,v.value=103;break;case"61-key":g.value=36,v.value=96;break;case"49-key":g.value=48,v.value=96;break;case"37-key":g.value=48,v.value=84;break;case"25-key":g.value=60,v.value=84}k()},updateRangeAndCheckChanges:()=>{g.value>=v.value&&(v.value=g.value+12),k()}}}}),Yb={key:0,class:"custom-range-inputs d-flex gap-4"},Ub={class:"d-flex justify-space-between mt-3"},Gb={key:1};const Wb=C(Hb,[["render",function(e,t,r,i,s,a){const o=n.resolveComponent("v-toolbar-title"),c=n.resolveComponent("v-toolbar"),l=n.resolveComponent("v-select"),u=n.resolveComponent("v-divider"),h=n.resolveComponent("piano-range-visualizer"),d=n.resolveComponent("v-btn"),f=n.resolveComponent("v-form"),p=n.resolveComponent("v-card-text"),m=n.resolveComponent("v-card");return n.openBlock(),n.createBlock(m,null,{default:n.withCtx((()=>[n.createVNode(c,{dense:""},{default:n.withCtx((()=>[n.createVNode(o,null,{default:n.withCtx((()=>t[5]||(t[5]=[n.createTextVNode("Configure Midi Device")]))),_:1})])),_:1}),n.createVNode(p,null,{default:n.withCtx((()=>[e.midiSupported?(n.openBlock(),n.createBlock(f,{key:0,onsubmit:"return false;"},{default:n.withCtx((()=>[n.createVNode(l,{modelValue:e.selectedInput,"onUpdate:modelValue":t[0]||(t[0]=t=>e.selectedInput=t),items:e.inputs,label:"Select Input",hint:"Play some notes on your input device to test the connection"},null,8,["modelValue","items"]),n.createVNode(l,{modelValue:e.selectedOutput,"onUpdate:modelValue":t[1]||(t[1]=t=>e.selectedOutput=t),items:e.outputs,label:"Select Output"},null,8,["modelValue","items"]),n.createVNode(u,{class:"my-4"}),t[8]||(t[8]=n.createElementVNode("h3",{class:"text-subtitle-1 mb-2"},"Keyboard Range",-1)),n.createVNode(l,{modelValue:e.selectedKeyboardRange,"onUpdate:modelValue":[t[2]||(t[2]=t=>e.selectedKeyboardRange=t),e.updateCustomRangeFromPreset],items:e.keyboardRangeOptions,label:"Select Keyboard Range"},null,8,["modelValue","items","onUpdate:modelValue"]),"custom"===e.selectedKeyboardRange?(n.openBlock(),n.createElementBlock("div",Yb,[n.createVNode(l,{modelValue:e.lowestNote,"onUpdate:modelValue":[t[3]||(t[3]=t=>e.lowestNote=t),e.updateRangeAndCheckChanges],items:e.noteOptions,label:"Lowest Note"},null,8,["modelValue","items","onUpdate:modelValue"]),n.createVNode(l,{modelValue:e.highestNote,"onUpdate:modelValue":[t[4]||(t[4]=t=>e.highestNote=t),e.updateRangeAndCheckChanges],items:e.noteOptions,label:"Highest Note"},null,8,["modelValue","items","onUpdate:modelValue"])])):n.createCommentVNode("",!0),n.createVNode(h,{"lowest-note":e.lowestNote,"highest-note":e.highestNote},null,8,["lowest-note","highest-note"]),n.createElementVNode("div",Ub,[n.createVNode(d,{color:"primary",onClick:e.playSound},{default:n.withCtx((()=>t[6]||(t[6]=[n.createTextVNode("Test midi output")]))),_:1},8,["onClick"]),n.createVNode(d,{loading:e.updatePending,disabled:!e.configChanged&&!e.updatePending,color:"info",class:"save-button",onClick:e.saveSettings},{default:n.withCtx((()=>t[7]||(t[7]=[n.createTextVNode(" Save these settings ")]))),_:1},8,["loading","disabled","onClick"])])])),_:1})):(n.openBlock(),n.createElementBlock("div",Gb,t[9]||(t[9]=[n.createElementVNode("p",null,"This quilt requires a midi input device, which is not supported by this browser.",-1),n.createElementVNode("div",null,[n.createElementVNode("p",null,"Try one of the following browsers:"),n.createElementVNode("ul",null,[n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://www.google.com/chrome/"},"Google Chrome")]),n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://www.microsoft.com/edge"},"Microsoft Edge")]),n.createElementVNode("li",null,[n.createElementVNode("a",{href:"https://brave.com/"},"Brave")])])],-1)])))])),_:1})])),_:1})}],["__scopeId","data-v-6ee9020f"]]),$b=r.useQuestionView;class AllCourseWare{constructor(e){t(this,"courseWareList"),t(this,"cachedRawViews",null),this.courseWareList=e}get courses(){return this.courseWareList}getCourseWare(e){return this.courseWareList.find((t=>t.name===e))}allViewsRaw(){if(!this.cachedRawViews){const e=this.allViews();this.cachedRawViews=Object.fromEntries(Object.entries(e).map((([e,t])=>[e,n.markRaw(t)])))}return this.cachedRawViews}allViews(){const e={};return this.courseWareList.forEach((t=>{Object.assign(e,t.allViewsMap)})),e}getView(e){let t;t="string"==typeof e?a.NameSpacer.getViewDescriptor(e):e;const n=this.getCourseWare(t.course);if(n){const e=n.getQuestion(t.questionType);if(e){const r=e.views.find((e=>e.name===t.view));if(r)return r;throw console.error(`QuestionView ${t.view} not found in course ${t.course}\n\n descriptor: ${JSON.stringify(t)}\n\n course: ${n.name}\n question: ${e.name}\n views: ${e.views.map((e=>e.name)).join(", ")}\n `),new Error(`view ${t.view} does not exist.`)}throw console.error(`Question ${t.questionType} not found in course ${t.course}\n\n descriptor: ${JSON.stringify(t)}\n\n course: ${n.name}\n questions: ${n.questions.map((e=>e.name)).join(", ")}\n `),new Error(`question ${t.questionType} does not exist.`)}throw console.error(`Course ${t.course} not found.\n\n descriptor: ${JSON.stringify(t)}`),new Error(`course ${t.course} does not exist.`)}toString(){let e="";return this.courses.forEach((t=>{e+=`Course: ${t.name}\n`,t.questions.forEach((t=>{e+=` Question: ${t.name}\n`,t.views.forEach((t=>{e+=` View: ${t.name}\n`}))}))})),e}allDataShapesRaw(){const e=[];return this.courseWareList.forEach((t=>{t.questions.forEach((t=>{t.dataShapes.forEach((t=>{e.includes(t)||e.push(t)}))}))})),e}allDataShapes(){const e=[];return this.courseWareList.forEach((t=>{t.questions.forEach((n=>{n.dataShapes.forEach((r=>{-1===e.findIndex((e=>e.course===t.name&&e.dataShape===r.name))&&e.push({course:t.name,dataShape:r.name,displayable:n})}))}))})),e}getDataShape(e){let t;if(this.getCourseWare(e.course).questions.forEach((n=>{n.dataShapes.forEach((n=>{n.name===e.dataShape&&(t=n)}))})),t)return t;throw new Error(`DataShape ${a.NameSpacer.getDataShapeString(e)} not found`)}}const Kb=new AllCourseWare([vi,Mb,Un,D,Iu,zu,eb,On,bb]);Object.defineProperty(exports,"Displayable",{enumerable:!0,get:()=>r.Displayable}),Object.defineProperty(exports,"Question",{enumerable:!0,get:()=>r.Question}),Object.defineProperty(exports,"useViewable",{enumerable:!0,get:()=>r.useViewable}),exports.BlanksCardDataShapes=o.BlanksCardDataShapes,exports.AllCourseWare=AllCourseWare,exports.BlanksCard=O,exports.CourseWare=CourseWare,exports.MidiConfig=Wb,exports.SkMidi=qs,exports.SyllableSeqVis=nu,exports.SyllableSequence=SyllableSequence,exports.allCourseWare=Kb,exports.chess=On,exports.eventsToSyllableSequence=zs,exports.french=Un,exports.gradeSpellingAttempt=k,exports.math=vi,exports.piano=Iu,exports.pitch=zu,exports.sightSing=eb,exports.transposeSyllableSeq=function(e,t){return e.map((e=>function(e,t){const n={...e},r=Vs.transpose(e.note.name+e.note.octave,ds.fromSemitones(t));return n.note={name:Vs.pitchClass(r),number:e.note.number+t,octave:Vs.octave(r)},n}(e,t)))},exports.typing=bb,exports.useQuestionView=$b,exports.wordWork=Mb;
|
|
75
75
|
//# sourceMappingURL=index.cjs.js.map
|