Home
last modified time | relevance | path

Searched refs:O (Results 1 – 25 of 481) sorted by path

12345678910>>...20

/plugin/a2s/
H A Ddemo.txt3 ….com/dhobsd/asciitosvg|ASCIIToSVG]] by [[https://github.com/dhobsd|Devon H. O'Dell]]. It is very s…
77 * ''+'' and ''o'' (lower case letter O) are used to connect lines of different orientation.
/plugin/abc/conf/
H A Dentities.conf16 Ò \`O
/plugin/abc2/abc-libraries/abc-ui/
H A Dabc-ui-1.0.0.min.js8 function external_eval(param){return eval(param)}function isQuoted(e){return e.q}function quote(e){return e.q=!0,e}function unquote(e){return delete e.q,e}function Symbol(e){return this.nm=e,this}function isSymbol(e){return e&&e.constructor===Symbol}function symbolName(e){return e.nm}function isArray(e){return e&&e.constructor===Array}function inDs(e,t){for(var n=e.length-1;0<=n;--n)if("undefined"!=typeof e[n][t])return e[n];return!1}function member(e,t){return 0<=t.indexOf(e)}function PsParser(){function t(t){e.L=t,e.N=t.length,e.I=0,e.D=0}function n(){return e.I<e.N&&e.L[e.I]}function r(){return e.I<e.N&&e.L[e.I++]}function i(){while(e.I<e.N&&member(e.L[e.I]," \n"))e.I++}function s(){while("%"==n()){while(n()&&"\n"!=n())r();i()}}function o(){r();var e=[],t=1;while(0<t&&n()){var i=r();switch(i){case"(":t++;break;case")":t--,t<=0&&(i=!1);break;case"\\":i=r();switch(i){case"(":break;case")":break;case"\\":break;case"n":i="\n";break;case"r":i="\r";break;case"t":i=" ";break;default:i=!1}}i!==!1&&e.push(i)}return e.join("")}function u(){var e=r();if(member(e,"()<>/% \n"))throw new Error("Symbol expected, got "+e);var t=member(e,"+-0123456789."),i="."==e,s=[e];while(n()&&!member(n(),"()<>[]{}/% \n"))e=r(),s.push(e),t&&!member(e,"0123456789")&&(!i&&"."==e?i=!0:t=!1);return s=s.join(""),1==s.length&&member(s,"+-.")&&(t=!1),t?i?parseFloat(s):parseInt(s,10):new Symbol(s)}function a(){i();switch(n()){case!1:return undefined;case"%":return s();case"[":return new Symbol(r());case"]":return new Symbol(r());case"{":return e.D++,new Symbol(r());case"}":return e.D--,new Symbol(r());case"/":r();var t=u();return quote(t);case"(":return o();case"<":r();if("<"!=n())throw new Error("Encoded strings not implemented yet");return r(),new Symbol("<<");case">":r();if(">"!=n())throw new Error("Unexpected >");return r(),new Symbol(">>");default:return u()}}var e=this;return PsParser.prototype.init=t,PsParser.prototype.peek=n,PsParser.prototype.token=a,this}function Ps0(e,t,n){function r(i,s){if(isSymbol(i)&&!isQuoted(i)){var o=symbolName(i),u=inDs(t,o);if(!u)throw new Error("bind error '"+o+"'");n.push([!1,u[o]])}else if(s&&isArray(i)&&isQuoted(i)){if(0<i.length){var a=i[0],f=quote(i.slice(1));0<f.length&&n.push([!1,f]),r(a,!1)}}else"function"==typeof i?i():e.push(i)}function i(){var t=e.pop();r(t,!1)}function s(){var t=n.pop(),i=t.shift(),s=t.pop();for(var o=0;o<t.length;o++)e.push(t[o]);r(s,!0)}function u(t){o.init(t);while(o.peek()){var r=o.token();if(r||r===0){e.push(r);if(o.D<=0||isSymbol(r)&&(member(symbolName(r),"[]{}")||"<<"==symbolName(r)||">>"==symbolName(r))){i();while(0<n.length)s()}}}return e}var o=new PsParser;return Ps0.prototype.run=r,Ps0.prototype.exec=i,Ps0.prototype.step=s,Ps0.prototype.parse=u,this}function Wps(e){function f(e){if(isSymbol(e)&&!isQuoted(e))return e;if(isArray(e)&&isQuoted(e)){var t=e.length,n=[];for(var r=0;r<t;r++){var i=e[r],s=f(i);isArray(i)?n=n.concat(isQuoted(i)?quote([s]):[s]):n=n.concat(s)}return quote(n)}return e}function l(){var e=arguments;if(e.length)for(var t=0;t<e.length;t++)o.parse(e[t]);else o.parse(e);return n}var t=e,n=[],r={},i=[r],s=[],o=new Ps0(n,i,s);r["true"]=function(){n.push(!0)},r["false"]=function(){n.push(!1)},r["null"]=function(){n.push(null)},r.sub=function(){var e=n.pop();n.push(n.pop()-e)},r.mul=function(){n.push(n.pop()*n.pop())},r.div=function(){var e=n.pop();n.push(n.pop()/e)},r.mod=function(){var e=n.pop();n.push(n.pop()%e)};var u={};r.mark=function(){n.push(u)},r.counttomark=function(){var e=0;for(var t=n.length-1;0<=t;t--){if(u===n[t])return n.push(e);e++}throw new Error("Mark not found")},r["<<"]=r.mark,r[">>"]=function(){var e={};while(0<n.length){var t=n.pop();if(u===t)return n.push(e);e[n.pop()]=t}throw new Error("Mark not found")},r.exch=function(){var e=n.pop(),t=n.pop();n.push(e),n.push(t)},r.clear=function(){n.length=0},r.pop=function(){n.pop()},r.index=function(){n.push(n[n.length-2-n.pop()])},r.roll=function(){var e=n.pop(),t=n.pop(),r=[],i=[];e<0&&(e=t+e);for(var s=0;s<t;s++)s<e?r.unshift(n.pop()):i.unshift(n.pop());for(s=0;s<e;s++)n.push(r.shift());for(s=0;s<t-e;s++)n.push(i.shift())},r.copy=function(){var e=n.pop();if("object"==typeof e){var t=n.pop();for(var r in t)e[r]=t[r];n.push(e)}else{var t=n.length-e;for(var r=0;r<e;r++)n.push(n[t+r])}},r.length=function(){n.push(n.pop().length)},r.astore=function(){var e=n.pop(),t=e.length;for(var r=t-1;0<=r;r--)e[r]=n.pop();n.push(e)},r.array=function(){n.push(new Array(n.pop()))},r.eq=function(){var e=n.pop(),t=n.pop();n.push(t==e)},r.lt=function(){var e=n.pop(),t=n.pop();n.push(t<e)},r.ifelse=function(){var e=n.pop(),t=n.pop(),r=n.pop();s.push([!1,r===!0?t:e])},r.and=function(){var e=n.pop(),t=n.pop();if(!0===e||!1===e){n.push(e==1&&t===!0);return}n.push(e&t)},r.repeat=function c(){var e=n.pop(),t=n.pop();1<t&&s.push([!0,t-1,e,c]),0<t&&s.push([!1,e])},r["for"]=function h(){var e=n.pop(),t=n.pop(),r=n.pop(),i=n.pop();r<0?(t<=i+r&&s.push([!0,i+r,r,t,e,h]),t<=i&&s.push([!1,i,e])):(i+r<=t&&s.push([!0,i+r,r,t,e,h]),i<=t&&s.push([!1,i,e]))},r.exec=function(){s.push([!1,n.pop()])},r.cvx=function(){var e=n.pop();isSymbol(e)&&isQuoted(e)?n.push(unquote(e)):isArray(e)&&!isQuoted(e)?n.push(quote(e)):n.push(e)},r.dict=function(){n.pop(),n.push({})},r.get=function(){var e=n.pop(),t=n.pop();isSymbol(e)?n.push(t[symbolName(e)]):n.push(t[e])},r.getinterval=function(){var e=n.pop(),t=n.pop()+e,r=n.pop(),i=[];while(--e>=0)i.push(r[t++]);n.push(i)},r.put=function(){var e=n.pop(),t=n.pop(),r=n.pop();isSymbol(t)?r[symbolName(t)]=e:r[t]=e},r.begin=function(){i.push(n.pop())},r.end=function(){i.pop()},r.currentdict=function(){n.push(i[i.length-1])},r.where=function(){var e=symbolName(n.pop()),t=inDs(i,e);t?(n.push(t),n.push(!0)):n.push(!1)},r.save=function(){var e=i.slice();for(var t=0;t<e.length;t++){var r=e[t],s={};for(var o in r)s[o]=r[o];e[t]=s}n.push(e)},r.restore=function(){var e=n.pop();while(0<i.length)i.pop();while(0<e.length)i.unshift(e.pop())},r.type=function(){var e=n.pop(),t;if(null===e)t="nulltype";else if(!0===e||!1===e)t="booleantype";else if(u===e)t="marktype";else if("string"==typeof e)t="stringtype";else if(isSymbol(e))t=isQuoted(e)?"nametype":"operatortype";else if("function"==typeof e)t="operatortype";else if(isArray(e))t="arraytype";else if("object"==typeof e)t="dicttype";else{if(1*e!=e)throw new Error("Undefined type '"+e+"'");t=e%1==0?"integertype":"realtype"}n.push(t)};var a=!0;return r[".strictBind"]=function(){a=!0===n.pop()},r.bind=function(){n.push(f(n.pop()))},r["="]=function(){var e=n.pop();alert(e&&e.nm||e)},r["=="]=function(){alert(n.pop())},r.stack=function(){alert(n)},r.pstack=function(){alert(n)},r[".call"]=function(){var e=n.pop(),t=n.pop(),r=n.pop(),i=[];for(var s=0;s<e;s++)i.unshift(n.pop());if(!r[t])throw new Error(".call: "+t+" undef");n.push(r[t].apply(r,i))},r[".call0"]=function(){var e=n.pop(),t=n.pop(),r=n.pop(),i=[];for(var s=0;s<e;s++)i.unshift(n.pop());if(!r[t])throw new Error(".call0: "+t+" undef");r[t].apply(r,i)},r[".svg"]=function(){n.push(t)},r[".math"]=function(){n.push(Math)},r[".date"]=function(){n.push(new Date)},r[".window"]=function(){n.push(window)},r[".callback"]=function(){var e=n.pop();n.push(function(){o.run(e,!0);while(0<s.length)o.step()})},r[".minv"]=function(){var e=n.pop(),t=e[0],r=e[1],i=e[2],s=e[3],o=e[4],u=e[5];n.push([s,r,i,t,i*u-s*o,r*o-t*u])},r[".mmul"]=function(){var e=n.pop(),t=n.pop(),r=t[0],i=t[1],s=t[2],o=t[3],u=t[4],a=t[5],f=e[0],l=e[1],c=e[2],h=e[3],p=e[4],d=e[5];n.push([r*f+i*c,r*l+i*h,s*f+o*c,s*l+o*h,u*f+a*c+p,u*l+a*h+d])},r[".xy"]=function(){var e=n.pop(),t=n.pop(),r=n.pop();n.push(e[0]*r+e[2]*t+e[4]),n.push(e[1]*r+e[3]*t+e[5])},r[".rgb"]=function(){var e=n.pop(),t=n.pop(),r=n.pop();n.push("rgb("+r+","+t+","+e+")")},r[".rgba"]=function(){var e=n.pop(),t=n.pop(),r=n.pop(),i=n.pop();n.push("rgba("+i+","+r+","+t+","+e+")")},Wps.prototype.parse=l,this}function Psvg(e){function d(){return w(0),[o.xoffs-o.xorig,o.yoffs-o.yorig]}function v(){s=!1,w(0),t+="<g";if(o.xscale!=1||o.yscale!=1||o.rotate){t+=' transform="';if(o.xscale!=1||o.yscale!=1)o.xscale==o.yscale?t+="scale("+o.xscale.toFixed(3)+")":t+="scale("+o.xscale.toFixed(3)+","+o.yscale.toFixed(3)+")";if(o.rotate){if(o.xoffs||o.yoffs){var e,n=o.xoffs,r=o.yoffs,u=o.sin,l=o.cos;e=n*l-r*u,r=n*u+r*l,t+=" translate("+e.toFixed(2)+","+r.toFixed(2)+")",a=o.xoffs,f=o.yoffs,o.xoffs=0,o.yoffs=0}t+=" rotate("+o.rotate.toFixed(2)+")"}t+='"'}g(!1),o.rgb&&(t+=' style="color:'+o.rgb+'"'),t+=">\n",i=1}function m(e){var t,n=new e.constructor;for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function g(e){var n=o.font_n;if(!n)return;var r="",i=n.indexOf("Italic"),s=100,u=n.indexOf("Oblique"),a=n.indexOf("Bold"),f=0;a>0&&(r=' font-weight="bold"',s=a,f=2);if(i>0||u>0)i>0&&(r+=' font-style="italic"',i<s&&(s=i),f|=4),u>0&&(r+=' font-style="oblique"',u<s&&(s=u),f=8);s!=100&&(n[s-1]=="-"&&s--,n=n.slice(0,s)),e&&(!(f&2)&&c.indexOf("Bold")>=0&&(r+=' font-weight="normal"'),!(f&12)&&(c.indexOf("Italic")>=0||c.indexOf("Oblique")>=0)&&(r+=' font-style="normal"')),t+=' font-family="'+n+'"'+r+' font-size="'+o.font_s+'"'}function y(){if(p)return;w(1),o.px=o.cx,o.py=o.cy,p='<path d="m'+(o.xoffs+o.cx).toFixed(2)+" "+(o.yoffs-o.cy).toFixed(2)+"\n"}function b(){t+=p,p=""}function w(e){i==2&&(t+="</text>\n",i=1),e==0?i&&(i=0,t+="</g>\n",o.rotate&&(o.xoffs=a,o.yoffs=f,a=0,f=0)):s&&v()}function E(e){return e.length*o.font_s*.5}function S(e,t,n,r,i,s){var u,a,f,l;r>=360&&(r-=360),i>=360&&(i-=360),u=e+n*Math.cos(r*Math.PI/180),a=t+n*Math.sin(r*Math.PI/180),o.cx!=undefined?p?(u!=o.cx||a!=o.cy?p+="l":p+="m",p+=(u-o.cx).toFixed(2)+" "+(-(a-o.cy)).toFixed(2)):(o.cx=u,o.cy=a,y()):(p&&(p=""),o.cx=u,o.cy=a,y()),r==i?(i=180-r,f=e+n*Math.cos(i*Math.PI/180),l=t+n*Math.sin(i*Math.PI/180),p+="a"+n.toFixed(2)+" "+n.toFixed(2)+" 0 0 "+(s?"1 ":"0 ")+(f-u).toFixed(2)+" "+(a-l).toFixed(2)+" "+n.toFixed(2)+" "+n.toFixed(2)+" 0 0 "+(s?"1 ":"0 ")+(u-f).toFixed(2)+" "+(l-a).toFixed(2)+"\n",o.cx=u,o.cy=a):(f=e+n*Math.cos(i*Math.PI/180),l=t+n*Math.sin(i*Math.PI/180),p+="a"+n.toFixed(2)+" "+n.toFixed(2)+" 0 0 "+(s?"1 ":"0 ")+(f-u).toFixed(2)+" "+(a-l).toFixed(2)+"\n",o.cx=f,o.cy=l)}function x(e,t){y(),e==0?p+=" v"+(-t).toFixed(2)+"\n":t==0?p+=" h"+e.toFixed(2)+"\n":p+=" l"+e.toFixed(2)+" "+(-t).toFixed(2)+"\n",o.cx+=e,o.cy+=t}function T(e){e&&w(0);if(!t)return;n.out_svg(t),t=""}function N(e,t,i,s){return o.xorig=o.xoffs=n.sx(0),o.yorig=o.yoffs=n.sy(0),o.cx=0,o.cy=0,r.parse(s+(t/n.stv_g().scale).toFixed(2)+" "+i.toFixed(2)+" "+e),T(!0),!0}var t="",n=e,r=new Wps(this),i=0,s,o={cx:0,cy:0,xoffs:0,yoffs:0,xscale:1,yscale:1,rotate:0,sin:0,cos:1,linewidth:.7,dash:""},u=[],a=0,f=0,l="",c="",h=0,p;Psvg.prototype.strw=E,Psvg.prototype.arc=S,Psvg.prototype.arcn=function(e,t,n,r,i){S(e,t,n,r,i,!0)},Psvg.prototype.closepath=function(){p&&o.cx&&x(o.px-o.cx,o.py-o.cy)},Psvg.prototype.cx=function(){return o.cx},Psvg.prototype.cy=function(){return o.cy},Psvg.prototype.curveto=function(e,t,n,r,i,s){y(),p+=" C"+(o.xoffs+e).toFixed(2)+" "+(o.yoffs-t).toFixed(2)+" "+(o.xoffs+n).toFixed(2)+" "+(o.yoffs-r).toFixed(2)+" "+(o.xoffs+i).toFixed(2)+" "+(o.yoffs-s).toFixed(2)+"\n",o.cx=i,o.cy=s},Psvg.prototype.eofill=function(){b(),t+='" fill-rule="evenodd" fill="currentColor"/>\n'},Psvg.prototype.fill=function(){b(),t+='" fill="currentColor"/>\n'},Psvg.prototype.gsave=function(){u.push(m(o))},Psvg.prototype.grestore=function(){o=u.pop(),s=!0},Psvg.prototype.lineto=function(e,t){y(),e==o.cx?p+=" v"+(o.cy-t).toFixed(2)+"\n":t==o.cy?p+=" h"+(e-o.cx).toFixed(2)+"\n":p+=" l"+(e-o.cx).toFixed(2)+" "+(o.cy-t).toFixed(2)+"\n",o.cx=e,o.cy=t},Psvg.prototype.moveto=function(e,n){o.cx=e,o.cy=n,p?p+=" M"+(o.xoffs+o.cx).toFixed(2)+" "+(o.yoffs-o.cy).toFixed(2)+"\n":i==2&&(t+="</text>\n",i=1)},Psvg.prototype.newpath=function(){o.cx=o.cy=undefined},Psvg.prototype.rcurveto=function(e,t,n,r,i,s){y(),p+=" c"+e.toFixed(2)+" "+(-t).toFixed(2)+" "+n.toFixed(2)+" "+(-r).toFixed(2)+" "+i.toFixed(2)+" "+(-s).toFixed(2)+"\n",o.cx+=i,o.cy+=s},Psvg.prototype.rlineto=x,Psvg.prototype.rmoveto=function(e,n){p?p+=" m"+e.toFixed(2)+" "+(-n).toFixed(2)+"\n":i==2&&(t+="</text>\n",i=1),o.cx+=e,o.cy+=n},Psvg.prototype.rotate=function(e){w(0);var t,n=o.xoffs,r=o.yoffs,i=o.sin,u=o.cos;t=n*u-r*i,r=n*i+r*u,o.xoffs=t/o.xscale,o.yoffs=r/o.yscale,n=o.cx,r=o.cy,t=n*u-r*i,r=-n*i+r*u,o.cx=t/o.xscale,o.cy=r/o.yscale,e=360-e,o.rotate+=e,o.rotate>180?o.rotate-=360:o.rotate<=-180&&(o.rotate+=360),e=o.rotate*Math.PI/180,o.sin=i=Math.sin(e),o.cos=u=Math.cos(e),t=o.cx,o.cx=(t*u+o.cy*i)*o.xscale,o.cy=(-t*i+o.cy*u)*o.yscale,t=o.xoffs,o.xoffs=(t*u+o.yoffs*i)*o.xscale,o.yoffs=(-t*i+o.yoffs*u)*o.yscale,s=!0},Psvg.prototype.scale=function(e,t){o.xoffs/=e,o.yoffs/=t,o.cx/=e,o.cy/=t,o.xscale*=e,o.yscale*=t,s=!0},Psvg.prototype.selectfont=function(e,t){e=e.nm;if(h!=t||e!=l)o.font_n_old=o.font_n,o.font_n=e,o.font_s=t,s=!0},Psvg.prototype.setdash=function(e,t){var n=e.length,r;if(n==0){o.dash="";return}o.dash=' stroke-dashoffset="'+t+'" stroke-dasharray="',r=0;for(;;){o.dash+=e[r];if(--n==0)break;o.dash+=" "}o.dash+='"'},Psvg.prototype.setlinewidth=function(e){o.linewidth=e},Psvg.prototype.setrgbcolor=function(e,t,n){var r=16777216+(Math.floor(e*255)<<16)+(Math.floor(t*255)<<8)+Math.floor(n*255);r=r.toString(16),r=r.replace("1","#"),r!=o.rgb&&(o.rgb=r,s=!0)},Psvg.prototype.show=function(e){var n,r,u;s&&(i==2?n=!0:v()),r=o.cx,u=o.cy,n?(t+="<tspan\n ",g(!0),t+=">"):i!=2&&(t+='<text x="'+(r+o.xoffs).toFixed(2)+'" y="'+(o.yoffs-u).toFixed(2)+'">',i=2),t+=e.replace(/<|>|&| /g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case" ":return"  "}}),n&&(t+="</tspan>"),o.cx=r+E(e)},Psvg.prototype.stroke=function(){b(),o.linewidth!=.7&&(t+='" stroke-width="'+o.linewidth.toFixed(2)),t+='" stroke="currentColor" fill="none"'+o.dash+"/>\n"},Psvg.prototype.translate=function(e,t){o.xoffs+=e,o.yoffs-=t,o.cx-=e,o.cy-=t},Psvg.prototype.arp=function(e,t,r){var i=d();T(),n.out_arp((t+i[0])*n.stv_g().scale,r-i[1],e)},Psvg.prototype.ltr=function(e,t,r){var i=d();T(),n.out_ltr((t+i[0])*n.stv_g().scale,r-i[1],e)},Psvg.prototype.xygl=function(e,t,r){var i=d();T(),n.xygl((e+i[0])*n.stv_g().scale,t-i[1],r)},Psvg.prototype.xygls=function(e,t,r,i){var s=d();T(),n.out_deco_str((t+s[0])*n.stv_g().scale,r-s[1],i,e)},Psvg.prototype.xyglv=function(e,t,r,i){var s=d();T(),n.out_deco_val((t+s[0])*n.stv_g().scale,r-s[1],i,e)},Psvg.prototype.y0=function(e){var t=n.get_staff_tb();return e+t[0].y},Psvg.prototype.y1=function(e){var t=n.get_staff_tb();return e+t[1].y},Psvg.prototype.ps_flush=T,Psvg.prototype.ps_eval=function(e){r.parse(e),T()},Psvg.prototype.psdeco=function(e,t,i,s){var o,u,a,f,l=r.parse("/"+e+" where"),c=l.pop(),h=n.get_staff_tb();return c?(f=0,s.defl.nost&&(f=1),s.defl.noen&&(f|=2),s.s.stem>=0&&(f|=4),l.pop(),a="/defl "+f+" def ",s.lden&&(a+=t.toFixed(2)+" "+i.toFixed(2)+" ",u=s.start,t=u.x,i=u.y+h[u.st].y,t>s.x-20&&(t=s.x-20)),o=s.dd,s.has_val?a+=s.val+" ":o.str&&(a+="("+o.str+") ",i+=o.h*.2),N(e,t,i,a)):!1},Psvg.prototype.psxygl=function(e,t,n){var i=r.parse("/"+n+" where"),s=i.pop();return s?(i.pop(),N(n,e,t,"dlw ")):!1},Psvg.prototype.svgcall=function(e,t,r,i,s){var o=d();T(),e((t+o[0])*n.stv_g().scale,r-o[1],i,s)},r.parse("currentdict/systemdict currentdict put\nsystemdict/{/mark cvx put\nsystemdict/[/mark cvx put\nsystemdict/]\n/counttomark cvx\n/array cvx\n/astore cvx\n/exch cvx\n/pop cvx\n5 array astore cvx put\nsystemdict/}/] cvx/cvx cvx 2 array astore cvx put\nsystemdict/def{currentdict 2 index 2 index put pop pop}put\n\n/maxlength 1000 def % TODO\n/.bdef{bind def}bind def\n/.xdef{exch def}.bdef\n/dup{0 index}.bdef\n/load{dup where pop exch get}.bdef\n/.ldef{load def}.bdef\n/if{{}ifelse}.bdef\n/cleartomark{array pop}.bdef\n/known{exch begin where{currentdict eq}{false}if end}.bdef\n/store{1 index where{3 1 roll put}{def}ifelse}.bdef\n/not{{false}{true}ifelse}.bdef\n%/.logand{{{true}{false}ifelse}{pop false}ifelse}.bdef\n%/and/.logand .ldef % TODO numeric and\n/.logor{{pop true}{{true}{false}ifelse}ifelse}.bdef\n/or/.logor .ldef % TODO numeric or\n/ne{eq not}.bdef\n/ge{lt not}.bdef\n/le{1 index 1 index eq 3 1 roll lt or}.bdef\n/gt{le not}.bdef\n/.repeat{1 1 4 2 roll for}.bdef\n\n%% math\n\n/floor{.math(floor)1 .call}.bdef\n\n/neg{0 exch sub}.bdef\n/add{neg sub}.bdef\n/idiv{div floor}.bdef\n\n/.pi{.math(PI)get}.bdef\n\n/abs{.math(abs)1 .call}.bdef\n%/.acos{.math(acos)1 .call}.bdef\n%/.asin{.math(asin)1 .call}.bdef\n/atan{.math(atan2)2 .call 180 mul .pi div}.bdef\n%/.atan2{.math(atan2)2 .call}.bdef\n%/ceiling{.math(ceil)1 .call}.bdef\n/cos{.pi mul 180 div .math(cos)1 .call}.bdef\n%/.exp{.math(exp)1 .call}.bdef\n%/log{.math(log)1 .call}.bdef\n%/.max{.math(max)2 .call}.bdef\n%/.min{.math(min)2 .call}.bdef\n%/.pow{.math(pow)2 .call}.bdef\n%/.random{.math(random)0 .call}.bdef\n%/rand{.random}.bdef % TODO follow spec\n%/round{.math(round)1 .call}.bdef\n%/sin{.math(sin)1 .call}.bdef\n%/sqrt{.math(sqrt)1 .call}.bdef\n%/.tan{.math(tan)1 .call}.bdef\n%/truncate{.math(truncate)1 .call}.bdef % TODO Math.truncate does not exist!\n\n% graphic\n/arc{.svg(arc)5 .call0}.bdef\n/arcn{.svg(arcn)5 .call0}.bdef\n/closepath{.svg(closepath)0 .call}.bdef\n/currentpoint{.svg(cx)0 .call .svg(cy)0 .call}.bdef\n/curveto{.svg(curveto)6 .call0}.bdef\n/eofill{.svg(eofill)0 .call0}.bdef\n/fill{.svg(fill)0 .call0}.bdef\n/grestore{.svg(grestore)0 .call0}.bdef\n/gsave{.svg(gsave)0 .call0}.bdef\n/lineto{.svg(lineto)2 .call0}.bdef\n/moveto{.svg(moveto)2 .call0}.bdef\n/newpath{.svg(newpath)0 .call0}.bdef\n/rcurveto{.svg(rcurveto)6 .call0}.bdef\n/rlineto{.svg(rlineto)2 .call0}.bdef\n/rmoveto{.svg(rmoveto)2 .call0}.bdef\n/rotate{.svg(rotate)1 .call0}.bdef\n/scale{.svg(scale)2 .call0}.bdef\n/selectfont{.svg(selectfont)2 .call0}.bdef\n/setdash{.svg(setdash)2 .call0}.bdef\n/setlinewidth{.svg(setlinewidth)1 .call0}.bdef\n/setrgbcolor{.svg(setrgbcolor)3 .call0}.bdef\n/show{.svg(show)1 .call0}.bdef\n/stroke{.svg(stroke)0 .call0}.bdef\n/stringwidth{.svg(strw)1 .call 1}.bdef %fixme: height KO\n/translate{.svg(translate)2 .call0}.bdef\n\n/setgray{255 mul dup dup setrgbcolor}.bdef\n% abcm2ps syms.c\n/!{bind def}bind def\n/T/translate load def\n/M/moveto load def\n/RM/rmoveto load def\n/L/lineto load def\n/RL/rlineto load def\n/C/curveto load def\n/RC/rcurveto load def\n/SLW/setlinewidth load def\n/defl 0 def\n/dlw{0.7 SLW}!\n/xymove{/x 2 index def/y 1 index def M}!\n/showc{dup stringwidth pop .5 mul neg 0 RM show}!\n%\n% abcm2ps internal glyphs\n/arp{.svg(arp)3 .call0}.bdef\n/ltr{.svg(ltr)3 .call0}.bdef\n/ft0{(acc-1).svg(xygl)3 .call0}.bdef\n/nt0{(acc3).svg(xygl)3 .call0}.bdef\n/sh0{(acc1).svg(xygl)3 .call0}.bdef\n/dsh0{(acc2).svg(xygl)3 .call0}.bdef\n/trl{(trl).svg(xygl)3 .call0}.bdef\n/lmrd{(lmrd).svg(xygl)3 .call0}.bdef\n/turn{(turn).svg(xygl)3 .call0}.bdef\n/umrd{(umrd).svg(xygl)3 .call0}.bdef\n/y0{.svg(y0)1 .call}.bdef\n/y1{.svg(y1)1 .call}.bdef\n")}var abc=null,$ABC_UI=function(){"use strict";function $(e,t,n){return e.indexOf(t)!==-1?"":t+" "+n+"\n"}function J(e,t){e=e||{};if(e.zoom===undefined||e.zoom===null)e.zoom=1;if(e.pagewidth===undefined||e.pagewidth===null)e.pagewidth=p;var r=q+" s"+n+"\n";return n++,r+=$(t,"%%pagewidth",e.pagewidth.toString()+"cm"),r+=$(t,"%%staffwidth",e.pagewidth.toString()+"cm"),r+=$(t,"%%scale",e.zoom.toString()),r+=$(t,"%%topmargin","0px"),r+=$(t,"%%botmargin","0px"),r+=$(t,"%%leftmargin","16px"),r+=$(t,"%%rightmargin","8px"),r+=$(t,"%%topspace","0px"),r+=$(t,"%%musicspace","0px"),r+=$(t,"%%vocalspace","0px"),r+=$(t,"%%staffsep","0px"),r+=$(t,"%%sysstaffsep",".7cm"),r+=$(t,"%%vocalfont Time","13"),r}function K(e,t){var n=e.nextSibling.nextSibling;n!==null&&n.nodeName==="#text"&&(n=e.nextSibling.nextSibling);if(n!==null&&n!==undefined&&n.nodeName&&n.nodeName==="DIV"&&n.classList&&n.classList.contains(t))return n;n=e.cloneNode(!0);var r=n.classList;while(r.length>0)r.remove(r.item(0));return n.classList.add(t),e&&e.nextSibling&&e.nextSibling.nodeName=="#text"&&(e=e.nextSibling),e.parentNode.insertBefore(n,e.nextSibling),n}function Q(e,t){var n="",r={read_file:null,errmsg:function(e,t,n){},img_out:function(e){n+=e},page_format:!1},i=J(t,e)+X+V;abc=new Abc(r);try{abc.tosvg("edit",i),abc.tosvg("score.abc",e)}catch(s){var o="%c "+s.message+"\nabc2svg tosvg bug - stack:\n"+s.stack;console.log(o,"color: red;")}return n}function G(e,t){const n={beam:!0,slur:!0,tuplet:!0,deco:!0};var r="",i={read_file:null,errmsg:function(e,t,n){},img_out:function(e){r+=e},anno_start:null,anno_stop:function(e,r,i,s,o,u,a){if(n[e])return;isNaN(u)||(abc.out_svg('<rect class="'+C+" "+t.idScore+" "+r+'" x="'),abc.out_sxsy(s,'" y="',o),abc.out_svg('" width="'+u.toFixed(2)+'" height="'+a.toFixed(2)+'"/>\n'))}},s=J(t,e)+X+V;abc=new Abc(i);try{abc.tosvg("edit",s),abc.tosvg("follower.abc",e)}catch(o){var u="%c "+o.message+"\nabc2svg tosvg bug - stack:\n"+o.stack;console.log(u,"color: red;")}return r}function Y(e,t){if(t===undefined)return;var n=document.getElementById(e);if(n===undefined||n===null)return null;var r=t.indexOf(B,0)===-1,i={errmsg:function(e,t,n){console.log("%c "+e,"color: red;")},get_abcmodel:function(t,i,s,f){var l=i.length;for(var c=0;c<l;c++){var h=i[c],p=h.instr||0;h.midictl&&(h.midictl[32]&&(p+=h.midictl[32]*128),h.midictl[0]&&(p+=h.midictl[0]*128*128),p=128),u.indexOf(p)===-1&&(u.push(p),o=!1)}var d=0;if(r&&l>1){var v=!0;for(c=0;c<l;c++){var m=$ABC_UTIL.remapVoiceName(i[c],a);if($ABC_UTIL.isActiveVoice(m)){d++,v||n.appendChild(document.createElement("br")),v=!1;var g=document.createElement("input");g.type="checkbox",g.id=e+"_V"+c,g.classList.add(A),g.checked=!0,n.appendChild(g);var y=document.createElement("label");y.classList.add(N),y.appendChild(document.createTextNode(" "+m)),n.appendChild(y)}}}n.hidden=d<2}},s=I+"\n"+X;try{abc=new Abc(i),abc.tosvg("player",s),abc.tosvg("audio.abc",t)}catch(f){var l="%c "+f.message+"\nabc2svg tosvg bug - stack:\n"+f.stack;console.log(l,"color: red;")}}function Z(e,n,o){function ot(e){var t=st;e!==undefined&&(t=$ABC_UTIL.updateTempo(st,e));var n={events:$ABC_EVENTS.render(t,g,X),id:v};ut&&(ut.value=JSON.stringify(n));var r={idScore:v,zoom:o.scale,pagewidth:u};rt.innerHTML=$ABC_UTIL.svgMerge(Q(t,r),G(t,r))}if(e===undefined||e===null)return null;var u=parseFloat(e.classList[1]);isNaN(u)&&(u=p);var f=parseFloat(e.classList[2]);isNaN(f)||(o.scale=f),o=o||{};var l=n.indexOf(j,0)===-1&&n.indexOf(F,0)===-1;o.bPlayer===undefined&&(o.bPlayer=l),o.width===undefined&&(o.width=h),o.scale===undefined&&(o.scale=d),o.bHideTempo===undefined&&(o.bHideTempo=!0),o.lang===undefined&&(o.lang=a);var c=O+t,v=M+t,m=_+t,g=D+t,y=P+t;t++;var N=$ABC_UTIL.buildTempoSlider(n,m),C=K(e,b),H='<table id="'+c+'">',B='<div id="'+v+'"></div>';if(o.bPlayer){var I=n.indexOf(R,0)!==-1,q=n.indexOf(U,0)!==-1,z=n.indexOf(W,0)!==-1,V=!(I||q||z),$='<button id="'+y+'" class="'+k+'" value="80"></button>',J='<button id="'+m+'" class="'+w+'"></button>',Z='<div id="'+g+'" class="'+T+'"></div>',et="<div>"+N.html+"</div>";V?C.innerHTML=H+"<tr>"+'<td valign="center">'+"<table>"+'<tr><td align="center">'+$+J+et+"</td></tr>"+"<tr><td>"+Z+"</td></tr>"+"</table>"+"</td>"+"<td>"+B+"</td>"+"</tr><table>":z?C.innerHTML=H+"<tr>"+"<td>"+B+"</td>"+'<td valign="center">'+"<table>"+'<tr><td align="center">'+$+J+et+"</td></tr>"+"<tr><td>"+Z+"</td></tr>"+"</table>"+"</td>"+"</tr><table>":I?C.innerHTML=H+"<tr>"+'<td align="center">'+"<table>"+'<tr valign="center">'+'<td align="center">'+$+J+et+"</td>"+'<td width="10px"></td>'+"<td>"+Z+"</td>"+"</tr>"+"</table>"+"</td>"+"</tr>"+"<tr><td>"+B+"</td></tr>"+"<table>":q&&(C.innerHTML=H+"<tr><td>"+B+"</td></tr>"+"<tr>"+'<td align="center">'+"<table>"+'<tr valign="center">'+'<td align="center">'+$+J+et+"</td>"+'<td width="10px"></td>'+"<td>"+Z+"</td>"+"</tr>"+"</table>"+"</td>"+"</tr>"+"<table>")}else C.innerHTML=H+"<tr><td>"+B+"</td></tr><table>";var tt=document.getElementById(c),nt=document.getElementById(m),rt=document.getElementById(v),it=document.getElementById(y),st=$ABC_UTIL.normalize(n,o);if(o.bPlayer){var ut=document.getElementById(m);Y(g,st);var at=N.selection;it.value=at,ot(at);var ft="."+L,lt=tt.querySelectorAll(ft);for(var ct=0,ht=lt.length;ct<ht;ct++)lt[ct].addEventListener("click",function(){var e="."+m+"."+L+"."+E,t=parseInt(this.classList[2]),n=it?it.value:undefined;if(t==n)return;nt.classList.contains(S)&&($EVENT_PLAYER.stop(),nt.classList.toggle(S)),tt.querySelector(e).classList.toggle(E),this.classList.toggle(E),it&&(it.value=t),ot(t)});ft="."+A;var pt=tt.querySelectorAll(ft);for(ct=0,ht=pt.length;ct<ht;ct++)pt[ct].addEventListener("change",function(){nt.classList.contains(S)&&($EVENT_PLAYER.stop(),nt.classList.toggle(S));var e=it?it.value:undefined;e==="undefined"&&(e=undefined),ot(e)});r?ut.classList.contains(x)||ut.classList.add(x):ut.hidden=!r,ut.addEventListener("click",function(){if(this.classList.contains(x)){$EVENT_PLAYER.stop(),this.classList.toggle(S);if(this.classList.contains(S)){var e=document.querySelectorAll("."+w);for(var t=0,n=e.length;t<n;t++)e[t].classList.contains(S)&&e[t]!=ut&&e[t].classList.toggle(S);if(s!==null){var r=document.getElementsByClassName(s);for(t=0,n=r.length;t<n;t++)r[t].style.setProperty("fill-opacity",0)}i=ut;var o=JSON.parse(ut.value);s=o.id,$EVENT_PLAYER.play(0,1e6,o.events)}}})}else{var dt={idScore:v,zoom:o.scale,pagewidth:u};rt.innerHTML=$ABC_UTIL.svgMerge(Q(st,dt),G(st,dt))}}function et(e,t,n){n===undefined&&(n=!1),t=t||!1,e=e||c;var r="div."+y;n||(r+="."+v);var i=e[0]=="m",s=-1,o,u,a="";if(t===!0){var f=i?m:g;s=f;var l=r+"."+f,h=document.querySelectorAll(l);h.forEach(function(e){var t=K(e,b);t.hidden=!0}),f=i?g:m;var p=r+"."+f,d=document.querySelectorAll(p);d.forEach(function(e){var t=K(e,b);t.hidden=!1})}var w=document.querySelectorAll(r);for(o=0,u=w.length;o<u;o++){a="";var E="",S=w[o];if(s===-1||s!==-1&&!S.classList.contains(s)){var x=S.childNodes.length===0?"":S.childNodes[0].nodeValue,T=1,N=e,C=S.classList.contains(v);x.trim()===""?E=external_eval(S.id):S.id!==""?(T=parseFloat(x),isNaN(T)?(T=1,x.indexOf("\n")==-1?(x.charAt(0)!=="<"&&(N=x,C=!0,x.indexOf("m")!=-1?N="m"+x.replace("m",""):x.indexOf("M")==-1&&(N="M"+x)),E=external_eval(S.id)):E=x):E=external_eval(S.id)):E=x;var k={scale:T};C&&(k.transpose=N),Z(S,a+E,k)}}}function tt(e){var t=e||{};t.lang&&(a=t.lang),t.instruments&&t.instruments.length>0&&(u=t.instruments),et(t.tonality,t.bMajorOrMinor,!0),u.length===0&&!o&&u.push(0),u.length>0&&nt(u)}function nt(e){var t=e.length;$EVENT_PLAYER.init(e,function(){$EVENT_PLAYER.stop(),i.classList.contains(S)&&i.classList.toggle(S)},function(e,t){var n=document.getElementsByClassName(s+" "+e);if(n!==undefined&&n.length>0){var r=t?.2:0;n[0].style.setProperty("fill-opacity",r)}},function(e){t--;if(t===0){r=!0;var n=document.querySelectorAll("."+w);for(var i=0,s=n.length;i<s;i++)n[i].classList.toggle(x),n[i].hidden=!1}},function(e){console.warn("Failure loading Soundfont instrument "+e)})}var e={},t=0,n=0,r=!1,i=null,s="",o=!0,u=[],a="en";const f="C",l="M",c=l+f,h=600,p=16,d=1,v="transposable",m="major",g="minor",y="abc-source",b="abc-render",w="abc-player",E="selected",S="playing",x="ready",T="abc-voices",N="abc-voice",C="abc-follow",k="abc-hidden",L="abc-dot",A="check-voice",O="abc-container",M=b,_=w,D=T,P="abc-tempo",H="%%voicecombine",B="%%player_no_voice",j="%%no_player",F="%%player_off",I="%%play",q="%%fullsvg",R="%%player_top",U="%%player_bottom",z="%%player_left",W="%%player_right",X="%%deco red 10 @ 0 0 0\n%%deco blue 10 @ 0 0 0\n%%deco green 10 @ 0 0 0\n%%deco brown 10 @ 0 0 0\n%%deco orange 10 @ 0 0 0\n%%deco yellow 10 @ 0 0 0\n%%deco gray 10 @ 0 0 0\n%%deco cyan 10 @ 0 0 0\n%%deco coral 10 @ 0 0 0\n%%deco gold 10 @ 0 0 0\n%%deco khaki 10 @ 0 0 0\n%%deco indigo 10 @ 0 0 0\n%%deco lime 10 @ 0 0 0\n%%deco navy 10 @ 0 0 0\n%%deco orchid 10 @ 0 0 0\n%%deco pink 10 @ 0 0 0\n%%deco peru 10 @ 0 0 0\n%%deco plum 10 @ 0 0 0\n%%deco purple 10 @ 0 0 0\n%%deco tan 10 @ 0 0 0\n%%deco teal 10 @ 0 0 0\n%%deco o>( 1 arrow_orange 0 0 0\n%%deco o>) 1 arrow_orange 0 0 0\n%%deco r>( 1 arrow_red 0 0 0\n%%deco r>) 1 arrow_red 0 0 0\n%%deco g>( 1 arrow_green 0 0 0\n%%deco g>) 1 arrow_green 0 0 0\n%%deco b>( 1 arrow_blue 0 0 0\n%%deco b>) 1 arrow_blue 0 0 0\n%%deco n>( 1 arrow_black 0 0 0\n%%deco n>) 1 arrow_black 0 0 0\n%%deco ->( 1 arrow_gray 0 0 0\n%%deco ->) 1 arrow_gray 0 0 0\n",V='%%beginsvg\n<defs>\n <marker id="arrow_orange" fill="orange" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_red" fill="red" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_blue" fill="blue" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_green" fill="green" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_gray" fill="gray" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_black" fill="black" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <path id="x_notehead" d="m-3 -3l6 6m0 -6l-6 6" class="stroke" style="stroke-width:1.2"/>\n <path id="xcircle_notehead" d="m-3 -3 l6 6 m0 -6 l-6 6 M 0, 0 m -4, 0 a 4,4 0 1,0 8,0 a 4,4 0 1,0 -8,0" class="stroke" style="stroke-width:1.2"></path>\n <path id="triangle_notehead" d="M0 -5 L-4 4 H4 Z"/>\n <path id="square_notehead" d="M0 -4 L-4 0 L0 4 L4 0Z"/>\n</defs>\n%%endsvg\n%%beginjs\nvar dsx=12,dex=14;\nuser.arrow_red = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_red");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_red); color: red"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_green = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_green");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_green); color: green"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_blue = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_blue");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_blue); color: blue"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_orange = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_orange");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_orange); color: orange"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_gray = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_gray");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_gray); color: gray"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_black = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_black");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_black); color: black"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\n%%endjs\n';return e.init=function(e){tt(e)},e.updateTonality=function(e,t){et(e,t)},e.buildScore=function(e,t,n){return Z(e,t,n)},e}(),$ABC_UTIL=function(){"use strict";function N(e){var t=!0;e.bEditors===!1&&(t=!1);var n=document.querySelectorAll(s);for(var i=0,o=n.length;i<o;i++){var u=n[i],a=u.innerHTML;a=a.replace(/&gt;/g,">");var f=I(a),l="";if(t){var c="?abc=",h=T.encode(f),p=encodeURI(m+c+h),d=encodeURI(g+c+h),y=B(a,{bStandard:!0,bKeepSpace:!0}),b=T.encode(y),w=encodeURI(v+c+b);l+="See in editors <a href='"+w+"' target='_blank'>abc2svg</a>, "+"<a href='"+p+"' target='_blank'>abc-ui</a>, "+"<a href='"+d+"' target='_blank'>dev.music</a>."}var E=u.classList.contains(r);E&&(f=k(f,e),l+="<pre class='abc-text'>"+f+"</pre>");var S=document.createElement("div");S.innerHTML=l;var x=u.parentNode;x.insertBefore(S,u)}}function C(e,t,n,r){r=r||{};var i=e,s;return t.forEach(function(e){r.bMacro?e="%%"+e:r.bDeco&&(e="!"+e+"!"),s='<span class="'+n+'">'+e+"</span>",e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=i.replace(new RegExp(e,"g"),s)}),i}function k(e,t){t=t||{};var n=e,r;if(t.bMacro){var i={bMacro:!0};n=C(n,y,"abc-macro",i),n=C(n,b,"abc-ui-macro",i),w.forEach(function(e){e="%%"+e;var t=n.indexOf(e);if(t!==-1){var r=n.indexOf("\n",t),i=n.substring(0,t),s=n.substring(t,r),o='<span class="abc-ui-macro">'+s+"</span>",u=n.substring(r,n.length);n=i+o+u}})}if(t.bDeco){var s={bDeco:!0};n=C(n,E,"abc-deco",s),n=C(n,S,"color-deco",s),n=C(n,x,"arrow-deco",s)}return n}function L(e,t,n,r){if(r!=undefined)return r+e[0];if(t===!0)return"="+e[0];if(n===!0)return e[0];var i=e;return e.indexOf("#")!==-1?i="^"+e[0]:e.indexOf("b")!==-1&&(i="_"+e[0]),i}function A(e,t){var n=t.substring(1,t.length),r=L(n);if(r==="C")return e;if(r.indexOf("B")!==-1||r.indexOf("A")!==-1)r+=",";var i=e,s=0,o;for(;;){s=i.indexOf("K:",s+1);if(s===-1)break;o=i.indexOf("\n",s+1);var u=i.substring(s,o),a=u+" shift=C"+r+"\n";if(o===-1)break;i=i.substring(0,s)+a+i.substring(o+1,i.length)}return i}function O(e){var t="",n=e.split("\n");for(var r=0,i=n.length;r<i;r++){var s=n[r].replace(/^\s+|\s+$/gm,"");s=s.replace(/\s+/g," "),s=s.replace(/^\t+|\t+$/gm,""),s!==""&&(t+=s+"\n")}return t}function M(e,t){t=t||"en";var n="",r="",i="",s="",u="",a="",f="",h="",d="",v="",m="",g="",y="",b="";return e.indexOf("+name")!==-1?(f=' name="'+p[t].soprano+'" sname="'+p[t].sopranoShort+'"',d=' name="'+p[t].alto+'" sname="'+p[t].altoShort+'"',m=' name="'+p[t].tenor+'" sname="'+p[t].tenorShort+'"',y=' name="'+p[t].bass+'" sname="'+p[t].bassShort+'"'):e.indexOf("+shortname")!==-1&&(f=' name="'+p[t].sopranoShort+'" sname="'+p[t].sopranoShort+'"',d=' name="'+p[t].altoShort+'" sname="'+p[t].altoShort+'"',m=' name="'+p[t].tenorShort+'" sname="'+p[t].tenorShort+'"',y=' name="'+p[t].bassShort+'" sname="'+p[t].bassShort+'"'),e.indexOf("T")!==-1?(a="clef=C1",h="clef=C3",v="clef=C4",g="clef=F4"):e.indexOf("G")!==-1?(a=l,h=l,v="clef=treble_8",g=c):(a=l,h=l,v="clef=C",g=c),e.indexOf("D")!==-1&&(s="V:D "+a+"\n",r+="D "),e.indexOf("C")!==-1&&(u="V:C "+a+"\n",r+="C "),e.indexOf("N")!==-1&&(b="V:N "+g+"\n",i+=" N"),n+=s+u+"V:S "+a+f+"\n"+"V:A "+h+d+"\n"+"V:T "+v+m+"\n"+"V:B "+g+y+"\n"+b+o+"[("+r+"S) | A | T | (B"+i+")]\n",n}function _(e){var t=e.indexOf("D")!==-1,n=e.indexOf("C")!==-1,r=e.indexOf("N")!==-1,i=e.indexOf("2+2")!==-1||e.indexOf("4")!==-1,s=e.indexOf("3+1")!==-1,u=e.indexOf("4+1")!==-1,a=e.indexOf("3+2")!==-1,f=e.indexOf("2+3")!==-1,h=e.indexOf("3+3")!==-1,p=e.indexOf("4+2")!==-1,d=e.indexOf("5+1")!==-1,v="",m="",g="";return t&&(v+="V:D "+l+"\n",m+="D "),n&&(v+="V:C "+l+"\n",m+="C "),r&&(v+="V:N "+c+"\n",g+=" N"),h?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+c+"\nV:5 "+c+"\nV:6 "+c+"\n"+o+" {("+m+"1 2 3)|(4 5 6"+g+")}\n":d?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+l+"\nV:5 "+l+"\nV:6 "+c+"\n"+o+" {("+m+"1 2 3 4 5)|(6"+g+")}\n":p?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+l+"\nV:5 "+c+"\nV:6 "+c+"\n"+o+" {("+m+"1 2 3 4)|(5 6"+g+")}\n":u?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+l+"\nV:5 "+c+"\n"+o+" {("+m+"1 2 3 4)|(5"+g+")}\n":a?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+c+"\nV:5 "+c+"\n"+o+" {("+m+"1 2 3)|(4 5"+g+")}\n":f?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+c+"\nV:4 "+c+"\nV:5 "+c+"\n"+o+" {("+m+"1 2)|(3 4 5"+g+")}\n":i?v+="V:S "+l+"\nV:A "+l+"\nV:T "+c+"\nV:B "+c+"\n"+o+" {("+m+"S A)|(T B"+g+")}\n":s?v+="V:S "+l+"\nV:A "+l+"\nV:T "+l+"\nV:B "+c+"\n"+o+" {("+m+"S A T)|(B"+g+")}\n":v+="V:KG "+l+"\nV:KF "+c+"\n"+o+" {("+m+"KG)|(KF"+g+")}\n",v}function D(e,t){var n,r,i,s=e.indexOf(a,0);if(s!==-1){n=e.indexOf("\n",s+1);if(n!==-1)return r=e.substring(s,n),i=_(r,t),e.indexOf("K:")===-1&&(i+="K:C\n"),e=e.substring(0,s)+i+e.substring(n+1,e.length),e}s=e.indexOf(f,0);if(s!==-1){n=e.indexOf("\n",s+1);if(n!==-1)return r=e.substring(s,n),i=M(r,t),e.indexOf("K:")===-1&&(i+="K:C\n"),e=e.substring(0,s)+i+e.substring(n+1,e.length),e}return e}function P(e){var t=undefined,n=[],r=e.indexOf(u,0);if(r!==-1){var i=e.indexOf("\n",r+1);if(i!==-1){r=e.indexOf("{",r+1)+1,i=e.indexOf("}",r);var s=e.substring(r,i);s=s.replace(/\s/g,"");var o=!1,a;r=0;do i=s.indexOf(",",r),i!==-1?a=s.substring(r,i):(a=s.substring(r,s.length),o=!0),a.trim(),a.indexOf("*")!==-1&&(t=a.replace(/\*/g,""),a=t),n.push(a),r=i+1;while(!o)}}return t===undefined&&(t=n[0]),{tempos:n,selection:t}}function H(e,t){var n=P(e);if(n.selection===undefined)return{html:"",selection:undefined};var r=n.tempos,i=parseInt(r[0]),s=parseInt(r[r.length-1]),o=4,u=9,a=(u-o)/(s-i),f=o-a*i,l='<div class=" + class_abc_tempo + ">';for(var c=0,h=r.length;c<h;c++){var p=parseInt(r[c]),d=Math.round(a*p+f),v=" dot"+d,m=r[c]===n.selection?" selected":"";l+='<span class="'+t+" abc-dot "+r[c]+m+v+'"></span>'}return l+="</div>",{html:l,selection:n.selection}}function B(e,t){t=t||{};var n=!1;t.bKeepSpace!==undefined&&t.bKeepSpace===!0&&(n=!0);var r=n?I(e):O(e),i=-1,s=-1;r.indexOf("X:")!==-1&&(i=r.indexOf("X:",0),i!==-1&&(s=r.indexOf("\n",i+1),s!==-1&&(r=r.substring(0,i)+r.substring(s+1,r.length))));var o="";t.bHideTempo!==undefined&&(t.bHideTempo===!0?(i=r.indexOf("Q:",0),i!==-1&&(o="%%writefields Q 0\n")):t.bHideTempo===!1&&(o="%%writefields Q 1\n"));var u=o+"X:1\n";r.indexOf("L:")===-1&&(u+="L:1/1\n"),r=u+D(r,t.lang),r.indexOf("K:")===-1&&(i=r.indexOf("\n",r.indexOf("L:"))+1,r=r.substring(0,i)+"K:C\n"+r.substring(i,r.length)),t.transpose&&(r=A(r,t.transpose));if(t.bStandard===!0){r=r.replace(/%%MIDI program 128/g,"%%MIDI channel 10"),r=r.replace(/%%no_player\n/g,""),r=r.replace(/%%player_no_voice\n/g,"");var a=S.concat(x);a.forEach(function(e){e="!"+e+"!";var t=" ".repeat(e.length);e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=r.replace(new RegExp(e,"g"),t)})}return q(r)}function j(e,t){var n=e,r="Q:1/4="+t+"\n",i=e.indexOf("X:1\n");return i!==-1&&(i+=4,n=e.substring(0,i)+r+e.substring(i,e.length)),n}function F(e,t){var n=e,r=e.indexOf(t);if(r!==-1){var i=e.indexOf("\n",r+1);if(i!==-1)return n=e.substring(0,r)+e.substring(i+1,e.length),F(n,t)}return n}function I(e){var t="",n=e.split("\n");for(var r=0,i=n.length;r<i;r++){var s=n[r].trim();s!==""&&(t+=s+"\n")}return q(t)}function q(e){var t=e.lastIndexOf("\n"),n=e.length;return t===n-1?e.substring(0,t):e}function R(e){var t="",n=e.split("\n");for(var r=0,i=n.length;r<i;r++){var s=n[r].trim();s=s.replace(/\s+/g," "),s!==""&&(t+=s+"\n")}return t}function U(e){var t=document.createElement("div");t.innerHTML=e;var n=t.querySelectorAll("style, defs, path, text, use");for(var r=0,i=n.length;r<i;r++){var s=n[r];s.parentNode.removeChild(s)}return R(t.innerHTML)}function z(e,t){var n=e.split(h),r=t.split(h),i=n.length,s=r.length;if(i!==s)return e;var o="";for(var u=0,a=i;u<a;u++){var f=n[u],l=U(r[u]),c=l.indexOf('<g class="music"');o+=f+l.substring(c,l.length)+h}return o}var e={};const t="abc-tempo",n="abc-source",r="view-source",i="view-editor",s="div."+n+"."+r+", div."+n+"."+i,o="%%score",u="%%tempo",a="%%piano",f="%%chorus",l="clef=treble",c="clef=bass",h="</svg>",p={en:{soprano:"Soprano",sopranoShort:"S",alto:"Alto",altoShort:"A",tenor:"Tenor",tenorShort:"T",bass:"Bass",bassShort:"B",KG:"G key",KGShort:"GK",KF:"F key",KFShort:"FG"},fr:{soprano:"Soprano",sopranoShort:"S",alto:"Alto",altoShort:"A",tenor:"Ténor",tenorShort:"T",bass:"Basse",bassShort:"B",KG:"Clé de sol",KGShort:"Sol",KF:"Clé de fa",KFShort:"Fa"}};var d="en";const v="../../../../editors/abc2svg/index.html",m="../../../../editors/abc_ui/index.html",g="http://dev.music.free.fr/editors/abc_ui/index.html",y=["scores","score","staves","keywarn","timewarn","stemheight","bstemdown","flatbeams","slurheight","squarebreve","voicecombine","singleline","dblrepbar","graceslurs","gracespace","graceword","stafflines","cancelkey","ambitus","straightflags","MIDI","voicemap","diagram","chordnames","measurenb","measurebox ","setbarnb","contbarnb","equalbars","barsperstaff","break","stretchlast","stretchstaff","leftmargin","pagewidth","soloffs","musicspace","shiftunison","textoption","begintext","endtext","center","infoline","aligncomposer","composerfont","composerspace","hyphencont","text","clef","pos","map","sth"],b=["no_player","player_off","player_no_voice","tempo"],w=["piano","chorus"],E=["beambr1","beambr2","ped","ped-up","ped(","ped)","1","2","3","4","5","/","//","///","-(","-)","roll","snap","thumb","open","+","0","breath","shortphrase","mediumphrase","longphrase","tenuto","wedge","accent","^","upbow","downbow","emphasis","marcato","arpeggio","mordent","uppermordent","lowermordent","trill","pralltriller","trill(","trill)","diminuendo(","diminuendo)","crescendo(","crescendo)","fermata","invertedfermata","D.C.","coda","D.S.","segno","fine","turn","turnx","invertedturn","invertedturnx","mf","f","ff","fff","ffff","mp","p","pp","ppp","pppp","8va(","8va)","8vb(","8vb)"],S=["red","blue","green","brown","orange","yellow","gray","cyan","coral","gold","khaki","indigo","lime","navy","orchid","pink","peru","plum","purple","tan","teal"],x=["o>(","o>)","b>(","b>)","g>(","g>)","r>(","r>)","n>(","n>)",">(",">)"];var T={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t},encode:function(e){var t,n,r,i,s,o,u,a="",f=0;for(e=T._utf8_encode(e);f<e.length;)i=(t=e.charCodeAt(f++))>>2,s=(3&t)<<4|(n=e.charCodeAt(f++))>>4,o=(15&n)<<2|(r=e.charCodeAt(f++))>>6,u=63&r,isNaN(n)?o=u=64:isNaN(r)&&(u=64),a=a+this._keyStr.charAt(i)+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u);return a}};return e.remapVoiceName=function(e,t){t=t||"en";const n={KG:p[t].KG,KF:p[t].KF,S:p[t].soprano,A:p[t].alto,T:p[t].tenor,B:p[t].bass};var r=e.id.toUpperCase();return e.nm?n[e.nm]?n[e.nm]:e.nm:n[r]?n[r]:e.id},e.isActiveVoice=function(e){const t=["D","C","N"];return t.indexOf(e.toUpperCase())===-1},e.updateTempo=function(e,t){return j(e,t)},e.buildTempoSlider=function(e,t){return H(e,t)},e.normalize=function(e,t){return B(e,t)},e.addHtmlVievers=function(e){return N(e)},e.remove=function(e,t){return F(e,t)},e.svgMerge=function(e,t){return z(e,t)},e}(),$ABC_EVENTS=function(){"use strict";function u(e){o&&console.log("$ABC_EVENTS."+e)}function a(){u("init"),t=null,n=0,r=0,i=0,s=0}function f(e,n,o){function L(e){const t=e.v;for(var n=0;n<10;n++)m[t].set(v,n*7);g[t].set(m[t])}function A(e){v=[0,0,0,0,0,0,0];switch(e.k_sf){case 7:v[6]=1;case 6:v[2]=1;case 5:v[5]=1;case 4:v[1]=1;case 3:v[4]=1;case 2:v[0]=1;case 1:v[3]=1;break;case-7:v[3]=-1;case-6:v[0]=-1;case-5:v[4]=-1;case-4:v[1]=-1;case-3:v[5]=-1;case-2:v[2]=-1;case-1:v[6]=-1}L(e)}function O(){for(var e=0;e<a;e++){var t=n[e].clef;y[e]=!t.clef_octave||t.clef_oct_transp?0:t.clef_octave;var r=n[e],i=r.instr||0;r.midictl&&(r.midictl[32]&&(i+=r.midictl[32]*128),r.midictl[0]&&(i+=r.midictl[0]*128*128)),b[e]=i,m[e]=new Float32Array(70),g[e]=new Float32Array(70),r.key.v=e,A(r.key)}}function M(e,t){var n=e.notes[t],r=n.pit+19-7,i=n.acc;y[e.v]&&(r+=y[e.v]),i?(i==3?i=0:n.micro_n&&(console.log("micro tone not supported"),i=(i<0?-n.micro_n:n.micro_n)/n.micro_d*2),d[r]=i):i=d[r];var s=r/7|0;return r=h[r%7]+i,r>=12?(r-=12,s++):r<0&&(r+=12,s--),c[r]+l[s]}function _(t){if(t.v!=w)return null;var n;if(t.bar_type[0]===":"){u("_handle_bar with ':|' or ':]'"),t.bar_type="|"+t.bar_type.slice(1),N=t,C||(C=t);if(T){t=T;for(n=0;n<a;n++)g[n].set(S[n]),y[n]=E[n];r=x}else t=e,O();return s=t.time,t}if(!t.invis)for(n=0;n<a;n++)g[n].set(m[n]);if(t.bar_type[t.bar_type.length-1]==":"){u("_handle_bar with '|:'"),T=t,C=null;for(n=0;n<a;n++)S||(S=[]),S[n]||(S[n]=new Float32Array(70)),S[n].set(g[n]),E||(E=[]),E[n]=y[n];x=r}else t.text&&t.text[0]=="1"&&(u("_handle_bar with 1st time repeat"),C=t);return null}function D(e,t,n){u("_do_tie");var i,s,o,a=e.time+e.dur,f=e.notes[t],l=f.pit;for(o=e.next;;o=o.next){if(!o||o.time!=a)return n;if(o==C){var c=o.v;o=N.ts_next;while(o&&o.v!==c)e=e.ts_next;if(!e)return n;a=o.time}if(o.time!=a)return n;if(o.type==abc2svg.C.NOTE)break}s=o.notes.length;for(i=0;i<s;i++){f=o.notes[i];if(f.pit==l)return n+=o.dur/r,f.ti2=!0,f.ti1?D(o,i,n):n}return n}function P(e,n,r){for(var i=0;i<=e.nhd;i++){var s=e.notes[i];if(s.ti2)continue;var a=!0;o&&(a=o.indexOf(e.v)===-1);if(a){s=M(e,i);var f=e.istart,l=e.notes[i].ti1?D(e,i,r):r,c=b[e.v];t.push([f,n,c,s,l]),u("add event: index="+f+", time="+n+", instrument="+c+", note='"+s+"', duration="+l)}}}function H(e){u("_gen_grace");var t=e.next;if(e.time==0&&s===0){var n=0;if(e.sappo)n=abc2svg.C.BLEN/16;else if(!t||t.type!=abc2svg.C.NOTE)n=k/2;s-=n}var o,a,l,c;if(e.sappo)c=f/16;else if((!t||t.type!=abc2svg.C.NOTE)&&e.prev&&e.prev.type==abc2svg.C.NOTE)c=e.prev.dur/2;else{t.ts_prev.ts_next=t.ts_next,t.ts_next.ts_prev=t.ts_prev;for(var h=t.ts_next;h;h=h.ts_next)if(h.time!=t.time){t.ts_next=h,t.ts_prev=h.ts_prev,t.ts_prev.ts_next=t,h.ts_prev=t;break}t.dots?t.dots==1?c=t.dur/3:c=t.dur*2/7:c=t.dur/2,t.time+=c,t.dur-=c}a=0;for(o=e.extra;o;o=o.next)o.type==abc2svg.C.NOTE&&a++;c/=a*r,l=i;for(o=e.extra;o;o=o.next){if(o.type!=abc2svg.C.NOTE)continue;P(o,l,c),l+=c}}const a=n.length,f=1536,l="012345678",c=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],h=[0,2,4,5,7,9,11];var p=e,d,v=[],m=[],g=[],y=[],b=[],w=null,E=null,S=null,x=null,T=null,N=null,C=null,k=null;O(),t?p.time<s&&(s=p.time):(t=[],s=i=0,r=f/4*80/60);while(p){if(p.tempo){var B=0;for(var j=0,F=p.tempo_notes.length;j<F;j++)B+=p.tempo_notes[j];r=B*p.tempo/60}var I=p.time-s;I>0&&(i+=I/r,s=p.time),p==C&&(p=N,s=p.time),d=g[p.v];switch(p.type){case abc2svg.C.BAR:var q=_(p);q!==null&&(p=q);break;case abc2svg.C.CLEF:y[p.v]=!p.clef_octave||p.clef_oct_transp?0:p.clef_octave;break;case abc2svg.C.GRACE:H(p);break;case abc2svg.C.KEY:A(p);break;case abc2svg.C.REST:case abc2svg.C.NOTE:k=p.dur;var R=p.next;if(R&&R.type===abc2svg.C.GRACE){I=0;if(R.sappo)I=abc2svg.C.BLEN/16;else if(!R.next||R.next.type!==abc2svg.C.NOTE)I=k/2;R.time-=I,k-=I}k/=r,p.type==abc2svg.C.NOTE?P(p,i,k):t.push([p.istart,i,-1,0,k]);break;case abc2svg.C.STAVES:w=p.sy.top_voice}p=p.ts_next}}function l(e,n,r){if(e===undefined)return;var i="",s={errmsg:function(e,t,n){console.log("%c "+e,"color: red;")},get_abcmodel:function(e,t){const r=t.length;if(r!==1)for(var s=0;s<r;s++){var o=n+"_V"+s,a=document.getElementById(o);if(a===undefined||a!==null&&a.checked===!1)i+=s+" "}u("voice_no_play="+i),f(e,t,i)}},o=$ABC_UTIL.remove(e,"%%voicecombine");a();var l="%%play\n"+r;try{abc=new Abc(s),abc.tosvg("play",l),abc.tosvg("follower.abc",o)}catch(c){var h="%c "+c.message+"\nabc2svg tosvg bug - stack:\n"+c.stack;console.log(h,"color: red;")}return t}var e={},t=null,n=0,r=0,i=0,s=0;const o=!1;return e.render=function(e,t,n){return u("render"),l(e,t,n)},e}(),$EVENT_PLAYER=function(){"use strict";function p(e){c&&console.log("$EVENT_PLAYER."+e)}function d(e,t,r){n[e]&&(p("_playNote("+e+", '"+t+"', "+r+")"),n[e].play(t,l,{duration:r}))}function v(){var e,n,c,p;if(u===0){r&&r();return}c=s[o++];if(!c||c[0]>u){r&&r();return}n=c[1]-a;for(;;){var m=c[2],g=c[3],y=c[4];d(m,g,y);if(i){var b=c[0],w=(c[1]+f-t.currentTime)*h,E=w+y*h;setTimeout(i,w,b,!0),setTimeout(i,E,b,!1)}p=s[o];if(!p){e=n+y;break}c=p,e=c[1]-a;if(e!=n)break;o++}l+=e-n,setTimeout(v,(l-t.currentTime-1)*h)}function m(e,n,i){p("_play("+e+", "+n+")"),s=i;if(!s||!s.length){r&&r();return}o=0,u=n,a=0;while(s[o]&&o<e&&e!=0)a=s[o][1],o++;s[o]&&(l=t.currentTime+s[o][1]-a),f=t.currentTime+.05,v()}function g(){return p("_stop() at index="+o),u=0,a=0,o}function y(e,s,o,u,a){r=s,i=o;if("AudioContext"in window)console.log("%cSound being generated with window.AudioContext.","color: green;"),t=new window.AudioContext;else{if(!("webkitAudioContext"in window)){alert("Web Audio API is not available!\nCan't generate sound!");return}console.log("%cSound being generated with window.webkitAudioContext.","color: green;"),t=new window.webkitAudioContext}if(t===null&&a){a("Web Audio API is not available!");return}$SF_PLAYER.init(t,e,function(e){n[e.index]=e,u&&u(e)},function(e){a&&a(e)})}var e={},t=null,n={},r=null,i=null,s=null,o=0,u=0,a=0,f=0,l=0;const c=!1,h=1e3;return e.init=function(e,t,n,r,i){p("init"),y(e,t,n,r,i)},e.play=function(e,t,n){p("play"),m(e,t,n)},e.stop=function(){return p("stop"),g()},e.playNote=function(e,t,n){p("playNote"),d(e,t,n)},e}();if(typeof MIDI=="undefined")var MIDI={};typeof MIDI.Soundfont=="undefined"&&(MIDI.Soundfont={});var $SF_PLAYER=function(){"use strict";function i(e,n){t&&console.log("$SF_PLAYER."+e)}function s(e,t){n&&console.log("$SF_PLAYER - "+e,t)}function o(e,t,n,r){i("_load");var s=null;l(t)?s=c:w(t)?s=E:h(t)?s=p:y(t)?s=b:u(t)&&(s=a);var o=n||{};return s?s(e,t,o):r?Promise.resolve(r):Promise.reject("Source not valid ("+t+")")}function a(e,t,n){i("_loadMidiJSFile");var r=g(n.from,t);return o(e,o.fetch(r,"text").then(f),n)}function f(e){i("_midiJsToJson");var t=e.indexOf("MIDI.Soundfont.");if(t<0)throw Error("Invalid MIDI.js Soundfont format");t=e.indexOf("=",t)+2;var n=e.lastIndexOf(",");return JSON.parse(e.slice(t,n)+"}")}function l(e){return e instanceof ArrayBuffer}function c(e,t,n){return i("_loadArrayBuffer"),new Promise(function(n,r){e.decodeAudioData(t,function(e){n(e)},function(){r("Can't decode audio data ("+t.slice(0,30)+"...)")})})}function h(e){return e&&typeof e=="object"}function p(e,t,n){i("_loadObjectData");var r="",s={},u=Object.keys(t).map(function(i){if(n.only&&n.only.indexOf(i)===-1)return null;r+=i+", ";var u=t[i];return o(e,u,n,u).then(function(e){s[i]=e})});return Promise.all(u).then(function(){return i(r),s})}function d(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0}function v(e,t){var n=e.replace(/[^A-Za-z0-9\+\/]/g,""),r=n.length,i=t?Math.ceil((r*3+1>>2)/t)*t:r*3+1>>2,s=new Uint8Array(i);for(var o,u,a=0,f=0,l=0;l<r;l++){u=l&3,a|=d(n.charCodeAt(l))<<18-6*u;if(u===3||r-l===1){for(o=0;o<3&&f<i;o++,f++)s[f]=a>>>(16>>>o&24)&255;a=0}}return s}function m(e){return function(t){return typeof t=="string"&&e.test(t)}}function g(e,t){return typeof e=="string"?e+t:typeof e=="function"?e(t):t}function b(e,t,n){i("_loadBase64Audio");var r=t.indexOf(",");return o(e,v(t.slice(r+1)).buffer,n)}function w(e){return e&&typeof e.then=="function"}function E(e,t,n){return i("_loadPromise"),t.then(function(t){return o(e,t,n)})}function S(e){i("ADSR");var t=e.createGain(),n=t._voltage=N(e),r=C(n),s=C(n),o=C(n);return t._startAmount=C(s),t._endAmount=C(o),t._multiplier=C(r),t._multiplier.connect(t),t._startAmount.connect(t),t._endAmount.connect(t),t.value=r.gain,t.startValue=s.gain,t.endValue=o.gain,t.startValue.value=0,t.endValue.value=0,Object.defineProperties(t,x),t}function N(e){i("getVoltage");var t=e.createBufferSource(),n=e.createBuffer(1,2,e.sampleRate);return n.getChannelData(0).set(T),t.buffer=n,t.loop=!0,t}function C(e){i("scale");var t=e.context.createGain();return e.connect(t),t}function k(e){return Math.log(e+1)/Math.log(100)}function L(e,t,n,r,i){var s=t-e,o=r-n,u=i-n,a=u/o,f=e+a*s;return f<=e&&(f=e),f>=t&&(f=t),f}function M(e,t,n){function f(t,n){return n.id=i++,s[n.id]=n,n.source.onended=function(){var t=e.currentTime;n.source.disconnect(),n.env.disconnect(),n.disconnect(),a.emit("ended",t,n.id,n)},n.id}function l(t,n,r){var i=e.createGain();return i.gain.value=0,i.connect(o),i.env=P(e,r,u),i.env.connect(i.gain),i.source=e.createBufferSource(),i.source.buffer=n,i.source.connect(i),i.source.loop=r.loop||u.loop,i.source.playbackRate.value=H(r.cents||u.cents),i.source.loopStart=r.loopStart||u.loopStart,i.source.loopEnd=r.loopEnd||u.loopEnd,i.stop=function(n){var r=n||e.currentTime;a.emit("stop",r,t);var s=i.env.stop(r);i.source.stop(s)},i}var r=!1,i=0,s={},o=e.createGain(),u=Object.assign({},O,n),a={context:e,out:o,opts:u};return t instanceof AudioBuffer?a.buffer=t:a.buffers=t,a.start=function(t,n,i){if(a.buffer&&t!==null)return a.start(null,t,n);var s=t?a.buffers[t]:a.buffer;if(!s){console.warn("Buffer "+t+" not found.");return}if(!r){console.warn("SamplePlayer not connected to any node.");return}var o=i||A;n=Math.max(e.currentTime,n||0),a.emit("start",n,t,o);var u=l(t,s,o);return u.id=f(t,u),u.env.start(n),u.source.start(n),a.emit("started",n,u.id,u),o.duration&&u.stop(n+o.duration),u},a.play=function(e,t,n){return a.start(e,t,n)},a.stop=function(e,t){var n;return t=t||Object.keys(s),t.map(function(t){return n=s[t],n?(n.stop(e),n.id):null})},a.connect=function(e){return r=!0,o.connect(e),a},a.emit=function(e,t,n,r){a.onevent&&a.onevent(e,t,n,r);var i=a["on"+e];i&&i(t,n,r)},a}function _(e){return typeof e=="number"}function P(e,t,n){i("envelope");var r=S(e),s=t.adsr||n.adsr;return D.forEach(function(e,i){s?r[e]=s[i]:r[e]=t[e]||n[e]}),r.value.value=_(t.gain)?t.gain:_(n.gain)?n.gain:1,r}function H(e){return e?Math.pow(2,e/1200):1}function B(e){return/\.js(\?.*)?$/i.test(e)}function j(e,t,n){return n=n==="ogg"?n:"mp3",t=t==="FluidR3_GM"?t:"MusyngKite","https://gleitz.github.io/midi-js-soundfonts/"+t+"/"+e+"-"+n+".js"}function F(e){return r.indexOf(e)}function I(e,t,n){var r=n||{};s("_initInstrument",t);if(MIDI.Soundfont[t])return s("Already loaded, decode Soundfont ",t),o(e,MIDI.Soundfont[t],{only:r.only||r.notes}).then(function(n){var i=M(e,n,r).connect(e.destination);return i.name=t,i.index=F(t),i});var i=r.isSoundfontURL||B,u=r.nameToUrl||j,a=i(t)?t:u(t,r.soundfont,r.format);return o(e,a,{only:r.only||r.notes}).then(function(n){s("Load and decode ",a);var i=M(e,n,r).connect(e.destination);return i.url=a,i.name=t,i.index=F(t),i})}function q(e){function t(e){var t=[];for(var n=0,r=e.length;n<r;n++){var i=-1;typeof e[n]=="number"?i=e[n]:typeof e[n]=="string"&&(i=F(e[n])),i<=128&&i!=-1&&t.push(i)}return t}function n(e){return e.sort().filter(function(e,t,n){return!t||e!=n[t-1]})}return n(t(e))}var e={};const t=!1,n=!1,r=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honky-tonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass__lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_sci-fi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];o.fetch=function(e,t){return i("_load.fetch"),new Promise(function(n,r){var i=new XMLHttpRequest;t&&(i.responseType=t),i.open("GET",e),i.onload=function(){i.status===200?n(i.response):r(Error(i.statusText))},i.onerror=function(){r(Error("Network Error"))},i.send()})};var u=m(/\.js(\?.*)?$/i),y=m(/^data:audio/),x={attack:{value:0,writable:!0},decay:{value:0,writable:!0},sustain:{value:1,writable:!0},release:{value:0,writable:!0},getReleaseDuration:{value:function(){return this.release}},start:{value:function(e){i("start");var t=this._multiplier.gain,n=this._startAmount.gain,r=this._endAmount.gain;this._voltage.start(e),this._decayFrom=this._decayFrom=e+this.attack,this._startedAt=e;var s=this.sustain;t.cancelScheduledValues(e),n.cancelScheduledValues(e),r.cancelScheduledValues(e),r.setValueAtTime(0,e),this.attack?(t.setValueAtTime(0,e),t.linearRampToValueAtTime(1,e+this.attack),n.setValueAtTime(1,e),n.linearRampToValueAtTime(0,e+this.attack)):(t.setValueAtTime(1,e),n.setValueAtTime(0,e)),this.decay&&t.setTargetAtTime(s,this._decayFrom,k(this.decay))}},stop:{value:function(e,t){i("stop"),t&&(e-=this.release);var n=e+this.release;if(this.release){var r=this._multiplier.gain,s=this._startAmount.gain,o=this._endAmount.gain;r.cancelScheduledValues(e),s.cancelScheduledValues(e),o.cancelScheduledValues(e);var u=k(this.release);if(this.attack&&e<this._decayFrom){var a=L(0,1,this._startedAt,this._decayFrom,e);r.linearRampToValueAtTime(a,e),s.linearRampToValueAtTime(1-a,e),s.setTargetAtTime(0,e,u)}o.setTargetAtTime(1,e,u),r.setTargetAtTime(0,e,u)}return this._voltage.stop(n),n}},onended:{get:function(){return this._voltage.onended},set:function(e){this._voltage.onended=e}}},T=new Float32Array([1,1]),A={},O={gain:1,attack:.01,decay:.1,sustain:.9,release:.3,loop:!1,cents:0,loopStart:0,loopEnd:0},D=["attack","decay","sustain","release"];return e.init=function(e,t,n,i,o){if(typeof u=="undefined")var u={};typeof u.Soundfont=="undefined"&&(u.Soundfont={}),t=q(t);var a=t.length;s(a,"instrument(s) to initialize.");for(var f=0;f<a;f++){var l=t[f],c=r[l];s("#"+l,c),I(e,c).then(function(e){console.log('%cSoundfont instrument "'+e.name+'" loaded. (MIDI program '+e.index+")","color: green;"),n&&n(e)},function(e){i&&i(e)})}},e}();abc2svg={C:{BLEN:1536,BAR:0,CLEF:1,CUSTOS:2,GRACE:4,KEY:5,METER:6,MREST:7,NOTE:8,PART:9,REST:10,SPACE:11,STAVES:12,STBRK:13,TEMPO:14,BLOCK:16,REMARK:17,FULL:0,EMPTY:1,OVAL:2,OVALBARS:3,SQUARE:4,SL_ABOVE:1,SL_BELOW:2,SL_AUTO:3,SL_HIDDEN:4,SL_DOTTED:8},Abc:function(user){"use strict";function clone(e,t){if(!e)return e;var n=new e.constructor;for(var r in e)e.hasOwnProperty(r)&&(t&&typeof e[r]=="object"?n[r]=clone(e[r],t-1):n[r]=e[r]);return n}function errbld(e,t,n,r){var i,s,o,u,a;if(user.errbld){switch(e){case 0:e="warn";break;case 1:e="error";break;default:e="fatal"}user.errbld(e,t,n,r);return}if(r!=undefined&&r>=0){i=o=0;for(;;){s=parse.file.indexOf("\n",i);if(s<0||s>r)break;o++,i=s+1}u=r-i}a="",n&&(a=n,o&&(a+=":"+(o+1)+":"+(u+1)),a+=" ");switch(e){case 0:a+="Warning: ";break;case 1:a+="Error: ";break;default:a+="Internal bug: "}user.errmsg(a+t,o,u)}function error(e,t,n,r,i,s,o){var u,a,f,l;user.textrans&&(l=user.textrans[n],l&&(n=l)),arguments.length>3&&(n=n.replace(/\$./g,function(e){switch(e){case"$1":return r;case"$2":return i;case"$3":return s;default:return o}})),t&&t.fname?errbld(e,n,t.fname,t.istart):errbld(e,n)}function scanBuf(){this.index=0,scanBuf.prototype.char=function(){return this.buffer[this.index]},scanBuf.prototype.next_char=function(){return this.buffer[++this.index]},scanBuf.prototype.get_int=function(){var e=0,t=this.buffer[this.index];while(t>="0"&&t<="9")e=e*10+Number(t),t=this.next_char();return e}}function syntax(e,t,n,r,i,s){var o={fname:parse.fname,istart:parse.istart+parse.line.index};error(e,o,t,n,r,i,s)}function js_inject(js){/eval *\(|Function|setTimeout|setInterval/.test(js)?syntax(1,"Unsecure code"):eval('"use strict"\n'+js)}function y_get(e,t,n,r){var i,s=staff_tb[e],o=n/realwidth*YSTEP|0,u=(n+r)/realwidth*YSTEP|0;o<0&&(o=0),u>=YSTEP&&(u=YSTEP-1,o>u&&(o=u));if(t){i=s.top[o++];while(o<=u)i<s.top[o]&&(i=s.top[o]),o++}else{i=s.bot[o++];while(o<=u)i>s.bot[o]&&(i=s.bot[o]),o++}return i}function y_set(e,t,n,r,i){var s=staff_tb[e],o=n/realwidth*YSTEP|0,u=(n+r)/realwidth*YSTEP|0;o<0&&(o=0),u>=YSTEP&&(u=YSTEP-1,o>u&&(o=u));if(t)while(o<=u)s.top[o]<i&&(s.top[o]=i),o++;else while(o<=u)s.bot[o]>i&&(s.bot[o]=i),o++}function up_p(e,t){switch(t){case C.SL_ABOVE:return!0;case C.SL_BELOW:return!1}return e.multi&&e.multi!=0?e.multi>0:e.p_v.have_ly?e.pos.voc!=C.SL_ABOVE:!1}function d_arp(e){var t,n,r,i=e.s,s=e.dd,o=5;if(i.type==C.NOTE)for(t=0;t<=i.nhd;t++){if(i.notes[t].acc)r=5+i.notes[t].shac;else{r=6-i.notes[t].shhd;switch(i.head){case C.SQUARE:r+=3.5;break;case C.OVALBARS:case C.OVAL:r+=2}}r>o&&(o=r)}n=3*(i.notes[i.nhd].pit-i.notes[0].pit)+4,t=s.h,n<t&&(n=t),e.has_val=!0,e.val=n,e.x-=o,e.y=3*(i.notes[0].pit-18)-3}function d_cresc(e){if(e.ldst)return;var t,n,r,i,s,o,u,a,f=e.s,l=e.start,c,h;t=l.s,s=t.x+3,a=l.ix,a>0&&(c=a_de[a-1]),e.st=f.st,e.lden=!1,e.has_val=!0,i=up_p(f,f.pos.dyn),i&&(e.up=!0),c&&c.s==t&&(e.up&&!c.up||!e.up&&c.up)&&(r=c.dd,f_staff[r.func]&&(u=c.x+c.val+4,u>s&&(s=u))),e.defl.noen?(o=e.x-s,o<20&&(s=e.x-20-3,o=20)):(u=f.x,h=a_de[e.ix+1],h&&h.s==t&&(e.up&&!h.up||!e.up&&h.up)&&(r=h.dd,f_staff[r.func]&&(u-=5)),o=u-s-4,o<20&&(s-=(20-o)*.5,o=20)),e.val=o,e.x=s,e.y=y_get(e.st,i,s,o),i||(n=e.dd,e.y-=n.h)}function d_near(e){var t,n,r=e.s,i=e.dd;if(i.str)return;r.multi?n=r.multi>0:n=r.stem<0,n?t=r.ymx|0:t=r.ymn-i.h|0,t>-6&&t<24&&(n&&(t+=3),t=((t+6)/6|0)*6-6),n?r.ymx=t+i.h:r.ymn=t,e.y=t,r.type==C.NOTE&&(e.x+=r.notes[r.stem>=0?0:r.nhd].shhd),i.name[0]=="d"&&r.nflags>=-1&&(n?r.stem>0&&(e.x+=3.5):r.stem<0&&(e.x-=3.5))}function d_pf(e){var t,n,r,i,s=e.s,o=e.dd,u;e.val=o.wl+o.wr,i=up_p(s,s.pos.vol),i&&(e.up=!0),r=s.x-o.wl,e.ix>0&&(u=a_de[e.ix-1],u.s==s&&(e.up&&!u.up||!e.up&&u.up)&&(t=u.dd,f_staff[t.func]&&(n=u.x+u.val+4,n>r&&(r=n)))),e.x=r,e.y=y_get(s.st,i,r,e.val),i||(e.y-=o.h)}function d_slide(e){var t,n,r=e.s,i=r.notes[0].pit,s=5;for(t=0;t<=r.nhd;t++){if(r.notes[t].acc)n=4+r.notes[t].shac;else{n=5-r.notes[t].shhd;switch(r.head){case C.SQUARE:n+=3.5;break;case C.OVALBARS:case C.OVAL:n+=2}}r.notes[t].pit<=i+3&&n>s&&(s=n)}e.x-=s,e.y=3*(i-18)}function d_trill(e){if(e.ldst)return;var t,n,r,i,s,o=e.s,u=o.st,a=e.start.s,f=a.x;e.prev&&(f=e.prev.x+10,r=e.prev.y),e.st=u;if(e.dd.func!=4)switch(e.dd.glyph){case"8va":case"15ma":n=1;break;default:n=o.multi>=0}e.defl.noen?(i=e.x-f,i<20&&(f=e.x-20-3,i=20)):(i=o.x-f-6,o.type==C.NOTE&&(i-=6),i<20&&(f-=(20-i)*.5,i=20)),t=e.dd,r||(r=y_get(u,n,f,i)),n?(s=staff_tb[a.st].topbar+2,r<s&&(r=s)):(r-=t.h,s=staff_tb[a.st].botbar-2,r>s&&(r=s)),e.lden=!1,e.has_val=!0,e.val=i,e.x=f,e.y=r,n&&(r+=t.h),y_set(u,n,f,i,r),n?a.ymx=o.ymx=r:a.ymn=o.ymn=r}function d_upstaff(e){if(e.ldst)return;if(e.start){d_trill(e);return}var t,n,r,i=e.s,s=e.dd,o=i.x,u=s.wl+s.wr,a=staff_tb[i.st].topbar+2,f=staff_tb[i.st].botbar-2;i.nhd&&(o+=i.notes[i.stem>=0?0:i.nhd].shhd),n=-1;if(s.func==4)n=0;else if(i.pos)switch(i.pos.orn){case C.SL_ABOVE:n=1;break;case C.SL_BELOW:n=0}switch(s.glyph){case"accent":case"roll":!n||n<0&&(i.multi<0||!i.multi&&i.stem>0)?(t=y_get(i.st,!1,i.x-s.wl,u)-2,t>f&&(t=f),t-=s.h,y_set(i.st,!1,i.x,0,t),r=!0,i.ymn=t):(t=y_get(i.st,!0,i.x-s.wl,u)+2,t<a&&(t=a),y_set(i.st,!0,i.x-s.wl,u,t+s.h),i.ymx=t+s.h);break;case"brth":case"lphr":case"mphr":case"sphr":t=a+1,s.glyph=="brth"&&t<i.ymx&&(t=i.ymx);for(i=i.ts_next;i;i=i.ts_next)if(i.seqst)break;o+=((i?i.x:realwidth)-o)*.45;break;default:s.name.indexOf("invert")==0&&(r=!0),s.name!="invertedfermata"&&(n>0||n<0&&i.multi>=0)?(t=y_get(i.st,!0,i.x-s.wl,u)+2,t<a&&(t=a),y_set(i.st,!0,i.x-s.wl,u,t+s.h),i.ymx=t+s.h):(t=y_get(i.st,!1,i.x-s.wl,u)-2,t>f&&(t=f),t-=s.h,y_set(i.st,!1,i.x-s.wl,u,t),s.name=="fermata"&&(r=!0),i.ymn=t)}r&&(t+=s.h,e.inv=!0),e.x=o,e.y=t}function deco_add(e){var t=e.match(/(\S*)\s+(.*)/);decos[t[1]]=t[2]}function deco_def(e){var t,n,r,i,s,o,u,a,f=decos[e];if(!f){cfmt.decoerr&&error(1,null,"Unknown decoration '$1'",e);return}t=f.match(/(\d+)\s+(.+?)\s+([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)/);if(!t){error(1,null,"Invalid decoration '$1'",e);return}var l=Number(t[1]),c=parseFloat(t[3]),h=parseFloat(t[4]),p=parseFloat(t[5]);if(isNaN(l)){error(1,null,"%%deco: bad C function value '$1'",t[1]);return}if((l<0||l>10)&&(l<32||l>41)){error(1,null,"%%deco: bad C function index '$1'",l);return}if(c<0||h<0||p<0){error(1,null,"%%deco: cannot have a negative value '$1'",f);return}if(c>50||h>80||p>80){error(1,null,"%%deco: abnormal h/wl/wr value '$1'",f);return}n=dd_tb[e],n||(n={name:e},dd_tb[e]=n),n.func=n.name.indexOf("head-")==0?9:l,n.glyph=t[2],n.h=c,n.wl=h,n.wr=p,a=f.replace(t[0],"").trim(),a&&(a[0]=='"'&&(a=a.slice(1,-1)),n.str=a),n.func==6&&n.str==undefined&&(n.str=n.name),s=n.name.slice(-1);if(s=="("||s==")"&&n.name.indexOf("(")<0){i=n.name.slice(0,-1)+(s=="("?")":"("),r=dd_tb[i];if(r)s=="("?(n.dd_en=r,r.dd_st=n):(n.dd_st=r,r.dd_en=n);else{r=deco_def(i);if(!r)return}}return n}function deco_cnv(e,t,n){var r,i,s,o,u,a=e.length;for(r=0;r<a;r++){o=e[r],s=dd_tb[o];if(!s){s=deco_def(o);if(!s)continue}switch(s.func){case 0:if(t.type==C.BAR&&s.name=="dot"){t.bar_dotted=!0;break};case 1:case 2:if(!t.notes){error(1,t,errs.must_note_rest,s.name);continue}break;case 8:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}u=t.notes[t.nhd],u.a_dcn||(u.a_dcn=[]),u.a_dcn.push(s.name);continue;case 9:if(!t.notes){error(1,t,errs.must_note_rest,s.name);continue}for(i=0;i<=t.nhd;i++)u=t.notes[i],u.a_dcn||(u.a_dcn=[]),u.a_dcn.push(s.name);continue;default:break;case 10:if(t.notes)for(i=0;i<=t.nhd;i++)t.notes[i].color=s.name;else t.color=s.name;continue;case 32:t.invis=!0;continue;case 33:if(t.type!=C.BAR){error(1,t,"!beamon! must be on a bar");continue}t.beam_on=!0;continue;case 34:if(t.type!=C.NOTE||!n||n.type!=C.NOTE||t.nflags!=n.nflags){error(1,t,"!$1! must be on the last of a couple of notes",s.name);continue}t.trem2=!0,t.beam_end=!0,n.trem2=!0,n.beam_st=!0,t.ntrem=n.ntrem=Number(s.name[4]),n.nflags=--t.nflags,n.head=++t.head,t.nflags>0?t.nflags+=t.ntrem:(t.nflags<=-2&&(t.stemless=!0,n.stemless=!0),t.nflags=t.ntrem),n.nflags=t.nflags;for(i=0;i<=t.nhd;i++)t.notes[i].dur*=2;for(i=0;i<=n.nhd;i++)n.notes[i].dur*=2;continue;case 35:if(t.type!=C.NOTE){error(1,t,"!xstem! must be on a note");continue}t.xstem=!0,t.nflags=0;continue;case 36:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}s.name[6]=="1"?t.beam_br1=!0:t.beam_br2=!0;continue;case 37:t.rbstop=1;continue;case 38:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}t.trem1=!0,t.ntrem=s.name.length,t.nflags>0?t.nflags+=t.ntrem:t.nflags=t.ntrem;continue;case 39:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}t.feathered_beam=s.name[5]=="a"?1:-1;continue;case 40:t.stemless=!0;continue;case 41:t.rbstop=2;continue}t.a_dd||(t.a_dd=[]),t.a_dd.push(s)}}function deco_update(e,t){var n,r,i=a_de.length;for(n=0;n<i;n++)r=a_de[n],r.s==e&&(r.x+=t)}function deco_width(e){var t,n,r=0,i=e.a_dd,s=i.length;for(n=0;n<s;n++){t=i[n];switch(t.func){case 1:r<7&&(r=7);break;case 2:r<14&&(r=14);break;case 3:switch(t.glyph){case"brth":case"lphr":case"mphr":case"sphr":e.wr<20&&(e.wr=20)}}}return r!=0&&e.prev&&e.prev.type==C.BAR&&(r-=3),r}function draw_all_deco(){if(a_de.length==0)return;var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v=[],m=[];if(!cfmt.dynalign){o=nstaff,a=staff_tb[o].y;while(--o>=0)f=staff_tb[o].y,m[o]=(a+24+f)*.5,a=f}for(;;){e=a_de.shift();if(!e)break;n=e.dd;if(!n)continue;if(n.dd_en)continue;r=e.s,s=n.glyph,h=s.indexOf("/"),h>0&&(r.stem>=0?s=s.slice(0,h):s=s.slice(h+1)),f_staff[n.func]?set_sscale(r.st):set_scale(r),o=e.st;if(!staff_tb[o].topbar)continue;u=e.x,a=e.y+staff_tb[o].y;if(e.m!=undefined)i=r.notes[e.m],u+=i.shhd*stv_g.scale;else if(f_staff[n.func]&&!cfmt.dynalign&&(e.up&&o>0||!e.up&&o<nstaff)){e.up?l=m[--o]:l=m[o++],l-=n.h*.5;if(e.up&&a<l||!e.up&&a>l){f=y_get(o,!e.up,e.x,e.val)+staff_tb[o].y,e.up&&(f-=n.h);if(e.up&&f>l||!e.up&&f<l)a=l}}c=user[s];if(c&&typeof c=="function"){c(u,a,e);continue}if(self.psdeco(s,u,a,e))continue;anno_start(r,"deco"),e.inv&&(g_open(u,a,0,1,-1),u=a=0),e.has_val?(n.func!=2||stv_g.st<0?out_deco_val(u,a,s,e.val/stv_g.scale,e.defl):out_deco_val(u,a,s,e.val,e.defl),e.defl.noen&&v.push(e.start)):n.str!=undefined&&n.str!="sfz"?(p=n.str,p[0]=="@"&&(d=p.match(/^@([0-9.-]+),([0-9.-]+);?/),u+=Number(d[1]),a+=Number(d[2]),p=p.replace(d[0],"")),out_deco_str(u,a,s,p)):e.lden?out_deco_long(u,a,e):xygl(u,a,s),stv_g.g&&g_close(),anno_stop(r,"deco")}a_de=v}function draw_deco_near(){function n(e){var t,n,r=e.x-e.wl,i=a_de.length;for(t=0;t<i;t++)n=a_de[t],n.ix=t,n.s.x=n.x=r,n.defl.nost=!0}function r(e){var t,n,r,i,s,o,u=e.a_dd.length;for(n=0;n<u;n++){t=e.a_dd[n];switch(t.func){default:i=0;break;case 3:case 4:case 5:if(ottava[t.name]){o=t.name.slice(0,-1)+e.st.toString();if(od[o]){if(t.name[t.name.length-1]=="("){od[o]++;continue}od[o]--;if(e.v+1!=od[o]>>8||!od[o])continue;od[o]&=255}else t.name[t.name.length-1]=="("&&(od[o]=1+(e.v+1<<8))}i=e.pos.orn;break;case 6:i=e.pos.vol;break;case 7:i=e.pos.dyn}if(i==C.SL_HIDDEN)continue;s={s:e,dd:t,st:e.st,ix:a_de.length,defl:{},x:e.x,y:e.y},a_de.push(s),t.dd_en?s.ldst=!0:t.dd_st&&(s.lden=!0,s.defl.nost=!0);if(!f_near[t.func])continue;func_tb[t.func](s)}}function i(e,t){var n,r,i,s,o,u,a,f=e.notes[t],l=f.a_dcn.length;for(o=0;o<l;o++){u=f.a_dcn[o],a=dd_tb[u];if(!a){a=deco_def(u);if(!a)continue}switch(a.func){case 0:case 1:case 3:case 4:case 8:break;default:error(1,null,"Cannot have !$1! on a head",a.name);continue;case 9:f.invis=!0;break;case 10:f.color=a.name;continue;case 32:f.invis=!0;continue;case 40:e.stemless=!0;continue}i={s:e,dd:a,st:e.st,m:t,ix:0,defl:{},x:e.x,y:3*(f.pit-18)},a_de.push(i),a.dd_en?i.ldst=!0:a.dd_st&&(i.lden=!0,i.defl.nost=!0)}}function s(e){var t;e.a_dd&&r(e);if(e.notes)for(t=0;t<e.notes.length;t++)e.notes[t].a_dcn&&i(e,t)}function o(){var e,t,n,r,i,s,o,u,a,f=a_de.length;for(e=0;e<f;e++){n=a_de[e];if(!n.ldst)continue;i=n.dd,s=i.dd_en,u=n.s,o=u.v;for(t=e+1;t<f;t++){r=a_de[t];if(!r.start&&r.dd==s&&r.s.v==o)break}if(t==f){a=u.st;for(t=e+1;t<f;t++){r=a_de[t];if(!r.start&&r.dd==s&&r.s.st==a)break}}t==f&&(r={s:n.s,st:n.st,dd:s,ix:a_de.length-1,x:realwidth-6,y:n.s.y,lden:!0,defl:{noen:!0}},r.x<u.x+10&&(r.x=u.x+10),n.m!=undefined&&(r.m=n.m),a_de.push(r)),r.start=n,r.defl.nost=n.defl.nost,i.name=="trill("&&e>0&&a_de[e-1].dd.name=="trill"&&(r.prev=a_de[e-1])}for(e=0;e<f;e++){r=a_de[e];if(!r.lden||r.start)continue;u=r.s,n={s:prev_scut(u),st:r.st,dd:r.dd.dd_st,ix:a_de.length-1,y:u.y,ldst:!0},n.x=n.s.x,r.m!=undefined&&(n.m=r.m),a_de.push(n),r.start=n}}var e,t;for(e=tsfirst;e;e=e.ts_next){switch(e.type){case C.CLEF:case C.KEY:case C.METER:continue}break}a_de.length!=0&&n(e);for(;e;e=e.ts_next){switch(e.type){case C.BAR:case C.MREST:case C.NOTE:case C.REST:case C.SPACE:break;case C.GRACE:for(t=e.extra;t;t=t.next)s(t);default:continue}s(e)}o()}function draw_deco_note(){var e,t,n,r,i=a_de.length;for(e=0;e<i;e++)t=a_de[e],n=t.dd,r=n.func,f_note[r]&&t.m==undefined&&func_tb[r](t)}function draw_deco_staff(){function g(e){var t,n,i,s,o,u,a,f,l;i=staff_tb[e.st].topbar+25;for(t=e.sym;t;t=t.next){if(t.type!=C.BAR)continue;if(!t.rbstart||t.norepbra)continue;if(!t.next)break;l||(l=t,set_font("repeat")),n=t;for(;;){if(!t.next)break;t=t.next;if(t.rbstop)break}s=y_get(e.st,!0,n.x,t.x-n.x),i<s&&(i=s),n.text&&(f=strwh(n.text),s=y_get(e.st,!0,n.x+4,f[0]),s+=f[1],i<s&&(i=s)),t.rbstart&&(t=t.prev)}t=l;if(!t)return;set_dscale(e.st,!0),s=i*staff_tb[e.st].staffscale;for(;t;t=t.next){if(!t.rbstart||t.norepbra)continue;n=t;for(;;){if(!t.next)break;t=t.next;if(t.rbstop)break}if(n==t)break;r=n.x,t.type!=C.BAR?a=t.rbstop?0:t.x-realwidth+4:t.bar_type.length>1&&t.bar_type!="[]"||t.bar_type=="]"?n.st>0&&!(cur_sy.staves[n.st-1].flags&STOP_BAR)?a=t.wl:t.bar_type.slice(-1)==":"?a=12:t.bar_type[0]!=":"?a=0:a=8:a=t.rbstop?0:8,a=t.x-r-a,!t.next&&!t.rbstop&&!e.bar_start&&(e.bar_start=clone(t),e.bar_start.type=C.BAR,e.bar_start.bar_type="[",delete e.bar_start.text,e.bar_start.rbstart=1,delete e.bar_start.a_gch),n.text&&xy_str(r+4,s-gene.curfont.size-3,n.text),xypath(r,s),n.rbstart==2&&(output+="m0 20v-20"),output+="h"+a.toFixed(2),t.rbstop==2&&(output+="v20"),output+='"/>\n',y_set(n.st,!0,r,a,i+2),t.rbstart&&(t=t.prev)}}var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v=new Array(nstaff),m=a_de.length;for(o=0;o<=nstaff;o++)v[o]={ymin:0,ymax:0};for(o=0;o<m;o++){a=a_de[o],f=a.dd;if(!f)continue;if(!f_staff[f.func]||a.m!=undefined)continue;func_tb[f.func](a);if(f.dd_en)continue;cfmt.dynalign&&(a.up?a.y>v[a.st].ymax&&(v[a.st].ymax=a.y):a.y<v[a.st].ymin&&(v[a.st].ymin=a.y))}for(o=0;o<m;o++){a=a_de[o],f=a.dd;if(!f)continue;if(f.dd_en||!f_staff[f.func])continue;cfmt.dynalign?(a.up?i=v[a.st].ymax:i=v[a.st].ymin,a.y=i):i=a.y,a.up&&(i+=f.h),y_set(a.st,a.up,a.x,a.val,i)}for(o=0;o<=nstaff;o++)v[o]={ymin:0,ymax:24};for(e=tsfirst;e;e=e.ts_next){if(!e.a_gch)continue;t||(t=e),c=null;for(h=0;h<e.a_gch.length;h++){l=e.a_gch[h];if(l.type!="g")continue;c=l;if(l.y<0)break}c&&(s=c.w,c.y>=0?(i=y_get(e.st,!0,e.x,s),i>v[e.st].ymax&&(v[e.st].ymax=i)):(i=y_get(e.st,!1,e.x,s),i<v[e.st].ymin&&(v[e.st].ymin=i)))}if(t){for(o=0;o<=nstaff;o++)d=staff_tb[o].botbar,v[o].ymin>d-4&&(v[o].ymin=d-4),p=staff_tb[o].topbar,v[o].ymax<p+4&&(v[o].ymax=p+4);set_dscale(-1);for(e=t;e;e=e.ts_next){if(!e.a_gch)continue;self.draw_gchord(e,v[e.st].ymin,v[e.st].ymax)}}for(u=0;u<voice_tb.length;u++){n=voice_tb[u];if(n.second||!n.sym)continue;g(n)}}function draw_measnb(){var e,t,n,r,i,s,o,u,a=cur_sy;for(t=0;t<=nstaff;t++)if(a.st_print[t])break;if(t>nstaff)return;set_dscale(t),staff_tb[t].staffscale!=1&&(u=get_font("measure").size,param_set_font("measurefont","* "+(u/staff_tb[t].staffscale).toString())),set_font("measure"),e=tsfirst,n=gene.nbar;if(n>1)if(cfmt.measurenb==0)o=!0,i=y_get(t,!0,0,20),i<staff_tb[t].topbar+14&&(i=staff_tb[t].topbar+14),cfmt.measurebox?xy_str_b(0,i,n.toString()):xy_str(0,i,n.toString()),y_set(t,!0,0,20,i+gene.curfont.size+2);else if(n%cfmt.measurenb==0){for(;;e=e.ts_next){switch(e.type){case C.METER:case C.CLEF:case C.KEY:case C.STBRK:continue}break}while(e.st!=t)e=e.ts_next;if(e.type!=C.BAR||!e.bar_num)e.prev&&e.prev.type!=C.CLEF&&(e=e.prev),r=e.x-e.wl,o=!0,s=cwid("0")*gene.curfont.swfac,n>=10&&(s*=n>=100?3:2),cfmt.measurebox&&(s+=4),i=y_get(t,!0,r,s),i<staff_tb[t].topbar+6&&(i=staff_tb[t].topbar+6),i+=2,cfmt.measurebox?(xy_str_b(r,i,n.toString()),i+=2,s+=3):xy_str(r,i,n.toString()),i+=gene.curfont.size,y_set(t,!0,r,s,i),e.ymx=i}for(;e;e=e.ts_next){switch(e.type){case C.STAVES:a=e.sy;for(t=0;t<nstaff;t++)if(a.st_print[t])break;set_sscale(t);continue;default:continue;case C.BAR:if(!e.bar_num)continue}n=e.bar_num;if(cfmt.measurenb==0||n%cfmt.measurenb!=0||!e.next)continue;o||(o=!0),s=cwid("0")*gene.curfont.swfac,n>=10&&(s*=n>=100?3:2),cfmt.measurebox&&(s+=4),r=e.x-s*.4,i=y_get(t,!0,r,s),i<staff_tb[t].topbar+6&&(i=staff_tb[t].topbar+6),e.next.type==C.NOTE&&(e.next.stem>0?i<e.next.ys-gene.curfont.size&&(i=e.next.ys-gene.curfont.size):i<e.next.y&&(i=e.next.y)),i+=2,cfmt.measurebox?(xy_str_b(r,i,n.toString()),i+=2,s+=3):xy_str(r,i,n.toString()),i+=gene.curfont.size,y_set(t,!0,r,s,i),e.ymx=i}gene.nbar=n,u&&param_set_font("measurefont","* "+u.toString())}function draw_notempo(e,t,n,r,i){var s,o,u,a=identify_note(e,r),f=a[0],l=a[1],c=a[2];out_XYAB('<g transform="translate(X,Y) scale(F)">\n',t+4,n+5,i);switch(f){case C.OVAL:o="HD";break;case C.EMPTY:o="Hd";break;default:o="hd"}xygl(-posx,posy,o),s=4;if(l){u=9,c>0&&(u+=4);switch(f){case C.SQUARE:u+=3;break;case C.OVALBARS:case C.OVAL:u+=2;break;case C.EMPTY:u+=1}s=u*l,u-=posx;while(--l>=0)xygl(u,posy,"dot"),u+=3.5}return r<C.BLEN&&(c<=0?out_stem(-posx,posy,21):(out_stem(-posx,posy,21,!1,c),s<6&&(s=6))),output+="</g>\n",(s+15)*i}function tempo_width(e){var t=0;return set_font("tempo"),e.tempo_str1&&(t=strwh(e.tempo_str1)[0]),e.tempo_ca&&(t+=strwh(e.tempo_ca)[0]),e.tempo_notes&&(t+=10*e.tempo_notes.length+6+cwid(" ")*gene.curfont.swfac*6+10),e.tempo_str2&&(t+=strwh(e.tempo_str2)[0]),t}function write_tempo(e,t,n){var r,i,s=.6*gene.curfont.size/15;set_font("tempo"),e.tempo_str1&&(xy_str(t,n,e.tempo_str1),t+=strwh(e.tempo_str1)[0]+3);if(e.tempo_notes){for(r=0;r<e.tempo_notes.length;r++)t+=draw_notempo(e,t,n,e.tempo_notes[r],s);xy_str(t,n,"="),t+=strwh("= ")[0],e.tempo_ca&&(xy_str(t,n,e.tempo_ca),t+=strwh(e.tempo_ca)[0]),e.tempo?(xy_str(t,n,e.tempo.toString()),i=cwid("0")*gene.curfont.swfac,t+=i+5,e.tempo>=10&&(t+=i,e.tempo>=100&&(t+=i))):t+=draw_notempo(e,t,n,e.new_beat,s)}e.tempo_str2&&xy_str(t,n,e.tempo_str2),e.del=!0}function draw_partempo(e,t){var n,r,i,s,o,u,a=0,f=0,l=staff_tb[e].topbar+8,c=0,h=1,p=0;for(n=tsfirst;n;n=n.ts_next){if(n.type!=C.TEMPO||n.del)continue;i||(i=n),o=tempo_width(n),n.time==0&&n.x>40&&(n.x=40),u=y_get(e,!0,n.x-16,o),u>l&&(l=u),p>=n.x-16&&!(c&h>>1)&&(c|=h),h<<=1,p=n.x-16+o}if(i){set_sscale(-1),set_font("tempo"),f=gene.curfont.size+2+2,u=2-f,s=u-f,c!=0&&(f*=2),t<l+f&&(a=l+f-t);for(n=i;n;n=n.ts_next){if(n.type!=C.TEMPO||n.del)continue;if(user.anno_start||user.anno_stop)n.wl=16,n.wr=30,n.ymn=c&1?s:u,n.ymx=n.ymn+14,anno_start(n);write_tempo(n,n.x-16,c&1?s:u),anno_stop(n),c>>=1}}l=staff_tb[e].topbar+8;for(n=tsfirst;n;n=n.ts_next){if(n.type!=C.PART)continue;r||(r=n,set_font("parts"),s=gene.curfont.size+2+2),o=strwh(n.text)[0],u=y_get(e,!0,n.x-10,o+3),l<u&&(l=u)}if(r){set_sscale(-1),t<l+s+f&&(a=l+s+f-t);for(n=r;n;n=n.ts_next){if(n.type!=C.PART)continue;n.x-=10;if(user.anno_start||user.anno_stop)o=strwh(n.text)[0],n.wl=0,n.wr=o,n.ymn=-f-s,n.ymx=n.ymn+s,anno_start(n);cfmt.partsbox?xy_str_b(n.x,2-f-s,n.text):xy_str(n.x,2-f-s,n.text),anno_stop(n)}}return a}function b_pos(e,t,n,r){function l(e){var t=Math.round((e+12)/6)*6-12;return t-e}var i,s,o,u,a=e?3.5:BEAM_SHIFT,f=e?1.8:BEAM_DEPTH;if(t>0){s=r-(n-1)*a-f;if(s>26)return 0;i=r}else{i=r+(n-1)*a+f;if(i<-2)return 0;s=r}return o=l(i-BEAM_OFFSET),u=l(s+BEAM_OFFSET),o*o>u*u?u:o}function sym_dup(e){var t,n,r=clone(e);r.invis=!0,delete r.text,delete r.a_gch,delete r.a_ly,delete r.a_dd,r.notes=clone(e.notes);for(t=0;t<=r.nhd;t++)n=r.notes[t]=clone(e.notes[t]),delete n.a_dcn;return r}function calculate_beam(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T;t.beam_st||(n=sym_dup(t),lkvsym(n,t),lktsym(n,t),n.x-=12,n.x>t.prev.x+12&&(n.x=t.prev.x+12),n.beam_st=!0,delete n.beam_end,n.tmp=!0,delete n.slur_start,delete n.slur_end,t=n),s=o=0,f=l=!1,u=t.st,a=t.v,E=t.grace?GSTEM_XOFF:3.5;for(r=t;;r=r.next){if(r.type==C.NOTE){r.nflags>o&&(o=r.nflags),s++,r.st!=u&&(f=!0),r.stem!=t.stem&&(l=!0),!x&&!r.invis&&(!r.stemless||r.trem2)&&(x=!0);if(r.beam_end)break}if(!r.next){for(;;r=r.prev)if(r.type==C.NOTE)break;n=sym_dup(r),n.next=r.next,n.next&&(n.next.prev=n),r.next=n,n.prev=r,n.ts_next=r.ts_next,n.ts_next&&(n.ts_next.ts_prev=n),r.ts_next=n,n.ts_prev=r,delete n.beam_st,n.beam_end=!0,n.tmp=!0,delete n.slur_start,delete n.slur_end,n.x+=12,n.x<realwidth-12&&(n.x=realwidth-12),r=n,s++;break}}if(!x)return!1;e.s2=r;if(staff_tb[u].y==0){if(f)return!1}else if(!f)return e.s1=t,e.a=(t.ys-r.ys)/(t.xs-r.xs),e.b=t.ys-t.xs*e.a+staff_tb[u].y,e.nflags=o,!0;w=t,y=100,b=0;for(n=t;;n=n.next){if(n.type!=C.NOTE)continue;(S=n.p_v.scale)==1&&(S=staff_tb[n.st].staffscale),n.stem>=0?(c=E+n.notes[0].shhd,n.notes[n.nhd].pit>b&&(b=n.notes[n.nhd].pit,w=n)):(c=-E+n.notes[n.nhd].shhd,n.notes[0].pit<y&&(y=n.notes[0].pit,w=n)),n.xs=n.x+c*S;if(n==r)break}cfmt.flatbeams?d=0:!l&&s>=3&&w!=t&&w!=r&&(d=0),h=t.ys+staff_tb[u].y,d==undefined&&(d=(r.ys+staff_tb[r.st].y-h)/(r.xs-t.xs)),d!=0&&(d>0?d=BEAM_SLOPE*d/(BEAM_SLOPE+d):d=BEAM_SLOPE*d/(BEAM_SLOPE-d)),v=(h+r.ys+staff_tb[r.st].y)/2-d*(r.xs+t.xs)/2,g=0,n=t;if(l)p=((t.grace?3.5:BEAM_SHIFT)*(o-1)+BEAM_DEPTH)*.5,t.stem!=r.stem&&t.nflags<r.nflags?v+=p*r.stem:v+=p*t.stem;else if(!t.grace){var N=BEAM_DEPTH+BEAM_SHIFT*(o-1);while(n.ts_prev&&n.ts_prev.type==C.NOTE&&n.ts_prev.time==n.time&&n.ts_prev.x>t.xs)n=n.ts_prev;for(;n&&n.time<=r.time;n=n.ts_next){if(n.type!=C.NOTE||n.invis||n.st!=u&&n.v!=a)continue;c=n.v==a?n.xs:n.x,p=d*c+v-staff_tb[n.st].y;if(n.v==a)m=min_tb[n.nhd==0?0:1][n.nflags],n.stem>0?(n.notes[n.nhd].pit>26&&(m-=2,n.notes[n.nhd].pit>28&&(m-=2)),m-=p-3*(n.notes[n.nhd].pit-18)):(n.notes[0].pit<18&&(m-=2,n.notes[0].pit<16&&(m-=2)),m-=3*(n.notes[0].pit-18)-p),m+=BEAM_DEPTH+BEAM_SHIFT*(n.nflags-1);else{if(t.stem>0)if(n.stem>0){if(n.ymn>p+4||n.ymx<p-N-2)continue;n.v>a?m=n.ymx-p:m=n.ymn+8-p}else m=n.ymx-p;else if(n.stem<0){if(n.ymx<p-4||n.ymn>p-N-2)continue;n.v<a?m=p-n.ymn:m=p-n.ymx+8}else m=p-n.ymn;m+=2+N}m>g&&(g=m)}}else for(;;n=n.next){p=d*n.xs+v-staff_tb[n.st].y,m=GSTEM-2,n.stem>0?m-=p-3*(n.notes[n.nhd].pit-18):m+=p-3*(n.notes[0].pit-18),m+=3*(n.nflags-1),m>g&&(g=m);if(n==r)break}g>0&&(v+=t.stem*g);if(!f&&!l)for(n=t.next;;n=n.next){switch(n.type){case C.REST:i=n.ts_next;if(!i||i.st!=u||i.type!=C.NOTE&&i.type!=C.REST)break;case C.BAR:if(n.invis)break;case C.CLEF:h=d*n.x+v,t.stem>0?(h=n.ymx-h+BEAM_DEPTH+BEAM_SHIFT*(o-1)+2,h>0&&(v+=h)):(h=n.ymn-h-BEAM_DEPTH-BEAM_SHIFT*(o-1)-2,h<0&&(v+=h));break;case C.GRACE:for(i=n.extra;i;i=i.next)h=d*i.x+v,t.stem>0?(h=i.ymx-h+BEAM_DEPTH+BEAM_SHIFT*(o-1)+2,h>0&&(v+=h)):(h=i.ymn-h-BEAM_DEPTH-BEAM_SHIFT*(o-1)-2,h<0&&(v+=h))}if(n==r)break}d==0&&(v+=b_pos(t.grace,t.stem,o,v-staff_tb[u].y));for(n=t;;n=n.next){switch(n.type){case C.NOTE:n.ys=d*n.xs+v-staff_tb[n.st].y,n.stem>0?(n.ymx=n.ys+2.5,n.ts_prev&&n.ts_prev.stem>0&&n.ts_prev.st==n.st&&n.ts_prev.ymn<n.ymx&&n.ts_prev.x==n.x&&n.notes[0].shhd==0&&(n.ts_prev.x-=3,n.ts_prev.xs-=3)):n.ymn=n.ys-2.5;break;case C.REST:h=d*n.x+v-staff_tb[n.st].y,T=BEAM_DEPTH+BEAM_SHIFT*(o-1)+(n.head!=C.FULL?4:9);if(t.stem>0){h-=T,t.multi==0&&h>12&&(h=12);if(n.y<=h)break}else{h+=T,t.multi==0&&h<12&&(h=12);if(n.y>=h)break}n.head!=C.FULL&&(h=((h+3+12)/6|0)*6-12),n.y=h}if(n==r)break}return staff_tb[u].y==0?!1:(e.s1=t,e.a=d,e.b=v,e.nflags=o,!0)}function draw_beams(e){function v(e,t,n,r,i,s){var o,u,a=i.s1,f=a.nflags;a.ntrem&&(f-=a.ntrem),a.trem2&&s>f&&(a.dur>=C.BLEN/2?(e=a.x+6,t=i.s2.x-6):a.dur<C.BLEN/4&&(e+=5,t-=6)),o=i.a*e+i.b-n,t-=e,t/=stv_g.scale,u=i.a*t*stv_g.scale,xypath(e,o,!0),output+="l"+t.toFixed(2)+" "+(-u).toFixed(2)+"v"+r.toFixed(2)+"l"+(-t).toFixed(2)+" "+u.toFixed(2)+'z"/>\n'}var t,n,r,i,s,o,u,a,f,l,c,h,p=e.s1,d=e.s2;anno_start(p,"beam"),p.grace?(s=3.5,o=3.2,i=.29,u=1.8):(s=BEAM_SHIFT,o=BEAM_STUB,i=.34,u=BEAM_DEPTH),r=p.stem,p.stem!=d.stem&&p.nflags<d.nflags&&(r=d.stem),r<0&&(u=-u),v(p.xs-i,d.xs+i,0,u,e,1),a=0;for(t=p;;t=t.next){t.type==C.NOTE&&t.stem!=r&&(t.ys=e.a*t.xs+e.b-staff_tb[t.st].y+s*(t.nflags-1)*t.stem-u);if(t==d)break}p.feathered_beam&&(a=s/(d.xs-p.xs),p.feathered_beam>0?(a=-a,s=a*p.xs):s=a*d.xs,a*=r),i=0;for(n=2;n<=e.nflags;n++){i+=s,a!=0&&(e.a+=a);for(t=p;;t=t.next){if(t.type!=C.NOTE||t.nflags<n){if(t==d)break;continue}if(t.trem1&&n>t.nflags-t.ntrem){h=t.dur>=C.BLEN/2?t.x:t.xs,v(h-5,h+5,(i+2.5)*r,u,e,n);if(t==d)break;continue}l=t;for(;;){if(t==d)break;f=t.next;if(f.type==C.NOTE||f.type==C.REST)if(f.trem1){if(f.nflags-f.ntrem<n)break}else if(f.nflags<n)break;if(f.beam_br1||f.beam_br2&&n>2)break;t=f}c=t;while(c.type!=C.NOTE)c=c.prev;h=l.xs;if(l==c)if(l==p)h+=o;else if(l==d)h-=o;else if(l.beam_br1||l.beam_br2&&n>2)h+=o;else{f=l.next;while(f.type!=C.NOTE)f=f.next;if(f.beam_br1||f.beam_br2&&n>2)h-=o;else{l=l.prev;while(l.type!=C.NOTE)l=l.prev;l.nflags<f.nflags||l.nflags==f.nflags&&l.dots<f.dots?h+=o:h-=o}}v(h,c.xs,i*r,u,e,n);if(t==d)break}}p.tmp?unlksym(p):d.tmp&&unlksym(d),anno_stop(p,"beam")}function draw_lstaff(e){function u(e,t,n){var r,i,s,o;while(!cur_sy.st_print[t]){if(cur_sy.staves[t].flags&n)return;t++}r=i=t;for(;;){cur_sy.st_print[r]&&(i=r);if(cur_sy.staves[r].flags&n)break;r++}s=staff_tb[t].y+staff_tb[t].topbar*staff_tb[t].staffscale,o=staff_tb[i].y+staff_tb[i].botbar*staff_tb[i].staffscale,n&(CLOSE_BRACE|CLOSE_BRACE2)?out_brace(e,o,s-o):out_bracket(e,s,s-o)}var t,n,r,i,s=cur_sy.nstaff,o=0;for(t=0;;t++){cur_sy.staves[t].flags&(OPEN_BRACE|OPEN_BRACKET)&&o++;if(cur_sy.st_print[t])break;cur_sy.staves[t].flags&(CLOSE_BRACE|CLOSE_BRACKET)&&o--;if(t==s)break}for(n=s;n>t;n--)if(cur_sy.st_print[n])break;if(t==n&&o==0)return;r=staff_tb[n].y+staff_tb[n].botbar*staff_tb[n].staffscale,i=staff_tb[t].y+staff_tb[t].topbar*staff_tb[t].staffscale-r,xypath(e,r),output+="v"+(-i).toFixed(2)+'"/>\n';for(t=0;t<=s;t++)cur_sy.staves[t].flags&OPEN_BRACE&&u(e,t,CLOSE_BRACE),cur_sy.staves[t].flags&OPEN_BRACKET&&u(e,t,CLOSE_BRACKET),cur_sy.staves[t].flags&OPEN_BRACE2&&u(e-6,t,CLOSE_BRACE2),cur_sy.staves[t].flags&OPEN_BRACKET2&&u(e-6,t,CLOSE_BRACKET2)}function draw_meter(e,t){if(!t.a_meter)return;var n,r,i,s,o=t.st,u=staff_tb[o],a=u.y;u.stafflines!="|||||"&&(a+=(u.topbar+u.botbar)/2-12);for(r=0;r<t.a_meter.length;r++)s=t.a_meter[r],e=t.x+t.x_meter[r],s.bot?out_XYAB('<g transform="translate(X,Y)" text-anchor="middle">\n <text y="-12">A</text>\n <text>B</text>\n</g>\n',e,a+6,m_gl(s.top),m_gl(s.bot)):out_XYAB('<text x="X" y="Y" text-anchor="middle">A</text>\n',e,a+12,m_gl(s.top))}function draw_acc(e,t,n,r,i){if(r)if(r==i)n=n==-1?-2:2;else if(r*2!=i){xygl(e,t,"acc"+n+"_"+r+"_"+i);return}xygl(e,t,"acc"+n)}function draw_hl(e,t,n,r,i){var s,o,u=staff_tb[r],a=u.y,f=u.stafflines,l=(f.length-1)*6,c=u.botline;if(!/[\[|]/.test(f))return;t%6&&(t+=3),n%6&&(n-=3);if(f.indexOf("-")>=0&&(t>c&&t<l||n>c&&n<l||t<=c&&n>=l)){s=t,o=n;while(s>c&&f[s/6]=="-")s-=6;while(o<l&&f[o/6]=="-")o+=6;for(;s<o;s+=6)f[s/6]=="-"&&xygl(e,a+s,i)}for(;t<c;t+=6)xygl(e,a+t,i);for(;n>l;n-=6)xygl(e,a+n,i)}function draw_keysig(e,t,n){if(n.k_none)return;var r=n.k_old_sf,i=e.st,s=staff_tb[i].y,o,u,a,f=n.k_y_clef;f&1&&(f+=7),f/=2;while(f<0)f+=7;f%=7;if(!n.k_a_acc){if(cfmt.cancelkey||n.k_sf==0)if(n.k_sf==0||r*n.k_sf<0){u=sharp_cl[f],a=u>9?sharp1:sharp2;for(o=0;o<r;o++)xygl(t,s+u,"acc3"),u+=a[o],t+=5.5;u=flat_cl[f],a=u<18?flat1:flat2;for(o=0;o>r;o--)xygl(t,s+u,"acc3"),u+=a[-o],t+=5.5;n.k_sf!=0&&(t+=3)}if(n.k_sf>0){u=sharp_cl[f],a=u>9?sharp1:sharp2;for(o=0;o<n.k_sf;o++)xygl(t,s+u,"acc1"),u+=a[o],t+=5.5;if(cfmt.cancelkey&&o<r){t+=2;for(;o<r;o++)xygl(t,s+u,"acc3"),u+=a[o],t+=5.5}}if(n.k_sf<0){u=flat_cl[f],a=u<18?flat1:flat2;for(o=0;o>n.k_sf;o--)xygl(t,s+u,"acc-1"),u+=a[-o],t+=5.5;if(cfmt.cancelkey&&o>r){t+=2;for(;o>r;o--)xygl(t,s+u,"acc3"),u+=a[-o],t+=5.5}}}else if(n.k_a_acc.length){var l,c=n.k_a_acc[0].acc,h=100;for(o=0;o<n.k_a_acc.length;o++)l=n.k_a_acc[o],u=(n.k_y_clef+l.pit-18)*3,o!=0&&(u>h+18||u<h-18)?t-=5.5:l.acc!=c&&(t+=3),c=l.acc,draw_hl(t,u,u,i,"hl"),h=u,draw_acc(t,s+u,l.acc,l.micro_n,l.micro_d),t+=5.5}}function bar_cnv(e){switch(e){case"[":case"[]":return"";case"|:":case"|::":case"|:::":return"["+e;case":|":case"::|":case":::|":return e+"]";case"::":return cfmt.dblrepbar;case"||:":return"[|:"}return e}function draw_bar(e,t,n){var r,i,s,o=e.bar_type,u=e.st,a=staff_tb[u],f=e.x;if(!o)return;u!=0&&e.ts_prev&&e.ts_prev.type!=C.BAR&&(n=a.topbar*a.staffscale),e.ymx=e.ymn+n,set_sscale(-1),anno_start(e),s=a.y+12,a.stafflines!="|||||"&&(s+=(a.topbar+a.botbar)/2-12);if(e.bar_mrep){set_sscale(u);if(e.bar_mrep==1){for(i=e.prev;i.type!=C.REST;i=i.prev);xygl(i.x,s,"mrep")}else xygl(f,s,"mrep2"),e.v==cur_sy.top_voice&&(set_font("annotation"),xy_str(f,s+a.topbar-9,e.bar_mrep.toString(),"c"))}for(r=o.length;--r>=0;){switch(o[r]){case"|":set_sscale(-1),out_bar(f,t,n,e.bar_dotted?a.staffscale:0);break;default:f-=3,set_sscale(-1),out_thbar(f,t,n);break;case":":f-=2,set_sscale(u),xygl(f+1,s-12,"rdots")}f-=3}set_sscale(-1),anno_stop(e)}function draw_rest(e){var t,n,r,i,s,o,u,a,f,l=staff_tb[e.st];if(!l.topbar)return;if(e.dur==e.p_v.meter.wmeasure||e.rep_nb&&e.rep_nb>=0){t=e.ts_next;while(t&&t.time!=e.time+e.dur)t=t.ts_next;i=t?t.x:realwidth,t=e;while(!t.seqst)t=t.ts_prev;t=t.ts_prev,i=(i+t.x)/2,e.a_dd&&deco_update(e,i-e.x),e.x=i}else i=e.x,e.notes[0].shhd&&(i+=e.notes[0].shhd*stv_g.scale);if(e.invis)return;u=l.y;if(e.rep_nb){set_sscale(e.st),anno_start(e),l.stafflines=="|||||"?u+=12:u+=(l.topbar+l.botbar)/2,e.rep_nb<0?xygl(i,u,"srep"):(xygl(i,u,"mrep"),e.rep_nb>2&&e.v==cur_sy.top_voice&&(set_font("annotation"),xy_str(i,u+l.topbar-9,e.rep_nb.toString(),"c"))),anno_stop(e);return}set_scale(e),anno_start(e),s=e.y,n=5-e.nflags,n==7&&s==12&&l.stafflines.length<=2&&(s-=6),xygl(i,s+u,e.notes[0].head?e.notes[0].head:rest_tb[n]);if(n>=6){r=s/6;switch(n){default:switch(l.stafflines[r+1]){case"|":case"[":break;default:xygl(i,s+6+u,"hl1")}n==9&&(s-=6,r--);break;case 7:s+=6,r++;case 6:}switch(l.stafflines[r]){case"|":case"[":break;default:xygl(i,s+u,"hl1")}}if(e.dots){i+=8,s+=u+3;for(n=0;n<e.dots;n++)xygl(i,s,"dot"),i+=3.5}anno_stop(e)}function draw_gracenotes(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g={};for(d=e.extra;d;d=d.next){d.beam_st&&!d.beam_end&&self.calculate_beam(g,d)&&draw_beams(g),anno_start(d),draw_note(d,!g.s2),d==g.s2&&(g.s2=null),anno_stop(d);if(!d.next)break}e.sappo&&(d=e.extra,d.next?(i=(d.next.x-d.x)*.5+4,s=(d.ys+d.next.ys)*.5-d.y,d.stem>0?s-=1:s+=1):(i=9,s=d.stem>0?5:-5),m=d.notes[d.stem<0?0:d.nhd],out_acciac(x_head(d,m),y_head(d,m),i,s,d.stem>0));if(e.p_v.key.k_bagpipe||!cfmt.graceslurs||e.slur_start||!e.next||e.next.type!=C.NOTE)return;v=d;if(v.stem>=0){t=127;for(d=e.extra;d;d=d.next)d.y<t&&(t=d.y,v=d);n=v.x,r=v.y-5,e.extra!=v&&(n-=4,r+=1),e=e.next,a=e.x-1,e.stem<0&&(a-=4),f=3*(e.notes[0].pit-18)-5,h=(a-n)*.4,h>3&&(h=3),p=h,l=.2,c=.8,r>f+7?(n=v.x-1,r+=.5,f+=6.5,a=e.x-5.5,h=(r-f)*.8,p=(r-f)*.2,l=0):f>r+4&&(f=r+4,n=v.x+2,r=v.y-4)}else{t=-127;for(d=e.extra;d;d=d.next)d.y>t&&(t=d.y,v=d);n=v.x,r=v.y+5,e.extra!=v&&(n-=4,r-=1),e=e.next,a=e.x-1,e.stem>=0&&(a-=2),f=3*(e.notes[e.nhd].pit-18)+5,h=(n-a)*.4,h<-3&&(h=-3),p=h,l=.2,c=.8,r<f-7?(n=v.x-1,r-=.5,f-=6.5,a=e.x-5.5,h=(r-f)*.8,p=(r-f)*.2,l=0):f<r-4&&(f=r-4,n=v.x+2,r=v.y+4)}i=l*a+(1-l)*n-n,s=l*f+(1-l)*r-h-r,o=c*a+(1-c)*n-n,u=c*f+(1-c)*r-p-r,anno_start(e,"slur"),xypath(n,r+staff_tb[e.st].y),output+="c"+i.toFixed(2)+" "+(-s).toFixed(2)+" "+o.toFixed(2)+" "+(-u).toFixed(2)+" "+(a-n).toFixed(2)+" "+(-f+r).toFixed(2)+'"/>\n',anno_stop(e,"slur")}function setdoty(e,t){var n,r,i;for(n=0;n<=e.nhd;n++)i=3*(e.notes[n].pit-18),i%6==0&&(e.dot_low?i-=3:i+=3),t[n]=i;for(n=0;n<e.nhd;n++){if(t[n+1]>t[n])continue;r=n;while(r>0){if(t[r]>t[r-1]+6)break;r--}if(3*(e.notes[r].pit-18)-t[r]<t[n+1]-3*(e.notes[n+1].pit-18))while(r<=n)t[r++]-=6;else t[n+1]=t[n]+6}}function x_head(e,t){return e.x+t.shhd*stv_g.scale}function y_head(e,t){return staff_tb[e.st].y+3*(t.pit-18)}function draw_basic_note(e,t,n,r){var i,s,o,u,a,f,l,c=!1,h=t.notes[n],p=staff_tb[t.st].y,d=3*(h.pit-18),v=h.shhd*stv_g.scale,m=e+v,g=d+p,y=identify_note(t,h.dur),b=y[0],w=y[1],E=y[2];d%6==0&&v!=(t.stem>0?t.notes[0].shhd:t.notes[t.nhd].shhd)&&(u=0,d>=30?(u=d,u%6&&(u-=3)):d<=-6&&(u=d,u%6&&(u+=3)),u&&xygl(m,u+p,"hl"));if(!h.invis)if(t.grace)o="ghd",m-=4.5*stv_g.scale;else if(h.map&&h.map[0])i=t.head,o=h.map[0][i],o||(o=h.map[0][h.map[0].length-1]),i=o.indexOf("/"),i>=0&&(t.stem>=0?o=o.slice(0,i):o=o.slice(i+1));else if(t.type==C.CUSTOS)o="custos";else switch(b){case C.OVAL:o="HD";break;case C.OVALBARS:if(t.head!=C.SQUARE){o="HDD";break};case C.SQUARE:h.dur<C.BLEN*4?o="breve":(o="longa",l=t.stem>0),!tsnext&&t.next&&t.next.type==C.BAR&&!t.next.next&&(w=0);break;case C.EMPTY:o="Hd";break;default:o="hd"}h.color!=undefined?c=set_color(h.color):h.map&&h.map[2]&&(c=set_color(h.map[2])),o&&(l&&(g_open(m,g,0,1,-1),m=g=0),self.psxygl(m,g,o)||xygl(m,g,o),l&&g_close());if(w){a=e+(7.7+t.xmx)*stv_g.scale,r[n]==undefined&&(r[n]=3*(t.notes[n].pit-18),(t.notes[n].pit&1)==0&&(r[n]+=3)),f=r[n]+p;while(--w>=0)xygl(a,f,"dot"),a+=3.5}h.acc&&(e-=h.shac*stv_g.scale,t.grace?(g_open(e,d+p,0,.75),draw_acc(0,0,h.acc,h.micro_n,h.micro_d),g_close()):draw_acc(e,d+p,h.acc,h.micro_n,h.micro_d)),c!=0&&set_color(c)}function draw_note(e,t){var n,r,i,s,o,u,a,f,l,c,s,h,p=new Array(e.nhd+1);e.dots&&setdoty(e,p),h=e.notes[e.stem<0?e.nhd:0],c=x_head(e,h),o=staff_tb[e.st].y;if(e.grace)f="ghl";else switch(e.head){default:f="hl";break;case C.OVAL:case C.OVALBARS:f="hl1";break;case C.SQUARE:f="hl2"}draw_hl(c,3*(e.notes[0].pit-18),3*(e.notes[e.nhd].pit-18),e.st,f),s=y_head(e,h),e.stemless?e.xstem&&(n=e.ts_prev,u=(n.stem>0?n.y:n.ys)-e.y,u+=staff_tb[n.st].y-o,u/=e.p_v.scale,out_stem(c,s,u)):(u=e.ys-e.y,l=e.nflags,e.ntrem&&(l-=e.ntrem),!t||l<=0?(e.nflags>0&&(e.stem>=0?u-=1:u+=1),out_stem(c,s,u,e.grace)):out_stem(c,s,u,e.grace,l,cfmt.straightflags));if(t&&e.trem1){var d=e.ntrem||0,v=c;u=3*(e.notes[e.stem>0?e.nhd:0].pit-18),e.head==C.FULL||e.head==C.EMPTY?(v+=(e.grace?GSTEM_XOFF:3.5)*e.stem,e.stem>0?u+=6+5.4*d:u-=11.4):e.stem>0?u+=5+5.4*d:u-=10.4,u/=e.p_v.scale,out_trem(v,o+u,d)}c=e.x;for(i=0;i<=e.nhd;i++)draw_basic_note(c,e,i,p)}function next_scut(e){var t=e;for(e=e.next;e;e=e.next){if(e.rbstop)return e;t=e}return t}function prev_scut(e){while(e.prev){e=e.prev;if(e.rbstart)return e}e=e.p_v.sym;while(e.type!=C.CLEF)e=e.ts_prev;return e.next&&e.next.type==C.KEY&&(e=e.next),e.next&&e.next.type==C.METER?e.next:e}function slur_direction(e,t){var n,r,i;if(e.grace&&e.stem>0)return-1;for(n=e;;n=n.next){if(n.type==C.NOTE){if(!n.stemless){if(n.stem<0)return 1;r=!0}n.notes[0].pit<22&&(i=!0)}if(n==t)break}return!r&&!i?1:-1}function slur_out(e,t,n,r,i,s,o){var u,a,f,l=.3,c=.45;a=r-t,a<0&&(a=-a),u=n-e,u>40&&a/u<.7&&(l=.3+.002*(u-40),l>.7&&(l=.7));var h=.5*(e+n),p=.5*(t+r),d=h+l*(e-h),v=p+l*(t-p)+s;d=e+c*(d-e),v=t+c*(v-t);var m=h+l*(n-h),g=p+l*(r-p)+s;m=n+c*(m-n),g=r+c*(g-r),u=.03*(n-e),a=2*i,f=.2+.001*(n-e),f>.6&&(f=.6),f*=i;var y=stv_g.v?stv_g.scale:1;o?output+='<path class="stroke" stroke-dasharray="5,5" d="M':output+='<path class="fill" d="M',out_sxsy(e," ",t),output+="c"+((d-e)/stv_g.scale).toFixed(2)+" "+((t-v)/y).toFixed(2)+" "+((m-e)/stv_g.scale).toFixed(2)+" "+((t-g)/y).toFixed(2)+" "+((n-e)/stv_g.scale).toFixed(2)+" "+((t-r)/y).toFixed(2),o||(output+="\n v"+(-f).toFixed(2)+"c"+((m-u-n)/stv_g.scale).toFixed(2)+" "+((r+f-g-a)/y).toFixed(2)+" "+((d+u-n)/stv_g.scale).toFixed(2)+" "+((r+f-v-a)/y).toFixed(2)+" "+((e-n)/stv_g.scale).toFixed(2)+" "+((r+f-t)/y).toFixed(2)),output+='"/>\n'}function slur_multi(e,t){for(;;){if(e.multi)return e.multi;if(e==t)break;e=e.next}return 0}function draw_slur(e,t,n,r,i){var s=e,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w;while(s.v!=t.v)s=s.ts_next;switch(i&7){case C.SL_ABOVE:w=1;break;case C.SL_BELOW:w=-1;break;default:w=slur_multi(s,t),w||(w=slur_direction(s,t))}var E=1,S=s.st,x=!1;if(s!=t){o=s.next;for(;;){if(o.type==C.NOTE||o.type==C.REST)E++,o.st!=S&&(x=!0,o.st<S&&(S=o.st));if(o==t)break;o=o.next}}x&&error(2,s,"*** multi-staves slurs not treated yet"),a=e.x,e.notes&&e.notes[0].shhd&&(a+=e.notes[0].shhd);if(e!=t)l=t.x,t.notes&&(l+=t.notes[0].shhd);else{for(o=t.ts_next;o;o=o.ts_next)if(o.type==C.STAVES)break;l=o?o.x:realwidth}n>=0?f=3*(s.notes[n].pit-18)+5*w:(f=w>0?s.ymx+2:s.ymn-2,s.type==C.NOTE&&(w>0?s.stem>0&&(a+=5,s.beam_end&&s.nflags>=-1&&!s.in_tuplet&&(s.nflags>0?(a+=2,f=s.ys-3):f=s.ys-6)):s.stem<0&&(a-=1,t.grace?f=s.y-8:s.beam_end&&s.nflags>=-1&&(!s.in_tuplet||s.ys<f+3)&&(s.nflags>0?(a+=2,f=s.ys+3):f=s.ys+6)))),r>=0?c=3*(t.notes[r].pit-18)+5*w:(c=w>0?t.ymx+2:t.ymn-2,t.type==C.NOTE&&(w>0?t.stem>0&&(l+=1,t.beam_st&&t.nflags>=-1&&!t.in_tuplet&&(c=t.ys-6)):t.stem<0&&(l-=5,t.beam_st&&t.nflags>=-1&&!t.in_tuplet&&(c=t.ys+6)))),s.type!=C.NOTE&&(f=c+1.2*w,a=s.x+s.wr*.5,a>l-12&&(a=l-12)),t.type!=C.NOTE&&(s.type==C.NOTE?c=f+1.2*w:c=f,s!=t&&(l=t.x-t.wl*.3)),E>=3&&(s.next.type!=C.BAR&&s.next.x<a+48&&(w>0?(v=s.next.ymx-2,f<v&&(f=v)):(v=s.next.ymn+2,f>v&&(f=v))),t.prev&&t.prev.type!=C.BAR&&t.prev.x>l-48&&(w>0?(v=t.prev.ymx-2,c<v&&(c=v)):(v=t.prev.ymn+2,c>v&&(c=v)))),d=(c-f)/(l-a);if(d>SLUR_SLOPE||d<-SLUR_SLOPE)d=d>SLUR_SLOPE?SLUR_SLOPE:-SLUR_SLOPE,d*w>0?f=c-d*(l-a):c=f+d*(l-a);v=c-f,v>8?v=8:v<-8&&(v=-8),m=v,m<0&&(m=-m),y=.5*m,b=.3*v,v*w>0?(l-=y,c-=b):(a+=y,f+=b),s.grace&&(a=s.x-GSTEM_XOFF*.5),t.grace&&(l=t.x+GSTEM_XOFF*1.5),g=0,d=(c-f)/(l-a);if(s!=t&&s.v==t.v){p=f-d*a;for(o=s.next;o!=t;o=o.next){if(o.st!=S)continue;switch(o.type){case C.NOTE:case C.REST:w>0?(v=3*(o.notes[o.nhd].pit-18)+6,v<o.ymx&&(v=o.ymx),v-=d*o.x+p,v>g&&(g=v)):(v=3*(o.notes[0].pit-18)-6,v>o.ymn&&(v=o.ymn),v-=d*o.x+p,v<g&&(g=v));break;case C.GRACE:for(u=o.extra;u;u=u.next)w>0?(v=3*(u.notes[u.nhd].pit-18)+6,v<u.ymx&&(v=u.ymx),v-=d*u.x+p,v>g&&(g=v)):(v=3*(u.notes[0].pit-18)-6,v>u.ymn&&(v=u.ymn),v-=d*u.x+p,v<g&&(g=v))}}f+=.45*g,c+=.45*g,g*=.65}E>3?h=(.08*(l-a)+12)*w:h=(.03*(l-a)+8)*w,w>0?(h<3*g&&(h=3*g),h>40&&(h=40)):(h>3*g&&(h=3*g),h<-40&&(h=-40)),v=c-f,v<0&&(v=-v),w>0?h<.8*v&&(h=.8*v):h>-0.8*v&&(h=-0.8*v),h*=cfmt.slurheight,slur_out(a,f,l,c,w,h,i&C.SL_DOTTED),y=l-a,d=(c-f)/y,p=f-d*a+.4*h;if(s.v==t.v)for(o=s;o!=t;o=o.next){if(o.st!=S)continue;v=d*o.x+p,o.ymx<v?o.ymx=v:o.ymn>v&&(o.ymn=v),o.next==t?(y=l,t.sl1&&(y-=5)):y=o.next.x,o!=s&&(a=o.x),y-=a,y_set(S,w>0,a,y,v)}return(w>0?C.SL_ABOVE:C.SL_BELOW)|i&C.SL_DOTTED}function draw_slurs(e,t){var n,r,i,s,o,u,a,f,l,c=e;for(;;){if(!c||c==t){if(!i||!(c=i.next)||c==t)break;i=null}if(c.type==C.GRACE){i=c,c=c.extra;continue}if(c.type!=C.NOTE&&c.type!=C.REST&&c.type!=C.SPACE||!c.slur_start&&!c.sl1){c=c.next;continue}r=null,n=c.next;var h=!1;for(;;){if(!n){if(s){n=s.next,s=null;continue}if(!i||h)break;n=i.next,h=!0;continue}if(n.type==C.GRACE){s=n,n=n.extra;continue}if(n.type==C.BAR&&(n.bar_type[0]==":"||n.bar_type=="|]"||n.bar_type=="[|"||n.text&&n.text[0]!="1")){r=n;break}if(n.type!=C.NOTE&&n.type!=C.REST&&n.type!=C.SPACE){n=n.next;continue}if(n.slur_end||n.sl2){r=n;break}if(n.slur_start||n.sl1){if(s){for(r=n;r.next;r=r.next);r.next=s.next,s.next&&(s.next.prev=r),r=null}draw_slurs(n,t),s&&s.next&&(s.next.prev.next=null,s.next.prev=s)}if(n==t)break;n=n.next}if(!n)r=next_scut(c);else if(!r){c=n;if(c==t)break;continue}if(i){for(n=c;n.next;n=n.next);n.next=i.next,i.next&&(i.next.prev=n),i.slur_start=C.SL_AUTO}s&&(s.prev.next=s.extra,s.extra.prev=s.prev,s.slur_start=C.SL_AUTO);if(c.slur_start)f=c.slur_start&15,c.slur_start>>=4,u=-1;else{for(u=0;u<=c.nhd;u++)if(c.notes[u].sl1)break;f=c.notes[u].sl1&15,c.notes[u].sl1>>=4,c.sl1--}a=-1,l=0;if(r.type!=C.NOTE&&r.type!=C.REST&&r.type!=C.SPACE||!r.slur_end&&!r.sl2){if(r.type!=C.BAR||r.bar_type[0]!=":"&&r.bar_type!="|]"&&r.bar_type!="[|"&&(!r.text||r.text[0]=="1"))l=1}else if(r.slur_end)r.slur_end--;else{for(a=0;a<=r.nhd;a++)if(r.notes[a].sl2)break;r.notes[a].sl2--,r.sl2--}f=draw_slur(c,r,u,a,f),l&&(r.p_v.slur_start||(r.p_v.slur_start=0),r.p_v.slur_start<<=4,r.p_v.slur_start+=f),i&&i.next&&(i.next.prev.next=null,i.next.prev=i),s&&(s.prev.next=s,s.extra.prev=null);if(c.slur_start||c.sl1)continue;if(c==t)break;c=c.next}}function draw_tuplet(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,d,b,w,E,S,x;s=e.st;for(n=e;n;n=n.next){if(n.type!=C.NOTE&&n.type!=C.REST){if(n.type==C.GRACE)for(i=n.extra;i;i=i.next)if(i.slur_start||i.sl1)u=!0;continue}if(n.slur_start||n.slur_end||n.sl1||n.sl2)u=!0;n.st<s&&(s=n.st);if(t==0){n.tp1&&draw_tuplet(n,1);if(n.te0)break}else if(n.te1)break}if(!n){error(1,e,"No end of tuplet in this music line"),t==0?e.tp0=0:e.tp1=0;return}if(u){draw_slurs(e,n);if(e.slur_start||e.sl1)return;for(r=e.next;r!=n;r=r.next)if(r.slur_start||r.slur_end||r.sl1||r.sl2)return;if(n.slur_end||n.sl2)return}t==0?(E=e.tp0,e.tp0=0,S=e.tq0):(E=e.tp1,e.tp1=0,S=e.tq1);if(e.tf[0]==1)return;w=e.tf[3],w||(w=e.stem>0?C.SL_ABOVE:C.SL_BELOW);if(e==n)o=!0;else if(e.tf[1]==1)o=!0,draw_slur(e,n,-1,-1,w);else if(e.tf[0]==2||e.type!=C.NOTE||n.type!=C.NOTE)o=!1;else{o=!0;for(r=e;;r=r.next){if(r.type!=C.NOTE&&r.type!=C.REST){if(r.type==C.GRACE||r.type==C.SPACE)continue;o=!1;break}if(r==n)break;if(r.beam_end){o=!1;break}}if(o&&!e.beam_st&&!e.beam_br1&&!e.beam_br2)for(r=e.prev;r;r=r.prev)if(r.type==C.NOTE||r.type==C.REST){r.nflags>=e.nflags&&(o=!1);break}if(o&&!n.beam_end)for(r=n.next;r;r=r.next)if(r.type==C.NOTE||r.type==C.REST){!r.beam_br1&&!r.beam_br2&&r.nflags>=n.nflags&&(o=!1);break}}if(o){if(e.tf[2]==1)return;h=(n.x+e.x)/2,e==n?d=0:d=(n.ys-e.ys)/(n.x-e.x),b=e.ys-d*e.x,m=d*h+b,w==C.SL_ABOVE?(p=y_get(s,1,h-4,8),p>m&&(b+=p-m),b+=2):(p=y_get(s,0,h-4,8),p<m&&(b+=p-m),b-=10);for(r=e;;r=r.next)if(r.x>=h)break;e.stem*n.stem>0&&(e.stem>0?h+=1.5:h-=1.5),p=d*h+b,e.tf[2]==0?out_bnum(h,p,E):out_bnum(h,p,E+":"+S),w==C.SL_ABOVE?(p+=10,r.ymx<p&&(r.ymx=p),y_set(s,!0,h-3,6,p)):(r.ymn>p&&(r.ymn=p),y_set(s,!1,h-3,6,p));return}e.tf[1]!=0&&error(2,e,"'what' value of %%tuplets not yet coded"),w=e.tf[3],w||(w=e.multi>=0?C.SL_ABOVE:C.SL_BELOW);if(w==C.SL_ABOVE){e.st==n.st?l=c=staff_tb[s].topbar+4:(l=e.ymx,c=n.ymx),a=e.x-4;if(e.st==s){for(r=e;!r.dur;r=r.next);p=y_get(s,1,r.x-4,8),p>l&&(l=p),e.stem>0&&(a+=3)}if(n.st==s){for(r=n;!r.dur;r=r.prev);p=y_get(s,1,r.x-4,8),p>c&&(c=p)}n.dur>n.prev.dur?n.next?f=n.next.x-n.next.wl-5:f=realwidth-6:(f=n.x+4,x=n.stem>=0?0:n.nhd,n.notes[x].shhd>0&&(f+=n.notes[x].shhd),n.st==s&&n.stem>0&&(f+=3.5)),h=.5*(a+f),p=.5*(l+c),d=(c-l)/(f-a),v=3*(n.notes[n.nhd].pit-e.notes[e.nhd].pit)/(f-a),v>0?d<0?d=0:d>v&&(d=v):d>0?d=0:d<v&&(d=v),d*d<.1*.1&&(d=0),y=0;for(r=e;;r=r.next){if(!r.dur||r.st!=s){if(r==n)break;continue}m=p+(r.x-h)*d,g=y_get(s,1,r.x-4,8)+2,g-m>y&&(y=g-m);if(r==n)break}p+=y,l=p+d*(a-h),c=p+d*(f-h),p+=8;for(r=e;;r=r.next)if(r.st==s){m=p+(r.x-h)*d,r.ymx<m&&(r.ymx=m);if(r==n)break;y_set(s,!0,r.x,r.next.x-r.x,m)}else if(r==n)break}else{a=e.x-7,n.dur>n.prev.dur?n.next?f=n.next.x-n.next.wl-8:f=realwidth-6:(f=n.x+2,n.notes[n.nhd].shhd>0&&(f+=n.notes[n.nhd].shhd)),e.stem>=0&&(a+=2,f+=2);if(e.st==s){for(r=e;!r.dur;r=r.next);l=y_get(s,0,r.x-4,8)}else l=0;if(n.st==s){for(r=n;!r.dur;r=r.prev);c=y_get(s,0,r.x-4,8)}else c=0;h=.5*(a+f),p=.5*(l+c),d=(c-l)/(f-a),v=3*(n.notes[0].pit-e.notes[0].pit)/(f-a),v>0?d<0?d=0:d>v&&(d=v):d>0?d=0:d<v&&(d=v),d*d<.1*.1&&(d=0),y=0;for(r=e;;r=r.next){if(!r.dur||r.st!=s){if(r==n)break;continue}m=p+(r.x-h)*d,g=y_get(s,0,r.x-4,8),g-m<y&&(y=g-m);if(r==n)break}p+=y-10,l=p+d*(a-h),c=p+d*(f-h),p-=2;for(r=e;;r=r.next){if(r.st==s){if(r==n)break;m=p+(r.x-h)*d,r.ymn>m&&(r.ymn=m),y_set(s,!1,r.x,r.next.x-r.x,m)}if(r==n)break}}if(e.tf[2]==1){out_tubr(a,l+4,f-a,c-l,w==C.SL_ABOVE);return}out_tubrn(a,l,f-a,c-l,w==C.SL_ABOVE,e.tf[2]==0?E.toString():E+":"+S),m=.5*(l+c),w==C.SL_ABOVE?y_set(s,!0,h-3,6,m+9):y_set(s,!1,h-3,6,m)}function draw_note_ties(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m,g,y;for(s=0;s<n.length;s++){u=n[s],f=e.notes[u].pit,a=r[s],l=i!=2?t.notes[a].pit:f,o=(e.notes[u].ti1&7)==C.SL_ABOVE?1:-1,d=e.x,g=e.notes[u].shhd,o>0?u<e.nhd&&f+1==e.notes[u+1].pit&&e.notes[u+1].shhd>g&&(g=e.notes[u+1].shhd):u>0&&f==e.notes[u-1].pit+1&&e.notes[u-1].shhd>g&&(g=e.notes[u-1].shhd),d+=g*.6,v=t.x,i!=2&&(g=t.notes[a].shhd,o>0?a<t.nhd&&l+1==t.notes[a+1].pit&&t.notes[a+1].shhd<g&&(g=t.notes[a+1].shhd):a>0&&l==t.notes[a-1].pit+1&&t.notes[a-1].shhd<g&&(g=t.notes[a-1].shhd),v+=g*.6),h=e.st;switch(i){case 0:f!=l&&!(f&1)&&(f=l);break;case 3:o=-o;case 1:d=e.x,d>v-20&&(d=v-20),f=l,h=t.st;break;default:if(e!=t)v-=t.wl,t.type==C.BAR&&(v+=5);else{y=e.time+e.dur;for(p=e.ts_next;p;p=p.ts_next)if(p.time>y)break;v=p?p.x:realwidth}v<d+16&&(v=d+16)}v-d>20?(d+=3.5,v-=3.5):(d+=1.5,v-=1.5),c=3*(f-18),m=(.04*(v-d)+10)*o,slur_out(d,staff_tb[h].y+c,v,staff_tb[h].y+c,o,m,e.notes[u].ti1&C.SL_DOTTED)}}function draw_ties(e,t,n){var r,i,s,o,u,a,f,l=[],c=[],h=[],p=e.nhd,d=e.time+e.dur;if(n==2){for(i=0;i<=p;i++)e.notes[i].ti1&&h.push(i);draw_note_ties(e,t||e,h,h,n);return}for(i=0;i<=p;i++){if(!e.notes[i].ti1)continue;f=-1,u=e.notes[i].opit||e.notes[i].pit;for(o=t.nhd;o>=0;o--){a=t.notes[o].opit||t.notes[o].pit;switch(a-u){case 1:case-1:e.notes[i].acc!=t.notes[o].acc&&(f=o);default:continue;case 0:f=o}break}f>=0?(l.push(i),c.push(f)):h.push(i)}draw_note_ties(e,t,l,c,n);if(!h.length)return;r=e.ts_next;while(r&&r.time<d)r=r.ts_next;while(r&&r.time==d){if(r.type!=C.NOTE||r.st!=e.st){r=r.ts_next;continue}l.length=0,c.length=0;for(i=h.length;--i>=0;){s=h[i],u=e.notes[s].opit||e.notes[s].pit;for(o=r.nhd;o>=0;o--){a=r.notes[o].opit||r.notes[o].pit;if(a==u){l.push(s),c.push(o),h[i]=h.pop();break}}}if(l.length>0){draw_note_ties(e,r,l,c,n==1?1:0);if(h.length==0)return}r=r.ts_next}h.length!=0&&error(1,e,"Bad tie")}function tie_comb(e){var t,n,r;n=e.time+e.dur,r=e.st;for(t=e.ts_next;t;t=t.ts_next){if(t.st!=r)continue;if(t.time==n){if(t.type==C.NOTE)return t;continue}if(t.time>n)return e}return}function draw_all_ties(e){function l(e,t,n){var r;if(e.type==C.GRACE)for(r=e.extra;r;r=r.next)r.ti1&&draw_ties(r,t,n);else draw_ties(e,t,n)}var t,n,r,i,s,o,u,a,f;for(t=e.sym;t;t=t.next){switch(t.type){case C.CLEF:case C.KEY:case C.METER:continue}break}o=e.s_rtie;for(n=t;n;n=n.next){if(n.dur||n.type==C.GRACE)break;if(n.type!=C.BAR||!n.text)continue;n.text[0]=="1"?o=e.s_tie:e.s_tie=o}if(!n)return;e.s_tie&&(e.s_tie.x=t.x+t.wr,t=e.s_tie,e.s_tie=null,t.st=n.st,t.ts_next=n.ts_next,t.time=n.time-t.dur,draw_ties(t,n,1));for(;;){for(t=n;t;t=t.next){if(t.ti1)break;if(!o)continue;if(t.type!=C.BAR||!t.text)continue;if(t.text[0]=="1"){o=null;continue}if(t.bar_type=="|")continue;for(n=t.next;n;n=n.next)if(n.type==C.NOTE)break;if(!n){t=null;break}u=clone(o),u.x=t.x,u.next=n,u.st=n.st,u.time=n.time-u.dur,draw_ties(u,n,1)}if(!t)break;s=t.time+t.dur;for(n=t.next;n;n=n.next){if(n.dur)break;if(n.type==C.BAR&&n.text){if(n.text[0]!="1")break;o=t}}if(!n){for(n=t.ts_next;n;n=n.ts_next){if(n.st!=t.st)continue;if(n.time<s)continue;if(n.time>s){n=null;break}if(n.dur)break}if(!n){l(t,null,2),e.s_tie=t;break}}else{if(n.type!=C.NOTE&&n.type!=C.BAR){error(1,t,"Bad tie");continue}if(n.time!=s){r=tie_comb(t);if(r==t){error(1,t,"Bad tie");continue}n=r}}for(r=t.ts_next;r;r=r.ts_next){if(r.st!=t.st)continue;if(r.time>s)break;if(r.type==C.CLEF){i=!0;continue}}if(i||t.st!=n.st){i=!1,f=(n.x-t.x)*.4,a=n.x,n.x-=f,n.x>t.x+32&&(n.x=t.x+32),l(t,n,2),n.x=a,a=t.x,t.x+=f,t.x<n.x-24&&(t.x=n.x-24),draw_ties(t,n,3),t.x=a;continue}l(t,n,n.type==C.NOTE?0:2)}e.s_rtie=o}function draw_all_slurs(e){var t,n,r,i=e.sym,s=e.slur_start,o=0;if(!i)return;if(s){e.slur_start=0;while(s!=0)o<<=4,o|=s&15,s>>=4}draw_slurs(i,undefined);for(;i;i=i.next)while(i.slur_end||i.sl2){if(i.slur_end)i.slur_end--,r=-1;else{for(r=0;r<=i.nhd;r++)if(i.notes[r].sl2)break;i.notes[r].sl2--,i.sl2--}s=o&15,t=prev_scut(i),draw_slur(t,i,-1,r,s);if(t.type!=C.BAR||t.bar_type[0]!=":"&&t.bar_type!="|]"&&t.bar_type!="[|"&&(!t.text||t.text[0]=="1"))o>>=4}i=e.sym;while(o!=0){s=o&15,o>>=4,t=next_scut(i),draw_slur(i,t,-1,-1,s);if(t.type!=C.BAR||t.bar_type[0]!=":"&&t.bar_type!="|]"&&t.bar_type!="[|"&&(!t.text||t.text[0]=="1"))e.slur_start||(e.slur_start=0),e.slur_start<<=4,e.slur_start+=s}}function draw_sym_near(){var e,t,n,r,i,s,o,u,a,i,f,l,c,h;h=output,output="";for(r=0;r<voice_tb.length;r++){var p={},d=!0;e=voice_tb[r];for(n=e.sym;n;n=n.next)switch(n.type){case C.GRACE:for(o=n.extra;o;o=o.next)o.beam_st&&!o.beam_end&&self.calculate_beam(p,o);break;case C.NOTE:if(n.beam_st&&!n.beam_end||d&&!n.beam_st)d=!1,self.calculate_beam(p,n)}}for(i=0;i<=nstaff;i++){t=staff_tb[i],t.top||(t.top=new Float32Array(YSTEP),t.bot=new Float32Array(YSTEP));for(a=0;a<YSTEP;a++)t.top[a]=0,t.bot[a]=24}set_tie_room(),draw_deco_near();for(n=tsfirst;n;n=n.ts_next){if(n.invis)continue;switch(n.type){case C.GRACE:for(o=n.extra;o;o=o.next)y_set(n.st,!0,o.x-2,4,o.ymx+1),y_set(n.st,!1,o.x-2,4,o.ymn-1);continue;case C.MREST:y_set(n.st,!0,n.x+16,32,n.ymx+2);continue;default:y_set(n.st,!0,n.x-n.wl,n.wl+n.wr,n.ymx+2),y_set(n.st,!1,n.x-n.wl,n.wl+n.wr,n.ymn-2);continue;case C.NOTE:}n.stem>0?(n.beam_st?(f=3,u=n.beam_end?4:10):(f=-8,u=n.beam_end?11:16),y_set(n.st,!0,n.x+f,u,n.ymx),y_set(n.st,!1,n.x-n.wl,n.wl+n.wr,n.ymn)):(y_set(n.st,!0,n.x-n.wl,n.wl+n.wr,n.ymx),n.beam_st?(f=-6,u=n.beam_end?4:10):(f=-8,u=n.beam_end?5:16),f+=n.notes[0].shhd,y_set(n.st,!1,n.x+f,u,n.ymn)),n.notes[n.nhd].acc&&(s=n.y+8,n.ymx<s&&(n.ymx=s),y_set(n.st,!0,n.x,0,s)),n.notes[0].acc&&(s=n.y,n.notes[0].acc==1||n.notes[0].acc==3?s-=7:s-=5,n.ymn>s&&(n.ymn=s),y_set(n.st,!1,n.x,0,s))}for(r=0;r<voice_tb.length;r++){e=voice_tb[r],n=e.sym;if(!n)continue;set_color(n.color),i=e.st,set_dscale(i);for(;n;n=n.next)n.tp0&&draw_tuplet(n,0);draw_all_slurs(e);for(n=e.sym;n;n=n.next)n.tp0&&draw_tuplet(n,0)}for(i=0;i<=nstaff;i++){t=staff_tb[i],l=t.topbar+2,c=t.botbar-2;for(a=0;a<YSTEP;a++)l>t.top[a]&&(t.top[a]=l),c<t.bot[a]&&(t.bot[a]=c)}set_color(undefined),draw_deco_note(),draw_deco_staff(),set_dscale(-1);for(r=0;r<voice_tb.length;r++){e=voice_tb[r];if(e.have_ly){draw_all_lyrics();break}}cfmt.measurenb>=0&&draw_measnb(),set_dscale(-1),output=h}function draw_vname(e){var t,n,r,i,s,o,u,a,f=[];for(r=cur_sy.nstaff;r>=0;r--)if(cur_sy.st_print[r])break;if(r<0)return;for(i=0;i<voice_tb.length;i++){t=voice_tb[i];if(!t.sym)continue;r=cur_sy.voices[i].st;if(!cur_sy.st_print[r])continue;if(t.new_name){a=2;break}t.snm&&(a=1)}if(!a)return;for(i=0;i<voice_tb.length;i++){t=voice_tb[i];if(!t.sym)continue;r=cur_sy.voices[i].st;if(!cur_sy.st_print[r])continue;t.new_name&&delete t.new_name,o=a==2?t.nm:t.snm;if(!o)continue;if(cur_sy.staves[r].flags&CLOSE_BRACE2)while(!(cur_sy.staves[r].flags&OPEN_BRACE2))r--;else if(cur_sy.staves[r].flags&CLOSE_BRACE)while(!(cur_sy.staves[r].flags&OPEN_BRACE))r--;f[r]?f[r]+="\\n"+o:f[r]=o}if(f.length==0)return;set_font("voice"),e=-e*.5;for(r=0;r<f.length;r++){if(!f[r])continue;s=f[r].split("\\n"),u=staff_tb[r].y+staff_tb[r].topbar*.5*staff_tb[r].staffscale+9*(s.length-1)-gene.curfont.size*.3,n=r;if(cur_sy.staves[r].flags&OPEN_BRACE2)while(!(cur_sy.staves[n].flags&CLOSE_BRACE2))n++;else if(cur_sy.staves[r].flags&OPEN_BRACE)while(!(cur_sy.staves[n].flags&CLOSE_BRACE))n++;n!=r&&(u-=(staff_tb[r].y-staff_tb[n].y)*.5);for(n=0;n<s.length;n++)o=s[n],xy_str(e,u,o,"c"),u-=18}}function set_staff(){var e,t,n,r,i,s,o,u,a,f,l,c,h;for(i=0;i<voice_tb.length;i++)c=voice_tb[i],c.scale!=1&&(c.scale_str='transform="scale('+c.scale.toFixed(2)+')"');for(n=0;n<=nstaff;n++)if(gene.st_print[n])break;s=0;if(n>nstaff)n--,h=staff_tb[n];else{h=staff_tb[n];for(t=0;t<YSTEP;t++)l=h.top[t],s<l&&(s=l)}s+=draw_partempo(n,s);if(!gene.st_print[n])return s;s*=h.staffscale,o=cfmt.staffsep*.5+h.topbar*h.staffscale,s<o&&(s=o),s<h.ann_top&&(s=h.ann_top),h.y=-s,r=n;var p=cur_sy.staves[r];for(n++;n<=nstaff;n++){h=staff_tb[n];if(!gene.st_print[n])continue;o=p.sep||cfmt.sysstaffsep,a=p.maxsep||cfmt.maxsysstaffsep,u=0;if(h.staffscale==staff_tb[r].staffscale){for(t=0;t<YSTEP;t++)l=h.top[t]-staff_tb[r].bot[t],u<l&&(u=l);u*=h.staffscale}else for(t=0;t<YSTEP;t++)l=h.top[t]*h.staffscale-staff_tb[r].bot[t]*staff_tb[r].staffscale,u<l&&(u=l);o+=h.topbar*h.staffscale,u<o&&(u=o),a+=h.topbar*h.staffscale,u>a&&(u=a),s+=u,h.y=-s,r=n,p=cur_sy.staves[r]}f=0;for(t=0;t<YSTEP;t++)l=staff_tb[r].bot[t],f>l&&(f=l);f>h.ann_bot&&(f=h.ann_bot),f*=staff_tb[r].staffscale;for(n=0;n<=nstaff;n++)h=staff_tb[n],u=h.y,h.staffscale!=1&&(h.scale_str='transform="translate(0,'+(posy-u).toFixed(2)+") "+"scale("+h.staffscale.toFixed(2)+')"');if(f==0){for(n=nstaff;n>=0;n--)if(gene.st_print[n])break;if(n<0)return s}return u=-f,o=cfmt.staffsep*.5,u<o&&(u=o),a=cfmt.maxstaffsep*.5,u>a&&(u=a),s+u}function draw_systems(e){function p(){var e,t,n,r,i=0;for(e=0;e<=cur_sy.nstaff;e++){if(l[e]<0){c[e]=h[e]=0;continue}t=staff_tb[e].staffscale,n=staff_tb[e].topbar*t,r=staff_tb[e].botbar*t,i==0&&(i=staff_tb[e].y+n),c[e]=staff_tb[e].y+r,h[e]=i-c[e],i=cur_sy.staves[e].flags&STOP_BAR?0:c[e]}}function d(e,t,n){var r,i,s,o,u,a=0,f="",l=cur_sy.staves[e].stafflines,c=l.length;if(!/[\[|]/.test(l))return;r=n-t,set_sscale(e),i=r/stv_g.scale;if(cache&&cache.st_l==l&&cache.st_ws==i){xygl(t,staff_tb[e].y,"stdef"+cfmt.fullsvg);return}for(s=0;s<c;s++,a-=6){if(l[s]==".")continue;o=0;for(;s<c;s++,a-=6,o-=6){switch(l[s]){case".":case"-":continue;case u:f+="m-"+i.toFixed(2)+" "+o+"h"+i.toFixed(2),o=0;continue}u!=undefined&&(f+='"/>\n'),u=l[s],f+='<path class="stroke"',u=="["&&(f+=' stroke-width="1.5"'),f+=' d="m0 '+a+"h"+i.toFixed(2),o=0}f+='"/>\n'}a=staff_tb[e].y;if(!cache&&r==get_lwidth()){cache={st_l:l,st_ws:i},s="stdef"+cfmt.fullsvg,glyphs[s]='<g id="'+s+'">\n'+f+"</g>",xygl(t,a,s);return}out_XYAB('<g transform="translate(X, Y)">\n'+f+"</g>\n",t,a)}var t,n,r,i,s,o,u,a,f,l=[],c=[],h=[];draw_vname(e);for(r=0;r<=nstaff;r++)l[r]=cur_sy.st_print[r]?0:-1;p(),draw_lstaff(0);for(t=tsfirst;t;t=t.ts_next){if(f&&t.time!=f){f=0;for(r=0;r<=nstaff;r++)cur_sy.st_print[r]||(l[r]=-1);p()}switch(t.type){case C.STAVES:a=t.ts_prev.type==C.BAR?t.ts_prev.x:0;if(!a){for(n=t.ts_next;n;n=n.ts_next){if(n.time!=t.time)break;switch(n.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:a=n.x;continue}break}n||(a=realwidth)}u=t.sy;for(r=0;r<=nstaff;r++){i=l[r];if(i<0){u.st_print[r]&&(l[r]=a?a:t.x-t.wl-2);continue}if(u.st_print[r]&&u.staves[r].stafflines==cur_sy.staves[r].stafflines)continue;a?(s=a,f=t.time):(s=t.x-t.wl-2,l[r]=-1),d(r,i,s),u.st_print[r]&&(l[r]=s)}cur_sy=u,p();continue;case C.BAR:r=t.st;if(t.second||t.invis)break;draw_bar(t,c[r],h[r]);break;case C.STBRK:if(cur_sy.voices[t.v].range==0&&t.xmx>14){var v=0;for(var m=0;m<voice_tb.length;m++)cur_sy.voices[m].range>0&&v++;for(n=t.ts_next;n;n=n.ts_next){if(n.type!=C.STBRK)break;v--}v==0&&draw_lstaff(t.x)}n=t.prev;if(!n)break;s=n.x,n.type!=C.BAR&&(s+=n.wr),r=t.st,i=l[r];if(i>=0){if(i>=s)continue;d(r,i,s)}l[r]=t.x}}for(r=0;r<=nstaff;r++){if(f&&!cur_sy.st_print[r])continue;i=l[r];if(i<0||i>=realwidth)continue;d(r,i,realwidth)}}function draw_symbols(e){var t={},n,r,i,s,o;for(n=e.sym;n;n=n.next){if(n.invis)switch(n.type){case C.KEY:e.key=n;default:continue;case C.NOTE:}i=n.x,set_color(n.color);switch(n.type){case C.NOTE:set_scale(n),n.beam_st&&!n.beam_end&&self.calculate_beam(t,n)&&draw_beams(t),n.invis||(anno_start(n),draw_note(n,!t.s2),anno_stop(n)),n==t.s2&&(t.s2=null);break;case C.REST:draw_rest(n);break;case C.BAR:break;case C.CLEF:o=n.st,n.time>staff_tb[o].clef.time&&(staff_tb[o].clef=n);if(n.second)break;if(!staff_tb[n.st].topbar)break;set_color(undefined),set_sscale(o),anno_start(n),s=staff_tb[o].y,n.clef_name?xygl(i,s+n.y,n.clef_name):n.clef_small?xygl(i,s+n.y,"s"+n.clef_type+"clef"):xygl(i,s+n.y,n.clef_type+"clef"),n.clef_octave&&(n.clef_octave>0?(s+=n.ymx-10,n.clef_small&&(s-=1)):(s+=n.ymn+6,n.clef_small&&(s+=1)),xygl(i-2,s,"oct")),anno_stop(n);break;case C.METER:e.meter=n;if(n.second||!staff_tb[n.st].topbar)break;if(cfmt.alignbars&&n.st!=0)break;set_color(undefined),set_sscale(n.st),anno_start(n),draw_meter(i,n),anno_stop(n);break;case C.KEY:e.key=n;if(n.second||!staff_tb[n.st].topbar)break;set_color(undefined),set_sscale(n.st),anno_start(n),draw_keysig(e,i,n),anno_stop(n);break;case C.MREST:set_scale(n),i+=32,anno_start(n),xygl(i,staff_tb[n.st].y+12,"mrest"),out_XYAB('<text style="font:bold 15px serif"\n x ="X" y="Y" text-anchor="middle">A</text>\n',i,staff_tb[n.st].y+28,n.nmes),anno_stop(n);break;case C.GRACE:set_scale(n),draw_gracenotes(n);break;case C.SPACE:case C.STBRK:break;case C.CUSTOS:set_scale(n),draw_note(n,0);break;case C.BLOCK:case C.PART:case C.REMARK:case C.STAVES:case C.TEMPO:break;default:error(2,n,"draw_symbols - Cannot draw symbol "+n.type)}}set_scale(e.sym),draw_all_ties(e),set_color(undefined)}function draw_all_sym(){var e,t,n=voice_tb.length;for(t=0;t<n;t++)e=voice_tb[t],e.sym&&e.sym.x!=undefined&&self.draw_symbols(e);draw_all_deco(),set_sscale(-1)}function set_tie_dir(e){var t,n,r,i,s,o,u;for(t=e;t;t=t.next){if(!t.ti1)continue;if(t.multi!=0){i=t.multi>0?C.SL_ABOVE:C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if((u&7)!=C.SL_AUTO)continue;t.notes[n].ti1=u&C.SL_DOTTED|i}continue}s=r=0,o=128;for(n=0;n<=t.nhd;n++)t.notes[n].ti1&&(r++,o<128&&t.notes[n].pit<=o+1&&s++,o=t.notes[n].pit);if(r<=1){i=t.stem<0?C.SL_ABOVE:C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u){(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i);break}}continue}if(s==0){if(r&1){r=(r-1)/2,i=C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u==0)continue;r==0&&t.notes[n].pit>=22&&(i=C.SL_ABOVE),(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i),r--==0&&(i=C.SL_ABOVE)}continue}r/=2,i=C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u==0)continue;(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i),--r==0&&(i=C.SL_ABOVE)}continue}o=128;for(n=0;n<=t.nhd;n++)if(t.notes[n].ti1){if(o<128&&t.notes[n].pit<=o+1){r=n;break}o=t.notes[n].pit}i=C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u==0)continue;r==n&&(i=C.SL_ABOVE),(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i)}}}function set_tie_room(){var e,t,n,r,i,s,o;for(r=0;r<voice_tb.length;r++){e=voice_tb[r],t=e.sym;if(!t)continue;t=t.next;if(!t)continue;set_tie_dir(t);for(;t;t=t.next){if(!t.ti1)continue;if(!(t.notes[0].pit<20&&(t.notes[0].ti1&7)==C.SL_BELOW||t.notes[t.nhd].pit>24&&(t.notes[t.nhd].ti1&7)==C.SL_ABOVE))continue;n=t.next;while(n&&n.type!=C.NOTE)n=n.next;if(n){if(n.st!=t.st)continue;i=n.x-t.x-10}else i=realwidth-t.x-10;i<100?o=9:i<300?o=12:o=16,t.notes[t.nhd].pit>24&&(s=3*(t.notes[t.nhd].pit-18)+o,t.ymx<s&&(t.ymx=s),n&&n.ymx<s&&(n.ymx=s),y_set(t.st,!0,t.x+5,i,s)),t.notes[0].pit<20&&(s=3*(t.notes[0].pit-18)-o,t.ymn>s&&(t.ymn=s),n&&n.ymn>s&&(n.ymn=s),y_set(t.st,!1,t.x+5,i,s))}}}function get_bool(e){return!e||!/^(0|n|f)/i.test(e)}function get_font_scale(e){var t=e.split(/\s+/);if(t.length<=1)return;var n=parseFloat(t[t.length-1]);if(isNaN(n)||t<=0){syntax(1,"Bad scale value in %%font");return}font_scale_tb[t[0]]=n;for(var r in font_tb){if(!font_tb.hasOwnProperty(r))continue;var i=font_tb[r];i.name==t[0]&&(i.swfac=i.size*n)}}function param_set_font(e,t){var n,r,i,s,o,u,a,f,l,c;if(e[e.length-2]=="-"){s=e[e.length-1];if(s<"1"||s>"9")return;e="u"+s+"font"}r=cfmt[e],r&&(n=font_tb[r],n&&(i=n.name+"."+n.size,n.class&&(i+="."+n.class))),s=t.indexOf("class="),s>=0&&(s+=6,o=t.indexOf(" ",s),o>0?c=t.slice(s,o):c=t.slice(s),t=t.replace(new RegExp("class="+c),"").trim()),o=t.split(/\s+/),u=o[0],u=="*"&&n?u=n.name:(u=u.replace("Times-Roman","serif"),u=u.replace("Times","serif"),u=u.replace("Helvetica","sans-serif"),u=u.replace("Courier","monospace")),o.length>1?(f=o[o.length-1],f=="*"&&n&&(f=n.size)):n&&(f=n.size);if(!f)return;a=u+"."+f,c&&(a+="."+c);if(a==i)return;n=font_tb[a],n||(l=font_scale_tb[u],l||(l=1.1),n={name:u,size:Number(f),swfac:f*l},font_tb[a]=n),c&&(n.class=c),cfmt[e]=a}function get_unit(e){var t=parseFloat(e);switch(e.slice(-2)){case"CM":case"cm":t*=CM;break;case"IN":case"in":t*=IN;break;case"PT":case"pt":t*=.75}return t}function set_infoname(e){var t=cfmt.infoname.split("\n"),n=e[0];for(var r=0;r<t.length;r++){var i=t[r];if(i[0]!=n)continue;e.length==1?t.splice(r,1):t[r]=e,cfmt.infoname=t.join("\n");return}cfmt.infoname+="\n"+e}function get_textopt(e){return textopt[e]}function set_pos(e,t){e=e.slice(0,3),e=="ste"&&(e="stm"),self.set_v_param("pos",e+" "+t)}function set_writefields(e){var t,n,r=e.split(/\s+/);if(get_bool(r[1]))for(n=0;n<r[0].length;n++)t=r[0][n],cfmt.writefields.indexOf(t)<0&&(cfmt.writefields+=t);else for(n=0;n<r[0].length;n++)t=r[0][n],cfmt.writefields.indexOf(t)>=0&&(cfmt.writefields=cfmt.writefields.replace(t,""))}function set_v_param(e,t){if(curvoice){self.set_vp([e+"=",t]);return}e=[e+"=",t];var n="*";info.V||(info.V={}),info.V[n]?Array.prototype.push.apply(info.V[n],e):info.V[n]=e}function set_page(){if(!img.chg)return;img.chg=!1,img.lm=cfmt.leftmargin-cfmt.printmargin,img.lm<0&&(img.lm=0),img.rm=cfmt.rightmargin-cfmt.printmargin,img.rm<0&&(img.rm=0),img.width=cfmt.pagewidth-2*cfmt.printmargin,img.width-img.lm-img.rm<100&&(error(0,undefined,"Bad staff width"),img.width=img.lm+img.rm+150),set_posx()}function set_format(e,t,n){var r,i,s,o,u;if(n)fmt_lock[e]=!0;else if(fmt_lock[e])return;if(/.+font(-[\d])?$/.test(e)){t.slice(-4)==" box"&&(o=!0,t=t.slice(0,-4)),param_set_font(e,t);switch(e){case"gchordfont":cfmt.gchordbox=o;break;case"measurefont":cfmt.measurebox=o;break;case"partsfont":cfmt.partsbox=o}return}switch(e){case"aligncomposer":case"barsperstaff":case"infoline":case"measurefirst":case"measurenb":case"rbmax":case"rbmin":case"shiftunison":s=parseInt(t);if(isNaN(s)){syntax(1,"Bad integer value");break}cfmt[e]=s;break;case"microscale":r=parseInt(t);if(isNaN(r)||r<4||r>256||r%1){syntax(1,errs.bad_val,"%%"+e);break}self.set_v_param("uscale",r);break;case"bgcolor":case"dblrepbar":case"titleformat":cfmt[e]=t;break;case"breaklimit":case"lineskipfac":case"maxshrink":case"pagescale":case"parskipfac":case"scale":case"slurheight":case"stemheight":case"stretchlast":r=parseFloat(t);if(isNaN(r)){syntax(1,errs.bad_val,"%%"+e);break}switch(e){case"scale":r/=.75;case"pagescale":e="scale",img.chg=!0}cfmt[e]=r;break;case"bstemdown":case"breakoneoln":case"cancelkey":case"contbarnb":case"custos":case"decoerr":case"dynalign":case"flatbeams":case"gchordbox":case"graceslurs":case"graceword":case"hyphencont":case"keywarn":case"linewarn":case"measurebox":case"partsbox":case"rbdbstop":case"singleline":case"squarebreve":case"straightflags":case"stretchstaff":case"timewarn":case"titlecaps":case"titleleft":cfmt[e]=get_bool(t);break;case"chordnames":s=t.split(","),cfmt.chordnames={};for(u=0;u<s.length;u++)cfmt.chordnames["CDEFGAB"[u]]=s[u];break;case"composerspace":case"indent":case"infospace":case"maxstaffsep":case"maxsysstaffsep":case"musicspace":case"partsspace":case"staffsep":case"subtitlespace":case"sysstaffsep":case"textspace":case"titlespace":case"topspace":case"vocalspace":case"wordsspace":r=get_unit(t),isNaN(r)?syntax(1,errs.bad_val,"%%"+e):cfmt[e]=r;break;case"print-leftmargin":syntax(0,"$1 is deprecated - use %%printmargin instead","%%"+e),e="printmargin";case"printmargin":case"leftmargin":case"pagewidth":case"rightmargin":r=get_unit(t);if(isNaN(r)){syntax(1,errs.bad_val,"%%"+e);break}cfmt[e]=r,img.chg=!0;break;case"concert-score":cfmt.sound!="play"&&(cfmt.sound="concert");break;case"writefields":set_writefields(t);break;case"dynamic":case"gchord":case"gstemdir":case"ornament":case"stemdir":case"vocal":case"volume":set_pos(e,t);break;case"font":get_font_scale(t);break;case"fullsvg":if(parse.state!=0){syntax(1,"Cannot have %%fullsvg inside a tune");break}cfmt[e]=t;break;case"gracespace":s=t.split(/\s+/);for(u=0;u<3;u++)if(isNaN(Number(s[u]))){syntax(1,errs.bad_val,"%%gracespace");break}for(u=0;u<3;u++)cfmt[e]=Number(s[u]);break;case"tuplets":cfmt[e]=t.split(/\s+/),s=cfmt[e][3],s&&posval[s]&&(cfmt[e][3]=posval[s]);break;case"infoname":set_infoname(t);break;case"notespacingfactor":r=parseFloat(t);if(isNaN(r)||r<1||r>2){syntax(1,errs.bad_val,"%%"+e);break}u=5,i=space_tb[u];for(;--u>=0;)i/=r,space_tb[u]=i;u=5,i=space_tb[u];for(;++u<space_tb.length;)i*=r,space_tb[u]=i;break;case"play":cfmt.sound="play";break;case"pos":e=t.split(/\s+/),set_pos(e[0],e[1]);break;case"sounding-score":cfmt.sound!="play"&&(cfmt.sound="sounding");break;case"staffwidth":s=get_unit(t);if(isNaN(s)){syntax(1,errs.bad_val,"%%"+e);break}if(s<100){syntax(1,"%%staffwidth too small");break}s=cfmt.pagewidth-s-cfmt.leftmargin;if(s<2){syntax(1,"%%staffwidth too big");break}cfmt.rightmargin=s,img.chg=!0;break;case"textoption":cfmt[e]=get_textopt(t);break;case"titletrim":s=Number(t),isNaN(s)?cfmt[e]=get_bool(t):cfmt[e]=s;break;case"combinevoices":syntax(1,"%%combinevoices is deprecated - use %%voicecombine instead");break;case"voicemap":self.set_v_param("map",t);break;case"voicescale":self.set_v_param("scale",t);break;default:parse.state==0&&(cfmt[e]=t)}}function font_init(){param_set_font("annotationfont","sans-serif 12"),param_set_font("composerfont","serifItalic 14"),param_set_font("footerfont","serif 16"),param_set_font("gchordfont","sans-serif 12"),param_set_font("headerfont","serif 16"),param_set_font("historyfont","serif 16"),param_set_font("infofont","serifItalic 14"),param_set_font("measurefont","serifItalic 14"),param_set_font("partsfont","serif 15"),param_set_font("repeatfont","serif 13"),param_set_font("subtitlefont","serif 16"),param_set_font("tempofont","serifBold 15"),param_set_font("textfont","serif 16"),param_set_font("titlefont","serif 20"),param_set_font("vocalfont","serifBold 13"),param_set_font("voicefont","serifBold 13"),param_set_font("wordsfont","serif 16")}function style_font(e){var t=e.split("."),n=t[1],r,i;return e=t[0].toLowerCase(),t="",r=e.indexOf("-"),r<0&&(r=e.length),i=e.indexOf("italic"),i>=0&&(t+="italic ",i<r&&(r=i)),i=e.indexOf("oblique"),i>=0&&(t+="oblique ",i<r&&(r=i)),i=e.indexOf("bold"),i>=0&&(t+="bold ",i<r&&(r=i)),r>0&&(e=e.slice(0,r)),"font:"+t+n+"px "+e}function font_class(e){return e.class?"f"+e.fid+cfmt.fullsvg+" "+e.class:"f"+e.fid+cfmt.fullsvg}function style_add_font(e){font_style+="\n.f"+e.fid+cfmt.fullsvg+" {"+style_font(e.name+"."+e.size)+"}"}function use_font(e){defined_font[e.fid]||(defined_font[e.fid]=!0,style_add_font(e))}function get_font(e){e+="font";var t=cfmt[e],n=font_tb[t];return n||(syntax(1,"Unknown font $1",e),n=gene.curfont),n.fid||(n.fid=fid++),use_font(n),n}function cnv_escape(e){var t,n,r="",i,s=0,o;for(;;){i=e.indexOf("\\",s);if(i<0)break;r+=e.slice(s,i),t=e[++i];if(!t)return r+"\\";switch(t){case"0":case"2":if(e[i+1]!="0")break;n=oct_acc[e[i+2]];if(n){r+=n,s=i+3;continue}break;case"u":s=Number("0x"+e.slice(i+1,i+5));if(isNaN(s)||s<32){r+=e[++i]+"̆",s=i+1;continue}o=[s];if(s>=55296&&s<=57343){s=Number("0x"+e.slice(i+7,i+11));if(isNaN(s))break;o.push(s),s=i+11}else s=i+5;r+=String.fromCharCode.apply(null,o);continue;case"t":r+=" ",s=i+1;continue;default:n=abc_utf[e.slice(i,i+2)];if(n){r+=n,s=i+2;continue}switch(t){case"`":r+=e[++i]+"̀",s=i+1;continue;case"'":r+=e[++i]+"́",s=i+1;continue;case"^":r+=e[++i]+"̂",s=i+1;continue;case"~":r+=e[++i]+"̃",s=i+1;continue;case"=":r+=e[++i]+"̄",s=i+1;continue;case"_":r+=e[++i]+"̅",s=i+1;continue;case".":r+=e[++i]+"̇",s=i+1;continue;case'"':r+=e[++i]+"̈",s=i+1;continue;case"o":r+=e[++i]+"̊",s=i+1;continue;case"H":r+=e[++i]+"̋",s=i+1;continue;case"v":r+=e[++i]+"̌",s=i+1;continue;case"c":r+=e[++i]+"̧",s=i+1;continue;case";":r+=e[++i]+"̨",s=i+1;continue}}r+="\\"+t,s=i+1}return r+e.slice(s)}function do_include(e){var t,n;if(!user.read_file){syntax(1,"No read_file support");return}if(include>2){syntax(1,"Too many include levels");return}include++,t=user.read_file(e);if(!t){syntax(1,"Cannot read file '$1'",e);return}n=clone(parse),tosvg(e,t),parse=n,include--}function tosvg(e,t,n,r){function C(){var e,i,s=t.indexOf("K:",n);return s<0?!1:(s=t.indexOf("\n",s),parse.select.test(t.slice(parse.bol,s))?!0:(e=/\n\w*\n/,e.lastIndex=s,i=e.exec(t),i?o=e.lastIndex:o=r,!1))}function k(e,t){var n;return e.indexOf("%")>=0&&(e=e.replace(/([^\\])%.*/,"$1").replace(/\\%/g,"%")),e=e.replace(/\s+$/,""),t&&e.indexOf("\\")>=0?cnv_escape(e):e}function L(){generate(),info.W&&put_words(info.W),put_history(),blk_flush(),parse.state=0,cfmt=g,info=y,char_tb=b,glovar=w,maps=E,mac=S,maci=x,init_tune(),img.chg=!0,set_page()}var i,s,n,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N="\n";abc2svg.modules&&(abc2svg.modules.hooks.length||abc2svg.modules.g_hooks.length)&&set_hooks(),parse.file=t,parse.fname=e,n==undefined&&(n=0),r||(r=t.length);for(;n<r;n=parse.eol+1){o=t.indexOf("\n",n);if(o<0||o>r)o=r;parse.eol=o;for(;;){o--;switch(t[o]){case" ":case" ":continue}break}o++;if(o==n){parse.state==1?(parse.istart=n,syntax(1,"Empty line in tune header - ignored")):parse.state>=2&&(L(),parse.select&&(o=t.indexOf("\nX:",parse.eol),o<0&&(o=r),parse.eol=o));continue}parse.istart=parse.bol=n,parse.iend=o,parse.line.index=0,f=t[n],l=t[n+1];if(f=="%"){if(parse.prefix.indexOf(l)<0)continue;t[n+2]=="a"&&t[n+3]=="b"&&t[n+4]=="c"&&t[n+5]==" "?(n+=6,f=t[n],l=t[n+1]):T=!0}else f=="I"&&l==":"&&(T=!0);if(T){T=!1,n+=2;for(;;){switch(t[n]){case" ":case" ":n++;continue}break}p=t.slice(n,o);if(!p||p[0]=="%")continue;d=p.split(/\s+/,2),d[0]||d.shift();switch(d[0]){case"abcm2ps":case"ss-pref":parse.prefix=d[1];continue;case"abc-include":do_include(d[1]);continue}if(d[0].slice(0,5)=="begin"){v=d[0].substr(5),u="\n"+f+l+"end"+v,i=t.indexOf(u,o);if(i<0){syntax(1,"No $1 after %%$2",u.slice(1),d[0]),parse.eol=r;continue}self.do_begin_end(v,d[1],t.slice(o+1,i).replace(new RegExp("^"+f+l,"gm"),"")),parse.eol=t.indexOf("\n",i+6),parse.eol<0&&(parse.eol=r);continue}switch(d[0]){case"select":if(parse.state!=0){syntax(1,"%%select ignored");continue}a=k(p.slice(7),!1),a[0]=='"'&&(a=a.slice(1,-1));if(!a){delete parse.select;continue}a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)"),parse.select=new RegExp(a,"m");continue;case"tune":syntax(1,"%%tune not treated yet");continue;case"voice":if(parse.state!=0){syntax(1,"%%voice ignored");continue}a=k(p.slice(6),!1);if(!a){parse.cur_tune_opts?parse.cur_tune_opts.voice_opts=null:parse.voice_opts=null;continue}if(a=="end")continue;parse.cur_tune_opts?(parse.cur_tune_opts.voice_opts||(parse.cur_tune_opts.voice_opts={}),h=parse.cur_tune_opts.voice_opts):(parse.voice_opts||(parse.voice_opts={}),h=parse.voice_opts),h[a]=[];for(;;){n=++o;if(t[n]!="%")break;o=t.indexOf("\n",o);if(t[n+1]!=l)continue;n+=2,o<0?p=t.slice(n):p=t.slice(n,o),d=p.match(/\S+/);switch(d[0]){default:h[a].push(k(p,!0));continue;case"score":case"staves":case"tune":case"voice":n-=2}break}parse.eol=n-1;continue}self.do_pscom(k(p,!0));continue}if(l!=":"||!/[A-Za-z+]/.test(f)){c=undefined;if(parse.state<2)continue;parse.line.buffer=k(t.slice(n,o),!0),parse_music_line();continue}n+=2;for(;;){switch(t[n]){case" ":case" ":n++;continue}break}p=k(t.slice(n,o),!0);if(f=="+"){if(!c){syntax(1,"+: without previous info field");continue}N=" ",f=c}switch(f){case"X":if(parse.state!=0){syntax(1,errs.ignored,f);continue}if(parse.select&&!C()){o=t.indexOf("\nX:",parse.eol),o<0&&(o=r),parse.eol=o;continue}g=clone(cfmt),cfmt.pos=clone(cfmt.pos),y=clone(info,1),b=clone(char_tb),w=clone(glovar),E=clone(maps,1),S=clone(mac),x=new Int8Array(maci),info.X=p,parse.state=1;continue;case"T":switch(parse.state){case 0:continue;case 1:info.T==undefined?info.T=p:info.T+="\n"+p;continue}m=new_block("title"),m.text=p;continue;case"K":switch(parse.state){case 0:continue;case 1:info.K=p}do_info(f,p);continue;case"W":if(parse.state==0||cfmt.writefields.indexOf(f)<0)break;info.W==undefined?info.W=p:info.W+=N+p;break;case"m":if(parse.state>=2){syntax(1,errs.ignored,f);continue}if((!cfmt.sound||cfmt.sound!="play")&&cfmt.writefields.indexOf(f)<0)break;d=p.match(/(.*?)[= ]+(.*)/);if(!d||!d[2]){syntax(1,errs.bad_val,"m:");continue}mac[d[1]]=d[2],maci[d[1].charCodeAt(0)]=1;break;case"s":if(parse.state!=3||cfmt.writefields.indexOf(f)<0)break;get_sym(p,N==" ");break;case"w":if(parse.state!=3||cfmt.writefields.indexOf(f)<0)break;get_lyrics(p,N==" ");if(p.slice(-1)=="\\"){N=" ",c=f;continue}break;case"|":if(parse.state<2)continue;parse.line.buffer=k(t.slice(n,o),!0),parse_music_line();continue;default:if("ABCDFGHOSZ".indexOf(f)>=0){if(parse.state>=2){syntax(1,errs.ignored,f);continue}info[f]?info[f]+=N+p:info[f]=p;break}do_info(f,p);continue}N="\n",c=f}if(include)return;parse.state>=2&&L(),parse.state=0}function set_head_shift(e){var t,n,r,i,s,o,u=dx_tb[e.head],a=e.stem,f=e.nhd;if(f==0)return;o=u*.78,e.grace&&(o*=.5),a>=0?(n=1,r=f+1,s=e.notes[0].pit):(o=-o,n=f-1,r=-1,s=e.notes[f].pit);var l=!1,c=0;for(t=n;t!=r;t+=a){i=e.notes[t].pit-s,s=e.notes[t].pit;if(i==0){if(l){var h=e.notes[t].shhd=e.notes[t-a].shhd+o;c<h&&(c=h);continue}if(t+a!=r&&s+a==e.notes[t+a].pit){e.notes[t].shhd=-o,c<-o&&(c=-o);continue}}i<0&&(i=-i),i>3||i>=2&&e.head!=C.SQUARE?l=!1:(l=!l,l&&(e.notes[t].shhd=o,c<o&&(c=o)))}e.xmx=c}function acc_shift(e,t){var n,r,i,s,o,u,a,f=e.length;for(n=f-1;--n>=0;){i=e[n].shhd;if(!i||i>0)continue;i=t-i,o=e[n].pit;for(r=f;--r>=0;){if(!e[r].acc)continue;u=e[r].pit;if(u<o-3)break;if(u>o+3)continue;e[r].shac<i&&(e[r].shac=i)}}for(n=f;--n>=0;){a=e[n].acc;if(!a)continue;i=e[n].shac,i||(i=e[n].shhd,i<0?i=t-i:i=t),o=e[n].pit;for(r=f;--r>n;){if(!e[r].acc)continue;u=e[r].pit;if(u>=o+4)if(u>o+4||a<0||e[r].acc<0)continue;i>e[r].shac-6&&(s=e[r].shac+7,s>i&&(i=s))}e[n].shac=i}}function set_acc_shft(){var e,t,n,r,i,n,s,o;e=tsfirst;while(e){if(e.type!=C.NOTE||e.invis){e=e.ts_next;continue}n=e.st,s=e.time,i=!1;for(t=e;t;t=t.ts_next){if(t.time!=s||t.type!=C.NOTE||t.st!=n)break;if(i)continue;for(r=0;r<=t.nhd;r++)if(t.notes[r].acc){i=!0;break}}if(!i){e=t;continue}o=dx_tb[e.head],n={notes:[]};for(;e!=t;e=e.ts_next)n.notes=n.notes.concat(e.notes);sort_pitch(n),acc_shift(n.notes,o)}}function lkvsym(e,t){e.next=t,e.prev=t.prev,e.prev?e.prev.next=e:e.p_v.sym=e,t.prev=e}function lktsym(e,t){t?(e.ts_next=t,e.ts_prev=t.ts_prev,e.ts_prev&&(e.ts_prev.ts_next=e),t.ts_prev=e):e.ts_next=e.ts_prev=null}function unlksym(e){e.next&&(e.next.prev=e.prev),e.prev?e.prev.next=e.next:e.p_v.sym=e.next,e.ts_next&&(e.seqst&&!e.ts_next.seqst&&(e.ts_next.seqst=!0,e.ts_next.shrink=e.shrink,e.ts_next.space=e.space),e.ts_next.ts_prev=e.ts_prev),e.ts_prev&&(e.ts_prev.ts_next=e.ts_next),tsfirst==e&&(tsfirst=e.ts_next),tsnext==e&&(tsnext=e.ts_next)}function insert_clef(e,t,n){var r=e.p_v,i,s=e.st;e.type==C.BAR&&e.prev&&e.prev.type==C.BAR&&(e=e.prev),r.last_sym=e.prev,r.last_sym||(r.sym=null),r.time=e.time,i=sym_add(r,C.CLEF),i.next=e,e.prev=i,i.clef_type=t,i.clef_line=n,i.st=s,i.clef_small=!0,delete i.second,i.notes=[],i.notes[0]={pit:e.notes[0].pit},i.nhd=0;while(!e.seqst)e=e.ts_prev;return lktsym(i,e),i.ts_prev.type!=C.CLEF&&(i.seqst=!0),i}function set_float(){var e,t,n,r,i,s,o,u;for(r=0;r<voice_tb.length;r++){e=voice_tb[r],n=!1,t=e.st;for(i=e.sym;i;i=i.next){if(!i.floating){while(i&&!i.floating)i=i.next;if(!i)break;n=!1}if(!i.dur){n&&i.st++;continue}if(i.notes[0].pit>=19){n=!1;continue}if(i.notes[i.nhd].pit<=12){n=!0,i.st++;continue}o=127;for(s=i.ts_prev;s;s=s.ts_prev){if(s.st!=t||s.v==i.v)break;s.type==C.NOTE&&s.notes[0].pit<o&&(o=s.notes[0].pit)}if(o==127){n&&i.st++;continue}if(i.notes[i.nhd].pit>o-3){n=!1;continue}u=-127;for(s=i.ts_next;s;s=s.ts_next){if(s.st!=t+1||s.v==i.v)break;s.type==C.NOTE&&s.notes[s.nhd].pit>u&&(u=s.notes[s.nhd].pit)}if(u==-127){n&&i.st++;continue}if(i.notes[0].pit<u+3){n=!0,i.st++;continue}o-=i.notes[i.nhd].pit,u=i.notes[0].pit-u;if(!n){if(o<u+3)continue;n=!0}else if(o<u-3){n=!1;continue}i.st++}}}function set_graceoffs(e){var t,n,r,i,s=cfmt.gracespace[0],o=cfmt.gracespace[1],u=cfmt.gracespace[2],a=e.extra;e.prev&&e.prev.type==C.BAR&&(s-=3),i=s,a.beam_st=!0;for(;;a=a.next){set_head_shift(a),acc_shift(a.notes,7),r=0;for(n=a.nhd;n>=0;n--)a.notes[n].shac>r&&(r=a.notes[n].shac);i+=r,a.x=i,a.nflags<=0&&(a.beam_st=!0,a.beam_end=!0),t=a.next;if(!t){a.beam_end=!0;break}t.nflags<=0&&(a.beam_end=!0),a.beam_end&&(t.beam_st=!0,i+=o/4),a.nflags<=0&&(i+=o/4),a.y>t.y+8&&(i-=1.5),i+=o}return t=e.next,t&&t.type==C.NOTE&&(a.y>=3*(t.notes[t.nhd].pit-18)?u-=1:a.beam_st&&a.y<3*(t.notes[t.nhd].pit-18)-4&&(u+=2)),i+=u,i}function gchord_width(e,t,n){var r,i,s,o,u,a=0,f=0,l=0,c=0;for(u=0;u<e.a_gch.length;u++){i=e.a_gch[u];switch(i.type){default:o=-i.x,o>a&&(a=o),s=i.w+2-o,s>f&&(f=s);break;case"<":s=i.w+t,s>l&&(l=s);break;case">":s=i.w+e.wr,s>c&&(c=s)}}r=e.prev;if(r){if(r.a_gch)for(r=e.ts_prev;;r=r.ts_prev){if(r==e.prev){n<a&&(n=a);break}r.seqst&&(a-=r.shrink)}l!=0&&n<l&&(n=l)}r=e.next;if(r){if(r.a_gch)for(r=e.ts_next;;r=r.ts_next){if(r==e.next){e.wr<f&&(e.wr=f);break}r.seqst&&(f-=8)}c!=0&&e.wr<c&&(e.wr=l)}return n}function set_width(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v;switch(e.type){case C.NOTE:case C.REST:e.wr=o=hw_tb[e.head],e.xmx>0&&(e.wr+=e.xmx+4);for(t=e.prev;t;t=t.prev)if(w_tb[t.type]!=0)break;if(t)switch(t.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:o+=3}for(r=0;r<=e.nhd;r++)i=e.notes[r].shhd,i<0&&o<-i+5&&(o=-i+5),e.notes[r].acc&&(v=e.notes[r].shac+(e.notes[r].micro?5.5:3.5),o<v&&(o=v));if(t)switch(t.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:o-=3}e.a_dd&&(o+=deco_width(e)),e.beam_st&&e.beam_end&&e.stem>0&&e.nflags>0&&e.wr<e.xmx+9&&(e.wr=e.xmx+9);if(e.dots){if(e.wl==undefined)switch(e.head){case C.SQUARE:e.xmx+=4;break;case C.OVALBARS:case C.OVAL:e.xmx+=2;break;case C.EMPTY:e.xmx+=1}e.wr<e.xmx+8&&(e.wr=e.xmx+8),e.dots>=2&&(e.wr+=3.5*(e.dots-1))}e.trem2&&e.beam_end&&o<20&&(o=20),u=o;if(t)switch(t.type){case C.NOTE:t.stem>0&&e.stem<0&&u<7&&(u=7),(e.y>27&&t.y>27||e.y<-3&&t.y<-3)&&u<6&&(u=6),t.ti1&&u<14&&(u=14);break;case C.CLEF:if(t.second||t.clef_small)break;u+=8;break;case C.KEY:u+=4}e.a_gch&&(u=gchord_width(e,o,u)),e.a_ly&&(u=ly_width(e,u)),t&&t.type==C.GRACE?e.wl=o-4.5:e.wl=u;return;case C.SPACE:i=e.width/2,e.wr=i,e.a_gch&&(i=gchord_width(e,i,i)),e.a_dd&&(i+=deco_width(e)),e.wl=i;return;case C.BAR:if(e.norepbra)break;f=e.bar_type;switch(f){case"|":s=7;break;default:s=4+3*f.length;for(n=0;n<f.length;n++)switch(f[n]){case"[":case"]":s+=3;break;case":":s+=2}}e.wl=s,e.next&&e.next.type!=C.METER?e.wr=7:e.wr=5;for(t=e.prev;t;t=t.prev)if(w_tb[t.type]!=0){t.type==C.GRACE&&(e.wl-=8);break}e.a_dd&&(e.wl+=deco_width(e)),e.text&&e.text.length<4&&e.next&&e.next.a_gch&&(set_font("repeat"),e.wr+=strwh(e.text)[0]+2);return;case C.CLEF:if(e.invis){e.wl=e.wr=1;return}e.wl=e.wr=e.clef_small?8:12;return;case C.KEY:e.wl=3,d=4;if(!e.k_a_acc)h=e.k_sf,e.k_old_sf&&(cfmt.cancelkey||h==0)?p=e.k_old_sf:p=0,h*p>=0?(h<0&&(h=-h),p<0&&(p=-p),p>h&&(h=p)):(h-=p,h<0&&(h=-h),d+=3);else{h=p=e.k_a_acc.length,p&&(c=e.k_a_acc[0].acc);for(n=1;n<p;n++)a=e.k_a_acc[n],a.pit>e.k_a_acc[n-1].pit+6||a.pit<e.k_a_acc[n-1].pit-6?h--:a.acc!=c&&(d+=3),c=a.acc}e.wr=5.5*h+d;return;case C.METER:u=0,e.x_meter=[];for(n=0;n<e.a_meter.length;n++){l=e.a_meter[n];switch(l.top[0]){case"C":case"c":case"o":e.x_meter[n]=u+6,u+=12;break;case".":case"|":e.x_meter[n]=e.x_meter[n-1];break;default:s=0,!l.bot||l.top.length>l.bot.length?l=l.top:l=l.bot;for(r=0;r<l.length;r++)switch(l[r]){case"(":u+=4;case")":case"1":s+=4;break;default:s+=12}e.x_meter[n]=u+s/2,u+=s}}e.wl=0,e.wr=u+6;return;case C.MREST:e.wl=6,e.wr=66;return;case C.GRACE:e.wl=set_graceoffs(e),e.wr=0,e.a_ly&&ly_width(e,u);return;case C.STBRK:e.wl=e.xmx,e.next&&e.next.type==C.CLEF?(e.wr=2,delete e.next.clef_small):e.wr=8;return;case C.CUSTOS:e.wl=e.wr=4;return;case C.BLOCK:case C.PART:case C.REMARK:case C.STAVES:case C.TEMPO:break;default:error(2,e,"set_width - Cannot set width for symbol $1",e.type)}e.wl=e.wr=0}function time2space(e,t){var n,r,i;return smallest_duration>=C.BLEN/2?smallest_duration>=C.BLEN?t/=4:t/=2:!e.next&&t>=C.BLEN&&(t/=2),t>=C.BLEN/4?t<C.BLEN/2?n=5:t<C.BLEN?n=6:t<C.BLEN*2?n=7:t<C.BLEN*4?n=8:n=9:t>=C.BLEN/8?n=4:t>=C.BLEN/16?n=3:t>=C.BLEN/32?n=2:t>=C.BLEN/64?n=1:n=0,r=t-(C.BLEN/16/8<<n),i=space_tb[n],r!=0&&(r<0?i=space_tb[0]*t/(C.BLEN/16/8):(n>=9&&(n=8),i+=(space_tb[n+1]-space_tb[n])*r/t)),i}function set_space(e){var t,n,r=e.ts_prev.time,i=e.time-r;if(i==0){switch(e.type){case C.MREST:return e.wl}return 0}if(e.ts_prev.type==C.MREST)return 71;n=time2space(e,i);while(!e.dur){switch(e.type){case C.BAR:return n*.9-7;case C.CLEF:return n-e.wl-e.wr;case C.BLOCK:case C.PART:case C.REMARK:case C.STAVES:case C.TEMPO:e=e.ts_next;if(!e)return n;continue}break}e.beam_st||(n*=.9);if(e.type==C.NOTE&&e.nflags>=-1&&e.stem>0){var s=!0;for(t=e.ts_prev;t&&t.time==r;t=t.ts_prev)if(t.type==C.NOTE&&(t.nflags<-1||t.stem>0)){s=!1;break}if(s){for(t=e.ts_next;t&&t.time==e.time;t=t.ts_next)if(t.type==C.NOTE&&(t.nflags<-1||t.stem<0)){s=!1;break}s&&(n*=.9)}}return n}function set_sp_tup(e,t){var n,r,i=e.time,s=t.time+t.dur,o=s-i,u=time2space(e,o/e.tq0)*e.tq0/o;do e=e.ts_next;while(!e.seqst);while(!e.dur)e=e.ts_next;while(!e.seqst)e=e.ts_prev;do t.ts_next?t=t.ts_next:(r=add_end_bar(t),t=r);while(!t.seqst);r=e;for(;;){r.dur&&r.dur*u<r.shrink&&(u=r.shrink/r.dur);if(r==t)break;r=r.ts_next}for(;;){e.seqst&&(n=(e.time-i)*u,i=e.time),e.space=n;if(e==t)break;e=e.ts_next}}function add_end_bar(e){var t={type:C.BAR,bar_type:"|",fname:e.fname,istart:e.istart,iend:e.iend,v:e.v,p_v:e.p_v,st:e.st,dur:0,seqst:!0,invis:!0,time:e.time+e.dur,nhd:0,notes:[{pit:e.notes[0].pit}],wl:0,wr:0,prev:e,ts_prev:e,shrink:e.wr+3};return e.next=e.ts_next=t,t}function set_allsymwidth(){var e,t,n,r,i,s=tsfirst,o=s,u=0,a=[],f=[],l=0;for(;;){e=u;do self.set_width(s),i=s.st,a[i]==undefined&&(a[i]=0),f[i]==undefined&&(f[i]=0),t=a[i]+f[i]+s.wl,t>e&&(e=t),s=s.ts_next;while(s&&!s.seqst);o.shrink=e-u,l||(o.space=o.ts_prev?set_space(o):0),o.shrink==0&&o.space==0&&o.type==C.CLEF&&(delete o.seqst,o.time=o.ts_prev.time);if(!s)break;for(i=0;i<f.length;i++)f[i]=0;u=e;do i=o.st,a[i]=u,o.wr>f[i]&&(f[i]=o.wr),o.tp0&&++l==1&&!n&&(n=o),o.te0&&l--,o=o.ts_next;while(!o.seqst)}s=n;if(!s)return;do{o=s,l=1;do s=s.ts_next,s.tp0&&l++,s.te0&&l--;while(l!=0);set_sp_tup(o,s);do s=s.ts_next;while(s&&!s.tp0)}while(s)}function to_rest(e){e.type=C.REST,delete e.in_tuplet,delete e.sl1,delete e.sl2,delete e.a_dd,delete e.a_gch,e.slur_start=e.slur_end=0}function set_repeat(e){var t,n,r,i,s,o=e.repeat_n,u=e.repeat_k,a=e.st,f=e.v;e.repeat_n=0;if(o<0){o=-o,r=o;for(n=e.prev;n;n=n.prev){if(!n.dur){if(n.type==C.BAR){error(1,n,"Bar in repeat sequence");return}continue}if(--r<=0)break}if(!n){error(1,e,errs.not_enough_n);return}s=e.time-n.time,r=u*o;for(t=e;t;t=t.next){if(!t.dur){if(t.type==C.BAR){error(1,t,"Bar in repeat sequence");return}continue}if(--r<=0)break}if(!t||!t.next){error(1,e,errs.not_enough_n);return}for(t=e.prev;t!=n;t=t.prev)if(t.type==C.NOTE){t.beam_end=!0;break}for(i=u;--i>=0;){r=o,e.dur&&r--,t=e.ts_next;while(r>0)t.st==a&&(unlksym(t),t.v==f&&t.dur&&r--),t=t.ts_next;to_rest(e),e.dur=e.notes[0].dur=s,e.rep_nb=-1,e.beam_st=!0,self.set_width(e),e.seqst&&(e.space=set_space(e)),e.head=C.SQUARE;for(e=t;e;e=e.ts_next)if(e.st==a&&e.v==f&&e.dur)break}return}r=o;for(t=e.prev.prev;t;t=t.prev)if(t.type==C.BAR||t.time==tsfirst.time)if(--r<=0)break;if(!t){error(1,e,errs.not_enough_m);return}s=e.time-t.time,o==1?r=u:r=o;for(t=e;t;t=t.next)if(t.type==C.BAR&&--r<=0)break;if(!t){error(1,e,errs.not_enough_m);return}r=u;if(o==2&&r>1){t=t.next;if(!t){error(1,e,errs.not_enough_m);return}t.repeat_n=o,t.repeat_k=--r}s/=o;if(o==2){n=e;for(t=e.ts_next;;t=t.ts_next){if(t.st!=a)continue;if(t.v==f&&t.type==C.BAR)break;unlksym(t)}to_rest(n),n.dur=n.notes[0].dur=s,n.invis=!0,n.seqst&&(n.space=set_space(n)),t.bar_mrep=2,t.seqst&&(t.space=set_space(t)),n=t.next;for(t=n.ts_next;;t=t.ts_next){if(t.st!=a)continue;if(t.v==f&&t.type==C.BAR)break;unlksym(t)}to_rest(n),n.dur=n.notes[0].dur=s,n.invis=!0,self.set_width(n),n.seqst&&(n.space=set_space(n)),t.seqst&&(t.space=set_space(t));return}n=e;for(i=u;--i>=0;){for(t=n.ts_next;;t=t.ts_next){if(t.st!=a)continue;if(t.v==f&&t.type==C.BAR)break;unlksym(t)}to_rest(n),n.dur=n.notes[0].dur=s,n.beam_st=!0,n.seqst&&(n.space=set_space(n)),t.seqst&&(t.space=set_space(t));if(u==1){n.rep_nb=1;break}n.rep_nb=u-i+1,n=t.next}}function custos_add(e){var t,n,r,i=e;for(;;){if(i.type==C.NOTE)break;i=i.next;if(!i)return}t=e.p_v,t.last_sym=e.prev,t.time=e.time,n=sym_add(t,C.CUSTOS),n.next=e,e.prev=n,lktsym(n,e),n.seqst=!0,n.shrink=e.shrink,n.shrink<12&&(n.shrink=12),n.space=i.space,n.wl=0,n.wr=4,n.nhd=i.nhd,n.notes=[];for(r=0;r<e.notes.length;r++)n.notes[r]={pit:i.notes[r].pit,shhd:0,dur:C.BLEN/4};n.stemless=!0}function set_nl(e){function i(e){cfmt.custos&&voice_tb.length==1&&custos_add(e);for(var t=e.ts_next;t;t=t.ts_next)if(t.seqst){e.nl=!0;break}}function s(e){if(!e.next)return i(e),e;for(e=e.ts_next;e;e=e.ts_next)if(e.seqst){i(e);break}return e}var t,n,r;if(e.eoln&&!cfmt.keywarn&&!cfmt.timewarn)return s(e);switch(e.type){case C.CLEF:case C.BAR:case C.STAVES:break;case C.KEY:if(cfmt.keywarn&&!e.k_none)break;return s(e);case C.METER:if(cfmt.timewarn)break;return s(e);case C.GRACE:e=e.next;if(!e)return e;default:return s(e)}for(;e;e=e.ts_prev){if(!e.seqst)continue;switch(e.type){case C.KEY:case C.CLEF:case C.METER:continue}break}r=0;for(;;e=e.ts_next){if(!e)return e;if(!e.seqst)continue;if(r<0)break;switch(e.type){case C.STAVES:if(e.ts_prev&&e.ts_prev.type==C.BAR)break;while(e.ts_next){if(w_tb[e.ts_next.type]!=0&&e.ts_next.type!=C.CLEF)break;e=e.ts_next}if(!e.ts_next||e.ts_next.type!=C.BAR)continue;e=e.ts_next;case C.BAR:if(r)break;r=1;continue;case C.STBRK:e.stbrk_forced?r=-1:unlksym(e);continue;case C.METER:if(!cfmt.timewarn)break;continue;case C.CLEF:if(r)break;continue;case C.KEY:if(!cfmt.keywarn||e.k_none)break;continue;default:if(!r||e.prev&&e.prev.type==C.GRACE)continue}break}return i(e),e}function get_ck_width(){var e,t,n=voice_tb[0];return self.set_width(n.clef),self.set_width(n.key),self.set_width(n.meter),[n.clef.wl+n.clef.wr+n.key.wl+n.key.wr,n.meter.wl+n.meter.wr]}function get_width(e,t){var n,r,i=0,s=1-cfmt.maxshrink;do{e.seqst&&(n=e.shrink,(r=e.space)<n?i+=n:i+=n*cfmt.maxshrink+r*s,e.x=i);if(e==t)break;e=e.ts_next}while(e);return i}function set_lines(e,t,n,r){var i,s,o,u,a,f,l,c,h,p,d,v;for(;t;t=t.ts_next)if(t.eoln)break;c=get_width(e,t)+r;for(;;){d=Math.ceil(c/n);if(d<=1)return t&&(t=set_nl(t)),t;s=i=e,a=e.x-e.shrink-r,l=a+n,f=a+c/d,a+=c/d*cfmt.breaklimit;for(e=e.ts_next;e!=t;e=e.ts_next){if(!e.x)continue;e.type==C.BAR&&(s=e);if(e.x>=a)break}if(e==t)return t&&(t=set_nl(t)),t;v=!1,o=null;for(;e!=t;e=e.ts_next){u=e.x;if(!u)continue;if(u>l)break;if(e.type!=C.BAR)continue;if(u<f){o=e;continue}if(!o||e.x<f){o=e;continue}if(o>f)break;if(f-o.x<e.x-f)break;o=e;break}o&&(e=o,v=!0);if(!v){var m=0,g=s.time;l-=8,e=s,o=null;for(;e!=t;e=e.ts_next){e.beam_st&&m++,e.beam_end&&m>0&&m--,u=e.x;if(!u)continue;if(u+e.wr>=l)break;if(m||e.in_tuplet)continue;if((e.time-g)%(C.BLEN/4)==0){o=e;continue}if(!o||e.x<f){o=e;continue}if(o>f)break;if(f-o.x<e.x-f)break;o=e;break}o&&(e=o,v=!0)}if(!v){o=e=s;for(;e!=t;e=e.ts_next){u=e.x;if(!u)continue;if(e.x<f){o=e;continue}if(o>f)break;if(f-o.x<e.x-f)break;o=e;break}e=o}if(e.nl){error(0,e,"Line split problem - adjust maxshrink and/or breaklimit"),d=2;for(e=e.ts_next;e!=t;e=e.ts_next){if(!e.x)continue;if(--d<=0)break}}e=set_nl(e);if(!e||t&&e.time>=t.time)break;c-=e.x-i.x,r=0}return e}function cut_tune(e,t){var n,r,i,s,o,n=tsfirst;t!=0&&(s=set_indent(),e-=s,t-=s),s=get_ck_width(),e-=s[0],t+=s[1],cfmt.custos&&voice_tb.length==1&&(e-=12);if(cfmt.barsperstaff){s=cfmt.barsperstaff;for(r=n;r;r=r.ts_next){if(r.type!=C.BAR||!r.bar_num||--s>0)continue;r.eoln=!0,s=cfmt.barsperstaff}}o=t,r=n;for(;n;n=n.ts_next){if(!n.seqst&&!n.eoln)continue;o+=n.shrink;if(o>e)r=set_lines(r,n,e,t);else{if(!n.eoln)continue;delete n.eoln;if(n.dur){for(i=n.ts_next;i;i=i.ts_next)if(i.seqst||i.dur<n.dur)break;i&&!i.seqst?r=set_lines(r,n,e,t):r=set_nl(n)}else r=set_nl(n)}if(!r)break;if(!r.ts_prev){delete r.nl;continue}o=r.shrink,n=r.ts_prev,t=0}}function set_yval(e){switch(e.type){case C.CLEF:if(e.second||e.invis){e.ymx=e.ymn=12;break}e.y=(e.clef_line-1)*6;switch(e.clef_type){default:e.ymx=e.y+28,e.ymn=e.y-14;break;case"c":e.ymx=e.y+13,e.ymn=e.y-11;break;case"b":e.ymx=e.y+7,e.ymn=e.y-12}e.clef_small&&(e.ymx-=2,e.ymn+=2),e.ymx<26&&(e.ymx=26),e.ymn>-1&&(e.ymn=-1),e.clef_octave&&(e.clef_octave>0?e.ymx+=12:e.ymn-=12);break;case C.KEY:e.k_sf>2?e.ymx=34:e.k_sf>0?e.ymx=30:e.ymx=26,e.ymn=-2;break;default:e.ymx=24,e.ymn=0}}function set_auto_clef(e,t,n){var r,i,s,o,u,a;s=12,i=20;for(r=t;r;r=r.ts_next){if(r.type==C.STAVES&&r!=t)break;if(r.st!=e)continue;if(r.type!=C.NOTE){if(r.type==C.CLEF){if(r.clef_type!="a")break;unlksym(r)}continue}r.notes[0].pit<i?i=r.notes[0].pit:r.notes[r.nhd].pit>s&&(s=r.notes[r.nhd].pit)}if(i>=19||i>=13&&n!="b")return"t";if(s<=13||s<=19&&n!="t")return"b";n=="a"&&((s+i)/2>=16?n="t":n="b");var f=n,l=r,c=null;for(r=t;r!=l;r=r.ts_next){if(r.type==C.STAVES&&r!=t)break;if(r.st!=e||r.type!=C.NOTE)continue;o=r.time;if(f=="t"){if(r.notes[0].pit>12||r.notes[r.nhd].pit>20){r.notes[0].pit>20&&(c=r);continue}u=r.ts_prev;if(u&&u.time==o&&u.st==e&&u.type==C.NOTE&&u.notes[0].pit>=19)continue;u=r.ts_next;if(u&&u.st==e&&u.time==o&&u.type==C.NOTE&&u.notes[0].pit>=19)continue}else{if(r.notes[0].pit<12||r.notes[r.nhd].pit<20){r.notes[r.nhd].pit<12&&(c=r);continue}u=r.ts_prev;if(u&&u.time==o&&u.st==e&&u.type==C.NOTE&&u.notes[0].pit<=13)continue;u=r.ts_next;if(u&&u.st==e&&u.time==o&&u.type==C.NOTE&&u.notes[0].pit<=13)continue}if(!c){f=n=f=="t"?"b":"t",c=r;continue}a=r;for(u=r.ts_prev;u!=c;u=u.ts_prev){if(u.st!=e)continue;if(u.type==C.BAR&&u.v==r.v){a=u;break}if(u.type!=C.NOTE)continue;u.beam_st&&!u.p_v.second&&(a=u)}if(a.time==c.time){c=r;continue}c=r,f=f=="t"?"b":"t",u=insert_clef(a,f,f=="t"?2:4),u.clef_auto=!0}return n}function set_clefs(){var e,t,n,r,i,s,o,u,a,f,l=new Array(nstaff),c=cur_sy,h=[];staff_tb=new Array(nstaff);for(n=0;n<=nstaff;n++)l[n]={autoclef:!0},staff_tb[n]={output:"",sc_out:""};for(r=0;r<voice_tb.length;r++){i=voice_tb[r];if(c.voices[r].range<0)continue;n=c.voices[r].st,c.voices[r].second||(i.staffnonote!=undefined&&(c.staves[n].staffnonote=i.staffnonote),i.staffscale&&(c.staves[n].staffscale=i.staffscale),c.voices[r].sep&&(c.staves[n].sep=c.voices[r].sep),c.voices[r].maxsep&&(c.staves[n].maxsep=c.voices[r].maxsep)),!c.voices[r].second&&!i.clef.clef_auto&&(l[n].autoclef=!1)}for(r=0;r<voice_tb.length;r++){i=voice_tb[r];if(c.voices[r].range<0||c.voices[r].second)continue;n=c.voices[r].st,e=i.clef,l[n].autoclef&&(e.clef_type=set_auto_clef(n,tsfirst,e.clef_type),e.clef_line=e.clef_type=="t"?2:4),l[n].clef=staff_tb[n].clef=e}for(n=0;n<=c.nstaff;n++)h[n]=(c.staves[n].stafflines.length-1)*3;for(e=tsfirst;e;e=e.ts_next){e.repeat_n&&set_repeat(e);switch(e.type){case C.STAVES:c=e.sy;for(n=0;n<=nstaff;n++)l[n].autoclef=!0;for(r=0;r<voice_tb.length;r++){if(c.voices[r].range<0)continue;i=voice_tb[r],n=c.voices[r].st,c.voices[r].second||(i.staffnonote!=undefined&&(c.staves[n].staffnonote=i.staffnonote),i.staffscale&&(c.staves[n].staffscale=i.staffscale),c.voices[r].sep&&(c.staves[n].sep=c.voices[r].sep),c.voices[r].maxsep&&(c.staves[n].maxsep=c.voices[r].maxsep)),t=i.clef,t.clef_auto||(l[n].autoclef=!1)}for(n=0;n<=c.nstaff;n++)h[n]=(c.staves[n].stafflines.length-1)*3;for(r=0;r<voice_tb.length;r++){if(c.voices[r].range<0||c.voices[r].second)continue;i=voice_tb[r],n=c.voices[r].st,t=i.clef,t.clef_auto?(o=set_auto_clef(n,e,l[n].clef?l[n].clef.clef_type:"a"),u=o=="t"?2:4):(o=t.clef_type,u=t.clef_line);if(!l[n].clef){t.clef_auto&&(t.type!="a"&&(i.clef=clone(i.clef)),i.clef.clef_type=o,i.clef.clef_line=u),staff_tb[n].clef=l[n].clef=i.clef;continue}if(o==l[n].clef.clef_type&&u==l[n].clef.clef_line)continue;s=e.ts_next;while(s&&(s.v!=r||s.st!=n))s=s.ts_next;if(!s)continue;s.type!=C.CLEF&&(s=insert_clef(s,o,u),t.clef_auto&&(s.clef_auto=!0)),l[n].clef=i.clef=s}continue;default:e.mid=h[e.st];continue;case C.CLEF:}e.clef_type=="a"&&(e.clef_type=set_auto_clef(e.st,e.ts_next,l[e.st].clef.clef_type),e.clef_line=e.clef_type=="t"?2:4),i=e.p_v,i.clef=e;if(e.second){unlksym(e);continue}n=e.st;if(l[n].clef){if(e.clef_type==l[n].clef.clef_type&&e.clef_line==l[n].clef.clef_line)continue}else staff_tb[n].clef=e;l[n].clef=e}c=cur_sy;for(r=0;r<voice_tb.length;r++){if(c.voices[r].range<0)continue;t=voice_tb[r].sym;if(!t||t.notes[0].pit!=127)continue;n=c.voices[r].st;switch(staff_tb[n].clef.clef_type){default:f=22;break;case"c":f=16;break;case"b":f=10}for(e=t;e;e=e.next)e.notes[0].pit=f}}function set_pitch(e){var t,n,r,i,s,o,u,a,f=C.BLEN,l=new Array(nstaff),c=cur_sy;for(i=0;i<=nstaff;i++)t=staff_tb[i].clef,l[i]=delta_tb[t.clef_type]+t.clef_line*2,t.clefpit&&(l[i]+=t.clefpit),cfmt.sound?t.clef_octave&&!t.clef_oct_transp&&(l[i]+=t.clef_octave):t.clef_oct_transp&&(l[i]-=t.clef_octave);for(t=tsfirst;t!=e;t=t.ts_next){i=t.st;switch(t.type){case C.CLEF:l[i]=delta_tb[t.clef_type]+t.clef_line*2,t.clefpit&&(l[i]+=t.clefpit),cfmt.sound?t.clef_octave&&!t.clef_oct_transp&&(l[i]+=t.clef_octave):t.clef_oct_transp&&(l[i]-=t.clef_octave),set_yval(t);break;case C.GRACE:for(r=t.extra;r;r=r.next){s=l[r.st];if(s!=0&&!t.p_v.key.k_drum)for(o=0;o<=r.nhd;o++)a=r.notes[o],a.pit+=s;r.ymn=3*(r.notes[0].pit-18)-2,r.ymx=3*(r.notes[r.nhd].pit-18)+2}set_yval(t);break;case C.KEY:t.k_y_clef=l[i];default:set_yval(t);break;case C.MREST:if(t.invis)break;t.y=12,t.ymx=39,t.ymn=-2;break;case C.REST:if(voice_tb.length==1){t.y=12,t.ymx=24,t.ymn=0;break};case C.NOTE:s=l[i];if(s!=0&&!t.p_v.key.k_drum)for(o=t.nhd;o>=0;o--)t.notes[o].opit=t.notes[o].pit,t.notes[o].pit+=s;t.type==C.NOTE?(t.ymx=3*(t.notes[t.nhd].pit-18)+4,t.ymn=3*(t.notes[0].pit-18)-4):(t.y=((t.notes[0].pit-18)/2|0)*6,t.ymx=t.y+rest_sp[5-t.nflags][0],t.ymn=t.y-rest_sp[5-t.nflags][1]),t.dur<f&&(f=t.dur)}}e||(smallest_duration=f)}function set_stem_dir(){var e,t,n,r,i,s,o,u,a,f,l=[],c=tsfirst,h=cur_sy,p=h.nstaff;while(c){for(r=0;r<=p;r++)l[r]=[];f=[];for(t=c;t;t=t.ts_next){if(t.type==C.BAR)break;if(t.type==C.STAVES){if(t!=c)break;h=c.sy;for(r=p;r<=h.nstaff;r++)l[r]=[];p=h.nstaff;continue}if(t.type!=C.NOTE&&t.type!=C.REST||t.invis)continue;r=t.st;if(r>p){var d="*** fatal set_stem_dir(): bad staff number "+r+" max "+p;throw error(2,null,d),new Error(d)}s=t.v,o=f[s],o||(o={st1:-1,st2:-1},f[s]=o),o.st1<0?o.st1=r:o.st1!=r&&(r>o.st1?r>o.st2&&(o.st2=r):(o.st1>o.st2&&(o.st2=o.st1),o.st1=r)),u=l[r],i=h.voices[s].range;for(n=u.length;--n>=0;){a=u[n];if(a.v==i)break}if(n<0){a={v:i,ymx:0,ymn:24};for(n=0;n<u.length;n++)if(i<u[n].v){u.splice(n,0,a);break}n==u.length&&u.push(a)}if(t.type!=C.NOTE)continue;t.ymx>a.ymx&&(a.ymx=t.ymx),t.ymn<a.ymn&&(a.ymn=t.ymn),t.xstem&&(t.ts_prev.st!=r-1||t.ts_prev.type!=C.NOTE?(error(1,c,"Bad !xstem!"),t.xstem=!1):(t.ts_prev.multi=1,t.multi=1,t.stemless=!0))}for(;c!=t;c=c.ts_next){if(c.multi)continue;switch(c.type){default:continue;case C.REST:if(c.combine!=undefined&&c.combine<0||!c.ts_next||c.ts_next.type!=C.REST||c.ts_next.st!=c.st||c.time!=c.ts_next.time||c.dur!=c.ts_next.dur||c.invis)break;unlksym(c.ts_next);break;case C.NOTE:case C.GRACE:}r=c.st,s=c.v,o=f[s],u=l[r];if(o&&o.st2>=0){r==o.st1?c.multi=-1:r==o.st2&&(c.multi=1);continue}if(u.length<=1){c.floating&&(c.multi=r==voice_tb[s].st?-1:1);continue}i=h.voices[s].range;for(n=u.length;--n>=0;)if(u[n].v==i)break;if(n<0)continue;n==u.length-1?c.multi=-1:(c.multi=1,n!=0&&n+2==u.length&&(u[n].ymn-cfmt.stemheight>u[n+1].ymx&&(c.multi=-1),e=c.ts_next,c.ts_prev&&c.ts_prev.time==c.time&&c.ts_prev.st==c.st&&c.notes[c.nhd].pit==c.ts_prev.notes[0].pit&&c.beam_st&&c.beam_end&&(!e||e.st!=c.st||e.time!=c.time)&&(c.multi=-1)))}while(c&&c.type==C.BAR)c=c.ts_next}}function set_rest_offset(){var e,t,n,r,i,s,o,u,a,f,l,c,h=[],p=cur_sy;for(e=tsfirst;e;e=e.ts_next){if(e.invis)continue;e.type==C.STAVES&&(p=e.sy);if(!e.dur)continue;s=h[e.v],s||(s={},h[e.v]=s),s.s=e,s.st=e.st,s.end_time=e.time+e.dur;if(e.type!=C.REST)continue;a=-127,u=127,i=l=!1;for(n=0;n<=h.length;n++){s=h[n];if(!s||!s.s||s.st!=e.st||n==e.v)continue;if(s.end_time<=e.time)continue;i=!0,t=s.s,p.voices[n].range<p.voices[e.v].range?t.time==e.time?t.ymn<u&&(u=t.ymn,t.dots&&(l=!0)):t.y<u&&(u=t.y):t.time==e.time?t.ymx>a&&(a=t.ymx,t.dots&&(l=!0)):t.y>a&&(a=t.y)}r=e.time+e.dur;for(t=e.ts_next;t;t=t.ts_next){if(t.time>=r)break;if(t.st!=e.st||!t.dur||t.invis)continue;i=!0,p.voices[t.v].range<p.voices[e.v].range?t.time==e.time?t.ymn<u&&(u=t.ymn,t.dots&&(l=!0)):t.y<u&&(u=t.y):t.time==e.time?t.ymx>a&&(a=t.ymx,t.dots&&(l=!0)):t.y>a&&(a=t.y)}if(!i){e.y=12,e.ymx=24,e.ymn=0;continue}u==127&&e.y<12&&(f=12-e.y,e.y+=f,e.ymx+=f,e.ymn+=f),a==-127&&e.y>12&&(f=e.y-12,e.y-=f,e.ymx-=f,e.ymn-=f),f=u-e.ymx;if(f<0){f=Math.ceil(-f/6)*6;if(e.ymn-f>=a){e.y-=f,e.ymx-=f,e.ymn-=f;continue}c=l?15:10,e.notes[0].shhd=c,e.xmx=c;continue}f=a-e.ymn;if(f>0){f=Math.ceil(f/6)*6;if(e.ymx+f<=u){e.y+=f,e.ymx+=f,e.ymn+=f;continue}c=l?15:10,e.notes[0].shhd=c,e.xmx=c;continue}}}function new_sym(e,t,n){var r={type:e,fname:n.fname,v:t.v,p_v:t,st:t.st,time:n.time,next:t.last_sym.next};return r.next&&(r.next.prev=r),t.last_sym.next=r,r.prev=t.last_sym,t.last_sym=r,lktsym(r,n),r.ts_prev.type!=e&&(r.seqst=!0),n.type==e&&r.v!=n.v&&(delete n.seqst,n.shrink=0),r}function init_music_line(){var e,t,n,r,i,s,o,u,a,f=voice_tb.length;for(s=0;s<f;s++){if(cur_sy.voices[s].range<0)continue;e=voice_tb[s],e.second=cur_sy.voices[s].second,e.last_sym=e.sym,o=cur_sy.voices[s].st;while(o<nstaff&&!cur_sy.st_print[o])o++;e.st=o}i=tsfirst;while(i.type==C.CLEF)s=i.v,cur_sy.voices[s].range>=0&&!cur_sy.voices[s].second&&(delete i.clef_small,e=i.p_v,e.last_sym=e.sym=i),i=i.ts_next;for(s=0;s<f;s++){e=voice_tb[s];if(e.sym&&e.sym.type==C.CLEF)continue;if(cur_sy.voices[s].range<0||cur_sy.voices[s].second&&!e.bar_start)continue;o=cur_sy.voices[s].st;if(!staff_tb[o]||!staff_tb[o].clef)continue;t=clone(staff_tb[o].clef),t.v=s,t.p_v=e,t.st=o,t.time=tsfirst.time,t.prev=null,t.next=e.sym,t.next&&(t.next.prev=t),e.sym=t,e.last_sym=t,t.ts_next=i,i?t.ts_prev=i.ts_prev:t.ts_prev=null,t.ts_prev?(t.ts_prev.ts_next=t,delete t.seqst):(tsfirst=t,t.seqst=!0),i&&(i.ts_prev=t,i.type==C.CLEF&&delete i.seqst),delete t.clef_small,t.second=cur_sy.voices[s].second,cur_sy.st_print[o]||(t.invis=!0)}for(s=0;s<f;s++){if(cur_sy.voices[s].range<0||cur_sy.voices[s].second||!cur_sy.st_print[cur_sy.voices[s].st])continue;e=voice_tb[s];if(i&&i.v==s&&i.type==C.KEY){e.last_sym=i,i.k_old_sf=i.k_sf,i=i.ts_next;continue}n=e.key;if(n.k_sf||n.k_a_acc)t=new_sym(C.KEY,e,i),t.k_sf=n.k_sf,t.k_old_sf=n.k_sf,t.k_none=n.k_none,t.k_a_acc=n.k_a_acc,t.istart=n.istart,t.iend=n.iend,n.k_bagpipe&&(t.k_bagpipe=n.k_bagpipe,t.k_bagpipe=="p"&&(t.k_old_sf=3))}if(insert_meter&1){for(s=0;s<f;s++){e=voice_tb[s],n=e.meter;if(cur_sy.voices[s].range<0||cur_sy.voices[s].second||!cur_sy.st_print[cur_sy.voices[s].st]||n.a_meter.length==0)continue;if(i&&i.v==s&&i.type==C.METER){e.last_sym=i,i=i.ts_next;continue}t=new_sym(C.METER,e,i),t.istart=n.istart,t.iend=n.iend,t.wmeasure=n.wmeasure,t.a_meter=n.a_meter}insert_meter&=-2}for(s=0;s<f;s++){e=voice_tb[s],n=e.bar_start,e.bar_start=null;if(i&&i.v==s&&i.type==C.BAR){e.last_sym=i,i=i.ts_next;continue}if(!n)continue;if(cur_sy.voices[s].range<0||!cur_sy.st_print[cur_sy.voices[s].st])continue;n.next=e.last_sym.next,n.next&&(n.next.prev=n),e.last_sym.next=n,n.prev=e.last_sym,e.last_sym=n,lktsym(n,i),n.time=tsfirst.time,n.ts_prev.type!=n.type&&(n.seqst=!0),i&&i.type==n.type&&n.v!=i.v&&delete i.seqst}self.set_pitch(i);for(t=i;t;t=t.ts_next)if(t.seqst){for(t=t.ts_next;t;t=t.ts_next)if(t.seqst)break;break}while(i){if(i.seqst){do i=i.ts_next;while(i&&!i.seqst);break}i=i.ts_next}t=tsfirst;for(;;){n=t,a=0;do{self.set_width(t),u=t.wl;for(r=t.prev;r;r=r.prev)if(w_tb[r.type]!=0){u+=r.wr;break}u>a&&(a=u),t=t.ts_next}while(t!=i&&!t.seqst);n.shrink=a,n.space=0;if(t==i)break}}function set_words(e){var t,n,r,i,s=!0,o=127;for(t=e.sym;t;t=t.next)if(t.type==C.NOTE){o=t.notes[0].pit;break}for(t=e.sym;t;t=t.next){switch(t.type){case C.MREST:s=!0;break;case C.BAR:t.bar_type=bar_cnv(t.bar_type),t.beam_on||(s=!0),!t.next&&t.prev&&t.prev.head==C.OVALBARS&&(t.prev.head=C.SQUARE);break;case C.NOTE:case C.REST:if(t.trem2)break;r=t.nflags,t.ntrem&&(r+=t.ntrem),t.type==C.REST&&t.beam_end&&(t.beam_end=!1,s=!0);if(s||r<=0)i&&(i.beam_end=!0,i=null),r<=0?(t.beam_st=!0,t.beam_end=!0):t.type==C.NOTE&&(t.beam_st=!0,s=!1);t.beam_end&&(s=!0),t.type==C.NOTE&&(i=t)}if(t.type==C.NOTE){t.nhd!=0&&sort_pitch(t),o=t.notes[0].pit;for(n=t.prev;n;n=n.prev){if(n.type!=C.REST)break;n.notes[0].pit=o}}else t.notes||(t.notes=[],t.notes[0]={},t.nhd=0),t.notes[0].pit=o}i&&(i.beam_end=!0)}function set_rb(e){var t,n,r,i=e.sym;while(i){if(i.type!=C.BAR||!i.rbstart||i.norepbra){i=i.next;continue}n=cfmt.rbmax;if(i.text&&i.text[0]=="1"){r=0,t=null;for(i=i.next;i;i=i.next){if(i.type!=C.BAR)continue;r++;if(i.rbstop){r<=cfmt.rbmax&&(n=r,t=null);break}r==cfmt.rbmin&&(t=i)}t&&(t.rbstop=1,n=cfmt.rbmin)}while(i){if(i.rbstart!=2){i=i.next;if(!i)break;if(i.rbstart!=2){i=i.next;if(!i)break;if(i.rbstart!=2)break}}r=0,t=null;for(i=i.next;i;i=i.next){if(i.type!=C.BAR)continue;r++;if(i.rbstop)break;i.next?r==n&&(i.rbstop=1):i.rbstop=2}}}}function set_global(){var e,t,n,r,i;i=cur_sy,t=i.nstaff;for(;;){i=i.next;if(!i)break;i.nstaff>t&&(t=i.nstaff)}nstaff=t,r=voice_tb.length;for(n=0;n<r;n++)e=voice_tb[n],set_words(e),set_rb(e);set_float(),set_clefs(),self.set_pitch(null)}function set_indent(e){var t,n,r,i,s,o,u,a,f=voice_tb.length,l=0;for(n=0;n<f;n++){i=voice_tb[n];if(cur_sy.voices[n].range<0)continue;t=cur_sy.voices[n].st,s=(e||i.new_name)&&i.nm?i.nm:i.snm;if(!s)continue;a||(a=get_font("voice"),set_font(a)),o=0;for(;;){u=s.indexOf("\\n",o),u<0?r=strwh(s.slice(o)):r=strwh(s.slice(o,u)),r=r[0],r>l&&(l=r);if(u<0)break;o=u+1}}a&&(l+=4*cwid(" ")*a.swfac),r=.5;for(t=0;t<=cur_sy.nstaff;t++){if(cur_sy.staves[t].flags&(OPEN_BRACE2|OPEN_BRACKET2)){r=12;break}cur_sy.staves[t].flags&(OPEN_BRACE|OPEN_BRACKET)&&(r=6)}return l+=r,e&&(l+=cfmt.indent),l}function set_beams(e){var t,n,r,i,s,o,u,a,f,l,c,h,p=-1;for(t=e;t;t=t.next){if(t.type!=C.NOTE){if(t.type!=C.GRACE)continue;r=t.extra;if(r.stem==2){s=t;continue}!t.stem&&(t.stem=t.multi)==0&&(t.stem=1);for(;r;r=r.next)r.stem=t.stem,r.multi=t.multi;continue}if(!t.stem&&(t.stem=t.multi)==0){l=t.mid/3+18;if(i)t.stem=p;else if(t.beam_st&&!t.beam_end){i=!0,c=t.notes[t.nhd].pit,h=t.notes[0].pit;for(r=t.next;r;r=r.next){if(r.type!=C.NOTE)continue;if(r.stem||r.multi){t.stem=r.stem||r.multi;break}r.notes[r.nhd].pit>c&&(c=r.notes[r.nhd].pit),r.notes[0].pit<h&&(h=r.notes[0].pit);if(r.beam_end)break}r.beam_end&&((c+h)/2<l?t.stem=1:(c+h)/2>l?t.stem=-1:cfmt.bstemdown&&(t.stem=-1)),t.stem||(t.stem=p)}else{a=(t.notes[t.nhd].pit+t.notes[0].pit)/2;if(a==l){a=0;for(f=0;f<=t.nhd;f++)a+=t.notes[f].pit;a/=t.nhd+1}a<l?t.stem=1:a>l?t.stem=-1:cfmt.bstemdown?t.stem=-1:t.stem=p}}else t.beam_st&&!t.beam_end&&(i=!0);t.beam_end&&(i=!1),p=t.stem;if(s){for(r=s.extra;r;r=r.next)r.stem=-p;s.stem=-p,s=null}}}function same_head(e,t){var n,r,i,s,o,u,a,f,l,c,h;if(e.shiftunison&&e.shiftunison>=3)return!1;if((i=e.dur)>=C.BLEN)return!1;if((s=t.dur)>=C.BLEN)return!1;if(e.stemless&&t.stemless)return!1;if(e.dots!=t.dots)if(e.shiftunison&&e.shiftunison&1||e.dots*t.dots!=0)return!1;if(e.stem*t.stem>0)return!1;n=r=0;if(e.notes[0].pit>t.notes[0].pit){if(e.stem<0)return!1;while(t.notes[r].pit!=e.notes[0].pit)if(++r>t.nhd)return!1}else if(e.notes[0].pit<t.notes[0].pit){if(t.stem<0)return!1;while(t.notes[0].pit!=e.notes[n].pit)if(++n>e.nhd)return!1}if(t.notes[r].acc!=e.notes[n].acc)return!1;u=n,f=r,c=e.notes[n].shhd,h=t.notes[r].shhd;do{n++,r++;if(n>e.nhd)break;if(r>t.nhd)break;if(t.notes[r].acc!=e.notes[n].acc)return!1;c<e.notes[n].shhd&&(c=e.notes[n].shhd),h<t.notes[r].shhd&&(h=t.notes[r].shhd)}while(t.notes[r].pit==e.notes[n].pit);if(n<=e.nhd){if(r<=t.nhd)return!1;if(t.stem>0)return!1}else if(r<=t.nhd&&e.stem>0)return!1;a=n,l=r,o=0;if(i!=s){i<s&&(i=s,s=e.dur);if(i<C.BLEN/2)t.dots?o=2:e.dots&&(o=1);else{if(!(s<C.BLEN/4))return!1;if(e.shiftunison&&e.shiftunison&2)return!1;o=t.dur>=C.BLEN/2?2:1}}o==0&&(o=e.p_v.scale<t.p_v.scale?2:1);if(o==1){for(r=f;r<l;r++)t.notes[r].invis=!0,delete t.notes[r].acc;for(r=0;r<=t.nhd;r++)t.notes[r].shhd+=c}else{for(n=u;n<a;n++)e.notes[n].invis=!0,delete e.notes[n].acc;for(n=0;n<=e.nhd;n++)e.notes[n].shhd+=h}return!0}function unison_acc(e,t,n,r){var i,s;if(!t.notes[r].acc){s=w_note[t.head]*2+t.xmx+e.notes[n].shac+2,e.notes[n].micro&&(s+=2),t.dots&&(s+=6);for(i=0;i<=e.nhd;i++)e.notes[i].shhd+=s,e.notes[i].shac-=s;e.xmx+=s}else{s=w_note[e.head]*2+e.xmx+t.notes[r].shac+2,t.notes[r].micro&&(s+=2),e.dots&&(s+=6);for(i=0;i<=t.nhd;i++)t.notes[i].shhd+=s,t.notes[i].shac-=s;t.xmx+=s}}function set_left(e){var t,n,r,i,s=w_note[e.head],o=s,u=[];for(n=0;n<MAXPIT;n++)u.push(-100);if(e.nflags>-2){e.stem>0?(o=-o,n=e.notes[0].pit*2,r=(Math.ceil((e.ymx-2)/3)+18)*2):(n=(Math.ceil((e.ymn+2)/3)+18)*2,r=e.notes[e.nhd].pit*2),n<0&&(n=0),r>=MAXPIT&&(r=MAXPIT-1);while(n<=r)u[n++]=o}i=e.notes[e.stem>0?0:e.nhd].shhd;for(t=0;t<=e.nhd;t++)o=-e.notes[t].shhd+s+i,n=e.notes[t].pit*2,n<0?n=0:n>=MAXPIT-1&&(n=MAXPIT-2),o>u[n]&&(u[n]=o),e.head!=C.SQUARE&&(o-=1),o>u[n-1]&&(u[n-1]=o),o>u[n+1]&&(u[n+1]=o);return u}function set_right(e){var t,n,r,i,s,o=w_note[e.head],u=o,a=e.nflags>0&&e.beam_st&&e.beam_end,f=[];for(n=0;n<MAXPIT;n++)f.push(-100);if(e.nflags>-2){e.stem<0?(u=-u,n=(Math.ceil((e.ymn+2)/3)+18)*2,r=e.notes[e.nhd].pit*2,i=n+4):(n=e.notes[0].pit*2,r=(Math.ceil((e.ymx-2)/3)+18)*2),n<0&&(n=0),r>MAXPIT&&(r=MAXPIT);while(n<r)f[n++]=u}if(a)if(e.stem>0){e.xmx==0?n=e.notes[e.nhd].pit*2:n=e.notes[0].pit*2,n+=4,n<0&&(n=0);for(;n<MAXPIT&&n<=r-4;n++)f[n]=11}else{n=i,n<0&&(n=0);for(;n<MAXPIT&&n<=e.notes[0].pit*2-4;n++)f[n]=3.5}s=e.notes[e.stem>0?0:e.nhd].shhd;for(t=0;t<=e.nhd;t++)u=e.notes[t].shhd+o-s,n=e.notes[t].pit*2,n<0?n=0:n>=MAXPIT-1&&(n=MAXPIT-2),u>f[n]&&(f[n]=u),e.head!=C.SQUARE&&(u-=1),u>f[n-1]&&(f[n-1]=u),u>f[n+1]&&(f[n+1]=u);return f}function set_overlap(){function x(){t=n,n=e,c=h,E=m,S=g,d=p}var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S;for(e=tsfirst;e;e=e.ts_next){if(e.type!=C.NOTE||e.invis)continue;if(e.xstem&&e.ts_prev.stem<0)for(u=0;u<=e.nhd;u++)e.notes[u].shhd-=7,e.notes[u].shac+=16;n=e;for(;;){n=n.ts_next;if(!n)break;if(n.time!=e.time){n=null;break}if(n.type==C.NOTE&&!n.invis&&n.st==e.st)break}if(!n)continue;t=e,cur_sy.voices[t.v].range<cur_sy.voices[n.v].range?n.dot_low=!0:t.dot_low=!0;if(t.ymn>n.ymx||t.ymx<n.ymn)continue;if(same_head(t,n))continue;g=set_right(t),y=set_left(n),r=t.ts_prev;if(r&&r.time==t.time&&r.st==t.st&&r.type==C.NOTE&&!r.invis){w=set_right(r);for(i=0;i<MAXPIT;i++)w[i]>g[i]&&(g[i]=w[i])}else r=null;c=-10;for(i=0;i<MAXPIT;i++)y[i]+g[i]>c&&(c=y[i]+g[i]);if(c<-3)if(!t.dots||!n.dots||!n.dot_low||t.stem>0||n.stem<0||t.notes[t.nhd].pit+2!=n.notes[0].pit||n.notes[0].pit&1)continue;b=set_right(n),m=set_left(t);if(r){w=set_left(r);for(i=0;i<MAXPIT;i++)w[i]>m[i]&&(m[i]=w[i])}h=p=d=-100;for(i=0;i<MAXPIT;i++)m[i]+b[i]>h&&(h=m[i]+b[i]),b[i]>d&&(d=b[i]),g[i]>p&&(p=g[i]);f=0,s=t.nhd,o=n.nhd;for(;;){l=t.notes[s].pit-n.notes[o].pit;switch(l){case 0:if(t.notes[s].acc!=n.notes[o].acc){f=-1;break}n.notes[o].acc&&(n.notes[o].acc=0),t.dots&&n.dots&&t.notes[s].pit&1&&(f=1);break;case-1:t.dots&&n.dots&&(t.notes[s].pit&1?(t.dot_low=!1,n.dot_low=!1):(t.dot_low=!0,n.dot_low=!0));break;case-2:if(t.dots&&n.dots&&!(t.notes[s].pit&1)){t.dot_low=!1,n.dot_low=!1;break}}if(f<0)break;if(l>=0&&--s<0)break;if(l<=0&&--o<0)break}if(f<0){unison_acc(t,n,s,o);continue}a=0,t.dots?n.dots&&(f||(a=1)):n.dots&&h+p<c+d&&(a=1),E=y,S=b,!r&&h+p<c+d&&x(),c+=3,c<0&&(c=0),u=t.stem>=0?0:t.nhd,c+=t.notes[u].shhd,u=n.stem>=0?0:n.nhd,c-=n.notes[u].shhd;if(t.dots){v=7.7+t.xmx+3.5*t.dots-3.5+3;if(!a){h=-100;for(s=0;s<=t.nhd;s++)i=t.notes[s].pit,i&1||(t.dot_low?i--:i++),i*=2,i<1?i=1:i>=MAXPIT-1&&(i=MAXPIT-2),E[i]>h&&(h=E[i]),E[i-1]+1>h&&(h=E[i-1]+1),E[i+1]+1>h&&(h=E[i+1]+1);v+h+2>c&&(c=v+h+2)}else if(v<c+d+n.xmx){h=0;for(s=0;s<=t.nhd;s++)i=t.notes[s].pit,i&1||(t.dot_low?i--:i++),i*=2,i<1?i=1:i>=MAXPIT-1&&(i=MAXPIT-2),S[i]>h&&(h=S[i]),S[i-1]+1>h&&(h=S[i-1]=1),S[i+1]+1>h&&(h=S[i+1]+1);h>4.5&&7.7+t.xmx+2<c+h+n.xmx&&(n.xmx=h+3-7.7)}}for(u=n.nhd;u>=0;u--)n.notes[u].shhd+=c;n.xmx+=c,a&&(t.xmx=n.xmx)}}function set_stems(){var e,t,n,r,i,s,o,u,a,f;for(e=tsfirst;e;e=e.ts_next){if(e.type!=C.NOTE){if(e.type!=C.GRACE)continue;a=f=e.mid;for(n=e.extra;n;n=n.next)r=GSTEM,n.nflags>1&&(r+=1.2*(n.nflags-1)),s=3*(n.notes[0].pit-18),o=3*(n.notes[n.nhd].pit-18),e.stem>=0?(n.y=s,n.ys=o+r,o=Math.round(n.ys)):(n.y=o,n.ys=s-r,s=Math.round(n.ys)),o+=2,s-=2,s<a?a=s:o>f&&(f=o),n.ymx=o,n.ymn=s;e.ymx=f,e.ymn=a;continue}set_head_shift(e),u=e.nflags;if(e.beam_st&&!e.beam_end){e.feathered_beam&&(u=++e.nflags);for(t=e.next;;t=t.next)if(t.type==C.NOTE){e.feathered_beam&&t.nflags++;if(t.beam_end)break}t.nflags>u&&(u=t.nflags)}else if(!e.beam_st&&e.beam_end){for(t=e.prev;;t=t.prev)if(t.beam_st)break;t.nflags>u&&(u=t.nflags)}r=cfmt.stemheight;switch(u){case 2:r+=2;break;case 3:r+=5;break;case 4:r+=10;break;case 5:r+=16}(i=e.p_v.scale)!=1&&(r*=(i+1)*.5),s=3*(e.notes[0].pit-18),e.nhd>0?(r-=2,o=3*(e.notes[e.nhd].pit-18)):o=s,e.ntrem&&(r+=2*e.ntrem),e.stemless?(e.stem>=0?(e.y=s,e.ys=o):(e.ys=s,e.y=o),u==-4&&(s-=6),e.ymx=o+4,e.ymn=s-4):e.stem>=0?(u>=2&&(r-=1),e.notes[e.nhd].pit>26&&(u<=0||!e.beam_st||!e.beam_end)&&(r-=2,e.notes[e.nhd].pit>28&&(r-=2)),e.y=s,e.notes[0].ti1&&(s-=3),e.ymn=s-4,e.ys=o+r,e.ys<e.mid&&(e.ys=e.mid),e.ymx=e.ys+2.5|0):(e.notes[0].pit<18&&(u<=0||!e.beam_st||!e.beam_end)&&(r-=2,e.notes[0].pit<16&&(r-=2)),e.ys=s-r,e.ys>e.mid&&(e.ys=e.mid),e.ymn=e.ys-2.5|0,e.y=o,e.notes[e.nhd].ti1&&(o+=3),e.ymx=o+4)}}function check_bar(e){var t,n,r,i,s=e.p_v;while(e.type==C.CLEF||e.type==C.KEY||e.type==C.METER){e.type==C.METER&&e.time>s.sym.time&&(insert_meter|=1),e=e.prev;if(!e)return}if(e.type!=C.BAR)return;e.text!=undefined&&(s.bar_start=clone(e),s.bar_start.bar_type="",delete e.text,delete e.a_gch),t=e.bar_type;if(t==":")return;if(t.slice(-1)!=":")return;s.bar_start||(s.bar_start=clone(e));if(t[0]!=":"){if(t=="||:")return s.bar_start.bar_type="[|:",e.bar_type="||",!0;s.bar_start.bar_type=t,e.prev&&e.prev.type==C.BAR?unlksym(e):e.bar_type="|";return}if(t=="||:")return s.bar_start.bar_type="[|:",e.bar_type="||",!0;n=0;while(t[n]==":")n++;if(n<t.length){e.bar_type=t.slice(0,n)+"|]",n=t.length-1;while(t[n]==":")n--;s.bar_start.bar_type="[|"+t.slice(n+1)}else n=t.length/2|0,e.bar_type=t.slice(0,n)+"|]",s.bar_start.bar_type="[|"+t.slice(n);return!0}function sym_staff_move(e){for(var t=tsfirst;t;t=t.ts_next){if(t.nl)break;t.st==e&&t.type!=C.CLEF&&(t.st++,t.invis=!0)}}function block_gen(e){switch(e.subtype){case"leftmargin":case"rightmargin":case"pagescale":case"pagewidth":case"scale":case"staffwidth":svg_flush(),self.set_format(e.subtype,e.param);break;case"ml":svg_flush(),user.img_out(e.text);break;case"newpage":blk_flush(),block.newpage=!0,blk_out();break;case"sep":set_page(),vskip(e.sk1),output+='<path class="stroke"\n d="M',out_sxsy(e.x," ",0),output+="h"+e.l.toFixed(2)+'"/>\n',vskip(e.sk2);break;case"text":write_text(e.text,e.opt);break;case"title":write_title(e.text,!0);break;case"vskip":vskip(e.sk);break;default:error(2,e,"Block $1 not treated",e.subtype)}}function set_piece(){function c(e){var t=staff_tb[e],n=l.staves[e];t||(t=staff_tb[e]={}),t.y=0,t.stafflines=n.stafflines,t.staffscale=n.staffscale,t.ann_top=t.ann_bot=0}function h(){var e,t,n,r=l.staves.length;for(e=0;e<r;e++){if(!(l.staves[e].flags&(OPEN_BRACE|OPEN_BRACE2)))continue;n=0,t=e;while(e<r){n|=a[e]?1:2;if(l.staves[e].flags&(CLOSE_BRACE|CLOSE_BRACE2))break;e++}if(n==3)while(t<=e)a[t]=!0,f[t++]=!0}}function p(){var e,t,n,r,i;for(e=0;e<=nstaff;e++){t=staff_tb[e];if(!f[e]){t.botbar=t.topbar=0;continue}r=t.stafflines.length,t.topbar=6*(r-1);for(n=0;n<r-1;n++)if(t.stafflines[n]!=".")break;t.botline=t.botbar=n*6,n>=r-2&&(t.stafflines[n]!="."?(t.botbar-=6,t.topbar+=6):(t.botbar-=12,t.topbar+=12))}}var e,t,n,r,i,s,o,u,a=[],f=[],l=cur_sy;nstaff=s=l.nstaff;for(r=0;r<=s;r++)c(r);for(e=tsfirst;e;e=e.ts_next){if(e.nl)break;e.ts_next||(t=e);switch(e.type){case C.STAVES:h(),l.st_print=new Uint8Array(a),l=e.sy,s=l.nstaff;if(nstaff<s){for(r=nstaff+1;r<=s;r++)c(r);nstaff=s}a=[];continue;case C.BLOCK:blocks.push(e),unlksym(e),t&&(t=e.ts_prev);continue}r=e.st;if(a[r])continue;switch(e.type){case C.CLEF:r>nstaff&&(staff_tb[r].clef=e,unlksym(e));break;case C.BAR:if(!l.staves[r].staffnonote||l.staves[r].staffnonote<=1)break;case C.GRACE:f[r]=a[r]=!0;break;case C.NOTE:case C.REST:case C.SPACE:case C.MREST:l.staves[r].staffnonote>1?f[r]=a[r]=!0:!e.invis&&(l.staves[r].staffnonote!=0||e.type==C.NOTE)&&(f[r]=a[r]=!0)}}tsnext=e,h(),l.st_print=new Uint8Array(a),p();for(r=0;r<nstaff;r++)f[r]||sym_staff_move(r);f[nstaff]||(staff_tb[nstaff].topbar=0),init_music_line(),gene.st_print=new Uint8Array(f);if(tsnext){e=tsnext,delete e.nl,t=e.ts_prev,t.ts_next=null,o=voice_tb.length;for(i=0;i<o;i++){n=voice_tb[i];if(n.sym&&n.sym.time<=tsnext.time){for(e=tsnext.ts_prev;e;e=e.ts_prev)if(e.v==i){n.s_next=e.next,e.next=null,check_bar(e)&&(u=e.wl,self.set_width(e),e.shrink+=e.wl-u);break}if(e)continue}n.s_next=n.sym,n.sym=null}}t.type!=C.BAR&&(e=add_end_bar(t),e.space=set_space(e),e.space<e.shrink&&t.type!=C.KEY&&(e.space=e.shrink))}function set_sym_glue(e){var t,n,r,i,s,o=0,u=0,a=0,f=0,l=0;for(t=tsfirst;t;t=t.ts_next)t.type==C.GRACE&&!i&&(i=t),t.seqst&&(o+=t.shrink,t.space?t.space<t.shrink?(l+=t.shrink,u+=t.shrink):u+=t.space:f+=t.shrink);if(u==0){realwidth=0;return}r=!tsnext||tsnext.type==C.BLOCK||blocks.length;if(o>=e||u==l){o>e&&error(1,t,"Line too much shrunk $1 $2 $3",o.toFixed(2),u.toFixed(2),e.toFixed(2)),a=0;for(t=tsfirst;t;t=t.ts_next)t.seqst&&(a+=t.shrink),t.x=a;spf_last=0}else if(r&&u+f>e*(1-cfmt.stretchlast)||!r&&(u+f>e||cfmt.stretchstaff)){for(var c=4;--c>=0;){s=(e-f-l)/(u-l),u=0,l=0,a=0;for(t=tsfirst;t;t=t.ts_next)t.seqst&&(t.space?t.space*s<=t.shrink?(l+=t.shrink,u+=t.shrink,a+=t.shrink):(u+=t.space,a+=t.space*s):a+=t.shrink),t.x=a;if(Math.abs(a-e)<.1)break}spf_last=s}else{s=(e-f-l)/u,spf_last<s&&(s=spf_last);for(t=tsfirst;t;t=t.ts_next)t.seqst&&(a+=t.space*s<=t.shrink?t.shrink:t.space*s),t.x=a}realwidth=a;for(t=i;t;t=t.ts_next){if(t.type!=C.GRACE)continue;t.gr_shift?a=t.prev.x+t.prev.wr:a=t.x-t.wl;for(n=t.extra;n;n=n.next)n.x+=a}}function set_sym_line(){var e,t,n,r=voice_tb.length;for(n=0;n<r;n++)e=voice_tb[n],t=e.s_next,e.sym=t,t&&(t.prev=null)}function set_posx(){posx=img.lm/cfmt.scale}function gen_init(){var e=tsfirst,t=e.time;for(;e;e=e.ts_next){if(e.time!=t){set_page();return}switch(e.type){case C.NOTE:case C.REST:case C.MREST:set_page();return;default:continue;case C.STAVES:cur_sy=e.sy;break;case C.BLOCK:block_gen(e)}unlksym(e),e.p_v.s_next==e&&(e.p_v.s_next=e.next)}tsfirst=null}function output_music(){var e,t,n,r;gen_init();if(!tsfirst)return;set_global(),voice_tb.length>1&&self.set_stem_dir();for(e=0;e<voice_tb.length;e++)set_beams(voice_tb[e].sym);self.set_stems(),voice_tb.length>1&&(set_rest_offset(),set_overlap()),set_acc_shft(),set_allsymwidth(),n=set_indent(!0),cfmt.singleline?(e=get_ck_width(),t=n+e[0]+e[1]+get_width(tsfirst,null),img.width=t*cfmt.scale+img.lm+img.rm+2):(t=get_lwidth(),cut_tune(t,n)),spf_last=1.2;for(;;){set_piece(),self.set_sym_glue(t-n);if(realwidth!=0){n!=0&&(posx+=n),draw_sym_near(),r=set_staff(),delayed_update(),draw_systems(n),draw_all_sym(),vskip(r),n!=0&&(posx-=n,insert_meter&=-3);while(blocks.length!=0)block_gen(blocks.shift())}tsfirst=tsnext,svg_flush();if(!tsnext)break;gen_init();if(!tsfirst)break;tsfirst.ts_prev=null,set_sym_line(),t=get_lwidth(),n=set_indent()}}function reset_gen(){insert_meter=cfmt.writefields.indexOf("M")>=0?3:2}function set_ref(e){e.fname=parse.fname,e.istart=parse.istart,e.iend=parse.iend}function new_clef(e){var t={type:C.CLEF,clef_line:2,clef_type:"t",v:curvoice.v,p_v:curvoice,time:curvoice.time,dur:0},n=1;set_ref(t);switch(e[0]){case'"':n=e.indexOf('"',1),t.clef_name=e.slice(1,n),n++;break;case"a":if(e[1]=="u"){t.clef_type="a",t.clef_auto=!0,n=4;break}n=4;case"C":t.clef_type="c",t.clef_line=3;break;case"b":n=4;case"F":t.clef_type="b",t.clef_line=4;break;case"n":n=4,t.invis=!0;break;case"t":if(e[1]=="e"){t.clef_type="c",t.clef_line=4;break}n=6;case"G":break;case"p":n=4;case"P":t.clef_type="p",t.clef_line=3,curvoice.key.k_sf=0,curvoice.ckey.k_drum=!0;break;default:syntax(1,"Unknown clef '$1'",e);return}e[n]>="1"&&e[n]<="9"&&(t.clef_line=Number(e[n]),n++);if(e[n+1]!="8")return t;switch(e[n]){case"^":t.clef_oct_transp=!0;case"+":t.clef_octave=7;break;case"_":t.clef_oct_transp=!0;case"-":t.clef_octave=-7}return t}function get_transp(e,t){var n,r,i,s,o=[];if(e[0]=="0")return 0;if("123456789-+".indexOf(e[0])>=0){r=parseInt(e)*3;if(isNaN(r)||r<-108||r>108){syntax(1,"Bad transpose value");return}switch(e.slice(-1)){default:return r;case"#":r++;break;case"b":r+=2}return r>0?r:r-3}if(t=="instr"){i=e.indexOf("/");if(!cfmt.sound){if(i<0)return 0;e=e.replace("/","")}else i<0?e="c"+e:e=e.replace(/.*\//,"c")}i=new scanBuf,i.buffer=e;for(n=0;n<2;n++){s=i.buffer[i.index]?parse_acc_pit(i):null;if(!s){syntax(1,"Bad transpose value");return}s.pit+=124,r=(s.pit/7|0)*12+note_pit[s.pit%7],s.acc&&s.acc!=3&&(r+=s.acc),o[n]=r}r=(o[1]-o[0])*3;if(s)switch(s.acc){default:return r;case 2:case 1:r++;break;case-1:case-2:r+=2}return r>0?r:r-3}function set_linebreak(e){var t,n;for(t=0;t<128;t++)char_tb[t]=="\n"&&(char_tb[t]=nil);e=e.split(/\s+/);for(t=0;t<e.length;t++){n=e[t];switch(n){case"!":case"$":case"*":case";":case"?":case"@":break;case"<none>":continue;case"<EOL>":n="\n";break;default:syntax(1,"Bad value '$1' in %%linebreak - ignored",n);continue}char_tb[n.charCodeAt(0)]="\n"}}function set_user(e){var t,n,r,i=e.match(/(.*?)[= ]*([!"].*[!"])/);if(!i){syntax(1,'Lack of starting ! or " in U: / %%user');return}n=i[1],r=i[2];if(r.slice(-1)!=r[0]){syntax(1,"Lack of ending $1 in U:/%%user",r[0]);return}n[0]=="\\"&&(n[1]=="t"?n=" ":n[1]||(n=" ")),t=n.charCodeAt(0);if(t>=128){syntax(1,errs.not_ascii);return}switch(char_tb[t][0]){case"0":case"d":case"i":case" ":break;case'"':case"!":if(char_tb[t].length>1)break;default:syntax(1,"Bad user character '$1'",n);return}switch(r){case"!beambreak!":r=" ";break;case"!ignore!":r="i";break;case"!nil!":case"!none!":r="d"}char_tb[t]=r}function get_st_lines(e){var t,n;if(!e)return;if(/^[\]\[|.-]+$/.test(e))return e.replace(/\]/g,"[");t=parseInt(e);switch(t){case 0:return"...";case 1:return"..|";case 2:return".||";case 3:return".|||"}if(isNaN(t)||t<0||t>16)return;n="|";while(--t>0)n+="|";return n}function new_block(e){var t={type:C.BLOCK,subtype:e,dur:0};parse.state==2&&goto_tune();var n=curvoice;return curvoice=voice_tb[par_sy.top_voice],sym_link(t),curvoice=n,t}function set_vp(e){var t,n,r,i,s;for(;;){n=e.shift();if(!n)break;if(n[n.length-1]=="="&&e.length==0){syntax(1,errs.bad_val,n);break}switch(n){case"clef=":t=e.shift();break;case"clefpitch=":n=e.shift();if(n){i=ntb.indexOf(n[0]);if(i>=0){switch(n[1]){case"'":i+=7;break;case",":i-=7,n[2]==","&&(i-=7)}s=4-i;break}}syntax(1,errs.bad_val,n);break;case"octave=":case"uscale=":i=parseInt(e.shift()),isNaN(i)?syntax(1,errs.bad_val,n):curvoice[n.slice(0,-1)]=i;break;case"cue=":curvoice.scale=e.shift()=="on"?.7:1;break;case"instrument=":curvoice.transp=get_transp(e.shift(),"instr");break;case"map=":curvoice.map=e.shift();break;case"name=":case"nm=":curvoice.nm=e.shift(),curvoice.nm[0]=='"'&&(curvoice.nm=curvoice.nm.slice(1,-1)),curvoice.new_name=!0;break;case"stem=":case"pos=":n=="pos="?n=e.shift().split(" "):n=["stm",e.shift()],i=posval[n[1]];if(i==undefined){syntax(1,errs.bad_val,n[0]);break}r||(r={}),r[n[0]]=i;break;case"scale=":i=parseFloat(e.shift()),isNaN(i)||i<.6||i>1.5?syntax(1,errs.bad_val,"%%voicescale"):curvoice.scale=i;break;case"score=":if(cfmt.sound)break;n=e.shift(),n.indexOf("/")<0&&(n+="/c"),curvoice.transp=get_transp(n);break;case"shift=":curvoice.shift=get_transp(e.shift());break;case"sound=":case"transpose=":if(!cfmt.sound)break;curvoice.transp=get_transp(e.shift());break;case"subname=":case"sname=":case"snm=":curvoice.snm=e.shift(),curvoice.snm[0]=='"'&&(curvoice.snm=curvoice.snm.slice(1,-1));break;case"stafflines=":i=get_st_lines(e.shift()),i==undefined?syntax(1,"Bad %%stafflines value"):curvoice.st!=undefined?par_sy.staves[curvoice.st].stafflines=i:curvoice.stafflines=i;break;case"staffnonote=":i=parseInt(e.shift()),isNaN(i)?syntax(1,"Bad %%staffnonote value"):curvoice.staffnonote=i;break;case"staffscale=":i=parseFloat(e.shift()),isNaN(i)||i<.3||i>2?syntax(1,"Bad %%staffscale value"):curvoice.staffscale=i;break;default:switch(n.slice(0,4)){case"treb":case"bass":case"alto":case"teno":case"perc":t=n;break;default:"GFC".indexOf(n[0])>=0?t=n:n.slice(-1)=="="&&e.shift()}}}if(r){curvoice.pos=clone(curvoice.pos);for(n in r)r.hasOwnProperty(n)&&(curvoice.pos[n]=r[n])}t&&(t=new_clef(t),t&&(s&&(t.clefpit=s),get_clef(t)))}function set_kv_parm(e){curvoice.init||(curvoice.init=!0,info.V&&(info.V["*"]&&(e=info.V["*"].concat(e)),info.V[curvoice.id]&&(e=info.V[curvoice.id].concat(e)))),e.length!=0&&self.set_vp(e)}function memo_kv_parm(e,t){if(t.length==0)return;info.V||(info.V={}),info.V[e]?Array.prototype.push.apply(info.V[e],t):info.V[e]=t}function new_key(e){var t,n,r,i,s,o=0,u={type:C.KEY,k_delta:0,dur:0};set_ref(u),t=1;switch(e[0]){case"A":u.k_sf=3;break;case"B":u.k_sf=5;break;case"C":u.k_sf=0;break;case"D":u.k_sf=2;break;case"E":u.k_sf=4;break;case"F":u.k_sf=-1;break;case"G":u.k_sf=1;break;case"H":switch(e[1]){case"P":case"p":u.k_bagpipe=e[1],u.k_sf=e[1]=="P"?0:2,t++;break;default:syntax(1,"Unknown bagpipe-like key")}break;case"P":syntax(1,"K:P is deprecated"),u.k_drum=!0,r=!0;break;case"n":e.indexOf("none")==0&&(u.k_sf=0,u.k_none=!0,t=4);default:r=!0}if(!r){switch(e[t]){case"#":u.k_sf+=7,t++;break;case"b":u.k_sf-=7,t++}e=e.slice(t).trim();switch(e.slice(0,3).toLowerCase()){default:if(e[0]!="m"||e[1]!=" "&&e[1]!=" "&&e[1]!="\n"){r=!0;break};case"aeo":case"m":case"min":u.k_sf-=3,o=5;break;case"dor":u.k_sf-=2,o=1;break;case"ion":case"maj":break;case"loc":u.k_sf-=5,o=6;break;case"lyd":u.k_sf+=1,o=3;break;case"mix":u.k_sf-=1,o=4;break;case"phr":u.k_sf-=4,o=2}r||(e=e.replace(/\w+\s*/,"")),e.indexOf("exp ")==0&&(e=e.replace(/\w+\s*/,""),e||syntax(1,"No accidental after 'exp'"),u.k_exp=!0),i=e[0];if(i=="^"||i=="_"||i=="="){u.k_a_acc=[],s=new scanBuf,s.buffer=e;do{var a=parse_acc_pit(s);if(!a)return[u,null];u.k_a_acc.push(a),i=e[s.index];while(i==" ")i=e[++s.index]}while(i=="^"||i=="_"||i=="=");e=e.slice(s.index)}else u.k_exp&&e.indexOf("none")==0&&(u.k_sf=0,e=e.replace(/\w+\s*/,""))}return u.k_delta=cgd2cde[(u.k_sf+7)%7],u.k_mode=o,[u,info_split(e,0)]}function new_meter(e){var t={type:C.METER,dur:0,a_meter:[]},n={},r,i,s=0,o,u=0,a,f,l=e,c;set_ref(t);if(l.indexOf("none")==0)u=4,f=1;else{f=0;while(u<e.length){if(l[u]=="=")break;switch(l[u]){case"C":n.top=l[u++],s||(s=4,o=4);break;case"c":case"o":n.top=l[u++];if(!s){l[-1]=="c"?(s=2,o=4):(s=3,o=4);switch(l[u]){case"|":o/=2;break;case".":s*=3,o*=2}}break;case".":case"|":n.top=l[u++];break;case"(":l[u+1]=="("&&(c=!0,n.top=l[u++],t.a_meter.push(n),n={}),a=u+1;while(a<e.length){if(l[a]==")"||l[a]=="/")break;a++}if(l[a]==")"&&l[a+1]=="/"){u++;continue};case")":c=l[u]=="(",n.top=l[u++],t.a_meter.push(n),n={};continue;default:if(l[u]<="0"||l[u]>"9"){syntax(1,"Bad char '$1' in M:",l[u]);return}o=2,n.top=l[u++];for(;;){while(l[u]>="0"&&l[u]<="9")n.top+=l[u++];if(l[u]==")"){if(l[u+1]!="/")break;u++}if(l[u]=="/"){u++;if(l[u]<="0"||l[u]>"9"){syntax(1,"Bad char '$1' in M:",l[u]);return}n.bot=l[u++];while(l[u]>="0"&&l[u]<="9")n.bot+=l[u++];break}if(l[u]!=" "&&l[u]!="+")break;if(u>=e.length||l[u+1]=="(")break;n.top+=l[u++]}s=parseInt(n.top)}c||(n.bot&&(o=parseInt(n.bot)),f+=s*C.BLEN/o),t.a_meter.push(n),n={};while(l[u]==" ")u++;l[u]=="+"&&(n.top=l[u++],t.a_meter.push(n),n={})}}if(l[u]=="="){r=l.substring(++u).match(/^(\d+)\/(\d+)$/);if(!r){syntax(1,"Bad duration '$1' in M:",l.substring(u));return}f=C.BLEN*r[1]/r[2]}t.wmeasure=f;if(parse.state!=3){info.M=e,glovar.meter=t;if(parse.state>=1){glovar.ulen||(f<=1||f>=C.BLEN*3/4?glovar.ulen=C.BLEN/8:glovar.ulen=C.BLEN/16);for(i=0;i<voice_tb.length;i++)voice_tb[i].meter=t,voice_tb[i].wmeasure=f}}else curvoice.wmeasure=f,is_voice_sig()?(curvoice.meter=t,reset_gen()):sym_link(t)}function new_tempo(e){var t=0,n,r,i,s,o={type:C.TEMPO,dur:0};set_ref(o),cfmt.writefields.indexOf("Q")<0&&(o.del=!0);if(e[0]=='"'){t=e.indexOf('"',1);if(t<0){syntax(1,"Unterminated string in Q:");return}o.tempo_str1=e.slice(1,t),t++;while(e[t]==" ")t++}s=new scanBuf,s.buffer=e,s.index=t;for(;;){r=e[s.index];if(r==undefined||r<="0"||r>"9")break;i=parse_dur(s),o.tempo_notes||(o.tempo_notes=[]),o.tempo_notes.push(C.BLEN*i[0]/i[1]);for(;;){r=e[s.index];if(r!=" ")break;s.index++}}if(r=="="){r=e[++s.index];while(r==" ")r=e[++s.index];t=s.index,r=="c"&&e[t+1]=="a"&&e[t+2]=="."&&e[t+3]==" "&&(o.tempo_ca="ca. ",s.index+=4),e[s.index+1]!="/"?o.tempo=s.get_int():(i=parse_dur(s),o.new_beat=C.BLEN*i[0]/i[1]),r=e[s.index];while(r==" ")r=e[++s.index]}if(r=='"'){s.index++,t=e.indexOf('"',s.index+1);if(t<0){syntax(1,"Unterminated string in Q:");return}o.tempo_str2=e.slice(s.index,t)}if(parse.state!=3){if(parse.state==1){info.Q=e,glovar.tempo=o;return}goto_tune()}curvoice.v==par_sy.top_voice&&(sym_link(o),glovar.tempo&&curvoice.time==0&&(glovar.tempo.del=!0))}function do_info(e,t){var n,r,i,s,o;switch(e){case"I":self.do_pscom(t);break;case"L":parse.state==2&&goto_tune(),s=t.match(/^1\/(\d+)(=(\d+)\/(\d+))?$/);if(s){r=Number(s[1]);if(!r||(r&r-1)!=0)break;r=C.BLEN/r;if(s[2]){i=Number(s[4]);if(!i||(i&i-1)!=0){i=0;break}i=Number(s[3])/i*C.BLEN}else i=r}else t=="auto"&&(r=i=-1);if(!i){syntax(1,"Bad L: value");break}parse.state<2?glovar.ulen=r:(curvoice.ulen=r,curvoice.dur_fact=i/r);break;case"M":new_meter(t);break;case"U":set_user(t);break;case"P":if(parse.state==0)break;if(parse.state==1){info.P=t;break}parse.state==2&&goto_tune();if(cfmt.writefields.indexOf(e)<0)break;n={type:C.PART,text:t,dur:0};var u=voice_tb[par_sy.top_voice];if(curvoice.v!=u.v){if(curvoice.time!=u.time)break;if(u.last_sym&&u.last_sym.type==C.PART)break;var a=curvoice;curvoice=u,sym_link(n),curvoice=a}else sym_link(n);break;case"Q":if(parse.state==0)break;new_tempo(t);break;case"V":get_voice(t);break;case"K":if(parse.state==0)break;get_key(t);break;case"N":case"R":info[e]?info[e]+="\n"+t:info[e]=t;break;case"r":if(!user.keep_remark||parse.state!=3)break;n={type:C.REMARK,text:t,dur:0},sym_link(n);break;default:syntax(0,"'$1:' line ignored",e)}}function adjust_dur(e){var t,n,r,i,s;t=curvoice.last_sym;if(!t)return;if(t.type==C.MREST||t.type==C.BAR)return;while(t.type!=C.BAR&&t.prev)t=t.prev;n=t.time,r=curvoice.time-n;if(n==0){while(t&&!t.dur)t=t.next;t&&t.type==C.REST&&t.invis&&(n+=t.dur*curvoice.wmeasure/r,t.prev?t.prev.next=t.next:curvoice.sym=t.next,t.next&&(t.next.prev=t.prev),t=t.next)}if(curvoice.wmeasure==r)return;for(;t;t=t.next){t.time=n;if(!t.dur||t.grace)continue;t.dur=t.dur*curvoice.wmeasure/r,t.dur_orig=t.dur_orig*curvoice.wmeasure/r,n+=t.dur;if(t.type!=C.NOTE&&t.type!=C.REST)continue;for(i=0;i<=t.nhd;i++)t.notes[i].dur=t.notes[i].dur*curvoice.wmeasure/r;s=identify_note(t,t.dur_orig),t.head=s[0],t.dots=s[1],t.nflags=s[2],t.nflags<=-2?t.stemless=!0:delete t.stemless}curvoice.time=e.time=n}function new_bar(){var e,t,n,r=parse.line,i={type:C.BAR,fname:parse.fname,istart:parse.bol+r.index,dur:0,multi:0};vover&&vover.bar&&get_vover("|"),glovar.new_nbar&&(i.bar_num=glovar.new_nbar,glovar.new_nbar=0),n=r.char();for(;;){t=r.next_char();switch(t){case"|":case"[":case"]":case":":n+=t;continue}break}n[0]==":"&&(n.length==1?(n="|",i.bar_dotted=!0):i.rbstop=2),a_gch&&self.gch_build(i),a_dcn&&(deco_cnv(a_dcn,i),a_dcn=null);switch(n.slice(-1)){case"[":if(/[0-9" ]/.test(t))break;n=n.slice(0,-1),r.index--,t="[";break;case":":i.rbstop=2}if(t>"0"&&t<="9"){n.slice(-1)=="["&&(n=n.slice(0,-1)),i.text=t;for(;;){t=r.next_char();if("0123456789,.-".indexOf(t)<0)break;i.text+=t}i.rbstop=2,i.rbstart=2}else if(t=='"'&&n.slice(-1)=="["){n=n.slice(0,-1),i.text="";for(;;){t=r.next_char();if(!t){syntax(1,"No end of repeat string");return}if(t=='"'){r.index++;break}t=="\\"&&(i.text+=t,t=r.next_char()),i.text+=t}i.text=cnv_escape(i.text),i.rbstop=2,i.rbstart=2}n[0]=="]"&&(i.rbstop=2,n.length!=1?n=n.slice(1):i.invis=!0),i.iend=parse.bol+r.index,i.rbstart&&curvoice.norepbra&&!curvoice.second&&(i.norepbra=!0),curvoice.ulen<0&&adjust_dur(i),e=curvoice.last_sym;if(e&&e.type==C.SPACE)e.time--;else if(e&&e.type==C.BAR){if(n=="["&&!e.text&&(curvoice.st==0||par_sy.staves[curvoice.st-1].flags&STOP_BAR||i.norepbra)){i.text&&(e.text=i.text),i.a_gch&&(e.a_gch=i.a_gch),i.norepbra&&(e.norepbra=i.norepbra),i.rbstart&&(e.rbstart=i.rbstart),i.rbstop&&(e.rbstop=i.rbstop);return}if(n=="|:"){if(e.bar_type==":|"){e.bar_type="::",e.rbstop=2;return}if(e.bar_type=="||"){e.bar_type="||:",e.rbstop=2;return}}}switch(n){case"[":i.rbstop=2;case"[]":case"[|]":i.invis=!0,n="[]";break;case":|:":case":||:":n="::";break;case"||":if(!cfmt.rbdbstop)break;case"[|":case"|]":i.rbstop=2}i.bar_type=n,curvoice.lyric_restart||(curvoice.lyric_restart=i),curvoice.sym_restart||(curvoice.sym_restart=i),e&&e.type==C.KEY&&(!e.prev||e.prev.type!=C.BAR)?(curvoice.last_sym=e.prev,e.prev||(curvoice.sym=e.prev),sym_link(i),i.next=e,e.prev=i,curvoice.last_sym=e):sym_link(i),i.st=curvoice.st,i.rbstart&&!curvoice.norepbra&&curvoice.st>0&&!(par_sy.staves[curvoice.st-1].flags&STOP_BAR)&&(e={type:C.BAR,fname:i.fname,istart:i.istart,iend:i.iend,bar_type:"[",multi:0,invis:!0,text:i.text,rbstart:2},sym_link(e),e.st=curvoice.st,delete i.text,i.rbstart=0)}function parse_staves(e){var t,n,r=[],i=!1,s=0,o=0,u=0,a=0,f=0,l=0;while(l<e.length){switch(e[l]){case" ":case" ":break;case"[":if(a||o+u>=2){syntax(1,errs.misplaced,"["),i=!0;break}s|=o+u==0?OPEN_BRACKET:OPEN_BRACKET2,u++,f<<=8,f|=OPEN_BRACKET;break;case"{":if(a||o||u>=2){syntax(1,errs.misplaced,"{"),i=!0;break}s|=u?OPEN_BRACE2:OPEN_BRACE,o++,f<<=8,f|=OPEN_BRACE;break;case"(":if(a){syntax(1,errs.misplaced,"("),i=!0;break}s|=OPEN_PARENTH,a++,f<<=8,f|=OPEN_PARENTH;break;case"*":o&&!a&&!(s&(OPEN_BRACE|OPEN_BRACE2))&&(s|=FL_VOICE);break;case"+":s|=MASTER_VOICE;break;default:if(!/\w/.test(e[l])){syntax(1,"Bad voice ID in %%staves"),i=!0;break}n="";while(l<e.length){if(" ()[]{}|*".indexOf(e[l])>=0)break;n+=e[l++]}for(;l<e.length;l++){switch(e[l]){case" ":case" ":continue;case"]":if(!(f&OPEN_BRACKET)){syntax(1,errs.misplaced,"]"),i=!0;break}u--,s|=o+u==0?CLOSE_BRACKET:CLOSE_BRACKET2,f>>=8;continue;case"}":if(!(f&OPEN_BRACE)){syntax(1,errs.misplaced,"}"),i=!0;break}o--,s|=u?CLOSE_BRACE2:CLOSE_BRACE,s&=~FL_VOICE,f>>=8;continue;case")":if(!(f&OPEN_PARENTH)){syntax(1,errs.misplaced,")"),i=!0;break}a--,s|=CLOSE_PARENTH,f>>=8;continue;case"|":s|=STOP_BAR;continue}break}r.push([n,s]),s=0;continue}l++}f!=0&&(syntax(1,"'}', ')' or ']' missing in %%staves"),i=!0);if(i||r.length==0)return;return r}function info_split(e){if(!e)return[];var t=e.match(/(".+?"|.+?)(\s+|=|$)/g);if(!t)return syntax(1,"Unterminated string"),[];for(var n=0;n<t.length;n++)t[n]=t[n].trim();return t}function identify_note(e,t){var n,r,i,r=0,s=t;s%12!=0&&syntax(1,"Invalid note duration $1",s),s/=12,s==0&&syntax(1,"Note too short");for(i=5;s!=0;s>>=1,i--)if(s&1)break;s>>=1;switch(s){case 0:break;case 1:r=1;break;case 3:r=2;break;case 7:r=3;break;default:syntax(1,"Invalid note duration $1",t),i+=(11-s)/4|0,r=4}i-=r;if(i>=0)n=C.FULL;else switch(i){default:syntax(1,"Note too long"),i=-4;case-4:n=C.SQUARE;break;case-3:n=cfmt.squarebreve?C.SQUARE:C.OVALBARS;break;case-2:n=C.OVAL;break;case-1:n=C.EMPTY}return[n,r,i]}function parse_dur(e){var t,n,r;return reg_dur.lastIndex=e.index,t=reg_dur.exec(e.buffer),t[0]?(n=t[1]||1,r=t[3]||1,t[3]||(r*=1<<t[2].length),e.index=reg_dur.lastIndex,[n,r]):[1,1]}function parse_acc_pit(e){var t,n,r,i,s,o,u=e.char();switch(u){case"^":u=e.next_char(),u=="^"?(n=2,u=e.next_char()):n=1;break;case"=":n=3,u=e.next_char();break;case"_":u=e.next_char(),u=="_"?(n=-2,u=e.next_char()):n=-1}if(n&&n!=3&&u>="1"&&u<="9"||u=="/")o=parse_dur(e),r=o[0],i=o[1],i==1?i=curvoice?curvoice.uscale:1:i*=2,u=e.char();s=ntb.indexOf(u)+16,u=e.next_char();if(s<16){syntax(1,"'$1' is not a note",e.buffer[e.index-1]);return}while(u=="'")s+=7,u=e.next_char();while(u==",")s-=7,u=e.next_char();return t={pit:s,shhd:0,shac:0,ti1:0},n&&(t.acc=n,r&&(t.micro_n=r,t.micro_d=i)),t}function note2abc(e){var t,n="abcdefg"[(e.pit+77)%7];e.acc&&(n=["__","_","","^","^^","="][e.acc+2]+n);for(t=e.pit;t>=30;t-=7)n+="'";for(t=e.pit;t<23;t+=7)n+=",";return n}function set_map(e){var t=maps[curvoice.map],n=note2abc(e);if(!t[n]){n="octave,"+n.replace(/[',]/g,"");if(!t[n]){n="key,"+"abcdefg"[(e.pit+77-curvoice.ckey.k_delta)%7];if(!t[n]){n="all";if(!t[n])return}}}e.map=t[n],e.map[1]&&(e.pit=e.map[1].pit,e.acc=e.map[1].acc)}function parse_basic_note(e,t){var n,r=parse_acc_pit(e);if(!r)return;return e.char()=="0"&&(parse.stemless=!0,e.index++),n=parse_dur(e),r.dur=t*n[0]/n[1],r}function parse_vpos(){var e,t=parse.line,n=0;t.buffer[t.index-1]=="."&&!a_dcn&&(n=C.SL_DOTTED);switch(t.next_char()){case"'":return t.index++,n+C.SL_ABOVE;case",":return t.index++,n+C.SL_BELOW}return n+C.SL_AUTO}function note_transp(e){var t,n,r,i,s,o,u,a,f,l,c=e.nhd,h=curvoice.okey.k_sf,p=curvoice.ckey.k_sf-h,d=cgd2cde[(p+28)%7],v=curvoice.vtransp;v<0&&d!=0&&(d-=7),d+=(v/3/12|0)*7;for(t=0;t<=c;t++){l=e.notes[t],r=l.pit,l.pit+=d,u=cde2fcg[(r+5+112)%7],s=l.acc;if(!s)if(!curvoice.okey.a_acc)h>0?u<h-1&&(s=1):h<0&&u>=h+6&&(s=-1);else for(n=0;n<curvoice.okey.a_acc.length;n++){o=curvoice.okey.a_acc[n];if((r+16*7-o.pit)%7==0){s=o.acc;break}}a=u+p,s&&s!=3&&(a+=s*7),u=(((a+1+21)/7|0)+2-3+160)%5,s=acc2[u];if(!l.acc)if(curvoice.ckey.k_none){if(s==3||acc_same_pitch(l.pit))continue}else{if(!curvoice.ckey.a_acc)continue;f=cgd2cde[(a+112)%7];for(n=0;n<curvoice.ckey.a_acc.length;n++)if((f+16*7-curvoice.ckey.a_acc[n].pits)%7==0)break;if(n<curvoice.ckey.a_acc.length)continue}u=l.acc,i=l.micro_d;if(i&&u!=s){r=l.micro_n;switch(s){case 3:r>i/2?(r-=i/2,l.micro_n=r,s=u):s=-u;break;case 2:r>i/2?(l.pit+=1,r-=i/2):r+=i/2,s=u,l.micro_n=r;break;case-2:r>=i/2?(l.pit-=1,r-=i/2):r+=i/2,s=u,l.micro_n=r}}l.acc=s}}function sort_pitch(e){e.notes=e.notes.sort(function(e,t){return e.pit-t.pit})}function new_note(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v=0,m=parse.line,g=a_dcn;a_dcn=null,parse.stemless=!1,r={type:C.NOTE,fname:parse.fname,stem:0,multi:0,nhd:0,xmx:0},r.istart=parse.bol+m.index,curvoice.color&&(r.color=curvoice.color),e?r.grace=!0:(a_gch&&self.gch_build(r),parse.repeat_n&&(r.repeat_n=parse.repeat_n,r.repeat_k=parse.repeat_k,parse.repeat_n=0)),s=m.char();switch(s){case"X":r.invis=!0;case"Z":r.type=C.MREST,s=m.next_char(),r.nmes=s>"0"&&s<="9"?m.get_int():1,r.dur=curvoice.wmeasure*r.nmes;if(curvoice.second){curvoice.time+=r.dur;return}r.nmes==1&&(r.type=C.REST,r.dur_orig=r.dur,r.notes=[{pit:18,dur:r.dur}]);break;case"y":r.type=C.SPACE,r.invis=!0,r.dur=0,s=m.next_char(),s>="0"&&s<="9"?r.width=m.get_int():r.width=10;break;case"x":r.invis=!0;case"z":r.type=C.REST,m.index++,c=parse_dur(m),r.dur_orig=(curvoice.ulen<0?15120:curvoice.ulen)*c[0]/c[1],r.dur=r.dur_orig*curvoice.dur_fact,r.notes=[{pit:18,dur:r.dur_orig}];break;case"[":i=!0,s=m.next_char();default:curvoice.uscale&&(r.uscale=curvoice.uscale),r.notes=[];for(;;){if(i)for(;;){if(!s)break;a=s.charCodeAt(0);if(a>=128){syntax(1,errs.not_ascii);return}u=char_tb[a];switch(u[0]){case"(":v<<=4,v+=parse_vpos(),s=m.char();continue;case"!":a_dcn||(a_dcn=[]);if(u.length>1)a_dcn.push(u.slice(1,-1));else{o="";for(;;){s=m.next_char();if(!s){syntax(1,"No end of decoration");return}if(s=="!")break;o+=s}a_dcn.push(o)}s=m.next_char();continue}break}n=parse_basic_note(m,r.grace?C.BLEN/4:curvoice.ulen<0?15120:curvoice.ulen);if(!n)return;curvoice.octave&&(n.pit+=curvoice.octave*7),curvoice.ottava&&(n.pit+=curvoice.ottava),v&&(n.sl1=v,r.sl1?r.sl1++:r.sl1=1,v=0),a_dcn&&(n.a_dcn=a_dcn,a_dcn=null),r.notes.push(n);if(!i)break;s=m.char();for(;;){switch(s){case")":n.sl2?n.sl2++:n.sl2=1,r.sl2?r.sl2++:r.sl2=1,s=m.next_char();continue;case"-":n.ti1=parse_vpos(),r.ti1=!0,s=m.char();continue;case".":s=m.next_char();if(s!="-"){syntax(1,"Misplaced dot");break}continue}break}if(s=="]"){m.index++,c=parse_dur(m),r.nhd=r.notes.length-1;for(a=0;a<=r.nhd;a++)n=r.notes[a],n.dur=n.dur*c[0]/c[1];break}}r.dur_orig=r.notes[0].dur,r.dur=r.notes[0].dur*curvoice.dur_fact}if(r.grace&&r.type!=C.NOTE){syntax(1,"Not a note in grace note sequence");return}if(r.notes){if(!r.grace){switch(curvoice.pos.stm){case C.SL_ABOVE:r.stem=1;break;case C.SL_BELOW:r.stem=-1;break;case C.SL_HIDDEN:r.stemless=!0}r.dur*=t,p=curvoice.brk_rhythm;if(p){curvoice.brk_rhythm=0,l=curvoice.last_note;if(p>0){f=p*2-1,r.dur=r.dur*f/p,r.dur_orig=r.dur_orig*f/p;for(a=0;a<=r.nhd;a++)r.notes[a].dur=r.notes[a].dur*f/p;l.dur/=p,l.dur_orig/=p;for(a=0;a<=l.nhd;a++)l.notes[a].dur/=p}else{p=-p,f=p*2-1,r.dur/=p,r.dur_orig/=p;for(a=0;a<=r.nhd;a++)r.notes[a].dur/=p;l.dur=l.dur*f/p,l.dur_orig=l.dur_orig*f/p;for(a=0;a<=l.nhd;a++)l.notes[a].dur=l.notes[a].dur*f/p}curvoice.time=l.time+l.dur,h=identify_note(l,l.dur_orig),l.head=h[0],l.dots=h[1],l.nflags=h[2],l.nflags<=-2?l.stemless=!0:delete l.stemless;for(l=l.next;l;l=l.next)l.time=curvoice.time}}else{var y=curvoice.ckey.k_bagpipe?8:4;for(a=0;a<=r.nhd;a++)r.notes[a].dur/=y;r.dur/=y,r.dur_orig/=y,e.stem&&(r.stem=e.stem)}r.type==C.NOTE?(h=identify_note(r,r.dur_orig),r.head=h[0],r.dots=h[1],r.nflags=h[2],r.nflags<=-2&&(r.stemless=!0)):(d=r.dur_orig,d==curvoice.wmeasure&&(d<C.BLEN*2?d=C.BLEN:d<C.BLEN*4?d=C.BLEN*2:d=C.BLEN*4),h=identify_note(r,d),r.head=h[0],r.dots=h[1],r.nflags=h[2]),curvoice.last_note=r}sym_link(r);if(r.type==C.NOTE){curvoice.vtransp&&note_transp(r);if(curvoice.map&&maps[curvoice.map])for(a=0;a<=r.nhd;a++)set_map(r.notes[a])}return cfmt.shiftunison&&(r.shiftunison=cfmt.shiftunison),e||(curvoice.lyric_restart||(curvoice.lyric_restart=r),curvoice.sym_restart||(curvoice.sym_restart=r)),g&&deco_cnv(g,r,r.prev),parse.stemless&&(r.stemless=!0),r.iend=parse.bol+m.index,r}function parse_music_line(){function h(e){var t,n,r;for(t=1,n=c.index+1;t<e.length;t++,n++){if(e[t]==c.buffer[n])continue;if(e[t]!="n")return;r=ntb.indexOf(c.buffer[n]);if(r<0)return;while(c.buffer[n+1]=="'")r+=7,n++;while(c.buffer[n+1]==",")r-=7,n++}return c.index=n,r}function p(e,t){var n,r,s="",o=e.length;for(i=0;i<o;i++){n=e[i];if(n>="h"&&n<="z"){r=t+n.charCodeAt(0)-"n".charCodeAt(0),n="";while(r<0)r+=7,n+=",";while(r>14)r-=7,n+="'";s+=ntb[r]+n}else s+=n}return s}function d(e,t){var n,r=c,i=parse.istart;parse.line=c=new scanBuf,parse.istart+=r.index,c.buffer=t?p(e,t):e,v(!0),parse.line=c=r,parse.istart=i}function v(i){var s,p,v,m,g,y,b,w,E;for(;;){s=c.char();if(!s)break;if(s==".")switch(c.buffer[c.index+1]){case"(":case"-":case"|":s=c.next_char()}p=s.charCodeAt(0);if(p>=128){syntax(1,errs.not_ascii),c.index++;break}if(!i&&maci[p]){w=0;for(m in mac){if(!mac.hasOwnProperty(m)||m[0]!=s)continue;if(m.indexOf("n")<0){if(c.buffer.indexOf(m,c.index)!=c.index)continue;c.index+=m.length}else{w=h(m);if(!w)continue}d(mac[m],w),w=1;break}if(w)continue}v=char_tb[p];switch(v[0]){case" ":g=curvoice.last_note,g&&(g.beam_end=!0,e&&(e.gr_shift=!0));break;case"\n":if(cfmt.barsperstaff)break;par_sy.voices[curvoice.v].range==0&&curvoice.last_sym&&(curvoice.last_sym.eoln=!0);break;case"&":if(e){syntax(1,errs.bad_char,s);break}s=c.next_char();if(s==")"){get_vover(")");break}get_vover("&");continue;case"(":s=c.next_char();if(s>"0"&&s<="9"){var S=c.get_int(),x=qplet_tb[S],T=S,s=c.char();if(s==":"){s=c.next_char(),s>"0"&&s<="9"&&(x=c.get_int(),s=c.char());if(s==":"){s=c.next_char();if(!(s>"0"&&s<="9")){syntax(1,"Invalid 'r' in tuplet");continue}T=c.get_int(),s=c.char()}}if(x==0||x==undefined)x=curvoice.wmeasure%9==0?3:2;u=o[++a],u||(o[a]=u={}),u.p=S,u.q=x,u.r=T,u.f=cfmt.tuplets,u.fact=f*x/S,f=u.fact;continue}if(s=="&"){if(e){syntax(1,errs.bad_char,s);break}get_vover("(");break}l<<=4,c.index--,l+=parse_vpos();continue;case")":if(curvoice.ignore)break;g=curvoice.last_sym;if(g)switch(g.type){case C.NOTE:case C.REST:case C.SPACE:break;default:g=null}if(!g){syntax(1,errs.bad_char,s);break}g.slur_end?g.slur_end++:g.slur_end=1;break;case"!":a_dcn||(a_dcn=[]);if(v.length>1)y=v.slice(1,-1);else{y="",b=c.index;for(;;){s=c.next_char();if(!s)break;if(s=="!")break;y+=s}if(!s){c.index=b,syntax(1,"No end of decoration");break}}ottava[y]&&set_ottava(y),a_dcn.push(y);break;case'"':parse_gchord(v);break;case"-":var N=0;if(!curvoice.last_note||curvoice.last_note.type!=C.NOTE){syntax(1,"No note before '-'");break}N=parse_vpos(),g=curvoice.last_note;for(b=0;b<=g.nhd;b++)g.notes[b].ti1?g.nhd==0&&syntax(1,"Too many ties"):g.notes[b].ti1=N;g.ti1=!0,e&&(e.ti1=!0);continue;case"[":var k=c.buffer[c.index+1];if('|[]: "'.indexOf(k)>=0||k>="1"&&k<="9"){if(e){syntax(1,errs.bar_grace);break}new_bar();continue}if(c.buffer[c.index+2]==":"){b=c.buffer.indexOf("]",c.index+1);if(b<0){syntax(1,"Lack of ']'");break}E=c.buffer.slice(c.index+3,b).trim(),parse.istart=parse.bol+c.index,parse.iend=parse.bol+ ++b,c.index=0,do_info(k,E),c.index=b;continue};case"n":g=self.new_note(e,f);if(!g)continue;g.type==C.NOTE&&l&&(g.slur_start=l,l=0);if(e){a>=0&&(g.in_tuplet=!0);continue}a>=0&&g.notes&&(g.in_tuplet=!0,a>0?(o[0].p&&(g.tp0=o[0].p,g.tq0=o[0].q,g.tf=o[0].f,o[0].p=0),o[0].r--,u.p&&(g.tp1=u.p,g.tq1=u.q,g.tf=u.f,u.p=0)):u.p&&(g.tp0=u.p,g.tq0=u.q,g.tf=u.f,u.p=0),u.r--,u.r==0&&(a--==0?(g.tp0?g.tp0=!1:g.te0=!0,f=1,curvoice.time=Math.round(curvoice.time),g.dur=curvoice.time-g.time):(g.tp1?g.tp1=!1:g.te1=!0,u=o[0],u.r==0?(a--,g.te0=!0,f=1,curvoice.time=Math.round(curvoice.time),g.dur=curvoice.time-g.time):f=u.fact)));continue;case"<":if(!curvoice.last_note){syntax(1,"No note before '<'");break}if(e){syntax(1,"Cannot have a broken rhythm in grace notes");break}w=s=="<"?1:-1;while(s=="<"||s==">")w*=2,s=c.next_char();curvoice.brk_rhythm=w;continue;case"i":break;case"{":if(e){syntax(1,"'{' in grace note");break}t=curvoice.last_note,curvoice.last_note=null,n=a_dcn,a_dcn=undefined,e={type:C.GRACE,fname:parse.fname,istart:parse.bol+c.index,dur:0,multi:0};switch(curvoice.pos.gst){case C.SL_ABOVE:e.stem=1;break;case C.SL_BELOW:e.stem=-1;break;case C.SL_HIDDEN:e.stem=2}sym_link(e),s=c.next_char();if(s=="/"){e.sappo=!0;break}continue;case"|":if(e){syntax(1,errs.bar_grace);break}s=c.buffer[c.index-1],new_bar(),s=="."&&(curvoice.last_sym.bar_dotted=!0);continue;case"}":g=curvoice.last_note;if(!e||!g){syntax(1,errs.bad_char,s);break}a_dcn&&syntax(1,"Decoration ignored"),g.gr_end=!0,e.extra=e.next,e.extra.prev=null,e.next=null,curvoice.last_sym=e,e=null;if(!g.prev&&!curvoice.ckey.k_bagpipe){for(b=0;b<=g.nhd;b++)g.notes[b].dur*=2;g.dur*=2,g.dur_orig*=2;var L=identify_note(g,g.dur_orig);g.head=L[0],g.dots=L[1],g.nflags=L[2]}curvoice.last_note=t,a_dcn=n;break;case"\\":s=c.buffer[c.index+1];if(!s){r=!0;break};default:syntax(1,errs.bad_char,s)}c.index++}}var e,t,n,r,s,o=[],u,a=-1,f=1,l=0,c=parse.line;if(parse.state!=3){if(parse.state!=2)return;goto_tune()}v();if(a>=0){syntax(1,"No end of tuplet");for(s=curvoice.last_note;s;s=s.prev){s.tp1&&(s.tp1=0);if(s.tp0){s.tp0=0;break}}}e&&(syntax(1,"No end of grace note sequence"),curvoice.last_sym=e.prev,curvoice.last_note=t,e.prev&&(e.prev.next=null)),cfmt.breakoneoln&&curvoice.last_note&&(curvoice.last_note.beam_end=!0);if(r||cfmt.barsperstaff)return;char_tb["\n".charCodeAt(0)]=="\n"&&par_sy.voices[curvoice.v].range==0&&curvoice.last_sym&&(curvoice.last_sym.eoln=!0)}function cwid(e){var t=e.charCodeAt(0);if(t>=128){if(t>=768&&t<880)return 0;t=97}return cw_tb[t]}function strwh(e){var t=gene.curfont,n=t.swfac,r=t.size,i=0,s,o,u,a=e.length;for(s=0;s<a;s++){u=e[s];switch(u){case"$":u=e[s+1];if(u=="0")t=gene.deffont;else{if(!(u>="1"&&u<="9")){u="$";break}t=get_font("u"+u)}s++,n=t.swfac,t.size>r&&(r=t.size);continue;case"&":o=e.indexOf(";",s),o>0&&o-s<10&&(s=o,u="a")}i+=cwid(u)*n}return gene.curfont=t,[i,r]}function set_font(e){typeof e=="string"&&(e=get_font(e)),gene.curfont=gene.deffont=e}function out_str(e){var t,n=gene.curfont,r=n;output+=e.replace(/<|>|&.*?;|&| |\$./g,function(e){switch(e[0]){case"<":return"&lt;";case">":return"&gt;";case"&":if(e=="&")return"&amp;";return e;case" ":return"  ";case"$":if(e[1]=="0")t=gene.deffont,use_font(t);else{if(!(e[1]>="1"&&e[1]<="9"))return e;t=get_font("u"+e[1])}e="";if(t==r)return e;r!=n&&(e="</tspan>"),r=t;if(r==n)return e;return e+'<tspan\n class="'+font_class(t)+'">'}}),r!=n&&(output+="</tspan>",gene.curfont=r)}function xy_str(e,t,n,r,i){var s=strwh(n)[1];t+=s*.2,output+='<text class="'+font_class(gene.curfont)+'" x="',out_sxsy(e,'" y="',t);switch(r){case"c":output+='" text-anchor="middle">';break;case"j":output+='" textLength="'+i.toFixed(2)+'">';break;case"r":output+='" text-anchor="end">';break;default:output+='">'}out_str(n),output+="</text>\n"}function xy_str_b(e,t,n){var r=strwh(n);output+='<rect class="stroke" x="',out_sxsy(e-2,'" y="',t+r[1]+1),output+='" width="'+(r[0]+4).toFixed(2)+'" height="'+(r[1]+3).toFixed(2)+'"/>\n',xy_str(e,t,n)}function trim_title(e,t){var n;if(cfmt.titletrim){n=e.lastIndexOf(", ");if(n<0||e[n+2]<"A"||e[n+2]>"Z")n=0;else if(cfmt.titletrim==1){if(n<e.length-7||e.indexOf(" ",n+3)>=0)n=0}else n<e.length-cfmt.titletrim-2&&(n=0)}return!t&&cfmt.writefields.indexOf("X")>=0&&(e=info.X+". "+e),n&&(e=e.slice(n+2).trim()+" "+e.slice(0,n)),cfmt.titlecaps?e.toUpperCase():e}function get_lwidth(){return(img.width-img.lm-img.rm-2)/cfmt.scale}function write_title(e,t){var n,r;if(!e)return;set_page(),e=trim_title(e,t),t?(set_font("subtitle"),r=cfmt.subtitlespace):(set_font("title"),r=cfmt.titlespace),vskip(strwh(e)[1]+r),cfmt.titleleft?xy_str(0,0,e):xy_str(get_lwidth()/2,0,e,"c")}function put_inf2r(e,t,n,r,i){if(!n){if(!r)return;n=r,r=null}r?xy_str(e,t,n+" ("+r+")",i):xy_str(e,t,n,i)}function str_skip(e){vskip(strwh(e)[1]*cfmt.lineskipfac)}function write_text(e,t){if(t=="s")return;set_font("text"),set_page();var n=get_lwidth(),r=gene.curfont.size,i=r*cfmt.lineskipfac,s=r*cfmt.parskipfac,o=block.started?function(){}:blk_out,u=block.started?svg_flush:blk_flush,a,f,l,c,h,p,d,v;o();switch(t){default:switch(t){case"c":l=n/2;break;case"r":l=n;break;default:l=0}f=0;for(;;){a=e.indexOf("\n",f);if(a<0){v=e.slice(f),str_skip(v),xy_str(l,0,v,t);break}if(a==f){vskip(s),u(),use_font(gene.curfont);while(e[a+1]=="\n")vskip(i),a++;if(a==e.length)break;o()}else v=e.slice(f,a),str_skip(v),xy_str(l,0,v,t);f=a+1}vskip(s),u();break;case"f":case"j":f=0;for(;;){a=e.indexOf("\n\n",f),a<0?c=e.slice(f):c=e.slice(f,a),c=c.split(/\s+/),h=p=0;for(f=0;f<c.length;f++)d=strwh(c[f]+" ")[0],h+=d,h>=n&&(v=c.slice(p,f).join(" "),str_skip(v),xy_str(0,0,v,t,n),p=f,h=d);h!=0&&(v=c.slice(p).join(" "),str_skip(v),xy_str(0,0,v)),vskip(s),u();if(a<0)break;while(e[a+2]=="\n")vskip(i),a++;if(a==e.length)break;o(),use_font(gene.curfont),f=a+2}}}function put_words(e){function f(e,t,n){var r=0,i,s;e[r]=="$"&&e[r+1]>="0"&&e[r+1]<="9"&&(r+=2),s=0,i=r;if(e[r]>="0"&&e[r]<="9"||e[r+1]=="."){while(r<e.length){r++;if(e[r]==" "||e[r-1]==":"||e[r-1]==".")break}s=r;while(e[r]==" ")r++}return s!=0&&xy_str(t,0,e.slice(i,s),"r"),r<e.length&&xy_str(t+5,0,e.slice(r),"l"),r>=e.length&&s==0}var t,n,r,i,s,o,u,a;blk_out(),set_font("words");var l=get_lwidth()/2,c=(l-45)/(cwid("a")*gene.curfont.swfac);i=0,e=e.split("\n"),s=e.length;for(n=0;n<s;n++){t=e[n];if(t.length>c){i=0;break}t?a=!0:a&&(i++,a=!1)}if(i>0){n=i=(i+1)/2|0,a=!1;for(u=0;u<s;u++){t=e[u],r=0;while(t[r]==" ")r++;if(r==t.length){if(a&&--n<=0)break;a=!1}else a=!0}o=u+1}else o=u=s;vskip(cfmt.wordsspace);for(n=0;n<u||o<s;n++)n<u&&e[n].length==0&&(blk_out(),use_font(gene.curfont)),vskip(cfmt.lineskipfac*gene.curfont.size),n<u&&f(e[n],45,0),o<s&&(f(e[o],20+l,1)&&--i==0&&(n<u?i++:o<e.length-1&&(l*=.6)),o++)}function put_history(){var e,t,n,r,i,s,o,u,a=cfmt.infoname.split("\n"),f=a.length;for(e=0;e<f;e++){n=a[e][0];if(cfmt.writefields.indexOf(n)<0)continue;r=info[n];if(!r)continue;i||(i=!0,set_font("history"),vskip(cfmt.textspace),s=gene.curfont.size*cfmt.lineskipfac),u=a[e].slice(2),u[0]=='"'&&(u=u.slice(1,-1)),vskip(s),xy_str(0,0,u),o=strwh(u)[0],r=r.split("\n"),xy_str(o,0,r[0]);for(t=1;t<r.length;t++)vskip(s),xy_str(o,0,r[t]);vskip(s*.3),blk_out(),use_font(gene.curfont)}}function write_headform(e){var t,n,r,i,s,o,u,a={},f=clone(info_font_init),l={A:cfmt.infospace,C:cfmt.composerspace,O property in info_font_init
[all...]
/plugin/abc2/abc-libraries/abc2svg/
H A Dabc2svg-1.js3037 var abc_utf={"=D":"Đ","=H":"Ħ","=T":"Ŧ","=d":"đ","=h":"ħ","=t":"ŧ","/O":"Ø","/o":"ø","/L":"Ł","/l":"ł","vL":"Ľ","vl":"ľ","vd":"ď",".i":"ı","AA":"Å","aa":"å","AE":"Æ","ae":"æ","DH":"Ð","dh":"ð","OE":"Œ","oe":"œ","ss":"ß","TH":"Þ","th":"þ"}
7029 var info_font_init={A:"info",C:"composer",O:"composer",P:"parts",Q:"tempo",R:"info",T:"title",X:"title"} property in info_font_init
7030 function write_headform(lwidth){var c,font,font_name,align,x,y,sz,info_val={},info_font=clone(info_font_init),info_sz={A:cfmt.infospace,C:cfmt.composerspace,O:cfmt.composerspace,R:cfmt.infospace},info_nb={} property in write_headform.info_sz
7135 if(cfmt.writefields.indexOf('O')>=0)
7136 origin=info.O
H A Dabc2svg.woff1 wOFFOTTO3� O�CFF (-(E��lFFTM2h�{GGDEF2POS/2hK`X�])cmapt�z\�G�head56���hhea@ $ i�hmtx2�?<����maxp`�Pname��]rXpost x�c`d``��L���m�2p�0����J� ���v��?�Y�Y:�\&�(= Yx�c`d``���!�E����Vo�
8 ��Z�P�x�c`flf������4�� C?�f|�`���������� �������f;��c��fA�� dt �x�u�?O�@ş�q��
16 [*;�l���#�0�t�r�+��$�:8�����k,�Zλ]��,�Xr��P-8��[º)5�6훩���Mt��h����w-�*ӳ�d:o*+M��\�J�K�;a��\i����[e�+�<�%��JK�r�!A6�e׵����j;;�U=oL�H�d3�� ����+"{�#�J��<���CU�ꌰ?���ɝÚ��>�v���ߣ���\]�Z�J����w��������a6��%el�h����|��x�c```f�`F ��T�1��,L@zC���������<<�y�� �A탞S,y���懌w>�����O�<�����?�y>Jy����ɂ'��,y��ɚ'��{��ɻ��OU��>5|j�4�i��ܧMO/<}�L���3�g�T�< x�R��K��
19 /U_ƾbz����7K�,������A�����&W���4<��`v7=����Q£�G hnzt�S���O��nJ�)��^���i���?R`��"V���a�=����/��&?E�W�Y�^�L^S�H�P�M�F�Z�R�B�L�T����۲ǥWK��^)�Lz���f�B�<�Xi{iikiiiviV��RK�&K�I�J�H%J�IyK�Hi���g���'�k���>~.�L�����8l�����Ø�⒁��Vx�c`f� }x��{\���xބ�W�q�T[��u�^���Uqk�(RdF ���&���
21 �l�uW����m�S;O���$�m����}��~��8��&�y�9��Hq��8E����#��8�Cq��8Fel�[x� V`�[+� gD���?#����$�˓�2���_���ጞ$5f��I�c9fn���p&q����8p\8K9�98n��/N'�#�$p�8ٜ"N9����9��� rNq.p�rnq����|���3L�(j 5�Sө���Ej9���L�S��LEP1��ʤ�bJK�S-Tu�:F��.Q7����O�/)#e�Zs����>͝�}�;���]�]�}����wןʍ��sS��-�q����vn/��$�<�
51 �"JMiH�,�J�2����*I$��tT5UC�Ru$����j� T3���T�N�:�Nm�����R�$�P��#� 5D%Q�8u�:I���L�&�,u�:O]�.R���|�z��B]��Q�I��I��z��E���M��ߨ��w�w����I���C}Dݥ�Q�h�)��9�u�z@"�W���7Է�w"Q�!�=��a��G�9\����V\>��.�����ڒL ��������T�\���c��r�s.S�F��y�[V_���=�o ���#f�X=⺍�M�ș#�G~h����+��H�.F �*�x��Q����:9���/F[���0z������cFg��z o̬1nc�Ǽ9v���ƭ�;�~������0"&�ia����E۵=i���ɜ'K����΄��L�0A6�{�W7M|�)�ӫ�|:���I�y�
54 G�#��O�����㟋{>}�׳N��<��y2��/9�j�8Ҏg;nw�9̷^8��ک��3�<��Y�g�s����_���lvQ�Ի�[�q�v� C��C��:;��3�1� ϱNa��������`e�f�:<�Z���J���%V�Z?�I����!V7��y����8 ����v���$������
65 -dZ��|�fI��F�L�-M�z�ES�J��?O�l`;�6�=ƧNr��҉#o����ÑL(���ڊu:u-�@��ղW�n�;F&%�vѽ���y8�p�X��@�QZ+�������5'f����G�h����Ni�F�˭��i�v��0B�~T>�s��c��������%�/8�3=�xV �5�C1t�u_OK���
79 X}6`�4�h��N��L�2Ex��& =���/��H�/�r�������E� �������ٱuXG��0m��%��+mM�I�<�<�u�{�M� �!E��J=�u(�8����FN|�qf� W�bW� ��h]�����/:6 l��Q^t�n�JXx�<�6�J@�M����l�R��_��@����l�z��������]y���}Q���)RiT�i�Ӯ�k~Ψ��\���"Q{��[�<{�����.����9�Ʊ��H C����Z(�ɇ�5@ ʰ����C8���y a��P����#��.@gRs�!����R����D:�t�~k�9�ր.���Z�O��
[all...]
/plugin/abc2/abc-libraries/abcjs/
H A Dabcjs_plugin-midi_6.0.0-beta.25-min.js3 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,(function(){return 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}return 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=27)}([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={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=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),i.position&&(this.position=i.position),this.height=i.height?i.height:4,i.top&&(this.top=i.top),i.bottom&&(this.bottom=i.bottom),i.realWidth?this.realWidth=i.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":i.position&&"below"===i.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};n.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e=this.dim.font.size/4;1===this.c.length&&(e/=2);var t="chord"===this.type?this.realWidth/2:0,n=this.x-t-e;return{left:n,right:n+this.realWidth+e}},n.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},n.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},n.prototype.getLane=function(){return void 0===this.lane?0:this.lane},n.prototype.setX=function(e){this.x=e+this.dx},e.exports=n},function(e,t){e.exports=function(e){return parseFloat(e.toFixed(2))}},function(e,t,n){var r=n(3);e.exports=function(e,t){var n,i=t.y;if(t.lane){var a=.25*t.dim.font.size;i+=(t.dim.font.size+a)*t.lane}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=i,t.centerVertically||(n.attr.y+=n.font.size),"debugfont"===t.type&&(console.log("Debug msg: "+t.text),n.attr.stroke="#ff0000");var s=t.text.replace(/\n\n/g,"\n \n");s=s.replace(/^\n/," \n"),n.font.box&&(e.paper.openGroup({klass:n.attr.class,fill:"#000000"}),"end"===n.attr["text-anchor"]?n.attr.x-=n.font.padding:"start"===n.attr["text-anchor"]&&(n.attr.x+=n.font.padding),n.attr.y+=n.font.padding,delete n.attr.class),t.noClass&&delete n.attr.class,n.attr.x=r(n.attr.x),n.attr.y=r(n.attr.y);var o=e.paper.text(s,n.attr);if(n.font.box){var c=o.getBBox(),l=0;"middle"===n.attr["text-anchor"]?l=c.width/2+n.font.padding:"end"===n.attr["text-anchor"]&&(l=c.width+2*n.font.padding);var h=0;t.centerVertically&&(h=c.height-n.font.padding),e.paper.rect({x:Math.round(t.x-l),y:Math.round(i-h),width:Math.round(c.width+2*n.font.padding),height:Math.round(c.height+2*n.font.padding)}),o=e.paper.closeGroup()}return o}},function(e,t,n){var r=n(1),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,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"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,n){var r=n(8),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.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};i.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},i.prototype.addExtra=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top),void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom),e.dx<this.extraw&&(this.extraw=e.dx),this.extra[this.extra.length]=e,this._addChild(e)},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){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0!==e.top&&(void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top)),void 0!==e.bottom&&(void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom)),isNaN(this.fixed.t)||isNaN(this.fixed.b),e.dx+e.w>this.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},i.prototype.addFixed=function(e){this._addChild(e)},i.prototype.addFixedX=function(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.center=function(e,t){var n=(t.x-e.x)/2+e.x;this.x=n-this.w/2;for(var r=0;r<this.children.length;r++)this.children[r].setX(this.x)},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){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(0),i={};!function(){"use strict";var e,t,n,a,s;i.initialize=function(r,i,o,c,l){e=r,t=i,a=c,s=l,(n=o).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 o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,n,r,i,a){function s(){var s=parseInt(e[0].token);return e.shift(),n?0===e.length?{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[a]?{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",r,i),{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s}):(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:s})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return s();t("Expected font size number after *.",r,i)}if("number"===e[0].type)return s();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?(o[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?(o[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)},l=function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(n[e]=c(t,n[e],r,0,e),n.is_in_header&&(a.formatting[e]=n[e]),null)},h=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},u=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)},d=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=u(e,t,r,0,1);return null!==i?i:(n[e]=1===n[e],null)},f=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."},p=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],m=["gchord","ptstress","beatstring"],g=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc"],v=["program"],b=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],y=["beat"],w=["drone"],x=["portamento"],k=["expand","grace","trim"],A=["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 T=["auto","above","below","hidden"];i.addDirective=function(o){var S=e.tokenize(o,0,o.length);if(0===S.length||"alpha"!==S[0].type)return null;var M=o.substring(o.indexOf(S[0].token)+S[0].token.length);M=e.stripComment(M);var N=S.shift().token.toLowerCase(),C="";switch(N){case"bagpipes":a.formatting.bagpipes=!0;break;case"flatbeams":a.formatting.flatbeams=!0;break;case"landscape":n.landscape=!0;break;case"papersize":n.papersize=M;break;case"graceslurs":if(1!==S.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===S[0].token||"false"===S[0].token)a.formatting.graceSlurs=!1;else{if("1"!==S[0].token&&"true"!==S[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+S[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 f("vocalPosition",N,S,T);case"dynamic":return f("dynamicPosition",N,S,T);case"gchord":return f("chordPosition",N,S,T);case"ornament":return f("ornamentPosition",N,S,T);case"volume":return f("volumePosition",N,S,T);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)}(N,S);case"voicescale":if(1!==S.length||"number"!==S[0].type)return"voicescale requires one float as a parameter";var E=S.shift();return n.currentVoice&&(n.currentVoice.scale=E.floatt,s.changeVoiceScale(n.currentVoice.scale)),null;case"vskip":var I=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}(N,S));return I.error?I.error:(s.addSpacing(I),null);case"scale":h(N,S);break;case"sep":if(0===S.length)s.addSeparator(14,14,85);else{var _=e.getMeasurement(S);if(0===_.used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var B=_.value;if(0===(_=e.getMeasurement(S)).used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var P=_.value;if(0===(_=e.getMeasurement(S)).used||0!==S.length)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var D=_.value;s.addSeparator(B,P,D)}break;case"barsperstaff":if(null!==(C=u("barsperstaff",N,S)))return C;break;case"staffnonote":if(1!==S.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===S[0].token)n.staffnonote=!0;else{if("1"!==S[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+S[0].token+")";n.staffnonote=!1}break;case"printtempo":if(null!==(C=d("printTempo",N,S)))return C;break;case"partsbox":if(null!==(C=d("partsBox",N,S)))return C;n.partsfont.box=n.partsBox;break;case"freegchord":if(null!==(C=d("freegchord",N,S)))return C;break;case"measurenb":case"barnumbers":if(null!==(C=u("barNumbers",N,S)))return C;break;case"setbarnb":if(1!==S.length||"number"!==S[0].type)return"Directive setbarnb requires a number as a parameter.";n.currBarNumber=s.setBarNumberImmediate(S[0].intt);break;case"begintext":n.inTextBlock=!0;break;case"continueall":n.continueall=!0;break;case"beginps":n.inPsBlock=!0,t("Postscript ignored",o,0);break;case"deco":M.length>0&&n.ignoredDecorations.push(M.substring(0,M.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var L=e.translateString(M);s.addText(i.parseFontChangeLine(L));break;case"center":var O=e.translateString(M);s.addCentered(i.parseFontChangeLine(O));break;case"font":break;case"setfont":var H=e.tokenize(M,0,M.length);if(H.length>=4&&"-"===H[0].token&&"number"===H[1].type){var V=parseInt(H[1].token);V>=1&&V<=4&&(n.setfont||(n.setfont=[]),H.shift(),H.shift(),n.setfont[V]=c(H,n.setfont[V],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(N,S,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(a.formatting[e]=c(t,a.formatting[e],n,0,e),null)}(N,S,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",S,o);case"staves":case"score":n.score_is_present=!0;for(var F,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&&void 0===o.bracket&&(o.bracket=i),void 0!==a&&void 0===o.brace&&(o.brace=a),s&&(o.connectBarLines="end"),void 0===n.voices[e]&&(n.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},j=!1,q=!1,Y=!1,W=!1,R=!1,G=!1,U=!1,X=function(){if(U=!0,F){var e="start";F.staffNum>0&&("start"!==n.staves[F.staffNum-1].connectBarLines&&"continue"!==n.staves[F.staffNum-1].connectBarLines||(e="continue")),n.staves[F.staffNum].connectBarLines=e}};S.length;){var K=S.shift();switch(K.token){case"(":j?t("Can't nest parenthesis in %%score",o,K.start):(j=!0,W=!0);break;case")":!j||W?t("Unexpected close parenthesis in %%score",o,K.start):j=!1;break;case"[":q?t("Can't nest brackets in %%score",o,K.start):(q=!0,R=!0);break;case"]":!q||R?t("Unexpected close bracket in %%score",o,K.start):(q=!1,n.staves[F.staffNum].bracket="end");break;case"{":Y?t("Can't nest braces in %%score",o,K.start):(Y=!0,G=!0);break;case"}":!Y||G?t("Unexpected close brace in %%score",o,K.start):(Y=!1,n.staves[F.staffNum].brace="end");break;case"|":X();break;default:for(var Z="";("alpha"===K.type||"number"===K.type)&&(Z+=K.token,K.continueId);)K=S.shift();z(Z,!j||W,R?"start":q?"continue":void 0,G?"start":Y?"continue":void 0,U),W=!1,R=!1,G=!1,U=!1,F=n.voices[Z],"staves"===N&&X()}}break;case"newpage":var Q=e.getInt(M);s.addNewPage(0===Q.digits?-1:Q.value);break;case"abc":var J=M.split(" ");switch(J[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var $=J.shift();s.addMetaText(N+$,J.join(" "));break;default:return"Unknown directive: "+N+J[0]}break;case"header":case"footer":var ee=e.getMeat(M,0,M.length);'"'===(ee=M.substring(ee.start,ee.end)).charAt(0)&&'"'===ee.charAt(ee.length-1)&&(ee=ee.substring(1,ee.length-1));var te=ee.split("\t"),ne={};ne=1===te.length?{left:"",center:te[0],right:""}:2===te.length?{left:te[0],center:te[1],right:""}:{left:te[0],center:te[1],right:te[2]},te.length>3&&t("Too many tabs in "+N+": "+te.length+" found.",M,0),s.addMetaTextObj(N,ne);break;case"midi":var re=e.tokenize(M,0,M.length,!0);re.length>0&&"="===re[0].token&&re.shift(),0===re.length?t("Expected midi command",M,0):function(e,n,r){var i=e.shift().token,a=[];if(p.indexOf(i)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+i,r,0);else if(m.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,r,0):a.push(e[0].token);else if(g.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(v.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(b.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(x.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(y.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(w.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(v.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(A.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 o=e.shift();for(a.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+i,r,0),a.push(o.intt)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:i,params:a}):(void 0===n.formatting.midi&&(n.formatting.midi={}),n.formatting.midi[i]=a)}(re,a,M);break;case"map":case"percmap":case"playtempo":case"auquality":case"continuous":case"nobarcheck":a.formatting[N]=M;break;default:return"Unknown directive: "+N}return null},i.globalFormatting=function(r){for(var i in r)if(r.hasOwnProperty(i)){var s,o=""+r[i],c=e.tokenize(o,0,o.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":l(i,c,o);break;case"scale":h(i,c);break;case"partsbox":null!==(s=d("partsBox",i,c))&&t(s),n.partsfont.box=n.partsBox;break;case"freegchord":null!==(s=d("freegchord",i,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+i+'" requires a number as a parameter.'),a.formatting.fontboxpadding=c[0].floatt;break;case"stretchlast":a.formatting.stretchlast="true"===o||!0===o;break;default:t("Formatting directive unrecognized: ",i,0)}}}}(),e.exports=i},function(e,t,n){var r=n(0),i=n(10),a=n(16),s={};!function(){var e,t,n,o;s.initialize=function(r,i,a,s,c){e=r,t=i,n=a,s,o=c},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],none:[]};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 x=0;x<w.accs.length;x++){for(var k=!1,A=0;A<n.key.accidentals.length&&!k;A++)n.key.accidentals[A].note===w.accs[x].note&&(k=!0,n.key.accidentals[A].acc!==w.accs[x].acc&&(n.key.accidentals[A].acc=w.accs[x].acc,n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(w.accs[x])));if(!k&&(n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(w.accs[x]),n.key.accidentals.push(w.accs[x]),n.key.impliedNaturals))for(var T=0;T<n.key.impliedNaturals.length;T++)n.key.impliedNaturals[T].note===w.accs[x].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):void 0!==i.err?t("Expected value for "+n+" in voice: "+i.err,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):void 0!==o.err?t("Expected value for "+a+" in voice: "+o.err,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(void 0!==a.err)t("Expected value for "+n+" in voice: "+a.err,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 x=0;void 0!==p.clef&&(p.clef=p.clef.replace(/[',]/g,""),-1!==p.clef.indexOf("+16")&&(x+=14,p.clef=p.clef.replace("+16","")),p.verticalPos=l(p.clef,x));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):void 0!==w.err?t("Expected value for stems in voice: "+w.err,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 k=v("cue","string");n.voices[d].scale="on"===k?.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):void 0!==w.err?t("Expected value for style in voice: "+w.err,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){e.exports=function(e,t,n,r,i){return t+(r-t)/(n-e)*(i-e)}},function(e,t,n){var r,i=n(3);!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]=i(e[0][1]-this.lastM[0]),e[0][2]=i(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},r=new e}(),e.exports=r},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)}var i=n(15),a=n(36),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],x=0;x<1;x++)for(var k=w.voices[x],A=0;A<k.length;A++){var T=k[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(0),i=n(10),a=n(31),s=n(11),o=n(32),c=n(16),l=n(17),h=n(18),u=n(35);e.exports=function(){"use strict";var e=new h,t=new u(e),n=new o;function d(e,t,n){e.positioning||(e.positioning={}),e.positioning[t]=n}function f(e,t,n){e.fonts||(e.fonts={}),e.fonts[t]=n}this.getTune=function(){var t={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,getElementFromChar:e.getElementFromChar,makeVoicesArray:e.makeVoicesArray,millisecondsPerMeasure:e.millisecondsPerMeasure,setupEvents:e.setupEvents,setTiming:e.setTiming,setUpAudio:e.setUpAudio};return e.visualTranspose&&(t.visualTranspose=e.visualTranspose),t};var p={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.tempoForNextLine=[],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,n){"note"===n?("auto"!==this.vocalPosition&&d(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&d(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&d(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&d(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&d(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&f(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&f(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&f(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&f(e,"tripletfont",this.tripletfont)):"bar"===n&&("auto"!==this.dynamicPosition&&d(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&d(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&d(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&d(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&f(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&f(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])}}},m=function(e){var t=r.gsub(e,""," ");return t=r.gsub(t,"&","&amp;"),t=r.gsub(t,"<","&lt;"),r.gsub(t,">","&gt;")},g=function(e,n,r){n||(n=" ");var i=n.charAt(r);" "===i&&(i="SPACE");var a,s=m(n.substring(0,r))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+i+"</span>"+m(n.substring(r+1));!function(e){p.warnings||(p.warnings=[]),p.warnings.push(e)}("Music Line:"+t.getNumLines()+":"+(r+1)+": "+e+": "+s),a={message:e,line:n,startChar:p.iChar+r,column:r},p.warningObjects||(p.warningObjects=[]),p.warningObjects.push(a)},v=new a(n,g,p,e,t);this.getWarnings=function(){return p.warnings},this.getWarningObjects=function(){return p.warningObjects};var b=function(e,t){if('"'===e.charAt(t)){var r=n.getBrackettedSubstring(e,t,5);if(r[2]||g("Missing the closing quote while parsing the chord symbol",e,t),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=n.getFloat(r[1]);0===i.digits&&g("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(i.digits),","!==r[1][0]&&g("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].substring(1);var a=n.getFloat(r[1]);0===a.digits&&g("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(a.digits);var s=n.skipWhiteSpace(r[1]);r[1]=r[1].substring(s),r[2]=null,r[3]={x:i.value,y:a.value}}else!0!==p.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(p,r[1]);return r}return[0,""]},y=["trill","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x"],w=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],x=["crescendo(","crescendo)","diminuendo(","diminuendo)"],k=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],A=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],T=function(e,t){var i=p.macros[e.charAt(t)];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(y,(function(e){return i===e}))?[1,i]:r.detect(w,(function(e){return i===e}))?("hidden"===p.volumePosition&&(i=""),[1,i]):r.detect(x,(function(e){return"hidden"===p.dynamicPosition&&(i=""),i===e}))?[1,i]:(r.detect(p.ignoredDecorations,(function(e){return i===e}))||g("Unknown macro: "+i,e,t),[1,""]);switch(e.charAt(t)){case".":if("("===e[t+1]||"-"===e[t+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var a=n.getBrackettedSubstring(e,t,5);return a[1].length>1&&("^"===a[1].charAt(0)||"_"===a[1].charAt(0))&&(a[1]=a[1].substring(1)),r.detect(y,(function(e){return a[1]===e}))?a:r.detect(w,(function(e){return a[1]===e}))?("hidden"===p.volumePosition&&(a[1]=""),a):r.detect(x,(function(e){return a[1]===e}))?("hidden"===p.dynamicPosition&&(a[1]=""),a):r.detect(k,(function(e){return a[1]===e[0]&&(a[1]=e[1],!0)}))?a:r.detect(A,(function(e){return a[1]===e[0]&&(a[1]=e[1],!0)}))?("hidden"===p.dynamicPosition&&(a[1]=""),a):"!"!==e.charAt(t)||1!==a[0]&&"!"===e.charAt(t+a[0]-1)?(g("Unknown decoration: "+a[1],e,t),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]},S=function(e,t){for(var r=t;n.isWhiteSpace(e.charAt(t));)t++;return[t-r]},M=function(e,t){var r=n.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return g(r.warn,e,t),[r.len,""];for(var i=0;i<e.length&&" "===e.charAt(t+r.len+i);i++);var a=r.len;if("["===e.charAt(t+r.len+i)&&(r.len+=i+1),'"'===e.charAt(t+r.len)&&"["===e.charAt(t+r.len-1)){var s=n.getBrackettedSubstring(e,t+r.len,5);return[r.len+s[0],r.token,s[1]]}var o=n.getTokenOf(e.substring(t+r.len),"1234567890-,");return 0===o.len||"-"===o.token[0]?[a,r.token]:[r.len+o.len,r.token,o.token]},N={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2},C=function(e,t){var r={},i=t;for("."===e[t]&&"("===e[t+1]&&(r.dottedSlur=!0,t++);"("===e.charAt(t)||n.isWhiteSpace(e.charAt(t));)"("===e.charAt(t)&&(t+1<e.length&&e.charAt(t+1)>="2"&&e.charAt(t+1)<="9"?(void 0!==r.triplet?g("Can't nest triplets",e,t):(r.triplet=e.charAt(t+1)-"0",r.tripletQ=N[r.triplet],r.num_notes=r.triplet,t+2<e.length&&":"===e.charAt(t+2)&&(t+3<e.length&&":"===e.charAt(t+3)?t+4<e.length&&e.charAt(t+4)>="1"&&e.charAt(t+4)<="9"?(r.num_notes=e.charAt(t+4)-"0",t+=3):g("expected number after the two colons after the triplet to mark the duration",e,t):t+3<e.length&&e.charAt(t+3)>="1"&&e.charAt(t+3)<="9"?(r.tripletQ=e.charAt(t+3)-"0",t+4<e.length&&":"===e.charAt(t+4)?t+5<e.length&&e.charAt(t+5)>="1"&&e.charAt(t+5)<="9"&&(r.num_notes=e.charAt(t+5)-"0",t+=4):t+=2):g("expected number after the triplet to mark the duration",e,t))),t++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-i,r},E=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},I=function(e){return void 0!==e.duration&&e.duration<.25&&(e.end_beam=!0),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},B={x:"invisible",y:"spacer",z:"rest",Z:"multimeasure"},P=function(r,i,a,s){var o,l=function(e){return"octave"===e||"duration"===e||"Zduration"===e||"broken_rhythm"===e||"end_slur"===e};"."===r[i]&&"-"===r[i+1]&&(o=!0,i++);for(var h="startSlur",u=!1;;){switch(r.charAt(i)){case"(":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;void 0===a.startSlur?a.startSlur=1:a.startSlur++;break;case")":if(!l(h))return null;void 0===a.endSlur?a.endSlur=1:a.endSlur++;break;case"^":if("startSlur"===h)a.accidental="sharp",h="sharp2";else{if("sharp2"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="dblsharp",h="pitch"}break;case"_":if("startSlur"===h)a.accidental="flat",h="flat2";else{if("flat2"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="dblflat",h="pitch"}break;case"=":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="natural",h="pitch";break;case"A":case"B":case"C":case"D":case"E":case"F":case"G":case"a":case"b":case"c":case"d":case"e":case"f":case"g":if("startSlur"!==h&&"sharp2"!==h&&"flat2"!==h&&"pitch"!==h)return l(h)?(a.endChar=i,a):null;if(a.pitch=_[r.charAt(i)],c.note(p,a),h="octave",s&&0!==p.next_note_duration?(a.duration=p.default_length*p.next_note_duration,p.next_note_duration=0,u=!0):a.duration=p.default_length,p.clef&&"perc"===p.clef.type||p.currentVoice&&"perc"===p.currentVoice.clef){var d=r.charAt(i);if(a.accidental){d={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^"}[a.accidental]+d}e.formatting&&e.formatting.midi&&e.formatting.midi.drummap&&(a.midipitch=e.formatting.midi.drummap[d])}else p.clef&&p.clef.type.indexOf("-")>=0?a.soundPitch=a.pitch-7:p.clef&&p.clef.type.indexOf("+")>=0&&(a.soundPitch=a.pitch+7);break;case",":if("octave"!==h)return l(h)?(a.endChar=i,a):null;a.pitch-=7,void 0!==a.soundPitch&&(a.soundPitch-=7);break;case"'":if("octave"!==h)return l(h)?(a.endChar=i,a):null;a.pitch+=7,void 0!==a.soundPitch&&(a.soundPitch+=7);break;case"x":case"y":case"z":case"Z":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;a.rest={type:B[r.charAt(i)]},delete a.accidental,delete a.startSlur,delete a.startTie,delete a.endSlur,delete a.endTie,delete a.end_beam,delete a.grace_notes,"multimeasure"===a.rest.type?(a.duration=e.getBarLength(),a.rest.text=1,h="Zduration"):(s&&0!==p.next_note_duration?(a.duration=p.default_length*p.next_note_duration,p.next_note_duration=0,u=!0):a.duration=p.default_length,h="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===h||"duration"===h){var f=n.getFraction(r,i);for(a.duration=a.duration*f.value,a.endChar=f.index;f.index<r.length&&(n.isWhiteSpace(r.charAt(f.index))||"-"===r.charAt(f.index));)"-"===r.charAt(f.index)?a.startTie={}:a=I(a),f.index++;i=f.index-1,h="broken_rhythm"}else if("sharp2"===h)a.accidental="quartersharp",h="pitch";else{if("flat2"!==h){if("Zduration"===h){var m=n.getNumber(r,i);return a.duration=m.num*e.getBarLength(),a.rest.text=m.num,a.endChar=m.index,a}return null}a.accidental="quarterflat",h="pitch"}break;case"-":if("startSlur"===h)t.addTieToLastNote(o),a.endTie=!0;else{if("octave"!==h&&"duration"!==h&&"end_slur"!==h)return"broken_rhythm"===h?(a.endChar=i,a):null;if(a.startTie={},u||!s)return n.isWhiteSpace(r.charAt(i+1))&&I(a),a.endChar=i+1,a;h="broken_rhythm"}break;case" ":case"\t":if(!l(h))return null;a.end_beam=!0,o=!1;do{"."===r.charAt(i)&&"-"===r.charAt(i+1)&&(o=!0,i++),"-"===r.charAt(i)&&(a.startTie={},o&&(a.startTie.style="dotted")),i++}while(i<r.length&&(n.isWhiteSpace(r.charAt(i))||"-"===r.charAt(i))||"."===r.charAt(i)&&"-"===r.charAt(i+1));if(a.endChar=i,u||!s||"<"!==r.charAt(i)&&">"!==r.charAt(i))return a;i--,h="broken_rhythm";break;case">":case"<":if(!l(h))return null;if(!s)return a.endChar=i,a;var g=E(r,i);i+=g[0]-1,p.next_note_duration=g[2],a.duration=g[1]*a.duration,h="end_slur";break;default:return l(h)?(a.endChar=i,a):null}if(++i===r.length)return l(h)?(a.endChar=i,a):null}return null};function D(){var e={startChar:-1,endChar:-1};p.partForNextLine.title&&(e.part=p.partForNextLine),e.clef=p.currentVoice&&void 0!==p.staves[p.currentVoice.staffNum].clef?r.clone(p.staves[p.currentVoice.staffNum].clef):r.clone(p.clef);var n=p.currentVoice?p.currentVoice.scoreTranspose:0;if(e.key=s.standardKey(p.key.root+p.key.acc+p.key.mode,p.key.root,p.key.acc,n),e.key.mode=p.key.mode,p.key.impliedNaturals&&(e.key.impliedNaturals=p.key.impliedNaturals),p.key.explicitAccidentals)for(var i=0;i<p.key.explicitAccidentals.length;i++){for(var a=!1,o=0;o<e.key.accidentals.length;o++)e.key.accidentals[o].note===p.key.explicitAccidentals[i].note&&(e.key.accidentals[o].acc=p.key.explicitAccidentals[i].acc,a=!0);a||e.key.accidentals.push(p.key.explicitAccidentals[i])}if(p.targetKey=e.key,e.key.explicitAccidentals&&delete e.key.explicitAccidentals,s.addPosToKey(e.clef,e.key),null!==p.meter?(p.currentVoice?(r.each(p.staves,(function(e){e.meter=p.meter})),e.meter=p.staves[p.currentVoice.staffNum].meter,p.staves[p.currentVoice.staffNum].meter=null):e.meter=p.meter,p.meter=null):p.currentVoice&&p.staves[p.currentVoice.staffNum].meter&&(e.meter=p.staves[p.currentVoice.staffNum].meter,p.staves[p.currentVoice.staffNum].meter=null),p.currentVoice&&p.currentVoice.name&&(e.name=p.currentVoice.name),p.vocalfont&&(e.vocalfont=p.vocalfont),p.tripletfont&&(e.tripletfont=p.tripletfont),p.gchordfont&&(e.gchordfont=p.gchordfont),p.style&&(e.style=p.style),p.currentVoice){var c=p.staves[p.currentVoice.staffNum];c.brace&&(e.brace=c.brace),c.bracket&&(e.bracket=c.bracket),c.connectBarLines&&(e.connectBarLines=c.connectBarLines),c.name&&(e.name=c.name[p.currentVoice.index]),c.subname&&(e.subname=c.subname[p.currentVoice.index]),p.currentVoice.stem&&(e.stem=p.currentVoice.stem),p.currentVoice.stafflines&&(e.stafflines=p.currentVoice.stafflines),p.currentVoice.staffscale&&(e.staffscale=p.currentVoice.staffscale),p.currentVoice.scale&&(e.scale=p.currentVoice.scale),p.currentVoice.style&&(e.style=p.currentVoice.style),p.currentVoice.transpose&&(e.clef.transpose=p.currentVoice.transpose)}var l=void 0===p.currentVoice||0===p.currentVoice.staffNum&&0===p.currentVoice.index;0===p.barNumbers&&l&&1!==p.currBarNumber&&(e.barNumber=p.currBarNumber),t.startNewLine(e),p.key.impliedNaturals&&delete p.key.impliedNaturals,p.partForNextLine={},4===p.tempoForNextLine.length&&t.appendElement(p.tempoForNextLine[0],p.tempoForNextLine[1],p.tempoForNextLine[2],p.tempoForNextLine[3]),p.tempoForNextLine=[]}var L=function(e,t){if("{"===e.charAt(t)){var r=n.getBrackettedSubstring(e,t,1,"}");r[2]||g("Missing the closing '}' while parsing grace note",e,t),")"===e[t+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=P(r[1],a,{},!1);null!==c?(c.duration=c.duration/(8*p.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):g("Unknown character '"+r[1].charAt(a)+"' while parsing grace note",e,t),a++)}if(i.length)return[r[0],i]}return[0]};function O(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 H(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)},F=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},z=function i(a){var s=v.parseHeader(a);s.regular&&function(i){v.resolveTempo(),p.is_in_header=!1;for(var a=0,s=p.iChar;n.isWhiteSpace(i.charAt(a))&&a<i.length;)a++;if(a!==i.length&&"%"!==i.charAt(a)){var o=p.start_new_line;void 0===p.continueall?p.start_new_line=!0:p.start_new_line=!1;var c=0,l=v.letter_to_body_header(i,a);l[0]>0&&(a+=l[0],"V"===l[1]&&(o=!0));for(var h={},u=0;a<i.length;){var d=a;if("%"===i.charAt(a))break;var f=v.letter_to_inline_header(i,a);if(f[0]>0)a+=f[0],"V"===f[1]&&(o=!0);else{var m;for(o&&(D(),o=!1);;)if((m=n.eatWhiteSpace(i,a))>0&&(a+=m),a>0&&""===i.charAt(a-1)&&(m=v.letter_to_body_header(i,a))[0]>0&&("V"===m[1]&&D(),a=m[0],p.start_new_line=!1),(m=S(i,a))[0]>0&&(a+=m[0]),(m=b(i,a))[0]>0){h.chord||(h.chord=[]);var y=n.translateString(m[1]);y=y.replace(/;/g,"\n");for(var w=!1,x=0;x<h.chord.length;x++)h.chord[x].position===m[2]&&(w=!0,h.chord[x].name+="\n"+y);!1===w&&(null===m[2]&&m[3]?h.chord.push({name:y,rel_position:m[3]}):h.chord.push({name:y,position:m[2]})),a+=m[0];var k=n.skipWhiteSpace(i.substring(a));k>0&&(h.force_end_beam_last=!0),a+=k}else if((m=-1==="ABCDEFGabcdefgxyzZ[]|^_{".indexOf(i.charAt(a))?T(i,a):[0])[0]>0)null===m[1]?a+1<i.length&&D():m[1].length>0&&(0===m[1].indexOf("style=")?h.style=m[1].substr(6):(void 0===h.decoration&&(h.decoration=[]),"beambr1"===m[1]?h.beambr=1:"beambr2"===m[1]?h.beambr=2:h.decoration.push(m[1]))),a+=m[0];else{if(!((m=L(i,a))[0]>0))break;h.gracenotes=m[1],a+=m[0]}if((m=M(i,a))[0]>0){u=0,void 0!==h.gracenotes&&(h.rest={type:"spacer"},h.duration=.125,p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+a,s+a+m[0],h),p.measureNotEmpty=!0,h={});var A={type:m[1]};if(0===A.type.length)g("Unknown bar type",i,a);else{if(p.inEnding&&"bar_thin"!==A.type&&(A.endEnding=!0,p.inEnding=!1),m[2]&&(A.startEnding=m[2],p.inEnding&&(A.endEnding=!0),p.inEnding=!0,"bar_right_repeat"===m[1]?p.restoreStartEndingHoldOvers():p.duplicateStartEndingHoldOvers()),void 0!==h.decoration&&(A.decoration=h.decoration),void 0!==h.chord&&(A.chord=h.chord),A.startEnding&&void 0===p.barFirstEndingNum?p.barFirstEndingNum=p.currBarNumber:A.startEnding&&A.endEnding&&p.barFirstEndingNum?p.currBarNumber=p.barFirstEndingNum:A.endEnding&&(p.barFirstEndingNum=void 0),"bar_invisible"!==A.type&&p.measureNotEmpty)(void 0===p.currentVoice||0===p.currentVoice.staffNum&&0===p.currentVoice.index)&&(p.currBarNumber++,p.barNumbers&&p.currBarNumber%p.barNumbers==0&&(A.barNumber=p.currBarNumber));p.addFormattingOptions(h,e.formatting,"bar"),t.appendElement("bar",s+a,s+a+m[0],A),p.measureNotEmpty=!1,h={}}a+=m[0]}else if("&"===i[a])(m=O(i,a))[0]>0&&(t.appendElement("overlay",s,s+1,{}),a+=1,u++);else{if((m=C(i,a)).consumed>0&&(void 0!==m.startSlur&&(h.startSlur=m.startSlur),m.dottedSlur&&(h.dottedSlur=!0),void 0!==m.triplet&&(c>0?g("Can't nest triplets",i,a):(h.startTriplet=m.triplet,h.tripletMultiplier=m.tripletQ/m.triplet,c=void 0===m.num_notes?m.triplet:m.num_notes)),a+=m.consumed),"["===i.charAt(a)){var N=a;a++;for(var _=null,B=!1,z=!1;!z;){var j=T(i,a);j[0]>0&&(a+=j[0]);var q=P(i,a,{},!1);if(null!==q&&void 0!==q.pitch)j[0]>0&&0!==j[1].indexOf("style=")&&(void 0===h.decoration&&(h.decoration=[]),h.decoration.push(j[1])),q.end_beam&&(h.end_beam=!0,delete q.end_beam),void 0===h.pitches?(h.duration=q.duration,h.pitches=[q]):h.pitches.push(q),delete q.duration,j[0]>0&&0===j[1].indexOf("style=")&&(h.pitches[h.pitches.length-1].style=j[1].substr(6)),p.inTieChord[h.pitches.length]&&(q.endTie=!0,p.inTieChord[h.pitches.length]=void 0),q.startTie&&(p.inTieChord[h.pitches.length]=!0),a=q.endChar,delete q.endChar;else if(" "===i.charAt(a))g("Spaces are not allowed in chords",i,a),a++;else{if(a<i.length&&"]"===i.charAt(a)){a++,0!==p.next_note_duration&&(h.duration=h.duration*p.next_note_duration,p.next_note_duration=0),V(p,u,h)&&(r.each(h.pitches,(function(e){e.endTie=!0})),F(p,u,!1)),c>0&&(!h.rest||"spacer"!==h.rest.type)&&0===--c&&(h.endTriplet=!0);for(var Y=!1;a<i.length&&!Y;){switch(i.charAt(a)){case" ":case"\t":I(h);break;case")":void 0===h.endSlur?h.endSlur=1:h.endSlur++;break;case"-":r.each(h.pitches,(function(e){e.startTie={}})),F(p,u,!0);break;case">":case"<":var W=E(i,a);a+=W[0]-1,p.next_note_duration=W[2],_?_*=W[1]:_=W[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var R=n.getFraction(i,a);_=R.value,a=R.index," "===i.charAt(a)&&(B=!0),"-"===i.charAt(a)||")"===i.charAt(a)||" "===i.charAt(a)||"<"===i.charAt(a)||">"===i.charAt(a)?a--:Y=!0;break;default:Y=!0}Y||a++}}else g("Expected ']' to end the chords",i,a);void 0!==h.pitches&&(null!==_&&(h.duration=h.duration*_,B&&I(h)),p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+N,s+a,h),p.measureNotEmpty=!0,h={}),z=!0}}}else{var G={},U=P(i,a,G,!0);void 0!==G.endTie&&F(p,u,!0),null!==U&&(void 0!==U.pitch?(h.pitches=[{}],void 0!==U.accidental&&(h.pitches[0].accidental=U.accidental),h.pitches[0].pitch=U.pitch,(U.soundPitch||0===U.soundPitch)&&(h.pitches[0].soundPitch=U.soundPitch),(U.midipitch||0===U.midipitch)&&(h.pitches[0].midipitch=U.midipitch),void 0!==U.endSlur&&(h.pitches[0].endSlur=U.endSlur),void 0!==U.endTie&&(h.pitches[0].endTie=U.endTie),void 0!==U.startSlur&&(h.pitches[0].startSlur=U.startSlur),void 0!==h.startSlur&&(h.pitches[0].startSlur=h.startSlur),void 0!==h.dottedSlur&&(h.pitches[0].dottedSlur=!0),void 0!==U.startTie&&(h.pitches[0].startTie=U.startTie),void 0!==h.startTie&&(h.pitches[0].startTie=h.startTie)):(h.rest=U.rest,void 0!==U.endSlur&&(h.endSlur=U.endSlur),void 0!==U.endTie&&(h.rest.endTie=U.endTie),void 0!==U.startSlur&&(h.startSlur=U.startSlur),void 0!==U.startTie&&(h.rest.startTie=U.startTie),void 0!==h.startTie&&(h.rest.startTie=h.startTie)),void 0!==U.chord&&(h.chord=U.chord),void 0!==U.duration&&(h.duration=U.duration),void 0!==U.decoration&&(h.decoration=U.decoration),void 0!==U.graceNotes&&(h.graceNotes=U.graceNotes),delete h.startSlur,delete h.dottedSlur,V(p,u,h)&&(void 0!==h.pitches?h.pitches[0].endTie=!0:"spacer"!==h.rest.type&&(h.rest.endTie=!0),F(p,u,!1)),(U.startTie||h.startTie)&&F(p,u,!0),a=U.endChar,c>0&&(!U.rest||"spacer"!==U.rest.type)&&0===--c&&(h.endTriplet=!0),U.end_beam&&I(h),h.rest&&"rest"===h.rest.type&&1===h.duration&&H(p)<=1&&(h.rest.type="whole",h.duration=H(p)),p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+d,s+a,h),p.measureNotEmpty=!0,h={})}a===d&&(" "!==i.charAt(a)&&"`"!==i.charAt(a)&&g("Unknown character ignored",i,a),a++)}}}}}(s.str),s.newline&&D(),s.words&&function(e,t){if(e){"-"!==(t=r.strip(t)).charAt(t.length-1)&&(t+=" ");for(var i=[],a=0,s=!1,o=function(e){var o=r.strip(t.substring(a,e));if(a=e+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=t.charAt(e);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:n.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<t.length;c++)switch(t.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 g("Can't add words before the first line of music",e,0)}(t.getCurrentVoice(),a.substring(2)),s.symbols&&function(e,t){if(e){"-"!==(t=r.strip(t)).charAt(t.length-1)&&(t+=" ");for(var i=[],a=0,s=!1,o=function(e){var o=r.strip(t.substring(a,e));if(a=e+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=t.charAt(e);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:n.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<t.length;c++)switch(t.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 g("Can't add symbols before the first line of music",e,0)}(t.getCurrentVoice(),a.substring(2)),s.recurse&&i(s.str)};function j(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 q(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&&j(o,s)}}}this.parse=function(a,s,o){if(s||(s={}),o||(o=0),t.reset(),s.print&&(e.media="print"),p.reset(),p.iChar=o,s.visualTranspose?(p.globalTranspose=parseInt(s.visualTranspose),0===p.globalTranspose?p.globalTranspose=void 0:t.setVisualTranspose(s.visualTranspose)):p.globalTranspose=void 0,s.lineBreaks){p.lineBreaks={};for(var c=0;c<s.lineBreaks.length;c++)p.lineBreaks[""+(s.lineBreaks[c]+1)]=!0}v.reset(n,g,p,e),a=r.gsub(a,"\r\n","\n"),a=r.gsub(a,"\r","\n");var h=(a+="\n").split("\n\\");if(h.length>1){for(var u=1;u<h.length;u++)for(;h[u].length>0&&"\n"!==h[u][0];)h[u]=h[u].substr(1),h[u-1]+=" ";a=h.join(" ")}var d=(a=a.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,n){return t+" "+(n?" ".substring(0,n.length):"")}))).split("\n");0===r.last(d).length&&d.pop();try{s.format&&i.globalFormatting(s.format),r.each(d,(function(e){if(s.header_only&&!1===p.is_in_header)throw"normal_abort";if(s.stop_on_warning&&p.warnings)throw"normal_abort";if(p.is_in_history)":"===e.charAt(1)?(p.is_in_history=!1,z(e)):t.addMetaText("history",n.translateString(n.stripComment(e)));else if(p.inTextBlock)r.startsWith(e,"%%endtext")?(t.addText(p.textBlock),p.inTextBlock=!1):r.startsWith(e,"%%")?p.textBlock+=e.substring(2)+"\n":p.textBlock+=e+"\n";else if(p.inPsBlock)r.startsWith(e,"%%endps")?p.inPsBlock=!1:p.textBlock+=" "+e;else{var i=p.is_in_header;z(e),i&&!p.is_in_header&&(t.setRunningFont("annotationfont",p.annotationfont),t.setRunningFont("gchordfont",p.gchordfont),t.setRunningFont("tripletfont",p.tripletfont),t.setRunningFont("vocalfont",p.vocalfont))}p.iChar+=e.length+1}));var f=792,m=612;switch(p.papersize){case"legal":f=1008,m=612;break;case"A4":f=842.4,m=597.6}if(p.landscape){var b=f;f=m,m=b}p.openSlurs=t.cleanUp(m,f,p.barsperstaff,p.staffnonote,p.openSlurs)}catch(e){if("normal_abort"!==e)throw e}s.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)q(n,e.lines[r].staff)}}}(),l.wrapLines(e,p.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){if("perc"===e.clef.type)return{accidentals:t[n],root:s,acc:o};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&&"perc"!==e.clef.type){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 x in n[i[f][g]].staff[f].voices[g]=[],c)c.hasOwnProperty(x)&&n[i[f][g]].staff[f].voices[g].push(c[x]);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));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,x=i(v,w,n,a,s),k=o.getMeasureWidths(x.tune),A=!0;return g.attempts.push({type:"heightCheck",height:k.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||(x=i(v,w,n,a,s)),x.explanation=g,x}}},function(e,t,n){var r=n(0),i=n(1),a=n(33),s=n(34);e.exports=function(){function e(e,t){for(;t<e.length&&null===e[t].left;)t++;return e[t]}this.getBeatLength=function(){var e=this.getMeterFraction(),t=1;return(6===e.num||9===e.num||12===e.num||3===e.num&&8===e.den)&&(t=3),t/e.den},this.getPickupLength=function(){var e=this.getBarLength(),t=function(e,t){for(var n=0,r=0;r<e.length;r++)if(e[r].staff)for(var i=0;i<e[r].staff.length;i++)for(var a=0;a<e[r].staff[i].voices.length;a++)for(var s=e[r].staff[i].voices[a],o=1,c=0;c<s.length;c++){var l=s[c].rest&&"spacer"===s[c].rest.type;if(s[c].startTriplet&&(o=s[c].tripletMultiplier),s[c].duration&&!l&&"tempo"!==s[c].el_type&&(n+=s[c].duration*o),s[c].endTriplet&&(o=1),n>=t&&(n-=t),"bar"===s[c].el_type)return n}return n}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var n=this.metaText?this.metaText.tempo:null;t=this.getBpm(n)}return t<=0&&(t=1),6e4*(this.getBeatsPerMeasure()/t)},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++){var r=t.staff[n].meter;if(r)return r}}return{type:"common_time"}},this.getMeterFraction=function(){var e=this.getMeter(),t=4,n=4;return e&&("specified"===e.type?(t=parseInt(e.value[0].num,10),n=parseInt(e.value[0].den,10)):"cut_time"===e.type?(t=2,n=2):"common_time"===e.type&&(t=4,n=4)),this.meter={num:t,den:n},this.meter},this.getKeySignature=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++)if(t.staff[n].key)return t.staff[n].key}return{}},this.getElementFromChar=function(e){for(var t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.staff)for(var r=0;r<n.staff.length;r++)for(var i=n.staff[r],a=0;a<i.voices.length;a++)for(var s=i.voices[a],o=0;o<s.length;o++){var c=s[o];if(c.startChar&&c.endChar&&c.startChar<=e&&c.endChar>e)return c}}return null},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=[],n={},r=0;r<this.engraver.staffgroups.length;r++)for(var a=this.engraver.staffgroups[r],s=a.staffs[0],o=s.absoluteY,c=o-s.top*i.STEP,l=a.staffs[a.staffs.length-1],h=(o=l.absoluteY)-l.bottom*i.STEP-c,u=a.voices,d=0;d<u.length;d++){var f=!1;e[d]||(e[d]=[]),void 0===t[d]&&(t[d]=0);for(var p=u[d].children,m=0;m<p.length;m++)"tempo"===p[m].type&&(n[t[d]]=this.getBpm(p[m].abcelem)),e[d].push({top:c,height:h,line:a.line,measureNumber:t[d],elem:p[m]}),"bar"===p[m].type&&f&&t[d]++,"note"!==p[m].type&&"rest"!==p[m].type||(f=!0)}return this.tempoLocations=n,e},this.setupEvents=function(t,n,r){for(var i,a=[],s={},o=t,c=!0,l=this.makeVoicesArray(),h=0;h<l.length;h++){var u=o,d=Math.round(1e3*u),f=0,p=-1,m=l[h],g=r;n=this.getBeatLength()*g/60;for(var v=-1,b=0;b<m.length;b++){var y=m[b].measureNumber;v!==y&&this.tempoLocations[y]&&(g=this.tempoLocations[y],n=this.getBeatLength()*g/60,v=y);var w,x=m[b].elem,k=this.addElementToEvents(s,x,d,m[b].top,m[b].height,m[b].line,m[b].measureNumber,n,i,c);if(i=k.isTiedState,c=k.nextIsBar,u+=k.duration,x.duration>0&&(w="event"+d),d=Math.round(1e3*u),"bar"===x.type){var A=x.abcelem.type,T="bar_right_repeat"===A||"bar_dbl_repeat"===A,S="1"===x.abcelem.startEnding,M="bar_left_repeat"===A||"bar_dbl_repeat"===A||"bar_right_repeat"===A;if(T){b>0&&(s[w].endX=x.x),-1===p&&(p=b);var N=0;v=-1;for(var C=f;C<p;C++){v!==(y=m[C].measureNumber)&&this.tempoLocations[y]&&(g=this.tempoLocations[y],n=this.getBeatLength()*g/60,v=y);var E=m[C].elem;i=(k=this.addElementToEvents(s,E,d,m[C].top,m[C].height,m[C].line,m[C].measureNumber,n,i,c)).isTiedState,c=k.nextIsBar,u+=k.duration,N=d,d=Math.round(1e3*u)}s["event"+N]&&(s["event"+N].endX=m[p].elem.x),c=!0,p=-1}S&&(p=b),M&&(f=b)}}}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)}}(a=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}))}(s)),function(t,n){if(n.length<1)return;for(var r=0;r<n.length-1;r++){var i=n[r],a=e(n,r+1);if(null!==i.left){var s=a&&i.top===a.top?a.left:t[i.line].staffGroup.w;void 0!==i.endX?s>i.left&&(i.endX=Math.min(i.endX,s)):i.endX=s}}var o=n[n.length-1];o.endX=t[o.line].staffGroup.w}(this.lines,a),a.push({type:"end",milliseconds:d}),this.addUsefulCallbackInfo(a,g),a},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&&3!==r.num&&r.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),void(this.noteTimings=[]);if(!e){var n=this.metaText?this.metaText.tempo:null;e=this.getBpm(n)}var r=this.getBeatLength(),i=e/60,a=this.getBarLength()/r*t/i;a&&(a-=this.getPickupLength()/r/i);var s=r*i;return this.noteTimings=this.setupEvents(a,s,e),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=a(this,e);return s(t,e)}}},function(e,t){var n=function(e){this.type="TieElem",this.anchor1=e.anchor1,this.anchor2=e.anchor2,e.isGrace&&(this.isGrace=!0),e.fixedY&&(this.fixedY=!0),e.stemDir&&(this.stemDir=e.stemDir),void 0!==e.voiceNumber&&(this.voiceNumber=e.voiceNumber),void 0!==e.style&&(this.dotted=!0),this.internalNotes=[]};n.prototype.addInternalNote=function(e){this.internalNotes.push(e)},n.prototype.setEndAnchor=function(e){this.anchor2=e},n.prototype.setStartX=function(e){this.startLimitX=e},n.prototype.setEndX=function(e){this.endLimitX=e},n.prototype.setHint=function(){this.hint=!0},n.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}},n.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}},n.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.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=t},n.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},n.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)},n.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=n},function(e,t){e.exports=function(e){for(var t=0,n=0;n<e.voices.length;n++){var r=e.voices[n].staff;e.voices[n].duplicate||(t+=r.top,r.bottom<0&&(t+=-r.bottom))}return t}},function(e,t,n){var r=n(8);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(8);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,n){var r=n(4),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(4),i=n(25),a=n(26),s=n(23);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,lane:t.getLane()});break;case"decoration":t.graphelem=r(e,{x:t.x,y:c+6,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,lane:t.getLane()});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),i=n(3);e.exports=function(e,t,n,a,s){if(n<0||a<s){var o=i(s);s=i(a),a=o}else a=i(a),s=i(s);t=i(t);var c=i(t+n),l=[["M",t,a],["L",t,s],["L",c,s],["L",c,a],["z"]];if(!r.isInGroup()){for(var h="",u=0;u<l.length;u++)h+=l[u].join(" ");return e.paper.pathToBack({path:h,stroke:"none",fill:"#000000",class:e.controller.classes.generate("stem")})}r.addPath(l)}},function(e,t,n){var r=n(7),i=n(3);e.exports=function(e,t,n,a,s){var o=.35,c="#000000",l=e.calcY(a);t=i(t),n=i(n);var h=i(l-o),u=i(l+o),d={path:r("M %f %f L %f %f L %f %f L %f %f z",t,h,n,h,n,u,t,u),stroke:"none",fill:c};return s&&(d.class=s),e.paper.pathToBack(d)}},function(e,t,n){n(28);var r={plugin:n(29)};e.exports=r},function(e,t){},function(e,t,n){var r=n(30),i=n(91),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(37),s=n(15),o=n(17),c=n(0),l={};function h(){var e=window.innerWidth;for(var t in l)if(l.hasOwnProperty(t)){var n=l[t];e-=2*n.offsetLeft,n.style.width=e+"px"}}try{window.addEventListener("resize",h),window.addEventListener("orientationChange",h)}catch(e){}function u(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",l[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 d(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=[],l=0;l<t.lines.length;l++){var h=t.lines[l];s||(s=a(t)),0===l&&(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(h),h.staff&&(o.push(s),s=void 0)}if(s)for(var d=o[o.length-1],f=0;f<s.lines.length;f++)d.lines.push(s.lines[f]);(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 p={};for(var m in n)n.hasOwnProperty(m)&&(p[m]=n[m]);var g=p.paddingtop,v=p.paddingbottom;e.innerHTML="";for(var b=0;b<o.length;b++){var y=document.createElement("div");e.appendChild(y),0===b?(p.paddingtop=g,p.paddingbottom=-20):b===o.length-1?(p.paddingtop=10,p.paddingbottom=v):(p.paddingtop=10,p.paddingbottom=-20),b<o.length-1&&(o[b].formatting=c.clone(o[b].formatting),o[b].formatting.stretchlast=!0),u(y,o[b],p,r),0===b?t.engraver=o[b].engraver:t.engraver.staffgroups?o[b].engraver.staffgroups.length>0&&t.engraver.staffgroups.push(o[b].engraver.staffgroups[0]):t.engraver.staffgroups=o[b].engraver.staffgroups}}e.exports=function(e,t,n,i,c){var l,h={};if(n)for(l in n)n.hasOwnProperty(l)&&(h[l]=n[l]);if(i)for(l in i)i.hasOwnProperty(l)&&("listener"===l?i[l].highlight&&(h.clickListener=i[l].highlight):h[l]=i[l]);if(c)for(l in c)c.hasOwnProperty(l)&&(h[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)),h.afterParsing&&h.afterParsing(t,n,r),!i&&h.wrap&&h.staffwidth?t=function(e,t,n,r,i){var c=new a(e,i),l=c.getMeasureWidths(t),h=o.calcLineWraps(t,l,r,i,s,c);!i.oneSvgPerLine||h.tune.lines.length<2?u(e,h.tune,h.revisedParams,n):d(e,h.tune,h.revisedParams,n);return h.tune.explanation=h.explanation,h.tune}(e,t,n,r,h):(i||!h.oneSvgPerLine||t.lines.length<2?u(e,t,h,n):d(e,t,h,n),i&&e.parentNode.removeChild(e),null)}),e,t,h)}},function(e,t,n){var r=n(0),i=n(10),a=n(11);e.exports=function(e,t,n,s,o){this.reset=function(e,t,n,r){a.initialize(e,t,n,r,o),i.initialize(e,t,n,r,o)},this.reset(e,t,n,s),this.setTitle=function(t){if(n.hasMainTitle)o.addSubtitle(e.translateString(e.stripComment(t)));else{var r=e.translateString(e.theReverser(e.stripComment(t)));n.titlecaps&&(r=r.toUpperCase()),o.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 c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(r,i,a){try{var s=e.tokenize(r,i,a);if(0===s.length)throw"Missing parameter in Q: field";var o={},l=!0,h=s.shift();if("quote"===h.type&&(o.preString=h.token,h=s.shift(),0===s.length))return c[o.preString.toLowerCase()]&&(o.bpm=c[o.preString.toLowerCase()],o.suppressBpm=!0),{type:"immediate",tempo:o};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";o.duration=[1],o.bpm=parseInt(h.token)}else{if("number"!==h.type)throw"Expected number or equal after C in Q: field";if(o.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";o.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)o.duration=[1],o.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(o.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),o.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";o.bpm=parseInt(h.token)}}if(0!==s.length&&("quote"===(h=s.shift()).type&&(o.postString=h.token,h=s.shift()),0!==s.length))throw"Unexpected string at end of Q: field";return!1===n.printTempo&&(o.suppress=!0),{type:l?"delaySet":"immediate",tempo:o}}catch(e){return t(e,r,i),{type:"none"}}},this.letter_to_inline_header=function(r,c){var l=e.eatWhiteSpace(r,c);if(c+=l,r.length>=c+5&&"["===r.charAt(c)&&":"===r.charAt(c+2)){var h=r.indexOf("]",c),u=n.iChar+c,d=n.iChar+h+1;switch(r.substring(c,c+3)){case"[I:":var f=i.addDirective(r.substring(c+3,h));return f&&t(f,r,c),[h-c+1+l];case"[M:":var p=this.setMeter(r.substring(c+3,h));return o.hasBeginMusic()&&p?o.appendStartingElement("meter",u,d,p):n.meter=p,[h-c+1+l];case"[K:":var m=a.parseKey(r.substring(c+3,h));return m.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",u,d,n.clef),m.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",u,d,a.fixKey(n.clef,n.key)),[h-c+1+l];case"[P:":return s.lines.length<=s.lineNum?n.partForNextLine={title:r.substring(c+3,h),startChar:u,endChar:d}:o.appendElement("part",u,d,{title:r.substring(c+3,h)}),[h-c+1+l];case"[L:":return this.setDefaultLength(r,c+3,h),[h-c+1+l];case"[Q:":if(h>0){var g=this.setTempo(r,c+3,h);return"delaySet"===g.type?o.hasBeginMusic()?o.appendElement("tempo",u,d,this.calcTempo(g.tempo)):n.tempoForNextLine=["tempo",u,d,this.calcTempo(g.tempo)]:"immediate"===g.type&&(o.hasBeginMusic()?o.appendElement("tempo",u,d,g.tempo):n.tempoForNextLine=["tempo",u,d,g.tempo]),[h-c+1+l,r.charAt(c+1),r.substring(c+3,h)]}break;case"[V:":if(h>0)return a.parseVoice(r,c+3,h),[h-c+1+l,r.charAt(c+1),r.substring(c+3,h)]}}return[0]},this.letter_to_body_header=function(e,s){if(e.length>=s+3)switch(e.substring(s,s+2)){case"I:":var c=i.addDirective(e.substring(s+2));return c&&t(c,e,s),[e.length];case"M:":var l=this.setMeter(e.substring(s+2));return o.hasBeginMusic()&&l&&o.appendStartingElement("meter",n.iChar+s,n.iChar+e.length,l),[e.length];case"K:":var h=a.parseKey(e.substring(s+2));return h.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",n.iChar+s,n.iChar+e.length,n.clef),h.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",n.iChar+s,n.iChar+e.length,a.fixKey(n.clef,n.key)),[e.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",n.iChar+s,n.iChar+e.length,{title:e.substring(s+2)}),[e.length];case"L:":return this.setDefaultLength(e,s+2,e.length),[e.length];case"Q:":var u=e.indexOf("",s+2);-1===u&&(u=e.length);var d=this.setTempo(e,s+2,u);return"delaySet"===d.type?o.appendElement("tempo",n.iChar+s,n.iChar+e.length,this.calcTempo(d.tempo)):"immediate"===d.type&&o.appendElement("tempo",n.iChar+s,n.iChar+e.length,d.tempo),[u,e.charAt(s),r.strip(e.substring(s+2))];case"V:":return a.parseVoice(e,s+2,e.length),[e.length,e.charAt(s),r.strip(e.substring(s+2))]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(c){if(r.startsWith(c,"%%")){var h=i.addDirective(c.substring(2));return h&&t(h,c,2),{}}var u=c.indexOf("%");if(u>=0&&(c=c.substring(0,u)),0===(c=c.replace(/\s+$/,"")).length)return{};if(c.length>=2&&":"===c.charAt(1)){var d="";c.indexOf("")>=0&&"w"!==c.charAt(0)&&(d=c.substring(c.indexOf("")+1),c=c.substring(0,c.indexOf("")));var f=l[c.charAt(0)];if(void 0!==f)return"unalignedWords"===f?o.addMetaTextArray(f,i.parseFontChangeLine(e.translateString(e.stripComment(c.substring(2))))):o.addMetaText(f,e.translateString(e.stripComment(c.substring(2)))),{};var p=n.iChar,m=p+c.length;switch(c.charAt(0)){case"H":o.addMetaText("history",e.translateString(e.stripComment(c.substring(2)))),n.is_in_history=!0;break;case"K":this.resolveTempo();var g=a.parseKey(c.substring(2));!n.is_in_header&&o.hasBeginMusic()&&(g.foundClef&&o.appendStartingElement("clef",p,m,n.clef),g.foundKey&&o.appendStartingElement("key",p,m,a.fixKey(n.clef,n.key))),n.is_in_header=!1;break;case"L":this.setDefaultLength(c,2,c.length);break;case"M":n.origMeter=n.meter=this.setMeter(c.substring(2));break;case"P":n.is_in_header?o.addMetaText("partOrder",e.translateString(e.stripComment(c.substring(2)))):n.partForNextLine={title:e.translateString(e.stripComment(c.substring(2))),startChar:p,endChar:m};break;case"Q":var v=this.setTempo(c,2,c.length);"delaySet"===v.type?n.tempo=v.tempo:"immediate"===v.type&&(s.metaText.tempo=v.tempo);break;case"T":this.setTitle(c.substring(2));break;case"U":this.addUserDefinition(c,2,c.length);break;case"V":if(a.parseVoice(c,2,c.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",c,0);break;default:return d.length&&(d=""+d),{regular:!0,str:c+d}}return d.length>0?{recurse:!0,str:d}:{}}return{regular:!0,str:c}}}},function(e,t,n){var r=n(0);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" function
[all...]
/plugin/accscounter/lang/pt-br/
H A Dmngintro.txt5    * O número de visualizações de página (PV) desde o nascimento da página até agora
7    * O número do PV de hoje
8    * O número do PV de ontem
9    * O endereço IP do visitante que acessou a página pela última vez
11 [ATENÇÃO] Esta ferramenta pode lidar com muitos arquivos de log de cada vez; portanto, pode demorar…
H A Dmovedirection.txt2 O destino de salvamento dos arquivos de log deste plugin foi alterado, para ser compatível com algu…
6 ===== ATENÇÃO =====
H A Dnoitem.txt3    * O contador de acesso não precisa ser instalado. Se você deseja colocar contadores para todas a…
H A Dviewer.txt7 [OBSERVAÇÃO] Se você clicar no botão "Executar", o sistema começará a verificar ou excluir **sem av…
9 [OBSERVAÇÃO] Se você usar a função Verificação de Spammer, defina antes os valores "sfsExFreq" e "s…
11 [OBSERVAÇÃO] A função Verificação de Spammer precisa de conexão com api.stopforumspam.org. Se você …
/plugin/aceeditor/
H A Dbuild.js1O=A.length;for(var M in{toString:null})L=!1;Object.keys=function I(e){if(typeof e!="object"&&typeo… function
/plugin/achart/assets/
H A Dapexcharts.min.js6O=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.twoDSeries=[],this.threeDSeries=[]…
14 …re=new Et(this.ctx.el,this.ctx),this.ctx.config=new R({}),this.ctx.data=new O(this.ctx),this.ctx.g…
H A Djs-yaml.min.js2O=b.extend({implicit:[A,v,C,S]}),j=O,T=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9…
/plugin/aichat/vendor/mehrab-wj/tiktoken-php/data/
H A Dvocab.bpe186 Ġ O
1086 O N
1327 O R
1948 O n
2140 O T
2352 O U
2386 O S
2408 O M
2931 O P
2944 O n
[all...]
/plugin/aichat/vendor/vanderlee/php-sentence/doc/resources/
H A Dcombined.js8 (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t variable
10 u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
/plugin/amcharts/assets/amcharts/
H A Damcharts.js92 …:ga="middle",1==ia&&0<O&&!g&&!m&&ca<ya&&(e=d.fitToBounds(b,0,ya),ca=d.fitToBounds(ca,0,ya),Y=e-ca,…
94 …b-Pa/2+2;1==ia&&0<O&&!g&&!m&&(e=d.fitToBounds(b,0,X),ca=d.fitToBounds(ca,0,X),T=e-ca,Ca=d.polygon(…
157 …"line"==g||"step"==g||"smoothedLine"==g)if(this.stackable&&"regular"==O||"100%"==O||this.fillToGra…
159O&&"3d"!=O?Ia.close:Ia.value;if("candlestick"==g||"ohlc"==g)W=Ia.close,Ab=Ia.low,qa=f.getCoordinat…
170O&&(L=t?(this.end+1-K)*D-c:D*K+c);"3d"==O&&(t?(L=(this.end+1-K)*D-c-1E3*this.depthCount,wa+=I*this…
177 …Xb=0;Vb&&(Xb=Vb.size);this.positionLabel(v,wa,Da,gc,Xb)}if("regular"==O||"100%"==O){var Yb=f.total…
265O=this.shadowAlpha,Q=this.shadowColor,r=this.borderThickness,ia=this.bulletSize,H,u=this.fillAlpha…
266O,w),d.isModern?a.translate(1,1):a.translate(4,4),f.push(a)),q=d.rect(h,D,A,q,u,r,p,Z,w)):(t=[],w=…
277O=b.id,Q=1.1;isNaN(b.gapPeriod)||(Q=b.gapPeriod);var ia=b.periodValue;if(b.valueAxis.id==I){B.axes…
305O;x&&(y=r(10*y),z=r(10*z),C=r(10*C),L=r(10*L),A=r(10*A),B=r(10*B),D=r(10*D),w=r(10*w),b=r(10*b),l=…
[all …]
H A Dfunnel.js28 …C,l,1,u,0,E),0<g&&(p=e.line(b,[0,h,d+h],[f,f+k,f+k],u,g,t,D));else{var O,P,Q;N?(O=f/2,C=h/2,Q=f/2,…
29 …h/2)):(C=d/2,O=k/2,P=d/2,Q=f+k/2+1,r=Math.abs(d/2),w=Math.abs(k/2));J=r*y;L=w*y;.1<r&&.1<r&&(v=e.c…
H A Dserial.js64 …,l,1,p,0,r),0<n&&(L=e.line(b,[0,h,d+h],[g,g+f,g+f],p,n,m,z));else{var N,O,P;K?(N=g/2,t=h/2,P=g/2,O=
65O=d/2,P=g+f/2+1,E=Math.abs(d/2),H=Math.abs(f/2));I=E*q;J=H*q;.1<E&&.1<E&&(x=e.circle(b,E,v,l,m,p,n…
/plugin/amcharts/assets/amcharts/plugins/export/libs/FileSaver.js/
H A DFileSaver.min.js2O=function(){v(m,"writestart progress write writeend".split(" "))},E=function(){if((h||!d)&&(d=n()… function
/plugin/amcharts/assets/amcharts/plugins/export/libs/jszip/
H A Djszip.min.js13O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.sta…
14O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,ab=19,bb=20,cb=21,db=22,eb=23,fb=…
/plugin/amcharts/assets/amcharts/plugins/export/libs/pdfmake/
H A Dpdfmake.min.js1 …in(t.length-n,2);o>i;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(t,e,n,r){0>e&&(e=429… function
7O(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,r){return e=+e,n=0|n,r||B(this,e,n,4,42…
8O,null,e,n)}function si(t){var e=Se(arguments,!1,!1,1);return un(t,D,null,null,null,e)}function hi… variable
9O=function(t,e){switch(e){case s:return 10>t?10:27>t?12:14;case h:return 10>t?9:27>t?11:13;case u:… function
12O?L._tr_align(s):e!==P&&(L._tr_stored_block(s,0,0,!1),e===D&&(o(s.head),0===s.lookahead&&(s.strsta… variable
13O=0,D=0,U=0,P=0,F=0,z=null,W=0,N=new r.Buf16(i+1),j=new r.Buf16(i+1),H=null,Z=0;for(L=0;i>=L;L++)N…
14O,D,U,P,F,z,W,N,j,H,Z,G,q,Y,X,K;switch(T=new r,a=Object.keys(t).sort(function(t,e){return t-e}),e)…
16O,D,U,P,F,z,W;e.OP=L=0,e.CL=u=1,e.CP=c=2,e.QU=B=3,e.GL=p=4,e.NS=I=5,e.EX=d=6,e.SY=P=7,e.IS=b=8,e.P… variable
H A Dpdfmake.min.js.map1O,aAAe,SAAuB1H,EAAQmD,GAE7D,MADKA,IAAUX,EAAYxC,EAAQ,EAAGnI,KAAK8E,QACpCyG,EAAQoE,KAAK3P,KAAMmI,GAA…
/plugin/amcharts/assets/amcharts/plugins/export/libs/xlsx/
H A Dxlsx.js1769 var make_offcrypto = function(O, _crypto) { argument
1777 O.rc4 = function(key, data) {
1796 O.md5 = function(hex) { return crypto.createHash('md5').update(hex).digest('hex'); };
1798 O.md5 = function(hex) { throw "unimplemented"; };
H A Dxlsx.min.js3O,_crypto){var crypto;if(typeof _crypto!=="undefined")crypto=_crypto;else if(typeof require!=="und… argument
H A Dxlsx.min.map1O","_crypto","crypto","rc4","md5","hex","createHash","update","digest","parse_StrRun","ich","ifnt"…

12345678910>>...20