text: /*! abcjs_plugin-midi v6.0.0-beta.13 Copyright © 2009-2020 Paul Rosen and Gregory Dyke (https://abcjs.net) */
  /*! For license information please see abcjs_plugin-midi_6.0.0-beta.13-min.js.LICENSE */
  !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=25)}([function(e,t){var n={FONTEM:360,FONTSIZE:30};n.STEP=93*n.FONTSIZE/720,n.SPACE=10,n.TOPNOTE=15,n.STAVEHEIGHT=100,n.INDENT=50,e.exports=n},function(e,t){var n={clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},cloneArray:function(e){for(var t=[],r=0;r<e.length;r++)t.push(n.clone(e[r]));return t},cloneHashOfHash:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=n.clone(e[r]));return t},cloneHashOfArrayOfHash:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=n.cloneArray(e[r]));return t},gsub:function(e,t,n){return e.split(t).join(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},each:function(e,t,n){for(var r=0,i=e.length;r<i;r++)t.apply(n,[e[r],r])},last:function(e){return 0===e.length?null:e[e.length-1]},compact:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},detect:function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}};try{[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}))}catch(e){}e.exports=n},function(e,t){var n=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.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),this.height=i.height?i.height:4,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}};n.prototype.setX=function(e){this.x=e+this.dx},n.prototype.setUpperAndLowerElements=function(e){switch(this.type){case"part":this.top=e.partHeightAbove+this.height,this.bottom=e.partHeightAbove;break;case"text":case"chord":this.chordHeightAbove?(this.top=e.chordHeightAbove,this.bottom=e.chordHeightAbove):(this.top=e.chordHeightBelow,this.bottom=e.chordHeightBelow);break;case"lyric":this.lyricHeightAbove?(this.top=e.lyricHeightAbove,this.bottom=e.lyricHeightAbove):(this.top=e.lyricHeightBelow,this.bottom=e.lyricHeightBelow);break;case"debug":this.top=e.chordHeightAbove,this.bottom=e.chordHeightAbove}void 0!==this.pitch&&void 0!==this.top||window.console.error("RelativeElement position not set.",this.type,this.pitch,this.top,e)},e.exports=n},function(e,t){e.exports=function(e,t){var n;t.dim?(n=t.dim).attr.class=t.klass:n=e.controller.getFontAndAttr.calc(t.type,t.klass),t.anchor&&(n.attr["text-anchor"]=t.anchor),n.attr.x=t.x,n.attr.y=t.y,t.centerVertically||(n.attr.y+=n.font.size-(n.font.box?n.font.padding:0)),"debugfont"===t.type&&(console.log("Debug msg: "+t.text),n.attr.stroke="#ff0000");var r=t.text.replace(/\n\n/g,"\n \n");r=r.replace(/^\n/," \n"),n.font.box&&(e.paper.openGroup({klass:n.attr.class,fill:"#000000"}),n.attr.x+=2*n.font.padding,n.attr.y+=2*n.font.padding,delete n.attr.class),t.noClass&&delete n.attr.class;var i=e.paper.text(r,n.attr);if(n.font.box){var a=i.getBBox(),s=0;"middle"===n.attr["text-anchor"]&&(s=a.width/2),e.paper.rect({x:t.x+n.font.padding-s,y:t.y+n.font.padding,width:a.width+2*n.font.padding,height:a.height+2*n.font.padding}),i=e.paper.closeGroup()}return i}},function(e,t,n){var r=n(7),i=function(e,t,n,r,i,a){a||(a={}),this.tuneNumber=i,this.abcelem=e,this.duration=t,this.durationClass=a.durationClassOveride?a.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.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};i.prototype.setUpperAndLowerElements=function(e){for(var t=0;t<this.children.length;t++){var n=this.children[t];for(var r in this.specialY)this.specialY.hasOwnProperty(r)&&n[r]&&(n.pitch=e[r],void 0===n.top&&(n.setUpperAndLowerElements(e),this.pushTop(n.top),this.pushBottom(n.bottom)))}},i.prototype.getMinWidth=function(){return this.w},i.prototype.getExtraWidth=function(){return-this.extraw},i.prototype.addExtra=function(e){e.dx<this.extraw&&(this.extraw=e.dx),this.extra[this.extra.length]=e,this.addChild(e)},i.prototype.addHead=function(e){e.dx<this.extraw&&(this.extraw=e.dx),this.heads[this.heads.length]=e,this.addRight(e)},i.prototype.addRight=function(e){e.dx+e.w>this.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this.addChild(e)},i.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)},i.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])},i.prototype.addChild=function(e){e.parent=this,this.children[this.children.length]=e,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)},i.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},i.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},i.prototype.setX=function(e){this.x=e;for(var t=0;t<this.children.length;t++)this.children[t].setX(e)},i.prototype.setHint=function(){this.hint=!0},i.prototype.isIE=!1,i.prototype.highlight=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#ff0000"),r(this.elemset,e,"",t)},i.prototype.unhighlight=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#000000"),r(this.elemset,"",e,t)},e.exports=i},function(e,t,n){var r=n(0),i={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,.33,-.03,4.89],["c",-.06,2.67,-.09,5.01,-.09,5.22],["l",0,.36],["l",.15,-.15],["c",.36,-.3,.75,-.51,1.2,-.63],["c",.33,-.09,.96,-.09,1.26,-.03],["c",.27,.09,.63,.27,.87,.45],["l",.21,.15],["l",0,-.27],["c",0,-.15,-.03,-2.43,-.09,-5.1],["c",-.09,-4.56,-.09,-4.86,-.03,-4.89],["c",.15,-.12,.39,-.15,.72,-.15],["c",.3,0,.54,.03,.69,.15],["c",.06,.03,.06,.33,-.03,4.95],["c",-.06,2.7,-.09,5.04,-.09,5.22],["l",.03,.3],["l",.21,-.15],["c",.69,-.48,1.44,-.69,2.28,-.69],["c",.51,0,.78,.03,1.2,.21],["c",1.32,.63,2.01,2.28,1.53,3.69],["c",-.21,.57,-.51,1.02,-1.05,1.56],["c",-.42,.42,-.81,.72,-1.92,1.5],["c",-1.26,.87,-1.5,1.08,-1.86,1.5],["c",-.39,.45,-.54,.54,-.81,.51],["c",-.18,0,-.21,0,-.33,-.06],["l",-.21,-.21],["l",-.06,-.12],["l",-.03,-.99],["c",-.03,-.54,-.03,-1.29,-.06,-1.68],["l",0,-.69],["l",-.21,.24],["c",-.36,.42,-.75,.75,-1.8,1.62],["c",-1.02,.84,-1.2,.99,-1.44,1.38],["c",-.36,.51,-.54,.6,-.9,.51],["c",-.15,-.03,-.39,-.27,-.42,-.42],["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",2.52,10.98],["c",-.18,-.09,-.48,-.12,-.66,-.06],["c",-.39,.15,-.69,.54,-.84,1.14],["c",-.06,.24,-.06,.39,-.09,1.74],["c",-.03,1.44,0,2.73,.06,3.18],["l",.03,.15],["l",.27,-.27],["c",.93,-.96,1.5,-1.95,1.74,-3.06],["c",.06,-.27,.06,-.39,.06,-.96],["c",0,-.54,0,-.69,-.06,-.93],["c",-.09,-.51,-.27,-.81,-.51,-.93],["z"],["m",5.43,0],["c",-.18,-.09,-.51,-.12,-.72,-.06],["c",-.54,.12,-.96,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.9],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.36,-.3],["c",.42,-.36,1.02,-.96,1.29,-1.29],["c",.36,-.45,.66,-.99,.81,-1.41],["c",.42,-1.23,.15,-2.76,-.6,-3.12],["z"]],w:11.613,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},"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.32,-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}},a=function(e){for(var t=[],n=0,r=e.length;n<r;n++){t[n]=[];for(var i=0,a=e[n].length;i<a;i++)t[n][i]=e[n][i]}return t},s={printSymbol:function(e,t,n,r,s,o,c){if(!i[n])return null;var l=a(i[n].d);l[0][1]+=e,l[0][2]+=t;for(var h="",u=0;u<l.length;u++)h+=l[u].join(" ");return r.path({path:h,stroke:o,fill:c,class:s})},getPathForSymbol:function(e,t,n,r,s){if(r=r||1,s=s||1,!i[n])return null;var o=a(i[n].d);return 1===r&&1===s||function(e,t,n){for(var r=0,i=e.length;r<i;r++){var a,s,o=e[r];for(a=1,s=o.length;a<s;a++)o[a]*=a%2?t:n}}(o,r,s),o[0][1]+=e,o[0][2]+=t,o},getSymbolWidth:function(e){return i[e]?i[e].w:0},symbolHeightInPitches:function(e){return(i[e]?i[e].h:0)/r.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"+":return-2;case"timesig.common":case"timesig.cut":return 0;case"flags.d32nd":return-1;case"flags.d64th":return-2;case"flags.u32nd":return 1;case"flags.u64th":return 3;case"rests.whole":return 1;case"rests.half":case"rests.8th":case"rests.quarter":case"rests.16th":case"rests.32nd":case"rests.64th":return-1;case"f":case"m":case"p":case"s":case"z":return-4;case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"scripts.dfermata":return 1;default:return 0}},setSymbol:function(e,t){i[e]=t}};e.exports=s},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){for(var e,t,r,i,a,s=0,o=arguments[s++],c=[];o;){if(t=/^[^\x25]+/.exec(o))c.push(t[0]);else if(t=/^\x25{2}/.exec(o))c.push("%");else{if(!(t=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))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 "+n(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,i=t[3]?"0"==t[3]?"0":t[3].charAt(1):" ",a=t[5]-String(e).length,r=t[5]?str_repeat(i,a):"",c.push(t[4]?e+r:r+e)}o=o.substring(t[0].length)}return c.join("")}},function(e,t){e.exports=function(e,t,n,r){if(e)for(var i=0;i<e.length;i++){var a=e[i],s=a.getAttribute("highlight");s||(s="fill"),a.setAttribute(s,r);var o=a.getAttribute("class");o||(o=""),o=(o=o.replace(n,"")).replace(t,""),t.length>0&&(o.length>0&&" "!==o.charAt(o.length-1)&&(o+=" "),o+=t),a.setAttribute("class",o)}}},function(e,t){e.exports=function(e,t,n){return e.paper.path(t)}},function(e,t,n){var r=n(1),i={};!function(){"use strict";var e,t,n,a;i.initialize=function(r,i,s,o){e=r,t=i,a=o,(n=s).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},n.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},n.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},n.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},n.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},n.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},n.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},a.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},a.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},a.formatting.annotationfont=n.annotationfont,a.formatting.gchordfont=n.gchordfont,a.formatting.historyfont=n.historyfont,a.formatting.infofont=n.infofont,a.formatting.measurefont=n.measurefont,a.formatting.partsfont=n.partsfont,a.formatting.repeatfont=n.repeatfont,a.formatting.textfont=n.textfont,a.formatting.tripletfont=n.tripletfont,a.formatting.vocalfont=n.vocalfont,a.formatting.wordsfont=n.wordsfont};var s={gchordfont:!0,measurefont:!0,partsfont:!0},o=function(e,n,r,i,a){function o(){var o=parseInt(e[0].token);return e.shift(),n?0===e.length?{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:o}:1===e.length&&"box"===e[0].token&&s[a]?{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:o,box:!0}:(t("Extra parameters in font definition.",r,i),{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:o}):(t("Can't set just the size of the font since there is no default value.",r,i),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:o})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return o();t("Expected font size number after *.",r,i)}if("number"===e[0].type)return o();for(var c,l=[],h="normal",u="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?t("Font size specified twice in font definition.",r,i):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(s[a]?f=!0:t('This font style doesn\'t support "box"',r,i),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",r,i);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",r,i):c=g.token:t("Expected font size in font definition.",r,i),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(s[a]?f=!0:t('This font style doesn\'t support "box"',r,i),p="finished"):t("Unknown parameter "+g.token+" in font definition.",r,i);break;case"finished":t('Extra characters found after "box" in font definition.',r,i)}}void 0===c?n?c=n.size:(t("Must specify the size of the font since there is no default value.",r,i),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(n?l=n.face:(t("Must specify the name of the font since there is no default value.",r,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=h,y.style=u,y.decoration=d,y.size=c,f&&(y.box=!0),y)},c=function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(n[e]=o(t,n[e],r,0,e),n.is_in_header&&(a.formatting[e]=n[e]),null)},l=function(e,t){var n="";r.each(t,(function(e){n+=e.token}));var i=parseFloat(n);if(isNaN(i)||0===i)return'Directive "'+e+'" requires a number as a parameter.';a.formatting.scale=i},h=function(e,t,r,i,a){if(1!==r.length||"number"!==r[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=r[0].intt;return void 0!==i&&s<i?'Directive "'+t+'" requires a number greater than or equal to '+i+" as a parameter.":void 0!==a&&s>a?'Directive "'+t+'" requires a number less than or equal to '+a+" as a parameter.":(n[e]=s,null)},u=function(e,t,r){if(1===r.length&&("true"===r[0].token||"false"===r[0].token))return n[e]="true"===r[0].token,null;var i=h(e,t,r,0,1);return null!==i?i:(n[e]=1===n[e],null)},d=function(e,t,r,i){if(1!==r.length)return'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter.";for(var a=r[0].token,s=!1,o=0;!s&&o<i.length;o++)i[o]===a&&(s=!0);return s?(n[e]=a,null):'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter."},f=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],p=["gchord","ptstress","beatstring"],m=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc"],g=["program"],v=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],b=["beat"],y=["drone"],w=["portamento"],k=["expand","grace","trim"],x=["drum","chordname"];i.parseFontChangeLine=function(e){var t=e.split("$");if(t.length>1&&n.setfont){for(var r=[{text:t[0]}],i=1;i<t.length;i++)"0"===t[i].charAt(0)?r.push({text:t[i].substring(1)}):"1"===t[i].charAt(0)&&n.setfont[1]?r.push({font:n.setfont[1],text:t[i].substring(1)}):"2"===t[i].charAt(0)&&n.setfont[2]?r.push({font:n.setfont[2],text:t[i].substring(1)}):"3"===t[i].charAt(0)&&n.setfont[3]?r.push({font:n.setfont[3],text:t[i].substring(1)}):"4"===t[i].charAt(0)&&n.setfont[4]?r.push({font:n.setfont[4],text:t[i].substring(1)}):r[r.length-1].text+="$"+t[i];if(r.length>1)return r}return e};var A=["auto","above","below","hidden"];i.addDirective=function(s){var T=e.tokenize(s,0,s.length);if(0===T.length||"alpha"!==T[0].type)return null;var S=s.substring(s.indexOf(T[0].token)+T[0].token.length);S=e.stripComment(S);var M=T.shift().token.toLowerCase(),N="";switch(M){case"bagpipes":a.formatting.bagpipes=!0;break;case"flatbeams":a.formatting.flatbeams=!0;break;case"landscape":n.landscape=!0;break;case"papersize":n.papersize=S;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)a.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+")";a.formatting.graceSlurs=!0}break;case"stretchlast":a.formatting.stretchlast=!0;break;case"titlecaps":n.titlecaps=!0;break;case"titleleft":a.formatting.titleleft=!0;break;case"measurebox":a.formatting.measurebox=!0;break;case"vocal":return d("vocalPosition",M,T,A);case"dynamic":return d("dynamicPosition",M,T,A);case"gchord":return d("chordPosition",M,T,A);case"ornament":return d("ornamentPosition",M,T,A);case"volume":return d("volumePosition",M,T,A);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(t,n){var r=e.getMeasurement(n);return 0===r.used||0!==n.length?'Directive "'+t+'" requires a measurement as a parameter.':(a.formatting[t]=r.value,null)}(M,T);case"voicescale":if(1!==T.length||"number"!==T[0].type)return"voicescale requires one float as a parameter";var C=T.shift();return n.currentVoice&&(n.currentVoice.scale=C.floatt,a.changeVoiceScale(n.currentVoice.scale)),null;case"vskip":var E=Math.round(function(t,n){var r=e.getMeasurement(n);return 0===r.used||0!==n.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:r.value}(M,T));return E.error?E.error:(a.addSpacing(E),null);case"scale":l(M,T);break;case"sep":if(0===T.length)a.addSeparator(14,14,85);else{var I=e.getMeasurement(T);if(0===I.used)return'Directive "'+M+'" requires 3 numbers: space above, space below, length of line';var _=I.value;if(0===(I=e.getMeasurement(T)).used)return'Directive "'+M+'" requires 3 numbers: space above, space below, length of line';var B=I.value;if(0===(I=e.getMeasurement(T)).used||0!==T.length)return'Directive "'+M+'" requires 3 numbers: space above, space below, length of line';var P=I.value;a.addSeparator(_,B,P)}break;case"barsperstaff":if(null!==(N=h("barsperstaff",M,T)))return N;break;case"staffnonote":if(1!==T.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===T[0].token)n.staffnonote=!0;else{if("1"!==T[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+T[0].token+")";n.staffnonote=!1}break;case"printtempo":if(null!==(N=u("printTempo",M,T)))return N;break;case"partsbox":if(null!==(N=u("partsBox",M,T)))return N;n.partsfont.box=n.partsBox;break;case"freegchord":if(null!==(N=u("freegchord",M,T)))return N;break;case"measurenb":case"barnumbers":if(null!==(N=h("barNumbers",M,T)))return N;break;case"setbarnb":if(1!==T.length||"number"!==T[0].type)return"Directive setbarnb requires a number as a parameter.";n.currBarNumber=a.setBarNumberImmediate(T[0].intt);break;case"begintext":n.inTextBlock=!0;break;case"continueall":n.continueall=!0;break;case"beginps":n.inPsBlock=!0,t("Postscript ignored",s,0);break;case"deco":S.length>0&&n.ignoredDecorations.push(S.substring(0,S.indexOf(" "))),t("Decoration redefinition ignored",s,0);break;case"text":var D=e.translateString(S);a.addText(i.parseFontChangeLine(D));break;case"center":var L=e.translateString(S);a.addCentered(i.parseFontChangeLine(L));break;case"font":break;case"setfont":var V=e.tokenize(S,0,S.length);if(V.length>=4&&"-"===V[0].token&&"number"===V[1].type){var H=parseInt(V[1].token);H>=1&&H<=4&&(n.setfont||(n.setfont=[]),V.shift(),V.shift(),n.setfont[H]=o(V,n.setfont[H],s,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 c(M,T,s);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.':(a.formatting[e]=o(t,a.formatting[e],n,0,e),null)}(M,T,s);case"barlabelfont":case"barnumberfont":case"barnumfont":return c("measurefont",T,s);case"staves":case"score":n.score_is_present=!0;for(var O,z=function(e,t,i,a,s){(t||0===n.staves.length)&&n.staves.push({index:n.staves.length,numVoices:0});var o=r.last(n.staves);void 0!==i&&(o.bracket=i),void 0!==a&&(o.brace=a),s&&(o.connectBarLines="end"),void 0===n.voices[e]&&(n.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},F=!1,j=!1,q=!1,W=!1,Y=!1,R=!1,G=!1,U=function(){if(G=!0,O){var e="start";O.staffNum>0&&("start"!==n.staves[O.staffNum-1].connectBarLines&&"continue"!==n.staves[O.staffNum-1].connectBarLines||(e="continue")),n.staves[O.staffNum].connectBarLines=e}};T.length;){var K=T.shift();switch(K.token){case"(":F?t("Can't nest parenthesis in %%score",s,K.start):(F=!0,W=!0);break;case")":!F||W?t("Unexpected close parenthesis in %%score",s,K.start):F=!1;break;case"[":j?t("Can't nest brackets in %%score",s,K.start):(j=!0,Y=!0);break;case"]":!j||Y?t("Unexpected close bracket in %%score",s,K.start):(j=!1,n.staves[O.staffNum].bracket="end");break;case"{":q?t("Can't nest braces in %%score",s,K.start):(q=!0,R=!0);break;case"}":!q||R?t("Unexpected close brace in %%score",s,K.start):(q=!1,n.staves[O.staffNum].brace="end");break;case"|":U();break;default:for(var X="";("alpha"===K.type||"number"===K.type)&&(X+=K.token,K.continueId);)K=T.shift();z(X,!F||W,Y?"start":j?"continue":void 0,R?"start":q?"continue":void 0,G),W=!1,Y=!1,R=!1,G=!1,O=n.voices[X],"staves"===M&&U()}}break;case"newpage":var Z=e.getInt(S);a.addNewPage(0===Z.digits?-1:Z.value);break;case"abc":var Q=S.split(" ");switch(Q[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var J=Q.shift();a.addMetaText(M+J,Q.join(" "));break;default:return"Unknown directive: "+M+Q[0]}break;case"header":case"footer":var $=e.getMeat(S,0,S.length);'"'===($=S.substring($.start,$.end)).charAt(0)&&'"'===$.charAt($.length-1)&&($=$.substring(1,$.length-1));var ee=$.split("\t"),te={};te=1===ee.length?{left:"",center:ee[0],right:""}:2===ee.length?{left:ee[0],center:ee[1],right:""}:{left:ee[0],center:ee[1],right:ee[2]},ee.length>3&&t("Too many tabs in "+M+": "+ee.length+" found.",S,0),a.addMetaTextObj(M,te);break;case"midi":var ne=e.tokenize(S,0,S.length,!0);ne.length>0&&"="===ne[0].token&&ne.shift(),0===ne.length?t("Expected midi command",S,0):function(e,n,r){var i=e.shift().token,a=[];if(f.indexOf(i)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+i,r,0);else if(p.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,r,0):a.push(e[0].token);else if(m.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,r,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+i,r,0):a.push(e[0].intt);else if(g.indexOf(i)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+i,r,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+i,r,0):(a.push(e[0].intt),2===e.length&&a.push(e[1].intt));else if(v.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,r,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[1].intt));else if(w.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,r,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+i,r,0):(a.push(e[0].token),a.push(e[1].intt));else if("drummap"===i)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(n.formatting||(n.formatting={}),n.formatting.midi||(n.formatting.midi={}),n.formatting.midi.drummap||(n.formatting.midi.drummap={}),n.formatting.midi.drummap[e[0].token]=e[1].intt,a=n.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(n.formatting||(n.formatting={}),n.formatting.midi||(n.formatting.midi={}),n.formatting.midi.drummap||(n.formatting.midi.drummap={}),n.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,a=n.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+i,r,0);else if(k.indexOf(i)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[2].intt));else if(b.indexOf(i)>=0)4!==e.length?t("Expected four parameters in MIDI "+i,r,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?t("Expected four integer parameters in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[1].intt),a.push(e[2].intt),a.push(e[3].intt));else if(y.indexOf(i)>=0)5!==e.length?t("Expected five parameters in MIDI "+i,r,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?t("Expected five integer parameters in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[1].intt),a.push(e[2].intt),a.push(e[3].intt),a.push(e[4].intt));else if(g.indexOf(i)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+i,r,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+i,r,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+i,r,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+i,r,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+i,r,0)):(a.push(e[0].intt),4===e.length&&a.push(e[3].intt));else if(x.indexOf(i)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+i,r,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+i,r,0);else{var s=e.shift();for(a.push(s.token);e.length>0;)"number"!==(s=e.shift()).type&&t("Expected integer parameter in MIDI "+i,r,0),a.push(s.intt)}n.hasBeginMusic()?n.appendElement("midi",-1,-1,{cmd:i,params:a}):(void 0===n.formatting.midi&&(n.formatting.midi={}),n.formatting.midi[i]=a)}(ne,a,S);break;case"map":case"percmap":case"playtempo":case"auquality":case"continuous":case"nobarcheck":a.formatting[M]=S;break;default:return"Unknown directive: "+M}return null},i.globalFormatting=function(r){for(var i in r)if(r.hasOwnProperty(i)){var a,s=""+r[i],o=e.tokenize(s,0,s.length);switch(i){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":c(i,o,s);break;case"scale":l(i,o);break;case"partsbox":null!==(a=u("partsBox",i,o))&&t(a),n.partsfont.box=n.partsBox;break;case"freegchord":null!==(a=u("freegchord",i,o))&&t(a);default:t("Formatting directive unrecognized: ",i,0)}}}}(),e.exports=i},function(e,t,n){var r=n(1),i=n(9),a=n(16),s={};!function(){var e,t,n,o;s.initialize=function(r,i,a,s){e=r,t=i,n=a,o=s},s.standardKey=function(e,t,r,i){var s={acc:"sharp",note:"f"},o={acc:"sharp",note:"c"},c={acc:"sharp",note:"g"},l={acc:"sharp",note:"d"},h={acc:"sharp",note:"A"},u={acc:"sharp",note:"e"},d={acc:"sharp",note:"B"},f={acc:"flat",note:"B"},p={acc:"flat",note:"e"},m={acc:"flat",note:"A"},g={acc:"flat",note:"d"},v={acc:"flat",note:"G"},b={acc:"flat",note:"c"},y={acc:"flat",note:"F"},w={"C#":[s,o,c,l,h,u,d],"A#m":[s,o,c,l,h,u,d],"G#Mix":[s,o,c,l,h,u,d],"D#Dor":[s,o,c,l,h,u,d],"E#Phr":[s,o,c,l,h,u,d],"F#Lyd":[s,o,c,l,h,u,d],"B#Loc":[s,o,c,l,h,u,d],"F#":[s,o,c,l,h,u],"D#m":[s,o,c,l,h,u],"C#Mix":[s,o,c,l,h,u],"G#Dor":[s,o,c,l,h,u],"A#Phr":[s,o,c,l,h,u],BLyd:[s,o,c,l,h,u],"E#Loc":[s,o,c,l,h,u],B:[s,o,c,l,h],"G#m":[s,o,c,l,h],"F#Mix":[s,o,c,l,h],"C#Dor":[s,o,c,l,h],"D#Phr":[s,o,c,l,h],ELyd:[s,o,c,l,h],"A#Loc":[s,o,c,l,h],E:[s,o,c,l],"C#m":[s,o,c,l],BMix:[s,o,c,l],"F#Dor":[s,o,c,l],"G#Phr":[s,o,c,l],ALyd:[s,o,c,l],"D#Loc":[s,o,c,l],A:[s,o,c],"F#m":[s,o,c],EMix:[s,o,c],BDor:[s,o,c],"C#Phr":[s,o,c],DLyd:[s,o,c],"G#Loc":[s,o,c],D:[s,o],Bm:[s,o],AMix:[s,o],EDor:[s,o],"F#Phr":[s,o],GLyd:[s,o],"C#Loc":[s,o],G:[s],Em:[s],DMix:[s],ADor:[s],BPhr:[s],CLyd:[s],"F#Loc":[s],C:[],Am:[],GMix:[],DDor:[],EPhr:[],FLyd:[],BLoc:[],F:[f],Dm:[f],CMix:[f],GDor:[f],APhr:[f],BbLyd:[f],ELoc:[f],Bb:[f,p],Gm:[f,p],FMix:[f,p],CDor:[f,p],DPhr:[f,p],EbLyd:[f,p],ALoc:[f,p],Eb:[f,p,m],Cm:[f,p,m],BbMix:[f,p,m],FDor:[f,p,m],GPhr:[f,p,m],AbLyd:[f,p,m],DLoc:[f,p,m],Ab:[f,p,m,g],Fm:[f,p,m,g],EbMix:[f,p,m,g],BbDor:[f,p,m,g],CPhr:[f,p,m,g],DbLyd:[f,p,m,g],GLoc:[f,p,m,g],Db:[f,p,m,g,v],Bbm:[f,p,m,g,v],AbMix:[f,p,m,g,v],EbDor:[f,p,m,g,v],FPhr:[f,p,m,g,v],GbLyd:[f,p,m,g,v],CLoc:[f,p,m,g,v],Gb:[f,p,m,g,v,b],Ebm:[f,p,m,g,v,b],DbMix:[f,p,m,g,v,b],AbDor:[f,p,m,g,v,b],BbPhr:[f,p,m,g,v,b],CbLyd:[f,p,m,g,v,b],FLoc:[f,p,m,g,v,b],Cb:[f,p,m,g,v,b,y],Abm:[f,p,m,g,v,b,y],GbMix:[f,p,m,g,v,b,y],DbDor:[f,p,m,g,v,b,y],EbPhr:[f,p,m,g,v,b,y],FbLyd:[f,p,m,g,v,b,y],BbLoc:[f,p,m,g,v,b,y],"A#":[f,p],"B#":[],"D#":[f,p,m],"E#":[f],"G#":[f,p,m,g],Gbm:[s,o,c,l,h,u,d]};return a.keySignature(n,w,e,t,r,i)};var c={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}},l=function(e,t){var n=c[e];return(n?n.mid:0)+t};s.fixClef=function(e){var t=c[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},s.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return r.each(e.accidentals,(function(e){t.accidentals.push(r.clone(e))})),t};var h={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};s.addPosToKey=function(e,t){var n=e.verticalPos;r.each(t.accidentals,(function(e){var t=h[e.note];t-=n,e.verticalPos=t})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){var t=h[e.note];t-=n,e.verticalPos=t})),n<-10?(r.each(t.accidentals,(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&&r.each(t.impliedNaturals,(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?(r.each(t.accidentals,(function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):n>=7&&(r.each(t.accidentals,(function(e){e.verticalPos+=7})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){e.verticalPos+=7})))},s.fixKey=function(e,t){var n=r.clone(t);return s.addPosToKey(e,n),n};var u=function(e){var t=0,n=e.charAt(t++);"^"!==n&&"_"!==n||(n=e.charAt(t++));var r=h[n];for(void 0===r&&(r=6);t<e.length;t++)if(","===e.charAt(t))r-=7;else{if("'"!==e.charAt(t))break;r+=7}return{mid:r-6,str:e.substring(t)}};s.parseKey=function(r){0===r.length&&(r="none");var a=e.tokenize(r,0,r.length),o={};switch(a[0].token){case"HP":i.addDirective("bagpipes"),n.key={root:"HP",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"Hp":i.addDirective("bagpipes"),n.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"none":n.key={root:"none",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;default:var c=e.getKeyPitch(a[0].token);if(c.len>0){o.foundKey=!0;var h="",u="";a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift();var d=c.token;if(a.length>0){var f=e.getSharpFlat(a[0].token);if(f.len>0&&(a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift(),d+=f.token,h=f.token),a.length>0){var p=e.getMode(a[0].token);p.len>0&&(a.shift(),d+=p.token,u=p.token)}if(void 0===s.standardKey(d,c.token,h,0))return t("Unsupported key signature: "+d,r,0),o}var m=s.deepCopyKey(n.key),g=n.globalTranspose?-n.globalTranspose:0;if(n.key=s.deepCopyKey(s.standardKey(d,c.token,h,g)),n.key.mode=u,m){for(var v,b=0;b<n.key.accidentals.length;b++)for(v=0;v<m.accidentals.length;v++)m.accidentals[v].note&&n.key.accidentals[b].note.toLowerCase()===m.accidentals[v].note.toLowerCase()&&(m.accidentals[v].note=null);for(v=0;v<m.accidentals.length;v++)m.accidentals[v].note&&(n.key.impliedNaturals||(n.key.impliedNaturals=[]),n.key.impliedNaturals.push({acc:"natural",note:m.accidentals[v].note}))}}}if(0===a.length)return o;if("exp"===a[0].token&&a.shift(),0===a.length)return o;if("oct"===a[0].token&&a.shift(),0===a.length)return o;var y,w=e.getKeyAccidentals2(a);if(w.warn&&t(w.warn,r,0),w.accs){o.foundKey||(o.foundKey=!0,n.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")}(w.accs);for(var k=0;k<w.accs.length;k++){for(var x=!1,A=0;A<n.key.accidentals.length&&!x;A++)n.key.accidentals[A].note===w.accs[k].note&&(x=!0,n.key.accidentals[A].acc!==w.accs[k].acc&&(n.key.accidentals[A].acc=w.accs[k].acc,n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(w.accs[k])));if(!x&&(n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(w.accs[k]),n.key.accidentals.push(w.accs[k]),n.key.impliedNaturals))for(var T=0;T<n.key.impliedNaturals.length;T++)n.key.impliedNaturals[T].note===w.accs[k].note&&n.key.impliedNaturals.splice(T,1)}}for(;a.length>0;)switch(a[0].token){case"m":case"middle":if(a.shift(),0===a.length)return t("Expected = after middle",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after middle",r,y.start);break}if(0===a.length)return t("Expected parameter after middle=",r,0),o;var S=e.getPitchFromTokens(a);S.warn&&t(S.warn,r,0),S.position&&(n.clef.verticalPos=S.position-6);break;case"transpose":if(a.shift(),0===a.length)return t("Expected = after transpose",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after transpose",r,y.start);break}if(0===a.length)return t("Expected parameter after transpose=",r,0),o;if("number"!==a[0].type){t("Expected number after transpose",r,a[0].start);break}n.clef.transpose=a[0].intt,a.shift();break;case"stafflines":if(a.shift(),0===a.length)return t("Expected = after stafflines",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after stafflines",r,y.start);break}if(0===a.length)return t("Expected parameter after stafflines=",r,0),o;if("number"!==a[0].type){t("Expected number after stafflines",r,a[0].start);break}n.clef.stafflines=a[0].intt,a.shift();break;case"staffscale":if(a.shift(),0===a.length)return t("Expected = after staffscale",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after staffscale",r,y.start);break}if(0===a.length)return t("Expected parameter after staffscale=",r,0),o;if("number"!==a[0].type){t("Expected number after staffscale",r,a[0].start);break}n.clef.staffscale=a[0].floatt,a.shift();break;case"style":if(a.shift(),0===a.length)return t("Expected = after style",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after style",r,y.start);break}if(0===a.length)return t("Expected parameter after style=",r,0),o;switch(a[0].token){case"normal":case"harmonic":case"rhythm":case"x":n.style=a[0].token,a.shift();break;default:t("error parsing style element: "+a[0].token,r,a[0].start)}break;case"clef":if(a.shift(),0===a.length)return t("Expected = after clef",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after clef",r,y.start);break}if(0===a.length)return t("Expected parameter after clef=",r,0),o;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var M=a.shift();switch(M.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":M.token="alto";break;case"F":M.token="bass";break;case"G":M.token="treble";break;case"c":M.token="alto";break;case"f":M.token="bass";break;case"g":M.token="treble";break;default:t("Expected clef name. Found "+M.token,r,M.start)}a.length>0&&"number"===a[0].type&&(M.token+=a[0].token,a.shift()),a.length>1&&("-"===a[0].token||"+"===a[0].token||"^"===a[0].token||"_"===a[0].token)&&"8"===a[1].token&&(M.token+=a[0].token+a[1].token,a.shift(),a.shift()),n.clef={type:M.token,verticalPos:l(M.token,0)},n.currentVoice&&void 0!==n.currentVoice.transpose&&(n.clef.transpose=n.currentVoice.transpose),o.foundClef=!0;break;default:t("Unknown parameter: "+a[0].token,r,a[0].start),a.shift()}return o};s.parseVoice=function(r,i,a){var s=e.getMeat(r,i,a),c=s.start,h=s.end,d=e.getToken(r,c,h);if(0!==d.length){var f=!1;void 0===n.voices[d]&&(n.voices[d]={},f=!0,n.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",r,c)),c+=d.length,c+=e.eatWhiteSpace(r,c);for(var p={startStaff:f},m=function(n){var i=e.getVoiceToken(r,c,h);void 0!==i.warn?t("Expected value for "+n+" in voice: "+i.warn,r,c):0===i.token.length&&'"'!==r.charAt(c)?t("Expected value for "+n+" in voice",r,c):p[n]=i.token,c+=i.len},g=function(i,a,s){var o=e.getVoiceToken(r,c,h);void 0!==o.warn?t("Expected value for "+a+" in voice: "+o.warn,r,c):0===o.token.length&&'"'!==r.charAt(c)?t("Expected value for "+a+" in voice",r,c):("number"===s&&(o.token=parseFloat(o.token)),n.voices[i][a]=o.token),c+=o.len},v=function(n,i){var a=e.getVoiceToken(r,c,h);if(void 0!==a.warn)t("Expected value for "+n+" in voice: "+a.warn,r,c);else{if(0!==a.token.length||'"'===r.charAt(c))return"number"===i&&(a.token=parseFloat(a.token)),a.token;t("Expected value for "+n+" in voice",r,c)}c+=a.len},b=function(i,a){var s=e.getVoiceToken(r,c,h);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+a+" in voice: "+s.warn,r,c);else if(0===s.token.length&&'"'!==r.charAt(c))t("Expected one of (_B, _E, _b, _e) for "+a+" in voice",r,c);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?n.voices[i][a]=o:t("Expected one of (_B, _E, _b, _e) for "+a+" in voice",r,c)}c+=s.len};c<h;){var y=e.getVoiceToken(r,c,h);if(c+=y.len,y.warn)t("Error parsing voice: "+y.warn,r,c);else{var w=null;switch(y.token){case"clef":case"cl":m("clef");var k=0;void 0!==p.clef&&(p.clef=p.clef.replace(/[',]/g,""),-1!==p.clef.indexOf("+16")&&(k+=14,p.clef=p.clef.replace("+16","")),p.verticalPos=l(p.clef,k));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=l(p.clef,0),n.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!==(w=e.getVoiceToken(r,c,h)).warn?t("Expected value for stems in voice: "+w.warn,r,c):"up"===w.token||"down"===w.token?n.voices[d].stem=w.token:t("Expected up or down for voice stem",r,c),c+=w.len;break;case"up":case"down":n.voices[d].stem=y.token;break;case"middle":case"m":m("verticalPos"),p.verticalPos=u(p.verticalPos).mid;break;case"gchords":case"gch":n.voices[d].suppressChords=!0,"0"===(w=e.getVoiceToken(r,c,h)).token&&(c+=w.len);break;case"space":case"spc":m("spacing");break;case"scale":g(d,"scale","number");break;case"score":b(d,"scoreTranspose");break;case"transpose":g(d,"transpose","number");break;case"stafflines":g(d,"stafflines","number");break;case"staffscale":g(d,"staffscale","number");break;case"octave":g(d,"octave","number");break;case"volume":g(d,"volume","number");break;case"cue":var x=v("cue","string");n.voices[d].scale="on"===x?.6:1;break;case"style":void 0!==(w=e.getVoiceToken(r,c,h)).warn?t("Expected value for style in voice: "+w.warn,r,c):"normal"===w.token||"harmonic"===w.token||"rhythm"===w.token||"x"===w.token?n.voices[d].style=w.token:t("Expected one of [normal, harmonic, rhythm, x] for voice style",r,c),c+=w.len}}c+=e.eatWhiteSpace(r,c)}if((p.startStaff||0===n.staves.length)&&(n.staves.push({index:n.staves.length,meter:n.origMeter}),n.score_is_present||(n.staves[n.staves.length-1].numVoices=0)),void 0===n.voices[d].staffNum){n.voices[d].staffNum=n.staves.length-1;var A=0;for(var T in n.voices)n.voices.hasOwnProperty(T)&&n.voices[T].staffNum===n.voices[d].staffNum&&A++;n.voices[d].index=A-1}var S=n.staves[n.voices[d].staffNum];n.score_is_present||S.numVoices++,p.clef&&(S.clef={type:p.clef,verticalPos:p.verticalPos}),p.spacing&&(S.spacing_below_offset=p.spacing),p.verticalPos&&(S.verticalPos=p.verticalPos),p.name&&(S.name?S.name.push(p.name):S.name=[p.name]),p.subname&&(S.subname?S.subname.push(p.subname):S.subname=[p.subname]),function(e){n.currentVoice=n.voices[e],o.setCurrentVoice(n.currentVoice.staffNum,n.currentVoice.index)}(d)}else t("Expected a voice id",r,c)}}(),e.exports=s},function(e,t,n){var r=n(7);e.exports=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#ff0000"),r(this.elemset,e,"",t)}},function(e,t,n){var r=n(7);e.exports=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#000000"),r(this.elemset,"",e,t)}},function(e,t){var n;!function(){"use strict";function e(){this.ingroup=!1}e.prototype.beginGroup=function(e,t){this.paper=e,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0},e.prototype.isInGroup=function(){return this.ingroup},e.prototype.addPath=function(e){if(0!==(e=e||[]).length){e[0][0]="m",e[0][1]-=this.lastM[0],e[0][2]-=this.lastM[1],this.lastM[0]+=e[0][1],this.lastM[1]+=e[0][2],this.path.push(e[0]);for(var t=1,n=e.length;t<n;t++)"m"===e[t][0]&&(this.lastM[0]+=e[t][1],this.lastM[1]+=e[t][2]),this.path.push(e[t])}},e.prototype.endGroup=function(e){if(this.ingroup=!1,0===this.path.length)return null;for(var t="",n=0;n<this.path.length;n++)t+=this.path[n].join(" ");var r=this.paper.path({path:t,stroke:"none",fill:"#000000",class:this.controller.classes.generate(e)});return this.path=[],r},n=new e}(),e.exports=n},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n(1);var i=n(15),a=n(33),s={};!function(){"use strict";s.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var e=s.TuneBook=function(e){var t=a(e);this.header=t.header,this.tunes=t.tunes};e.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},e.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},s.parseOnly=function(e,t){for(var n=s.numberOfTunes(e),r=[],i=0;i<n;i++)r.push(1);return s.renderEngine((function(){}),r,e,t)},s.renderEngine=function(t,n,a,s){var o=[];if(void 0!==n&&void 0!==a){var c;(!(c=n)||c.propertyIsEnumerable("length")||"object"!==r(c)||"number"!=typeof c.length)&&(n=[n]),void 0===s&&(s={});for(var l=s.startingTune?parseInt(s.startingTune,10):0,h=new e(a),u=new i,d=0;d<n.length;d++){var f=n[d];if("*"===f||"string"==typeof f&&(f=document.getElementById(f)),f)if(l>=0&&l<h.tunes.length){u.parse(h.tunes[l].abc,s,h.tunes[l].startPos-h.header.length);var p=u.getTune(),m=u.getWarnings();m&&(p.warnings=m);var g=t(f,p,d,h.tunes[l].abc);o.push(g||p)}else f.innerHTML&&(f.innerHTML="");l++}return o}},s.extractMeasures=function(t){for(var n=[],r=new e(t),i=0;i<r.tunes.length;i++){for(var a=r.tunes[i],o=a.abc.split("K:"),c=o[1].split("\n"),l=o[0]+"K:"+c[0]+"\n",h=null,u=null,d=null,f=[],p=!1,m=s.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 w=b.staff[y],k=0;k<1;k++)for(var x=w.voices[k],A=0;A<x.length;A++){var T=x[A];if(null===d&&T.startChar>=0&&(d=T.startChar,u=void 0===T.chord?h:null),T.chord&&(h=T),"bar"===T.el_type){if(p){var S={abc:a.abc.substring(d,T.endChar)};(h=u&&u.chord&&u.chord.length>0?u.chord[0].name:null)&&(S.lastChord=h),T.startEnding&&(S.startEnding=T.startEnding),T.endEnding&&(S.endEnding=T.endEnding),f.push(S),d=null,p=!1}}else"note"===T.el_type&&(p=!0)}}n.push({header:l,measures:f,hasPickup:g})}return n}}(),e.exports=s},function(e,t,n){var r=n(1),i=n(9),a=n(29),s=n(10),o=n(30),c=n(16),l=n(17),h=n(18);e.exports=function(){"use strict";var e=new h,t=new o;function n(e,t,n){e.positioning||(e.positioning={}),e.positioning[t]=n}function u(e,t,n){e.fonts||(e.fonts={}),e.fonts[t]=n}this.getTune=function(){return{formatting:e.formatting,lines:e.lines,media:e.media,metaText:e.metaText,version:e.version,addElementToEvents:e.addElementToEvents,addUsefulCallbackInfo:e.addUsefulCallbackInfo,getBarLength:e.getBarLength,getBeatLength:e.getBeatLength,getBeatsPerMeasure:e.getBeatsPerMeasure,getBpm:e.getBpm,getMeter:e.getMeter,getMeterFraction:e.getMeterFraction,getPickupLength:e.getPickupLength,getKeySignature:e.getKeySignature,makeVoicesArray:e.makeVoicesArray,millisecondsPerMeasure:e.millisecondsPerMeasure,setupEvents:e.setupEvents,setTiming:e.setTiming,setUpAudio:e.setUpAudio}};var d={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.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.is_in_history=!1,this.partForNextLine={},this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.inTextBlock=!1,this.inPsBlock=!1,this.ignoredDecorations=[],this.textBlock="",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,r){"note"===r?("auto"!==this.vocalPosition&&n(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&n(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&n(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&n(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&n(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&u(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&u(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&u(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&u(e,"tripletfont",this.tripletfont)):"bar"===r&&("auto"!==this.dynamicPosition&&n(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&n(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&n(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&n(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&u(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&u(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e<this.inTie.length;e++){this.endingHoldOver.inTie.push([]);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])}}},f=function(e){var t=r.gsub(e,""," ");return t=r.gsub(t,"&","&amp;"),t=r.gsub(t,"<","&lt;"),r.gsub(t,">","&gt;")},p=function(t,n,r){n||(n=" ");var i=n.charAt(r);" "===i&&(i="SPACE");var a,s=f(n.substring(0,r))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+i+"</span>"+f(n.substring(r+1));!function(e){d.warnings||(d.warnings=[]),d.warnings.push(e)}("Music Line:"+e.getNumLines()+":"+(r+1)+": "+t+":  "+s),a={message:t,line:n,startChar:d.iChar+r,column:r},d.warningObjects||(d.warningObjects=[]),d.warningObjects.push(a)},m=new a(t,p,d,e);this.getWarnings=function(){return d.warnings},this.getWarningObjects=function(){return d.warningObjects};var g=function(e,n){if('"'===e.charAt(n)){var r=t.getBrackettedSubstring(e,n,5);if(r[2]||p("Missing the closing quote while parsing the chord symbol",e,n),r[0]>0&&r[1].length>0&&"^"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1].charAt(0)){r[1]=r[1].substring(1);var i=t.getFloat(r[1]);0===i.digits&&p("Missing first position in absolutely positioned annotation.",e,n),r[1]=r[1].substring(i.digits),","!==r[1][0]&&p("Missing comma absolutely positioned annotation.",e,n),r[1]=r[1].substring(1);var a=t.getFloat(r[1]);0===a.digits&&p("Missing second position in absolutely positioned annotation.",e,n),r[1]=r[1].substring(a.digits);var s=t.skipWhiteSpace(r[1]);r[1]=r[1].substring(s),r[2]=null,r[3]={x:i.value,y:a.value}}else!0!==d.freegchord&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),r[2]="default",r[1]=c.chordName(d,r[1]);return r}return[0,""]},v=["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","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"],b=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],y=["crescendo(","crescendo)","diminuendo(","diminuendo)"],w=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],k=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],x=function(e,n){var i=d.macros[e.charAt(n)];if(void 0!==i)return"!"!==i.charAt(0)&&"+"!==i.charAt(0)||(i=i.substring(1)),"!"!==i.charAt(i.length-1)&&"+"!==i.charAt(i.length-1)||(i=i.substring(0,i.length-1)),r.detect(v,(function(e){return i===e}))?[1,i]:r.detect(b,(function(e){return i===e}))?("hidden"===d.volumePosition&&(i=""),[1,i]):r.detect(y,(function(e){return"hidden"===d.dynamicPosition&&(i=""),i===e}))?[1,i]:(r.detect(d.ignoredDecorations,(function(e){return i===e}))||p("Unknown macro: "+i,e,n),[1,""]);switch(e.charAt(n)){case".":return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var a=t.getBrackettedSubstring(e,n,5);return a[1].length>0&&("^"===a[1].charAt(0)||"_"===a[1].charAt(0))&&(a[1]=a[1].substring(1)),r.detect(v,(function(e){return a[1]===e}))?a:r.detect(b,(function(e){return a[1]===e}))?("hidden"===d.volumePosition&&(a[1]=""),a):r.detect(y,(function(e){return a[1]===e}))?("hidden"===d.dynamicPosition&&(a[1]=""),a):r.detect(w,(function(e){return a[1]===e[0]&&(a[1]=e[1],!0)}))?a:r.detect(k,(function(e){return a[1]===e[0]&&(a[1]=e[1],!0)}))?("hidden"===d.dynamicPosition&&(a[1]=""),a):"!"!==e.charAt(n)||1!==a[0]&&"!"===e.charAt(n+a[0]-1)?(p("Unknown decoration: "+a[1],e,n),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]},A=function(e,n){for(var r=n;t.isWhiteSpace(e.charAt(n));)n++;return[n-r]},T=function(e,n){var r=t.getBarLine(e,n);if(0===r.len)return[0,""];if(r.warn)return p(r.warn,e,n),[r.len,""];for(var i=0;i<e.length&&" "===e.charAt(n+r.len+i);i++);var a=r.len;if("["===e.charAt(n+r.len+i)&&(r.len+=i+1),'"'===e.charAt(n+r.len)&&"["===e.charAt(n+r.len-1)){var s=t.getBrackettedSubstring(e,n+r.len,5);return[r.len+s[0],r.token,s[1]]}var o=t.getTokenOf(e.substring(n+r.len),"1234567890-,");return 0===o.len||"-"===o.token[0]?[a,r.token]:[r.len+o.len,r.token,o.token]},S={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2},M=function(e,n){for(var r={},i=n;"("===e.charAt(n)||t.isWhiteSpace(e.charAt(n));)"("===e.charAt(n)&&(n+1<e.length&&e.charAt(n+1)>="2"&&e.charAt(n+1)<="9"?(void 0!==r.triplet?p("Can't nest triplets",e,n):(r.triplet=e.charAt(n+1)-"0",r.tripletQ=S[r.triplet],r.num_notes=r.triplet,n+2<e.length&&":"===e.charAt(n+2)&&(n+3<e.length&&":"===e.charAt(n+3)?n+4<e.length&&e.charAt(n+4)>="1"&&e.charAt(n+4)<="9"?(r.num_notes=e.charAt(n+4)-"0",n+=3):p("expected number after the two colons after the triplet to mark the duration",e,n):n+3<e.length&&e.charAt(n+3)>="1"&&e.charAt(n+3)<="9"?(r.tripletQ=e.charAt(n+3)-"0",n+4<e.length&&":"===e.charAt(n+4)?n+5<e.length&&e.charAt(n+5)>="1"&&e.charAt(n+5)<="9"&&(r.num_notes=e.charAt(n+5)-"0",n+=4):n+=2):p("expected number after the triplet to mark the duration",e,n))),n++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),n++;return r.consumed=n-i,r},N=function(e,t){switch(e.charAt(t)){case">":return t<e.length-1&&">"===e.charAt(t+1)?[2,1.75,.25]:[1,1.5,.5];case"<":return t<e.length-1&&"<"===e.charAt(t+1)?[2,.25,1.75]:[1,.5,1.5]}return null},C=function(e){return void 0!==e.duration&&e.duration<.25&&(e.end_beam=!0),e},E={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},I={x:"invisible",y:"spacer",z:"rest",Z:"multimeasure"},_=function(n,r,i,a){for(var s=function(e){return"octave"===e||"duration"===e||"Zduration"===e||"broken_rhythm"===e||"end_slur"===e},o="startSlur",l=!1;;){switch(n.charAt(r)){case"(":if("startSlur"!==o)return s(o)?(i.endChar=r,i):null;void 0===i.startSlur?i.startSlur=1:i.startSlur++;break;case")":if(!s(o))return null;void 0===i.endSlur?i.endSlur=1:i.endSlur++;break;case"^":if("startSlur"===o)i.accidental="sharp",o="sharp2";else{if("sharp2"!==o)return s(o)?(i.endChar=r,i):null;i.accidental="dblsharp",o="pitch"}break;case"_":if("startSlur"===o)i.accidental="flat",o="flat2";else{if("flat2"!==o)return s(o)?(i.endChar=r,i):null;i.accidental="dblflat",o="pitch"}break;case"=":if("startSlur"!==o)return s(o)?(i.endChar=r,i):null;i.accidental="natural",o="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"!==o&&"sharp2"!==o&&"flat2"!==o&&"pitch"!==o)return s(o)?(i.endChar=r,i):null;if(i.pitch=E[n.charAt(r)],c.note(d,i),o="octave",a&&0!==d.next_note_duration?(i.duration=d.default_length*d.next_note_duration,d.next_note_duration=0,l=!0):i.duration=d.default_length,d.clef&&"perc"===d.clef.type||d.currentVoice&&"perc"===d.currentVoice.clef){var h=n.charAt(r);if(i.accidental){h={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^"}[i.accidental]+h}e.formatting&&e.formatting.midi&&e.formatting.midi.drummap&&(i.midipitch=e.formatting.midi.drummap[h])}else d.clef&&d.clef.type.indexOf("-")>=0?i.soundPitch=i.pitch-7:d.clef&&d.clef.type.indexOf("+")>=0&&(i.soundPitch=i.pitch+7);break;case",":if("octave"!==o)return s(o)?(i.endChar=r,i):null;i.pitch-=7,void 0!==i.soundPitch&&(i.soundPitch-=7);break;case"'":if("octave"!==o)return s(o)?(i.endChar=r,i):null;i.pitch+=7,void 0!==i.soundPitch&&(i.soundPitch+=7);break;case"x":case"y":case"z":case"Z":if("startSlur"!==o)return s(o)?(i.endChar=r,i):null;i.rest={type:I[n.charAt(r)]},delete i.accidental,delete i.startSlur,delete i.startTie,delete i.endSlur,delete i.endTie,delete i.end_beam,delete i.grace_notes,"multimeasure"===i.rest.type?(i.duration=1,o="Zduration"):(a&&0!==d.next_note_duration?(i.duration=d.default_length*d.next_note_duration,d.next_note_duration=0,l=!0):i.duration=d.default_length,o="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"===o||"duration"===o){var u=t.getFraction(n,r);for(i.duration=i.duration*u.value,i.endChar=u.index;u.index<n.length&&(t.isWhiteSpace(n.charAt(u.index))||"-"===n.charAt(u.index));)"-"===n.charAt(u.index)?i.startTie={}:i=C(i),u.index++;r=u.index-1,o="broken_rhythm"}else if("sharp2"===o)i.accidental="quartersharp",o="pitch";else{if("flat2"!==o){if("Zduration"===o){var f=t.getNumber(n,r);return i.duration=f.num,i.endChar=f.index,i}return null}i.accidental="quarterflat",o="pitch"}break;case"-":if("startSlur"===o)e.addTieToLastNote(),i.endTie=!0;else{if("octave"!==o&&"duration"!==o&&"end_slur"!==o)return"broken_rhythm"===o?(i.endChar=r,i):null;if(i.startTie={},l||!a)return t.isWhiteSpace(n.charAt(r+1))&&C(i),i.endChar=r+1,i;o="broken_rhythm"}break;case" ":case"\t":if(!s(o))return null;i.end_beam=!0;do{"-"===n.charAt(r)&&(i.startTie={}),r++}while(r<n.length&&(t.isWhiteSpace(n.charAt(r))||"-"===n.charAt(r)));if(i.endChar=r,l||!a||"<"!==n.charAt(r)&&">"!==n.charAt(r))return i;r--,o="broken_rhythm";break;case">":case"<":if(!s(o))return null;if(!a)return i.endChar=r,i;var p=N(n,r);r+=p[0]-1,d.next_note_duration=p[2],i.duration=p[1]*i.duration,o="end_slur";break;default:return s(o)?(i.endChar=r,i):null}if(++r===n.length)return s(o)?(i.endChar=r,i):null}return null};function B(){var t={startChar:-1,endChar:-1};d.partForNextLine.title&&(t.part=d.partForNextLine),t.clef=d.currentVoice&&void 0!==d.staves[d.currentVoice.staffNum].clef?r.clone(d.staves[d.currentVoice.staffNum].clef):r.clone(d.clef);var n=d.currentVoice?d.currentVoice.scoreTranspose:0;if(t.key=s.standardKey(d.key.root+d.key.acc+d.key.mode,d.key.root,d.key.acc,n),t.key.mode=d.key.mode,d.key.impliedNaturals&&(t.key.impliedNaturals=d.key.impliedNaturals),d.key.explicitAccidentals)for(var i=0;i<d.key.explicitAccidentals.length;i++){for(var a=!1,o=0;o<t.key.accidentals.length;o++)t.key.accidentals[o].note===d.key.explicitAccidentals[i].note&&(t.key.accidentals[o].acc=d.key.explicitAccidentals[i].acc,a=!0);a||t.key.accidentals.push(d.key.explicitAccidentals[i])}if(d.targetKey=t.key,t.key.explicitAccidentals&&delete t.key.explicitAccidentals,s.addPosToKey(t.clef,t.key),null!==d.meter?(d.currentVoice?(r.each(d.staves,(function(e){e.meter=d.meter})),t.meter=d.staves[d.currentVoice.staffNum].meter,d.staves[d.currentVoice.staffNum].meter=null):t.meter=d.meter,d.meter=null):d.currentVoice&&d.staves[d.currentVoice.staffNum].meter&&(t.meter=d.staves[d.currentVoice.staffNum].meter,d.staves[d.currentVoice.staffNum].meter=null),d.currentVoice&&d.currentVoice.name&&(t.name=d.currentVoice.name),d.vocalfont&&(t.vocalfont=d.vocalfont),d.tripletfont&&(t.tripletfont=d.tripletfont),d.gchordfont&&(t.gchordfont=d.gchordfont),d.style&&(t.style=d.style),d.currentVoice){var c=d.staves[d.currentVoice.staffNum];c.brace&&(t.brace=c.brace),c.bracket&&(t.bracket=c.bracket),c.connectBarLines&&(t.connectBarLines=c.connectBarLines),c.name&&(t.name=c.name[d.currentVoice.index]),c.subname&&(t.subname=c.subname[d.currentVoice.index]),d.currentVoice.stem&&(t.stem=d.currentVoice.stem),d.currentVoice.stafflines&&(t.stafflines=d.currentVoice.stafflines),d.currentVoice.staffscale&&(t.staffscale=d.currentVoice.staffscale),d.currentVoice.scale&&(t.scale=d.currentVoice.scale),d.currentVoice.style&&(t.style=d.currentVoice.style),d.currentVoice.transpose&&(t.clef.transpose=d.currentVoice.transpose)}var l=void 0===d.currentVoice||0===d.currentVoice.staffNum&&0===d.currentVoice.index;0===d.barNumbers&&l&&1!==d.currBarNumber&&(t.barNumber=d.currBarNumber),e.startNewLine(t),d.key.impliedNaturals&&delete d.key.impliedNaturals,d.partForNextLine={}}var P=function(e,n){if("{"===e.charAt(n)){var r=t.getBrackettedSubstring(e,n,1,"}");r[2]||p("Missing the closing '}' while parsing grace note",e,n),")"===e[n+r[0]]&&(r[0]++,r[1]+=")");for(var i=[],a=0,s=!1;a<r[1].length;){var o=!1;"/"===r[1].charAt(a)&&(o=!0,a++);var c=_(r[1],a,{},!1);null!==c?(c.duration=c.duration/(8*d.default_length),o&&(c.acciaccatura=!0),i.push(c),s&&(c.endTie=!0,s=!1),c.startTie&&(s=!0),a=c.endChar,delete c.endChar):(" "===r[1].charAt(a)?i.length>0&&(i[i.length-1].end_beam=!0):p("Unknown character '"+r[1].charAt(a)+"' while parsing grace note",e,n),a++)}if(i.length)return[r[0],i]}return[0]};function D(e,t){if("&"===e.charAt(t)){for(var n=t;e.charAt(t)&&":"!==e.charAt(t)&&"|"!==e.charAt(t);)t++;return[t-n,e.substring(n+1,t)]}return[0]}function L(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 V=function(e,t,n){if(void 0===e.inTie[t])return!1;var r=e.currentVoice?e.currentVoice.index:0;return!(!e.inTie[t][r]||void 0===n.pitches&&"spacer"===n.rest.type)},H=function(e,t,n){var r=e.currentVoice?e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][r]=n},O=function n(i){var a=m.parseHeader(i);a.regular&&function(n){m.resolveTempo(),d.is_in_header=!1;for(var i=0,a=d.iChar;t.isWhiteSpace(n.charAt(i))&&i<n.length;)i++;if(i!==n.length&&"%"!==n.charAt(i)){var s=d.start_new_line;void 0===d.continueall?d.start_new_line=!0:d.start_new_line=!1;var o=0,c=m.letter_to_body_header(n,i);c[0]>0&&(i+=c[0],"V"===c[1]&&(s=!0));for(var l={},h=0;i<n.length;){var u=i;if("%"===n.charAt(i))break;var f=m.letter_to_inline_header(n,i);if(f[0]>0)i+=f[0],"V"===f[1]&&(s=!0);else{var v;for(s&&(B(),s=!1);;)if((v=t.eatWhiteSpace(n,i))>0&&(i+=v),i>0&&""===n.charAt(i-1)&&(v=m.letter_to_body_header(n,i))[0]>0&&("V"===v[1]&&B(),i=v[0],d.start_new_line=!1),(v=A(n,i))[0]>0&&(i+=v[0]),(v=g(n,i))[0]>0){l.chord||(l.chord=[]);var b=t.translateString(v[1]);b=b.replace(/;/g,"\n");for(var y=!1,w=0;w<l.chord.length;w++)l.chord[w].position===v[2]&&(y=!0,l.chord[w].name+="\n"+b);!1===y&&(null===v[2]&&v[3]?l.chord.push({name:b,rel_position:v[3]}):l.chord.push({name:b,position:v[2]})),i+=v[0];var k=t.skipWhiteSpace(n.substring(i));k>0&&(l.force_end_beam_last=!0),i+=k}else if((v=-1==="ABCDEFGabcdefgxyzZ[]|^_{".indexOf(n.charAt(i))?x(n,i):[0])[0]>0)null===v[1]?i+1<n.length&&B():v[1].length>0&&(0===v[1].indexOf("style=")?l.style=v[1].substr(6):(void 0===l.decoration&&(l.decoration=[]),l.decoration.push(v[1]))),i+=v[0];else{if(!((v=P(n,i))[0]>0))break;l.gracenotes=v[1],i+=v[0]}if((v=T(n,i))[0]>0){h=0,void 0!==l.gracenotes&&(l.rest={type:"spacer"},l.duration=.125,d.addFormattingOptions(l,e.formatting,"note"),e.appendElement("note",a+i,a+i+v[0],l),d.measureNotEmpty=!0,l={});var S={type:v[1]};if(0===S.type.length)p("Unknown bar type",n,i);else{if(d.inEnding&&"bar_thin"!==S.type&&(S.endEnding=!0,d.inEnding=!1),v[2]&&(S.startEnding=v[2],d.inEnding&&(S.endEnding=!0),d.inEnding=!0,"bar_right_repeat"===v[1]?d.restoreStartEndingHoldOvers():d.duplicateStartEndingHoldOvers()),void 0!==l.decoration&&(S.decoration=l.decoration),void 0!==l.chord&&(S.chord=l.chord),S.startEnding&&void 0===d.barFirstEndingNum?d.barFirstEndingNum=d.currBarNumber:S.startEnding&&S.endEnding&&d.barFirstEndingNum?d.currBarNumber=d.barFirstEndingNum:S.endEnding&&(d.barFirstEndingNum=void 0),"bar_invisible"!==S.type&&d.measureNotEmpty)(void 0===d.currentVoice||0===d.currentVoice.staffNum&&0===d.currentVoice.index)&&(d.currBarNumber++,d.barNumbers&&d.currBarNumber%d.barNumbers==0&&(S.barNumber=d.currBarNumber));d.addFormattingOptions(l,e.formatting,"bar"),e.appendElement("bar",a+i,a+i+v[0],S),d.measureNotEmpty=!1,l={}}i+=v[0];d.currentVoice&&(d.currentVoice.staffNum,d.currentVoice.index)}else if("&"===n[i])(v=D(n,i))[0]>0&&(e.appendElement("overlay",a,a+1,{}),i+=1,h++);else{if((v=M(n,i)).consumed>0&&(void 0!==v.startSlur&&(l.startSlur=v.startSlur),void 0!==v.triplet&&(o>0?p("Can't nest triplets",n,i):(l.startTriplet=v.triplet,l.tripletMultiplier=v.tripletQ/v.triplet,o=void 0===v.num_notes?v.triplet:v.num_notes)),i+=v.consumed),"["===n.charAt(i)){var E=i;i++;for(var I=null,O=!1,z=!1;!z;){var F=x(n,i);F[0]>0&&(i+=F[0]);var j=_(n,i,{},!1);if(null!==j&&void 0!==j.pitch)F[0]>0&&0!==F[1].indexOf("style=")&&(void 0===l.decoration&&(l.decoration=[]),l.decoration.push(F[1])),j.end_beam&&(l.end_beam=!0,delete j.end_beam),void 0===l.pitches?(l.duration=j.duration,l.pitches=[j]):l.pitches.push(j),delete j.duration,F[0]>0&&0===F[1].indexOf("style=")&&(l.pitches[l.pitches.length-1].style=F[1].substr(6)),d.inTieChord[l.pitches.length]&&(j.endTie=!0,d.inTieChord[l.pitches.length]=void 0),j.startTie&&(d.inTieChord[l.pitches.length]=!0),i=j.endChar,delete j.endChar;else if(" "===n.charAt(i))p("Spaces are not allowed in chords",n,i),i++;else{if(i<n.length&&"]"===n.charAt(i)){i++,0!==d.next_note_duration&&(l.duration=l.duration*d.next_note_duration,d.next_note_duration=0),V(d,h,l)&&(r.each(l.pitches,(function(e){e.endTie=!0})),H(d,h,!1)),o>0&&0===--o&&(l.endTriplet=!0);for(var q=!1;i<n.length&&!q;){switch(n.charAt(i)){case" ":case"\t":C(l);break;case")":void 0===l.endSlur?l.endSlur=1:l.endSlur++;break;case"-":r.each(l.pitches,(function(e){e.startTie={}})),H(d,h,!0);break;case">":case"<":var W=N(n,i);i+=W[0]-1,d.next_note_duration=W[2],I?I*=W[1]:I=W[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var Y=t.getFraction(n,i);I=Y.value,i=Y.index," "===n.charAt(i)&&(O=!0),"-"===n.charAt(i)||")"===n.charAt(i)||" "===n.charAt(i)||"<"===n.charAt(i)||">"===n.charAt(i)?i--:q=!0;break;default:q=!0}q||i++}}else p("Expected ']' to end the chords",n,i);void 0!==l.pitches&&(null!==I&&(l.duration=l.duration*I,O&&C(l)),d.addFormattingOptions(l,e.formatting,"note"),e.appendElement("note",a+E,a+i,l),d.measureNotEmpty=!0,l={}),z=!0}}}else{var R={},G=_(n,i,R,!0);void 0!==R.endTie&&H(d,h,!0),null!==G&&(void 0!==G.pitch?(l.pitches=[{}],void 0!==G.accidental&&(l.pitches[0].accidental=G.accidental),l.pitches[0].pitch=G.pitch,(G.soundPitch||0===G.soundPitch)&&(l.pitches[0].soundPitch=G.soundPitch),(G.midipitch||0===G.midipitch)&&(l.pitches[0].midipitch=G.midipitch),void 0!==G.endSlur&&(l.pitches[0].endSlur=G.endSlur),void 0!==G.endTie&&(l.pitches[0].endTie=G.endTie),void 0!==G.startSlur&&(l.pitches[0].startSlur=G.startSlur),void 0!==l.startSlur&&(l.pitches[0].startSlur=l.startSlur),void 0!==G.startTie&&(l.pitches[0].startTie=G.startTie),void 0!==l.startTie&&(l.pitches[0].startTie=l.startTie)):(l.rest=G.rest,void 0!==G.endSlur&&(l.endSlur=G.endSlur),void 0!==G.endTie&&(l.rest.endTie=G.endTie),void 0!==G.startSlur&&(l.startSlur=G.startSlur),void 0!==G.startTie&&(l.rest.startTie=G.startTie),void 0!==l.startTie&&(l.rest.startTie=l.startTie)),void 0!==G.chord&&(l.chord=G.chord),void 0!==G.duration&&(l.duration=G.duration),void 0!==G.decoration&&(l.decoration=G.decoration),void 0!==G.graceNotes&&(l.graceNotes=G.graceNotes),delete l.startSlur,V(d,h,l)&&(void 0!==l.pitches?l.pitches[0].endTie=!0:"spacer"!==l.rest.type&&(l.rest.endTie=!0),H(d,h,!1)),(G.startTie||l.startTie)&&H(d,h,!0),i=G.endChar,o>0&&0===--o&&(l.endTriplet=!0),G.end_beam&&C(l),l.rest&&"rest"===l.rest.type&&1===l.duration&&L(d)<=1&&(l.rest.type="whole",l.duration=L(d)),d.addFormattingOptions(l,e.formatting,"note"),e.appendElement("note",a+u,a+i,l),d.measureNotEmpty=!0,l={})}i===u&&(" "!==n.charAt(i)&&"`"!==n.charAt(i)&&p("Unknown character ignored",n,i),i++)}}}}}(a.str),a.newline&&B(),a.words&&function(e,n){if(e){"-"!==(n=r.strip(n)).charAt(n.length-1)&&(n+=" ");for(var i=[],a=0,s=!1,o=function(e){var o=r.strip(n.substring(a,e));if(a=e+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=n.charAt(e);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:t.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<n.length;c++)switch(n.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&i.length>0&&(r.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":o(c),i.push({skip:!0,to:"slur"});break;case"*":o(c),i.push({skip:!0,to:"next"});break;case"|":o(c),i.push({skip:!0,to:"bar"});break;case"~":s=!0}r.each(e,(function(e){if(0!==i.length)if(i[0].skip){switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.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=i.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else p("Can't add words before the first line of music",e,0)}(e.getCurrentVoice(),i.substring(2)),a.symbols&&function(e,n){if(e){"-"!==(n=r.strip(n)).charAt(n.length-1)&&(n+=" ");for(var i=[],a=0,s=!1,o=function(e){var o=r.strip(n.substring(a,e));if(a=e+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=n.charAt(e);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:t.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<n.length;c++)switch(n.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&i.length>0&&(r.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":o(c),i.push({skip:!0,to:"slur"});break;case"*":o(c),i.push({skip:!0,to:"next"});break;case"|":o(c),i.push({skip:!0,to:"bar"});break;case"~":s=!0}r.each(e,(function(e){if(0!==i.length)if(i[0].skip)switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else p("Can't add symbols before the first line of music",e,0)}(e.getCurrentVoice(),i.substring(2)),a.recurse&&n(a.str)};function z(e,t){e.push({el_type:"hint"});for(var n=0;n<t.length;n++){var i=t[n],a=r.clone(i);if(e.push(a),"bar"===i.el_type)return}}function F(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(i)for(var a=0;a<i.voices.length;a++){var s=i.voices[a],o=r.voices[a];o&&z(o,s)}}}this.parse=function(n,a,s){if(a||(a={}),s||(s=0),e.reset(),a.print&&(e.media="print"),d.reset(),d.iChar=s,a.visualTranspose?(d.globalTranspose=parseInt(a.visualTranspose),0===d.globalTranspose&&(d.globalTranspose=void 0)):d.globalTranspose=void 0,a.lineBreaks){d.lineBreaks={};for(var o=0;o<a.lineBreaks.length;o++)d.lineBreaks[""+(a.lineBreaks[o]+1)]=!0}m.reset(t,p,d,e),n=r.gsub(n,"\r\n","\n"),n=r.gsub(n,"\r","\n");var c=(n+="\n").split("\n\\");if(c.length>1){for(var h=1;h<c.length;h++)for(;c[h].length>0&&"\n"!==c[h][0];)c[h]=c[h].substr(1),c[h-1]+=" ";n=c.join("  ")}var u=(n=n.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,n){return t+" "+(n?"                                                                                                                                                                                                     ".substring(0,n.length):"")}))).split("\n");0===r.last(u).length&&u.pop();try{a.format&&i.globalFormatting(a.format),r.each(u,(function(n){if(a.header_only&&!1===d.is_in_header)throw"normal_abort";if(a.stop_on_warning&&d.warnings)throw"normal_abort";if(d.is_in_history)":"===n.charAt(1)?(d.is_in_history=!1,O(n)):e.addMetaText("history",t.translateString(t.stripComment(n)));else if(d.inTextBlock)r.startsWith(n,"%%endtext")?(e.addText(d.textBlock),d.inTextBlock=!1):r.startsWith(n,"%%")?d.textBlock+=n.substring(2)+"\n":d.textBlock+=n+"\n";else if(d.inPsBlock)r.startsWith(n,"%%endps")?d.inPsBlock=!1:d.textBlock+=" "+n;else{var i=d.is_in_header;O(n),i&&!d.is_in_header&&(e.setRunningFont("annotationfont",d.annotationfont),e.setRunningFont("gchordfont",d.gchordfont),e.setRunningFont("tripletfont",d.tripletfont),e.setRunningFont("vocalfont",d.vocalfont))}d.iChar+=n.length+1}));var f=792,g=612;switch(d.papersize){case"legal":f=1008,g=612;break;case"A4":f=842.4,g=597.6}if(d.landscape){var v=f;f=g,g=v}d.openSlurs=e.cleanUp(g,f,d.barsperstaff,d.staffnonote,d.openSlurs)}catch(e){if("normal_abort"!==e)throw e}a.hint_measures&&function(){for(var t=0;t<e.lines.length;t++){var n=e.lines[t].staff;if(n){for(var r=t+1;r<e.lines.length&&void 0===e.lines[r].staff;)r++;if(r<e.lines.length)F(n,e.lines[r].staff)}}}(),l.wrapLines(e,d.lineBreaks)}}},function(e,t){var n={},r={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},i=["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"];n.keySignature=function(e,t,n,s,o,c){c||(c=0),e.localTransposeVerticalMovement=0,e.localTransposePreferFlats=!1;var l=t[n];if(!l)return e.key;if(e.localTranspose=(e.globalTranspose?e.globalTranspose:0)+c,!e.localTranspose)return{accidentals:l,root:s,acc:o};if(e.globalTransposeOrigKeySig=l,e.localTranspose%12==0)return e.localTransposeVerticalMovement=e.localTranspose/12*7,{accidentals:l,root:s,acc:o};var h=n[0];"b"===n[1]||"#"===n[1]?(h+=n[1],n=n.substr(2)):n=n.substr(1);for(var u=r[h]+e.localTranspose;u<0;)u+=12;u>11&&(u%=12);var d="m"===n[0]?a[u]:i[u],f=d+n,p=t[f];p.length>0&&"flat"===p[0].acc&&(e.localTransposePreferFlats=!0);var m=f.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?m<0?m+=7:0===m&&("#"!==h[1]&&"b"!==f[1]||(m+=7)):e.localTranspose<0&&(m>0?m-=7:0===m&&("b"!==h[1]&&"#"!==f[1]||(m-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=m+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=m+7*Math.ceil(e.localTranspose/12),{accidentals:p,root:d[0],acc:d.length>1?d[1]:""}};var s=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],o=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],c=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],l=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];n.chordName=function(e,t){if(e.localTranspose&&e.localTranspose%12!=0){for(var n=e.localTranspose;n<0;)n+=12;n>11&&(n%=12);for(var r=(t=(t=(t=(t=(t=(t=(t=(t=e.freegchord?(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/Cb/g,"`~11`")).replace(/Db/g,"`~1`")).replace(/Eb/g,"`~3`")).replace(/Fb/g,"`~4`")).replace(/Gb/g,"`~6`")).replace(/Ab/g,"`~8`")).replace(/Bb/g,"`~10`")).replace(/C#/g,"`~1`")).replace(/D#/g,"`~3`")).replace(/E#/g,"`~5`")).replace(/F#/g,"`~6`")).replace(/G#/g,"`~8`")).replace(/A#/g,"`~10`")).replace(/B#/g,"`~0`"):(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/C♭/g,"`~11`")).replace(/D♭/g,"`~1`")).replace(/E♭/g,"`~3`")).replace(/F♭/g,"`~4`")).replace(/G♭/g,"`~6`")).replace(/A♭/g,"`~8`")).replace(/B♭/g,"`~10`")).replace(/C♯/g,"`~1`")).replace(/D♯/g,"`~3`")).replace(/E♯/g,"`~5`")).replace(/F♯/g,"`~6`")).replace(/G♯/g,"`~8`")).replace(/A♯/g,"`~10`")).replace(/B♯/g,"`~0`")).replace(/C/g,"`~0`")).replace(/D/g,"`~2`")).replace(/E/g,"`~4`")).replace(/F/g,"`~5`")).replace(/G/g,"`~7`")).replace(/A/g,"`~9`")).replace(/B/g,"`~11`")).split("`"),i=0;i<r.length;i++)if("~"===r[i][0]){var a=parseInt(r[i].substr(1),10);(a+=n)>11&&(a-=12),e.freegchord?r[i]=e.localTransposePreferFlats?l[a]:c[a]:r[i]=e.localTransposePreferFlats?o[a]:s[a]}t=r.join("")}return t};var h=["c","d","e","f","g","a","b"];var u={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},d={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"};n.note=function(e,t){if(e.localTranspose){var n=t.pitch;if(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.accidental){var r=function(e,t,n,r,i){for(var a=h[(e+49)%7],s=0,o=0;o<r.length;o++)r[o].note.toLowerCase()===a&&(s=u[r[o].acc]);for(var c=u[n]-s,l=h[(t+49)%7],d=0,f=0;f<i.accidentals.length;f++)i.accidentals[f].note.toLowerCase()===l&&(d=u[i.accidentals[f].acc]);var p=c+d;return p<-2&&(t--,p+="c"===l||"f"===l?1:2),p>2&&(t++,p-="b"===l||"e"===l?1:2),[t,p]}(n,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=r[0],t.accidental=d[r[1]]}}},e.exports=n},function(e,t){function n(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function r(e,t,r,i,a,s,o,c,l,h,u){for(var d=h;d<e.length;d++){var f=e[d];r+=f,i+=f;var p=Math.abs(r-t[c]);if(Math.abs(p-s)<t[0]/10)if(p<s){var m=n(a),g=n(l);g.push(d-1),m.push(i-f),u.push({accumulator:r,lineAccumulator:f,lineWidths:m,lastVariance:Math.abs(r-t[c+1]),highestVariance:Math.max(o,s),currLine:c+1,lineBreaks:g,startIndex:d+1})}else p>s&&d<e.length-1&&(m=n(a),g=n(l),u.push({accumulator:r,lineAccumulator:i,lineWidths:m,lastVariance:p,highestVariance:Math.max(o,p),currLine:c,lineBreaks:g,startIndex:d+1}));p>s?(l.push(d-1),c++,o=Math.max(o,s),s=Math.abs(r-t[c]),a.push(i-f),i=f):s=p}a.push(i)}function i(e,t,n,r,i){var a=new i,s={lineBreaks:e,staffwidth:t};for(var o in r)r.hasOwnProperty(o)&&"wrap"!==o&&"staffwidth"!==o&&(s[o]=r[o]);return a.parse(n,s),{tune:a.getTune(),revisedParams:s}}e.exports={wrapLines:function(e,t){if(t&&0!==e.lines.length){for(var n=[],r=[],i=[],a=[],s=[],o="",c={},l=0,h=0;h<e.lines.length;h++){var u=e.lines[h];if(u.staff){for(var d=u.staff,f=0;f<d.length;f++){void 0===r[f]&&(r[f]=[],i[f]=[],a[f]=[],s[f]=[]);for(var p=d[f],m=p.voices,g=0;g<m.length;g++){void 0===r[f][g]&&(r[f][g]=!0,i[f][g]=0,a[f][g]=0,s[f][g]=0),l>0&&(i[f][g]+=l);for(var v=m[g],b=0;b<v.length;b++){if(r[f][g]){if(n[i[f][g]]||(n[i[f][g]]={staff:[]}),!n[i[f][g]].staff[f])for(var y in n[i[f][g]].staff[f]={voices:[]},p)p.hasOwnProperty(y)&&("meter"===y?0!==i[f][g]&&o===JSON.stringify(p[y])||(o=JSON.stringify(p[y]),n[i[f][g]].staff[f][y]=p[y]):"voices"!==y&&(n[i[f][g]].staff[f][y]=p[y]));s[f][g]&&(n[i[f][g]].staff[f].barNumber=s[f][g]),r[f][g]=!1}var w=v[b];if(!n[i[f][g]].staff[f].voices[g])for(var k in n[i[f][g]].staff[f].voices[g]=[],c)c.hasOwnProperty(k)&&n[i[f][g]].staff[f].voices[g].push(c[k]);n[i[f][g]].staff[f].voices[g].push(w),"stem"===w.el_type&&(c[w.el_type]=w),"bar"===w.el_type&&(a[f][g]++,t[a[f][g]]&&(r[f][g]=!0,i[f][g]++,s[f][g]=w.barNumber,delete w.barNumber))}}}l=0}else n.push(u),l++}e.lines=n}},calcLineWraps:function(e,t,n,a,s,o){if(a.staffwidth<t.left)return{explanation:"Staffwidth is narrower than the margin",tune:e,revisedParams:a};var c=a.scale?Math.max(a.scale,.1):1,l=a.wrap.minSpacing?Math.max(parseFloat(a.wrap.minSpacing),1):1,h=a.wrap.minSpacingLimit?Math.max(parseFloat(a.wrap.minSpacingLimit),1):l-.1,u=a.wrap.maxSpacing?Math.max(parseFloat(a.wrap.maxSpacing),1):void 0;a.wrap.lastLineLimit&&!u&&(u=Math.max(parseFloat(a.wrap.lastLineLimit),1)),a.wrap.targetHeight&&Math.max(parseInt(a.wrap.targetHeight,10),100);var d=a.wrap.preferredMeasuresPerLine?Math.max(parseInt(a.wrap.preferredMeasuresPerLine,10),1):void 0,f=(a.staffwidth-t.left)/l/c,p=(a.staffwidth-t.left)/u/c,m=(a.staffwidth-t.left)/h/c,g={widths:t,lineBreakPoint:f,minLineSize:p,attempts:[],staffWidth:a.staffwidth,minWidth:Math.round(m)},v=null;if(d){var b=function(e,t,n){for(var r=[],i=[],a=0,s=!1,o=0;o<e.length;o++)(a+=e[o])>t&&(s=!0),o%n==n-1&&(o!==e.length-1&&r.push(o),i.push(Math.round(a)),a=0);return{failed:s,totals:i,lineBreaks:r}}(t.measureWidths,f,d);g.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:d,lineBreaks:b.lineBreaks,failed:b.failed,totals:b.totals}),b.failed||(v=b.lineBreaks)}if(!v){var y=function(e,t){for(var n=[],r=[],i=0,a=0;a<e.length;a++){var s=e[a],o=i+s;if(o<t)i=o;else t-i<o-t&&i>0?(n.push(a-1),r.push(Math.round(i-s)),i=s):a<e.length-1&&(n.push(a),r.push(Math.round(i)),i=0)}return r.push(Math.round(i)),{lineBreaks:n,totals:r}}(t.measureWidths,f);g.attempts.push({type:"Free Form",lineBreaks:y.lineBreaks,totals:y.totals}),v=y.lineBreaks,y=function(e,t,n,i){for(var a=Math.ceil(e.total/t)+1,s=Math.floor(e.total/a),o=[],c=0;c<a;c++)o.push(s*(c+1));var l=[];l.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var h=0;h<l.length;)r(e.measureWidths,o,l[h].accumulator,l[h].lineAccumulator,l[h].lineWidths,l[h].lastVariance,l[h].highestVariance,l[h].currLine,l[h].lineBreaks,l[h].startIndex,l),h++;for(c=0;c<l.length;c++){var u=l[c];u.variances=[],u.aveVariance=0;for(var d=0;d<u.lineWidths.length;d++){var f=u.lineWidths[d];u.variances.push(f-o[0]),u.aveVariance+=Math.abs(f-o[0])}u.aveVariance=u.aveVariance/u.lineWidths.length,i.attempts.push({type:"optimizeLineWidths",lineBreaks:u.lineBreaks,variances:u.variances,aveVariance:u.aveVariance,widths:e.measureWidths})}var p=9999999,m=-1;for(c=0;c<l.length;c++)(u=l[c]).aveVariance<p&&(p=u.aveVariance,m=c);return{failed:!1,lineBreaks:l[m].lineBreaks,variance:l[m].highestVariance}}(t,f,0,g),g.attempts.push({type:"Optimize",failed:y.failed,reason:y.reason,lineBreaks:y.lineBreaks,totals:y.totals}),y.failed||(v=y.lineBreaks)}var w=a.staffwidth,k=i(v,w,n,a,s),x=o.getMeasureWidths(k.tune),A=!0;return g.attempts.push({type:"heightCheck",height:x.height}),0===v.length&&p>t.total&&(w=t.total*u*c+t.left,g.attempts.push({type:"too sparse",newWidth:Math.round(w)}),A=!1),A||(k=i(v,w,n,a,s)),k.explanation=g,k}}},function(e,t,n){var r=n(1),i=n(10),a=n(0),s=n(31),o=n(32);e.exports=function(){this.getBeatLength=function(){for(var e=0;e<this.lines.length;e++)if(this.lines[e].staff)for(var t=0;t<this.lines[e].staff.length;t++)if(this.lines[e].staff[t].meter){var n=this.lines[e].staff[t].meter;if("specified"===n.type){if(n.value.length>0){var r=parseInt(n.value[0].num,10),i=parseInt(n.value[0].den,10);return 3===r&&8===i||6===r&&8===i?3/8:6===r&&4===i||9===r&&4===i||12===r&&4===i?3/4:9===r&&8===i||12===r&&8===i?3/8:1/i}return 1/4}return"cut_time"===n.type?.5:1/4}return 1/4},this.getPickupLength=function(){var e=this.getBarLength(),t=function(){for(var t=0,n=0;n<this.lines.length;n++)if(this.lines[n].staff)for(var r=0;r<this.lines[n].staff.length;r++)for(var i=0;i<this.lines[n].staff[r].voices.length;i++)for(var a=this.lines[n].staff[r].voices[i],s=1,o=0;o<a.length;o++){var c=a[o].rest&&"spacer"===a[o].rest.type;if(a[o].startTriplet&&(s=a[o].tripletMultiplier),a[o].duration&&!c&&(t+=a[o].duration*s),a[o].endTriplet&&(s=1),t>=e&&(t-=e),"bar"===a[o].el_type)return t}return t}.apply(this);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},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,t=this.getMeterFraction();return(e=3===t.num&&4===t.den?t.num:t.num%3==0?t.num/3:t.num)<=0&&(e=1),e},this.reset=function(){this.version="1.0.1",this.media="screen",this.metaText={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0,this.runningFonts={}},this.resolveOverlays=function(){for(var e=!1,t=[],n=0;n<this.lines.length;n++){var i=this.lines[n];if(i.staff)for(var a=0;a<i.staff.length;a++){for(var s=i.staff[a],o=[],c=0;c<s.voices.length;c++){var l=s.voices[c];o.push({hasOverlay:!1,voice:[],snip:[]}),t[n]=0;for(var h=0,u=!1,d=0,f=-1,p=0;p<l.length;p++){var m=l[p];if("overlay"!==m.el_type||u)"bar"===m.el_type?(u?(u=!1,o[c].snip.push({start:f,len:p-f}),o[c].voice.push(m)):(h>0&&o[c].voice.push({el_type:"note",duration:h,rest:{type:"invisible"},startChar:m.startChar,endChar:m.endChar}),o[c].voice.push(m)),h=0):"note"===m.el_type?u?o[c].voice.push(m):(h+=m.duration,t[n]+=m.duration):"scale"!==m.el_type&&"stem"!==m.el_type&&"overlay"!==m.el_type&&"style"!==m.el_type&&"transpose"!==m.el_type||o[c].voice.push(m);else{e=!0,u=!0,f=p,o[c].hasOverlay=!0,0===d&&(d=t[n]);for(var g=0;g<n;g++)t[g]&&this.lines[g].staff&&s.voices.length>=this.lines[g].staff[0].voices.length&&this.lines[g].staff[0].voices.push([{el_type:"note",duration:t[g],rest:{type:"invisible"},startChar:m.startChar,endChar:m.endChar}])}}o[c].hasOverlay&&0===o[c].snip.length&&o[c].snip.push({start:f,len:l.length-f})}for(c=0;c<o.length;c++){var v=o[c];if(v.hasOverlay){s.voices.push(v.voice);for(var b=v.snip.length-1;b>=0;b--){var y=v.snip[b];s.voices[c].splice(y.start,y.len)}for(b=0;b<s.voices[s.voices.length-1].length;b++){s.voices[s.voices.length-1][b]=r.clone(s.voices[s.voices.length-1][b]);var w=s.voices[s.voices.length-1][b];"bar"===w.el_type&&w.startEnding&&delete w.startEnding,"bar"===w.el_type&&w.endEnding&&delete w.endEnding}}}}}return e},this.cleanUp=function(e,t,n,a,s){this.closeLine(),delete this.runningFonts,this.metaText.tempo&&this.metaText.tempo.bpm&&!this.metaText.tempo.duration&&(this.metaText.tempo.duration=[this.getBeatLength()]);var o,c,l,h=!1;for(o=0;o<this.lines.length;o++)if(void 0!==this.lines[o].staff){var u=!1;for(c=0;c<this.lines[o].staff.length;c++)if(void 0===this.lines[o].staff[c])h=!0,this.lines[o].staff[c]=null;else for(l=0;l<this.lines[o].staff[c].voices.length;l++)void 0===this.lines[o].staff[c].voices[l]?this.lines[o].staff[c].voices[l]=[]:this.containsNotes(this.lines[o].staff[c].voices[l])&&(u=!0);u||(this.lines[o]=null,h=!0)}if(h&&(this.lines=r.compact(this.lines),r.each(this.lines,(function(e){e.staff&&(e.staff=r.compact(e.staff))}))),n)for(;m(this.lines,n););if(a){for(h=!1,o=0;o<this.lines.length;o++)if(void 0!==this.lines[o].staff)for(c=0;c<this.lines[o].staff.length;c++){var d=!1;for(l=0;l<this.lines[o].staff[c].voices.length;l++)this.containsNotesStrict(this.lines[o].staff[c].voices[l])&&(d=!0);d||(h=!0,this.lines[o].staff[c]=null)}h&&r.each(this.lines,(function(e){e.staff&&(e.staff=r.compact(e.staff))}))}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 a=r.staff[i];if(a.title){for(var s=!1,o=0;o<a.title.length;o++)a.title[o]?(a.title[o]=t?a.title[o].name:a.title[o].subname,a.title[o]?s=!0:a.title[o]=""):a.title[o]="";s||delete a.title}}t=!1}}}(this.lines),o=0;o<this.lines.length;o++)if(this.lines[o].staff)for(c=0;c<this.lines[o].staff.length;c++)delete this.lines[o].staff[c].workingClef;for(;this.resolveOverlays(););function f(e){for(var t,n=function(e,n,i){if(void 0===s[i]){for(t=0;t<s.length;t++)if(void 0!==s[t]){i=t;break}if(void 0===s[i]){var a=100*i+1;r.each(e.endSlur,(function(e){a===e&&--a})),s[i]=[a]}}for(var o,c=0;c<n;c++)o=s[i].pop(),e.endSlur.push(o);return 0===s[i].length&&delete s[i],o},i=function(e,t,n,i){e.startSlur=[],void 0===s[n]&&(s[n]=[]);for(var a=100*n+1,o=0;o<t;o++)i&&(r.each(i,(function(e){a===e&&++a})),r.each(i,(function(e){a===e&&++a})),r.each(i,(function(e){a===e&&++a}))),r.each(s[n],(function(e){a===e&&++a})),r.each(s[n],(function(e){a===e&&++a})),s[n].push(a),e.startSlur.push({label:a}),a++},a=0;a<e.length;a++){var o=e[a];if("note"===o.el_type){if(o.gracenotes)for(var c=0;c<o.gracenotes.length;c++){if(o.gracenotes[c].endSlur){var l=o.gracenotes[c].endSlur;o.gracenotes[c].endSlur=[];for(var h=0;h<l;h++)n(o.gracenotes[c],1,20)}o.gracenotes[c].startSlur&&(t=o.gracenotes[c].startSlur,i(o.gracenotes[c],t,20))}if(o.endSlur&&(t=o.endSlur,o.endSlur=[],n(o,t,0)),o.startSlur&&i(o,t=o.startSlur,0),o.pitches){for(var u=[],d=0;d<o.pitches.length;d++)if(o.pitches[d].endSlur){var f=o.pitches[d].endSlur;o.pitches[d].endSlur=[];for(var p=0;p<f;p++){var m=n(o.pitches[d],1,d+1);u.push(m)}}for(d=0;d<o.pitches.length;d++)o.pitches[d].startSlur&&(t=o.pitches[d].startSlur,i(o.pitches[d],t,d+1,u));o.gracenotes&&o.pitches[0].endSlur&&100===o.pitches[0].endSlur[0]&&o.pitches[0].startSlur&&(o.gracenotes[0].endSlur?o.gracenotes[0].endSlur.push(o.pitches[0].startSlur[0].label):o.gracenotes[0].endSlur=[o.pitches[0].startSlur[0].label],1===o.pitches[0].endSlur.length?delete o.pitches[0].endSlur:100===o.pitches[0].endSlur[0]?o.pitches[0].endSlur.shift():100===o.pitches[0].endSlur[o.pitches[0].endSlur.length-1]&&o.pitches[0].endSlur.pop(),1===s[1].length?delete s[1]:s[1].pop())}}}}function p(e){i.fixClef(e)}function m(e,t){for(o=0;o<e.length;o++)if(void 0!==e[o].staff)for(c=0;c<e[o].staff.length;c++){var n=[];for(l=0;l<e[o].staff[c].voices.length;l++)for(var i=e[o].staff[c].voices[l],a=0,s=0;s<i.length;s++)if("bar"===i[s].el_type){if(++a>=t&&s<i.length-1){var h=g(e,o);if(!h){var u=JSON.parse(JSON.stringify(e[o]));e.push(r.clone(u)),h=e[e.length-1];for(var d=0;d<h.staff.length;d++)for(var f=0;f<h.staff[d].voices.length;f++)h.staff[d].voices[f]=[]}var p=s+1,m=e[o].staff[c].voices[l].slice(p);return e[o].staff[c].voices[l]=e[o].staff[c].voices[l].slice(0,p),h.staff[c].voices[l]=n.concat(m.concat(h.staff[c].voices[l])),!0}}else i[s].duration||n.push(i[s])}return!1}function g(e,t){for(t++;e.length>t;){if(e[t].staff)return e[t];t++}return null}for(this.lineNum=0;this.lineNum<this.lines.length;this.lineNum++){var v=this.lines[this.lineNum].staff;if(v)for(this.staffNum=0;this.staffNum<v.length;this.staffNum++)for(v[this.staffNum].clef&&p(v[this.staffNum].clef),this.voiceNum=0;this.voiceNum<v[this.staffNum].voices.length;this.voiceNum++){var b=v[this.staffNum].voices[this.voiceNum];f(b);for(var y=0;y<b.length;y++)"clef"===b[y].el_type&&p(b[y]);if(b.length>0&&b[b.length-1].barNumber){var w=g(this.lines,this.lineNum);w&&(w.staff[0].barNumber=b[b.length-1].barNumber),delete b[b.length-1].barNumber}}}return this.formatting.pagewidth||(this.formatting.pagewidth=e),this.formatting.pageheight||(this.formatting.pageheight=t),delete this.staffNum,delete this.voiceNum,delete this.lineNum,delete this.potentialStartBeam,delete this.potentialEndBeam,delete this.vskipPending,s},this.reset(),this.getLastNote=function(){if(this.lines[this.lineNum]&&this.lines[this.lineNum].staff&&this.lines[this.lineNum].staff[this.staffNum]&&this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum])for(var e=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum].length-1;e>=0;e--){var t=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum][e];if("note"===t.el_type)return t}return null},this.addTieToLastNote=function(){var e=this.getLastNote();return!!(e&&e.pitches&&e.pitches.length>0)&&(e.pitches[0].startTie={},!0)},this.getDuration=function(e){return e.duration?e.duration:0},this.closeLine=function(){this.potentialStartBeam&&this.potentialEndBeam&&(this.potentialStartBeam.startBeam=!0,this.potentialEndBeam.endBeam=!0),delete this.potentialStartBeam,delete this.potentialEndBeam},this.appendElement=function(e,t,n,i){var a=this;i.el_type=e,null!==t&&(i.startChar=t),null!==n&&(i.endChar=n);var s=function(){void 0!==a.potentialStartBeam&&void 0!==a.potentialEndBeam&&(a.potentialStartBeam.startBeam=!0,a.potentialEndBeam.endBeam=!0),delete a.potentialStartBeam,delete a.potentialEndBeam};"note"===e?a.getDuration(i)>=.25||i.force_end_beam_last&&void 0!==a.potentialStartBeam?s():i.end_beam&&void 0!==a.potentialStartBeam?void 0===i.rest?(a.potentialStartBeam.startBeam=!0,i.endBeam=!0,delete a.potentialStartBeam,delete a.potentialEndBeam):s():void 0===i.rest&&(void 0===a.potentialStartBeam?i.end_beam||(a.potentialStartBeam=i,delete a.potentialEndBeam):a.potentialEndBeam=i):s();delete i.end_beam,delete i.force_end_beam_last,function(e){var t=a.lines[a.lineNum].staff[a.staffNum];if(t){if(void 0!==e.pitches){var n=t.workingClef.verticalPos;r.each(e.pitches,(function(e){e.verticalPos=e.pitch-n}))}if(void 0!==e.gracenotes){var i=t.workingClef.verticalPos;r.each(e.gracenotes,(function(e){e.verticalPos=e.pitch-i}))}t.voices[a.voiceNum].push(e)}}(i)},this.appendStartingElement=function(e,t,n,i){var a;this.closeLine(),"key"===e&&(a=i.impliedNaturals,delete i.impliedNaturals,delete i.explicitAccidentals);var s=r.clone(i);if(this.lines[this.lineNum].staff){this.lines[this.lineNum].staff.length<=this.staffNum&&(this.lines[this.lineNum].staff[this.staffNum]={},this.lines[this.lineNum].staff[this.staffNum].clef=r.clone(this.lines[this.lineNum].staff[0].clef),this.lines[this.lineNum].staff[this.staffNum].key=r.clone(this.lines[this.lineNum].staff[0].key),this.lines[this.lineNum].staff[0].meter&&(this.lines[this.lineNum].staff[this.staffNum].meter=r.clone(this.lines[this.lineNum].staff[0].meter)),this.lines[this.lineNum].staff[this.staffNum].workingClef=r.clone(this.lines[this.lineNum].staff[0].workingClef),this.lines[this.lineNum].staff[this.staffNum].voices=[[]]),"clef"===e&&(this.lines[this.lineNum].staff[this.staffNum].workingClef=s);for(var o=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum],c=0;c<o.length;c++){if("note"===o[c].el_type||"bar"===o[c].el_type)return s.el_type=e,s.startChar=t,s.endChar=n,a&&(s.accidentals=a.concat(s.accidentals)),void o.push(s);if(o[c].el_type===e)return s.el_type=e,s.startChar=t,s.endChar=n,a&&(s.accidentals=a.concat(s.accidentals)),void(o[c]=s)}this.lines[this.lineNum].staff[this.staffNum][e]=i}},this.getNumLines=function(){return this.lines.length},this.pushLine=function(e){this.vskipPending&&(e.vskip=this.vskipPending,delete this.vskipPending),this.lines.push(e)},this.addSubtitle=function(e){this.pushLine({subtitle:e})},this.addSpacing=function(e){this.vskipPending=e},this.addNewPage=function(e){this.pushLine({newpage:e})},this.addSeparator=function(e,t,n){this.pushLine({separator:{spaceAbove:Math.round(e),spaceBelow:Math.round(t),lineLength:Math.round(n)}})},this.addText=function(e){this.pushLine({text:e})},this.addCentered=function(e){this.pushLine({text:[{text:e,center:!0}]})},this.containsNotes=function(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type||"bar"===e[t].el_type)return!0;return!1},this.containsNotesStrict=function(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type&&void 0===e[t].rest)return!0;return!1},this.changeVoiceScale=function(e){this.appendElement("scale",null,null,{size:e})},this.startNewLine=function(e){var t=this;this.closeLine();var n=function(e){var n=t.lines[t.lineNum].staff[t.staffNum];if(n.voices[t.voiceNum]=[],n.title||(n.title=[]),n.title[t.voiceNum]={name:e.name,subname:e.subname},e.style&&t.appendElement("style",null,null,{head:e.style}),e.stem)t.appendElement("stem",null,null,{direction:e.stem});else if(t.voiceNum>0){if(void 0!==n.voices[0]){for(var r=!1,i=0;i<n.voices[0].length;i++)"stem"===n.voices[0].el_type&&(r=!0);if(!r){n.voices[0].splice(0,0,{el_type:"stem",direction:"up"})}}t.appendElement("stem",null,null,{direction:"down"})}e.scale&&t.appendElement("scale",null,null,{size:e.scale})},r=function(e){e.key&&e.key.impliedNaturals&&(e.key.accidentals=e.key.accidentals.concat(e.key.impliedNaturals),delete e.key.impliedNaturals),t.lines[t.lineNum].staff[t.staffNum]={voices:[],clef:e.clef,key:e.key,workingClef:e.clef},void 0!==e.stafflines&&(t.lines[t.lineNum].staff[t.staffNum].clef.stafflines=e.stafflines,t.lines[t.lineNum].staff[t.staffNum].workingClef.stafflines=e.stafflines),e.staffscale&&(t.lines[t.lineNum].staff[t.staffNum].staffscale=e.staffscale),e.annotationfont&&t.setLineFont("annotationfont",e.annotationfont),e.gchordfont&&t.setLineFont("gchordfont",e.gchordfont),e.tripletfont&&t.setLineFont("tripletfont",e.tripletfont),e.vocalfont&&t.setLineFont("vocalfont",e.vocalfont),e.bracket&&(t.lines[t.lineNum].staff[t.staffNum].bracket=e.bracket),e.brace&&(t.lines[t.lineNum].staff[t.staffNum].brace=e.brace),e.connectBarLines&&(t.lines[t.lineNum].staff[t.staffNum].connectBarLines=e.connectBarLines),e.barNumber&&(t.lines[t.lineNum].staff[t.staffNum].barNumber=e.barNumber),n(e),e.part&&t.appendElement("part",e.part.startChar,e.part.endChar,{title:e.part.title}),void 0!==e.meter&&(t.lines[t.lineNum].staff[t.staffNum].meter=e.meter),t.vskipPending&&(t.lines[t.lineNum].vskip=t.vskipPending,delete t.vskipPending)};if(void 0===this.lines[this.lineNum])!function(e){t.lines[t.lineNum]={staff:[]},r(e)}(e);else if(void 0===this.lines[this.lineNum].staff)this.lineNum++,this.startNewLine(e);else if(void 0===this.lines[this.lineNum].staff[this.staffNum])r(e);else if(void 0===this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum])n(e);else{if(!this.containsNotes(this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]))return;this.lineNum++,this.startNewLine(e)}},this.setRunningFont=function(e,t){this.runningFonts[e]=t},this.setLineFont=function(e,t){if(this.runningFonts[e]){for(var n=!1,r=Object.keys(t),i=0;i<r.length;i++)this.runningFonts[e][r[i]]!==t[r[i]]&&(n=!0);n&&(this.lines[this.lineNum].staff[this.staffNum][e]=t)}this.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<this.lines.length;e++)if(this.lines[e].staff)return!0;return!1},this.isFirstLine=function(e){for(var t=e-1;t>=0;t--)if(void 0!==this.lines[t].staff)return!1;return!0},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.getCurrentVoice=function(){return void 0!==this.lines[this.lineNum]&&void 0!==this.lines[this.lineNum].staff[this.staffNum]&&void 0!==this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]?this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]:null},this.setCurrentVoice=function(e,t){this.staffNum=e,this.voiceNum=t;for(var n=0;n<this.lines.length;n++)if(this.lines[n].staff&&(void 0===this.lines[n].staff[e]||void 0===this.lines[n].staff[e].voices[t]||!this.containsNotes(this.lines[n].staff[e].voices[t])))return void(this.lineNum=n);this.lineNum=n},this.addMetaText=function(e,t){void 0===this.metaText[e]?this.metaText[e]=t:this.metaText[e]+="\n"+t},this.addMetaTextArray=function(e,t){void 0===this.metaText[e]?this.metaText[e]=[t]:this.metaText[e].push(t)},this.addMetaTextObj=function(e,t){this.metaText[e]=t},this.addElementToEvents=function(e,t,n,i,a,s,o,c,l,h){if(t.hint)return{isTiedState:void 0,duration:0};var u=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&"spacer"===t.abcelem.rest.type&&(u=0),u>0){for(var d=[],f=0;f<t.elemset.length;f++)null!==t.elemset[f]&&d.push(t.elemset[f]);var p=t.startTie;if(void 0!==l)e["event"+l].elements.push(d),h&&(e["event"+n]||(e["event"+n]={type:"event",milliseconds:n,line:s,measureNumber:o,top:i,height:a,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),e["event"+n].measureStart=!0,h=!1),p||(l=void 0);else{if(e["event"+n]){if(e["event"+n].left?e["event"+n].left=Math.min(e["event"+n].left,t.x):e["event"+n].left=t.x,e["event"+n].elements.push(d),e["event"+n].startCharArray.push(t.abcelem.startChar),e["event"+n].endCharArray.push(t.abcelem.endChar),null===e["event"+n].startChar&&(e["event"+n].startChar=t.abcelem.startChar),null===e["event"+n].endChar&&(e["event"+n].endChar=t.abcelem.endChar),t.abcelem.midiPitches&&t.abcelem.midiPitches.length){e["event"+n].midiPitches||(e["event"+n].midiPitches=[]);for(f=0;f<t.abcelem.midiPitches.length;f++)e["event"+n].midiPitches.push(t.abcelem.midiPitches[f])}if(t.abcelem.midiGraceNotePitches&&t.abcelem.midiGraceNotePitches.length){e["event"+n].midiGraceNotePitches||(e["event"+n].midiGraceNotePitches=[]);for(var m=0;m<t.abcelem.midiGraceNotePitches.length;m++)e["event"+n].midiGraceNotePitches.push(t.abcelem.midiGraceNotePitches[m])}}else e["event"+n]={type:"event",milliseconds:n,line:s,measureNumber:o,top:i,height:a,left:t.x,width:t.w,elements:[d],startChar:t.abcelem.startChar,endChar:t.abcelem.endChar,startCharArray:[t.abcelem.startChar],endCharArray:[t.abcelem.endChar],midiPitches:t.abcelem.midiPitches?r.cloneArray(t.abcelem.midiPitches):[]},t.abcelem.midiGraceNotePitches&&(e["event"+n].midiGraceNotePitches=r.cloneArray(t.abcelem.midiGraceNotePitches));h&&(e["event"+n].measureStart=!0,h=!1),p&&(l=n)}}return{isTiedState:l,duration:u/c,nextIsBar:h||"bar"===t.type}},this.makeVoicesArray=function(){for(var e=[],t=0;t<this.engraver.staffgroups.length;t++)for(var n=this.engraver.staffgroups[t],r=n.staffs[0],i=r.absoluteY,s=i-r.top*a.STEP,o=n.staffs[n.staffs.length-1],c=(i=o.absoluteY)-o.bottom*a.STEP-s,l=n.voices,h=0;h<l.length;h++){var u=0,d=!1;e[h]||(e[h]=[]);for(var f=l[h].children,p=0;p<f.length;p++)e[h].push({top:s,height:c,line:t,measureNumber:u,elem:f[p]}),"bar"===f[p].type&&d&&u++,"note"!==f[p].type&&"rest"!==f[p].type||(d=!0)}return e},this.setupEvents=function(e,t,n){for(var r,i=[],a={},s=e,o=!0,c=this.makeVoicesArray(),l=0;l<c.length;l++)for(var h=s,u=Math.round(1e3*h),d=0,f=-1,p=c[l],m=0;m<p.length;m++){var g=p[m].elem;if("tempo"===g.abcelem.el_type){n=this.getBpm(g.abcelem);t=this.getBeatLength()*(n/60)}var v=this.addElementToEvents(a,g,u,p[m].top,p[m].height,p[m].line,p[m].measureNumber,t,r,o);if(r=v.isTiedState,o=v.nextIsBar,h+=v.duration,u=Math.round(1e3*h),"bar"===g.type){var b=g.abcelem.type,y="bar_right_repeat"===b||"bar_dbl_repeat"===b,w="1"===g.abcelem.startEnding,k="bar_left_repeat"===b||"bar_dbl_repeat"===b||"bar_right_repeat"===b;if(y){-1===f&&(f=m);for(var x=d;x<f;x++){var A=p[x].elem;r=(v=this.addElementToEvents(a,A,u,p[x].top,p[x].height,p[x].line,p[x].measureNumber,t,r,o)).isTiedState,o=v.nextIsBar,h+=v.duration,u=Math.round(1e3*h)}o=!0,f=-1}w&&(f=m),k&&(d=m)}}return function(e){for(var t,n,r,i,a=e.length-1;a>=0;a--){var s=e[a];"bar"===s.type?(s.top=r,s.nextTop=t,t=r,s.bottom=i,s.nextBottom=n,n=i):"event"===s.type&&(r=s.top,i=s.top+s.height)}}(i=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t=t.sort((function(e,t){var n=e.milliseconds-t.milliseconds;return 0!==n?n:"bar"===e.type?-1:1}))}(a)),i.push({type:"end",milliseconds:u}),this.addUsefulCallbackInfo(i,n),i},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){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&&r.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(!e){var n=this.metaText?this.metaText.tempo:null;e=this.getBpm(n)}this.setUpAudio({qpm:e});var r=this.getBeatLength(),i=e/60,a=this.getBarLength()/r*t/i;a&&(a-=this.getPickupLength()/r/i);var s=r*i;this.noteTimings=this.setupEvents(a,s,e)},this.setUpAudio=function(e){e||(e={});var t=s(this,e);return o(t,e)}}},function(e,t,n){n(11),n(12);var r=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),this.internalNotes=[]};r.prototype.addInternalNote=function(e){this.internalNotes.push(e)},r.prototype.setEndAnchor=function(e){this.anchor2=e},r.prototype.setStartX=function(e){this.startLimitX=e},r.prototype.setEndX=function(e){this.endLimitX=e},r.prototype.setHint=function(){this.hint=!0},r.prototype.setUpperAndLowerElements=function(e){},r.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}},r.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}},r.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.startX=e,this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=t},r.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},r.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;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}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)},r.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.exports=r},function(e,t,n){var r=n(3),i=n(5),a=n(13);function s(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}e.exports=function(e,t,n,o,c,l,h){var u,d;if(!o)return null;if(o.length>1&&o.indexOf(".")<0){e.paper.openGroup({klass:h});for(var f=0,p=0;p<o.length;p++){var m=o.charAt(p);d=i.getYCorr(m),(u=i.printSymbol(t+f,e.calcY(n+d),m,e.paper,"","",""))?p<o.length-1&&(f+=s(m,o.charAt(p+1),i.getSymbolWidth(m))):r(e,{x:t,y:e.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"})}return e.paper.closeGroup()}if(d=i.getYCorr(o),a.isInGroup())a.addPath(i.getPathForSymbol(t,e.calcY(n+d),o,c,l));else{if(u=i.printSymbol(t,e.calcY(n+d),o,e.paper,h,"none","#000000"))return u;r(e,{x:t,y:e.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"})}return null}},function(e,t,n){var r=n(22),i=n(3);e.exports=function(e,t,n){var a=t.x;void 0===t.pitch&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo",e.paper.openGroup({klass:e.controller.classes.generate("tempo")});var s,o=e.calcY(t.pitch);if(t.tempo.preString){s=i(e,{x:a,y:o,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0});var c=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",s),l=c.width;a+=l+l/t.tempo.preString.length}if(t.note){t.note.setX(a);for(var h=0;h<t.note.children.length;h++)r(e,t.note.children[h],a,n);a+=t.note.w+5;var u="= "+t.tempo.bpm;s=i(e,{x:a,y:o,text:u,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0});var d=(c=e.controller.getTextSize.calc(u,"tempofont","tempo",s)).width;a+=d+d/u.length}return t.tempo.postString&&i(e,{x:a,y:o,text:t.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0}),[e.paper.closeGroup()]}},function(e,t,n){var r=n(3),i=n(23),a=n(24),s=n(20);e.exports=function(e,t,n,o){void 0===t.pitch&&window.console.error(t.type+" Relative Element y-coordinate not set.");var c=e.calcY(t.pitch);switch(t.type){case"symbol":if(null===t.c)return null;var l="symbol";t.klass&&(l+=" "+t.klass),t.graphelem=s(e,t.x,t.pitch,t.c,t.scalex,t.scaley,e.controller.classes.generate(l),"none","#000000");break;case"debug":t.graphelem=r(e,{x:t.x,y:e.calcY(15),text:""+t.c,type:"debugfont",klass:e.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:t.dim});break;case"barNumber":t.graphelem=r(e,{x:t.x,y:c,text:""+t.c,type:"measurefont",klass:e.controller.classes.generate("bar-number"),anchor:"middle",dim:t.dim});break;case"lyric":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"vocalfont",klass:e.controller.classes.generate("lyric"),anchor:"middle",dim:t.dim});break;case"chord":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"gchordfont",klass:e.controller.classes.generate("chord"),anchor:"middle",dim:t.dim});break;case"decoration":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"middle",centerVertically:!0,dim:t.dim});break;case"text":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"start",centerVertically:t.centerVertically,dim:t.dim});break;case"multimeasure-text":t.graphelem=r(e,{x:t.x+t.w/2,y:c,text:t.c,type:"tempofont",klass:e.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:t.dim});break;case"part":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"partsfont",klass:e.controller.classes.generate("part"),anchor:"start",dim:t.dim});break;case"bar":t.graphelem=i(e,t.x,t.linewidth,c,n||e.calcY(t.pitch2));break;case"stem":t.graphelem=i(e,t.x,t.linewidth,c,e.calcY(t.pitch2));break;case"ledger":t.graphelem=a(e,t.x,t.x+t.w,t.pitch,e.controller.classes.generate("ledger"))}return 1!==t.scalex&&t.graphelem&&function(e,t,n,r,i,a){e.setAttributeOnElement(t,{style:"transform:scale("+n+","+r+");transform-origin:"+i+"px "+a+"px;"})}(e.paper,t.graphelem,t.scalex,t.scaley,t.x,c),t.graphelem}},function(e,t,n){var r=n(13);e.exports=function(e,t,n,i,a){if(n<0||i<a){var s=a;a=i,i=s}var o="#000000";~~t===t&&(t+=.05);var c=[["M",t,i],["L",t,a],["L",t+n,a],["L",t+n,i],["z"]];if(!r.isInGroup()){for(var l="",h=0;h<c.length;h++)l+=c[h].join(" ");return e.paper.pathToBack({path:l,stroke:"none",fill:o,class:e.controller.classes.generate("stem")})}r.addPath(c)}},function(e,t,n){var r=n(6);e.exports=function(e,t,n,i,a){var s=.35,o="#000000",c=e.calcY(i),l={path:r("M %f %f L %f %f L %f %f L %f %f z",t,c-s,n,c-s,n,c+s,t,c+s),stroke:"none",fill:o};return a&&(l.class=a),e.paper.pathToBack(l)}},function(e,t,n){n(26);var r={plugin:n(27)};window.ABCJS=r},function(e,t){},function(e,t,n){var r=n(28),i=n(79),a=new function(){"use strict";try{abcjs_is_user_script}catch(e){}this.show_midi=!0,this.hide_abc=!1,this.render_before=!1,this.midi_options={},this.render_options={},this.render_classname="abcrendered",this.text_classname="abctext",this.auto_render_threshold=20,this.show_text="show score",this.debug=!1};a.start=function(){var e=window.document.body;this.errors="";var t=this.getABCContainingElements(e);if(0!==t.length){if(this.debug)for(var n=0;n<t.length;n++){var r="Possible ABC found ("+(n+1)+" of "+t.length+"):\n\n"+t[n].innerText;alert(r)}var i=t.map(this.convertToDivs,this).reduce((function(e,t){return e.concat(t)}));this.auto_render=i.length<=this.auto_render_threshold,i.forEach((function(e){this.render(e,e.abctext_)}),this)}},a.getABCContainingElements=function(e){for(var t,n=[],r=!1,i=0,a=e.childNodes.length;i<a;++i)3!==(t=e.childNodes[i]).nodeType||r?1===t.nodeType&&"TEXTAREA"!==t.tagName&&(n=n.concat(this.getABCContainingElements(t))):t.nodeValue.match(/^\s*X:/m)&&"TEXTAREA"!==t.parentNode.tagName&&(n.push(e),r=!0);return n},a.convertToDivs=function(e){for(var t,n="",r=null,i=!1,a=[],s=Array.prototype.slice.call(e.childNodes),o=0,c=s.length;o<c;++o)if(3!==(t=s[o]).nodeType||t.nodeValue.match(/^\s*$/))i&&"BR"===t.tagName?(n+="\n",r.appendChild(t)):i&&1===t.nodeType?(n+="\n",r.appendChild(t)):i&&(i=!1,0,n=n.replace(/\n+/,"\n"),r.abctext_=n,a.push(r));else{0;var l=t.nodeValue;l.match(/^\s*X:/m)&&(i=!0,n="",(r=document.createElement("DIV")).className=this.text_classname,t.parentElement.insertBefore(r,t),this.hide_abc&&(r.style.display="none")),i&&(n+=l.replace(/^\n+/,""),r.appendChild(t))}return i&&(n=n.replace(/\n+$/,"\n").replace(/^\n+/,"\n"),r.abctext_=n,a.push(r)),a},a.render=function(e,t){var n=document.createElement("DIV");this.render_before?e.parentElement.insertBefore(n,e):e.nextSibling?e.parentElement.insertBefore(n,e.nextSibling):e.parentElement.appendChild(n);var a=this;try{this.debug&&alert("About to render:\n\n"+t);var s=function(){var e=document.createElement("DIV");if(e.className=a.render_classname,n.appendChild(e),r(e,t,a.render_options),a.show_midi){var s=document.createElement("DIV");n.appendChild(s),i(s,t,a.render_options)}};if(this.auto_render)s();else{var o=document.createElement("A");o.className="abcshow",o.href="#",o.innerHTML=this.show_text,o.onclick=function(){return s(),o.remove(),!1},abcdiv.parentElement.insertBefore(o,abcdiv)}}catch(e){this.errors+=e}};var s=!0;"undefined"!=typeof abcjs_plugin_autostart&&(s=abcjs_plugin_autostart),s&&"undefined"!=typeof window&&void 0!==window.document&&("loading"!==window.document.readyState?a.start():document.addEventListener("DOMContentLoaded",(function(){a.start()}))),e.exports=a},function(e,t,n){var r=n(14),i=n(18),a=n(34),s=n(15),o=n(17),c={};function l(){var e=window.innerWidth;for(var t in c)if(c.hasOwnProperty(t)){var n=c[t];e-=2*n.offsetLeft,n.style.width=e+"px"}}try{window.addEventListener("resize",l),window.addEventListener("orientationChange",l)}catch(e){}function h(e,t,n,r){n.viewportHorizontal?(e.innerHTML='<div class="abcjs-inner"></div>',n.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",c[e.id]=e,e=e.children[0]):n.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 i=new a(e,n);(i.engraveABC(t,r),t.engraver=i,n.viewportVertical||n.viewportHorizontal)&&(e.parentNode.style.width=e.style.width)}function u(e,t,n,r){function a(e){var t=new i;return t.formatting=e.formatting,t.media=e.media,t.version=e.version,t.metaText={},t.lines=[],t}for(var s,o=[],c=0;c<t.lines.length;c++){var l=t.lines[c];s||(s=a(t)),0===c&&(s.metaText.tempo=t.metaText.tempo,s.metaText.title=t.metaText.title,s.metaText.header=t.metaText.header,s.metaText.rhythm=t.metaText.rhythm,s.metaText.origin=t.metaText.origin,s.metaText.composer=t.metaText.composer,s.metaText.author=t.metaText.author,s.metaText.partOrder=t.metaText.partOrder),s.lines.push(l),l.staff&&(o.push(s),s=void 0)}if(s)for(var u=o[o.length-1],d=0;d<s.lines.length;d++)u.lines.push(s.lines[d]);(s=o[o.length-1]).metaText.unalignedWords=t.metaText.unalignedWords,s.metaText.book=t.metaText.book,s.metaText.source=t.metaText.source,s.metaText.discography=t.metaText.discography,s.metaText.notes=t.metaText.notes,s.metaText.transcription=t.metaText.transcription,s.metaText.history=t.metaText.history,s.metaText["abc-copyright"]=t.metaText["abc-copyright"],s.metaText["abc-creator"]=t.metaText["abc-creator"],s.metaText["abc-edited-by"]=t.metaText["abc-edited-by"],s.metaText.footer=t.metaText.footer;var f={};for(var p in n)n.hasOwnProperty(p)&&(f[p]=n[p]);var m=f.paddingtop,g=f.paddingbottom;e.innerHTML="";for(var v=0;v<o.length;v++){var b=document.createElement("div");e.appendChild(b),0===v?(f.paddingtop=m,f.paddingbottom=-20):v===o.length-1?(f.paddingtop=10,f.paddingbottom=g):(f.paddingtop=10,f.paddingbottom=-20),h(b,o[v],f,r),0===v?t.engraver=o[v].engraver:t.engraver.staffgroups?o[v].engraver.staffgroups.length>0&&t.engraver.staffgroups.push(o[v].engraver.staffgroups[0]):t.engraver.staffgroups=o[v].engraver.staffgroups}}e.exports=function(e,t,n,i,c){var l,d={};if(n)for(l in n)n.hasOwnProperty(l)&&(d[l]=n[l]);if(i)for(l in i)i.hasOwnProperty(l)&&("listener"===l?i[l].highlight&&(d.clickListener=i[l].highlight):d[l]=i[l]);if(c)for(l in c)c.hasOwnProperty(l)&&(d[l]=c[l]);return r.renderEngine((function(e,t,n,r){var i=!1;return"*"===e&&(i=!0,(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e)),d.afterParsing&&d.afterParsing(t,n,r),!i&&d.wrap&&d.staffwidth?t=function(e,t,n,r,i){var c=new a(e,i),l=c.getMeasureWidths(t),d=o.calcLineWraps(t,l,r,i,s,c);!i.oneSvgPerLine||d.tune.lines.length<2?h(e,d.tune,d.revisedParams,n):u(e,d.tune,d.revisedParams,n);return d.tune.explanation=d.explanation,d.tune}(e,t,n,r,d):(i||!d.oneSvgPerLine||t.lines.length<2?h(e,t,d,n):u(e,t,d,n),i&&e.parentNode.removeChild(e),null)}),e,t,d)}},function(e,t,n){var r=n(1),i=n(9),a=n(10);e.exports=function(e,t,n,s){this.reset=function(e,t,n,r){a.initialize(e,t,n,r),i.initialize(e,t,n,r)},this.reset(e,t,n,s),this.setTitle=function(t){if(n.hasMainTitle)s.addSubtitle(e.translateString(e.stripComment(t)));else{var r=e.translateString(e.theReverser(e.stripComment(t)));n.titlecaps&&(r=r.toUpperCase()),s.addMetaText("title",r),n.hasMainTitle=!0}},this.setMeter=function(r){if("C"===(r=e.stripComment(r)))return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"common_time"};if("C|"===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"cut_time"};if("o"===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===r.length||"none"===r.toLowerCase())return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),null;var i=e.tokenize(r,0,r.length);try{var a=function(){var e=function(){var e={value:0,num:""},t=i.shift();for("("===t.token&&(t=i.shift());;){if("number"!==t.type)throw"Expected top number of meter";if(e.value+=parseInt(t.token),e.num+=t.token,0===i.length||"/"===i[0].token)return e;if(")"===(t=i.shift()).token){if(0===i.length||"/"===i[0].token)return e;throw"Unexpected paren in meter"}if("."!==t.token&&"+"!==t.token)throw"Expected top number of meter";if(e.num+=t.token,0===i.length)throw"Expected top number of meter";t=i.shift()}return e}();if(0===i.length)return e;var t=i.shift();if("/"!==t.token)throw"Expected slash in meter";if("number"!==(t=i.shift()).type)throw"Expected bottom number of meter";return e.den=t.token,e.value=e.value/parseInt(e.den),e};if(0===i.length)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},o=0;;){var c=a();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),s.value.push(l),0===i.length)break}return!0===n.havent_set_length&&(n.default_length=o<.75?.0625:.125,n.havent_set_length=!1),s}catch(e){t(e,r,0)}return null},this.calcTempo=function(e){var t=1/4;n.meter&&"specified"===n.meter.type?t=1/parseInt(n.meter.value[0].den):n.origMeter&&"specified"===n.origMeter.type&&(t=1/parseInt(n.origMeter.value[0].den));for(var r=0;r<e.duration;r++)e.duration[r]=t*e.duration[r];return e},this.resolveTempo=function(){n.tempo&&(this.calcTempo(n.tempo),s.metaText.tempo=n.tempo,delete n.tempo)},this.addUserDefinition=function(e,i,a){var s=e.indexOf("=",i);if(-1!==s){var o=r.strip(e.substring(i,s)),c=r.strip(e.substring(s+1));if(1===o.length){-1!=="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~".indexOf(o)?0!==c.length?(void 0===n.macros&&(n.macros={}),n.macros[o]=c):t("Missing macro definition",e,i):t("Macro definitions must be H-Y, h-w, or tilde",e,i)}else t("Macro definitions can only be one character",e,i)}else t("Need an = in a macro definition",e,i)},this.setDefaultLength=function(e,t,i){var a=r.gsub(e.substring(t,i)," ","").split("/");if(2===a.length){var s=parseInt(a[0]),o=parseInt(a[1]);o>0&&(n.default_length=s/o,n.havent_set_length=!1)}else 1===a.length&&"1"===a[0]&&(n.default_length=1,n.havent_set_length=!1)};var o={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(r,i,a){try{var s=e.tokenize(r,i,a);if(0===s.length)throw"Missing parameter in Q: field";var c={},l=!0,h=s.shift();if("quote"===h.type&&(c.preString=h.token,h=s.shift(),0===s.length))return o[c.preString.toLowerCase()]&&(c.bpm=o[c.preString.toLowerCase()],c.suppressBpm=!0),{type:"immediate",tempo:c};if("alpha"===h.type&&"C"===h.token){if(0===s.length)throw"Missing tempo after C in Q: field";if("punct"===(h=s.shift()).type&&"="===h.token){if(0===s.length)throw"Missing tempo after = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected number after = in Q: field";c.duration=[1],c.bpm=parseInt(h.token)}else{if("number"!==h.type)throw"Expected number or equal after C in Q: field";if(c.duration=[parseInt(h.token)],0===s.length)throw"Missing = after duration in Q: field";if("punct"!==(h=s.shift()).type||"="!==h.token)throw"Expected = after duration in Q: field";if(0===s.length)throw"Missing tempo after = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected number after = in Q: field";c.bpm=parseInt(h.token)}}else{if("number"!==h.type)throw"Unknown value in Q: field";var u=parseInt(h.token);if(0===s.length||"quote"===s[0].type)c.duration=[1],c.bpm=u;else{if(l=!1,"punct"!==(h=s.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";var d=parseInt(h.token);for(c.duration=[u/d];s.length>0&&"="!==s[0].token&&"quote"!==s[0].type;){if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";if(u=parseInt(h.token),"punct"!==(h=s.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";d=parseInt(h.token),c.duration.push(u/d)}if("punct"!==(h=s.shift()).type&&"="!==h.token)throw"Expected = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected tempo in Q: field";c.bpm=parseInt(h.token)}}if(0!==s.length&&("quote"===(h=s.shift()).type&&(c.postString=h.token,h=s.shift()),0!==s.length))throw"Unexpected string at end of Q: field";return!1===n.printTempo&&(c.suppress=!0),{type:l?"delaySet":"immediate",tempo:c}}catch(e){return t(e,r,i),{type:"none"}}},this.letter_to_inline_header=function(r,o){var c=e.eatWhiteSpace(r,o);if(o+=c,r.length>=o+5&&"["===r.charAt(o)&&":"===r.charAt(o+2)){var l=r.indexOf("]",o),h=n.iChar+o,u=n.iChar+l+1;switch(r.substring(o,o+3)){case"[I:":var d=i.addDirective(r.substring(o+3,l));return d&&t(d,r,o),[l-o+1+c];case"[M:":var f=this.setMeter(r.substring(o+3,l));return s.hasBeginMusic()&&f?s.appendStartingElement("meter",h,u,f):n.meter=f,[l-o+1+c];case"[K:":var p=a.parseKey(r.substring(o+3,l));return p.foundClef&&s.hasBeginMusic()&&s.appendStartingElement("clef",h,u,n.clef),p.foundKey&&s.hasBeginMusic()&&s.appendStartingElement("key",h,u,a.fixKey(n.clef,n.key)),[l-o+1+c];case"[P:":return s.lines.length<=s.lineNum?n.partForNextLine={title:r.substring(o+3,l),startChar:h,endChar:u}:s.appendElement("part",h,u,{title:r.substring(o+3,l)}),[l-o+1+c];case"[L:":return this.setDefaultLength(r,o+3,l),[l-o+1+c];case"[Q:":if(l>0){var m=this.setTempo(r,o+3,l);return"delaySet"===m.type?s.appendElement("tempo",h,u,this.calcTempo(m.tempo)):"immediate"===m.type&&s.appendElement("tempo",h,u,m.tempo),[l-o+1+c,r.charAt(o+1),r.substring(o+3,l)]}break;case"[V:":if(l>0)return a.parseVoice(r,o+3,l),[l-o+1+c,r.charAt(o+1),r.substring(o+3,l)]}}return[0]},this.letter_to_body_header=function(e,o){if(e.length>=o+3)switch(e.substring(o,o+2)){case"I:":var c=i.addDirective(e.substring(o+2));return c&&t(c,e,o),[e.length];case"M:":var l=this.setMeter(e.substring(o+2));return s.hasBeginMusic()&&l&&s.appendStartingElement("meter",n.iChar+o,n.iChar+e.length,l),[e.length];case"K:":var h=a.parseKey(e.substring(o+2));return h.foundClef&&s.hasBeginMusic()&&s.appendStartingElement("clef",n.iChar+o,n.iChar+e.length,n.clef),h.foundKey&&s.hasBeginMusic()&&s.appendStartingElement("key",n.iChar+o,n.iChar+e.length,a.fixKey(n.clef,n.key)),[e.length];case"P:":return s.hasBeginMusic()&&s.appendElement("part",n.iChar+o,n.iChar+e.length,{title:e.substring(o+2)}),[e.length];case"L:":return this.setDefaultLength(e,o+2,e.length),[e.length];case"Q:":var u=e.indexOf("",o+2);-1===u&&(u=e.length);var d=this.setTempo(e,o+2,u);return"delaySet"===d.type?s.appendElement("tempo",n.iChar+o,n.iChar+e.length,this.calcTempo(d.tempo)):"immediate"===d.type&&s.appendElement("tempo",n.iChar+o,n.iChar+e.length,d.tempo),[u,e.charAt(o),r.strip(e.substring(o+2))];case"V:":return a.parseVoice(e,o+2,e.length),[e.length,e.charAt(o),r.strip(e.substring(o+2))]}return[0]};var c={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(o){if(r.startsWith(o,"%%")){var l=i.addDirective(o.substring(2));return l&&t(l,o,2),{}}var h=o.indexOf("%");if(h>=0&&(o=o.substring(0,h)),0===(o=o.replace(/\s+$/,"")).length)return{};if(o.length>=2&&":"===o.charAt(1)){var u="";o.indexOf("")>=0&&"w"!==o.charAt(0)&&(u=o.substring(o.indexOf("")+1),o=o.substring(0,o.indexOf("")));var d=c[o.charAt(0)];if(void 0!==d)return"unalignedWords"===d?s.addMetaTextArray(d,i.parseFontChangeLine(e.translateString(e.stripComment(o.substring(2))))):s.addMetaText(d,e.translateString(e.stripComment(o.substring(2)))),{};var f=n.iChar,p=f+o.length;switch(o.charAt(0)){case"H":s.addMetaText("history",e.translateString(e.stripComment(o.substring(2)))),n.is_in_history=!0;break;case"K":this.resolveTempo();var m=a.parseKey(o.substring(2));!n.is_in_header&&s.hasBeginMusic()&&(m.foundClef&&s.appendStartingElement("clef",f,p,n.clef),m.foundKey&&s.appendStartingElement("key",f,p,a.fixKey(n.clef,n.key))),n.is_in_header=!1;break;case"L":this.setDefaultLength(o,2,o.length);break;case"M":n.origMeter=n.meter=this.setMeter(o.substring(2));break;case"P":n.is_in_header?s.addMetaText("partOrder",e.translateString(e.stripComment(o.substring(2)))):n.partForNextLine={title:e.translateString(e.stripComment(o.substring(2))),startChar:f,endChar:p};break;case"Q":var g=this.setTempo(o,2,o.length);"delaySet"===g.type?n.tempo=g.tempo:"immediate"===g.type&&(s.metaText.tempo=g.tempo);break;case"T":this.setTitle(o.substring(2));break;case"U":this.addUserDefinition(o,2,o.length);break;case"V":if(a.parseVoice(o,2,o.length),!n.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",o,0);break;default:return u.length&&(u=""+u),{regular:!0,str:o+u}}return u.length>0?{recurse:!0,str:u}:{}}return{regular:!0,str:o}}}},function(e,t,n){var r=n(1);e.exports=function(){this.skipWhiteSpace=function(e){for(var t=0;t<e.length;t++)if(!this.isWhiteSpace(e.charAt(t)))return t;return e.length};var e=function(e,t){return t>=e.length};this.eatWhiteSpace=function(e,t){for(var n=t;n<e.length;n++)if(!this.isWhiteSpace(e.charAt(n)))return n-t;return n-t},this.getKeyPitch=function(t){var n=this.skipWhiteSpace(t);if(e(t,n))return{len:0};switch(t.charAt(n)){case"A":return{len:n+1,token:"A"};case"B":return{len:n+1,token:"B"};case"C":return{len:n+1,token:"C"};case"D":return{len:n+1,token:"D"};case"E":return{len:n+1,token:"E"};case"F":return{len:n+1,token:"F"};case"G":return{len:n+1,token:"G"}}return{len:0}},this.getSharpFlat=function(e){if("bass"===e)return{len:0};switch(e.charAt(0)){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(t){var n=function(e,t){for(;t<e.length&&(e.charAt(t)>="a"&&e.charAt(t)<="z"||e.charAt(t)>="A"&&e.charAt(t)<="Z");)t++;return t},r=this.skipWhiteSpace(t);if(e(t,r))return{len:0};var i=t.substring(r,r+3).toLowerCase();switch((i.length>1&&" "===i.charAt(1)||"^"===i.charAt(1)||"_"===i.charAt(1)||"="===i.charAt(1))&&(i=i.charAt(0)),i){case"mix":return{len:n(t,r),token:"Mix"};case"dor":return{len:n(t,r),token:"Dor"};case"phr":return{len:n(t,r),token:"Phr"};case"lyd":return{len:n(t,r),token:"Lyd"};case"loc":return{len:n(t,r),token:"Loc"};case"aeo":return{len:n(t,r),token:"m"};case"maj":case"ion":return{len:n(t,r),token:""};case"min":case"m":return{len:n(t,r),token:"m"}}return{len:0}},this.getClef=function(t,n){var i=t,a=this.skipWhiteSpace(t);if(e(t,a))return{len:0};var s=!1,o=t.substring(a);if(r.startsWith(o,"clef=")&&(s=!0,o=o.substring(5),a+=5),0===o.length&&s)return{len:a+5,warn:"No clef specified: "+i};var c=this.skipWhiteSpace(o);if(e(o,c))return{len:0};c>0&&(a+=c,o=o.substring(c));var l=null;if(r.startsWith(o,"treble"))l="treble";else if(r.startsWith(o,"bass3"))l="bass3";else if(r.startsWith(o,"bass"))l="bass";else if(r.startsWith(o,"tenor"))l="tenor";else if(r.startsWith(o,"alto2"))l="alto2";else if(r.startsWith(o,"alto1"))l="alto1";else if(r.startsWith(o,"alto"))l="alto";else if(!n&&s&&r.startsWith(o,"none"))l="none";else if(r.startsWith(o,"perc"))l="perc";else if(!n&&s&&r.startsWith(o,"C"))l="tenor";else if(!n&&s&&r.startsWith(o,"F"))l="bass";else{if(n||!s||!r.startsWith(o,"G"))return{len:a+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:a+l.length,token:l,explicit:s}},this.getBarLine=function(e,t){switch(e.charAt(t)){case"]":switch(++t,e.charAt(t)){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++t,e.charAt(t)>="1"&&e.charAt(t)<="9"||'"'===e.charAt(t)?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(++t,e.charAt(t)){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++t,e.charAt(t)){case"]":switch(++t,e.charAt(t)){case"|":return++t,":"===e.charAt(t)?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}break;case"|":return++t,":"===e.charAt(t)?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if(++t,"|"!==e.charAt(t))return e.charAt(t)>="1"&&e.charAt(t)<="9"||'"'===e.charAt(t)?{len:1,token:"bar_invisible"}:{len:0};switch(++t,e.charAt(t)){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(++t,e.charAt(t)){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++t,":"===e.charAt(t)?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var n=0;":"===e.charAt(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.charAt(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.charAt(r));)r++;return e.substring(t,r)},this.isMatch=function(t,n){var i=this.skipWhiteSpace(t);return e(t,i)?0:r.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.charAt(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.charAt(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(t){var n={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},r=this.skipWhiteSpace(t);if(e(t,r))return{len:0};var i=null;switch(t.charAt(r)){case"^":case"_":case"=":i=t.charAt(r);break;default:return{len:0}}if(r++,e(t,r))return{len:1,warn:"Expected note name after accidental"};switch(t.charAt(r)){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:r+1,token:{acc:n[i],note:t.charAt(r)}};case"^":case"_":case"/":if(i+=t.charAt(r),r++,e(t,r))return{len:2,warn:"Expected note name after accidental"};switch(t.charAt(r)){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:r+1,token:{acc:n[i],note:t.charAt(r)}};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.charAt(t)||"\t"===e.charAt(t)||""===e.charAt(t));)t++;for(;t<n&&(" "===e.charAt(n-1)||"\t"===e.charAt(n-1)||""===e.charAt(n-1));)n--;return{start:t,end:n}};var t=function(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"},n=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,r,i,a){var s=this.getMeat(e,r,i);r=s.start,i=s.end;for(var o,c=[];r<i;){if('"'===e.charAt(r)){for(o=r+1;o<i&&'"'!==e.charAt(o);)o++;c.push({type:"quote",token:e.substring(r+1,o),start:r+1,end:o}),o++}else if(t(e.charAt(r))){if(o=r+1,a)for(;o<i&&!this.isWhiteSpace(e.charAt(o));)o++;else for(;o<i&&t(e.charAt(o));)o++;c.push({type:"alpha",token:e.substring(r,o),continueId:n(e.charAt(o)),start:r,end:o}),r=o+1}else if("."===e.charAt(r)&&n(e.charAt(o+1))){o=r+1;for(var l;o<i&&n(e.charAt(o));)o++;l=parseFloat(e.substring(r,o)),c.push({type:"number",token:e.substring(r,o),intt:null,floatt:l,continueId:t(e.charAt(o)),start:r,end:o}),r=o+1}else if(n(e.charAt(r))||"-"===e.charAt(r)&&n(e.charAt(o+1))){o=r+1;for(var h,u=null;o<i&&n(e.charAt(o));)o++;if("."===e.charAt(o)&&n(e.charAt(o+1)))for(o++;o<i&&n(e.charAt(o));)o++;else u=parseInt(e.substring(r,o));h=parseFloat(e.substring(r,o)),c.push({type:"number",token:e.substring(r,o),intt:u,floatt:h,continueId:t(e.charAt(o)),start:r,end:o}),r=o+1}else" "===e.charAt(r)||"\t"===e.charAt(r)||c.push({type:"punct",token:e.charAt(r),start:r,end:r+1}),o=r+1;r=o}return c},this.getVoiceToken=function(e,t,n){for(var r=t;r<n&&this.isWhiteSpace(e.charAt(r))||"="===e.charAt(r);)r++;if('"'===e.charAt(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 a=r;a<n&&!this.isWhiteSpace(e.charAt(a))&&"="!==e.charAt(a);)a++;return{len:a-t+1,token:e.substring(r,a)}};var i={"`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:"ž"},a={"#":"♯",b:"♭","=":"♮"},s={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:"ù"};this.translateString=function(e){var t=e.split("\\");if(1===t.length)return e;var n=null;return r.each(t,(function(e){if(null===n)n=e;else{var t=i[e.substring(0,2)];void 0!==t?n+=t+e.substring(2):void 0!==(t=s[e.substring(0,3)])?n+=t+e.substring(3):(t=a[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.charAt(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.charAt(t)){var i=this.getNumber(e,t);n=i.num,t=i.index}if("/"===e.charAt(t)){if(t++,"/"===e.charAt(t)){for(var a=.5;"/"===e.charAt(t++);)a/=2;return{value:n*a,index:t-1}}var s=t,o=this.getNumber(e,t);0===o.num&&s===t&&(o.num=2),0!==o.num&&(r=o.num),t=o.index}return{value:n/r,index:t}},this.theReverser=function(e){return r.endsWith(e,", The")?"The "+e.substring(0,e.length-5):r.endsWith(e,", A")?"A "+e.substring(0,e.length-3):e},this.stripComment=function(e){var t=e.indexOf("%");return t>=0?r.strip(e.substring(0,t)):r.strip(e)},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":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)}}return{used:0}};var o=function(e){for(;-1!==e.indexOf("\\n");)e=e.replace("\\n","\n");return e};this.getBrackettedSubstring=function(e,t,n,r){for(var i=r||e.charAt(t),a=t+1;a<e.length&&e.charAt(a)!==i;)++a;return e.charAt(a)===i?[a-t+1,o(e.substring(t+1,a)),!0]:((a=t+n)>e.length-1&&(a=e.length-1),[a-t+1,o(e.substring(t+1,a)),!1])}}},function(e,t){var n;!function(){"use strict";var e;function t(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 r(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function i(e){var t=1/4;e.duration&&(t=e.duration[0]);var n=60;return e.bpm&&(n=e.bpm),t*n/.25}function a(t){var n;switch(t.type){case"common_time":n={el_type:"meter",num:4,den:4};break;case"cut_time":n={el_type:"meter",num:2,den:2};break;case"specified":n={el_type:"meter",num:t.value[0].num,den:t.value[0].den};break;default:n={el_type:"meter"}}return e=n.num/n.den,n}n=function(n,s){var o=void 0,c=(s=s||{}).program||0,l=s.midiTranspose||0,h=s.channel||0,u=!1,d=s.drum||"",f=s.drumBars||1,p=s.drumIntro||0,m=""!==d,g=[];c=parseInt(c,10),l=parseInt(l,10),10===(h=parseInt(h,10))&&(c=128),d=d.split(" "),f=parseInt(f,10),p=parseInt(p,10);var v=n.formatting.bagpipes;v&&(c=71);var b=[];if(n.formatting.midi){var y=n.formatting.midi;y.program&&y.program.length>0&&(c=y.program[0],y.program.length>1&&(c=y.program[1],h=y.program[0]),u=!0),y.transpose&&(l=y.transpose[0]),y.channel&&(h=y.channel[0],u=!0),y.drum&&(d=y.drum),y.drumbars&&(f=y.drumbars[0]),y.drumon&&(m=!0),10===h&&(c=128),y.beat&&b.push({el_type:"beat",beats:y.beat}),y.nobeataccents&&b.push({el_type:"beataccents",value:!1})}o=s.qpm?parseInt(s.qpm,10):n.metaText.tempo?i(n.metaText.tempo):s.defaultQpm?s.defaultQpm:180;var w=[];v&&w.push({el_type:"bagpipes"}),w.push({el_type:"instrument",program:c}),h&&w.push({el_type:"channel",channel:h}),l&&w.push({el_type:"transpose",transpose:l}),w.push({el_type:"tempo",qpm:o});for(var k=0;k<b.length;k++)w.push(b[k]);for(var x=[],A=[],T=[],S=!1,M=0;M<n.lines.length;M++){var N=n.lines[M];if(N.staff)for(var C=N.staff,E=0,I=0;I<C.length;I++)for(var _=C[I],B=0;B<_.voices.length;B++){var P=_.voices[B];if(!x[E]){x[E]=[].concat(JSON.parse(JSON.stringify(w)));var D=r(N.staff,E);D&&x[E].unshift({el_type:"name",trackName:D})}if(_.clef&&"perc"===_.clef.type&&!u)for(var L=0;L<x[E].length;L++)"instrument"===x[E][L].el_type&&(x[E][L].program=128);else _.key&&("HP"===_.key.root?x[E].push({el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}):x[E].push({el_type:"key",accidentals:_.key.accidentals}));_.meter&&x[E].push(a(_.meter)),!S&&m&&(x[E].push({el_type:"drum",params:{pattern:d,bars:f,on:m,intro:p}}),S=!0),_.clef&&_.clef.transpose&&(_.clef.el_type="clef",x[E].push({el_type:"transpose",transpose:_.clef.transpose})),_.clef&&_.clef.type&&(_.clef.type.indexOf("-8")>=0?x[E].push({el_type:"transpose",transpose:-12}):_.clef.type.indexOf("+8")>=0&&x[E].push({el_type:"transpose",transpose:12})),n.formatting.midi&&n.formatting.midi.drumoff&&(x[E].push({el_type:"bar"}),x[E].push({el_type:"drum",params:{pattern:"",on:!1}}));for(var V=0,H=0;H<P.length;H++){var O=P[H];switch(O.el_type){case"note":O.rest&&"spacer"===O.rest.type||(O.decoration&&(O.decoration.indexOf("pppp")>=0&&x[E].push({el_type:"beat",beats:[15,10,5,1]}),O.decoration.indexOf("ppp")>=0?x[E].push({el_type:"beat",beats:[30,20,10,1]}):O.decoration.indexOf("pp")>=0?x[E].push({el_type:"beat",beats:[45,35,20,1]}):O.decoration.indexOf("p")>=0?x[E].push({el_type:"beat",beats:[60,50,35,1]}):O.decoration.indexOf("mp")>=0?x[E].push({el_type:"beat",beats:[75,65,50,1]}):O.decoration.indexOf("mf")>=0?x[E].push({el_type:"beat",beats:[90,80,65,1]}):O.decoration.indexOf("f")>=0?x[E].push({el_type:"beat",beats:[105,95,80,1]}):O.decoration.indexOf("ff")>=0?x[E].push({el_type:"beat",beats:[120,110,95,1]}):(O.decoration.indexOf("fff")>=0||O.decoration.indexOf("ffff")>=0)&&x[E].push({el_type:"beat",beats:[127,125,110,1]})),!O.style&&g[E]&&(O.style=g[E]),0===O.duration&&((O=Object.assign({},O)).duration=.25),x[E].push(O),"rhythm"===O.style&&(!0,t(x)),V++);break;case"key":"HP"===O.root?x[E].push({el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}):x[E].push({el_type:"key",accidentals:O.accidentals});break;case"meter":x[E].push(a(O));break;case"clef":O.transpose&&x[E].push({el_type:"transpose",transpose:O.transpose}),O.type&&(O.type.indexOf("-8")>=0?x[E].push({el_type:"transpose",transpose:-12}):O.type.indexOf("+8")>=0&&x[E].push({el_type:"transpose",transpose:12}));break;case"tempo":o=i(O),x[E].push({el_type:"tempo",qpm:o});break;case"bar":V>0&&x[E].push({el_type:"bar"}),V=0;var z="bar_right_repeat"===O.type||"bar_dbl_repeat"===O.type,F="1"===O.startEnding,j="bar_left_repeat"===O.type||"bar_dbl_repeat"===O.type||"bar_right_repeat"===O.type;if(z){var q=A[E];q||(q=0);var W=T[E];W||(W=x[E].length),x[E]=x[E].concat(x[E].slice(q,W)),T[E]=void 0,A[E]=void 0}F&&(T[E]=x[E].length),j&&(A[E]=x[E].length),!1;break;case"style":g[E]=O.head;break;case"part":break;case"stem":case"scale":break;case"midi":var Y=!1;switch(O.cmd){case"drumon":m=!0,Y=!0;break;case"drumoff":m=!1,Y=!0;break;case"drum":d=O.params,Y=!0;break;case"drumbars":f=O.params[0],Y=!0;break;case"drummap":break;case"program":x[E].push({el_type:"instrument",program:O.params[0]}),u=!0;break;case"transpose":x[E].push({el_type:"transpose",transpose:O.params[0]});break;case"gchordoff":x[E].push({el_type:"gchord",tacet:!0});break;case"gchordon":x[E].push({el_type:"gchord",tacet:!1});break;case"beat":x[E].push({el_type:"beat",beats:O.params});break;case"nobeataccents":x[E].push({el_type:"beataccents",value:!1});break;case"beataccents":x[E].push({el_type:"beataccents",value:!0});break;case"vol":x[E].push({el_type:"vol",volume:O.params[0]});break;case"volinc":x[E].push({el_type:"volinc",volume:O.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",O.cmd,O)}Y&&(x[0].push({el_type:"drum",params:{pattern:d,bars:f,intro:p,on:m}}),S=!0);break;default:console.log("MIDI: element type "+O.el_type+" not handled.")}}E++}}if(p)for(var R=n.getPickupLength(),G=0;G<x.length;G++){for(var U=0;"note"!==x[G][U].el_type&&x[G].length>U;)U++;if(x[G].length>U)for(var K=0;K<p;K++)0===R||K<p-1?x[G].splice(U,0,{el_type:"note",rest:{type:"rest"},duration:e},{el_type:"bar"}):x[G].splice(U,0,{el_type:"note",rest:{type:"rest"},duration:e-R})}return x}}(),e.exports=n},function(e,t){var n;!function(){"use strict";var e,t,r,i,a,s,o,c,l,h,u,d,f,p,m,g,v,b,y,w,k,x,A,T,S=1,M={num:4,den:4},N=64,C=48,E=!1,I=!1,_=!0,B=105,P=95,D=85,L=.25,V=0,H={};function O(e){for(var t=0,n=0;n<e.length;n++){for(var r=e[n],i=0,a=0;a<r.length;a++){var s=r[a];s.duration&&(i+=s.duration)}t=Math.max(t,i)}return t}function z(e){switch(e.den){case 2:return.5;case 4:return.25;case 8:return.375;case 16:return.125}return.25}n=function(n,F){F||(F={}),e=[],t=[0,0,0,0,0,0,0],!1,i=1,a=[],s=void 0,o=void 0,S=1,c=void 0,l=void 0,h=void 0,f=void 0,p=void 0,u={},M={num:4,den:4},m=[],g=!1,b=n.length,v=!1,y=[],N=64,C=48,w=void 0,k=0,E=!!F.chordsOff,I=!1,_=!0,B=105,P=95,D=85,L=.25,x=void 0,A=void 0,V=0,T=[],!1,H={},function(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=0;r<n.length;r++){delete n[r].currentTrackMilliseconds}}(n);for(var j=0;j<n.length;j++){r=0,d=-1;var q=n[j];h=[{cmd:"program",channel:j,instrument:c}],f=0,p=void 0,u={};var W=!1;(!0===F.voicesOff||F.voicesOff&&F.voicesOff.length&&F.voicesOff.indexOf(j)>=0)&&(W=!0);for(var R=0;R<q.length;R++){var G=q[R];switch(G.el_type){case"name":p={cmd:"text",type:"name",text:G.trackName};break;case"note":Y(G,W)&&(g=j);break;case"key":t=U(G);break;case"meter":o||(o=G),L=z(M=G);break;case"tempo":s?S=G.qpm?s/G.qpm:1:s=G.qpm;break;case"transpose":r=G.transpose;break;case"bar":m.length>0&&(!1===g||j===g)&&(te(),y=[]),k=0,e=[],0===j&&re(n.length+1),I=!1;break;case"bagpipes":!0;break;case"instrument":if(void 0===c&&(c=G.program),l=G.program,h.length>0&&"program"===h[h.length-1].cmd)h[h.length-1].instrument=G.program;else{var K;for(K=h.length-1;K>=0&&"program"!==h[K].cmd;K--);(K<0||h[K].instrument!==G.program)&&h.push({cmd:"program",channel:j,instrument:G.program})}break;case"channel":break;case"drum":H=ne(G.params);break;case"gchord":F.chordsOff||(E=G.tacet);break;case"beat":B=G.beats[0],P=G.beats[1],D=G.beats[2];break;case"vol":x=G.volume;break;case"volinc":A=G.volume;break;case"beataccents":_=G.value;break;default:console.log("MIDI creation. Unknown el_type: "+G.el_type+"\n")}}void 0===h[0].instrument&&(h[0].instrument=c||0),p&&h.unshift(p),a.push(h),m.length>0&&(v=!0),T.length>0&&!0}return m.length>0&&a.push(m),T.length>0&&a.push(T),{tempo:s,instrument:c,tracks:a,totalDuration:O(a)}};var F=["break","(break)","no chord","n.c.","tacet"];function j(){for(var e=0,t=0;t<h.length;t++)"move"===h[t].cmd&&(e+=h[t].duration);return e}function q(e){var t=!1,n=function(e){if(E)return"break";if(v||!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(F.indexOf(n.name.toLowerCase())>=0)return"break"}return null}(e);if(n){var i=function(e){if(0===e.length)return;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=X[t];if(!n)return;var i=r;for(;i<-8;)i+=12;for(;i>8;)i-=12;var a,s=(n+=i)-5;1===e.length&&(a=Q(n,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(n--,s--,o=o.substring(1)):"#"!==c&&"♯"!==c||(n++,s++,o=o.substring(1));var l=o.split("/");if((a=Q(n,l[0])).length>=3){var h=a[2]-a[0];s=s+h-7}if(2===l.length){if(X[l[1].substring(0,1)]){var u={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;n=X[l[1].substring(0,1)]+u+i,s=n}}return{boom:n,boom2:s,chick:a}}(n);if(i){if(0===m.length){t=!0,m.push({cmd:"program",channel:b,instrument:0});var a=j();a>0&&ie(m,a*S)}w=i,y.push({chord:w,beat:k})}}return t}function W(e,t){for(var n,r=!1,i=h.length-1;i>=0&&!r;i--)if("move"===h[i].cmd&&(n=i),"start"===h[i].cmd&&h[i].elem)for(var a=h[i].elem.pitches,s=0;s<a.length&&!r;s++)a[s].pitch===e.pitch&&(void 0!==n&&(h[n].duration+=Math.round(t*S*1e6)/1e6,t=0),r=!0);return t}function Y(e,t){h.length;var n=function(e){var t;return x?(t=x,x=void 0):t=_?0===k?B:k%L<.001?P:D:P,A&&(t+=A,A=void 0),t<0&&(t=0),t>127&&(t=127),e?0:t}(t),r=q(e);e.startTriplet&&(i=e.tripletMultiplier);var a=(e.durationClass?e.durationClass:e.duration)*i;if(k+=a,e.gracenotes){var o=a;a=function(e,t,n,r,i){for(var a=0;a<e.length;a++){var s=e[a];s!==r&&h.push({cmd:"start",pitch:s.pitch,volume:i});var o=e[a].duration*S;ie(h,o),s!==r&&h.push({cmd:"stop",pitch:s.pitch}),t?(n-=o,f+=o*S):h[d].duration-=o}return n}(function(e,t){for(var n,r=0,i=[],a=0;a<e.length;a++)n=e[a],r+=n.duration;var s=t/2/r;for(a=0;a<e.length;a++){var o=G(n=e[a]);i.push({pitch:o,duration:n.duration*s})}return i}(e.gracenotes,o),!0,a,null,n);for(var c=0;c<e.gracenotes.length;c++){e.midiGraceNotePitches=[];var p=e.gracenotes[c];e.midiGraceNotePitches.push({pitch:G(p)+60,durationInMeasures:0,volume:n,instrument:l})}}e.currentTrackMilliseconds||(e.currentTrackMilliseconds=[]),e.currentTrackMilliseconds.push(f/L/s*60*1e3);if(e.pitches){var m=[],g=0/L,v=function(e,t){var n={};if(e.decoration)for(var r=0;r<e.decoration.length;r++)"staccato"===e.decoration[r]?n.thisBreakBetweenNotes=.03138020833333125/L:"tenuto"===e.decoration[r]?n.thisBreakBetweenNotes=0/L:"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,n);v.thisBreakBetweenNotes&&(g=v.thisBreakBetweenNotes),v.velocity&&(n=v.velocity);var b=e.pitches;if("rhythm"===e.style&&(I=!0,w&&w.chick)){b=[];for(var y=0;y<w.chick.length;y++){var T=Object.assign({},e.pitches[0]);T.actualPitch=w.chick[y],b.push(T)}}e.midiPitches=[];for(var M=!1,N=0;N<b.length;N++){var C=b[N];C.startSlur&&(V+=C.startSlur.length),C.endSlur&&(V-=C.endSlur.length);var E=C.actualPitch?C.actualPitch:G(C);m.push({pitch:E,startTie:C.startTie}),e.midiPitches.push({pitch:E+60,durationInMeasures:a*S,volume:n,instrument:l}),u[""+C.pitch]?M||(M=!0,a*S,f+=a*S,a=W(C,a)):h.push({cmd:"start",pitch:E,volume:n}),C.startTie?(u[""+C.pitch]=!0,h[h.length-1].elem=e):C.endTie&&(u[""+C.pitch]=!1)}V>0&&(g=0/L);var H=a-g;H<0&&(H=0,g=a),v.noteModification?m=function(e,t,n,r){var i,a,s=[];switch(e){case"trill":for(var o=t-(i=1/32),c=1;o>0;)s.push(c),c=1===c?0:1,o-=i;break;case"mordent":i=1/32,s.push(1),s.push(0);break;case"lowermordent":i=1/32,s.push(-1),s.push(0);break;case"turn":i=t/5,s.push(1),s.push(0),s.push(-1),s.push(0);break;case"roll":for(i=1/16,(a=Math.floor(t/i))<1&&(a=1);a;)s.push(0),a--}var l,u=[];for(l=0;l<n.pitches.length;l++)u.push({pitch:G({pitch:n.pitches[l].pitch})});for(var d=t,f=0;f<s.length;f++){for(ie(h,(i-.0028125)*S),l=0;l<n.pitches.length;l++)h.push({cmd:"stop",pitch:u[l].pitch});for(ie(h,.0028125*S),l=0;l<n.pitches.length;l++)h.push({cmd:"start",pitch:G({pitch:n.pitches[l].pitch+s[f]}),volume:r}),u[l].pitch=G({pitch:n.pitches[l].pitch+s[f]});d-=i}return ie(h,d*S),u}(v.noteModification,H,e,n):ie(h,H*S),d=h.length-1,f+=H*S;for(var O=0;O<m.length;O++)u[""+m[O].pitch]||h.push({cmd:"stop",pitch:m[O].pitch});ie(h,g*S),f+=g*S}else e.rest&&(ie(h,a*S),f+=a*S);return e.endTriplet&&(i=1,k=Math.round(128*k)/128),r}var R=[0,2,4,5,7,9,11];function G(n){if(n.midipitch)return n.midipitch-60;var i=n.soundPitch||0===n.soundPitch?n.soundPitch:n.pitch;if(n.accidental)switch(n.accidental){case"sharp":e[i]=1;break;case"flat":e[i]=-1;break;case"natural":e[i]=0;break;case"dblsharp":e[i]=2;break;case"dblflat":e[i]=-2}var a=12*function(e){return Math.floor(e/7)}(i)+R[K(i)];if(void 0!==e[i]){var s=t[K(i)],o=e[i],c=0;-1===s?c=o+1:0===s?c=o:1===s&&(c=o-1),a+=s+c}else a+=t[K(i)];return a+=r}function U(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=e.accidentals[n],i="sharp"===r.acc?1:"natural"===r.acc?0:-1;t[K(r.note.toLowerCase().charCodeAt(0)-"c".charCodeAt(0))]+=i}return t}function K(e){return(e%=7)<0&&(e+=7),e}var X={A:-27,B:-25,C:-24,D:-22,E:-20,F:-19,G:-17};var Z={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,3,6,11],maj7b5:[0,3,6,11],"13(b5)":[0,4,6,10,14,18],"13b5":[0,4,6,10,14,18],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,16],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,4,7,10,14,16],13:[0,4,7,10,14,18],"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,18],"7(9,13)":[0,4,7,10,14,18],"7(#9,b13)":[0,4,7,10,15,17],"7(#11)":[0,4,7,10,14,17],"7#11":[0,4,7,10,14,17],"7(b13)":[0,4,7,10,17],"7b13":[0,4,7,10,17],"9(#11)":[0,4,7,10,14,17],"9#11":[0,4,7,10,14,17],"13(#11)":[0,4,7,10,15,18],"13#11":[0,4,7,10,15,18],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,16],"maj7(#11)":[0,4,7,11,17],"maj7(13)":[0,4,7,11,18],"maj7(9,13)":[0,4,7,11,14,18],"7sus4":[0,5,7,10],m7sus4:[0,5,7,10],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,14],"13sus4":[0,5,7,18],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,14],"maj7#5#11":[0,4,8,11,14],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,18],"13#5":[0,4,8,10,14,18]};function Q(e,t){var n=Z[t];n||(n="ma"===t.slice(0,2).toLowerCase()||"M"===t.charAt(0)?Z.M:"m"===t.charAt(0)||"-"===t.charAt(0)?Z.m:Z.M),e+=12;for(var r=[],i=0;i<n.length;i++)r.push(e+n[i]);return r}function J(e,t,n){void 0!==e&&m.push({cmd:"start",pitch:e,volume:n}),ie(m,t/2*S),void 0!==e&&m.push({cmd:"stop",pitch:e}),ie(m,t/2*S)}function $(e,t,n){for(var r=0;r<e.length;r++)m.push({cmd:"start",pitch:e[r],volume:n});for(ie(m,t/2*S),r=0;r<e.length;r++)m.push({cmd:"stop",pitch:e[r]});ie(m,t/2*S)}var ee={"2/2":["boom","chick"],"2/4":["boom","chick"],"3/4":["boom","chick","chick"],"4/4":["boom","chick","boom2","chick"],"5/4":["boom","chick","chick","boom2","chick"],"6/8":["boom","","chick","boom2","","chick"],"9/8":["boom","","chick","boom2","","chick","boom2","","chick"],"12/8":["boom","","chick","boom2","","chick","boom2","","chick","boom2","","chick"]};function te(){var e=M.num,t=M.den,n=1/t,r=ee[e+"/"+t],i=parseInt(e,10)/parseInt(t,10),a=Math.abs(i-k);if(!r||a>.0078125){r=[];for(var s=k/n,o=0;o<s;o++)r.push("chick")}if(0===y.length&&y.push({beat:0,chord:w}),0!==y[0].beat&&w&&y.unshift({beat:0,chord:w}),1!==y.length){for(var c={},l=0;l<y.length;l++){var h=y[l];c[""+Math.floor(h.beat/n)]=h}for(var u=0;u<r.length;u++){var d;if(c[""+u]&&(d=c[""+u]),I)ie(m,n*S);else switch(r[u]){case"boom":c[""+(u+1)]?$(d.chord.chick,n,C):J(d.chord.boom,n,N);break;case"boom2":c[""+(u+1)]?$(d.chord.chick,n,C):J(d.chord.boom2,n,N);break;case"chick":$(d.chord.chick,n,C);break;case"":c[""+u]?$(d.chord.chick,n,C):ie(m,n*S)}}}else for(var f=0;f<r.length;f++)if(I)ie(m,n*S);else switch(r[f]){case"boom":J(y[0].chord.boom,n,N);break;case"boom2":J(y[0].chord.boom2,n,N);break;case"chick":$(y[0].chord.chick,n,C);break;case"":ie(m,n*S)}}function ne(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],n=[],r="",i=0,a=0;a<t.length;a++)if("d"===t[a]&&i++,"d"===t[a]||"z"===t[a])0!==r.length?(n.push(r),r=t[a]):r+=t[a];else{if(0===r.length)return{on:!1};r+=t[a]}if(0!==r.length&&n.push(r),e.pattern.length!==2*i+1)return{on:!1};for(var s={on:!0,bars:e.bars,pattern:[]},o=1/M.den,c=0,l=0;l<n.length;l++){r=n[l];for(var h=1,u=!1,d=0,f=1;f<r.length;f++)switch(r[f]){case"/":0!==d&&(h*=d),d=0,u=!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}}u?(0===d&&(d=2),h/=d):d&&(h*=d),"d"===r[0]?(s.pattern.push({len:h*o,pitch:e.pattern[1+c],velocity:e.pattern[1+c+i]}),c++):s.pattern.push({len:h*o,pitch:null})}for(var p=0,m=M.num/M.den,g=0;g<s.pattern.length;g++)p+=s.pattern[g].len;var v=p/(e.bars?e.bars:1)/m;for(g=0;g<s.pattern.length;g++)s.pattern[g].len=s.pattern[g].len/v;return s}function re(e){if(0!==T.length||H.on){var t,n,r,i=M.num/M.den;if(0===T.length){T.push({cmd:"program",channel:e,instrument:128});var a=j();if(a>0&&a<i-.01)return void ie(T,a*S)}if(H.on)for(var s=0;s<H.pattern.length;s++){var o=H.pattern[s].len*S;H.pattern[s].pitch?(t=H.pattern[s].pitch,n=o,r=H.pattern[s].velocity,T.push({cmd:"start",pitch:t-60,volume:r}),ie(T,n),T.push({cmd:"stop",pitch:t-60})):ie(T,o)}else ie(T,i*S)}}function ie(e,t){t>0&&(t=Math.round(1e6*t)/1e6,e.push({cmd:"move",duration:t}))}}(),e.exports=n},function(e,t,n){var r=n(1);e.exports=function(e){"use strict";for(var t="",n=(e=r.strip(e)).split("\nX:"),i=1;i<n.length;i++)n[i]="X:"+n[i];var a=0,s=[];if(r.each(n,(function(e){s.push({abc:e,startPos:a}),a+=e.length+1})),s.length>1&&!r.startsWith(s[0].abc,"X:")){var o=s.shift().abc.split("\n");r.each(o,(function(e){r.startsWith(e,"%%")&&(t+=e+"\n")}))}var c=t;return r.each(s,(function(e){var n=e.abc.indexOf("\n\n");n>0&&(e.abc=e.abc.substring(0,n)),e.pure=e.abc,e.abc=t+e.abc,e.title="";var i=e.pure.split("T:");i.length>1&&(i=i[1].split("\n"),e.title=r.strip(i[0]));var a=e.pure.substring(2,e.pure.indexOf("\n"));e.id=r.strip(a)})),{header:c,tunes:s}}},function(e,t,n){var r=n(0),i=n(35),a=n(50),s=n(52),o=n(53),c=n(54),l=n(55),h=n(56),u=n(57),d=n(58),f=n(59),p=n(60),m=n(61),g=n(62),v=function(e,t){t=t||{},this.selectionColor=t.selectionColor,this.dragColor=t.dragColor?t.dragColor:t.selectionColor,this.dragging=!!t.dragging,this.selectTypes=t.selectTypes,this.responsive=t.responsive,this.space=3*r.SPACE,this.scale=t.scale?parseFloat(t.scale):0,this.classes=new f({shouldAddClasses:t.add_classes}),this.scale>.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new a(e,t.regression),this.renderer.setPaddingOverride(t),this.renderer.controller=this,this.reset()};v.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},v.prototype.engraveABC=function(e,t){void 0===e[0]&&(e=[e]),this.reset();for(var n=0;n<e.length;n++)void 0===t&&(t=n),this.getFontAndAttr=new p(e[n].formatting,this.classes),this.getTextSize=new m(this.getFontAndAttr,this.renderer.paper),this.engraveTune(e[n],t)},v.prototype.adjustNonScaledItems=function(e){this.width/=e,this.renderer.adjustNonScaledItems(e)},v.prototype.getMeasureWidths=function(e){this.reset(),this.classes.reset(),this.getFontAndAttr=new p(e.formatting,this.classes),this.getTextSize=new m(this.getFontAndAttr,this.renderer.paper),this.renderer.newTune(e),this.engraver=new i(this.getTextSize,0,{bagpipes:e.formatting.bagpipes,flatbeams:e.formatting.flatbeams,graceSlurs:!1!==e.formatting.graceSlurs}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),e.formatting.staffwidth?this.width=1.33*e.formatting.staffwidth:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var t=e.formatting.scale?e.formatting.scale:this.scale;"resize"===this.responsive&&(t=void 0),void 0===t&&(t=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(t);var n={left:0,measureWidths:[],height:0,total:0};n.height=this.renderer.padding.top+this.renderer.spacing.music+this.renderer.padding.bottom+24;for(var a=!1,l=!1,h=0;h<e.lines.length;h++){var u=e.lines[h];if(u.staff){if(l=!0,u.staffGroup=this.engraver.createABCLine(u.staff,a?null:e.metaText.tempo,this.getTextSize),u.staffGroup.layout(0,this.renderer,!1),u.staffGroup.voices.length>0)for(var d=u.staffGroup.voices[0],f=!1,g=0,v=0;v<d.children.length;v++){var b=d.children[v];f||b.isClef||b.isKeySig||(f=!0,n.left=b.x,g=b.x),"bar"===b.type&&(n.measureWidths.push(b.x-g),n.total+=b.x-g,g=b.x)}a=!0,n.height+=u.staffGroup.calcHeight()*r.STEP}else if(u.subtitle){if(l){var y=this.width/2+this.renderer.padding.left;u.nonMusic=new c(this.renderer.spacing.subtitle,u.subtitle,y,this.getTextSize)}}else void 0!==u.text?(l=!0,u.nonMusic=new s(u.text,u.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):void 0!==u.separator&&u.separator.lineLength&&(l=!0,u.nonMusic=new o(u.separator.spaceAbove,u.separator.lineLength,u.separator.spaceBelow))}return n},v.prototype.engraveTune=function(e,t){this.classes.reset(),this.renderer.newTune(e),this.engraver=new i(this.getTextSize,t,{bagpipes:e.formatting.bagpipes,flatbeams:e.formatting.flatbeams,graceSlurs:!1!==e.formatting.graceSlurs}),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 n,r,a=e.formatting.scale?e.formatting.scale:this.scale;"resize"===this.responsive&&(a=void 0),void 0===a&&(a=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(a),e.topText=new l(e.metaText,e.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.getTextSize);var f=!1,p=!1;for(n=0;n<e.lines.length;n++)if((r=e.lines[n]).staff)p=!0,r.staffGroup=this.engraver.createABCLine(r.staff,f?null:e.metaText.tempo,this.getTextSize),f=!0;else if(r.subtitle){if(p){var m=this.width/2+this.renderer.padding.left;r.nonMusic=new c(this.renderer.spacing.subtitle,r.subtitle,m,this.getTextSize)}}else void 0!==r.text?(p=!0,r.nonMusic=new s(r.text,r.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):void 0!==r.separator&&r.separator.lineLength&&(p=!0,r.nonMusic=new o(r.separator.spaceAbove,r.separator.lineLength,r.separator.spaceBelow));e.bottomText=new h(e.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.getTextSize);var v=d(this.renderer,e,this.width,this.space),b=g(this.renderer,this.classes,e,this.width,v,this.responsive,a,this.selectTypes,t);this.staffgroups=b.staffgroups,this.selectables=b.selectables,u(this)},v.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},v.prototype.addSelectListener=function(e){this.listeners[this.listeners.length]=e},e.exports=v},function(e,t,n){var r,i=n(4),a=n(36),s=n(37),o=n(38),c=n(39),l=n(40),h=n(41),u=n(44),d=n(5),f=n(2),p=n(0),m=n(45),g=n(46),v=n(19),b=n(47),y=n(48),w=n(49),k=n(1);!function(){"use strict";var e=function(e){var t=0;return e.duration&&(t=e.duration),t},t=!1,n={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"},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"}};function x(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 A(e){if(e.pitches){T(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}}(r=function(e,t,n){this.decoration=new h,this.getTextSize=e,this.tuneNumber=t,this.isBagpipes=n.bagpipes,this.flatBeams=n.flatbeams,this.graceSlurs=n.graceSlurs,this.reset()}).prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},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},r.prototype.setStemHeight=function(e){this.stemHeight=Math.round(10*e/p.STEP)/10},r.prototype.getCurrentVoiceId=function(e,t){return"s"+e+"v"+t},r.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},r.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)},r.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))}},r.prototype.createABCLine=function(e,n,r){this.minY=2,this.containsLyrics(e);var i=new m(this.getTextSize);this.tempoSet=!1;for(var a=0;a<e.length;a++)t&&this.restoreState(),t=!1,this.createABCStaff(i,e[a],n,a);return i},r.prototype.createABCStaff=function(e,t,n,r){e.getTextSize.updateFonts(t);for(var i=0;i<t.voices.length;i++){var a=new y(i,t.voices.length);0===i?(a.barfrom="start"===t.connectBarLines||"continue"===t.connectBarLines,a.barto="continue"===t.connectBarLines||"end"===t.connectBarLines):a.duplicate=!0,t.title&&t.title[i]&&(a.header=t.title[i].replace(/\\n/g,"\n"),a.headerPosition=6+e.getTextSize.baselineToCenter(a.header,"voicefont","staff-extra voice-name",i,t.voices.length)/p.STEP);var h=o(t.clef,this.tuneNumber);h&&(0===i&&t.barNumber&&this.addMeasureNumber(t.barNumber,h),a.addChild(h));var u=c(t.key,this.tuneNumber);if(u&&(a.addChild(u),this.startlimitelem=u),t.meter){"specified"===t.meter.type?this.measureLength=t.meter.value[0].num/t.meter.value[0].den:this.measureLength=1;var d=l(t.meter,this.tuneNumber);a.addChild(d),this.startlimitelem=d}a.duplicate&&(a.children=[]);var f=t.clef.stafflines||0===t.clef.stafflines?t.clef.stafflines:5;e.addVoice(a,r,f);var m=1===f;this.createABCVoice(t.voices[i],n,r,i,m,a),e.setStaffLimits(a),"start"===t.brace||!e.brace&&t.brace?(e.brace||(e.brace=[]),e.brace.push(new s(a,"brace"))):"end"===t.brace&&e.brace?e.brace[e.brace.length-1].setBottomStaff(a):"continue"===t.brace&&e.brace&&e.brace[e.brace.length-1].continuing(a),"start"===t.bracket||!e.bracket&&t.bracket?(e.bracket||(e.bracket=[]),e.bracket.push(new s(a,"bracket"))):"end"===t.bracket&&e.bracket?e.bracket[e.bracket.length-1].setBottomStaff(a):"continue"===t.bracket&&e.bracket&&e.bracket[e.bracket.length-1].continuing(a)}},r.prototype.createABCVoice=function(e,n,r,a,s,o){this.popCrossLineElems(r,a),this.stemdir=this.isBagpipes?"down":null,this.abcline=e,this.partstartelem&&(this.partstartelem=new u("",null,null),o.addOther(this.partstartelem));var c=o.voicetotal<2?-1:o.voicenumber;for(var l in this.slurs)this.slurs.hasOwnProperty(l)&&(this.slurs[l]=new v({force:this.slurs[l].force,voiceNumber:c,stemDir:this.slurs[l].stemDir}),t&&this.slurs[l].setHint(),o.addOther(this.slurs[l]));for(var h=0;h<this.ties.length;h++)this.ties[h]=new v({force:this.ties[h].force,stemDir:this.ties[h].stemDir,voiceNumber:c}),t&&this.ties[h].setHint(),o.addOther(this.ties[h]);for(var d=0;d<this.abcline.length;d++)A(this.abcline[d]),this.minY=Math.min(this.abcline[d].minpitch,this.minY);for(var f=0===r,p=0;p<this.abcline.length;){var m=x(this.abcline,p),b=this.createABCElement(f,s,o,m.elem);if(b)for(h=0;h<b.length;h++){if(!this.tempoSet&&n&&!n.suppress){this.tempoSet=!0;var y=new i(n,0,0,"tempo",this.tuneNumber,{});y.addChild(new g(n,this.tuneNumber,N)),o.addChild(y)}o.addChild(b[h])}p+=m.count}this.pushCrossLineElems(r,a)},r.prototype.saveState=function(){this.tiesSave=k.cloneArray(this.ties),this.slursSave=k.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=k.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=k.cloneHashOfArrayOfHash(this.tiesbyvoice)},r.prototype.restoreState=function(){this.ties=k.cloneArray(this.tiesSave),this.slurs=k.cloneHashOfHash(this.slursSave),this.slursbyvoice=k.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=k.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},r.prototype.createABCElement=function(e,n,r,a){var s=[];switch(a.el_type){case void 0:s=this.createBeam(n,r,a);break;case"note":s[0]=this.createNote(a,!1,n,r),this.triplet&&this.triplet.isClosed()&&(r.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":s[0]=this.createBarLine(r,a,e),r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"meter":s[0]=l(a,this.tuneNumber),this.startlimitelem=s[0],r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"clef":if(s[0]=o(a,this.tuneNumber),!s[0])return null;r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"key":var h=c(a,this.tuneNumber);h&&(s[0]=h,this.startlimitelem=s[0]),r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"stem":this.stemdir=a.direction;break;case"part":var u=new i(a,0,0,"part",this.tuneNumber),d=this.getTextSize.calc(a.title,"partsfont","part");u.addChild(new f(a.title,0,0,void 0,{type:"part",height:d.height/p.STEP})),s[0]=u;break;case"tempo":var m=new i(a,0,0,"tempo",this.tuneNumber);m.addChild(new g(a,this.tuneNumber,N)),s[0]=m;break;case"style":"normal"===a.head?delete this.style:this.style=a.head;break;case"hint":t=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=a.size;break;default:var v=new i(a,0,0,"unsupported",this.tuneNumber);v.addChild(new f("element type "+a.el_type,0,0,void 0,{type:"debug"})),s[0]=v}return s},r.prototype.calcBeamDir=function(e,t,n){if(this.stemdir)return this.stemdir;for(var r=new a(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams),i=0;i<n.length;i++)r.add({abcelem:n[i]});return r.calcDir()?"up":"down"},r.prototype.createBeam=function(e,n,r){var i=[],s=this.calcBeamDir(e,n,r),o=new a(this.stemHeight*this.voiceScale,s,this.flatBeams,r[0]);t&&o.setHint();var c=this.stemdir;this.stemdir=s;for(var l=0;l<r.length;l++){var h=r[l],u=this.createNote(h,!0,e,n);i.push(u),o.add(u),this.triplet&&this.triplet.isClosed()&&(n.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return this.stemdir=c,n.addBeam(o),i};var T=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)},S=function(e,t,n,r,i,a,s,o,c){for(var l=n;l>11;l--)l%2!=0||r||e.addChild(new f(null,o,(i+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||r||e.addChild(new f(null,o,(i+4)*c,l,{type:"ledger"}));for(l=0;l<a.length;l++){var h=i;"down"===s&&(h=-h),e.addChild(new f(null,h+o,(i+4)*c,a[l],{type:"ledger"}))}};function M(e,t){for(var n=0;n<e.length;n++)if(JSON.stringify(e[n])===JSON.stringify(t))return;e.push(t)}r.prototype.addGraceNotes=function(e,r,i,s,o,c,l){o=Math.round(.7*o);var h,u=null;e.gracenotes.length>1&&(u=new a(o,"grace",c),t&&u.setHint(),u.mainNote=i);var p,m=[];for(p=e.gracenotes.length-1;p>=0;p--)l+=10,m[p]=l,e.gracenotes[p].accidental&&(l+=7);for(p=0;p<e.gracenotes.length;p++){var g=e.gracenotes[p].verticalPos;h=u?null:n.uflags[c?5:3];var b=N(i,"noteheads.quarter",e.gracenotes[p],"up",-m[p],-m[p],h,0,0,.6*this.voiceScale,[],!1);b.notehead.highestVert=b.notehead.pitch+o;var y=b.notehead;if(this.addSlursAndTies(i,e.gracenotes[p],y,r,"up",!0),i.addExtra(y),e.gracenotes[p].acciaccatura){var w=e.gracenotes[p].verticalPos+4.2,k=u?5:6;i.addRight(new f("flags.ugrace",-m[p]+k,0,w,{scalex:.6,scaley:.6}))}if(u){var x=e.gracenotes[p].duration/2;c&&(x/=2);var A={heads:[y],abcelem:{averagepitch:g,minpitch:g,maxpitch:g,duration:x}};u.add(A)}else{var T=g+1/3*.6,M=g+4.2,C=y.dx+y.w;i.addExtra(new f(null,C,0,T,{type:"stem",pitch2:M,linewidth:-.6}))}S(i,g,g,!1,d.getSymbolWidth("noteheads.quarter"),[],!0,y.dx-1,.6);var E=e.rest&&("spacer"===e.rest.type||"invisible"===e.rest.type);0!==p||c||!this.graceSlurs||E||r.addOther(new v({anchor1:y,anchor2:s,isGrace:!0}))}return u&&r.addBeam(u),l},r.prototype.addNoteToAbcElement=function(t,r,i,a,s,o,c,l,h){var u,p,m,g,v,b=0,y=0,w=0,k=[],x=[],A=0,T=r.averagepitch>=6?"down":"up";for(a&&(T=a),(s=r.style?r.style:s)&&"normal"!==s||(s="note"),(g=o?n[s].nostem:n[s][-c])||console.log("noteSymbol:",s,c,o),v="down"===T?r.pitches.length-2:1;"down"===T?v>=0:v<r.pitches.length;v="down"===T?v-1:v+1){var S=r.pitches["down"===T?v+1:v-1],C=r.pitches[v],E="down"===T?S.pitch-C.pitch:C.pitch-S.pitch;E<=1&&!S.printer_shift&&(C.printer_shift=E?"different":"same",(C.verticalPos>11||C.verticalPos<1)&&k.push(C.verticalPos-C.verticalPos%2),"down"===T?y=d.getSymbolWidth(g)+2:b=d.getSymbolWidth(g)+2)}var I=r.pitches.length;for(v=0;v<r.pitches.length;v++){var _,B;if(!l)_="down"===T&&0!==v||"up"===T&&v!==I-1?null:n["down"===T?"dflags":"uflags"][-c];if(B=r.pitches[v].style?n[r.pitches[v].style][-c]:g,r.pitches[v].highestVert=r.pitches[v].verticalPos,("up"===a||"up"===T)&&0===v||("down"===a||"down"===T)&&v===I-1){if((r.startSlur||1===I)&&(r.pitches[v].highestVert=r.pitches[I-1].verticalPos,e(r)<1&&("up"===a||"up"===T)&&(r.pitches[v].highestVert+=6)),r.startSlur)for(r.pitches[v].startSlur||(r.pitches[v].startSlur=[]),m=0;m<r.startSlur.length;m++)M(r.pitches[v].startSlur,r.startSlur[m]);if(r.endSlur)for(r.pitches[v].highestVert=r.pitches[I-1].verticalPos,e(r)<1&&("up"===a||"up"===T)&&(r.pitches[v].highestVert+=6),r.pitches[v].endSlur||(r.pitches[v].endSlur=[]),m=0;m<r.endSlur.length;m++)M(r.pitches[v].endSlur,r.endSlur[m])}var P=!l&&c<=-1,D=N(t,B,r.pitches[v],T,0,-y,_,i,b,this.voiceScale,x,!a);A=Math.max(d.getSymbolWidth(B),A),t.extraw-=D.extraLeft,(u=D.notehead)&&(this.addSlursAndTies(t,r.pitches[v],u,h,P?T:null,!1),r.gracenotes&&r.gracenotes.length>0&&(u.bottom=u.bottom-1),t.addHead(u)),y+=D.accidentalshiftx,w=Math.max(w,D.dotshiftx)}if(P){var L=Math.round(70*this.voiceScale)/10,V="down"===T?r.minpitch-L:r.minpitch+1/3;V>6&&!a&&(V=6);var H="down"===T?r.maxpitch-1/3:r.maxpitch+L;H<6&&!a&&(H=6);var O="down"===T||0===t.heads.length?0:t.heads[0].w,z="down"===T?1:-1;"noteheads.slash.quarter"===u.c&&("down"===T?H-=1:V+=1),t.addExtra(new f(null,O,0,V,{type:"stem",pitch2:H,linewidth:z})),p=Math.min(V,H)}return{noteHead:u,roomTaken:y,roomTakenRight:w,min:p,additionalLedgers:k,dir:T,symbolWidth:A}},r.prototype.addLyric=function(e,t){var n="";k.each(t.lyric,(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 f(n,0,r.width,void 0,{type:"lyric",position:i,height:r.height/p.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},r.prototype.createNote=function(r,a,s,o){var c,l=null,h=0,u=0,p=0,m=[],g=e(r),v=!1;0===g&&(v=!0,g=.25,a=!0);for(var y=Math.floor(Math.log(g)/Math.log(2)),k=0,x=Math.pow(2,y),A=x/2;x<g;k++,x+=A,A/=2);r.startTriplet&&(this.tripletmultiplier=r.tripletMultiplier);var T=g*this.tripletmultiplier;r.rest&&"multimeasure"===r.rest.type&&(T=1);var M=r.rest?"rest":"note",C=new i(r,T,1,M,this.tuneNumber,{durationClassOveride:r.duration*this.tripletmultiplier});if(t&&C.setHint(),r.rest){this.measureLength===g&&"invisible"!==r.rest.type&&"spacer"!==r.rest.type&&(r.rest.type="whole");var E=function(e,t,r,i,a,s,o,c,l){var h,u,p,m,g=7;switch(a&&("down"===s&&(g=3),"up"===s&&(g=11)),o&&(g=r<.5||r<1?7:5),t.rest.type){case"whole":h=n.rest[0],t.averagepitch=g,t.minpitch=g,t.maxpitch=g,i=0;break;case"rest":h="rhythm"===t.style?n.rhythm[-c]:n.rest[-c],t.averagepitch=g,t.minpitch=g,t.maxpitch=g;break;case"invisible":case"spacer":h="",t.averagepitch=g,t.minpitch=g,t.maxpitch=g;break;case"multimeasure":h=n.rest.multi,t.averagepitch=g,t.minpitch=g,t.maxpitch=g,i=0;var v=d.getSymbolWidth(h);e.addHead(new f(h,-v,2*v,7));var b=new f(""+t.duration,0,v,16,{type:"multimeasure-text"});e.addExtra(b)}if("multimeasure"!==t.rest.type){var y=N(e,h,{verticalPos:g},null,0,0,null,i,0,l,[],!1);(u=y.notehead)&&(e.addHead(u),p=y.accidentalshiftx,m=y.dotshiftx)}return{noteHead:u,roomTaken:p,roomTakenRight:m}}(C,r,g,k,o.voicetotal>1,this.stemdir,s,y,this.voiceScale);l=E.noteHead,h=E.roomTaken,u=E.roomTakenRight}else{var I=this.addNoteToAbcElement(C,r,k,this.stemdir,this.style,v,y,a,o);void 0!==I.min&&(this.minY=Math.min(I.min,this.minY)),l=I.noteHead,h=I.roomTaken,u=I.roomTakenRight,m=I.additionalLedgers,c=I.dir,p=I.symbolWidth}if(void 0!==r.lyric&&this.addLyric(C,r),void 0!==r.gracenotes&&(h+=this.addGraceNotes(r,o,C,l,this.stemHeight*this.voiceScale,this.isBagpipes,h)),r.decoration&&this.decoration.createDecoration(o,r.decoration,C.top,l?l.w:0,C,h,c,C.bottom,r.positioning,this.hasVocals),r.barNumber&&C.addChild(new f(r.barNumber,-10,0,0,{type:"barNumber"})),S(C,r.minpitch,r.maxpitch,r.rest,p,m,c,-2,1),void 0!==r.chord){var _=w(this.getTextSize,C,r,h,u);h=_.roomTaken,u=_.roomTakenRight}return r.startTriplet&&(this.triplet=new b(r.startTriplet,l,{flatBeams:this.flatBeams})),r.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(l),!this.triplet||r.startTriplet||r.endTriplet||this.triplet.middleNote(l),C};var N=function(e,t,n,r,i,a,s,o,c,l,h,u){var p,m=n.verticalPos,g=0,v=0,b=0;if(void 0===t)e.addChild(new f("pitch is undefined",0,0,0,{type:"debug"}));else if(""===t)p=new f(null,0,0,m);else{var y=i;if(n.printer_shift){var w="same"===n.printer_shift?1:0;y="down"===r?-d.getSymbolWidth(t)*l+w:d.getSymbolWidth(t)*l-w}var k={scalex:l,scaley:l,thickness:d.symbolHeightInPitches(t)*l};if((p=new f(t,y,d.getSymbolWidth(t)*l,m,k)).stemDir=r,s){var x=m+("down"===r?-7:7)*l;u&&("down"===r&&x>6&&(x=6),"up"===r&&x<6&&(x=6));var A="down"===r?i:i+p.w-.6;e.addRight(new f(s,A,d.getSymbolWidth(s)*l,x,{scalex:l,scaley:l}))}for(v=p.w+c-2+5*o;o>0;o--){var T=1-Math.abs(m)%2;e.addRight(new f("dots.dot",p.w+c-2+5*o,d.getSymbolWidth("dots.dot"),m+T))}}if(p&&(p.highestVert=n.highestVert),n.accidental){var S;switch(n.accidental){case"quartersharp":S="accidentals.halfsharp";break;case"dblsharp":S="accidentals.dblsharp";break;case"sharp":S="accidentals.sharp";break;case"quarterflat":S="accidentals.halfflat";break;case"flat":S="accidentals.flat";break;case"dblflat":S="accidentals.dblflat";break;case"natural":S="accidentals.nat"}for(var M=!1,N=a,C=0;C<h.length;C++)if(m-h[C][0]>=6){h[C][0]=m,N=h[C][1],M=!0;break}!1===M&&(N-=d.getSymbolWidth(S)*l+2,h.push([m,N]),g=d.getSymbolWidth(S)*l+2),e.addExtra(new f(S,N,d.getSymbolWidth(S),m,{scalex:l,scaley:l})),b=d.getSymbolWidth(S)/2}return{notehead:p,accidentalshiftx:g,dotshiftx:v,extraLeft:b}};r.prototype.addSlursAndTies=function(e,n,r,i,a,s){if(n.endTie&&this.ties.length>0){for(var o=!1,c=0;c<this.ties.length;c++)if(this.ties[c].anchor1&&this.ties[c].anchor1.pitch===r.pitch){this.ties[c].setEndAnchor(r),this.ties.splice(c,1),o=!0;break}o||(this.ties[0].setEndAnchor(r),this.ties.splice(0,1))}var l=i.voicetotal<2?-1:i.voicenumber;if(n.startTie){var h=new v({anchor1:r,force:"down"===this.stemdir||"up"===this.stemdir,stemDir:this.stemdir,isGrace:s,voiceNumber:l});t&&h.setHint(),this.ties[this.ties.length]=h,i.addOther(h),e.startTie=!0}if(n.endSlur)for(var u=0;u<n.endSlur.length;u++){var d=n.endSlur[u];this.slurs[d]?((p=this.slurs[d]).setEndAnchor(r),delete this.slurs[d]):(p=new v({anchor2:r,stemDir:this.stemdir,voiceNumber:l}),t&&p.setHint(),i.addOther(p)),this.startlimitelem&&p.setStartX(this.startlimitelem)}else if(!s)for(var f in this.slurs)this.slurs.hasOwnProperty(f)&&this.slurs[f].addInternalNote(r);if(n.startSlur)for(u=0;u<n.startSlur.length;u++){d=n.startSlur[u].label;var p=new v({anchor1:r,stemDir:this.stemdir,voiceNumber:l});t&&p.setHint(),this.slurs[d]=p,i.addOther(p)}},r.prototype.addMeasureNumber=function(e,t){var n=this.getTextSize.calc(e,"measurefont","bar-number"),r=n.width>18&&"treble"===t.abcelem.type?-7:0;t.addChild(new f(e,r,n.width,11+n.height/p.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},r.prototype.createBarLine=function(e,t,n){var r=new i(t,0,10,"bar",this.tuneNumber),a=null,s=0;t.barNumber&&this.addMeasureNumber(t.barNumber,r);var o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,c="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,l="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type||"bar_left_repeat"===t.type||"bar_thin_thick"===t.type||"bar_thick_thin"===t.type,h="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,d="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(o||d){for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].setEndX(r);this.startlimitelem=r}if(o&&(r.addRight(new f("dots.dot",s,1,7)),r.addRight(new f("dots.dot",s,1,5)),s+=6),c&&(a=new f(null,s,1,2,{type:"bar",pitch2:10,linewidth:.6}),r.addRight(a)),"bar_invisible"===t.type&&(a=new f(null,s,1,2,{type:"none",pitch2:10,linewidth:.6}),r.addRight(a)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,l?3:1,r,0,"down",2,t.positioning,this.hasVocals),l&&(a=new f(null,s+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),r.addRight(a),s+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=a,this.partstartelem=null),h&&(a=new f(null,s+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),r.addRight(a)),d&&(s+=3,r.addRight(new f("dots.dot",s,1,7)),r.addRight(new f("dots.dot",s,1,5))),t.startEnding&&n){var m=this.getTextSize.calc(t.startEnding,"repeatfont","").width;r.minspacing+=m+10,this.partstartelem=new u(t.startEnding,a,null),e.addOther(this.partstartelem)}return r.extraw-=5,r}}(),e.exports=r},function(e,t,n){n(4);var r,i=n(2),a=n(0),s=function(e){return void 0===e?0:Math.floor(Math.log(e)/Math.log(2))};!function(){"use strict";(r=function(e,t,n,r){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.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}).prototype.setHint=function(){this.hint=!0},r.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))};function e(e,t,n,r){if(!e.children)return r;for(var i=0;i<e.children.length;i++){var a=e.children[i];t&&void 0!==a.top&&"flags.ugrace"===a.c?r=Math.max(r,a.top-n):t||void 0===a.bottom||"flags.ugrace"!==a.c||(r=Math.max(r,n-a.bottom+7))}return r}function t(e,t){return t?e/t:0}function n(e,t,n,r,i){return t+(r-t)/(n-e)*(i-e)}r.prototype.calcDir=function(){return!!this.forceup||!this.forcedown&&t(this.total,this.elems.length)<6},r.prototype.layout=function(){if(0!==this.elems.length&&!this.allrests){this.stemsUp=this.calcDir();var r=function(e,t){var n=e?a.STEP:-a.STEP;t&&(n*=.4);return n}(this.stemsUp,this.isgrace),o=this.elems[0],c=this.elems[this.elems.length-1],l=0,h=this.stemsUp?o.abcelem.maxpitch:o.abcelem.minpitch;l=e(o,this.stemsUp,h,l),l=e(c,this.stemsUp,h,l),l=Math.max(this.stemHeight,l+3);var u=function(e,n,r,i,a,s,o,c,l,h){var u=t(e,n),d=r-2,f=r-2,p=Math.round(i?Math.max(u+d,l+f):Math.min(u-d,c-f)),m=function(e,t,n,r){if(r)return 0;var i=e-t,a=n/2;i>a&&(i=a);i<-a&&(i=-a);return i}(a,s,n,o),g=p+Math.floor(m/2),v=p+Math.floor(-m/2);h||(i&&p<6||!i&&p>6)&&(g=6,v=6);return[g,v]}(this.total,this.elems.length,l,this.stemsUp,o.abcelem.averagepitch,c.abcelem.averagepitch,this.isflat,this.min,this.max,this.isgrace),d=function(e,t,n){var r=t.heads[e?0:t.heads.length-1],i=n.heads[e?0:n.heads.length-1],a=r.x;e&&(a+=r.w-.6);var s=i.x;return s+=e?i.w:.6,[a,s]}(this.stemsUp,o,c);this.beams.push({startX:d[0],endX:d[1],startY:u[0],endY:u[1],dy:r});for(var f=function(e,t,r,i,a){for(var o=[],c=[],l=0;l<e.length;l++){var h=e[l];if(!h.abcelem.rest){var u=h.heads[t?0:h.heads.length-1],d=u.x+(t?u.w:0),f=n(r.startX,r.startY,r.endX,r.endY,d),p=t?-1.5:1.5;i&&(p=2*p/3);var m=h.abcelem.duration;0===m&&(m=.25);for(var g=s(m);g<-3;g++)c[-4-g]?c[-4-g].single=!1:c[-4-g]={x:d+(t?-.6:0),y:f+p*(-4-g+1),durlog:g,single:!0};for(var v=c.length-1;v>=0;v--)if(l===e.length-1||s(e[l+1].abcelem.duration)>-v-4){var b=d,y=f+p*(v+1);c[v].single&&(b=0===l?d+5:d-5,y=n(r.startX,r.startY,r.endX,r.endY,b)+p*(v+1)),o.push({startX:c[v].x,endX:b,startY:c[v].y,endY:y,dy:a}),c=c.slice(0,v)}}}return o}(this.elems,this.stemsUp,this.beams[0],this.isgrace,r),p=0;p<f.length;p++)this.beams.push(f[p]);!function(e,t,r,s,o){for(var c=0;c<e.length;c++){var l=e[c];if(!l.abcelem.rest){var h=!l.addExtra,u=h?o:l,d=l.heads[t?0:l.heads.length-1],f=d.pitch+(t?.2:-.2),p=t?d.w:0,m=d.x+p,g=n(r.startX,r.startY,r.endX,r.endY,m),v=t?-.6:.6;t||(g-=s/2/a.STEP),h&&(p+=l.heads[0].dx),"noteheads.slash.quarter"===d.c&&(t?f+=1:f-=1);var b=new i(null,p,0,f,{type:"stem",pitch2:g,linewidth:v});b.setX(u.x),u.addExtra(b)}}}(this.elems,this.stemsUp,this.beams[0],r,this.mainNote)}},r.prototype.isAbove=function(){return this.stemsUp},r.prototype.heightAtMidpoint=function(e,t){if(0===this.beams.length)return 0;var r=this.beams[0],i=e+(t-e)/2;return n(r.startX,r.startY,r.endX,r.endY,i)},r.prototype.yAtNote=function(e){var t=this.beams[0];return n(t.startX,t.startY,t.endX,t.endY,e.x)},r.prototype.xAtMidpoint=function(e,t){return e+(t-e)/2}}(),e.exports=r},function(e,t){var n=function(e,t){this.startVoice=e,this.type=t};n.prototype.setBottomStaff=function(e){this.endVoice=e,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},n.prototype.continuing=function(e){this.lastContinuedVoice=e},n.prototype.setLocation=function(e){this.x=e},n.prototype.getWidth=function(){return 10},n.prototype.isStartVoice=function(e){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===e)},e.exports=n},function(e,t,n){var r,i=n(4),a=n(5),s=n(2);!function(){"use strict";r=function(e,t){var n,r=0;e.el_type="clef";var o=new i(e,0,10,"staff-extra clef",t);switch(o.isClef=!0,e.type){case"treble":n="clefs.G";break;case"tenor":case"alto":n="clefs.C";break;case"bass":n="clefs.F";break;case"treble+8":n="clefs.G",r=1;break;case"tenor+8":n="clefs.C",r=1;break;case"bass+8":n="clefs.F",r=1;break;case"alto+8":n="clefs.C",r=1;break;case"treble-8":n="clefs.G",r=-1;break;case"tenor-8":n="clefs.C",r=-1;break;case"bass-8":n="clefs.F",r=-1;break;case"alto-8":n="clefs.C",r=-1;break;case"none":return null;case"perc":n="clefs.perc";break;default:o.addChild(new s("clef="+e.type,0,0,void 0,{type:"debug"}))}if(n&&(o.addRight(new s(n,5,a.getSymbolWidth(n),e.clefPos)),"clefs.G"===n?(o.top=13,o.bottom=-1):(o.top=10,o.bottom=2),0!==r)){var c=(a.getSymbolWidth(n)-a.getSymbolWidth("8")*(2/3))/2,l=r>0?o.top+3:o.bottom-1;"bass-8"===e.type&&(l=3,c=0),o.addRight(new s("8",5+c,a.getSymbolWidth("8")*(2/3),l,{scalex:2/3,scaley:2/3})),o.top+=2}return o}}(),e.exports=r},function(e,t,n){var r,i=n(4),a=n(5),s=n(2),o=n(1);!function(){"use strict";r=function(e,t){if(!e.accidentals||0===e.accidentals.length)return null;e.el_type="keySignature";var n=new i(e,0,10,"staff-extra key-signature",t);n.isKeySig=!0;var r=0;return o.each(e.accidentals,(function(e){var t;switch(e.acc){case"sharp":t="accidentals.sharp";break;case"natural":t="accidentals.nat";break;case"flat":t="accidentals.flat";break;case"quartersharp":t="accidentals.halfsharp";break;case"quarterflat":t="accidentals.halfflat";break;default:t="accidentals.flat"}n.addRight(new s(t,r,a.getSymbolWidth(t),e.verticalPos,{thickness:a.symbolHeightInPitches(t)})),r+=a.getSymbolWidth(t)+2}),this),n}}(),e.exports=r},function(e,t,n){var r,i=n(4),a=n(5),s=n(2);!function(){"use strict";r=function(e,t){e.el_type="timeSignature";var n=new i(e,0,10,"staff-extra time-signature",t);if("specified"===e.type)for(var r=0,o=0;o<e.value.length;o++)if(0!==o&&(n.addRight(new s("+",r+1,a.getSymbolWidth("+"),6,{thickness:a.symbolHeightInPitches("+")})),r+=a.getSymbolWidth("+")+2),e.value[o].den){for(var c=0,l=0;l<e.value[o].num.length;l++)c+=a.getSymbolWidth(e.value[o].num.charAt(l));var h=0;for(l=0;l<e.value[o].num.length;l++)h+=a.getSymbolWidth(e.value[o].den.charAt(l));var u=Math.max(c,h);n.addRight(new s(e.value[o].num,r+(u-c)/2,c,8,{thickness:a.symbolHeightInPitches(e.value[o].num.charAt(0))})),n.addRight(new s(e.value[o].den,r+(u-h)/2,h,4,{thickness:a.symbolHeightInPitches(e.value[o].den.charAt(0))})),r+=u}else{for(var d=0,f=0;f<e.value[o].num.length;f++)d+=a.getSymbolWidth(e.value[o].num.charAt(f));n.addRight(new s(e.value[o].num,r,d,6,{thickness:a.symbolHeightInPitches(e.value[o].num.charAt(0))})),r+=d}else"common_time"===e.type?n.addRight(new s("timesig.common",0,a.getSymbolWidth("timesig.common"),6,{thickness:a.symbolHeightInPitches("timesig.common")})):"cut_time"===e.type?n.addRight(new s("timesig.cut",0,a.getSymbolWidth("timesig.cut"),6,{thickness:a.symbolHeightInPitches("timesig.cut")})):"tempus_imperfectum"===e.type?n.addRight(new s("timesig.imperfectum",0,a.getSymbolWidth("timesig.imperfectum"),6,{thickness:a.symbolHeightInPitches("timesig.imperfectum")})):"tempus_imperfectum_prolatio"===e.type?n.addRight(new s("timesig.imperfectum2",0,a.getSymbolWidth("timesig.imperfectum2"),6,{thickness:a.symbolHeightInPitches("timesig.imperfectum2")})):"tempus_perfectum"===e.type?n.addRight(new s("timesig.perfectum",0,a.getSymbolWidth("timesig.perfectum"),6,{thickness:a.symbolHeightInPitches("timesig.perfectum")})):"tempus_perfectum_prolatio"===e.type?n.addRight(new s("timesig.perfectum2",0,a.getSymbolWidth("timesig.perfectum2"),6,{thickness:a.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",e);return n}}(),e.exports=r},function(e,t,n){var r,i=n(42),a=n(43),s=n(5),o=n(2),c=n(19);!function(){"use strict";var e=function(e,t,n,r,i){function a(e,t){var a="down"===i?function(){if(0===r.heads.length)return 2;for(var e=r.heads[0].pitch,t=1;t<r.heads.length;t++)e=Math.min(e,r.heads[t].pitch);return e}()+1:function(){if(0===r.heads.length)return 10;for(var e=r.heads[0].pitch,t=1;t<r.heads.length;t++)e=Math.max(e,r.heads[t].pitch);return e}()+9;"down"!==i&&1===t&&a--;var c=n/2;c+="down"===i?-5:3;for(var l=0;l<t;l++)a-=1,r.addChild(new o(e,c,s.getSymbolWidth(e),a))}for(var c=0;c<e.length;c++)switch(e[c]){case"/":a("flags.ugrace",1);break;case"//":a("flags.ugrace",2);break;case"///":a("flags.ugrace",3);break;case"////":a("flags.ugrace",4)}};(r=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0}).prototype.dynamicDecoration=function(e,t,n,r){for(var i,s,o=0;o<t.length;o++)switch(t[o]){case"diminuendo(":this.startDiminuendoX=n,i=void 0;break;case"diminuendo)":i={start:this.startDiminuendoX,stop:n},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=n,s=void 0;break;case"crescendo)":s={start:this.startCrescendoX,stop:n},this.startCrescendoX=void 0}i&&e.addOther(new a(i.start,i.stop,">",r)),s&&e.addOther(new a(s.start,s.stop,"<",r))},r.prototype.createDecoration=function(t,n,r,a,l,h,u,d,f,p){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(e,t,n,r){for(var a=0;a<t.length;a++)switch(t[a]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var s=new i(n,t[a],r);e.addOther(s)}}(t,n,l,f.volumePosition),this.dynamicDecoration(t,n,l,f.dynamicPosition),e(n,0,a,l,u);var m=function(e,t,n,r,i,a,l,h){for(var u,d=0;d<t.length;d++){if("staccato"===t[d]||"tenuto"===t[d]||"accent"===t[d]){var f="scripts."+t[d];if("accent"===t[d]&&(f="scripts.sforzato"),u=void 0===u?"down"===l?n+2:h-2:"down"===l?u+2:u-2,"accent"===t[d])"up"===l?u--:u++;else switch(u){case 2:case 4:case 6:case 8:case 10:"up"===l?u--:u++}n>9&&u++;var p=r/2;"center"!==s.getSymbolAlign(f)&&(p-=s.getSymbolWidth(f)/2),i.addChild(new o(f,p,s.getSymbolWidth(f),u))}if("slide"===t[d]&&i.heads[0]){var m=i.heads[0].pitch,g=new o("",-a-15,0,(m-=2)-1),v=new o("",-a-5,0,m+1);i.addChild(g),i.addChild(v),e.addOther(new c({anchor1:g,anchor2:v,fixedY:!0}))}}return void 0===u&&(u=n),{above:u,below:i.bottom}}(t,n,r,a,l,h,u,d);m.above=Math.max(m.above,this.minTop);!function(e,t,n,r,i,a,c){function l(e,t){"above"===e?r.above+=t:r.below-=t}function h(e){var t;return"above"===e?(t=r.above)<a&&(t=a):(t=r.below)>c&&(t=c),t}function u(e,r){var i=h(r);n.addChild(new o(e,t/2,0,i+2,{type:"decoration",klass:"ornament",thickness:3})),l(r,5)}function d(e,r){var i=t/2;"center"!==s.getSymbolAlign(e)&&(i-=s.getSymbolWidth(e)/2);var a=s.symbolHeightInPitches(e)+1,c=h(r);c="above"===r?c+a/2:c-a/2,n.addChild(new o(e,i,s.getSymbolWidth(e),c,{klass:"ornament",thickness:s.symbolHeightInPitches(e)})),l(r,a)}for(var f={"+":"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"},p=!1,m=0;m<e.length;m++)switch(e[m]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":u(e[m],i),p=!0;break;case"fine":u("FINE",i),p=!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":d(f[e[m]],i),p=!0;break;case"invertedfermata":d(f[e[m]],"below"),p=!0;break;case"mark":n.klass="mark"}}(n,a,l,m,f.ornamentPosition,this.minTop,this.minBottom);!function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r]){case"arpeggio":for(var i=t.abcelem.minpitch-1;i<=t.abcelem.maxpitch;i+=2)t.addExtra(new o("scripts.arpeggio",2*-s.getSymbolWidth("scripts.arpeggio")-n,0,i+2,{klass:"ornament",thickness:s.symbolHeightInPitches("scripts.arpeggio")}))}}(n,l,h)}}(),e.exports=r},function(e,t,n){n(0);var r=function(e,t,n){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===n?this.volumeHeightBelow=5:this.volumeHeightAbove=5,this.pitch=void 0};r.prototype.setUpperAndLowerElements=function(e){this.volumeHeightAbove?this.pitch=e.volumeHeightAbove:this.pitch=e.volumeHeightBelow},e.exports=r},function(e,t){var n=function(e,t,n,r){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=n,"above"===r?this.dynamicHeightAbove=4:this.dynamicHeightBelow=4,this.pitch=void 0};n.prototype.setUpperAndLowerElements=function(e){this.dynamicHeightAbove?this.pitch=e.dynamicHeightAbove:this.pitch=e.dynamicHeightBelow},e.exports=n},function(e,t){var n=function(e,t,n){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=n,this.endingHeightAbove=5,this.pitch=void 0};n.prototype.setUpperAndLowerElements=function(e){this.pitch=e.endingHeightAbove-2},e.exports=n},function(e,t,n){var r=n(0),i=function(e){this.getTextSize=e,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};function a(e,t,n){if(e)for(var r=0;r<e.length;r++)e[r].setLocation(t),n=Math.max(n,e[r].getWidth());return n}i.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])},i.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]},i.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)},i.prototype.setUpperAndLowerElements=function(e){for(var t,n=0;n<this.staffs.length;n++){var i=this.staffs[n],a={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};0,i.specialY.lyricHeightAbove&&(i.top+=i.specialY.lyricHeightAbove,a.lyricHeightAbove=i.top),i.specialY.chordHeightAbove&&(i.top+=i.specialY.chordHeightAbove,a.chordHeightAbove=i.top),i.specialY.endingHeightAbove&&(i.specialY.chordHeightAbove?i.top+=2:i.top+=i.specialY.endingHeightAbove,a.endingHeightAbove=i.top),i.specialY.dynamicHeightAbove&&i.specialY.volumeHeightAbove?(i.top+=Math.max(i.specialY.dynamicHeightAbove,i.specialY.volumeHeightAbove),a.dynamicHeightAbove=i.top,a.volumeHeightAbove=i.top):i.specialY.dynamicHeightAbove?(i.top+=i.specialY.dynamicHeightAbove,a.dynamicHeightAbove=i.top):i.specialY.volumeHeightAbove&&(i.top+=i.specialY.volumeHeightAbove,a.volumeHeightAbove=i.top),i.specialY.partHeightAbove&&(i.top+=i.specialY.partHeightAbove,a.partHeightAbove=i.top),i.specialY.tempoHeightAbove&&(i.top+=i.specialY.tempoHeightAbove,a.tempoHeightAbove=i.top),i.specialY.lyricHeightBelow&&(a.lyricHeightBelow=i.bottom,i.bottom-=i.specialY.lyricHeightBelow),i.specialY.chordHeightBelow&&(a.chordHeightBelow=i.bottom,i.bottom-=i.specialY.chordHeightBelow),i.specialY.volumeHeightBelow&&i.specialY.dynamicHeightBelow?(a.volumeHeightBelow=i.bottom,a.dynamicHeightBelow=i.bottom,i.bottom-=Math.max(i.specialY.volumeHeightBelow,i.specialY.dynamicHeightBelow)):i.specialY.volumeHeightBelow?(a.volumeHeightBelow=i.bottom,i.bottom-=i.specialY.volumeHeightBelow):i.specialY.dynamicHeightBelow&&(a.dynamicHeightBelow=i.bottom,i.bottom-=i.specialY.dynamicHeightBelow);for(var s=0;s<i.voices.length;s++){this.voices[i.voices[s]].setUpperAndLowerElements(a)}if(void 0!==t){var o=t+(i.top-10),c=e.spacing.systemStaffSeparation/r.STEP-o;c>0&&(i.top+=c)}t=2-i.bottom}},i.prototype.finished=function(){for(var e=0;e<this.voices.length;e++)if(!this.voices[e].layoutEnded())return!1;return!0},i.prototype.layout=function(e,t,n){var r,i=0,s=1e3,o=function(e,t,n,r,i){var s,o,c=e.padding.left,l=0;for(s=0;s<n.length;s++)n[s].header&&(o=t.calc(n[s].header,"voicefont",""),l=Math.max(l,o.width));if(r)for(s=0;s<r.length;s++)r[s].header&&(o=t.calc(r[s].header,"voicefont",""),l=Math.max(l,o.width));if(i)for(s=0;s<i.length;s++)i[s].header&&(o=t.calc(i[s].header,"voicefont",""),l=Math.max(l,o.width));l&&(l+=t.calc("A","voicefont","").width);var h=0;return h=a(r,c+=l,h),c+(h=a(i,c,h))}(t,this.getTextSize,this.voices,this.brace,this.bracket);this.startx=o;var c=0;for(n&&console.log("init layout",e),r=0;r<this.voices.length;r++)this.voices[r].beginLayout(o);for(var l=0;!this.finished();){for(c=null,r=0;r<this.voices.length;r++)this.voices[r].layoutEnded()||c&&!(this.voices[r].getDurationIndex()<c)||(c=this.voices[r].getDurationIndex());var h=[],u=[];for(r=0;r<this.voices.length;r++){this.voices[r].getDurationIndex()-c>1e-7?u.push(this.voices[r]):h.push(this.voices[r])}l=0;var d=0;for(r=0;r<h.length;r++)h[r].getNextX()>o&&(o=h[r].getNextX(),l=h[r].getSpacingUnits(),d=h[r].spacingduration);for(i+=l,s=Math.min(s,l),n&&console.log("currentduration: ",c,i,s),r=0;r<h.length;r++){var f=h[r].layoutOneItem(o,e),p=f-o;if(p>0){o=f;for(var m=0;m<r;m++)h[m].shiftRight(p)}}for(r=0;r<u.length;r++)u[r].spacingduration-=d,u[r].updateNextX(o,e);for(r=0;r<h.length;r++){h[r].updateIndices()}}for(r=0;r<this.voices.length;r++)this.voices[r].getNextX()>o&&(o=this.voices[r].getNextX(),l=this.voices[r].getSpacingUnits());for(i+=l,this.w=o,r=0;r<this.voices.length;r++)this.voices[r].w=this.w;return{spacingUnits:i,minSpace:s}},i.prototype.calcHeight=function(){for(var e=0,t=0;t<this.voices.length;t++){var n=this.voices[t].staff;this.voices[t].duplicate||(e+=n.top,n.bottom<0&&(e+=-n.bottom))}return e},e.exports=i},function(e,t,n){var r,i=n(4),a=n(2);!function(){"use strict";(r=function(e,t,n){this.type="TempoElement",this.tempo=e,this.tempo.type="tempo",this.tuneNumber=t,this.tempoHeightAbove=5,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(n,e,t))}).prototype.setUpperAndLowerElements=function(e){if(this.pitch=e.tempoHeightAbove,this.top=e.tempoHeightAbove,this.bottom=e.tempoHeightAbove,this.note){var t=this.pitch-5+1;this.note.top=t,this.note.bottom=t;for(var n=0;n<this.note.children.length;n++){var r=this.note.children[n];r.top+=t,r.bottom+=t,r.pitch+=t,void 0!==r.pitch2&&(r.pitch2+=t)}}},r.prototype.setX=function(e){this.x=e},r.prototype.createNote=function(e,t,n){var r,s,o,c=t.duration[0],l=new i(t,c,1,"tempo",n);c<=1/32?(o="noteheads.quarter",s="flags.u32nd",r=0):c<=1/16?(o="noteheads.quarter",s="flags.u16th",r=0):c<=3/32?(o="noteheads.quarter",s="flags.u16nd",r=1):c<=1/8?(o="noteheads.quarter",s="flags.u8th",r=0):c<=3/16?(o="noteheads.quarter",s="flags.u8th",r=1):c<=1/4?(o="noteheads.quarter",r=0):c<=3/8?(o="noteheads.quarter",r=1):c<=.5?(o="noteheads.half",r=0):c<=3/4?(o="noteheads.half",r=1):c<=1?(o="noteheads.whole",r=0):c<=1.5?(o="noteheads.whole",r=1):c<=2?(o="noteheads.dbl",r=0):(o="noteheads.dbl",r=1);var h,u=e(l,o,{verticalPos:0},"up",0,0,s,r,0,.75,[],!1).notehead;if(l.addHead(u),"noteheads.whole"!==o&&"noteheads.dbl"!==o){var d=u.dx+u.w;h=new a(null,d,0,.25,{type:"stem",pitch2:5.25,linewidth:-.6}),l.addExtra(h)}return l}}(),e.exports=r},function(e,t){var n;!function(){"use strict";(n=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}).prototype.isClosed=function(){return this.anchor2},n.prototype.middleNote=function(e){this.middleElems.push(e)},n.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&(this.endingHeightAbove=4)},n.prototype.setUpperAndLowerElements=function(){},n.prototype.layout=function(){if(this.anchor1&&this.anchor2){this.hasBeam=!!this.anchor1.parent.beam&&this.anchor1.parent.beam===this.anchor2.parent.beam;var e=this.anchor1.parent.beam;if(!this.hasBeam||e.elems[0]===this.anchor1.parent&&e.elems[e.elems.length-1]===this.anchor2.parent||(this.hasBeam=!1),this.hasBeam){var t=e.isAbove()?this.anchor1.x+this.anchor1.w:this.anchor1.x;this.yTextPos=e.heightAtMidpoint(t,this.anchor2.x),this.yTextPos+=e.isAbove()?3:-2,this.top=this.yTextPos+1,this.bottom=this.yTextPos-2,e.isAbove()&&(this.endingHeightAbove=4)}else{this.startNote=Math.max(this.anchor1.parent.top,9)+4,this.endNote=Math.max(this.anchor2.parent.top,9)+4,"rest"===this.anchor1.parent.type&&"rest"!==this.anchor2.parent.type?this.startNote=this.endNote:"rest"===this.anchor2.parent.type&&"rest"!==this.anchor1.parent.type&&(this.endNote=this.startNote);for(var n=0,r=0;r<this.middleElems.length;r++)n=Math.max(n,this.middleElems[r].top);((n+=4)>this.startNote||n>this.endNote)&&(this.startNote=n,this.endNote=n),this.flatBeams&&(this.startNote=Math.max(this.startNote,this.endNote),this.endNote=Math.max(this.startNote,this.endNote)),this.yTextPos=this.startNote+(this.endNote-this.startNote)/2,this.top=this.yTextPos+1}}delete this.middleElems,delete this.flatBeams}}(),e.exports=n},function(e,t){var n=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}};n.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)},n.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])},n.prototype.moveDecorations=function(e){for(var t=0;t<e.elems.length;t++){var n=e.elems[t];if(n.top)for(var r=e.yAtNote(n),i=0;i<n.children.length;i++){var a=n.children[i];if("ornament"===a.klass&&a.bottom-1.5<r){var s=r-a.bottom+1.5;a.bottom+=s,a.top+=s,a.pitch+=s,r=n.top=a.top}}}},n.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))},n.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)},n.prototype.setUpperAndLowerElements=function(e){var t;for(t=0;t<this.children.length;t++){(n=this.children[t]).setUpperAndLowerElements(e)}for(t=0;t<this.otherchildren.length;t++){var n;"string"!=typeof(n=this.otherchildren[t])&&n.setUpperAndLowerElements(e)}},n.prototype.addOther=function(e){this.otherchildren.push(e),this.setRange(e)},n.prototype.addBeam=function(e){this.beams.push(e)},n.prototype.updateIndices=function(){this.layoutEnded()||(this.durationindex+=this.children[this.i].duration,"bar"===this.children[this.i].type&&(this.durationindex=Math.round(64*this.durationindex)/64),this.i++)},n.prototype.layoutEnded=function(){return this.i>=this.children.length},n.prototype.getDurationIndex=function(){return this.durationindex-(this.children[this.i]&&this.children[this.i].duration>0?0:5e-7)},n.prototype.getSpacingUnits=function(){return Math.sqrt(8*this.spacingduration)},n.prototype.getNextX=function(){return Math.max(this.minx,this.nextx)},n.prototype.beginLayout=function(e){this.i=0,this.durationindex=0,this.startx=e,this.minx=e,this.nextx=e,this.spacingduration=0},n.prototype.layoutOneItem=function(e,t){var n=this.children[this.i];if(!n)return 0;var r=e-this.minx,i=n.getExtraWidth();return r<i&&(0===this.i||"bar"!==n.type||"part"!==this.children[this.i-1].type&&"tempo"!==this.children[this.i-1].type)&&(e+=i-r),n.setX(e),this.spacingduration=n.duration,this.minx=e+n.getMinWidth(),this.i!==this.children.length-1&&(this.minx+=n.minspacing),this.updateNextX(e,t),e},n.prototype.updateNextX=function(e,t){this.nextx=e+t*Math.sqrt(8*this.spacingduration)},n.prototype.shiftRight=function(e){var t=this.children[this.i];t&&(t.setX(t.x+e),this.minx+=e,this.nextx+=e)},n.prototype.layoutBeams=function(){for(var e=0;e<this.beams.length;e++)if(this.beams[e].layout){this.beams[e].layout(),this.moveDecorations(this.beams[e]);for(var t=0;t<this.beams[e].elems.length;t++)this.adjustRange(this.beams[e].elems[t])}for(e=0;e<this.otherchildren.length;e++){var n=this.otherchildren[e];n.layout&&(n.layout(),this.adjustRange(n))}this.staff.top=Math.max(this.staff.top,this.top),this.staff.bottom=Math.min(this.staff.bottom,this.bottom)},e.exports=n},function(e,t,n){var r,i=n(2),a=n(0);!function(){"use strict";r=function(e,t,n,r,s){for(var o=0;o<n.chord.length;o++){var c,l,h,u=n.chord[o],d=0;"left"===u.position||"right"===u.position||"below"===u.position||"above"===u.position?(l="annotationfont",h="annotation"):(l="gchordfont",h="chord");var f=e.attr(l,h),p=e.calc(u.name,l,h),m=p.width,g=p.height/a.STEP;switch(u.position){case"left":d=-(r+=m+7),c=n.averagepitch,t.addExtra(new i(u.name,d,m+4,c,{type:"text",height:g,dim:f}));break;case"right":d=s+=4,c=n.averagepitch,t.addRight(new i(u.name,d,m+4,c,{type:"text",height:g,dim:f}));break;case"below":t.addRight(new i(u.name,0,0,void 0,{type:"text",position:"below",height:g,dim:f}));break;case"above":t.addRight(new i(u.name,0,0,void 0,{type:"text",height:g,dim:f}));break;default:if(u.rel_position){var v=u.rel_position.y+3*a.STEP;t.addChild(new i(u.name,d+u.rel_position.x,0,n.minpitch+v/a.STEP,{type:"text",height:g,dim:f}))}else{var b="above";n.positioning&&n.positioning.chordPosition&&(b=n.positioning.chordPosition),t.addCentered(new i(u.name,d,m,void 0,{type:"chord",position:b,height:g,dim:f}))}}}return{roomTaken:r,roomTakenRight:s}}}(),e.exports=r},function(e,t,n){var r=n(0),i=n(51),a=(n(4),function(e){this.paper=new i(e),this.controller=null,this.space=3*r.SPACE,this.padding={},this.reset()});a.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.initVerticalSpace()},a.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},a.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},a.prototype.setPadding=function(e){function t(t,n,r,i,a){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]=a}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},a.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},a.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,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:30.67,words:0}},a.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.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)},a.prototype.calcY=function(e){return this.y-e*r.STEP},a.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},e.exports=a},function(e,t){var n="http://www.w3.org/2000/svg";function r(e){this.svg=o(),e.appendChild(this.svg)}function i(e,t,n){return"M "+e+" "+t+" L "+n+" "+t+" L "+n+" "+(t+1)+"  L "+e+" "+(t+1)+"  z "}function a(e,t,n){return"M "+e+" "+t+" L "+e+" "+n+" L "+(e+1)+" "+n+"  L "+(e+1)+" "+t+"  z "}r.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=o(),e&&(e.innerHTML="",e.appendChild(this.svg))}},r.prototype.setTitle=function(e){var t=document.createElement("title"),n=document.createTextNode(e);t.appendChild(n),this.svg.insertBefore(t,this.svg.firstChild)},r.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"}},r.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},r.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"]="")},r.prototype.insertStyles=function(e){var t=document.createElementNS(n,"style");t.textContent=e,this.svg.insertBefore(t,this.svg.firstChild)},r.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)},r.prototype.rect=function(e){var t=[],n=e.x,r=e.y,s=e.x+e.width,o=e.y+e.height;return t.push(i(n,r,s)),t.push(i(n,o,s)),t.push(a(n,r,o)),t.push(a(s,r,o)),this.path({path:t.join(" "),stroke:"none"})},r.prototype.text=function(e,t,r){var i=document.createElementNS(n,"text");for(var a in t)t.hasOwnProperty(a)&&i.setAttribute(a,t[a]);for(var s=(""+e).split("\n"),o=0;o<s.length;o++){var c=document.createElementNS(n,"tspan");c.textContent=s[o],c.setAttribute("x",t.x?t.x:0),0!==o&&c.setAttribute("dy","1.2em"),i.appendChild(c)}return r?r.appendChild(i):this.append(i),i},r.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(e){n={width:t["font-size"]/2,height:t["font-size"]+2}}return r.removeChild(i),n},r.prototype.createDummySvg=function(){if(!this.dummySvg){this.dummySvg=o();this.dummySvg.setAttribute("style",["display: block !important;","height: 1px;","width: 1px;","position: absolute;"].join("")),document.querySelector("body").appendChild(this.dummySvg)}return this.dummySvg};var s={};function o(){var e=document.createElementNS(n,"svg");return e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),e.setAttribute("role","img"),e}r.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),s[r]))return s[r];var i,a=!n;n||(n=this.text(e,t));try{i=n.getBBox(),i=isNaN(i.height)||!i.height?this.guessWidth(e,t):{width:i.width,height:i.height}}catch(n){i=this.guessWidth(e,t)}return a&&(this.currentGroup?this.currentGroup.removeChild(n):this.svg.removeChild(n)),r&&(s[r]=i),i},r.prototype.openGroup=function(e){e=e||{};var t=document.createElementNS(n,"g");return e.klass&&t.setAttribute("class",e.klass),e.fill&&t.setAttribute("fill",e.fill),e.stroke&&t.setAttribute("stroke",e.stroke),e.prepend?this.svg.insertBefore(t,this.svg.firstChild):this.svg.appendChild(t),this.currentGroup=t,t},r.prototype.closeGroup=function(){var e=this.currentGroup;return this.currentGroup=null,e},r.prototype.path=function(e){var t=document.createElementNS(n,"path");for(var r in e)e.hasOwnProperty(r)&&("path"===r?t.setAttributeNS(null,"d",e.path):t.setAttributeNS(null,r,e[r]));return this.append(t),t},r.prototype.pathToBack=function(e){var t=document.createElementNS(n,"path");for(var r in e)e.hasOwnProperty(r)&&("path"===r?t.setAttributeNS(null,"d",e.path):t.setAttributeNS(null,r,e[r]));return this.prepend(t),t},r.prototype.append=function(e){this.currentGroup?this.currentGroup.appendChild(e):this.svg.appendChild(e)},r.prototype.prepend=function(e){this.currentGroup?this.currentGroup.appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttributeNS(null,n,t[n])},e.exports=r},function(e,t){e.exports=function(e,t,n,r,i,a){var s;this.rows=[],t&&this.rows.push({move:t});var o=n.calc("textfont","defined-text");if(""===e)this.rows.push({move:2*o.attr["font-size"]});else if("string"==typeof e)this.rows.push({move:o.attr["font-size"]/2}),this.rows.push({left:r,text:e,font:"textfont",klass:"defined-text",anchor:"start",absElemType:"freeText"}),s=a.calc(e,"textfont","defined-text"),this.rows.push({move:s.height});else for(var c="textfont",l=!1,h=0;h<e.length;h++){c=e[h].font?e[h].font:"textfont",e[h].center&&(l=!0);var u=l?i/2:r;this.rows.push({left:u,text:e[h].text,font:c,klass:"defined-text",anchor:"start",absElemType:"freeText"}),s=a.calc(e[h].text,c,"defined-text"),this.rows.push({move:s.height})}}},function(e,t){e.exports=function(e,t,n){this.rows=[],e&&this.rows.push({move:e}),this.rows.push({separator:t}),n&&this.rows.push({move:n})}},function(e,t){e.exports=function(e,t,n,r){this.rows=[],e&&this.rows.push({move:e}),this.rows.push({left:n,text:t,font:"subtitlefont",klass:"text subtitle",anchor:"middle"});var i=r.calc(t,"subtitlefont","text subtitle");this.rows.push({move:i.height})}},function(e,t){function n(e,t,n,r,i,a,s){if(this.rows=[],e.header&&r){var o=s.calc("XXXX","headerfont","abcjs-header abcjs-meta-top").height;this.addTextIf(i,e.header.left,"headerfont","header meta-top",-o,0,"start",s),this.addTextIf(i+n/2,e.header.center,"headerfont","header meta-top",-o,null,"middle",s),this.addTextIf(i+n,e.header.right,"headerfont","header meta-top",-o,null,"end",s)}if(r&&this.rows.push({move:a.top}),e.title&&this.addTextIf(i+n/2,e.title,"titlefont","title meta-top",a.title,0,"middle",s,"title"),t[0]&&t[0].subtitle&&this.addTextIf(i+n/2,t[0].subtitle,"subtitlefont","text meta-top subtitle",a.subtitle,0,"middle",s,"subtitle"),e.rhythm||e.origin||e.composer){if(this.rows.push({move:a.composer}),e.rhythm&&e.rhythm.length>0){var c=!(!e.composer&&!e.origin);this.addTextIf(i,e.rhythm,"infofont","meta-top rhythm",0,null,"start",s,"rhythm",c)}var l="";e.composer&&(l+=e.composer),e.origin&&(l+=" ("+e.origin+")"),l.length>0&&this.addTextIf(i+n,l,"composerfont","meta-top composer",0,null,"end",s,"composer"),this.rows.push({move:-6})}e.author&&e.author.length>0&&this.addTextIf(i+n,e.author,"composerfont","meta-top author",0,0,"end",s,"author"),e.partOrder&&e.partOrder.length>0&&this.addTextIf(i,e.partOrder,"partsfont","meta-top part-order",0,0,"start",s,"partOrder")}n.prototype.addTextIf=function(e,t,n,r,i,a,s,o,c,l){t&&(i&&this.rows.push({move:i}),this.rows.push({left:e,text:t,font:n,klass:r,anchor:s,absElemType:c}),l||(size=o.calc(t,n,r),this.rows.push({move:size.height}),a&&this.rows.push({move:a})))},e.exports=n},function(e,t){function n(e,t,n,r,i,a){this.rows=[],e.unalignedWords&&e.unalignedWords.length>0&&this.unalignedWords(e.unalignedWords,r,i,a),this.extraText(e,r,i,a),e.footer&&n&&this.footer(e.footer,r,a)}n.prototype.unalignedWords=function(e,t,n,r){var i="meta-bottom unaligned-words";this.rows.push({startGroup:"unalignedWords",klass:"abcjs-meta-bottom abcjs-unaligned-words"});var a=r.calc("i","wordsfont",i);this.rows.push({move:n.words});for(var s=0;s<e.length;s++)if(""===e[s])this.rows.push({move:a.height});else if("string"==typeof e[s])this.addTextIf(t+50,e[s],"wordsfont",i,0,0,"start",r,null,!0);else{for(var o=0,c=0,l=0;l<e[s].length;l++){var h=e[s][l],u=h.font?h.font:"wordsfont";this.rows.push({left:t+50+c,text:h.text,font:u,anchor:"start"});var d=r.calc(h.text,"wordsfont",i);o=Math.max(o,d.height),c+=d.width," "===h.text[h.text.length-1]&&(c+=a.width)}this.rows.push({move:o})}this.rows.push({move:2*a.height}),this.rows.push({endGroup:"unalignedWords",absElemType:"unalignedWords"})},n.prototype.extraText=function(e,t,n,r){var i="";e.book&&(i+="Book: "+e.book+"\n"),e.source&&(i+="Source: "+e.source+"\n"),e.discography&&(i+="Discography: "+e.discography+"\n"),e.notes&&(i+="Notes: "+e.notes+"\n"),e.transcription&&(i+="Transcription: "+e.transcription+"\n"),e.history&&(i+="History: "+e.history+"\n"),e["abc-copyright"]&&(i+="Copyright: "+e["abc-copyright"]+"\n"),e["abc-creator"]&&(i+="Creator: "+e["abc-creator"]+"\n"),e["abc-edited-by"]&&(i+="Edited By: "+e["abc-edited-by"]+"\n"),i.length>0&&this.addTextIf(t,i,"historyfont","meta-bottom extra-text",n.info,0,"start",r,"extraText")},n.prototype.footer=function(e,t,n){var r="header meta-bottom",i="footerfont";this.rows.push({startGroup:"footer",klass:r}),this.addTextIf(paddingLeft,e.left,i,r,0,0,"start",n),this.addTextIf(paddingLeft+width/2,e.center,i,r,0,0,"middle",n),this.addTextIf(paddingLeft+width,e.right,i,r,0,0,"end",n)},n.prototype.addTextIf=function(e,t,n,r,i,a,s,o,c,l){if(t){i&&this.rows.push({move:i});var h={left:e,text:t,font:n,anchor:s};c&&(h.absElemType=c),l||(h.klass=r),this.rows.push(h),size=o.calc(t,n,r),this.rows.push({move:size.height}),a&&this.rows.push({move:a})}},e.exports=n},function(e,t,n){var r=n(0);function i(e){"keyboard"===this.dragMechanism&&0!==this.dragYStep&&this.dragTarget&&d.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex),this.dragYStep=0}function a(e){switch(e.keyCode){case 38:case 40:e.preventDefault()}}function s(e){var t=!1,n=e.target.dataset.index;switch(e.keyCode){case 13:case 32:t=!0,this.dragTarget=this.selectables[n],this.dragIndex=n,this.dragMechanism="keyboard",h.bind(this)();break;case 38:t=!0,this.dragTarget=this.selectables[n],this.dragIndex=n,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*r.STEP+")"));break;case 40:t=!0,this.dragTarget=this.selectables[n],this.dragIndex=n,this.dragMechanism="keyboard",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*r.STEP+")"));break;case 9:0!==this.dragYStep&&h.bind(this)()}t&&e.preventDefault()}function o(e,t){var n,r,i,a=function(e,t){for(var n=0;n<e.length;n++)if(t===e[n].svgEl)return n;return-1}(e.selectables,function(e){if("svg"===e.tagName)return e;for(var t=e.getAttribute("selectable");!t;)t="svg"===(e=e.parentElement).tagName||e.getAttribute("selectable");return e}(t.target));return a>=0?(n=(i=function(e,t){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[a].svgEl.getBBox(),t))[0],r=i[1]):(i=function(e,t){var n,r,i=1,a=1;return t.viewBox.baseVal&&(0!==t.viewBox.baseVal.width&&(i=t.viewBox.baseVal.width/t.clientWidth),0!==t.viewBox.baseVal.height&&(a=t.viewBox.baseVal.height/t.clientHeight)),"svg"===e.target.tagName?(n=e.offsetX,r=e.offsetY):(n=e.layerX,r=e.layerY),[n*=i,r*=a]}(t,e.renderer.paper.svg),a=function(e,t,n){for(var r=9999999,i=-1,a=0;a<e.selectables.length&&r>0;a++){var s=e.selectables[a];if(e.getDim(s),s.dim.left<t&&s.dim.right>t&&s.dim.top<n&&s.dim.bottom>n)i=a,r=0;else if(s.dim.top<n&&s.dim.bottom>n){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));o<r&&(r=o,i=a)}else if(s.dim.left<t&&s.dim.right>t){var c=Math.min(Math.abs(s.dim.top-n),Math.abs(s.dim.bottom-n));c<r&&(r=c,i=a)}else{var l=Math.abs(t-s.dim.left)>Math.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),h=Math.abs(n-s.dim.top)>Math.abs(n-s.dim.bottom)?Math.abs(n-s.dim.bottom):Math.abs(n-s.dim.top),u=Math.sqrt(l*l+h*h);u<r&&(r=u,i=a)}}return i>=0&&r<=12?i:-1}(e,n=i[0],r=i[1])),{x:n,y:r,clickedOn:a}}function c(e){var t=o(this,e);t.clickedOn>=0&&0===e.button&&(this.dragTarget=this.selectables[t.clickedOn],this.dragIndex=t.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:t.x,y:t.y},this.dragging&&this.dragTarget.isDraggable&&(!function(e,t){if(e){var n=g(e.svg);n[t]=!0,v(e.svg,n)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function l(e){if(this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism){var t=o(this,e),n=Math.round((t.y-this.dragMouseStart.y)/r.STEP);n!==this.dragYStep&&(this.dragYStep=n,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+n*r.STEP+")"))}}function h(e){this.dragTarget&&(p.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),d.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var n=g(e.svg);delete n[t],v(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",h.bind(this)())}function d(e,t,n,r){var i=[];if(e.absEl.elemset){for(var a={},s=0;s<e.absEl.elemset.length;s++){var o=e.absEl.elemset[s];if(o)for(var c=o.getAttribute("class").split(" "),l=0;l<c.length;l++)a[c[l]]=!0}for(var h=0;h<Object.keys(a).length;h++)i.push(Object.keys(a)[h])}for(var d={},p=0;p<i.length;p++)f(i[p],"abcjs-v",d,"voice"),f(i[p],"abcjs-l",d,"line"),f(i[p],"abcjs-m",d,"measure");for(var m=0;m<this.listeners.length;m++)this.listeners[m](e.absEl.abcelem,e.absEl.tuneNumber,i.join(" "),d,{step:t,max:n,index:r,setSelection:u.bind(this)})}function f(e,t,n,r){if(0===e.indexOf(t)){var i=e.replace(t,""),a=parseInt(i,10);""+a===i&&(n[r]=a)}}function p(){for(var e=0;e<this.selected.length;e++)this.selected[e].unhighlight();this.selected=[]}function m(e,t){p.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 a=r[i].children,s=0;s<a.length;s++){var o=a[s].abcelem.startChar,c=a[s].abcelem.endChar;(t>o&&e<c||t===e&&t===c)&&(this.selected[this.selected.length]=a[s],a[s].highlight(void 0,this.selectionColor))}}function g(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 v(e,t){var n=[];for(var r in t)t.hasOwnProperty(r)&&n.push(r);e.setAttribute("class",n.join(" "))}e.exports=function(e){if(e.rangeHighlight=m,e.dragging)for(var t=0;t<e.selectables.length;t++){var n=e.selectables[t];n.selectable&&(n.svgEl.setAttribute("tabindex",0),n.svgEl.setAttribute("data-index",t),n.svgEl.addEventListener("keydown",a.bind(e)),n.svgEl.addEventListener("keyup",s.bind(e)),n.svgEl.addEventListener("focus",i.bind(e)))}e.renderer.paper.svg.addEventListener("mousedown",c.bind(e)),e.renderer.paper.svg.addEventListener("mousemove",l.bind(e)),e.renderer.paper.svg.addEventListener("mouseup",h.bind(e))}},function(e,t){var n;!function(){"use strict";n=function(t,n,r,i){var a,s,o=r;for(a=0;a<n.lines.length;a++)(s=n.lines[a]).staff&&(e(t,r,i,s.staffGroup,n.formatting,a===n.lines.length-1,!1),s.staffGroup.w>o&&(o=s.staffGroup.w));for(a=0;a<n.lines.length;a++)if((s=n.lines[a]).staffGroup&&s.staffGroup.voices){for(var c=0;c<s.staffGroup.voices.length;c++)s.staffGroup.voices[c].layoutBeams();s.staffGroup.setUpperAndLowerElements(t)}for(a=0;a<n.lines.length;a++)(s=n.lines[a]).staffGroup&&(s.staffGroup.height=s.staffGroup.calcHeight());return o};var e=function(e,n,r,i,a,s,o){for(var c=r,l=0;l<8;l++){var h=i.layout(c,e,o);if(c=t(s,!!a.stretchlast&&a.stretchlast,n+e.padding.left,i.w,c,h.spacingUnits,h.minSpace),o&&console.log("setXSpace",l,i.w,c,i.minspace),null===c)break}!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 a=n.children[r-1],s=(n.children[r+1].x-a.x)/2+a.x;i.x=s-i.w/2;for(var o=0;o<i.children.length;o++)i.children[o].x=i.x}}}(i.voices)};function t(e,t,n,r,i,a,s){return e&&r/n<.66&&!t||Math.abs(n-r)<2?null:a>0?((i=(n-(r-a*i))/a)*s>50&&(i=50/s),i):null}}(),e.exports=n},function(e,t){var n=function(e){this.shouldAddClasses=e.shouldAddClasses,this.reset()};n.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},n.prototype.incrLine=function(){null===this.lineNumber?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},n.prototype.incrVoice=function(){null===this.voiceNumber?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},n.prototype.isInMeasure=function(){return null!==this.measureNumber},n.prototype.newMeasure=function(){this.measureNumber=null,this.noteNumber=null},n.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},n.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},n.prototype.incrNote=function(){this.noteNumber++},n.prototype.generate=function(e){if(!this.shouldAddClasses)return"";var t=[];if(e&&e.length>0&&t.push(e),null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),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(" ")},e.exports=n},function(e,t){var n=function(e,t){this.formatting=e,this.classes=t};n.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)},n.prototype.calc=function(e,t){var n;return(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}).padding=n.size/10,{font:n,attr:{"font-size":n.size,"font-style":n.style,"font-family":n.face,"font-weight":n.weight,"text-decoration":n.decoration,class:this.classes.generate(t)}}},e.exports=n},function(e,t){var n=function(e,t){this.getFontAndAttr=e,this.svg=t};n.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},n.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},n.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":t.face,"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(n)}};var a=this.svg.getTextSize(e,i.attr,r);return i.font.box?{height:a.height+4*i.font.padding,width:a.width+4*i.font.padding}:a},n.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},e.exports=n},function(e,t,n){var r=n(63),i=n(75),a=n(76),s=n(0),o=n(78);function c(e,t,n){r(e,t,n);var i=t.height*s.STEP;return e.y+=i,t}function l(e,t,n,r){var i=-(n.staffs[n.staffs.length-1].bottom-2),a=(r.staffs[0].top-10+i)*s.STEP;a<t&&e.moveY(t-a)}e.exports=function(e,t,n,r,s,h,u,d,f){var p=new o(e.paper,d,f);e.moveY(e.padding.top),a(e,n.topText,p),e.moveY(e.spacing.music);for(var m=[],g=0;g<n.lines.length;g++){t.incrLine();var v=n.lines[g];v.staff?(v.vskip&&e.moveY(v.vskip),m.length>=1&&l(e,e.spacing.staffSeparation,m[m.length-1],v.staffGroup),m.push(c(e,v.staffGroup,p))):v.nonMusic&&a(e,v.nonMusic,p)}return t.reset(),e.moveY(24),a(e,n.bottomText,p),i(e,s,u,h),{staffgroups:m,selectables:p.getElements()}}},function(e,t,n){var r=n(0),i=n(64),a=n(65),s=n(73),o=(n(74),n(23));function c(e,t,n,a,s){if(n)for(var o=0;o<n.length;o++)n[o].isStartVoice(a)&&(n[o].startY=t-10*r.STEP,n[o].elemset=i(e,n[o],s))}e.exports=function(e,t,n){!function(e,t){var n=Math.round(e.y);e.paper.pathToBack({path:"M 0 "+n+" L 0 0",stroke:"none",fill:"none","stroke-opacity":0,"fill-opacity":0,class:e.controller.classes.generate(t),"data-vertical":n})}(e,"abcjs-top-of-system");for(var i,l,h=e.y,u=0;u<t.staffs.length;u++){var d=t.staffs[u];e.moveY(r.STEP,d.top),d.absoluteY=e.y,e.moveY(r.STEP,-d.bottom)}for(var f=0,p=0;p<t.voices.length;p++){var m=t.voices[p].staff;e.y=m.absoluteY,e.controller.classes.incrVoice(),t.voices[p].duplicate||(i||(i=e.calcY(10)),l=e.calcY(2),0!==m.lines&&(e.controller.classes.newMeasure(),s(e,t.startx,t.w,m.lines)),c(e,m.absoluteY,t.brace,p,n),c(e,m.absoluteY,t.bracket,p,n)),a(e,t.voices[p],f,n),e.controller.classes.newMeasure(),t.voices[p].duplicate||(f=e.calcY(2))}e.controller.classes.newMeasure(),t.staffs.length>1&&o(e,t.startx,.6,i,l),e.y=h}},function(e,t,n){var r=n(6),i=n(0),a=n(3);var s=function(e,t,n,s,o,c,l){var h;if(c){e.paper.openGroup({klass:e.controller.classes.generate("staff-extra voice-name")});var u=n+(s-n)/2;u-=e.controller.getTextSize.baselineToCenter(c,"voicefont","staff-extra voice-name",0,1),a(e,{x:e.padding.left,y:u,text:c,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return"brace"===o?h=function(e,t,n,i,a){var s=i-n,o=[7.5,-8,21,0,18.5,-10.5,7.5],c=[0,s/5.5,s/3.14,s/2,s/2.93,s/4.88,0],l=r("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t+o[0],n+c[0],t+o[1],n+c[1],t+o[2],n+c[2],t+o[3],n+c[3],t+o[4],n+c[4],t+o[5],n+c[5],t+o[6],n+c[6]);return l+=r("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t+(o=[0,17.5,-7.5,6.6,-5,20,0])[0],n+(c=[s/2,s/1.46,s/1.22,s,s/1.19,s/1.42,s/2])[0],t+o[1],n+c[1],t+o[2],n+c[2],t+o[3],n+c[3],t+o[4],n+c[4],t+o[5],n+c[5],t+o[6],n+c[6]),e.paper.path({path:l,stroke:"#000000",fill:"#000000",class:e.controller.classes.generate(a)})}(e,t,n,s,o):"bracket"===o&&(h=function(e,t,n,a,s){t+=i.STEP;var o=.75*i.STEP,c=.75*i.STEP,l=a-n,h=r("M %f %f l %f %f l %f %f l %f %f z",t,n-c,0,l+2*c,o,0,0,-(l+2*c)),u=2*i.STEP,d=i.STEP;return h+=r("M %f %f q %f %f %f %f q %f %f %f %f z",t+o,n-c,.6*u,.2*d,u,-d,.1*-u,.3*d,-u,d+i.STEP),h+=r("M %f %f q %f %f %f %f q %f %f %f %f z",t+o,n+c+l,.6*u,.2*-d,u,d,.1*-u,.3*-d,-u,-d-i.STEP),e.paper.path({path:h,stroke:"#000000",fill:"#000000",class:e.controller.classes.generate(s)})}(e,t,n,s,o)),c&&(h=e.paper.closeGroup()),l.wrapSvgEl({el_type:o,startChar:-1,endChar:-1},h),h};e.exports=function(e,t,n){var r=t.startVoice.staff.absoluteY-10*i.STEP;return t.endVoice&&t.endVoice.staff?t.endY=t.endVoice.staff.absoluteY-2*i.STEP:t.lastContinuedVoice&&t.lastContinuedVoice.staff?t.endY=t.lastContinuedVoice.staff.absoluteY-2*i.STEP:t.endY=t.startVoice.staff.absoluteY-2*i.STEP,s(e,t.x,r,t.endY,t.type,t.header,n)}},function(e,t,n){var r=n(66),i=n(67),a=n(68),s=n(69),o=n(70),c=(n(21),n(71)),l=n(3),h=n(72);function u(e){return"rest"===e.type&&!(!e.abcelem||!e.abcelem.rest||"spacer"===e.abcelem.rest.type)}e.exports=function(e,t,n,d){var f,p,m=t.w-1;if(e.staffbottom=t.staff.bottom,t.header){var g=l(e,{x:e.padding.left,y:e.calcY(t.headerPosition),text:t.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0});d.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:t.header},g)}for(f=0;f<t.children.length;f++){var v=!1;"staff-extra"===(p=t.children[f]).type||e.controller.classes.isInMeasure()||(e.controller.classes.startMeasure(),v=!0),p.type,h(e,p,t.barto||f===t.children.length-1?n:0,d),("note"===p.type||u(p))&&e.controller.classes.incrNote(),"bar"!==p.type||v||e.controller.classes.incrMeasure()}for(e.controller.classes.startMeasure(),f=0;f<t.beams.length;f++){var b=t.beams[f];"bar"===b?e.controller.classes.incrMeasure():c(e,b,d)}for(e.controller.classes.startMeasure(),f=0;f<t.otherchildren.length;f++)if("bar"===(p=t.otherchildren[f]))e.controller.classes.incrMeasure();else switch(p.type){case"CrescendoElem":p.elemset=r(e,p,d);break;case"DynamicDecoration":p.elemset=i(e,p,d);break;case"TripletElem":a(e,p,d);break;case"EndingElem":p.elemset=s(e,p,t.startx+10,m,d);break;case"TieElem":p.elemset=o(e,p,t.startx+10,m,d);break;default:console.log(p),h(e,p,t.startx+10,m,d)}}},function(e,t,n){n(11),n(12);var r=n(6),i=n(8);var a=function(e,t,n,a,s,o,c){var l=r("M %f %f L %f %f M %f %f L %f %f",o,t,c,n,o,a,c,s);return i(e,{path:l,highlight:"stroke",stroke:"#000000",class:e.controller.classes.generate("dynamics decoration")})};e.exports=function(e,t,n){void 0===t.pitch&&window.console.error("Crescendo Element y-coordinate not set.");var r,i=e.calcY(t.pitch)+4,s=t.anchor1?t.anchor1.x:0,o=t.anchor2?t.anchor2.x:800;return r="<"===t.dir?a(e,i+4,i,i+4,i+8,s,o):a(e,i,i+4,i+8,i+4,s,o),n.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},r),[r]}},function(e,t,n){var r=n(20);e.exports=function(e,t,n){void 0===t.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var i=r(e,t.anchor.x,t.pitch,t.dec,1,1,e.controller.classes.generate("decoration"));return n.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},i),[i]}},function(e,t,n){var r=n(6),i=n(3),a=n(8);function s(e,t,n,i){return r("M %f %f L %f %f",e,t,n,i)}e.exports=function(e,t,n){var r;if(e.paper.openGroup({klass:e.controller.classes.generate("triplet "+t.durationClass)}),t.hasBeam){var o=t.anchor1.parent.beam.isAbove()?t.anchor1.x+t.anchor1.w:t.anchor1.x;r=t.anchor1.parent.beam.xAtMidpoint(o,t.anchor2.x)}else r=t.anchor1.x+(t.anchor2.x+t.anchor2.w-t.anchor1.x)/2,function(e,t,n,r,i){n=e.calcY(n),i=e.calcY(i);var o="";o+=s(t,n,t,n+5),o+=s(r,i,r,i+5);var c=t+(r-t)/2,l=(i-n)/(r-t),h=c-8;o+=s(t,n,h,n+(h-t)*l);var u=c+8;o+=s(u,n+(u-t)*l,r,i),a(e,{path:o,stroke:"#000000"})}(e,t.anchor1.x,t.startNote,t.anchor2.x+t.anchor2.w,t.endNote);i(e,{x:r,y:e.calcY(t.yTextPos),text:""+t.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0});var c=e.paper.closeGroup();return n.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},c),c}},function(e,t,n){var r=n(6),i=n(3),a=n(8);e.exports=function(e,t,n,s,o){void 0===t.pitch&&window.console.error("Ending Element y-coordinate not set.");var c=e.calcY(t.pitch),l="";t.anchor1&&(n=t.anchor1.x+t.anchor1.w,l+=r("M %f %f L %f %f ",n,c,n,c+20)),t.anchor2&&(s=t.anchor2.x,l+=r("M %f %f L %f %f ",s,c,s,c+20)),l+=r("M %f %f L %f %f ",n,c,s,c),e.paper.openGroup({klass:e.controller.classes.generate("ending")}),a(e,{path:l,stroke:"#000000",fill:"#000000"}),t.anchor1&&i(e,{x:n+5,y:e.calcY(t.pitch-.5),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0});var h=e.paper.closeGroup();return o.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},h),[h]}},function(e,t,n){var r=n(6);var i=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()},a=function(e,t,n,i,a,s,o,c){var l=c?1.2:1.5;t+=6,n+=4,i+=s?l:-l,a+=s?l:-l;var h=e.calcY(i),u=e.calcY(a),d=n-t,f=u-h,p=Math.sqrt(d*d+f*f),m=d/p,g=f/p,v=p/3.5,b=c?10:25,y=(s?-1:1)*Math.min(b,Math.max(4,v)),w=t+v*m-y*g,k=h+v*g+y*m,x=n-v*m-y*g,A=u-v*g+y*m,T=r("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t,h,w,k,x,A,n,u,x-2*g,A+2*m,w-2*g,k+2*m,t,h);return o?o+=" slur":o="slur",e.paper.path({path:T,stroke:"none",fill:"#000000",class:e.controller.classes.generate(o)})};e.exports=function(e,t,n,r,s){var o;i(t,n,r),t.hint&&(o="abcjs-hint");var c=t.fixedY?1.5:0,l=a(e,t.startX,t.endX,t.startY+c,t.endY+c,t.above,o,t.isTie);return s.wrapSvgEl({el_type:"slur",startChar:-1,endChar:-1},l),[l]}},function(e,t,n){var r=n(8);function i(e,t,n,r,i,a){return"M"+t+" "+(n=e.calcY(n))+" L"+r+" "+(i=e.calcY(i))+"L"+r+" "+(i+a)+" L"+t+" "+(n+a)+"z"}e.exports=function(e,t){if(0!==t.beams.length){t.hint&&" abcjs-hint";for(var n="",a=0;a<t.beams.length;a++){var s=t.beams[a];n+=i(e,s.startX,s.startY,s.endX,s.endY,s.dy)}var o=("abcjs-d"+t.duration).replace(/\./g,"-"),c=e.controller.classes.generate("beam-elem "+o);return[r(e,{path:n,stroke:"none",fill:"#000000",class:c})]}}},function(e,t,n){var r=n(21),i=n(22),a=n(0),s=n(7),o=n(13);e.exports=function(e,t,n,c){if(!t.invisible){t.elemset=[],o.beginGroup(e.paper,e.controller);for(var l=0;l<t.children.length;l++){var h,u=t.children[l];switch(u.type){case"TempoElement":(h=r(e,u,c))&&(t.elemset=t.elemset.concat(h));break;default:(h=i(e,u,n,c))&&t.elemset.push(h)}}var d=t.type;if(("note"===t.type||"rest"===t.type)&&(d=(d+=" d"+Math.round(1e3*t.durationClass)/1e3).replace(/\./g,"-"),t.abcelem.pitches))for(var f=0;f<t.abcelem.pitches.length;f++)d+=" p"+t.abcelem.pitches[f].pitch;var p=o.endGroup(d);p?(t.elemset.push(p),c.add(t,p,"note"===t.type)):t.elemset.length>0&&c.add(t,t.elemset[0],"note"===t.type),t.klass&&s(t.elemset,"mark","","#00ff00"),t.hint&&s(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t;a.STEP}}},function(e,t,n){var r=n(24);e.exports=function(e,t,n,i){var a="abcjs-top-line";if(e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")}),1===i)r(e,t,n,6,a);else for(var s=i-1;s>=0;s--)r(e,t,n,2*(s+1),a),a=void 0;e.paper.closeGroup()}},function(e,t){e.exports=function(e,t,n,r,i,a,s,o){var c=e.paper.rect({x:t,y:n,width:r,height:i,fill:a,stroke:a,"fill-opacity":s,"stroke-opacity":s});return o&&e.paper.text(o,{x:0,y:n+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),c}},function(e,t){e.exports=function(e,t,n,r){var i=(t+e.padding.right)*n,a=(e.y+e.padding.bottom)*n;e.isPrint&&(a=Math.max(a,1056));var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s),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 o={overflow:"hidden"};"resize"===r?e.paper.setResponsiveWidth(i,a):(o.width="",o.height=a+"px",n<1?(o.width=i+"px",e.paper.setSize(i/n,a/n)):e.paper.setSize(i,a)),e.paper.setScale(n),e.paper.setParentStyles(o)}},function(e,t,n){var r=n(77),i=n(3);e.exports=function(e,t,n){for(var a=0;a<t.rows.length;a++){var s=t.rows[a];if(s.move)e.moveY(s.move);else if(s.text){var o=s.left?s.left:0,c=i(e,{x:o,y:e.y,text:s.text,type:s.font,klass:s.klass,anchor:s.anchor});s.absElemType&&n.wrapSvgEl({el_type:s.absElemType,startChar:-1,endChar:-1,text:s.text},c)}else if(s.separator)r(e,s.separator);else if(s.startGroup)e.paper.openGroup({klass:s.klass});else if(s.endGroup){var l=e.paper.closeGroup();s.absElemType&&n.wrapSvgEl({el_type:s.absElemType,startChar:-1,endChar:-1,text:""},l)}}}},function(e,t){e.exports=function(e,t){var n=Math.round(e.y),r=(e.controller.width-t)/2,i=r+t,a="M "+r+" "+n+" L "+i+" "+n+" L "+i+" "+(n+1)+" L "+r+" "+(n+1)+" L "+r+" "+n+" z";e.paper.pathToBack({path:a,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}},function(e,t,n){var r=n(11),i=n(12);function a(e,t,n){this.elements=[],this.paper=e,this.tuneNumber=n,this.selectTypes=t}a.prototype.getElements=function(){return this.elements},a.prototype.add=function(e,t,n){this.canSelect(e)&&(this.paper.setAttributeOnElement(t,{selectable:!0,tabindex:0,"data-index":this.elements.length}),this.elements.push({absEl:e,svgEl:t,isDraggable:n}))},a.prototype.canSelect=function(e){return!1!==this.selectTypes&&(!(!e||!e.abcelem)&&(!0===this.selectTypes||(void 0===this.selectTypes?"note"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0)))},a.prototype.wrapSvgEl=function(e,t){var n={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:r,unhighlight:i};this.add(n,t,!1)},e.exports=a},function(e,t,n){var r=n(14),i=n(80),a=n(93);e.exports=function(e,t,n,s,o){var c,l={};if(n)for(c in n)n.hasOwnProperty(c)&&(l[c]=n[c]);if(s)for(c in s)s.hasOwnProperty(c)&&("listener"===c?l.midiListener=s[c]:"transpose"===c?l.midiTranspose=s[c]:l[c]=s[c]);if(o)for(c in o)o.hasOwnProperty(c)&&(l[c]=o[c]);return void 0===l.generateInline&&(l.generateInline=!0),l.inlineControls&&(l.inlineControls.selectionToggle=!1),r.renderEngine((function(e,t,n,r){var s="",o=a(t,l);if(l.generateInline){var c=o.inline?o.inline:o,h=e.innerHTML.indexOf("abcjs-midi-current")>=0;s+=i.generateMidiControls(t,l,c,n,h)}if(l.generateDownload){var u=o.download?o.download:o;s+=i.generateMidiDownloadLink(t,l,u,n)}e.innerHTML=s,l.generateInline&&i.attachListeners(e);var d=function(e,t){var n=e.getElementsByClassName(t);return 0===n.length?null:n[0]};if(l.generateInline&&(l.animate||l.midiListener)){var f=d(e,"abcjs-inline-midi");if(f.abcjsTune=t,f.abcjsListener=l.midiListener,f.abcjsQpm=l.qpm,f.abcjsContext=l.context,l.animate){var p=l.drumIntro?l.drumIntro:0;f.abcjsAnimate=l.animate.listener,f.abcjsTune=l.animate.target,f.abcjsTune.setTiming(l.qpm,p)}}if(l.generateInline&&l.inlineControls&&l.inlineControls.startPlaying){var m=d(e,"abcjs-midi-start");i.startPlaying(m)}}),e,t,l)}},function(e,t,n){function r(){return"performance"in window&&"now"in window.performance}r()&&("galactic"in window||(window.galactic={}),window.galactic.loc={isLocalUrl:function(){return!1}},n(81),n(82)(window.galactic),n(83),n(84),n(85),n(86),n(87),n(88),n(89),n(90),n(91),n(92));var i={};!function(){"use strict";function e(e,t){return e.replace(/%T/g,t)}i.generateMidiDownloadLink=function(e,t,n,r){var i=["abcjs-download-midi","abcjs-midi-"+r];t.downloadClass&&i.push(t.downloadClass);var a='<div class="'+i.join(" ")+'">';t.preTextDownload&&(a+=t.preTextDownload);var s,o,c=e.metaText&&e.metaText.title?e.metaText.title:"Untitled";return s=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+'"',a+='<a download="'+(c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"))+'.midi" href="'+n+'">'+s+"</a>",t.postTextDownload&&(a+=t.postTextDownload),a+"</div>"},i.deviceSupportsMidi=function(){return!!r()&&"not loaded"!==i.midiInlineInitialized},i.generateMidiControls=function(t,n,i,a,s){if(!r())return'<div class="abcjs-inline-midi abcjs-midi-'+a+"\">ERROR: this browser doesn't support window.performance</div>";if("not loaded"===i.midiInlineInitialized)return'<div class="abcjs-inline-midi abcjs-midi-'+a+'">MIDI NOT PRESENT</div>';s&&g();var o=t.metaText&&t.metaText.title?t.metaText.title:"Untitled",c=n.inlineControls||{};void 0===c.standard&&(c.standard=!0),void 0===c.tooltipSelection&&(c.tooltipSelection="Click to toggle play selection/play all."),void 0===c.tooltipLoop&&(c.tooltipLoop="Click to toggle play once/repeat."),void 0===c.tooltipReset&&(c.tooltipReset="Click to go to beginning."),void 0===c.tooltipPlay&&(c.tooltipPlay="Click to play/pause."),void 0===c.tooltipProgress&&(c.tooltipProgress="Click to change the playback position."),void 0===c.tooltipTempo&&(c.tooltipTempo="Change the playback speed.");var l="";c.hide&&(l='style="display:none;"');var h='<div class="abcjs-inline-midi abcjs-midi-'+a+'" '+l+">";if(h+='<span class="abcjs-data" style="display:none;">'+JSON.stringify(i)+"</span>",n.preTextInline&&(h+='<span class="abcjs-midi-pre">'+e(n.preTextInline,o)+"</span>"),c.selectionToggle&&(h+='<button type="button" class="abcjs-midi-selection abcjs-btn" title="'+c.tooltipSelection+'"></button>'),c.loopToggle&&(h+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+c.tooltipLoop+'"></button>'),c.standard&&(h+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+c.tooltipReset+'"></button><button type="button" class="abcjs-midi-start abcjs-btn" title="'+c.tooltipPlay+'"></button><button type="button" class="abcjs-midi-progress-background" title="'+c.tooltipProgress+'"><span class="abcjs-midi-progress-indicator"></span></button><span class="abcjs-midi-clock"> 0:00</span>'),c.tempo){var u=t&&t.metaText&&t.metaText.tempo&&t.metaText.tempo.bpm?t.metaText.tempo.bpm:180;h+='<span class="abcjs-tempo-wrapper"><input class="abcjs-midi-tempo" value="100" type="number" min="1" max="300" data-start-tempo="'+u+'" title="'+c.tooltipTempo+'" />% (<span class="abcjs-midi-current-tempo">'+u+"</span> BPM)</span>"}return n.postTextInline&&(h+='<span class="abcjs-midi-post">'+e(n.postTextInline,o)+"</span>"),h+"</div>"};var t="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/";i.setSoundFont=function(e){t=e};var n=!0;function a(e,t){return!!e&&(" "+e.className+" ").indexOf(" "+t+" ")>-1}function s(e,t){e&&(a(e,t)||(e.className=e.className+" "+t))}function o(e,t){e&&(e.className=e.className.replace(t,"").trim().replace("  "," "))}function c(e,t){e&&(a(e,t)?o(e,t):s(e,t))}function l(e,t){if(!e)return null;for(;e!==document.body;){if(a(e,t))return e;e=e.parentNode}return null}function h(e,t){if(!e)return null;var n=e.getElementsByClassName(t);return 0===n.length?null:n[0]}i.setInteractiveProgressBar=function(e){n=e};var u,d=!1;function f(e,t,n){MIDI.player.currentTime=0,MIDI.player.warp=e,MIDI.player.load({events:t}),n()}function p(e){for(var t=[],n=0;n<e.length;n++)e[n][0]&&e[n][0].event&&e[n][0].event.programNumber&&t.push(e[n][0].event.programNumber);return t}function m(){MIDI.player.start(MIDI.player.currentTime)}function g(){MIDI.player.stop()}function v(){MIDI.player.pause()}function b(e,t,n){var r=t/n,i=MIDI.player.duration;if(e&&v(),MIDI.player.currentTime=i*r,e)m();else if(k){var a=MIDI.player,s=a.currentTime/a.duration;k({currentTime:a.currentTime/1e3,duration:a.duration/1e3,progress:s})}}function y(e,n){var r=h(e,"abcjs-data"),i=JSON.parse(r.innerHTML),a=1,s=h(e,"abcjs-midi-tempo");if(s){var o=parseInt(s.value,10);o>0&&(a=100/o)}!function(e,n,r){d?f(e,n,r):MIDI.setup({debug:!1,soundfontUrl:t,instruments:p(n)}).then((function(){d=!0,f(e,n,r)})).catch((function(e){console.log("MIDI.setup failed:",e.message)}))}(a,i,n)}function w(){var e=h(document,"abcjs-midi-current");e&&(g(),o(e,"abcjs-midi-current"),o(h(e,"abcjs-midi-start"),"abcjs-pushed"))}function k(e){var t;if(e.duration>0&&u!==e.progress&&(u=e.progress,(t=h(document,"abcjs-midi-current"))&&a(h(t,"abcjs-midi-start"),"abcjs-loaded"))){if(!V){var n=h(t,"abcjs-midi-progress-background").offsetWidth,r=h(t,"abcjs-midi-progress-indicator"),i=n*u;r.style.left=i+"px"}var s=h(t,"abcjs-midi-clock");if(s){var o=Math.floor(e.currentTime),c=Math.floor(o/60);(o%=60)<10&&(o="0"+o),c<10&&(c=" "+c),s.innerHTML=c+":"+o}var l=t.abcjsQpm;!l&&t.abcjsTune&&t.abcjsTune.metaText&&t.abcjsTune.metaText.tempo&&(l=t.abcjsTune.metaText.tempo.bpm),l||(l=180);var d=parseInt(l,10)/60,f=e.currentTime;if(t.abcjsListener){var p=Math.floor(f*d);e.newBeat=p!==t.abcjsLastBeat,e.thisBeat=p,t.abcjsLastBeat=p,t.abcjsListener(t,e,t.abcjsContext)}if(t.abcjsAnimate){var m=d/64,g=function(e,t,n){for(var r,i,a=0,s=e.length-1;a<=s;)if((i=e[r=Math.floor((a+s)/2)]).milliseconds/1e3-n<t)a=r+1;else{if(!(i.milliseconds/1e3-n>t))return r;s=r-1}for(;e[r].milliseconds/1e3-n>=t&&r>0;)r--;return 0===r&&e[r].milliseconds/1e3-n>=t?-1:r}(t.abcjsTune.noteTimings,f,m);if(g!==t.abcjsLastIndex){var v=t.abcjsLastIndex>=0?t.abcjsTune.noteTimings[t.abcjsLastIndex]:null;t.abcjsAnimate(v,t.abcjsTune.noteTimings[g],t.abcjsContext),t.abcjsLastIndex=g}}}if(1===e.progress){t=h(document,"abcjs-midi-current");var b=h(t,"abcjs-midi-loop"),y=function(){b&&a(b,"abcjs-pushed")&&x(h(t,"abcjs-midi-start"))};setTimeout((function(){C(t,y),t&&t.abcjsAnimate&&t.abcjsAnimate(t.abcjsTune.noteTimings[t.abcjsLastIndex],null,t.abcjsContext)}),1)}}function x(e){var t=l(e,"abcjs-inline-midi");if(a(e,"abcjs-pushed"))return v(),void o(e,"abcjs-pushed");a(t,"abcjs-midi-current")?m():(w(),T(e,t,(function(){m()}))),s(e,"abcjs-pushed")}function A(e){for(var t=document.querySelectorAll(".abcjs-midi-current"),n=0;n<t.length;n++)o(t[n],"abcjs-midi-current");s(e,"abcjs-midi-current")}function T(e,t,n){s(e,"abcjs-loading"),y(t,(function(){o(e,"abcjs-loading"),A(t),s(e,"abcjs-loaded"),n&&n()})),t.abcjsLastBeat=-1,t.abcjsLastIndex=-1,function(e){e?MIDI.player.setAnimation(e):MIDI.player.clearAnimation()}(k)}function S(e){h(e,"abcjs-midi-progress-indicator").style.left="0px",h(e,"abcjs-midi-clock").innerHTML=" 0:00"}function M(e){c(e,"abcjs-pushed")}function N(e){c(e,"abcjs-pushed")}function C(e,t){var n=l(e,"abcjs-inline-midi");w(),n&&y(n,(function(){A(n),S(n),t&&t()}))}function E(e){var t=l(e,"abcjs-inline-midi"),n=h(t,"abcjs-midi-start"),r=a(n,"abcjs-pushed");a(t,"abcjs-midi-current")&&C(e,(function(){r&&(m(),s(n,"abcjs-pushed"))}))}function I(e,t){var n=0,r=e.offsetWidth;do{n+=e.offsetLeft-e.scrollLeft,e=e.offsetParent}while(e);var i=t.pageX-n;return i<0&&(i=0),i>r&&(i=r-1),i}function _(e){var t=l(e,"abcjs-inline-midi"),n=h(t,"abcjs-midi-start");return!!a(t,"abcjs-midi-current")&&a(n,"abcjs-pushed")}function B(e,t){var n=l(e,"abcjs-inline-midi"),r=h(n,"abcjs-midi-start"),i=e.offsetWidth,s=I(e,t);a(n,"abcjs-midi-current")?b(_(e),s,i):T(r,n,(function(){b(!1,s,i)}))}function P(e){for(var t=parseInt(e.value,10),n=parseInt(e.getAttribute("data-start-tempo"),10);e&&!a(e,"abcjs-midi-current-tempo");)e=e.nextSibling;e.innerHTML=Math.floor(t*n/100),function(e){MIDI.player.warp=e>0?100/e:1}(t)}i.startPlaying=function(e){var t=e;a(e,"abcjs-inline-midi")&&(t=e.querySelector(".abcjs-midi-start")),x(t)},i.stopPlaying=function(){g();var e=document.querySelector(".abcjs-midi-current");if(e){S(e);var t=h(e,"abcjs-midi-start");t&&o(t,"abcjs-pushed")}},i.restartPlaying=function(){E(document.querySelector(".abcjs-midi-current"))},i.setLoop=function(e,t){var n=e.querySelector(".abcjs-midi-loop");n&&(t?s(n,"abcjs-pushed"):o(n,"abcjs-pushed"))},i.setRandomProgress=function(e){var t=a(h(document.querySelector(".abcjs-midi-current"),"abcjs-midi-start"),"abcjs-pushed"),n=MIDI.player.duration;t&&v(),MIDI.player.currentTime=n*e,t&&m()};var D,L,V=!1,H=!1;i.attachListeners=function(e){for(var t=e.querySelectorAll(".abcjs-inline-midi"),r=0;r<t.length;r++){var s=t[r];s.addEventListener("click",(function(e){for(var t=(e=e||window.event).target||e.srcElement;t&&t!==document.body;){if(a(t,"abcjs-midi-start"))return void x(t);if(a(t,"abcjs-midi-selection"))return void M(t);if(a(t,"abcjs-midi-loop"))return void N(t);if(a(t,"abcjs-midi-reset"))return void E(t);if(a(t,"abcjs-midi-progress-background"))return void(n&&B(t,e));t=t.parentNode}})),s.addEventListener("change",(function(e){for(var t=(e=e||window.event).target||e.srcElement;t!==document.body;)a(t,"abcjs-midi-tempo")&&P(t),t=t.parentNode})),s.addEventListener("mousedown",(function(e){if(n){var t=(e=e||window.event).target||e.srcElement;a(t,"abcjs-midi-progress-indicator")&&(D=t,V=!0,L=l(t,"abcjs-midi-progress-background"))}}))}if(H||(H=!0,document.body.addEventListener("mousemove",(function(e){if(V){(e=e||window.event).preventDefault();var t=I(L,e);D.style.left=t+"px"}}),!0),document.body.addEventListener("mouseup",(function(e){if(V){(e=e||window.event).preventDefault();var t=I(L,e),n=L.offsetWidth;b(_(L),t,n),B(L,e),V=!1,D=null,L=null}}))),void 0===window.MIDI){i.midiInlineInitialized="not loaded";for(var o=document.getElementsByClassName("abcjs-inline-midi"),c=0;c<o.length;c++)o[c].innerHTML="MIDI NOT PRESENT"}}}(),e.exports=i},function(e,t,n){"undefined"==typeof galactic&&(galactic={}),function(t){"use strict";t.request=function(e,n,r,i){"string"==typeof e&&(e={url:e});var a=e.data,s=e.url,o=e.method||(e.data?"POST":"GET"),c=e.format,l=e.headers,h=e.mimeType,u=e.responseType,d=e.withCredentials||!1;i=i||e.onprogress,n=n||e.onsuccess,r=r||e.onerror;if("undefined"==typeof NodeFS||!t.loc.isLocalUrl(s)){var f=new XMLHttpRequest;if(f.open(o,s,!0),l)for(var p in l)f.setRequestHeader(p,l[p]);else a&&f.setRequestHeader("Content-type","application/x-www-form-urlencoded");return h&&f.overrideMimeType(h),u&&(f.responseType=u),d&&(f.withCredentials=!0),r&&"onerror"in f&&(f.onerror=r),i&&f.upload&&"onprogress"in f.upload&&(a?f.upload.onprogress=function(e){i.call(f,e,event.loaded/event.total)}:f.addEventListener("progress",(function(e){var t=0;if(e.lengthComputable)t=e.total;else if(f.totalBytes)t=f.totalBytes;else{var n=parseInt(f.getResponseHeader("Content-Length-Raw"));if(!isFinite(n))return;f.totalBytes=t=n}i.call(f,e,e.loaded/t)}),!1)),f.onreadystatechange=function(e){if(4===f.readyState)if(200===f.status||304===f.status||308===f.status||0===f.status&&window.top.cordova){if(n){var t;if("json"===c)try{t=JSON.parse(e.target.response)}catch(t){r&&r.call(f,e)}else t="xml"===c?e.target.responseXML:"text"===c?e.target.responseText:e.target.response;n.call(f,e,t)}}else r&&r.call(f,e)},f.send(a),f}NodeFS.readFile(s,"utf8",(function(e,t){e?r&&r(e):n&&n({responseText:t},t)}))},e.exports&&(e.exports=t.request)}(galactic)},function(e,t,n){"undefined"==typeof galactic&&(galactic={}),function(t){"use strict";t.module=t.module||{},t.module.DOMMisc=function(e){var t,n,r,i=e.util||(e.util={});i.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},i.errorHandler=function(e){return function(){console.warn(e,arguments)}},i.requestKioskMode=function(){e.client.nodewebkit&&win.enterKioskMode()},i.diff=function(e,t,n){if(e!==t){var r=new e.constructor,a=new t.constructor,s=!0;for(var o in e)if(n&&-1!==n.indexOf(o))r[o]=e[o],a[o]=t[o];else if(o in t){if(e[o]!==t[o])if("object"==typeof e[o]&&"object"==typeof t[o]){var c=i.diff(e[o],t[o],n);void 0!==c&&(s=!1,r[o]=c.from,a[o]=c.to)}else s=!1,r[o]=e[o],a[o]=t[o]}else s=!1,r[o]=e[o],a[o]=t[o];for(var o in t)o in e||(s=!1,r[o]=e[o],a[o]=t[o]);return s?void 0:{from:r,to:a}}},i.sort=function(e){var t,n=i.sort[e.fn]||e.fn,r=e.data||e,a=e.param;return Array.isArray(r)?t=a?r.sort((function(e,t){return n(e[a],t[a])})):r.sort(n):(t={},Object.keys(r).sort(n).forEach((function(e){t[e]=r[e]}))),t},i.sort.numeric=function(e,t){return e-t},i.sort.natural=function(e,t){var n=/(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,r=/(^[ ]*|[ ]*$)/g,i=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,a=/^0x[0-9a-f]+$/i,s=/^0/,o=e.toString().replace(r,"")||"",c=t.toString().replace(r,"")||"",l=o.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),u=parseInt(o.match(a))||1!=l.length&&o.match(i)&&Date.parse(o),d=parseInt(c.match(a))||u&&c.match(i)&&Date.parse(c)||null;if(d){if(u<d)return-1;if(u>d)return 1}for(var f=0,p=Math.max(l.length,h.length);f<p;f++){var m=!(l[f]||"").match(s)&&parseFloat(l[f])||l[f]||0,g=!(h[f]||"").match(s)&&parseFloat(h[f])||h[f]||0;if(isNaN(m)!==isNaN(g))return isNaN(m)?1:-1;if(typeof m!=typeof g&&(m+="",g+=""),m<g)return-1;if(m>g)return 1}return 0},i.getItems=function(e,t){var n=e.length,r={};i.each(e,(function(e){i.getItem(e,(function(i){r[e]=i,--n||t(r)}))}))},i.getItem=function(t,n){n=n||function(e){console.log(e)};var r=function(e){if(e)try{e=JSON.parse(e)}catch(e){}n(e)};if(i.exists("chrome.storage.local"))chrome.storage.local.get(t,(function(e){r(e[t])}));else{var a=(e.feature&&e.feature.prefix||"")+"/"+t,s=localStorage.getItem(a)||"";r(s)}},i.setItem=function(t,n){if(i.exists("chrome.storage.local")){var r={};r[t]=n,chrome.storage.local.set(r)}else{var a=(e.feature&&e.feature.prefix||"")+"/"+t;localStorage.setItem(a,n)}},i.Canvas=function(t,n,r){if("undefined"==typeof document){if(void 0===Canvas)return{ctx:{}};var i=new Canvas}else{i=document.createElement("canvas");"function"==typeof FlashCanvas&&(i.onload=e.client.fn.detect)}return i.ctx=i.getContext(r||"2d"),isFinite(t)&&(i.width=t||1),isFinite(n)&&(i.height=n||1),i},i.Canvas.resize=function(e,t,n){t&&n?(e.width=t,e.height=n):e.width=e.width},i.Canvas.clear=function(e){e.ctx.clearRect(0,0,e.width,e.height)},i.Context3d=function(e,t){return i.Canvas(e,t,"webgl").ctx},i.Context2d=function(e,t){return i.Canvas(e,t,"2d").ctx},i.json={},i.json.pretty=function(e){return JSON.stringify(e,null,"\t")},i.json.stringify=function(e){return JSON.stringify(e,(function(e,t){if("object"==typeof t){if(null===t)return;if(t.nodeName)return;if(t.tagName)return}return t}))},i.timestamp=function(){if("object"==typeof window){var e=window.performance;if(e&&e.now)return e.now.bind(e)}return Date.now}(),i.perf=function(e,t,n){if(!t||!e){var r=i.timestamp();return function(e,t){var n=i.timestamp(),a=Math.round(n-r);return e&&console.log(a+"ms",e),t&&(r=n),a}}for(var a=i.perf(),s=0;s<t;s++)e();console.log(a()+"ms",n||"")},i.exists=function(e,t){try{for(var n=e.split("."),r=t||window,i=0,a=n.length;i<a;i++){var s=n[i];if(null==r[s])return!1;r=r[s]}return!0}catch(e){return!1}},i.copy=(t="function"==typeof CanvasPattern,n=function(e){if(!e||"object"!=typeof e)return e;if(!(e.nodeType||t&&e instanceof CanvasPattern)){if(e.clone&&"function"==typeof e.clone)return e.clone();if(e.constructor){var r=new e.constructor;for(var i in e){var a=e[i];r[i]=a&&"object"==typeof a?n(a):a}return r}}}),i.copyInto=r=function(e,t,n){if(n=n||{},e&&"object"==typeof e)for(var i in e){var a=t[i],s=e[i],o=n.filter;if(!o||!o(s,a)){var c=typeof s;if(s&&"object"===c)if(s.nodeType){if(!n.referenceNodes)continue;t[i]=s}else t[i]=r(s,typeof a===c?a:new s.constructor,n);else t[i]=s}}return t},i.count=function(e,t,n){if(!e)return 0;if(isFinite(e.length))return e.length;if("object"==typeof e){var r=0,i=void 0!==t;if(i&&void 0!==n)for(var a in e)e[a]&&e[a][t]===n&&++r;else if(i)for(var a in e)void 0!==e[a]&&++r;else for(var a in e)++r;return r}},i.isEmpty=function(e){if(null==e)return!0;if(e.length>=0)return!e.length;for(var t in e)return!1;return!0},i.isNotEmpty=function(e){return!i.isEmpty(e)},i.clamp=function(e,t,n){return n<e?e:n>t?t:n},i.clampFinite=function(e){var t=i.INFINITY;return e>+t&&(e=+t),e<-t&&(e=-t),e},i.arrayEmpty=function(e){e.splice(0,e.length)},i.arrayIntersects=function(e,t){return t.some((function(t){return-1!==e.indexOf(t)}))},i.inArray=function(e,t){return-1!==e.indexOf(t)},i.isArray=function(e){return Array.isArray(e)||e instanceof NodeList},i.each=function(e,t){if(i.isArray(e))for(var n=0;n<e.length;n++)t(e[n],n);else for(var r in e)t(e[r],r)},i.equals=function(e,t){return"object"==typeof e?"object"==typeof t&&i.json.stringify(e)===i.json.stringify(t):e===t},i.objectToArray=function(e){var t=[];for(var n in e)t.push(e[n]);return t},i.arrayToObject=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t},i.addFileInput=function(t,n){e.uploader.addFileInput({target:t,onchange:function(t){t.fileInput.value="",t.addMedia({openAsNew:n,self:e.uploader})}})},i.bytesToSize=function(e,t){if(e){t=t||1;var n=Math.floor(Math.log(Math.abs(e))/Math.log(1024));return(e/Math.pow(1024,n)).toFixed(t)+["Bytes","kb","mb","gb","tb"][n]}return"0Bytes"},i.getTimeFormat=function(e,t){var n=(e/=1e3)/3600>>0,r=(e-3600*n)/60>>0,i=e-3600*n-60*r>>0;return t?(n<10&&(n="0"+n),r<10&&(r="0"+r),i<10&&(i="0"+i),n+":"+r+":"+i):{hours:n,minutes:r,seconds:i}},i.require=function(e){"string"==typeof e&&(e={url:e});var t=e.url,n=e.type||(-1!==t.indexOf(".css")?"css":"js"),r=e.async||!1,i=e.onsuccess;if("css"===n)r?setTimeout(o,0):o();else{var a=document.createElement("script");if(a.src=t,a.async=r,i){var s=!1;a.onload=a.onreadystatechange=function(){if(!1===s){var e=a.readyState;e&&!/loaded|complete/.test(e)||(s=!0,i(),a.onload=a.onreadystatechange=null)}}}document.head.appendChild(a)}function o(){var e=document.createElement("link");e.href=t,e.setAttribute("type","text/css"),e.setAttribute("rel","stylesheet"),document.head.appendChild(e)}},i.isEditingText=function(){var e=document.activeElement;if(!e)return!1;var t=e.nodeName;return("INPUT"===t||"TEXTAREA"===t||"true"===e.contentEditable)&&!e.classList.contains("sk-canvas-dummy")},i.pending=function(e,t){var n=e;return{add:function(e){n+=e||1},next:function(){--n||t()}}}},e.exports?e.exports=t.module.DOMMisc:t.module.DOMMisc(galactic)}(galactic)},function(e,t){!function(){"use strict";var e,t={},n={};function r(n){return new Promise((function(r,c){var l=n.format,h=n.codec,u=n.base64,d="audio/"+l+'; codecs="'+h+'"',f="data:"+d+";base64,"+u,p=new Audio;function m(n){function a(e,n,r,i){!t[n]&&(t[n]=i),!t[r]&&(t[r]=i),!e[n]&&(e[n]=i),e[r]=i}a(t.audio,l,h,n),t.audioapi?function(t){return new Promise((function(n,r){(e=e||new i).decodeAudioData(o(t),n,r).then((function(e){})).catch((function(e){})),setTimeout(r,250)}))}(f).then((function(){a(t.audioapi,l,h,!0),r()}),(function(e){a(t.audioapi,l,h,!1),r()})):r()}p.canPlayType(d).replace(/no/i,"")?(p.id="audio",p.controls=!1,p.setAttribute("autobuffer",!0),p.setAttribute("preload","auto"),p.addEventListener("error",(function e(t){var n;a&&!p.testedBlobURL?(p.testedBlobURL=!0,p.src=a((n=f,new Blob([o(n)],{type:s(n)})))):(p.removeEventListener("error",e),m(!1))})),p.addEventListener("canplaythrough",(function e(){p.removeEventListener("canplaythrough",e),m(!0)})),p.src=f,p.load()):m(!1)}))}var i=self.AudioContext||self.mozAudioContext||self.webkitAudioContext,a=(self.URL||self.webkitURL||{}).createObjectURL;function s(e){return(e=e.split(","))[0].split(":")[1].split(";")[0]}function o(e){e=e.split(",");for(var t=atob(e[1]),n=new ArrayBuffer(t.length),r=new Uint8Array(n),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return n}function c(e,t,r){n[e+"_"+t]={format:e,codec:t,base64:r}}c("mpeg","mp3","//MUxAAB6AXgAAAAAPP+c6nf//yi/6f3//MUxAMAAAIAAAjEcH//0fTX6C9Lf//0//MUxA4BeAIAAAAAAKX2/6zv//+IlR4f//MUxBMCMAH8AAAAABYWalVMQU1FMy45//MUxBUB0AH0AAAAADkuM1VVVVVVVVVV//MUxBgBUATowAAAAFVVVVVVVVVVVVVV"),c("ogg","opus","T2dnUwACAAAAAAAAAAAAAAAAAAAAAEVP7KoBE09wdXNIZWFkAQEAD0SsAAAAAABPZ2dTAAAAAAAAAAAAAAAAAAABAAAAVewFUgEYT3B1c1RhZ3MIAAAAUmVjb3JkZXIAAAAAT2dnUwAEwAMAAAAAAAAAAAAAAgAAAHSiY8oBA/j//g=="),c("ogg","vorbis","T2dnUwACAAAAAAAAAAD/QwAAAAAAAM2LVKsBHgF2b3JiaXMAAAAAAUSsAAAAAAAAgLsAAAAAAAC4AU9nZ1MAAAAAAAAAAAAA/0MAAAEAAADmvOe6Dy3/////////////////MgN2b3JiaXMdAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAwNzA2MjIAAAAAAQV2b3JiaXMfQkNWAQAAAQAYY1QpRplS0kqJGXOUMUaZYpJKiaWEFkJInXMUU6k515xrrLm1IIQQGlNQKQWZUo5SaRljkCkFmVIQS0kldBI6J51jEFtJwdaYa4tBthyEDZpSTCnElFKKQggZU4wpxZRSSkIHJXQOOuYcU45KKEG4nHOrtZaWY4updJJK5yRkTEJIKYWSSgelU05CSDWW1lIpHXNSUmpB6CCEEEK2IIQNgtCQVQAAAQDAQBAasgoAUAAAEIqhGIoChIasAgAyAAAEoCiO4iiOIzmSY0kWEBqyCgAAAgAQAADAcBRJkRTJsSRL0ixL00RRVX3VNlVV9nVd13Vd13UgNGQVAAABAEBIp5mlGiDCDGQYCA1ZBQAgAAAARijCEANCQ1YBAAABAABiKDmIJrTmfHOOg2Y5aCrF5nRwItXmSW4q5uacc845J5tzxjjnnHOKcmYxaCa05pxzEoNmKWgmtOacc57E5kFrqrTmnHPGOaeDcUYY55xzmrTmQWo21uaccxa0pjlqLsXmnHMi5eZJbS7V5pxzzjnnnHPOOeecc6oXp3NwTjjnnHOi9uZabkIX55xzPhmne3NCOOecc84555xzzjnnnHOC0JBVAAAQAABBGDaGcacgSJ+jgRhFiGnIpAfdo8MkaAxyCqlHo6ORUuoglFTGSSmdIDRkFQAACAAAIYQUUkghhRRSSCGFFFKIIYYYYsgpp5yCCiqppKKKMsoss8wyyyyzzDLrsLPOOuwwxBBDDK20EktNtdVYY62555xrDtJaaa211koppZRSSikIDVkFAIAAABAIGWSQQUYhhRRSiCGmnHLKKaigAkJDVgEAgAAAAgAAADzJc0RHdERHdERHdERHdETHczxHlERJlERJtEzL1ExPFVXVlV1b1mXd9m1hF3bd93Xf93Xj14VhWZZlWZZlWZZlWZZlWZZlWYLQkFUAAAgAAIAQQgghhRRSSCGlGGPMMeegk1BCIDRkFQAACAAgAAAAwFEcxXEkR3IkyZIsSZM0S7M8zdM8TfREURRN01RFV3RF3bRF2ZRN13RN2XRVWbVdWbZt2dZtX5Zt3/d93/d93/d93/d93/d1HQgNWQUASAAA6EiOpEiKpEiO4ziSJAGhIasAABkAAAEAKIqjOI7jSJIkSZakSZ7lWaJmaqZneqqoAqEhqwAAQAAAAQAAAAAAKJriKabiKaLiOaIjSqJlWqKmaq4om7Lruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7rui4QGrIKAJAAANCRHMmRHEmRFEmRHMkBQkNWAQAyAAACAHAMx5AUybEsS9M8zdM8TfRET/RMTxVd0QVCQ1YBAIAAAAIAAAAAADAkw1IsR3M0SZRUS7VUTbVUSxVVT1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTVN0zRNIDRkJQAABADAYo3B5SAhJSXl3hDCEJOeMSYhtV4hBJGS3jEGFYOeMqIMct5C4xCDHggNWREARAEAAMYgxxBzyDlHqZMSOeeodJQa5xyljlJnKcWYYs0oldhSrI1zjlJHraOUYiwtdpRSjanGAgAAAhwAAAIshEJDVgQAUQAAhDFIKaQUYow5p5xDjCnnmHOGMeYcc44556B0UirnnHROSsQYc445p5xzUjonlXNOSiehAACAAAcAgAALodCQFQFAnACAQZI8T/I0UZQ0TxRFU3RdUTRd1/I81fRMU1U90VRVU1Vt2VRVWZY8zzQ901RVzzRV1VRVWTZVVZZFVdVt03V123RV3ZZt2/ddWxZ2UVVt3VRd2zdV1/Zd2fZ9WdZ1Y/I8VfVM03U903Rl1XVtW3VdXfdMU5ZN15Vl03Vt25VlXXdl2fc103Rd01Vl2XRd2XZlV7ddWfZ903WF35VlX1dlWRh2XfeFW9eV5XRd3VdlVzdWWfZ9W9eF4dZ1YZk8T1U903RdzzRdV3VdX1dd19Y105Rl03Vt2VRdWXZl2fddV9Z1zzRl2XRd2zZdV5ZdWfZ9V5Z13XRdX1dlWfhVV/Z1WdeV4dZt4Tdd1/dVWfaFV5Z14dZ1Ybl1XRg+VfV9U3aF4XRl39eF31luXTiW0XV9YZVt4VhlWTl+4ViW3feVZXRdX1ht2RhWWRaGX/id5fZ943h1XRlu3efMuu8Mx++k+8rT1W1jmX3dWWZfd47hGDq/8OOpqq+brisMpywLv+3rxrP7vrKMruv7qiwLvyrbwrHrvvP8vrAso+z6wmrLwrDatjHcvm4sv3Acy2vryjHrvlG2dXxfeArD83R1XXlmXcf2dXTjRzh+ygAAgAEHAIAAE8pAoSErAoA4AQCPJImiZFmiKFmWKIqm6LqiaLqupGmmqWmeaVqaZ5qmaaqyKZquLGmaaVqeZpqap5mmaJqua5qmrIqmKcumasqyaZqy7LqybbuubNuiacqyaZqybJqmLLuyq9uu7Oq6pFmmqXmeaWqeZ5qmasqyaZquq3meanqeaKqeKKqqaqqqraqqLFueZ5qa6KmmJ4qqaqqmrZqqKsumqtqyaaq2bKqqbbuq7Pqybeu6aaqybaqmLZuqatuu7OqyLNu6L2maaWqeZ5qa55mmaZqybJqqK1uep5qeKKqq5ommaqqqLJumqsqW55mqJ4qq6omea5qqKsumatqqaZq2bKqqLZumKsuubfu+68qybqqqbJuqauumasqybMu+78qq7oqmKcumqtqyaaqyLduy78uyrPuiacqyaaqybaqqLsuybRuzbPu6aJqybaqmLZuqKtuyLfu6LNu678qub6uqrOuyLfu67vqucOu6MLyybPuqrPq6K9u6b+sy2/Z9RNOUZVM1bdtUVVl2Zdn2Zdv2fdE0bVtVVVs2TdW2ZVn2fVm2bWE0Tdk2VVXWTdW0bVmWbWG2ZeF2Zdm3ZVv2ddeVdV/XfePXZd3murLty7Kt+6qr+rbu+8Jw667wCgAAGHAAAAgwoQwUGrISAIgCAACMYYwxCI1SzjkHoVHKOecgZM5BCCGVzDkIIZSSOQehlJQy5yCUklIIoZSUWgshlJRSawUAABQ4AAAE2KApsThAoSErAYBUAACD41iW55miatqyY0meJ4qqqaq27UiW54miaaqqbVueJ4qmqaqu6+ua54miaaqq6+q6aJqmqaqu67q6Lpqiqaqq67qyrpumqqquK7uy7Oumqqqq68quLPvCqrquK8uybevCsKqu68qybNu2b9y6ruu+7/vCka3rui78wjEMRwEA4AkOAEAFNqyOcFI0FlhoyEoAIAMAgDAGIYMQQgYhhJBSSiGllBIAADDgAAAQYEIZKDRkRQAQJwAAGEMppJRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkgppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkqppJRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoplVJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSCgCQinAAkHowoQwUGrISAEgFAACMUUopxpyDEDHmGGPQSSgpYsw5xhyUklLlHIQQUmktt8o5CCGk1FJtmXNSWosx5hgz56SkFFvNOYdSUoux5ppr7qS0VmuuNedaWqs115xzzbm0FmuuOdecc8sx15xzzjnnGHPOOeecc84FAOA0OACAHtiwOsJJ0VhgoSErAYBUAAACGaUYc8456BBSjDnnHIQQIoUYc845CCFUjDnnHHQQQqgYc8w5CCGEkDnnHIQQQgghcw466CCEEEIHHYQQQgihlM5BCCGEEEooIYQQQgghhBA6CCGEEEIIIYQQQgghhFJKCCGEEEIJoZRQAABggQMAQIANqyOcFI0FFhqyEgAAAgCAHJagUs6EQY5Bjw1BylEzDUJMOdGZYk5qMxVTkDkQnXQSGWpB2V4yCwAAgCAAIMAEEBggKPhCCIgxAABBiMwQCYVVsMCgDBoc5gHAA0SERACQmKBIu7iALgNc0MVdB0IIQhCCWBxAAQk4OOGGJ97whBucoFNU6iAAAAAAAAwA4AEA4KAAIiKaq7C4wMjQ2ODo8AgAAAAAABYA+AAAOD6AiIjmKiwuMDI0Njg6PAIAAAAAAAAAAICAgAAAAAAAQAAAAICAT2dnUwAE7AwAAAAAAAD/QwAAAgAAADuydfsFAQEBAQEACg4ODg=="),self.AudioSupports=function(){return t.audio=!!self.Audio&&{},function(){if(navigator.requestMIDIAccess){if(-1!==Function.prototype.toString.call(navigator.requestMIDIAccess).indexOf("[native code]"))return t.midiapi={};for(var e=0;navigator.plugins.length>e;e++){if(navigator.plugins[e].name.indexOf("Jazz-Plugin")>=0)return t.midiapi={}}}t.midiapi=!1}(),t.audioapi=!!i&&{},new Promise((function(e,i){if(!t.audio)return e();setTimeout(e,5e3),Promise.all([r(n.mpeg_mp3),r(n.ogg_opus),r(n.ogg_vorbis)]).then(e)})).then((function(){return t}))},self.AudioSupports.register=c}()},function(e,t){"undefined"==typeof galactic&&(galactic={}),function(e){"use strict";galactic.EventEmitter=function(e){var t=1;function n(e,n){if("function"==typeof n)return e+"."+(n.uniqueId||(n.uniqueId=t++));console.warn(e,"listener does not exist")}function r(t){return e.on[t]?e.on[t]:e.on[t]=function(t){var r={};function i(){var t=!1;for(var n in r)r[n].apply(e,arguments)&&(t=!0);return t}return i.add=function(e){var i=n(t,e);if(void 0===r[i]&&e)return r[i]=e,{add:function(){r[i]=e},remove:function(){delete r[i]}}},i.remove=function(e){var i=n(t,e);void 0!==r[i]&&e&&delete r[i]},i.stack=r,i}(t)}e.on=function(e,t){return r(e).add(t)},e.off=function(t,n){n?r(t).remove(n):delete e.on[t]},e.emit=function(t){var n=e.on[t];if(n){var r=Array.prototype.slice.call(arguments).slice(1);return n.apply(e,r)}}}}()},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";e.DEBUG=!1,e.USE_XHR=!0,e.PATH="./soundfont/",e.DEBUG&&console&&console.log&&console.log("%c♥ MIDI.js 0.4.2 ♥","color: red;");var t={midiapi:0,audioapi:1,audio:2},n={ogg:0,mp3:1};e.setup=function(r){return new Promise((function(i,a){"function"==typeof(r=r||{})&&(r={onsuccess:r}),isFinite(r.debug)&&(e.DEBUG=!!r.debug),r.soundfontUrl&&(e.PATH=r.soundfontUrl),AudioSupports().then((function(s){function o(n){n=n.toLowerCase();var c=e.adaptor.format;function l(e){var r=parseInt(t[n])+1,i=Object.keys(t)[r];i?o(i):a&&a({message:"All plugins failed."})}s[n][c]?(r.tech=n,e.loadProgram(r).then((function(){i()})).catch((function(t){e.DEBUG&&console.error(n,t),l(t)}))):l()}!function(){for(var t in e.adaptor)delete e.adaptor[t];for(var r in n)if(s[r])return e.adaptor.format=r,!0}()?a({message:"MIDIJS: Browser does not have necessary audio support."}):s[location.hash.substr(1)]?o(location.hash.substr(1)):s.midi_api?o("midiapi"):window.AudioContext?o("audioapi"):window.Audio&&o("Audio")}),a)}))},e.loadProgram=function(t){return t||(t={}),"object"==typeof t||(t={instrument:t}),t.instruments=function(){var n=t.instruments||t.instrument||e.channels[0].program;"object"==typeof n?Array.isArray(n)||(n=Object.keys(n)):n=void 0===n?[]:[n];for(var r=0;r<n.length;r++){var i=n[r];if(i>=0){var a=e.getProgram(i);a&&(n[r]=a.nameId)}}0===n.length&&(n=["acoustic_grand_piano"]);return n}(),t.tech=t.tech||e.adaptor.id,e.adaptors._load(t)}}(MIDI)},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";var t=e.adaptor={},n=e.adaptors={},r=n._requests={};n._load=function(a){return i(),"midiapi"===a.tech?n.midiapi.connect(a):function(i){return new Promise((function(e,s){for(var o=t.format.split("_").shift(),c=i.instruments,l=i.onprogress,h=i.tech,u=c.length,d=0;d<u;d++){var f=c[d],p=r[f]||(r[f]={});p.loaded?m([f]):p.loading?p.queue.push(e):(p.queue=[e],p.loading=!0,a(f,o).then((function(e){m(e)})).catch(s))}function m(e){r[e].loading=!1;var t=!1;for(var a in r)r.hasOwnProperty(a)&&r[a].loading&&(t=!0);t||(!function e(t,n){e.progress!==t&&(e.progress=t,l&&l("load",t,n))}(1),n[h].connect(i).then((function(){c.forEach((function(e){for(var t,n=r[e];t=n.queue.pop();)t()}))})).catch(s))}}));function a(t,n,r){return new Promise((function(i,a){var s=e.PATH+t+"-"+n+".js";e.USE_XHR?galactic.request({url:s,format:"text",onerror:a,onprogress:r,onsuccess:function(e,n){var r=document.createElement("script");r.language="javascript",r.type="text/javascript",r.text=n,document.body.appendChild(r),i(t)}}):dom.loadScript.add({url:s,verify:'MIDI.Soundfont["'+t+'"]',onerror:a,onsuccess:i})}))}}(a)};function i(){var n;function r(t,n,r){e.adaptor.id&&(e.player.playing?e.loadProgram(n).then(e.player.start):e.loadProgram(n))}function i(e,t){return{configurable:!0,get:function(){return t},set:function(n){t=n,a(e)}}}function a(n){e.DEBUG&&console.warn("The "+t.id+' adaptor does not support "'+n+'".')}function s(e){return function(){a(e)}}n=performance.now(),Object.defineProperties(e,{currentTime:{configurable:!0,get:function(){return performance.now()-n}}}),e.set=function(t,n,r){if(r)return setTimeout((function(){e[t]=n}),1e3*r);e[t]=n},e.messageHandler={},e.programChange=function(t,n,i){var a=e.getProgram(n);if(a&&Number.isFinite(n=a.id)){var s=e.channels[t];if(s&&s.program!==n){i?setTimeout((function(){s.program=n}),i):s.program=n;var o=e.messageHandler.program||r;o&&o(t,n,i)}}},Object.defineProperties(e,{context:i(null),detune:i("detune",0),fx:i("fx",null),mute:i("mute",!1),volume:i("volume",1)}),e.send=s("send"),e.noteOn=s("noteOn"),e.noteOff=s("noteOff"),e.cancelNotes=s("cancelNotes"),e.setController=s("setController"),e.setEffects=s("setEffects"),e.setPitchBend=s("setPitchBend"),e.setProperty=s("setProperty"),e.setVolume=s("setVolume"),e.iOSUnlock=s("iOSUnlock")}i()}(MIDI)},function(e,t){window.Audio&&function(){"use strict";var e=MIDI.adaptors.audio={},t=[],n=-1,r=[],i={};function a(e,t,n,r){var i,a=MIDI.getNoteName(t);return r?i=setTimeout((function(){l(e,a,n)}),1e3*r):l(e,a,n),{cancel:function(){clearTimeout(i)}}}function s(e,t,n){return{cancel:function(){clearTimeout(void 0)}}}function o(e,t,n,r){for(var i=0;i<t.length;i++){var a=t[i],s=MIDI.getNoteName(a);if(s){if(r)return setTimeout((function(){l(e,s,n)}),1e3*r);l(e,s,n)}}}function c(e,t,n){for(var r=0;r<t.length;r++){var i=t[r],a=MIDI.getNoteName(i);if(a){if(n)return setTimeout((function(){h(e,a)}),1e3*n);h(e,a)}}}function l(e,a,s){var o=MIDI.channels[e];if(o){var c=o.program,l=MIDI.getProgram(c).nameId,h=l+""+a,u=(n+1)%t.length,d=MIDI.Soundfont[l];if(d){var f=t[u];f.src=d[a],f._channel=o,f._volume=s,f._id=h,i.volume(f),f.play(),n=u,r[u]=f}else MIDI.DEBUG&&console.log("404",l)}}function h(e,i){var a=MIDI.channels[e];if(a)for(var s=a.program,o=MIDI.getProgram(s).nameId+""+i,c=0,l=t.length;c<l;c++){var h=(c+n+1)%l,u=r[h];if(u&&u._id===o)return t[h].pause(),void(r[h]=null)}}e.connect=function(e){MIDI.adaptor.id="audio";for(var n=0;n<12;n++)t[n]||(t[n]=new Audio);return function(){function e(e,t,n){return{configurable:!0,get:function(){return t},set:function(r){typeof r===e&&(t=r,n&&n())}}}function t(e){return function(){for(var t in r)i[e](r[t])}}Object.defineProperties(MIDI,{mute:e("boolean",!1,t("volume")),volume:e("number",1,t("volume"))})}(),i.volume=function(e){var t=e._channel;if(MIDI.mute||t.mute)e.volume=0;else{var n=MIDI.volume*t.volume*e._volume;e.volume=Math.min(1,Math.max(-1,2*n))}},MIDI.noteOn=function(e,t,n,r){switch(typeof t){case"number":return a.apply(null,arguments);case"string":break;case"object":return o.apply(null,arguments)}},MIDI.noteOff=function(e,t,n){switch(typeof t){case"number":return s.apply(null,arguments);case"string":break;case"object":return c.apply(null,arguments)}},MIDI.stopAllNotes=function(e){if(isFinite(e));else for(var n=0,r=t.length;n<r;n++)t[n].pause()},new Promise((function(e,t){var n=MIDI.adaptors._requests,r=MIDI.Soundfont;for(var i in r){var a=n[i]||(n[i]={});a.loaded=!0,a.loading=!1}e()}))}}()},function(e,t){window.AudioContext&&function(){"use strict";var e=MIDI.adaptors,t=e.audioapi={},n=((n=new(window.AudioContext||window.webkitAudioContext)).hasDetune=function(){n.createBuffer(1,1,44100);var e=n.createBufferSource();try{return e.detune.value=1200,!0}catch(e){return!1}}(),n),r={},i=e._requests,a={},s={};function o(e,t){var n=s[e];for(var r in n)for(var i=n[r],a=0;a<i.length;a++)t(i,i[a])}t.connect=function(e){return MIDI.adaptor.id="audioapi",function(){function e(e,t,n){return{configurable:!0,get:function(){return t},set:function(r){typeof r===e&&(t=r,n&&n())}}}function t(e){return function(){MIDI.setProperty(e)}}Object.defineProperties(MIDI,{context:{configurable:!0,get:function(){return n},set:function(e){n=e}},detune:e("number",0,t("detune")),fx:e("object",null,t("fx")),mute:e("boolean",!1,t("volume")),volume:e("number",1,t("volume"))}),MIDI.setProperty=function(e,t){if(a[e])if(isFinite(t))"fx"===e&&i(MIDI.channels[t]),r();else for(var t in"fx"===e&&i(MIDI),s)r();function r(){o(t,(function(t,n){a[e](n)}))}function i(e){var t=e.fxNodes||(e.fxNodes={});for(var r in t)t[r].disconnect(n.destination),delete t[r];if(n.tunajs)for(var i=e.fx,a=0;a<i.length;a++){var s=i[a],o=s.type,c=new n.tunajs[o](s);c.connect(n.destination),t[o]=c}else MIDI.DEBUG&&console.error("fx not installed.",arguments)}}}(),a.volume=function(e){var t=e.gainNode.gain,r=e._channel;if(MIDI.mute||r.mute)t.value=0;else{var i=MIDI.volume*r.volume*e._volume;t.value=Math.min(2,Math.max(0,i))}t._fadeout&&(t.cancelScheduledValues(n.currentTime),t.linearRampToValueAtTime(t.value,t._startAt),t.linearRampToValueAtTime(0,t._startAt+.3))},a.detune=function(e){if(n.hasDetune){var t=e._channel,r=MIDI.detune+t.detune;r&&(e.detune.value=r)}},a.fx=function(e){var t=e._channel,n=e.gainNode;function r(e){if(e)for(var t in e){var r=e[t];n.connect(r.input),n=r}}e.disconnect(0),e.connect(n),r(MIDI.fxNodes),r(t.fxNodes)},MIDI.noteOn=function(e,n,r,i){switch(typeof n){case"number":return t.apply(null,arguments);case"string":break;case"object":return l.apply(null,arguments)}},MIDI.noteOff=function(e,t,n){switch(typeof t){case"number":return c.apply(null,arguments);case"string":break;case"object":return h.apply(null,arguments)}},MIDI.cancelNotes=function(e){if(isFinite(e))t(e);else for(var e in s)t(e);function t(e){o(e,(function(e,t){u(e,t)}))}},MIDI.iOSUnlock=function(){if(!0!==n.unlocked){n.unlocked=!0;var e=n.createBuffer(1,1,44100),t=n.createBufferSource();t.buffer=e,t.connect(n.destination),t.start(0)}},"suspended"===n.state&&n.resume(),new Promise((function(e,t){window.Tuna&&(n.tunajs instanceof Tuna||(n.tunajs=new Tuna(n)));var a=MIDI.Soundfont,s=Object.keys(a);for(var o in a){var c=MIDI.getProgram(o);if(c){var l=i[o]||(i[o]={});if(l.loaded)continue;if(l.decoding)l.queue.push(e);else{l.decoding=!0,l.queue.push(e),l.pending=0;var h=a[o];for(var u in h)f(o,c.id,u)}}}function d(){for(var e=0;e<s.length;e++){var t=s[e];if((r=i[t]).pending)return}for(e=0;e<s.length;e++){t=s[e];for(var n,r=i[t];n=r.queue.pop();)n()}}function f(e,t,s){var o=i[e],c=a[e][s];c&&(o.pending++,function(e){return new Promise((function(t,r){if(0===e.indexOf("data:audio"))a(function(e){e=e.split(",");for(var t=atob(e[1]),n=(e[0].split(":")[1].split(";")[0],new ArrayBuffer(t.length)),r=new Uint8Array(n),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return n}(e));else{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(){a(i.response)},i.send()}function a(e){n.decodeAudioData(e,t,r)}}))}(c).then((function(n){n.id=s;var i=MIDI.getNoteNumber(s);r[t+"x"+i]=n,--o.pending||(o.decoding=!1,o.loading=!1,o.loaded=!0,MIDI.DEBUG&&console.log("loaded: ",e),d())})).catch((function(e){MIDI.DEBUG&&console.error("audio could not load",arguments)})))}setTimeout(d,0)}));function t(e,t,i,o){var c;o=o||0;var l=MIDI.volume;if(l){var h=MIDI.channels[e],u=h.program,d=u+"x"+t,f=r[d];f?((c=n.createBufferSource()).buffer=f,c.gainNode=n.createGain(),c.gainNode.connect(n.destination),c._channel=h,c._volume=i,a.volume(c),a.detune(c),a.fx(c),c.start(o+n.currentTime),s[e]=s[e]||{},s[e][t]=s[e][t]||[],s[e][t].push(c),s[e][t].active=c):MIDI.DEBUG&&console.error(["no buffer",arguments])}return{cancel:function(){c&&c.disconnect(0)}}}function c(e,t,n){n=n||0;var r=s[e];if(r){var i=r[t];if(i){var a=i.active;a&&u(i,a,n)}}return{cancel:function(){a&&a.disconnect(0)}}}function l(e,t,n,r){for(var i,a={},s=0,o=t.length;s<o;s++)a[i=t[s]]=MIDI.noteOn(e,i,n,r);return a}function h(e,t,n){for(var r,i={},a=0,s=t.length;a<s;a++)i[r=t[a]]=MIDI.noteOff(e,r,n);return i}function u(e,t,r){var i=(r||0)+n.currentTime,a=t.gainNode.gain;a._fadeout=!0,a._startAt=i,a.linearRampToValueAtTime(a.value,i),a.linearRampToValueAtTime(0,i+.3),t.stop(i+.5),setTimeout((function(){e.shift()}),1e3*r)}}}()},function(e,t){!function(){"use strict";var e,t=MIDI.adaptors.midiapi={},n={},r={};function i(t,r,i,a){return e.send([144+t,r,127*i>>0],1e3*(a||0)),n[t+"x"+r]={_channel:MIDI.channels[t],_volume:i},{cancel:function(){}}}function a(t,r,i){return e.send([128+t,r,0],1e3*(i||0)),delete n[t+"x"+r],{cancel:function(){}}}function s(t,n,r,i){for(var a=0;a<n.length;a++)e.send([144+t,n[a],r],1e3*(i||0))}function o(t,n,r){for(var i=0;i<n.length;i++)e.send([128+t,n[i],0],1e3*(r||0))}function c(t,n,r,i){e.send([t,n,r],1e3*(i||0))}function l(t,n,r){e.send([224+t,n],1e3*(r||0))}function h(t,n,r){e.send([176+t,7,n],1e3*(r||0))}t.connect=function(t){return MIDI.adaptor.id="midiapi",function(){function t(e,t,n){return{configurable:!0,get:function(){return t},set:function(r){typeof r===e&&(t=r,n&&n())}}}function i(e){return function(){for(var t in n)r[e](n[t])}}Object.defineProperties(MIDI,{context:{configurable:!0,set:function(t){e=t},get:function(){return e}},detune:t("number",0,i("detune")),mute:t("boolean",!1,i("volume")),volume:t("number",1,i("volume"))})}(),r.volume=function(e){var t=e._channel;if(MIDI.mute||t.mute)h(t.id,0);else{var n=MIDI.volume*t.volume*e._volume;h(t.id,Math.min(1,Math.max(-1,2*n)))}},r.detune=function(e){var t=e._channel,n=MIDI.detune+t.detune;n&&l(t.id,n)},MIDI.setController=c,MIDI.setPitchBend=l,MIDI.setVolume=h,MIDI.messageHandler.program=function(t,n,r){e.send([192+t,n],1e3*(r||0))},MIDI.send=function(t,n){e.send(t,1e3*(n||0))},MIDI.noteOn=function(e,t,n,r){switch(typeof t){case"number":return i.apply(null,arguments);case"string":break;case"object":return s.apply(null,arguments)}},MIDI.noteOff=function(e,t,n){switch(typeof t){case"number":return a.apply(null,arguments);case"string":break;case"object":return o.apply(null,arguments)}},MIDI.cancelNotes=function(t){if(isFinite(t))e.send([176+t,123,0]);else{e.cancel();for(t=0;t<16;t++)e.send([176+t,123,0])}},new Promise((function(t,n){function r(e){n&&n(e)}navigator.requestMIDIAccess().then((function(n){var i=n.outputs;i.size&&i.forEach((function(t){"connected"===t.state&&"input"===t.type&&(e=t)})),null==e?r({message:"No available outputs."}):t()}),r)}))}}()},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";e.channels=function(t){for(var n=0;n<=15;n++)r(n);return t;function r(r){var i=t[r]={};function a(t,n,i){return{configurable:!0,enumerable:!0,get:function(){return i},set:function(a){typeof a===t&&(i=a,e.setProperty(n,r))}}}i.noteOn=function(t,n,i){return e.noteOn(r,t,n,i)},i.noteOff=function(t,n){return e.noteOff(r,t,n)},i.cancelNotes=function(){return e.cancelNotes(r)},i.set=function(){},Object.defineProperties(i,{id:{value:n,enumerable:!0,writable:!0},program:{value:n,enumerable:!0,writable:!0},volume:a("number","volume",1),mute:a("boolean","volume",!1),mono:a("boolean","*",!1),omni:a("boolean","*",!1),solo:a("boolean","*",!1),detune:a("number","detune",0),fx:a("object","fx",null)})}}({})}(MIDI)},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";function t(e){return e.replace(/[^a-z0-9_ ]/gi,"").replace(/[ ]/g,"_").toLowerCase()}e.getProgram=function(n){return"string"==typeof n?e.getProgram.byName[t(n)]:e.getProgram.byId[n]},function(n){var r=e.GM={},i=e.getProgram.byId={},a=e.getProgram.byName={};for(var s in n)for(var o=n[s],c=0,l=o.length;c<l;c++){var h=o[c];if(h){var u=parseInt(h.substr(0,h.indexOf(" ")),10),d=h.replace(u+" ",""),f=t(d),p=t(s),m={id:--u,name:d,nameId:f,category:s};i[u]=m,a[f]=m,r[p]=r[p]||[],r[p].push(m)}}}({Piano:["1 Acoustic Grand Piano","2 Bright Acoustic Piano","3 Electric Grand Piano","4 Honky-tonk Piano","5 Electric Piano 1","6 Electric Piano 2","7 Harpsichord","8 Clavinet"],"Chromatic Percussion":["9 Celesta","10 Glockenspiel","11 Music Box","12 Vibraphone","13 Marimba","14 Xylophone","15 Tubular Bells","16 Dulcimer"],Organ:["17 Drawbar Organ","18 Percussive Organ","19 Rock Organ","20 Church Organ","21 Reed Organ","22 Accordion","23 Harmonica","24 Tango Accordion"],Guitar:["25 Acoustic Guitar (nylon)","26 Acoustic Guitar (steel)","27 Electric Guitar (jazz)","28 Electric Guitar (clean)","29 Electric Guitar (muted)","30 Overdriven Guitar","31 Distortion Guitar","32 Guitar Harmonics"],Bass:["33 Acoustic Bass","34 Electric Bass (finger)","35 Electric Bass (pick)","36 Fretless Bass","37 Slap Bass 1","38 Slap Bass 2","39 Synth Bass 1","40 Synth Bass 2"],Strings:["41 Violin","42 Viola","43 Cello","44 Contrabass","45 Tremolo Strings","46 Pizzicato Strings","47 Orchestral Harp","48 Timpani"],Ensemble:["49 String Ensemble 1","50 String Ensemble 2","51 Synth Strings 1","52 Synth Strings 2","53 Choir Aahs","54 Voice Oohs","55 Synth Choir","56 Orchestra Hit"],Brass:["57 Trumpet","58 Trombone","59 Tuba","60 Muted Trumpet","61 French Horn","62 Brass Section","63 Synth Brass 1","64 Synth Brass 2"],Reed:["65 Soprano Sax","66 Alto Sax","67 Tenor Sax","68 Baritone Sax","69 Oboe","70 English Horn","71 Bassoon","72 Clarinet"],Pipe:["73 Piccolo","74 Flute","75 Recorder","76 Pan Flute","77 Blown Bottle","78 Shakuhachi","79 Whistle","80 Ocarina"],"Synth Lead":["81 Lead 1 (square)","82 Lead 2 (sawtooth)","83 Lead 3 (calliope)","84 Lead 4 (chiff)","85 Lead 5 (charang)","86 Lead 6 (voice)","87 Lead 7 (fifths)","88 Lead 8 (bass + lead)"],"Synth Pad":["89 Pad 1 (new age)","90 Pad 2 (warm)","91 Pad 3 (polysynth)","92 Pad 4 (choir)","93 Pad 5 (bowed)","94 Pad 6 (metallic)","95 Pad 7 (halo)","96 Pad 8 (sweep)"],"Synth Effects":["97 FX 1 (rain)","98 FX 2 (soundtrack)","99 FX 3 (crystal)","100 FX 4 (atmosphere)","101 FX 5 (brightness)","102 FX 6 (goblins)","103 FX 7 (echoes)","104 FX 8 (sci-fi)"],Ethnic:["105 Sitar","106 Banjo","107 Shamisen","108 Koto","109 Kalimba","110 Bagpipe","111 Fiddle","112 Shanai"],Percussive:["113 Tinkle Bell","114 Agogo","115 Steel Drums","116 Woodblock","117 Taiko Drum","118 Melodic Tom","119 Synth Drum","129 Percussion"],"Sound effects":["120 Reverse Cymbal","121 Guitar Fret Noise","122 Breath Noise","123 Seashore","124 Bird Tweet","125 Telephone Ring","126 Helicopter","127 Applause","128 Gunshot"]}),function(){for(var t=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],n={},r={},i=21;i<=108;i++){var a=t[i%12]+((i-12)/12>>0);n[a]=i,r[i]=a}e.getNoteName=function(e){return e in n?e:e in r?r[e]:void 0},e.getNoteNumber=function(e){return e in r?e:e in n?n[e]:void 0}}()}(MIDI)},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),MIDI.player=new function(){"use strict";var e=this;galactic.EventEmitter(e);var t,n,r,i={},a=[],s={};function o(r,h){if(!(r>e.duration)){if(h){e.playing?c():e.playing=!0;var d=(v=function(e){for(var t=0,n=s.length,r=0;r<n;r++){var i=s[r][1];if(!(t+i<e))break;t+=i}return{idx:r,time:t}}(r)).idx,f=n=v.time}else d=t,f=n;for(var p=r-e.currentTime,m=0,g=s.length;d<g&&m<=20;){var v=s[d];t=++d,n+=v[1],r=n-f;var b=v[0].event,y=b.type,w=b.subtype;if(u[w])switch(y){case"channel":x();break;case"meta":k()}}}function k(){w}function x(){var t=b.channel,i=MIDI.channels[t],s=Math.max(0,(r+p)/1e3);switch(w){case"controller":MIDI.setController(t,b.controllerType,b.value,s);break;case"programChange":var o=b.programNumber;(function(t){var n=MIDI.getProgram(t);return n&&e.instruments[n.nameId]})(o)&&MIDI.programChange(t,o,s);break;case"pitchBend":var c=b.value;MIDI.setPitchBend(t,c,s);break;case"noteOn":var l=T(b.noteNumber);a.push({promise:i.noteOn(l,b.velocity/127,s),timeout:A(b,l,n,s)}),m++;break;case"noteOff":l=T(b.noteNumber);a.push({promise:i.noteOff(l,s),timeout:A(b,l,n,s)}),m++}}function A(t,r,s,c){return setTimeout((function(){var s=galactic.util.copy(t);s.noteNumber=r,e.emit("event",s),a.shift();var c=s.channel+"x"+s.noteNumber;switch(s.subtype){case"noteOn":i[c]=s;break;case"noteOff":delete i[c]}a.length<=100&&o(n)}),1e3*c)}function T(t){return l(0,127,t+e.transpose)}}function c(){if(e.playing){for(e.playing=!1;a.length;){var t=a.pop();t&&(t.promise&&t.promise.cancel(),clearTimeout(t.timeout))}for(var n in i){var r=i[n];e.emit("event",{channel:r.channel,noteNumber:r.noteNumber,status:r.status-16,subtype:"noteOff",type:"channel"})}}}function l(e,t,n){return n<e?e:n>t?t:n}function h(){r&&(s=Replayer(MidiFile(r),e.bpm)),e.duration=function(){for(var e=s.length,t=0,n=0;n<e;n++)t+=s[n][1];return t}()}!function(){var t=0,n=!1,i=0;function a(t,n){return{get:function(){return t},set:function(i){Number.isFinite(i)&&(t=i,n&&r&&(e.stop(),h(),o(0,!0)))}}}function s(n){i=performance.now(),t=l(0,e.duration,n)}Object.defineProperties(e,{bpm:a(null,!0),warp:a(1,!0),transpose:a(0,!0),currentTime:{get:function(){return e.playing?t+(performance.now()-i):t},set:function(e){Number.isFinite(e)&&s(e)}},duration:a(0,!1),playing:{get:function(){return n},set:function(t){s(e.currentTime),n=t}}})}(),e.start=function(t){c(),e.currentTime=t,o(e.currentTime,!0)},e.stop=function(){c(),e.currentTime=0},e.pause=function(){c()},e.setAnimation=function(t){var n=0,r=0,i=0;e.clearAnimation(),requestAnimationFrame((function a(){if(e.frameId=requestAnimationFrame(a),e.duration){e.playing?(n=i===e.currentTime?r-Date.now():0,n=0===e.currentTime?0:e.currentTime-n,i!==e.currentTime&&(r=Date.now(),i=e.currentTime)):n=e.currentTime;var s=e.duration,o=n/1e3,c=o/60,l=60*c+(o-60*c),h=s/1e3;if(h-l<-1)return;var u=Math.min(1,l/h);u!==t.progress&&(t.progress=u,t({progress:u,currentTime:l,duration:h}))}}))},e.clearAnimation=function(){e.frameId&&cancelAnimationFrame(e.frameId)};var u={controller:!0,noteOff:!0,noteOn:!0,pitchBend:!0,setTempo:!0,programChange:!0};e.handleEvent=function(e,t){u[e]=t},e.load=function(t){return new Promise((function(n,i){"string"==typeof t&&(t={src:t});var a=t.src,o=t.onprogress;function c(){try{h(),e.instruments=function(){for(var e={},t={},n=0;n<s.length;n++){var r=s[n][0].event;if("channel"===r.type){var i=r.channel;switch(r.subtype){case"programChange":t[i]=r.programNumber;break;case"noteOn":var a=t[i];if(Number.isFinite(a)){if(u.programChange)var o=MIDI.getProgram(a);else i=MIDI.channels[i],o=MIDI.getProgram(i.program);e[o.nameId]=!0}}}}return e}(),MIDI.setup({instruments:e.instruments,onprogress:o}).then((function(e){n(e)})).catch((function(e){i(e)}))}catch(e){i&&i(e)}}e.stop(),t.events?(s=t.events,r=void 0,c()):-1!==a.indexOf("base64,")?(r=atob(a.split(",")[1]),c()):galactic.request({url:a,mimeType:"text/plain; charset=x-user-defined",onerror:function(){i&&i("Unable to load MIDI file: "+a)},onsuccess:function(e,t){r=function(e){for(var t=[],n=String.fromCharCode,r=0,i=e.length;r<i;r++)t[r]=n(255&e.charCodeAt(r));return t.join("")}(t),c()}})}))}}},function(e,t,n){var r,i=n(94),a=n(95);!function(){"use strict";function e(e){return 60+e}r=function(t,n){void 0===n&&(n={});var r=t.setUpAudio(n),s=a(),o=new i,c=t.metaText?t.metaText.title:void 0;c&&c.length>128&&(c=c.substring(0,124)+"...");var l=t.getKeySignature(),h=t.getMeterFraction();s.setGlobalInfo(r.tempo,c,l,h),o.setGlobalInfo(r.tempo,c);for(var u=0;u<r.tracks.length;u++){s.startTrack(),o.startTrack();for(var d=0;d<r.tracks[u].length;d++){var f=r.tracks[u][d];switch(f.cmd){case"text":s.setText(f.type,f.text);break;case"program":s.setChannel(f.channel),s.setInstrument(f.instrument),o.setChannel(f.channel),o.setInstrument(f.instrument);break;case"start":s.startNote(e(f.pitch),f.volume),o.startNote(e(f.pitch),f.volume);break;case"stop":s.endNote(e(f.pitch)),o.endNote(e(f.pitch));break;case"move":s.addRest(1920*f.duration),o.addRest(1920*f.duration);break;default:console.log("MIDI create Unknown: "+f.cmd)}}s.endTrack(),o.endTrack()}var p=s.getData(),m=o.getData();return void 0===n.generateInline&&(n.generateInline=!0),n.generateInline&&n.generateDownload?{download:p,inline:m}:n.generateInline?m:p}}(),e.exports=r},function(e,t){var n;!function(){"use strict";(n=function(){this.tempo=0,this.timeFactor=0,this.output=[],this.currentChannel=0,this.currentInstrument=0,this.track=0,this.nextDuration=0,this.tracks=[[]]}).prototype.setInstrument=function(e){this.currentInstrument=e;var t=[{ticksToEvent:0,track:this.track,event:{channel:this.currentChannel,deltaTime:0,programNumber:this.currentInstrument,subtype:"programChange",type:"channel"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(t)},n.prototype.setChannel=function(e){this.currentChannel=e},n.prototype.startTrack=function(){this.track++,this.tracks[this.track]=[],this.nextDuration=0},n.prototype.setGlobalInfo=function(e,t){this.tempo=e;var n=Math.round(1/e*6e7);this.timeFactor=n/48e4;this.track,this.nextDuration,this.timeFactor;this.track,this.nextDuration,this.timeFactor,this.track,this.nextDuration,this.timeFactor},n.prototype.startNote=function(e,t){var n=5*Math.floor(this.nextDuration/5),r=[{ticksToEvent:n,track:this.track,event:{deltaTime:n,channel:this.currentChannel,type:"channel",noteNumber:e,velocity:t,subtype:"noteOn"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(r),this.nextDuration=0},n.prototype.endNote=function(e){var t=5*Math.floor(this.nextDuration/5),n=[{ticksToEvent:t,track:this.track,event:{deltaTime:t,channel:this.currentChannel,type:"channel",noteNumber:e,velocity:0,subtype:"noteOff"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(n),this.nextDuration=0},n.prototype.addRest=function(e){this.nextDuration+=e},n.prototype.endTrack=function(){this.track},n.prototype.getData=function(){return function(e){!function(e){for(var t=0;t<e.length;t++)for(var n=0,r=0;r<e[t].length;r++)n+=e[t][r][1],e[t][r].absTime=n}(e);var t=function(e){for(var t=[],n=0;n<e.length;n++)for(var r=0;r<e[n].length;r++)t.push(e[n][r]);return t}(e);return function(e){for(var t=0,n=0;n<e.length;n++){var r=e[n].absTime;e[n][1]=r-t,t=r}}(t=function(e){return e.sort((function(e,t){if(e.absTime>t.absTime)return 1;if(e.absTime===t.absTime&&e.length>0&&t.length>0&&e[0].event&&t[0].event){var n=e[0].event.channel,r=t[0].event.channel;if(n>r)return 1;if(n<r)return-1;if("programChange"===t[0].event.subtype)return 1}return-1}))}(t)),t}(this.tracks)}}(),e.exports=n},function(e,t){var n;!function(){"use strict";function e(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n]);return e}function t(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}function r(e,t){for(var n="",r=0;r<e.length;r++)n+=i(e.charCodeAt(r),2);return"%00%FF"+t+i(n.length/3,2)+n}function i(e,t){for(var n=e.toString(16);n.length<t;)n="0"+n;return 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=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 a=n[r];0!==r&&(a|=128),t|=a}var s=t.toString(16).length;return i(t,s+=s%2)}t.prototype.setTempo=function(e){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+i(Math.round(6e7/e),6),this.endTrack())},t.prototype.setGlobalInfo=function(e,t,n,a){if(0===this.trackcount){this.startTrack();var s=Math.round(6e7/e);this.track+="%00%FF%51%03"+i(s,6),n&&(this.track+=function(e){if(!e||!e.accidentals)return"";for(var t=0,n=256,r=0;r<e.accidentals.length;r++)"sharp"===e.accidentals[r].acc?t++:"flat"===e.accidentals[r].acc&&n--;var a=i(256!==n?n:t,2),s="m"===e.mode?"%01":"%00";return"%00%FF%59%02"+a+s}(n)),a&&(this.track+=function(e){var t,n="%00%FF%58%04"+i(e.num,2),r={1:0,2:1,4:2,8:3,16:4,32:5}[e.den];if(!r)return"";switch(n+=i(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+=i(t,2))+"%08":""}(a)),t&&(this.track+=r(t,"%01")),this.endTrack()}},t.prototype.startTrack=function(){this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},t.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var e=i(this.track.length/3+4,8);this.track="MTrk"+e+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},t.prototype.setText=function(e,t){switch(e){case"name":this.trackName=r(t,"%03")}},t.prototype.setInstrument=function(e){this.trackInstrument="%00%C0"+i(e,2),this.instrument=e},t.prototype.setChannel=function(e){this.channel=e,this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)},t.prototype.startNote=function(e,t){this.track+=a(this.silencelength),this.silencelength=0,this.track+=this.noteOnAndChannel,this.track+="%"+e.toString(16)+i(t,2)},t.prototype.endNote=function(e){this.track+=a(this.silencelength),this.silencelength=0,this.track+=this.noteOffAndChannel,this.track+="%"+e.toString(16)+"%00"},t.prototype.addRest=function(e){this.silencelength+=e,this.silencelength<0&&(this.silencelength=0)},t.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+i(this.trackcount,4)+"%01%e0"+this.trackstrings},t.prototype.embed=function(t,n){var r=this.getData(),i=e(document.createElement("a"),{href:r});if(i.innerHTML="download midi",t.insertBefore(i,t.firstChild),!n){var a=e(document.createElement("embed"),{src:r,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});t.insertBefore(a,t.firstChild)}},n=function(){return new t}}(),e.exports=n}]);