orbitchat 2.14.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ChartRenderer-B1mYF_kk.js +80 -0
- package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/assets/MermaidRenderer-Dhffx5mc.js +260 -0
- package/dist/assets/MusicRenderer-DbXJ8e4-.js +18 -0
- package/dist/assets/SVGRenderer-EhamRX_K.js +6 -0
- package/dist/assets/_basePickBy-C2AibBqo.js +1 -0
- package/dist/assets/_baseUniq-D52pUSvn.js +1 -0
- package/dist/assets/arc-BSnyvXPh.js +1 -0
- package/dist/assets/architectureDiagram-VXUJARFQ-BLMvVsZu.js +36 -0
- package/dist/assets/band-CquvqAHh.js +1 -0
- package/dist/assets/blockDiagram-VD42YOAC-CTz0dv5u.js +122 -0
- package/dist/assets/c4Diagram-YG6GDRKO-BjbN-GGh.js +10 -0
- package/dist/assets/channel-ryTtfXZE.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-DEMWGIsU.js +1 -0
- package/dist/assets/chunk-55IACEB6-BYaauHLT.js +1 -0
- package/dist/assets/chunk-B4BG7PRW-D3_GFcfd.js +165 -0
- package/dist/assets/chunk-DI55MBZ5-Dy2EuzfA.js +220 -0
- package/dist/assets/{chunk-FMBD7UC4-dPK7Boav-tO950uDG.js → chunk-FMBD7UC4-C9XHmwza.js} +2 -2
- package/dist/assets/chunk-QN33PNHL-BOCltIi9.js +1 -0
- package/dist/assets/chunk-QZHKN3VN-CvA964eQ.js +1 -0
- package/dist/assets/chunk-TZMSLE5B-B-3rZz90.js +1 -0
- package/dist/assets/classDiagram-2ON5EDUG-VbShFIzz.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-VbShFIzz.js +1 -0
- package/dist/assets/clone-BlhdKVDQ.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-CzPip3he.js +1 -0
- package/dist/assets/cytoscape.esm-CyJtwmzi.js +331 -0
- package/dist/assets/dagre-6UL2VRFP-CfCXYus3.js +4 -0
- package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/assets/diagram-PSM6KHXK-DyI2eDqp.js +24 -0
- package/dist/assets/diagram-QEK2KX5R-DuakIh40.js +43 -0
- package/dist/assets/diagram-S2PKOQOG-C3-4IORM.js +24 -0
- package/dist/assets/erDiagram-Q2GNP2WA-Dt-nZEaD.js +60 -0
- package/dist/assets/flowDiagram-NV44I4VS-B-2wjyTQ.js +162 -0
- package/dist/assets/ganttDiagram-JELNMOA3-CHTvjPq0.js +267 -0
- package/dist/assets/gitGraphDiagram-V2S2FVAM-d5GWmgY4.js +65 -0
- package/dist/assets/graph-COgkbiU8.js +1 -0
- package/dist/assets/index-DN2bBcCs.js +134 -0
- package/dist/assets/index-DtztdW2a.js +643 -0
- package/dist/assets/index-lGqyWNWb.css +1 -0
- package/dist/assets/infoDiagram-HS3SLOUP-30Hn0iLj.js +2 -0
- package/dist/assets/init-Dmth1JHB.js +1 -0
- package/dist/assets/journeyDiagram-XKPGCS4Q-CMOYXQ79.js +139 -0
- package/dist/assets/kanban-definition-3W4ZIXB7-dt3376cq.js +89 -0
- package/dist/assets/layout-DH97sy5g.js +1 -0
- package/dist/assets/linear-CKzVTQ0r.js +1 -0
- package/dist/assets/mindmap-definition-VGOIOE7T-BcZHPAlA.js +68 -0
- package/dist/assets/ordinal-DILIJJjt.js +1 -0
- package/dist/assets/pieDiagram-ADFJNKIX-DXjvgcgl.js +30 -0
- package/dist/assets/purify.es-A66Cw1IH.js +2 -0
- package/dist/assets/quadrantDiagram-AYHSOK5B-CICk2FdS.js +7 -0
- package/dist/assets/requirementDiagram-UZGBJVZJ-BdtxpQRA.js +64 -0
- package/dist/assets/sankeyDiagram-TZEHDZUN-BVNS9BQJ.js +10 -0
- package/dist/assets/sequenceDiagram-WL72ISMW-DF4fJTM7.js +145 -0
- package/dist/assets/stateDiagram-FKZM4ZOC-C8H8HujX.js +1 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-DwtU033b.js +1 -0
- package/dist/assets/step-EjIQ8UIn.js +1 -0
- package/dist/assets/time-h5EapSZu.js +1 -0
- package/dist/assets/timeline-definition-IT6M3QCI-DUSG5Vfy.js +61 -0
- package/dist/assets/treemap-GDKQZRPO-1PI2PY4S.js +160 -0
- package/dist/assets/xychartDiagram-PRI3JC2R-CFPJj8WK.js +7 -0
- package/dist/favicon.svg +3 -1
- package/dist/index.html +2 -2
- package/markdown-renderer/LICENSE +201 -0
- package/markdown-renderer/src/CodeBlock.tsx +332 -0
- package/markdown-renderer/src/MarkdownComponents.tsx +233 -0
- package/markdown-renderer/src/MarkdownStyles.css +668 -0
- package/markdown-renderer/src/css.d.ts +4 -0
- package/markdown-renderer/src/index.ts +32 -0
- package/markdown-renderer/src/preprocessing.ts +519 -0
- package/markdown-renderer/src/renderers/ChartRenderer.tsx +1434 -0
- package/markdown-renderer/src/renderers/MermaidRenderer.tsx +474 -0
- package/markdown-renderer/src/renderers/MusicRenderer.tsx +394 -0
- package/markdown-renderer/src/renderers/SVGRenderer.tsx +307 -0
- package/markdown-renderer/src/types.ts +174 -0
- package/package.json +25 -3
- package/dist/assets/_baseUniq-BRKsqoH--CzpIYnbF.js +0 -1
- package/dist/assets/arc-pab_su9s-DhurQhL4.js +0 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-DqQ8r_6g-eqA8fOch.js +0 -36
- package/dist/assets/blockDiagram-VD42YOAC-B-dKfcH3-DT3R176S.js +0 -122
- package/dist/assets/c4Diagram-YG6GDRKO-DMUPaBEl-q6bAZUce.js +0 -10
- package/dist/assets/channel-HKsfPa5q-DshlUHWu.js +0 -1
- package/dist/assets/chunk-4BX2VUAB-CX67kh_B-gkWPpLiy.js +0 -1
- package/dist/assets/chunk-55IACEB6-BocSyyvr-9ksZ29Ab.js +0 -1
- package/dist/assets/chunk-B4BG7PRW-CO8QAyfE-CNBeArXO.js +0 -165
- package/dist/assets/chunk-DI55MBZ5-Dw1L6Eos-BVbGVMNG.js +0 -220
- package/dist/assets/chunk-QN33PNHL-vP2PqfVG-Y3PYDsm9.js +0 -1
- package/dist/assets/chunk-QZHKN3VN-Bcidzu63-BAQ3PYro.js +0 -1
- package/dist/assets/chunk-TZMSLE5B-BtljMjlg-CwIvybWR.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-C7cYN9hv-CGN1Rq_o.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-C7cYN9hv-CGN1Rq_o.js +0 -1
- package/dist/assets/clone-DoPb9X13-C3rfr14F.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-BGzO4EsH-DtYXpCOp.js +0 -1
- package/dist/assets/cytoscape.esm-CjI2IsL8-Da6dFVsf.js +0 -331
- package/dist/assets/dagre-6UL2VRFP-TzNvXCds-xMthYtzg.js +0 -4
- package/dist/assets/diagram-PSM6KHXK-BqY4RpUg-CtQy_-7V.js +0 -24
- package/dist/assets/diagram-QEK2KX5R-CTjgBsne-DROkeGJL.js +0 -43
- package/dist/assets/diagram-S2PKOQOG-BqrhTIpA-Bv0e-7TM.js +0 -24
- package/dist/assets/erDiagram-Q2GNP2WA-B2hsi_Tl-BbvH-Jb1.js +0 -60
- package/dist/assets/flowDiagram-NV44I4VS-C03vtt_F-DT9Y-btb.js +0 -162
- package/dist/assets/ganttDiagram-JELNMOA3-B3hAg964-CnqUJtIB.js +0 -267
- package/dist/assets/gitGraphDiagram-NY62KEGX-ByhMH0yZ-CdQlDU7A.js +0 -65
- package/dist/assets/graph-BmNkcFEM-mCcAnvHY.js +0 -1
- package/dist/assets/index-BXexqYFc-D_cjFmh8.js +0 -134
- package/dist/assets/index-DBOy9259.css +0 -1
- package/dist/assets/index-zlswAhjt.js +0 -1010
- package/dist/assets/infoDiagram-WHAUD3N6-is6Ho4-T-BHS1wv7y.js +0 -2
- package/dist/assets/journeyDiagram-XKPGCS4Q-CRTOL26C-DkQ68DJ6.js +0 -139
- package/dist/assets/kanban-definition-3W4ZIXB7-CNnO_t6O-DWZm5JX4.js +0 -89
- package/dist/assets/layout-C0kZPebx-CygTh9Uo.js +0 -1
- package/dist/assets/min-7Gb0pNxh-BfuBtSqq.js +0 -1
- package/dist/assets/mindmap-definition-VGOIOE7T-CJZ2wTTa-B7rvUdG3.js +0 -68
- package/dist/assets/pieDiagram-ADFJNKIX-C9OSknjr-eiZAefZN.js +0 -30
- package/dist/assets/quadrantDiagram-AYHSOK5B-CW8yuAqv-DzBEpWQk.js +0 -7
- package/dist/assets/requirementDiagram-UZGBJVZJ-nGPhruO1-z5Z4Fwg9.js +0 -64
- package/dist/assets/sankeyDiagram-TZEHDZUN-CmL90u-m-Dk028WXo.js +0 -10
- package/dist/assets/sequenceDiagram-WL72ISMW-B02VRcnM-Cz8sPx_Q.js +0 -145
- package/dist/assets/stateDiagram-FKZM4ZOC-DjoyLUdz-BxsZBi1n.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-Bq76BTB7-BTybFIdr.js +0 -1
- package/dist/assets/timeline-definition-IT6M3QCI-CTn0Gm3T-CI07_-Ei.js +0 -61
- package/dist/assets/treemap-KMMF4GRG-BjgLKKyi-Dg9N7uMT.js +0 -128
- package/dist/assets/xychartDiagram-PRI3JC2R-Cgg6Uija-BDR2Lfu_.js +0 -7
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import{y as fs}from"./index-zlswAhjt.js";function ps(M,b){for(var v=0;v<b.length;v++){const l=b[v];if(typeof l!="string"&&!Array.isArray(l)){for(const r in l)if(r!=="default"&&!(r in M)){const i=Object.getOwnPropertyDescriptor(l,r);i&&Object.defineProperty(M,r,i.get?i:{enumerable:!0,get:()=>l[r]})}}}return Object.freeze(Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}))}var Ye,Rr;function ms(){if(Rr)return Ye;Rr=1;var M="6.6.0";return Ye=M,Ye}var We,qr;function Pr(){if(qr)return We;qr=1;var M=function(v,l){var r=this;if(l||(l={}),r.qpm=l.qpm?parseInt(l.qpm,10):null,!r.qpm){var i=v.metaText?v.metaText.tempo:null;r.qpm=v.getBpm(i)}r.extraMeasuresAtBeginning=l.extraMeasuresAtBeginning?parseInt(l.extraMeasuresAtBeginning,10):0,r.beatCallback=l.beatCallback,r.eventCallback=l.eventCallback,r.lineEndCallback=l.lineEndCallback,r.lineEndAnticipation=l.lineEndAnticipation?parseInt(l.lineEndAnticipation,10):0,r.beatSubdivisions=l.beatSubdivisions?parseInt(l.beatSubdivisions,10):1,r.beatSubdivisions||(r.beatSubdivisions=1),r.joggerTimer=null,r.replaceTarget=function(s){if(r.noteTimings=s.setTiming(r.qpm,r.extraMeasuresAtBeginning),s.noteTimings.length===0&&(r.noteTimings=s.setTiming(0,0)),r.lineEndCallback&&(r.lineEndTimings=b(s.noteTimings,r.lineEndAnticipation)),r.startTime=null,r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.currentTime=0,r.isPaused=!1,r.isRunning=!1,r.pausedPercent=null,r.justUnpaused=!1,r.newSeekPercent=0,r.lastTimestamp=0,r.noteTimings.length!==0){r.millisecondsPerBeat=1e3/(r.qpm/60)/r.beatSubdivisions,r.lastMoment=r.noteTimings[r.noteTimings.length-1].milliseconds;var c=s.getMeter(),f="";if(c&&c.type==="specified"&&c.value&&c.value.length>0&&c.value[0].num.indexOf("+")>0&&(f=c.value[0].num),r.beatStarts=[],f){for(var h=r.noteTimings[r.noteTimings.length-1].millisecondsPerMeasure,d=r.lastMoment/h,n=f.split("+"),t=0;t<n.length;t++)n[t]=parseInt(n[t],10)/2;for(var a=0,e=0,u=0;u<d;u++)for(var g=u*h,p=0,k=0;k<n.length;k++){var x=n[k];if(r.beatSubdivisions===1)r.beatSubdivisions===1&&a<r.lastMoment&&r.beatStarts.push({b:e,ts:a}),a+=x*r.millisecondsPerBeat;else for(var T=x*r.beatSubdivisions,j=0;j<Math.floor(T);j++){var O=j/T,m=Math.round(g+p*r.millisecondsPerBeat);m<r.lastMoment&&r.beatStarts.push({b:e+O,ts:m}),p++}e++}r.beatStarts.push({b:d*n.length,ts:r.lastMoment}),r.totalBeats=r.beatStarts.length}else{r.totalBeats=Math.round(r.lastMoment/r.millisecondsPerBeat);for(var E=0;E<r.totalBeats+1;E++)r.beatStarts.push({b:E/r.beatSubdivisions,ts:Math.round(E*r.millisecondsPerBeat)})}}},r.replaceTarget(v),r.doTiming=function(s){if(r.lastTimestamp!==s&&(r.lastTimestamp=s,!r.isPaused&&r.isRunning)){for(r.startTime||(r.startTime=s),r.currentTime=s-r.startTime,r.currentTime+=16;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;){if(r.eventCallback&&r.noteTimings[r.currentEvent].type==="event"){var c=r.startTime;r.eventCallback(r.noteTimings[r.currentEvent]),c!==r.startTime&&(r.currentTime=s-r.startTime)}r.currentEvent++}if(r.lineEndCallback&&r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds<r.currentTime&&r.currentEvent<r.noteTimings.length){var f=r.noteTimings[r.currentEvent].milliseconds===r.currentTime?r.noteTimings[r.currentEvent]:r.noteTimings[r.currentEvent-1];r.lineEndCallback(r.lineEndTimings[r.currentLine],f,{line:r.currentLine,endTimings:r.lineEndTimings,currentTime:r.currentTime}),r.currentLine++}if(r.currentTime<r.lastMoment){if(requestAnimationFrame(r.doTiming),r.currentBeat<r.beatStarts.length&&r.beatStarts[r.currentBeat].ts<=r.currentTime){var h=r.doBeatCallback(s);r.currentBeat++,h!==null&&(r.currentTime=h)}}else if(r.currentBeat<=r.totalBeats&&r.beatCallback){var d=r.doBeatCallback(s);r.currentBeat++,d!==null&&(r.currentTime=d),requestAnimationFrame(r.doTiming)}if(r.currentTime>=r.lastMoment)if(r.eventCallback){var n=r.eventCallback(null);r.shouldStop(n).then(function(t){t&&r.stop()})}else r.stop()}},r.shouldStop=function(s){return new Promise(function(c){if(!s)return c(!0);if(s==="continue")return c(!1);s.then&&s.then(function(f){c(f!=="continue")})})},r.doBeatCallback=function(s){if(r.beatCallback){for(var c=r.currentEvent;c<r.noteTimings.length&&r.noteTimings[c].left===null;)c++;var f,h;if(c<r.noteTimings.length){for(f=r.noteTimings[c].milliseconds,c=Math.max(0,r.currentEvent-1);c>=0&&r.noteTimings[c].left===null;)c--;h=r.noteTimings[c]}var d={},n={};if(h){d.top=h.top,d.height=h.height;var t=Math.max(0,s-r.startTime-h.milliseconds),a=f-h.milliseconds,e=h.endX-h.left,u=a?t*e/a:0;d.left=h.left+u,r.currentEvent===0&&h.milliseconds>s-r.startTime&&(d.left=void 0),n={timestamp:s,startTime:r.startTime,ev:h,endMs:f,offMs:t,offPx:u,gapMs:a,gapPx:e}}else n={timestamp:s,startTime:r.startTime};var g=r.startTime;if(r.beatCallback(r.beatStarts[r.currentBeat].b,r.totalBeats/r.beatSubdivisions,r.lastMoment,d,n),g!==r.startTime)return s-r.startTime}return null};var o=60;r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,o))},r.start=function(s,c){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,s===void 0&&(r.justUnpaused=!0)),s)r.setProgress(s,c);else if(s===0)r.reset();else if(r.pausedPercent!==null){var f=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=f-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,o)},r.pause=function(){r.isPaused=!0;var s=performance.now();r.pausedPercent=(s-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.currentMillisecond=function(){return r.currentTime},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(s,c){var f;switch(c){case"seconds":r.currentTime=s*1e3,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),f=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=s*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),f=r.currentTime/r.lastMoment;break;default:f=s,f<0&&(f=0),f>1&&(f=1),r.currentTime=r.lastMoment*f;break}r.isRunning||(r.pausedPercent=f);var h=performance.now();for(r.startTime=h-r.currentTime,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;)r.currentEvent++;if(r.lineEndCallback)for(r.currentLine=0;r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation<r.currentTime;)r.currentLine++;var d=r.currentBeat;for(r.currentBeat=0;r.currentBeat<r.beatStarts.length&&!(r.beatStarts[r.currentBeat].ts>r.currentTime);r.currentBeat++);r.currentBeat--,r.beatCallback&&d!==r.currentBeat&&(r.doBeatCallback(r.startTime+r.currentTime),r.currentBeat++),r.eventCallback&&r.currentEvent>=0&&r.noteTimings[r.currentEvent].type==="event"&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,o)}};function b(v,l){for(var r=[],i=null,o=0;o<v.length;o++){var s=v[o];s.type!=="end"&&s.top!==i&&(r.push({measureNumber:s.measureNumber,milliseconds:s.milliseconds-l,top:s.top,bottom:s.top+s.height}),i=s.top)}return r}return We=M,We}var Re,Ur;function gs(){if(Ur)return Re;Ur=1;var M=Pr(),b={};return function(){var v,l;b.startAnimation=function(r,i,o){v&&(v.stop(),v=void 0),o.showCursor&&(l=r.querySelector(".abcjs-cursor"),l||(l=document.createElement("DIV"),l.className="abcjs-cursor cursor",l.style.position="absolute",r.appendChild(l),r.style.position="relative"));function s(a){for(var e=0;e<a.length;e++){var u=a[e];u.classList.contains("abcjs-bar")||(u.style.display="none")}}var c;function f(a){if(c){var e=r.querySelectorAll(c);s(e)}c=a}function h(a){var e=r.querySelectorAll(a);s(e)}function d(a){o.hideCurrentMeasure?h(a):o.hideFinishedMeasures&&f(a)}function n(a){return".abcjs-l"+a.line+".abcjs-m"+a.measureNumber}function t(a){if(a){if(a.measureStart){var e=n(a);e&&d(e)}l&&(l.style.left=a.left+"px",l.style.top=a.top+"px",l.style.width=a.width+"px",l.style.height=a.height+"px")}else v.stop(),v=void 0}v=new M(i,{qpm:o.bpm,eventCallback:t}),v.start()},b.pauseAnimation=function(r){v&&(r?v.pause():v.start())},b.stopAnimation=function(){v&&(v.stop(),v=void 0)}}(),Re=b,Re}var qe,Xr;function Ce(){if(Xr)return qe;Xr=1;var M={};return M.cloneArray=function(b){for(var v=[],l=0;l<b.length;l++)v.push(Object.assign({},b[l]));return v},M.cloneHashOfHash=function(b){var v={};for(var l in b)b.hasOwnProperty(l)&&(v[l]=Object.assign({},b[l]));return v},M.cloneHashOfArrayOfHash=function(b){var v={};for(var l in b)b.hasOwnProperty(l)&&(v[l]=M.cloneArray(b[l]));return v},M.strip=function(b){return b.replace(/^\s+/,"").replace(/\s+$/,"")},M.startsWith=function(b,v){return b.indexOf(v)===0},M.endsWith=function(b,v){var l=b.length-v.length;return l>=0&&b.lastIndexOf(v)===l},M.last=function(b){return b.length===0?null:b[b.length-1]},qe=M,qe}var Ue,Kr;function Br(){if(Kr)return Ue;Kr=1;var M=Ce(),b={};return function(){var v,l,r,i,o;b.initialize=function(y,w,C,L,F){v=y,l=w,r=C,i=L,o=F,s()};function s(){r.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},i.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},i.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},i.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},i.formatting.annotationfont=r.annotationfont,i.formatting.gchordfont=r.gchordfont,i.formatting.historyfont=r.historyfont,i.formatting.infofont=r.infofont,i.formatting.measurefont=r.measurefont,i.formatting.partsfont=r.partsfont,i.formatting.repeatfont=r.repeatfont,i.formatting.textfont=r.textfont,i.formatting.tripletfont=r.tripletfont,i.formatting.vocalfont=r.vocalfont,i.formatting.wordsfont=r.wordsfont}var c={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},f=function(y){switch(y){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}},h=function(y,w,C,L,F){function V(){var de=parseInt(y[0].token);return y.shift(),w?y.length===0?{face:w.face,weight:w.weight,style:w.style,decoration:w.decoration,size:de}:y.length===1&&y[0].token==="box"&&c[F]?{face:w.face,weight:w.weight,style:w.style,decoration:w.decoration,size:de,box:!0}:(l("Extra parameters in font definition.",C,L),{face:w.face,weight:w.weight,style:w.style,decoration:w.decoration,size:de}):(l("Can't set just the size of the font since there is no default value.",C,L),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:de})}if(y[0].token==="*"){if(y.shift(),y[0].type==="number")return V();l("Expected font size number after *.",C,L)}if(y[0].type==="number")return V();for(var H=[],U,Q="normal",R="normal",te="none",ee=!1,se="face",X=!1;y.length;){var ie=y.shift(),$=ie.token.toLowerCase();switch(se){case"face":X||$!=="utf"&&ie.type!=="number"&&$!=="bold"&&$!=="italic"&&$!=="underline"&&$!=="box"?H.length>0&&ie.token==="-"?(X=!0,H[H.length-1]=H[H.length-1]+ie.token):X?(X=!1,H[H.length-1]=H[H.length-1]+ie.token):H.push(ie.token):ie.type==="number"?(U?l("Font size specified twice in font definition.",C,L):U=ie.token,se="modifier"):$==="bold"?Q="bold":$==="italic"?R="italic":$==="underline"?te="underline":$==="box"?(c[F]?ee=!0:l(`This font style doesn't support "box"`,C,L),se="finished"):$==="utf"?(ie=y.shift(),se="size"):l("Unknown parameter "+ie.token+" in font definition.",C,L);break;case"size":ie.type==="number"?U?l("Font size specified twice in font definition.",C,L):U=ie.token:l("Expected font size in font definition.",C,L),se="modifier";break;case"modifier":$==="bold"?Q="bold":$==="italic"?R="italic":$==="underline"?te="underline":$==="box"?(c[F]?ee=!0:l(`This font style doesn't support "box"`,C,L),se="finished"):l("Unknown parameter "+ie.token+" in font definition.",C,L);break;case"finished":l('Extra characters found after "box" in font definition.',C,L);break}}U===void 0?w?U=w.size:(l("Must specify the size of the font since there is no default value.",C,L),U=12):U=parseFloat(U),H=H.join(" "),H===""&&(w?H=w.face:(l("Must specify the name of the font since there is no default value.",C,L),H="sans-serif"));var oe=f(H),ce={};return oe?(ce.face=oe.face,ce.weight=oe.weight,ce.style=oe.style,ce.decoration=oe.decoration,ce.size=U,ee&&(ce.box=!0),ce):(ce.face=H,ce.weight=Q,ce.style=R,ce.decoration=te,ce.size=U,ee&&(ce.box=!0),ce)},d=function(y,w,C){return w.length===0?'Directive "'+y+'" requires a font as a parameter.':(r[y]=h(w,r[y],C,0,y),r.is_in_header&&(i.formatting[y]=r[y]),null)},n=function(y,w,C){return w.length===0?'Directive "'+y+'" requires a font as a parameter.':(i.formatting[y]=h(w,i.formatting[y],C,0,y),null)},t=function(y,w){var C="";w.forEach(function(F){C+=F.token});var L=parseFloat(C);if(isNaN(L)||L===0)return'Directive "'+y+'" requires a number as a parameter.';i.formatting.scale=L},a=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],e=function(y){var w=y.split(/\s+/);if(w.length!==2&&w.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var C=w[0],L=parseInt(w[1],10);if((isNaN(L)||L<35||L>81)&&w[1]&&(L=a.indexOf(w[1].toLowerCase())+35),isNaN(L)||L<35||L>81)return{error:'Expected drum name, received "'+w[1]+'"'};var F={sound:L};return w.length===3&&(F.noteHead=w[2]),{key:C,value:F}},u=function(y,w){var C=v.getMeasurement(w);return C.used===0||w.length!==0?{error:'Directive "'+y+'" requires a measurement as a parameter.'}:C.value},g=function(y,w){var C=v.getMeasurement(w);return C.used===0||w.length!==0?'Directive "'+y+'" requires a measurement as a parameter.':(i.formatting[y]=C.value,null)},p=function(y,w,C,L,F){if(C.length!==1||C[0].type!=="number")return'Directive "'+w+'" requires a number as a parameter.';var V=C[0].intt;return L!==void 0&&V<L?'Directive "'+w+'" requires a number greater than or equal to '+L+" as a parameter.":F!==void 0&&V>F?'Directive "'+w+'" requires a number less than or equal to '+F+" as a parameter.":(r[y]=V,null)},k=function(y,w,C){if(C.length===1&&(C[0].token==="true"||C[0].token==="false"))return r[y]=C[0].token==="true",null;var L=p(y,w,C,0,1);return L!==null?L:(r[y]=r[y]===1,null)},x=function(y,w,C,L){if(C.length!==1)return'Directive "'+w+'" requires one of [ '+L.join(", ")+" ] as a parameter.";for(var F=C[0].token,V=!1,H=0;!V&&H<L.length;H++)L[H]===F&&(V=!0);return V?(r[y]=F,null):'Directive "'+w+'" requires one of [ '+L.join(", ")+" ] as a parameter."},T=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],j=["gchord","ptstress","beatstring"],O=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],m=["program"],E=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],P=["beat"],A=["drone"],N=["portamento"],D=["expand","grace","trim"],_=["drum","chordname"],S=["bassprog","chordprog"],B=function(y,w,C){var L=y.shift().token,F=[];if(T.indexOf(L)>=0)y.length!==0&&l("Unexpected parameter in MIDI "+L,C,0);else if(j.indexOf(L)>=0)y.length!==1?l("Expected one parameter in MIDI "+L,C,0):F.push(y[0].token);else if(O.indexOf(L)>=0)y.length!==1?l("Expected one parameter in MIDI "+L,C,0):y[0].type!=="number"?l("Expected one integer parameter in MIDI "+L,C,0):F.push(y[0].intt);else if(m.indexOf(L)>=0)y.length!==1&&y.length!==2?l("Expected one or two parameters in MIDI "+L,C,0):y[0].type!=="number"||y.length===2&&y[1].type!=="number"?l("Expected integer parameter in MIDI "+L,C,0):(F.push(y[0].intt),y.length===2&&F.push(y[1].intt));else if(E.indexOf(L)>=0)y.length!==2?l("Expected two parameters in MIDI "+L,C,0):y[0].type!=="number"||y[1].type!=="number"?l("Expected two integer parameters in MIDI "+L,C,0):(F.push(y[0].intt),F.push(y[1].intt));else if(N.indexOf(L)>=0)y.length!==2?l("Expected two parameters in MIDI "+L,C,0):y[0].type!=="alpha"||y[1].type!=="number"?l("Expected one string and one integer parameters in MIDI "+L,C,0):(F.push(y[0].token),F.push(y[1].intt));else if(L==="drummap")y.length===2&&y[0].type==="alpha"&&y[1].type==="number"?(w.formatting||(w.formatting={}),w.formatting.midi||(w.formatting.midi={}),w.formatting.midi.drummap||(w.formatting.midi.drummap={}),w.formatting.midi.drummap[y[0].token]=y[1].intt,F=w.formatting.midi.drummap):y.length===3&&y[0].type==="punct"&&y[1].type==="alpha"&&y[2].type==="number"?(w.formatting||(w.formatting={}),w.formatting.midi||(w.formatting.midi={}),w.formatting.midi.drummap||(w.formatting.midi.drummap={}),w.formatting.midi.drummap[y[0].token+y[1].token]=y[2].intt,F=w.formatting.midi.drummap):l("Expected one note name and one integer parameter in MIDI "+L,C,0);else if(D.indexOf(L)>=0)y.length!==3||y[0].type!=="number"||y[1].token!=="/"||y[2].type!=="number"?l("Expected fraction parameter in MIDI "+L,C,0):(F.push(y[0].intt),F.push(y[2].intt));else if(P.indexOf(L)>=0)y.length!==4?l("Expected four parameters in MIDI "+L,C,0):y[0].type!=="number"||y[1].type!=="number"||y[2].type!=="number"||y[3].type!=="number"?l("Expected four integer parameters in MIDI "+L,C,0):(F.push(y[0].intt),F.push(y[1].intt),F.push(y[2].intt),F.push(y[3].intt));else if(A.indexOf(L)>=0)y.length!==5?l("Expected five parameters in MIDI "+L,C,0):y[0].type!=="number"||y[1].type!=="number"||y[2].type!=="number"||y[3].type!=="number"||y[4].type!=="number"?l("Expected five integer parameters in MIDI "+L,C,0):(F.push(y[0].intt),F.push(y[1].intt),F.push(y[2].intt),F.push(y[3].intt),F.push(y[4].intt));else if(m.indexOf(L)>=0)y.length!==1||y.length!==4?l("Expected one or two parameters in MIDI "+L,C,0):y[0].type!=="number"?l("Expected integer parameter in MIDI "+L,C,0):y.length===4?(y[1].token!=="octave"&&l("Expected octave parameter in MIDI "+L,C,0),y[2].token!=="="&&l("Expected octave parameter in MIDI "+L,C,0),y[3].type!=="number"&&l("Expected integer parameter for octave in MIDI "+L,C,0)):(F.push(y[0].intt),y.length===4&&F.push(y[3].intt));else if(_.indexOf(L)>=0)if(y.length<2)l("Expected string parameter and at least one integer parameter in MIDI "+L,C,0);else if(y[0].type!=="alpha")l("Expected string parameter and at least one integer parameter in MIDI "+L,C,0);else{var V=y.shift();for(F.push(V.token);y.length>0;)V=y.shift(),V.type!=="number"&&l("Expected integer parameter in MIDI "+L,C,0),F.push(V.intt)}else if(S.indexOf(L)>=0){if(y.length!==1&&y.length!==2)l("Expected one or two parameters in MIDI "+L,C,0);else if(y[0].type!=="number")l("Expected integer parameter in MIDI "+L,C,0);else if(y.length===2&&y[1].type!=="alpha")l("Expected alpha parameter in MIDI "+L,C,0);else if(F.push(y[0].intt),y.length===2){var H=y[1].token;H.indexOf("octave=")!=-1?(H=H.replace("octave=",""),H=parseInt(H),isNaN(H)?l("Expected octave value in MIDI"+L):(H<-1&&(l("Expected octave= in MIDI "+L+" to be >= -1 (recv:"+H+")"),H=-1),H>3&&(l("Expected octave= in MIDI "+L+" to be <= 3 (recv:"+H+")"),H=3),F.push(H))):l("Expected octave= in MIDI"+L)}}o.hasBeginMusic()?o.appendElement("midi",-1,-1,{cmd:L,params:F}):(w.formatting.midi===void 0&&(w.formatting.midi={}),w.formatting.midi[L]=F)};b.parseFontChangeLine=function(y){y=y.replace(/\$\$/g,"");var w=y.split("$");if(w.length>1&&r.setfont){var C=[];w[0]!==""&&C.push({text:w[0]});for(var L=1;L<w.length;L++)if(w[L][0]==="0")C.push({text:w[L].substring(1).replace(/\x03/g,"$$")});else{var F=parseInt(w[L][0],10);r.setfont[F]?C.push({font:r.setfont[F],text:w[L].substring(1).replace(/\x03/g,"$$")}):C[C.length-1].text+="$"+w[L].replace(/\x03/g,"$$")}return C}return y.replace(/\x03/g,"$$")};var I=["auto","above","below","hidden"];b.addDirective=function(y){var w=v.tokenize(y,0,y.length);if(w.length===0||w[0].type!=="alpha")return null;var C=y.substring(y.indexOf(w[0].token)+w[0].token.length);C=v.stripComment(C);var L=w.shift().token.toLowerCase(),F="",V;switch(L){case"bagpipes":i.formatting.bagpipes=!0;break;case"flatbeams":i.formatting.flatbeams=!0;break;case"jazzchords":i.formatting.jazzchords=!0;break;case"accentAbove":i.formatting.accentAbove=!0;break;case"germanAlphabet":i.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=C;break;case"graceslurs":if(w.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(w[0].token==="0"||w[0].token==="false")i.formatting.graceSlurs=!1;else if(w[0].token==="1"||w[0].token==="true")i.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+w[0].token+")";break;case"lineThickness":var H=z(w);if(H.value!==void 0&&(i.formatting.lineThickness=H.value),H.error)return H.error;break;case"stretchlast":var U=z(w);if(U.value!==void 0&&(i.formatting.stretchlast=U.value),U.error)return U.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":i.formatting.titleleft=!0;break;case"measurebox":i.formatting.measurebox=!0;break;case"vocal":return x("vocalPosition",L,w,I);case"dynamic":return x("dynamicPosition",L,w,I);case"gchord":return x("chordPosition",L,w,I);case"ornament":return x("ornamentPosition",L,w,I);case"volume":return x("volumePosition",L,w,I);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return g(L,w);case"voicescale":if(w.length!==1||w[0].type!=="number")return"voicescale requires one float as a parameter";var Q=w.shift();return r.currentVoice&&(r.currentVoice.scale=Q.floatt,o.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(w.length!==1)return"voicecolor requires one string as a parameter";var R=w.shift();return r.currentVoice&&(r.currentVoice.color=R.token,o.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var te=Math.round(u(L,w));return te.error?te.error:(o.addSpacing(te),null);case"scale":t(L,w);break;case"sep":if(w.length===0)o.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var ee=v.getMeasurement(w);if(ee.used===0)return'Directive "'+L+'" requires 3 numbers: space above, space below, length of line';var se=ee.value;if(ee=v.getMeasurement(w),ee.used===0)return'Directive "'+L+'" requires 3 numbers: space above, space below, length of line';var X=ee.value;if(ee=v.getMeasurement(w),ee.used===0||w.length!==0)return'Directive "'+L+'" requires 3 numbers: space above, space below, length of line';var ie=ee.value;o.addSeparator(se,X,ie,{startChar:r.iChar,endChar:r.iChar+C.length})}break;case"barsperstaff":if(F=p("barsperstaff",L,w),F!==null)return F;break;case"staffnonote":if(w.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(w[0].token==="0")r.staffnonote=!0;else if(w[0].token==="1")r.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+w[0].token+")";break;case"printtempo":if(F=k("printTempo",L,w),F!==null)return F;break;case"partsbox":if(F=k("partsBox",L,w),F!==null)return F;r.partsfont.box=r.partsBox;break;case"freegchord":if(F=k("freegchord",L,w),F!==null)return F;break;case"measurenb":case"barnumbers":if(F=p("barNumbers",L,w),F!==null)return F;break;case"setbarnb":if(w.length!==1||w[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=o.setBarNumberImmediate(w[0].intt);break;case"keywarn":if(w.length!==1||w[0].type!=="number"||w[0].intt!==1&&w[0].intt!==0)return"Directive "+L+" requires 0 or 1 as a parameter.";r[L]=w[0].intt===1;break;case"begintext":var $="";for(V=v.nextLine();V&&V.indexOf("%%endtext")!==0;){if(M.startsWith(V,"%%")){var oe=V.substring(2);oe=oe.trim()+`
|
|
2
|
-
`,$+=oe}else $+=V.trim()+`
|
|
3
|
-
`;V=v.nextLine()}o.addText($,{startChar:r.iChar,endChar:r.iChar+$.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(V=v.nextLine();V&&V.indexOf("%%endps")!==0;)v.nextLine();l("Postscript ignored",y,0);break;case"deco":C.length>0&&r.ignoredDecorations.push(C.substring(0,C.indexOf(" "))),l("Decoration redefinition ignored",y,0);break;case"text":var ce=v.translateString(C);o.addText(b.parseFontChangeLine(ce),{startChar:r.iChar,endChar:r.iChar+C.length+7});break;case"center":var de=v.translateString(C);o.addCentered(b.parseFontChangeLine(de));break;case"font":break;case"setfont":var he=v.tokenize(C,0,C.length);if(he.length>=4&&he[0].token==="-"&&he[1].type==="number"){var ve=parseInt(he[1].token);ve>=1&&ve<=9&&(r.setfont||(r.setfont=[]),he.shift(),he.shift(),r.setfont[ve]=h(he,r.setfont[ve],y,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 d(L,w,y);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return n(L,w,y);case"barlabelfont":case"barnumberfont":case"barnumfont":return d("measurefont",w,y);case"staves":case"score":r.score_is_present=!0;for(var ge=function(ze,us,Yr,Wr,ds){(us||r.staves.length===0)&&r.staves.push({index:r.staves.length,numVoices:0});var Pe=M.last(r.staves);Yr!==void 0&&Pe.bracket===void 0&&(Pe.bracket=Yr),Wr!==void 0&&Pe.brace===void 0&&(Pe.brace=Wr),ds&&(Pe.connectBarLines="end"),r.voices[ze]===void 0&&(r.voices[ze]={staffNum:Pe.index,index:Pe.numVoices},Pe.numVoices++)},ye=!1,Y=!1,q=!1,G=!1,W=!1,K=!1,J=!1,re,le=function(){if(J=!0,re){var ze="start";re.staffNum>0&&(r.staves[re.staffNum-1].connectBarLines==="start"||r.staves[re.staffNum-1].connectBarLines==="continue")&&(ze="continue"),r.staves[re.staffNum].connectBarLines=ze}};w.length;){var Z=w.shift();switch(Z.token){case"(":ye?l("Can't nest parenthesis in %%score",y,Z.start):(ye=!0,G=!0);break;case")":!ye||G?l("Unexpected close parenthesis in %%score",y,Z.start):ye=!1;break;case"[":Y?l("Can't nest brackets in %%score",y,Z.start):(Y=!0,W=!0);break;case"]":!Y||W?l("Unexpected close bracket in %%score",y,Z.start):(Y=!1,r.staves[re.staffNum].bracket="end");break;case"{":q?l("Can't nest braces in %%score",y,Z.start):(q=!0,K=!0);break;case"}":!q||K?l("Unexpected close brace in %%score",y,Z.start):(q=!1,r.staves[re.staffNum].brace="end");break;case"|":le();break;default:for(var ae="";(Z.type==="alpha"||Z.type==="number")&&(ae+=Z.token,Z.continueId);)Z=w.shift();var pe=!ye||G,me=W?"start":Y?"continue":void 0,ne=K?"start":q?"continue":void 0;ge(ae,pe,me,ne,J),G=!1,W=!1,K=!1,J=!1,re=r.voices[ae],L==="staves"&&le();break}}break;case"maxstaves":var fe=v.getInt(C);fe.digits===0?l("Expected number of staves in maxstaves"):fe.value>0&&(i.formatting.maxStaves=fe.value);break;case"newpage":var be=v.getInt(C);o.addNewPage(be.digits===0?-1:be.value);break;case"abc":var ue=C.split(" ");switch(ue[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var _e=ue.shift();o.addMetaText(L+_e,ue.join(" "),{startChar:r.iChar,endChar:r.iChar+C.length+5});break;default:return"Unknown directive: "+L+ue[0]}break;case"header":case"footer":var xe=v.getMeat(C,0,C.length);xe=C.substring(xe.start,xe.end),xe[0]==='"'&&xe[xe.length-1]==='"'&&(xe=xe.substring(1,xe.length-1));var ke=xe.split(" "),Oe={};ke.length===1?Oe={left:"",center:ke[0],right:""}:ke.length===2?Oe={left:ke[0],center:ke[1],right:""}:Oe={left:ke[0],center:ke[1],right:ke[2]},ke.length>3&&l("Too many tabs in "+L+": "+ke.length+" found.",C,0),o.addMetaTextObj(L,Oe,{startChar:r.iChar,endChar:r.iChar+y.length});break;case"midi":var Ee=v.tokenize(C,0,C.length,!0);Ee.length>0&&Ee[0].token==="="&&Ee.shift(),Ee.length===0?l("Expected midi command",C,0):B(Ee,i,C);break;case"percmap":var Ae=e(C);Ae.error?l(Ae.error,y,8):(i.formatting.percmap||(i.formatting.percmap={}),i.formatting.percmap[Ae.key]=Ae.value);break;case"visualtranspose":var De=v.getInt(C);De.digits===0?l("Expected number of half steps in visualTranspose"):r.globalTranspose=De.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":i.formatting[L]=C;break;default:return"Unknown directive: "+L}return null},b.globalFormatting=function(y){for(var w in y)if(y.hasOwnProperty(w)){var C=""+y[w],L=v.tokenize(C,0,C.length),F;switch(w){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":d(w,L,C);break;case"scale":t(w,L);break;case"partsbox":F=k("partsBox",w,L),F!==null&&l(F),r.partsfont.box=r.partsBox;break;case"freegchord":F=k("freegchord",w,L),F!==null&&l(F);break;case"fontboxpadding":(L.length!==1||L[0].type!=="number")&&l('Directive "'+w+'" requires a number as a parameter.'),i.formatting.fontboxpadding=L[0].floatt;break;case"stafftopmargin":(L.length!==1||L[0].type!=="number")&&l('Directive "'+w+'" requires a number as a parameter.'),i.formatting.stafftopmargin=L[0].floatt;break;case"stretchlast":var V=z(L);if(V.value!==void 0&&(i.formatting.stretchlast=V.value),V.error)return V.error;break;default:l("Formatting directive unrecognized: ",w,0)}}};function z(y){if(y.length===0)return{value:1};if(y.length===1)if(y[0].type==="number"){if(y[0].floatt>=0||y[0].floatt<=1)return{value:y[0].floatt}}else{if(y[0].token==="false")return{value:0};if(y[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+y[0].token+")"}}}(),Ue=b,Ue}var Xe,$r;function vs(){if($r)return Xe;$r=1;var M={};const b=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];return M.pitchIndex=function(v){return b.indexOf(v)},M.noteName=function(v){return b[v]},Xe=M,Xe}var Ke,Qr;function Li(){if(Qr)return Ke;Qr=1;var M=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],b=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],v=["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"];function r(i,o,s,c){if(!o||o%12===0)return i;for(;o<0;)o+=12;o>11&&(o=o%12);var f=i.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!f)return i;var h=f[1],d=f[2],n=f[3],t=f[4],a=M.indexOf(h);if(a<0&&(a=b.indexOf(h)),a<0&&(a=v.indexOf(h)),a<0&&(a=l.indexOf(h)),a<0)return i;a+=o,a=a%12,s?c?i=l[a]:i=b[a]:c?i=v[a]:i=M[a];var e=d&&(d.indexOf("dim")>=0||d.indexOf("°")>=0);if(e&&i==="A#"&&(i="Bb"),e&&i==="D#"&&(i="Eb"),e&&i==="A♯"&&(i="B♭"),e&&i==="D♯"&&(i="E♭"),d&&(i+=d),n){var a=M.indexOf(n);a<0&&(a=b.indexOf(n)),a<0&&(a=v.indexOf(n)),a<0&&(a=l.indexOf(n)),i+="/",a>=0?(a+=o,a=a%12,s?c?i+=l[a]:i+=b[a]:c?i+=v[a]:i+=M[a]):i+=n}return t&&(i+=t),i}return Ke=r,Ke}var $e,Jr;function ji(){if(Jr)return $e;Jr=1;var M={C:{modes:["CMaj","CIon","Amin","AAeo","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","DbIon","Bbmin","BbAeo","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","DIon","Bmin","BAeo","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","EbIon","Cmin","CAeo","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","EIon","C#min","C#Aeo","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","FIon","Dmin","DAeo","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","GbIon","Ebmin","EbAeo","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","GIon","Emin","EAeo","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","AbIon","Fmin","FAeo","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","AIon","F#min","F#Aeo","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","BbIon","Gmin","GAeo","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","BIon","G#min","G#Aeo","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","C#Ion","A#min","A#Aeo","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","F#Ion","D#min","D#Aeo","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","CbIon","Abmin","AbAeo","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},b=["maj","ion","min","aeo","m","mix","dor","phr","lyd","loc"];function v(c){return b.indexOf(c.toLowerCase())>=0}var l=null;function r(){l={};for(var c=Object.keys(M),f=0;f<c.length;f++){var h=M[c[f]];l[c[f].toLowerCase()]=c[f];for(var d=0;d<h.modes.length;d++){var n=h.modes[d].toLowerCase();l[n]=c[f]}}}function i(c){l||r();var f=c.toLowerCase().match(/([a-g][b#]?)(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)?/);if(!f||!f[2])return c;f=f[1]+f[2];var h=l[f];return h||c}function o(c,f){var h=M[c];if(!h||f==="")return c;var d=f.toLowerCase().match(/^(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)/);if(!d)return c;for(var n=d[1],t=0;t<h.modes.length;t++){var a=h.modes[t],e=a.toLowerCase().indexOf(n);if(e!==-1&&e===a.length-n.length)return a.substring(0,a.length-n.length)}return c}function s(c,f){var h=M[c];if(!h)return c;for(;f<0;)f+=12;for(var d=(h.stepsFromC+f)%12,n=0;n<Object.keys(M).length;n++){var t=Object.keys(M)[n];if(M[t].stepsFromC===d)return t}return c}return $e={relativeMajor:i,relativeMode:o,transposeKey:s,isLegalMode:v},$e}var Qe,Zr;function Ii(){if(Zr)return Qe;Zr=1;var{relativeMajor:M}=ji(),b={acc:"sharp",note:"f"},v={acc:"sharp",note:"c"},l={acc:"sharp",note:"g"},r={acc:"sharp",note:"d"},i={acc:"sharp",note:"A"},o={acc:"sharp",note:"e"},s={acc:"sharp",note:"B"},c={acc:"flat",note:"B"},f={acc:"flat",note:"e"},h={acc:"flat",note:"A"},d={acc:"flat",note:"d"},n={acc:"flat",note:"G"},t={acc:"flat",note:"c"},a={acc:"flat",note:"F"},e={"C#":[b,v,l,r,i,o,s],"F#":[b,v,l,r,i,o],B:[b,v,l,r,i],E:[b,v,l,r],A:[b,v,l],D:[b,v],G:[b],C:[],F:[c],Bb:[c,f],Eb:[c,f,h],Cm:[c,f,h],Ab:[c,f,h,d],Db:[c,f,h,d,n],Gb:[c,f,h,d,n,t],Cb:[c,f,h,d,n,t,a],"A#":[c,f],"B#":[],"D#":[c,f,h],"E#":[c],"G#":[c,f,h,d],none:[]};function u(g){var p=e[M(g)];return p?JSON.parse(JSON.stringify(p)):null}return Qe=u,Qe}var Je,en;function Di(){if(en)return Je;en=1;var M=vs(),b=Li(),v=Ii(),l={},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"],o=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];l.keySignature=function(n,t,a,e,u){if(n.clef.type==="perc"||n.clef.type==="none")return{accidentals:v(t),root:a,acc:e};u||(u=0),n.localTransposeVerticalMovement=0,n.localTransposePreferFlats=!1;var g=v(t);if(!g)return n.key;if(n.localTranspose=(n.globalTranspose?n.globalTranspose:0)+u,!n.localTranspose)return{accidentals:g,root:a,acc:e};if(n.globalTransposeOrigKeySig=g,n.localTranspose%12===0)return n.localTransposeVerticalMovement=n.localTranspose/12*7,{accidentals:g,root:a,acc:e};var p=t[0];t[1]==="b"||t[1]==="#"?(p+=t[1],t=t.substr(2)):t=t.substr(1);var k=r[p],x=k!==void 0;x||(k=0,p="C",t="");for(var T=k+n.localTranspose;T<0;)T+=12;T>11&&(T=T%12);var j=t[0]==="m"?o[T]:i[T],O=j+t,m=v(O);(m.length===0||m[0].acc==="flat")&&(n.localTransposePreferFlats=!0);var E=O.charCodeAt(0)-p.charCodeAt(0);return n.localTranspose>0?(E<0||E===0&&(p[1]==="#"||O[1]==="b"))&&(E+=7):n.localTranspose<0&&(E>0||E===0&&(p[1]==="b"||O[1]==="#"))&&(E-=7),n.localTranspose>0?n.localTransposeVerticalMovement=E+Math.floor(n.localTranspose/12)*7:n.localTransposeVerticalMovement=E+Math.ceil(n.localTranspose/12)*7,x?{accidentals:m,root:j[0],acc:j.length>1?j[1]:""}:{accidentals:[],root:a,acc:e}},l.chordName=function(n,t){return b(t,n.localTranspose,n.localTransposePreferFlats,n.freegchord)};var s=["c","d","e","f","g","a","b"];function c(n,t,a,e,u){for(var g=s[(n+49)%7],p=0,k=0;k<e.length;k++)e[k].note.toLowerCase()===g&&(p=f[e[k].acc]);for(var x=f[a],T=x-p,j=s[(t+49)%7],O=0,m=0;m<u.accidentals.length;m++)u.accidentals[m].note.toLowerCase()===j&&(O=f[u.accidentals[m].acc]);var E=T+O;return E<-2&&(t--,E+=j==="c"||j==="f"?1:2),E>2&&(t++,E-=j==="b"||j==="e"?1:2),[t,E]}var f={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},h={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},d={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return l.note=function(n,t){if(!(!n.localTranspose||n.clef.type==="perc")){var a=t.pitch;if(n.localTransposeVerticalMovement&&(t.pitch=t.pitch+n.localTransposeVerticalMovement,t.name)){var e=t.accidental?t.name.substring(1):t.name,u=t.accidental?t.name[0]:"",g=M.pitchIndex(e);t.name=u+M.noteName(g+n.localTransposeVerticalMovement)}if(t.accidental){var p=c(a,t.pitch,t.accidental,n.globalTransposeOrigKeySig,n.targetKey);t.pitch=p[0],t.accidental=h[p[1]],t.name&&(t.name=d[p[1]]+t.name.replace(/[_^=]/g,""))}}},Je=l,Je}var Ze,tn;function Nr(){if(tn)return Ze;tn=1;var M=Br(),b=Di(),v={};return function(){var l,r,i,o;v.initialize=function(t,a,e,u,g){l=t,r=a,i=e,o=g},v.standardKey=function(t,a,e,u){return b.keySignature(i,t,a,e,u)};var s={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(t,a){var e=s[t],u=e?e.mid:0;return u+a};v.fixClef=function(t){var a=s[t.type];a&&(t.clefPos=a.pitch,t.type=a.clef)},v.deepCopyKey=function(t){var a={accidentals:[],root:t.root,acc:t.acc,mode:t.mode};return t.accidentals.forEach(function(e){a.accidentals.push(Object.assign({},e))}),a};var f={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};v.addPosToKey=function(t,a){var e=t.verticalPos;a.accidentals.forEach(function(u){var g=f[u.note];g=g-e,u.verticalPos=g}),a.impliedNaturals&&a.impliedNaturals.forEach(function(u){var g=f[u.note];g=g-e,u.verticalPos=g}),e<-10?(a.accidentals.forEach(function(u){u.verticalPos-=7,(u.verticalPos>=11||u.verticalPos===10&&u.acc==="flat")&&(u.verticalPos-=7),u.note==="A"&&u.acc==="sharp"&&(u.verticalPos-=7),(u.note==="G"||u.note==="F")&&u.acc==="flat"&&(u.verticalPos-=7)}),a.impliedNaturals&&a.impliedNaturals.forEach(function(u){u.verticalPos-=7,(u.verticalPos>=11||u.verticalPos===10&&u.acc==="flat")&&(u.verticalPos-=7),u.note==="A"&&u.acc==="sharp"&&(u.verticalPos-=7),(u.note==="G"||u.note==="F")&&u.acc==="flat"&&(u.verticalPos-=7)})):e<-4?(a.accidentals.forEach(function(u){u.verticalPos-=7,e===-8&&(u.note==="f"||u.note==="g")&&u.acc==="sharp"&&(u.verticalPos-=7)}),a.impliedNaturals&&a.impliedNaturals.forEach(function(u){u.verticalPos-=7,e===-8&&(u.note==="f"||u.note==="g")&&u.acc==="sharp"&&(u.verticalPos-=7)})):e>=7&&(a.accidentals.forEach(function(u){u.verticalPos+=7}),a.impliedNaturals&&a.impliedNaturals.forEach(function(u){u.verticalPos+=7}))},v.fixKey=function(t,a){var e=Object.assign({},a);return v.addPosToKey(t,e),e};var h=function(t){var a=0,e=t[a++];(e==="^"||e==="_")&&(e=t[a++]);var u=f[e];for(u===void 0&&(u=6);a<t.length;a++)if(t[a]===",")u-=7;else if(t[a]==="'")u+=7;else break;return{mid:u-6,str:t.substring(a)}},d=function(t){for(var a=0;a<t.length;a++)t[a].note==="b"?t[a].note="B":t[a].note==="a"?t[a].note="A":t[a].note==="F"?t[a].note="f":t[a].note==="E"?t[a].note="e":t[a].note==="D"?t[a].note="d":t[a].note==="C"?t[a].note="c":t[a].note==="G"&&t[a].acc==="sharp"?t[a].note="g":t[a].note==="g"&&t[a].acc==="flat"&&(t[a].note="G")};v.parseKey=function(t,a){t.length===0&&(t="none");var e=l.tokenize(t,0,t.length),u={};if(e.length===0)return r("Must pass in key signature.",t,0),u;switch(e[0].token){case"HP":M.addDirective("bagpipes"),i.key={root:"HP",accidentals:[],acc:"",mode:""},u.foundKey=!0,e.shift();break;case"Hp":M.addDirective("bagpipes"),i.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},u.foundKey=!0,e.shift();break;case"none":i.key={root:"none",accidentals:[],acc:"",mode:""},u.foundKey=!0,e.shift();break;default:var g=l.getKeyPitch(e[0].token);if(g.len>0){u.foundKey=!0;var p="",k="";e[0].token.length>1?e[0].token=e[0].token.substring(1):e.shift();var x=g.token;if(e.length>0){var T=l.getSharpFlat(e[0].token);if(T.len>0&&(e[0].token.length>1?e[0].token=e[0].token.substring(1):e.shift(),x+=T.token,p=T.token),e.length>0){var j=l.getMode(e[0].token);j.len>0&&(e.shift(),x+=j.token,k=j.token)}if(v.standardKey(x,g.token,p,0)===void 0)return r("Unsupported key signature: "+x,t,0),u}var O=v.deepCopyKey(i.key),m=!a&&i.globalTranspose?-i.globalTranspose:0,E;if(a&&(E=i.globalTransposeOrigKeySig),i.key=v.deepCopyKey(v.standardKey(x,g.token,p,m)),a&&(i.globalTransposeOrigKeySig=E),i.key.mode=k,O&&i.keywarn!==!1){for(var P,A=0;A<i.key.accidentals.length;A++)for(P=0;P<O.accidentals.length;P++)O.accidentals[P].note&&i.key.accidentals[A].note.toLowerCase()===O.accidentals[P].note.toLowerCase()&&(O.accidentals[P].note=null);for(P=0;P<O.accidentals.length;P++)O.accidentals[P].note&&(i.key.impliedNaturals||(i.key.impliedNaturals=[]),i.key.impliedNaturals.push({acc:"natural",note:O.accidentals[P].note}))}}break}if(e.length===0||(e[0].token==="exp"&&e.shift(),e.length===0)||(e[0].token==="oct"&&e.shift(),e.length===0))return u;var N=l.getKeyAccidentals2(e);if(N.warn&&r(N.warn,t,0),N.accs){u.foundKey||(u.foundKey=!0,i.key={root:"none",acc:"",mode:"",accidentals:[]}),d(N.accs);for(var D=0;D<N.accs.length;D++){for(var _=!1,S=0;S<i.key.accidentals.length&&!_;S++)i.key.accidentals[S].note===N.accs[D].note&&(_=!0,i.key.accidentals[S].acc!==N.accs[D].acc&&(i.key.accidentals[S].acc=N.accs[D].acc,i.key.explicitAccidentals||(i.key.explicitAccidentals=[]),i.key.explicitAccidentals.push(N.accs[D])));if(!_&&(i.key.explicitAccidentals||(i.key.explicitAccidentals=[]),i.key.explicitAccidentals.push(N.accs[D]),i.key.accidentals.push(N.accs[D]),i.key.impliedNaturals))for(var B=0;B<i.key.impliedNaturals.length;B++)i.key.impliedNaturals[B].note===N.accs[D].note&&i.key.impliedNaturals.splice(B,1)}}for(var I;e.length>0;)switch(e[0].token){case"m":case"middle":if(e.shift(),e.length===0)return r("Expected = after middle",t,0),u;if(I=e.shift(),I.token!=="="){r("Expected = after middle",t,I.start);break}if(e.length===0)return r("Expected parameter after middle=",t,0),u;var z=l.getPitchFromTokens(e);z.warn&&r(z.warn,t,0),z.position&&(i.clef.verticalPos=z.position-6);break;case"transpose":if(e.shift(),e.length===0)return r("Expected = after transpose",t,0),u;if(I=e.shift(),I.token!=="="){r("Expected = after transpose",t,I.start);break}if(e.length===0)return r("Expected parameter after transpose=",t,0),u;if(e[0].type!=="number"){r("Expected number after transpose",t,e[0].start);break}i.clef.transpose=e[0].intt,e.shift();break;case"stafflines":if(e.shift(),e.length===0)return r("Expected = after stafflines",t,0),u;if(I=e.shift(),I.token!=="="){r("Expected = after stafflines",t,I.start);break}if(e.length===0)return r("Expected parameter after stafflines=",t,0),u;if(e[0].type!=="number"){r("Expected number after stafflines",t,e[0].start);break}i.clef.stafflines=e[0].intt,e.shift();break;case"staffscale":if(e.shift(),e.length===0)return r("Expected = after staffscale",t,0),u;if(I=e.shift(),I.token!=="="){r("Expected = after staffscale",t,I.start);break}if(e.length===0)return r("Expected parameter after staffscale=",t,0),u;if(e[0].type!=="number"){r("Expected number after staffscale",t,e[0].start);break}i.clef.staffscale=e[0].floatt,e.shift();break;case"octave":if(e.shift(),e.length===0)return r("Expected = after octave",t,0),u;if(I=e.shift(),I.token!=="="){r("Expected = after octave",t,I.start);break}if(e.length===0)return r("Expected parameter after octave=",t,0),u;if(e[0].type!=="number"){r("Expected number after octave",t,e[0].start);break}i.octave=e[0].intt,e.shift();break;case"style":if(e.shift(),e.length===0)return r("Expected = after style",t,0),u;if(I=e.shift(),I.token!=="="){r("Expected = after style",t,I.start);break}if(e.length===0)return r("Expected parameter after style=",t,0),u;switch(e[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":i.style=e[0].token,e.shift();break;default:r("error parsing style element: "+e[0].token,t,e[0].start);break}break;case"clef":if(e.shift(),e.length===0)return r("Expected = after clef",t,0),u;if(I=e.shift(),I.token!=="="){r("Expected = after clef",t,I.start);break}if(e.length===0)return r("Expected parameter after clef=",t,0),u;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var y=e.shift();switch(y.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":y.token="alto";break;case"F":y.token="bass";break;case"G":y.token="treble";break;case"c":y.token="alto";break;case"f":y.token="bass";break;case"g":y.token="treble";break;default:r("Expected clef name. Found "+y.token,t,y.start);break}e.length>0&&e[0].type==="number"&&(y.token+=e[0].token,e.shift()),e.length>1&&(e[0].token==="-"||e[0].token==="+"||e[0].token==="^"||e[0].token==="_")&&e[1].token==="8"&&(y.token+=e[0].token+e[1].token,e.shift(),e.shift()),i.clef={type:y.token,verticalPos:c(y.token,0)},i.currentVoice&&i.currentVoice.transpose!==void 0&&(i.clef.transpose=i.currentVoice.transpose),u.foundClef=!0;break;default:r("Unknown parameter: "+e[0].token,t,e[0].start),e.shift()}return u};var n=function(t){var a=i.voices[t];if(!(i.currentVoice&&i.currentVoice.index===a.index&&i.currentVoice.staffNum===a.staffNum))return i.currentVoice=a,o.setCurrentVoice(a.staffNum,a.index,t)};v.parseVoice=function(t,a,e){var u=l.getMeat(t,a,e),g=u.start,p=u.end,k=l.getToken(t,g,p);if(k.length===0){r("Expected a voice id",t,g);return}var x=!1;i.voices[k]===void 0&&(i.voices[k]={},x=!0,i.score_is_present&&r("Can't have an unknown V: id when the %score directive is present",t,g)),g+=k.length,g+=l.eatWhiteSpace(t,g);for(var T={startStaff:x},j=function(z){var y=l.getVoiceToken(t,g,p);y.warn!==void 0?r("Expected value for "+z+" in voice: "+y.warn,t,g):y.err!==void 0?r("Expected value for "+z+" in voice: "+y.err,t,g):y.token.length===0&&t[g]!=='"'?r("Expected value for "+z+" in voice",t,g):T[z]=y.token,g+=y.len},O=function(z,y,w){var C=l.getVoiceToken(t,g,p);C.warn!==void 0?r("Expected value for "+y+" in voice: "+C.warn,t,g):C.err!==void 0?r("Expected value for "+y+" in voice: "+C.err,t,g):C.token.length===0&&t[g]!=='"'?r("Expected value for "+y+" in voice",t,g):(C.token=parseFloat(C.token),i.voices[z][y]=C.token),g+=C.len},m=function(z,y){var w=l.getVoiceToken(t,g,p);if(w.warn!==void 0)r("Expected value for "+z+" in voice: "+w.warn,t,g);else if(w.err!==void 0)r("Expected value for "+z+" in voice: "+w.err,t,g);else if(w.token.length===0&&t[g]!=='"')r("Expected value for "+z+" in voice",t,g);else return w.token;g+=w.len},E=function(z,y){var w={_B:2,_E:9,_b:-10,_e:-3},C=l.getVoiceToken(t,g,p);if(C.warn!==void 0)r("Expected one of (_B, _E, _b, _e) for "+y+" in voice: "+C.warn,t,g);else if(C.token.length===0&&t[g]!=='"')r("Expected one of (_B, _E, _b, _e) for "+y+" in voice",t,g);else{var L=w[C.token];L?i.voices[z][y]=L:r("Expected one of (_B, _E, _b, _e) for "+y+" in voice",t,g)}g+=C.len};g<p;){var P=l.getVoiceToken(t,g,p);if(g+=P.len,P.warn)r("Error parsing voice: "+P.warn,t,g);else{var A=null;switch(P.token){case"clef":case"cl":j("clef");var N=0;T.clef!==void 0&&(T.clef=T.clef.replace(/[',]/g,""),T.clef.indexOf("+16")!==-1&&(N+=14,T.clef=T.clef.replace("+16","")),T.verticalPos=c(T.clef,N));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,,":case"treble+8":case"treble-8":case"treble^8":case"treble_8":case"treble1":case"treble2":case"treble3":case"treble4":case"treble5":case"bass+8":case"bass-8":case"bass^8":case"bass_8":case"bass+16":case"bass-16":case"bass^16":case"bass_16":case"bass1":case"bass2":case"bass3":case"bass4":case"bass5":case"tenor1":case"tenor2":case"tenor3":case"tenor4":case"tenor5":case"alto1":case"alto2":case"alto3":case"alto4":case"alto5":case"alto+8":case"alto-8":case"alto^8":case"alto_8":var D=0;T.clef=P.token.replace(/[',]/g,""),T.verticalPos=c(T.clef,D),i.voices[k].clef=P.token;break;case"staves":case"stave":case"stv":j("staves");break;case"brace":case"brc":j("brace");break;case"bracket":case"brk":j("bracket");break;case"name":case"nm":j("name");break;case"subname":case"sname":case"snm":j("subname");break;case"merge":T.startStaff=!1;break;case"stem":case"stems":A=l.getVoiceToken(t,g,p),A.warn!==void 0?r("Expected value for stems in voice: "+A.warn,t,g):A.err!==void 0?r("Expected value for stems in voice: "+A.err,t,g):A.token==="up"||A.token==="down"?i.voices[k].stem=A.token:r("Expected up or down for voice stem",t,g),g+=A.len;break;case"up":case"down":i.voices[k].stem=P.token;break;case"middle":case"m":j("verticalPos"),T.verticalPos=h(T.verticalPos).mid;break;case"gchords":case"gch":i.voices[k].suppressChords=!0,A=l.getVoiceToken(t,g,p),A.token==="0"&&(g=g+A.len);break;case"space":case"spc":j("spacing");break;case"scale":O(k,"scale");break;case"score":E(k,"scoreTranspose");break;case"transpose":O(k,"transpose");break;case"stafflines":O(k,"stafflines");break;case"staffscale":O(k,"staffscale");break;case"octave":O(k,"octave");break;case"volume":O(k,"volume");break;case"cue":var _=m("cue");_==="on"?i.voices[k].scale=.6:i.voices[k].scale=1;break;case"style":A=l.getVoiceToken(t,g,p),A.warn!==void 0?r("Expected value for style in voice: "+A.warn,t,g):A.err!==void 0?r("Expected value for style in voice: "+A.err,t,g):A.token==="normal"||A.token==="harmonic"||A.token==="rhythm"||A.token==="x"||A.token==="triangle"?i.voices[k].style=A.token:r("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",t,g),g+=A.len;break}}g+=l.eatWhiteSpace(t,g)}if((T.startStaff||i.staves.length===0)&&(i.staves.push({index:i.staves.length,meter:i.origMeter}),i.score_is_present||(i.staves[i.staves.length-1].numVoices=0)),i.voices[k].staffNum===void 0){i.voices[k].staffNum=i.staves.length-1;var S=0;for(var B in i.voices)i.voices.hasOwnProperty(B)&&i.voices[B].staffNum===i.voices[k].staffNum&&S++;i.voices[k].index=S-1}var I=i.staves[i.voices[k].staffNum];return i.score_is_present||I.numVoices++,T.clef&&(I.clef={type:T.clef,verticalPos:T.verticalPos}),T.spacing&&(I.spacing_below_offset=T.spacing),T.verticalPos&&(I.verticalPos=T.verticalPos),T.name&&(I.name?I.name.push(T.name):I.name=[T.name]),T.subname&&(I.subname?I.subname.push(T.subname):I.subname=[T.subname]),n(k)}}(),Ze=v,Ze}var et,rn;function bs(){if(rn)return et;rn=1;var M=Ce(),b=Br(),v=Nr(),l=function(r,i,o,s,c){this.reset=function(d,n,t,a){v.initialize(d,n,t,a,c),b.initialize(d,n,t,a,c)},this.reset(r,i,o,s),this.setTitle=function(d,n){o.hasMainTitle?c.addSubtitle(d,{startChar:o.iChar,endChar:o.iChar+n+2}):(c.addMetaText("title",d,{startChar:o.iChar,endChar:o.iChar+n+2}),o.hasMainTitle=!0)},this.setMeter=function(d){if(d=r.stripComment(d),d==="C")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"common_time"};if(d==="C|")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"cut_time"};if(d==="o")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"tempus_perfectum"};if(d==="c")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"tempus_imperfectum"};if(d==="o.")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if(d==="c.")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(d.length===0||d.toLowerCase()==="none")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),null;var n=r.tokenize(d,0,d.length);try{var t=function(){var k={value:0,num:""},x=n.shift();for(x.token==="("&&(x=n.shift());;){if(x.type!=="number")throw"Expected top number of meter";if(k.value+=parseInt(x.token),k.num+=x.token,n.length===0||n[0].token==="/")return k;if(x=n.shift(),x.token===")"){if(n.length===0||n[0].token==="/")return k;throw"Unexpected paren in meter"}if(x.token!=="."&&x.token!=="+"||(k.num+=x.token,n.length===0))throw"Expected top number of meter";x=n.shift()}return k},a=function(){var k=t();if(n.length===0)return k;var x=n.shift();if(x.token!=="/")throw"Expected slash in meter";if(x=n.shift(),x.type!=="number")throw"Expected bottom number of meter";return k.den=x.token,k.value=k.value/parseInt(k.den),k};if(n.length===0)throw"Expected meter definition in M: line";for(var e={type:"specified",value:[]},u=0;;){var g=a();u+=g.value;var p={num:g.num};if(g.den!==void 0&&(p.den=g.den),e.value.push(p),n.length===0)break}return o.havent_set_length===!0&&(o.default_length=u<.75?.0625:.125,o.havent_set_length=!1),e}catch(k){i(k,d,0)}return null},this.calcTempo=function(d){var n=.25;o.meter&&o.meter.type==="specified"?n=1/parseInt(o.meter.value[0].den):o.origMeter&&o.origMeter.type==="specified"&&(n=1/parseInt(o.origMeter.value[0].den));for(var t=0;t<d.duration;t++)d.duration[t]=n*d.duration[t];return d},this.resolveTempo=function(){o.tempo&&(this.calcTempo(o.tempo),s.metaText.tempo=o.tempo,delete o.tempo)},this.addUserDefinition=function(d,n,t){var a=d.indexOf("=",n);if(a===-1){i("Need an = in a macro definition",d,n);return}var e=M.strip(d.substring(n,a)),u=M.strip(d.substring(a+1));if(e.length!==1){i("Macro definitions can only be one character",d,n);return}var g="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~";if(g.indexOf(e)===-1){i("Macro definitions must be H-Y, h-w, or tilde",d,n);return}if(u.length===0){i("Missing macro definition",d,n);return}o.macros===void 0&&(o.macros={}),o.macros[e]=u},this.setDefaultLength=function(d,n,t){var a=d.substring(n,t).replace(/ /g,""),e=a.split("/");if(e.length===2){var u=parseInt(e[0]),g=parseInt(e[1]);g>0&&(o.default_length=u/g,o.havent_set_length=!1)}else e.length===1&&e[0]==="1"&&(o.default_length=1,o.havent_set_length=!1)};var f={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(d,n,t,a){try{var e=r.tokenize(d,n,t);if(e.length===0)throw"Missing parameter in Q: field";var u={startChar:a+n-2,endChar:a+t},g=!0,p=e.shift();if(p.type==="quote"&&(u.preString=p.token,p=e.shift(),e.length===0))return f[u.preString.toLowerCase()]&&(u.bpm=f[u.preString.toLowerCase()],u.suppressBpm=!0),{type:"immediate",tempo:u};if(p.type==="alpha"&&p.token==="C"){if(e.length===0)throw"Missing tempo after C in Q: field";if(p=e.shift(),p.type==="punct"&&p.token==="="){if(e.length===0)throw"Missing tempo after = in Q: field";if(p=e.shift(),p.type!=="number")throw"Expected number after = in Q: field";u.duration=[1],u.bpm=parseInt(p.token)}else if(p.type==="number"){if(u.duration=[parseInt(p.token)],e.length===0)throw"Missing = after duration in Q: field";if(p=e.shift(),p.type!=="punct"||p.token!=="=")throw"Expected = after duration in Q: field";if(e.length===0)throw"Missing tempo after = in Q: field";if(p=e.shift(),p.type!=="number")throw"Expected number after = in Q: field";u.bpm=parseInt(p.token)}else throw"Expected number or equal after C in Q: field"}else if(p.type==="number"){var k=parseInt(p.token);if(e.length===0||e[0].type==="quote")u.duration=[1],u.bpm=k;else{if(g=!1,p=e.shift(),p.type!=="punct"&&p.token!=="/"||(p=e.shift(),p.type!=="number"))throw"Expected fraction in Q: field";var x=parseInt(p.token);for(u.duration=[k/x];e.length>0&&e[0].token!=="="&&e[0].type!=="quote";){if(p=e.shift(),p.type!=="number"||(k=parseInt(p.token),p=e.shift(),p.type!=="punct"&&p.token!=="/")||(p=e.shift(),p.type!=="number"))throw"Expected fraction in Q: field";x=parseInt(p.token),u.duration.push(k/x)}if(p=e.shift(),p.type!=="punct"&&p.token!=="=")throw"Expected = in Q: field";if(p=e.shift(),p.type!=="number")throw"Expected tempo in Q: field";u.bpm=parseInt(p.token)}}else throw"Unknown value in Q: field";if(e.length!==0&&(p=e.shift(),p.type==="quote"&&(u.postString=p.token,p=e.shift()),e.length!==0))throw"Unexpected string at end of Q: field";return o.printTempo===!1&&(u.suppress=!0),{type:g?"delaySet":"immediate",tempo:u}}catch(T){return i(T,d,n),{type:"none"}}},this.letter_to_inline_header=function(d,n,t){var a=!1,e=r.eatWhiteSpace(d,n);if(n+=e,d.length>=n+5&&d[n]==="["&&d[n+2]===":"){var u=d.indexOf("]",n),g=o.iChar+n,p=o.iChar+u+1;switch(d.substring(n,n+3)){case"[I:":var k=b.addDirective(d.substring(n+3,u));return k&&i(k,d,n),[u-n+1+e];case"[M:":var x=this.setMeter(d.substring(n+3,u));return c.hasBeginMusic()&&x?c.appendStartingElement("meter",g,p,x):o.meter=x,[u-n+1+e];case"[K:":var T=v.parseKey(d.substring(n+3,u),!0);return T.foundClef&&c.hasBeginMusic()&&c.appendStartingElement("clef",g,p,o.clef),T.foundKey&&c.hasBeginMusic()&&c.appendStartingElement("key",g,p,v.fixKey(o.clef,o.key)),[u-n+1+e];case"[P:":var j=b.parseFontChangeLine(d.substring(n+3,u));return t||s.lines.length<=s.lineNum?o.partForNextLine={title:j,startChar:g,endChar:p}:c.appendElement("part",g,p,{title:j}),[u-n+1+e];case"[L:":return this.setDefaultLength(d,n+3,u),[u-n+1+e];case"[Q:":if(u>0){var O=this.setTempo(d,n+3,u,o.iChar);return O.type==="delaySet"?c.hasBeginMusic()?c.appendElement("tempo",g,p,this.calcTempo(O.tempo)):o.tempoForNextLine=["tempo",g,p,this.calcTempo(O.tempo)]:O.type==="immediate"&&(!t&&c.hasBeginMusic()?c.appendElement("tempo",g,p,O.tempo):o.tempoForNextLine=["tempo",g,p,O.tempo]),[u-n+1+e,d[n+1],d.substring(n+3,u)]}break;case"[V:":if(u>0)return a=v.parseVoice(d,n+3,u),[u-n+1+e,d[n+1],d.substring(n+3,u),a];break;case"[r:":return[u-n+1+e]}}return[0]},this.letter_to_body_header=function(d,n){var t=!1;if(d.length>=n+3)switch(d.substring(n,n+2)){case"I:":var a=b.addDirective(d.substring(n+2));return a&&i(a,d,n),[d.length];case"M:":var e=this.setMeter(d.substring(n+2));return c.hasBeginMusic()&&e&&c.appendStartingElement("meter",o.iChar+n,o.iChar+d.length,e),[d.length];case"K:":var u=v.parseKey(d.substring(n+2),c.hasBeginMusic());return u.foundClef&&c.hasBeginMusic()&&o.keywarn!==!1&&c.appendStartingElement("clef",o.iChar+n,o.iChar+d.length,o.clef),u.foundKey&&c.hasBeginMusic()&&o.keywarn!==!1&&c.appendStartingElement("key",o.iChar+n,o.iChar+d.length,v.fixKey(o.clef,o.key)),[d.length];case"P:":return c.hasBeginMusic()&&c.appendElement("part",o.iChar+n,o.iChar+d.length,{title:d.substring(n+2)}),[d.length];case"L:":return this.setDefaultLength(d,n+2,d.length),[d.length];case"Q:":var g=d.indexOf("",n+2);g===-1&&(g=d.length);var p=this.setTempo(d,n+2,g,o.iChar);return p.type==="delaySet"?c.appendElement("tempo",o.iChar+n,o.iChar+d.length,this.calcTempo(p.tempo)):p.type==="immediate"&&c.appendElement("tempo",o.iChar+n,o.iChar+d.length,p.tempo),[g,d[n],M.strip(d.substring(n+2))];case"V:":return t=v.parseVoice(d,n+2,d.length),[d.length,d[n],M.strip(d.substring(n+2)),t]}return[0]};var h={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(d){var n=h[d[0]],t=d.length-2,a=r.translateString(r.stripComment(d.substring(2)));if(n==="unalignedWords"||n==="notes")c.addMetaTextArray(n,b.parseFontChangeLine(a),{startChar:o.iChar,endChar:o.iChar+d.length});else if(n!==void 0)c.addMetaText(n,b.parseFontChangeLine(a),{startChar:o.iChar,endChar:o.iChar+d.length});else{var e=o.iChar,u=e+d.length;switch(d[0]){case"H":for(c.addMetaTextArray("history",b.parseFontChangeLine(a),{startChar:o.iChar,endChar:o.iChar+d.length}),d=r.peekLine();d&&d[1]!==":";)r.nextLine(),c.addMetaTextArray("history",b.parseFontChangeLine(r.translateString(r.stripComment(d))),{startChar:o.iChar,endChar:o.iChar+d.length}),d=r.peekLine();break;case"K":this.resolveTempo();var g=v.parseKey(d.substring(2),!1);!o.is_in_header&&c.hasBeginMusic()&&o.keywarn!==!1&&(g.foundClef&&c.appendStartingElement("clef",e,u,o.clef),g.foundKey&&c.appendStartingElement("key",e,u,v.fixKey(o.clef,o.key))),o.is_in_header=!1;break;case"L":this.setDefaultLength(d,2,d.length);break;case"M":o.origMeter=o.meter=this.setMeter(d.substring(2));break;case"P":o.is_in_header?c.addMetaText("partOrder",b.parseFontChangeLine(a),{startChar:o.iChar,endChar:o.iChar+d.length}):o.partForNextLine={title:a,startChar:e,endChar:u};break;case"Q":var p=this.setTempo(d,2,d.length,o.iChar);p.type==="delaySet"?o.tempo=p.tempo:p.type==="immediate"&&(s.metaText.tempo?o.tempoForNextLine=["tempo",e,u,p.tempo]:s.metaText.tempo=p.tempo);break;case"T":o.titlecaps&&(a=a.toUpperCase()),this.setTitle(b.parseFontChangeLine(r.theReverser(a)),t);break;case"U":this.addUserDefinition(d,2,d.length);break;case"V":if(v.parseVoice(d,2,d.length),!o.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":i("Ignored header",d,0);break;default:return{regular:!0}}}return{}}};return et=l,et}var Te={},nn;function ys(){return nn||(nn=1,Te.legalAccents=["trill","trillh","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x","style=triangle","D.C.alcoda","D.C.alfine","D.S.alcoda","D.S.alfine","editorial","courtesy"],Te.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],Te.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],Te.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],Te.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],Te.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",Te.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],Te.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},Te.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},Te.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},Te.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),Te}var tt,an;function ks(){if(an)return tt;an=1;var M=Nr(),b=Di(),v,l,r,i,o,s,{legalAccents:c,volumeDecorations:f,dynamicDecorations:h,accentPseudonyms:d,accentDynamicPseudonyms:n,nonDecorations:t,durations:a,pitches:e,rests:u,accMap:g,tripletQ:p}=ys(),k=function(y,w,C,L,F,V){v=y,l=w,r=C,i=L,o=F,s=V,this.lineContinuation=!1},x=function(y,w,C){if(y.inTie[w]===void 0)return!1;var L=y.currentVoice?y.currentVoice.staffNum*100+y.currentVoice.index:0;return!!(y.inTie[w][L]&&(C.pitches!==void 0||C.rest.type!=="spacer"))},T={};k.prototype.parseMusic=function(y){s.resolveTempo(),r.is_in_header=!1;for(var w=0,C=r.iChar;v.isWhiteSpace(y[w])&&w<y.length;)w++;if(!(w===y.length||y[w]==="%")){var L=r.start_new_line;r.continueall===void 0?r.start_new_line=!0:r.start_new_line=!1;var F=0,V=s.letter_to_body_header(y,w);V[0]>0&&(w+=V[0],V[1]==="V"&&this.startNewLine());for(var H=0;w<y.length;){var U=w;if(y[w]==="%")break;var Q=s.letter_to_inline_header(y,w,L);if(Q[0]>0)w+=Q[0],Q[1]==="V"&&(L=!0);else{(!o.hasBeginMusic()||L&&!this.lineContinuation)&&(this.startNewLine(),L=!1);for(var R;;)if(R=v.eatWhiteSpace(y,w),R>0&&(w+=R),w>0&&y[w-1]===""&&(R=s.letter_to_body_header(y,w),R[0]>0&&(R[1]==="V"&&this.startNewLine(),w=R[0],r.start_new_line=!1)),R=N(y,w),R[0]>0&&(w+=R[0]),R=O(y,w),R[0]>0){T.chord||(T.chord=[]);var te=v.translateString(R[1]);te=te.replace(/;/g,`
|
|
4
|
-
`);for(var ee=!1,se=0;se<T.chord.length;se++)T.chord[se].position===R[2]&&(ee=!0,T.chord[se].name+=`
|
|
5
|
-
`+te);ee===!1&&(R[2]===null&&R[3]?T.chord.push({name:te,rel_position:R[3]}):T.chord.push({name:te,position:R[2]})),w+=R[0];var X=v.skipWhiteSpace(y.substring(w));X>0&&(T.force_end_beam_last=!0),w+=X}else if(t.indexOf(y[w])===-1?R=A(y,w):R=[0],R[0]>0)R[1]===null?w+1<y.length&&this.startNewLine():R[1].length>0&&(R[1].indexOf("style=")===0?T.style=R[1].substr(6):(T.decoration===void 0&&(T.decoration=[]),R[1]==="beambr1"?T.beambr=1:R[1]==="beambr2"?T.beambr=2:T.decoration.push(R[1]))),w+=R[0];else if(R=m(y,w),R[0]>0)T.gracenotes=R[1],w+=R[0];else break;if(R=D(y,w),R[0]>0){H=0,T.gracenotes!==void 0&&(T.rest={type:"spacer"},T.duration=.125,r.addFormattingOptions(T,i.formatting,"note"),o.appendElement("note",C+w,C+w+R[0],T),r.measureNotEmpty=!0,T={});var ie={type:R[1]};ie.type.length===0?l("Unknown bar type",y,w):(r.inEnding&&ie.type!=="bar_thin"&&(ie.endEnding=!0,r.inEnding=!1),R[2]&&(ie.startEnding=R[2],r.inEnding&&(ie.endEnding=!0),r.inEnding=!0,R[1]==="bar_right_repeat"?r.restoreStartEndingHoldOvers():r.duplicateStartEndingHoldOvers()),T.decoration!==void 0&&(ie.decoration=T.decoration),T.chord!==void 0&&(ie.chord=T.chord),ie.startEnding&&r.barFirstEndingNum===void 0?r.barFirstEndingNum=r.currBarNumber:ie.startEnding&&ie.endEnding&&r.barFirstEndingNum?r.currBarNumber=r.barFirstEndingNum:ie.endEnding&&(r.barFirstEndingNum=void 0),ie.type!=="bar_invisible"&&r.measureNotEmpty&&z()&&(r.currBarNumber++,r.barNumbers&&r.currBarNumber%r.barNumbers===0&&(ie.barNumber=r.currBarNumber)),r.addFormattingOptions(T,i.formatting,"bar"),o.appendElement("bar",C+U,C+w+R[0],ie),r.measureNotEmpty=!1,T={}),w+=R[0]}else if(y[w]==="&")R=E(y,w),R[0]>0&&(o.appendElement("overlay",C,C+1,{}),w+=1,H++);else{if(R=_(y,w),R.consumed>0&&(R.startSlur!==void 0&&(T.startSlur=R.startSlur),R.dottedSlur&&(T.dottedSlur=!0),R.triplet!==void 0&&(F>0?l("Can't nest triplets",y,w):(T.startTriplet=R.triplet,T.tripletMultiplier=R.tripletQ/R.triplet,T.tripletR=R.num_notes,F=R.num_notes===void 0?R.triplet:R.num_notes)),w+=R.consumed),y[w]==="["){w++;for(var $=null,oe=!1,ce=!1;!ce;){var de=A(y,w);de[0]>0&&(w+=de[0]);var he=B(y,w,{},!1);if(he!==null&&he.pitch!==void 0)de[0]>0&&de[1].indexOf("style=")!==0&&(T.decoration===void 0&&(T.decoration=[]),T.decoration.push(de[1])),he.end_beam&&(T.end_beam=!0,delete he.end_beam),T.pitches===void 0?(T.duration=he.duration,T.pitches=[he]):T.pitches.push(he),delete he.duration,de[0]>0&&de[1].indexOf("style=")===0&&(T.pitches[T.pitches.length-1].style=de[1].substr(6)),r.inTieChord[T.pitches.length]&&(he.endTie=!0,r.inTieChord[T.pitches.length]=void 0),he.startTie&&(r.inTieChord[T.pitches.length]=!0),w=he.endChar,delete he.endChar;else if(y[w]===" ")l("Spaces are not allowed in chords",y,w),w++;else{if(w<y.length&&y[w]==="]"){w++,r.next_note_duration!==0&&(T.duration=T.duration*r.next_note_duration,r.next_note_duration=0),x(r,H,T)&&(T.pitches.forEach(function(K){K.endTie=!0}),j(r,H,!1)),F>0&&!(T.rest&&T.rest.type==="spacer")&&(F--,F===0&&(T.endTriplet=!0));for(var ve=!1;w<y.length&&!ve;){switch(y[w]){case" ":case" ":S(T);break;case")":T.endSlur===void 0?T.endSlur=1:T.endSlur++;break;case"-":T.pitches.forEach(function(K){K.startTie={}}),j(r,H,!0);break;case">":case"<":var ge=I(y,w);w+=ge[0]-1,r.next_note_duration=ge[2],$?$=$*ge[1]:$=ge[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var ye=v.getFraction(y,w);$=ye.value,w=ye.index;var Y=y[w];Y===" "&&(oe=!0),Y==="-"||Y===")"||Y===" "||Y==="<"||Y===">"?w--:ve=!0;break;case"0":$=0;break;default:ve=!0;break}ve||w++}}else l("Expected ']' to end the chords",y,w);T.pitches!==void 0&&($!==null&&(T.duration=T.duration*$,oe&&S(T)),r.addFormattingOptions(T,i.formatting,"note"),o.appendElement("note",C+U,C+w,T),r.measureNotEmpty=!0,T={}),ce=!0}}}else{var q={},G=B(y,w,q,!0);if(q.endTie!==void 0&&j(r,H,!0),G!==null){G.pitch!==void 0?(T.pitches=[{}],G.accidental!==void 0&&(T.pitches[0].accidental=G.accidental),T.pitches[0].pitch=G.pitch,T.pitches[0].name=G.name,(G.midipitch||G.midipitch===0)&&(T.pitches[0].midipitch=G.midipitch),G.endSlur!==void 0&&(T.pitches[0].endSlur=G.endSlur),G.endTie!==void 0&&(T.pitches[0].endTie=G.endTie),G.startSlur!==void 0&&(T.pitches[0].startSlur=G.startSlur),T.startSlur!==void 0&&(T.pitches[0].startSlur=T.startSlur),T.dottedSlur!==void 0&&(T.pitches[0].dottedSlur=!0),G.startTie!==void 0&&(T.pitches[0].startTie=G.startTie),T.startTie!==void 0&&(T.pitches[0].startTie=T.startTie)):(T.rest=G.rest,G.rest.type==="multimeasure"&&z()&&(r.currBarNumber+=G.rest.text-1),G.endSlur!==void 0&&(T.endSlur=G.endSlur),G.endTie!==void 0&&(T.rest.endTie=G.endTie),G.startSlur!==void 0&&(T.startSlur=G.startSlur),G.startTie!==void 0&&(T.rest.startTie=G.startTie),T.startTie!==void 0&&(T.rest.startTie=T.startTie)),G.chord!==void 0&&(T.chord=G.chord),G.duration!==void 0&&(T.duration=G.duration),G.decoration!==void 0&&(T.decoration=G.decoration),G.graceNotes!==void 0&&(T.graceNotes=G.graceNotes),delete T.startSlur,delete T.dottedSlur,x(r,H,T)&&(T.pitches!==void 0?T.pitches[0].endTie=!0:T.rest.type!=="spacer"&&(T.rest.endTie=!0),j(r,H,!1)),(G.startTie||T.startTie)&&j(r,H,!0),w=G.endChar,F>0&&!(G.rest&&G.rest.type==="spacer")&&(F--,F===0&&(T.endTriplet=!0)),G.end_beam&&S(T),T.rest&&T.rest.type==="rest"&&T.duration===1&&P(r)<=1&&(T.rest.type="whole",T.duration=P(r)),T.duration<1&&a.indexOf(T.duration)===-1&&T.duration!==0&&(!T.rest||T.rest.type!=="spacer")&&l("Duration not representable: "+y.substring(U,w),y,w),r.addFormattingOptions(T,i.formatting,"note");var W=o.appendElement("note",C+U,C+w,T);W||(this.startNewLine(),o.appendElement("note",C+U,C+w,T)),r.measureNotEmpty=!0,T={}}}w===U&&(y[w]!==" "&&y[w]!=="`"&&l("Unknown character ignored",y,w),w++)}}}this.lineContinuation=y.indexOf("")>=0||V[0]>0,this.lineContinuation||(T={})}};var j=function(y,w,C){var L=y.currentVoice?y.currentVoice.staffNum*100+y.currentVoice.index:0;y.inTie[w]===void 0&&(y.inTie[w]=[]),y.inTie[w][L]=C},O=function(y,w){if(y[w]==='"'){var C=v.getBrackettedSubstring(y,w,5);if(C[2]||l("Missing the closing quote while parsing the chord symbol",y,w),C[0]>0&&C[1].length>0&&C[1][0]==="^")C[1]=C[1].substring(1),C[2]="above";else if(C[0]>0&&C[1].length>0&&C[1][0]==="_")C[1]=C[1].substring(1),C[2]="below";else if(C[0]>0&&C[1].length>0&&C[1][0]==="<")C[1]=C[1].substring(1),C[2]="left";else if(C[0]>0&&C[1].length>0&&C[1][0]===">")C[1]=C[1].substring(1),C[2]="right";else if(C[0]>0&&C[1].length>0&&C[1][0]==="@"){C[1]=C[1].substring(1);var L=v.getFloat(C[1]);if(L.digits===0)return l("Missing first position in absolutely positioned annotation.",y,w),C[1]=C[1].replace("@",""),C[2]="above",C;if(C[1]=C[1].substring(L.digits),C[1][0]!==",")return l("Missing comma absolutely positioned annotation.",y,w),C[1]=C[1].replace("@",""),C[2]="above",C;C[1]=C[1].substring(1);var F=v.getFloat(C[1]);if(F.digits===0)return l("Missing second position in absolutely positioned annotation.",y,w),C[1]=C[1].replace("@",""),C[2]="above",C;C[1]=C[1].substring(F.digits);var V=v.skipWhiteSpace(C[1]);C[1]=C[1].substring(V),C[2]=null,C[3]={x:L.value,y:F.value}}else r.freegchord!==!0&&(C[1]=C[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),C[1]=C[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),C[1]=C[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),C[1]=C[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),C[1]=C[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),C[1]=C[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),C[2]="default",C[1]=b.chordName(r,C[1]);return C}return[0,""]},m=function(y,w){if(y[w]==="{"){var C=v.getBrackettedSubstring(y,w,1,"}");C[2]||l("Missing the closing '}' while parsing grace note",y,w),y[w+C[0]]===")"&&(C[0]++,C[1]+=")");for(var L=[],F=0,V=!1;F<C[1].length;){var H=!1;C[1][F]==="/"&&(H=!0,F++);var U=B(C[1],F,{},!1);U!==null?(U.duration=U.duration/(r.default_length*8),H&&(U.acciaccatura=!0),U.rest?l("Rests not allowed as grace notes '"+C[1][F]+"' while parsing grace note",y,w):L.push(U),V&&(U.endTie=!0,V=!1),U.startTie&&(V=!0),F=U.endChar,delete U.endChar,U.end_beam&&(U.endBeam=!0,delete U.end_beam)):(C[1][F]===" "?L.length>0&&(L[L.length-1].endBeam=!0):l("Unknown character '"+C[1][F]+"' while parsing grace note",y,w),F++)}if(L.length)return[C[0],L]}return[0]};function E(y,w){if(y[w]==="&"){for(var C=w;y[w]&&y[w]!==":"&&y[w]!=="|";)w++;return[w-C,y.substring(C+1,w)]}return[0]}function P(y){var w=y.origMeter;return!w||w.type!=="specified"||!w.value||w.value.length===0?1:parseInt(w.value[0].num,10)/parseInt(w.value[0].den,10)}var A=function(y,w){var C=r.macros[y[w]];if(C!==void 0)return(C[0]==="!"||C[0]==="+")&&(C=C.substring(1)),(C[C.length-1]==="!"||C[C.length-1]==="+")&&(C=C.substring(0,C.length-1)),c.includes(C)?[1,C]:f.includes(C)?(r.volumePosition==="hidden"&&(C=""),[1,C]):h.includes(C)?(r.dynamicPosition==="hidden"&&(C=""),[1,C]):(r.ignoredDecorations.includes(C)||l("Unknown macro: "+C,y,w),[1,""]);switch(y[w]){case".":if(y[w+1]==="("||y[w+1]==="-")break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var L=v.getBrackettedSubstring(y,w,5);if(L[1].length>1&&(L[1][0]==="^"||L[1][0]==="_")&&(L[1]=L[1].substring(1)),c.includes(L[1]))return L;if(f.includes(L[1]))return r.volumePosition==="hidden"&&(L[1]=""),L;if(h.includes(L[1]))return r.dynamicPosition==="hidden"&&(L[1]=""),L;var F=d.findIndex(function(V){return L[1]===V[0]});return F>=0?(L[1]=d[F][1],L):(F=n.findIndex(function(V){return L[1]===V[0]}),F>=0?(L[1]=n[F][1],r.dynamicPosition==="hidden"&&(L[1]=""),L):y[w]==="!"&&(L[0]===1||y[w+L[0]-1]!=="!")?[1,null]:(l("Unknown decoration: "+L[1],y,w),L[1]="",L));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"];case"t":return[1,"trillh"]}return[0,0]},N=function(y,w){for(var C=w;v.isWhiteSpace(y[w]);)w++;return[w-C]},D=function(y,w){var C=v.getBarLine(y,w);if(C.len===0)return[0,""];if(C.warn)return l(C.warn,y,w),[C.len,""];for(var L=0;L<y.length&&y[w+C.len+L]===" ";L++);var F=C.len;if(y[w+C.len+L]==="["&&(C.len+=L+1),y[w+C.len]==='"'&&y[w+C.len-1]==="["){var V=v.getBrackettedSubstring(y,w+C.len,5);return[C.len+V[0],C.token,V[1]]}var H=v.getTokenOf(y.substring(w+C.len),"1234567890-,");return H.len===0||H.token[0]==="-"?[F,C.token]:[C.len+H.len,C.token,H.token]},_=function(y,w){var C={},L=w;for(y[w]==="."&&y[w+1]==="("&&(C.dottedSlur=!0,w++);y[w]==="("||v.isWhiteSpace(y[w]);)y[w]==="("&&(w+1<y.length&&y[w+1]>="2"&&y[w+1]<="9"?(C.triplet!==void 0?l("Can't nest triplets",y,w):(C.triplet=y[w+1]-"0",C.tripletQ=p[C.triplet],C.num_notes=C.triplet,w+2<y.length&&y[w+2]===":"&&(w+3<y.length&&y[w+3]===":"?w+4<y.length&&y[w+4]>="1"&&y[w+4]<="9"?(C.num_notes=y[w+4]-"0",w+=3):l("expected number after the two colons after the triplet to mark the duration",y,w):w+3<y.length&&y[w+3]>="1"&&y[w+3]<="9"?(C.tripletQ=y[w+3]-"0",w+4<y.length&&y[w+4]===":"?w+5<y.length&&y[w+5]>="1"&&y[w+5]<="9"&&(C.num_notes=y[w+5]-"0",w+=4):w+=2):l("expected number after the triplet to mark the duration",y,w))),w++):C.startSlur===void 0?C.startSlur=1:C.startSlur++),w++;return C.consumed=w-L,C};k.prototype.startNewLine=function(){var y={startChar:-1,endChar:-1};r.partForNextLine.title&&(y.part=r.partForNextLine),y.clef=r.currentVoice&&r.staves[r.currentVoice.staffNum].clef!==void 0?Object.assign({},r.staves[r.currentVoice.staffNum].clef):Object.assign({},r.clef);var w=r.currentVoice?r.currentVoice.scoreTranspose:0;if(y.key=M.standardKey(r.key.root+r.key.acc+r.key.mode,r.key.root,r.key.acc,w),y.key.mode=r.key.mode,r.key.impliedNaturals&&(y.key.impliedNaturals=r.key.impliedNaturals),r.key.explicitAccidentals)for(var C=0;C<r.key.explicitAccidentals.length;C++){for(var L=!1,F=0;F<y.key.accidentals.length;F++)y.key.accidentals[F].note===r.key.explicitAccidentals[C].note&&(y.key.accidentals[F].acc=r.key.explicitAccidentals[C].acc,L=!0);L||y.key.accidentals.push(r.key.explicitAccidentals[C])}if(r.targetKey=y.key,y.key.explicitAccidentals&&delete y.key.explicitAccidentals,M.addPosToKey(y.clef,y.key),r.meter!==null?(r.currentVoice?(r.staves.forEach(function(Q){Q.meter=r.meter}),y.meter=r.staves[r.currentVoice.staffNum].meter,r.staves[r.currentVoice.staffNum].meter=null):y.meter=r.meter,r.meter=null):r.currentVoice&&r.staves[r.currentVoice.staffNum].meter&&(y.meter=r.staves[r.currentVoice.staffNum].meter,r.staves[r.currentVoice.staffNum].meter=null),r.currentVoice&&r.currentVoice.name&&(y.name=r.currentVoice.name),r.vocalfont&&(y.vocalfont=r.vocalfont),r.tripletfont&&(y.tripletfont=r.tripletfont),r.gchordfont&&(y.gchordfont=r.gchordfont),r.style&&(y.style=r.style),r.currentVoice){var V=r.staves[r.currentVoice.staffNum];V.brace&&(y.brace=V.brace),V.bracket&&(y.bracket=V.bracket),V.connectBarLines&&(y.connectBarLines=V.connectBarLines),V.name&&(y.name=V.name[r.currentVoice.index]),V.subname&&(y.subname=V.subname[r.currentVoice.index]),r.currentVoice.stem&&(y.stem=r.currentVoice.stem),r.currentVoice.stafflines&&(y.stafflines=r.currentVoice.stafflines),r.currentVoice.staffscale&&(y.staffscale=r.currentVoice.staffscale),r.currentVoice.scale&&(y.scale=r.currentVoice.scale),r.currentVoice.color&&(y.color=r.currentVoice.color),r.currentVoice.style&&(y.style=r.currentVoice.style),r.currentVoice.transpose&&(y.clef.transpose=r.currentVoice.transpose),y.currentVoice=r.currentVoice;for(var H=Object.keys(r.voices),U=0;U<H.length;U++)y.currentVoice.staffNum===r.voices[H[U]].staffNum&&y.currentVoice.index===r.voices[H[U]].index&&(y.currentVoiceName=H[U])}r.barNumbers===0&&z()&&r.currBarNumber!==1&&(y.barNumber=r.currBarNumber),o.startNewLine(y),r.key.impliedNaturals&&delete r.key.impliedNaturals,r.partForNextLine={},r.tempoForNextLine.length===4&&o.appendElement(r.tempoForNextLine[0],r.tempoForNextLine[1],r.tempoForNextLine[2],r.tempoForNextLine[3]),r.tempoForNextLine=[]};var S=function(y){return y.duration!==void 0&&y.duration<.25&&(y.end_beam=!0),y},B=function(y,w,C,L){var F=function(se){return se==="octave"||se==="duration"||se==="Zduration"||se==="broken_rhythm"||se==="end_slur"},V;y[w]==="."&&y[w+1]==="-"&&(V=!0,w++);for(var H="startSlur",U=!1;;){switch(y[w]){case"(":if(H==="startSlur")C.startSlur===void 0?C.startSlur=1:C.startSlur++;else return F(H)?(C.endChar=w,C):null;break;case")":if(F(H))C.endSlur===void 0?C.endSlur=1:C.endSlur++;else return null;break;case"^":if(H==="startSlur")C.accidental="sharp",H="sharp2";else if(H==="sharp2")C.accidental="dblsharp",H="pitch";else return F(H)?(C.endChar=w,C):null;break;case"_":if(H==="startSlur")C.accidental="flat",H="flat2";else if(H==="flat2")C.accidental="dblflat",H="pitch";else return F(H)?(C.endChar=w,C):null;break;case"=":if(H==="startSlur")C.accidental="natural",H="pitch";else return F(H)?(C.endChar=w,C):null;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(H==="startSlur"||H==="sharp2"||H==="flat2"||H==="pitch"){if(C.pitch=e[y[w]],C.pitch+=7*(r.currentVoice&&r.currentVoice.octave!==void 0?r.currentVoice.octave:r.octave),C.name=y[w],C.accidental&&(C.name=g[C.accidental]+C.name),b.note(r,C),H="octave",L&&r.next_note_duration!==0?(C.duration=r.default_length*r.next_note_duration,r.next_note_duration=0,U=!0):C.duration=r.default_length,r.clef&&r.clef.type==="perc"||r.currentVoice&&r.currentVoice.clef==="perc"){var Q=y[w];C.accidental&&(Q=g[C.accidental]+Q),i.formatting&&i.formatting.midi&&i.formatting.midi.drummap&&(C.midipitch=i.formatting.midi.drummap[Q])}}else return F(H)?(C.endChar=w,C):null;break;case",":if(H==="octave")C.pitch-=7,C.name+=",";else return F(H)?(C.endChar=w,C):null;break;case"'":if(H==="octave")C.pitch+=7,C.name+="'";else return F(H)?(C.endChar=w,C):null;break;case"x":case"X":case"y":case"z":case"Z":if(H==="startSlur")C.rest={type:u[y[w]]},delete C.accidental,delete C.startSlur,delete C.startTie,delete C.endSlur,delete C.endTie,delete C.end_beam,delete C.grace_notes,C.rest.type.indexOf("multimeasure")>=0?(C.duration=i.getBarLength(),C.rest.text=1,H="Zduration"):(L&&r.next_note_duration!==0?(C.duration=r.default_length*r.next_note_duration,r.next_note_duration=0,U=!0):C.duration=r.default_length,H="duration");else return F(H)?(C.endChar=w,C):null;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if(H==="octave"||H==="duration"){var R=v.getFraction(y,w);for(C.duration=C.duration*R.value,C.endChar=R.index;R.index<y.length&&(v.isWhiteSpace(y[R.index])||y[R.index]==="-");)y[R.index]==="-"?C.startTie={}:C=S(C),R.index++;w=R.index-1,H="broken_rhythm"}else if(H==="sharp2")C.accidental="quartersharp",H="pitch";else if(H==="flat2")C.accidental="quarterflat",H="pitch";else if(H==="Zduration"){var te=v.getNumber(y,w);return C.duration=te.num*i.getBarLength(),C.rest.text=te.num,C.endChar=te.index,C}else return null;break;case"-":if(H==="startSlur")o.addTieToLastNote(V),C.endTie=!0;else if(H==="octave"||H==="duration"||H==="end_slur")if(C.startTie={},!U&&L)H="broken_rhythm";else return v.isWhiteSpace(y[w+1])&&S(C),C.endChar=w+1,C;else return H==="broken_rhythm"?(C.endChar=w,C):null;break;case" ":case" ":if(F(H)){C.end_beam=!0,V=!1;do y[w]==="."&&y[w+1]==="-"&&(V=!0,w++),y[w]==="-"&&(C.startTie={},V&&(C.startTie.style="dotted")),w++;while(w<y.length&&(v.isWhiteSpace(y[w])||y[w]==="-")||y[w]==="."&&y[w+1]==="-");if(C.endChar=w,!U&&L&&(y[w]==="<"||y[w]===">"))w--,H="broken_rhythm";else return C}else return null;break;case">":case"<":if(F(H))if(L){var ee=I(y,w);w+=ee[0]-1,r.next_note_duration=ee[2],C.duration=ee[1]*C.duration,H="end_slur"}else return C.endChar=w,C;else return null;break;default:return F(H)?(C.endChar=w,C):null}if(w++,w===y.length)return F(H)?(C.endChar=w,C):null}return null},I=function(y,w){switch(y[w]){case">":return w<y.length-2&&y[w+1]===">"&&y[w+2]===">"?[3,1.875,.125]:w<y.length-1&&y[w+1]===">"?[2,1.75,.25]:[1,1.5,.5];case"<":return w<y.length-2&&y[w+1]==="<"&&y[w+2]==="<"?[3,.125,1.875]:w<y.length-1&&y[w+1]==="<"?[2,.25,1.75]:[1,.5,1.5]}return null};function z(){return r.currentVoice===void 0||r.currentVoice.staffNum===0&&r.currentVoice.index===0}return tt=k,tt}var rt,sn;function xs(){if(sn)return rt;sn=1;var M=Ce(),b=function(v,l){this.lineIndex=0,this.lines=v,this.multilineVars=l,this.skipWhiteSpace=function(t){for(var a=0;a<t.length;a++)if(!this.isWhiteSpace(t[a]))return a;return t.length};var r=function(t,a){return a>=t.length};this.eatWhiteSpace=function(t,a){for(var e=a;e<t.length;e++)if(!this.isWhiteSpace(t[e]))return e-a;return e-a},this.getKeyPitch=function(t){var a=this.skipWhiteSpace(t);if(r(t,a))return{len:0};switch(t[a]){case"A":return{len:a+1,token:"A"};case"B":return{len:a+1,token:"B"};case"C":return{len:a+1,token:"C"};case"D":return{len:a+1,token:"D"};case"E":return{len:a+1,token:"E"};case"F":return{len:a+1,token:"F"};case"G":return{len:a+1,token:"G"}}return{len:0}},this.getSharpFlat=function(t){if(t==="bass")return{len:0};switch(t[0]){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(t){var a=function(g,p){for(;p<g.length&&(g[p]>="a"&&g[p]<="z"||g[p]>="A"&&g[p]<="Z");)p++;return p},e=this.skipWhiteSpace(t);if(r(t,e))return{len:0};var u=t.substring(e,e+3).toLowerCase();switch((u.length>1&&u[1]===" "||u[1]==="^"||u[1]==="_"||u[1]==="=")&&(u=u[0]),u){case"mix":return{len:a(t,e),token:"Mix"};case"dor":return{len:a(t,e),token:"Dor"};case"phr":return{len:a(t,e),token:"Phr"};case"lyd":return{len:a(t,e),token:"Lyd"};case"loc":return{len:a(t,e),token:"Loc"};case"aeo":return{len:a(t,e),token:"m"};case"maj":return{len:a(t,e),token:""};case"ion":return{len:a(t,e),token:""};case"min":return{len:a(t,e),token:"m"};case"m":return{len:a(t,e),token:"m"}}return{len:0}},this.getClef=function(t,a){var e=t,u=this.skipWhiteSpace(t);if(r(t,u))return{len:0};var g=!1,p=t.substring(u);if(M.startsWith(p,"clef=")&&(g=!0,p=p.substring(5),u+=5),p.length===0&&g)return{len:u+5,warn:"No clef specified: "+e};var k=this.skipWhiteSpace(p);if(r(p,k))return{len:0};k>0&&(u+=k,p=p.substring(k));var x=null;if(M.startsWith(p,"treble"))x="treble";else if(M.startsWith(p,"bass3"))x="bass3";else if(M.startsWith(p,"bass"))x="bass";else if(M.startsWith(p,"tenor"))x="tenor";else if(M.startsWith(p,"alto2"))x="alto2";else if(M.startsWith(p,"alto1"))x="alto1";else if(M.startsWith(p,"alto"))x="alto";else if(!a&&g&&M.startsWith(p,"none"))x="none";else if(M.startsWith(p,"perc"))x="perc";else if(!a&&g&&M.startsWith(p,"C"))x="tenor";else if(!a&&g&&M.startsWith(p,"F"))x="bass";else if(!a&&g&&M.startsWith(p,"G"))x="treble";else return{len:u+5,warn:"Unknown clef specified: "+e};return p=p.substring(x.length),k=this.isMatch(p,"+8"),k>0?x+="+8":(k=this.isMatch(p,"-8"),k>0&&(x+="-8")),{len:u+x.length,token:x,explicit:g}},this.getBarLine=function(t,a){switch(t[a]){case"]":switch(++a,t[a]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++a,t[a]>="1"&&t[a]<="9"||t[a]==='"'?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}case":":switch(++a,t[a]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++a,t[a]){case"]":switch(++a,t[a]){case"|":return++a,t[a]===":"?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}case"|":return++a,t[a]===":"?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}default:return{len:1,warn:"Unknown bar symbol"}}case"[":if(++a,t[a]==="|")switch(++a,t[a]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}else return t[a]>="1"&&t[a]<="9"||t[a]==='"'?{len:1,token:"bar_invisible"}:{len:0};case"|":switch(++a,t[a]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++a,t[a]===":"?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var e=0;t[a+e]===":";)e++;return{len:1+e,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(t,a){for(var e=0;e<t.length;e++)if(a.indexOf(t[e])<0)return{len:e,token:t.substring(0,e)};return{len:e,token:t}},this.getToken=function(t,a,e){for(var u=a;u<e&&!this.isWhiteSpace(t[u]);)u++;return t.substring(a,u)},this.isMatch=function(t,a){var e=this.skipWhiteSpace(t);return r(t,e)?0:M.startsWith(t.substring(e),a)?e+a.length:0},this.getPitchFromTokens=function(t){var a={},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};if(a.position=e[t[0].token],a.position===void 0)return{warn:"Pitch expected. Found: "+t[0].token};for(t.shift();t.length;)switch(t[0].token){case",":a.position-=7,t.shift();break;case"'":a.position+=7,t.shift();break;default:return a}return a},this.getKeyAccidentals2=function(t){for(var a;t.length>0;){var e;if(t[0].token==="^"){if(e="sharp",t.shift(),t.length===0)return{accs:a,warn:"Expected note name after "+e};switch(t[0].token){case"^":e="dblsharp",t.shift();break;case"/":e="quartersharp",t.shift();break}}else if(t[0].token==="=")e="natural",t.shift();else if(t[0].token==="_"){if(e="flat",t.shift(),t.length===0)return{accs:a,warn:"Expected note name after "+e};switch(t[0].token){case"_":e="dblflat",t.shift();break;case"/":e="quarterflat",t.shift();break}}else return{accs:a};if(t.length===0)return{accs:a,warn:"Expected note name after "+e};switch(t[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":a===void 0&&(a=[]),a.push({acc:e,note:t[0].token[0]}),t[0].token.length===1?t.shift():t[0].token=t[0].token.substring(1);break;default:return{accs:a,warn:"Expected note name after "+e+" Found: "+t[0].token}}}return{accs:a}},this.getKeyAccidental=function(t){var a={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},e=this.skipWhiteSpace(t);if(r(t,e))return{len:0};var u=null;switch(t[e]){case"^":case"_":case"=":u=t[e];break;default:return{len:0}}if(e++,r(t,e))return{len:1,warn:"Expected note name after accidental"};switch(t[e]){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:e+1,token:{acc:a[u],note:t[e]}};case"^":case"_":case"/":if(u+=t[e],e++,r(t,e))return{len:2,warn:"Expected note name after accidental"};switch(t[e]){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:e+1,token:{acc:a[u],note:t[e]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(t){return t===" "||t===" "||t===""},this.getMeat=function(t,a,e){var u=t.indexOf("%",a);for(u>=0&&u<e&&(e=u);a<e&&(t[a]===" "||t[a]===" "||t[a]==="");)a++;for(;a<e&&(t[e-1]===" "||t[e-1]===" "||t[e-1]==="");)e--;return{start:a,end:e}};var i=function(t){return t>="A"&&t<="Z"||t>="a"&&t<="z"},o=function(t){return t>="0"&&t<="9"};this.tokenize=function(t,a,e,u){var g=this.getMeat(t,a,e);a=g.start,e=g.end;for(var p=[],k;a<e;){if(t[a]==='"'){for(k=a+1;k<e&&t[k]!=='"';)k++;p.push({type:"quote",token:t.substring(a+1,k),start:a+1,end:k}),k++}else if(i(t[a])){if(k=a+1,u)for(;k<e&&!this.isWhiteSpace(t[k]);)k++;else for(;k<e&&i(t[k]);)k++;p.push({type:"alpha",token:t.substring(a,k),continueId:o(t[k]),start:a,end:k}),a=k+1}else if(t[a]==="."&&o(t[k+1])){k=a+1;for(var x=null,T=null;k<e&&o(t[k]);)k++;T=parseFloat(t.substring(a,k)),p.push({type:"number",token:t.substring(a,k),intt:x,floatt:T,continueId:i(t[k]),start:a,end:k}),a=k+1}else if(o(t[a])||t[a]==="-"&&o(t[k+1])){k=a+1;for(var j=null,O=null;k<e&&o(t[k]);)k++;if(t[k]==="."&&o(t[k+1]))for(k++;k<e&&o(t[k]);)k++;else j=parseInt(t.substring(a,k));O=parseFloat(t.substring(a,k)),p.push({type:"number",token:t.substring(a,k),intt:j,floatt:O,continueId:i(t[k]),start:a,end:k}),a=k+1}else t[a]===" "||t[a]===" "||p.push({type:"punct",token:t[a],start:a,end:a+1}),k=a+1;a=k}return p},this.getVoiceToken=function(t,a,e){for(var u=a;u<e&&this.isWhiteSpace(t[u])||t[u]==="=";)u++;if(t[u]==='"'){var g=t.indexOf('"',u+1);return g===-1||g>=e?{len:1,err:"Missing close quote"}:{len:g-a+1,token:this.translateString(t.substring(u+1,g))}}else{for(var p=u;p<e&&!this.isWhiteSpace(t[p])&&t[p]!=="=";)p++;return{len:p-a+1,token:t.substring(u,p)}}};var s={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å",aa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å",AA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~N":"Ñ","~n":"ñ","=s":"š",vs:"š",DH:"Ð",dh:"ð",HO:"Ő",Ho:"ő",HU:"Ű",Hu:"ű","'Y":"Ý","'y":"ý","^Y":"Ŷ","^y":"ŷ",'"Y':"Ÿ",'"y':"ÿ",vS:"Š",vZ:"Ž",vz:"ž"},c={"#":"♯",b:"♭","=":"♮"},f={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:" ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};this.translateString=function(t){var a=t.split("\\");if(a.length===1)return t;var e=null;return a.forEach(function(u){if(e===null)e=u;else{var g=s[u.substring(0,2)];g!==void 0?e+=g+u.substring(2):(g=f[u.substring(0,3)],g!==void 0?e+=g+u.substring(3):(g=c[u.substring(0,1)],g!==void 0?e+=g+u.substring(1):e+="\\"+u))}}),e},this.getNumber=function(t,a){for(var e=0;a<t.length;)switch(t[a]){case"0":e=e*10,a++;break;case"1":e=e*10+1,a++;break;case"2":e=e*10+2,a++;break;case"3":e=e*10+3,a++;break;case"4":e=e*10+4,a++;break;case"5":e=e*10+5,a++;break;case"6":e=e*10+6,a++;break;case"7":e=e*10+7,a++;break;case"8":e=e*10+8,a++;break;case"9":e=e*10+9,a++;break;default:return{num:e,index:a}}return{num:e,index:a}},this.getFraction=function(t,a){var e=1,u=1;if(t[a]!=="/"){var g=this.getNumber(t,a);e=g.num,a=g.index}if(t[a]==="/")if(a++,t[a]==="/"){for(var p=.5;t[a++]==="/";)p=p/2;return{value:e*p,index:a-1}}else{var k=a,x=this.getNumber(t,a);x.num===0&&k===a&&(x.num=2),x.num!==0&&(u=x.num),a=x.index}return{value:e/u,index:a}};function h(t){const a=/^(\d+)\./.exec(t);return a?a[1]:null}var d=[{match:/,\s*The$/,replace:"The "},{match:/,\s*the$/,replace:"the "},{match:/,\s*A$/,replace:"A "},{match:/,\s*a$/,replace:"a "},{match:/,\s*An$/,replace:"An "},{match:/,\s*an$/,replace:"an "},{match:/,\s*Da$/,replace:"Da "},{match:/,\s*La$/,replace:"La "},{match:/,\s*Le$/,replace:"Le "},{match:/,\s*Les$/,replace:"Les "},{match:/,\s*Ye$/,replace:"Ye "}];this.theReverser=function(t){for(var a=0;a<d.length;a++){var e=d[a],u=t.match(e.match);if(u){var g=h(t);g&&(t=t.replace(g+".",""),t=t.trim());var p=u[0].length,k=e.replace+t.substring(0,t.length-p);return g&&(k=g+". "+k),k}}return t},this.stripComment=function(t){var a=t.indexOf("%");return a>=0?M.strip(t.substring(0,a)):M.strip(t)},this.getInt=function(t){var a=parseInt(t);if(isNaN(a))return{digits:0};var e=""+a,u=t.indexOf(e);return{value:a,digits:u+e.length}},this.getFloat=function(t){var a=parseFloat(t);if(isNaN(a))return{digits:0};var e=""+a,u=t.indexOf(e);return{value:a,digits:u+e.length}},this.getMeasurement=function(t){if(t.length===0)return{used:0};var a=1,e="";if(t[0].token==="-")t.shift(),e="-",a++;else if(t[0].type!=="number")return{used:0};if(e+=t.shift().token,t.length===0)return{used:1,value:parseInt(e)};var u=t.shift();if(u.token==="."){if(a++,t.length===0)return{used:a,value:parseInt(e)};if(t[0].type==="number"&&(u=t.shift(),e=e+"."+u.token,a++,t.length===0))return{used:a,value:parseFloat(e)};u=t.shift()}switch(u.token){case"pt":return{used:a+1,value:parseFloat(e)};case"px":return{used:a+1,value:parseFloat(e)};case"cm":return{used:a+1,value:parseFloat(e)/2.54*72};case"in":return{used:a+1,value:parseFloat(e)*72};default:return t.unshift(u),{used:a,value:parseFloat(e)}}};var n=function(t){return t=t.replace(/\\n/g,`
|
|
6
|
-
`),t=t.replace(/\\"/g,'"'),t};this.getBrackettedSubstring=function(t,a,e,u){for(var g=u||t[a],p=a+1,k=!1;p<t.length&&(k||t[p]!==g);)k=t[p]==="\\",++p;return t[p]===g?[p-a+1,n(t.substring(a+1,p)),!0]:(p=a+e,p>t.length-1&&(p=t.length-1),[p-a+1,n(t.substring(a+1,p)),!1])}};return b.prototype.peekLine=function(){return this.lines[this.lineIndex]},b.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex<this.lines.length){var v=this.lines[this.lineIndex];return this.lineIndex++,v}return null},rt=b,rt}var nt,on;function zi(){if(on)return nt;on=1;function M(h,d,n){if(!(!d||h.lines.length===0)){var t=h.deline({lineBreaks:!1}),a=v(t,d);h.lines=b(t,a,n),h.lineBreaks=a}}function b(h,d,n){for(var t=[],a=[],e=[],u=1,g=0;g<d.length;g++){var p=d[g];if(h[p.ogLine].staff){var k=h[p.ogLine].staff[p.staff];if(t[p.line]||(t[p.line]={staff:[]}),!t[p.line].staff[p.staff]){t[p.line].staff[p.staff]={voices:[]},n!==void 0&&p.staff===0&&p.line>0&&(t[p.line].staff[p.staff].barNumber=u);for(var x=Object.keys(k),T=0;T<x.length;T++){var j=x[T]==="voices";x[T]==="meter"&&p.line!==0&&(j=!0),j||(t[p.line].staff[p.staff][x[T]]=k[x[T]])}a[p.staff]&&(t[p.line].staff[p.staff].key=a[p.staff])}t[p.line].staff[p.staff].voices[p.voice]||(t[p.line].staff[p.staff].voices[p.voice]=[]),t[p.line].staff[p.staff].voices[p.voice]=h[p.ogLine].staff[p.staff].voices[p.voice].slice(p.start,p.end+1),e[p.staff*10+p.voice]&&t[p.line].staff[p.staff].voices[p.voice].unshift({el_type:"stem",direction:e[p.staff*10+p.voice].direction});for(var O=t[p.line].staff[p.staff].voices[p.voice],m=O.length-1;m>=0;m--)if(O[m].el_type==="key"){a[p.staff]={root:O[m].root,acc:O[m].acc,mode:O[m].mode,accidentals:O[m].accidentals.filter(function(P){return P.acc!=="natural"})};break}for(m=O.length-1;m>=0;m--)if(O[m].el_type==="stem"){e[p.staff*10+p.voice]={direction:O[m].direction};break}if(n!==void 0&&p.staff===0&&p.voice===0)for(m=0;m<O.length;m++)O[m].el_type==="bar"&&(u++,m===O.length-1?delete O[m].barNumber:O[m].barNumber=u)}else t[p.line]=h[p.ogLine]}for(var E=0;E<t.length;E++)t[E].staff&&(t[E].staff=t[E].staff.filter(function(P){return P!=null}));return t}function v(h,d){for(var n=[],t=0,a=0,e=0,u=0;u<h.length;u++){var g=h[u];if(g.staff){var p=a,k=d[t];t++;for(var x=0;x<g.staff.length;x++)for(var T=g.staff[x],j=0;j<T.voices.length;j++){e=p;for(var O=0,m=0,E=T.voices[j],P=0,A=0;A<E.length;A++){var N=E[A];N.el_type==="bar"&&(k[m]===O&&(n.push({ogLine:u,line:e,staff:x,voice:j,start:P,end:A}),P=A+1,e++,a=Math.max(a,e),m++),O++)}n.push({ogLine:u,line:e,staff:x,voice:j,start:P,end:E.length}),e++,a=Math.max(a,e)}}else n.push({ogLine:u,line:e}),e++,a=Math.max(a,e)}return n}function l(h,d){for(var n=[],t=[],a=0,e=0;e<h.length;e++){var u=h[e],g=a+u;if(g<d)a=g;else{var p=d-a,k=g-d;p<k&&a>0?(n.push(e-1),t.push(Math.round(a-u)),a=u):e<h.length-1&&(n.push(e),t.push(Math.round(a)),a=0)}}return t.push(Math.round(a)),{lineBreaks:n,totals:t}}function r(h){for(var d=[],n=0;n<h.length;n++)d.push(h[n]);return d}function i(h,d,n,t,a,e,u,g,p,k,x){for(var T=k;T<h.length;T++){var j=h[T];n+=j,t+=j;var O=Math.abs(n-d[g]),m=Math.abs(O-e)<d[0]/10;if(m)if(O<e){var E=r(a),P=r(p);P.push(T-1),E.push(t-j),x.push({accumulator:n,lineAccumulator:j,lineWidths:E,lastVariance:Math.abs(n-d[g+1]),highestVariance:Math.max(u,e),currLine:g+1,lineBreaks:P,startIndex:T+1})}else O>e&&T<h.length-1&&(E=r(a),P=r(p),x.push({accumulator:n,lineAccumulator:t,lineWidths:E,lastVariance:O,highestVariance:Math.max(u,O),currLine:g,lineBreaks:P,startIndex:T+1}));O>e?(p.push(T-1),g++,u=Math.max(u,e),e=Math.abs(n-d[g]),a.push(t-j),t=j):e=O}a.push(t)}function o(h,d,n,t){for(var a=Math.ceil(h.total/d),e=Math.floor(h.total/a),u=[],g=0;g<a;g++)u.push(e*(g+1));var p=[];p.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var k=0;k<p.length;)i(h.measureWidths,u,p[k].accumulator,p[k].lineAccumulator,p[k].lineWidths,p[k].lastVariance,p[k].highestVariance,p[k].currLine,p[k].lineBreaks,p[k].startIndex,p),k++;for(g=0;g<p.length;g++){var x=p[g];x.variances=[],x.aveVariance=0;for(var T=0;T<x.lineWidths.length;T++){var j=x.lineWidths[T];x.variances.push(j-u[0]),x.aveVariance+=Math.abs(j-u[0])}x.aveVariance=x.aveVariance/x.lineWidths.length,t.attempts.push({type:"optimizeLineWidths",lineBreaks:x.lineBreaks,variances:x.variances,aveVariance:x.aveVariance,widths:h.measureWidths})}var O=9999999,m=-1;for(g=0;g<p.length;g++)x=p[g],x.aveVariance<O&&(O=x.aveVariance,m=g);return{failed:!1,lineBreaks:p[m].lineBreaks,variance:p[m].highestVariance}}function s(h,d,n){for(var t=[],a=[],e=0,u=!1,g=0;g<h.length;g++)e+=h[g],e>d&&(u=!0),g%n===n-1&&(g!==h.length-1&&t.push(g),a.push(Math.round(e)),e=0);return{failed:u,totals:a,lineBreaks:t}}function c(h,d,n){var t={lineBreaks:h,staffwidth:d};for(var a in n)n.hasOwnProperty(a)&&a!=="wrap"&&a!=="staffwidth"&&(t[a]=n[a]);return{revisedParams:t}}function f(h,d,n){if(d.length===0||n.staffwidth<d[0].left)return{reParse:!1,explanation:"Staff width is narrower than the margin",revisedParams:n};var t=n.scale?Math.max(n.scale,.1):1,a=n.wrap.minSpacing?Math.max(parseFloat(n.wrap.minSpacing),1):1,e=n.wrap.minSpacingLimit?Math.max(parseFloat(n.wrap.minSpacingLimit),1):a-.1,u=n.wrap.maxSpacing?Math.max(parseFloat(n.wrap.maxSpacing),1):void 0;n.wrap.lastLineLimit&&!u&&(u=Math.max(parseFloat(n.wrap.lastLineLimit),1));for(var g=n.wrap.preferredMeasuresPerLine?Math.max(parseInt(n.wrap.preferredMeasuresPerLine,10),0):void 0,p=[],k=[],x=0;x<d.length;x++){var T=d[x],j=n.staffwidth-T.left,O=j/a/t,m=j/u/t,E=j/e/t,P={widths:T,lineBreakPoint:O,minLineSize:m,attempts:[],staffWidth:n.staffwidth,minWidth:Math.round(E)},A=null;if(g){var N=s(T.measureWidths,O,g);P.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:g,lineBreaks:N.lineBreaks,failed:N.failed,totals:N.totals}),N.failed||(A=N.lineBreaks)}if(!A){var D=l(T.measureWidths,O);P.attempts.push({type:"Free Form",lineBreaks:D.lineBreaks,totals:D.totals}),A=D.lineBreaks,A.length>0&&T.measureWidths.length<25&&(D=o(T,O,A,P),P.attempts.push({type:"Optimize",failed:D.failed,reason:D.reason,lineBreaks:D.lineBreaks,totals:D.totals}),D.failed||(A=D.lineBreaks))}p.push(A),k.push(P)}var _=n.staffwidth,S=c(p,_,n);return S.explanation=k,S.reParse=!0,S}return nt={wrapLines:M,calcLineWraps:f},nt}var at,cn;function ws(){if(cn)return at;cn=1;function M(c){const f=c.getMeterFraction(),h=f.num===4&&f.den===4;if(!(f.num===2&&f.den===2)&&!h)throw new Error("notCommonTime");const d=c.deline();let n=[],t=!1;return d.forEach(a=>{if(a.subtitle)t&&n.push({type:"subtitle",subtitle:a.subtitle.text});else if(a.text)t=!0,n.push({type:"text",text:a.text.text});else if(a.staff){t=!0;const e=a.staff,u=v(e);n=n.concat(u)}}),r(n),i(n),o(n),n}const b=["break","(break)","no chord","n.c.","tacet"];function v(c){const f=[];let h="",d=[],n={chord:["","","",""]},t="",a="";if(c.forEach((e,u)=>{e.voices&&e.voices.forEach((g,p)=>{let k=0,x=0;g.forEach(T=>{if(T.el_type==="part")d.length>0&&u===0&&p===0&&(f.push({type:"part",name:h,lines:[d]}),d=[]),h=T.title;else if(T.el_type==="note"){s(T,n);const j=Math.floor(k);if(T.chord&&T.chord.length>0){const O=T.chord[0],m=O.position==="default"||b.indexOf(O.name.toLowerCase())>=0?O.name:"";m&&(j>0&&!n.chord[0]&&(n.chord[0]=t),t=m,n.chord[j]?j<4&&!n.chord[j+1]&&(n.chord[j+1]=m):n.chord[j]=m),T.chord.forEach(E=>{E.position!=="default"&&b.indexOf(O.name.toLowerCase())<0&&(n.annotations||(n.annotations=[]),n.annotations.push(E.name))})}if(!T.rest||T.rest.type!=="spacer"){const O=Math.floor(T.duration*4);if(O>4)x+=Math.floor(O/4),k=0;else{let m=T.duration*4;T.tripletMultiplier&&(m*=T.tripletMultiplier),k+=m}}}else if(T.el_type==="bar"){if(a&&(n.ending=a,a=""),s(T,n),(T.type==="bar_dbl_repeat"||T.type==="bar_left_repeat")&&(n.hasStartRepeat=!0),(T.type==="bar_dbl_repeat"||T.type==="bar_right_repeat")&&(n.hasEndRepeat=!0),T.startEnding&&(a=T.startEnding),k>=4){if(n.chord[0]===""&&(n.chord[1]||n.chord[2]||n.chord[3])&&(n.chord[0]=l(d)),u===0&&p===0)d.push(n);else{let j=x,O=0;for(;j>=f[O].lines[0].length&&O<f.length;)j-=f[O].lines[0].length,O++;if(O<f.length&&j<f[O].lines[0].length){const m=f[O].lines[0][j];!m.chord[0]&&n.chord[0]&&(m.chord[0]=n.chord[0]),!m.chord[1]&&n.chord[1]&&(m.chord[1]=n.chord[1]),!m.chord[2]&&n.chord[2]&&(m.chord[2]=n.chord[2]),!m.chord[3]&&n.chord[3]&&(m.chord[3]=n.chord[3]),n.annotations&&(m.annotations?m.annotations=m.annotations.concat(n.annotations):m.annotations=n.annotations)}x++}n={chord:["","","",""]}}else n.chord=["","","",""];k=0}else T.el_type}),u===0&&p===0&&f.push({type:"part",name:h,lines:[d]})})}),!t)throw new Error("noChords");return f}function l(c){for(let f=c.length-1;f>=0;f--)for(let h=c[f].chord.length-1;h>=0;h--)if(c[f].chord[h])return c[f].chord[h]}function r(c){c.forEach(f=>{if(f.type==="part"){const h=f.lines[0],d=h.findIndex(t=>!!t.ending),n=h.findIndex((t,a)=>a>d&&!!t.ending);if(d>=0&&n>=0&&n-d===h.length-n){let t=!0;for(let a=0;a<n-d&&t;a++){const e=h[d+a],u=h[n+a];if(e.chord[0]!==u.chord[0]&&(t=!1),e.chord[1]!==u.chord[1]&&(t=!1),e.chord[2]!==u.chord[2]&&(t=!1),e.chord[3]!==u.chord[3]&&(t=!1),e.annotations&&!u.annotations&&(t=!1),!e.annotations&&u.annotations&&(t=!1),e.annotations&&u.annotations)if(e.annotations.length!==u.annotations.length)t=!1;else for(let g=0;g<e.annotations.length;g++)e.annotations[g]!==u.annotations[g]&&(t=!1)}t&&(delete h[d].ending,h.splice(n,h.length-n))}}})}function i(c){c.forEach(f=>{if(f.type==="part"){const h=[],d=f.lines[0];let n=!1;const t=d.findIndex(e=>!!e.hasEndRepeat);(t>=0?Math.min(t+1,d.length):d.length)===12&&(n=!0);const a=n?4:8;for(let e=0;e<d.length;e+=a){const u=d.slice(e,e+a),g=u.findIndex(p=>!!p.hasEndRepeat);g>=0&&g<u.length-1?(h.push(u.slice(0,g+1)),h.push(u.slice(g+1))):h.push(u)}for(let e=0;e<h.length;e++)if(h[e][0].ending){const u=Math.max(0,e-1),g=h[u].length-h[e].length,p=[];for(let k=0;k<g;k++)p.push({noBorder:!0,chord:["","","",""]});h[e]=p.concat(h[e])}f.lines=h}})}function o(c){c.forEach(f=>{if(f.lines){let h=!1,d="";f.lines.forEach(n=>{n.forEach(t=>{if(!t.noBorder){const a=t.chord;!a[0]&&!a[1]&&!a[2]&&!a[3]?(h?d&&(a[0]="%"):a[0]=d,h=!0):!a[1]&&!a[2]&&!a[3]?(h=!0,d=a[0]):(h=!1,d=a[3]||a[2]||a[1])}})})}})}function s(c,f){if(c.decoration)for(let h=0;h<c.decoration.length;h++)switch(c.decoration[h]){case"fermata":case"segno":case"coda":case"D.C.":case"D.S.":case"D.C.alcoda":case"D.C.alfine":case"D.S.alcoda":case"D.S.alfine":case"fine":f.annotations||(f.annotations=[]),f.annotations.push(c.decoration[h]);break}}return at=M,at}var it,ln;function we(){if(ln)return it;ln=1;var M={};return M.FONTEM=360,M.FONTSIZE=30,M.STEP=M.FONTSIZE*93/720,M.SPACE=10,M.TOPNOTE=15,M.STAVEHEIGHT=100,M.INDENT=50,it=M,it}var st,hn;function Ts(){if(hn)return st;hn=1;const M=Ce();function b(i){this.sections=[{type:"startRepeat",index:-1}],this.addBar=function(o){var s=i.length-1,c=o.type==="bar_left_repeat"||o.type==="bar_dbl_repeat",f=o.type==="bar_right_repeat"||o.type==="bar_dbl_repeat",h=o.startEnding?r(o.startEnding):void 0;f&&this.sections.push({type:"endRepeat",index:s}),c&&this.sections.push({type:"startRepeat",index:s}),h&&this.sections.push({type:"startEnding",index:s,endings:h})},this.resolveRepeats=function(){var o,s=this.sections[this.sections.length-1],c=i.length-1;if(s.type==="startRepeat"?s.end=c:s.index+1<c&&this.sections.push({type:"startRepeat",index:s.index+1}),this.sections.length<2)return i;for(var f=[],h=null,d=0;d<this.sections.length;d++){var n=this.sections[d];switch(n.type){case"startRepeat":if(h){if(h.common.end||(h.common.end=n.index),h.endings)for(o=0;o<h.endings.length;o++)h.endings[o]&&!h.endings[o].end&&h.endings[o].start!==n.index&&(h.endings[o].end=n.index);this.sections[d-1].type==="endRepeat"&&h.endings&&h.endings.length&&(h.endings[h.endings.length]={start:-1,end:-1}),f.push(h)}if(h){var t=h.common.end;if(h.endings)for(o=0;o<h.endings.length;o++)h.endings[o]&&(t=Math.max(t,h.endings[o].end));t<n.index-1&&(console.log("gap",i.slice(t+1,n.index)),f.push({common:{start:t+1,end:n.index}}))}h={common:{start:n.index}};break;case"startEnding":{if(h)for(h.common.end||(h.common.end=n.index),h.endings||(h.endings=[]),o=0;o<n.endings.length;o++)h.endings[n.endings[o]]={start:n.index+1};break}case"endRepeat":if(h){if(h.endings||(h.endings=[]),h.endings.length>0)for(o=0;o<h.endings.length;o++)h.endings[o]&&!h.endings[o].end&&(h.endings[o].end=n.index);h.common.end||(h.common.end=n.index)}break}}if(h){if(h.common.end||(h.common.end=c),h.endings)for(o=0;o<h.endings.length;o++)h.endings[o]&&!h.endings[o].end&&(h.endings[o].end=c);f.push(h)}for(var a=[],e=-1,u=0;u<f.length;u++){var g=f[u];if(!g.endings)v(i,a,g.common.start,g.common.end);else if(g.endings.length===0)v(i,a,g.common.start,g.common.end),v(i,a,g.common.start,g.common.end);else for(o=0;o<g.endings.length;o++){var p=g.endings[o];p&&(v(i,a,g.common.start,g.common.end),p.start>0&&v(i,a,p.start,p.end),e=Math.max(e,p.end))}}return a}}function v(i,o,s,c){for(var f=s;f<=c;f++)o.push(l(i[f]))}function l(i){var o=Object.assign({},i);return o.pitches&&(o.pitches=M.cloneArray(o.pitches)),o}function r(i){var o=[],s,c,f;if(i.indexOf(",")>0)for(c=i.split(","),f=0;f<c.length;f++)s=parseInt(c[f],10),s>0&&o.push(s);else if(i.indexOf("-")>0){c=i.split("-");var h=parseInt(c[0],10),d=parseInt(c[1],10);for(f=h;f<=d;f++)o.push(f)}else s=parseInt(i,10),s>0&&o.push(s);return o}return st=b,st}var ot,un;function Fi(){if(un)return ot;un=1;var M,b=Ce(),v=Ts();return function(){var l=1,r=128;M=function(u,g){g=g||{};var p,k=g.program||0,x=g.midiTranspose||0;u.visualTranspose&&(x-=u.visualTranspose);var T=g.channel||0,j=!1,O=g.drum||"",m=g.drumBars||1,E=g.drumIntro||0,P=O!=="",A=!!g.drumOff,N=[],D=50;k=parseInt(k,10),x=parseInt(x,10),T=parseInt(T,10),T===10&&(k=r),O=O.split(" "),m=parseInt(m,10),E=parseInt(E,10);var _=u.formatting.bagpipes;_&&(k=71);var S=[];if(u.formatting.midi){var B=u.formatting.midi;B.program&&B.program.length>0&&(k=B.program[0],B.program.length>1&&(k=B.program[1],T=B.program[0]),j=!0),B.transpose&&(x=B.transpose[0]),B.channel&&(T=B.channel[0],j=!0),B.drum&&(O=B.drum),B.drumbars&&(m=B.drumbars[0]),B.drumon&&(P=!0),T===10&&(k=r),B.beat&&S.push({el_type:"beat",beats:B.beat}),B.nobeataccents&&S.push({el_type:"beataccents",value:!1})}g.qpm?p=parseInt(g.qpm,10):u.metaText.tempo?p=h(u.metaText.tempo,u.getBeatLength()):g.defaultQpm?p=g.defaultQpm:p=180;var I=[];_&&I.push({el_type:"bagpipes"}),I.push({el_type:"instrument",program:k}),T&&I.push({el_type:"channel",channel:T}),x&&I.push({el_type:"transpose",transpose:x}),I.push({el_type:"tempo",qpm:p});for(var z=0;z<S.length;z++)I.push(S[z]);var y=[],w=[],C=[],L=[],F=[0],V={};V[0]={el_type:"tempo",qpm:p,timing:0};for(var H,U=[],Q=!1,R=u.lines,te=0;te<R.length;te++){var ee=R[te];if(ee.staff){let me=function(ne){var fe={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]},be;if(ne.decoration){if(ne.decoration.indexOf("pppp")>=0?be="pppp":ne.decoration.indexOf("ppp")>=0?be="ppp":ne.decoration.indexOf("pp")>=0?be="pp":ne.decoration.indexOf("p")>=0?be="p":ne.decoration.indexOf("mp")>=0?be="mp":ne.decoration.indexOf("mf")>=0?be="mf":ne.decoration.indexOf("f")>=0?be="f":ne.decoration.indexOf("ff")>=0?be="ff":ne.decoration.indexOf("fff")>=0?be="fff":ne.decoration.indexOf("ffff")>=0&&(be="ffff"),be){H=fe[be].slice(0);let Ae=[H];Array.isArray(ne.decoration)&&(Ae=[],ne.decoration.forEach(De=>{De in fe&&Ae.push(fe[De].slice(0))})),y[X].push({el_type:"beat",beats:H.slice(0),volumesPerNotePitch:Ae}),C[oe]=!1,L[oe]=!1}if(ne.decoration.indexOf("crescendo(")>=0){var ue=i(ce,q,"crescendo)"),_e=Math.min(127,H[0]+D),xe=o(ce,q+ue+1,Object.keys(fe));xe&&(_e=fe[xe][0]),ue>0?C[oe]=Math.floor((_e-H[0])/ue):C[oe]=!1,L[oe]=!1}else if(ne.decoration.indexOf("crescendo)")>=0)C[oe]=!1;else if(ne.decoration.indexOf("diminuendo(")>=0){var ke=i(ce,q,"diminuendo)"),Oe=Math.max(15,H[0]-D),Ee=o(ce,q+ke+1,Object.keys(fe));Ee&&(Oe=fe[Ee][0]),C[oe]=!1,ke>0?L[oe]=Math.floor((Oe-H[0])/ke):L[oe]=!1}else ne.decoration.indexOf("diminuendo)")>=0&&(L[oe]=!1)}};for(var se=ee.staff,X=0,ie=0;ie<se.length;ie++){var $=se[ie];if(!($.clef&&$.clef.type==="TAB"))for(var oe=0;oe<$.voices.length;oe++){var ce=$.voices[oe];if(!y[X]){y[X]=[].concat(JSON.parse(JSON.stringify(I)));var de=f(ee.staff,X);de&&y[X].unshift({el_type:"name",trackName:de}),U[X]=new v(y[X])}if(x&&$.clef.type==="perc"&&y[X].push({el_type:"transpose",transpose:0}),$.clef&&$.clef.type==="perc"&&!j)for(var he=0;he<y[X].length;he++)y[X][he].el_type==="instrument"&&(y[X][he].program=r);else $.key&&t(y[X],$.key);$.meter&&a(y[X],$.meter),!Q&&P&&(y[X].push({el_type:"drum",params:{pattern:O,bars:m,on:P,intro:E}}),Q=!0),$.clef&&$.clef.type!=="perc"&&$.clef.transpose&&($.clef.el_type="clef",y[X].push({el_type:"transpose",transpose:$.clef.transpose}),w[X]=!1),$.clef&&$.clef.type&&($.clef.type.indexOf("-8")>=0?(y[X].push({el_type:"transpose",transpose:-12}),w[X]=!0):$.clef.type.indexOf("+8")>=0?(y[X].push({el_type:"transpose",transpose:12}),w[X]=!0):w[X]&&(y[X].push({el_type:"transpose",transpose:0}),w[X]=!1)),u.formatting.midi&&u.formatting.midi.drumoff&&(y[X].push({el_type:"bar"}),y[X].push({el_type:"drum",params:{pattern:"",on:!1}}));var ve=0,ge=0,ye=0,Y=0;H=[105,95,85,1];for(var q=0;q<ce.length;q++){var G=ce[q];switch(G.el_type){case"note":if(C[oe]&&(H[0]+=C[oe],H[1]+=C[oe],H[2]+=C[oe],y[X].push({el_type:"beat",beats:H.slice(0)})),L[oe]&&(H[0]+=L[oe],H[1]+=L[oe],H[2]+=L[oe],y[X].push({el_type:"beat",beats:H.slice(0)})),me(G),!G.rest||G.rest.type!=="spacer"){var W={elem:G,el_type:"note",timing:F[X]};if(G.style?W.style=G.style:N[X]&&(W.style=N[X]),W.duration=G.duration===0?.25:G.duration,G.startTriplet){if(ge=G.tripletMultiplier,ye=G.startTriplet*ge*G.duration,G.startTriplet!==G.tripletR&&q+G.tripletR<=ce.length){for(var K=0,J=q;J<q+G.tripletR;J++)K+=ce[J].duration;ye=ge*K}W.duration=W.duration*ge,W.duration=Math.round(W.duration*1e6)/1e6,Y=W.duration}else ge&&(G.endTriplet?(ge=0,W.duration=Math.round((ye-Y)*1e6)/1e6):(W.duration=W.duration*ge,W.duration=Math.round(W.duration*1e6)/1e6,Y+=W.duration));G.rest&&(W.rest=G.rest),G.decoration&&(W.decoration=G.decoration.slice(0)),G.pitches&&(W.pitches=b.cloneArray(G.pitches)),G.gracenotes&&(W.gracenotes=b.cloneArray(G.gracenotes)),G.chord&&(W.chord=b.cloneArray(G.chord)),y[X].push(W),G.style==="rhythm"&&c(y),ve++,F[X]+=W.duration}break;case"key":case"keySignature":t(y[X],G);break;case"meter":a(y[X],G);break;case"clef":G.transpose&&y[X].push({el_type:"transpose",transpose:G.transpose}),G.type&&(G.type.indexOf("-8")>=0?y[X].push({el_type:"transpose",transpose:-12}):G.type.indexOf("+8")>=0&&y[X].push({el_type:"transpose",transpose:12}));break;case"tempo":p=h(G,u.getBeatLength()),y[X].push({el_type:"tempo",qpm:p,timing:F[X]}),V[""+F[X]]={el_type:"tempo",qpm:p,timing:F[X]};break;case"bar":ve>0&&y[X].push({el_type:"bar"}),me(G),ve=0,U[X].addBar(G,X);break;case"style":N[X]=G.head;break;case"timeSignature":y[X].push(d(G));break;case"part":break;case"stem":case"scale":case"break":case"font":break;case"midi":var re=!1;switch(G.cmd){case"drumon":P=!0,re=!0;break;case"drumoff":P=!1,re=!0;break;case"drum":O=G.params,re=!0;break;case"drumbars":m=G.params[0],re=!0;break;case"drummap":break;case"channel":G.params[0]===10&&y[X].push({el_type:"instrument",program:r});break;case"program":e(y[X],{el_type:"instrument",program:G.params[0]}),j=!0;break;case"transpose":y[X].push({el_type:"transpose",transpose:G.params[0]});break;case"gchordoff":y[X].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":y[X].push({el_type:"gchordOn",tacet:!1});break;case"beat":y[X].push({el_type:"beat",beats:G.params});break;case"nobeataccents":y[X].push({el_type:"beataccents",value:!1});break;case"beataccents":y[X].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":y[X].push({el_type:G.cmd,volume:G.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":y[X].push({el_type:G.cmd,param:G.params[0]});break;case"bassprog":case"chordprog":y[X].push({el_type:G.cmd,value:G.params[0],octaveShift:G.params[1]});break;case"gchordbars":y[X].push({el_type:G.cmd,param:G.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",G.cmd,G)}re&&(y[0].push({el_type:"drum",params:{pattern:O,bars:m,intro:E,on:P}}),Q=!0);break;default:console.log("MIDI: element type "+G.el_type+" not handled.")}}X++,F[X]||(F[X]=0)}}}}for(var le=0;le<U.length;le++)y[le]=U[le].resolveRepeats();if(s(y,V),E)for(var Z=u.getPickupLength(),ae=0;ae<y.length;ae++){for(var pe=0;y[ae][pe].el_type!=="note"&&y[ae].length>pe;)pe++;if(y[ae].length>pe){for(var J=0;J<E;J++)Z===0||J<E-1?(y[ae].splice(pe,0,{el_type:"note",rest:{type:"rest"},duration:l},{el_type:"bar"}),pe+=2):y[ae].splice(pe++,0,{el_type:"note",rest:{type:"rest"},duration:l-Z});A&&(P=!1,y[ae].splice(pe++,0,{el_type:"drum",params:{pattern:O,bars:m,intro:E,on:P}}),A=!1)}}return y.length>0&&y[0].length>0&&(y[0][0].pickupLength=u.getPickupLength()),y};function i(u,g,p){for(var k=0,x=g+1;x<u.length;x++)if(u[x].el_type==="note"&&k++,u[x].decoration&&u[x].decoration.indexOf(p)>=0)return k;return k}function o(u,g,p){for(var k=Math.min(u.length,g+3),x=g;x<k;x++)if(u[x].el_type==="note"&&u[x].decoration){for(var T=0;T<u[x].decoration.length;T++)if(p.indexOf(u[x].decoration[T])>=0)return u[x].decoration[T]}return null}function s(u,g){if(!(!g||g.length===0))for(var p=Object.keys(g),k=0;k<u.length;k++)for(var x=u[k],T=g[0]?g[0].qpm:0,j=0;j<x.length;j++){var O=x[j];O.el_type==="tempo"&&(T=O.qpm),p.indexOf(""+O.timing)>=0&&T!==g[""+O.timing].qpm&&(T=g[""+O.timing].qpm,O.el_type==="tempo"?(O.qpm=g[""+O.timing].qpm,j++):(u[k].splice(j,0,{el_type:"tempo",qpm:g[""+O.timing].qpm,timing:O.timing}),j+=2))}}function c(u){for(var g=0;g<u.length;g++)for(var p=u[g],k=p.length-1;k>=0&&p[k].el_type!=="bar";)p[k].noChordVoice=!0,k--}function f(u,g){if(!(!u||u.length<=g||!u[g].title))return u[g].title.join(" ")}function h(u,g){var p=.25;u.duration&&(p=u.duration[0]);var k=60;return u.bpm&&(k=u.bpm),p*k/g}function d(u){var g;switch(u.type){case"common_time":g={el_type:"meter",num:4,den:4},l=4/4;break;case"cut_time":g={el_type:"meter",num:2,den:2},l=2/2;break;case"specified":let x=0;if(u.value&&u.value.length>0&&u.value[0].num.indexOf("+")>0)for(var p=u.value[0].num.split("+"),k=0;k<p.length;k++)x+=parseInt(p[k],10);else x=parseInt(u.value[0].num,10);g={el_type:"meter",num:x,den:u.value[0].den},l=x/parseInt(u.value[0].den,10);break;default:g={el_type:"meter"},l=1}return g}function n(u){for(var g=[],p=0;p<u.length;p++)u[p].acc!=="natural"&&g.push(u[p]);return g}function t(u,g){var p;g.root==="HP"?p={el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}:p={el_type:"key",accidentals:n(g.accidentals)},e(u,p)}function a(u,g){var p=d(g);e(u,p)}function e(u,g){for(var p=u.length-1;p>=0;p--)if(u[p].el_type===g.el_type){JSON.stringify(u[p])!==JSON.stringify(g)&&u.push(g);return}u.push(g)}}(),ot=M,ot}var ct,dn;function Cs(){if(dn)return ct;dn=1;var M=function(c,f,h,d){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=c,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!f,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=d,this.tempoChangeFactor=1,this.bassInstrument=h.bassprog&&h.bassprog.length>=1?h.bassprog[0]:0,this.chordInstrument=h.chordprog&&h.chordprog.length>=1?h.chordprog[0]:0,this.bassOctaveShift=h.bassprog&&h.bassprog.length===2?h.bassprog[1]:0,this.chordOctaveShift=h.chordprog&&h.chordprog.length===2?h.chordprog[1]:0,this.boomVolume=h.bassvol&&h.bassvol.length===1?h.bassvol[0]:64,this.chickVolume=h.chordvol&&h.chordvol.length===1?h.chordvol[0]:48,h.gchord&&h.gchord.length>0?this.overridePattern=l(h.gchord[0]):this.overridePattern=void 0};M.prototype.setMeter=function(c){this.meter=c},M.prototype.setTempoChangeFactor=function(c){this.tempoChangeFactor=c},M.prototype.setLastBarTime=function(c){this.lastBarTime=c},M.prototype.setTranspose=function(c){this.transpose=c},M.prototype.setRhythmHead=function(c,f){this.hasRhythmHead=c;var h=[];if(c&&this.lastChord&&this.lastChord.chick)for(var d=0;d<this.lastChord.chick.length;d++){var n=Object.assign({},f.pitches[0]);n.actualPitch=this.lastChord.chick[d],h.push(n)}return h},M.prototype.barEnd=function(c){this.chordTrack.length>0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,o(c.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},M.prototype.gChordOn=function(c){this.chordsOff||(this.gChordTacet=c.tacet)},M.prototype.paramChange=function(c){switch(c.el_type){case"gchord":c.param&&c.param.length>0?this.overridePattern=l(c.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=c.value,c.octaveShift!=null&&c.octaveShift!=null?this.bassOctaveShift=c.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=c.value,c.octaveShift!=null&&c.octaveShift!=null?this.chordOctaveShift=c.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=c.param;break;case"chordvol":this.chickVolume=c.param;break;default:console.log("unhandled midi param",c)}},M.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},M.prototype.addTrack=function(c){this.chordTrackEmpty()||c.push(this.chordTrack)},M.prototype.findChord=function(c){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!c.chord||c.chord.length===0)return null;for(var f=0;f<c.chord.length;f++){var h=c.chord[f];if(h.position==="default")return h.name;if(this.breakSynonyms.indexOf(h.name.toLowerCase())>=0)return"break"}return null},M.prototype.interpretChord=function(c){if(c.length!==0){if(c==="break")return{chick:[]};var f=c.substring(0,1);if(f==="("){if(c=c.substring(1,c.length-1),c.length===0)return;f=c.substring(0,1)}var h=this.basses[f];if(h){for(var d=this.transpose;d<-8;)d+=12;for(;d>8;)d-=12;h+=d,h<33?h+=12:h>44&&(h-=12);var n=h;h+=this.bassOctaveShift*12;var t=h-5,a;c.length===1&&(a=this.chordNotes(h,""));var e=c.substring(1),u=e.substring(0,1);u==="b"||u==="♭"?(n--,h--,t--,e=e.substring(1)):(u==="#"||u==="♯")&&(n++,h++,t++,e=e.substring(1));var g=e.split("/");if(a=this.chordNotes(n,g[0]),a.length>=3){var p=a[2]-a[0];t=t+p-7}if(g.length===2){var k=this.basses[g[1].substring(0,1)];if(k){var x=g[1].substring(1),T={"#":1,"♯":1,b:-1,"♭":-1}[x]||0;h=this.basses[g[1].substring(0,1)]+T+d,h+=this.bassOctaveShift*12,t=h}}return{boom:h,boom2:t,chick:a}}}},M.prototype.chordNotes=function(c,f){var h=this.chordIntervals[f];h||(f.slice(0,2).toLowerCase()==="ma"||f[0]==="M"?h=this.chordIntervals.M:f[0]==="m"||f[0]==="-"?h=this.chordIntervals.m:h=this.chordIntervals.M),c+=12,c+=this.chordOctaveShift*12;for(var d=[],n=0;n<h.length;n++)d.push(c+h[n]);return d},M.prototype.writeNote=function(c,f,h,d,n,t){c!==void 0&&this.chordTrack.push({cmd:"note",pitch:c,volume:h,start:this.lastBarTime+d*s(f,this.tempoChangeFactor),duration:s(n,this.tempoChangeFactor),gap:0,instrument:t})},M.prototype.chordTrackEmpty=function(){for(var c=!0,f=0;f<this.chordTrack.length&&c;f++)this.chordTrack[f].cmd==="note"&&(c=!1);return c},M.prototype.resolveChords=function(c,f){if(!this.hasRhythmHead){var h=this.meter.num,d=this.meter.den,n=1/d,t=n/2,a=parseInt(h,10)/parseInt(d,10),e=a-(f-c)/this.tempoChangeFactor;Math.abs(e)<1e-5&&(e=0),(this.currentChords.length===0||this.currentChords[0].beat!==0)&&this.currentChords.unshift({beat:0,chord:this.chordLastBar});var u=r(this.currentChords,8*h/d),g=this.overridePattern?this.overridePattern:this.rhythmPatterns[h+"/"+d];if(e){g=[];for(var p=(f-c)/this.tempoChangeFactor*8,k=0;k<p/2;k+=2)g.push("chick"),g.push("")}if(!g){g=[];for(var k=0;k<8*h/d/2;k++)g.push("chick"),g.push("")}for(var x=!0,T=Math.min(g.length,u.length),k=0;k<T;k++){k>0&&u[k-1]&&u[k]&&u[k-1].boom!==u[k].boom&&(x=!0);var j=g[k],O=j.indexOf("boom")>=0,m=!O&&k!==0&&g[0].indexOf("boom")>=0&&(!u[k-1]||u[k-1].boom!==u[k].boom),E=b(u[k],j,x,m);O&&(x=!1);for(var P=0;P<E.length;P++)this.writeNote(E[P],.125,O||m?this.boomVolume:this.chickVolume,k,t,O||m?this.bassInstrument:this.chordInstrument),m?m=!1:O=!1}}},M.prototype.processChord=function(c){if(!this.chordTrackFinished){var f=this.findChord(c);if(f){var h=this.interpretChord(f);if(h){this.chordTrack.length===0&&this.chordTrack.push({cmd:"program",channel:this.chordChannel,instrument:this.chordInstrument}),this.lastChord=h;var d=i(this.lastBarTime,o(c.time));this.currentChords.push({chord:this.lastChord,beat:d,start:o(c.time)})}}}};function b(c,f,h,d){var n=[];if(!c)return n;f.indexOf("boom")>=0?n.push(h?c.boom:c.boom2):d&&n.push(c.boom);var t=c.chick.length;if(f.indexOf("chick")>=0)for(var a=0;a<t;a++)n.push(c.chick[a]);switch(f){case"DO":n.push(c.chick[0]);break;case"MI":n.push(c.chick[1]);break;case"SOL":n.push(v(c,2));break;case"TI":n.push(v(c,3));break;case"TOP":n.push(v(c,4));break;case"do":n.push(c.chick[0]+12);break;case"mi":n.push(c.chick[1]+12);break;case"sol":n.push(v(c,2)+12);break;case"ti":n.push(v(c,3)+12);break;case"top":n.push(v(c,4)+12);break}return n}function v(c,f){var h=Math.floor(f/c.chick.length),d=c.chick[f%c.chick.length];return d+h*12}function l(c){for(var f=[],h=0;h<c.length;h++){var d=c[h];switch(d){case"z":f.push("");break;case"2":f.push("");break;case"c":f.push("chick");break;case"b":f.push("boom&chick");break;case"f":f.push("boom");break;case"G":f.push("DO");break;case"H":f.push("MI");break;case"I":f.push("SOL");break;case"J":f.push("TI");break;case"K":f.push("TOP");break;case"g":f.push("do");break;case"h":f.push("mi");break;case"i":f.push("sol");break;case"j":f.push("ti");break;case"k":f.push("top");break}}return f}function r(c,f,h){var d=[];if(c.length===0)return d;for(var n=c[0].chord,t=1;t<c.length;t++){for(var a=c[t];d.length<a.beat;)d.push(n);n=a.chord}for(;d.length<f;)d.push(n);return d}function i(c,f){var h=f-c;return h*8}M.prototype.breakSynonyms=["break","(break)","no chord","n.c.","tacet"],M.prototype.basses={A:33,B:35,C:36,D:38,E:40,F:41,G:43},M.prototype.chordIntervals={dim:[0,3,6],"°":[0,3,6],"˚":[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"˚7":[0,3,6,9],ø7:[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7♭5":[0,3,6,10],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"7b5":[0,4,6,10],"7(b5)":[0,4,6,10],"7♭5":[0,4,6,10],"7(b9,b5)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7(#9,b5)":[0,4,6,10,15],"7#9b5":[0,4,6,10,15],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],m:[0,3,7],"-":[0,3,7],m6:[0,3,7,9],"-6":[0,3,7,9],m7:[0,3,7,10],"-7":[0,3,7,10],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"-6/9":[0,3,7,9,14],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-maj7":[0,3,7,11],"-9+7":[0,3,7,11,13],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-maj9":[0,3,7,11,14],"-∆9":[0,3,7,11,14],mM9:[0,3,7,11,14],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],"6add9":[0,4,7,9,14],69:[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,7,10,14,17],13:[0,4,7,10,14,21],"7b9":[0,4,7,10,13],"7♭9":[0,4,7,10,13],"7(b9)":[0,4,7,10,13],"7(#9)":[0,4,7,10,15],"7#9":[0,4,7,10,15],"(13)":[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7(#9,b13)":[0,4,7,10,15,20],"7(#11)":[0,4,7,10,14,18],"7#11":[0,4,7,10,14,18],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"9(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"13(#11)":[0,4,7,10,18,21],"13#11":[0,4,7,10,18,21],maj7:[0,4,7,11],"∆7":[0,4,7,11],Δ7:[0,4,7,11],maj9:[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7(11)":[0,4,7,11,17],"maj7(#11)":[0,4,7,11,18],"maj7(13)":[0,4,7,14,21],"maj7(9,13)":[0,4,7,11,14,21],"7sus4":[0,5,7,10],m7sus4:[0,3,7,10,17],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,10,14],"13sus4":[0,5,7,10,14,21],aug7:[0,4,8,10],"+7":[0,4,8,10],"+":[0,4,8],"7#5":[0,4,8,10],"7♯5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9♯5":[0,4,8,10,14],"9+5":[0,4,8,10,14],"-7(#5)":[0,3,8,10],"-7#5":[0,3,8,10],"7(#5)":[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"maj7(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5,#11)":[0,4,8,11,18],"maj7#5#11":[0,4,8,11,18],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,21],"13#5":[0,4,8,10,14,21],5:[0,7],"5(8)":[0,7,12],"5add8":[0,7,12]},M.prototype.rhythmPatterns={"2/2":["boom","","","","chick","","",""],"3/2":["boom","","","","chick","","","","chick","","",""],"4/2":["boom","","","","chick","","","","boom","","","","chick","","",""],"2/4":["boom","","chick",""],"3/4":["boom","","chick","","chick",""],"4/4":["boom","","chick","","boom","","chick",""],"5/4":["boom","","chick","","chick","","boom","","chick",""],"6/4":["boom","","chick","","boom","","chick","","boom","","chick",""],"3/8":["boom","","chick"],"5/8":["boom","chick","chick","boom","chick"],"6/8":["boom","","chick","boom","","chick"],"7/8":["boom","chick","chick","boom","chick","boom","chick"],"9/8":["boom","","chick","boom","","chick","boom","","chick"],"10/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick"],"11/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick","chick"],"12/8":["boom","","chick","boom","","chick","boom","","chick","boom","","chick"]};function o(c){return c/1e6}function s(c,f){return Math.round(c*f*1e6)/1e6}return ct=M,ct}var lt,fn;function Hi(){if(fn)return lt;fn=1;var M={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};function b(v){var l=(v.accidental?v.accidental[0]:"x")+v.verticalPos;return M[l]}return lt=b,lt}var ht,pn;function Ms(){if(pn)return ht;pn=1;var M,b=Cs(),v=Hi();return function(){var l,r,i,o,s,c=1,f,h,d,n,t,a,e={num:4,den:4},u=128,g,p=!0,k=105,x=95,T=85,j=[[k,x,T]],O=.25,m,E,P=0,A,N={},D,_=0,S,B=0,I=-.001,z=.4;M=function(Y,q,G,W){q||(q={}),W||(W={}),l=[],r=[0,0,0,0,0,0,0],o=[],s=q.qpm,c=1,f=void 0,h=void 0,d=void 0,n=void 0,t=0,S=G,e={num:4,den:4},p=!0,k=105,x=95,T=85,j=[],O=.25,m=void 0,E=void 0,P=0,A=[],N={},D=1,Y.length>0&&Y[0].length>0&&(_=Y[0][0].pickupLength),q.bassprog!==void 0&&!W.bassprog&&(W.bassprog=[q.bassprog]),q.bassvol!==void 0&&!W.bassvol&&(W.bassvol=[q.bassvol]),q.chordprog!==void 0&&!W.chordprog&&(W.chordprog=[q.chordprog]),q.chordvol!==void 0&&!W.chordvol&&(W.chordvol=[q.chordvol]),q.gchord!==void 0&&!W.gchord&&(W.gchord=[q.gchord]),a=new b(Y.length,q.chordsOff,W,e),L(Y,q);for(var K=0;K<Y.length;K++){i=0,a.setTranspose(i);var J=Y[K];d=[{cmd:"program",channel:K,instrument:f}],n=void 0,g=0,a.setLastBarTime(0);var re=!1;(q.voicesOff===!0||q.voicesOff&&q.voicesOff.length&&q.voicesOff.indexOf(K)>=0)&&(re=!0);for(var le=0;le<J.length;le++){var Z=J[le];switch(Z.el_type){case"name":n={cmd:"text",type:"name",text:Z.trackName};break;case"note":R(Z,re);break;case"key":r=X(Z);break;case"meter":e=Z,a.setMeter(e),O=F(e),ve();break;case"tempo":s?c=Z.qpm?s/Z.qpm:1:s=Z.qpm,a.setTempoChangeFactor(c);break;case"transpose":i=Z.transpose,a.setTranspose(i);break;case"bar":a.barEnd(Z),l=[],K===0&&ge(Y.length+1),a.setRhythmHead(!1),g=w(Z.time),a.setLastBarTime(g);break;case"bagpipes":break;case"instrument":if(f===void 0&&(f=Z.program),h=Z.program,d.length>0&&d[d.length-1].cmd==="program")d[d.length-1].instrument=Z.program;else{var ae;for(ae=d.length-1;ae>=0&&d[ae].cmd!=="program";ae--);(ae<0||d[ae].instrument!==Z.program)&&d.push({cmd:"program",channel:0,instrument:Z.program})}break;case"channel":y(Z.channel);break;case"drum":N=he(Z.params),ve();break;case"gchordOn":a.gChordOn(Z);break;case"beat":k=Z.beats[0],x=Z.beats[1],T=Z.beats[2],Z.volumesPerNotePitch?j=Z.volumesPerNotePitch:j=[];break;case"vol":m=Z.volume;break;case"volinc":E=Z.volume;break;case"beataccents":p=Z.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":a.paramChange(Z);break;default:console.log("MIDI creation. Unknown el_type: "+Z.el_type+`
|
|
7
|
-
`);break}}d[0].instrument===void 0&&(d[0].instrument=f||0),n&&d.unshift(n),o.push(d),a.finish(),A.length>0}return q.detuneOctave&&ye(o,parseInt(q.detuneOctave,10)),a.addTrack(o),A.length>0&&o.push(A),{tempo:s,instrument:f,tracks:o,totalDuration:t}};function y(Y){for(var q=d.length-1;q>=0;q--)if(d[q].cmd==="program"){d[q].channel=Y;return}}function w(Y){return Y/1e6}function C(Y){return Math.round(Y*c*1e6)/1e6}function L(Y,q){for(var G=0;G<Y.length;G++){for(var W=Y[G],K={},J=q.qpm,re=0,le=1,Z=0;Z<W.length;Z++){var ae=W[Z];if(ae.el_type==="tempo"){J?le=ae.qpm?J/ae.qpm:1:J=ae.qpm;continue}ae.time=re;var pe=ae.duration?ae.duration:0;if(re+=Math.round(pe*le*1e6),ae.pitches){for(var me=0;me<ae.pitches.length;me++){var ne=ae.pitches[me];if(ne){if(ne.duration=ae.duration,ne.startTie)K[ne.pitch]===void 0?K[ne.pitch]={el:Z,pitch:me}:(W[K[ne.pitch].el].pitches[K[ne.pitch].pitch].duration+=ne.duration,ae.pitches[me]=null);else if(ne.endTie){var fe=K[ne.pitch];if(fe){var be=ne.duration;delete W[fe.el].pitches[fe.pitch].startTie,W[fe.el].pitches[fe.pitch].duration+=be,ae.pitches[me]=null,delete K[ne.pitch]}else delete ne.endTie}}}delete ae.duration}}for(var ue in K)if(K.hasOwnProperty(ue)){var _e=K[ue];delete W[_e.el].pitches[_e.pitch].startTie}}}function F(Y){switch(parseInt(Y.den,10)){case 2:return .5;case 4:return .25;case 8:return Y.num%3===0?.375:.125;case 16:return .125}return .25}function V(Y,q,G){var W=G-Y;return W/q}function H(Y,q,G){if(q)return 0;let W=k,K=x,J=T;G!==void 0&&j.length>=G+1&&(W=j[G][0],K=j[G][1],J=j[G][2]);var re;if(m!==void 0)re=m,m=void 0;else if(!p)re=K;else if(_>Y)re=J;else{var le=V(g,F(e),Y);le===0?re=W:parseInt(le,10)===le?re=K:re=J}return E&&(re+=E,E=void 0),re<0&&(re=0),re>127&&(re=127),q?0:re}function U(Y,q){var G={};if(Y.decoration)for(var W=0;W<Y.decoration.length;W++)Y.decoration[W]==="staccato"?G.thisBreakBetweenNotes="staccato":Y.decoration[W]==="tenuto"?G.thisBreakBetweenNotes="tenuto":Y.decoration[W]==="accent"?G.velocity=Math.min(127,q*1.5):Y.decoration[W]==="trill"?G.noteModification="trill":Y.decoration[W]==="lowermordent"?G.noteModification="lowermordent":Y.decoration[W]==="uppermordent"?G.noteModification="pralltriller":Y.decoration[W]==="mordent"?G.noteModification="mordent":Y.decoration[W]==="turn"?G.noteModification="turn":Y.decoration[W]==="roll"?G.noteModification="roll":Y.decoration[W]==="pralltriller"?G.noteModification="pralltriller":Y.decoration[W]==="trillh"&&(G.noteModification="trillh");return G}function Q(Y,q){var G=q.start,W=q.duration,K=C(1/32);switch(Y){case"trill":for(var J=2;W>0;)d.push({cmd:"note",pitch:q.pitch+J,volume:q.volume,start:G,duration:K,gap:0,instrument:h,style:"decoration"}),J=J===2?0:2,W-=K,G+=K;break;case"trillh":for(var J=1;W>0;)d.push({cmd:"note",pitch:q.pitch+J,volume:q.volume,start:G,duration:K,gap:0,instrument:h,style:"decoration"}),J=J===1?0:1,W-=K,G+=K;break;case"pralltriller":d.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:G,duration:K,gap:0,instrument:h,style:"decoration"}),W-=K,G+=K,d.push({cmd:"note",pitch:q.pitch+2,volume:q.volume,start:G,duration:K,gap:0,instrument:h,style:"decoration"}),W-=K,G+=K,d.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:G,duration:W,gap:0,instrument:h});break;case"mordent":case"lowermordent":d.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:G,duration:K,gap:0,instrument:h,style:"decoration"}),W-=K,G+=K,d.push({cmd:"note",pitch:q.pitch-2,volume:q.volume,start:G,duration:K,gap:0,instrument:h,style:"decoration"}),W-=K,G+=K,d.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:G,duration:W,gap:0,instrument:h});break;case"turn":K=q.duration/4,d.push({cmd:"note",pitch:q.pitch+2,volume:q.volume,start:G,duration:K,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:G+K,duration:K,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:q.pitch-1,volume:q.volume,start:G+K*2,duration:K,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:G+K*3,duration:K,gap:0,instrument:h,style:"decoration"});break;case"roll":for(;W>0;)d.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:G,duration:K,gap:0,instrument:h,style:"decoration"}),W-=K*2,G+=K*2;break}}function R(Y,q){var G=H(w(Y.time),q);a.processChord(Y);var W;if(Y.gracenotes&&Y.pitches&&Y.pitches.length>0&&Y.pitches[0]&&(W=ie(Y.gracenotes,Y.pitches[0].duration),Y.elem&&(Y.elem.midiGraceNotePitches=$(W,w(Y.time),G*2/3,h))),Y.elem){var K=w(Y.time),J=K/O/s*60*1e3;if(Y.elem.currentTrackMilliseconds===void 0)Y.elem.currentTrackMilliseconds=J,Y.elem.currentTrackWholeNotes=K;else if(Y.elem.currentTrackMilliseconds.length===void 0)Y.elem.currentTrackMilliseconds!==J&&(Y.elem.currentTrackMilliseconds=[Y.elem.currentTrackMilliseconds,J],Y.elem.currentTrackWholeNotes=[Y.elem.currentTrackWholeNotes,K]);else{for(var re=!1,le=0;le<Y.elem.currentTrackMilliseconds.length;le++)Y.elem.currentTrackMilliseconds[le]===J&&(re=!0);re||(Y.elem.currentTrackMilliseconds.push(J),Y.elem.currentTrackWholeNotes.push(K))}}if(Y.pitches){var Z="",ae=U(Y,G);ae.thisBreakBetweenNotes&&(Z=ae.thisBreakBetweenNotes),ae.velocity&&(G=ae.velocity);var pe=Y.pitches;Y.style==="rhythm"&&(pe=a.setRhythmHead(!0,Y)),Y.elem&&(Y.elem.midiPitches=[]);for(var me=0;me<pe.length;me++){let ke=G;!ae.velocity&&Array.isArray(Y.decoration)&&Y.decoration.length>me&&(ke=H(w(Y.time),q,me));var ne=pe[me];if(ne){ne.startSlur&&(P+=ne.startSlur.length),ne.endSlur&&(P-=ne.endSlur.length);var fe=ne.actualPitch?ne.actualPitch:se(ne);if(h===u&&S){var be=v(ne);be&&S[be]&&(fe=S[be].sound)}var ue={cmd:"note",pitch:fe,volume:ke,start:w(Y.time),duration:C(ne.duration),instrument:h,startChar:Y.elem.startChar,endChar:Y.elem.endChar};if(ue=oe(ue),Y.gracenotes&&(ue.duration=ue.duration/2,ue.start=ue.start+ue.duration),Y.elem&&Y.elem.midiPitches.push(ue),ae.noteModification)Q(ae.noteModification,ue);else{switch(P>0?ue.endType="tenuto":Z&&(ue.endType=Z),ue.endType){case"tenuto":ue.gap=I;break;case"staccato":var _e=ue.duration*z;ue.gap=s/60*_e;break;default:ue.gap=B;break}d.push(ue)}}}d.length-1}var xe=te(Y);t=Math.max(t,w(Y.time)+C(xe))}function te(Y){return Y.pitches&&Y.pitches.length>0&&Y.pitches[0]?Y.pitches[0].duration:Y.elem?Y.elem.duration:Y.duration}var ee=[0,2,4,5,7,9,11];function se(Y){if(Y.midipitch!==void 0)return Y.midipitch;var q=Y.pitch;if(Y.accidental)switch(Y.accidental){case"sharp":l[q]=1;break;case"flat":l[q]=-1;break;case"natural":l[q]=0;break;case"dblsharp":l[q]=2;break;case"dblflat":l[q]=-2;break;case"quartersharp":l[q]=.25;break;case"quarterflat":l[q]=-.25;break}var G=ce(q)*12+ee[de(q)]+60;return l[q]!==void 0?G+=l[q]:G+=r[de(q)],G+=i,G}function X(Y){var q=[0,0,0,0,0,0,0];if(!Y.accidentals)return q;for(var G=0;G<Y.accidentals.length;G++){var W=Y.accidentals[G],K;switch(W.acc){case"flat":K=-1;break;case"quarterflat":K=-.25;break;case"sharp":K=1;break;case"quartersharp":K=.25;break;default:K=0;break}var J=W.note.toLowerCase(),re=de(J.charCodeAt(0)-99);q[re]+=K}return q}function ie(Y,q){for(var G=0,W=[],K,J=0;J<Y.length;J++)K=Y[J],G+=K.duration;var re=q/2/G;for(J=0;J<Y.length;J++){K=Y[J];var le=se(K);if(h===u&&S){var Z=v(K);Z&&S[Z]&&(le=S[Z].sound)}var ae={pitch:le,duration:K.duration*re};ae=oe(ae),W.push(ae)}return W}function $(Y,q,G,W){var K=[];G=Math.round(G);for(var J=0;J<Y.length;J++){var re=Y[J];d.push({cmd:"note",pitch:re.pitch,volume:G,start:q,duration:re.duration,gap:0,instrument:W,style:"grace"}),K.push({pitch:re.pitch,durationInMeasures:re.duration,volume:G,instrument:W}),q+=re.duration}return K}function oe(Y){var q=""+Y.pitch;return q.indexOf(".75")>=0?(Y.pitch=Math.round(Y.pitch),Y.cents=-50):q.indexOf(".25")>=0&&(Y.pitch=Math.round(Y.pitch),Y.cents=50),Y}function ce(Y){return Math.floor(Y/7)}function de(Y){return Y=Y%7,Y<0&&(Y+=7),Y}function he(Y){if(Y.pattern.length===0||Y.on===!1)return{on:!1};for(var q=Y.pattern[0],G=[],W="",K=0,J=0;J<q.length;J++)if(q[J]==="d"&&K++,q[J]==="d"||q[J]==="z")W.length!==0?(G.push(W),W=q[J]):W=W+q[J];else{if(W.length===0)return{on:!1};W=W+q[J]}if(W.length!==0&&G.push(W),Y.pattern.length!==K*2+1)return{on:!1};for(var re={on:!0,bars:Y.bars,pattern:[]},le=F(e),Z=0,ae=0;ae<G.length;ae++){W=G[ae];for(var pe=1,me=!1,ne=0,fe=1;fe<W.length;fe++)switch(W[fe]){case"/":ne!==0&&(pe*=ne),ne=0,me=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":ne=ne*10+W[fe];break;default:return{on:!1}}me?(ne===0&&(ne=2),pe/=ne):ne&&(pe*=ne),W[0]==="d"?(re.pattern.push({len:pe*le,pitch:Y.pattern[1+Z],velocity:Y.pattern[1+Z+K]}),Z++):re.pattern.push({len:pe*le,pitch:null})}return D=Y.bars?Y.bars:1,re}function ve(){if(!(!N||!N.pattern)){for(var Y=N,q=0,G=e.num/e.den,W=0;W<Y.pattern.length;W++)q+=Y.pattern[W].len;var K=q/D/G;for(W=0;W<Y.pattern.length;W++)Y.pattern[W].len=Y.pattern[W].len/K;N=Y}}function ge(Y){if(!(A.length===0&&!N.on)){var q=e.num/e.den;if(A.length===0){if(t<q)return;A.push({cmd:"program",channel:Y,instrument:u})}if(N.on)for(var G=g,W=0;W<N.pattern.length;W++){var K=C(N.pattern[W].len);N.pattern[W].pitch&&A.push({cmd:"note",pitch:N.pattern[W].pitch,volume:N.pattern[W].velocity,start:G,duration:K,gap:0,instrument:u}),G+=K}}}function ye(Y,q){for(var G={},W=0;W<Y.length;W++)for(var K=0;K<Y[W].length;K++){var J=Y[W][K];J.cmd==="note"&&(G[J.start]===void 0&&(G[J.start]=[]),G[J.start].push({track:W,event:K,pitch:J.pitch}))}var re=Object.keys(G);for(W=0;W<re.length;W++){var le=G[re[W]];if(le.length>1){le=le.sort(function(ne,fe){return ne.pitch-fe.pitch});var Z=le[le.length-1],ae=Z.pitch%12,pe=!1;for(K=0;!pe&&K<le.length-1;K++)le[K].pitch%12===ae&&(pe=!0);if(pe){var me=Y[Z.track][Z.event];me.cents||(me.cents=0),me.cents+=q}}}}}(),ht=M,ht}var ut,mn;function Ss(){if(mn)return ut;mn=1;function M(c,f){f||(f={});for(var h=!!f.lineBreaks,d=[],n=!1,t=[],a=[],e=[],u=[],g=[],p=[],k=[],x=0;x<c.length;x++){var T=s(c[x]);if(T.staff){if(n&&!T.vskip)for(var j=d[d.length-1],O=0;O<j.staff.length;O++){var m=T.staff[O],E=j.staff[O];if(m&&(o(m.meter,t[O])||(v(m.meter,m.voices),t[O]=m.meter,delete m.meter),o(m.key,a[O])||(l(m.key,m.voices),a[O]=m.key,delete m.key),m.title&&(E.abbrevTitle=m.title),o(m.clef,e[O])||(r(m.clef,m.voices),e[O]=m.clef,delete m.clef),o(m.vocalfont,u[O])||(i(m.vocalfont,m.voices,"vocalfont"),u[O]=m.vocalfont,delete m.vocalfont),o(m.gchordfont,g[O])||(i(m.gchordfont,m.voices,"gchordfont"),g[O]=m.gchordfont,delete m.gchordfont),o(m.tripletfont,p[O])||(i(m.tripletfont,m.voices,"tripletfont"),p[O]=m.tripletfont,delete m.tripletfont),o(m.annotationfont,k[O])||(i(m.annotationfont,m.voices,"annotationfont"),k[O]=m.annotationfont,delete m.annotationfont)),m)for(var P=0;P<E.voices.length;P++){var A=E.voices[P],N=m.voices[P];h&&A.push({el_type:"break"}),N&&(E.voices[P]=A.concat(N))}}else{for(var D=0;D<T.staff.length;D++)a[D]=T.staff[D].key,t[D]=T.staff[D].meter,e[D]=T.staff[D].clef;d.push(s(T))}n=!0}else n=!1,d.push(T)}return d}function b(c,f){return c==="abselem"?"abselem":f}function v(c,f){c.el_type="meter",c.startChar=-1,c.endChar=-1;for(var h=0;h<f.length;h++)f[h].unshift(c)}function l(c,f){c.el_type="key",c.startChar=-1,c.endChar=-1;for(var h=0;h<f.length;h++)f[h].unshift(c)}function r(c,f){c.el_type="clef",c.startChar=-1,c.endChar=-1;for(var h=0;h<f.length;h++)f[h].unshift(c)}function i(c,f,h){c.el_type="font",c.type=h,c.startChar=-1,c.endChar=-1;for(var d=0;d<f.length;d++)f[d].unshift(c)}function o(c,f){if(!c)return!0;var h=JSON.stringify(c,b),d=JSON.stringify(f,b);return h===d}function s(c){for(var f={},h=Object.keys(c),d=0;d<h.length;d++)if(h[d]!=="staff")f[h[d]]=c[h[d]];else{f.staff=[];for(var n=0;n<c.staff.length;n++){for(var t={},a=Object.keys(c.staff[n]),e=0;e<a.length;e++)if(a[e]!=="voices")t[a[e]]=c.staff[n][a[e]];else{t.voices=[];for(var u=0;u<c.staff[n].voices.length;u++)t.voices.push([].concat(c.staff[n].voices[u]))}f.staff.push(t)}}return f}return ut=M,ut}var dt,gn;function Gi(){if(gn)return dt;gn=1;var M=Ce(),b=we(),v=Fi(),l=Ms(),r=Ss(),i=function(){this.reset=function(){this.version="1.1.0",this.media="screen",this.metaText={},this.metaTextInfo={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0,this.runningFonts={},delete this.visualTranspose},this.reset();function o(n,t,a,e){for(var u=0;u<e.length;u++)n[a][e[u]]=t[a][e[u]]}this.copyTopInfo=function(n){var t=["tempo","title","header","rhythm","origin","composer","author","partOrder"];o(this,n,"metaText",t),o(this,n,"metaTextInfo",t)},this.copyBottomInfo=function(n){var t=["unalignedWords","book","source","discography","notes","transcription","history","abc-copyright","abc-creator","abc-edited-by","footer"];o(this,n,"metaText",t),o(this,n,"metaTextInfo",t)},this.getBeatLength=function(){var n=this.getMeterFraction(),t=1;return n.num===6||n.num===9||n.num===12||n.num===3&&n.den===8?t=3:n.den===8&&(n.num===5||n.num===7)&&(t=2),t/n.den};function s(n,t){for(var a=0,e=0;e<n.length;e++)if(n[e].staff)for(var u=0;u<n[e].staff.length;u++)for(var g=0;g<n[e].staff[u].voices.length;g++)for(var p=n[e].staff[u].voices[g],k=1,x=0;x<p.length;x++){var T=p[x].rest&&p[x].rest.type==="spacer";if(p[x].startTriplet&&(k=p[x].tripletMultiplier),p[x].duration&&!T&&p[x].el_type!=="tempo"&&(a+=p[x].duration*k),p[x].endTriplet&&(k=1),a>=t&&(a-=t),p[x].el_type==="bar")return a}return a}this.getPickupLength=function(){var n=this.getBarLength(),t=s(this.lines,n);return t<1e-8||n-t<1e-8?0:t},this.getBarLength=function(){var n=this.getMeterFraction();return n.num/n.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(n){var t;if(n)t=n;else{var a=this.metaText?this.metaText.tempo:null;t=this.getBpm(a)}t<=0&&(t=1);var e=this.getBeatsPerMeasure(),u=e/t;return u*6e4},this.getBeatsPerMeasure=function(){var n=this.getBeatLength(),t=this.getBarLength();return t/n},this.getMeter=function(){for(var n=0;n<this.lines.length;n++){var t=this.lines[n];if(t.staff)for(var a=0;a<t.staff.length;a++){var e=t.staff[a].meter;if(e)return e}}return{type:"common_time"}},this.getMeterFraction=function(){var n=this.getMeter(),t=4,a=4;if(n)if(n.type==="specified"){if(n.value&&n.value.length>0&&n.value[0].num.indexOf("+")>0){var e=n.value[0].num.split("+");t=0;for(var u=0;u<e.length;u++)t+=parseInt(e[u],10)}else t=parseInt(n.value[0].num,10);a=parseInt(n.value[0].den,10)}else n.type==="cut_time"?(t=2,a=2):n.type==="common_time"&&(t=4,a=4);return this.meter={num:t,den:a},this.meter},this.getKeySignature=function(){for(var n=0;n<this.lines.length;n++){var t=this.lines[n];if(t.staff){for(var a=0;a<t.staff.length;a++)if(t.staff[a].key)return t.staff[a].key}}return{}},this.getElementFromChar=function(n){for(var t=0;t<this.lines.length;t++){var a=this.lines[t];if(a.staff)for(var e=0;e<a.staff.length;e++)for(var u=a.staff[e],g=0;g<u.voices.length;g++)for(var p=u.voices[g],k=0;k<p.length;k++){var x=p[k];if(x.startChar&&x.endChar&&x.startChar<=n&&x.endChar>n)return x}}return null};function c(n){for(var t,a,e,u,g=n.length-1;g>=0;g--){var p=n[g];p.type==="bar"?(p.top=e,p.nextTop=t,t=e,p.bottom=u,p.nextBottom=a,a=u):p.type==="event"&&(e=p.top,u=p.top+p.height)}}function f(n){var t=[];for(var a in n)n.hasOwnProperty(a)&&t.push(n[a]);return t=t.sort(function(e,u){var g=e.milliseconds-u.milliseconds;return g!==0?g:e.type==="bar"?-1:1}),t}this.addElementToEvents=function(n,t,a,e,u,g,p,k,x,T){if(t.hint)return{isTiedState:void 0,duration:0};var j=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&t.abcelem.rest.type==="spacer"&&(j=0),j>0){for(var O=[],m=0;m<t.elemset.length;m++)t.elemset[m]!==null&&O.push(t.elemset[m]);var E=t.startTie;if(x!==void 0)n["event"+x].elements.push(O),T&&(n["event"+a]||(n["event"+a]={type:"event",milliseconds:a,line:g,measureNumber:p,top:e,height:u,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),n["event"+a].measureStart=!0,T=!1),E||(x=void 0);else{if(!n["event"+a])n["event"+a]={type:"event",milliseconds:a,line:g,measureNumber:p,top:e,height:u,left:t.x,width:t.w,elements:[O],startChar:t.abcelem.startChar,endChar:t.abcelem.endChar,startCharArray:[t.abcelem.startChar],endCharArray:[t.abcelem.endChar],midiPitches:t.abcelem.midiPitches?M.cloneArray(t.abcelem.midiPitches):[]},t.abcelem.midiGraceNotePitches&&(n["event"+a].midiGraceNotePitches=M.cloneArray(t.abcelem.midiGraceNotePitches));else{if(n["event"+a].left?n["event"+a].left=Math.min(n["event"+a].left,t.x):n["event"+a].left=t.x,n["event"+a].elements.push(O),n["event"+a].startCharArray.push(t.abcelem.startChar),n["event"+a].endCharArray.push(t.abcelem.endChar),n["event"+a].startChar===null&&(n["event"+a].startChar=t.abcelem.startChar),n["event"+a].endChar===null&&(n["event"+a].endChar=t.abcelem.endChar),t.abcelem.midiPitches&&t.abcelem.midiPitches.length){n["event"+a].midiPitches||(n["event"+a].midiPitches=[]);for(var m=0;m<t.abcelem.midiPitches.length;m++)n["event"+a].midiPitches.push(t.abcelem.midiPitches[m])}if(t.abcelem.midiGraceNotePitches&&t.abcelem.midiGraceNotePitches.length){n["event"+a].midiGraceNotePitches||(n["event"+a].midiGraceNotePitches=[]);for(var P=0;P<t.abcelem.midiGraceNotePitches.length;P++)n["event"+a].midiGraceNotePitches.push(t.abcelem.midiGraceNotePitches[P])}}T&&(n["event"+a].measureStart=!0,T=!1)}}return{isTiedState:x,duration:j/k,nextIsBar:T||t.type==="bar"}},this.makeVoicesArray=function(){for(var n=[],t=[],a={},e=0;e<this.engraver.staffgroups.length;e++){var u=this.engraver.staffgroups[e];if(u&&u.staffs&&u.staffs.length>0){var g=u.staffs[0],p=g.absoluteY,k=p-g.top*b.STEP,x=u.staffs[u.staffs.length-1];p=x.absoluteY;for(var T=p-x.bottom*b.STEP,j=T-k,O=u.voices,m=0;m<O.length;m++)if(!(O[m].staff&&O[m].staff.isTabStaff)){var E=!1;n[m]||(n[m]=[]),t[m]===void 0&&(t[m]=0);for(var P=O[m].children,A=0;A<P.length;A++)P[A].type==="tempo"&&(a[t[m]]=this.getBpm(P[A].abcelem)),n[m].push({top:k,height:j,line:u.line,measureNumber:t[m],elem:P[A]}),P[A].type==="bar"&&E&&t[m]++,(P[A].type==="note"||P[A].type==="rest")&&(E=!0)}}}return this.tempoLocations=a,n},this.setupEvents=function(n,t,a,e){e||(e=1);for(var u=[],g={},p=n,k,x=!0,T=this.makeVoicesArray(),j=0,O=0;O<T.length;O++){var m=p,E=Math.round(m*1e3),P=0,A=-1,N=T[O],D=a;t=this.getBeatLength()*D/60;for(var _=-1,S=0;S<N.length;S++){var B=N[S].measureNumber;_!==B&&this.tempoLocations[B]&&(D=this.tempoLocations[B],t=e*this.getBeatLength()*D/60,_=B);var I=N[S].elem,z=this.addElementToEvents(g,I,E,N[S].top,N[S].height,N[S].line,N[S].measureNumber,t,k,x);k=z.isTiedState,x=z.nextIsBar,m+=z.duration;var y;if(I.duration>0&&g["event"+E]&&(y="event"+E),E=Math.round(m*1e3),I.type==="bar"){var w=I.abcelem.type,C=w==="bar_right_repeat"||w==="bar_dbl_repeat",L=I.abcelem.startEnding==="1",F=w==="bar_left_repeat"||w==="bar_dbl_repeat"||w==="bar_right_repeat";if(C){S>0&&(g[y].endX=I.x),A===-1&&(A=S);var V=0;_=-1;for(var H=P;H<A;H++){B=N[H].measureNumber,_!==B&&this.tempoLocations[B]&&(D=this.tempoLocations[B],t=e*this.getBeatLength()*D/60,_=B);var U=N[H].elem;z=this.addElementToEvents(g,U,E,N[H].top,N[H].height,N[H].line,N[H].measureNumber,t,k,x),k=z.isTiedState,x=z.nextIsBar,m+=z.duration,V=E,E=Math.round(m*1e3)}g["event"+V]&&(g["event"+V].endX=N[A].elem.x),x=!0,A=-1}L&&(A=S),F&&(P=S)}}j=Math.max(j,E)}return u=f(g),c(u),d(this.lines,u),u.push({type:"end",milliseconds:j}),this.addUsefulCallbackInfo(u,D*e),u},this.addUsefulCallbackInfo=function(n,t){for(var a=this.millisecondsPerMeasure(t),e=0;e<n.length;e++){var u=n[e];u.millisecondsPerMeasure=a}};function h(n,t){for(;t<n.length&&n[t].left===null;)t++;return n[t]}function d(n,t){if(!(t.length<1)){for(var a=0;a<t.length-1;a++){var e=t[a],u=h(t,a+1);if(e.left!==null){var g=u&&e.top===u.top?u.left:n[e.line].staffGroup.w;e.endX!==void 0?g>e.left&&(e.endX=Math.min(e.endX,g)):e.endX=g}}var p=t[t.length-1];p.endX=n[p.line].staffGroup.w}}this.getBpm=function(n){var t;if(n||(n=this.metaText?this.metaText.tempo:null),n){t=n.bpm;var a=this.getBeatLength(),e=n.duration&&n.duration.length>0?n.duration[0]:a;t=t*e/a}if(!t){t=180;var u=this.getMeterFraction();u&&u.num!==3&&u.num%3===0&&(t=120)}return t},this.setTiming=function(n,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var a=this.metaText?this.metaText.tempo:null,e=this.getBpm(a),u=1;n?a&&(u=n/e):n=e;var g=this.getBeatLength(),p=n/60,k=this.getBarLength(),x=k/g*t/p;x&&(x-=this.getPickupLength()/g/p);var T=g*p;return this.noteTimings=this.setupEvents(x,T,n,u),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*p):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(n){n||(n={});var t=v(this,n);return l(t,n,this.formatting.percmap,this.formatting.midi)},this.deline=function(n){return r(this.lines,n)},this.findSelectableElement=function(n){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(n):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}};return dt=i,dt}var ft,vn;function _s(){if(vn)return ft;vn=1;var M=Nr(),b=function(m){var E=this,P={},A="";m.reset(),this.setVisualTranspose=function(N){N!==void 0&&(m.visualTranspose=N)},this.cleanUp=function(N,D,_){t(m),delete m.runningFonts,l(m),m.metaText.tempo&&m.metaText.tempo.bpm&&!m.metaText.tempo.duration&&(m.metaText.tempo.duration=[m.getBeatLength()]);var S=!1,B,I,z;for(B=0;B<m.lines.length;B++)if(m.lines[B].staff!==void 0){var y=!1;for(I=0;I<m.lines[B].staff.length;I++)if(m.lines[B].staff[I]===void 0)S=!0,m.lines[B].staff[I]=null;else for(z=0;z<m.lines[B].staff[I].voices.length;z++)m.lines[B].staff[I].voices[z]===void 0?m.lines[B].staff[I].voices[z]=[]:a(m.lines[B].staff[I].voices[z])&&(y=!0);y||(m.lines[B]=null,S=!0)}if(S&&(m.lines=m.lines.filter(function(H){return!!H}),m.lines.forEach(function(H){H.staff&&(H.staff=H.staff.filter(function(U){return!!U}))})),N)for(;c(m.lines,N););if(D){for(S=!1,B=0;B<m.lines.length;B++)if(m.lines[B].staff!==void 0)for(I=0;I<m.lines[B].staff.length;I++){var w=!1;for(z=0;z<m.lines[B].staff[I].voices.length;z++)e(m.lines[B].staff[I].voices[z])&&(w=!0);w||(S=!0,m.lines[B].staff[I]=null)}S&&m.lines.forEach(function(H){H.staff&&(H.staff=H.staff.filter(function(U){return!!U}))})}for(o(m.lines),B=0;B<m.lines.length;B++)if(m.lines[B].staff)for(I=0;I<m.lines[B].staff.length;I++)delete m.lines[B].staff[I].workingClef;for(;r(m););for(var B=0;B<m.lines.length;B++){var C=m.lines[B].staff;if(C)for(m.staffNum=0;m.staffNum<C.length;m.staffNum++)for(C[m.staffNum].clef&&M.fixClef(C[m.staffNum].clef),m.voiceNum=0;m.voiceNum<C[m.staffNum].voices.length;m.voiceNum++){var L=C[m.staffNum].voices[m.voiceNum];s(L,m.staffNum,m.voiceNum,_);for(var F=0;F<L.length;F++)L[F].el_type==="clef"&&M.fixClef(L[F]);if(L.length>0&&L[L.length-1].barNumber){var V=h(m.lines,B);V&&(V.staff[0].barNumber=L[L.length-1].barNumber),delete L[L.length-1].barNumber}}}return delete m.staffNum,delete m.voiceNum,delete m.lineNum,delete m.potentialStartBeam,delete m.potentialEndBeam,delete m.vskipPending,_},this.addTieToLastNote=function(N){var D=d(m);return D&&D.pitches&&D.pitches.length>0?(D.pitches[0].startTie={},N&&(D.pitches[0].startTie.style="dotted"),!0):!1},this.appendElement=function(N,D,_,S){if(S.el_type=N,D!==null&&(S.startChar=D),_!==null&&(S.endChar=_),N==="note"){var B=n(S);B>=.25||S.force_end_beam_last&&m.potentialStartBeam!==void 0?k(m):S.end_beam&&m.potentialStartBeam!==void 0?S.rest===void 0?p(S,m):k(m):S.rest===void 0&&(m.potentialStartBeam===void 0?S.end_beam||(m.potentialStartBeam=S,delete m.potentialEndBeam):m.potentialEndBeam=S)}else k(m);return delete S.end_beam,delete S.force_end_beam_last,S.rest&&S.rest.type==="invisible"&&delete S.decoration,m.lines.length<=m.lineNum||m.lines[m.lineNum].staff.length<=m.staffNum?!1:(g(E,m,S,P,A),!0)},this.appendStartingElement=function(N,D,_,S){t(m);var B;N==="key"&&(B=S.impliedNaturals,delete S.impliedNaturals,delete S.explicitAccidentals);var I=Object.assign({},S);if(m.lines[m.lineNum]){var z=m.lines[m.lineNum].staff;if(z){z.length<=m.staffNum&&(z[m.staffNum]={},z[m.staffNum].clef=Object.assign({},z[0].clef),z[m.staffNum].key=Object.assign({},z[0].key),z[0].meter&&(z[m.staffNum].meter=Object.assign({},z[0].meter)),z[m.staffNum].workingClef=Object.assign({},z[0].workingClef),z[m.staffNum].voices=[[]]),N==="clef"&&(z[m.staffNum].workingClef=I);for(var y=z[m.staffNum].voices[m.voiceNum],w=0;w<y.length;w++){if(y[w].el_type==="note"||y[w].el_type==="bar"){I.el_type=N,I.startChar=D,I.endChar=_,B&&(I.accidentals=B.concat(I.accidentals)),y.push(I);return}if(y[w].el_type===N){I.el_type=N,I.startChar=D,I.endChar=_,B&&(I.accidentals=B.concat(I.accidentals)),y[w]=I;return}}z[m.staffNum][N]=S}}},this.addSubtitle=function(N,D){u(m,{subtitle:{text:N,startChar:D.startChar,endChar:D.endChar}})},this.addSpacing=function(N){m.vskipPending=N},this.addNewPage=function(N){u(m,{newpage:N})},this.addSeparator=function(N,D,_,S){u(m,{separator:{spaceAbove:Math.round(N),spaceBelow:Math.round(D),lineLength:Math.round(_),startChar:S.startChar,endChar:S.endChar}})},this.addText=function(N,D){u(m,{text:{text:N,startChar:D.startChar,endChar:D.endChar}})},this.addCentered=function(N){u(m,{text:[{text:N,center:!0}]})},this.changeVoiceScale=function(N){E.appendElement("scale",null,null,{size:N})},this.changeVoiceColor=function(N){E.appendElement("color",null,null,{color:N})},this.startNewLine=function(N){t(m),N.currentVoiceName&&(A=N.currentVoiceName,P[N.currentVoiceName]=N),m.lines[m.lineNum]===void 0?O(E,m,N):m.lines[m.lineNum].staff===void 0?(m.lineNum++,this.startNewLine(N)):m.lines[m.lineNum].staff[m.staffNum]===void 0?j(E,m,N):m.lines[m.lineNum].staff[m.staffNum].voices[m.voiceNum]===void 0?T(E,m,N):a(m.lines[m.lineNum].staff[m.staffNum].voices[m.voiceNum])?(m.lineNum++,this.startNewLine(N)):N.part&&E.appendElement("part",N.part.startChar,N.part.endChar,{title:N.part.title})},this.setRunningFont=function(N,D){m.runningFonts[N]=D},this.setBarNumberImmediate=function(N){var D=this.getCurrentVoice();if(D&&D.length>0){var _=D[D.length-1];if(_.el_type==="bar")_.barNumber!==void 0&&(_.barNumber=N);else return N-1}return N},this.hasBeginMusic=function(){for(var N=0;N<m.lines.length;N++)if(m.lines[N].staff)return!0;return!1},this.isFirstLine=function(N){for(var D=N-1;D>=0;D--)if(m.lines[D].staff!==void 0)return!1;return!0},this.getCurrentVoice=function(){var N=f(m.lines,m.lineNum);if(!N)return null;var D=N.staff[m.staffNum];return D&&D.voices[m.voiceNum]!==void 0?D.voices[m.voiceNum]:null},this.setCurrentVoice=function(N,D,_){m.staffNum=N,m.voiceNum=D,A=_;for(var S=0;S<m.lines.length;S++)if(m.lines[S].staff&&(m.lines[S].staff[N]===void 0||m.lines[S].staff[N].voices[D]===void 0||!a(m.lines[S].staff[N].voices[D])))return m.lineNum=S,!!(!m.lines[S].staff[N]||m.lines[S].staff[N].voices[D]);return m.lineNum=S,!1},this.addMetaText=function(N,D,_){m.metaText[N]===void 0?(m.metaText[N]=D,m.metaTextInfo[N]=_):(typeof m.metaText[N]=="string"&&typeof D=="string"?m.metaText[N]+=`
|
|
8
|
-
`+D:(m.metaText[N]==="string"&&(m.metaText[N]=[{text:m.metaText[N]}]),typeof D=="string"&&(D=[{text:D}]),m.metaText[N]=m.metaText[N].concat(D)),m.metaTextInfo[N].endChar=_.endChar)},this.addMetaTextArray=function(N,D,_){m.metaText[N]===void 0?(m.metaText[N]=[D],m.metaTextInfo[N]=_):(m.metaText[N].push(D),m.metaTextInfo[N].endChar=_.endChar)},this.addMetaTextObj=function(N,D,_){m.metaText[N]=D,m.metaTextInfo[N]=_}};function v(m){if(!m||typeof m=="string")return!1;for(var E=0;E<m.length;E++)if(typeof m[E]!="string")return!1;return!0}function l(m){v(m.metaText.notes)&&(m.metaText.notes=m.metaText.notes.join(`
|
|
9
|
-
`)),v(m.metaText.history)&&(m.metaText.history=m.metaText.history.join(`
|
|
10
|
-
`))}function r(m){for(var E=!1,P=[],A=0;A<m.lines.length;A++){var N=m.lines[A];if(N.staff)for(var D=0;D<N.staff.length;D++){for(var _=N.staff[D],S=[],B=0;B<_.voices.length;B++){var I=_.voices[B];S.push({hasOverlay:!1,voice:[],snip:[]}),P[A]=0;for(var z=0,y=!1,w=-1,C=0;C<I.length;C++){var L=I[C];if(L.el_type==="overlay"&&!y){E=!0,y=!0,w=C,S[B].hasOverlay=!0;for(var F=0;F<A;F++)P[F]&&m.lines[F].staff&&_.voices.length>=m.lines[F].staff[0].voices.length&&m.lines[F].staff[0].voices.push([{el_type:"note",duration:P[F],rest:{type:"invisible"},startChar:L.startChar,endChar:L.endChar}])}else L.el_type==="bar"?(y?(y=!1,S[B].snip.push({start:w,len:C-w}),S[B].voice.push(L)):(z>0&&S[B].voice.push({el_type:"note",duration:z,rest:{type:"invisible"},startChar:L.startChar,endChar:L.endChar}),S[B].voice.push(L)),z=0):L.el_type==="note"?y?S[B].voice.push(L):(!L.rest||L.rest.type!=="spacer")&&(z+=L.duration,P[A]+=L.duration):(L.el_type==="scale"||L.el_type==="stem"||L.el_type==="overlay"||L.el_type==="style"||L.el_type==="transpose"||L.el_type==="color")&&S[B].voice.push(L)}S[B].hasOverlay&&S[B].snip.length===0&&S[B].snip.push({start:w,len:I.length-w})}for(B=0;B<S.length;B++){var V=S[B];if(V.hasOverlay){V.voice.splice(0,0,{el_type:"stem",direction:"down"}),_.voices.push(V.voice);for(var H=V.snip.length-1;H>=0;H--){var U=V.snip[H];_.voices[B].splice(U.start,U.len),_.voices[B].splice(U.start+1,0,{el_type:"stem",direction:"auto"});var Q=i(_.voices[B],U.start);_.voices[B].splice(Q,0,{el_type:"stem",direction:"up"})}for(H=0;H<_.voices[_.voices.length-1].length;H++){_.voices[_.voices.length-1][H]=Object.assign({},_.voices[_.voices.length-1][H]);var R=_.voices[_.voices.length-1][H];R.el_type==="bar"&&R.startEnding&&delete R.startEnding,R.el_type==="bar"&&R.endEnding&&delete R.endEnding}}}}}return E}function i(m,E){for(var P=E-1;P>0&&m[P].el_type!=="bar";P--);return P}function o(m){for(var E=!0,P=0;P<m.length;P++){var A=m[P];if(A.staff){for(var N=0;N<A.staff.length;N++){var D=A.staff[N];if(D.title){for(var _=!1,S=0;S<D.title.length;S++)D.title[S]?(D.title[S]=E?D.title[S].name:D.title[S].subname,D.title[S]?_=!0:D.title[S]=""):D.title[S]="";_||delete D.title}}E=!1}}}function s(m,E,P,A){A[E]||(A[E]=[]),A[E][P]||(A[E][P]=[]);for(var N,D=function(H,U,Q){if(A[E][P][Q]===void 0){for(N=0;N<A[E][P].length;N++)if(A[E][P][N]!==void 0){Q=N;break}if(A[E][P][Q]===void 0){var R=Q*100+1;H.endSlur.forEach(function(se){R===se&&--R}),A[E][P][Q]=[R]}}for(var te,ee=0;ee<U;ee++)te=A[E][P][Q].pop(),H.endSlur.push(te);return A[E][P][Q].length===0&&delete A[E][P][Q],te},_=function(H,U,Q,R){H.startSlur=[],A[E][P][Q]===void 0&&(A[E][P][Q]=[]);for(var te=Q*100+1,ee=0;ee<U;ee++)R&&(R.forEach(function(se){te===se&&++te}),R.forEach(function(se){te===se&&++te}),R.forEach(function(se){te===se&&++te})),A[E][P][Q].forEach(function(se){te===se&&++te}),A[E][P][Q].forEach(function(se){te===se&&++te}),A[E][P][Q].push(te),H.startSlur.push({label:te}),H.dottedSlur&&(H.startSlur[H.startSlur.length-1].style="dotted",delete H.dottedSlur),te++},S=0;S<m.length;S++){var B=m[S];if(B.el_type==="note"){if(B.gracenotes)for(var I=0;I<B.gracenotes.length;I++){if(B.gracenotes[I].endSlur){var z=B.gracenotes[I].endSlur;B.gracenotes[I].endSlur=[];for(var y=0;y<z;y++)D(B.gracenotes[I],1,20)}B.gracenotes[I].startSlur&&(N=B.gracenotes[I].startSlur,_(B.gracenotes[I],N,20))}if(B.endSlur&&(N=B.endSlur,B.endSlur=[],D(B,N,0)),B.startSlur&&(N=B.startSlur,_(B,N,0)),B.pitches){for(var w=[],C=0;C<B.pitches.length;C++)if(B.pitches[C].endSlur){var L=B.pitches[C].endSlur;B.pitches[C].endSlur=[];for(var F=0;F<L;F++){var V=D(B.pitches[C],1,C+1);w.push(V)}}for(C=0;C<B.pitches.length;C++)B.pitches[C].startSlur&&(N=B.pitches[C].startSlur,_(B.pitches[C],N,C+1,w));B.gracenotes&&B.pitches[0].endSlur&&B.pitches[0].endSlur[0]===100&&B.pitches[0].startSlur&&(B.gracenotes[0].endSlur?B.gracenotes[0].endSlur.push(B.pitches[0].startSlur[0].label):B.gracenotes[0].endSlur=[B.pitches[0].startSlur[0].label],B.pitches[0].endSlur.length===1?delete B.pitches[0].endSlur:B.pitches[0].endSlur[0]===100?B.pitches[0].endSlur.shift():B.pitches[0].endSlur[B.pitches[0].endSlur.length-1]===100&&B.pitches[0].endSlur.pop(),A[E][P][1].length===1?delete A[E][P][1]:A[E][P][1].pop())}}}}function c(m,E){for(var P=0;P<m.length;P++)if(m[P].staff!==void 0)for(var A=0;A<m[P].staff.length;A++)for(var N=[],D=0;D<m[P].staff[A].voices.length;D++)for(var _=m[P].staff[A].voices[D],S=0,B=0;B<_.length;B++)if(_[B].el_type==="bar"){if(S++,S>=E&&B<_.length-1){var I=h(m,P);if(!I){var z=JSON.parse(JSON.stringify(m[P]));m.push(Object.assign({},z)),I=m[m.length-1];for(var y=0;y<I.staff.length;y++)for(var w=0;w<I.staff[y].voices.length;w++)I.staff[y].voices[w]=[]}var C=B+1,L=m[P].staff[A].voices[D].slice(C);return m[P].staff[A].voices[D]=m[P].staff[A].voices[D].slice(0,C),I.staff[A].voices[D]=N.concat(L.concat(I.staff[A].voices[D])),!0}}else _[B].duration||N.push(_[B]);return!1}function f(m,E){if(m.length<=E)return null;for(;E>=0;){if(m[E].staff)return m[E];E--}return null}function h(m,E){for(E++;m.length>E;){if(m[E].staff)return m[E];E++}return null}function d(m){if(!m.lines[m.lineNum]||!m.lines[m.lineNum].staff||!m.lines[m.lineNum].staff[m.staffNum])return null;var E=m.lines[m.lineNum].staff[m.staffNum].voices[m.voiceNum];if(!E)return null;for(var P=E.length-1;P>=0;P--){var A=E[P];if(A.el_type==="note")return A}return null}function n(m){return m.duration?m.duration:0}function t(m){m.potentialStartBeam&&m.potentialEndBeam&&(m.potentialStartBeam.startBeam=!0,m.potentialEndBeam.endBeam=!0),delete m.potentialStartBeam,delete m.potentialEndBeam}function a(m){for(var E=0;E<m.length;E++)if(m[E].el_type==="note"||m[E].el_type==="bar")return!0;return!1}function e(m){for(var E=0;E<m.length;E++)if(m[E].el_type==="note"&&(m[E].rest===void 0||m[E].chord!==void 0))return!0;return!1}function u(m,E){m.vskipPending&&(E.vskip=m.vskipPending,delete m.vskipPending),m.lines.push(E)}function g(m,E,P,A,N){var D=E.lines[E.lineNum].staff[E.staffNum];if(P.pitches!==void 0){var _=D.workingClef.verticalPos;P.pitches.forEach(function(B){B.verticalPos=B.pitch-_})}if(P.gracenotes!==void 0){var S=D.workingClef.verticalPos;P.gracenotes.forEach(function(B){B.verticalPos=B.pitch-S})}D.voices.length<=E.voiceNum&&(A[N]||(A[N]={}),T(m,E,A[N])),D.voices[E.voiceNum].push(P)}function p(m,E){E.potentialStartBeam.startBeam=!0,m.endBeam=!0,delete E.potentialStartBeam,delete E.potentialEndBeam}function k(m){m.potentialStartBeam!==void 0&&m.potentialEndBeam!==void 0&&(m.potentialStartBeam.startBeam=!0,m.potentialEndBeam.endBeam=!0),delete m.potentialStartBeam,delete m.potentialEndBeam}function x(m,E,P){if(m.runningFonts[E]){for(var A=!1,N=Object.keys(P),D=0;D<N.length;D++)m.runningFonts[E][N[D]]!==P[N[D]]&&(A=!0);A&&(m.lines[m.lineNum].staff[m.staffNum][E]=P)}m.runningFonts[E]=P}function T(m,E,P){var A=E.lines[E.lineNum].staff[E.staffNum];if(A.voices[E.voiceNum]=[],A.title||(A.title=[]),A.title[E.voiceNum]={name:P.name,subname:P.subname},P.style&&m.appendElement("style",null,null,{head:P.style}),P.stem)m.appendElement("stem",null,null,{direction:P.stem});else if(E.voiceNum>0){if(A.voices[0]!==void 0){for(var N=!1,D=0;D<A.voices[0].length;D++)A.voices[0].el_type==="stem"&&(N=!0);if(!N){var _={el_type:"stem",direction:"up"};A.voices[0].splice(0,0,_)}}m.appendElement("stem",null,null,{direction:"down"})}P.scale&&m.appendElement("scale",null,null,{size:P.scale}),P.color&&m.appendElement("color",null,null,{color:P.color})}function j(m,E,P){P.key&&P.key.impliedNaturals&&(P.key.accidentals=P.key.accidentals.concat(P.key.impliedNaturals),delete P.key.impliedNaturals),E.lines[E.lineNum].staff[E.staffNum]={voices:[],clef:P.clef,key:P.key,workingClef:P.clef};var A=E.lines[E.lineNum].staff[E.staffNum];P.stafflines!==void 0&&(A.clef.stafflines=P.stafflines,A.workingClef.stafflines=P.stafflines),P.staffscale&&(A.staffscale=P.staffscale),P.annotationfont&&x(E,"annotationfont",P.annotationfont),P.gchordfont&&x(E,"gchordfont",P.gchordfont),P.tripletfont&&x(E,"tripletfont",P.tripletfont),P.vocalfont&&x(E,"vocalfont",P.vocalfont),P.bracket&&(A.bracket=P.bracket),P.brace&&(A.brace=P.brace),P.connectBarLines&&(A.connectBarLines=P.connectBarLines),P.barNumber&&(A.barNumber=P.barNumber),T(m,E,P),P.part&&m.appendElement("part",P.part.startChar,P.part.endChar,{title:P.part.title}),P.meter!==void 0&&(A.meter=P.meter),E.vskipPending&&(E.lines[E.lineNum].vskip=E.vskipPending,delete E.vskipPending)}function O(m,E,P){E.lines[E.lineNum]={staff:[]},j(m,E,P)}return ft=b,ft}var pt,bn;function Vi(){if(bn)return pt;bn=1;var M=Ce(),b=Br(),v=bs(),l=ks(),r=xs(),i=zi(),o=ws(),s=Gi(),c=_s(),f=function(){var h=new s,d=new c(h),n,t="",a="";this.getTune=function(){var _={formatting:h.formatting,lines:h.lines,media:h.media,metaText:h.metaText,metaTextInfo:h.metaTextInfo,version:h.version,addElementToEvents:h.addElementToEvents,addUsefulCallbackInfo:h.addUsefulCallbackInfo,getTotalTime:h.getTotalTime,getTotalBeats:h.getTotalBeats,getBarLength:h.getBarLength,getBeatLength:h.getBeatLength,getBeatsPerMeasure:h.getBeatsPerMeasure,getBpm:h.getBpm,getMeter:h.getMeter,getMeterFraction:h.getMeterFraction,getPickupLength:h.getPickupLength,getKeySignature:h.getKeySignature,getElementFromChar:h.getElementFromChar,makeVoicesArray:h.makeVoicesArray,millisecondsPerMeasure:h.millisecondsPerMeasure,setupEvents:h.setupEvents,setTiming:h.setTiming,setUpAudio:h.setUpAudio,deline:h.deline,findSelectableElement:h.findSelectableElement,getSelectableArray:h.getSelectableArray};return h.lineBreaks&&(_.lineBreaks=h.lineBreaks),h.visualTranspose&&(_.visualTranspose=h.visualTranspose),h.chordGrid&&(_.chordGrid=h.chordGrid),_};function e(_,S,B){_.positioning||(_.positioning={}),_.positioning[S]=B}function u(_,S,B){_.fonts||(_.fonts={}),_.fonts[S]=B}var g={reset:function(){for(var _ in this)this.hasOwnProperty(_)&&typeof this[_]!="function"&&delete this[_];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(_,S){return this[_].decoration!==S[_].decoration||this[_].face!==S[_].face||this[_].size!==S[_].size||this[_].style!==S[_].style||this[_].weight!==S[_].weight},addFormattingOptions:function(_,S,B){B==="note"?(this.vocalPosition!=="auto"&&e(_,"vocalPosition",this.vocalPosition),this.dynamicPosition!=="auto"&&e(_,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&e(_,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&e(_,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&e(_,"volumePosition",this.volumePosition),this.differentFont("annotationfont",S)&&u(_,"annotationfont",this.annotationfont),this.differentFont("gchordfont",S)&&u(_,"gchordfont",this.gchordfont),this.differentFont("vocalfont",S)&&u(_,"vocalfont",this.vocalfont),this.differentFont("tripletfont",S)&&u(_,"tripletfont",this.tripletfont)):B==="bar"&&(this.dynamicPosition!=="auto"&&e(_,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&e(_,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&e(_,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&e(_,"volumePosition",this.volumePosition),this.differentFont("measurefont",S)&&u(_,"measurefont",this.measurefont),this.differentFont("repeatfont",S)&&u(_,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var _=0;_<this.inTie.length;_++)if(this.endingHoldOver.inTie.push([]),this.inTie[_])for(var S=0;S<this.inTie[_].length;S++)this.endingHoldOver.inTie[_].push(this.inTie[_][S]);for(var B in this.inTieChord)this.inTieChord.hasOwnProperty(B)&&(this.endingHoldOver.inTieChord[B]=this.inTieChord[B])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var _=0;_<this.endingHoldOver.inTie.length;_++){this.inTie.push([]);for(var S=0;S<this.endingHoldOver.inTie[_].length;S++)this.inTie[_].push(this.endingHoldOver.inTie[_][S])}for(var B in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(B)&&(this.inTieChord[B]=this.endingHoldOver.inTieChord[B])}}},p=function(_){g.warnings||(g.warnings=[]),g.warnings.push(_)},k=function(_){g.warningObjects||(g.warningObjects=[]),g.warningObjects.push(_)},x=function(_){var S=_.replace(/\x12/g," ");return S=S.replace(/&/g,"&"),S=S.replace(/</g,"<"),S.replace(/>/g,">")},T=function(_,S,B){S||(S=" ");var I=S[B];(I===" "||!I)&&(I="SPACE");var z=x(S.substring(B-64,B))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+I+"</span>"+x(S.substring(B+1).substring(0,64));p("Music Line:"+n.lineIndex+":"+(B+1)+": "+_+": "+z),k({message:_,line:S,startChar:g.iChar+B,column:B})},j,O;this.getWarnings=function(){return g.warnings},this.getWarningObjects=function(){return g.warningObjects};var m=function(_,S){if(S.indexOf("")>=0){t+=S;return}if(S=t+S,t="",!_){T("Can't add words before the first line of music",_,0);return}S=M.strip(S),S[S.length-1]!=="-"&&(S=S+" ");for(var B=[],I=0,z=!1,y=function(L){var F=M.strip(S.substring(I,L));if(F=F.replace(/\\([-_*|~])/g,"$1"),I=L+1,F.length>0){z&&(F=F.replace(/~/g," "));var V=S[L];return V!=="_"&&V!=="-"&&(V=" "),B.push({syllable:n.translateString(F),divider:V}),z=!1,!0}return!1},w=!1,C=0;C<S.length;C++){switch(S[C]){case" ":case"":y(C);break;case"-":!w&&!y(C)&&B.length>0&&(M.last(B).divider="-",B.push({skip:!0,to:"next"}));break;case"_":w||(y(C),B.push({skip:!0,to:"slur"}));break;case"*":w||(y(C),B.push({skip:!0,to:"next"}));break;case"|":w||(y(C),B.push({skip:!0,to:"bar"}));break;case"~":w||(z=!0);break}w=S[C]==="\\"}_.forEach(function(L){if(B.length!==0){if(B[0].skip){switch(B[0].to){case"next":L.el_type==="note"&&L.pitches!==null&&B.shift();break;case"slur":L.el_type==="note"&&L.pitches!==null&&B.shift();break;case"bar":L.el_type==="bar"&&B.shift();break}L.el_type!=="bar"&&(L.lyric===void 0?L.lyric=[{syllable:"",divider:" "}]:L.lyric.push({syllable:"",divider:" "}))}else if(L.el_type==="note"&&L.rest===void 0){var F=B.shift();F.syllable&&(F.syllable=F.syllable.replace(/ +/g," ")),L.lyric===void 0?L.lyric=[F]:L.lyric.push(F)}}})},E=function(_,S){if(S.indexOf("")>=0){a+=S;return}if(S=a+S,a="",!_){T("Can't add symbols before the first line of music",_,0);return}S=M.strip(S),S[S.length-1]!=="-"&&(S=S+" ");for(var B=[],I=0,z=!1,y=function(C){var L=M.strip(S.substring(I,C));if(I=C+1,L.length>0){z&&(L=L.replace(/~/g," "));var F=S[C];return F!=="_"&&F!=="-"&&(F=" "),B.push({syllable:n.translateString(L),divider:F}),z=!1,!0}return!1},w=0;w<S.length;w++)switch(S[w]){case" ":case"":y(w);break;case"-":!y(w)&&B.length>0&&(M.last(B).divider="-",B.push({skip:!0,to:"next"}));break;case"_":y(w),B.push({skip:!0,to:"slur"});break;case"*":y(w),B.push({skip:!0,to:"next"});break;case"|":y(w),B.push({skip:!0,to:"bar"});break;case"~":z=!0;break}_.forEach(function(C){if(B.length!==0){if(B[0].skip)switch(B[0].to){case"next":C.el_type==="note"&&C.pitches!==null&&B.shift();break;case"slur":C.el_type==="note"&&C.pitches!==null&&B.shift();break;case"bar":C.el_type==="bar"&&B.shift();break}else if(C.el_type==="note"&&C.rest===void 0){var L=B.shift();C.lyric===void 0?C.lyric=[L]:C.lyric.push(L)}}})},P=function(_){if(M.startsWith(_,"%%")){var S=b.addDirective(_.substring(2));S&&T(S,_,2);return}var B=_.indexOf("%");if(B>=0&&(_=_.substring(0,B)),_=_.replace(/\s+$/,""),_.length!==0){if(t){m(d.getCurrentVoice(),_.substring(2));return}if(a){E(d.getCurrentVoice(),_.substring(2));return}if(_.length<2||_[1]!==":"||O.lineContinuation){O.parseMusic(_);return}var I=j.parseHeader(_);I.regular&&O.parseMusic(_),I.newline&&O.startNewLine(),I.words&&m(d.getCurrentVoice(),_.substring(2)),I.symbols&&E(d.getCurrentVoice(),_.substring(2))}};function A(_,S){_.push({el_type:"hint"});for(var B=0;B<S.length;B++){var I=S[B],z=Object.assign({},I);if(_.push(z),I.el_type==="bar")return}}function N(_,S){for(var B=0;B<_.length;B++){var I=_[B],z=S[B];if(z)for(var y=0;y<z.voices.length;y++){var w=z.voices[y],C=I.voices[y];C&&A(C,w)}}}function D(){for(var _=0;_<h.lines.length;_++){var S=h.lines[_].staff;if(S){for(var B=_+1;B<h.lines.length&&h.lines[B].staff===void 0;)B++;if(B<h.lines.length){var I=h.lines[B].staff;N(S,I)}}}}this.parse=function(_,S,B){S||(S={}),B||(B=0),h.reset(),_=_.replace(/\r\n?/g,`
|
|
11
|
-
`)+`
|
|
12
|
-
`;var I=_.split(`
|
|
13
|
-
\\`);if(I.length>1){for(var z=1;z<I.length;z++)for(;I[z].length>0&&I[z][0]!==`
|
|
14
|
-
`;)I[z]=I[z].substr(1),I[z-1]+=" ";_=I.join(" ")}_=_.replace(/\\([ \t]*)(%.*)*\n/g,function(H,U,Q){var R=Q?Array(Q.length+1).join(" "):"";return U+""+R+`
|
|
15
|
-
`});var y=_.split(`
|
|
16
|
-
`);M.last(y).length===0&&y.pop(),n=new r(y,g),j=new v(n,T,g,h,d),O=new l(n,T,g,h,d,j),S.print&&(h.media="print"),g.reset(),g.iChar=B,S.visualTranspose?(g.globalTranspose=parseInt(S.visualTranspose),g.globalTranspose===0?g.globalTranspose=void 0:d.setVisualTranspose(S.visualTranspose)):g.globalTranspose=void 0,S.lineBreaks&&(g.lineBreaks=S.lineBreaks),j.reset(n,T,g,h);try{S.format&&b.globalFormatting(S.format);for(var w=n.nextLine();w;){if(S.header_only&&g.is_in_header===!1||S.stop_on_warning&&g.warnings)throw"normal_abort";var C=g.is_in_header;P(w),C&&!g.is_in_header&&(d.setRunningFont("annotationfont",g.annotationfont),d.setRunningFont("gchordfont",g.gchordfont),d.setRunningFont("tripletfont",g.tripletfont),d.setRunningFont("vocalfont",g.vocalfont)),w=n.nextLine()}t&&m(d.getCurrentVoice(),""),a&&E(d.getCurrentVoice(),""),g.openSlurs=d.cleanUp(g.barsperstaff,g.staffnonote,g.openSlurs)}catch(H){if(H!=="normal_abort")throw H}var L=792,F=8.5*72;switch(g.papersize){case"legal":L=1008,F=8.5*72;break;case"A4":L=11.7*72,F=8.3*72;break}if(g.landscape){var V=L;L=F,F=V}if(h.formatting.pagewidth||(h.formatting.pagewidth=F),h.formatting.pageheight||(h.formatting.pageheight=L),S.hint_measures&&D(),i.wrapLines(h,g.lineBreaks,g.barNumbers),S.chordGrid)try{h.chordGrid=o(h)}catch(H){switch(H.message){case"notCommonTime":T("Chord grid only works for 2/2 and 4/4 time.",0,0);break;case"noChords":T("No chords are found in the tune.",0,0);break;default:T(H.message,0,0)}}}};return pt=f,pt}var mt,yn;function Es(){if(yn)return mt;yn=1;var M=Ce(),b=function(v){var l="",r=v.match(/(\s*)/);v=M.strip(v);for(var i=v.split(`
|
|
17
|
-
X:`),o=1;o<i.length;o++)i[o]="X:"+i[o];var s=r?r[0].length:0,c=[];if(i.forEach(function(n){c.push({abc:n,startPos:s}),s+=n.length+1}),c.length>1&&!M.startsWith(c[0].abc,"X:")){var f=c.shift(),h=f.abc.split(`
|
|
18
|
-
`);h.forEach(function(n){M.startsWith(n,"%%")&&(l+=n+`
|
|
19
|
-
`)})}var d=l;return c.forEach(function(n){var t=n.abc.indexOf(`
|
|
20
|
-
|
|
21
|
-
`);t>0&&(n.abc=n.abc.substring(0,t)),n.pure=n.abc,n.abc=l+n.abc,n.title="";var a=n.pure.split("T:");a.length>1&&(a=a[1].split(`
|
|
22
|
-
`),n.title=M.strip(a[0]));var e=n.pure.substring(2,n.pure.indexOf(`
|
|
23
|
-
`));n.id=M.strip(e)}),{header:d,tunes:c}};return mt=b,mt}var gt,kn;function As(){if(kn)return gt;kn=1;function M(b,v){this.numLines=b,this.lineSpace=v,this.verticalSize=this.numLines*this.lineSpace;var l=3;this.bar={pitch:l,pitch2:v*b,height:5}}return M.prototype.bypass=function(b){var v=b.staffGroup.voices;return!!(v.length>0&&v[0].isPercussion)},M.prototype.setRelative=function(b,v,l){switch(b.type){case"bar":v.pitch=this.bar.pitch,v.pitch2=this.bar.pitch2,v.height=this.height;break;case"symbol":var r=this.bar.pitch2/2;if(b.name=="dots.dot")return l?(v.pitch=r,!1):(v.pitch=r+this.lineSpace,!0);break}return l},gt=M,gt}var vt,xn;function Yi(){if(xn)return vt;xn=1;var M=function(b,v){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=b,this.voicetotal=v,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return M.prototype.addChild=function(b){if(b.type==="bar"){for(var v=!0,l=0;v&&l<this.children.length;l++)this.children[l].type.indexOf("staff-extra")<0&&this.children[l].type!=="tempo"&&(v=!1);v||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=b,this.setRange(b)},M.prototype.setLimit=function(b,v){var l=v.specialY;l||(l=v),l[b]&&(this.specialY[b]?this.specialY[b]=Math.max(this.specialY[b],l[b]):this.specialY[b]=l[b])},M.prototype.adjustRange=function(b){b.bottom!==void 0&&(this.bottom=Math.min(this.bottom,b.bottom)),b.top!==void 0&&(this.top=Math.max(this.top,b.top))},M.prototype.setRange=function(b){this.adjustRange(b),this.setLimit("tempoHeightAbove",b),this.setLimit("partHeightAbove",b),this.setLimit("volumeHeightAbove",b),this.setLimit("dynamicHeightAbove",b),this.setLimit("endingHeightAbove",b),this.setLimit("chordHeightAbove",b),this.setLimit("lyricHeightAbove",b),this.setLimit("lyricHeightBelow",b),this.setLimit("chordHeightBelow",b),this.setLimit("volumeHeightBelow",b),this.setLimit("dynamicHeightBelow",b)},M.prototype.addOther=function(b){this.otherchildren.push(b),this.setRange(b)},M.prototype.addBeam=function(b){this.beams.push(b)},M.prototype.setWidth=function(b){this.w=b},vt=M,vt}var bt,wn;function Or(){if(wn)return bt;wn=1;var M=function(b,v,l,r){if(b)for(var i=0;i<b.length;i++){var o=b[i],s=o.getAttribute("highlight");s||(s="fill"),o.setAttribute(s,r);var c=o.getAttribute("class");c||(c=""),c=c.replace(l,""),c=c.replace(v,""),v.length>0&&(c.length>0&&c[c.length-1]!==" "&&(c+=" "),c+=v),o.setAttribute("class",c)}};return bt=M,bt}var yt,Tn;function Wi(){if(Tn)return yt;Tn=1;var M=Or(),b=function(v,l){v===void 0&&(v="abcjs-note_selected"),l===void 0&&(l="#ff0000"),M(this.elemset,v,"",l)};return yt=b,yt}var kt,Cn;function Ri(){if(Cn)return kt;Cn=1;var M=Or(),b=function(v,l){v===void 0&&(v="abcjs-note_selected"),l===void 0&&(l="#000000"),M(this.elemset,"",v,l)};return kt=b,kt}var xt,Mn;function je(){if(Mn)return xt;Mn=1;var M=Wi(),b=Ri(),v=function(l,r,i,o,s,c){c||(c={}),this.tuneNumber=s,this.abcelem=l,this.duration=r,this.durationClass=c.durationClassOveride?c.durationClassOveride:this.duration,this.minspacing=i||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=o,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return v.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},v.prototype.addExtra=function(l){this.fixed.w=Math.max(this.fixed.w,l.dx+l.w),this.fixed.t===void 0?this.fixed.t=l.top:this.fixed.t=Math.max(this.fixed.t,l.top),this.fixed.b===void 0?this.fixed.b=l.bottom:this.fixed.b=Math.min(this.fixed.b,l.bottom),l.dx<this.extraw&&(this.extraw=l.dx),this.extra[this.extra.length]=l,this._addChild(l)},v.prototype.addHead=function(l){l.dx<this.extraw&&(this.extraw=l.dx),this.heads[this.heads.length]=l,this.addRight(l)},v.prototype.addRight=function(l){this.fixed.w=Math.max(this.fixed.w,l.dx+l.w),l.top!==void 0&&(this.fixed.t===void 0?this.fixed.t=l.top:this.fixed.t=Math.max(this.fixed.t,l.top)),l.bottom!==void 0&&(this.fixed.b===void 0?this.fixed.b=l.bottom:this.fixed.b=Math.min(this.fixed.b,l.bottom)),l.dx+l.w>this.w&&(this.w=l.dx+l.w),this.right[this.right.length]=l,this._addChild(l)},v.prototype.addFixed=function(l){this._addChild(l)},v.prototype.addFixedX=function(l){this._addChild(l)},v.prototype.addCentered=function(l){var r=l.w/2;-r<this.extraw&&(this.extraw=-r),this.extra[this.extra.length]=l,l.dx+r>this.w&&(this.w=l.dx+r),this.right[this.right.length]=l,this._addChild(l)},v.prototype.setLimit=function(l,r){r[l]&&(this.specialY[l]?this.specialY[l]=Math.max(this.specialY[l],r[l]):this.specialY[l]=r[l])},v.prototype._addChild=function(l){var r=!0;this.abcelem.el_type=="clef"&&l.type=="barNumber"&&(r=!1),l.parent=this,this.children[this.children.length]=l,r&&this.pushTop(l.top),this.pushBottom(l.bottom),this.setLimit("tempoHeightAbove",l),this.setLimit("partHeightAbove",l),this.setLimit("volumeHeightAbove",l),this.setLimit("dynamicHeightAbove",l),this.setLimit("endingHeightAbove",l),this.setLimit("chordHeightAbove",l),this.setLimit("lyricHeightAbove",l),this.setLimit("lyricHeightBelow",l),this.setLimit("chordHeightBelow",l),this.setLimit("volumeHeightBelow",l),this.setLimit("dynamicHeightBelow",l)},v.prototype.pushTop=function(l){l!==void 0&&(this.top===void 0?this.top=l:this.top=Math.max(l,this.top))},v.prototype.pushBottom=function(l){l!==void 0&&(this.bottom===void 0?this.bottom=l:this.bottom=Math.min(l,this.bottom))},v.prototype.setX=function(l){this.x=l;for(var r=0;r<this.children.length;r++)this.children[r].setX(l)},v.prototype.center=function(l,r){var i=(r.x-l.x)/2+l.x;this.x=i-this.w/2;for(var o=0;o<this.children.length;o++)this.children[o].setX(this.x)},v.prototype.setHint=function(){this.hint=!0},v.prototype.highlight=function(l,r){M.bind(this)(l,r)},v.prototype.unhighlight=function(l,r){b.bind(this)(l,r)},xt=v,xt}var wt,Sn;function Me(){if(Sn)return wt;Sn=1;var M=function(b,v,l,r,i){switch(i=i||{},this.x=0,this.c=b,this.dx=v,this.w=l,this.pitch=r,this.scalex=i.scalex||1,this.scaley=i.scaley||1,this.type=i.type||"symbol",this.pitch2=i.pitch2,this.linewidth=i.linewidth,this.klass=i.klass,this.anchor=i.anchor?i.anchor:"middle",this.top=r,this.pitch2!==void 0&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=r,this.pitch2!==void 0&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),i.thickness&&(this.top+=i.thickness/2,this.bottom-=i.thickness/2),i.stemHeight&&(i.stemHeight>0?this.top+=i.stemHeight:this.bottom+=i.stemHeight),i.dim&&(this.dim=i.dim),i.position&&(this.position=i.position),this.height=i.height?i.height:4,i.top&&(this.top=i.top),i.bottom&&(this.bottom=i.bottom),i.name?this.name=i.name:this.c?this.name=this.c:this.name=this.type,i.realWidth?this.realWidth=i.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":i.position&&i.position==="below"?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":i.position&&i.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":this.pitch===void 0?i.position&&i.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height;break}};return M.prototype.getChordDim=function(){if(this.type==="debug"||!this.chordHeightAbove&&!this.chordHeightBelow)return null;var b=0,v=this.type==="chord"?this.realWidth/2:0,l=this.x-v-b,r=l+this.realWidth+b;return{left:l,right:r}},M.prototype.invertLane=function(b){this.lane===void 0&&(this.lane=0),this.lane=b-this.lane-1},M.prototype.putChordInLane=function(b){this.lane=b,this.chordHeightAbove?this.chordHeightAbove=this.height*1.25*this.lane:this.chordHeightBelow=this.height*1.25*this.lane},M.prototype.getLane=function(){return this.lane===void 0?0:this.lane},M.prototype.setX=function(b){this.x=b+this.dx},wt=M,wt}var Tt,_n;function Ps(){if(_n)return Tt;_n=1;var M=je(),b=Me();function v(e){return e!=null&&e.constructor===Object}function l(e,u){for(var g in u)u.hasOwnProperty(g)&&(Array.isArray(u[g])||v(u[g])||(e[g]=u[g]))}function r(e){var u=new M("",0,0,"",0);return l(u,e),u.top=0,u.bottom=-1,e.abcelem&&(u.abcelem={},l(u.abcelem,e.abcelem),u.abcelem.el_type==="note"&&(u.abcelem.el_type="tabNumber")),e.cloned=u,u}function i(e,u){var g=r(e);if(u)for(var p=e.children,k=!0,x=0;x<p.length;x++){var T=p[x],j=new b("",0,0,0,"");l(j,T),k=u.tablature.setRelative(T,j,k),g.children.push(j)}return g}function o(e,u,g){var p="tab.tiny",k=7.5;e.isTabBig&&(p="tab.big",k=10);var x={el_type:"tab",icon:p,Ypos:k};if(k+=e.tabSymbolOffset,!e.hideTabSymbol){var T=new M(x,0,0,"symbol",0);T.x=u;var j=new b(p,0,0,7.5,"tab");j.x=g,T.children.push(j),T.abcelem.el_type=="tab"&&(j.pitch=k)}return T}function s(e){if(e.extra)for(var u=0;u<e.extra.length;u++){var g=e.extra[u];if(g.type=="lyric")return{bottom:g.bottom,height:g.height}}return null}function c(){this.accidentals=null}function f(e){for(var u=0,g=0;g<e.length;g++)e[g].tabNameInfos||u++;return u}function h(e,u,g,p,k){var x=p.num;p.note.quarter!=null&&(x=x.toString(),x+=p.note.quarter);var T=e.semantics.stringToPitch(p.str);g.notes.push({num:x,str:p.str,pitch:p.note.emit()});var j={type:"tabNumber"},O=new b(x,0,0,T+.3,j);return O.x=u,O.isGrace=k,O.isAltered=p.note.isAltered,O}function d(e,u){var g=0;if(e.extra){for(var p=0;p<e.extra.length;p++)if(e.extra[p].c.indexOf("noteheads")>=0){if(g===u)return e.extra[p].x+e.extra[p].w/2;g++}}return-1}function n(e){if(e.abcelem){var u=e.abcelem;if(u.rest)return u.gracenotes}return null}function t(e,u,g){var p=e.semantics.notesToNumber(u,g);if(p.error)return e.setError(p.error),p;if(p.graces&&p.notes){var k=p.notes.length-1;p.notes[k].graces=p.graces}return p}function a(e,u,g,p,k){for(var x=0;x<p.length;x++){var T={el_type:"note",startChar:g.abcelem.startChar,endChar:g.abcelem.endChar,notes:[],grace:!0},j=d(g,x),O=p[x],m=h(e,j,T,O,!0);u.children.push(m),k.push(T)}}return c.prototype.build=function(e,u,g,p,k,x,T){f(u);var j=u[k+p],O=u[T],m=null,E=null;j.children[0].abcelem.el_type!="clef"&&x!="none"&&j.children.splice(0,0,x);for(var P=0;P<j.children.length;P++){var A=j.children[P],N=A.x,D=N;switch(A.isClef&&(O.children.push(o(e,N,D)),A.abcelem.type.indexOf("-8")>=0&&(e.semantics.clefTranspose=-12),A.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),A.type){case"staff-extra key-signature":this.accidentals=A.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var _=!1;P===j.children.length-1&&(_=!0);var S=i(A,e);if(S.abcelem.barNumber){delete S.abcelem.barNumber;for(var B=0;B<S.children.length;B++)if(S.children[B].type==="barNumber"){S.children.splice(B,1);break}}S.abcelem.lastBar=_,O.children.push(S),g.push({el_type:A.abcelem.el_type,type:A.abcelem.type,endChar:A.abcelem.endChar,startChar:A.abcelem.startChar,abselem:S});break;case"rest":var I=n(A);if(I){if(m=t(e,null,I),m.error)return;H={el_type:"note",startChar:A.abcelem.startChar,endChar:A.abcelem.endChar,notes:[],grace:!0},a(e,z,A,m.graces,g)}break;case"note":var z=r(A);z.x=A.heads[0].x+A.heads[0].w/2,z.lyricDim=s(A);var y=A.abcelem.pitches,w=A.abcelem.gracenotes;if(z.type="tabNumber",m=t(e,y,w),m.error)return;if(m.graces){var C=m.notes.length-1;m.notes[C].graces=m.graces}E={el_type:"note",startChar:A.abcelem.startChar,endChar:A.abcelem.endChar,notes:[]};for(var L=0;L<m.notes.length;L++){var F=m.notes[L];if(F.graces)for(var V=0;V<F.graces.length;V++){var H={el_type:"note",startChar:A.abcelem.startChar,endChar:A.abcelem.endChar,notes:[],grace:!0},U=d(A,V),Q=F.graces[V],R=h(e,U,H,Q,!0);z.children.push(R),g.push(H)}var te=h(e,z.x+A.heads[L].dx,E,F,!1);z.children.push(te)}E.notes.length>0&&(E.abselem=z,g.push(E),O.children.push(z));break}}},Tt=c,Tt}var Ct,En;function Bs(){if(En)return Ct;En=1;var M=Yi(),b=Ps(),v=we();function l(){return{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}}function r(e){for(var u=0,g=0;g<e.children.length;g++){var p=e.children[g];p.specialY&&p.specialY.lyricHeightBelow>u&&(u=p.specialY.lyricHeightBelow)}return u}function i(e,u,g){var p=e.semantics,k=u.controller.getTextSize,x=p.tabInfos(e),T=p.suppress(e),j=!0;if(T&&(j=!1),j){var O=k.calc(x,"tablabelfont","text instrumentname");return g.tabNameInfos={textSize:{height:O.height,width:O.width},name:x},O.height}return 0}function o(e,u){return u[e].isTabStaff?e===u.length-1?!0:!u[e+1].isTabStaff:!1}function s(e){for(var u=0,g=0;g<e.length;g++)e[g].isTabStaff||u++;return u}function c(e,u){for(var g=u;g>=0;g--)if(!e[g].isTabStaff)return g;return-1}function f(e){for(var u=0;u<e.length;u++)if(e[u].isTabStaff){var g=c(e,u);e[u].hasStaff=e[g],e[g].hasTab||(e[g].hasTab=[]),e[g].hasTab.push(e[u])}}function h(e,u){return s(e)===1&&u.voices.length>1}function d(e,u){for(var g=0,p=0,k=!0,x=0;k;){if(!u[g])return-1;if(u[g].isTabStaff||(x=u[g].voices.length),u[g].isTabStaff){if(p++,o(g,u)&&p<x)return g+1}else if(p=0,g>=e&&(g+1==u.length||!u[g+1].isTabStaff))return g+1;if(g++,g>u.length)return-1}}function n(e,u){for(var g=u;g>=0;g--)if(!e[g].isTabStaff)return e[g];return null}function t(e,u){var g=e[u],p=g.children[0].abcelem;return p.el_type==="clef"?null:u==0?"none":e[u-1].children[0]}function a(e,u,g,p){var k=new b,x={clef:{type:"TAB"}},T=e.linePitch*e.nbLines,j=g.staff;if(j){var O=j[0];if(O&&O.clef&&O.clef.stafflines==0){e.setError("No tablatures when stafflines=0");return}j.splice(j.length,0,x)}var m=g.staffGroup,E=m.voices,P=E[0],A=r(P),N=3,D=p,_=m.staffs[D],S=T+N-_.bottom-A;_.isTabStaff&&(S=_.top);var B={bottom:-1,isTabStaff:!0,specialY:l(),lines:e.nbLines,linePitch:e.linePitch,dy:.15,top:S},I=d(p,m.staffs);if(I!==-1){B.parentIndex=I-1,m.staffs.splice(I,0,B),m.height+=T+N;var z=n(m.staffs,I),y=1;h(m.staffs,z)&&(y=z.voices.length),x.voices=[];for(var w=0;w<y;w++){var C=new M(0,0);w>0&&(C.duplicate=!0);var L=i(e,u,C)/v.STEP;L=Math.max(L,1),m.staffs[p].top+=1,m.height+=L,C.staff=B;var F=E.length;E.splice(E.length,0,C);var V=t(E,w+p);x.voices[w]=[],k.build(e,E,x.voices[w],w,p,V,F)}f(m.staffs)}}return Ct=a,Ct}var Mt,An;function qi(){if(An)return Mt;An=1;var M={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},b=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];function v(r){var i=r.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(i&&i.length===5){var o=M[i[1]],s=b.indexOf(i[2]),c=i[4].length-i[3].length;return 48+s+o+c*12}return 0}function l(r){r=parseInt(r,10);var i=Math.floor(r/12),o=r%12,s=b[o];if(s==="-"&&(s="^"+b[o-1]),i>4)for(s=s.toLowerCase(),i-=5;i>0;)s+="'",i--;else for(;i<4;)s+=",",i++;return s}return Mt={noteToMidi:v,midiToNote:l},Mt}var St,Pn;function Ui(){if(Pn)return St;Pn=1;var{noteToMidi:M,midiToNote:b}=qi();function v(r,i){var o=M(r);i&&(o+=i);var s=b(o),c=!1,f=!1,h=!1,d=null,n=null,t=!1,a=0;r.startsWith("_")?(c=!0,a=-1,r[1]=="/"?(c=!1,n="v",a=0):r[1]=="_"&&(t=!0,a-=1)):r.startsWith("^")?(f=!0,a=1,r[1]=="/"?(f=!1,n="^",a=0):r[1]=="^"&&(t=!0,a+=1)):r.startsWith("=")&&(d=!0,a=0),h=c||f||n!=null,(h||d)&&(n!=null||t?s=r.slice(2):s=r.slice(1));var e=(s.match(/,/g)||[]).length,u=(s.match(/'/g)||[]).length;this.pitch=o,this.pitchAltered=0,this.name=s,this.acc=a,this.isSharp=f,this.isKeySharp=!1,this.isDouble=t,this.isAltered=h,this.isFlat=c,this.isKeyFlat=!1,this.natural=d,this.quarter=n,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=e,this.isQuoted=u}function l(r){var i=r.name,o=new v(i);return o.pitch=r.pitch,o.hasComma=r.hasComma,o.isLower=r.isLower,o.isQuoted=r.isQuoted,o.isSharp=r.isSharp,o.isKeySharp=r.isKeySharp,o.isFlat=r.isFlat,o.isKeyFlat=r.isKeyFlat,o}return v.prototype.sameNoteAs=function(r){return r.pitch===this.pitch},v.prototype.isLowerThan=function(r){return r.pitch>this.pitch},v.prototype.checkKeyAccidentals=function(r,i){if(!(this.isAltered||this.natural)){if(i[this.name.toUpperCase()])switch(i[this.name.toUpperCase()]){case"__":this.acc=-2,this.pitchAltered=-2;return;case"_":this.acc=-1,this.pitchAltered=-1;return;case"=":this.acc=0,this.pitchAltered=0;return;case"^":this.acc=1,this.pitchAltered=1;return;case"^^":this.acc=2,this.pitchAltered=2;return}else if(r)for(var o=this.name,s=0;s<r.length;s++){var c=r[s];o==c.note.toUpperCase()&&(c.acc=="flat"&&(this.acc=-1,this.isKeyFlat=!0,this.pitchAltered=-1),c.acc=="sharp"&&(this.acc=1,this.isKeySharp=!0,this.pitchAltered=1))}}},v.prototype.getAccidentalEquiv=function(){var r=l(this);return r.isSharp||r.isKeySharp?(r=r.nextNote(),r.isFlat=!0,r.isSharp=!1,r.isKeySharp=!1):(r.isFlat||r.isKeyFlat)&&(r=r.prevNote(),r.isSharp=!0,r.isFlat=!1,r.isKeyFlat=!1),r},v.prototype.nextNote=function(){var r=b(this.pitch+1+this.pitchAltered);return new v(r)},v.prototype.prevNote=function(){var r=b(this.pitch-1+this.pitchAltered);return new v(r)},v.prototype.emitNoAccidentals=function(){var r=this.name;this.isLower&&(r=r.toLowerCase());for(var i=0;i<this.isQuoted;i++)r+="'";for(var o=0;o<this.hasComma;o++)r+=",";return r},v.prototype.emit=function(){var r=this.name;(this.isSharp||this.isKeySharp)&&(r="^"+r,this.isDouble&&(r="^"+r)),(this.isFlat||this.isKeyFlat)&&(r="_"+r,this.isDouble&&(r="_"+r)),this.quarter&&(this.quarter=="^"?r="^/"+r:r="_/"+r),this.natural&&(r="="+r);for(var i=1;i<=this.hasComma;i++)r+=",";if(this.isLower){r=r.toLowerCase();for(var o=1;o<=this.isQuoted;o++)r+="'"}return r},St=v,St}var _t,Bn;function Ns(){if(Bn)return _t;Bn=1;var M=Ui(),b=["A","B","C","D","E","F","G"];function v(l,r){var i=new M(l),o=new M(r);if(o.isLowerThan(i)){var s=i.emit(),c=o.emit();return{error:"Invalid string Instrument tuning : "+c+" string lower than "+s+" string"}}var f=[],h=b.indexOf(i.name),d=b.indexOf(o.name);if(h==-1||d==-1)return f;for(var n=!1;!n;)f.push(i.emit()),i=i.nextNote(),i.sameNoteAs(o)&&(n=!0);return f}return _t=v,_t}var Et,Nn;function Os(){if(Nn)return Et;Nn=1;const{noteToMidi:M}=qi();var b=Ui(),v=Ns();function l(n){var t=null,a=n.tuning;if(n.capo>0){t=[];for(var e=0;e<a.length;e++){for(var u=new b(a[e]),g=0;g<n.capo;g++)u=u.nextNote();t[e]=u.emit()}}return t}function r(n){var t=[],a=n.tuning;n.capo>0&&(a=n.capoTuning);for(var e=a.length-1,u=0;u<a.length;u++){var g=n.highestNote;u!=a.length-1&&(g=a[u+1]);var p=v(a[u],g);if(p.error)return p;t[e--]=p}return t}function i(n){var t=[];t[0]=[];for(var a=n.strings,e=1;e<a.length;e++)t[e]=a[e-1];return t}function o(n,t){for(var a=0;a<t.length-1;a++){var e=t[a],u=t[a+1];if(e.str==u.str){if(e.str==n.strings.length-1){e.num="?",u.num="?";return}u.num<e.num?(u.str++,u=c(n,u.note,u.str,n.secondPos,n.strings[u.str].length)):(e.str++,e=c(n,e.note,e.str,n.secondPos,n.strings[e.str].length)),t[a]=e,t[a+1]=u}}return null}function s(n,t){for(var a=[],e=0;e<t.length;e++)if(!t[e].endTie){var u=new b(t[e].name,n.clefTranspose);u.checkKeyAccidentals(n.accidentals,n.measureAccidentals);var g=f(n,u);a.push(g)}return o(n,a),a}function c(n,t,a,e,u){var g=n.strings;t.checkKeyAccidentals(n.accidentals,n.measureAccidentals),e&&(g=e);var p=t.emitNoAccidentals(),k=g[a].indexOf(p),x=t.acc;if(k!=-1){if(e&&(k+=u),(t.isFlat||t.acc==-1)&&k==0){var T=t.getAccidentalEquiv();a++,k=g[a].indexOf(T.emit()),x=0}return{num:k+x,str:a,note:t}}return null}function f(n,t){if(t.isAltered||t.natural){var a;t.isFlat?t.isDouble?a="__":a="_":t.isSharp?t.isDouble?a="^^":a="^":t.natural&&(a="="),n.measureAccidentals[t.name.toUpperCase()]=a}for(var e=n.stringPitches.length-1;e>=0;e--)if(t.pitch+t.pitchAltered>=n.stringPitches[e]){var u=t.pitch+t.pitchAltered-n.stringPitches[e];return t.quarter==="^"?u-=.5:t.quarter==="v"&&(u+=.5),{num:Math.round(u),str:n.stringPitches.length-1-e,note:t}}return{num:"?",str:n.stringPitches.length-1,note:t}}d.prototype.stringToPitch=function(n){var t=5.3,a=this.strings.length-1;return t+(a-n)*this.linePitch};function h(n,t){var a={num:"?",str:0,note:t};n.push(a),n.error=t.emit()+": unexpected note for instrument"}d.prototype.notesToNumber=function(n,t){var a,e,u=null,g=null;if(n&&(g=[],n.length>1?(g=s(this,n),g.error&&(u=g.error)):n[0].endTie||(a=new b(n[0].name,this.clefTranspose),a.checkKeyAccidentals(this.accidentals,this.measureAccidentals),e=f(this,a),e?g.push(e):(h(g,a),u=g.error))),u)return g;var p=null;if(t){p=[];for(var k=0;k<t.length;k++)a=new b(t[k].name,this.clefTranspose),a.checkKeyAccidentals(this.accidentals,this.measureAccidentals),e=f(this,a),e?p.push(e):(h(p,a),u=g.error)}return{notes:g,graces:p,error:u}},d.prototype.toString=function(){for(var n=[],t=0;t<this.tuning.length;t++){var a=this.tuning[t].replaceAll(",","").replaceAll("'","").toUpperCase();a[0]==="_"?a=a[1]+"b ":a[0]==="^"&&(a=a[1]+"# "),n.push(a)}return n.join("")},d.prototype.tabInfos=function(n){var t=n.params.label;if(t){var a=t.indexOf("%T"),e="";return a!=-1&&(e=this.toString(),n.capo>0&&(e+=" capo:"+n.capo),t=t.replace("%T",e)),t}return""},d.prototype.suppress=function(n){var t=n.params.suppress;return!!t};function d(n){var t=n.tuning,a=n.capo,e=n.params.highestNote;this.linePitch=n.linePitch,this.highestNote="a'",e&&(this.highestNote=e),this.measureAccidentals={},this.capo=0,a&&(this.capo=parseInt(a,10)),this.transpose=n.transpose?n.transpose:0,this.tuning=t,this.stringPitches=[];for(var u=0;u<this.tuning.length;u++){var g=M(this.tuning[u])+this.capo;this.stringPitches.push(g)}if(this.capo>0&&(this.capoTuning=l(this)),this.strings=r(this),this.strings.error){n.setError(this.strings.error),n.inError=!0;return}this.secondPos=i(this)}return Et=d,Et}var At,On;function Ls(){if(On)return At;On=1;var M=As(),b=Bs(),v=Os();l.prototype.init=function(i,o,s,c){this.tune=i,this.params=s,this.tuneNumber=o,this.inError=!1,this.abcTune=i,this.linePitch=3,this.nbLines=c.defaultTuning.length,this.isTabBig=c.isTabBig,this.tabSymbolOffset=c.tabSymbolOffset,this.capo=s.capo,this.transpose=s.visualTranspose,this.hideTabSymbol=s.hideTabSymbol,this.tablature=new M(this.nbLines,this.linePitch);var f=s.tuning;f||(f=c.defaultTuning),this.tuning=f,this.semantics=new v(this)},l.prototype.setError=function(i){i&&(this.error=i,this.inError=!0,this.tune.warnings?this.tune.warnings.push(i):this.tune.warnings=[i])},l.prototype.render=function(i,o,s){this.inError||this.tablature.bypass(o)||b(this,i,o,s)};function l(){}var r=function(){return{name:"StringTab",tablature:l}};return At=r,At}var Pt,Ln;function Xi(){if(Ln)return Pt;Ln=1;var M=Ls(),b={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},v={inited:!1,plugins:{},register:function(l){var r=l.name,i=l.tablature;this.plugins[r]=i},setError:function(l,r){l.warnings?l.warning.push(r):l.warnings=[r]},preparePlugins:function(l,r,i){this.inited||(this.register(new M),this.inited=!0);var o=null;if(i.tablature){var s=i.tablature;o=[];for(var c=0;c<s.length;c++){var f=s[c],h=f.instrument;if(h==null)return this.setError(l,"tablature 'instrument' is missing"),o;var d=b[h],n=null;if(d&&(n=this.plugins[d.name]),n){i.visualTranspose!=0&&(f.visualTranspose=i.visualTranspose),f.abcSrc=i.tablature.abcSrc;var t={classz:n,tuneNumber:r,params:f,instance:null,tabType:d};o.push(t)}else if(h==="")o.push(null);else return this.setError(l,"Undefined tablature plugin: "+h),o}}return o},layoutTablatures:function(l,r){var i=r.tablatures,o=0;if(i&&i.length>0)for(var s=i.length,c=0;c<s;++c)i[c]&&i[c].params.firstStaffOnly&&(i[c].params.suppress=!1);for(var f=0;f<r.lines.length;f++){var h=r.lines[f];if(h.staff&&o++,o>1&&i&&i.length>0)for(var s=i.length,c=0;c<s;++c)i[c].params.firstStaffOnly&&(i[c].params.suppress=!0);var d=h.staff;if(d){for(var n=d.length,t=0;t<d.length;t++)if(i[t]&&t<n){var a=i[t];a.instance==null&&(a.instance=new a.classz,a.instance.init(r,a.tuneNumber,a.params,a.tabType)),a.instance.render(l,h,t)}}}}};return Pt=v,Pt}var Bt,jn;function He(){if(jn)return Bt;jn=1;var M=Vi(),b=Es(),v=Xi(),l={};return function(){l.numberOfTunes=function(i){var o=i.split(`
|
|
24
|
-
X:`),s=o.length;return s===0&&(s=1),s};var r=l.TuneBook=function(i){var o=b(i);this.header=o.header,this.tunes=o.tunes};r.prototype.getTuneById=function(i){for(var o=0;o<this.tunes.length;o++)if(this.tunes[o].id===""+i)return this.tunes[o];return null},r.prototype.getTuneByTitle=function(i){for(var o=0;o<this.tunes.length;o++)if(this.tunes[o].title===i)return this.tunes[o];return null},l.parseOnly=function(i,o){for(var s=l.numberOfTunes(i),c=[],f=0;f<s;f++)c.push(1);function h(){}return l.renderEngine(h,c,i,o)},l.renderEngine=function(i,o,s,c){var f=[],h=function(k){return k&&!k.propertyIsEnumerable("length")&&typeof k=="object"&&typeof k.length=="number"};if(!(o===void 0||s===void 0)){h(o)||(o=[o]),c===void 0&&(c={});for(var d=c.startingTune?parseInt(c.startingTune,10):0,n=new r(s),t=new M,a=0;a<o.length;a++){var e=o[a];if(e==="*"||typeof e=="string"&&(e=document.getElementById(e)),e)if(d>=0&&d<n.tunes.length){t.parse(n.tunes[d].abc,c,n.tunes[d].startPos-n.header.length);var u=t.getTune();c.tablature&&(u.tablatures=v.preparePlugins(u,d,c));var g=t.getWarnings();g&&(u.warnings=g);var p=i(e,u,a,n.tunes[d].abc);f.push(p||u)}else e.innerHTML&&(e.innerHTML="");d++}return f}},l.extractMeasures=function(i){for(var o=[],s=new r(i),c=0;c<s.tunes.length;c++){for(var f=s.tunes[c],h=f.abc.split("K:"),d=h[1].split(`
|
|
25
|
-
`),n=h[0]+"K:"+d[0]+`
|
|
26
|
-
`,t=null,a=null,e=null,u=[],g=!1,p=l.parseOnly(f.abc)[0],k=p.getPickupLength()>0,x=0;x<p.lines.length;x++){var T=p.lines[x];if(T.staff)for(var j=0;j<1;j++)for(var O=T.staff[j],m=0;m<1;m++)for(var E=O.voices[m],P=0;P<E.length;P++){var A=E[P];if(e===null&&A.startChar>=0&&(e=A.startChar,A.chord===void 0?a=t:a=null),A.chord&&(t=A),A.el_type==="bar"){if(g){var N=f.abc.substring(e,A.endChar),D={abc:N};t=a&&a.chord&&a.chord.length>0?a.chord[0].name:null,t&&(D.lastChord=t),A.startEnding&&(D.startEnding=A.startEnding),A.endEnding&&(D.endEnding=A.endEnding),u.push(D),e=null,g=!1}}else A.el_type==="note"&&(g=!0)}}o.push({header:n,measures:u,hasPickup:k})}return o}}(),Bt=l,Bt}var Nt,In;function js(){if(In)return Nt;In=1;var M=Ii(),{relativeMajor:b,transposeKey:v,relativeMode:l,isLegalMode:r}=ji(),i=Li(),o;return function(){o=function(m,E,P){if(E==="TEST")return{keyAccidentals:M,relativeMajor:b,transposeKey:v,relativeMode:l,transposeChordName:i};P=parseInt(P,10);var A=[],N;for(N=0;N<E.length;N++)A=A.concat(s(m,E[N],P));A=A.sort(function(S,B){return B.start-S.start});var D=m.split("");for(N=0;N<A.length;N++){var _=A[N];D.splice(_.start,_.end-_.start,_.note)}return D.join("")};function s(m,E,P){var A=[],N=E.getKeySignature();if(N.root==="Hp"||N.root==="HP")return A;A=A.concat(c(m,P));for(var D=0;D<E.lines.length;D++){var _=E.lines[D].staff;if(_)for(var S=0;S<_.length;S++){var B=_[S];B.clef.type!=="perc"&&(A=A.concat(f(m,B.voices,B.key,P)))}}return A}function c(m,E){for(var P=[],A=m.split("K:"),N=A[0].length,D=1;D<A.length;D++){var _=A[D],S=_.match(/^( *)([A-G])([#b]?)( ?)(\w*)/);if(S){var B=N+2+S[1].length,I=r(S[5])?S[5]:"",z=S[2]+S[3]+S[4]+I,y=e({root:S[2],acc:S[3],mode:I},E),w=y.root+y.acc+S[4]+y.mode;P.push({start:B,end:B+z.length,note:w})}N+=_.length+2}return P}function f(m,E,P,A){for(var N=[],D=e(P,A),_=0;_<E.length;_++)N=N.concat(n(m,E[_],P.root,h(P),D,A));return N}function h(m){for(var E={},P=0;P<m.accidentals.length;P++){var A=m.accidentals[P];A.acc==="flat"?E[A.note.toUpperCase()]="_":A.acc==="sharp"&&(E[A.note.toUpperCase()]="^")}return E}function d(m,E,P){var A=t.indexOf(m.root)-t.indexOf(E);return E==="none"&&(A=t.indexOf(m.root)),A===0?P>2?A+=7:P===-12&&(A-=7):P>0&&A<0?A+=7:P<0&&A>0&&(A-=7),P>12?A+=7:P<-12&&(A-=7),A}function n(m,E,P,A,N,D){for(var _=[],S=d(N,P,D),B={},I={},z=0;z<E.length;z++){var y=E[z];if(y.chord)for(var w=0;w<y.chord.length;w++){var C=y.chord[w];if(C.position==="default"){var L=N.accidentals.length&&N.accidentals[0].acc==="flat",F=i(C.name,D,L,!0);F=F.replace(/♭/g,"b").replace(/♯/g,"#"),F!==C.name&&_.push(j(m,y.startChar,y.endChar,F))}}if(y.el_type==="note"&&y.pitches){for(var V=x(m,y.startChar,y.endChar),H=0;H<V.length;H++){var U=k(V[H].note,P,A,B);U.acc&&(B[U.name.toUpperCase()]=U.acc);var Q=u(U,N,S,I);Q.acc&&(I[Q.upper]=Q.acc),_.push({note:Q.acc+Q.name,start:V[H].index,end:V[H].index+V[H].note.length})}if(y.gracenotes)for(var R=0;R<y.gracenotes.length;R++){var te=k(y.gracenotes[R].name,P,A,B);te.acc&&(B[te.name.toUpperCase()]=te.acc);var ee=u(te,N,S,B);ee.acc&&(I[ee.upper]=ee.acc),_.push(T(m,y.startChar,y.endChar,ee.acc+ee.name,R))}}else y.el_type==="bar"?(B={},I={}):y.el_type==="keySignature"&&(P=y.root,A=h(y),N=e(y,D),S=d(N,P,D))}return _}var t="CDEFGAB",a=[",,,,",",,,",",,",",","","'","''","'''","''''"];function e(m,E){if(m.root==="none")return{root:v("C",E),mode:"",acc:"",accidentals:[]};var P=b(m.root+m.acc+m.mode),A=v(P,E),N=l(A,m.mode),D=M(A);return{root:N[0],mode:m.mode,acc:N.length>1?N[1]:"",accidentals:D}}function u(m,E,P,A){for(var N=m.pitch,D=t.indexOf(m.name),_=t.indexOf(E.root),S=(_+N)%7,B=D+P,I=m.oct;B>6;)I++,B-=7;for(;B<0;)I--,B+=7;for(var z=t[S],y="",w=m.adj,C="=",L=0;L<E.accidentals.length;L++)if(E.accidentals[L].note.toLowerCase()===z.toLowerCase()){w=w+(E.accidentals[L].acc==="flat"?-1:1),C=E.accidentals[L].acc==="flat"?"_":"^";break}var F;switch(w){case-2:y="__";break;case-1:y="_";break;case 0:y="=";break;case 1:y="^";break;case 2:y="^^";break;case-3:return F={},F.pitch=m.pitch-1,F.oct=m.oct,F.name=t[t.indexOf(m.name)-1],F.name||(F.name="B",F.oct--),F.name==="B"||F.name==="E"?F.adj=m.adj+1:F.adj=m.adj+2,u(F,E,P+1,A);case 3:return F={},F.pitch=m.pitch+1,F.oct=m.oct,F.name=t[t.indexOf(m.name)+1],F.name||(F.name="C",F.oct++),F.name==="C"||F.name==="F"?F.adj=m.adj-1:F.adj=m.adj-2,u(F,E,P+1,A)}switch((A[z]===y||!A[z]&&y===C)&&!m.courtesy&&(y=""),I){case 0:z=z+",,,";break;case 1:z=z+",,";break;case 2:z=z+",";break;case 4:z=z.toLowerCase();break;case 5:z=z.toLowerCase()+"'";break;case 6:z=z.toLowerCase()+"''";break;case 7:z=z.toLowerCase()+"'''";break;case 8:z=z.toLowerCase()+"''''";break}return I>4&&(z=z.toLowerCase()),{acc:y,name:z,upper:z.toUpperCase()}}var g=/([_^=]*)([A-Ga-g])([,']*)/,p=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/;function k(m,E,P,A){var N=E==="none"?0:t.indexOf(E),D=m.match(g),_=D[2].toUpperCase(),S=t.indexOf(_)-N;S<0&&(S+=7);var B=a.indexOf(D[3]);_===D[2]&&B--;var I=A[_]||P[_]||"=";return{acc:D[1],name:_,pitch:S,oct:B,adj:O(D[1],P[_],A[_]),courtesy:D[1]===I}}function x(m,E,P){for(var A=m.substring(E,P),N,D=[],_=/("[^"]+")+/g;(N=_.exec(A))!==null;)D.push({start:_.lastIndex-N[0].length,end:_.lastIndex});for(var S=/(![^!]+!)+/g;(N=S.exec(A))!==null;)D.push({start:S.lastIndex-N[0].length,end:S.lastIndex});for(var B=[],I=/([_^=]*)([A-Ga-g])([,']*)/g;(N=I.exec(A))!==null;){for(var z=!1,y=0;y<D.length;y++)I.lastIndex>=D[y].start&&I.lastIndex<=D[y].end&&(z=!0);z||B.push({note:N[0],index:E+I.lastIndex-N[0].length})}return B}function T(m,E,P,A,N){var D=m.substring(E,P),_=/\{/,S=/\}/,B=/([^\{]*)/,I=/(\/*)/,z=D.match(new RegExp(B.source+_.source+I.source+p.source+I.source+p.source+I.source+p.source+I.source+p.source+I.source+p.source+I.source+p.source+I.source+p.source+I.source+p.source+S.source));if(z){for(var y=1+z[1].length,w=0;w<N;w++)z[w*3+2]&&(y+=z[w*3+2].length),z[w*3+3]&&(y+=z[w*3+3].length),z[w*3+4]&&(y+=z[w*3+4].length),z[w*3+5]&&(y+=z[w*3+5].length);z[N*3+2]&&(y+=z[w*3+2].length),E+=y;var C=z[N*3+3]?z[N*3+3].length:0;C+=z[N*3+4]?z[N*3+4].length:0,C+=z[N*3+5]?z[N*3+5].length:0,P=E+C}return{start:E,end:P,note:A}}function j(m,E,P,A){var N=m.substring(E,P).match(/([^"]+)?(".+")+/);return N[1]&&(E+=N[1].length),P=E+N[2].length,{start:E+1,end:P-1,note:A}}function O(m,E,P){if(!m&&P&&(m=P),!m)return 0;switch(E){case void 0:switch(m){case"__":return-2;case"_":return-1;case"=":return 0;case"^":return 1;case"^^":return 2;default:return 0}case"_":switch(m){case"__":return-1;case"_":return 0;case"=":return 1;case"^":return 2;case"^^":return 3;default:return 0}case"^":switch(m){case"__":return-3;case"_":return-2;case"=":return-1;case"^":return 0;case"^^":return 1;default:return 0}}return 0}}(),Nt=o,Nt}var Ot,Dn;function Is(){if(Dn)return Ot;Dn=1;var M=function(v,l,r,i){this.type="BeamElem",this.isflat=!!r,this.isgrace=!!(l&&l==="grace"),this.forceup=!!(this.isgrace||l&&l==="up"),this.forcedown=!!(l&&l==="down"),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=v,this.beams=[],i&&i.duration?(this.duration=i.duration,i.startTriplet&&(this.duration*=i.tripletMultiplier),this.duration=Math.round(this.duration*1e3)/1e3):this.duration=0};M.prototype.setHint=function(){this.hint=!0},M.prototype.runningDirection=function(v){var l=v.averagepitch;l!==void 0&&(this.total=Math.round(this.total+l),this.count||(this.count=0),this.count++)},M.prototype.add=function(v){var l=v.abcelem.averagepitch;l!==void 0&&(v.abcelem.rest||(this.allrests=!1),v.beam=this,this.elems.push(v),this.total=Math.round(this.total+l),(this.min===void 0||v.abcelem.minpitch<this.min)&&(this.min=v.abcelem.minpitch),(this.max===void 0||v.abcelem.maxpitch>this.max)&&(this.max=v.abcelem.maxpitch))},M.prototype.addBeam=function(v){this.beams.push(v)},M.prototype.setStemDirection=function(){if(this.average=b(this.total,this.count),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var v=6;this.stemsUp=this.average<v}delete this.count,this.total=0},M.prototype.calcDir=function(){if(this.average=b(this.total,this.elems.length),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var v=6;this.stemsUp=this.average<v}for(var l=this.stemsUp?"up":"down",r=0;r<this.elems.length;r++)for(var i=0;i<this.elems[r].heads.length;i++)this.elems[r].heads[i].stemDir=l};function b(v,l){return l?v/l:0}return Ot=M,Ot}var Lt,zn;function Ds(){if(zn)return Lt;zn=1;var M=function(b,v){this.startVoice=b,this.type=v};return M.prototype.setBottomStaff=function(b){this.endVoice=b,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},M.prototype.continuing=function(b){this.lastContinuedVoice=b},M.prototype.getWidth=function(){return 10},M.prototype.isStartVoice=function(b){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===b)},Lt=M,Lt}var jt,Fn;function Be(){if(Fn)return jt;Fn=1;var M=we(),b={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"tab.big":{d:[["M",20.16,-21.66],["c",.24,-.09,.66,.09,.78,.36],["c",.09,.21,.09,.24,-.18,.54],["c",-.78,.81,-1.86,1.44,-2.94,1.71],["c",-.87,.24,-1.71,.24,-2.55,.03],["l",-.06,-.03],["l",-.18,.99],["c",-.33,1.98,-.75,4.26,-.96,5.04],["c",-.42,1.65,-1.26,3.18,-2.28,4.14],["c",-.57,.57,-1.17,.9,-1.86,1.08],["c",-.18,.06,-.33,.06,-.66,.06],["c",-.54,0,-.78,-.03,-1.23,-.27],["c",-.39,-.18,-.66,-.39,-1.38,-.99],["c",-.3,-.24,-.66,-.51,-.75,-.57],["c",-.21,-.15,-.27,-.24,-.24,-.45],["c",.06,-.27,.36,-.6,.6,-.66],["c",.18,-.03,.33,.06,.9,.57],["c",.48,.42,.72,.57,.93,.69],["c",.66,.33,1.38,.21,1.95,-.36],["c",.63,-.6,1.05,-1.62,1.23,-3],["c",.03,-.18,.09,-.66,.09,-1.11],["c",.09,-1.56,.33,-3.81,.57,-5.49],["c",.06,-.33,.09,-.63,.09,-.63],["c",-.03,-.03,-.81,-.12,-1.02,-.12],["c",-.57,0,-1.32,.12,-1.8,.33],["c",-.87,.3,-1.35,.78,-1.5,1.41],["c",-.18,.63,.09,1.26,.66,1.65],["c",.12,.06,.15,.12,.18,.24],["c",.09,.27,.06,.57,-.09,.75],["c",-.03,.06,-.12,.09,-.27,.15],["c",-.72,.21,-1.44,.15,-2.1,-.18],["c",-.54,-.27,-.96,-.66,-1.2,-1.14],["c",-.39,-.75,-.33,-1.74,.15,-2.52],["c",.27,-.42,.84,-.93,1.41,-1.23],["c",1.17,-.57,2.88,-.9,4.8,-.9],["c",.69,0,.78,0,1.08,.06],["c",.45,.09,1.11,.3,2.07,.6],["c",1.47,.48,1.83,.57,2.55,.54],["c",1.02,-.06,2.04,-.45,2.94,-1.11],["c",.12,-.09,.24,-.18,.27,-.18],["z"],["m",-5.88,13.05],["c",.21,-.03,.81,0,1.08,.06],["c",.48,.12,.9,.42,.99,.69],["c",.03,.09,.03,.15,0,.27],["c",0,.09,-.03,.57,-.06,1.08],["c",-.09,2.19,-.24,5.76,-.39,8.28],["c",-.06,1.53,-.06,1.77,.03,2.01],["c",.09,.18,.15,.24,.3,.3],["c",.24,.12,.54,.06,1.23,-.27],["c",.57,-.27,.66,-.3,.75,-.24],["c",.09,.06,.18,.3,.18,.45],["c",0,.33,-.15,.51,-.45,.63],["c",-.12,.03,-.39,.15,-.6,.27],["c",-1.17,.6,-1.38,.69,-1.8,.72],["c",-.45,.03,-.78,-.09,-1.08,-.39],["c",-.39,-.42,-.66,-1.2,-1.02,-3.12],["c",-.24,-1.23,-.36,-2.07,-.54,-3.75],["l",0,-.18],["l",-.36,.45],["c",-.6,.75,-1.32,1.59,-1.95,2.25],["c",-.15,.18,-.27,.3,-.27,.33],["c",0,0,.06,.09,.15,.18],["c",.24,.33,.6,.57,1.05,.69],["c",.18,.06,.3,.06,.69,.06],["l",.48,.03],["l",.06,.12],["c",.15,.27,.03,.72,-.21,.9],["c",-.18,.12,-.93,.27,-1.41,.27],["c",-.84,0,-1.59,-.3,-1.98,-.84],["l",-.12,-.15],["l",-.45,.42],["c",-.99,.87,-1.53,1.32,-2.16,1.74],["c",-.78,.51,-1.5,.84,-2.1,.93],["c",-.69,.12,-1.2,.03,-1.95,-.42],["c",-.21,-.12,-.51,-.27,-.66,-.36],["c",-.24,-.12,-.3,-.18,-.33,-.24],["c",-.12,-.27,.15,-.78,.45,-.93],["c",.24,-.12,.33,-.09,.9,.18],["c",.6,.3,.84,.39,1.2,.36],["c",.87,-.09,1.77,-.69,3.24,-2.31],["c",2.67,-2.85,4.59,-5.94,5.7,-9.15],["c",.15,-.45,.24,-.63,.42,-.81],["c",.21,-.24,.6,-.45,.99,-.51],["z"],["m",-3.99,16.05],["c",.18,0,.69,-.03,1.17,0],["c",3.27,.03,5.37,.75,6,2.07],["c",.45,.99,.12,2.4,-.81,3.42],["c",-.24,.27,-.57,.57,-.84,.75],["c",-.09,.06,-.18,.09,-.18,.12],["c",0,0,.18,.03,.42,.09],["c",1.23,.3,2.01,.81,2.37,1.59],["c",.27,.54,.3,1.32,.09,2.1],["c",-.12,.36,-.45,1.05,-.69,1.35],["c",-.87,1.17,-2.1,1.92,-3.54,2.25],["c",-.36,.06,-.48,.06,-.96,.06],["c",-.45,0,-.66,0,-.84,-.03],["c",-.84,-.18,-1.47,-.51,-2.07,-1.11],["c",-.33,-.33,-.45,-.51,-.45,-.63],["c",0,-.06,.03,-.15,.06,-.24],["c",.18,-.33,.69,-.6,.93,-.48],["c",.03,.03,.15,.12,.27,.24],["c",.39,.42,.99,.57,1.62,.45],["c",1.05,-.21,1.98,-1.02,2.31,-2.01],["c",.48,-1.53,-.48,-2.55,-2.58,-2.67],["c",-.21,0,-.36,-.03,-.42,-.06],["c",-.15,-.09,-.21,-.51,-.06,-.78],["c",.12,-.27,.24,-.33,.6,-.36],["c",.57,-.06,1.11,-.42,1.5,-.99],["c",.48,-.72,.54,-1.59,.18,-2.31],["c",-.12,-.21,-.45,-.54,-.69,-.69],["c",-.33,-.21,-.93,-.45,-1.35,-.51],["l",-.12,-.03],["l",-.06,.48],["c",-.54,2.94,-1.14,6.24,-1.29,6.75],["c",-.33,1.35,-.93,2.61,-1.65,3.6],["c",-.3,.36,-.81,.9,-1.14,1.14],["c",-.3,.24,-.84,.48,-1.14,.57],["c",-.33,.09,-.96,.09,-1.26,.03],["c",-.45,-.12,-.87,-.39,-1.53,-.96],["c",-.24,-.15,-.51,-.39,-.63,-.48],["c",-.3,-.21,-.33,-.33,-.21,-.63],["c",.12,-.18,.27,-.36,.42,-.45],["c",.27,-.12,.36,-.09,.87,.33],["c",.78,.6,1.08,.75,1.65,.72],["c",.45,-.03,.81,-.21,1.17,-.54],["c",.87,-.9,1.38,-2.85,1.38,-5.37],["c",0,-.6,.03,-1.11,.12,-2.04],["c",.06,-.69,.24,-2.01,.33,-2.58],["c",.06,-.24,.06,-.42,.06,-.42],["c",0,0,-.12,.03,-.21,.09],["c",-1.44,.57,-2.16,1.65,-1.74,2.55],["c",.09,.15,.18,.24,.27,.33],["c",.24,.21,.3,.27,.33,.39],["c",.06,.24,0,.63,-.15,.78],["c",-.09,.12,-.54,.21,-.96,.24],["c",-1.02,.03,-2.01,-.48,-2.43,-1.32],["c",-.21,-.45,-.27,-.9,-.15,-1.44],["c",.06,-.27,.21,-.66,.39,-.93],["c",.87,-1.29,3,-2.22,5.64,-2.43],["z"]],w:19.643,h:43.325},"tab.tiny":{d:[["M",16.02,-17.25],["c",.12,-.09,.15,-.09,.27,-.09],["c",.21,.03,.51,.3,.51,.45],["c",0,.06,-.12,.18,-.3,.36],["c",-1.11,1.08,-2.55,1.59,-3.84,1.41],["c",-.15,-.03,-.33,-.06,-.39,-.09],["c",-.06,-.03,-.09,-.03,-.12,-.03],["c",0,0,-.06,.42,-.15,.93],["c",-.33,2.01,-.66,3.69,-.84,4.26],["c",-.42,1.41,-1.23,2.67,-2.16,3.33],["c",-.27,.18,-.75,.42,-.99,.48],["c",-.3,.09,-.72,.09,-1.02,.06],["c",-.45,-.09,-.84,-.33,-1.53,-.9],["c",-.21,-.18,-.51,-.39,-.63,-.48],["c",-.27,-.21,-.3,-.24,-.3,-.36],["c",0,-.12,.09,-.36,.18,-.45],["c",.09,-.09,.27,-.18,.36,-.18],["c",.12,0,.3,.12,.66,.45],["c",.57,.51,.87,.69,1.23,.72],["c",.93,.06,1.68,-.78,1.98,-2.37],["c",.09,-.39,.15,-.75,.18,-1.53],["c",.06,-.99,.24,-2.79,.42,-4.05],["c",.03,-.3,.06,-.57,.06,-.6],["c",0,-.06,-.03,-.09,-.15,-.12],["c",-.9,-.18,-2.13,.06,-2.76,.57],["c",-.36,.3,-.51,.6,-.51,1.02],["c",0,.45,.15,.75,.48,.99],["c",.06,.06,.15,.18,.18,.24],["c",.12,.24,.03,.63,-.15,.69],["c",-.24,.12,-.6,.15,-.9,.15],["c",-.36,-.03,-.57,-.09,-.87,-.24],["c",-.78,-.36,-1.23,-1.11,-1.2,-1.92],["c",.12,-1.53,1.74,-2.49,4.62,-2.7],["c",1.2,-.09,1.47,-.03,3.33,.57],["c",.9,.3,1.14,.36,1.56,.39],["c",.45,0,.93,-.06,1.38,-.21],["c",.51,-.18,.81,-.33,1.41,-.75],["z"],["m",-4.68,10.38],["c",.39,-.06,.84,0,1.2,.15],["c",.24,.12,.36,.21,.45,.36],["l",.09,.09],["l",-.06,1.41],["c",-.09,2.19,-.18,3.96,-.27,5.49],["c",-.03,.78,-.06,1.59,-.06,1.86],["c",0,.42,0,.48,.06,.57],["c",.06,.18,.18,.24,.36,.27],["c",.18,0,.39,-.06,.84,-.27],["c",.45,-.21,.54,-.24,.63,-.18],["c",.12,.12,.15,.54,.03,.69],["c",-.03,.03,-.15,.12,-.27,.18],["c",-.15,.03,-.3,.12,-.36,.15],["c",-.87,.45,-1.02,.51,-1.26,.57],["c",-.33,.09,-.6,.06,-.84,-.06],["c",-.42,-.18,-.63,-.6,-.87,-1.44],["c",-.3,-1.23,-.57,-2.97,-.66,-4.08],["c",0,-.18,-.03,-.3,-.03,-.33],["l",-.06,.06],["c",-.18,.27,-1.11,1.38,-1.68,2.01],["l",-.33,.33],["l",.06,.09],["c",.06,.15,.27,.33,.48,.42],["c",.27,.18,.51,.24,.96,.27],["l",.39,0],["l",.03,.12],["c",.12,.21,.03,.57,-.15,.69],["c",-.03,.03,-.21,.09,-.36,.15],["c",-.27,.06,-.39,.06,-.75,.06],["c",-.48,0,-.75,-.03,-1.08,-.21],["c",-.21,-.12,-.51,-.36,-.57,-.48],["l",-.03,-.09],["l",-.39,.36],["c",-1.47,1.35,-2.49,1.98,-3.42,2.13],["c",-.54,.09,-.96,-.03,-1.62,-.39],["c",-.21,-.15,-.45,-.27,-.54,-.3],["c",-.18,-.09,-.21,-.21,-.12,-.45],["c",.06,-.27,.33,-.48,.54,-.48],["c",.03,0,.27,.09,.48,.21],["c",.48,.24,.69,.27,.99,.27],["c",.6,-.06,1.17,-.42,2.1,-1.35],["c",2.22,-2.22,4.02,-4.98,4.95,-7.59],["c",.21,-.57,.3,-.78,.48,-.93],["c",.15,-.15,.42,-.27,.66,-.33],["z"],["m",-3.06,12.84],["c",.27,-.03,1.68,0,2.01,.03],["c",1.92,.18,3.15,.69,3.63,1.5],["c",.18,.33,.24,.51,.21,.93],["c",0,.45,-.06,.72,-.24,1.11],["c",-.24,.51,-.69,1.02,-1.17,1.35],["c",-.21,.15,-.21,.15,-.12,.18],["c",.72,.15,1.11,.3,1.5,.57],["c",.39,.24,.63,.57,.75,.96],["c",.09,.3,.09,.96,0,1.29],["c",-.15,.57,-.39,1.05,-.78,1.5],["c",-.66,.75,-1.62,1.32,-2.61,1.53],["c",-.27,.06,-.42,.06,-.84,.06],["c",-.48,0,-.57,0,-.81,-.06],["c",-.6,-.18,-1.05,-.42,-1.47,-.81],["c",-.36,-.39,-.42,-.51,-.3,-.75],["c",.12,-.21,.39,-.39,.6,-.39],["c",.09,0,.15,.03,.33,.18],["c",.12,.12,.27,.24,.36,.27],["c",.96,.48,2.46,-.33,2.82,-1.5],["c",.24,-.81,-.03,-1.44,-.69,-1.77],["c",-.39,-.21,-1.02,-.33,-1.53,-.33],["c",-.18,0,-.21,0,-.27,-.09],["c",-.06,-.09,-.06,-.3,-.03,-.48],["c",.06,-.18,.18,-.36,.33,-.36],["c",.39,-.06,.51,-.09,.72,-.18],["c",.69,-.36,1.11,-1.23,.99,-2.01],["c",-.09,-.51,-.42,-.9,-.93,-1.17],["c",-.24,-.12,-.6,-.27,-.87,-.3],["c",-.09,-.03,-.09,-.03,-.12,.12],["c",0,.09,-.21,1.11,-.42,2.25],["c",-.66,3.75,-.72,3.99,-1.26,5.07],["c",-.9,1.89,-2.25,2.85,-3.48,2.61],["c",-.39,-.09,-.69,-.27,-1.38,-.84],["c",-.63,-.51,-.63,-.48,-.63,-.6],["c",0,-.18,.18,-.48,.39,-.57],["c",.21,-.12,.3,-.09,.81,.33],["c",.15,.15,.39,.3,.54,.36],["c",.18,.12,.27,.12,.48,.15],["c",.99,.06,1.71,-.78,2.04,-2.46],["c",.12,-.66,.18,-1.14,.21,-2.22],["c",.03,-1.23,.12,-2.25,.36,-3.63],["c",.03,-.24,.06,-.45,.06,-.48],["c",-.06,-.03,-.66,.27,-.9,.42],["c",-.06,.06,-.21,.18,-.33,.3],["c",-.57,.57,-.6,1.35,-.06,1.74],["c",.18,.12,.24,.24,.21,.51],["c",-.03,.3,-.15,.42,-.57,.48],["c",-1.11,.24,-2.22,-.42,-2.43,-1.38],["c",-.09,-.45,.03,-1.02,.3,-1.47],["c",.18,-.24,.6,-.63,.9,-.84],["c",.9,-.6,2.28,-1.02,3.69,-1.11],["z"]],w:15.709,h:34.656},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.85,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84}};b["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},b["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},b["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},b["noteheads.triangle.quarter"]={d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9};var v=function(i){for(var o=[],s=0,c=i.length;s<c;s++){o[s]=[];for(var f=0,h=i[s].length;f<h;f++)o[s][f]=i[s][f]}return o},l=function(i,o,s){for(var c=0,f=i.length;c<f;c++){var h=i[c],d,n;for(d=1,n=h.length;d<n;d++)h[d]*=d%2?o:s}},r={printSymbol:function(i,o,s,c,f){if(!b[s])return null;var h=v(b[s].d);h[0][1]+=i,h[0][2]+=o;for(var d="",n=0;n<h.length;n++)d+=h[n].join(" ");return f.path=d,c.path(f)},getPathForSymbol:function(i,o,s,c,f){if(c=c||1,f=f||1,!b[s])return null;var h=v(b[s].d);return(c!==1||f!==1)&&l(h,c,f),h[0][1]+=i,h[0][2]+=o,h},getSymbolWidth:function(i){return b[i]?b[i].w:0},symbolHeightInPitches:function(i){var o=b[i]?b[i].h:0;return o/M.STEP},getSymbolAlign:function(i){return i.substring(0,7)==="scripts"&&i!=="scripts.roll"?"center":"left"},getYCorr:function(i){switch(i){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":return-1;case"rests.8th":return-1;case"rests.quarter":return-1;case"rests.16th":return-1;case"rests.32nd":return-1;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(i,o){b[i]=o}};return jt=r,jt}var It,Hn;function zs(){if(Hn)return It;Hn=1;var M=je(),b=Be(),v=Me(),l=function(i,o){var s,c=0;i.el_type="clef";var f=new M(i,0,10,"staff-extra clef",o);switch(f.isClef=!0,i.type){case"treble":s="clefs.G";break;case"tenor":s="clefs.C";break;case"alto":s="clefs.C";break;case"bass":s="clefs.F";break;case"treble+8":s="clefs.G",c=1;break;case"tenor+8":s="clefs.C",c=1;break;case"bass+8":s="clefs.F",c=1;break;case"alto+8":s="clefs.C",c=1;break;case"treble-8":s="clefs.G",c=-1;break;case"tenor-8":s="clefs.C",c=-1;break;case"bass-8":s="clefs.F",c=-1;break;case"alto-8":s="clefs.C",c=-1;break;case"none":return null;case"perc":s="clefs.perc";break;default:f.addFixed(new v("clef="+i.type,0,0,void 0,{type:"debug"}))}var h=5;if(s){var d=b.symbolHeightInPitches(s),n=r(s);if(f.addRight(new v(s,h,b.getSymbolWidth(s),i.clefPos,{top:d+i.clefPos+n,bottom:i.clefPos+n})),c!==0){var t=.6666666666666666,a=(b.getSymbolWidth(s)-b.getSymbolWidth("8")*t)/2,e=c>0?f.top+3:f.bottom-1,u=c>0?f.top+3:f.bottom-3,g=u-2;i.type==="bass-8"&&(e=3,a=0),f.addRight(new v("8",h+a,b.getSymbolWidth("8")*t,e,{scalex:t,scaley:t,top:u,bottom:g}))}}return f};function r(i){switch(i){case"clefs.G":return-5;case"clefs.C":return-4;case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}return It=l,It}var Dt,Gn;function Fs(){if(Gn)return Dt;Gn=1;var M=je(),b=Be(),v=Me(),l=function(r,i){if(r.el_type="keySignature",!r.accidentals||r.accidentals.length===0)return null;var o=new M(r,0,10,"staff-extra key-signature",i);o.isKeySig=!0;var s=0;return r.accidentals.forEach(function(c){var f,h=0;switch(c.acc){case"sharp":f="accidentals.sharp",h=-3;break;case"natural":f="accidentals.nat";break;case"flat":f="accidentals.flat",h=-1.2;break;case"quartersharp":f="accidentals.halfsharp",h=-2.5;break;case"quarterflat":f="accidentals.halfflat",h=-1.2;break;default:f="accidentals.flat"}o.addRight(new v(f,s,b.getSymbolWidth(f),c.verticalPos,{thickness:b.symbolHeightInPitches(f),top:c.verticalPos+b.symbolHeightInPitches(f)+h,bottom:c.verticalPos+h})),s+=b.getSymbolWidth(f)+2},this),o};return Dt=l,Dt}var zt,Vn;function Hs(){if(Vn)return zt;Vn=1;var M=Be(),b=Me(),v=function(l,r,i,o){o||(o={});var s=o.dir!==void 0?o.dir:null,c=o.headx!==void 0?o.headx:0,f=o.extrax!==void 0?o.extrax:0,h=o.flag!==void 0?o.flag:null,d=o.dot!==void 0?o.dot:0,n=o.dotshiftx!==void 0?o.dotshiftx:0,t=o.scale!==void 0?o.scale:1,a=o.accidentalSlot!==void 0?o.accidentalSlot:[],e=o.shouldExtendStem!==void 0?o.shouldExtendStem:!1,u=o.printAccidentals!==void 0?o.printAccidentals:!0,g=i.verticalPos,p,k=0,x=0,T=0;if(r===void 0)l.addFixed(new b("pitch is undefined",0,0,0,{type:"debug"}));else if(r==="")p=new b(null,0,0,g);else{var j=c;if(i.printer_shift){var O=i.printer_shift==="same"?1:0;j=s==="down"?-M.getSymbolWidth(r)*t+O:M.getSymbolWidth(r)*t-O}var m={scalex:t,scaley:t,thickness:M.symbolHeightInPitches(r)*t,name:i.name};if(p=new b(r,j,M.getSymbolWidth(r)*t,g,m),p.stemDir=s,h){var E=g+(s==="down"?-7:7)*t;e&&(s==="down"&&E>6&&(E=6),s==="up"&&E<6&&(E=6));var P=s==="down"?c:c+p.w-.6;l.addRight(new b(h,P,M.getSymbolWidth(h)*t,E,{scalex:t,scaley:t}))}for(x=p.w+n-2+5*d;d>0;d--){var A=1-Math.abs(g)%2;l.addRight(new b("dots.dot",p.w+n-2+5*d,M.getSymbolWidth("dots.dot"),g+A))}}if(p&&(p.highestVert=i.highestVert),u&&i.accidental){var N;switch(i.accidental){case"quartersharp":N="accidentals.halfsharp";break;case"dblsharp":N="accidentals.dblsharp";break;case"sharp":N="accidentals.sharp";break;case"quarterflat":N="accidentals.halfflat";break;case"flat":N="accidentals.flat";break;case"dblflat":N="accidentals.dblflat";break;case"natural":N="accidentals.nat"}for(var D=!1,_=f,S=0;S<a.length;S++)if(g-a[S][0]>=6){a[S][0]=g,_=a[S][1],D=!0;break}D===!1&&(_-=M.getSymbolWidth(N)*t+2,a.push([g,_]),k=M.getSymbolWidth(N)*t+2);var B=M.symbolHeightInPitches(N);l.addExtra(new b(N,_,M.getSymbolWidth(N),g,{scalex:t,scaley:t,top:g+B/2,bottom:g-B/2})),T=M.getSymbolWidth(N)/2}return{notehead:p,accidentalshiftx:k,dotshiftx:x,extraLeft:T}};return zt=v,zt}var Ft,Yn;function Gs(){if(Yn)return Ft;Yn=1;var M=je(),b=Be(),v=Me(),l=function(r,i){r.el_type="timeSignature";var o=new M(r,0,10,"staff-extra time-signature",i);if(r.type==="specified")for(var s=0,c=0;c<r.value.length;c++)if(c!==0&&(o.addRight(new v("+",s+1,b.getSymbolWidth("+"),6,{thickness:b.symbolHeightInPitches("+")})),s+=b.getSymbolWidth("+")+2),r.value[c].den){for(var f=0,h=0;h<r.value[c].num.length;h++)f+=b.getSymbolWidth(r.value[c].num[h]);var d=0;for(h=0;h<r.value[c].num.length;h++)d+=b.getSymbolWidth(r.value[c].den[h]);var n=Math.max(f,d);o.addRight(new v(r.value[c].num,s+(n-f)/2,f,8,{thickness:b.symbolHeightInPitches(r.value[c].num[0])})),o.addRight(new v(r.value[c].den,s+(n-d)/2,d,4,{thickness:b.symbolHeightInPitches(r.value[c].den[0])})),s+=n}else{for(var t=0,a=0;a<r.value[c].num.length;a++)t+=b.getSymbolWidth(r.value[c].num[a]);o.addRight(new v(r.value[c].num,s,t,6,{thickness:b.symbolHeightInPitches(r.value[c].num[0])})),s+=t}else r.type==="common_time"?o.addRight(new v("timesig.common",0,b.getSymbolWidth("timesig.common"),6,{thickness:b.symbolHeightInPitches("timesig.common")})):r.type==="cut_time"?o.addRight(new v("timesig.cut",0,b.getSymbolWidth("timesig.cut"),6,{thickness:b.symbolHeightInPitches("timesig.cut")})):r.type==="tempus_imperfectum"?o.addRight(new v("timesig.imperfectum",0,b.getSymbolWidth("timesig.imperfectum"),6,{thickness:b.symbolHeightInPitches("timesig.imperfectum")})):r.type==="tempus_imperfectum_prolatio"?o.addRight(new v("timesig.imperfectum2",0,b.getSymbolWidth("timesig.imperfectum2"),6,{thickness:b.symbolHeightInPitches("timesig.imperfectum2")})):r.type==="tempus_perfectum"?o.addRight(new v("timesig.perfectum",0,b.getSymbolWidth("timesig.perfectum"),6,{thickness:b.symbolHeightInPitches("timesig.perfectum")})):r.type==="tempus_perfectum_prolatio"?o.addRight(new v("timesig.perfectum2",0,b.getSymbolWidth("timesig.perfectum2"),6,{thickness:b.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",r);return o};return Ft=l,Ft}var Ht,Wn;function Vs(){if(Wn)return Ht;Wn=1;var M=function(b,v,l){this.type="DynamicDecoration",this.anchor=b,this.dec=v,l==="below"?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0};return Ht=M,Ht}var Gt,Rn;function Ys(){if(Rn)return Gt;Rn=1;var M=function(b,v,l,r){this.type="CrescendoElem",this.anchor1=b,this.anchor2=v,this.dir=l,r==="above"?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0};return Gt=M,Gt}var Vt,qn;function Ws(){if(qn)return Vt;qn=1;var M=function(b,v){this.type="GlissandoElem",this.anchor1=b,this.anchor2=v};return Vt=M,Vt}var Yt,Un;function Ki(){if(Un)return Yt;Un=1;var M=function(b){this.type="TieElem",this.anchor1=b.anchor1,this.anchor2=b.anchor2,b.isGrace&&(this.isGrace=!0),b.fixedY&&(this.fixedY=!0),b.stemDir&&(this.stemDir=b.stemDir),b.voiceNumber!==void 0&&(this.voiceNumber=b.voiceNumber),b.style!==void 0&&(this.dotted=!0),this.internalNotes=[]};return M.prototype.addInternalNote=function(b){this.internalNotes.push(b)},M.prototype.setEndAnchor=function(b){this.anchor2=b,this.anchor1?(this.top=Math.max(this.anchor1.pitch,this.anchor2.pitch)+4,this.bottom=Math.min(this.anchor1.pitch,this.anchor2.pitch)-4):(this.top=this.anchor2.pitch+4,this.bottom=this.anchor2.pitch-4)},M.prototype.setStartX=function(b){this.startLimitX=b},M.prototype.setEndX=function(b){this.endLimitX=b},M.prototype.setHint=function(){this.hint=!0},M.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var b;this.anchor1?b=this.anchor1.pitch:this.anchor2?b=this.anchor2.pitch:b=14,this.anchor1&&this.anchor1.stemDir==="down"&&this.anchor2&&this.anchor2.stemDir==="down"?this.above=!0:this.anchor1&&this.anchor1.stemDir==="up"&&this.anchor2&&this.anchor2.stemDir==="up"?this.above=!1:this.anchor1&&this.anchor2?this.above=b>=6:this.anchor1?this.above=this.anchor1.stemDir==="down":this.anchor2?this.above=this.anchor2.stemDir==="down":this.above=b>=6}},M.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var b=!1;this.anchor1&&this.anchor1.stemDir==="down"&&(b=!0),this.anchor2&&this.anchor2.stemDir==="down"&&(b=!0);for(var v=0;v<this.internalNotes.length;v++){var l=this.internalNotes[v];l.stemDir==="down"&&(b=!0)}this.above=b}},M.prototype.calcX=function(b,v){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.anchor2?this.startX=this.anchor2.x-20:this.startX=b,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=v},M.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},M.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&this.anchor1.stemDir==="up"&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var b=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,v=(this.anchor2.highestVert+this.anchor2.pitch)/2;if(this.above&&this.anchor2.stemDir==="up"&&!this.fixedY&&!b&&v<this.startY?(this.endY=v,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&b?this.anchor2.highestVert:this.anchor2.pitch,this.anchor1.scalex===1){var l=!!this.anchor1.parent.beam,r=!!this.anchor2.parent.beam;if(l){var i=this.anchor1.parent===this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1];i||(this.above?this.startY=this.anchor1.parent.fixed.t:this.startY=this.anchor1.parent.fixed.b)}if(r){var o=this.anchor2.parent===this.anchor2.parent.beam.elems[0];o||(this.above?this.endY=this.anchor2.parent.fixed.t:this.endY=this.anchor2.parent.fixed.b)}}}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},M.prototype.avoidCollisionAbove=function(){if(this.above){for(var b=-50,v=0;v<this.internalNotes.length;v++)this.internalNotes[v].highestVert>b&&(b=this.internalNotes[v].highestVert);b>this.startY&&b>this.endY&&(this.startY=this.endY=b-1)}},M.prototype.getYBounds=function(){var b=10,v=1e3;this.isTie?(this.calcTieDirection(),this.calcX(b,v),this.calcTieY()):(this.calcSlurDirection(),this.calcX(b,v),this.calcSlurY());var l,r;return this.above?(r=Math.min(this.startY,this.endY),l=r+3):(l=Math.min(this.startY,this.endY),r=l-3),[l,r]},Yt=M,Yt}var Wt,Xn;function Rs(){if(Xn)return Wt;Xn=1;var M=Vs(),b=Ys(),v=Ws(),l=Be(),r=Me(),i=Ki(),o=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},s=function(n,t,a,e,u,g,p,k,x){for(var T,j=0;j<t.length;j++){if(t[j]==="staccato"||t[j]==="tenuto"||t[j]==="accent"&&!x){var O="scripts."+t[j];if(t[j]==="accent"&&(O="scripts.sforzato"),T===void 0?T=p==="down"?a+2:k-2:T=p==="down"?T+2:T-2,t[j]==="accent")p==="up"?T--:T++;else switch(T){case 2:case 4:case 6:case 8:case 10:p==="up"?T--:T++;break}a>9&&T++;var m=e/2;l.getSymbolAlign(O)!=="center"&&(m-=l.getSymbolWidth(O)/2),u.addFixedX(new r(O,m,l.getSymbolWidth(O),T))}if(t[j]==="slide"&&u.heads[0]){var E=u.heads[0].pitch;E-=2;var P=new r("",-g-15,0,E-1),A=new r("",-g-5,0,E+1);u.addFixedX(P),u.addFixedX(A),n.addOther(new i({anchor1:P,anchor2:A,fixedY:!0}))}}return T===void 0&&(T=a),{above:T,below:u.bottom}},c=function(n,t,a,e){for(var u=0;u<t.length;u++)switch(t[u]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var g=new M(a,t[u],e);n.addOther(g)}},f=function(n,t,a,e,u){function g(){if(e.heads.length===0)return 10;for(var T=e.heads[0].pitch,j=1;j<e.heads.length;j++)T=Math.max(T,e.heads[j].pitch);return T}function p(){if(e.heads.length===0)return 2;for(var T=e.heads[0].pitch,j=1;j<e.heads.length;j++)T=Math.min(T,e.heads[j].pitch);return T}function k(T,j){var O=u==="down"?p()+1:g()+9;u!=="down"&&j===1&&O--;var m=a/2;m+=u==="down"?-5:3;for(var E=0;E<j;E++)O-=1,e.addFixedX(new r(T,m,l.getSymbolWidth(T),O))}for(var x=0;x<n.length;x++)switch(n[x]){case"/":k("flags.ugrace",1);break;case"//":k("flags.ugrace",2);break;case"///":k("flags.ugrace",3);break;case"////":k("flags.ugrace",4);break}},h=function(n,t,a,e,u,g,p,k){function x(A,N){A==="above"?e.above+=N:e.below-=N}function T(A){var N;return A==="above"?(N=e.above,N<g&&(N=g)):(N=e.below,N>p&&(N=p)),N}function j(A,N,D){var _=T(N),S=2,B=5;a.addFixedX(new r(A,t/2,0,_+S,{type:"decoration",klass:"ornament",thickness:3,anchor:D})),x(N,B)}function O(A,N){var D=t/2;l.getSymbolAlign(A)!=="center"&&(D-=l.getSymbolWidth(A)/2);var _=l.symbolHeightInPitches(A)+1,S=T(N);S=N==="above"?S+_/2:S-_/2,a.addFixedX(new r(A,D,l.getSymbolWidth(A),S,{klass:"ornament",thickness:l.symbolHeightInPitches(A),position:N})),x(N,_)}for(var m={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",trillh:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},E=!1,P=0;P<n.length;P++)switch(n[P]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":j(n[P],u,"middle"),E=!0;break;case"D.C.alcoda":j("D.C. al coda",u,"end"),E=!0;break;case"D.C.alfine":j("D.C. al fine",u,"end"),E=!0;break;case"D.S.alcoda":j("D.S. al coda",u,"end"),E=!0;break;case"D.S.alfine":j("D.S. al fine",u,"end"),E=!0;break;case"fine":j("FINE",u,"middle"),E=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"trillh":case"roll":case"irishroll":case"marcato":case"dmarcato":case"turn":case"uppermordent":case"pralltriller":case"mordent":case"lowermordent":case"downbow":case"upbow":case"fermata":case"breath":case"umarcato":case"coda":case"segno":O(m[n[P]],u),E=!0;break;case"invertedfermata":O(m[n[P]],"below"),E=!0;break;case"mark":a.klass="mark";break;case"accent":k&&(O("scripts.sforzato",u),E=!0);break}return E};function d(n,t,a){for(var e=0;e<n.length;e++)switch(n[e]){case"arpeggio":for(var u=t.abcelem.minpitch-1;u<=t.abcelem.maxpitch;u+=2)t.addExtra(new r("scripts.arpeggio",-l.getSymbolWidth("scripts.arpeggio")*2-a,0,u+2,{klass:"ornament",thickness:l.symbolHeightInPitches("scripts.arpeggio")}));break}}return o.prototype.dynamicDecoration=function(n,t,a,e){for(var u,g,p,k=0;k<t.length;k++)switch(t[k]){case"diminuendo(":this.startDiminuendoX=a,u=void 0;break;case"diminuendo)":u={start:this.startDiminuendoX,stop:a},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=a,g=void 0;break;case"crescendo)":g={start:this.startCrescendoX,stop:a},this.startCrescendoX=void 0;break;case"~(":case"glissando(":this.startGlissandoX=a,p=void 0;break;case"~)":case"glissando)":p={start:this.startGlissandoX,stop:a},this.startGlissandoX=void 0;break}u&&n.addOther(new b(u.start,u.stop,">",e)),g&&n.addOther(new b(g.start,g.stop,"<",e)),p&&n.addOther(new v(p.start,p.stop))},o.prototype.createDecoration=function(n,t,a,e,u,g,p,k,x,T,j){x||(x={ornamentPosition:"above",volumePosition:T?"above":"below",dynamicPosition:T?"above":"below"}),c(n,t,u,x.volumePosition),this.dynamicDecoration(n,t,u,x.dynamicPosition),f(t,a,e,u,p);var O=s(n,t,a,e,u,g,p,k,j);O.above=Math.max(O.above,this.minTop),O.below=Math.min(O.below,k),h(t,e,u,O,x.ornamentPosition,this.minTop,k,j),d(t,u,g)},Wt=o,Wt}var Rt,Kn;function qs(){if(Kn)return Rt;Kn=1;var M=function(b,v,l){this.type="EndingElem",this.text=b,this.anchor1=v,this.anchor2=l,this.endingHeightAbove=5,this.pitch=void 0};return Rt=M,Rt}var qt,$n;function Us(){if($n)return qt;$n=1;var M=function(b){for(var v=0,l=0;l<b.voices.length;l++){var r=b.voices[l].staff;b.voices[l].duplicate||(v+=r.top,v+=-r.bottom)}return v};return qt=M,qt}var Ut,Qn;function Xs(){if(Qn)return Ut;Qn=1;var M=Us(),b=function(v){this.getTextSize=v,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};return b.prototype.setLimit=function(v,l){l.specialY[v]&&(l.staff.specialY[v]?l.staff.specialY[v]=Math.max(l.staff.specialY[v],l.specialY[v]):l.staff.specialY[v]=l.specialY[v])},b.prototype.addVoice=function(v,l,r){var i=this.voices.length;this.voices[i]=v,this.staffs[l]?this.staffs[l].voices.push(i):this.staffs[this.staffs.length]={top:10,bottom:2,lines:r,voices:[i],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},v.staff=this.staffs[l]},b.prototype.setHeight=function(){this.height=M(this)},b.prototype.setWidth=function(v){this.w=v;for(var l=0;l<this.voices.length;l++)this.voices[l].setWidth(v)},b.prototype.setStaffLimits=function(v){v.staff.top=Math.max(v.staff.top,v.top),v.staff.bottom=Math.min(v.staff.bottom,v.bottom),this.setLimit("tempoHeightAbove",v),this.setLimit("partHeightAbove",v),this.setLimit("volumeHeightAbove",v),this.setLimit("dynamicHeightAbove",v),this.setLimit("endingHeightAbove",v),this.setLimit("chordHeightAbove",v),this.setLimit("lyricHeightAbove",v),this.setLimit("lyricHeightBelow",v),this.setLimit("chordHeightBelow",v),this.setLimit("volumeHeightBelow",v),this.setLimit("dynamicHeightBelow",v)},Ut=b,Ut}var Xt,Jn;function Ks(){if(Jn)return Xt;Jn=1;var M=je(),b=Me(),v=function(l,r,i){this.type="TempoElement",this.tempo=l,this.tempo.type="tempo",this.tuneNumber=r,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(i,l,r))};return v.prototype.setX=function(l){this.x=l},v.prototype.createNote=function(l,r,i){var o=.75,s=r.duration[0],c=new M(r,s,1,"tempo",i),f,h,d;s<=1/32?(d="noteheads.quarter",h="flags.u32nd",f=0):s<=1/16?(d="noteheads.quarter",h="flags.u16th",f=0):s<=3/32?(d="noteheads.quarter",h="flags.u16nd",f=1):s<=1/8?(d="noteheads.quarter",h="flags.u8th",f=0):s<=3/16?(d="noteheads.quarter",h="flags.u8th",f=1):s<=1/4?(d="noteheads.quarter",f=0):s<=3/8?(d="noteheads.quarter",f=1):s<=1/2?(d="noteheads.half",f=0):s<=3/4?(d="noteheads.half",f=1):s<=1?(d="noteheads.whole",f=0):s<=1.5?(d="noteheads.whole",f=1):s<=2?(d="noteheads.dbl",f=0):(d="noteheads.dbl",f=1);var n=l(c,d,{verticalPos:0},{dir:"up",flag:h,dot:f,scale:o}),t=n.notehead;c.addHead(t);var a;if(d!=="noteheads.whole"&&d!=="noteheads.dbl"){var e=.3333333333333333*o,u=5*o,g=t.dx+t.w,p=-.6;a=new b(null,g,0,e,{type:"stem",pitch2:u,linewidth:p}),c.addRight(a)}return c},Xt=v,Xt}var Kt,Zn;function $s(){if(Zn)return Kt;Zn=1;var M=function(b,v,l){this.type="TripletElem",this.anchor1=v,this.number=b,this.durationClass=("d"+Math.round(v.parent.durationClass*1e3)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=l.flatBeams};return M.prototype.isClosed=function(){return!!this.anchor2},M.prototype.middleNote=function(b){this.middleElems.push(b)},M.prototype.setCloseAnchor=function(b){this.anchor2=b,(!this.anchor1.parent.beam||this.anchor1.stemDir==="up")&&(this.endingHeightAbove=4)},Kt=M,Kt}var $t,ea;function Qs(){if(ea)return $t;ea=1;function M(v){switch(v){case"B#":return"H#";case"B♯":return"H♯";case"B":return"H";case"Bb":return"B";case"B♭":return"B"}return v}function b(v,l,r){var i=v.split(`
|
|
27
|
-
`);for(let o=0;o<i.length;o++){let s=i[o].match(/^([ABCDEFG][♯♭]?)?([^\/]+)?(\/([ABCDEFG][#b♯♭]?))?/);if(!s)continue;let c=s[1]||"",f=s[2]||"",h=s[4]||"";r&&(c=M(c),h=M(h));const d=l?"":"",n=h?"/"+h:"";i[o]=[c,f,n].join(d)}return i.join(`
|
|
28
|
-
`)}return $t=b,$t}var Qt,ta;function Js(){if(ta)return Qt;ta=1;var M=Me(),b=we();const v=Qs();var l=function(i,o,s,c,f,h,d,n){for(var t=0;t<s.chord.length;t++){var a=s.chord[t].position,e=s.chord[t].rel_position,u=a==="left"||a==="right"||a==="below"||a==="above"||!!e,g,p;u?(g="annotationfont",p="abcjs-annotation"):(g="gchordfont",p="abcjs-chord");var k=i.attr(g,p),x=s.chord[t].name,T;if(typeof x=="string")T=r(x,a,e,u,g,p,k,i,o,s,c,f,h,d,n),c=T.roomTaken,f=T.roomTakenRight;else for(var j=0;j<x.length;j++)T=r(x[j].text,a,e,u,g,p,k,i,o,s,c,f,h,d,n),c=T.roomTaken,f=T.roomTakenRight}return{roomTaken:c,roomTakenRight:f}};function r(i,o,s,c,f,h,d,n,t,a,e,u,g,p,k){for(var x=i.split(`
|
|
29
|
-
`),T=x.length-1;T>=0;T--){var j=x[T],O=0,m;c||(j=v(j,p,k));var E=n.calc(j,f,h),P=E.width,A=E.height/b.STEP;switch(o){case"left":e+=P+7,O=-e,m=a.averagepitch,t.addExtra(new M(j,O,P+4,m,{type:"text",height:A,dim:d,position:"left"}));break;case"right":u+=4,O=u,m=a.averagepitch,t.addRight(new M(j,O,P+4,m,{type:"text",height:A,dim:d,position:"right"}));break;case"below":t.addRight(new M(j,0,0,void 0,{type:"text",position:"below",height:A,dim:d,realWidth:P}));break;case"above":t.addRight(new M(j,0,0,void 0,{type:"text",position:"above",height:A,dim:d,realWidth:P}));break;default:if(s){var N=s.y+3*b.STEP;t.addRight(new M(j,O+s.x,0,a.minpitch+N/b.STEP,{position:"relative",type:"text",height:A,dim:d}))}else{var D="above";a.positioning&&a.positioning.chordPosition&&(D=a.positioning.chordPosition),D!=="hidden"&&t.addCentered(new M(j,g/2,P,void 0,{type:"chord",position:D,height:A,dim:d,realWidth:P}))}}}return{roomTaken:e,roomTakenRight:u}}return Qt=l,Qt}var Jt,ra;function Zs(){if(ra)return Jt;ra=1;var M=je(),b=Is(),v=Ds(),l=zs(),r=Fs(),i=Hs(),o=Gs(),s=Rs(),c=qs(),f=Be(),h=Me(),d=we(),n=Xs(),t=Ks(),a=Ki(),e=$s(),u=Yi(),g=Js(),p=Hi(),k=Ce(),x=function(_){var S=0;return _.duration&&(S=_.duration),S},T=!1,j={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},triangle:{"-1":"noteheads.triangle.quarter",0:"noteheads.triangle.quarter",1:"noteheads.triangle.quarter",2:"noteheads.triangle.quarter",3:"noteheads.triangle.quarter",4:"noteheads.triangle.quarter",5:"noteheads.triangle.quarter",6:"noteheads.triangle.quarter",7:"noteheads.triangle.quarter",nostem:"noteheads.triangle.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}},O=function(_,S,B){this.decoration=new s,this.getTextSize=_,this.tuneNumber=S,this.isBagpipes=B.bagpipes,this.flatBeams=B.flatbeams,this.graceSlurs=B.graceSlurs,this.percmap=B.percmap,this.initialClef=B.initialClef,this.jazzchords=!!B.jazzchords,this.accentAbove=!!B.accentAbove,this.germanAlphabet=!!B.germanAlphabet,this.reset()};O.prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.voiceColor=void 0,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.colorByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},O.prototype.setStemHeight=function(_){this.stemHeight=Math.round(_*10/d.STEP)/10},O.prototype.getCurrentVoiceId=function(_,S){return"s"+_+"v"+S},O.prototype.pushCrossLineElems=function(_,S){this.slursbyvoice[this.getCurrentVoiceId(_,S)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(_,S)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(_,S)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(_,S)]=this.voiceScale,this.voiceColor&&(this.colorByVoice[this.getCurrentVoiceId(_,S)]=this.voiceColor)},O.prototype.popCrossLineElems=function(_,S){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(_,S)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(_,S)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(_,S)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(_,S)],this.voiceScale===void 0&&(this.voiceScale=1),this.voiceColor=this.colorByVoice[this.getCurrentVoiceId(_,S)]},O.prototype.containsLyrics=function(_){for(var S=0;S<_.length;S++)for(var B=0;B<_[S].voices.length;B++)for(var I=0;I<_[S].voices[B].length;I++){var z=_[S].voices[B][I];if(z.lyric){(!z.positioning||z.positioning.vocalPosition==="below")&&(this.hasVocals=!0);return}}},O.prototype.createABCLine=function(_,S,B){this.minY=2,this.containsLyrics(_);var I=new n(this.getTextSize);this.tempoSet=!1;for(var z=0;z<_.length;z++)T&&this.restoreState(),T=!1,this.createABCStaff(I,_[z],S,z,B);return I},O.prototype.createABCStaff=function(_,S,B,I,z){_.getTextSize.updateFonts(S);for(var y=0;y<S.voices.length;y++){var w=new u(y,S.voices.length);y===0?(w.barfrom=S.connectBarLines==="start"||S.connectBarLines==="continue",w.barto=S.connectBarLines==="continue"||S.connectBarLines==="end"):w.duplicate=!0,S.title&&S.title[y]&&(w.header=S.title[y].replace(/\\n/g,`
|
|
30
|
-
`),w.headerPosition=6+_.getTextSize.baselineToCenter(w.header,"voicefont","staff-extra voice-name",y,S.voices.length)/d.STEP),S.clef&&S.clef.type==="perc"&&(w.isPercussion=!0);var C=(!this.initialClef||z===0)&&l(S.clef,this.tuneNumber);C&&(y===0&&S.barNumber&&this.addMeasureNumber(S.barNumber,C),w.addChild(C),this.startlimitelem=C);var L=r(S.key,this.tuneNumber);if(L&&(w.addChild(L),this.startlimitelem=L),S.meter){S.meter.type==="specified"?this.measureLength=S.meter.value[0].num/S.meter.value[0].den:this.measureLength=1;var F=o(S.meter,this.tuneNumber);w.addChild(F),this.startlimitelem=F}w.duplicate&&(w.children=[]);var V=S.clef.stafflines||S.clef.stafflines===0?S.clef.stafflines:5;_.addVoice(w,I,V);var H=V===1;this.createABCVoice(S.voices[y],B,I,y,H,w),_.setStaffLimits(w),y===0&&(S.brace==="start"||!_.brace&&S.brace?(_.brace||(_.brace=[]),_.brace.push(new v(w,"brace"))):S.brace==="end"&&_.brace?_.brace[_.brace.length-1].setBottomStaff(w):S.brace==="continue"&&_.brace&&_.brace[_.brace.length-1].continuing(w),S.bracket==="start"||!_.bracket&&S.bracket?(_.bracket||(_.bracket=[]),_.bracket.push(new v(w,"bracket"))):S.bracket==="end"&&_.bracket?_.bracket[_.bracket.length-1].setBottomStaff(w):S.bracket==="continue"&&_.bracket&&_.bracket[_.bracket.length-1].continuing(w))}};function m(_,S){var B=_[S];if(B.el_type!=="note"||!B.startBeam||B.endBeam)return{count:1,elem:B};for(var I=[];S<_.length&&_[S].el_type==="note"&&(I.push(_[S]),!_[S].endBeam);)S++;return{count:I.length,elem:I}}O.prototype.createABCVoice=function(_,S,B,I,z,y){this.popCrossLineElems(B,I),this.stemdir=this.isBagpipes?"down":null,this.abcline=_,this.partstartelem&&(this.partstartelem=new c("",null,null),y.addOther(this.partstartelem));var w=y.voicetotal<2?-1:y.voicenumber;for(var C in this.slurs)this.slurs.hasOwnProperty(C)&&(this.slurs[C]=new a({force:this.slurs[C].force,voiceNumber:w,stemDir:this.slurs[C].stemDir,style:this.slurs[C].dotted}),T&&this.slurs[C].setHint(),y.addOther(this.slurs[C]));for(var L=0;L<this.ties.length;L++)this.ties[L]=new a({force:this.ties[L].force,stemDir:this.ties[L].stemDir,voiceNumber:w,style:this.ties[L].dotted}),T&&this.ties[L].setHint(),y.addOther(this.ties[L]);for(var F=0;F<this.abcline.length;F++)E(this.abcline[F]),this.minY=Math.min(this.abcline[F].minpitch,this.minY);for(var V=B===0,H=0;H<this.abcline.length;){var U=m(this.abcline,H),Q=this.createABCElement(V,z,y,U.elem);if(Q)for(L=0;L<Q.length;L++){if(!this.tempoSet&&S&&!S.suppress){this.tempoSet=!0;var R=new M(S,0,0,"tempo",this.tuneNumber,{});R.addFixedX(new t(S,this.tuneNumber,i)),y.addChild(R)}y.addChild(Q[L])}H+=U.count}this.pushCrossLineElems(B,I)},O.prototype.saveState=function(){this.tiesSave=k.cloneArray(this.ties),this.slursSave=k.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=k.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=k.cloneHashOfArrayOfHash(this.tiesbyvoice)},O.prototype.restoreState=function(){this.ties=k.cloneArray(this.tiesSave),this.slurs=k.cloneHashOfHash(this.slursSave),this.slursbyvoice=k.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=k.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},O.prototype.createABCElement=function(_,S,B,I){var z=[];switch(I.el_type){case void 0:z=this.createBeam(S,B,I);break;case"note":z[0]=this.createNote(I,!1,S,B),this.triplet&&this.triplet.isClosed()&&(B.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":z[0]=this.createBarLine(B,I,_),B.duplicate&&z.length>0&&(z[0].invisible=!0);break;case"meter":z[0]=o(I,this.tuneNumber),this.startlimitelem=z[0],B.duplicate&&z.length>0&&(z[0].invisible=!0);break;case"clef":if(z[0]=l(I,this.tuneNumber),!z[0])return null;B.duplicate&&z.length>0&&(z[0].invisible=!0);break;case"key":var y=r(I,this.tuneNumber);y&&(z[0]=y,this.startlimitelem=z[0]),B.duplicate&&z.length>0&&(z[0].invisible=!0);break;case"stem":this.stemdir=I.direction==="auto"?void 0:I.direction;break;case"part":var w=new M(I,0,0,"part",this.tuneNumber),C=this.getTextSize.calc(I.title,"partsfont","part");w.addFixedX(new h(I.title,0,0,void 0,{type:"part",height:C.height/d.STEP})),z[0]=w;break;case"tempo":var L=new M(I,0,0,"tempo",this.tuneNumber);I.suppress||L.addFixedX(new t(I,this.tuneNumber,i)),z[0]=L;break;case"style":I.head==="normal"?delete this.style:this.style=I.head;break;case"hint":T=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=I.size;break;case"color":this.voiceColor=I.color,B.color=this.voiceColor;break;default:var F=new M(I,0,0,"unsupported",this.tuneNumber);F.addFixed(new h("element type "+I.el_type,0,0,void 0,{type:"debug"})),z[0]=F}return z};function E(_){if(_.pitches){P(_);for(var S=0,B=0;B<_.pitches.length;B++)S+=_.pitches[B].verticalPos;_.averagepitch=S/_.pitches.length,_.minpitch=_.pitches[0].verticalPos,_.maxpitch=_.pitches[_.pitches.length-1].verticalPos}}O.prototype.createBeam=function(_,S,B){var I=[],z=new b(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,B[0]);T&&z.setHint();for(var y=0;y<B.length;y++)z.runningDirection(B[y]);z.setStemDirection();var w=this.stemdir;for(this.stemdir=z.stemsUp?"up":"down",y=0;y<B.length;y++){var C=B[y],L=this.createNote(C,!0,_,S);I.push(L),z.add(L),this.triplet&&this.triplet.isClosed()&&(S.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return z.calcDir(),S.addBeam(z),this.stemdir=w,I};var P=function(_){var S;do{S=!0;for(var B=0;B<_.pitches.length-1;B++)if(_.pitches[B].pitch>_.pitches[B+1].pitch){S=!1;var I=_.pitches[B];_.pitches[B]=_.pitches[B+1],_.pitches[B+1]=I}}while(!S)},A=function(_,S,B,I,z,y,w,C,L){for(var F=B;F>11;F--)F%2===0&&!I&&_.addFixed(new h(null,C,(z+4)*L,F,{type:"ledger"}));for(F=S;F<1;F++)F%2===0&&!I&&_.addFixed(new h(null,C,(z+4)*L,F,{type:"ledger"}));for(F=0;F<y.length;F++){var V=z;w==="down"&&(V=-V),_.addFixed(new h(null,V+C,(z+4)*L,y[F],{type:"ledger"}))}};O.prototype.addGraceNotes=function(_,S,B,I,z,y,w){var C=.6,L=3.5/5;z=Math.round(z*L);var F=null,V;_.gracenotes.length>1&&(F=new b(z,"grace",y),T&&F.setHint(),F.mainNote=B);var H,U=[];for(H=_.gracenotes.length-1;H>=0;H--)w+=10,U[H]=w,_.gracenotes[H].accidental&&(w+=7);for(H=0;H<_.gracenotes.length;H++){var Q=_.gracenotes[H].verticalPos;V=F?null:j.uflags[y?5:3];var R=[],te=i(B,"noteheads.quarter",_.gracenotes[H],{dir:"up",headx:-U[H],extrax:-U[H],flag:V,scale:C*this.voiceScale,accidentalSlot:R});te.notehead.highestVert=te.notehead.pitch+z;var ee=te.notehead;if(this.addSlursAndTies(B,_.gracenotes[H],ee,S,"up",!0),B.addExtra(ee),_.gracenotes[H].acciaccatura){var se=_.gracenotes[H].verticalPos+7*C,X=F?5:6;B.addRight(new h("flags.ugrace",-U[H]+X,0,se,{scalex:C,scaley:C}))}if(F){var ie=_.gracenotes[H].duration/2;y&&(ie/=2);var $={heads:[ee],abcelem:{averagepitch:Q,minpitch:Q,maxpitch:Q,duration:ie}};F.add($)}else{var oe=Q+.3333333333333333*C,ce=Q+7*C,de=ee.dx+ee.w,he=-.6;B.addExtra(new h(null,de,0,oe,{type:"stem",pitch2:ce,linewidth:he}))}A(B,Q,Q,!1,f.getSymbolWidth("noteheads.quarter"),[],!0,ee.dx-1,.6);var ve=_.rest&&(_.rest.type==="spacer"||_.rest.type==="invisible");H===0&&!y&&this.graceSlurs&&!ve&&S.addOther(new a({anchor1:ee,anchor2:I,isGrace:!0}))}return F&&(F.calcDir(),S.addBeam(F)),w};function N(_,S,B,I,z,y,w,C,L){var F,V=7,H,U,Q;switch(z&&(y==="down"&&(V=3),y==="up"&&(V=11)),w&&(B<.5||B<1?V=7:V=5),S.rest.type){case"whole":F=j.rest[0],S.averagepitch=V,S.minpitch=V,S.maxpitch=V,I=0;break;case"rest":S.style==="rhythm"?F=j.rhythm[-C]:F=j.rest[-C],S.averagepitch=V,S.minpitch=V,S.maxpitch=V;break;case"invisible":case"invisible-multimeasure":case"spacer":F="",S.averagepitch=V,S.minpitch=V,S.maxpitch=V;break;case"multimeasure":F=j.rest.multi,S.averagepitch=V,S.minpitch=V,S.maxpitch=V,I=0;var R=f.getSymbolWidth(F);_.addHead(new h(F,R,R*2,7));var te=new h(""+S.rest.text,R,R,16,{type:"multimeasure-text"});_.addExtra(te)}if(S.rest.type.indexOf("multimeasure")<0&&S.rest.type!=="invisible"){var ee=i(_,F,{verticalPos:V},{dot:I,scale:L});H=ee.notehead,H&&(_.addHead(H),U=ee.accidentalshiftx,Q=ee.dotshiftx)}return{noteHead:H,roomTaken:U,roomTakenRight:Q}}function D(_,S){for(var B=0;B<_.length;B++)if(JSON.stringify(_[B])===JSON.stringify(S))return;_.push(S)}return O.prototype.addNoteToAbcElement=function(_,S,B,I,z,y,w,C,L){var F=0,V,H=0,U=0,Q,R,te=[],ee=[],se=0,X=S.averagepitch>=6?"down":"up";I&&(X=I),z=S.style?S.style:z,(!z||z==="normal")&&(z="note");var ie;y?ie=j[z].nostem:ie=j[z][-w],ie||console.log("noteSymbol:",z,w,y);var $;for($=X==="down"?S.pitches.length-2:1;X==="down"?$>=0:$<S.pitches.length;$=X==="down"?$-1:$+1){var oe=S.pitches[X==="down"?$+1:$-1],ce=S.pitches[$],de=X==="down"?oe.pitch-ce.pitch:ce.pitch-oe.pitch;de<=1&&!oe.printer_shift&&(ce.printer_shift=de?"different":"same",(ce.verticalPos>11||ce.verticalPos<1)&&te.push(ce.verticalPos-ce.verticalPos%2),X==="down"?H=f.getSymbolWidth(ie)+2:F=f.getSymbolWidth(ie)+2)}var he=S.pitches.length;for($=0;$<S.pitches.length;$++){if(!C){var ve;X==="down"&&$!==0||X==="up"&&$!==he-1?ve=null:ve=j[X==="down"?"dflags":"uflags"][-w]}var ge;if(S.pitches[$].style)ge=j[S.pitches[$].style][-w];else if(L.isPercussion&&this.percmap){ge=ie;var ye=this.percmap[p(S.pitches[$])];ye&&ye.noteHead&&j[ye.noteHead]&&(ge=j[ye.noteHead][-w])}else ge=ie;S.pitches[$].highestVert=S.pitches[$].verticalPos;var Y=(I==="up"||X==="up")&&$===0,q=(I==="down"||X==="down")&&$===he-1;if(Y||q){if((S.startSlur||he===1)&&(S.pitches[$].highestVert=S.pitches[he-1].verticalPos,x(S)<1&&(I==="up"||X==="up")&&(S.pitches[$].highestVert+=6)),S.startSlur)for(S.pitches[$].startSlur||(S.pitches[$].startSlur=[]),R=0;R<S.startSlur.length;R++)D(S.pitches[$].startSlur,S.startSlur[R]);if(S.endSlur)for(S.pitches[$].highestVert=S.pitches[he-1].verticalPos,x(S)<1&&(I==="up"||X==="up")&&(S.pitches[$].highestVert+=6),S.pitches[$].endSlur||(S.pitches[$].endSlur=[]),R=0;R<S.endSlur.length;R++)D(S.pitches[$].endSlur,S.endSlur[R])}var G=!C&&w<=-1,W=i(_,ge,S.pitches[$],{dir:X,extrax:-H,flag:ve,dot:B,dotshiftx:F,scale:this.voiceScale,accidentalSlot:ee,shouldExtendStem:!I,printAccidentals:!L.isPercussion});se=Math.max(f.getSymbolWidth(ge),se),_.extraw-=W.extraLeft,V=W.notehead,V&&(this.addSlursAndTies(_,S.pitches[$],V,L,G?X:null,!1),S.gracenotes&&S.gracenotes.length>0&&(V.bottom=V.bottom-1),_.addHead(V)),H+=W.accidentalshiftx,U=Math.max(U,W.dotshiftx)}if(G){var K=Math.round(70*this.voiceScale)/10,J=X==="down"?S.minpitch-K:S.minpitch+1/3;J>6&&!I&&(J=6);var re=X==="down"?S.maxpitch-1/3:S.maxpitch+K;re<6&&!I&&(re=6);var le=X==="down"||_.heads.length===0?0:_.heads[0].w,Z=X==="down"?1:-1;V&&V.c==="noteheads.slash.quarter"&&(X==="down"?re-=1:J+=1),V&&V.c==="noteheads.triangle.quarter"&&(X==="down"?re-=.7:J-=1.2),_.addRight(new h(null,le,0,J,{type:"stem",pitch2:re,linewidth:Z,bottom:J-1})),Q=Math.min(J,re)}return{noteHead:V,roomTaken:H,roomTakenRight:U,min:Q,additionalLedgers:te,dir:X,symbolWidth:se}},O.prototype.addLyric=function(_,S){var B="";S.lyric.forEach(function(y){var w=y.divider===" "?"":y.divider;B+=y.syllable+w+`
|
|
31
|
-
`});var I=this.getTextSize.calc(B,"vocalfont","lyric"),z=S.positioning?S.positioning.vocalPosition:"below";_.addCentered(new h(B,0,I.width,void 0,{type:"lyric",position:z,height:I.height/d.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},O.prototype.createNote=function(_,S,B,I){var z=null,y=0,w=0,C=0,L=[],F,V=x(_),H=!1;V===0&&(H=!0,V=.25,S=!0);for(var U=Math.floor(Math.log(V)/Math.log(2)),Q=0,R=Math.pow(2,U),te=R/2;R<V;Q++,R+=te,te/=2);_.startTriplet&&(this.tripletmultiplier=_.tripletMultiplier);var ee=V*this.tripletmultiplier;_.rest&&_.rest.type==="multimeasure"&&(ee=1),_.rest&&_.rest.type==="invisible-multimeasure"&&(ee=this.measureLength*_.rest.text);var se=_.rest?"rest":"note",X=new M(_,ee,1,se,this.tuneNumber,{durationClassOveride:_.duration*this.tripletmultiplier});if(T&&X.setHint(),_.rest){this.measureLength===V&&_.rest.type!=="invisible"&&_.rest.type!=="spacer"&&_.rest.type.indexOf("multimeasure")<0&&(_.rest.type="whole");var ie=N(X,_,V,Q,I.voicetotal>1,this.stemdir,B,U,this.voiceScale);z=ie.noteHead,y=ie.roomTaken,w=ie.roomTakenRight}else{var $=this.addNoteToAbcElement(X,_,Q,this.stemdir,this.style,H,U,S,I);$.min!==void 0&&(this.minY=Math.min($.min,this.minY)),z=$.noteHead,y=$.roomTaken,w=$.roomTakenRight,L=$.additionalLedgers,F=$.dir,C=$.symbolWidth}if(_.lyric!==void 0&&this.addLyric(X,_),_.gracenotes!==void 0&&(y+=this.addGraceNotes(_,I,X,z,this.stemHeight*this.voiceScale,this.isBagpipes,y)),_.decoration){var oe=S&&F!=="up"?Math.min(-3,X.bottom-6):X.bottom;this.decoration.createDecoration(I,_.decoration,X.top,z?z.w:0,X,y,F,oe,_.positioning,this.hasVocals,this.accentAbove)}if(_.barNumber&&X.addFixed(new h(_.barNumber,-10,0,0,{type:"barNumber"})),A(X,_.minpitch,_.maxpitch,_.rest,C,L,F,-2,1),_.chord!==void 0){var ce=g(this.getTextSize,X,_,y,w,C,this.jazzchords,this.germanAlphabet);y=ce.roomTaken,w=ce.roomTakenRight}return _.startTriplet&&(this.triplet=new e(_.startTriplet,z,{flatBeams:this.flatBeams})),_.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(z),this.triplet&&!_.startTriplet&&!_.endTriplet&&!(_.rest&&_.rest.type==="spacer")&&this.triplet.middleNote(z),X},O.prototype.addSlursAndTies=function(_,S,B,I,z,y){if(S.endTie&&this.ties.length>0){for(var w=!1,C=0;C<this.ties.length;C++)if(this.ties[C].anchor1&&this.ties[C].anchor1.pitch===B.pitch){this.ties[C].setEndAnchor(B),I.setRange(this.ties[C]),this.ties.splice(C,1),w=!0;break}w||(this.ties[0].setEndAnchor(B),I.setRange(this.ties[0]),this.ties.splice(0,1))}var L=I.voicetotal<2?-1:I.voicenumber;if(S.startTie){var F=new a({anchor1:B,force:this.stemdir==="down"||this.stemdir==="up",stemDir:this.stemdir,isGrace:y,voiceNumber:L,style:S.startTie.style});T&&F.setHint(),this.ties[this.ties.length]=F,I.addOther(F),_.startTie=!0}var V,H;if(S.endSlur)for(var U=0;U<S.endSlur.length;U++)H=S.endSlur[U],this.slurs[H]?(V=this.slurs[H],V.setEndAnchor(B),I.setRange(V),delete this.slurs[H]):(V=new a({anchor2:B,stemDir:this.stemdir,voiceNumber:L}),T&&V.setHint(),I.addOther(V)),this.startlimitelem&&V.setStartX(this.startlimitelem);else if(!y)for(var Q in this.slurs)this.slurs.hasOwnProperty(Q)&&this.slurs[Q].addInternalNote(B);if(S.startSlur)for(U=0;U<S.startSlur.length;U++)H=S.startSlur[U].label,V=new a({anchor1:B,stemDir:this.stemdir,voiceNumber:L,style:S.startSlur[U].style}),T&&V.setHint(),this.slurs[H]=V,I.addOther(V)},O.prototype.addMeasureNumber=function(_,S){var B=this.getTextSize.calc(_,"measurefont","bar-number"),I=0;S.isClef&&(I+=B.width/2);var z=B.width>10&&S.abcelem.type==="treble"?13.5:11;S.addFixed(new h(_,I,B.width,z+B.height/d.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},O.prototype.createBarLine=function(_,S,B){var I=new M(S,0,10,"bar",this.tuneNumber),z=null,y=0;S.barNumber&&this.addMeasureNumber(S.barNumber,I);var w=S.type==="bar_right_repeat"||S.type==="bar_dbl_repeat",C=S.type!=="bar_left_repeat"&&S.type!=="bar_thick_thin"&&S.type!=="bar_invisible",L=S.type==="bar_right_repeat"||S.type==="bar_dbl_repeat"||S.type==="bar_left_repeat"||S.type==="bar_thin_thick"||S.type==="bar_thick_thin",F=S.type==="bar_left_repeat"||S.type==="bar_thick_thin"||S.type==="bar_thin_thin"||S.type==="bar_dbl_repeat",V=S.type==="bar_left_repeat"||S.type==="bar_dbl_repeat";if(w||V){for(var H in this.slurs)this.slurs.hasOwnProperty(H)&&this.slurs[H].setEndX(I);this.startlimitelem=I}if(w&&(I.addRight(new h("dots.dot",y,1,7)),I.addRight(new h("dots.dot",y,1,5)),y+=6),C&&(z=new h(null,y,1,2,{type:"bar",pitch2:10,linewidth:.6}),I.addRight(z)),S.type==="bar_invisible"&&(z=new h(null,y,1,2,{type:"none",pitch2:10,linewidth:.6}),I.addRight(z)),S.decoration&&this.decoration.createDecoration(_,S.decoration,12,L?3:1,I,0,"down",2,S.positioning,this.hasVocals,this.accentAbove),L&&(y+=4,z=new h(null,y,4,2,{type:"bar",pitch2:10,linewidth:4}),I.addRight(z),y+=5),this.partstartelem&&S.endEnding&&(this.partstartelem.anchor2=z,this.partstartelem=null),F&&(y+=3,z=new h(null,y,1,2,{type:"bar",pitch2:10,linewidth:.6}),I.addRight(z)),V&&(y+=3,I.addRight(new h("dots.dot",y,1,7)),I.addRight(new h("dots.dot",y,1,5))),S.startEnding&&B&&_.voicenumber===0){var U=this.getTextSize.calc(S.startEnding,"repeatfont","").width;I.minspacing+=U+10,this.partstartelem=new c(S.startEnding,z,null),_.addOther(this.partstartelem)}return I.extraw-=5,S.chord!==void 0&&g(this.getTextSize,I,S,0,0,0,!1,this.germanAlphabet),I},Jt=O,Jt}var Zt,na;function eo(){if(na)return Zt;na=1;var M="http://www.w3.org/2000/svg";function b(o){this.svg=i(),this.currentGroup=[],o.appendChild(this.svg)}b.prototype.clear=function(){if(this.svg){var o=this.svg.parentNode;this.svg=i(),this.currentGroup=[],o&&(o.innerHTML="",o.appendChild(this.svg))}},b.prototype.setTitle=function(o){var s=document.createElement("title"),c=document.createTextNode(o);s.appendChild(c),this.svg.insertBefore(s,this.svg.firstChild)},b.prototype.setResponsiveWidth=function(o,s){if(this.svg.setAttribute("viewBox","0 0 "+o+" "+s),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var c=this.svg.parentNode.getAttribute("class");c?c.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",c+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var f=s/o*100;this.svg.parentNode.style["padding-bottom"]=f+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},b.prototype.setSize=function(o,s){this.svg.setAttribute("width",o),this.svg.setAttribute("height",s)},b.prototype.setAttribute=function(o,s){this.svg.setAttribute(o,s)},b.prototype.setScale=function(o){o!==1?(this.svg.style.transform="scale("+o+","+o+")",this.svg.style["-ms-transform"]="scale("+o+","+o+")",this.svg.style["-webkit-transform"]="scale("+o+","+o+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},b.prototype.insertStyles=function(o){var s=document.createElementNS(M,"style");s.textContent=o,this.svg.insertBefore(s,this.svg.firstChild)},b.prototype.setParentStyles=function(o){for(var s in o)o.hasOwnProperty(s)&&this.svg.parentNode&&(this.svg.parentNode.style[s]=o[s]);if(this.dummySvg){var c=document.querySelector("body");c.removeChild(this.dummySvg),this.dummySvg=null}};function v(o,s,c){var f=c-o;return"M "+o+" "+s+" l "+f+" 0 l 0 1 l "+-f+" 0 z "}function l(o,s,c){var f=c-s;return"M "+o+" "+s+" l 0 "+f+" l 1 0 l 0 "+-f+" z "}b.prototype.rect=function(o){var s=[],c=o.x,f=o.y,h=o.x+o.width,d=o.y+o.height;return s.push(v(c,f,h)),s.push(v(c,d,h)),s.push(l(h,f,d)),s.push(l(c,d,f)),this.path({path:s.join(" "),stroke:"none","data-name":o["data-name"]})},b.prototype.dottedLine=function(o){var s=document.createElementNS(M,"line");s.setAttribute("x1",o.x1),s.setAttribute("x2",o.x2),s.setAttribute("y1",o.y1),s.setAttribute("y2",o.y2),s.setAttribute("stroke",o.stroke),s.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(s,this.svg.firstChild)},b.prototype.rectBeneath=function(o){var s=document.createElementNS(M,"rect");s.setAttribute("x",o.x),s.setAttribute("width",o.width),s.setAttribute("y",o.y),s.setAttribute("height",o.height),o.stroke&&s.setAttribute("stroke",o.stroke),o["stroke-opacity"]&&s.setAttribute("stroke-opacity",o["stroke-opacity"]),o.fill&&s.setAttribute("fill",o.fill),o["fill-opacity"]&&s.setAttribute("fill-opacity",o["fill-opacity"]),this.svg.insertBefore(s,this.svg.firstChild)},b.prototype.text=function(o,s,c,f){var h=document.createElementNS(M,"text");h.setAttribute("stroke","none");for(var d in s)s.hasOwnProperty(d)&&h.setAttribute(d,s[d]);for(var n=s["data-name"]=="free-text",t=(""+o).split(`
|
|
32
|
-
`),a=0;a<t.length;a++)if(!(n&&t[a]=="")){var e=document.createElementNS(M,"tspan");if(f)for(var u in f)f.hasOwnProperty(u)&&e.setAttribute(u,f[u]);if(e.setAttribute("x",s.x?s.x:0),a!==0&&e.setAttribute("dy","1.2em"),t[a].indexOf("")!==-1){var g=t[a].split("");if(e.textContent=g[0],g[1]){var p=document.createElementNS(M,"tspan");p.setAttribute("dy","-0.3em"),p.setAttribute("style","font-size:0.7em"),p.textContent=g[1],e.appendChild(p)}if(g[2]){var k=g[1]?"0.4em":"0.1em",x=document.createElementNS(M,"tspan");x.setAttribute("dy",k),x.setAttribute("style","font-size:0.7em"),x.textContent=g[2],e.appendChild(x)}}else n&&t[a].trim()==""?e.innerHTML=" ":e.textContent=t[a];h.appendChild(e)}return c?c.appendChild(h):this.append(h),h},b.prototype.richTextLine=function(o,s,c,f,h,d){var n=document.createElementNS(M,"text");n.setAttribute("stroke","none"),n.setAttribute("class",f),n.setAttribute("x",s),n.setAttribute("y",c),n.setAttribute("text-anchor",h),n.setAttribute("dominant-baseline","middle");for(var t=0;t<o.length;t++){for(var a=o[t],e=document.createElementNS(M,"tspan"),u=Object.keys(a.attrs),g=0;g<u.length;g++){var p=a.attrs[u[g]];p!==""&&e.setAttribute(u[g],p)}e.textContent=a.content,n.appendChild(e)}return d?d.appendChild(n):this.append(n),n},b.prototype.guessWidth=function(o,s){var c=this.createDummySvg(),f=this.text(o,s,c),h;try{h=f.getBBox(),isNaN(h.height)||!h.height?h={width:s["font-size"]/2,height:s["font-size"]+2}:h={width:h.width,height:h.height}}catch{h={width:s["font-size"]/2,height:s["font-size"]+2}}return c.removeChild(f),h},b.prototype.createDummySvg=function(){if(!this.dummySvg){this.dummySvg=i();var o=["display: block !important;","height: 1px;","width: 1px;","position: absolute;"];this.dummySvg.setAttribute("style",o.join(""));var s=document.querySelector("body");s.appendChild(this.dummySvg)}return this.dummySvg};var r={};b.prototype.getTextSize=function(o,s,c){if(typeof o=="number"&&(o=""+o),!o||o.match(/^\s+$/))return{width:0,height:0};var f;if(o.length<20&&(f=o+JSON.stringify(s),r[f]))return r[f];var h=!c;c||(c=this.text(o,s));var d;try{d=c.getBBox(),isNaN(d.height)||!d.height?d=this.guessWidth(o,s):d={width:d.width,height:d.height}}catch{d=this.guessWidth(o,s)}return h&&(this.currentGroup.length>0?this.currentGroup[0].removeChild(c):this.svg.removeChild(c)),f&&(r[f]=d),d},b.prototype.openGroup=function(o){o=o||{};var s=document.createElementNS(M,"g");return o.klass&&s.setAttribute("class",o.klass),o.fill&&s.setAttribute("fill",o.fill),o.stroke&&s.setAttribute("stroke",o.stroke),o["data-name"]&&s.setAttribute("data-name",o["data-name"]),o.prepend?this.prepend(s):this.append(s),this.currentGroup.unshift(s),s},b.prototype.closeGroup=function(){var o=this.currentGroup.shift();return o&&o.children.length===0?(o.parentElement.removeChild(o),null):o},b.prototype.path=function(o){var s=document.createElementNS(M,"path");for(var c in o)o.hasOwnProperty(c)&&(c==="path"?s.setAttributeNS(null,"d",o.path):c==="klass"?s.setAttributeNS(null,"class",o[c]):o[c]!==void 0&&s.setAttributeNS(null,c,o[c]));return this.append(s),s},b.prototype.pathToBack=function(o){var s=document.createElementNS(M,"path");for(var c in o)o.hasOwnProperty(c)&&(c==="path"?s.setAttributeNS(null,"d",o.path):c==="klass"?s.setAttributeNS(null,"class",o[c]):s.setAttributeNS(null,c,o[c]));return this.prepend(s),s},b.prototype.lineToBack=function(o){for(var s=document.createElementNS(M,"line"),c=Object.keys(o),f=0;f<c.length;f++)s.setAttribute(c[f],o[c[f]]);return this.prepend(s),s},b.prototype.append=function(o){this.currentGroup.length>0?this.currentGroup[0].appendChild(o):this.svg.appendChild(o)},b.prototype.prepend=function(o){this.currentGroup.length>0?this.currentGroup[0].appendChild(o):this.svg.insertBefore(o,this.svg.firstChild)},b.prototype.setAttributeOnElement=function(o,s){for(var c in s)s.hasOwnProperty(c)&&o.setAttributeNS(null,c,s[c])},b.prototype.moveElementToChild=function(o,s){o.appendChild(s)};function i(){var o=document.createElementNS(M,"svg");return o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),o.setAttribute("role","img"),o.setAttribute("fill","currentColor"),o.setAttribute("stroke","currentColor"),o}return Zt=b,Zt}var e0,aa;function to(){if(aa)return e0;aa=1;var M=we(),b=eo(),v=function(l){this.paper=new b(l),this.controller=null,this.space=3*M.SPACE,this.padding={},this.reset(),this.firefox112=navigator.userAgent.indexOf("Firefox/112.0")>=0};return v.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},v.prototype.newTune=function(l){this.abctune=l,this.setVerticalSpace(l.formatting),this.isPrint=l.media==="print",this.setPadding(l)},v.prototype.setLineThickness=function(l){this.lineThickness=l},v.prototype.setPaddingOverride=function(l){this.paddingOverride={top:l.paddingtop,bottom:l.paddingbottom,right:l.paddingright,left:l.paddingleft}},v.prototype.setPadding=function(l){function r(i,o,s,c,f){l.formatting[s]!==void 0?i.padding[o]=l.formatting[s]:i.paddingOverride[o]!==void 0?i.padding[o]=i.paddingOverride[o]:i.isPrint?i.padding[o]=c:i.padding[o]=f}r(this,"top","topmargin",38,15),r(this,"bottom","botmargin",38,15),r(this,"left","leftmargin",68,15),r(this,"right","rightmargin",68,15)},v.prototype.adjustNonScaledItems=function(l){this.padding.top/=l,this.padding.bottom/=l,this.padding.left/=l,this.padding.right/=l,this.abctune.formatting.headerfont.size/=l,this.abctune.formatting.footerfont.size/=l},v.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:26.67+10,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},v.prototype.setVerticalSpace=function(l){l.staffsep!==void 0&&(this.spacing.staffSeparation=l.staffsep*4/3),l.composerspace!==void 0&&(this.spacing.composer=l.composerspace*4/3),l.partsspace!==void 0&&(this.spacing.parts=l.partsspace*4/3),l.textspace!==void 0&&(this.spacing.text=l.textspace*4/3),l.musicspace!==void 0&&(this.spacing.music=l.musicspace*4/3),l.titlespace!==void 0&&(this.spacing.title=l.titlespace*4/3),l.sysstaffsep!==void 0&&(this.spacing.systemStaffSeparation=l.sysstaffsep*4/3),l.stafftopmargin!==void 0&&(this.spacing.staffTopMargin=l.stafftopmargin*4/3),l.subtitlespace!==void 0&&(this.spacing.subtitle=l.subtitlespace*4/3),l.topspace!==void 0&&(this.spacing.top=l.topspace*4/3),l.vocalspace!==void 0&&(this.spacing.vocal=l.vocalspace*4/3),l.wordsspace!==void 0&&(this.spacing.words=l.wordsspace*4/3)},v.prototype.calcY=function(l){return this.y-l*M.STEP},v.prototype.yToPitch=function(l){return l/M.STEP},v.prototype.moveY=function(l,r){r===void 0&&(r=1),this.y+=l*r},v.prototype.absolutemoveY=function(l){this.y=l},e0=v,e0}var t0,ia;function ro(){if(ia)return t0;ia=1;function M(b,v,l,r,i,o){var s=b.text;this.rows=[];var c;v&&this.rows.push({move:v});var f=l.calc("textfont","defined-text");if(s==="")this.rows.push({move:f.attr["font-size"]*2});else if(typeof s=="string"){let u=function(g){return g.replace(/^[ \t]*\n/gm,`X
|
|
33
|
-
`)};this.rows.push({move:f.attr["font-size"]/2}),this.rows.push({left:r,text:s,font:"textfont",klass:"defined-text",anchor:"start",startChar:b.startChar,endChar:b.endChar,absElemType:"freeText",name:"free-text"});var h=u(s);c=o.calc(h,"textfont","defined-text"),this.rows.push({move:c.height})}else if(s){for(var d=0,n=r,t="textfont",a=0;a<s.length;a++)s[a].font?t=s[a].font:t="textfont",this.rows.push({left:n,text:s[a].text,font:t,klass:"defined-text",anchor:"start",startChar:b.startChar,endChar:b.endChar,absElemType:"freeText",name:"free-text"}),c=o.calc(s[a].text,l.calc(t,"defined-text").font,"defined-text"),n+=c.width+c.height/2,d=Math.max(d,c.height);this.rows.push({move:d})}else if(b.length===1){var e=i/2;this.rows.push({left:e,text:b[0].text,font:"textfont",klass:"defined-text",anchor:"middle",startChar:b.startChar,endChar:b.endChar,absElemType:"freeText",name:"free-text"}),c=o.calc(b[0].text,"textfont","defined-text"),this.rows.push({move:c.height})}}return t0=M,t0}var r0,sa;function no(){if(sa)return r0;sa=1;function M(b,v,l){this.rows=[],b&&this.rows.push({move:b}),this.rows.push({separator:v,absElemType:"separator"}),l&&this.rows.push({move:l})}return r0=M,r0}var n0,oa;function ao(){if(oa)return n0;oa=1;function M(b,v,l,r,i,o){this.rows=[],b&&this.rows.push({move:b});var s=v.titleleft?"start":"middle",c=v.titleleft?i:r;this.rows.push({left:c,text:l.text,font:"subtitlefont",klass:"text subtitle",anchor:s,startChar:l.startChar,endChar:l.endChar,absElemType:"subtitle",name:"subtitle"});var f=o.calc(l.text,"subtitlefont","text subtitle");this.rows.push({move:f.height})}return n0=M,n0}var a0,ca;function Lr(){if(ca)return a0;ca=1;function M(b,v,l){if(v.text){v.marginLeft||(v.marginLeft=0),v.klass||(v.klass=""),v.anchor||(v.anchor="start"),v.info||(v.info={startChar:-2,endChar:-2}),v.marginTop&&b.push({move:v.marginTop});var r={left:v.marginLeft,text:v.text,font:v.font,anchor:v.anchor,startChar:v.info.startChar,endChar:v.info.endChar,"dominant-baseline":v["dominant-baseline"]};v.absElemType&&(r.absElemType=v.absElemType),!v.inGroup&&v.klass&&(r.klass=v.klass),v.name&&(r.name=v.name),b.push(r);var i=l.calc("A",v.font,v.klass),o=v.text.split(`
|
|
34
|
-
`).length;if(v.text[v.text.length-1]===`
|
|
35
|
-
`&&o--,!v.noMove){var s=i.height*1.1*o;b.push({move:Math.round(s)}),v.marginBottom&&b.push({move:v.marginBottom})}}}return a0=M,a0}var i0,la;function $i(){if(la)return i0;la=1;const M=Lr();function b(v,l,r,i,o,s,c,f){var h=f.calc("i",r,i);if(l==="")v.push({move:h.height});else{if(typeof l=="string"){M(v,{marginLeft:s,text:l,font:r,klass:i,marginTop:c.marginTop,anchor:c.anchor,absElemType:c.absElemType,info:c.info,name:o},f);return}c.marginTop&&v.push({move:c.marginTop});var d=0,n={left:s,anchor:c.anchor,phrases:[]};i&&(n.klass=i),v.push(n);for(var t=0;t<l.length;t++){var a=l[t],e=a.font?a.font:f.attr(r,i).font,u={content:a.text};e&&(u.attrs={"font-family":f.getFamily(e.face),"font-size":e.size,"font-weight":e.weight,"font-style":e.style,"font-decoration":e.decoration}),n.phrases.push(u);var g=f.calc(a.text,e,i);d=Math.max(d,g.height),a.text[a.text.length-1]===" "&&h.width}v.push({move:d})}}return i0=b,i0}var s0,ha;function io(){if(ha)return s0;ha=1;const M=Lr(),b=$i();function v(l,r,i,o,s,c,f,h,d,n){if(this.rows=[],l.header&&c){var t=n.calc("X","headerfont","abcjs-header abcjs-meta-top").height;M(this.rows,{marginLeft:f,text:l.header.left,font:"headerfont",klass:"header meta-top",marginTop:-t,info:r.header,name:"header"},n),M(this.rows,{marginLeft:f+s/2,text:l.header.center,font:"headerfont",klass:"header meta-top",marginTop:-t,anchor:"middle",info:r.header,name:"header"},n),M(this.rows,{marginLeft:f+s,text:l.header.right,font:"headerfont",klass:"header meta-top",marginTop:-t,anchor:"end",info:r.header,name:"header"},n)}c&&this.rows.push({move:h.top});var a=i.titleleft?"start":"middle",e=i.titleleft?f:f+s/2;if(l.title){var u=d?"abcjs-title":"";b(this.rows,l.title,"titlefont",u,"title",e,{marginTop:h.title,anchor:a,absElemType:"title",info:r.title},n)}if(o.length)for(var g=0;g<o.length&&o[g].subtitle;){var u=d?"abcjs-text abcjs-subtitle":"";b(this.rows,o[g].subtitle.text,"subtitlefont",u,"subtitle",e,{marginTop:h.subtitle,anchor:a,absElemType:"subtitle",info:o[g].subtitle},n),g++}if(l.rhythm||l.origin||l.composer){if(this.rows.push({move:h.composer}),l.rhythm&&l.rhythm.length>0){var p=!!(l.composer||l.origin),u=d?"abcjs-rhythm":"";M(this.rows,{marginLeft:f,text:l.rhythm,font:"infofont",klass:u,absElemType:"rhythm",noMove:p,info:r.rhythm,name:"rhythm"},n)}l.composer&&l.composer,l.origin&&l.origin;var k=l.composer?l.composer:"";if(l.origin&&(typeof k=="string"&&typeof l.origin=="string"?k+=" ("+l.origin+")":typeof k=="string"&&typeof l.origin!="string"?(k=[{text:k}],k.push({text:" ("}),k=k.concat(l.origin),k.push({text:")"})):(k.push({text:" ("}),k=k.concat(l.origin),k.push({text:")"}))),k){var u=d?"abcjs-composer":"";b(this.rows,k,"composerfont",u,"composer",f+s,{anchor:"end",absElemType:"composer",info:r.composer,ingroup:!0},n)}}if(l.author&&l.author.length>0){var u=d?"abcjs-author":"";b(this.rows,l.author,"composerfont",u,"author",f+s,{anchor:"end",absElemType:"author",info:r.author},n)}if(l.partOrder&&l.partOrder.length>0){var u=d?"abcjs-part-order":"";b(this.rows,l.partOrder,"partsfont",u,"part-order",f,{absElemType:"partOrder",info:r.partOrder,anchor:"start"},n)}}return s0=v,s0}var o0,ua;function so(){if(ua)return o0;ua=1;const M=Lr(),b=$i();function v(i,o,s,c,f,h,d){this.rows=[],i.unalignedWords&&i.unalignedWords.length>0&&this.unalignedWords(i.unalignedWords,c,f,h,d),this.extraText(i,c,f,h,d),i.footer&&s&&this.footer(i.footer,o,c,d)}v.prototype.unalignedWords=function(i,o,s,c,f){var h=c?"abcjs-unaligned-words":"",d="wordsfont",n=f.calc("i",d,h);this.rows.push({move:s.words}),r(this.rows,"",i,o,d,"unalignedWords","unalignedWords",h,"unalignedWords",s,c,f),this.rows.push({move:n.height})};function l(i,o,s,c,f,h,d){s&&(o&&(typeof s=="string"?s=o+s:s=[{text:o}].concat(s)),f=h?"abcjs-extra-text "+f:"",b(i,s,"historyfont",f,"description",c,{absElemType:"extraText",anchor:"start"},d))}function r(i,o,s,c,f,h,d,n,t,a,e,u){if(s){n=e?"abcjs-extra-text "+n:"";var g=u.calc("A",f,n);if(typeof s=="string")o&&(s=o+`
|
|
36
|
-
`+s),M(i,{marginLeft:c,text:s,font:f,absElemType:"extraText",name:t,"dominant-baseline":"middle",klass:n},u);else{i.push({startGroup:d,klass:n,name:t}),i.push({move:a.info}),o&&(M(i,{marginLeft:c,text:o,font:f,absElemType:"extraText",name:t,"dominant-baseline":"middle"},u),i.push({move:g.height*3/4}));for(var p=0;p<s.length;p++)b(i,s[p],f,"",t,c,{anchor:"start"},u),p<s.length-1&&typeof s[p]=="string"&&typeof s[p+1]!="string"&&i.push({move:g.height*3/4});i.push({endGroup:d,absElemType:h,startChar:-1,endChar:-1,name:t}),i.push({move:g.height})}}}return v.prototype.extraText=function(i,o,s,c,f){l(this.rows,"Book: ",i.book,o,"abcjs-book",c,f),l(this.rows,"Source: ",i.source,o,"abcjs-source",c,f),l(this.rows,"Discography: ",i.discography,o,"abcjs-discography",c,f),r(this.rows,"Notes:",i.notes,o,"historyfont","extraText","notes","abcjs-notes","description",s,c,f),l(this.rows,"Transcription: ",i.transcription,o,"abcjs-transcription",c,f),r(this.rows,"History:",i.history,o,"historyfont","extraText","history","abcjs-history","description",s,c,f),l(this.rows,"Copyright: ",i["abc-copyright"],o,"abcjs-copyright",c,f),l(this.rows,"Creator: ",i["abc-creator"],o,"abcjs-creator",c,f),l(this.rows,"Edited By: ",i["abc-edited-by"],o,"abcjs-edited-by",c,f)},v.prototype.footer=function(i,o,s,c){var f="header meta-bottom",h="footerfont";this.rows.push({startGroup:"footer",klass:f}),M(this.rows,{marginLeft:s,text:i.left,font:h,klass:f,name:"footer"},c),M(this.rows,{marginLeft:s+o/2,text:i.center,font:h,klass:f,anchor:"middle",name:"footer"},c),M(this.rows,{marginLeft:s+o,text:i.right,font:h,klass:f,anchor:"end",name:"footer"},c)},o0=v,o0}var c0,da;function Qi(){if(da)return c0;da=1;function M(v,l,r,i){if(v.indexOf(l)===0){var o=v.replace(l,""),s=parseInt(o,10);""+s===o&&(r[i]=s)}}function b(v,l){var r=[];if(v.absEl.elemset){for(var i={},o=0;o<v.absEl.elemset.length;o++){var s=v.absEl.elemset[o];if(s)for(var c=s.getAttribute("class").split(" "),f=0;f<c.length;f++)i[c[f]]=!0}for(var h=0;h<Object.keys(i).length;h++)r.push(Object.keys(i)[h])}for(var d={},n=0;n<r.length;n++)M(r[n],"abcjs-v",d,"voice"),M(r[n],"abcjs-l",d,"line"),M(r[n],"abcjs-m",d,"measure");v.staffPos&&(d.staffPos=v.staffPos);for(var t=l.target;t&&t.dataset&&!t.dataset.name&&t.tagName.toLowerCase()!=="svg";)t=t.parentNode;for(var a=l.target;a&&a.dataset&&!a.dataset.index&&a.tagName.toLowerCase()!=="svg";)a=a.parentNode;return a&&a.dataset&&(d.name=a.dataset.name,d.clickedName=t.dataset.name,d.parentClasses=a.classList),t&&t.classList&&(d.clickedClasses=t.classList),d.selectableElement=v.svgEl,{classes:r,analysis:d}}return c0=b,c0}var l0,fa;function oo(){if(fa)return l0;fa=1;var M=we(),b=Qi();function v(m,E){if(m.rangeHighlight=k,m.dragging)for(var P=0;P<m.selectables.length;P++){var A=m.selectables[P];A.svgEl.getAttribute("selectable")==="true"&&(A.svgEl.setAttribute("tabindex",0),A.svgEl.setAttribute("data-index",P),A.svgEl.addEventListener("keydown",i.bind(m)),A.svgEl.addEventListener("keyup",o.bind(m)),A.svgEl.addEventListener("focus",r.bind(m)))}for(var N=0;N<E.length;N++)E[N].addEventListener("touchstart",t.bind(m),{passive:!0}),E[N].addEventListener("touchmove",a.bind(m),{passive:!0}),E[N].addEventListener("touchend",e.bind(m),{passive:!0}),E[N].addEventListener("mousedown",t.bind(m)),E[N].addEventListener("mousemove",a.bind(m)),E[N].addEventListener("mouseup",e.bind(m))}function l(m){var E=1,P=1,A=m.target.closest("svg"),N=0;A&&A.viewBox&&A.viewBox.baseVal&&(A.viewBox.baseVal.width!==0&&(E=A.viewBox.baseVal.width/A.clientWidth),A.viewBox.baseVal.height!==0&&(P=A.viewBox.baseVal.height/A.clientHeight),N=A.viewBox.baseVal.y);var D=m.target&&m.target.tagName==="svg",_,S;return D?(_=m.offsetX,S=m.offsetY):(_=m.layerX,S=m.layerY),_=_*E,S=S*P,[_,S+N]}function r(m){this.dragMechanism==="keyboard"&&this.dragYStep!==0&&this.dragTarget&&g.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,m),this.dragYStep=0}function i(m){switch(m.keyCode){case 38:case 40:m.preventDefault()}}function o(m){var E=!1,P=m.target.dataset.index;switch(m.keyCode){case 13:case 32:E=!0,this.dragTarget=this.selectables[P],this.dragIndex=P,this.dragMechanism="keyboard",e.bind(this)(m);break;case 38:E=!0,this.dragTarget=this.selectables[P],this.dragIndex=P,this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*M.STEP+")"));break;case 40:E=!0,this.dragTarget=this.selectables[P],this.dragIndex=P,this.dragMechanism="keyboard",this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*M.STEP+")"));break;case 9:this.dragYStep!==0&&e.bind(this)(m);break}E&&m.preventDefault()}function s(m,E){if(!E)return-1;var P=E.dataset;if(!P)return-1;for(var A=P.index,N=0;N<m.length;N++){var D=m[N].svgEl.dataset;if(D&&A===D.index)return N}return-1}function c(m,E,P){for(var A=9999999,N=-1,D=0;D<m.selectables.length&&A>0;D++){var _=m.selectables[D];if(m.getDim(_),_.dim.left<E&&_.dim.right>E&&_.dim.top<P&&_.dim.bottom>P)N=D,A=0;else if(_.dim.top<P&&_.dim.bottom>P){var S=Math.min(Math.abs(_.dim.left-E),Math.abs(_.dim.right-E));S<A&&(A=S,N=D)}else if(_.dim.left<E&&_.dim.right>E){var B=Math.min(Math.abs(_.dim.top-P),Math.abs(_.dim.bottom-P));B<A&&(A=B,N=D)}else{var I=Math.abs(E-_.dim.left)>Math.abs(E-_.dim.right)?Math.abs(E-_.dim.right):Math.abs(E-_.dim.left),z=Math.abs(P-_.dim.top)>Math.abs(P-_.dim.bottom)?Math.abs(P-_.dim.bottom):Math.abs(P-_.dim.top),y=Math.sqrt(I*I+z*z);y<A&&(A=y,N=D)}}return N>=0&&A<=12?N:-1}function f(m,E,P){if(m.x<=E.offsetX&&m.x+m.width>=E.offsetX&&m.y<=E.offsetY&&m.y+m.height>=E.offsetY)return[E.offsetX,E.offsetY];var A=Math.abs(E.layerY/P-E.offsetY);return A<3?[E.offsetX,E.offsetY]:[E.layerX,E.layerY]}function h(m){if(!m)return null;if(m.tagName==="svg")return m;if(!m.getAttribute)return null;for(var E=m.getAttribute("selectable");!E;)m.parentElement?(m=m.parentElement,m.tagName==="svg"?E=!0:E=m.getAttribute("selectable")):E=!0;return m}function d(m,E){var P,A,N,D=s(m.selectables,h(E.target));return D>=0?(N=f(m.selectables[D].svgEl.getBBox(),E,m.scale),P=N[0],A=N[1]):(N=l(E),P=N[0],A=N[1],D=c(m,P,A)),{x:P,y:A,clickedOn:D}}function n(m){if(!(!m||!m.target||!m.touches||m.touches.length<1)){var E=m.target.getBoundingClientRect(),P=m.touches[0].pageX-E.left,A=m.touches[0].pageY-E.top;m.touches[0].offsetX=P,m.touches[0].offsetY=A,m.touches[0].layerX=m.touches[0].pageX,m.touches[0].layerY=m.touches[0].pageY}}function t(m){var E=m;m.type==="touchstart"&&(n(m),m.touches.length>0&&(E=m.touches[0]));var P=d(this,E);P.clickedOn>=0&&(m.type==="touchstart"||m.button===0)&&this.selectables[P.clickedOn]&&(this.dragTarget=this.selectables[P.clickedOn],this.dragIndex=P.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:P.x,y:P.y},this.dragging&&this.dragTarget.isDraggable&&(j(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function a(m){var E=m;if(m.type==="touchmove"&&(n(m),m.touches.length>0&&(E=m.touches[0])),this.lastTouchMove=m,!(!this.dragTarget||!this.dragging||!this.dragTarget.isDraggable||this.dragMechanism!=="mouse"||!this.dragMouseStart)){var P=d(this,E),A=Math.round((P.y-this.dragMouseStart.y)/M.STEP);A!==this.dragYStep&&(this.dragYStep=A,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+A*M.STEP+")"))}}function e(m){var E=m;m.type==="touchend"&&this.lastTouchMove&&(n(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(E=this.lastTouchMove.touches[0])),this.dragTarget&&(p.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),g.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,E),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),O(this.renderer.svg,"abcjs-dragging-in-progress"))}function u(m){m>=0&&m<this.selectables.length&&(this.dragTarget=this.selectables[m],this.dragIndex=m,this.dragMechanism="keyboard",e.bind(this)({target:this.dragTarget.svgEl}))}function g(m,E,P,A,N){for(var D=b(m,N),_=D.classes,S=D.analysis,B=0;B<this.listeners.length;B++)this.listeners[B](m.absEl.abcelem,m.absEl.tuneNumber,_.join(" "),S,{step:E,max:P,index:A,setSelection:u.bind(this)},N)}function p(){for(var m=0;m<this.selected.length;m++)this.selected[m].unhighlight(void 0,this.renderer.foregroundColor);this.selected=[]}function k(m,E){p.bind(this)();for(var P=0;P<this.staffgroups.length;P++)for(var A=this.staffgroups[P].voices,N=0;N<A.length;N++)for(var D=A[N].children,_=0;_<D.length;_++){var S=D[_].abcelem.startChar,B=D[_].abcelem.endChar;(E>S&&m<B||E===m&&E===B)&&(this.selected[this.selected.length]=D[_],D[_].highlight(void 0,this.selectionColor))}}function x(m){var E=m.getAttribute("class");E||(E="");for(var P=E.split(" "),A={},N=0;N<P.length;N++)A[P[N]]=!0;return A}function T(m,E){var P=[];for(var A in E)E.hasOwnProperty(A)&&P.push(A);m.setAttribute("class",P.join(" "))}function j(m,E){if(m){var P=x(m.svg);P[E]=!0,T(m.svg,P)}}function O(m,E){if(m){var P=x(m.svg);delete P[E],T(m.svg,P)}}return l0=v,l0}var h0,pa;function jr(){if(pa)return h0;pa=1;function M(b,v,l,r,i){return v+(r-v)/(l-b)*(i-b)}return h0=M,h0}var u0,ma;function co(){if(ma)return u0;ma=1;var M=Me(),b=we(),v=jr(),l=function(n){if(!(n.elems.length===0||n.allrests)){var t=s(n.stemsUp,n.isgrace),a=n.elems[0],e=n.elems[n.elems.length-1],u=0,g=n.stemsUp?a.abcelem.maxpitch:a.abcelem.minpitch;u=i(a,n.stemsUp,g,u),u=i(e,n.stemsUp,g,u),u=Math.max(n.stemHeight,u+3);var p=f(n.average,n.elems.length,u,n.stemsUp,a.abcelem.averagepitch,e.abcelem.averagepitch,n.isflat,n.min,n.max,n.isgrace),k=c(n.stemsUp,a,e);n.addBeam({startX:k[0],endX:k[1],startY:p[0],endY:p[1],dy:t});for(var x=d(n.elems,n.stemsUp,n.beams[0],n.isgrace,t),T=0;T<x.length;T++)n.addBeam(x[T]);h(n.elems,n.stemsUp,n.beams[0],t,n.mainNote)}},r=function(n){return n===void 0?0:Math.floor(Math.log(n)/Math.log(2))};function i(n,t,a,e){if(!n.children)return e;for(var u=0;u<n.children.length;u++){var g=n.children[u];t&&g.top!==void 0&&g.c==="flags.ugrace"?e=Math.max(e,g.top-a):!t&&g.bottom!==void 0&&g.c==="flags.ugrace"&&(e=Math.max(e,a-g.bottom+7))}return e}function o(n,t,a,e){if(e)return 0;var u=n-t,g=a/2;return u>g&&(u=g),u<-g&&(u=-g),u}function s(n,t){var a=n?b.STEP:-b.STEP;return t&&(a=a*.4),a}function c(n,t,a){var e=t.heads[n?0:t.heads.length-1],u=a.heads[n?0:a.heads.length-1],g=e.x;n&&(g+=e.w-.6);var p=u.x;return p+=n?u.w:.6,[g,p]}function f(n,t,a,e,u,g,p,k,x,T){var j=a-2,O=a-2,m=Math.round(e?Math.max(n+j,x+O):Math.min(n-j,k-O)),E=o(u,g,t,p),P=m+Math.floor(E/2),A=m+Math.floor(-E/2);return T||(e&&m<6||!e&&m>6)&&(P=6,A=6),[P,A]}function h(n,t,a,e,u){for(var g=0;g<n.length;g++){var p=n[g];if(!p.abcelem.rest){var k=!p.addExtra,x=k?u:p,T=p.heads[t?0:p.heads.length-1],j=1/5,O=T.pitch+(t?j:-j),m=t?T.w:0;k||(m+=T.dx);var E=T.x+m,P=v(a.startX,a.startY,a.endX,a.endY,E),A=t?-.6:.6;t||(P-=e/2/b.STEP),k&&(m+=p.heads[0].dx),T.c==="noteheads.slash.quarter"&&(t?O+=1:O-=1);var N=new M(null,m,0,O,{type:"stem",pitch2:P,linewidth:A});N.setX(x.x),x.addRight(N)}}}function d(n,t,a,e,u){for(var g=[],p=[],k=0;k<n.length;k++){var x=n[k];if(!x.abcelem.rest){var T=x.heads[t?0:x.heads.length-1],j=T.x+(t?T.w:0),O=v(a.startX,a.startY,a.endX,a.endY,j),m=t?-1.5:1.5;e&&(m=m*2/3);var E=x.abcelem.duration;E===0&&(E=.25);for(var P=r(E);P<-3;P++){var A=-4-P;if(p[A]?p[A].single=!1:p[A]={x:j+(t?-.6:0),y:O+m*(A+1),durlog:P,single:!0},k>0&&x.abcelem.beambr&&x.abcelem.beambr<=A+1){p[A].split||(p[A].split=[p[A].x]);var N=c(t,n[k-1],x);p[A].split[p[A].split.length-1]>=N[0]&&(N[0]+=x.w),p[A].split.push(N[0]),p[A].split.push(N[1])}}for(var D=p.length-1;D>=0;D--)if(k===n.length-1||r(n[k+1].abcelem.duration)>-D-4){var _=j,S=O+m*(D+1);p[D].single&&(k===0?_=j+5:k===n.length-1?_=j-5:n[k-1].duration===n[k+1].duration?_=k%2===0?j+5:j-5:_=n[k-1].duration>n[k+1].duration?j+5:j-5,S=v(a.startX,a.startY,a.endX,a.endY,_)+m*(D+1));var B={startX:p[D].x,endX:_,startY:p[D].y,endY:S,dy:u};if(p[D].split!==void 0){var I=p[D].split;B.endX<=I[I.length-1]&&(I[I.length-1]-=x.w),I.push(B.endX),B.split=p[D].split}g.push(B),p=p.slice(0,D)}}}return g}return u0=l,u0}var d0,ga;function lo(){if(ga)return d0;ga=1;var M=jr();function b(i){if(i.anchor1&&i.anchor2){i.hasBeam=!!i.anchor1.parent.beam&&i.anchor1.parent.beam===i.anchor2.parent.beam;var o=i.anchor1.parent.beam;if(i.hasBeam&&(o.elems[0]!==i.anchor1.parent||o.elems[o.elems.length-1]!==i.anchor2.parent)&&(i.hasBeam=!1),i.hasBeam){var s=v(o)?i.anchor1.x+i.anchor1.w:i.anchor1.x;i.yTextPos=l(s,i.anchor2.x,o),i.yTextPos+=v(o)?3:-2,i.xTextPos=r(s,i.anchor2.x),i.top=i.yTextPos+1,i.bottom=i.yTextPos-2,v(o)&&(i.endingHeightAbove=4)}else{i.startNote=Math.max(i.anchor1.parent.top,9)+4,i.endNote=Math.max(i.anchor2.parent.top,9)+4,i.anchor1.parent.type==="rest"&&i.anchor2.parent.type!=="rest"?i.startNote=i.endNote:i.anchor2.parent.type==="rest"&&i.anchor1.parent.type!=="rest"&&(i.endNote=i.startNote);for(var c=0,f=0;f<i.middleElems.length;f++)c=Math.max(c,i.middleElems[f].top);c+=4,(c>i.startNote||c>i.endNote)&&(i.startNote=c,i.endNote=c),i.flatBeams&&(i.startNote=Math.max(i.startNote,i.endNote),i.endNote=Math.max(i.startNote,i.endNote)),i.yTextPos=i.startNote+(i.endNote-i.startNote)/2,i.xTextPos=i.anchor1.x+(i.anchor2.x+i.anchor2.w-i.anchor1.x)/2,i.top=i.yTextPos+1}}delete i.middleElems,delete i.flatBeams}function v(i){return i.stemsUp}function l(i,o,s){if(s.beams.length===0)return 0;s=s.beams[0];var c=i+(o-i)/2;return M(s.startX,s.startY,s.endX,s.endY,c)}function r(i,o){return i+(o-i)/2}return d0=b,d0}var f0,va;function ho(){if(va)return f0;va=1;var M=co(),b=jr(),v=lo(),l=function(h){for(var d=0;d<h.beams.length;d++)if(h.beams[d].type==="BeamElem"){M(h.beams[d]),r(h.beams[d]);for(var n=0;n<h.beams[d].elems.length;n++)h.adjustRange(h.beams[d].elems[n])}for(h.staff.specialY.chordLines=o(h.children),d=0;d<h.otherchildren.length;d++){var t=h.otherchildren[d];t.type==="TripletElem"&&(v(t),h.adjustRange(t))}h.staff.top=Math.max(h.staff.top,h.top),h.staff.bottom=Math.min(h.staff.bottom,h.bottom)};function r(h){for(var d=1.5,n=0;n<h.elems.length;n++){var t=h.elems[n];if(t.top)for(var a=f(t,h),e=0;e<t.children.length;e++){var u=t.children[e];if(u.klass==="ornament"&&u.position!=="below"&&u.bottom-d<a){var g=a-u.bottom+d;u.bottom+=g,u.top+=g,u.pitch+=g,a=t.top=u.top}}}}function i(h,d){var n=d.getChordDim();if(n){for(var t=0;t<h.length;t++){var a=h[t]<n.left;if(a){t>0&&d.putChordInLane(t),h[t]=n.right;return}}h.push(n.right),d.putChordInLane(h.length-1)}}function o(h){var d=[0],n=[0],t,a,e;for(t=0;t<h.length;t++){for(a=0;a<h[t].children.length;a++)e=h[t].children[a],e.chordHeightAbove&&i(d,e);for(a=h[t].children.length-1;a>=0;a--)e=h[t].children[a],e.chordHeightBelow&&i(n,e)}return(d.length>1||n.length>1)&&c(h,d.length,n.length),{above:d.length,below:n.length}}function s(h){for(var d=0,n=0;n<h.children.length;n++){var t=h.children[n];t.chordHeightBelow&&d++}return d}function c(h,d,n){for(var t=0;t<h.length;t++){s(h[t]);for(var a=0;a<h[t].children.length;a++){var e=h[t].children[a];e.chordHeightAbove&&e.invertLane(d)}}}function f(h,d){return d=d.beams[0],b(d.startX,d.startY,d.endX,d.endY,h.x)}return f0=l,f0}var p0,ba;function uo(){if(ba)return p0;ba=1;var M=we(),b=function(d,n){for(var t,a=0;a<n.staffs.length;a++){var e=n.staffs[a],u={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(d.showDebug&&d.showDebug.indexOf("box")>=0&&(e.originalTop=e.top,e.originalBottom=e.bottom),l(e,u,"lyricHeightAbove"),l(e,u,"chordHeightAbove",e.specialY.chordLines.above),e.specialY.endingHeightAbove&&(e.specialY.chordHeightAbove?e.top+=2:e.top+=e.specialY.endingHeightAbove+v,u.endingHeightAbove=e.top),e.specialY.dynamicHeightAbove&&e.specialY.volumeHeightAbove?(e.top+=Math.max(e.specialY.dynamicHeightAbove,e.specialY.volumeHeightAbove)+v,u.dynamicHeightAbove=e.top,u.volumeHeightAbove=e.top):(l(e,u,"dynamicHeightAbove"),l(e,u,"volumeHeightAbove")),l(e,u,"partHeightAbove"),l(e,u,"tempoHeightAbove"),e.specialY.lyricHeightBelow&&(e.specialY.lyricHeightBelow+=d.spacing.vocal/M.STEP,u.lyricHeightBelow=e.bottom,e.bottom-=e.specialY.lyricHeightBelow+v),e.specialY.chordHeightBelow){u.chordHeightBelow=e.bottom;var g=e.specialY.chordHeightBelow;e.specialY.chordLines.below&&(g*=e.specialY.chordLines.below),e.bottom-=g+v}e.specialY.volumeHeightBelow&&e.specialY.dynamicHeightBelow?(u.volumeHeightBelow=e.bottom,u.dynamicHeightBelow=e.bottom,e.bottom-=Math.max(e.specialY.volumeHeightBelow,e.specialY.dynamicHeightBelow)+v):e.specialY.volumeHeightBelow?(u.volumeHeightBelow=e.bottom,e.bottom-=e.specialY.volumeHeightBelow+v):e.specialY.dynamicHeightBelow&&(u.dynamicHeightBelow=e.bottom,e.bottom-=e.specialY.dynamicHeightBelow+v),d.showDebug&&d.showDebug.indexOf("box")>=0&&(e.positionY=u);for(var p=0;p<e.voices.length;p++){var k=n.voices[e.voices[p]];r(u,k,d.spacing)}if(t!==void 0){var x=e.top-10,T=t+x,j=d.spacing.systemStaffSeparation/M.STEP,O=j-T;O>0&&(e.top+=O)}e.top+=d.spacing.staffTopMargin/M.STEP,t=2-e.bottom}},v=1;function l(d,n,t,a){if(d.specialY[t]){var e=d.specialY[t];a&&(e*=a),d.top+=e+v,n[t]=d.top}}function r(d,n,t){var a,e;for(a=0;a<n.children.length;a++)e=n.children[a],i(d,e,t);for(a=0;a<n.otherchildren.length;a++)switch(e=n.otherchildren[a],e.type){case"CrescendoElem":o(d,e);break;case"DynamicDecoration":s(d,e);break;case"EndingElem":c(d,e);break;case"TieElem":var u=e.getYBounds();n.staff.top=Math.max(n.staff.top,u[0]),n.staff.top=Math.max(n.staff.top,u[1]),n.staff.bottom=Math.min(n.staff.bottom,u[0]),n.staff.bottom=Math.min(n.staff.bottom,u[1]);break}}function i(d,n,t){for(var a=0;a<n.children.length;a++){var e=n.children[a];for(var u in n.specialY)n.specialY.hasOwnProperty(u)&&e[u]&&(e.pitch=d[u],e.top===void 0&&(e.type==="TempoElement"?f(d,e):h(d,e,t),n.pushTop(e.top),n.pushBottom(e.bottom)))}}function o(d,n){n.dynamicHeightAbove?n.pitch=d.dynamicHeightAbove:n.pitch=d.dynamicHeightBelow}function s(d,n){n.volumeHeightAbove?n.pitch=d.volumeHeightAbove:n.pitch=d.volumeHeightBelow}function c(d,n){n.pitch=d.endingHeightAbove-2}function f(d,n){if(n.pitch=d.tempoHeightAbove,n.top=d.tempoHeightAbove,n.bottom=d.tempoHeightAbove,n.note){var t=n.pitch-n.totalHeightInPitches+1;n.note.top=t,n.note.bottom=t;for(var a=0;a<n.note.children.length;a++){var e=n.note.children[a];e.top+=t,e.bottom+=t,e.pitch+=t,e.pitch2!==void 0&&(e.pitch2+=t)}}}function h(d,n,t){switch(n.type){case"part":n.top=d.partHeightAbove+n.height,n.bottom=d.partHeightAbove;break;case"text":case"chord":n.chordHeightAbove?(n.top=d.chordHeightAbove,n.bottom=d.chordHeightAbove):(n.top=d.chordHeightBelow,n.bottom=d.chordHeightBelow);break;case"lyric":n.lyricHeightAbove?(n.top=d.lyricHeightAbove,n.bottom=d.lyricHeightAbove):(n.top=d.lyricHeightBelow+t.vocal/M.STEP,n.bottom=d.lyricHeightBelow+t.vocal/M.STEP,n.pitch-=t.vocal/M.STEP);break;case"debug":n.top=d.chordHeightAbove,n.bottom=d.chordHeightAbove;break}(n.pitch===void 0||n.top===void 0)&&console.error("RelativeElement position not set.",n.type,n.pitch,n.top,d)}return p0=b,p0}var m0,ya;function fo(){if(ya)return m0;ya=1;var M=function(){};M.beginLayout=function(l,r){r.i=0,r.durationindex=0,r.startx=l,r.minx=l,r.nextx=l,r.spacingduration=0},M.layoutEnded=function(l){return l.i>=l.children.length},M.getNextX=function(l){return Math.max(l.minx,l.nextx)},M.getSpacingUnits=function(l){return Math.sqrt(l.spacingduration*8)},M.layoutOneItem=function(l,r,i,o,s){var c=i.children[i.i];if(!c)return 0;var f=l-i.minx,h=i.durationindex+c.duration>0?o:0;if(c.abcelem.el_type==="note"&&!c.abcelem.rest&&i.voicenumber!==0&&s){var d=s.children[s.i],n=d&&(c.abcelem.maxpitch<=d.abcelem.maxpitch+1&&c.abcelem.maxpitch>=d.abcelem.minpitch-1||c.abcelem.minpitch<=d.abcelem.maxpitch+1&&c.abcelem.minpitch>=d.abcelem.minpitch-1);if(n&&c.abcelem.minpitch===d.abcelem.minpitch&&c.abcelem.maxpitch===d.abcelem.maxpitch&&d.heads&&d.heads.length>0&&c.heads&&c.heads.length>0&&d.heads[0].c===c.heads[0].c&&(n=!1),n){var t=d.heads&&d.heads.length>0?d.heads[0].realWidth:d.fixed.w;c.adjustedWidth||(c.adjustedWidth=t+c.w),c.w=c.adjustedWidth;for(var a=0;a<c.children.length;a++){var e=c.children[a];e.name.indexOf("accidental")<0&&(e.adjustedWidth||(e.adjustedWidth=e.dx+t),e.dx=e.adjustedWidth)}}}var u=b(c,h);return f<u&&(i.i===0||c.type!=="bar"||i.children[i.i-1].type!=="part"&&i.children[i.i-1].type!=="tempo")&&(l+=u-f),c.setX(l),i.spacingduration=c.duration,i.minx=l+v(c),i.i!==i.children.length-1&&(i.minx+=c.minspacing),this.updateNextX(l,r,i),l},M.shiftRight=function(l,r){var i=r.children[r.i];i&&(i.setX(i.x+l),r.minx+=l,r.nextx+=l)},M.updateNextX=function(l,r,i){i.nextx=l+r*this.getSpacingUnits(i)},M.updateIndices=function(l){this.layoutEnded(l)||(l.durationindex+=l.children[l.i].duration,l.children[l.i].type==="bar"&&(l.durationindex=Math.round(l.durationindex*64)/64),l.i++)};function b(l,r){var i=0;return(l.type==="note"||l.type==="bar")&&(i=r),-l.extraw+i}function v(l){return l.w}return m0=M,m0}var g0,ka;function po(){if(ka)return g0;ka=1;var M=fo();function b(o){for(var s=0,c=0;c<o.length;c++){var f=o[c];if(f.children.length>0){var h=f.children.length-1,d=f.children[h];if(d.abcelem.el_type==="bar"){var n=d.children[0].x;n>s?s=n:d.children[0].x=s}}}}var v=function(o,s,c,f,h){var d=1e-7,n=0,t=1e3,a=h;f.startx=a;var e,u=0;for(c&&console.log("init layout",o),e=0;e<f.voices.length;e++)M.beginLayout(a,f.voices[e]);for(var g=0;!l(f.voices);){for(u=null,e=0;e<f.voices.length;e++)!M.layoutEnded(f.voices[e])&&(!u||r(f.voices[e])<u)&&(u=r(f.voices[e]));var p=[],k=[];for(e=0;e<f.voices.length;e++){var x=r(f.voices[e]);x-u>d?k.push(f.voices[e]):p.push(f.voices[e])}g=0;var T=0;for(e=0;e<p.length;e++)M.getNextX(p[e])>a&&(a=M.getNextX(p[e]),g=M.getSpacingUnits(p[e]),T=p[e].spacingduration);n+=g,t=Math.min(t,g),c&&console.log("currentduration: ",u,n,t);var j=void 0;for(e=0;e<p.length;e++){var O=p[e];O.voicenumber===0&&(j=e);var m=j!==void 0&&p[j].voicenumber!==O.voicenumber?p[j]:void 0;i(O,m)||(m=void 0);var E=M.layoutOneItem(a,o,O,s,m),P=E-a;if(P>0){a=E;for(var A=0;A<e;A++)M.shiftRight(P,p[A])}}for(e=0;e<k.length;e++)k[e].spacingduration-=T,M.updateNextX(a,o,k[e]);for(e=0;e<p.length;e++){var N=p[e];M.updateIndices(N)}}for(e=0;e<f.voices.length;e++)M.getNextX(f.voices[e])>a&&(a=M.getNextX(f.voices[e]),g=M.getSpacingUnits(f.voices[e]));return b(f.voices),n+=g,f.setWidth(a),{spacingUnits:n,minSpace:t}};function l(o){for(var s=0;s<o.length;s++)if(!M.layoutEnded(o[s]))return!1;return!0}function r(o){return o.durationindex-(o.children[o.i]&&o.children[o.i].duration>0?0:5e-7)}function i(o,s){return!o||!o.staff||!o.staff.voices||o.staff.voices.length===0||!s||!s.staff||!s.staff.voices||s.staff.voices.length===0?!1:o.staff.voices[0]===s.staff.voices[0]}return g0=v,g0}var v0,xa;function Ji(){if(xa)return v0;xa=1;function M(r,i,o,s,c){var f=r.padding.left,h=0,d,n;for(d=0;d<o.length;d++)o[d].header&&(n=i.calc(o[d].header,"voicefont",""),h=Math.max(h,n.width));if(h=b(h,s,i),h=b(h,c,i),h){var t=i.calc("A","voicefont","");h+=t.width}f+=h;var a=0;return a=v(s,f,a),a=v(c,f,a),f+a}function b(r,i,o){if(i){for(var s=0;s<i.length;s++)if(i[s].header){var c=o.calc(i[s].header,"voicefont","");r=Math.max(r,c.width)}}return r}function v(r,i,o){if(r)for(var s=0;s<r.length;s++)l(i,r[s]),o=Math.max(o,r[s].getWidth());return o}function l(r,i){i.x=r}return v0=M,v0}var b0,wa;function mo(){if(wa)return b0;wa=1;var M=Ji();function b(l,r,i){var o=M(l,r.getTextSize,r.voices,r.brace,r.bracket),s=v(r,i.minPadding),c=s.totalDuration,f=s.minSpacing,h=f*c;i.minWidth&&(h=Math.max(h,i.minWidth));var d=i.minPadding?i.minPadding/2:2;r.startx=o,r.w=h+o;for(var n=0;n<r.voices.length;n++){var t=r.voices[n];t.startx=o,t.w=h+o;for(var a=o,e=!1,u=0,g=0;g<t.children.length;g++){var p=t.children[g];e||(p.duration!==0?(e=!0,u=(h+o-a)/c,r.gridStart=a):(p.x=a,a+=p.w+p.minspacing)),e&&(i.align==="center"?p.x=a+p.duration*u/2-p.w/2:p.duration===0?p.x=a+1-p.w:p.x=a+d-p.extraw,a+=p.duration*u);for(var k=0;k<p.children.length;k++){var x=p.children[k],T=x.dx?x.dx:0;x.x=p.x+T}}r.gridEnd=a}return h}function v(l,r){for(var i=0,o=0,s=0;s<l.voices.length;s++){for(var c=0,f=l.voices[s],h=0;h<f.children.length;h++){var d=f.children[h];if(c+=d.duration,d.duration){var n=(d.w+r)/d.duration;i=Math.max(i,n)}}o=Math.max(o,c)}return{totalDuration:o,minSpacing:i}}return b0=b,b0}var y0,Ta;function go(){if(Ta)return y0;Ta=1;var M=ho(),b=uo(),v=po(),l=Ji(),r=mo(),i=function(f,h,d,n,t,a){var e,u,g=d;for(e=0;e<h.lines.length;e++)if(u=h.lines[e],u.staff){var p;a!==void 0?p=r(f,u.staffGroup,a):p=o(f,g,n,u.staffGroup,h.formatting,e===h.lines.length-1,!1),Math.round(p)>Math.round(g)&&(g=p,t&&(e=-1))}for(e=0;e<h.lines.length;e++)if(u=h.lines[e],u.staffGroup&&u.staffGroup.voices){for(var k=0;k<u.staffGroup.voices.length;k++)M(u.staffGroup.voices[k]);b(f,u.staffGroup)}for(e=0;e<h.lines.length;e++)u=h.lines[e],u.staffGroup&&u.staffGroup.setHeight();return g},o=function(f,h,d,n,t,a,e){for(var u=l(f,n.getTextSize,n.voices,n.brace,n.bracket),g=d,p=0;p<8;p++){var k=v(g,f.minPadding,e,n,u);if(g=s(a,t.stretchlast,h+f.padding.left,n.w,g,k.spacingUnits,k.minSpace,f.padding.left+f.padding.right),g===null)break}return c(n.voices),n.w-u};function s(f,h,d,n,t,a,e,u){if(f)if(h===void 0){if(n/d<.66)return null}else{var g=1-(n+u)/d,p=g<h;if(!p)return null}if(Math.abs(d-n)<2)return null;var k=a*t,x=n-k;return a>0?(t=(d-x)/a,t*e>50&&(t=50/e),t):null}function c(f){for(var h=0;h<f.length;h++)for(var d=f[h],n=1;n<d.children.length-1;n++){var t=d.children[n];if(t.abcelem.rest&&(t.abcelem.rest.type==="whole"||t.abcelem.rest.type==="multimeasure")){var a=d.children[n-1],e=d.children[n+1];t.center(a,e)}}}return y0=i,y0}var k0,Ca;function vo(){if(Ca)return k0;Ca=1;var M=function(b){this.shouldAddClasses=b.shouldAddClasses,this.reset()};return M.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null},M.prototype.incrLine=function(){this.lineNumber===null?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},M.prototype.incrVoice=function(){this.voiceNumber===null?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},M.prototype.isInMeasure=function(){return this.measureNumber!==null},M.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null},M.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},M.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},M.prototype.incrNote=function(){this.noteNumber++},M.prototype.measureTotal=function(){for(var b=0,v=0;v<this.lineNumber;v++)b+=this.measureTotalPerLine[v]?this.measureTotalPerLine[v]:0;return this.measureNumber&&(b+=this.measureNumber),b},M.prototype.getCurrent=function(b){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}},M.prototype.generate=function(b){if(!this.shouldAddClasses)return"";var v=[];if(b&&b.length>0&&v.push(b),b==="abcjs-tab-number")return v.join(" ");if(b==="text instrument-name")return"abcjs-text abcjs-instrument-name";if(this.lineNumber!==null&&v.push("l"+this.lineNumber),this.measureNumber!==null&&v.push("m"+this.measureNumber),this.measureNumber!==null&&v.push("mm"+this.measureTotal()),this.voiceNumber!==null&&v.push("v"+this.voiceNumber),b&&(b.indexOf("note")>=0||b.indexOf("rest")>=0||b.indexOf("lyric")>=0)&&this.noteNumber!==null&&v.push("n"+this.noteNumber),v.length>0){v=v.join(" "),v=v.split(" ");for(var l=0;l<v.length;l++)v[l].indexOf("abcjs-")!==0&&v[l].length>0&&(v[l]="abcjs-"+v[l])}return v.join(" ")},k0=M,k0}var x0,Ma;function bo(){if(Ma)return x0;Ma=1;var M=function(b,v){this.formatting=b,this.classes=v};return M.prototype.updateFonts=function(b){b.gchordfont&&(this.formatting.gchordfont=b.gchordfont),b.tripletfont&&(this.formatting.tripletfont=b.tripletfont),b.annotationfont&&(this.formatting.annotationfont=b.annotationfont),b.vocalfont&&(this.formatting.vocalfont=b.vocalfont)},M.prototype.getFamily=function(b){return b[0]==='"'&&b[b.length-1]==='"'?b.substring(1,b.length-1):b},M.prototype.calc=function(b,v){var l;typeof b=="string"?(l=this.formatting[b],l?l={face:l.face,size:Math.round(l.size*4/3),decoration:l.decoration,style:l.style,weight:l.weight,box:l.box}:l={face:"Arial",size:Math.round(48/3),decoration:"underline",style:"normal",weight:"normal"}):l={face:b.face,size:Math.round(b.size*4/3),decoration:b.decoration,style:b.style,weight:b.weight,box:b.box};var r=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;l.padding=l.size*r;var i={"font-size":l.size,"font-style":l.style,"font-family":this.getFamily(l.face),"font-weight":l.weight,"text-decoration":l.decoration,class:this.classes.generate(v)};return{font:l,attr:i}},x0=M,x0}var w0,Sa;function yo(){if(Sa)return w0;Sa=1;var M=function(b,v){this.getFontAndAttr=b,this.svg=v};return M.prototype.updateFonts=function(b){this.getFontAndAttr.updateFonts(b)},M.prototype.attr=function(b,v){return this.getFontAndAttr.calc(b,v)},M.prototype.getFamily=function(b){return b[0]==='"'&&b[b.length-1]==='"'?b.substring(1,b.length-1):b},M.prototype.calc=function(b,v,l,r){var i;typeof v=="string"?i=this.attr(v,l):i={font:{face:v.face,size:v.size,decoration:v.decoration,style:v.style,weight:v.weight},attr:{"font-size":v.size,"font-style":v.style,"font-family":this.getFamily(v.face),"font-weight":v.weight,"text-decoration":v.decoration,class:this.getFontAndAttr.classes.generate(l)}};var o=this.svg.getTextSize(b,i.attr,r);return i.font.box?{height:o.height+i.font.padding*4,width:o.width+i.font.padding*4}:o},M.prototype.baselineToCenter=function(b,v,l,r,i){var o=this.calc(b,v,l).height,s=this.attr(v,l).font.size;return o*.5+(i-r-2)*s},w0=M,w0}var T0,_a;function Le(){if(_a)return T0;_a=1;var M=function(){for(var b=0,v,l=arguments[b++],r=[],i,o,s,c;l;){if(i=/^[^\x25]+/.exec(l))r.push(i[0]);else if(i=/^\x25{2}/.exec(l))r.push("%");else if(i=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(l)){if((v=arguments[i[1]||b++])==null||v==null)throw"Too few arguments.";if(/[^s]/.test(i[7])&&typeof v!="number")throw"Expecting number but found "+typeof v;switch(i[7]){case"b":v=v.toString(2);break;case"c":v=String.fromCharCode(v);break;case"d":v=parseInt(v);break;case"e":v=i[6]?v.toExponential(i[6]):v.toExponential();break;case"f":v=i[6]?parseFloat(v).toFixed(i[6]):parseFloat(v);break;case"o":v=v.toString(8);break;case"s":v=(v=String(v))&&i[6]?v.substring(0,i[6]):v;break;case"u":v=Math.abs(v);break;case"x":v=v.toString(16);break;case"X":v=v.toString(16).toUpperCase();break}v=/[def]/.test(i[7])&&i[2]&&v>0?"+"+v:v,s=i[3]?i[3]=="0"?"0":i[3][1]:" ",c=i[5]-String(v).length,o=i[5]?str_repeat(s,c):"",r.push(i[4]?v+o:o+v)}else throw"Huh ?!";l=l.substring(i[0].length)}return r.join("")};return T0=M,T0}var C0,Ea;function Se(){if(Ea)return C0;Ea=1;function M(b){return parseFloat(b.toFixed(2))}return C0=M,C0}var M0,Aa;function Ne(){if(Aa)return M0;Aa=1;var M=Se();function b(v,l,r){var i=l.y;if(l.phrases){var f=v.paper.richTextLine(l.phrases,l.x,l.y,l.klass,l.anchor);return f}if(l.lane){var o=l.dim.font.size*.25;i+=(l.dim.font.size+o)*l.lane}var s;l.dim?(s=l.dim,s.attr.class=l.klass):s=v.controller.getFontAndAttr.calc(l.type,l.klass),l.anchor&&(s.attr["text-anchor"]=l.anchor),l["dominant-baseline"]&&(s.attr["dominant-baseline"]=l["dominant-baseline"]),s.attr.x=l.x,s.attr.y=i,l.centerVertically||(s.attr.y+=s.font.size),l.type==="debugfont"&&(console.log("Debug msg: "+l.text),s.attr.stroke="#ff0000"),l.cursor&&(s.attr.cursor=l.cursor);var c;l.name==="free-text"?c=l.text.replace(/^[ \t]*\n/gm,`
|
|
37
|
-
`):c=l.text.replace(/\n\n/g,`
|
|
38
|
-
|
|
39
|
-
`),c=c.replace(/^\n/,`
|
|
40
|
-
`),s.font.box&&(r||v.paper.openGroup({klass:s.attr.class,fill:v.foregroundColor,"data-name":l.name}),s.attr["text-anchor"]==="end"?s.attr.x-=s.font.padding:s.attr["text-anchor"]==="start"&&(s.attr.x+=s.font.padding),s.attr.y+=s.font.padding,delete s.attr.class),l.noClass&&delete s.attr.class,s.attr.x=M(s.attr.x),s.attr.y=M(s.attr.y),l.name&&(s.attr["data-name"]=l.name);var f=v.paper.text(c,s.attr);if(s.font.box){var h=f.getBBox(),d=0;s.attr["text-anchor"]==="middle"?d=h.width/2+s.font.padding:s.attr["text-anchor"]==="end"&&(d=h.width+s.font.padding*2);var n=0;l.centerVertically&&(n=h.height-s.font.padding),v.paper.rect({"data-name":"box",x:Math.round(l.x-d),y:Math.round(i-n),width:Math.round(h.width+s.font.padding*2),height:Math.round(h.height+s.font.padding*2)}),r||(f=v.paper.closeGroup())}return f}return M0=b,M0}var S0,Pa;function ko(){if(Pa)return S0;Pa=1;var M=Le(),b=we(),v=Ne();function l(c,f,h){var d=f.startVoice.staff.absoluteY-b.STEP*10;return f.endVoice&&f.endVoice.staff?f.endY=f.endVoice.staff.absoluteY-b.STEP*2:f.lastContinuedVoice&&f.lastContinuedVoice.staff?f.endY=f.lastContinuedVoice.staff.absoluteY-b.STEP*2:f.endY=f.startVoice.staff.absoluteY-b.STEP*2,s(c,f.x,d,f.endY,f.type,f.header,h)}function r(c,f,h,d,n){f+=b.STEP;var t=b.STEP*.75,a=b.STEP*.75,e=d-h,u=M("M %f %f l %f %f l %f %f l %f %f z",f,h-a,0,e+a*2,t,0,0,-(e+a*2)),g=b.STEP*2,p=b.STEP;return u+=M("M %f %f q %f %f %f %f q %f %f %f %f z",f+t,h-a,g*.6,p*.2,g,-p,-g*.1,p*.3,-g,p+b.STEP),u+=M("M %f %f q %f %f %f %f q %f %f %f %f z",f+t,h+a+e,g*.6,-p*.2,g,p,-g*.1,-p*.3,-g,-p-b.STEP),c.paper.path({path:u,stroke:c.foregroundColor,fill:c.foregroundColor,class:c.controller.classes.generate(n),"data-name":n})}function i(c,f,h,d,n){var t=d-h,a=o(f,h,[7.5,-8,21,0,18.5,-10.5,7.5],[0,t/5.5,t/3.14,t/2,t/2.93,t/4.88,0]);return a+=o(f,h,[0,17.5,-7.5,6.6,-5,20,0],[t/2,t/1.46,t/1.22,t,t/1.19,t/1.42,t/2]),c.paper.path({path:a,stroke:c.foregroundColor,fill:c.foregroundColor,class:c.controller.classes.generate(n),"data-name":n})}function o(c,f,h,d){return M("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",c+h[0],f+d[0],c+h[1],f+d[1],c+h[2],f+d[2],c+h[3],f+d[3],c+h[4],f+d[4],c+h[5],f+d[5],c+h[6],f+d[6])}var s=function(c,f,h,d,n,t,a){var e;if(t){c.paper.openGroup({klass:c.controller.classes.generate("staff-extra voice-name"),"data-name":n});var u=h+(d-h)/2;u=u-c.controller.getTextSize.baselineToCenter(t,"voicefont","staff-extra voice-name",0,1),v(c,{x:c.padding.left,y:u,text:t,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return n==="brace"?e=i(c,f,h,d,n):n==="bracket"&&(e=r(c,f,h,d,n)),t&&(e=c.paper.closeGroup()),a.wrapSvgEl({el_type:n,startChar:-1,endChar:-1},e),e};return S0=l,S0}var _0,Ba;function Fe(){if(Ba)return _0;Ba=1;function M(b,v,l){var r=b.paper.path(v);return r}return _0=M,_0}var E0,Na;function xo(){if(Na)return E0;Na=1;var M=Le(),b=Fe(),v=Se();function l(e,u,g){(!u.anchor1||!u.anchor2||!u.anchor1.heads||!u.anchor2.heads||u.anchor1.heads.length===0||u.anchor2.heads.length===0)&&window.console.error("Glissando Element not set.");var p=4,k=e.calcY(u.anchor1.heads[0].pitch),x=e.calcY(u.anchor2.heads[0].pitch),T=u.anchor1.x+u.anchor1.w/2,j=u.anchor2.x+u.anchor2.w/2,O=r(T,k,j,x),m=u.anchor1.w/2+p,E=u.anchor2.w/2+p,P=i(T,k,j,x),A=o(k,P,m);o(x,P,-E);var N=s(O-m-E),D=a(e,T+m,A,N,P);return g.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},D),[D]}function r(e,u,g,p){var k=g-e,x=p-u;return Math.sqrt(k*k+x*x)}function i(e,u,g,p){return(p-u)/(g-e)}function o(e,u,g){return v(e+g*u)}function s(e){var u=5;return Math.max(2,Math.floor((e-u*2)/6))}var c=[[3.5,-4.8]],f=[[1.5,-1],[.3,-.3],[-3.5,3.8]],h=[[-1.5,2]],d=[[3,4],[3,-4]],n=[[-3,4],[-3,-4]];function t(e,u){for(var g="",p=0;p<e.length;p++)g+="l"+e[p][0]+" "+o(e[p][1],u,e[p][0]);return g}var a=function(e,u,g,p,k){var x=M("M %f %f",u,g);x+=t(c,k);var T;for(T=0;T<p;T++)x+=t(d,k);for(x+=t(f,k),T=0;T<p;T++)x+=t(n,k);return x+=t(h,k)+"z",b(e,{path:x,highlight:"stroke",stroke:e.foregroundColor,class:e.controller.classes.generate("decoration"),"data-name":"glissando"})};return E0=l,E0}var A0,Oa;function wo(){if(Oa)return A0;Oa=1;var M=Le(),b=Fe(),v=Se();function l(i,o,s){o.pitch===void 0&&window.console.error("Crescendo Element y-coordinate not set.");var c=i.calcY(o.pitch)+4,f=8,h=o.anchor1?o.anchor1.x:0,d=o.anchor2?o.anchor2.x:800,n;return o.dir==="<"?n=r(i,c+f/2,c,c+f/2,c+f,h,d):n=r(i,c,c+f/2,c+f,c+f/2,h,d),s.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},n),[n]}var r=function(i,o,s,c,f,h,d){o=v(o),s=v(s),c=v(c),f=v(f),h=v(h),d=v(d);var n=M("M %f %f L %f %f M %f %f L %f %f",h,o,d,s,h,c,d,f);return b(i,{path:n,highlight:"stroke",stroke:i.foregroundColor,class:i.controller.classes.generate("dynamics decoration"),"data-name":"dynamics"})};return A0=l,A0}var P0,La;function Ir(){if(La)return P0;La=1;var M=Se();function b(){this.ingroup=!1}b.prototype.beginGroup=function(l,r){this.paper=l,this.controller=r,this.path=[],this.lastM=[0,0],this.ingroup=!0,this.paper.openGroup()},b.prototype.isInGroup=function(){return this.ingroup},b.prototype.addPath=function(l){if(l=l||[],l.length!==0){l[0][0]="m",l[0][1]=M(l[0][1]-this.lastM[0]),l[0][2]=M(l[0][2]-this.lastM[1]),this.lastM[0]+=l[0][1],this.lastM[1]+=l[0][2],this.path.push(l[0]);for(var r=1,i=l.length;r<i;r++)l[r][0]==="m"&&(this.lastM[0]+=l[r][1],this.lastM[1]+=l[r][2]),this.path.push(l[r])}},b.prototype.endGroup=function(l,r){this.ingroup=!1;for(var i="",o=0;o<this.path.length;o++)i+=this.path[o].join(" ");this.path=[];var s=this.paper.closeGroup();return s&&(s.setAttribute("class",this.controller.classes.generate(l)),s.setAttribute("fill",this.controller.renderer.foregroundColor),s.setAttribute("stroke","none"),s.setAttribute("data-name",r)),s};var v=new b;return P0=v,P0}var B0,ja;function Dr(){if(ja)return B0;ja=1;var M=Ne(),b=Be(),v=Ir();function l(i,o,s,c,f){var h,d;if(!c)return null;if(c.length>1&&c.indexOf(".")<0){var n=v.isInGroup()?"":f.klass;i.paper.openGroup({"data-name":f.name,klass:n});for(var t=0,a=0;a<c.length;a++){var e=c[a];d=b.getYCorr(e),h=b.printSymbol(o+t,i.calcY(s+d),e,i.paper,{stroke:f.stroke,fill:f.fill}),h?a<c.length-1&&(t+=r(e,c[a+1],b.getSymbolWidth(e))):M(i,{x:o,y:i.y,text:"no symbol:"+c,type:"debugfont",klass:"debug-msg",anchor:"start"},!1)}var u=i.paper.closeGroup();return u}else return d=b.getYCorr(c),v.isInGroup()?h=b.printSymbol(o,i.calcY(s+d),c,i.paper,{"data-name":f.name}):h=b.printSymbol(o,i.calcY(s+d),c,i.paper,{klass:f.klass,stroke:f.stroke,fill:f.fill,"data-name":f.name}),h||(M(i,{x:o,y:i.y,text:"no symbol:"+c,type:"debugfont",klass:"debug-msg",anchor:"start"},!1),null)}function r(i,o,s){var c=s;return i==="f"&&o==="f"&&(c=c*2/3),i==="p"&&o==="p"&&(c=c*5/6),i==="f"&&o==="z"&&(c=c*5/8),c}return B0=l,B0}var N0,Ia;function To(){if(Ia)return N0;Ia=1;var M=Dr();function b(v,l,r){l.pitch===void 0&&window.console.error("Dynamic Element y-coordinate not set.");var i=1,o=1,s=M(v,l.anchor.x,l.pitch,l.dec,{scalex:i,scaley:o,klass:v.controller.classes.generate("decoration dynamics"),fill:v.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:l.dec},s),[s]}return N0=b,N0}var O0,Da;function Co(){if(Da)return O0;Da=1;var M=Le(),b=Ne(),v=Fe(),l=Se();function r(s,c,f){s.paper.openGroup({klass:s.controller.classes.generate("triplet "+c.durationClass),"data-name":"triplet"}),c.hasBeam||o(s,c.anchor1.x,c.startNote,c.anchor2.x+c.anchor2.w,c.endNote),b(s,{x:c.xTextPos,y:s.calcY(c.yTextPos-1),text:""+c.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0,name:""+c.number},!0);var h=s.paper.closeGroup();return f.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},h),h}function i(s,c,f,h){return M("M %f %f L %f %f",l(s),l(c),l(f),l(h))}function o(s,c,f,h,d){f=s.calcY(f),d=s.calcY(d);var n=5,t="";t+=i(c,f,c,f+n),t+=i(h,d,h,d+n);var a=c+(h-c)/2,e=8,u=(d-f)/(h-c),g=a-e,p=f+(g-c)*u;t+=i(c,f,g,p);var k=a+e,x=f+(k-c)*u;t+=i(k,x,h,d),v(s,{path:t,stroke:s.foregroundColor,"data-name":"triplet-bracket"})}return O0=r,O0}var L0,za;function Mo(){if(za)return L0;za=1;var M=Le(),b=Ne(),v=Fe(),l=Se();function r(i,o,s,c,f){o.pitch===void 0&&window.console.error("Ending Element y-coordinate not set.");var h=l(i.calcY(o.pitch)),d=20,n="";o.anchor1&&(s=l(o.anchor1.x+o.anchor1.w),n+=M("M %f %f L %f %f ",s,h,s,l(h+d))),o.anchor2&&(c=l(o.anchor2.x),n+=M("M %f %f L %f %f ",c,h,c,l(h+d))),n+=M("M %f %f L %f %f ",s,h,c,h),i.paper.openGroup({klass:i.controller.classes.generate("ending"),fill:i.foregroundColor,"data-name":"ending"}),v(i,{path:n,stroke:i.foregroundColor,fill:i.foregroundColor,"data-name":"line"}),o.anchor1&&b(i,{x:l(s+5),y:l(i.calcY(o.pitch-.5)),text:o.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:o.text});var t=i.paper.closeGroup();return f.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},t),[t]}return L0=r,L0}var j0,Fa;function So(){if(Fa)return j0;Fa=1;var M=Le(),b=Se();function v(i,o,s,c,f){l(o,s,c);var h="";o.anchor1?h+="abcjs-start-m"+o.anchor1.parent.counters.measure+"-n"+o.anchor1.parent.counters.note:h+="abcjs-start-edge",o.anchor2?h+=" abcjs-end-m"+o.anchor2.parent.counters.measure+"-n"+o.anchor2.parent.counters.note:h+=" abcjs-end-edge",o.hint&&(h="abcjs-hint");var d=o.fixedY?1.5:0,n=r(i,o.startX,o.endX,o.startY+d,o.endY+d,o.above,h,o.isTie,o.dotted),t=-1;o.anchor1&&!o.isTie&&(t=o.anchor1.parent.abcelem.startChar-1);var a=-1;return o.anchor2&&!o.isTie&&(a=o.anchor2.parent.abcelem.endChar+1),f.wrapSvgEl({el_type:"slur",startChar:t,endChar:a},n),[n]}var l=function(i,o,s){!i.anchor1||!i.anchor2||i.anchor1.pitch===i.anchor2.pitch&&i.internalNotes.length===0?i.isTie=!0:i.isTie=!1,i.isTie?(i.calcTieDirection(),i.calcX(o,s),i.calcTieY()):(i.calcSlurDirection(),i.calcX(o,s),i.calcSlurY()),i.avoidCollisionAbove()},r=function(i,o,s,c,f,h,d,n,t){var a=n?1.2:1.5;o=b(o+6),s=b(s+4),c=c+(h?a:-a),f=f+(h?a:-a);var e=b(i.calcY(c)),u=b(i.calcY(f)),g=s-o,p=u-e,k=Math.sqrt(g*g+p*p),x=g/k,T=p/k,j=k/3.5,O=n?10:25,m=(h?-1:1)*Math.min(O,Math.max(4,j)),E=b(o+j*x-m*T),P=b(e+j*T+m*x),A=b(s-j*x-m*T),N=b(u-j*T+m*x),D=2;d?d+=" slur":d="slur",d+=n?" tie":" legato";var _;if(t){d+=" dotted";var S=M("M %f %f C %f %f %f %f %f %f",o,e,E,P,A,N,s,u);_=i.paper.path({path:S,stroke:i.foregroundColor,fill:"none","stroke-dasharray":"5 5",class:i.controller.classes.generate(d),"data-name":n?"tie":"slur"})}else{var B=M("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",o,e,E,P,A,N,s,u,b(A-D*T),b(N+D*x),b(E-D*T),b(P+D*x),o,e);_=i.paper.path({path:B,stroke:"none",fill:i.foregroundColor,class:i.controller.classes.generate(d),"data-name":n?"tie":"slur"})}return _};return j0=v,j0}var I0,Ha;function _o(){if(Ha)return I0;Ha=1;var M=Fe(),b=Se();function v(o,s){if(s.beams.length!==0){for(var c="",f=0;f<s.beams.length;f++){var h=s.beams[f];if(h.split){for(var d=r(o,h.startX,h.startY,h.endX,h.endY),n=[],t=0;t<h.split.length;t+=2)n.push([h.split[t],h.split[t+1]]);for(t=0;t<n.length;t++){var a=i(h.startX,h.startY,d,n[t][0]),e=i(h.startX,h.startY,d,n[t][1]);c+=l(o,n[t][0],a,n[t][1],e,h.dy)}}else c+=l(o,h.startX,h.startY,h.endX,h.endY,h.dy)}var u=("abcjs-d"+s.duration).replace(/\./g,"-"),g=o.controller.classes.generate("beam-elem "+u),p=M(o,{path:c,stroke:"none",fill:o.foregroundColor,class:g});return[p]}}function l(o,s,c,f,h,d){c=b(o.calcY(c)),h=b(o.calcY(h)),s=b(s),f=b(f);var n=b(c+d),t=b(h+d);return"M"+s+" "+c+" L"+f+" "+h+"L"+f+" "+t+" L"+s+" "+n+"z"}function r(o,s,c,f,h){return(h-c)/(f-s)}function i(o,s,c,f){var h=f-o;return s+h*c}return I0=v,I0}var D0,Ga;function zr(){if(Ga)return D0;Ga=1;var M=Ir(),b=Se();function v(l,r,i,o,s,c,f){if(i<0||o<s){var h=b(s);s=b(o),o=h}else o=b(o),s=b(s);r=b(r);var d=b(r+i);if(l.firefox112){r+=i/2;var n={x1:r,x2:r,y1:o,y2:s,stroke:l.foregroundColor,"stroke-width":Math.abs(i)};return c&&(n.class=c),f&&(n["data-name"]=f),l.paper.lineToBack(n)}for(var t=[["M",r,o],["L",r,s],["L",d,s],["L",d,o],["z"]],n={path:""},a=0;a<t.length;a++)n.path+=t[a].join(" ");return c&&(n.class=c),f&&(n["data-name"]=f),M.isInGroup()||(n.stroke="none",n.fill=l.foregroundColor),l.paper.pathToBack(n)}return D0=v,D0}var z0,Va;function Eo(){if(Va)return z0;Va=1;var M=Le(),b=Se();function v(l,r,i,o,s,c,f){var h=l.foregroundColor;r=b(r),i=b(i);var d=b(o-f),n=b(o+f);if(l.firefox112){o+=f/2;var t={x1:r,x2:i,y1:o,y2:o,stroke:l.foregroundColor,"stroke-width":Math.abs(f*2)};return s&&(t.class=s),c&&(t["data-name"]=c),l.paper.lineToBack(t)}var a=M("M %f %f L %f %f L %f %f L %f %f z",r,d,i,d,i,n,r,n),e={path:a,stroke:"none",fill:h};c&&(e["data-name"]=c),s&&(e.class=s);var u=l.paper.pathToBack(e);return u}return z0=v,z0}var F0,Ya;function Zi(){if(Ya)return F0;Ya=1;var M=Eo();function b(v,l,r,i,o,s,c){var f=v.calcY(i);return M(v,l,r,f,o,s,c)}return F0=b,F0}var H0,Wa;function es(){if(Wa)return H0;Wa=1;var M=Ne(),b=zr(),v=Zi(),l=Dr();function r(o,s,c){s.pitch===void 0&&window.console.error(s.type+" Relative Element y-coordinate not set.");var f=o.calcY(s.pitch);switch(s.type){case"symbol":if(s.c===null)return null;var h="symbol";s.klass&&(h+=" "+s.klass),s.graphelem=l(o,s.x,s.pitch,s.c,{scalex:s.scalex,scaley:s.scaley,klass:o.controller.classes.generate(h),name:s.name});break;case"debug":s.graphelem=M(o,{x:s.x,y:o.calcY(15),text:""+s.c,type:"debugfont",klass:o.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:s.dim},!1);break;case"tabNumber":var d="middle",n="tabnumberfont",t="abcjs-tab-number";s.isGrace&&(n="tabgracefont",f+=2.5,t="tab-grace"),s.graphelem=M(o,{x:s.x,y:f,text:""+s.c,type:n,klass:o.controller.classes.generate(t),anchor:d,centerVertically:!1,dim:s.dim,cursor:"default"},!1);break;case"barNumber":s.graphelem=M(o,{x:s.x,y:f,text:""+s.c,type:"measurefont",klass:o.controller.classes.generate("bar-number"),anchor:"middle",dim:s.dim,name:"bar-number"},!0);break;case"lyric":s.graphelem=M(o,{x:s.x,y:f,text:s.c,type:"vocalfont",klass:o.controller.classes.generate("lyric"),anchor:"middle",dim:s.dim,name:"lyric"},!1);break;case"chord":s.graphelem=M(o,{x:s.x,y:f,text:s.c,type:"gchordfont",klass:o.controller.classes.generate("chord"),anchor:"middle",dim:s.dim,lane:s.getLane(),name:"chord"},!1);break;case"decoration":s.graphelem=M(o,{x:s.x,y:f+6,text:s.c,type:"annotationfont",klass:o.controller.classes.generate("annotation"),anchor:s.anchor,centerVertically:!0,dim:s.dim},!1);break;case"text":s.graphelem=M(o,{x:s.x,y:f,text:s.c,type:"annotationfont",klass:o.controller.classes.generate("annotation"),anchor:"start",centerVertically:s.centerVertically,dim:s.dim,lane:s.getLane(),name:"annotation"},!1);break;case"multimeasure-text":s.graphelem=M(o,{x:s.x+s.w/2,y:f,text:s.c,type:"tempofont",klass:o.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:s.dim},!1);break;case"part":s.graphelem=M(o,{x:s.x,y:f,text:s.c,type:"partsfont",klass:o.controller.classes.generate("part"),anchor:"start",dim:s.dim,name:s.c},!0);break;case"bar":s.graphelem=b(o,s.x,s.linewidth+o.lineThickness,f,c||o.calcY(s.pitch2),null,"bar");break;case"stem":var a=s.linewidth>0?s.linewidth+o.lineThickness:s.linewidth-o.lineThickness;s.graphelem=b(o,s.x,a,f,o.calcY(s.pitch2),"abcjs-stem","stem");break;case"ledger":s.graphelem=v(o,s.x,s.x+s.w,s.pitch,"abcjs-ledger","ledger",.35+o.lineThickness);break}return s.scalex!==1&&s.graphelem&&i(o.paper,s.graphelem,s.scalex,s.scaley,s.x,f),s.graphelem}function i(o,s,c,f,h,d){o.setAttributeOnElement(s,{style:"transform:scale("+c+","+f+");transform-origin:"+h+"px "+d+"px;"})}return H0=r,H0}var G0,Ra;function Ao(){if(Ra)return G0;Ra=1;var M=es(),b=Ne();function v(l,r){var i=r.x;r.pitch===void 0&&window.console.error("Tempo Element y-coordinate not set."),r.tempo.el_type="tempo";var o=l.calcY(r.pitch)+2,s,c;if(r.tempo.preString){s=b(l,{x:i,y:o,text:r.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0),c=l.controller.getTextSize.calc(r.tempo.preString,"tempofont","tempo",s);var f=c.width,h=f/r.tempo.preString.length;i+=f+h}if(r.note){r.note.setX(i);for(var d=0;d<r.note.children.length;d++)M(l,r.note.children[d],i);i+=r.note.w+5;var n="= "+r.tempo.bpm;s=b(l,{x:i,y:o,text:n,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"beats"}),c=l.controller.getTextSize.calc(n,"tempofont","tempo",s);var t=c.width,a=t/n.length;i+=t+a}r.tempo.postString&&b(l,{x:i,y:o,text:r.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"post"},!0)}return G0=v,G0}var V0,qa;function Po(){if(qa)return V0;qa=1;var M=Ao(),b=es(),v=we(),l=Or(),r=Ir();function i(o,s,c,f,h){if(!s.invisible){var d=s.children.length>0&&s.children[0].type==="TempoElement";s.elemset=[],r.beginGroup(o.paper,o.controller);for(var n=0;n<s.children.length;n++){var t=s.children[n];switch(t.type){case"TempoElement":M(o,t);break;default:var a=b(o,t,c);t.type==="symbol"&&t.c&&t.c.indexOf("notehead")>=0&&a.setAttribute("class","abcjs-notehead")}}var e=s.type;if((s.type==="note"||s.type==="rest")&&(s.counters=o.controller.classes.getCurrent(),e+=" d"+Math.round(s.durationClass*1e3)/1e3,e=e.replace(/\./g,"-"),s.abcelem.pitches))for(var u=0;u<s.abcelem.pitches.length;u++)e+=" p"+s.abcelem.pitches[u].pitch;var g=r.endGroup(e,s.type);if(g){if(s.cloned&&(s.cloned.overrideClasses=g.className.baseVal),s.overrideClasses){var p=g.classList&&g.classList.length>0?g.classList[0]+" ":"";g.setAttribute("class",p+s.overrideClasses)}if(d)s.startChar=s.abcelem.startChar,s.endChar=s.abcelem.endChar,f.add(s,g,!1,h);else{s.elemset.push(g);var k=!1;(s.type==="note"||s.type==="tabNumber")&&(k=!0),f.add(s,g,k,h)}}else s.elemset.length>0&&f.add(s,s.elemset[0],s.type==="note",h);if(s.klass&&l(s.elemset,"mark","","#00ff00"),s.hint&&l(s.elemset,"abcjs-hint","",null),s.abcelem.abselem=s,s.heads&&s.heads.length>0){s.notePositions=[];for(var x=0;x<s.heads.length;x++)s.notePositions.push({x:s.heads[x].x+s.heads[x].w/2,y:h.zero-s.heads[x].pitch*v.STEP})}}}return V0=i,V0}var Y0,Ua;function Bo(){if(Ua)return Y0;Ua=1;var M=xo(),b=wo(),v=To(),l=Co(),r=Mo(),i=So(),o=_o(),s=Ne(),c=Po();function f(d,n,t,a,e){var u=n.w-1;d.staffbottom=n.staff.bottom;var g=d.foregroundColor;if(n.color&&(d.foregroundColor=n.color),n.header){var p=s(d,{x:d.padding.left,y:d.calcY(n.headerPosition),text:n.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0,name:"voice-name"},!0);a.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:n.header},p)}var k,x,T=!1;for(k=0;k<n.children.length;k++){x=n.children[k],(x.type==="note"||x.type==="rest")&&(T=!0);var j=!1;x.type!=="staff-extra"&&!d.controller.classes.isInMeasure()&&(d.controller.classes.startMeasure(),j=!0),n.staff.isTabStaff&&(x.invisible=!1,x.type=="bar"&&x.abcelem.lastBar&&(t=n.topLine)),c(d,x,n.barto||k===n.children.length-1?t:0,a,e),(x.type==="note"||h(x))&&d.controller.classes.incrNote(),x.type==="bar"&&!j&&T&&d.controller.classes.incrMeasure()}for(d.controller.classes.startMeasure(),k=0;k<n.beams.length;k++){var O=n.beams[k];O==="bar"?d.controller.classes.incrMeasure():o(d,O,a)}for(d.controller.classes.startMeasure(),k=0;k<n.otherchildren.length;k++)if(x=n.otherchildren[k],x==="bar")d.controller.classes.incrMeasure();else switch(x.type){case"GlissandoElem":x.elemset=M(d,x,a);break;case"CrescendoElem":x.elemset=b(d,x,a);break;case"DynamicDecoration":x.elemset=v(d,x,a);break;case"TripletElem":l(d,x,a);break;case"EndingElem":x.elemset=r(d,x,n.startx+10,u,a);break;case"TieElem":x.elemset=i(d,x,n.startx+10,u,a);break;default:console.log(x),c(d,x,n.startx+10,u,a,e)}d.foregroundColor=g}function h(d){return d.type!=="rest"?!1:!!(d.abcelem&&d.abcelem.rest&&d.abcelem.rest.type!=="spacer")}return Y0=f,Y0}var W0,Xa;function No(){if(Xa)return W0;Xa=1;var M=Zi();function b(v,l,r,i,o,s){var c="abcjs-top-line",f=2;o&&(f=o),v.paper.openGroup({prepend:!0,klass:v.controller.classes.generate("abcjs-staff")});var h=0,d=0;if(i===1)M(v,l,r,6,c,null,s+v.lineThickness),h=v.calcY(10),d=v.calcY(2);else for(var n=i-1;n>=0;n--){var t=(n+1)*f;d=v.calcY(t),h===0&&(h=d),M(v,l,r,t,c,null,s+v.lineThickness),c=void 0}return v.paper.closeGroup(),[h,d]}return W0=b,W0}var R0,Ka;function Oo(){if(Ka)return R0;Ka=1;function M(b,v,l){var r=b.paper.rectBeneath(v);return l&&b.paper.text(l,{x:0,y:v.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),r}return R0=M,R0}var q0,$a;function Lo(){if($a)return q0;$a=1;function M(b,v){var l="rgba(0,0,0,255)",r="rgba(0,0,0,0)",i=Math.round(b.y),o=b.controller.width,s=(o-v)/2,c=s+v,f="M "+s+" "+i+" L "+c+" "+i+" L "+c+" "+(i+1)+" L "+s+" "+(i+1)+" L "+s+" "+i+" z";b.paper.pathToBack({path:f,stroke:r,fill:l,class:b.controller.classes.generate("defined-text")})}return q0=M,q0}var U0,Qa;function ts(){if(Qa)return U0;Qa=1;var M=Lo(),b=Ne();function v(l,r,i){for(var o=0;o<r.rows.length;o++){var s=r.rows[o];if(s.absmove)l.absolutemoveY(s.absmove);else if(s.move)l.moveY(s.move);else if(s.text||s.phrases){var c=s.left?s.left:0,f=b(l,{x:c,y:l.y,text:s.text,phrases:s.phrases,"dominant-baseline":s["dominant-baseline"],type:s.font,klass:s.klass,name:s.name,anchor:s.anchor});s.absElemType&&i.wrapSvgEl({el_type:s.absElemType,name:s.name,startChar:s.startChar,endChar:s.endChar,text:s.text},f)}else if(s.separator)M(l,s.separator);else if(s.startGroup)l.paper.openGroup({klass:s.klass,"data-name":s.name});else if(s.endGroup){var h=l.paper.closeGroup();s.absElemType&&i.wrapSvgEl({el_type:s.absElemType,name:s.name,startChar:s.startChar,endChar:s.endChar,text:""},h)}}}return U0=v,U0}var X0,Ja;function jo(){if(Ja)return X0;Ja=1;var M=we(),b=ko(),v=Bo(),l=No(),r=Oo(),i=zr(),o=ts();function s(h,d,n,t){for(var a,e=h.y,u=0;u<d.staffs.length;u++){var g=d.staffs[u];h.moveY(M.STEP,g.top),g.absoluteY=h.y,h.showDebug&&(h.showDebug.indexOf("box")>=0&&g.voices&&f(h,d.voices,g.voices),h.showDebug.indexOf("grid")>=0&&(h.paper.dottedLine({x1:h.padding.left,x2:h.padding.left+h.controller.width,y1:e,y2:e,stroke:"#0000ff"}),r(h,{x:h.padding.left,y:h.calcY(g.originalTop),width:h.controller.width,height:h.calcY(g.originalBottom)-h.calcY(g.originalTop),fill:h.foregroundColor,stroke:h.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),a=0,_(g,"chordHeightAbove"),_(g,"chordHeightBelow"),_(g,"dynamicHeightAbove"),_(g,"dynamicHeightBelow"),_(g,"endingHeightAbove"),_(g,"lyricHeightAbove"),_(g,"lyricHeightBelow"),_(g,"partHeightAbove"),_(g,"tempoHeightAbove"),_(g,"volumeHeightAbove"),_(g,"volumeHeightBelow"))),h.moveY(M.STEP,-g.bottom),h.showDebug&&h.showDebug.indexOf("grid")>=0&&h.paper.dottedLine({x1:h.padding.left,x2:h.padding.left+h.controller.width,y1:h.y,y2:h.y,stroke:"#0000aa"})}for(var p,k,x=2,T=0,j=0;j<d.voices.length;j++){var O=d.voices[j].staff,m=d.voices[j].tabNameInfos;if(h.y=O.absoluteY,h.controller.classes.incrVoice(),!d.voices[j].duplicate){if(p||(p=h.calcY(10)),k=h.calcY(x),O.lines!==0){O.linePitch&&(x=O.linePitch),h.controller.classes.newMeasure();var E=l(h,d.startx,d.w,O.lines,O.linePitch,.35);k=E[1],O.bottomLine=k,O.topLine=E[0],O.hasTab&&(T=O.topLine),O.hasStaff&&(T=O.hasStaff.topLine,d.voices[j].barto=!0,d.voices[j].topLine=p)}c(h,O.absoluteY,d.brace,j,n),c(h,O.absoluteY,d.bracket,j,n)}v(h,d.voices[j],T,n,{top:e,zero:h.y,height:d.height*M.STEP});var P=0;if(m){var A={rows:[]};A.rows.push({absmove:k+2});var N=8;A.rows.push({left:d.startx+N,text:m.name,font:"tablabelfont",klass:"text instrument-name",anchor:"start"}),A.rows.push({move:m.textSize.height}),o(h,A),P=m.textSize.height}h.controller.classes.newMeasure(),d.voices[j].duplicate||(T=h.calcY(2+P))}h.controller.classes.newMeasure();var D=d.staffs.length;D>1&&(p=d.staffs[0].topLine,k=d.staffs[D-1].bottomLine,i(h,d.startx,.6,p,k,null)),h.y=e;function _(S,B){var I=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(S.positionY&&S.positionY[B]){var z=S.specialY[B]*M.STEP;B==="chordHeightAbove"&&S.specialY.chordLines&&S.specialY.chordLines.above&&(z*=S.specialY.chordLines.above),B==="chordHeightBelow"&&S.specialY.chordLines&&S.specialY.chordLines.below&&(z*=S.specialY.chordLines.below),r(h,{x:h.padding.left,y:h.calcY(S.positionY[B]),width:h.controller.width,height:z,fill:I[a],stroke:I[a],"fill-opacity":.4,"stroke-opacity":.4},B.substr(0,4)),a+=1,a>6&&(a=0)}}}function c(h,d,n,t,a){if(n)for(var e=0;e<n.length;e++)n[e].isStartVoice(t)&&(n[e].startY=d-M.STEP*10,n[e].elemset=b(h,n[e],a))}function f(h,d,n){for(var t=0;t<n.length;t++)for(var a=d[n[t]].children,e=0;e<a.length;e++){var u=a[e],g=u.getFixedCoords();if(!(u.invisible||g.t===void 0||g.b===void 0)){var p=(g.t-g.b)*M.STEP;r(h,{x:g.x,y:h.calcY(g.t),width:g.w,height:p,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var k=0;k<u.children.length;k++){var x=u.children[k],T=x.getChordDim();if(T){var j=h.calcY(x.pitch);j+=x.dim.font.size*x.getLane(),r(h,{x:T.left,y:j,width:T.right-T.left,height:x.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}return X0=s,X0}var K0,Za;function Io(){if(Za)return K0;Za=1;function M(b,v,l,r){var i=(v+b.padding.left+b.padding.right)*l,o=(b.y+b.padding.bottom)*l;if(b.isPrint&&(o=Math.max(o,1056)),b.ariaLabel!==""){var s="Sheet Music";b.abctune&&b.abctune.metaText&&b.abctune.metaText.title&&(s+=' for "'+b.abctune.metaText.title+'"'),b.paper.setTitle(s);var c=b.ariaLabel?b.ariaLabel:s;b.paper.setAttribute("aria-label",c)}var f=["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"];b.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+f.join(" ")+"}");var h={overflow:"hidden"};r==="resize"?b.paper.setResponsiveWidth(i,o):(h.width="",h.height=o+"px",l<1?(h.width=i+"px",b.paper.setSize(i/l,o/l)):b.paper.setSize(i,o)),b.paper.setScale(l),b.paper.setParentStyles(h)}return K0=M,K0}var $0,ei;function Do(){if(ei)return $0;ei=1;var M=Wi(),b=Ri();function v(l,r,i){this.elements=[],this.paper=l,this.tuneNumber=i,this.selectTypes=r}return v.prototype.getElements=function(){return this.elements},v.prototype.add=function(l,r,i,o){if(this.canSelect(l)){var s;this.selectTypes===void 0?s={selectable:!1,"data-index":this.elements.length}:s={selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(r,s);var c={absEl:l,svgEl:r,isDraggable:i};o!==void 0&&(c.staffPos=o),this.elements.push(c)}},v.prototype.canSelect=function(l){return this.selectTypes===!1||!l||!l.abcelem?!1:this.selectTypes===!0?!0:this.selectTypes===void 0?l.abcelem.el_type==="note"||l.abcelem.el_type==="tabNumber":this.selectTypes.indexOf(l.abcelem.el_type)>=0},v.prototype.wrapSvgEl=function(l,r){var i={tuneNumber:this.tuneNumber,abcelem:l,elemset:[r],highlight:M,unhighlight:b};this.add(i,r,!1)},$0=v,$0}var Q0,ti;function zo(){if(ti)return Q0;ti=1;const M=Dr(),b=zr();function v(p,k,x,T,j){const O=j.gchordfont;j.partsfont;const m=j.annotationfont,E=j.repeatfont,P=j.textfont,A=j.subtitlefont,N=50,D=10,_=14,S=10,B=20,I=16;k.forEach(z=>{switch(z.type){case"text":g(p,z.text,x,p.y,16,P,null,null,!1),p.moveY(I);break;case"subtitle":g(p,z.subtitle,x,p.y+S,20,A,null,"abcjs-subtitle",!1),p.moveY(B);break;case"part":if(z.lines.length>0){g(p,z.name,x,p.y+S,20,A,z.name,"abcjs-part",!1),p.moveY(B);const y=z.lines[0].length,w=T/y;z.lines.forEach((C,L)=>{let F=!1,V=!1;C.forEach(U=>{U.ending&&(F=!0),U.annotations&&U.annotations.length>0&&(V=!0)});const H=V?_:F?D:0;C.forEach((U,Q)=>{if(!U.noBorder){p.paper.rect({x:x+Q*w,y:p.y,width:w,height:H+N}),p.paper.rect({x:x+Q*w+1,y:p.y+1,width:w-2,height:H+N-2});let R=0,te=0;const ee=p.y,se=x+w*Q;U.hasStartRepeat&&(r(p,se,ee,ee+N+H,!0,H),R=12),U.hasEndRepeat&&(r(p,se+w,ee,ee+N+H,!1,H),te=12);let X=0;U.ending&&(X=g(p,U.ending,x+Q*w+4,ee+10,12,E,null,null,!1).getBBox().width+4),s(p,ee,x+R,w,L,Q,U.chord,O,R+te,N,H),U.annotations&&U.annotations.length>0&&o(p,ee,x+Q*w+X,U.annotations,m),H&&p.paper.rectBeneath({x:x+Q*w,y:p.y,width:w,height:H,fill:"#e8e8e8",stroke:"none"})}}),p.moveY(H+N)}),p.moveY(B)}break}})}function l(p,k,x,T){var j=k-10,O=k+10,m=x+10,E=x-10,P=k-10,A=-p.yToPitch(T)+2,N=k+6.5,D=-p.yToPitch(T)-2.3;p.paper.lineToBack({x1:j,x2:O,y1:m,y2:E,"stroke-width":"3px","stroke-linecap":"round"}),M(p,P,A,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),M(p,N,D,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"})}function r(p,k,x,T,j,O){const m=j?k+2:k-4,E=j?k+9:k-11;p.paper.openGroup({klass:"abcjs-repeat"}),b(p,m,3+p.lineThickness,x,T,null,"bar"),M(p,E,-p.yToPitch(O)-4,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),M(p,E,-p.yToPitch(O)-8,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),p.paper.closeGroup()}const i={segno:"scripts.segno",coda:"scripts.coda",fermata:"scripts.ufermata"};function o(p,k,x,T,j){x+=3;let O;for(let m=0;m<T.length;m++)switch(T[m]){case"segno":case"coda":case"fermata":{x+=12,O=M(p,x,-3,i[T[m]],{scalex:1,scaley:1,name:i[T[m]]});const E=O.getBBox();x+=E.width}break;default:g(p,T[m],x,k+12,12,j,null,null,!1)}}function s(p,k,x,T,j,O,m,E,P,A,N){const D=x+T*O;!m[1]&&!m[2]&&!m[3]?t(p,D,k+N,T-P,A,m[0],E,N):!m[1]&&!m[3]?a(p,D,k,T-P,A,m[0],m[2],E,N):e(p,D,k,T-P,A,m,E,N)}function c(p,k,x,T,j,O,m){const E=g(p,j,k,x,T,O,null,"abcjs-chord",!0);let P=E.getBBox(),A=T;for(;P.width>m&&A>=14;)A-=2,E.setAttribute("font-size",A),P=E.getBBox()}const f=34,h=26,d=20,n=-3;function t(p,k,x,T,j,O,m,E){O==="%"?l(p,k+T/2,x+j/2,E+j/2):c(p,k+T/2,x+j/2+n,f,O,m,T)}function a(p,k,x,T,j,O,m,E,P){p.paper.lineToBack({x1:k,x2:k+T,y1:x+j+P,y2:x+2}),c(p,k+T/4,x+j/4+5+P+n,h,O,E,T/2),c(p,k+3*T/4,x+3*j/4+P+n,h,m,E,T/2)}function e(p,k,x,T,j,O,m,E){p.paper.lineToBack({x1:k+3,x2:k+T-3,y1:x+j/2+E,y2:x+j/2+E}),p.paper.lineToBack({x1:k+T/2,x2:k+T/2,y1:x+3+E,y2:x+j-3+E}),O[0]&&c(p,k+T/4,x+j/4+2+E+n,d,u(O[0]),m,T/2),O[1]&&c(p,k+3*T/4,x+j/4+2+E+n,d,u(O[1]),m,T/2),O[2]&&c(p,k+T/4,x+3*j/4+E+n,d,u(O[2]),m,T/2),O[3]&&c(p,k+3*T/4,x+3*j/4+E+n,d,u(O[3]),m,T/2)}function u(p){return p==="No Chord"?"N.C.":p}function g(p,k,x,T,j,O,m,E,P){const A={x,y:T,stroke:"none","font-size":j,"font-style":O.style,"font-family":O.face,"font-weight":O.weight,"text-decoration":O.decoration};return m&&(A["data-name"]=m),E&&(A.class=E),A["text-anchor"]=P?"middle":"start",p.paper.text(k,A,null,{"alignment-baseline":"middle"})}return Q0=v,Q0}var J0,ri;function Fo(){if(ri)return J0;ri=1;var M=jo(),b=Io(),v=ts(),l=we(),r=Do(),i=zo();function o(f,h,d,n,t,a,e,u,g,p,k){var x=new r(f.paper,u,g),T={};h.shouldAddClasses&&(T.klass="abcjs-meta-top"),f.paper.openGroup(T),f.moveY(f.padding.top),v(f,d.topText,x),f.paper.closeGroup(),f.moveY(f.spacing.music);let j=!1;k&&d.chordGrid&&(i(f,d.chordGrid,f.padding.left,n,d.formatting),k==="noMusic"&&(j=!0));var O=[],m=0;if(!j)for(var E=0;E<d.lines.length;E++){h.incrLine();var P=d.lines[E];if(P.staff){if(m++,d.formatting.maxStaves&&m>d.formatting.maxStaves)break;h.shouldAddClasses&&(T.klass="abcjs-staff-wrapper abcjs-l"+h.lineNumber),f.paper.openGroup(T),P.vskip&&f.moveY(P.vskip),O.length>=1&&c(f,f.spacing.staffSeparation,O[O.length-1],P.staffGroup);var A=s(f,P.staffGroup,x,E);A.line=p+E,O.push(A),f.paper.closeGroup()}else P.nonMusic&&(h.shouldAddClasses&&(T.klass="abcjs-non-music"),f.paper.openGroup(T),v(f,P.nonMusic,x),f.paper.closeGroup())}return h.reset(),j||d.bottomText&&d.bottomText.rows&&d.bottomText.rows.length>0&&(h.shouldAddClasses&&(T.klass="abcjs-meta-bottom"),f.paper.openGroup(T),f.moveY(24),v(f,d.bottomText,x),f.paper.closeGroup()),b(f,t,e,a),{staffgroups:O,selectables:x.getElements()}}function s(f,h,d,n){M(f,h,d,n);var t=h.height*l.STEP;return f.y+=t,h}function c(f,h,d,n){var t=d.staffs[d.staffs.length-1],a=-(t.bottom-2),e=n.staffs[0].top-10,u=e+a,g=u*l.STEP;g<h&&f.moveY(h-g)}return J0=o,J0}var Z0,ni;function Ho(){if(ni)return Z0;ni=1;var M=Qi();function b(v){for(var l=v;l&&l.attributes&&l.tagName.toLowerCase()!=="svg"&&!l.attributes.selectable;)l=l.parentNode;if(l&&l.attributes&&l.attributes.selectable){var r=l.attributes["data-index"].nodeValue;if(r&&(r=parseInt(r,10),r>=0&&r<this.selectables.length)){var i=this.selectables[r],o=M(i,v);return o.index=r,o.element=i,o}}return null}return Z0=b,Z0}var er,ai;function rs(){if(ai)return er;ai=1;var M=we(),b=Zs(),v=to(),l=ro(),r=no(),i=ao(),o=io(),s=so(),c=oo(),f=go(),h=vo(),d=bo(),n=yo(),t=Fo(),a=Xi(),e=Ho(),u=function(k,x){x=x||{},this.findSelectableElement=e,this.oneSvgPerLine=x.oneSvgPerLine,this.selectionColor=x.selectionColor,this.dragColor=x.dragColor?x.dragColor:x.selectionColor,this.dragging=!!x.dragging,this.selectTypes=x.selectTypes,this.responsive=x.responsive,this.space=3*M.SPACE,this.initialClef=x.initialClef,this.timeBasedLayout=x.timeBasedLayout,this.expandToWidest=!!x.expandToWidest,this.scale=x.scale?parseFloat(x.scale):0,this.classes=new h({shouldAddClasses:x.add_classes}),this.scale>.1||(this.scale=void 0),x.staffwidth?(this.staffwidthScreen=x.staffwidth,this.staffwidthPrint=x.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],x.clickListener&&this.addSelectListener(x.clickListener),this.renderer=new v(k),this.renderer.setPaddingOverride(x),x.showDebug&&(this.renderer.showDebug=x.showDebug),x.jazzchords&&(this.jazzchords=x.jazzchords),x.accentAbove&&(this.accentAbove=x.accentAbove),x.germanAlphabet&&(this.germanAlphabet=x.germanAlphabet),x.lineThickness&&(this.lineThickness=x.lineThickness),x.chordGrid&&(this.chordGrid=x.chordGrid),this.renderer.controller=this,this.renderer.foregroundColor=x.foregroundColor?x.foregroundColor:"currentColor",x.ariaLabel!==void 0&&(this.renderer.ariaLabel=x.ariaLabel),this.renderer.minPadding=x.minPadding?x.minPadding:0,this.reset()};u.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0,this.lineThickness&&this.renderer.setLineThickness(this.lineThickness)},u.prototype.engraveABC=function(k,x,T){k[0]===void 0&&(k=[k]),this.reset();for(var j=0;j<k.length;j++)x===void 0&&(x=j),this.getFontAndAttr=new d(k[j].formatting,this.classes),this.getTextSize=new n(this.getFontAndAttr,this.renderer.paper),this.engraveTune(k[j],x,T)},u.prototype.adjustNonScaledItems=function(k){this.width/=k,this.renderer.adjustNonScaledItems(k)},u.prototype.getMeasureWidths=function(k){this.reset(),this.getFontAndAttr=new d(k.formatting,this.classes),this.getTextSize=new n(this.getFontAndAttr,this.renderer.paper);var x=this.jazzchords;this.setupTune(k,0),this.constructTuneElements(k),f(this.renderer,k,0,this.space,this.timeBasedLayout);for(var T=[],j,O=!0,m=0;m<k.lines.length;m++){var E=k.lines[m];if(E.staff){if(O&&(j={left:0,measureWidths:[],total:0},T.push(j),O=!1),E.staffGroup.voices.length>0)for(var P=E.staffGroup.voices[0],A=!1,N=0,D=0;D<P.children.length;D++){var _=P.children[D];!A&&!_.isClef&&!_.isKeySig&&(A=!0,j.left=_.x,N=_.x),_.type==="bar"&&(j.measureWidths.push(_.x-N),j.total+=_.x-N,N=_.x)}}else O=!0}return this.jazzchords=x,T},u.prototype.setupTune=function(k,x){this.classes.reset(),k.formatting.jazzchords!==void 0&&(this.jazzchords=k.formatting.jazzchords),k.formatting.accentAbove!==void 0&&(this.accentAbove=k.formatting.accentAbove),this.renderer.newTune(k),this.engraver=new b(this.getTextSize,x,{bagpipes:k.formatting.bagpipes,flatbeams:k.formatting.flatbeams,graceSlurs:k.formatting.graceSlurs!==!1,percmap:k.formatting.percmap,initialClef:this.initialClef,jazzchords:this.jazzchords,timeBasedLayout:this.timeBasedLayout,accentAbove:this.accentAbove,germanAlphabet:this.germanAlphabet}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=k.getMeterFraction().num/k.getMeterFraction().den,k.formatting.staffwidth?this.width=k.formatting.staffwidth*1.33:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var T=k.formatting.scale?k.formatting.scale:this.scale;return this.responsive==="resize"&&(T=void 0),T===void 0&&(T=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(T),T},u.prototype.constructTuneElements=function(k){k.topText=new o(k.metaText,k.metaTextInfo,k.formatting,k.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize);var x,T,j=!1,O=!1;for(x=0;x<k.lines.length;x++)if(T=k.lines[x],T.staff)O=!0,T.staffGroup=this.engraver.createABCLine(T.staff,j?null:k.metaText.tempo,x),j=!0;else if(T.subtitle){if(O){var m=this.width/2+this.renderer.padding.left;T.nonMusic=new i(this.renderer.spacing.subtitle,k.formatting,T.subtitle,m,this.renderer.padding.left,this.getTextSize)}}else T.text!==void 0?(O=!0,T.nonMusic=new l(T.text,T.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):T.separator!==void 0&&T.separator.lineLength&&(O=!0,T.nonMusic=new r(T.separator.spaceAbove,T.separator.lineLength,T.separator.spaceBelow));k.bottomText=new s(k.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize)},u.prototype.engraveTune=function(k,x,T){var j=this.jazzchords,O=this.setupTune(k,x);this.constructTuneElements(k);var m=f(this.renderer,k,this.width,this.space,this.expandToWidest,this.timeBasedLayout);if(this.expandToWidest&&m>this.width+1&&(k.topText=new o(k.metaText,k.metaTextInfo,k.formatting,k.lines,m,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),k.lines&&k.lines.length>0))for(var E=k.lines.length,P=0;P<E;++P){var A=k.lines[P];if(A.nonMusic&&A.nonMusic.rows&&A.nonMusic.rows.length>0)for(var N=A.nonMusic.rows.length,D=0;D<N;++D){var _=A.nonMusic.rows[D];_.left&&(A.subtitle?_.left=m/2+this.renderer.padding.left:A.text&&A.text.length>0&&A.text[0].center&&(_.left=m/2+this.renderer.padding.left))}}k.tablatures&&a.layoutTablatures(this.renderer,k);var S=t(this.renderer,this.classes,k,this.width,m,this.responsive,O,this.selectTypes,x,T,this.chordGrid);if(this.staffgroups=S.staffgroups,this.selectables=S.selectables,this.oneSvgPerLine){var B=this.renderer.paper.svg.parentNode;this.svgs=g(this.renderer,B,k.metaText.title,this.responsive,O)}else this.svgs=[this.renderer.paper.svg];c(this,this.svgs),this.jazzchords=j};function g(k,x,T,j,O){T||(T="Untitled");var m=x.querySelector("svg");j==="resize"&&(x.style.paddingBottom="");for(var E=m.querySelector("style"),P=j==="resize"?m.viewBox.baseVal.width:m.getAttribute("width"),A=x.querySelectorAll("svg > g"),N=0,D=[],_=0;_<A.length;_++){var S=A[_],B=S.getBBox(),I=B.y-N,z=B.height+I,y=document.createElement("div"),w="overflow: hidden;";j!=="resize"&&(w+="height:"+z*O+"px;"),y.setAttribute("style",w);var C=p(m),L='Sheet Music for "'+T+'" section '+(_+1);C.setAttribute("aria-label",L),j!=="resize"&&C.setAttribute("height",z),j==="resize"&&(C.style.position="");var F=k.firefox112?z+1:z;C.setAttribute("viewBox","0 "+N+" "+P+" "+F),C.appendChild(E.cloneNode(!0));var V=document.createElement("title");V.innerText=L,C.appendChild(V),C.appendChild(S),y.appendChild(C),D.push(C),x.appendChild(y),N=B.y+B.height}return x.removeChild(m),D}function p(k){for(var x="http://www.w3.org/2000/svg",T=document.createElementNS(x,"svg"),j=0;j<k.attributes.length;j++){var O=k.attributes[j];O.name!=="height"&&O.name!="aria-label"&&T.setAttribute(O.name,O.value)}return T}return u.prototype.getDim=function(k){if(!k.dim){var x=k.svgEl.getBBox();k.dim={left:Math.round(x.x),top:Math.round(x.y),right:Math.round(x.x+x.width),bottom:Math.round(x.y+x.height)}}return k.dim},u.prototype.addSelectListener=function(k){this.listeners[this.listeners.length]=k},er=u,er}var tr,ii;function ns(){if(ii)return tr;ii=1;var M=He();Gi();var b=rs(),v=Vi(),l=zi(),r={};function i(){var f=window.innerWidth;for(var h in r)if(r.hasOwnProperty(h)){var d=r[h],n=d.offsetLeft;f-=n*2,d.style.width=f+"px"}}try{window.addEventListener("resize",i),window.addEventListener("orientationChange",i)}catch{}function o(f,h,d,n,t){d.viewportHorizontal?(f.innerHTML='<div class="abcjs-inner"></div>',d.scrollHorizontal?(f.style.overflowX="auto",f.style.overflowY="hidden"):f.style.overflow="hidden",r[f.id]=f,f=f.children[0]):d.viewportVertical?(f.innerHTML='<div class="abcjs-inner scroll-amount"></div>',f.style.overflowX="hidden",f.style.overflowY="auto",f=f.children[0]):f.innerHTML="";var a=new b(f,d);if(a.engraveABC(h,n,t),h.engraver=a,d.viewportVertical||d.viewportHorizontal){var e=f.parentNode;e.style.width=f.style.width}}var s=function(f,h,d,n,t){var a={},e;if(d){for(e in d)d.hasOwnProperty(e)&&(a[e]=d[e]);a.warnings_id&&a.tablature&&(a.tablature.warning_id=a.warnings_id)}if(n)for(e in n)n.hasOwnProperty(e)&&(e==="listener"?n[e].highlight&&(a.clickListener=n[e].highlight):a[e]=n[e]);if(t)for(e in t)t.hasOwnProperty(e)&&(a[e]=t[e]);function u(g,p,k,x){var T=!1;return g==="*"&&(T=!0,g=document.createElement("div"),g.setAttribute("style","visibility: hidden;"),document.body.appendChild(g)),!T&&a.wrap&&a.staffwidth?(p=c(g,p,k,x,a),p):(a.afterParsing&&a.afterParsing(p,k,x),o(g,p,a,k,0),T&&g.parentNode.removeChild(g),null)}return M.renderEngine(u,f,h,a)};function c(f,h,d,n,t){var a=new b(f,t),e=a.getMeasureWidths(h),u=l.calcLineWraps(h,e,t);if(u.reParse){var g=new v;g.parse(n,u.revisedParams),h=g.getTune();var p=g.getWarnings();p&&(h.warnings=p)}return t.afterParsing&&t.afterParsing(h,d,n),o(f,h,u.revisedParams,d,0),h.explanation=u.explanation,h}return tr=s,tr}var rr,si;function Go(){if(si)return rr;si=1;var M=He(),b=rs(),v=function(l,r){function i(o,s,c,f){o=document.createElement("div"),o.setAttribute("style","visibility: hidden;"),document.body.appendChild(o);var h=new b(o,r),d=h.getMeasureWidths(s);return o.parentNode.removeChild(o),{sections:d}}return M.renderEngine(i,"*",l,r)};return rr=v,rr}var nr,oi;function Fr(){if(oi)return nr;oi=1;var M={};return nr=M,nr}var ar,ci;function Vo(){if(ci)return ar;ci=1;var M=Fr(),b=function(v,l,r,i){M[l]||(M[l]={});var o=M[l];return o[r]||(o[r]=new Promise(function(s,c){var f=new XMLHttpRequest;let h=v+l+"-mp3/"+r+".mp3";f.open("GET",h,!0),f.responseType="arraybuffer",f.onload=function(){if(f.status!==200){c(Error("Can't load sound at "+h+" status="+f.status));return}var d=function(t){s({instrument:l,name:r,status:"loaded",audioBuffer:t})},n=i.decodeAudioData(f.response,d,function(){c(Error("Can't decode sound at "+h))});n&&typeof n.catch=="function"&&n.catch(c)},f.onerror=function(){c(Error("Can't load sound at "+h))},f.send()}).catch(s=>{throw console.error("Didn't load note",l,r,":",s.message),s})),o[r]};return ar=b,ar}var ir,li;function Hr(){if(li)return ir;li=1;var M=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];return ir=M,ir}var sr,hi;function Yo(){if(hi)return sr;hi=1;var M=Hr(),b=function(v){for(var l=[],r=0;r<v.tracks.length;r++)l.push([]);var i=M[0];return v.tracks.forEach(function(o,s){o.forEach(function(c){switch(c.cmd){case"note":var f=c.instrument!==void 0?M[c.instrument]:i;if(c.duration>0){var h=c.gap?c.gap:0,d=c.duration;h=Math.min(h,d*2/3);var n={pitch:c.pitch,instrument:f,start:Math.round(c.start*1e6)/1e6,end:Math.round((c.start+d-h)*1e6)/1e6,volume:c.volume};c.startChar&&(n.startChar=c.startChar),c.endChar&&(n.endChar=c.endChar),c.style&&(n.style=c.style),c.cents&&(n.cents=c.cents),l[s].push(n)}break;case"program":i=M[c.instrument];break;case"text":break;default:console.log("Unhandled midi event",c)}})}),l};return sr=b,sr}var or,ui;function Ge(){if(ui)return or;ui=1;function M(b){if(b)window.abcjsAudioContext=b;else if(!window.abcjsAudioContext){var v=window.AudioContext||window.webkitAudioContext;if(v)window.abcjsAudioContext=new v;else return!1}return window.abcjsAudioContext.state!=="suspended"}return or=M,or}var cr,di;function Ie(){if(di)return cr;di=1;var M=Ge();function b(){return window.abcjsAudioContext||M(),window.abcjsAudioContext}return cr=b,cr}var lr,fi;function Ve(){if(fi)return lr;fi=1;var M=Ie();function b(){if(!window.Promise||!window.AudioContext&&!window.webkitAudioContext&&!navigator.mozAudioContext&&!navigator.msAudioContext)return!1;var v=M();if(v)return v.resume!==void 0}return lr=b,lr}var hr,pi;function Gr(){if(pi)return hr;pi=1;var M={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"};return hr=M,hr}var ur,mi;function Wo(){if(mi)return ur;mi=1;var M=function(v){return window.URL.createObjectURL(b(v.audioBuffers))};function b(v){var l=v[0],r=l.numberOfChannels,i=l.length*r*2+44,o=new ArrayBuffer(i),s=new DataView(o),c=[],f,h,d=0,n=0;for(a(1179011410),a(i-8),a(1163280727),a(544501094),a(16),t(1),t(r),a(l.sampleRate),a(l.sampleRate*2*r),t(r*2),t(16),a(1635017060),a(i-n-4),f=0;f<r;f++)c.push(l.getChannelData(f));for(;n<i;){for(f=0;f<c.length;f++)h=Math.max(-1,Math.min(1,c[f][d])),h=(.5+h<0?h*32768:h*32767)|0,s.setInt16(n,h,!0),n+=2;d++}return new Blob([o],{type:"audio/wav"});function t(e){s.setUint16(n,e,!0),n+=2}function a(e){s.setUint32(n,e,!0),n+=4}}return ur=M,ur}var dr,gi;function as(){if(gi)return dr;gi=1;function M(b){return Math.pow(2,b/1200)}return dr=M,dr}var fr,vi;function Ro(){if(vi)return fr;vi=1;var M=Fr(),b=Gr(),v=as();function l(i,o,s,c,f,h,d,n,t){var a=window.OfflineAudioContext||window.webkitOfflineAudioContext,e=s.len*s.tempoMultiplier;h&&(e+=h/1e3),e-=n,e<0&&(e=.005);var u=new a(2,Math.floor((e+d)*o),o),g=b[s.pitch];if(!M[s.instrument])return t&&t("placeNote skipped (instrument empty): "+s.instrument+":"+g),Promise.resolve();var p=M[s.instrument][g];return p?p.then(function(k){var x=u.createBufferSource();x.buffer=k.audioBuffer;var T=s.volume/96*f;x.gainNode=u.createGain(),s.pan&&u.createStereoPanner&&(x.panNode=u.createStereoPanner(),x.panNode.pan.setValueAtTime(s.pan,0)),x.gainNode.gain.value=T,x.gainNode.gain.linearRampToValueAtTime(x.gainNode.gain.value,e),x.gainNode.gain.linearRampToValueAtTime(0,e+d),s.cents&&(x.playbackRate.value=v(s.cents)),x.panNode?(x.panNode.connect(u.destination),x.gainNode.connect(x.panNode)):x.gainNode.connect(u.destination),x.connect(x.gainNode),x.start(0),x.noteOff?x.noteOff(e+d):x.stop(e+d);var j;return u.oncomplete=function(O){if(O.renderedBuffer&&O.renderedBuffer.getChannelData)for(var m=0;m<c.length;m++){var E=c[m]*s.tempoMultiplier;h&&(E-=h/1e3),E<0&&(E=0),E=Math.floor(E*o),r(i,O.renderedBuffer,E)}t&&t("placeNote: "+s.instrument+":"+g),j()},u.startRendering(),new Promise(function(O){j=O})}).catch(function(k){return t&&t("placeNote catch: "+k.message),Promise.reject(k)}):(t&&t("placeNote skipped: "+s.instrument+":"+g),Promise.resolve())}var r=function(i,o,s){for(var c=0;c<2;c++)for(var f=o.getChannelData(c),h=i.getChannelData(c),d=0;d<f.length;d++)h[d+s]+=f[d]};return fr=l,fr}var pr,bi;function Vr(){if(bi)return pr;bi=1;var M=Vo(),b=Yo(),v=Ge(),l=Ie(),r=Ve(),i=Gr(),o=Hr(),s=Wo(),c=Ro(),f=Fr(),h="MIDI is not supported in this browser.",d="https://paulrosen.github.io/midi-js-soundfonts/abcjs/",n="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/",t="https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/";function a(){var e=this;e.audioBufferPossible=void 0,e.directSource=[],e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.audioBuffers=[],e.duration=void 0,e.isRunning=!1,e.options={},e.pickupLength=0,e.init=function(p){p||(p={}),p.options&&(e.options=p.options),v(p.audioContext);var k=l().currentTime;if(e.debugCallback=p.debugCallback,e.debugCallback&&e.debugCallback("init called"),e.audioBufferPossible=e._deviceCapable(),!e.audioBufferPossible)return Promise.reject({status:"NotSupported",message:h});var x=p.options?p.options:{};e.soundFontUrl=x.soundFontUrl?x.soundFontUrl:n,e.soundFontUrl[e.soundFontUrl.length-1]!=="/"&&(e.soundFontUrl+="/"),x.soundFontVolumeMultiplier||x.soundFontVolumeMultiplier===0?e.soundFontVolumeMultiplier=x.soundFontVolumeMultiplier:e.soundFontUrl===n||e.soundFontUrl===t?e.soundFontVolumeMultiplier=3:e.soundFontUrl===d?e.soundFontVolumeMultiplier=.4:e.soundFontVolumeMultiplier=1,x.programOffsets?e.programOffsets=x.programOffsets:e.soundFontUrl===d?e.programOffsets={bright_acoustic_piano:20,honkytonk_piano:20,electric_piano_1:30,electric_piano_2:30,harpsichord:40,clavinet:20,celesta:20,glockenspiel:40,vibraphone:30,marimba:35,xylophone:30,tubular_bells:35,dulcimer:30,drawbar_organ:20,percussive_organ:25,rock_organ:20,church_organ:40,reed_organ:40,accordion:40,harmonica:40,acoustic_guitar_nylon:20,acoustic_guitar_steel:30,electric_guitar_jazz:25,electric_guitar_clean:15,electric_guitar_muted:35,overdriven_guitar:25,distortion_guitar:20,guitar_harmonics:30,electric_bass_finger:15,electric_bass_pick:30,fretless_bass:40,violin:105,viola:50,cello:40,contrabass:60,trumpet:10,trombone:90,alto_sax:20,tenor_sax:20,clarinet:20,flute:50,banjo:50,woodblock:20}:e.programOffsets={};var T=x.fadeLength!==void 0?parseInt(x.fadeLength,10):NaN;if(e.fadeLength=isNaN(T)?200:T,T=x.noteEnd!==void 0?parseInt(x.noteEnd,10):NaN,e.noteEnd=isNaN(T)?0:T,e.pan=x.pan,e.meterSize=1,p.visualObj){e.flattened=p.visualObj.setUpAudio(x);var j=p.visualObj.getMeterFraction();j.den&&(e.meterSize=j.num/j.den),e.pickupLength=p.visualObj.getPickupLength()}else if(p.sequence)e.flattened=p.sequence;else return Promise.reject(new Error("Must pass in either a visualObj or a sequence"));e.millisecondsPerMeasure=p.millisecondsPerMeasure?p.millisecondsPerMeasure:p.visualObj?p.visualObj.millisecondsPerMeasure(e.flattened.tempo):1e3,e.beatsPerMeasure=p.visualObj?p.visualObj.getBeatsPerMeasure():4,e.sequenceCallback=x.sequenceCallback,e.callbackContext=x.callbackContext,e.onEnded=x.onEnded,e.meterFraction=p.visualObj?p.visualObj.getMeterFraction():{den:1};var O={},m=[],E=[],P=o[0];e.flattened.tracks.forEach(function(S){S.forEach(function(B){if(B.cmd==="program"&&o[B.instrument]&&(P=o[B.instrument]),B.pitch!==void 0){var I=B.pitch,z=i[I],y=B.instrument!==void 0?o[B.instrument]:P;if(z)if(O[y]||(O[y]={}),!f[y]||!f[y][z])O[y][z]=!0;else{var w=y+":"+z;m.indexOf(w)<0&&m.push(w)}else{var C=y+":"+z;console.log("Can't find note: ",I,C),E.indexOf(C)<0&&E.push(C)}}})}),e.debugCallback&&e.debugCallback("note gathering time = "+Math.floor((l().currentTime-k)*1e3)+"ms"),k=l().currentTime;var A=[];Object.keys(O).forEach(function(S){Object.keys(O[S]).forEach(function(B){A.push({instrument:S,note:B})})}),e.debugCallback&&e.debugCallback("notes "+JSON.stringify(A));for(var N=[],D=256,_=0;_<A.length;_+=D)N.push(A.slice(_,_+D));return new Promise(function(S,B){var I={cached:m,error:E,loaded:[]},z=0,y=function(){e.debugCallback&&e.debugCallback("loadBatch idx="+z+" len="+N.length),z<N.length?e._loadBatch(N[z],e.soundFontUrl,k).then(function(w){e.debugCallback&&e.debugCallback("loadBatch then"),k=l().currentTime,w&&(w.error&&(I.error=I.error.concat(w.error)),w.loaded&&(I.loaded=I.loaded.concat(w.loaded))),z++,y()},B):(e.debugCallback&&e.debugCallback("resolve init"),S(I))};y()})},e._loadBatch=function(p,k,x,T){var j=[];return p.forEach(function(O){e.debugCallback&&e.debugCallback("getNote "+O.instrument+":"+O.note),j.push(M(k,O.instrument,O.note,l()))}),Promise.all(j).then(function(O){e.debugCallback&&e.debugCallback("mp3 load time = "+Math.floor((l().currentTime-x)*1e3)+"ms");for(var m=[],E=[],P=[],A=[],N=0;N<O.length;N++){var D=O[N],_=D.instrument+":"+D.name;D.status==="loaded"?m.push(_):D.status==="pending"?P.push(_):D.status==="cached"?E.push(_):A.push(_+" "+D.message)}if(P.length>0){if(e.debugCallback&&e.debugCallback("pending "+JSON.stringify(P)),T?T=T*2:T=50,T<9e4)return new Promise(function(I,z){setTimeout(function(){var y=[];for(N=0;N<P.length;N++)_=P[N].split(":"),y.push({instrument:_[0],note:_[1]});e.debugCallback&&e.debugCallback("retry "+JSON.stringify(y)),e._loadBatch(y,k,x,T).then(function(w){I(w)}).catch(function(w){z(w)})},T)});for(var S=[],B=0;B<p.length;B++)S.push(p[B].instrument+"/"+p[B].note);return e.debugCallback&&e.debugCallback("loadBatch timeout"),Promise.reject(new Error("timeout attempting to load: "+S.join(", ")))}else return e.debugCallback&&e.debugCallback("loadBatch resolve"),Promise.resolve({loaded:m,cached:E,error:A})}).catch(function(O){e.debugCallback&&e.debugCallback("loadBatch catch "+O.message)})},e.prime=function(){var p=e.fadeLength/1e3;return e.isRunning=!1,e.audioBufferPossible?(e.debugCallback&&e.debugCallback("prime called"),new Promise(function(k,x){try{let I=function(z){var y=z&&z.audioBuffers&&z.audioBuffers.length>0?z.audioBuffers[0].duration:0;return{status:l().state,duration:y}};var T=l().currentTime,j=e.millisecondsPerMeasure/1e3/e.meterSize;if(e.duration=e.flattened.totalDuration*j,e.duration<=0)return e.audioBuffers=[],k({status:"empty",seconds:0});e.duration+=p;var O=Math.floor(l().sampleRate*e.duration);e.stop();var m=b(e.flattened);e.options.swing&&g(m,e.options.swing,e.meterFraction,e.pickupLength),e.sequenceCallback&&e.sequenceCallback(m,e.callbackContext);var E=u(m.length,e.pan),P={};m.forEach(function(z,y){var w=E&&E.length>y?E[y]:0;z.forEach(function(C){var L=C.instrument+":"+C.pitch+":"+C.volume+":"+Math.round((C.end-C.start)*1e3)/1e3+":"+w+":"+j+":"+(C.cents?C.cents:0);e.debugCallback&&e.debugCallback("noteMapTrack "+L),P[L]||(P[L]=[]),P[L].push(C.start)})});for(var A=[],N=l().createBuffer(2,O,l().sampleRate),D=0;D<Object.keys(P).length;D++){var _=Object.keys(P)[D],S=_.split(":"),B=S[6]!==void 0?parseFloat(S[6]):0;S={instrument:S[0],pitch:parseInt(S[1],10),volume:parseInt(S[2],10),len:parseFloat(S[3]),pan:parseFloat(S[4]),tempoMultiplier:parseFloat(S[5]),cents:B},A.push(c(N,l().sampleRate,S,P[_],e.soundFontVolumeMultiplier,e.programOffsets[S.instrument],p,e.noteEnd/1e3,e.debugCallback))}e.audioBuffers=[N],e.debugCallback&&(e.debugCallback("sampleRate = "+l().sampleRate),e.debugCallback("totalSamples = "+O),e.debugCallback("creationTime = "+Math.floor((l().currentTime-T)*1e3)+"ms")),Promise.all(A).then(function(){l().state==="suspended"?l().resume().then(function(){k(I(e))}):l().state==="interrupted"?l().suspend().then(function(){l().resume().then(function(){k(I(e))})}):k(I(e))}).catch(function(z){x(z)})}catch(I){x(I)}})):Promise.reject(new Error(h))};function u(p,k){if(k==null)return null;var x=[];if(k.length){for(var T=0;T<p;T++)if(T<k.length){var j=parseFloat(k[T]);j<-1?j=-1:j>1&&(j=1),x.push(j)}else x.push(0);return x}else{var O=parseFloat(k);if(O*(p-1)>2)return null;for(var m=p%2===0,E=m?0-O/2:0,P=E+O,A=0;A<p;A++)m=A%2===0,m?(x.push(E),E-=O):(x.push(P),P+=O);return x}}e.start=function(){if(!e.audioBufferPossible)throw new Error(h);e.debugCallback&&e.debugCallback("start called");var p=e.pausedTimeSec?e.pausedTimeSec:0;e._kickOffSound(p),e.startTimeSec=l().currentTime-p,e.pausedTimeSec=void 0,e.debugCallback&&e.debugCallback("MIDI STARTED",e.startTimeSec)},e.pause=function(){if(!e.audioBufferPossible)throw new Error(h);return e.debugCallback&&e.debugCallback("pause called"),e.pausedTimeSec=e.stop(),e.pausedTimeSec},e.resume=function(){e.start()},e.seek=function(p,k){var x;switch(k){case"seconds":x=p;break;case"beats":x=p*e.millisecondsPerMeasure/e.beatsPerMeasure/1e3;break;default:x=(e.duration-e.fadeLength/1e3)*p;break}if(!e.audioBufferPossible)throw new Error(h);e.debugCallback&&e.debugCallback("seek called sec="+x),e.isRunning?(e.stop(),e._kickOffSound(x)):e.pausedTimeSec=x,e.pausedTimeSec=x},e.stop=function(){e.isRunning=!1,e.pausedTimeSec=void 0,e.directSource.forEach(function(k){try{k.stop()}catch(x){console.log("direct source didn't stop:",x)}}),e.directSource=[];var p=l().currentTime-e.startTimeSec;return p},e.finished=function(){e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.isRunning=!1},e.download=function(){return s(e)},e.getAudioBuffer=function(){return e.audioBuffers[0]},e.getIsRunning=function(){return e.isRunning},e._deviceCapable=function(){return r()?!0:(console.warn(h),e.debugCallback&&e.debugCallback(h),!1)},e._kickOffSound=function(p){e.isRunning=!0,e.directSource=[],e.audioBuffers.forEach(function(k,x){e.directSource[x]=l().createBufferSource(),e.directSource[x].buffer=k,e.directSource[x].connect(l().destination)}),e.directSource.forEach(function(k){k.start(0,p)}),e.onEnded&&(e.directSource[0].onended=function(){e.onEnded(e.callbackContext)})};function g(p,k,x,T){if(!(x.den!=4&&x.den!=8)&&(k=parseFloat(k),!(isNaN(k)||k<=50))){k>75&&(k=75),k=k/50-1;var j=0,O=.25;x.den===8&&(O=O/2);for(var m=O/2,E=m*k,P=0;P<p.length;P++)for(var A=p[P],N=0;N<A.length;N++){var D=A[N];if((D.start-T)%m==0&&(D.start-T)%O!=0&&(N==0||A[N-1].start<=A[N].start-m)&&(N==A.length-1||A[N+1].start>=A[N].start+m)){var _=D.start;D.start+=E,D.volume*=1+j,N>0&&A[N-1].end==_&&(A[N-1].end=D.start,A[N-1].volume*=1-j)}}}}}return pr=a,pr}var mr,yi;function is(){if(yi)return mr;yi=1;var M=function(){var b=this;b.tracks=[],b.totalDuration=0,b.currentInstrument=[],b.starts=[],b.addTrack=function(){return b.tracks.push([]),b.currentInstrument.push(0),b.starts.push(0),b.tracks.length-1},b.setInstrument=function(v,l){b.tracks[v].push({channel:0,cmd:"program",instrument:l}),b.currentInstrument[v]=l},b.appendNote=function(v,l,r,i,o){var s={cmd:"note",duration:r,gap:0,instrument:b.currentInstrument[v],pitch:l,start:b.starts[v],volume:i};o&&(s.cents=o),b.tracks[v].push(s),b.starts[v]+=r,b.totalDuration=Math.max(b.totalDuration,b.starts[v])}};return mr=M,mr}var gr,ki;function qo(){if(ki)return gr;ki=1;var M=`
|
|
41
|
-
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" preserveAspectRatio="xMidYMid meet">
|
|
42
|
-
<g transform="translate(0,700) scale(0.1,-0.1)" >
|
|
43
|
-
<path d="M3111 6981 c-20 -37 -90 -55 -364 -96 -120 -18 -190 -33 -244 -55
|
|
44
|
-
-42 -17 -124 -42 -182 -56 -78 -18 -119 -34 -157 -60 -28 -19 -86 -46 -128
|
|
45
|
-
-60 -43 -13 -107 -42 -144 -64 -37 -23 -84 -46 -106 -52 -21 -7 -56 -29 -79
|
|
46
|
-
-50 -22 -22 -61 -50 -86 -63 -26 -13 -67 -40 -91 -60 -24 -20 -65 -47 -90 -60
|
|
47
|
-
-25 -13 -53 -31 -61 -41 -8 -9 -32 -30 -54 -46 -75 -54 -486 -460 -512 -507
|
|
48
|
-
-15 -25 -48 -69 -75 -98 -26 -28 -48 -57 -48 -63 0 -6 -18 -29 -39 -53 -21
|
|
49
|
-
-23 -56 -71 -77 -107 -20 -36 -50 -80 -65 -97 -16 -18 -33 -52 -40 -75 -12
|
|
50
|
-
-47 -47 -115 -84 -166 -13 -18 -30 -56 -38 -83 -8 -27 -34 -80 -56 -118 -33
|
|
51
|
-
-53 -46 -91 -62 -167 -12 -63 -34 -127 -59 -179 -42 -84 -60 -166 -60 -270 0
|
|
52
|
-
-90 26 -122 125 -154 54 -17 96 -19 430 -20 305 -1 381 2 430 14 82 22 140 51
|
|
53
|
-
153 78 6 12 22 47 37 77 14 30 38 77 54 103 15 27 34 73 40 103 7 30 28 78 48
|
|
54
|
-
107 19 28 44 74 55 101 10 28 34 67 53 87 18 20 49 61 68 90 19 30 44 63 57
|
|
55
|
-
74 13 11 36 40 52 65 59 94 232 270 306 313 20 11 57 37 82 58 25 20 70 52
|
|
56
|
-
100 72 30 19 66 47 79 61 13 14 49 35 80 46 30 12 80 37 111 56 31 19 95 45
|
|
57
|
-
143 58 48 12 110 37 139 55 63 40 127 55 323 76 83 9 208 28 279 41 156 29
|
|
58
|
-
165 29 330 4 453 -71 514 -84 606 -130 31 -16 83 -36 116 -45 32 -9 84 -34
|
|
59
|
-
115 -56 31 -21 82 -48 113 -60 32 -11 72 -33 89 -48 18 -16 59 -45 92 -65 33
|
|
60
|
-
-21 74 -51 90 -66 17 -15 49 -40 73 -54 52 -32 65 -61 50 -113 -8 -31 -61 -90
|
|
61
|
-
-277 -308 -300 -303 -361 -382 -369 -481 -2 -29 0 -66 6 -81 13 -40 88 -138
|
|
62
|
-
115 -151 12 -6 54 -26 92 -44 l70 -33 945 -2 c520 -1 975 2 1012 7 64 8 191
|
|
63
|
-
50 231 76 11 7 33 34 50 60 22 34 42 51 65 58 l32 9 0 1101 0 1102 -32 9 c-21
|
|
64
|
-
7 -44 26 -64 55 -60 84 -77 97 -140 110 -44 9 -76 10 -127 2 -59 -9 -77 -17
|
|
65
|
-
-134 -62 -37 -28 -172 -155 -301 -281 -129 -127 -249 -237 -267 -245 -25 -10
|
|
66
|
-
-41 -11 -71 -2 -58 15 -112 45 -124 69 -6 11 -35 35 -64 54 -28 18 -58 41 -66
|
|
67
|
-
50 -8 9 -41 35 -75 58 -33 22 -77 56 -99 75 -21 18 -64 46 -95 61 -31 14 -73
|
|
68
|
-
39 -93 55 -20 15 -70 40 -110 55 -40 15 -97 44 -127 64 -29 21 -78 44 -107 53
|
|
69
|
-
-30 8 -77 31 -105 51 -42 28 -73 39 -173 60 -68 14 -154 39 -196 58 -95 43
|
|
70
|
-
-131 51 -343 76 -209 24 -242 32 -279 70 l-30 29 -328 0 c-312 0 -330 -1 -339
|
|
71
|
-
-19z"></path>
|
|
72
|
-
<path d="M254 2875 c-89 -16 -107 -26 -145 -78 -32 -44 -62 -66 -91 -67 -17 0
|
|
73
|
-
-18 -61 -18 -1140 l0 -1140 24 0 c16 0 41 -17 72 -50 40 -42 61 -55 117 -72
|
|
74
|
-
l69 -21 82 23 c44 12 96 30 114 39 18 9 148 132 290 272 141 141 267 261 279
|
|
75
|
-
268 51 26 86 14 176 -61 32 -26 62 -48 66 -48 5 0 36 -25 70 -55 34 -30 74
|
|
76
|
-
-61 89 -69 15 -8 37 -28 50 -45 12 -17 50 -45 84 -62 34 -17 78 -44 98 -60 19
|
|
77
|
-
-16 61 -37 93 -48 32 -11 81 -37 107 -56 27 -20 76 -45 109 -56 33 -12 75 -31
|
|
78
|
-
93 -44 62 -45 93 -58 191 -82 54 -12 130 -37 168 -54 68 -29 180 -58 226 -59
|
|
79
|
-
62 0 183 -64 183 -96 0 -12 88 -14 639 -14 l639 0 12 30 c18 44 76 66 233 89
|
|
80
|
-
89 14 160 30 200 47 34 15 106 42 159 60 54 18 112 44 130 57 47 35 85 52 146
|
|
81
|
-
67 29 7 76 28 105 48 29 20 77 48 107 63 30 15 66 39 80 54 14 15 50 40 81 56
|
|
82
|
-
31 15 78 46 104 69 26 22 61 46 79 54 17 7 43 26 56 42 14 16 41 41 60 56 64
|
|
83
|
-
48 380 362 408 405 15 23 40 51 55 63 15 12 36 38 46 58 11 21 37 57 58 82 22
|
|
84
|
-
25 49 62 62 83 13 20 38 56 57 78 19 23 50 74 69 113 19 39 46 86 59 104 14
|
|
85
|
-
18 34 62 46 98 12 36 32 77 45 92 31 38 60 97 80 167 9 33 26 76 37 95 29 50
|
|
86
|
-
47 103 68 206 10 52 32 117 51 155 29 56 33 74 34 140 0 94 -10 108 -101 138
|
|
87
|
-
-61 20 -83 21 -463 21 -226 0 -421 -4 -451 -10 -63 -12 -86 -30 -110 -85 -10
|
|
88
|
-
-22 -33 -63 -52 -92 -21 -31 -42 -80 -53 -123 -11 -44 -32 -93 -56 -128 -20
|
|
89
|
-
-32 -47 -83 -59 -115 -12 -32 -37 -77 -56 -100 -19 -23 -50 -65 -69 -94 -19
|
|
90
|
-
-29 -44 -57 -54 -63 -11 -5 -29 -27 -42 -47 -52 -85 -234 -277 -300 -315 -25
|
|
91
|
-
-15 -53 -38 -62 -51 -9 -14 -42 -39 -74 -57 -32 -18 -75 -48 -95 -66 -21 -18
|
|
92
|
-
-59 -44 -85 -58 -26 -13 -72 -40 -100 -59 -35 -24 -78 -41 -128 -52 -47 -11
|
|
93
|
-
-99 -31 -139 -56 -69 -42 -94 -49 -391 -110 -245 -51 -425 -66 -595 -50 -168
|
|
94
|
-
16 -230 27 -330 61 -47 16 -123 35 -170 44 -98 17 -123 25 -172 58 -20 14 -71
|
|
95
|
-
37 -114 53 -44 15 -95 40 -115 56 -20 16 -70 42 -110 59 -40 16 -88 45 -108
|
|
96
|
-
63 -20 19 -55 46 -78 61 -24 14 -49 35 -55 47 -7 11 -34 33 -60 49 -50 31 -65
|
|
97
|
-
61 -53 102 4 13 130 147 281 298 236 238 277 283 299 335 15 32 35 71 46 86
|
|
98
|
-
12 18 19 44 19 76 0 42 -8 63 -53 138 -92 151 11 139 -1207 141 -798 2 -1030
|
|
99
|
-
0 -1086 -11z"></path>
|
|
100
|
-
</g>
|
|
101
|
-
</svg>
|
|
102
|
-
`;return gr=M,gr}var vr,xi;function Uo(){if(xi)return vr;xi=1;var M=`
|
|
103
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-play-svg">
|
|
104
|
-
<g>
|
|
105
|
-
<polygon points="4 0 23 12.5 4 25"/>
|
|
106
|
-
</g>
|
|
107
|
-
</svg>
|
|
108
|
-
`;return vr=M,vr}var br,wi;function Xo(){if(wi)return br;wi=1;var M=`
|
|
109
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-pause-svg">
|
|
110
|
-
<g>
|
|
111
|
-
<rect width="8.23" height="25"/>
|
|
112
|
-
<rect width="8.23" height="25" x="17"/>
|
|
113
|
-
</g>
|
|
114
|
-
</svg>
|
|
115
|
-
`;return br=M,br}var yr,Ti;function Ko(){if(Ti)return yr;Ti=1;var M=`
|
|
116
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="abcjs-loading-svg">
|
|
117
|
-
<circle cx="50" cy="50" fill="none" stroke-width="20" r="35" stroke-dasharray="160 55"></circle>
|
|
118
|
-
</svg>
|
|
119
|
-
`;return yr=M,yr}var kr,Ci;function $o(){if(Ci)return kr;Ci=1;var M=`
|
|
120
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25">
|
|
121
|
-
<g>
|
|
122
|
-
<polygon points="5 12.5 24 0 24 25"/>
|
|
123
|
-
<rect width="3" height="25" x="0" y="0"/>
|
|
124
|
-
</g>
|
|
125
|
-
</svg>
|
|
126
|
-
`;return kr=M,kr}var xr,Mi;function ss(){if(Mi)return xr;Mi=1;var M=Ve(),b=Ge(),v=Ie(),l=qo(),r=Uo(),i=Xo(),o=Ko(),s=$o();function c(t,a){var e=this;if(typeof t=="string"){var u=t;if(t=document.querySelector(u),!t)throw new Error('Cannot find element "'+u+'" in the DOM.')}else if(!(t instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(e.parent=t,e.options={},a&&(e.options=Object.assign({},a)),e.options.ac&&b(e.options.ac),f(e.parent,e.options),n(e),e.disable=function(p){var k=e.parent.querySelector(".abcjs-inline-audio");p?k.classList.add("abcjs-disabled"):k.classList.remove("abcjs-disabled")},e.setWarp=function(p,k){var x=e.parent.querySelector(".abcjs-midi-tempo");x.value=Math.round(k),e.setTempo(p)},e.setTempo=function(p){var k=e.parent.querySelector(".abcjs-midi-current-tempo");k&&(k.innerHTML=Math.round(p))},e.resetAll=function(){for(var p=e.parent.querySelectorAll(".abcjs-pushed"),k=0;k<p.length;k++){var x=p[k];x.classList.remove("abcjs-pushed")}},e.pushPlay=function(p){var k=e.parent.querySelector(".abcjs-midi-start");k&&(p?k.classList.add("abcjs-pushed"):k.classList.remove("abcjs-pushed"))},e.pushLoop=function(p){var k=e.parent.querySelector(".abcjs-midi-loop");k&&(p?k.classList.add("abcjs-pushed"):k.classList.remove("abcjs-pushed"))},e.setProgress=function(p,k){var x=e.parent.querySelector(".abcjs-midi-progress-background"),T=e.parent.querySelector(".abcjs-midi-progress-indicator");if(!(!x||!T)){var j=x.clientWidth,O=j*p;T.style.left=O+"px";var m=e.parent.querySelector(".abcjs-midi-clock");if(m){var E=k*p/1e3,P=Math.floor(E/60),A=Math.floor(E%60),N=A<10?"0"+A:A;m.innerHTML=P+":"+N}}},e.options.afterResume){var g=!1;e.options.ac?g=e.options.ac.state!=="suspended":v()&&(g=v().state!=="suspended"),g&&e.options.afterResume()}}function f(t,a){var e=!!a.loopHandler,u=!!a.restartHandler,g=!!a.playHandler||!!a.playPromiseHandler,p=!!a.progressHandler,k=!!a.warpHandler,x=a.hasClock!==!1,T=`<div class="abcjs-inline-audio">
|
|
127
|
-
`;if(e){var j=a.repeatTitle?a.repeatTitle:"Click to toggle play once/repeat.",O=a.repeatAria?a.repeatAria:j;T+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+j+'" aria-label="'+O+'">'+l+`</button>
|
|
128
|
-
`}if(u){var m=a.restartTitle?a.restartTitle:"Click to go to beginning.",E=a.restartAria?a.restartAria:m;T+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+m+'" aria-label="'+E+'">'+s+`</button>
|
|
129
|
-
`}if(g){var P=a.playTitle?a.playTitle:"Click to play/pause.",A=a.playAria?a.playAria:P;T+='<button type="button" class="abcjs-midi-start abcjs-btn" title="'+P+'" aria-label="'+A+'">'+r+i+o+`</button>
|
|
130
|
-
`}if(p){var N=a.randomTitle?a.randomTitle:"Click to change the playback position.",D=a.randomAria?a.randomAria:N;T+='<button type="button" class="abcjs-midi-progress-background" title="'+N+'" aria-label="'+D+`"><span class="abcjs-midi-progress-indicator"></span></button>
|
|
131
|
-
`}if(x&&(T+=`<span class="abcjs-midi-clock"></span>
|
|
132
|
-
`),k){var _=a.warpTitle?a.warpTitle:"Change the playback speed.",S=a.warpAria?a.warpAria:_,B=a.bpm?a.bpm:"BPM";T+='<span class="abcjs-tempo-wrapper"><label><input class="abcjs-midi-tempo" type="number" min="1" max="300" value="100" title="'+_+'" aria-label="'+S+'">%</label><span> (<span class="abcjs-midi-current-tempo"></span> '+B+`)</span></span>
|
|
133
|
-
`}T+='<div class="abcjs-css-warning" style="font-size: 12px;color:red;border: 1px solid red;text-align: center;width: 300px;margin-top: 4px;font-weight: bold;border-radius: 4px;">CSS required: load abcjs-audio.css</div>',T+=`</div>
|
|
134
|
-
`,t.innerHTML=T}function h(t,a,e,u,g){var p=!0;if(v()?p=v().state==="suspended":b(),!M())throw{status:"NotSupported",message:"This browser does not support audio."};(p||g)&&e&&e.classList.add("abcjs-loading"),p?v().resume().then(function(){u?u().then(function(k){d(t,a,e,g)}):d(t,a,e,g)}):d(t,a,e,g)}function d(t,a,e,u){u?t(a).then(function(){e&&e.classList.remove("abcjs-loading")}):(t(a),e&&e.classList.remove("abcjs-loading"))}function n(t){var a=!!t.options.loopHandler,e=!!t.options.restartHandler,u=!!t.options.playHandler||!!t.options.playPromiseHandler,g=!!t.options.progressHandler,p=!!t.options.warpHandler,k=t.parent.querySelector(".abcjs-midi-start");a&&t.parent.querySelector(".abcjs-midi-loop").addEventListener("click",function(x){h(t.options.loopHandler,x,k,t.options.afterResume)}),e&&t.parent.querySelector(".abcjs-midi-reset").addEventListener("click",function(x){h(t.options.restartHandler,x,k,t.options.afterResume)}),u&&k.addEventListener("click",function(x){h(t.options.playPromiseHandler||t.options.playHandler,x,k,t.options.afterResume,!!t.options.playPromiseHandler)}),g&&t.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",function(x){h(t.options.progressHandler,x,k,t.options.afterResume)}),p&&t.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",function(x){h(t.options.warpHandler,x,k,t.options.afterResume)})}return xr=c,xr}var wr,Si;function Qo(){if(Si)return wr;Si=1;var M=is(),b=Vr(),v=Ie();function l(i,o,s,c,f){for(var h=new M,d=0;d<i.length;d++){var n=i[d],t=h.addTrack();if(h.setInstrument(t,n.instrument),d===0&&o)for(var a=0;a<o.length;a++){var e=o[a];h.appendNote(t,e.pitch,1/64,e.volume,e.cents)}h.appendNote(t,n.pitch,n.duration,n.volume,n.cents)}var u=v();return u.state==="suspended"?u.resume().then(function(){return r(h,s,c,f)}):r(h,s,c,f)}function r(i,o,s,c){var f=new b;return f.init({sequence:i,millisecondsPerMeasure:o,options:{soundFontUrl:s},debugCallback:c}).then(function(){return f.prime()}).then(function(){return f.start(),Promise.resolve()})}return wr=l,wr}var Tr,_i;function os(){if(_i)return Tr;_i=1;var M=ss(),b=Vr(),v=Pr(),l=Ie();function r(){var i=this;i.warp=100,i.cursorControl=null,i.visualObj=null,i.timer=null,i.midiBuffer=null,i.options=null,i.currentTempo=null,i.control=null,i.isLooping=!1,i.isStarted=!1,i.isLoaded=!1,i.isLoading=!1,i.load=function(s,c,f){f||(f={}),f.displayPlay===void 0&&(f.displayPlay=!0),f.displayProgress===void 0&&(f.displayProgress=!0),i.control=new M(s,{loopHandler:f.displayLoop?i.toggleLoop:void 0,restartHandler:f.displayRestart?i.restart:void 0,playPromiseHandler:f.displayPlay?i.play:void 0,progressHandler:f.displayProgress?i.randomAccess:void 0,warpHandler:f.displayWarp?i.onWarp:void 0,afterResume:i.init}),i.cursorControl=c,i.disable(!0)},i.disable=function(s){i.control&&i.control.disable(s)},i.setTune=function(s,c,f){return i.visualObj=s,i.disable(!1),i.options=f||{},i.control&&(i.pause(),i.setProgress(0,1),i.control.resetAll(),i.restart(),i.isStarted=!1),i.isLooping=!1,c?i.go():Promise.resolve({status:"no-audio-context"})},i.go=function(){i.isLoading=!0;var s=i.visualObj.millisecondsPerMeasure()*100/i.warp;i.currentTempo=Math.round(i.visualObj.getBeatsPerMeasure()/s*6e4),i.control&&i.control.setTempo(i.currentTempo),i.percent=0;var c;return i.midiBuffer||(i.midiBuffer=new b),l().resume().then(function(f){return i.midiBuffer.init({visualObj:i.visualObj,options:i.options,millisecondsPerMeasure:s})}).then(function(f){return c=f,i.midiBuffer.prime()}).then(function(){var f=16;return i.cursorControl&&i.cursorControl.beatSubdivisions!==void 0&&parseInt(i.cursorControl.beatSubdivisions,10)>=1&&parseInt(i.cursorControl.beatSubdivisions,10)<=64&&(f=parseInt(i.cursorControl.beatSubdivisions,10)),i.timer=new v(i.visualObj,{beatCallback:i.beatCallback,eventCallback:i.eventCallback,lineEndCallback:i.lineEndCallback,qpm:i.currentTempo,extraMeasuresAtBeginning:i.cursorControl?i.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:i.cursorControl?i.cursorControl.lineEndAnticipation:0,beatSubdivisions:f}),i.cursorControl&&i.cursorControl.onReady&&typeof i.cursorControl.onReady=="function"&&i.cursorControl.onReady(i),i.isLoaded=!0,i.isLoading=!1,Promise.resolve({status:"created",notesStatus:c})})},i.destroy=function(){i.timer&&(i.timer.reset(),i.timer.stop(),i.timer=null),i.midiBuffer&&(i.midiBuffer.stop(),i.midiBuffer=null),i.setProgress(0,1),i.control&&i.control.resetAll()},i.play=function(){return i.runWhenReady(i._play,void 0)};function o(s){return new Promise(function(c){setTimeout(c,s)})}i.runWhenReady=function(s,c){return i.visualObj?i.isLoading?o(500).then(function(){return i.isLoading?i.runWhenReady(s,c):s(c)}):i.isLoaded?s(c):i.go().then(function(){return s(c)}):Promise.resolve({status:"loading"})},i._play=function(){return l().resume().then(function(){return i.isStarted=!i.isStarted,i.isStarted?(i.cursorControl&&i.cursorControl.onStart&&typeof i.cursorControl.onStart=="function"&&i.cursorControl.onStart(),i.midiBuffer.start(),i.timer.start(i.percent),i.control&&i.control.pushPlay(!0)):i.pause(),Promise.resolve({status:"ok"})})},i.pause=function(){i.timer&&(i.timer.pause(),i.midiBuffer.pause(),i.control&&i.control.pushPlay(!1))},i.toggleLoop=function(){i.isLooping=!i.isLooping,i.control&&i.control.pushLoop(i.isLooping)},i.restart=function(){i.timer&&(i.timer.setProgress(0),i.midiBuffer.seek(0))},i.randomAccess=function(s){return i.runWhenReady(i._randomAccess,s)},i._randomAccess=function(s){var c=s.target.classList.contains("abcjs-midi-progress-indicator")?s.target.parentNode:s.target,f=(s.x-c.getBoundingClientRect().left)/c.offsetWidth;return f<0&&(f=0),f>1&&(f=1),i.seek(f),Promise.resolve({status:"ok"})},i.seek=function(s,c){i.timer&&i.midiBuffer&&(i.timer.setProgress(s,c),i.midiBuffer.seek(s,c))},i.setWarp=function(s){if(parseInt(s,10)>0){i.warp=parseInt(s,10);var c=i.isStarted,f=i.percent;return i.destroy(),i.isStarted=!1,i.go().then(function(){return i.setProgress(f,i.midiBuffer.duration*1e3),i.control&&i.control.setWarp(i.currentTempo,i.warp),c?i.play().then(function(){return i.seek(f),Promise.resolve()}):(i.seek(f),Promise.resolve())})}return Promise.resolve()},i.onWarp=function(s){var c=s.target.value;return i.setWarp(c)},i.setProgress=function(s,c){i.percent=s,i.control&&i.control.setProgress(s,c)},i.finished=function(){if(i.timer.reset(),i.isLooping)return i.timer.start(0),i.midiBuffer.finished(),i.midiBuffer.start(),"continue";i.timer.stop(),i.isStarted&&(i.control&&i.control.pushPlay(!1),i.isStarted=!1,i.midiBuffer.finished(),i.cursorControl&&i.cursorControl.onFinished&&typeof i.cursorControl.onFinished=="function"&&i.cursorControl.onFinished(),i.setProgress(0,1))},i.beatCallback=function(s,c,f,h){var d=s/c;i.setProgress(d,f),i.cursorControl&&i.cursorControl.onBeat&&typeof i.cursorControl.onBeat=="function"&&i.cursorControl.onBeat(s,c,f,h)},i.eventCallback=function(s){if(s)i.cursorControl&&i.cursorControl.onEvent&&typeof i.cursorControl.onEvent=="function"&&i.cursorControl.onEvent(s);else return i.finished()},i.lineEndCallback=function(s,c){i.cursorControl&&i.cursorControl.onLineEnd&&typeof i.cursorControl.onLineEnd=="function"&&i.cursorControl.onLineEnd(s,c)},i.getUrl=function(){return i.midiBuffer.download()},i.download=function(s){var c=i.getUrl(),f=document.createElement("a");document.body.appendChild(f),f.setAttribute("style","display: none;"),f.href=c,f.download=s||"output.wav",f.click(),window.URL.revokeObjectURL(c),document.body.removeChild(f)}}return Tr=r,Tr}var Cr,Ei;function cs(){if(Ei)return Cr;Ei=1;var M=as(),b;return function(){function v(n,t){for(var a in t)t.hasOwnProperty(a)&&n.setAttribute(a,t[a]);return n}function l(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}l.prototype.setTempo=function(n){this.trackcount===0&&(this.startTrack(),this.track+="%00%FF%51%03"+f(Math.round(6e7/n),6),this.endTrack())},l.prototype.setGlobalInfo=function(n,t,a,e){if(this.trackcount===0){this.startTrack();var u=Math.round(6e7/n);this.track+="%00%FF%51%03"+f(u,6),a&&(this.track+=o(a)),e&&(this.track+=s(e)),t&&(this.track+=i(t,"%01")),this.endTrack()}},l.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},l.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var n=f(this.track.length/3+4,8);this.track="MTrk"+n+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},l.prototype.setText=function(n,t){switch(n){case"name":this.trackName=i(t,"%03");break}},l.prototype.setInstrument=function(n){this.trackInstrument="%00%C0"+f(n,2),this.instrument=n},l.prototype.setChannel=function(n,t){this.channel=n;var a="%00%B"+this.channel.toString(16);this.track+=a+"%79%00",this.track+=a+"%40%00",this.track+=a+"%5B%30",t||(t=0),t=Math.round((t+1)*64),this.track+=a+"%0A"+f(t,2),this.track+=a+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};var r=4096;l.prototype.startNote=function(n,t,a){if(this.track+=d(this.silencelength),this.silencelength=0,a){this.track+="%e"+this.channel.toString(16);var e=Math.round(M(a)*r);this.track+=h(8192+e),this.track+=d(0),this.noteWarped[n]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+n.toString(16)+f(t,2)},l.prototype.endNote=function(n){this.track+=d(this.silencelength),this.silencelength=0,this.noteWarped[n]&&(this.track+="%e"+this.channel.toString(16),this.track+=h(8192),this.track+=d(0),this.noteWarped[n]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+n.toString(16)+"%00"},l.prototype.addRest=function(n){this.silencelength+=n,this.silencelength<0&&(this.silencelength=0)},l.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+f(this.trackcount,4)+"%01%e0"+this.trackstrings},l.prototype.embed=function(n,t){var a=this.getData(),e=v(document.createElement("a"),{href:a});if(e.innerHTML="download midi",n.insertBefore(e,n.firstChild),!t){var u=v(document.createElement("embed"),{src:a,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});n.insertBefore(u,n.firstChild)}};function i(n,t){for(var a="",e=0;e<n.length;e++)a+=f(n.charCodeAt(e),2);return"%00%FF"+t+f(a.length/3,2)+a}function o(n){if(!n||!n.accidentals)return"";for(var t="%00%FF%59%02",a=0,e=256,u=0;u<n.accidentals.length;u++)n.accidentals[u].acc==="sharp"?a++:n.accidentals[u].acc==="flat"&&e--;var g=f(e!==256?e:a,2),p=n.mode==="m"?"%01":"%00";return t+g+p}function s(n){var t="%00%FF%58%04"+f(n.num,2),a={1:0,2:1,4:2,8:3,16:4,32:5},e=a[n.den];if(!e)return"";t+=f(e,2);var u;switch(n.num+"/"+n.den){case"2/4":case"3/4":case"4/4":case"5/4":u=24;break;case"6/4":u=72;break;case"2/2":case"3/2":case"4/2":u=48;break;case"3/8":case"6/8":case"9/8":case"12/8":u=36;break}return u?(t+=f(u,2),t+"%08"):""}function c(n){for(var t="",a=0;a<n.length;a+=2)t+="%",t+=n.substr(a,2);return t}function f(n,t){var a=n.toString(16);for(a=a.split(".")[0];a.length<t;)a="0"+a;return a.length>t&&(a=a.substring(0,t)),c(a)}function h(n){n=Math.round(n);var t=n%128,a=n-t;return f(a*2+t,4)}function d(n){var t=0,a=[];for(n=Math.round(n);n!==0;)a.push(n&127),n=n>>7;for(var e=a.length-1;e>=0;e--){t=t<<8;var u=a[e];e!==0&&(u=u|128),t=t|u}var g=t.toString(16).length;return g+=g%2,f(t,g)}b=function(){return new l}}(),Cr=b,Cr}var Mr,Ai;function Jo(){if(Ai)return Mr;Ai=1;var M=cs(),b;return function(){var v=1920;b=function(r,i){i===void 0&&(i={});var o=r.setUpAudio(i),s=M(),c=r.metaText?r.metaText.title:void 0;c&&c.length>128&&(c=c.substring(0,124)+"...");var f=r.getKeySignature(),h=r.getMeterFraction(),d=o.tempo,n=d/60;if(h.den===8&&h.num!==5&&h.num!==7){var t=r.millisecondsPerMeasure();d=6e4/(t/h.num)/2,n=d/60}s.setGlobalInfo(d,c,f,h);for(var a=0;a<o.tracks.length;a++){s.startTrack();for(var e={},u=0;u<o.tracks[a].length;u++){var g=o.tracks[a][u];switch(g.cmd){case"text":s.setText(g.type,g.text);break;case"program":var p=0;i.pan&&i.pan.length>a&&(p=i.pan[a]),g.instrument===128?(s.setChannel(9,p),s.setInstrument(0)):(s.setChannel(g.channel,p),s.setInstrument(g.instrument));break;case"note":var k=g.gap*n,x=g.start,T=x+g.duration-k;e[x]||(e[x]=[]),e[x].push({pitch:g.pitch,volume:g.volume,cents:g.cents}),e[T]||(e[T]=[]),e[T].push({pitch:g.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+g.cmd)}}l(s,e,v),s.endTrack()}return s.getData()};function l(r,i,o){for(var s=Object.keys(i),c=0;c<s.length;c++)s[c]=parseFloat(s[c]);s.sort(function(e,u){return e-u});for(var f=0,h=0;h<s.length;h++){var d=i[s[h]];if(s[h]>f){var n=(s[h]-f)*o;r.addRest(n),f=s[h]}for(var t=0;t<d.length;t++){var a=d[t];a.volume?r.startNote(a.pitch,a.volume,a.cents):r.endNote(a.pitch)}}}}(),Mr=b,Mr}var Sr,Pi;function Zo(){if(Pi)return Sr;Pi=1;var M=He(),b=Jo(),v=function(i,o){var s={};if(o)for(var c in o)o.hasOwnProperty(c)&&(s[c]=o[c]);s.generateInline=!1;function f(h,d,n){var t=b(d,s);switch(s.midiOutputType){case"encoded":return t;case"binary":var a=t.replace("data:audio/midi,","");a=a.replace(/MThd/g,"%4d%54%68%64"),a=a.replace(/MTrk/g,"%4d%54%72%6b");for(var e=new ArrayBuffer(a.length/3),u=new Uint8Array(e),g=0;g<a.length/3;g++){var p=g*3+1,k=parseInt(a.substring(p,p+2),16);u[g]=k}return u;case"link":default:return r(d,s,t,n)}}return typeof i=="string"?M.renderEngine(f,"*",i,s):f(null,i,0)};function l(i){var o={};return i&&o.toString.call(i)==="[object Function]"}var r=function(i,o,s,c){var f=["abcjs-download-midi","abcjs-midi-"+c];o.downloadClass&&f.push(o.downloadClass);var h='<div class="'+f.join(" ")+'">';o.preTextDownload&&(h+=o.preTextDownload);var d=i.metaText&&i.metaText.title?i.metaText.title:"Untitled",n;o.downloadLabel&&l(o.downloadLabel)?n=o.downloadLabel(i,c):o.downloadLabel?n=o.downloadLabel.replace(/%T/,d):n='Download MIDI for "'+d+'"',d=d.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_");var t=o.fileName?o.fileName:d+".midi";return h+='<a download="'+t+'" href="'+s+'">'+n+"</a>",o.postTextDownload&&(h+=o.postTextDownload),h+"</div>"};return Sr=v,Sr}var _r,Bi;function ls(){if(Bi)return _r;Bi=1;try{if(typeof window.CustomEvent!="function"){var M=function(v,l){l=l||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(v,l.bubbles,l.cancelable,l.detail),r};M.prototype=window.Event.prototype,window.CustomEvent=M}}catch{}var b=function(v){this.isEditArea=!0,typeof v=="string"?(this.textarea=document.getElementById(v),this.textarea||(this.textarea=document.querySelector(v))):this.textarea=v,this.initialText=this.textarea.value,this.isDragging=!1};return b.prototype.addSelectionListener=function(v){this.textarea.onmousemove=function(l){this.isDragging&&v.fireSelectionChanged()}},b.prototype.addChangeListener=function(v){this.changelistener=v,this.textarea.onkeyup=function(){v.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,v.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,v.fireChanged()},this.textarea.onchange=function(){v.fireChanged()}},b.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},b.prototype.setSelection=function(v,l){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(v,l);else if(this.textarea.createTextRange){var r=this.textarea.createTextRange();r.collapse(!0),r.moveEnd("character",l),r.moveStart("character",v),r.select()}this.textarea.focus()},b.prototype.getString=function(){return this.textarea.value},b.prototype.setString=function(v){this.textarea.value=v,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},b.prototype.getElem=function(){return this.textarea},_r=b,_r}var Er,Ni;function ec(){if(Ni)return Er;Ni=1;var M=Ce(),b=os(),v=Ve(),l=ns(),r=ls();function i(s){var c={},f;if(s.abcjsParams)for(f in s.abcjsParams)s.abcjsParams.hasOwnProperty(f)&&(c[f]=s.abcjsParams[f]);if(s.midi_options)for(f in s.midi_options)s.midi_options.hasOwnProperty(f)&&(c[f]=s.midi_options[f]);if(s.parser_options)for(f in s.parser_options)s.parser_options.hasOwnProperty(f)&&(c[f]=s.parser_options[f]);if(s.render_options)for(f in s.render_options)s.render_options.hasOwnProperty(f)&&(c[f]=s.render_options[f]);return c.tablature&&s.warnings_id&&(c.tablature.warnings_id=s.warnings_id),c}var o=function(s,c){this.abcjsParams=i(c),c.indicate_changed&&(this.indicate_changed=!0),typeof s=="string"?this.editarea=new r(s):s.isEditArea?this.editarea=s:this.editarea=new r(s),this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),c.canvas_id?this.div=c.canvas_id:c.paper_id?this.div=c.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),typeof this.div=="string"&&(this.div=document.getElementById(this.div)),c.selectionChangeCallback&&(this.selectionChangeCallback=c.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),c.synth&&v()&&(this.synth={el:c.synth.el,cursorControl:c.synth.cursorControl,options:c.synth.options}),c.generate_midi&&(this.generate_midi=c.generate_midi,this.abcjsParams.generateDownload&&(typeof c.midi_download_id=="string"?this.downloadMidi=document.getElementById(c.midi_download_id):c.midi_download_id&&(this.downloadMidi=c.midi_download_id)),this.abcjsParams.generateInline!==!1&&(typeof c.midi_id=="string"?this.inlineMidi=document.getElementById(c.midi_id):c.midi_id&&(this.inlineMidi=c.midi_id))),c.warnings_id?typeof c.warnings_id=="string"?this.warningsdiv=document.getElementById(c.warnings_id):this.warningsdiv=c.warnings_id:c.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=c.onchange,this.redrawCallback=c.redrawCallback,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(f,h){var d=function(n,t){var a=n.className;return a.length>0&&(a===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(a))};return d(f,h)||(f.className+=(f.className?" ":"")+h),f},this.removeClassName=function(f,h){return f.className=M.strip(f.className.replace(new RegExp("(^|\\s+)"+h+"(\\s+|$)")," ")),f},this.setReadOnly=function(f){var h="abc_textarea_readonly",d=this.editarea.getElem();f?(d.setAttribute("readonly","yes"),this.addClassName(d,h)):(d.removeAttribute("readonly"),this.removeClassName(d,h))}};return o.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var s=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(s)}if(this.synth){var c=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new b,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],c,this.synth.options)}},o.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.redrawCallback&&this.redrawCallback(!0),this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=l(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.redrawCallback&&this.redrawCallback(!1)}catch(s){console.error("ABCJS error: ",s),this.warnings||(this.warnings=[]),this.warnings.push(s.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.updateSelection(),this.bReentry=!1}},o.prototype.paramChanged=function(s){if(s)for(var c in s)s.hasOwnProperty(c)&&(this.abcjsParams[c]=s[c]);this.currentAbc="",this.fireChanged()},o.prototype.getTunes=function(){return this.tunes},o.prototype.synthParamChanged=function(s){if(this.synth){if(this.synth.options={},s)for(var c in s)s.hasOwnProperty(c)&&(this.synth.options[c]=s[c]);this.currentAbc="",this.fireChanged()}},o.prototype.parseABC=function(){var s=this.editarea.getString();return s===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=s,!0)},o.prototype.updateSelection=function(){var s=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(s.start,s.end)}catch{}this.selectionChangeCallback&&this.selectionChangeCallback(s.start,s.end)},o.prototype.fireSelectionChanged=function(){this.updateSelection()},o.prototype.setDirtyStyle=function(s){if(this.indicate_changed!==void 0){var c=function(n,t){var a=function(e,u){var g=e.className;return g.length>0&&(g===u||new RegExp("(^|\\s)"+u+"(\\s|$)").test(g))};return a(n,t)||(n.className+=(n.className?" ":"")+t),n},f=function(n,t){return n.className=M.strip(n.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ")),n},h="abc_textarea_dirty",d=this.editarea.getElem();s?c(d,h):f(d,h)}},o.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var s=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){s.modelChanged()},300);var c=this.isDirty();this.wasDirty!==c&&(this.wasDirty=c,this.setDirtyStyle(c)),this.onchangeCallback&&this.onchangeCallback(this)}},o.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},o.prototype.isDirty=function(){return this.indicate_changed===void 0?!1:this.editarea.initialText!==this.editarea.getString()},o.prototype.highlight=function(s,c,f,h,d,n){this.editarea.setSelection(s.startChar,s.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(s.startChar,s.endChar),this.clientClickListener&&this.clientClickListener(s,c,f,h,d,n)},o.prototype.pause=function(s){this.bIsPaused=s,s||this.fireChanged()},o.prototype.millisecondsPerMeasure=function(){return!this.synth||!this.synth.synthControl||!this.synth.synthControl.visualObj?0:this.synth.synthControl.visualObj.millisecondsPerMeasure()},o.prototype.pauseMidi=function(s){this.midiPause=s,s||this.redrawMidi()},Er=o,Er}var Ar,Oi;function tc(){if(Oi)return Ar;Oi=1;var M=ms(),b=gs(),v=He(),l=Fi(),r=js(),i={};i.signature="abcjs-basic v"+M,Object.keys(b).forEach(function(k){i[k]=b[k]}),Object.keys(v).forEach(function(k){i[k]=v[k]}),i.renderAbc=ns(),i.tuneMetrics=Go(),i.TimingCallbacks=Pr();var o=Be();i.setGlyph=o.setSymbol,i.strTranspose=r;var s=Vr(),c=Hr(),f=Gr(),h=is(),d=ss(),n=Ge(),t=Ie(),a=Ve(),e=Qo(),u=os(),g=Zo(),p=cs();return i.synth={CreateSynth:s,instrumentIndexToName:c,pitchToNoteName:f,SynthController:u,SynthSequence:h,CreateSynthControl:d,registerAudioContext:n,activeAudioContext:t,supportsAudio:a,playEvent:e,getMidiFile:g,sequence:l,midiRenderer:p},i.Editor=ec(),i.EditArea=ls(),Ar=i,Ar}var hs=tc();const rc=fs(hs),ac=ps({__proto__:null,default:rc},[hs]);export{ac as i};
|