orbitchat 3.10.6 → 3.10.7
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-9FnwPEBX.js +105 -0
- package/dist/assets/MermaidRenderer-CnzIvTlj.js +317 -0
- package/dist/assets/{MusicRenderer-DW6lysGY.js → MusicRenderer-fgx5dq-k.js} +2 -2
- package/dist/assets/{SVGRenderer-DAIMVJgr.js → SVGRenderer-CZNFFAA_.js} +1 -1
- package/dist/assets/abnfDiagram-VRR7QNED-DChuAW5u.js +1 -0
- package/dist/assets/architectureDiagram-ZJ3FMSHR-DHJZWJhu.js +36 -0
- package/dist/assets/blockDiagram-677ZJIJ3-H_CNYF5m.js +132 -0
- package/dist/assets/{c4Diagram-AAUBKEIU-Cmx-NXVO.js → c4Diagram-LMCZKHZV-BUftbNWY.js} +1 -1
- package/dist/assets/channel-Cfw3OpIn.js +1 -0
- package/dist/assets/{chunk-QZHKN3VN-CZzLds6P.js → chunk-2Q5K7J3B-CdU2Q6YZ.js} +1 -1
- package/dist/assets/{chunk-ND2GUHAM-BodP1saw.js → chunk-32BRIVSS-DnDG740s.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-MubvFkwu.js → chunk-5VM5RSS4-CQacO1HV.js} +1 -1
- package/dist/assets/chunk-EX3LRPZG-Bq0HhB2B.js +231 -0
- package/dist/assets/{chunk-4BX2VUAB-CJj_7pn2.js → chunk-JWPE2WC7-BjHi_aEM.js} +1 -1
- package/dist/assets/chunk-MOJQB5TN-D2zfH4wm.js +88 -0
- package/dist/assets/chunk-RYQCIY6F-DSJh0d2F.js +1 -0
- package/dist/assets/{chunk-727SXJPM-CL3otgv0.js → chunk-V7JOEXUC-hSR6fEWT.js} +4 -4
- package/dist/assets/{chunk-2J33WTMH-CUt5uiXo.js → chunk-VR4S4FIN-uT68_7rT.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DVyyaDvO.js → chunk-XXDRQBXY-BrvJt-u-.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-BkFPBJiF.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-BkFPBJiF.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DEY7stpG.js → cose-bilkent-JH36ORCC-C0vhiJLV.js} +1 -1
- package/dist/assets/cynefin-VYW2F7L2-CyM6ijR6.js +178 -0
- package/dist/assets/cynefinDiagram-TSTJHNR4-MevACWGH.js +62 -0
- package/dist/assets/dagre-VKFMJZFB-BqR7tzk8.js +4 -0
- package/dist/assets/{diagram-KO2AKTUF-D05qxtNL.js → diagram-FQU43EPY-IlESJ0wh.js} +3 -3
- package/dist/assets/diagram-G47NLZAW-Bqjk3ZYu.js +24 -0
- package/dist/assets/{diagram-LMA3HP47-CnQ23_X8.js → diagram-NH7WQ7WH-B63W-pyC.js} +2 -2
- package/dist/assets/diagram-OA4YK3LP-B0THRF0G.js +30 -0
- package/dist/assets/diagram-WEI45ONY-IZZ69bsz.js +41 -0
- package/dist/assets/{docx-preview-C0UevYcE.js → docx-preview-CMb3nQfR.js} +1 -1
- package/dist/assets/ebnfDiagram-CCIWWBDH-B_U7c6VT.js +1 -0
- package/dist/assets/erDiagram-Q63AITRT-oGWxlmE8.js +85 -0
- package/dist/assets/flowDiagram-23GEKE2U-0scCMi71.js +156 -0
- package/dist/assets/ganttDiagram-NO4QXBWP-DIS-iO_q.js +292 -0
- package/dist/assets/{gitGraphDiagram-PVQCEYII-BmCo7lBu.js → gitGraphDiagram-IHSO6WYX-DsT87XU7.js} +7 -7
- package/dist/assets/{graph-CAnANduQ.js → graph-C9eacEi8.js} +1 -1
- package/dist/assets/{index--_ARL9JL.js → index-C0slAIYD.js} +1 -1
- package/dist/assets/index-DfypiZL2.js +366 -0
- package/dist/assets/index-DqIwGcah.css +1 -0
- package/dist/assets/{infoDiagram-5YYISTIA-CPT2KkJP.js → infoDiagram-FWYZ7A6U-CkLm2oOh.js} +2 -2
- package/dist/assets/{ishikawaDiagram-YF4QCWOH-BKDzsZ93.js → ishikawaDiagram-FXEZZL3T-BEPnPebm.js} +5 -5
- package/dist/assets/{journeyDiagram-JHISSGLW-CZBIRXVn.js → journeyDiagram-5HDEW3XC-B3Sx5g-O.js} +1 -1
- package/dist/assets/{kanban-definition-UN3LZRKU-Dg7Po601.js → kanban-definition-HUTT4EX6-BZwqoKM8.js} +6 -6
- package/dist/assets/layout-DEXfKzaS.js +1 -0
- package/dist/assets/map-Czzmt4hB.js +1 -0
- package/dist/assets/{mindmap-definition-RKZ34NQL-DDJH6RNg.js → mindmap-definition-LN4V7U3C-CyjRWos4.js} +9 -9
- package/dist/assets/{papaparse.min-CdRM_ppG.js → papaparse.min-BWA-Odol.js} +1 -1
- package/dist/assets/pegDiagram-2B236MQR-DItVX4G3.js +1 -0
- package/dist/assets/pieDiagram-ENE6RG2P-CTRyME0H.js +39 -0
- package/dist/assets/{quadrantDiagram-W4KKPZXB-BApnkjpH.js → quadrantDiagram-ABIIQ3AL-DW4gRbec.js} +3 -3
- package/dist/assets/railroadDiagram-RFXS5EU6-_rBw9Q9b.js +1 -0
- package/dist/assets/{requirementDiagram-4Y6WPE33-B3wRcSqV.js → requirementDiagram-TGXJPOKE-D898qBnU.js} +1 -1
- package/dist/assets/sankeyDiagram-HTMAVEWB-doAkRLNI.js +40 -0
- package/dist/assets/sequenceDiagram-DBY2YBRQ-D4HUsfB2.js +162 -0
- package/dist/assets/sizeCapture-X5ZJPWSS-DJJLR6R7.js +1 -0
- package/dist/assets/stateDiagram-2N3HPSRC-0IOXcLaP.js +1 -0
- package/dist/assets/stateDiagram-v2-6OUMAXLB-BjcuRalB.js +1 -0
- package/dist/assets/swimlanes-5IMT3BWC-HIPL1mdx.js +2 -0
- package/dist/assets/swimlanesDiagram-G3AALYLV-usVEFD6y.js +8 -0
- package/dist/assets/{timeline-definition-PNZ67QCA-kNKpwGZ_.js → timeline-definition-FHXFAJF6-CgFiawCT.js} +3 -3
- package/dist/assets/vendor-auth-CF3lY_Q5.js +5 -0
- package/dist/assets/{vendor-markdown-CQ_RitqP.js → vendor-markdown-BRX1CUPf.js} +9 -9
- package/dist/assets/{vendor-react-C3O77mRn.js → vendor-react-BAJBiXxk.js} +1 -1
- package/dist/assets/{vendor-syntax-Bg-E9hW_.js → vendor-syntax-DG6Vo7Ci.js} +1 -1
- package/dist/assets/vennDiagram-L72KCM5P-DiY3ySIT.js +34 -0
- package/dist/assets/{wardleyDiagram-YWT4CUSO-CvoUjOCY.js → wardleyDiagram-EHGQE667-CtRzQ3q6.js} +3 -3
- package/dist/assets/xychartDiagram-FW5EYKEG-OjszPLMV.js +7 -0
- package/dist/index.html +6 -6
- package/package.json +6 -2
- package/dist/assets/ChartRenderer-DyMx9C0M.js +0 -80
- package/dist/assets/MermaidRenderer-DNbuWll0.js +0 -312
- package/dist/assets/architectureDiagram-3BPJPVTR-Cow01YMa.js +0 -36
- package/dist/assets/blockDiagram-GPEHLZMM-C5XzJyId.js +0 -132
- package/dist/assets/channel-BPmzEReZ.js +0 -1
- package/dist/assets/chunk-AQP2D5EJ-C45-Gx0g.js +0 -231
- package/dist/assets/classDiagram-4FO5ZUOK-DsBJVdDP.js +0 -1
- package/dist/assets/classDiagram-v2-Q7XG4LA2-DsBJVdDP.js +0 -1
- package/dist/assets/dagre-BM42HDAG-W9SEsE-N.js +0 -4
- package/dist/assets/diagram-2AECGRRQ-BlqzAN8a.js +0 -43
- package/dist/assets/diagram-5GNKFQAL-BLp8AGzL.js +0 -10
- package/dist/assets/diagram-OG6HWLK6-CA92e8BM.js +0 -24
- package/dist/assets/erDiagram-TEJ5UH35-DSF2yibf.js +0 -85
- package/dist/assets/flowDiagram-I6XJVG4X-DY5MD6ts.js +0 -162
- package/dist/assets/ganttDiagram-6RSMTGT7-BgubAiWl.js +0 -292
- package/dist/assets/index-BJrmNldF.css +0 -1
- package/dist/assets/index-DZzHHAye.js +0 -366
- package/dist/assets/layout-DGIYPm2g.js +0 -1
- package/dist/assets/pieDiagram-4H26LBE5-VmwJRM5q.js +0 -30
- package/dist/assets/sankeyDiagram-5OEKKPKP-CMdvyTCy.js +0 -40
- package/dist/assets/sequenceDiagram-3UESZ5HK-Bez2saVY.js +0 -162
- package/dist/assets/stateDiagram-AJRCARHV-CnB2Ac4-.js +0 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-D_TnKrY9.js +0 -1
- package/dist/assets/vendor-auth-CrXMNoGZ.js +0 -5
- package/dist/assets/vennDiagram-CIIHVFJN-DiFbBKbD.js +0 -34
- package/dist/assets/wardley-L42UT6IY-BftqliwA.js +0 -173
- package/dist/assets/xychartDiagram-2RQKCTM6-eU0cm1JE.js +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
var Ze=typeof global=="object"&&global&&global.Object===Object&&global,pt=typeof self=="object"&&self&&self.Object===Object&&self,w=Ze||pt||Function("return this")(),y=w.Symbol,We=Object.prototype,_t=We.hasOwnProperty,bt=We.toString,D=y?y.toStringTag:void 0;function yt(e){var t=_t.call(e,D),r=e[D];try{e[D]=void 0;var n=!0}catch{}var i=bt.call(e);return n&&(t?e[D]=r:delete e[D]),i}var vt=Object.prototype,Ot=vt.toString;function mt(e){return Ot.call(e)}var wt="[object Null]",Tt="[object Undefined]",Oe=y?y.toStringTag:void 0;function M(e){return e==null?e===void 0?Tt:wt:Oe&&Oe in Object(e)?yt(e):mt(e)}function j(e){return e!=null&&typeof e=="object"}var At="[object Symbol]";function he(e){return typeof e=="symbol"||j(e)&&M(e)==At}function Je(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var g=Array.isArray,me=y?y.prototype:void 0,we=me?me.toString:void 0;function Qe(e){if(typeof e=="string")return e;if(g(e))return Je(e,Qe)+"";if(he(e))return we?we.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function J(e){return e}var Pt="[object AsyncFunction]",Et="[object Function]",$t="[object GeneratorFunction]",St="[object Proxy]";function Z(e){if(!ce(e))return!1;var t=M(e);return t==Et||t==$t||t==Pt||t==St}var re=w["__core-js_shared__"],Te=(function(){var e=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Ct(e){return!!Te&&Te in e}var jt=Function.prototype,xt=jt.toString;function I(e){if(e!=null){try{return xt.call(e)}catch{}try{return e+""}catch{}}return""}var It=/[\\^$.*+?()[\]{}|]/g,Lt=/^\[object .+?Constructor\]$/,Rt=Function.prototype,Nt=Object.prototype,Mt=Rt.toString,Dt=Nt.hasOwnProperty,Ft=RegExp("^"+Mt.call(Dt).replace(It,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gt(e){if(!ce(e)||Ct(e))return!1;var t=Z(e)?Ft:Lt;return t.test(I(e))}function Ut(e,t){return e==null?void 0:e[t]}function L(e,t){var r=Ut(e,t);return Gt(r)?r:void 0}var oe=L(w,"WeakMap");function zt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ht(){}var Bt=800,Kt=16,qt=Date.now;function Xt(e){var t=0,r=0;return function(){var n=qt(),i=Kt-(n-r);if(r=n,i>0){if(++t>=Bt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function F(e){return function(){return e}}var Ae=(function(){try{var e=L(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Yt=Ae?function(e,t){return Ae(e,"toString",{configurable:!0,enumerable:!1,value:F(t),writable:!0})}:J,Zt=Xt(Yt);function Wt(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function Jt(e,t,r,n){for(var i=e.length,s=r+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function Qt(e){return e!==e}function Vt(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function kt(e,t,r){return t===t?Vt(e,t,r):Jt(e,Qt,r)}function er(e,t){var r=e==null?0:e.length;return!!r&&kt(e,t,0)>-1}var tr=9007199254740991,rr=/^(?:0|[1-9]\d*)$/;function Ve(e,t){var r=typeof e;return t=t??tr,!!t&&(r=="number"||r!="symbol"&&rr.test(e))&&e>-1&&e%1==0&&e<t}function ke(e,t){return e===t||e!==e&&t!==t}var Pe=Math.max;function nr(e,t,r){return t=Pe(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Pe(n.length-t,0),a=Array(s);++i<s;)a[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=r(a),zt(e,this,o)}}function ir(e,t){return Zt(nr(e,t,J),e+"")}var sr=9007199254740991;function le(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sr}function Q(e){return e!=null&&le(e.length)&&!Z(e)}var ar=Object.prototype;function et(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ar;return e===r}function or(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ur="[object Arguments]";function Ee(e){return j(e)&&M(e)==ur}var tt=Object.prototype,fr=tt.hasOwnProperty,hr=tt.propertyIsEnumerable,V=Ee((function(){return arguments})())?Ee:function(e){return j(e)&&fr.call(e,"callee")&&!hr.call(e,"callee")};function cr(){return!1}var rt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$e=rt&&typeof module=="object"&&module&&!module.nodeType&&module,lr=$e&&$e.exports===rt,Se=lr?w.Buffer:void 0,dr=Se?Se.isBuffer:void 0,W=dr||cr,gr="[object Arguments]",pr="[object Array]",_r="[object Boolean]",br="[object Date]",yr="[object Error]",vr="[object Function]",Or="[object Map]",mr="[object Number]",wr="[object Object]",Tr="[object RegExp]",Ar="[object Set]",Pr="[object String]",Er="[object WeakMap]",$r="[object ArrayBuffer]",Sr="[object DataView]",Cr="[object Float32Array]",jr="[object Float64Array]",xr="[object Int8Array]",Ir="[object Int16Array]",Lr="[object Int32Array]",Rr="[object Uint8Array]",Nr="[object Uint8ClampedArray]",Mr="[object Uint16Array]",Dr="[object Uint32Array]",h={};h[Cr]=h[jr]=h[xr]=h[Ir]=h[Lr]=h[Rr]=h[Nr]=h[Mr]=h[Dr]=!0;h[gr]=h[pr]=h[$r]=h[_r]=h[Sr]=h[br]=h[yr]=h[vr]=h[Or]=h[mr]=h[wr]=h[Tr]=h[Ar]=h[Pr]=h[Er]=!1;function Fr(e){return j(e)&&le(e.length)&&!!h[M(e)]}function Gr(e){return function(t){return e(t)}}var nt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,U=nt&&typeof module=="object"&&module&&!module.nodeType&&module,Ur=U&&U.exports===nt,ne=Ur&&Ze.process,Ce=(function(){try{var e=U&&U.require&&U.require("util").types;return e||ne&&ne.binding&&ne.binding("util")}catch{}})(),je=Ce&&Ce.isTypedArray,de=je?Gr(je):Fr,zr=Object.prototype,Hr=zr.hasOwnProperty;function Br(e,t){var r=g(e),n=!r&&V(e),i=!r&&!n&&W(e),s=!r&&!n&&!i&&de(e),a=r||n||i||s,o=a?or(e.length,String):[],u=o.length;for(var f in e)(t||Hr.call(e,f))&&!(a&&(f=="length"||i&&(f=="offset"||f=="parent")||s&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Ve(f,u)))&&o.push(f);return o}function Kr(e,t){return function(r){return e(t(r))}}var qr=Kr(Object.keys,Object),Xr=Object.prototype,Yr=Xr.hasOwnProperty;function it(e){if(!et(e))return qr(e);var t=[];for(var r in Object(e))Yr.call(e,r)&&r!="constructor"&&t.push(r);return t}function b(e){return Q(e)?Br(e):it(e)}var Zr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wr=/^\w*$/;function ge(e,t){if(g(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||he(e)?!0:Wr.test(e)||!Zr.test(e)||t!=null&&e in Object(t)}var z=L(Object,"create");function Jr(){this.__data__=z?z(null):{},this.size=0}function Qr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Vr="__lodash_hash_undefined__",kr=Object.prototype,en=kr.hasOwnProperty;function tn(e){var t=this.__data__;if(z){var r=t[e];return r===Vr?void 0:r}return en.call(t,e)?t[e]:void 0}var rn=Object.prototype,nn=rn.hasOwnProperty;function sn(e){var t=this.__data__;return z?t[e]!==void 0:nn.call(t,e)}var an="__lodash_hash_undefined__";function on(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=z&&t===void 0?an:t,this}function x(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}x.prototype.clear=Jr;x.prototype.delete=Qr;x.prototype.get=tn;x.prototype.has=sn;x.prototype.set=on;function un(){this.__data__=[],this.size=0}function k(e,t){for(var r=e.length;r--;)if(ke(e[r][0],t))return r;return-1}var fn=Array.prototype,hn=fn.splice;function cn(e){var t=this.__data__,r=k(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():hn.call(t,r,1),--this.size,!0}function ln(e){var t=this.__data__,r=k(t,e);return r<0?void 0:t[r][1]}function dn(e){return k(this.__data__,e)>-1}function gn(e,t){var r=this.__data__,n=k(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function T(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}T.prototype.clear=un;T.prototype.delete=cn;T.prototype.get=ln;T.prototype.has=dn;T.prototype.set=gn;var H=L(w,"Map");function pn(){this.size=0,this.__data__={hash:new x,map:new(H||T),string:new x}}function _n(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ee(e,t){var r=e.__data__;return _n(t)?r[typeof t=="string"?"string":"hash"]:r.map}function bn(e){var t=ee(this,e).delete(e);return this.size-=t?1:0,t}function yn(e){return ee(this,e).get(e)}function vn(e){return ee(this,e).has(e)}function On(e,t){var r=ee(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function A(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}A.prototype.clear=pn;A.prototype.delete=bn;A.prototype.get=yn;A.prototype.has=vn;A.prototype.set=On;var mn="Expected a function";function pe(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(mn);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(pe.Cache||A),r}pe.Cache=A;var wn=500;function Tn(e){var t=pe(e,function(n){return r.size===wn&&r.clear(),n}),r=t.cache;return t}var An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pn=/\\(\\)?/g,En=Tn(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(An,function(r,n,i,s){t.push(i?s.replace(Pn,"$1"):n||r)}),t});function $n(e){return e==null?"":Qe(e)}function st(e,t){return g(e)?e:ge(e,t)?[e]:En($n(e))}function te(e){if(typeof e=="string"||he(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function at(e,t){t=st(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[te(t[r++])];return r&&r==n?e:void 0}function Sn(e,t,r){var n=e==null?void 0:at(e,t);return n===void 0?r:n}function ot(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var xe=y?y.isConcatSpreadable:void 0;function Cn(e){return g(e)||V(e)||!!(xe&&e&&e[xe])}function jn(e,t,r,n,i){var s=-1,a=e.length;for(r||(r=Cn),i||(i=[]);++s<a;){var o=e[s];r(o)?ot(i,o):n||(i[i.length]=o)}return i}function xn(e,t,r,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}function In(){this.__data__=new T,this.size=0}function Ln(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Rn(e){return this.__data__.get(e)}function Nn(e){return this.__data__.has(e)}var Mn=200;function Dn(e,t){var r=this.__data__;if(r instanceof T){var n=r.__data__;if(!H||n.length<Mn-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new A(n)}return r.set(e,t),this.size=r.size,this}function m(e){var t=this.__data__=new T(e);this.size=t.size}m.prototype.clear=In;m.prototype.delete=Ln;m.prototype.get=Rn;m.prototype.has=Nn;m.prototype.set=Dn;function ut(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}function Fn(){return[]}var Gn=Object.prototype,Un=Gn.propertyIsEnumerable,Ie=Object.getOwnPropertySymbols,zn=Ie?function(e){return e==null?[]:(e=Object(e),ut(Ie(e),function(t){return Un.call(e,t)}))}:Fn;function Hn(e,t,r){var n=t(e);return g(e)?n:ot(n,r(e))}function Le(e){return Hn(e,b,zn)}var ue=L(w,"DataView"),fe=L(w,"Promise"),N=L(w,"Set"),Re="[object Map]",Bn="[object Object]",Ne="[object Promise]",Me="[object Set]",De="[object WeakMap]",Fe="[object DataView]",Kn=I(ue),qn=I(H),Xn=I(fe),Yn=I(N),Zn=I(oe),O=M;(ue&&O(new ue(new ArrayBuffer(1)))!=Fe||H&&O(new H)!=Re||fe&&O(fe.resolve())!=Ne||N&&O(new N)!=Me||oe&&O(new oe)!=De)&&(O=function(e){var t=M(e),r=t==Bn?e.constructor:void 0,n=r?I(r):"";if(n)switch(n){case Kn:return Fe;case qn:return Re;case Xn:return Ne;case Yn:return Me;case Zn:return De}return t});var Ge=w.Uint8Array,Wn="__lodash_hash_undefined__";function Jn(e){return this.__data__.set(e,Wn),this}function Qn(e){return this.__data__.has(e)}function B(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new A;++t<r;)this.add(e[t])}B.prototype.add=B.prototype.push=Jn;B.prototype.has=Qn;function Vn(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function ft(e,t){return e.has(t)}var kn=1,ei=2;function ht(e,t,r,n,i,s){var a=r&kn,o=e.length,u=t.length;if(o!=u&&!(a&&u>o))return!1;var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var c=-1,l=!0,v=r&ei?new B:void 0;for(s.set(e,t),s.set(t,e);++c<o;){var p=e[c],_=t[c];if(n)var P=a?n(_,p,c,t,e,s):n(p,_,c,e,t,s);if(P!==void 0){if(P)continue;l=!1;break}if(v){if(!Vn(t,function(E,$){if(!ft(v,$)&&(p===E||i(p,E,r,n,s)))return v.push($)})){l=!1;break}}else if(!(p===_||i(p,_,r,n,s))){l=!1;break}}return s.delete(e),s.delete(t),l}function ti(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function _e(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ri=1,ni=2,ii="[object Boolean]",si="[object Date]",ai="[object Error]",oi="[object Map]",ui="[object Number]",fi="[object RegExp]",hi="[object Set]",ci="[object String]",li="[object Symbol]",di="[object ArrayBuffer]",gi="[object DataView]",Ue=y?y.prototype:void 0,ie=Ue?Ue.valueOf:void 0;function pi(e,t,r,n,i,s,a){switch(r){case gi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case di:return!(e.byteLength!=t.byteLength||!s(new Ge(e),new Ge(t)));case ii:case si:case ui:return ke(+e,+t);case ai:return e.name==t.name&&e.message==t.message;case fi:case ci:return e==t+"";case oi:var o=ti;case hi:var u=n&ri;if(o||(o=_e),e.size!=t.size&&!u)return!1;var f=a.get(e);if(f)return f==t;n|=ni,a.set(e,t);var d=ht(o(e),o(t),n,i,s,a);return a.delete(e),d;case li:if(ie)return ie.call(e)==ie.call(t)}return!1}var _i=1,bi=Object.prototype,yi=bi.hasOwnProperty;function vi(e,t,r,n,i,s){var a=r&_i,o=Le(e),u=o.length,f=Le(t),d=f.length;if(u!=d&&!a)return!1;for(var c=u;c--;){var l=o[c];if(!(a?l in t:yi.call(t,l)))return!1}var v=s.get(e),p=s.get(t);if(v&&p)return v==t&&p==e;var _=!0;s.set(e,t),s.set(t,e);for(var P=a;++c<u;){l=o[c];var E=e[l],$=t[l];if(n)var ve=a?n($,E,l,t,e,s):n(E,$,l,e,t,s);if(!(ve===void 0?E===$||i(E,$,r,n,s):ve)){_=!1;break}P||(P=l=="constructor")}if(_&&!P){var K=e.constructor,q=t.constructor;K!=q&&"constructor"in e&&"constructor"in t&&!(typeof K=="function"&&K instanceof K&&typeof q=="function"&&q instanceof q)&&(_=!1)}return s.delete(e),s.delete(t),_}var Oi=1,ze="[object Arguments]",He="[object Array]",X="[object Object]",mi=Object.prototype,Be=mi.hasOwnProperty;function wi(e,t,r,n,i,s){var a=g(e),o=g(t),u=a?He:O(e),f=o?He:O(t);u=u==ze?X:u,f=f==ze?X:f;var d=u==X,c=f==X,l=u==f;if(l&&W(e)){if(!W(t))return!1;a=!0,d=!1}if(l&&!d)return s||(s=new m),a||de(e)?ht(e,t,r,n,i,s):pi(e,t,u,r,n,i,s);if(!(r&Oi)){var v=d&&Be.call(e,"__wrapped__"),p=c&&Be.call(t,"__wrapped__");if(v||p){var _=v?e.value():e,P=p?t.value():t;return s||(s=new m),i(_,P,r,n,s)}}return l?(s||(s=new m),vi(e,t,r,n,i,s)):!1}function be(e,t,r,n,i){return e===t?!0:e==null||t==null||!j(e)&&!j(t)?e!==e&&t!==t:wi(e,t,r,n,be,i)}var Ti=1,Ai=2;function Pi(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){a=r[i];var o=a[0],u=e[o],f=a[1];if(a[2]){if(u===void 0&&!(o in e))return!1}else{var d=new m,c;if(!(c===void 0?be(f,u,Ti|Ai,n,d):c))return!1}}return!0}function ct(e){return e===e&&!ce(e)}function Ei(e){for(var t=b(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ct(i)]}return t}function lt(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function $i(e){var t=Ei(e);return t.length==1&&t[0][2]?lt(t[0][0],t[0][1]):function(r){return r===e||Pi(r,e,t)}}function Si(e,t){return e!=null&&t in Object(e)}function Ci(e,t,r){t=st(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=te(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&le(i)&&Ve(a,i)&&(g(e)||V(e)))}function ji(e,t){return e!=null&&Ci(e,t,Si)}var xi=1,Ii=2;function Li(e,t){return ge(e)&&ct(t)?lt(te(e),t):function(r){var n=Sn(r,e);return n===void 0&&n===t?ji(r,e):be(t,n,xi|Ii)}}function Ri(e){return function(t){return t==null?void 0:t[e]}}function Ni(e){return function(t){return at(t,e)}}function Mi(e){return ge(e)?Ri(te(e)):Ni(e)}function dt(e){return typeof e=="function"?e:e==null?J:typeof e=="object"?g(e)?Li(e[0],e[1]):$i(e):Mi(e)}function Di(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var u=a[++i];if(r(s[u],u,s)===!1)break}return t}}var Fi=Di();function Gi(e,t){return e&&Fi(e,t,b)}function Ui(e,t){return function(r,n){if(r==null)return r;if(!Q(r))return e(r,n);for(var i=r.length,s=-1,a=Object(r);++s<i&&n(a[s],s,a)!==!1;);return r}}var ye=Ui(Gi);function zi(e){return j(e)&&Q(e)}function Hi(e){return typeof e=="function"?e:J}function S(e,t){var r=g(e)?Wt:ye;return r(e,Hi(t))}function Bi(e,t){var r=[];return ye(e,function(n,i,s){t(n,i,s)&&r.push(n)}),r}function Y(e,t){var r=g(e)?ut:Bi;return r(e,dt(t))}function Ki(e,t){return Je(t,function(r){return e[r]})}function se(e){return e==null?[]:Ki(e,b(e))}var qi="[object Map]",Xi="[object Set]",Yi=Object.prototype,Zi=Yi.hasOwnProperty;function Ke(e){if(e==null)return!0;if(Q(e)&&(g(e)||typeof e=="string"||typeof e.splice=="function"||W(e)||de(e)||V(e)))return!e.length;var t=O(e);if(t==qi||t==Xi)return!e.size;if(et(e))return!it(e).length;for(var r in e)if(Zi.call(e,r))return!1;return!0}function R(e){return e===void 0}function Wi(e,t,r,n,i){return i(e,function(s,a,o){r=n?(n=!1,s):t(r,s,a,o)}),r}function Ji(e,t,r){var n=g(e)?xn:Wi,i=arguments.length<3;return n(e,dt(t),r,i,ye)}var Qi=1/0,Vi=N&&1/_e(new N([,-0]))[1]==Qi?function(e){return new N(e)}:Ht,ki=200;function es(e,t,r){var n=-1,i=er,s=e.length,a=!0,o=[],u=o;if(s>=ki){var f=Vi(e);if(f)return _e(f);a=!1,i=ft,u=new B}else u=o;e:for(;++n<s;){var d=e[n],c=d;if(d=d!==0?d:0,a&&c===c){for(var l=u.length;l--;)if(u[l]===c)continue e;o.push(d)}else i(u,c,r)||(u!==o&&u.push(c),o.push(d))}return o}var ts=ir(function(e){return es(jn(e,1,zi,!0))}),rs="\0",C="\0",qe="";class gt{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=F(void 0),this._defaultEdgeLabelFn=F(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[C]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return Z(t)||(t=F(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return b(this._nodes)}sources(){var t=this;return Y(this.nodes(),function(r){return Ke(t._in[r])})}sinks(){var t=this;return Y(this.nodes(),function(r){return Ke(t._out[r])})}setNodes(t,r){var n=arguments,i=this;return S(t,function(s){n.length>1?i.setNode(s,r):i.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=C,this._children[t]={},this._children[C][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],S(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),S(b(this._in[t]),r),delete this._in[t],delete this._preds[t],S(b(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(R(r))r=C;else{r+="";for(var n=r;!R(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==C)return r}}children(t){if(R(t)&&(t=C),this._isCompound){var r=this._children[t];if(r)return b(r)}else{if(t===C)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return b(r)}successors(t){var r=this._sucs[t];if(r)return b(r)}neighbors(t){var r=this.predecessors(t);if(r)return ts(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;S(this._nodes,function(a,o){t(o)&&r.setNode(o,a)}),S(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,n.edge(a))});var i={};function s(a){var o=n.parent(a);return o===void 0||r.hasNode(o)?(i[a]=o,o):o in i?i[o]:s(o)}return this._isCompound&&S(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(t){return Z(t)||(t=F(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return se(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return Ji(t,function(s,a){return i.length>1?n.setEdge(s,a,r):n.setEdge(s,a),a}),this}setEdge(){var t,r,n,i,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,n=a.name,arguments.length===2&&(i=arguments[1],s=!0)):(t=a,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,r=""+r,R(n)||(n=""+n);var o=G(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return s&&(this._edgeLabels[o]=i),this;if(!R(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=s?i:this._defaultEdgeLabelFn(t,r,n);var u=ns(this._isDirected,t,r,n);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[o]=u,Xe(this._preds[r],t),Xe(this._sucs[t],r),this._in[r][o]=u,this._out[t][o]=u,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n),s=this._edgeObjs[i];return s&&(t=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Ye(this._preds[r],t),Ye(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=se(n);return r?Y(i,function(s){return s.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=se(n);return r?Y(i,function(s){return s.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}}gt.prototype._nodeCount=0;gt.prototype._edgeCount=0;function Xe(e,t){e[t]?e[t]++:e[t]=1}function Ye(e,t){--e[t]||delete e[t]}function G(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}return i+qe+s+qe+(R(n)?rs:n)}function ns(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}var o={v:i,w:s};return n&&(o.name=n),o}function ae(e,t){return G(e,t.v,t.w,t.name)}export{Y as $,m as A,Wt as B,g as C,Le as D,de as E,zi as F,gt as G,V as H,Z as I,Fi as J,dt as K,Jt as L,ye as M,Je as N,Hi as O,Gi as P,Ci as Q,J as R,y as S,st as T,Ge as U,te as V,at as W,ji as X,$n as Y,S as Z,F as _,he as a,se as a0,Ji as a1,ce as b,Q as c,Ae as d,ke as e,Ve as f,ir as g,et as h,R as i,Br as j,jn as k,Kr as l,j as m,M as n,nr as o,b as p,zn as q,w as r,Zt as s,Fn as t,ot as u,Hn as v,O as w,Gr as x,Ce as y,W as z};
|
|
1
|
+
var Ze=typeof global=="object"&&global&&global.Object===Object&&global,pt=typeof self=="object"&&self&&self.Object===Object&&self,w=Ze||pt||Function("return this")(),y=w.Symbol,We=Object.prototype,_t=We.hasOwnProperty,bt=We.toString,D=y?y.toStringTag:void 0;function yt(e){var t=_t.call(e,D),r=e[D];try{e[D]=void 0;var n=!0}catch{}var i=bt.call(e);return n&&(t?e[D]=r:delete e[D]),i}var vt=Object.prototype,Ot=vt.toString;function mt(e){return Ot.call(e)}var wt="[object Null]",Tt="[object Undefined]",Oe=y?y.toStringTag:void 0;function M(e){return e==null?e===void 0?Tt:wt:Oe&&Oe in Object(e)?yt(e):mt(e)}function j(e){return e!=null&&typeof e=="object"}var At="[object Symbol]";function he(e){return typeof e=="symbol"||j(e)&&M(e)==At}function Je(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var g=Array.isArray,me=y?y.prototype:void 0,we=me?me.toString:void 0;function Qe(e){if(typeof e=="string")return e;if(g(e))return Je(e,Qe)+"";if(he(e))return we?we.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function J(e){return e}var Pt="[object AsyncFunction]",Et="[object Function]",$t="[object GeneratorFunction]",St="[object Proxy]";function Z(e){if(!ce(e))return!1;var t=M(e);return t==Et||t==$t||t==Pt||t==St}var re=w["__core-js_shared__"],Te=(function(){var e=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Ct(e){return!!Te&&Te in e}var jt=Function.prototype,xt=jt.toString;function I(e){if(e!=null){try{return xt.call(e)}catch{}try{return e+""}catch{}}return""}var It=/[\\^$.*+?()[\]{}|]/g,Lt=/^\[object .+?Constructor\]$/,Rt=Function.prototype,Nt=Object.prototype,Mt=Rt.toString,Dt=Nt.hasOwnProperty,Ft=RegExp("^"+Mt.call(Dt).replace(It,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gt(e){if(!ce(e)||Ct(e))return!1;var t=Z(e)?Ft:Lt;return t.test(I(e))}function Ut(e,t){return e==null?void 0:e[t]}function L(e,t){var r=Ut(e,t);return Gt(r)?r:void 0}var oe=L(w,"WeakMap");function zt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ht(){}var Bt=800,Kt=16,qt=Date.now;function Xt(e){var t=0,r=0;return function(){var n=qt(),i=Kt-(n-r);if(r=n,i>0){if(++t>=Bt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function F(e){return function(){return e}}var Ae=(function(){try{var e=L(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Yt=Ae?function(e,t){return Ae(e,"toString",{configurable:!0,enumerable:!1,value:F(t),writable:!0})}:J,Zt=Xt(Yt);function Wt(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function Jt(e,t,r,n){for(var i=e.length,s=r+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function Qt(e){return e!==e}function Vt(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function kt(e,t,r){return t===t?Vt(e,t,r):Jt(e,Qt,r)}function er(e,t){var r=e==null?0:e.length;return!!r&&kt(e,t,0)>-1}var tr=9007199254740991,rr=/^(?:0|[1-9]\d*)$/;function Ve(e,t){var r=typeof e;return t=t??tr,!!t&&(r=="number"||r!="symbol"&&rr.test(e))&&e>-1&&e%1==0&&e<t}function ke(e,t){return e===t||e!==e&&t!==t}var Pe=Math.max;function nr(e,t,r){return t=Pe(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Pe(n.length-t,0),a=Array(s);++i<s;)a[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=r(a),zt(e,this,o)}}function ir(e,t){return Zt(nr(e,t,J),e+"")}var sr=9007199254740991;function le(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sr}function Q(e){return e!=null&&le(e.length)&&!Z(e)}var ar=Object.prototype;function et(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ar;return e===r}function or(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ur="[object Arguments]";function Ee(e){return j(e)&&M(e)==ur}var tt=Object.prototype,fr=tt.hasOwnProperty,hr=tt.propertyIsEnumerable,V=Ee((function(){return arguments})())?Ee:function(e){return j(e)&&fr.call(e,"callee")&&!hr.call(e,"callee")};function cr(){return!1}var rt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$e=rt&&typeof module=="object"&&module&&!module.nodeType&&module,lr=$e&&$e.exports===rt,Se=lr?w.Buffer:void 0,dr=Se?Se.isBuffer:void 0,W=dr||cr,gr="[object Arguments]",pr="[object Array]",_r="[object Boolean]",br="[object Date]",yr="[object Error]",vr="[object Function]",Or="[object Map]",mr="[object Number]",wr="[object Object]",Tr="[object RegExp]",Ar="[object Set]",Pr="[object String]",Er="[object WeakMap]",$r="[object ArrayBuffer]",Sr="[object DataView]",Cr="[object Float32Array]",jr="[object Float64Array]",xr="[object Int8Array]",Ir="[object Int16Array]",Lr="[object Int32Array]",Rr="[object Uint8Array]",Nr="[object Uint8ClampedArray]",Mr="[object Uint16Array]",Dr="[object Uint32Array]",h={};h[Cr]=h[jr]=h[xr]=h[Ir]=h[Lr]=h[Rr]=h[Nr]=h[Mr]=h[Dr]=!0;h[gr]=h[pr]=h[$r]=h[_r]=h[Sr]=h[br]=h[yr]=h[vr]=h[Or]=h[mr]=h[wr]=h[Tr]=h[Ar]=h[Pr]=h[Er]=!1;function Fr(e){return j(e)&&le(e.length)&&!!h[M(e)]}function Gr(e){return function(t){return e(t)}}var nt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,U=nt&&typeof module=="object"&&module&&!module.nodeType&&module,Ur=U&&U.exports===nt,ne=Ur&&Ze.process,Ce=(function(){try{var e=U&&U.require&&U.require("util").types;return e||ne&&ne.binding&&ne.binding("util")}catch{}})(),je=Ce&&Ce.isTypedArray,de=je?Gr(je):Fr,zr=Object.prototype,Hr=zr.hasOwnProperty;function Br(e,t){var r=g(e),n=!r&&V(e),i=!r&&!n&&W(e),s=!r&&!n&&!i&&de(e),a=r||n||i||s,o=a?or(e.length,String):[],u=o.length;for(var f in e)(t||Hr.call(e,f))&&!(a&&(f=="length"||i&&(f=="offset"||f=="parent")||s&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Ve(f,u)))&&o.push(f);return o}function Kr(e,t){return function(r){return e(t(r))}}var qr=Kr(Object.keys,Object),Xr=Object.prototype,Yr=Xr.hasOwnProperty;function it(e){if(!et(e))return qr(e);var t=[];for(var r in Object(e))Yr.call(e,r)&&r!="constructor"&&t.push(r);return t}function b(e){return Q(e)?Br(e):it(e)}var Zr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wr=/^\w*$/;function ge(e,t){if(g(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||he(e)?!0:Wr.test(e)||!Zr.test(e)||t!=null&&e in Object(t)}var z=L(Object,"create");function Jr(){this.__data__=z?z(null):{},this.size=0}function Qr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Vr="__lodash_hash_undefined__",kr=Object.prototype,en=kr.hasOwnProperty;function tn(e){var t=this.__data__;if(z){var r=t[e];return r===Vr?void 0:r}return en.call(t,e)?t[e]:void 0}var rn=Object.prototype,nn=rn.hasOwnProperty;function sn(e){var t=this.__data__;return z?t[e]!==void 0:nn.call(t,e)}var an="__lodash_hash_undefined__";function on(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=z&&t===void 0?an:t,this}function x(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}x.prototype.clear=Jr;x.prototype.delete=Qr;x.prototype.get=tn;x.prototype.has=sn;x.prototype.set=on;function un(){this.__data__=[],this.size=0}function k(e,t){for(var r=e.length;r--;)if(ke(e[r][0],t))return r;return-1}var fn=Array.prototype,hn=fn.splice;function cn(e){var t=this.__data__,r=k(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():hn.call(t,r,1),--this.size,!0}function ln(e){var t=this.__data__,r=k(t,e);return r<0?void 0:t[r][1]}function dn(e){return k(this.__data__,e)>-1}function gn(e,t){var r=this.__data__,n=k(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function T(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}T.prototype.clear=un;T.prototype.delete=cn;T.prototype.get=ln;T.prototype.has=dn;T.prototype.set=gn;var H=L(w,"Map");function pn(){this.size=0,this.__data__={hash:new x,map:new(H||T),string:new x}}function _n(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ee(e,t){var r=e.__data__;return _n(t)?r[typeof t=="string"?"string":"hash"]:r.map}function bn(e){var t=ee(this,e).delete(e);return this.size-=t?1:0,t}function yn(e){return ee(this,e).get(e)}function vn(e){return ee(this,e).has(e)}function On(e,t){var r=ee(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function A(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}A.prototype.clear=pn;A.prototype.delete=bn;A.prototype.get=yn;A.prototype.has=vn;A.prototype.set=On;var mn="Expected a function";function pe(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(mn);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(pe.Cache||A),r}pe.Cache=A;var wn=500;function Tn(e){var t=pe(e,function(n){return r.size===wn&&r.clear(),n}),r=t.cache;return t}var An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pn=/\\(\\)?/g,En=Tn(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(An,function(r,n,i,s){t.push(i?s.replace(Pn,"$1"):n||r)}),t});function $n(e){return e==null?"":Qe(e)}function st(e,t){return g(e)?e:ge(e,t)?[e]:En($n(e))}function te(e){if(typeof e=="string"||he(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function at(e,t){t=st(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[te(t[r++])];return r&&r==n?e:void 0}function Sn(e,t,r){var n=e==null?void 0:at(e,t);return n===void 0?r:n}function ot(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var xe=y?y.isConcatSpreadable:void 0;function Cn(e){return g(e)||V(e)||!!(xe&&e&&e[xe])}function jn(e,t,r,n,i){var s=-1,a=e.length;for(r||(r=Cn),i||(i=[]);++s<a;){var o=e[s];r(o)?ot(i,o):n||(i[i.length]=o)}return i}function xn(e,t,r,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}function In(){this.__data__=new T,this.size=0}function Ln(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Rn(e){return this.__data__.get(e)}function Nn(e){return this.__data__.has(e)}var Mn=200;function Dn(e,t){var r=this.__data__;if(r instanceof T){var n=r.__data__;if(!H||n.length<Mn-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new A(n)}return r.set(e,t),this.size=r.size,this}function m(e){var t=this.__data__=new T(e);this.size=t.size}m.prototype.clear=In;m.prototype.delete=Ln;m.prototype.get=Rn;m.prototype.has=Nn;m.prototype.set=Dn;function ut(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}function Fn(){return[]}var Gn=Object.prototype,Un=Gn.propertyIsEnumerable,Ie=Object.getOwnPropertySymbols,zn=Ie?function(e){return e==null?[]:(e=Object(e),ut(Ie(e),function(t){return Un.call(e,t)}))}:Fn;function Hn(e,t,r){var n=t(e);return g(e)?n:ot(n,r(e))}function Le(e){return Hn(e,b,zn)}var ue=L(w,"DataView"),fe=L(w,"Promise"),N=L(w,"Set"),Re="[object Map]",Bn="[object Object]",Ne="[object Promise]",Me="[object Set]",De="[object WeakMap]",Fe="[object DataView]",Kn=I(ue),qn=I(H),Xn=I(fe),Yn=I(N),Zn=I(oe),O=M;(ue&&O(new ue(new ArrayBuffer(1)))!=Fe||H&&O(new H)!=Re||fe&&O(fe.resolve())!=Ne||N&&O(new N)!=Me||oe&&O(new oe)!=De)&&(O=function(e){var t=M(e),r=t==Bn?e.constructor:void 0,n=r?I(r):"";if(n)switch(n){case Kn:return Fe;case qn:return Re;case Xn:return Ne;case Yn:return Me;case Zn:return De}return t});var Ge=w.Uint8Array,Wn="__lodash_hash_undefined__";function Jn(e){return this.__data__.set(e,Wn),this}function Qn(e){return this.__data__.has(e)}function B(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new A;++t<r;)this.add(e[t])}B.prototype.add=B.prototype.push=Jn;B.prototype.has=Qn;function Vn(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function ft(e,t){return e.has(t)}var kn=1,ei=2;function ht(e,t,r,n,i,s){var a=r&kn,o=e.length,u=t.length;if(o!=u&&!(a&&u>o))return!1;var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var c=-1,l=!0,v=r&ei?new B:void 0;for(s.set(e,t),s.set(t,e);++c<o;){var p=e[c],_=t[c];if(n)var P=a?n(_,p,c,t,e,s):n(p,_,c,e,t,s);if(P!==void 0){if(P)continue;l=!1;break}if(v){if(!Vn(t,function(E,$){if(!ft(v,$)&&(p===E||i(p,E,r,n,s)))return v.push($)})){l=!1;break}}else if(!(p===_||i(p,_,r,n,s))){l=!1;break}}return s.delete(e),s.delete(t),l}function ti(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function _e(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ri=1,ni=2,ii="[object Boolean]",si="[object Date]",ai="[object Error]",oi="[object Map]",ui="[object Number]",fi="[object RegExp]",hi="[object Set]",ci="[object String]",li="[object Symbol]",di="[object ArrayBuffer]",gi="[object DataView]",Ue=y?y.prototype:void 0,ie=Ue?Ue.valueOf:void 0;function pi(e,t,r,n,i,s,a){switch(r){case gi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case di:return!(e.byteLength!=t.byteLength||!s(new Ge(e),new Ge(t)));case ii:case si:case ui:return ke(+e,+t);case ai:return e.name==t.name&&e.message==t.message;case fi:case ci:return e==t+"";case oi:var o=ti;case hi:var u=n&ri;if(o||(o=_e),e.size!=t.size&&!u)return!1;var f=a.get(e);if(f)return f==t;n|=ni,a.set(e,t);var d=ht(o(e),o(t),n,i,s,a);return a.delete(e),d;case li:if(ie)return ie.call(e)==ie.call(t)}return!1}var _i=1,bi=Object.prototype,yi=bi.hasOwnProperty;function vi(e,t,r,n,i,s){var a=r&_i,o=Le(e),u=o.length,f=Le(t),d=f.length;if(u!=d&&!a)return!1;for(var c=u;c--;){var l=o[c];if(!(a?l in t:yi.call(t,l)))return!1}var v=s.get(e),p=s.get(t);if(v&&p)return v==t&&p==e;var _=!0;s.set(e,t),s.set(t,e);for(var P=a;++c<u;){l=o[c];var E=e[l],$=t[l];if(n)var ve=a?n($,E,l,t,e,s):n(E,$,l,e,t,s);if(!(ve===void 0?E===$||i(E,$,r,n,s):ve)){_=!1;break}P||(P=l=="constructor")}if(_&&!P){var K=e.constructor,q=t.constructor;K!=q&&"constructor"in e&&"constructor"in t&&!(typeof K=="function"&&K instanceof K&&typeof q=="function"&&q instanceof q)&&(_=!1)}return s.delete(e),s.delete(t),_}var Oi=1,ze="[object Arguments]",He="[object Array]",X="[object Object]",mi=Object.prototype,Be=mi.hasOwnProperty;function wi(e,t,r,n,i,s){var a=g(e),o=g(t),u=a?He:O(e),f=o?He:O(t);u=u==ze?X:u,f=f==ze?X:f;var d=u==X,c=f==X,l=u==f;if(l&&W(e)){if(!W(t))return!1;a=!0,d=!1}if(l&&!d)return s||(s=new m),a||de(e)?ht(e,t,r,n,i,s):pi(e,t,u,r,n,i,s);if(!(r&Oi)){var v=d&&Be.call(e,"__wrapped__"),p=c&&Be.call(t,"__wrapped__");if(v||p){var _=v?e.value():e,P=p?t.value():t;return s||(s=new m),i(_,P,r,n,s)}}return l?(s||(s=new m),vi(e,t,r,n,i,s)):!1}function be(e,t,r,n,i){return e===t?!0:e==null||t==null||!j(e)&&!j(t)?e!==e&&t!==t:wi(e,t,r,n,be,i)}var Ti=1,Ai=2;function Pi(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){a=r[i];var o=a[0],u=e[o],f=a[1];if(a[2]){if(u===void 0&&!(o in e))return!1}else{var d=new m,c;if(!(c===void 0?be(f,u,Ti|Ai,n,d):c))return!1}}return!0}function ct(e){return e===e&&!ce(e)}function Ei(e){for(var t=b(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ct(i)]}return t}function lt(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function $i(e){var t=Ei(e);return t.length==1&&t[0][2]?lt(t[0][0],t[0][1]):function(r){return r===e||Pi(r,e,t)}}function Si(e,t){return e!=null&&t in Object(e)}function Ci(e,t,r){t=st(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=te(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&le(i)&&Ve(a,i)&&(g(e)||V(e)))}function ji(e,t){return e!=null&&Ci(e,t,Si)}var xi=1,Ii=2;function Li(e,t){return ge(e)&&ct(t)?lt(te(e),t):function(r){var n=Sn(r,e);return n===void 0&&n===t?ji(r,e):be(t,n,xi|Ii)}}function Ri(e){return function(t){return t==null?void 0:t[e]}}function Ni(e){return function(t){return at(t,e)}}function Mi(e){return ge(e)?Ri(te(e)):Ni(e)}function dt(e){return typeof e=="function"?e:e==null?J:typeof e=="object"?g(e)?Li(e[0],e[1]):$i(e):Mi(e)}function Di(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var u=a[++i];if(r(s[u],u,s)===!1)break}return t}}var Fi=Di();function Gi(e,t){return e&&Fi(e,t,b)}function Ui(e,t){return function(r,n){if(r==null)return r;if(!Q(r))return e(r,n);for(var i=r.length,s=-1,a=Object(r);++s<i&&n(a[s],s,a)!==!1;);return r}}var ye=Ui(Gi);function zi(e){return j(e)&&Q(e)}function Hi(e){return typeof e=="function"?e:J}function S(e,t){var r=g(e)?Wt:ye;return r(e,Hi(t))}function Bi(e,t){var r=[];return ye(e,function(n,i,s){t(n,i,s)&&r.push(n)}),r}function Y(e,t){var r=g(e)?ut:Bi;return r(e,dt(t))}function Ki(e,t){return Je(t,function(r){return e[r]})}function se(e){return e==null?[]:Ki(e,b(e))}var qi="[object Map]",Xi="[object Set]",Yi=Object.prototype,Zi=Yi.hasOwnProperty;function Ke(e){if(e==null)return!0;if(Q(e)&&(g(e)||typeof e=="string"||typeof e.splice=="function"||W(e)||de(e)||V(e)))return!e.length;var t=O(e);if(t==qi||t==Xi)return!e.size;if(et(e))return!it(e).length;for(var r in e)if(Zi.call(e,r))return!1;return!0}function R(e){return e===void 0}function Wi(e,t,r,n,i){return i(e,function(s,a,o){r=n?(n=!1,s):t(r,s,a,o)}),r}function Ji(e,t,r){var n=g(e)?xn:Wi,i=arguments.length<3;return n(e,dt(t),r,i,ye)}var Qi=1/0,Vi=N&&1/_e(new N([,-0]))[1]==Qi?function(e){return new N(e)}:Ht,ki=200;function es(e,t,r){var n=-1,i=er,s=e.length,a=!0,o=[],u=o;if(s>=ki){var f=Vi(e);if(f)return _e(f);a=!1,i=ft,u=new B}else u=o;e:for(;++n<s;){var d=e[n],c=d;if(d=d!==0?d:0,a&&c===c){for(var l=u.length;l--;)if(u[l]===c)continue e;o.push(d)}else i(u,c,r)||(u!==o&&u.push(c),o.push(d))}return o}var ts=ir(function(e){return es(jn(e,1,zi,!0))}),rs="\0",C="\0",qe="";class gt{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=F(void 0),this._defaultEdgeLabelFn=F(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[C]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return Z(t)||(t=F(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return b(this._nodes)}sources(){var t=this;return Y(this.nodes(),function(r){return Ke(t._in[r])})}sinks(){var t=this;return Y(this.nodes(),function(r){return Ke(t._out[r])})}setNodes(t,r){var n=arguments,i=this;return S(t,function(s){n.length>1?i.setNode(s,r):i.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=C,this._children[t]={},this._children[C][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],S(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),S(b(this._in[t]),r),delete this._in[t],delete this._preds[t],S(b(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(R(r))r=C;else{r+="";for(var n=r;!R(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==C)return r}}children(t){if(R(t)&&(t=C),this._isCompound){var r=this._children[t];if(r)return b(r)}else{if(t===C)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return b(r)}successors(t){var r=this._sucs[t];if(r)return b(r)}neighbors(t){var r=this.predecessors(t);if(r)return ts(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;S(this._nodes,function(a,o){t(o)&&r.setNode(o,a)}),S(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,n.edge(a))});var i={};function s(a){var o=n.parent(a);return o===void 0||r.hasNode(o)?(i[a]=o,o):o in i?i[o]:s(o)}return this._isCompound&&S(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(t){return Z(t)||(t=F(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return se(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return Ji(t,function(s,a){return i.length>1?n.setEdge(s,a,r):n.setEdge(s,a),a}),this}setEdge(){var t,r,n,i,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,n=a.name,arguments.length===2&&(i=arguments[1],s=!0)):(t=a,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,r=""+r,R(n)||(n=""+n);var o=G(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return s&&(this._edgeLabels[o]=i),this;if(!R(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=s?i:this._defaultEdgeLabelFn(t,r,n);var u=ns(this._isDirected,t,r,n);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[o]=u,Xe(this._preds[r],t),Xe(this._sucs[t],r),this._in[r][o]=u,this._out[t][o]=u,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n),s=this._edgeObjs[i];return s&&(t=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Ye(this._preds[r],t),Ye(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=se(n);return r?Y(i,function(s){return s.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=se(n);return r?Y(i,function(s){return s.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}}gt.prototype._nodeCount=0;gt.prototype._edgeCount=0;function Xe(e,t){e[t]?e[t]++:e[t]=1}function Ye(e,t){--e[t]||delete e[t]}function G(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}return i+qe+s+qe+(R(n)?rs:n)}function ns(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}var o={v:i,w:s};return n&&(o.name=n),o}function ae(e,t){return G(e,t.v,t.w,t.name)}export{Y as $,he as A,Ve as B,ir as C,jn as D,Zt as E,nr as F,gt as G,M as H,de as I,zi as J,V as K,Z as L,Fi as M,Jt as N,Hi as O,Gi as P,Ci as Q,J as R,y as S,st as T,Ge as U,te as V,at as W,ji as X,$n as Y,S as Z,F as _,ce as a,se as a0,Ji as a1,et as b,Q as c,Ae as d,ke as e,Br as f,zn as g,ot as h,R as i,Hn as j,b as k,j as l,O as m,Gr as n,Kr as o,Ce as p,W as q,w as r,Fn as s,m as t,Wt as u,g as v,Le as w,ye as x,dt as y,Je as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ps}from"./vendor-markdown-CQ_RitqP.js";function gs(A,y){for(var g=0;g<y.length;g++){const l=y[g];if(typeof l!="string"&&!Array.isArray(l)){for(const a in l)if(a!=="default"&&!(a in A)){const o=Object.getOwnPropertyDescriptor(l,a);o&&Object.defineProperty(A,a,o.get?o:{enumerable:!0,get:()=>l[a]})}}}return Object.freeze(Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}))}var Ye,Ur;function bs(){if(Ur)return Ye;Ur=1;var A="6.6.3";return Ye=A,Ye}var We,Vr;function Nr(){if(Vr)return We;Vr=1;var A=function(g,l){var a=this;if(l||(l={}),a.qpm=l.qpm?parseInt(l.qpm,10):null,!a.qpm){var o=g.metaText?g.metaText.tempo:null;a.qpm=g.getBpm(o)}a.extraMeasuresAtBeginning=l.extraMeasuresAtBeginning?parseInt(l.extraMeasuresAtBeginning,10):0,a.beatCallback=l.beatCallback,a.eventCallback=l.eventCallback,a.lineEndCallback=l.lineEndCallback,a.lineEndAnticipation=l.lineEndAnticipation?parseInt(l.lineEndAnticipation,10):0,a.beatSubdivisions=l.beatSubdivisions?parseInt(l.beatSubdivisions,10):1,a.beatSubdivisions||(a.beatSubdivisions=1),a.joggerTimer=null,a.replaceTarget=function(s){if(a.noteTimings=s.setTiming(a.qpm,a.extraMeasuresAtBeginning),s.noteTimings.length===0&&(a.noteTimings=s.setTiming(0,0)),a.lineEndCallback&&(a.lineEndTimings=y(s.noteTimings,a.lineEndAnticipation)),a.startTime=null,a.currentBeat=0,a.currentEvent=0,a.currentLine=0,a.currentTime=0,a.isPaused=!1,a.isRunning=!1,a.pausedPercent=null,a.justUnpaused=!1,a.newSeekPercent=0,a.lastTimestamp=0,a.noteTimings.length!==0){a.millisecondsPerBeat=1e3/(a.qpm/60)/a.beatSubdivisions,a.lastMoment=a.noteTimings[a.noteTimings.length-1].milliseconds;var c=s.getMeter(),v="";if(c&&c.type==="specified"&&c.value&&c.value.length>0&&c.value[0].num.indexOf("+")>0&&(v=c.value[0].num),a.beatStarts=[],v){for(var u=a.noteTimings[a.noteTimings.length-1].millisecondsPerMeasure,f=a.lastMoment/u,n=v.split("+"),t=0;t<n.length;t++)n[t]=parseInt(n[t],10)/2;for(var r=0,e=0,h=0;h<f;h++)for(var p=h*u,d=0,m=0;m<n.length;m++){var w=n[m];if(a.beatSubdivisions===1)a.beatSubdivisions===1&&r<a.lastMoment&&a.beatStarts.push({b:e,ts:r}),r+=w*a.millisecondsPerBeat;else for(var T=w*a.beatSubdivisions,D=0;D<Math.floor(T);D++){var B=D/T,S=Math.round(p+d*a.millisecondsPerBeat);S<a.lastMoment&&a.beatStarts.push({b:e+B,ts:S}),d++}e++}a.beatStarts.push({b:f*n.length,ts:a.lastMoment}),a.totalBeats=a.beatStarts.length}else{a.totalBeats=Math.round(a.lastMoment/a.millisecondsPerBeat);for(var L=0;L<a.totalBeats+1;L++)a.beatStarts.push({b:L/a.beatSubdivisions,ts:Math.round(L*a.millisecondsPerBeat)})}}},a.replaceTarget(g),a.doTiming=function(s){if(a.lastTimestamp!==s&&(a.lastTimestamp=s,!a.isPaused&&a.isRunning)){for(a.startTime||(a.startTime=s),a.currentTime=s-a.startTime,a.currentTime+=16;a.noteTimings.length>a.currentEvent&&a.noteTimings[a.currentEvent].milliseconds<a.currentTime;){if(a.eventCallback&&a.noteTimings[a.currentEvent].type==="event"){var c=a.startTime;a.eventCallback(a.noteTimings[a.currentEvent]),c!==a.startTime&&(a.currentTime=s-a.startTime)}a.currentEvent++}if(a.lineEndCallback&&a.lineEndTimings.length>a.currentLine&&a.lineEndTimings[a.currentLine].milliseconds<a.currentTime&&a.currentEvent<a.noteTimings.length){var v=a.noteTimings[a.currentEvent].milliseconds===a.currentTime?a.noteTimings[a.currentEvent]:a.noteTimings[a.currentEvent-1];a.lineEndCallback(a.lineEndTimings[a.currentLine],v,{line:a.currentLine,endTimings:a.lineEndTimings,currentTime:a.currentTime}),a.currentLine++}if(a.currentTime<a.lastMoment){if(requestAnimationFrame(a.doTiming),a.currentBeat<a.beatStarts.length&&a.beatStarts[a.currentBeat].ts<=a.currentTime){var u=a.doBeatCallback(s);a.currentBeat++,u!==null&&(a.currentTime=u)}}else if(a.currentBeat<=a.totalBeats&&a.beatCallback){var f=a.doBeatCallback(s);a.currentBeat++,f!==null&&(a.currentTime=f),requestAnimationFrame(a.doTiming)}if(a.currentTime>=a.lastMoment)if(a.eventCallback){var n=a.eventCallback(null);a.shouldStop(n).then(function(t){t&&a.stop()})}else a.stop()}},a.shouldStop=function(s){return new Promise(function(c){if(!s)return c(!0);if(s==="continue")return c(!1);s.then&&s.then(function(v){c(v!=="continue")})})},a.doBeatCallback=function(s){if(a.beatCallback){for(var c=a.currentEvent;c<a.noteTimings.length&&a.noteTimings[c].left===null;)c++;var v,u;if(c<a.noteTimings.length){for(v=a.noteTimings[c].milliseconds,c=Math.max(0,a.currentEvent-1);c>=0&&a.noteTimings[c].left===null;)c--;u=a.noteTimings[c]}var f={},n={};if(u){f.top=u.top,f.height=u.height;var t=Math.max(0,s-a.startTime-u.milliseconds),r=v-u.milliseconds,e=u.endX-u.left,h=r?t*e/r:0;f.left=u.left+h,a.currentEvent===0&&u.milliseconds>s-a.startTime&&(f.left=void 0),n={timestamp:s,startTime:a.startTime,ev:u,endMs:v,offMs:t,offPx:h,gapMs:r,gapPx:e}}else n={timestamp:s,startTime:a.startTime};var p=a.startTime;if(a.beatCallback(a.beatStarts[a.currentBeat].b,a.totalBeats/a.beatSubdivisions,a.lastMoment,f,n),p!==a.startTime)return s-a.startTime}return null};var i=60;a.animationJogger=function(){a.isRunning&&(a.doTiming(performance.now()),a.joggerTimer=setTimeout(a.animationJogger,i))},a.start=function(s,c){if(a.isRunning=!0,a.isPaused&&(a.isPaused=!1,s===void 0&&(a.justUnpaused=!0)),s)a.setProgress(s,c);else if(s===0)a.reset();else if(a.pausedPercent!==null){var v=performance.now();a.currentTime=a.lastMoment*a.pausedPercent,a.startTime=v-a.currentTime,a.pausedPercent=null,a.reportNext=!0}requestAnimationFrame(a.doTiming),a.joggerTimer=setTimeout(a.animationJogger,i)},a.pause=function(){a.isPaused=!0;var s=performance.now();a.pausedPercent=(s-a.startTime)/a.lastMoment,a.isRunning=!1,a.joggerTimer&&(clearTimeout(a.joggerTimer),a.joggerTimer=null)},a.currentMillisecond=function(){return a.currentTime},a.reset=function(){a.currentBeat=0,a.currentEvent=0,a.currentLine=0,a.startTime=null,a.pausedPercent=null},a.stop=function(){a.pause(),a.reset()},a.setProgress=function(s,c){var v;switch(c){case"seconds":a.currentTime=s*1e3,a.currentTime<0&&(a.currentTime=0),a.currentTime>a.lastMoment&&(a.currentTime=a.lastMoment),v=a.currentTime/a.lastMoment;break;case"beats":a.currentTime=s*a.millisecondsPerBeat*a.beatSubdivisions,a.currentTime<0&&(a.currentTime=0),a.currentTime>a.lastMoment&&(a.currentTime=a.lastMoment),v=a.currentTime/a.lastMoment;break;default:v=s,v<0&&(v=0),v>1&&(v=1),a.currentTime=a.lastMoment*v;break}a.isRunning||(a.pausedPercent=v);var u=performance.now();for(a.startTime=u-a.currentTime,a.currentEvent=0;a.noteTimings.length>a.currentEvent&&a.noteTimings[a.currentEvent].milliseconds<a.currentTime;)a.currentEvent++;if(a.lineEndCallback)for(a.currentLine=0;a.lineEndTimings.length>a.currentLine&&a.lineEndTimings[a.currentLine].milliseconds+a.lineEndAnticipation<a.currentTime;)a.currentLine++;var f=a.currentBeat;for(a.currentBeat=0;a.currentBeat<a.beatStarts.length&&!(a.beatStarts[a.currentBeat].ts>a.currentTime);a.currentBeat++);a.currentBeat--,a.beatCallback&&f!==a.currentBeat&&(a.doBeatCallback(a.startTime+a.currentTime),a.currentBeat++),a.eventCallback&&a.currentEvent>=0&&a.noteTimings[a.currentEvent].type==="event"&&a.eventCallback(a.noteTimings[a.currentEvent]),a.lineEndCallback&&a.lineEndCallback(a.lineEndTimings[a.currentLine],a.noteTimings[a.currentEvent],{line:a.currentLine,endTimings:a.lineEndTimings}),a.joggerTimer=setTimeout(a.animationJogger,i)}};function y(g,l){for(var a=[],o=null,i=0;i<g.length;i++){var s=g[i];s.type!=="end"&&s.top!==o&&(a.push({measureNumber:s.measureNumber,milliseconds:s.milliseconds-l,top:s.top,bottom:s.top+s.height}),o=s.top)}return a}return We=A,We}var Xe,jr;function ms(){if(jr)return Xe;jr=1;var A=Nr(),y={};return(function(){var g,l;y.startAnimation=function(a,o,i){g&&(g.stop(),g=void 0),i.showCursor&&(l=a.querySelector(".abcjs-cursor"),l||(l=document.createElement("DIV"),l.className="abcjs-cursor cursor",l.style.position="absolute",a.appendChild(l),a.style.position="relative"));function s(r){for(var e=0;e<r.length;e++){var h=r[e];h.classList.contains("abcjs-bar")||(h.style.display="none")}}var c;function v(r){if(c){var e=a.querySelectorAll(c);s(e)}c=r}function u(r){var e=a.querySelectorAll(r);s(e)}function f(r){i.hideCurrentMeasure?u(r):i.hideFinishedMeasures&&v(r)}function n(r){return".abcjs-l"+r.line+".abcjs-m"+r.measureNumber}function t(r){if(r){if(r.measureStart){var e=n(r);e&&f(e)}l&&(l.style.left=r.left+"px",l.style.top=r.top+"px",l.style.width=r.width+"px",l.style.height=r.height+"px")}else g.stop(),g=void 0}g=new A(o,{qpm:i.bpm,eventCallback:t}),g.start()},y.pauseAnimation=function(a){g&&(a?g.pause():g.start())},y.stopAnimation=function(){g&&(g.stop(),g=void 0)}})(),Xe=y,Xe}var Ue,Kr;function _e(){if(Kr)return Ue;Kr=1;var A={};return A.cloneArray=function(y){for(var g=[],l=0;l<y.length;l++)g.push(Object.assign({},y[l]));return g},A.cloneHashOfHash=function(y){var g={};for(var l in y)y.hasOwnProperty(l)&&(g[l]=Object.assign({},y[l]));return g},A.cloneHashOfArrayOfHash=function(y){var g={};for(var l in y)y.hasOwnProperty(l)&&(g[l]=A.cloneArray(y[l]));return g},A.strip=function(y){return y.replace(/^\s+/,"").replace(/\s+$/,"")},A.startsWith=function(y,g){return y.indexOf(g)===0},A.endsWith=function(y,g){var l=y.length-g.length;return l>=0&&y.lastIndexOf(g)===l},A.last=function(y){return y.length===0?null:y[y.length-1]},Ue=A,Ue}var Ve,$r;function Pr(){if($r)return Ve;$r=1;var A=_e(),y={};return(function(){var g,l,a,o,i;y.initialize=function(b,k,E,R,O){g=b,l=k,a=E,o=R,i=O,s()};function s(){a.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},a.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},a.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},a.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},a.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},a.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},a.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},o.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},o.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},o.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},o.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},o.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},o.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},o.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},o.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},o.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},o.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},o.formatting.annotationfont=a.annotationfont,o.formatting.gchordfont=a.gchordfont,o.formatting.historyfont=a.historyfont,o.formatting.infofont=a.infofont,o.formatting.measurefont=a.measurefont,o.formatting.partsfont=a.partsfont,o.formatting.repeatfont=a.repeatfont,o.formatting.textfont=a.textfont,o.formatting.tripletfont=a.tripletfont,o.formatting.vocalfont=a.vocalfont,o.formatting.wordsfont=a.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},v=function(b){switch(b){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}},u=function(b,k,E,R,O){function G(){var ue=parseInt(b[0].token);return b.shift(),k?b.length===0?{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:ue}:b.length===1&&b[0].token==="box"&&c[O]?{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:ue,box:!0}:(l("Extra parameters in font definition.",E,R),{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:ue}):(l("Can't set just the size of the font since there is no default value.",E,R),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:ue})}if(b[0].token==="*"){if(b.shift(),b[0].type==="number")return G();l("Expected font size number after *.",E,R)}if(b[0].type==="number")return G();for(var H=[],X,Q="normal",j="normal",ee="none",J=!1,ae="face",V=!1;b.length;){var Z=b.shift(),$=Z.token.toLowerCase();switch(ae){case"face":V||$!=="utf"&&Z.type!=="number"&&$!=="bold"&&$!=="italic"&&$!=="underline"&&$!=="box"?H.length>0&&Z.token==="-"?(V=!0,H[H.length-1]=H[H.length-1]+Z.token):V?(V=!1,H[H.length-1]=H[H.length-1]+Z.token):H.push(Z.token):Z.type==="number"?(X?l("Font size specified twice in font definition.",E,R):X=Z.token,ae="modifier"):$==="bold"?Q="bold":$==="italic"?j="italic":$==="underline"?ee="underline":$==="box"?(c[O]?J=!0:l(`This font style doesn't support "box"`,E,R),ae="finished"):$==="utf"?(Z=b.shift(),ae="size"):l("Unknown parameter "+Z.token+" in font definition.",E,R);break;case"size":Z.type==="number"?X?l("Font size specified twice in font definition.",E,R):X=Z.token:l("Expected font size in font definition.",E,R),ae="modifier";break;case"modifier":$==="bold"?Q="bold":$==="italic"?j="italic":$==="underline"?ee="underline":$==="box"?(c[O]?J=!0:l(`This font style doesn't support "box"`,E,R),ae="finished"):l("Unknown parameter "+Z.token+" in font definition.",E,R);break;case"finished":l('Extra characters found after "box" in font definition.',E,R);break}}X===void 0?k?X=k.size:(l("Must specify the size of the font since there is no default value.",E,R),X=12):X=parseFloat(X),H=H.join(" "),H===""&&(k?H=k.face:(l("Must specify the name of the font since there is no default value.",E,R),H="sans-serif"));var oe=v(H),ce={};return oe?(ce.face=oe.face,ce.weight=oe.weight,ce.style=oe.style,ce.decoration=oe.decoration,ce.size=X,J&&(ce.box=!0),ce):(ce.face=H,ce.weight=Q,ce.style=j,ce.decoration=ee,ce.size=X,J&&(ce.box=!0),ce)},f=function(b,k,E){return k.length===0?'Directive "'+b+'" requires a font as a parameter.':(a[b]=u(k,a[b],E,0,b),a.is_in_header&&(o.formatting[b]=a[b]),null)},n=function(b,k,E){return k.length===0?'Directive "'+b+'" requires a font as a parameter.':(o.formatting[b]=u(k,o.formatting[b],E,0,b),null)},t=function(b,k){var E="";k.forEach(function(O){E+=O.token});var R=parseFloat(E);if(isNaN(R)||R===0)return'Directive "'+b+'" requires a number as a parameter.';o.formatting.scale=R},r=["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(b){var k=b.split(/\s+/);if(k.length!==2&&k.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var E=k[0],R=parseInt(k[1],10);if((isNaN(R)||R<35||R>81)&&k[1]&&(R=r.indexOf(k[1].toLowerCase())+35),isNaN(R)||R<35||R>81)return{error:'Expected drum name, received "'+k[1]+'"'};var O={sound:R};return k.length===3&&(O.noteHead=k[2]),{key:E,value:O}},h=function(b,k){var E=g.getMeasurement(k);return E.used===0||k.length!==0?{error:'Directive "'+b+'" requires a measurement as a parameter.'}:E.value},p=function(b,k){var E=g.getMeasurement(k);return E.used===0||k.length!==0?'Directive "'+b+'" requires a measurement as a parameter.':(o.formatting[b]=E.value,null)},d=function(b,k,E,R,O){if(E.length!==1||E[0].type!=="number")return'Directive "'+k+'" requires a number as a parameter.';var G=E[0].intt;return R!==void 0&&G<R?'Directive "'+k+'" requires a number greater than or equal to '+R+" as a parameter.":O!==void 0&&G>O?'Directive "'+k+'" requires a number less than or equal to '+O+" as a parameter.":(a[b]=G,null)},m=function(b,k,E){if(E.length===1&&(E[0].token==="true"||E[0].token==="false"))return a[b]=E[0].token==="true",null;var R=d(b,k,E,0,1);return R!==null?R:(a[b]=a[b]===1,null)},w=function(b,k,E,R){if(E.length!==1)return'Directive "'+k+'" requires one of [ '+R.join(", ")+" ] as a parameter.";for(var O=E[0].token,G=!1,H=0;!G&&H<R.length;H++)R[H]===O&&(G=!0);return G?(a[b]=O,null):'Directive "'+k+'" requires one of [ '+R.join(", ")+" ] as a parameter."},T=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],D=["gchord","ptstress","beatstring"],B=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],S=["program"],L=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],x=["beat"],M=["drone"],N=["portamento"],F=["expand","grace","trim"],C=["drum","chordname"],_=["bassprog","chordprog"],P=function(b,k,E){var R=b.shift().token,O=[];if(T.indexOf(R)>=0)b.length!==0&&l("Unexpected parameter in MIDI "+R,E,0);else if(D.indexOf(R)>=0)b.length!==1?l("Expected one parameter in MIDI "+R,E,0):O.push(b[0].token);else if(B.indexOf(R)>=0)b.length!==1?l("Expected one parameter in MIDI "+R,E,0):b[0].type!=="number"?l("Expected one integer parameter in MIDI "+R,E,0):O.push(b[0].intt);else if(S.indexOf(R)>=0)b.length!==1&&b.length!==2?l("Expected one or two parameters in MIDI "+R,E,0):b[0].type!=="number"||b.length===2&&b[1].type!=="number"?l("Expected integer parameter in MIDI "+R,E,0):(O.push(b[0].intt),b.length===2&&O.push(b[1].intt));else if(L.indexOf(R)>=0)b.length!==2?l("Expected two parameters in MIDI "+R,E,0):b[0].type!=="number"||b[1].type!=="number"?l("Expected two integer parameters in MIDI "+R,E,0):(O.push(b[0].intt),O.push(b[1].intt));else if(N.indexOf(R)>=0)b.length!==2?l("Expected two parameters in MIDI "+R,E,0):b[0].type!=="alpha"||b[1].type!=="number"?l("Expected one string and one integer parameters in MIDI "+R,E,0):(O.push(b[0].token),O.push(b[1].intt));else if(R==="drummap")b.length===2&&b[0].type==="alpha"&&b[1].type==="number"?(k.formatting||(k.formatting={}),k.formatting.midi||(k.formatting.midi={}),k.formatting.midi.drummap||(k.formatting.midi.drummap={}),k.formatting.midi.drummap[b[0].token]=b[1].intt,O=k.formatting.midi.drummap):b.length===3&&b[0].type==="punct"&&b[1].type==="alpha"&&b[2].type==="number"?(k.formatting||(k.formatting={}),k.formatting.midi||(k.formatting.midi={}),k.formatting.midi.drummap||(k.formatting.midi.drummap={}),k.formatting.midi.drummap[b[0].token+b[1].token]=b[2].intt,O=k.formatting.midi.drummap):l("Expected one note name and one integer parameter in MIDI "+R,E,0);else if(F.indexOf(R)>=0)b.length!==3||b[0].type!=="number"||b[1].token!=="/"||b[2].type!=="number"?l("Expected fraction parameter in MIDI "+R,E,0):(O.push(b[0].intt),O.push(b[2].intt));else if(x.indexOf(R)>=0)b.length!==4?l("Expected four parameters in MIDI "+R,E,0):b[0].type!=="number"||b[1].type!=="number"||b[2].type!=="number"||b[3].type!=="number"?l("Expected four integer parameters in MIDI "+R,E,0):(O.push(b[0].intt),O.push(b[1].intt),O.push(b[2].intt),O.push(b[3].intt));else if(M.indexOf(R)>=0)b.length!==5?l("Expected five parameters in MIDI "+R,E,0):b[0].type!=="number"||b[1].type!=="number"||b[2].type!=="number"||b[3].type!=="number"||b[4].type!=="number"?l("Expected five integer parameters in MIDI "+R,E,0):(O.push(b[0].intt),O.push(b[1].intt),O.push(b[2].intt),O.push(b[3].intt),O.push(b[4].intt));else if(S.indexOf(R)>=0)b.length!==1||b.length!==4?l("Expected one or two parameters in MIDI "+R,E,0):b[0].type!=="number"?l("Expected integer parameter in MIDI "+R,E,0):b.length===4?(b[1].token!=="octave"&&l("Expected octave parameter in MIDI "+R,E,0),b[2].token!=="="&&l("Expected octave parameter in MIDI "+R,E,0),b[3].type!=="number"&&l("Expected integer parameter for octave in MIDI "+R,E,0)):(O.push(b[0].intt),b.length===4&&O.push(b[3].intt));else if(C.indexOf(R)>=0)if(b.length<2)l("Expected string parameter and at least one integer parameter in MIDI "+R,E,0);else if(b[0].type!=="alpha")l("Expected string parameter and at least one integer parameter in MIDI "+R,E,0);else{var G=b.shift();for(O.push(G.token);b.length>0;)G=b.shift(),G.type!=="number"&&l("Expected integer parameter in MIDI "+R,E,0),O.push(G.intt)}else if(_.indexOf(R)>=0){if(b.length!==1&&b.length!==2)l("Expected one or two parameters in MIDI "+R,E,0);else if(b[0].type!=="number")l("Expected integer parameter in MIDI "+R,E,0);else if(b.length===2&&b[1].type!=="alpha")l("Expected alpha parameter in MIDI "+R,E,0);else if(O.push(b[0].intt),b.length===2){var H=b[1].token;H.indexOf("octave=")!=-1?(H=H.replace("octave=",""),H=parseInt(H),isNaN(H)?l("Expected octave value in MIDI"+R):(H<-1&&(l("Expected octave= in MIDI "+R+" to be >= -1 (recv:"+H+")"),H=-1),H>3&&(l("Expected octave= in MIDI "+R+" to be <= 3 (recv:"+H+")"),H=3),O.push(H))):l("Expected octave= in MIDI"+R)}}i.hasBeginMusic()?i.appendElement("midi",-1,-1,{cmd:R,params:O}):(k.formatting.midi===void 0&&(k.formatting.midi={}),k.formatting.midi[R]=O)};y.parseFontChangeLine=function(b){b=b.replace(/\$\$/g,"");var k=b.split("$");if(k.length>1&&a.setfont){var E=[];k[0]!==""&&E.push({text:k[0]});for(var R=1;R<k.length;R++)if(k[R][0]==="0")E.push({text:k[R].substring(1).replace(/\x03/g,"$$")});else{var O=parseInt(k[R][0],10);a.setfont[O]?E.push({font:a.setfont[O],text:k[R].substring(1).replace(/\x03/g,"$$")}):E[E.length-1].text+="$"+k[R].replace(/\x03/g,"$$")}return E}return b.replace(/\x03/g,"$$")};var I=["auto","above","below","hidden"];y.addDirective=function(b){var k=g.tokenize(b,0,b.length);if(k.length===0||k[0].type!=="alpha")return null;var E=b.substring(b.indexOf(k[0].token)+k[0].token.length);E=g.stripComment(E);var R=k.shift().token.toLowerCase(),O="",G;switch(R){case"bagpipes":o.formatting.bagpipes=!0;break;case"flatbeams":o.formatting.flatbeams=!0;break;case"jazzchords":o.formatting.jazzchords=!0;break;case"accentAbove":o.formatting.accentAbove=!0;break;case"germanAlphabet":o.formatting.germanAlphabet=!0;break;case"landscape":a.landscape=!0;break;case"papersize":a.papersize=E;break;case"graceslurs":if(k.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(k[0].token==="0"||k[0].token==="false")o.formatting.graceSlurs=!1;else if(k[0].token==="1"||k[0].token==="true")o.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+k[0].token+")";break;case"lineThickness":var H=q(k);if(H.value!==void 0&&(o.formatting.lineThickness=H.value),H.error)return H.error;break;case"stretchlast":var X=q(k);if(X.value!==void 0&&(o.formatting.stretchlast=X.value),X.error)return X.error;break;case"titlecaps":a.titlecaps=!0;break;case"titleleft":o.formatting.titleleft=!0;break;case"measurebox":o.formatting.measurebox=!0;break;case"vocal":return w("vocalPosition",R,k,I);case"dynamic":return w("dynamicPosition",R,k,I);case"gchord":return w("chordPosition",R,k,I);case"ornament":return w("ornamentPosition",R,k,I);case"volume":return w("volumePosition",R,k,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 p(R,k);case"voicescale":if(k.length!==1||k[0].type!=="number")return"voicescale requires one float as a parameter";var Q=k.shift();return a.currentVoice&&(a.currentVoice.scale=Q.floatt,i.changeVoiceScale(a.currentVoice.scale)),null;case"voicecolor":if(k.length!==1)return"voicecolor requires one string as a parameter";var j=k.shift();return a.currentVoice&&(a.currentVoice.color=j.token,i.changeVoiceColor(a.currentVoice.color)),null;case"vskip":var ee=Math.round(h(R,k));return ee.error?ee.error:(i.addSpacing(ee),null);case"scale":t(R,k);break;case"sep":if(k.length===0)i.addSeparator(14,14,85,{startChar:a.iChar,endChar:a.iChar+5});else{var J=g.getMeasurement(k);if(J.used===0)return'Directive "'+R+'" requires 3 numbers: space above, space below, length of line';var ae=J.value;if(J=g.getMeasurement(k),J.used===0)return'Directive "'+R+'" requires 3 numbers: space above, space below, length of line';var V=J.value;if(J=g.getMeasurement(k),J.used===0||k.length!==0)return'Directive "'+R+'" requires 3 numbers: space above, space below, length of line';var Z=J.value;i.addSeparator(ae,V,Z,{startChar:a.iChar,endChar:a.iChar+E.length})}break;case"barsperstaff":if(O=d("barsperstaff",R,k),O!==null)return O;break;case"staffnonote":if(k.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(k[0].token==="0")a.staffnonote=!0;else if(k[0].token==="1")a.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+k[0].token+")";break;case"printtempo":if(O=m("printTempo",R,k),O!==null)return O;break;case"partsbox":if(O=m("partsBox",R,k),O!==null)return O;a.partsfont.box=a.partsBox;break;case"freegchord":if(O=m("freegchord",R,k),O!==null)return O;break;case"measurenb":case"barnumbers":if(O=d("barNumbers",R,k),O!==null)return O;break;case"setbarnb":if(k.length!==1||k[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";a.currBarNumber=i.setBarNumberImmediate(k[0].intt);break;case"keywarn":if(k.length!==1||k[0].type!=="number"||k[0].intt!==1&&k[0].intt!==0)return"Directive "+R+" requires 0 or 1 as a parameter.";a[R]=k[0].intt===1;break;case"begintext":var $="";for(G=g.nextLine();G&&G.indexOf("%%endtext")!==0;){if(A.startsWith(G,"%%")){var oe=G.substring(2);oe=oe.trim()+`
|
|
1
|
+
import{g as ps}from"./vendor-markdown-BRX1CUPf.js";function gs(A,y){for(var g=0;g<y.length;g++){const l=y[g];if(typeof l!="string"&&!Array.isArray(l)){for(const a in l)if(a!=="default"&&!(a in A)){const o=Object.getOwnPropertyDescriptor(l,a);o&&Object.defineProperty(A,a,o.get?o:{enumerable:!0,get:()=>l[a]})}}}return Object.freeze(Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}))}var Ye,Ur;function bs(){if(Ur)return Ye;Ur=1;var A="6.6.3";return Ye=A,Ye}var We,Vr;function Nr(){if(Vr)return We;Vr=1;var A=function(g,l){var a=this;if(l||(l={}),a.qpm=l.qpm?parseInt(l.qpm,10):null,!a.qpm){var o=g.metaText?g.metaText.tempo:null;a.qpm=g.getBpm(o)}a.extraMeasuresAtBeginning=l.extraMeasuresAtBeginning?parseInt(l.extraMeasuresAtBeginning,10):0,a.beatCallback=l.beatCallback,a.eventCallback=l.eventCallback,a.lineEndCallback=l.lineEndCallback,a.lineEndAnticipation=l.lineEndAnticipation?parseInt(l.lineEndAnticipation,10):0,a.beatSubdivisions=l.beatSubdivisions?parseInt(l.beatSubdivisions,10):1,a.beatSubdivisions||(a.beatSubdivisions=1),a.joggerTimer=null,a.replaceTarget=function(s){if(a.noteTimings=s.setTiming(a.qpm,a.extraMeasuresAtBeginning),s.noteTimings.length===0&&(a.noteTimings=s.setTiming(0,0)),a.lineEndCallback&&(a.lineEndTimings=y(s.noteTimings,a.lineEndAnticipation)),a.startTime=null,a.currentBeat=0,a.currentEvent=0,a.currentLine=0,a.currentTime=0,a.isPaused=!1,a.isRunning=!1,a.pausedPercent=null,a.justUnpaused=!1,a.newSeekPercent=0,a.lastTimestamp=0,a.noteTimings.length!==0){a.millisecondsPerBeat=1e3/(a.qpm/60)/a.beatSubdivisions,a.lastMoment=a.noteTimings[a.noteTimings.length-1].milliseconds;var c=s.getMeter(),v="";if(c&&c.type==="specified"&&c.value&&c.value.length>0&&c.value[0].num.indexOf("+")>0&&(v=c.value[0].num),a.beatStarts=[],v){for(var u=a.noteTimings[a.noteTimings.length-1].millisecondsPerMeasure,f=a.lastMoment/u,n=v.split("+"),t=0;t<n.length;t++)n[t]=parseInt(n[t],10)/2;for(var r=0,e=0,h=0;h<f;h++)for(var p=h*u,d=0,m=0;m<n.length;m++){var w=n[m];if(a.beatSubdivisions===1)a.beatSubdivisions===1&&r<a.lastMoment&&a.beatStarts.push({b:e,ts:r}),r+=w*a.millisecondsPerBeat;else for(var T=w*a.beatSubdivisions,D=0;D<Math.floor(T);D++){var B=D/T,S=Math.round(p+d*a.millisecondsPerBeat);S<a.lastMoment&&a.beatStarts.push({b:e+B,ts:S}),d++}e++}a.beatStarts.push({b:f*n.length,ts:a.lastMoment}),a.totalBeats=a.beatStarts.length}else{a.totalBeats=Math.round(a.lastMoment/a.millisecondsPerBeat);for(var L=0;L<a.totalBeats+1;L++)a.beatStarts.push({b:L/a.beatSubdivisions,ts:Math.round(L*a.millisecondsPerBeat)})}}},a.replaceTarget(g),a.doTiming=function(s){if(a.lastTimestamp!==s&&(a.lastTimestamp=s,!a.isPaused&&a.isRunning)){for(a.startTime||(a.startTime=s),a.currentTime=s-a.startTime,a.currentTime+=16;a.noteTimings.length>a.currentEvent&&a.noteTimings[a.currentEvent].milliseconds<a.currentTime;){if(a.eventCallback&&a.noteTimings[a.currentEvent].type==="event"){var c=a.startTime;a.eventCallback(a.noteTimings[a.currentEvent]),c!==a.startTime&&(a.currentTime=s-a.startTime)}a.currentEvent++}if(a.lineEndCallback&&a.lineEndTimings.length>a.currentLine&&a.lineEndTimings[a.currentLine].milliseconds<a.currentTime&&a.currentEvent<a.noteTimings.length){var v=a.noteTimings[a.currentEvent].milliseconds===a.currentTime?a.noteTimings[a.currentEvent]:a.noteTimings[a.currentEvent-1];a.lineEndCallback(a.lineEndTimings[a.currentLine],v,{line:a.currentLine,endTimings:a.lineEndTimings,currentTime:a.currentTime}),a.currentLine++}if(a.currentTime<a.lastMoment){if(requestAnimationFrame(a.doTiming),a.currentBeat<a.beatStarts.length&&a.beatStarts[a.currentBeat].ts<=a.currentTime){var u=a.doBeatCallback(s);a.currentBeat++,u!==null&&(a.currentTime=u)}}else if(a.currentBeat<=a.totalBeats&&a.beatCallback){var f=a.doBeatCallback(s);a.currentBeat++,f!==null&&(a.currentTime=f),requestAnimationFrame(a.doTiming)}if(a.currentTime>=a.lastMoment)if(a.eventCallback){var n=a.eventCallback(null);a.shouldStop(n).then(function(t){t&&a.stop()})}else a.stop()}},a.shouldStop=function(s){return new Promise(function(c){if(!s)return c(!0);if(s==="continue")return c(!1);s.then&&s.then(function(v){c(v!=="continue")})})},a.doBeatCallback=function(s){if(a.beatCallback){for(var c=a.currentEvent;c<a.noteTimings.length&&a.noteTimings[c].left===null;)c++;var v,u;if(c<a.noteTimings.length){for(v=a.noteTimings[c].milliseconds,c=Math.max(0,a.currentEvent-1);c>=0&&a.noteTimings[c].left===null;)c--;u=a.noteTimings[c]}var f={},n={};if(u){f.top=u.top,f.height=u.height;var t=Math.max(0,s-a.startTime-u.milliseconds),r=v-u.milliseconds,e=u.endX-u.left,h=r?t*e/r:0;f.left=u.left+h,a.currentEvent===0&&u.milliseconds>s-a.startTime&&(f.left=void 0),n={timestamp:s,startTime:a.startTime,ev:u,endMs:v,offMs:t,offPx:h,gapMs:r,gapPx:e}}else n={timestamp:s,startTime:a.startTime};var p=a.startTime;if(a.beatCallback(a.beatStarts[a.currentBeat].b,a.totalBeats/a.beatSubdivisions,a.lastMoment,f,n),p!==a.startTime)return s-a.startTime}return null};var i=60;a.animationJogger=function(){a.isRunning&&(a.doTiming(performance.now()),a.joggerTimer=setTimeout(a.animationJogger,i))},a.start=function(s,c){if(a.isRunning=!0,a.isPaused&&(a.isPaused=!1,s===void 0&&(a.justUnpaused=!0)),s)a.setProgress(s,c);else if(s===0)a.reset();else if(a.pausedPercent!==null){var v=performance.now();a.currentTime=a.lastMoment*a.pausedPercent,a.startTime=v-a.currentTime,a.pausedPercent=null,a.reportNext=!0}requestAnimationFrame(a.doTiming),a.joggerTimer=setTimeout(a.animationJogger,i)},a.pause=function(){a.isPaused=!0;var s=performance.now();a.pausedPercent=(s-a.startTime)/a.lastMoment,a.isRunning=!1,a.joggerTimer&&(clearTimeout(a.joggerTimer),a.joggerTimer=null)},a.currentMillisecond=function(){return a.currentTime},a.reset=function(){a.currentBeat=0,a.currentEvent=0,a.currentLine=0,a.startTime=null,a.pausedPercent=null},a.stop=function(){a.pause(),a.reset()},a.setProgress=function(s,c){var v;switch(c){case"seconds":a.currentTime=s*1e3,a.currentTime<0&&(a.currentTime=0),a.currentTime>a.lastMoment&&(a.currentTime=a.lastMoment),v=a.currentTime/a.lastMoment;break;case"beats":a.currentTime=s*a.millisecondsPerBeat*a.beatSubdivisions,a.currentTime<0&&(a.currentTime=0),a.currentTime>a.lastMoment&&(a.currentTime=a.lastMoment),v=a.currentTime/a.lastMoment;break;default:v=s,v<0&&(v=0),v>1&&(v=1),a.currentTime=a.lastMoment*v;break}a.isRunning||(a.pausedPercent=v);var u=performance.now();for(a.startTime=u-a.currentTime,a.currentEvent=0;a.noteTimings.length>a.currentEvent&&a.noteTimings[a.currentEvent].milliseconds<a.currentTime;)a.currentEvent++;if(a.lineEndCallback)for(a.currentLine=0;a.lineEndTimings.length>a.currentLine&&a.lineEndTimings[a.currentLine].milliseconds+a.lineEndAnticipation<a.currentTime;)a.currentLine++;var f=a.currentBeat;for(a.currentBeat=0;a.currentBeat<a.beatStarts.length&&!(a.beatStarts[a.currentBeat].ts>a.currentTime);a.currentBeat++);a.currentBeat--,a.beatCallback&&f!==a.currentBeat&&(a.doBeatCallback(a.startTime+a.currentTime),a.currentBeat++),a.eventCallback&&a.currentEvent>=0&&a.noteTimings[a.currentEvent].type==="event"&&a.eventCallback(a.noteTimings[a.currentEvent]),a.lineEndCallback&&a.lineEndCallback(a.lineEndTimings[a.currentLine],a.noteTimings[a.currentEvent],{line:a.currentLine,endTimings:a.lineEndTimings}),a.joggerTimer=setTimeout(a.animationJogger,i)}};function y(g,l){for(var a=[],o=null,i=0;i<g.length;i++){var s=g[i];s.type!=="end"&&s.top!==o&&(a.push({measureNumber:s.measureNumber,milliseconds:s.milliseconds-l,top:s.top,bottom:s.top+s.height}),o=s.top)}return a}return We=A,We}var Xe,jr;function ms(){if(jr)return Xe;jr=1;var A=Nr(),y={};return(function(){var g,l;y.startAnimation=function(a,o,i){g&&(g.stop(),g=void 0),i.showCursor&&(l=a.querySelector(".abcjs-cursor"),l||(l=document.createElement("DIV"),l.className="abcjs-cursor cursor",l.style.position="absolute",a.appendChild(l),a.style.position="relative"));function s(r){for(var e=0;e<r.length;e++){var h=r[e];h.classList.contains("abcjs-bar")||(h.style.display="none")}}var c;function v(r){if(c){var e=a.querySelectorAll(c);s(e)}c=r}function u(r){var e=a.querySelectorAll(r);s(e)}function f(r){i.hideCurrentMeasure?u(r):i.hideFinishedMeasures&&v(r)}function n(r){return".abcjs-l"+r.line+".abcjs-m"+r.measureNumber}function t(r){if(r){if(r.measureStart){var e=n(r);e&&f(e)}l&&(l.style.left=r.left+"px",l.style.top=r.top+"px",l.style.width=r.width+"px",l.style.height=r.height+"px")}else g.stop(),g=void 0}g=new A(o,{qpm:i.bpm,eventCallback:t}),g.start()},y.pauseAnimation=function(a){g&&(a?g.pause():g.start())},y.stopAnimation=function(){g&&(g.stop(),g=void 0)}})(),Xe=y,Xe}var Ue,Kr;function _e(){if(Kr)return Ue;Kr=1;var A={};return A.cloneArray=function(y){for(var g=[],l=0;l<y.length;l++)g.push(Object.assign({},y[l]));return g},A.cloneHashOfHash=function(y){var g={};for(var l in y)y.hasOwnProperty(l)&&(g[l]=Object.assign({},y[l]));return g},A.cloneHashOfArrayOfHash=function(y){var g={};for(var l in y)y.hasOwnProperty(l)&&(g[l]=A.cloneArray(y[l]));return g},A.strip=function(y){return y.replace(/^\s+/,"").replace(/\s+$/,"")},A.startsWith=function(y,g){return y.indexOf(g)===0},A.endsWith=function(y,g){var l=y.length-g.length;return l>=0&&y.lastIndexOf(g)===l},A.last=function(y){return y.length===0?null:y[y.length-1]},Ue=A,Ue}var Ve,$r;function Pr(){if($r)return Ve;$r=1;var A=_e(),y={};return(function(){var g,l,a,o,i;y.initialize=function(b,k,E,R,O){g=b,l=k,a=E,o=R,i=O,s()};function s(){a.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},a.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},a.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},a.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},a.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},a.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},a.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},o.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},o.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},o.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},o.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},o.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},o.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},o.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},o.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},o.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},o.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},o.formatting.annotationfont=a.annotationfont,o.formatting.gchordfont=a.gchordfont,o.formatting.historyfont=a.historyfont,o.formatting.infofont=a.infofont,o.formatting.measurefont=a.measurefont,o.formatting.partsfont=a.partsfont,o.formatting.repeatfont=a.repeatfont,o.formatting.textfont=a.textfont,o.formatting.tripletfont=a.tripletfont,o.formatting.vocalfont=a.vocalfont,o.formatting.wordsfont=a.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},v=function(b){switch(b){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}},u=function(b,k,E,R,O){function G(){var ue=parseInt(b[0].token);return b.shift(),k?b.length===0?{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:ue}:b.length===1&&b[0].token==="box"&&c[O]?{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:ue,box:!0}:(l("Extra parameters in font definition.",E,R),{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:ue}):(l("Can't set just the size of the font since there is no default value.",E,R),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:ue})}if(b[0].token==="*"){if(b.shift(),b[0].type==="number")return G();l("Expected font size number after *.",E,R)}if(b[0].type==="number")return G();for(var H=[],X,Q="normal",j="normal",ee="none",J=!1,ae="face",V=!1;b.length;){var Z=b.shift(),$=Z.token.toLowerCase();switch(ae){case"face":V||$!=="utf"&&Z.type!=="number"&&$!=="bold"&&$!=="italic"&&$!=="underline"&&$!=="box"?H.length>0&&Z.token==="-"?(V=!0,H[H.length-1]=H[H.length-1]+Z.token):V?(V=!1,H[H.length-1]=H[H.length-1]+Z.token):H.push(Z.token):Z.type==="number"?(X?l("Font size specified twice in font definition.",E,R):X=Z.token,ae="modifier"):$==="bold"?Q="bold":$==="italic"?j="italic":$==="underline"?ee="underline":$==="box"?(c[O]?J=!0:l(`This font style doesn't support "box"`,E,R),ae="finished"):$==="utf"?(Z=b.shift(),ae="size"):l("Unknown parameter "+Z.token+" in font definition.",E,R);break;case"size":Z.type==="number"?X?l("Font size specified twice in font definition.",E,R):X=Z.token:l("Expected font size in font definition.",E,R),ae="modifier";break;case"modifier":$==="bold"?Q="bold":$==="italic"?j="italic":$==="underline"?ee="underline":$==="box"?(c[O]?J=!0:l(`This font style doesn't support "box"`,E,R),ae="finished"):l("Unknown parameter "+Z.token+" in font definition.",E,R);break;case"finished":l('Extra characters found after "box" in font definition.',E,R);break}}X===void 0?k?X=k.size:(l("Must specify the size of the font since there is no default value.",E,R),X=12):X=parseFloat(X),H=H.join(" "),H===""&&(k?H=k.face:(l("Must specify the name of the font since there is no default value.",E,R),H="sans-serif"));var oe=v(H),ce={};return oe?(ce.face=oe.face,ce.weight=oe.weight,ce.style=oe.style,ce.decoration=oe.decoration,ce.size=X,J&&(ce.box=!0),ce):(ce.face=H,ce.weight=Q,ce.style=j,ce.decoration=ee,ce.size=X,J&&(ce.box=!0),ce)},f=function(b,k,E){return k.length===0?'Directive "'+b+'" requires a font as a parameter.':(a[b]=u(k,a[b],E,0,b),a.is_in_header&&(o.formatting[b]=a[b]),null)},n=function(b,k,E){return k.length===0?'Directive "'+b+'" requires a font as a parameter.':(o.formatting[b]=u(k,o.formatting[b],E,0,b),null)},t=function(b,k){var E="";k.forEach(function(O){E+=O.token});var R=parseFloat(E);if(isNaN(R)||R===0)return'Directive "'+b+'" requires a number as a parameter.';o.formatting.scale=R},r=["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(b){var k=b.split(/\s+/);if(k.length!==2&&k.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var E=k[0],R=parseInt(k[1],10);if((isNaN(R)||R<35||R>81)&&k[1]&&(R=r.indexOf(k[1].toLowerCase())+35),isNaN(R)||R<35||R>81)return{error:'Expected drum name, received "'+k[1]+'"'};var O={sound:R};return k.length===3&&(O.noteHead=k[2]),{key:E,value:O}},h=function(b,k){var E=g.getMeasurement(k);return E.used===0||k.length!==0?{error:'Directive "'+b+'" requires a measurement as a parameter.'}:E.value},p=function(b,k){var E=g.getMeasurement(k);return E.used===0||k.length!==0?'Directive "'+b+'" requires a measurement as a parameter.':(o.formatting[b]=E.value,null)},d=function(b,k,E,R,O){if(E.length!==1||E[0].type!=="number")return'Directive "'+k+'" requires a number as a parameter.';var G=E[0].intt;return R!==void 0&&G<R?'Directive "'+k+'" requires a number greater than or equal to '+R+" as a parameter.":O!==void 0&&G>O?'Directive "'+k+'" requires a number less than or equal to '+O+" as a parameter.":(a[b]=G,null)},m=function(b,k,E){if(E.length===1&&(E[0].token==="true"||E[0].token==="false"))return a[b]=E[0].token==="true",null;var R=d(b,k,E,0,1);return R!==null?R:(a[b]=a[b]===1,null)},w=function(b,k,E,R){if(E.length!==1)return'Directive "'+k+'" requires one of [ '+R.join(", ")+" ] as a parameter.";for(var O=E[0].token,G=!1,H=0;!G&&H<R.length;H++)R[H]===O&&(G=!0);return G?(a[b]=O,null):'Directive "'+k+'" requires one of [ '+R.join(", ")+" ] as a parameter."},T=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],D=["gchord","ptstress","beatstring"],B=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],S=["program"],L=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],x=["beat"],M=["drone"],N=["portamento"],F=["expand","grace","trim"],C=["drum","chordname"],_=["bassprog","chordprog"],P=function(b,k,E){var R=b.shift().token,O=[];if(T.indexOf(R)>=0)b.length!==0&&l("Unexpected parameter in MIDI "+R,E,0);else if(D.indexOf(R)>=0)b.length!==1?l("Expected one parameter in MIDI "+R,E,0):O.push(b[0].token);else if(B.indexOf(R)>=0)b.length!==1?l("Expected one parameter in MIDI "+R,E,0):b[0].type!=="number"?l("Expected one integer parameter in MIDI "+R,E,0):O.push(b[0].intt);else if(S.indexOf(R)>=0)b.length!==1&&b.length!==2?l("Expected one or two parameters in MIDI "+R,E,0):b[0].type!=="number"||b.length===2&&b[1].type!=="number"?l("Expected integer parameter in MIDI "+R,E,0):(O.push(b[0].intt),b.length===2&&O.push(b[1].intt));else if(L.indexOf(R)>=0)b.length!==2?l("Expected two parameters in MIDI "+R,E,0):b[0].type!=="number"||b[1].type!=="number"?l("Expected two integer parameters in MIDI "+R,E,0):(O.push(b[0].intt),O.push(b[1].intt));else if(N.indexOf(R)>=0)b.length!==2?l("Expected two parameters in MIDI "+R,E,0):b[0].type!=="alpha"||b[1].type!=="number"?l("Expected one string and one integer parameters in MIDI "+R,E,0):(O.push(b[0].token),O.push(b[1].intt));else if(R==="drummap")b.length===2&&b[0].type==="alpha"&&b[1].type==="number"?(k.formatting||(k.formatting={}),k.formatting.midi||(k.formatting.midi={}),k.formatting.midi.drummap||(k.formatting.midi.drummap={}),k.formatting.midi.drummap[b[0].token]=b[1].intt,O=k.formatting.midi.drummap):b.length===3&&b[0].type==="punct"&&b[1].type==="alpha"&&b[2].type==="number"?(k.formatting||(k.formatting={}),k.formatting.midi||(k.formatting.midi={}),k.formatting.midi.drummap||(k.formatting.midi.drummap={}),k.formatting.midi.drummap[b[0].token+b[1].token]=b[2].intt,O=k.formatting.midi.drummap):l("Expected one note name and one integer parameter in MIDI "+R,E,0);else if(F.indexOf(R)>=0)b.length!==3||b[0].type!=="number"||b[1].token!=="/"||b[2].type!=="number"?l("Expected fraction parameter in MIDI "+R,E,0):(O.push(b[0].intt),O.push(b[2].intt));else if(x.indexOf(R)>=0)b.length!==4?l("Expected four parameters in MIDI "+R,E,0):b[0].type!=="number"||b[1].type!=="number"||b[2].type!=="number"||b[3].type!=="number"?l("Expected four integer parameters in MIDI "+R,E,0):(O.push(b[0].intt),O.push(b[1].intt),O.push(b[2].intt),O.push(b[3].intt));else if(M.indexOf(R)>=0)b.length!==5?l("Expected five parameters in MIDI "+R,E,0):b[0].type!=="number"||b[1].type!=="number"||b[2].type!=="number"||b[3].type!=="number"||b[4].type!=="number"?l("Expected five integer parameters in MIDI "+R,E,0):(O.push(b[0].intt),O.push(b[1].intt),O.push(b[2].intt),O.push(b[3].intt),O.push(b[4].intt));else if(S.indexOf(R)>=0)b.length!==1||b.length!==4?l("Expected one or two parameters in MIDI "+R,E,0):b[0].type!=="number"?l("Expected integer parameter in MIDI "+R,E,0):b.length===4?(b[1].token!=="octave"&&l("Expected octave parameter in MIDI "+R,E,0),b[2].token!=="="&&l("Expected octave parameter in MIDI "+R,E,0),b[3].type!=="number"&&l("Expected integer parameter for octave in MIDI "+R,E,0)):(O.push(b[0].intt),b.length===4&&O.push(b[3].intt));else if(C.indexOf(R)>=0)if(b.length<2)l("Expected string parameter and at least one integer parameter in MIDI "+R,E,0);else if(b[0].type!=="alpha")l("Expected string parameter and at least one integer parameter in MIDI "+R,E,0);else{var G=b.shift();for(O.push(G.token);b.length>0;)G=b.shift(),G.type!=="number"&&l("Expected integer parameter in MIDI "+R,E,0),O.push(G.intt)}else if(_.indexOf(R)>=0){if(b.length!==1&&b.length!==2)l("Expected one or two parameters in MIDI "+R,E,0);else if(b[0].type!=="number")l("Expected integer parameter in MIDI "+R,E,0);else if(b.length===2&&b[1].type!=="alpha")l("Expected alpha parameter in MIDI "+R,E,0);else if(O.push(b[0].intt),b.length===2){var H=b[1].token;H.indexOf("octave=")!=-1?(H=H.replace("octave=",""),H=parseInt(H),isNaN(H)?l("Expected octave value in MIDI"+R):(H<-1&&(l("Expected octave= in MIDI "+R+" to be >= -1 (recv:"+H+")"),H=-1),H>3&&(l("Expected octave= in MIDI "+R+" to be <= 3 (recv:"+H+")"),H=3),O.push(H))):l("Expected octave= in MIDI"+R)}}i.hasBeginMusic()?i.appendElement("midi",-1,-1,{cmd:R,params:O}):(k.formatting.midi===void 0&&(k.formatting.midi={}),k.formatting.midi[R]=O)};y.parseFontChangeLine=function(b){b=b.replace(/\$\$/g,"");var k=b.split("$");if(k.length>1&&a.setfont){var E=[];k[0]!==""&&E.push({text:k[0]});for(var R=1;R<k.length;R++)if(k[R][0]==="0")E.push({text:k[R].substring(1).replace(/\x03/g,"$$")});else{var O=parseInt(k[R][0],10);a.setfont[O]?E.push({font:a.setfont[O],text:k[R].substring(1).replace(/\x03/g,"$$")}):E[E.length-1].text+="$"+k[R].replace(/\x03/g,"$$")}return E}return b.replace(/\x03/g,"$$")};var I=["auto","above","below","hidden"];y.addDirective=function(b){var k=g.tokenize(b,0,b.length);if(k.length===0||k[0].type!=="alpha")return null;var E=b.substring(b.indexOf(k[0].token)+k[0].token.length);E=g.stripComment(E);var R=k.shift().token.toLowerCase(),O="",G;switch(R){case"bagpipes":o.formatting.bagpipes=!0;break;case"flatbeams":o.formatting.flatbeams=!0;break;case"jazzchords":o.formatting.jazzchords=!0;break;case"accentAbove":o.formatting.accentAbove=!0;break;case"germanAlphabet":o.formatting.germanAlphabet=!0;break;case"landscape":a.landscape=!0;break;case"papersize":a.papersize=E;break;case"graceslurs":if(k.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(k[0].token==="0"||k[0].token==="false")o.formatting.graceSlurs=!1;else if(k[0].token==="1"||k[0].token==="true")o.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+k[0].token+")";break;case"lineThickness":var H=q(k);if(H.value!==void 0&&(o.formatting.lineThickness=H.value),H.error)return H.error;break;case"stretchlast":var X=q(k);if(X.value!==void 0&&(o.formatting.stretchlast=X.value),X.error)return X.error;break;case"titlecaps":a.titlecaps=!0;break;case"titleleft":o.formatting.titleleft=!0;break;case"measurebox":o.formatting.measurebox=!0;break;case"vocal":return w("vocalPosition",R,k,I);case"dynamic":return w("dynamicPosition",R,k,I);case"gchord":return w("chordPosition",R,k,I);case"ornament":return w("ornamentPosition",R,k,I);case"volume":return w("volumePosition",R,k,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 p(R,k);case"voicescale":if(k.length!==1||k[0].type!=="number")return"voicescale requires one float as a parameter";var Q=k.shift();return a.currentVoice&&(a.currentVoice.scale=Q.floatt,i.changeVoiceScale(a.currentVoice.scale)),null;case"voicecolor":if(k.length!==1)return"voicecolor requires one string as a parameter";var j=k.shift();return a.currentVoice&&(a.currentVoice.color=j.token,i.changeVoiceColor(a.currentVoice.color)),null;case"vskip":var ee=Math.round(h(R,k));return ee.error?ee.error:(i.addSpacing(ee),null);case"scale":t(R,k);break;case"sep":if(k.length===0)i.addSeparator(14,14,85,{startChar:a.iChar,endChar:a.iChar+5});else{var J=g.getMeasurement(k);if(J.used===0)return'Directive "'+R+'" requires 3 numbers: space above, space below, length of line';var ae=J.value;if(J=g.getMeasurement(k),J.used===0)return'Directive "'+R+'" requires 3 numbers: space above, space below, length of line';var V=J.value;if(J=g.getMeasurement(k),J.used===0||k.length!==0)return'Directive "'+R+'" requires 3 numbers: space above, space below, length of line';var Z=J.value;i.addSeparator(ae,V,Z,{startChar:a.iChar,endChar:a.iChar+E.length})}break;case"barsperstaff":if(O=d("barsperstaff",R,k),O!==null)return O;break;case"staffnonote":if(k.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(k[0].token==="0")a.staffnonote=!0;else if(k[0].token==="1")a.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+k[0].token+")";break;case"printtempo":if(O=m("printTempo",R,k),O!==null)return O;break;case"partsbox":if(O=m("partsBox",R,k),O!==null)return O;a.partsfont.box=a.partsBox;break;case"freegchord":if(O=m("freegchord",R,k),O!==null)return O;break;case"measurenb":case"barnumbers":if(O=d("barNumbers",R,k),O!==null)return O;break;case"setbarnb":if(k.length!==1||k[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";a.currBarNumber=i.setBarNumberImmediate(k[0].intt);break;case"keywarn":if(k.length!==1||k[0].type!=="number"||k[0].intt!==1&&k[0].intt!==0)return"Directive "+R+" requires 0 or 1 as a parameter.";a[R]=k[0].intt===1;break;case"begintext":var $="";for(G=g.nextLine();G&&G.indexOf("%%endtext")!==0;){if(A.startsWith(G,"%%")){var oe=G.substring(2);oe=oe.trim()+`
|
|
2
2
|
`,$+=oe}else $+=G.trim()+`
|
|
3
3
|
`;G=g.nextLine()}i.addText($,{startChar:a.iChar,endChar:a.iChar+$.length+7});break;case"continueall":a.continueall=!0;break;case"beginps":for(G=g.nextLine();G&&G.indexOf("%%endps")!==0;)g.nextLine();l("Postscript ignored",b,0);break;case"deco":E.length>0&&a.ignoredDecorations.push(E.substring(0,E.indexOf(" "))),l("Decoration redefinition ignored",b,0);break;case"text":var ce=g.translateString(E);i.addText(y.parseFontChangeLine(ce),{startChar:a.iChar,endChar:a.iChar+E.length+7});break;case"center":var ue=g.translateString(E);i.addCentered(y.parseFontChangeLine(ue));break;case"font":break;case"setfont":var fe=g.tokenize(E,0,E.length);if(fe.length>=4&&fe[0].token==="-"&&fe[1].type==="number"){var be=parseInt(fe[1].token);be>=1&&be<=9&&(a.setfont||(a.setfont=[]),fe.shift(),fe.shift(),a.setfont[be]=u(fe,a.setfont[be],b,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 f(R,k,b);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return n(R,k,b);case"barlabelfont":case"barnumberfont":case"barnumfont":return f("measurefont",k,b);case"staves":case"score":a.score_is_present=!0;for(var ge=function(Fe,ds,Wr,Xr,vs){(ds||a.staves.length===0)&&a.staves.push({index:a.staves.length,numVoices:0});var Be=A.last(a.staves);Wr!==void 0&&Be.bracket===void 0&&(Be.bracket=Wr),Xr!==void 0&&Be.brace===void 0&&(Be.brace=Xr),vs&&(Be.connectBarLines="end"),a.voices[Fe]===void 0&&(a.voices[Fe]={staffNum:Be.index,index:Be.numVoices},Be.numVoices++)},ye=!1,Y=!1,U=!1,z=!1,W=!1,K=!1,te=!1,ie,le=function(){if(te=!0,ie){var Fe="start";ie.staffNum>0&&(a.staves[ie.staffNum-1].connectBarLines==="start"||a.staves[ie.staffNum-1].connectBarLines==="continue")&&(Fe="continue"),a.staves[ie.staffNum].connectBarLines=Fe}};k.length;){var re=k.shift();switch(re.token){case"(":ye?l("Can't nest parenthesis in %%score",b,re.start):(ye=!0,z=!0);break;case")":!ye||z?l("Unexpected close parenthesis in %%score",b,re.start):ye=!1;break;case"[":Y?l("Can't nest brackets in %%score",b,re.start):(Y=!0,W=!0);break;case"]":!Y||W?l("Unexpected close bracket in %%score",b,re.start):(Y=!1,a.staves[ie.staffNum].bracket="end");break;case"{":U?l("Can't nest braces in %%score",b,re.start):(U=!0,K=!0);break;case"}":!U||K?l("Unexpected close brace in %%score",b,re.start):(U=!1,a.staves[ie.staffNum].brace="end");break;case"|":le();break;default:for(var se="";(re.type==="alpha"||re.type==="number")&&(se+=re.token,re.continueId);)re=k.shift();var ve=!ye||z,pe=W?"start":Y?"continue":void 0,ne=K?"start":U?"continue":void 0;ge(se,ve,pe,ne,te),z=!1,W=!1,K=!1,te=!1,ie=a.voices[se],R==="staves"&&le();break}}break;case"maxstaves":var de=g.getInt(E);de.digits===0?l("Expected number of staves in maxstaves"):de.value>0&&(o.formatting.maxStaves=de.value);break;case"newpage":var me=g.getInt(E);i.addNewPage(me.digits===0?-1:me.value);break;case"abc":var he=E.split(" ");switch(he[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var Ee=he.shift();i.addMetaText(R+Ee,he.join(" "),{startChar:a.iChar,endChar:a.iChar+E.length+5});break;default:return"Unknown directive: "+R+he[0]}break;case"header":case"footer":var xe=g.getMeat(E,0,E.length);xe=E.substring(xe.start,xe.end),xe[0]==='"'&&xe[xe.length-1]==='"'&&(xe=xe.substring(1,xe.length-1));var we=xe.split(" "),Le={};we.length===1?Le={left:"",center:we[0],right:""}:we.length===2?Le={left:we[0],center:we[1],right:""}:Le={left:we[0],center:we[1],right:we[2]},we.length>3&&l("Too many tabs in "+R+": "+we.length+" found.",E,0),i.addMetaTextObj(R,Le,{startChar:a.iChar,endChar:a.iChar+b.length});break;case"midi":var Ae=g.tokenize(E,0,E.length,!0);Ae.length>0&&Ae[0].token==="="&&Ae.shift(),Ae.length===0?l("Expected midi command",E,0):P(Ae,o,E);break;case"percmap":var Me=e(E);Me.error?l(Me.error,b,8):(o.formatting.percmap||(o.formatting.percmap={}),o.formatting.percmap[Me.key]=Me.value);break;case"visualtranspose":var Re=g.getInt(E);Re.digits===0?l("Expected number of half steps in visualTranspose"):a.globalTranspose=Re.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":o.formatting[R]=E;break;default:return"Unknown directive: "+R}return null},y.globalFormatting=function(b){for(var k in b)if(b.hasOwnProperty(k)){var E=""+b[k],R=g.tokenize(E,0,E.length),O;switch(k){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":f(k,R,E);break;case"scale":t(k,R);break;case"partsbox":O=m("partsBox",k,R),O!==null&&l(O),a.partsfont.box=a.partsBox;break;case"freegchord":O=m("freegchord",k,R),O!==null&&l(O);break;case"fontboxpadding":(R.length!==1||R[0].type!=="number")&&l('Directive "'+k+'" requires a number as a parameter.'),o.formatting.fontboxpadding=R[0].floatt;break;case"stafftopmargin":(R.length!==1||R[0].type!=="number")&&l('Directive "'+k+'" requires a number as a parameter.'),o.formatting.stafftopmargin=R[0].floatt;break;case"stretchlast":var G=q(R);if(G.value!==void 0&&(o.formatting.stretchlast=G.value),G.error)return G.error;break;default:l("Formatting directive unrecognized: ",k,0)}}};function q(b){if(b.length===0)return{value:1};if(b.length===1)if(b[0].type==="number"){if(b[0].floatt>=0||b[0].floatt<=1)return{value:b[0].floatt}}else{if(b[0].token==="false")return{value:0};if(b[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+b[0].token+")"}}})(),Ve=y,Ve}var je,Qr;function ys(){if(Qr)return je;Qr=1;var A={};const y=["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 A.pitchIndex=function(g){return y.indexOf(g)},A.noteName=function(g){return y[g]},je=A,je}var Ke,Jr;function In(){if(Jr)return Ke;Jr=1;var A=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],y=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],g=["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 a(o,i,s,c){if(!i||i%12===0)return o;for(;i<0;)i+=12;i>11&&(i=i%12);var v=o.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!v)return o;var u=v[1],f=v[2],n=v[3],t=v[4],r=A.indexOf(u);if(r<0&&(r=y.indexOf(u)),r<0&&(r=g.indexOf(u)),r<0&&(r=l.indexOf(u)),r<0)return o;r+=i,r=r%12,s?c?o=l[r]:o=y[r]:c?o=g[r]:o=A[r];var e=f&&(f.indexOf("dim")>=0||f.indexOf("°")>=0);if(e&&o==="A#"&&(o="Bb"),e&&o==="D#"&&(o="Eb"),e&&o==="A♯"&&(o="B♭"),e&&o==="D♯"&&(o="E♭"),f&&(o+=f),n){var r=A.indexOf(n);r<0&&(r=y.indexOf(n)),r<0&&(r=g.indexOf(n)),r<0&&(r=l.indexOf(n)),o+="/",r>=0?(r+=i,r=r%12,s?c?o+=l[r]:o+=y[r]:c?o+=g[r]:o+=A[r]):o+=n}return t&&(o+=t),o}return Ke=a,Ke}var $e,Zr;function Rn(){if(Zr)return $e;Zr=1;var A={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}},y=["maj","ion","min","aeo","m","mix","dor","phr","lyd","loc"];function g(c){return y.indexOf(c.toLowerCase())>=0}var l=null;function a(){l={};for(var c=Object.keys(A),v=0;v<c.length;v++){var u=A[c[v]];l[c[v].toLowerCase()]=c[v];for(var f=0;f<u.modes.length;f++){var n=u.modes[f].toLowerCase();l[n]=c[v]}}}function o(c){l||a();var v=c.toLowerCase().match(/([a-g][b#]?)(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)?/);if(!v||!v[2])return c;v=v[1]+v[2];var u=l[v];return u||c}function i(c,v){var u=A[c];if(!u||v==="")return c;var f=v.toLowerCase().match(/^(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)/);if(!f)return c;for(var n=f[1],t=0;t<u.modes.length;t++){var r=u.modes[t],e=r.toLowerCase().indexOf(n);if(e!==-1&&e===r.length-n.length)return r.substring(0,r.length-n.length)}return c}function s(c,v){var u=A[c];if(!u)return c;for(;v<0;)v+=12;for(var f=(u.stepsFromC+v)%12,n=0;n<Object.keys(A).length;n++){var t=Object.keys(A)[n];if(A[t].stepsFromC===f)return t}return c}return $e={relativeMajor:o,relativeMode:i,transposeKey:s,isLegalMode:g},$e}var Qe,ea;function Fn(){if(ea)return Qe;ea=1;var{relativeMajor:A}=Rn(),y={acc:"sharp",note:"f"},g={acc:"sharp",note:"c"},l={acc:"sharp",note:"g"},a={acc:"sharp",note:"d"},o={acc:"sharp",note:"A"},i={acc:"sharp",note:"e"},s={acc:"sharp",note:"B"},c={acc:"flat",note:"B"},v={acc:"flat",note:"e"},u={acc:"flat",note:"A"},f={acc:"flat",note:"d"},n={acc:"flat",note:"G"},t={acc:"flat",note:"c"},r={acc:"flat",note:"F"},e={"C#":[y,g,l,a,o,i,s],"F#":[y,g,l,a,o,i],B:[y,g,l,a,o],E:[y,g,l,a],A:[y,g,l],D:[y,g],G:[y],C:[],F:[c],Bb:[c,v],Eb:[c,v,u],Cm:[c,v,u],Ab:[c,v,u,f],Db:[c,v,u,f,n],Gb:[c,v,u,f,n,t],Cb:[c,v,u,f,n,t,r],"A#":[c,v],"B#":[],"D#":[c,v,u],"E#":[c],"G#":[c,v,u,f],none:[]};function h(p){var d=e[A(p)];return d?JSON.parse(JSON.stringify(d)):null}return Qe=h,Qe}var Je,ta;function On(){if(ta)return Je;ta=1;var A=ys(),y=In(),g=Fn(),l={},a={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},o=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],i=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];l.keySignature=function(n,t,r,e,h){if(n.clef.type==="perc"||n.clef.type==="none")return{accidentals:g(t),root:r,acc:e};h||(h=0),n.localTransposeVerticalMovement=0,n.localTransposePreferFlats=!1;var p=g(t);if(!p)return n.key;if(n.localTranspose=(n.globalTranspose?n.globalTranspose:0)+h,!n.localTranspose)return{accidentals:p,root:r,acc:e};if(n.globalTransposeOrigKeySig=p,n.localTranspose%12===0)return n.localTransposeVerticalMovement=n.localTranspose/12*7,{accidentals:p,root:r,acc:e};var d=t[0];t[1]==="b"||t[1]==="#"?(d+=t[1],t=t.substr(2)):t=t.substr(1);var m=a[d],w=m!==void 0;w||(m=0,d="C",t="");for(var T=m+n.localTranspose;T<0;)T+=12;T>11&&(T=T%12);var D=t[0]==="m"?i[T]:o[T],B=D+t,S=g(B);(S.length===0||S[0].acc==="flat")&&(n.localTransposePreferFlats=!0);var L=B.charCodeAt(0)-d.charCodeAt(0);return n.localTranspose>0?(L<0||L===0&&(d[1]==="#"||B[1]==="b"))&&(L+=7):n.localTranspose<0&&(L>0||L===0&&(d[1]==="b"||B[1]==="#"))&&(L-=7),n.localTranspose>0?n.localTransposeVerticalMovement=L+Math.floor(n.localTranspose/12)*7:n.localTransposeVerticalMovement=L+Math.ceil(n.localTranspose/12)*7,w?{accidentals:S,root:D[0],acc:D.length>1?D[1]:""}:{accidentals:[],root:r,acc:e}},l.chordName=function(n,t){return y(t,n.localTranspose,n.localTransposePreferFlats,n.freegchord)};var s=["c","d","e","f","g","a","b"];function c(n,t,r,e,h){for(var p=s[(n+49)%7],d=0,m=0;m<e.length;m++)e[m].note.toLowerCase()===p&&(d=v[e[m].acc]);for(var w=v[r],T=w-d,D=s[(t+49)%7],B=0,S=0;S<h.accidentals.length;S++)h.accidentals[S].note.toLowerCase()===D&&(B=v[h.accidentals[S].acc]);var L=T+B;return L<-2&&(t--,L+=D==="c"||D==="f"?1:2),L>2&&(t++,L-=D==="b"||D==="e"?1:2),[t,L]}var v={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},u={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},f={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return l.note=function(n,t){if(!(!n.localTranspose||n.clef.type==="perc")){var r=t.pitch;if(n.localTransposeVerticalMovement&&(t.pitch=t.pitch+n.localTransposeVerticalMovement,t.name)){var e=t.accidental?t.name.substring(1):t.name,h=t.accidental?t.name[0]:"",p=A.pitchIndex(e);t.name=h+A.noteName(p+n.localTransposeVerticalMovement)}if(t.accidental){var d=c(r,t.pitch,t.accidental,n.globalTransposeOrigKeySig,n.targetKey);t.pitch=d[0],t.accidental=u[d[1]],t.name&&(t.name=f[d[1]]+t.name.replace(/[_^=]/g,""))}}},Je=l,Je}var Ze,ra;function Lr(){if(ra)return Ze;ra=1;var A=Pr(),y=On(),g={};return(function(){var l,a,o,i;g.initialize=function(t,r,e,h,p){l=t,a=r,o=e,i=p},g.standardKey=function(t,r,e,h){return y.keySignature(o,t,r,e,h)};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,r){var e=s[t],h=e?e.mid:0;return h+r};g.fixClef=function(t){var r=s[t.type];r&&(t.clefPos=r.pitch,t.type=r.clef)},g.deepCopyKey=function(t){var r={accidentals:[],root:t.root,acc:t.acc,mode:t.mode};return t.accidentals.forEach(function(e){r.accidentals.push(Object.assign({},e))}),r};var v={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};g.addPosToKey=function(t,r){var e=t.verticalPos;r.accidentals.forEach(function(h){var p=v[h.note];p=p-e,h.verticalPos=p}),r.impliedNaturals&&r.impliedNaturals.forEach(function(h){var p=v[h.note];p=p-e,h.verticalPos=p}),e<-10?(r.accidentals.forEach(function(h){h.verticalPos-=7,(h.verticalPos>=11||h.verticalPos===10&&h.acc==="flat")&&(h.verticalPos-=7),h.note==="A"&&h.acc==="sharp"&&(h.verticalPos-=7),(h.note==="G"||h.note==="F")&&h.acc==="flat"&&(h.verticalPos-=7)}),r.impliedNaturals&&r.impliedNaturals.forEach(function(h){h.verticalPos-=7,(h.verticalPos>=11||h.verticalPos===10&&h.acc==="flat")&&(h.verticalPos-=7),h.note==="A"&&h.acc==="sharp"&&(h.verticalPos-=7),(h.note==="G"||h.note==="F")&&h.acc==="flat"&&(h.verticalPos-=7)})):e<-4?(r.accidentals.forEach(function(h){h.verticalPos-=7,e===-8&&(h.note==="f"||h.note==="g")&&h.acc==="sharp"&&(h.verticalPos-=7)}),r.impliedNaturals&&r.impliedNaturals.forEach(function(h){h.verticalPos-=7,e===-8&&(h.note==="f"||h.note==="g")&&h.acc==="sharp"&&(h.verticalPos-=7)})):e>=7&&(r.accidentals.forEach(function(h){h.verticalPos+=7}),r.impliedNaturals&&r.impliedNaturals.forEach(function(h){h.verticalPos+=7}))},g.fixKey=function(t,r){var e=Object.assign({},r);return g.addPosToKey(t,e),e};var u=function(t){var r=0,e=t[r++];(e==="^"||e==="_")&&(e=t[r++]);var h=v[e];for(h===void 0&&(h=6);r<t.length;r++)if(t[r]===",")h-=7;else if(t[r]==="'")h+=7;else break;return{mid:h-6,str:t.substring(r)}},f=function(t){for(var r=0;r<t.length;r++)t[r].note==="b"?t[r].note="B":t[r].note==="a"?t[r].note="A":t[r].note==="F"?t[r].note="f":t[r].note==="E"?t[r].note="e":t[r].note==="D"?t[r].note="d":t[r].note==="C"?t[r].note="c":t[r].note==="G"&&t[r].acc==="sharp"?t[r].note="g":t[r].note==="g"&&t[r].acc==="flat"&&(t[r].note="G")};g.parseKey=function(t,r){t.length===0&&(t="none");var e=l.tokenize(t,0,t.length),h={};if(e.length===0)return a("Must pass in key signature.",t,0),h;switch(e[0].token){case"HP":A.addDirective("bagpipes"),o.key={root:"HP",accidentals:[],acc:"",mode:""},h.foundKey=!0,e.shift();break;case"Hp":A.addDirective("bagpipes"),o.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},h.foundKey=!0,e.shift();break;case"none":o.key={root:"none",accidentals:[],acc:"",mode:""},h.foundKey=!0,e.shift();break;default:var p=l.getKeyPitch(e[0].token);if(p.len>0){h.foundKey=!0;var d="",m="";e[0].token.length>1?e[0].token=e[0].token.substring(1):e.shift();var w=p.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(),w+=T.token,d=T.token),e.length>0){var D=l.getMode(e[0].token);D.len>0&&(e.shift(),w+=D.token,m=D.token)}if(g.standardKey(w,p.token,d,0)===void 0)return a("Unsupported key signature: "+w,t,0),h}var B=g.deepCopyKey(o.key),S=!r&&o.globalTranspose?-o.globalTranspose:0,L;if(r&&(L=o.globalTransposeOrigKeySig),o.key=g.deepCopyKey(g.standardKey(w,p.token,d,S)),r&&(o.globalTransposeOrigKeySig=L),o.key.mode=m,B&&o.keywarn!==!1){for(var x,M=0;M<o.key.accidentals.length;M++)for(x=0;x<B.accidentals.length;x++)B.accidentals[x].note&&o.key.accidentals[M].note.toLowerCase()===B.accidentals[x].note.toLowerCase()&&(B.accidentals[x].note=null);for(x=0;x<B.accidentals.length;x++)B.accidentals[x].note&&(o.key.impliedNaturals||(o.key.impliedNaturals=[]),o.key.impliedNaturals.push({acc:"natural",note:B.accidentals[x].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 h;var N=l.getKeyAccidentals2(e);if(N.warn&&a(N.warn,t,0),N.accs){h.foundKey||(h.foundKey=!0,o.key={root:"none",acc:"",mode:"",accidentals:[]}),f(N.accs);for(var F=0;F<N.accs.length;F++){for(var C=!1,_=0;_<o.key.accidentals.length&&!C;_++)o.key.accidentals[_].note===N.accs[F].note&&(C=!0,o.key.accidentals[_].acc!==N.accs[F].acc&&(o.key.accidentals[_].acc=N.accs[F].acc,o.key.explicitAccidentals||(o.key.explicitAccidentals=[]),o.key.explicitAccidentals.push(N.accs[F])));if(!C&&(o.key.explicitAccidentals||(o.key.explicitAccidentals=[]),o.key.explicitAccidentals.push(N.accs[F]),o.key.accidentals.push(N.accs[F]),o.key.impliedNaturals))for(var P=0;P<o.key.impliedNaturals.length;P++)o.key.impliedNaturals[P].note===N.accs[F].note&&o.key.impliedNaturals.splice(P,1)}}for(var I;e.length>0;)switch(e[0].token){case"m":case"middle":if(e.shift(),e.length===0)return a("Expected = after middle",t,0),h;if(I=e.shift(),I.token!=="="){a("Expected = after middle",t,I.start);break}if(e.length===0)return a("Expected parameter after middle=",t,0),h;var q=l.getPitchFromTokens(e);q.warn&&a(q.warn,t,0),q.position&&(o.clef.verticalPos=q.position-6);break;case"transpose":if(e.shift(),e.length===0)return a("Expected = after transpose",t,0),h;if(I=e.shift(),I.token!=="="){a("Expected = after transpose",t,I.start);break}if(e.length===0)return a("Expected parameter after transpose=",t,0),h;if(e[0].type!=="number"){a("Expected number after transpose",t,e[0].start);break}o.clef.transpose=e[0].intt,e.shift();break;case"stafflines":if(e.shift(),e.length===0)return a("Expected = after stafflines",t,0),h;if(I=e.shift(),I.token!=="="){a("Expected = after stafflines",t,I.start);break}if(e.length===0)return a("Expected parameter after stafflines=",t,0),h;if(e[0].type!=="number"){a("Expected number after stafflines",t,e[0].start);break}o.clef.stafflines=e[0].intt,e.shift();break;case"staffscale":if(e.shift(),e.length===0)return a("Expected = after staffscale",t,0),h;if(I=e.shift(),I.token!=="="){a("Expected = after staffscale",t,I.start);break}if(e.length===0)return a("Expected parameter after staffscale=",t,0),h;if(e[0].type!=="number"){a("Expected number after staffscale",t,e[0].start);break}o.clef.staffscale=e[0].floatt,e.shift();break;case"octave":if(e.shift(),e.length===0)return a("Expected = after octave",t,0),h;if(I=e.shift(),I.token!=="="){a("Expected = after octave",t,I.start);break}if(e.length===0)return a("Expected parameter after octave=",t,0),h;if(e[0].type!=="number"){a("Expected number after octave",t,e[0].start);break}o.octave=e[0].intt,e.shift();break;case"style":if(e.shift(),e.length===0)return a("Expected = after style",t,0),h;if(I=e.shift(),I.token!=="="){a("Expected = after style",t,I.start);break}if(e.length===0)return a("Expected parameter after style=",t,0),h;switch(e[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":o.style=e[0].token,e.shift();break;default:a("error parsing style element: "+e[0].token,t,e[0].start);break}break;case"clef":if(e.shift(),e.length===0)return a("Expected = after clef",t,0),h;if(I=e.shift(),I.token!=="="){a("Expected = after clef",t,I.start);break}if(e.length===0)return a("Expected parameter after clef=",t,0),h;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var b=e.shift();switch(b.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":b.token="alto";break;case"F":b.token="bass";break;case"G":b.token="treble";break;case"c":b.token="alto";break;case"f":b.token="bass";break;case"g":b.token="treble";break;default:a("Expected clef name. Found "+b.token,t,b.start);break}e.length>0&&e[0].type==="number"&&(b.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"&&(b.token+=e[0].token+e[1].token,e.shift(),e.shift()),o.clef={type:b.token,verticalPos:c(b.token,0)},o.currentVoice&&o.currentVoice.transpose!==void 0&&(o.clef.transpose=o.currentVoice.transpose),h.foundClef=!0;break;default:a("Unknown parameter: "+e[0].token,t,e[0].start),e.shift()}return h};var n=function(t){var r=o.voices[t];if(!(o.currentVoice&&o.currentVoice.index===r.index&&o.currentVoice.staffNum===r.staffNum))return o.currentVoice=r,i.setCurrentVoice(r.staffNum,r.index,t)};g.parseVoice=function(t,r,e){var h=l.getMeat(t,r,e),p=h.start,d=h.end,m=l.getToken(t,p,d);if(m.length===0){a("Expected a voice id",t,p);return}var w=!1;o.voices[m]===void 0&&(o.voices[m]={},w=!0,o.score_is_present&&a("Can't have an unknown V: id when the %score directive is present",t,p)),p+=m.length,p+=l.eatWhiteSpace(t,p);for(var T={startStaff:w},D=function(q){var b=l.getVoiceToken(t,p,d);b.warn!==void 0?a("Expected value for "+q+" in voice: "+b.warn,t,p):b.err!==void 0?a("Expected value for "+q+" in voice: "+b.err,t,p):b.token.length===0&&t[p]!=='"'?a("Expected value for "+q+" in voice",t,p):T[q]=b.token,p+=b.len},B=function(q,b,k){var E=l.getVoiceToken(t,p,d);E.warn!==void 0?a("Expected value for "+b+" in voice: "+E.warn,t,p):E.err!==void 0?a("Expected value for "+b+" in voice: "+E.err,t,p):E.token.length===0&&t[p]!=='"'?a("Expected value for "+b+" in voice",t,p):(E.token=parseFloat(E.token),o.voices[q][b]=E.token),p+=E.len},S=function(q,b){var k=l.getVoiceToken(t,p,d);if(k.warn!==void 0)a("Expected value for "+q+" in voice: "+k.warn,t,p);else if(k.err!==void 0)a("Expected value for "+q+" in voice: "+k.err,t,p);else if(k.token.length===0&&t[p]!=='"')a("Expected value for "+q+" in voice",t,p);else return k.token;p+=k.len},L=function(q,b){var k={_B:2,_E:9,_b:-10,_e:-3},E=l.getVoiceToken(t,p,d);if(E.warn!==void 0)a("Expected one of (_B, _E, _b, _e) for "+b+" in voice: "+E.warn,t,p);else if(E.token.length===0&&t[p]!=='"')a("Expected one of (_B, _E, _b, _e) for "+b+" in voice",t,p);else{var R=k[E.token];R?o.voices[q][b]=R:a("Expected one of (_B, _E, _b, _e) for "+b+" in voice",t,p)}p+=E.len};p<d;){var x=l.getVoiceToken(t,p,d);if(p+=x.len,x.warn)a("Error parsing voice: "+x.warn,t,p);else{var M=null;switch(x.token){case"clef":case"cl":D("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 F=0;T.clef=x.token.replace(/[',]/g,""),T.verticalPos=c(T.clef,F),o.voices[m].clef=x.token;break;case"staves":case"stave":case"stv":D("staves");break;case"brace":case"brc":D("brace");break;case"bracket":case"brk":D("bracket");break;case"name":case"nm":D("name");break;case"subname":case"sname":case"snm":D("subname");break;case"merge":T.startStaff=!1;break;case"stem":case"stems":M=l.getVoiceToken(t,p,d),M.warn!==void 0?a("Expected value for stems in voice: "+M.warn,t,p):M.err!==void 0?a("Expected value for stems in voice: "+M.err,t,p):M.token==="up"||M.token==="down"?o.voices[m].stem=M.token:a("Expected up or down for voice stem",t,p),p+=M.len;break;case"up":case"down":o.voices[m].stem=x.token;break;case"middle":case"m":D("verticalPos"),T.verticalPos=u(T.verticalPos).mid;break;case"gchords":case"gch":o.voices[m].suppressChords=!0,M=l.getVoiceToken(t,p,d),M.token==="0"&&(p=p+M.len);break;case"space":case"spc":D("spacing");break;case"scale":B(m,"scale");break;case"score":L(m,"scoreTranspose");break;case"transpose":B(m,"transpose");break;case"stafflines":B(m,"stafflines");break;case"staffscale":B(m,"staffscale");break;case"octave":B(m,"octave");break;case"volume":B(m,"volume");break;case"cue":var C=S("cue");C==="on"?o.voices[m].scale=.6:o.voices[m].scale=1;break;case"style":M=l.getVoiceToken(t,p,d),M.warn!==void 0?a("Expected value for style in voice: "+M.warn,t,p):M.err!==void 0?a("Expected value for style in voice: "+M.err,t,p):M.token==="normal"||M.token==="harmonic"||M.token==="rhythm"||M.token==="x"||M.token==="triangle"?o.voices[m].style=M.token:a("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",t,p),p+=M.len;break}}p+=l.eatWhiteSpace(t,p)}if((T.startStaff||o.staves.length===0)&&(o.staves.push({index:o.staves.length,meter:o.origMeter}),o.score_is_present||(o.staves[o.staves.length-1].numVoices=0)),o.voices[m].staffNum===void 0){o.voices[m].staffNum=o.staves.length-1;var _=0;for(var P in o.voices)o.voices.hasOwnProperty(P)&&o.voices[P].staffNum===o.voices[m].staffNum&&_++;o.voices[m].index=_-1}var I=o.staves[o.voices[m].staffNum];return o.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(m)}})(),Ze=g,Ze}var et,aa;function ws(){if(aa)return et;aa=1;var A=_e(),y=Pr(),g=Lr(),l=function(a,o,i,s,c){this.reset=function(f,n,t,r){g.initialize(f,n,t,r,c),y.initialize(f,n,t,r,c)},this.reset(a,o,i,s),this.setTitle=function(f,n){i.hasMainTitle?c.addSubtitle(f,{startChar:i.iChar,endChar:i.iChar+n+2}):(c.addMetaText("title",f,{startChar:i.iChar,endChar:i.iChar+n+2}),i.hasMainTitle=!0)},this.setMeter=function(f){if(f=a.stripComment(f),f==="C")return i.havent_set_length===!0&&(i.default_length=.125,i.havent_set_length=!1),{type:"common_time"};if(f==="C|")return i.havent_set_length===!0&&(i.default_length=.125,i.havent_set_length=!1),{type:"cut_time"};if(f==="o")return i.havent_set_length===!0&&(i.default_length=.125,i.havent_set_length=!1),{type:"tempus_perfectum"};if(f==="c")return i.havent_set_length===!0&&(i.default_length=.125,i.havent_set_length=!1),{type:"tempus_imperfectum"};if(f==="o.")return i.havent_set_length===!0&&(i.default_length=.125,i.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if(f==="c.")return i.havent_set_length===!0&&(i.default_length=.125,i.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(f.length===0||f.toLowerCase()==="none")return i.havent_set_length===!0&&(i.default_length=.125,i.havent_set_length=!1),null;var n=a.tokenize(f,0,f.length);try{var t=function(){var m={value:0,num:""},w=n.shift();for(w.token==="("&&(w=n.shift());;){if(w.type!=="number")throw"Expected top number of meter";if(m.value+=parseInt(w.token),m.num+=w.token,n.length===0||n[0].token==="/")return m;if(w=n.shift(),w.token===")"){if(n.length===0||n[0].token==="/")return m;throw"Unexpected paren in meter"}if(w.token!=="."&&w.token!=="+"||(m.num+=w.token,n.length===0))throw"Expected top number of meter";w=n.shift()}return m},r=function(){var m=t();if(n.length===0)return m;var w=n.shift();if(w.token!=="/")throw"Expected slash in meter";if(w=n.shift(),w.type!=="number")throw"Expected bottom number of meter";return m.den=w.token,m.value=m.value/parseInt(m.den),m};if(n.length===0)throw"Expected meter definition in M: line";for(var e={type:"specified",value:[]},h=0;;){var p=r();h+=p.value;var d={num:p.num};if(p.den!==void 0&&(d.den=p.den),e.value.push(d),n.length===0)break}return i.havent_set_length===!0&&(i.default_length=h<.75?.0625:.125,i.havent_set_length=!1),e}catch(m){o(m,f,0)}return null},this.calcTempo=function(f){var n=.25;i.meter&&i.meter.type==="specified"?n=1/parseInt(i.meter.value[0].den):i.origMeter&&i.origMeter.type==="specified"&&(n=1/parseInt(i.origMeter.value[0].den));for(var t=0;t<f.duration;t++)f.duration[t]=n*f.duration[t];return f},this.resolveTempo=function(){i.tempo&&(this.calcTempo(i.tempo),s.metaText.tempo=i.tempo,delete i.tempo)},this.addUserDefinition=function(f,n,t){var r=f.indexOf("=",n);if(r===-1){o("Need an = in a macro definition",f,n);return}var e=A.strip(f.substring(n,r)),h=A.strip(f.substring(r+1));if(e.length!==1){o("Macro definitions can only be one character",f,n);return}var p="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~";if(p.indexOf(e)===-1){o("Macro definitions must be H-Y, h-w, or tilde",f,n);return}if(h.length===0){o("Missing macro definition",f,n);return}i.macros===void 0&&(i.macros={}),i.macros[e]=h},this.setDefaultLength=function(f,n,t){var r=f.substring(n,t).replace(/ /g,""),e=r.split("/");if(e.length===2){var h=parseInt(e[0]),p=parseInt(e[1]);p>0&&(i.default_length=h/p,i.havent_set_length=!1)}else e.length===1&&e[0]==="1"&&(i.default_length=1,i.havent_set_length=!1)};var v={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(f,n,t,r){try{var e=a.tokenize(f,n,t);if(e.length===0)throw"Missing parameter in Q: field";var h={startChar:r+n-2,endChar:r+t},p=!0,d=e.shift();if(d.type==="quote"&&(h.preString=d.token,d=e.shift(),e.length===0))return v[h.preString.toLowerCase()]&&(h.bpm=v[h.preString.toLowerCase()],h.suppressBpm=!0),{type:"immediate",tempo:h};if(d.type==="alpha"&&d.token==="C"){if(e.length===0)throw"Missing tempo after C in Q: field";if(d=e.shift(),d.type==="punct"&&d.token==="="){if(e.length===0)throw"Missing tempo after = in Q: field";if(d=e.shift(),d.type!=="number")throw"Expected number after = in Q: field";h.duration=[1],h.bpm=parseInt(d.token)}else if(d.type==="number"){if(h.duration=[parseInt(d.token)],e.length===0)throw"Missing = after duration in Q: field";if(d=e.shift(),d.type!=="punct"||d.token!=="=")throw"Expected = after duration in Q: field";if(e.length===0)throw"Missing tempo after = in Q: field";if(d=e.shift(),d.type!=="number")throw"Expected number after = in Q: field";h.bpm=parseInt(d.token)}else throw"Expected number or equal after C in Q: field"}else if(d.type==="number"){var m=parseInt(d.token);if(e.length===0||e[0].type==="quote")h.duration=[1],h.bpm=m;else{if(p=!1,d=e.shift(),d.type!=="punct"&&d.token!=="/"||(d=e.shift(),d.type!=="number"))throw"Expected fraction in Q: field";var w=parseInt(d.token);for(h.duration=[m/w];e.length>0&&e[0].token!=="="&&e[0].type!=="quote";){if(d=e.shift(),d.type!=="number"||(m=parseInt(d.token),d=e.shift(),d.type!=="punct"&&d.token!=="/")||(d=e.shift(),d.type!=="number"))throw"Expected fraction in Q: field";w=parseInt(d.token),h.duration.push(m/w)}if(d=e.shift(),d.type!=="punct"&&d.token!=="=")throw"Expected = in Q: field";if(d=e.shift(),d.type!=="number")throw"Expected tempo in Q: field";h.bpm=parseInt(d.token)}}else throw"Unknown value in Q: field";if(e.length!==0&&(d=e.shift(),d.type==="quote"&&(h.postString=d.token,d=e.shift()),e.length!==0))throw"Unexpected string at end of Q: field";return i.printTempo===!1&&(h.suppress=!0),{type:p?"delaySet":"immediate",tempo:h}}catch(T){return o(T,f,n),{type:"none"}}},this.letter_to_inline_header=function(f,n,t){var r=!1,e=a.eatWhiteSpace(f,n);if(n+=e,f.length>=n+5&&f[n]==="["&&f[n+2]===":"){var h=f.indexOf("]",n),p=i.iChar+n,d=i.iChar+h+1;switch(f.substring(n,n+3)){case"[I:":var m=y.addDirective(f.substring(n+3,h));return m&&o(m,f,n),[h-n+1+e];case"[M:":var w=this.setMeter(f.substring(n+3,h));return c.hasBeginMusic()&&w?c.appendStartingElement("meter",p,d,w):i.meter=w,[h-n+1+e];case"[K:":var T=g.parseKey(f.substring(n+3,h),!0);return T.foundClef&&c.hasBeginMusic()&&c.appendStartingElement("clef",p,d,i.clef),T.foundKey&&c.hasBeginMusic()&&c.appendStartingElement("key",p,d,g.fixKey(i.clef,i.key)),[h-n+1+e];case"[P:":var D=y.parseFontChangeLine(f.substring(n+3,h));return t||s.lines.length<=s.lineNum?i.partForNextLine={title:D,startChar:p,endChar:d}:c.appendElement("part",p,d,{title:D}),[h-n+1+e];case"[L:":return this.setDefaultLength(f,n+3,h),[h-n+1+e];case"[Q:":if(h>0){var B=this.setTempo(f,n+3,h,i.iChar);return B.type==="delaySet"?c.hasBeginMusic()?c.appendElement("tempo",p,d,this.calcTempo(B.tempo)):i.tempoForNextLine=["tempo",p,d,this.calcTempo(B.tempo)]:B.type==="immediate"&&(!t&&c.hasBeginMusic()?c.appendElement("tempo",p,d,B.tempo):i.tempoForNextLine=["tempo",p,d,B.tempo]),[h-n+1+e,f[n+1],f.substring(n+3,h)]}break;case"[V:":if(h>0)return r=g.parseVoice(f,n+3,h),[h-n+1+e,f[n+1],f.substring(n+3,h),r];break;case"[r:":return[h-n+1+e]}}return[0]},this.letter_to_body_header=function(f,n){var t=!1;if(f.length>=n+3)switch(f.substring(n,n+2)){case"I:":var r=y.addDirective(f.substring(n+2));return r&&o(r,f,n),[f.length];case"M:":var e=this.setMeter(f.substring(n+2));return c.hasBeginMusic()&&e&&c.appendStartingElement("meter",i.iChar+n,i.iChar+f.length,e),[f.length];case"K:":var h=g.parseKey(f.substring(n+2),c.hasBeginMusic());return h.foundClef&&c.hasBeginMusic()&&i.keywarn!==!1&&c.appendStartingElement("clef",i.iChar+n,i.iChar+f.length,i.clef),h.foundKey&&c.hasBeginMusic()&&i.keywarn!==!1&&c.appendStartingElement("key",i.iChar+n,i.iChar+f.length,g.fixKey(i.clef,i.key)),[f.length];case"P:":return c.hasBeginMusic()&&c.appendElement("part",i.iChar+n,i.iChar+f.length,{title:f.substring(n+2)}),[f.length];case"L:":return this.setDefaultLength(f,n+2,f.length),[f.length];case"Q:":var p=f.indexOf("",n+2);p===-1&&(p=f.length);var d=this.setTempo(f,n+2,p,i.iChar);return d.type==="delaySet"?c.appendElement("tempo",i.iChar+n,i.iChar+f.length,this.calcTempo(d.tempo)):d.type==="immediate"&&c.appendElement("tempo",i.iChar+n,i.iChar+f.length,d.tempo),[p,f[n],A.strip(f.substring(n+2))];case"V:":return t=g.parseVoice(f,n+2,f.length),[f.length,f[n],A.strip(f.substring(n+2)),t]}return[0]};var u={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(f){var n=u[f[0]],t=f.length-2,r=a.translateString(a.stripComment(f.substring(2)));if(n==="unalignedWords"||n==="notes")c.addMetaTextArray(n,y.parseFontChangeLine(r),{startChar:i.iChar,endChar:i.iChar+f.length});else if(n!==void 0)c.addMetaText(n,y.parseFontChangeLine(r),{startChar:i.iChar,endChar:i.iChar+f.length});else{var e=i.iChar,h=e+f.length;switch(f[0]){case"H":for(c.addMetaTextArray("history",y.parseFontChangeLine(r),{startChar:i.iChar,endChar:i.iChar+f.length}),f=a.peekLine();f&&f[1]!==":";)a.nextLine(),c.addMetaTextArray("history",y.parseFontChangeLine(a.translateString(a.stripComment(f))),{startChar:i.iChar,endChar:i.iChar+f.length}),f=a.peekLine();break;case"K":this.resolveTempo();var p=g.parseKey(f.substring(2),!1);!i.is_in_header&&c.hasBeginMusic()&&i.keywarn!==!1&&(p.foundClef&&c.appendStartingElement("clef",e,h,i.clef),p.foundKey&&c.appendStartingElement("key",e,h,g.fixKey(i.clef,i.key))),i.is_in_header=!1;break;case"L":this.setDefaultLength(f,2,f.length);break;case"M":i.origMeter=i.meter=this.setMeter(f.substring(2));break;case"P":i.is_in_header?c.addMetaText("partOrder",y.parseFontChangeLine(r),{startChar:i.iChar,endChar:i.iChar+f.length}):i.partForNextLine={title:r,startChar:e,endChar:h};break;case"Q":var d=this.setTempo(f,2,f.length,i.iChar);d.type==="delaySet"?i.tempo=d.tempo:d.type==="immediate"&&(s.metaText.tempo?i.tempoForNextLine=["tempo",e,h,d.tempo]:s.metaText.tempo=d.tempo);break;case"T":i.titlecaps&&(r=r.toUpperCase()),this.setTitle(y.parseFontChangeLine(a.theReverser(r)),t);break;case"U":this.addUserDefinition(f,2,f.length);break;case"V":if(g.parseVoice(f,2,f.length),!i.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":o("Ignored header",f,0);break;default:return{regular:!0}}}return{}}};return et=l,et}var ke={},ia;function xs(){return ia||(ia=1,ke.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"],ke.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],ke.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],ke.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],ke.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],ke.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",ke.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],ke.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},ke.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},ke.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},ke.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),ke}var tt,na;function Cs(){if(na)return tt;na=1;var A=Lr(),y=On(),g,l,a,o,i,s,{legalAccents:c,volumeDecorations:v,dynamicDecorations:u,accentPseudonyms:f,accentDynamicPseudonyms:n,nonDecorations:t,durations:r,pitches:e,rests:h,accMap:p,tripletQ:d}=xs(),m=function(b,k,E,R,O,G){g=b,l=k,a=E,o=R,i=O,s=G,this.lineContinuation=!1},w=function(b,k,E){if(b.inTie[k]===void 0)return!1;var R=b.currentVoice?b.currentVoice.staffNum*100+b.currentVoice.index:0;return!!(b.inTie[k][R]&&(E.pitches!==void 0||E.rest.type!=="spacer"))},T={};m.prototype.parseMusic=function(b){s.resolveTempo(),a.is_in_header=!1;for(var k=0,E=a.iChar;g.isWhiteSpace(b[k])&&k<b.length;)k++;if(!(k===b.length||b[k]==="%")){var R=a.start_new_line;a.continueall===void 0?a.start_new_line=!0:a.start_new_line=!1;var O=0,G=s.letter_to_body_header(b,k);G[0]>0&&(k+=G[0],G[1]==="V"&&this.startNewLine());for(var H=0;k<b.length;){var X=k;if(b[k]==="%")break;var Q=s.letter_to_inline_header(b,k,R);if(Q[0]>0)k+=Q[0],Q[1]==="V"&&(R=!0);else{(!i.hasBeginMusic()||R&&!this.lineContinuation)&&(this.startNewLine(),R=!1);for(var j;;)if(j=g.eatWhiteSpace(b,k),j>0&&(k+=j),k>0&&b[k-1]===""&&(j=s.letter_to_body_header(b,k),j[0]>0&&(j[1]==="V"&&this.startNewLine(),k=j[0],a.start_new_line=!1)),j=N(b,k),j[0]>0&&(k+=j[0]),j=B(b,k),j[0]>0){T.chord||(T.chord=[]);var ee=g.translateString(j[1]);ee=ee.replace(/;/g,`
|
|
4
4
|
`);for(var J=!1,ae=0;ae<T.chord.length;ae++)T.chord[ae].position===j[2]&&(J=!0,T.chord[ae].name+=`
|