diff --git a/lib/ireal-musicxml.js b/lib/ireal-musicxml.js deleted file mode 100644 index 32668f7..0000000 --- a/lib/ireal-musicxml.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see ireal-musicxml.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.iReal2MusicXML=e():t.iReal2MusicXML=e()}(this,(()=>(()=>{var t={272:(t,e,r)=>{"use strict";var n=r(723),o=[],i=[],a=n.makeRequestCallFromTimer((function(){if(i.length)throw i.shift()}));function u(t){var e;(e=o.length?o.pop():new s).task=t,n(e)}function s(){this.task=null}t.exports=u,s.prototype.call=function(){try{this.task.call()}catch(t){u.onerror?u.onerror(t):(i.push(t),a())}finally{this.task=null,o[o.length]=this}}},723:(t,e,r)=>{"use strict";function n(t){i.length||o(),i[i.length]=t}t.exports=n;var o,i=[],a=0;function u(){for(;a1024){for(var e=0,r=i.length-a;e{var t={8552:(t,e,r)=>{var n=r(852)(r(5639),"DataView");t.exports=n},1989:(t,e,r)=>{var n=r(1789),o=r(401),i=r(7667),a=r(1327),u=r(1866);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{var n=r(7040),o=r(4125),i=r(2117),a=r(7518),u=r(4705);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{var n=r(852)(r(5639),"Map");t.exports=n},3369:(t,e,r)=>{var n=r(4785),o=r(1285),i=r(6e3),a=r(9916),u=r(5265);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{var n=r(852)(r(5639),"Promise");t.exports=n},8525:(t,e,r)=>{var n=r(852)(r(5639),"Set");t.exports=n},8668:(t,e,r)=>{var n=r(3369),o=r(619),i=r(2385);function a(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e{var n=r(8407),o=r(7465),i=r(3779),a=r(7599),u=r(4758),s=r(4309);function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=u,c.prototype.set=s,t.exports=c},2705:(t,e,r)=>{var n=r(5639).Symbol;t.exports=n},1149:(t,e,r)=>{var n=r(5639).Uint8Array;t.exports=n},577:(t,e,r)=>{var n=r(852)(r(5639),"WeakMap");t.exports=n},6874:t=>{t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},7412:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r{var n=r(2118);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},1196:t=>{t.exports=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n{var n=r(2545),o=r(5694),i=r(1469),a=r(4144),u=r(5776),s=r(6719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=i(t),l=!r&&o(t),f=!r&&!l&&a(t),h=!r&&!l&&!f&&s(t),p=r||l||f||h,d=p?n(t.length,String):[],v=d.length;for(var m in t)!e&&!c.call(t,m)||p&&("length"==m||f&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||u(m,v))||d.push(m);return d}},9932:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r{t.exports=function(t,e){for(var r=-1,n=e.length,o=t.length;++r{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r{var n=r(9465),o=r(7813),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var a=t[e];i.call(t,e)&&o(a,r)&&(void 0!==r||e in t)||n(t,e,r)}},8470:(t,e,r)=>{var n=r(7813);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},4037:(t,e,r)=>{var n=r(8363),o=r(3674);t.exports=function(t,e){return t&&n(e,o(e),t)}},3886:(t,e,r)=>{var n=r(8363),o=r(1704);t.exports=function(t,e){return t&&n(e,o(e),t)}},9465:(t,e,r)=>{var n=r(8777);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},5990:(t,e,r)=>{var n=r(6384),o=r(7412),i=r(4865),a=r(4037),u=r(3886),s=r(4626),c=r(278),l=r(8805),f=r(1911),h=r(8234),p=r(6904),d=r(4160),v=r(3824),m=r(9148),b=r(8517),y=r(1469),g=r(4144),_=r(6688),j=r(3218),w=r(2928),x=r(3674),O=r(1704),S="[object Arguments]",A="[object Function]",E="[object Object]",k={};k[S]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[E]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[A]=k["[object WeakMap]"]=!1,t.exports=function t(e,r,C,D,P,F){var z,T=1&r,M=2&r,L=4&r;if(C&&(z=P?C(e,D,P,F):C(e)),void 0!==z)return z;if(!j(e))return e;var I=y(e);if(I){if(z=v(e),!T)return c(e,z)}else{var N=d(e),R=N==A||"[object GeneratorFunction]"==N;if(g(e))return s(e,T);if(N==E||N==S||R&&!P){if(z=M||R?{}:b(e),!T)return M?f(e,u(z,e)):l(e,a(z,e))}else{if(!k[N])return P?e:{};z=m(e,N,T)}}F||(F=new n);var q=F.get(e);if(q)return q;F.set(e,z),w(e)?e.forEach((function(n){z.add(t(n,r,C,n,e,F))})):_(e)&&e.forEach((function(n,o){z.set(o,t(n,r,C,o,e,F))}));var G=I?void 0:(L?M?p:h:M?O:x)(e);return o(G||e,(function(n,o){G&&(n=e[o=n]),i(z,o,t(n,r,C,o,e,F))})),z}},3118:(t,e,r)=>{var n=r(3218),o=Object.create,i=function(){function t(){}return function(e){if(!n(e))return{};if(o)return o(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=i},731:(t,e,r)=>{var n=r(8668),o=r(7443),i=r(1196),a=r(9932),u=r(1717),s=r(4757);t.exports=function(t,e,r,c){var l=-1,f=o,h=!0,p=t.length,d=[],v=e.length;if(!p)return d;r&&(e=a(e,u(r))),c?(f=i,h=!1):e.length>=200&&(f=s,h=!1,e=new n(e));t:for(;++l{t.exports=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i{var n=r(2488),o=r(7285);t.exports=function t(e,r,i,a,u){var s=-1,c=e.length;for(i||(i=o),u||(u=[]);++s0&&i(l)?r>1?t(l,r-1,i,a,u):n(u,l):a||(u[u.length]=l)}return u}},8483:(t,e,r)=>{var n=r(5063)();t.exports=n},7816:(t,e,r)=>{var n=r(8483),o=r(3674);t.exports=function(t,e){return t&&n(t,e,o)}},7786:(t,e,r)=>{var n=r(1811),o=r(327);t.exports=function(t,e){for(var r=0,i=(e=n(e,t)).length;null!=t&&r{var n=r(2488),o=r(1469);t.exports=function(t,e,r){var i=e(t);return o(t)?i:n(i,r(t))}},4239:(t,e,r)=>{var n=r(2705),o=r(9607),i=r(2333),a=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},13:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},2118:(t,e,r)=>{var n=r(1848),o=r(2722),i=r(2351);t.exports=function(t,e,r){return e==e?i(t,e,r):n(t,o,r)}},8975:(t,e,r)=>{var n=r(7816);t.exports=function(t,e,r,o){return n(t,(function(t,n,i){e(o,r(t),n,i)})),o}},9454:(t,e,r)=>{var n=r(4239),o=r(7005);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},939:(t,e,r)=>{var n=r(2492),o=r(7005);t.exports=function t(e,r,i,a,u){return e===r||(null==e||null==r||!o(e)&&!o(r)?e!=e&&r!=r:n(e,r,i,a,t,u))}},2492:(t,e,r)=>{var n=r(6384),o=r(7114),i=r(8351),a=r(6096),u=r(4160),s=r(1469),c=r(4144),l=r(6719),f="[object Arguments]",h="[object Array]",p="[object Object]",d=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,v,m,b){var y=s(t),g=s(e),_=y?h:u(t),j=g?h:u(e),w=(_=_==f?p:_)==p,x=(j=j==f?p:j)==p,O=_==j;if(O&&c(t)){if(!c(e))return!1;y=!0,w=!1}if(O&&!w)return b||(b=new n),y||l(t)?o(t,e,r,v,m,b):i(t,e,_,r,v,m,b);if(!(1&r)){var S=w&&d.call(t,"__wrapped__"),A=x&&d.call(e,"__wrapped__");if(S||A){var E=S?t.value():t,k=A?e.value():e;return b||(b=new n),m(E,k,r,v,b)}}return!!O&&(b||(b=new n),a(t,e,r,v,m,b))}},5588:(t,e,r)=>{var n=r(4160),o=r(7005);t.exports=function(t){return o(t)&&"[object Map]"==n(t)}},2958:(t,e,r)=>{var n=r(6384),o=r(939);t.exports=function(t,e,r,i){var a=r.length,u=a,s=!i;if(null==t)return!u;for(t=Object(t);a--;){var c=r[a];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a{t.exports=function(t){return t!=t}},8458:(t,e,r)=>{var n=r(3560),o=r(5346),i=r(3218),a=r(346),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(n(t)?h:u).test(a(t))}},9221:(t,e,r)=>{var n=r(4160),o=r(7005);t.exports=function(t){return o(t)&&"[object Set]"==n(t)}},8749:(t,e,r)=>{var n=r(4239),o=r(1780),i=r(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[n(t)]}},7206:(t,e,r)=>{var n=r(1573),o=r(6432),i=r(6557),a=r(1469),u=r(9601);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?a(t)?o(t[0],t[1]):n(t):u(t)}},280:(t,e,r)=>{var n=r(5726),o=r(6916),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=[];for(var r in Object(t))i.call(t,r)&&"constructor"!=r&&e.push(r);return e}},313:(t,e,r)=>{var n=r(3218),o=r(5726),i=r(3498),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=o(t),r=[];for(var u in t)("constructor"!=u||!e&&a.call(t,u))&&r.push(u);return r}},1573:(t,e,r)=>{var n=r(2958),o=r(1499),i=r(2634);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(r){return r===t||n(r,t,e)}}},6432:(t,e,r)=>{var n=r(939),o=r(7361),i=r(9095),a=r(5403),u=r(9162),s=r(2634),c=r(327);t.exports=function(t,e){return a(t)&&u(e)?s(c(t),e):function(r){var a=o(r,t);return void 0===a&&a===e?i(r,t):n(e,a,3)}}},371:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},9152:(t,e,r)=>{var n=r(7786);t.exports=function(t){return function(e){return n(e,t)}}},5976:(t,e,r)=>{var n=r(6557),o=r(5357),i=r(61);t.exports=function(t,e){return i(o(t,e,n),t+"")}},6560:(t,e,r)=>{var n=r(5703),o=r(8777),i=r(6557),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=a},2545:t=>{t.exports=function(t,e){for(var r=-1,n=Array(t);++r{var n=r(2705),o=r(9932),i=r(1469),a=r(3448),u=n?n.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return s?s.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},7561:(t,e,r)=>{var n=r(7990),o=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(o,""):t}},1717:t=>{t.exports=function(t){return function(e){return t(e)}}},5652:(t,e,r)=>{var n=r(8668),o=r(7443),i=r(1196),a=r(4757),u=r(3593),s=r(1814);t.exports=function(t,e,r){var c=-1,l=o,f=t.length,h=!0,p=[],d=p;if(r)h=!1,l=i;else if(f>=200){var v=e?null:u(t);if(v)return s(v);h=!1,l=a,d=new n}else d=e?[]:p;t:for(;++c{t.exports=function(t,e){return t.has(e)}},1811:(t,e,r)=>{var n=r(1469),o=r(5403),i=r(5514),a=r(9833);t.exports=function(t,e){return n(t)?t:o(t,e)?[t]:i(a(t))}},4318:(t,e,r)=>{var n=r(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},4626:(t,e,r)=>{t=r.nmd(t);var n=r(5639),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o?n.Buffer:void 0,u=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}},7157:(t,e,r)=>{var n=r(4318);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}},3147:t=>{var e=/\w*$/;t.exports=function(t){var r=new t.constructor(t.source,e.exec(t));return r.lastIndex=t.lastIndex,r}},419:(t,e,r)=>{var n=r(2705),o=n?n.prototype:void 0,i=o?o.valueOf:void 0;t.exports=function(t){return i?Object(i.call(t)):{}}},7133:(t,e,r)=>{var n=r(4318);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},278:t=>{t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r{var n=r(4865),o=r(9465);t.exports=function(t,e,r,i){var a=!r;r||(r={});for(var u=-1,s=e.length;++u{var n=r(8363),o=r(9551);t.exports=function(t,e){return n(t,o(t),e)}},1911:(t,e,r)=>{var n=r(8363),o=r(1442);t.exports=function(t,e){return n(t,o(t),e)}},4429:(t,e,r)=>{var n=r(5639)["__core-js_shared__"];t.exports=n},5063:t=>{t.exports=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var s=a[t?u:++o];if(!1===r(i[s],s,i))break}return e}}},7740:(t,e,r)=>{var n=r(7206),o=r(8612),i=r(3674);t.exports=function(t){return function(e,r,a){var u=Object(e);if(!o(e)){var s=n(r,3);e=i(e),r=function(t){return s(u[t],t,u)}}var c=t(e,r,a);return c>-1?u[s?e[c]:c]:void 0}}},7779:(t,e,r)=>{var n=r(8975);t.exports=function(t,e){return function(r,o){return n(r,t,e(o),{})}}},3593:(t,e,r)=>{var n=r(8525),o=r(308),i=r(1814),a=n&&1/i(new n([,-0]))[1]==1/0?function(t){return new n(t)}:o;t.exports=a},8777:(t,e,r)=>{var n=r(852),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},7114:(t,e,r)=>{var n=r(8668),o=r(2908),i=r(4757);t.exports=function(t,e,r,a,u,s){var c=1&r,l=t.length,f=e.length;if(l!=f&&!(c&&f>l))return!1;var h=s.get(t),p=s.get(e);if(h&&p)return h==e&&p==t;var d=-1,v=!0,m=2&r?new n:void 0;for(s.set(t,e),s.set(e,t);++d{var n=r(2705),o=r(1149),i=r(7813),a=r(7114),u=r(8776),s=r(1814),c=n?n.prototype:void 0,l=c?c.valueOf:void 0;t.exports=function(t,e,r,n,c,f,h){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=u;case"[object Set]":var d=1&n;if(p||(p=s),t.size!=e.size&&!d)return!1;var v=h.get(t);if(v)return v==e;n|=2,h.set(t,e);var m=a(p(t),p(e),n,c,f,h);return h.delete(t),m;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},6096:(t,e,r)=>{var n=r(8234),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,i,a,u){var s=1&r,c=n(t),l=c.length;if(l!=n(e).length&&!s)return!1;for(var f=l;f--;){var h=c[f];if(!(s?h in e:o.call(e,h)))return!1}var p=u.get(t),d=u.get(e);if(p&&d)return p==e&&d==t;var v=!0;u.set(t,e),u.set(e,t);for(var m=s;++f{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},8234:(t,e,r)=>{var n=r(8866),o=r(9551),i=r(3674);t.exports=function(t){return n(t,i,o)}},6904:(t,e,r)=>{var n=r(8866),o=r(1442),i=r(1704);t.exports=function(t){return n(t,i,o)}},5050:(t,e,r)=>{var n=r(7019);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},1499:(t,e,r)=>{var n=r(9162),o=r(3674);t.exports=function(t){for(var e=o(t),r=e.length;r--;){var i=e[r],a=t[i];e[r]=[i,a,n(a)]}return e}},852:(t,e,r)=>{var n=r(8458),o=r(7801);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},5924:(t,e,r)=>{var n=r(5569)(Object.getPrototypeOf,Object);t.exports=n},9607:(t,e,r)=>{var n=r(2705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[u]=r:delete t[u]),o}},9551:(t,e,r)=>{var n=r(4963),o=r(479),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(t){return null==t?[]:(t=Object(t),n(a(t),(function(e){return i.call(t,e)})))}:o;t.exports=u},1442:(t,e,r)=>{var n=r(2488),o=r(5924),i=r(9551),a=r(479),u=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,i(t)),t=o(t);return e}:a;t.exports=u},4160:(t,e,r)=>{var n=r(8552),o=r(7071),i=r(3818),a=r(8525),u=r(577),s=r(4239),c=r(346),l="[object Map]",f="[object Promise]",h="[object Set]",p="[object WeakMap]",d="[object DataView]",v=c(n),m=c(o),b=c(i),y=c(a),g=c(u),_=s;(n&&_(new n(new ArrayBuffer(1)))!=d||o&&_(new o)!=l||i&&_(i.resolve())!=f||a&&_(new a)!=h||u&&_(new u)!=p)&&(_=function(t){var e=s(t),r="[object Object]"==e?t.constructor:void 0,n=r?c(r):"";if(n)switch(n){case v:return d;case m:return l;case b:return f;case y:return h;case g:return p}return e}),t.exports=_},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},222:(t,e,r)=>{var n=r(1811),o=r(5694),i=r(1469),a=r(5776),u=r(1780),s=r(327);t.exports=function(t,e,r){for(var c=-1,l=(e=n(e,t)).length,f=!1;++c{var n=r(4536);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,r)=>{var n=r(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0}},1327:(t,e,r)=>{var n=r(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},1866:(t,e,r)=>{var n=r(4536);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},3824:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var r=t.length,n=new t.constructor(r);return r&&"string"==typeof t[0]&&e.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},9148:(t,e,r)=>{var n=r(4318),o=r(7157),i=r(3147),a=r(419),u=r(7133);t.exports=function(t,e,r){var s=t.constructor;switch(e){case"[object ArrayBuffer]":return n(t);case"[object Boolean]":case"[object Date]":return new s(+t);case"[object DataView]":return o(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return u(t,r);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(t);case"[object RegExp]":return i(t);case"[object Symbol]":return a(t)}}},8517:(t,e,r)=>{var n=r(3118),o=r(5924),i=r(5726);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:n(o(t))}},7285:(t,e,r)=>{var n=r(2705),o=r(5694),i=r(1469),a=n?n.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(a&&t&&t[a])}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t{var n=r(1469),o=r(3448),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!o(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,r)=>{var n,o=r(4429),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!i&&i in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},9162:(t,e,r)=>{var n=r(3218);t.exports=function(t){return t==t&&!n(t)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,r)=>{var n=r(8470),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():o.call(e,r,1),--this.size,0))}},2117:(t,e,r)=>{var n=r(8470);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},7518:(t,e,r)=>{var n=r(8470);t.exports=function(t){return n(this.__data__,t)>-1}},4705:(t,e,r)=>{var n=r(8470);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},4785:(t,e,r)=>{var n=r(1989),o=r(8407),i=r(7071);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},1285:(t,e,r)=>{var n=r(5050);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,r)=>{var n=r(5050);t.exports=function(t){return n(this,t).get(t)}},9916:(t,e,r)=>{var n=r(5050);t.exports=function(t){return n(this,t).has(t)}},5265:(t,e,r)=>{var n=r(5050);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},8776:t=>{t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}},2634:t=>{t.exports=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}}},4523:(t,e,r)=>{var n=r(8306);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},4536:(t,e,r)=>{var n=r(852)(Object,"create");t.exports=n},6916:(t,e,r)=>{var n=r(5569)(Object.keys,Object);t.exports=n},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},1167:(t,e,r)=>{t=r.nmd(t);var n=r(1957),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o&&n.process,u=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(r){return t(e(r))}}},5357:(t,e,r)=>{var n=r(6874),o=Math.max;t.exports=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),s=Array(u);++a{var n=r(1957),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},619:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},2385:t=>{t.exports=function(t){return this.__data__.has(t)}},1814:t=>{t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},61:(t,e,r)=>{var n=r(6560),o=r(1275)(n);t.exports=o},1275:t=>{var e=Date.now;t.exports=function(t){var r=0,n=0;return function(){var o=e(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},7465:(t,e,r)=>{var n=r(8407);t.exports=function(){this.__data__=new n,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,r)=>{var n=r(8407),o=r(7071),i=r(3369);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(t,e),this.size=r.size,this}},2351:t=>{t.exports=function(t,e,r){for(var n=r-1,o=t.length;++n{var n=r(4523),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,r,n,o){e.push(n?o.replace(i,"$1"):r||t)})),e}));t.exports=a},327:(t,e,r)=>{var n=r(3448);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7990:t=>{var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},6678:(t,e,r)=>{var n=r(5990);t.exports=function(t){return n(t,4)}},361:(t,e,r)=>{var n=r(5990);t.exports=function(t){return n(t,5)}},5703:t=>{t.exports=function(t){return function(){return t}}},1966:(t,e,r)=>{var n=r(731),o=r(1078),i=r(5976),a=r(9246),u=i((function(t,e){return a(t)?n(t,o(e,1,a,!0)):[]}));t.exports=u},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},3311:(t,e,r)=>{var n=r(7740)(r(998));t.exports=n},998:(t,e,r)=>{var n=r(1848),o=r(7206),i=r(554),a=Math.max;t.exports=function(t,e,r){var u=null==t?0:t.length;if(!u)return-1;var s=null==r?0:i(r);return s<0&&(s=a(u+s,0)),n(t,o(e,3),s)}},7361:(t,e,r)=>{var n=r(7786);t.exports=function(t,e,r){var o=null==t?void 0:n(t,e);return void 0===o?r:o}},9095:(t,e,r)=>{var n=r(13),o=r(222);t.exports=function(t,e){return null!=t&&o(t,e,n)}},6557:t=>{t.exports=function(t){return t}},3137:(t,e,r)=>{var n=r(5703),o=r(7779),i=r(6557),a=Object.prototype.toString,u=o((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=a.call(e)),t[e]=r}),n(i));t.exports=u},5694:(t,e,r)=>{var n=r(9454),o=r(7005),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=s},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,r)=>{var n=r(3560),o=r(1780);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},9246:(t,e,r)=>{var n=r(8612),o=r(7005);t.exports=function(t){return o(t)&&n(t)}},4144:(t,e,r)=>{t=r.nmd(t);var n=r(5639),o=r(5062),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,u=a&&a.exports===i?n.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;t.exports=s},8446:(t,e,r)=>{var n=r(939);t.exports=function(t,e){return n(t,e)}},3560:(t,e,r)=>{var n=r(4239),o=r(3218);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},6688:(t,e,r)=>{var n=r(5588),o=r(1717),i=r(1167),a=i&&i.isMap,u=a?o(a):n;t.exports=u},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},2928:(t,e,r)=>{var n=r(9221),o=r(1717),i=r(1167),a=i&&i.isSet,u=a?o(a):n;t.exports=u},3448:(t,e,r)=>{var n=r(4239),o=r(7005);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==n(t)}},6719:(t,e,r)=>{var n=r(8749),o=r(1717),i=r(1167),a=i&&i.isTypedArray,u=a?o(a):n;t.exports=u},3674:(t,e,r)=>{var n=r(4636),o=r(280),i=r(8612);t.exports=function(t){return i(t)?n(t):o(t)}},1704:(t,e,r)=>{var n=r(4636),o=r(313),i=r(8612);t.exports=function(t){return i(t)?n(t,!0):o(t)}},8306:(t,e,r)=>{var n=r(3369);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,t.exports=o},308:t=>{t.exports=function(){}},9601:(t,e,r)=>{var n=r(371),o=r(9152),i=r(5403),a=r(327);t.exports=function(t){return i(t)?n(a(t)):o(t)}},479:t=>{t.exports=function(){return[]}},5062:t=>{t.exports=function(){return!1}},8601:(t,e,r)=>{var n=r(4841);t.exports=function(t){return t?Infinity===(t=n(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},554:(t,e,r)=>{var n=r(8601);t.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},4841:(t,e,r)=>{var n=r(7561),o=r(3218),i=r(3448),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var r=u.test(t);return r||s.test(t)?c(t.slice(2),r?2:8):a.test(t)?NaN:+t}},9833:(t,e,r)=>{var n=r(531);t.exports=function(t){return null==t?"":n(t)}},4908:(t,e,r)=>{var n=r(5652);t.exports=function(t){return t&&t.length?n(t):[]}},2569:(t,e,r)=>{var n=r(731),o=r(5976),i=r(9246),a=o((function(t,e){return i(t)?n(t,e):[]}));t.exports=a}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,loaded:!1,exports:{}};return t[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};return(()=>{"use strict";function t(t,e){return t.reduce((function(t,e){return t?e(t):null}),e)}r.r(n),r.d(n,{chordParserFactory:()=>ze,chordRendererFactory:()=>nr});var e=r(361),o=r.n(e);const i=function(t){if(!Array.isArray(t))throw new TypeError("customFilters should be given as an array");if(t.some((function(t){return"function"!=typeof t})))throw new TypeError("The given filter is not a function");return!0};function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{input:{symbol:e},normalized:{},formatted:{},parserConfiguration:o()(t)}}function Pt(t){return function(t){if(Array.isArray(t))return Ft(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ft(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ft(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)throw new Q(t,a);return n}(e)),e.input.modifiers=r,e.normalized.intervals=function(t,e){return t.includes(ve.power)?["1","5"]:t.includes(ve.bass)?["1"]:Wt()(["1"].concat(be(function(t){var e=[];return t.includes(ve.omit3)?[]:(at(t,[ve.sus,ve.sus2])||(we(t)?t.includes(ve.eleventh)||e.push("3"):e.push("b3")),t.includes(ve.add3)&&e.push("3"),e)}(t)),be(function(t){var e=[];return at(t,[ve.sus,ve.add4])&&e.push("4"),e}(t)),be(function(t,e){var r=[];return t.includes(ve.omit5)?[]:((at(t,[ve.dim,ve.halfDim,ve.fifthFlat])||je(t,e,"b5"))&&r.push("b5"),(at(t,[ve.aug,ve.fifthSharp])||je(t,e,"#5"))&&r.push("#5"),r.length||t.includes(ve.thirteenthFlat)||r.push("5"),r)}(t,e)),be(function(t){var e=[];return at(t,[ve.addb6])&&e.push("b6"),!at(t,[ve.add6,ve.add69])||xe(t)||at(t,[ve.halfDim])||e.push("6"),e}(t)),be(function(t){var e=[];return at(t,[ve.alt])&&e.push("b7"),at(t,[ve.seventh,ve.halfDim])?t.includes(ve.dim)?e.push("bb7"):t.includes(ve.halfDim)?e.push("b7"):e.push(_e(t)):at(t,[ve.ninth,ve.eleventh,ve.thirteenth])&&e.push(_e(t)),t.includes(ve.add7)&&e.push("7"),e}(t)),be(function(t,e){var r=[];return at(t,[ve.add69,ve.ninth,ve.eleventh,ve.thirteenth])&&st(t,[ve.ninthFlat,ve.ninthSharp])&&r.push("9"),at(t,[ve.sus2,ve.add9])&&r.push("9"),(at(t,[ve.ninthFlat])||je(t,e,"b9"))&&r.push("b9"),(at(t,[ve.ninthSharp])||je(t,e,"#9"))&&r.push("#9"),r}(t,e)),be(function(t,e){var r=[];return(at(t,[ve.thirteenth])&&!we(t)||at(t,[ve.eleventh,ve.add11]))&&r.push("11"),(at(t,[ve.eleventhSharp])||je(t,e,"#11"))&&r.push("#11"),r}(t,e)),be(function(t,e){var r=[];return(at(t,[ve.add13,ve.thirteenth])||at(t,[ve.add6,ve.add69])&&xe(t)||at(t,[ve.add6,ve.add69])&&at(t,[ve.halfDim]))&&r.push("13"),(at(t,[ve.thirteenthFlat])||je(t,e,"b13"))&&r.push("b13"),r}(t,e)))).sort((function(t,e){return me[t]-me[e]}))}(r,t),e.normalized.semitones=e.normalized.intervals.map((function(t){return me[t]})).sort((function(t,e){return t-e})),e.normalized.intents=function(t){return{major:we(t),eleventh:t.includes(ve.eleventh),alt:t.includes(ve.alt)}}(r),e}function _e(t){return t.includes(ve.ma)?"7":"b7"}function je(t,e,r){return t.includes(ve.alt)&&e.includes(r)}function we(t){return st(t,[ve.mi,ve.dim,ve.dim7,ve.halfDim])}function xe(t){return at(t,[ve.seventh,ve.ninth,ve.eleventh,ve.thirteenth])}function Oe(t){return t.replace(/[.\-*+?^${}()|[\]\\]/g,"\\$&")}function Se(t){return function(t){if(Array.isArray(t))return Ae(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ae(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ae(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ae(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0}function Pe(t){return Fe(new K,t)}function Fe(t,e){return{type:t.name,chord:t.chord,message:t.message,notationSystem:e}}const ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=["b5","#5","b9","#9","#11","b13"],n=["english","german","latin"],a=e.notationSystems,u=void 0===a?o()(n):a,s=e.altIntervals,c=void 0===s?o()(r):s,l=e.customFilters,f=void 0===l?[]:l;return Ee(c,r),ke(u,n),i(f),h;function h(r){var n=[];if(!De(r)){var i=new Z;n.push(Fe(i))}var a,s,l,h=o()(L).filter((function(t){return u.includes(t.name)}));if(!n.length)for(;h.length&&!a;){l=h.shift(),s=[Dt.bind(null,e),oe.bind(null,l.notes),St,ge.bind(null,c),ft,Nt,Jt,jt,ht,It].concat(Se(f));try{(a=t(s,r))?a.input.notationSystem=l.name:n.push(Pe(l.name))}catch(i){n.push(Fe(i,l.name))}}return a||{error:n}}};function Te(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Me(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"none",r=arguments.length>1?arguments[1]:void 0;if("none"===e)return r;var n={max:["4","b5","#5","6","bb7","b7","7","b9","9","#9","11","#11","b13","13"],core:["4","b9","9","#9","11","#11","b13","13"]},o=Re()(r.normalized.intervals,n[e]);st(o,["b3","3"])&&o.push(r.normalized.intents.major?"3":"b3"),st(o,["b5","5","#5"])&&o.push("5"),r.normalized.intervals=o,r.normalized.semitones=o.map((function(t){return me[t]})),r.normalized.intents.eleventh=!1,r.normalized.intents.alt=!1,"max"===e&&delete r.normalized.bassNote;var i=[Jt,jt,It];return t(i,r)}var Ge=r(3137),Ue=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],Be={"C#":"Db","D#":"Eb","F#":"Gb","G#":"Ab","A#":"Bb"},We=r.n(Ge)()(Be);function $e(t,e,r){var n=r.normalized,o=n.rootNote,i=n.bassNote,a=Xe(o);if(r.normalized.rootNote=Ve(a,t,e),r.formatted.rootNote=r.normalized.rootNote,i){var u=Xe(i);r.normalized.bassNote=Ve(u,t,e),r.formatted.bassNote=r.normalized.bassNote}return It(r)}function Ve(t,e,r){var n=Ue.indexOf(t)+e,o=Math.floor(n/12),i=Ue[n-12*o];return r&&Be[i]||i}function Xe(t){return We[t]||t}var Ye={german:{Ab:"As",A:"A","A#":"Ais",Bb:"Hes",B:"H",C:"C","C#":"Cis",Db:"Des",D:"D","D#":"Dis",Eb:"Es",E:"E",F:"F","F#":"Fis",Gb:"Ges",G:"G","G#":"Gis"},latin:{Ab:"Lab",A:"La","A#":"La#",Bb:"Sib",B:"Si",C:"Do","C#":"Do#",Db:"Reb",D:"Re","D#":"Re#",Eb:"Mib",E:"Mi",F:"Fa","F#":"Fa#",Gb:"Solb",G:"Sol","G#":"Sol#"}},Ze=Object.keys(Ye);function Ke(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"english",e=arguments.length>1?arguments[1]:void 0,r="auto"===t?e.input.notationSystem:t;return"english"===r?e:Ze.includes(r)?(e.formatted.rootNote=Ye[r][e.formatted.rootNote],e.formatted.bassNote&&(e.formatted.bassNote=Ye[r][e.formatted.bassNote]),e):null}function He(t){return t&&t.formatted&&t.formatted.symbol?t.formatted.symbol:null}function Je(t){delete t.parserConfiguration.notationSystems;var e=o()(t),r=He(t),n=ze(t.parserConfiguration)(r);return e.input=n.input,e}function Qe(t){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qe(t)}function tr(t){return function(t){if(Array.isArray(t))return er(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return er(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?er(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function er(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},r=e.useShortNamings,n=void 0!==r&&r,a=e.simplify,u=void 0===a?"none":a,s=e.transposeValue,c=void 0===s?0:s,l=e.harmonizeAccidentals,f=void 0!==l&&l,h=e.useFlats,p=void 0!==h&&h,d=e.printer,v=void 0===d?"text":d,m=e.notationSystem,b=void 0===m?"english":m,y=e.customFilters,g=void 0===y?[]:y;i(g);var _=[];return["max","core"].includes(u)&&_.push(qe.bind(null,u)),(f||0!==c)&&_.push($e.bind(null,c,p)),n&&_.push(Ie),_.push.apply(_,[Ke.bind(null,b),ht].concat(tr(g))),j;function j(e){if(!rr(e))return null;var r=t(_,o()(e));return"raw"===v?Je(r):He(r)}}})(),n})()},t.exports=e()},529:t=>{var e=-1;function r(t,u,s,c){if(t===u)return t?[[0,t]]:[];if(null!=s){var l=function(t,e,r){var n="number"==typeof r?{index:r,length:0}:r.oldRange,o="number"==typeof r?null:r.newRange,i=t.length,a=e.length;if(0===n.length&&(null===o||0===o.length)){var u=n.index,s=t.slice(0,u),c=t.slice(u),l=o?o.index:null,h=u+a-i;if((null===l||l===h)&&!(h<0||h>a)){var p=e.slice(0,h);if((m=e.slice(h))===c){var d=Math.min(u,h);if((y=s.slice(0,d))===(_=p.slice(0,d)))return f(y,s.slice(d),p.slice(d),c)}}if(null===l||l===u){var v=u,m=(p=e.slice(0,v),e.slice(v));if(p===s){var b=Math.min(i-v,a-v);if((g=c.slice(c.length-b))===(j=m.slice(m.length-b)))return f(s,c.slice(0,c.length-b),m.slice(0,m.length-b),g)}}}if(n.length>0&&o&&0===o.length){var y=t.slice(0,n.index),g=t.slice(n.index+n.length);if(!(a<(d=y.length)+(b=g.length))){var _=e.slice(0,d),j=e.slice(a-b);if(y===_&&g===j)return f(y,t.slice(d,i-b),e.slice(d,a-b),g)}}return null}(t,u,s);if(l)return l}var h=o(t,u),p=t.substring(0,h);h=i(t=t.substring(h),u=u.substring(h));var d=t.substring(t.length-h),v=function(t,a){var u;if(!t)return[[1,a]];if(!a)return[[e,t]];var s=t.length>a.length?t:a,c=t.length>a.length?a:t,l=s.indexOf(c);if(-1!==l)return u=[[1,s.substring(0,l)],[0,c],[1,s.substring(l+c.length)]],t.length>a.length&&(u[0][0]=u[2][0]=e),u;if(1===c.length)return[[e,t],[1,a]];var f=function(t,e){var r=t.length>e.length?t:e,n=t.length>e.length?e:t;if(r.length<4||2*n.length=t.length?[n,a,u,s,f]:null}var u,s,c,l,f,h=a(r,n,Math.ceil(r.length/4)),p=a(r,n,Math.ceil(r.length/2));return h||p?(u=p?h&&h[4].length>p[4].length?h:p:h,t.length>e.length?(s=u[0],c=u[1],l=u[2],f=u[3]):(l=u[0],f=u[1],s=u[2],c=u[3]),[s,c,l,f,u[4]]):null}(t,a);if(f){var h=f[0],p=f[1],d=f[2],v=f[3],m=f[4],b=r(h,d),y=r(p,v);return b.concat([[0,m]],y)}return function(t,r){for(var o=t.length,i=r.length,a=Math.ceil((o+i)/2),u=a,s=2*a,c=new Array(s),l=new Array(s),f=0;fo)v+=2;else if(j>i)d+=2;else if(p&&(O=u+h-g)>=0&&O=(x=o-l[O]))return n(t,r,A,j)}for(var w=-y+m;w<=y-b;w+=2){for(var x,O=u+w,S=(x=w===-y||w!==y&&l[O-1]o)b+=2;else if(S>i)m+=2;else if(!p){var A;if((_=u+h-w)>=0&&_=(x=o-x))return n(t,r,A,j)}}}return[[e,t],[1,r]]}(t,a)}(t=t.substring(0,t.length-h),u=u.substring(0,u.length-h));return p&&v.unshift([0,p]),d&&v.push([0,d]),a(v,c),v}function n(t,e,n,o){var i=t.substring(0,n),a=e.substring(0,o),u=t.substring(n),s=e.substring(o),c=r(i,a),l=r(u,s);return c.concat(l)}function o(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var r=0,n=Math.min(t.length,e.length),o=n,i=0;r=0&&l(t[d][1])){var v=t[d][1].slice(-1);if(t[d][1]=t[d][1].slice(0,-1),h=v+h,p=v+p,!t[d][1]){t.splice(d,1),u--;var m=d-1;t[m]&&1===t[m][0]&&(f++,p=t[m][1]+p,m--),t[m]&&t[m][0]===e&&(s++,h=t[m][1]+h,m--),d=m}}c(t[u][1])&&(v=t[u][1].charAt(0),t[u][1]=t[u][1].slice(1),h+=v,p+=v)}if(u0||p.length>0){h.length>0&&p.length>0&&(0!==(n=o(p,h))&&(d>=0?t[d][1]+=p.substring(0,n):(t.splice(0,0,[0,p.substring(0,n)]),u++),p=p.substring(n),h=h.substring(n)),0!==(n=i(p,h))&&(t[u][1]=p.substring(p.length-n)+t[u][1],p=p.substring(0,p.length-n),h=h.substring(0,h.length-n)));var b=f+s;0===h.length&&0===p.length?(t.splice(u-b,b),u-=b):0===h.length?(t.splice(u-b,b,[1,p]),u=u-b+1):0===p.length?(t.splice(u-b,b,[e,h]),u=u-b+1):(t.splice(u-b,b,[e,h],[1,p]),u=u-b+2)}0!==u&&0===t[u-1][0]?(t[u-1][1]+=t[u][1],t.splice(u,1)):u++,f=0,s=0,h="",p=""}""===t[t.length-1][1]&&t.pop();var y=!1;for(u=1;u=55296&&t<=56319}function s(t){return t>=56320&&t<=57343}function c(t){return s(t.charCodeAt(0))}function l(t){return u(t.charCodeAt(t.length-1))}function f(t,r,n,o){return l(t)||c(o)?null:function(t){for(var e=[],r=0;r0&&e.push(t[r]);return e}([[0,t],[e,r],[1,n],[0,o]])}function h(t,e,n){return r(t,e,n,!0)}h.INSERT=1,h.DELETE=e,h.EQUAL=0,t.exports=h},308:function(t,e){var r,n;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=function(t){"use strict";function e(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").repeat(t)},p=function(t){return(Array.isArray(t)?"array":"object"===a(t)&&null!==t&&t._name&&c)||t instanceof Date&&s||null===t&&"null"||a(t)},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)return t;var r=new RegExp("(".concat(Object.keys(e).join("|"),")(?!(\\w|#)*;)"),"g");return String(t).replace(r,(function(t,r){return e[r]||""}))},v=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return Array.isArray(t)?t.map((function(t){var r=Object.keys(t)[0],n=t[r],o=e?d(n,e):n,i=!0===o?"":'="'.concat(o,'"');return"".concat(r).concat(i)})):Object.keys(t).map((function(r){var n=e?d(t[r],e):t[r],o=!0===t[r]?"":'="'.concat(n,'"');return"".concat(r).concat(o)}))},m=function(){var t=v(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);if(0===t.length)return"";var e=t.join(" ");return" ".concat(e)},b=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(t).map((function(e){return{_name:e,_content:t[e]}}))},y=["string","number",u],g=function(t){return y.includes(p(t))},_=([].concat(y,[s,c]),function(t){return!t.match("<")}),j=function(t){var e=t.header,r=(t.indent,t.isOutputStart);return e&&r?a(e)===u?'':e:""},w={"<":"<",">":">","&":"&"},x=function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.depth,s=void 0===i?0:i,c=n.indent,v=n._isFirstItem,y=n._isOutputStart,x=void 0===y||y,O=n.header,S=n.attributesFilter,A=void 0===S?{}:S,E=n.filter,k=void 0===E?{}:E,C="boolean"!=typeof A||A?o(o(o({},w),{'"':"""}),A):{},D="boolean"!=typeof k||k?o(o({},w),k):{},P=h(c,s),F=p(r),z=j({header:O,indent:c,depth:s,isOutputStart:x}),T=x&&!z&&v&&0===s,M="";switch(F){case"special-object":var L=r._name,I=r._content;if(null===I){M=L;break}if(Array.isArray(I)&&I.every(g))return I.map((function(e){return t({_name:L,_content:e},o(o({},n),{},{depth:s,_isOutputStart:!1}))})).join("");if(L.match(f))break;var N=t(I,o(o({},n),{},{depth:s+1,_isOutputStart:T})),R=p(N),q=_(N),G="".concat(c&&!T?"\n":"").concat(P);if("_comment"===L){M+="".concat(G,"\x3c!-- ").concat(I," --\x3e");break}var U="undefined"===R||""===N,B=a(r._selfCloseTag)===u?U&&r._selfCloseTag:U,W=B?"/":"",$=m(r._attrs,C),V="<".concat(L).concat($).concat(W,">"),X=c&&!q?"\n".concat(P):"",Y=B?"":"".concat(N).concat(X,"");M+="".concat(G).concat(V).concat(Y);break;case"object":var Z=Object.keys(r);M=Z.map((function(i,a){var u=o(o({},n),{},{_isFirstItem:0===a,_isLastItem:a+1===Z.length,_isOutputStart:T}),s={_name:i};if("object"===p(r[i])&&(l.forEach((function(t){var e=r[i][t];void 0!==e&&(s[t]=e,delete r[i][t])})),void 0!==r[i]._content&&Object.keys(r[i]).length>1)){var c=Object.assign({},r[i]);delete c._content,s._content=[].concat(e(b(c)),[r[i]._content])}return void 0===s._content&&(s._content=r[i]),t(s,u,i)}),n).join("");break;case"function":var K=r(n);M=t(K,n);break;case"array":M=r.map((function(e,i){var a=o(o({},n),{},{_isFirstItem:0===i,_isLastItem:i+1===r.length,_isOutputStart:T});return t(e,a)})).join("");break;default:M=d(r,D)}return"".concat(z).concat(M)};t.toXML=x;var O={toXML:x};t.default=O},void 0===(n=r.apply(e,[e]))||(t.exports=n)},259:(t,e,r)=>{"use strict";t.exports=r(159)},434:(t,e,r)=>{"use strict";var n=r(723);function o(){}var i=null,a={};function u(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,t!==o&&p(t,this)}function s(t,e){for(;3===t._V;)t=t._W;if(u._Y&&u._Y(t),0===t._V)return 0===t._U?(t._U=1,void(t._X=e)):1===t._U?(t._U=2,void(t._X=[t._X,e])):void t._X.push(e);!function(t,e){n((function(){var r=1===t._V?e.onFulfilled:e.onRejected;if(null!==r){var n=function(t,e){try{return t(e)}catch(t){return i=t,a}}(r,t._W);n===a?l(e.promise,i):c(e.promise,n)}else 1===t._V?c(e.promise,t._W):l(e.promise,t._W)}))}(t,e)}function c(t,e){if(e===t)return l(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=function(t){try{return t.then}catch(t){return i=t,a}}(e);if(r===a)return l(t,i);if(r===t.then&&e instanceof u)return t._V=3,t._W=e,void f(t);if("function"==typeof r)return void p(r.bind(e),t)}t._V=1,t._W=e,f(t)}function l(t,e){t._V=2,t._W=e,u._Z&&u._Z(t,e),f(t)}function f(t){if(1===t._U&&(s(t,t._X),t._X=null),2===t._U){for(var e=0;e{"use strict";var n=r(434);t.exports=n,n.prototype.done=function(t,e){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,(function(t){setTimeout((function(){throw t}),0)}))}},803:(t,e,r)=>{"use strict";var n=r(434);t.exports=n;var o=l(!0),i=l(!1),a=l(null),u=l(void 0),s=l(0),c=l("");function l(t){var e=new n(n._0);return e._V=1,e._W=t,e}n.resolve=function(t){if(t instanceof n)return t;if(null===t)return a;if(void 0===t)return u;if(!0===t)return o;if(!1===t)return i;if(0===t)return s;if(""===t)return c;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new n(e.bind(t))}catch(t){return new n((function(e,r){r(t)}))}return l(t)};var f=function(t){return"function"==typeof Array.from?(f=Array.from,Array.from(t)):(f=function(t){return Array.prototype.slice.call(t)},Array.prototype.slice.call(t))};n.all=function(t){var e=f(t);return new n((function(t,r){if(0===e.length)return t([]);var o=e.length;function i(a,u){if(u&&("object"==typeof u||"function"==typeof u)){if(u instanceof n&&u.then===n.prototype.then){for(;3===u._V;)u=u._W;return 1===u._V?i(a,u._W):(2===u._V&&r(u._W),void u.then((function(t){i(a,t)}),r))}var s=u.then;if("function"==typeof s)return void new n(s.bind(u)).then((function(t){i(a,t)}),r)}e[a]=u,0==--o&&t(e)}for(var a=0;a{"use strict";var n=r(434);t.exports=n,n.prototype.finally=function(t){return this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){throw e}))}))}},159:(t,e,r)=>{"use strict";t.exports=r(434),r(445),r(29),r(803),r(490),r(690)},490:(t,e,r)=>{"use strict";var n=r(434),o=r(272);t.exports=n,n.denodeify=function(t,e){return"number"==typeof e&&e!==1/0?function(t,e){for(var r=[],o=0;o "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+i+";","var res;","switch (argLength) {",r.concat(["extra"]).map((function(t,e){return"case "+e+":res = fn.call("+["self"].concat(r.slice(0,e)).concat("cb").join(",")+");break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],a)(n,t)}(t)};var i="function (err, res) {if (err) { rj(err); } else { rs(res); }}";n.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),r="function"==typeof e[e.length-1]?e.pop():null,i=this;try{return t.apply(this,arguments).nodeify(r,i)}catch(t){if(null==r)return new n((function(e,r){r(t)}));o((function(){r.call(i,t)}))}}},n.prototype.nodeify=function(t,e){if("function"!=typeof t)return this;this.then((function(r){o((function(){t.call(e,null,r)}))}),(function(r){o((function(){t.call(e,r)}))}))}},690:(t,e,r)=>{"use strict";var n=r(434);t.exports=n,n.enableSynchronous=function(){n.prototype.isPending=function(){return 0==this.getState()},n.prototype.isFulfilled=function(){return 1==this.getState()},n.prototype.isRejected=function(){return 2==this.getState()},n.prototype.getValue=function(){if(3===this._V)return this._W.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._W},n.prototype.getReason=function(){if(3===this._V)return this._W.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._W},n.prototype.getState=function(){return 3===this._V?this._W.getState():-1===this._V||-2===this._V?0:this._V}},n.disableSynchronous=function(){n.prototype.isPending=void 0,n.prototype.isFulfilled=void 0,n.prototype.isRejected=void 0,n.prototype.getValue=void 0,n.prototype.getReason=void 0,n.prototype.getState=void 0}},666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return D()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?d:h,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function m(){}function b(){}function y(){}var g={};s(g,i,(function(){return this}));var _=Object.getPrototypeOf,j=_&&_(_(C([])));j&&j!==r&&n.call(j,i)&&(g=j);var w=y.prototype=m.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function S(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{Cell:()=>f,Chord:()=>h,LogLevel:()=>A,MusicXML:()=>E,Playlist:()=>l,Song:()=>p,convert:()=>z,convertSync:()=>F});var t=r(259),e=r.n(t),o=r(529),i=r.n(o);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){for(var r=0;r1&&(this.name=n.pop()),this.songs=n.map((function(t){try{return new p(t,"irealbook"===r[1])}catch(r){var e=t.split("="),n=p.parseTitle(e[0].trim());return console.error("[ireal-musicxml] [".concat(n,"] ").concat(r.toString())),null}})).filter((function(t){return null!==t})).reduce((function(t,e){if(t.length>0){var r=i()(t[t.length-1].title,e.title);if(0===r[0][0]&&r.every((function(t){return 0===t[0]||t[1].match(/^\d+$/)})))return t[t.length-1].cells=t[t.length-1].cells.concat(e.cells),t}return t.push(e),t}),[])})),f=s((function t(){c(this,t),this.annots=[],this.comments=[],this.bars="",this.spacer=0,this.chord=null})),h=s((function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;c(this,t),this.note=e,this.modifiers=r,this.over=n,this.alternate=o})),p=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(c(this,t),this.cells=[],this.musicXml="",!e)return this.title="",this.composer="",this.style="",this.key="",this.transpose=0,this.groove="",this.bpm=0,void(this.repeats=0);var n=e.split("=");if(r)this.title=t.parseTitle(n[0].trim()),this.composer=t.parseComposer(n[1].trim()),this.style=n[2].trim(),this.key=n[3],this.cells=this.parse(n[5]);else{this.title=t.parseTitle(n[0].trim()),this.composer=t.parseComposer(n[1].trim()),this.style=n[3].trim(),this.key=n[4],this.transpose=+n[5]||0,this.groove=n[7],this.bpm=+n[8],this.repeats=+n[9]||3;var o=n[6].split("1r34LbKcu7");this.cells=this.parse(d(o[1]))}}return s(t,[{key:"parse",value:function(e){for(var r=e.trim(),n=[];r;){for(var o=!1,i=0;i51;)e=t.substring(0,50),t=t.substring(50),r+=v(e);return(r+=t).replace(/Kcl/g,"| x").replace(/LZ/g," |").replace(/XyQ/g," ")}function v(t){for(var e=t.split(""),r=0;r<5;r++)e[49-r]=t[r],e[r]=t[49-r];for(var n=10;n<24;n++)e[49-n]=t[n],e[n]=t[49-n];return e.join("")}a(p,"chordRegex",/^([A-G][b#]?)((?:sus|alt|add|[+\-^\dhob#])*)(\*.+?\*)*(\/[A-G][#b]?)?(\(.*?\))?/),a(p,"chordRegex2",/^([ Wp])()()(\/[A-G][#b]?)?(\(.*?\))?/),a(p,"regExps",[/^\*[a-zA-Z]/,/^T\d\d/,/^N./,/^<.*?>/,p.chordRegex,p.chordRegex2]);var m=r(308),b=r(13);function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function g(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r\n\n '.trim(),indent:" "})}},{key:"convertSong",value:function(){return{"score-partwise":[{work:{"work-title":this.song.title}},{identification:[{_name:"creator",_attrs:{type:"composer"},_content:this.song.composer},{encoding:[{software:"@infojunkie/ireal-musicxml"},{"encoding-date":t.convertDate(new Date)},{_name:"supports",_attrs:{element:"accidental",type:"no"}},{_name:"supports",_attrs:{element:"transpose",type:"no"}},{_name:"supports",_attrs:{attribute:"new-page",element:"print",type:"yes",value:"yes"}},{_name:"supports",_attrs:{attribute:"new-system",element:"print",type:"yes",value:"yes"}}]}]},{defaults:{scaling:{millimeters:7,tenths:40}}},{"part-list":{_name:"score-part",_attrs:{id:"P1"},_content:{_name:"part-name",_attrs:{"print-object":"no"},_content:"Lead sheet"}}},{_name:"part",_attrs:{id:"P1"},_content:this.convertMeasures()}]}}},{key:"convertMeasures",value:function(){var e=this,r=this.song.cells.reduce((function(r,n,o){if((n.bars.match(/\(|\{|\[/)||!e.measure&&(n.chord||n.annots.length||n.comments.length))&&(e.measure&&(e._log(A.Warn,"Starting a new measure over existing measure. Closing current measure first."),e.measure.barlines.push(e.convertBarline("","right")),e.adjustChordsDuration(e.measure)&&r.push(e.measure)),e.measure=new t.Measure(r.length+1),r.length||(e.measure.attributes.push({divisions:e.options.divisions},{clef:[{sign:"G"},{line:2}]},{"measure-style":[{_name:"slash",_attrs:{type:"start","use-stems":"rhythmic"===e.options.notation?"yes":"no"}}]},e.convertKey()),e.song.bpm&&e.measure.body._content.push(e.convertTempo(e.song.bpm)),e.measure.body._content.push(e.convertStyleAndGroove(e.song.style,e.song.groove))),e.measure.barlines.push(e.convertBarline(n.bars,"left")),e.barRepeat&&(e.measure.chords=_(r[r.length-e.barRepeat-1].chords))),!e.measure)return(n.chord||n.annots.length||n.comments.length||n.bars&&")"!==n.bars)&&e._log(A.Warn,"Found non-empty orphan cell ".concat(JSON.stringify(n)),r[r.length-1]),r;if(o>0&&o%16==0&&e.measure.body._content.splice(0,0,{_name:"print",_attrs:{"new-system":"yes"}}),n.chord)switch(n.chord.note){case"x":e.barRepeat=1,e.measure.chords=_(r[r.length-e.barRepeat].chords);break;case"r":e.barRepeat=2,e.measure.chords=_(r[r.length-e.barRepeat].chords);break;case"p":if(e.measure.chords.length){e.measure.chords[e.measure.chords.length-1].spaces++;break}case"W":var i=e.measure;i.chords.length||(i=r.slice().reverse().find((function(t){return t.chords.length})))||e._log(A.Error,"Cannot find any measure with chords prior to ".concat(JSON.stringify(n.chord)));var a=i.chords[i.chords.length-1].ireal;a.over=n.chord.over,a.alternate=n.chord.alternate,e.measure.chords.push(e.convertChord(a));break;case" ":e._log(A.Warn,"Unhandled empty/alternate chord ".concat(JSON.stringify(n.chord)));break;default:e.measure.chords.push(e.convertChord(n.chord)),e.measure.chords[e.measure.chords.length-1].small=e.smallChord}else e.barRepeat||e.measure.chords.length&&e.measure.chords[e.measure.chords.length-1].spaces++;return n.annots.forEach((function(t){switch(t[0]){case"*":var n=t.slice(1);e.measure.body._content.push(e.convertSection(n));break;case"T":var o=t.slice(1);e.measure.attributes.push(e.convertTime(o));break;case"S":e.measure.body._content.push(e.convertSegno());break;case"N":var i=parseInt(t.slice(1));if(e.measure.barlines[0]._content.push(e.convertEnding(i,"start")),i>1){r[r.length-1].barlines[1]._content.push(e.convertEnding(i-1,"stop"));var a=r.slice().reverse().find((function(t){return t.barEnding===i-1}));a||e._log(A.Error,"Cannot find ending ".concat(i-1," in right barline of any measure"));var u=a.barlines[1]._content.findIndex((function(t){return"ending"===t._name}));-1===u&&e._log(A.Error,"Cannot find ending ".concat(i-1," in right barline"),a),delete a.barlines[1]._content[u]}e.measure.barEnding=i;break;case"Q":e.measure.body._content.push(e.convertToCoda()),e.codas.push(e.measure);break;case"l":e.smallChord=!1,e.measure.chords.length&&(e.measure.chords[e.measure.chords.length-1].small=!1);break;case"s":e.smallChord=!0,e.measure.chords.length&&(e.measure.chords[e.measure.chords.length-1].small=!0);break;case"f":e.measure.chords[e.measure.chords.length-1].fermata=!0;break;case"U":e.measure.body._content.push(e.convertFine("END"));break;default:e._log(A.Warn,'Unhandled annotation "'.concat(t,'"'))}})),n.comments.map((function(t){return t.trim()})).forEach((function(r){var n=e._map(t.mapRepeats,r);n?e.measure.body._content.push(n.call(e,r)):e.measure.body._content.push(e.convertComment(r))})),n.bars.match(/\)|\}|\]|Z/)&&e.measure.chords.length&&(e.measure.barlines.push(e.convertBarline(n.bars,"right")),e.measure.barEnding&&e.measure.barlines[1]._content.push(e.convertEnding(e.measure.barEnding,"discontinue")),e.adjustChordsDuration(e.measure)&&r.push(e.measure),e.measure=null,e.barRepeat&&e.barRepeat--),r}),[]);if(this.codas.length){var n=this.codas[this.codas.length-1],o=n.body._content.findIndex((function(t){return"direction"===t._name&&Array.isArray(t._content)&&t._content.some((function(t){return"sound"===t._name&&Object.keys(t._attrs).includes("tocoda")}))}));-1===o&&this._log(A.Warn,"Cannot find sound direction",n),n.body._content[o]=this.convertCoda()}return r.map((function(t){return t.assemble()}))}},{key:"convertRepeatNx",value:function(t){var e;null!==(e=t.match(/(\d+)x/))&&(this.repeats=e[1])}},{key:"convertFine",value:function(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{fine:"yes"}}]}}},{key:"convertDaCapo",value:function(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{dacapo:"yes"}}]}}},{key:"convertDalSegno",value:function(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{dalsegno:"yes"}}]}}},{key:"convertComment",value:function(t){var e="*"===t[0]?t.slice(3):t;return{_name:"direction",_attrs:{placement:"*"===t[0]?"above":"below"},_content:{"direction-type":{words:e}}}}},{key:"convertEnding",value:function(t,e){return{_name:"ending",_attrs:{number:t,type:e},_content:"".concat(t,".")}}},{key:"convertBarline",value:function(t,e){var r="left"===e?"none":"regular",n=null;return t.match(/\[|\]/)?r="light-light":t.match(/Z/)?r="light-heavy":t.match(/\{|\}/)&&(r="left"===e?"heavy-light":"light-heavy",n="left"===e?"forward":"backward"),"forward"===n&&(this.repeats=2),{_name:"barline",_attrs:{location:e},_content:[{"bar-style":r},g({},n&&{_name:"repeat",_attrs:g({direction:n},"backward"===n&&{times:this.repeats})})]}}},{key:"convertSection",value:function(t){return"i"===t&&(t="Intro"),{_name:"direction",_attrs:{placement:"above"},_content:{"direction-type":{rehearsal:t}}}}},{key:"convertSegno",value:function(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{_name:"segno"}},{_name:"sound",_attrs:{segno:"segno"}}]}}},{key:"convertCoda",value:function(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{_name:"coda"}},{_name:"sound",_attrs:{coda:"coda"}}]}}},{key:"convertToCoda",value:function(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{words:"To Coda"}},{_name:"sound",_attrs:{tocoda:"coda"}}]}}},{key:"convertTempo",value:function(t){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{_name:"metronome",_attrs:{parentheses:"no"},_content:[{"beat-unit":this.calculateChordDuration(1)[0].type},{"per-minute":t}]}]},{_name:"sound",_attrs:{tempo:t}}]}}},{key:"convertTime",value:function(t){var e=parseInt(t[0]),r=parseInt(t[1]);return"12"===t&&(e=4,r=4),this.time={beats:e,beatType:r},{time:[{beats:e},{"beat-type":r}]}}},{key:"adjustChordsDuration",value:function(t){var e=this;if(t.chords.length>this.time.beats)return this._log(A.Error,"Too many chords (".concat(t.chords.length," out of ").concat(this.time.beats,")"),t),!0;var r=t.chords.reduce((function(t,e){return t+1+e.spaces}),0);if(!r)return this._log(A.Warn,"No chord found. Skipping current measure.",t),!1;if(r>this.time.beats)for(var n=0;r>this.time.beats;)t.chords[n].spaces>0&&(t.chords[n].spaces--,r--),n=(n+1)%t.chords.length;else for(var o=0;r1?n>0?"stop":"start":null)})),t})),!0}},{key:"calculateChordDuration",value:function(t){var e=this,r={1:[{t:"eighth",d:0,b:1}],2:[{t:"quarter",d:0,b:2}],3:[{t:"quarter",d:1,b:3}],4:[{t:"half",d:0,b:4}],5:[{t:"quarter",d:1,b:3},{t:"quarter",d:0,b:2}],6:[{t:"half",d:1,b:6}],7:[{t:"half",d:2,b:7}],8:[{t:"whole",d:0,b:8}],9:[{t:"half",d:1,b:6},{t:"quarter",d:1,b:3}],10:[{t:"half",d:1,b:6},{t:"half",d:0,b:4}],11:[{t:"half",d:2,b:7},{t:"half",d:0,b:4}],12:[{t:"whole",d:1,b:12}],13:[{t:"half",d:2,b:7},{t:"half",d:1,b:6}],14:[{t:"whole",d:2,b:14}],15:[{t:"whole",d:0,b:8},{t:"half",d:2,b:7}]};if("slash"===this.options.notation){var n=8/this.time.beatType;return Array(t).fill(this._map(r,n,[],"Unexpected beat count 1 for time signature ".concat(this.time.beats,"/").concat(this.time.beatType)).map((function(t){return{duration:t.b*e.options.divisions/2,type:t.t,dots:t.d}}))[0])}var o=8*t/this.time.beatType;return this._map(r,o,[],"Unexpected beat count ".concat(t," for time signature ").concat(this.time.beats,"/").concat(this.time.beatType)).map((function(t){return{duration:t.b*e.options.divisions/2,type:t.t,dots:t.d}}))}},{key:"convertChordNote",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o={_name:"pitch",_content:[{step:this.options.step},{alter:this._map(t.mapFifthsToAlters,this.fifths,[],"Unhandled fifths count=".concat(this.fifths)).includes(this.options.step)?this.fifths>0?1:-1:0},{octave:this.options.octave}]},i=[];return r&&i.push({_name:"fermata"}),n&&i.push({_name:"tied",_attrs:{type:n}}),t.reorderSequence(this.measure,[o,{_name:"cue"},{notehead:this.options.notehead},{duration:e.duration},{voice:1},{_name:"type",_attrs:{size:"full"},_content:e.type},g({},i.length&&{notations:t.reorderSequence(this.measure,i,t.sequenceNotations)})].concat(Array(e.dots).fill({_name:"dot"})),t.sequenceNote)}},{key:"convertChordDegree",value:function(t,e,r){return{_name:"degree",_attrs:{"print-object":"no"},_content:[{"degree-value":t},{"degree-alter":r},{"degree-type":e}]}}},{key:"convertChordSymbol",value:function(e){var r=this,n=this.renderChord(this.parseChord("".concat(e.note).concat(e.modifiers)));if(!n)return this._log(A.Warn,'Unrecognized chord "'.concat(e.note).concat(e.modifiers,'"')),{rootStep:null,rootAlter:null,chordKind:null,chordDegrees:[],chordText:null};var o=n.input.rootNote[0],i=this._map(t.mapAlter,n.input.rootNote[1]||null,null,'Unrecognized accidental in chord "'.concat(n.input.rootNote,'"')),a=n.formatted.descriptor+n.formatted.chordChanges.join(""),u=this._map({major:"major",major6:"major-sixth",major7:"major-seventh",dominant7:"dominant",minor:"minor",minor6:"minor-sixth",minor7:"minor-seventh",minorMajor7:"major-minor",augmented:"augmented",diminished:"diminished",diminished7:"diminished-seventh",power:"power"},n.normalized.quality,"",'Unrecognized chord quality "'.concat(n.normalized.quality,'"'));if(n.normalized.extensions.length){var s=Math.max.apply(Math,_(n.normalized.extensions.map((function(t){return parseInt(t)})))).toString();"dominant-11th"===(u=u.split("-")[0]+this._map({9:"-ninth",11:"-11th",13:"-13th"},s,"","Unhandled extension ".concat(s)))&&(n.normalized.isSuspended=!1)}[{intervals:["1","4","5"],kind:"suspended-fourth",strict:!0},{intervals:["1","5","9"],kind:"suspended-second",strict:!0},{intervals:["1","b3","b5","b7"],kind:"half-diminished",strict:!0},{intervals:["1","3","#5","b7"],kind:"augmented-seventh",strict:!1}].some((function(t){if((!t.strict||n.normalized.intervals.length===t.intervals.length)&&t.intervals.every((function(t,e){return t===n.normalized.intervals[e]})))return u=t.kind,t.intervals.forEach((function(t){n.normalized.alterations=n.normalized.alterations.filter((function(e){return e===t})),n.normalized.adds=n.normalized.adds.filter((function(e){return e===t})),n.normalized.omits=n.normalized.omits.filter((function(e){return e===t}))})),n.normalized.intervals.forEach((function(e){t.intervals.includes(e)||n.normalized.adds.push(e)})),!0}));var c=[];return n.normalized.isSuspended&&!u.includes("suspended")&&(n.normalized.adds.push("4"),n.normalized.adds.includes("3")||n.normalized.omits.push("3")),n.normalized.alterations.forEach((function(e){var o=e.slice(1);c.push(r.convertChordDegree(o,"5"===o||n.normalized.extensions.includes(o)?"alter":"add",r._map(t.mapAlter,e[0],0,'Unrecognized alter symbol in "'.concat(e,'"'))))})),n.normalized.adds.forEach((function(e){var n=Object.keys(t.mapAlter).includes(e[0])?e[0]:null,o=n?e.slice(1):e;c.push(r.convertChordDegree(o,"add",r._map(t.mapAlter,n,0,'Unrecognized alter symbol in "'.concat(e,'"'))))})),n.normalized.omits.forEach((function(e){var n=Object.keys(t.mapAlter).includes(e[0])?e[0]:null,o=n?e.slice(1):e;c.push(r.convertChordDegree(o,"subtract",r._map(t.mapAlter,n,0,'Unrecognized alter symbol in "'.concat(e,'"'))))})),{rootStep:o,rootAlter:i,chordKind:u,chordDegrees:c,chordText:a}}},{key:"convertChord",value:function(e){var r=this,n=null;if("n"===e.note)n=[{root:[{_name:"root-step",_attrs:{text:""},_content:this.options.step}]},{_name:"kind",_attrs:{text:"N.C."},_content:"none"}];else{var o=this.convertChordSymbol(e),i=o.rootStep,a=o.rootAlter,u=o.chordKind,s=o.chordDegrees,c=o.chordText,l=e.over?[{"bass-step":e.over.note[0]},g({},e.over.note[1]&&{"bass-alter":this._map(t.mapAlter,e.over.note[1],null,'Unrecognized accidental in bass note "'.concat(e.over.note,'"'))})]:null;n=[{root:[{"root-step":i},g({},a&&{"root-alter":a})]},{_name:"kind",_attrs:{text:c,"use-symbols":"no"},_content:u},g({},l&&{bass:l})].concat(s)}return e.alternate&&this._log(A.Warn,"Unhandled alternate chord ".concat(JSON.stringify(e.alternate))),new t.Chord(n,this.calculateChordDuration(1).map((function(t){return r.convertChordNote(t)})),e)}},{key:"convertKey",value:function(){return this.fifths=this._map({C:0,G:1,D:2,A:3,E:4,B:5,"F#":6,"C#":7,F:-1,Bb:-2,Eb:-3,Ab:-4,Db:-5,Gb:-6,Cb:-7,"A-":0,"E-":1,"B-":2,"F#-":3,"C#-":4,"G#-":5,"D#-":6,"A#-":7,"D-":-1,"G-":-2,"C-":-3,"F-":-4,"Bb-":-5,"Eb-":-6,"Ab-":-7},this.song.key,0,'Unrecognized key signature "'.concat(this.song.key,'"')),{key:[{fifths:this.fifths},{mode:"-"===this.song.key.slice(-1)?"minor":"major"}]}}},{key:"convertStyleAndGroove",value:function(t,e){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{words:t}]},{sound:[{play:[{_name:"other-play",_attrs:{type:"groove"},_content:e||t}]}]}]}}},{key:"_log",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.measure;if(!(t4&&void 0!==arguments[4]?arguments[4]:A.Warn,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.measure;return e?e in t?t[e]:(n&&this._log(o,n,i),r||null):r}}],[{key:"convert",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign({},this.defaultOptions,r);return new t(e,n).convert()}},{key:"convertDate",value:function(t){return new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString().split("T")[0]}},{key:"reorderSequence",value:function(t,e,r){var n=this;return e.filter((function(t){return Object.keys(t).length})).sort((function(e,o){var i=Object.keys(e)[0];"_name"===i&&(i=e[i]);var a=Object.keys(o)[0];"_name"===a&&(a=o[a]);var u=r.indexOf(i),s=r.indexOf(a);return-1===u&&n._log(A.Warn,'Unrecognized element "'.concat(i,'"'),t),-1===s&&n._log(A.Warn,'Unrecognized element "'.concat(a,'"'),t),u-s}))}}]),t}();function k(t){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k(t)}function C(){C=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new x(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=_(a,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function p(){}var d={};u(d,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(O([])));m&&m!==e&&r.call(m,o)&&(d=m);var b=p.prototype=f.prototype=Object.create(d);function y(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){function n(o,i,a,u){var s=c(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==k(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function _(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function D(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function P(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){D(i,n,o,a,u,"next",t)}function u(t){D(i,n,o,a,u,"throw",t)}a(void 0)}))}}function F(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new l(t);return r.songs.forEach((function(t){t.musicXml=E.convert(t,e)})),r}function z(t){return T.apply(this,arguments)}function T(){return T=P(C().mark((function t(r){var n,o=arguments;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},t.abrupt("return",new(e())((function(t){return t(F(r,n))})));case 2:case"end":return t.stop()}}),t)}))),T.apply(this,arguments)}S(E,"defaultOptions",{divisions:768,notation:"rhythmic",step:"B",octave:4,notehead:"slash",logLevel:A.Warn}),S(E,"sequenceAttributes",["divisions","key","time","staves","part-symbol","instruments","clef","staff-details","transpose","directive","measure-style"]),S(E,"sequenceNote",["cue","pitch","rest","unpitched","duration","tie","voice","type","dot","accidental","time-modification","stem","notehead","notehead-text","staff","beam","notations","lyric","play"]),S(E,"sequenceNotations",["accidental-mark","arpeggiate","articulations","dynamics","fermata","glissando","non-arpeggiate","ornaments","other-notation","slide","slur","technical","tied","tuplet"]),S(E,"sequenceBarline",["bar-style","footnote","level","wavy-line","segno","coda","fermata","ending","repeat"]),S(E,"mapAlter",{"#":1,b:-1}),S(E,"mapFifthsToAlters",{0:[],1:["F"],2:["F","C"],3:["F","C","G"],4:["F","C","G","D"],5:["F","C","G","D","A"],6:["F","C","G","D","A","E"],7:["F","C","G","D","A","E","B"],"-1":["B"],"-2":["B","E"],"-3":["B","E","A"],"-4":["B","E","A","D"],"-5":["B","E","A","D","G"],"-6":["B","E","A","D","G","C"],"-7":["B","E","A","D","G","C","F"]}),S(E,"mapRepeats",{"D.C. al Coda":E.prototype.convertDaCapo,"D.C. al Fine":E.prototype.convertDaCapo,"D.C. al 1st End.":E.prototype.convertDaCapo,"D.C. al 2nd End.":E.prototype.convertDaCapo,"D.C. al 3rd End.":E.prototype.convertDaCapo,"D.S. al Coda":E.prototype.convertDalSegno,"D.S. al Fine":E.prototype.convertDalSegno,"D.S. al 1st End.":E.prototype.convertDalSegno,"D.S. al 2nd End.":E.prototype.convertDalSegno,"D.S. al 3rd End.":E.prototype.convertDalSegno,Fine:E.prototype.convertFine,"3x":E.prototype.convertRepeatNx,"4x":E.prototype.convertRepeatNx,"5x":E.prototype.convertRepeatNx,"6x":E.prototype.convertRepeatNx,"7x":E.prototype.convertRepeatNx,"8x":E.prototype.convertRepeatNx}),S(E,"Measure",function(){function t(e){O(this,t),this.body={_name:"measure",_attrs:{number:e},_content:[]},this.attributes=[],this.chords=[],this.barlines=[],this.barEnding=0}return x(t,[{key:"number",value:function(){return this.body._attrs.number}},{key:"assemble",value:function(){var t=this;return this.attributes.length&&this.body._content.push({attributes:E.reorderSequence(this,this.attributes,E.sequenceAttributes)}),this.chords.forEach((function(e){var r;(r=t.body._content).push.apply(r,[{harmony:e.harmony}].concat(_(e.notes.map((function(t){return{note:t}})))))})),this.barlines[0]._content=E.reorderSequence(this,this.barlines[0]._content,E.sequenceBarline),this.body._content.splice(1,0,this.barlines[0]),this.barlines[1]._content=E.reorderSequence(this,this.barlines[1]._content,E.sequenceBarline),this.body._content.push(this.barlines[1]),this.body}}]),t}()),S(E,"Chord",function(){return x((function t(e,r,n){O(this,t),this.harmony=e,this.notes=r,this.ireal=n,this.spaces=0,this.fermata=!1,this.small=!1}))}()),r(666)})(),n})())); \ No newline at end of file diff --git a/test/bugs.spec.js b/test/bugs.spec.js index 0e8133b..0fd87cb 100644 --- a/test/bugs.spec.js +++ b/test/bugs.spec.js @@ -71,7 +71,7 @@ describe('Bug Fixes', () => { const brendan = new Playlist(fs.readFileSync('test/data/brendan.html', 'utf-8')); }); - it('Checks #54 mmessy chord timings', async () => { + it('Checks #54 messy chord timings', async () => { const song = blues.songs.find(song => song.title === "Come Back Baby"); assert.notStrictEqual(song, undefined); const musicXml = Converter.convert(song); diff --git a/test/converter.spec.js b/test/converter.spec.js index 0241977..b7ef3ea 100644 --- a/test/converter.spec.js +++ b/test/converter.spec.js @@ -17,7 +17,7 @@ before(() => { jazz = new Playlist(fs.readFileSync('test/data/jazz1460.txt', 'utf-8')); playlist = new Playlist(fs.readFileSync('test/data/playlist.html', 'utf-8')); strange = new Playlist(fs.readFileSync('test/data/strange.html', 'utf-8')); - blues = new Playlist(fs.readFileSync('test/data/blues.txt', 'utf-8')); + blues = new Playlist(fs.readFileSync('test/data/blues50.txt', 'utf-8')); pop = new Playlist(fs.readFileSync('test/data/pop.txt', 'utf-8')); }) diff --git a/test/data/blues.txt b/test/data/blues50.txt similarity index 100% rename from test/data/blues.txt rename to test/data/blues50.txt