@modelcontextprotocol/server-sheet-music 1.1.2 → 1.2.1
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/README.md +2 -2
- package/dist/index.js +119 -116
- package/dist/mcp-app.html +78 -117
- package/dist/server.js +246 -7536
- package/package.json +3 -1
package/dist/mcp-app.html
CHANGED
|
@@ -5,90 +5,51 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<meta name="color-scheme" content="light dark">
|
|
7
7
|
<title>Sheet Music Viewer</title>
|
|
8
|
-
<script type="module" crossorigin>var Mb=Object.defineProperty;var Db=(e,r,n)=>r in e?Mb(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var at=(e,r,n)=>Db(e,typeof r!="symbol"?r+"":r,n);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))i(t);new MutationObserver(t=>{for(const a of t)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(t){const a={};return t.integrity&&(a.integrity=t.integrity),t.referrerPolicy&&(a.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?a.credentials="include":t.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(t){if(t.ep)return;t.ep=!0;const a=n(t);fetch(t.href,a)}})();function X(e,r,n){function i(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),r(o,l);const d=s.prototype,p=Object.keys(d);for(let v=0;v<p.length;v++){const f=p[v];f in o||(o[f]=d[f].bind(o))}}const t=(n==null?void 0:n.Parent)??Object;class a extends t{}Object.defineProperty(a,"name",{value:e});function s(o){var l;const d=n!=null&&n.Parent?new a:this;i(d,o),(l=d._zod).deferred??(l.deferred=[]);for(const p of d._zod.deferred)p();return d}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:o=>{var l,d;return n!=null&&n.Parent&&o instanceof n.Parent?!0:(d=(l=o==null?void 0:o._zod)==null?void 0:l.traits)==null?void 0:d.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}class vr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ph extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}const vh={};function jt(e){return vh}function mh(e){const r=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,t])=>r.indexOf(+i)===-1).map(([i,t])=>t)}function jo(e,r){return typeof r=="bigint"?r.toString():r}function Jn(e){return{get value(){{const r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function Xo(e){return e==null}function Ko(e){const r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function Rb(e,r){const n=(e.toString().split(".")[1]||"").length,i=r.toString();let t=(i.split(".")[1]||"").length;if(t===0&&/\d?e-\d?/.test(i)){const l=i.match(/\d?e-(\d?)/);l!=null&&l[1]&&(t=Number.parseInt(l[1]))}const a=n>t?n:t,s=Number.parseInt(e.toFixed(a).replace(".","")),o=Number.parseInt(r.toFixed(a).replace(".",""));return s%o/10**a}const Du=Symbol("evaluating");function Ne(e,r,n){let i;Object.defineProperty(e,r,{get(){if(i!==Du)return i===void 0&&(i=Du,i=n()),i},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function sr(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Gt(...e){const r={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(r,i)}return Object.defineProperties({},r)}function Ru(e){return JSON.stringify(e)}function Lb(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const gh="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Mr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ub=Jn(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const r=Function;return new r(""),!0}catch{return!1}});function mr(e){if(Mr(e)===!1)return!1;const r=e.constructor;if(r===void 0||typeof r!="function")return!0;const n=r.prototype;return!(Mr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function bh(e){return mr(e)?{...e}:Array.isArray(e)?[...e]:e}const Zb=new Set(["string","number","symbol"]);function gr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jt(e,r,n){const i=new e._zod.constr(r??e._zod.def);return(!r||n!=null&&n.parent)&&(i._zod.parent=e),i}function le(e){const r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if((r==null?void 0:r.message)!==void 0){if((r==null?void 0:r.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function jb(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}const Bb={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function qb(e,r){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const a=Gt(e._zod.def,{get shape(){const s={};for(const o in r){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(s[o]=n.shape[o])}return sr(this,"shape",s),s},checks:[]});return Jt(e,a)}function Fb(e,r){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const a=Gt(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const o in r){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);r[o]&&delete s[o]}return sr(this,"shape",s),s},checks:[]});return Jt(e,a)}function Hb(e,r){if(!mr(r))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const a=e._zod.def.shape;for(const s in r)if(Object.getOwnPropertyDescriptor(a,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const t=Gt(e._zod.def,{get shape(){const a={...e._zod.def.shape,...r};return sr(this,"shape",a),a}});return Jt(e,t)}function Gb(e,r){if(!mr(r))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Gt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...r};return sr(this,"shape",i),i}});return Jt(e,n)}function Jb(e,r){const n=Gt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...r._zod.def.shape};return sr(this,"shape",i),i},get catchall(){return r._zod.def.catchall},checks:[]});return Jt(e,n)}function Wb(e,r,n){const t=r._zod.def.checks;if(t&&t.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=Gt(r._zod.def,{get shape(){const o=r._zod.def.shape,l={...o};if(n)for(const d in n){if(!(d in o))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(l[d]=e?new e({type:"optional",innerType:o[d]}):o[d])}else for(const d in o)l[d]=e?new e({type:"optional",innerType:o[d]}):o[d];return sr(this,"shape",l),l},checks:[]});return Jt(r,s)}function Yb(e,r,n){const i=Gt(r._zod.def,{get shape(){const t=r._zod.def.shape,a={...t};if(n)for(const s in n){if(!(s in a))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(a[s]=new e({type:"nonoptional",innerType:t[s]}))}else for(const s in t)a[s]=new e({type:"nonoptional",innerType:t[s]});return sr(this,"shape",a),a}});return Jt(r,i)}function hr(e,r=0){var n;if(e.aborted===!0)return!0;for(let i=r;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)!==!0)return!0;return!1}function pr(e,r){return r.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function $n(e){return typeof e=="string"?e:e==null?void 0:e.message}function Bt(e,r,n){var t,a,s,o,l,d;const i={...e,path:e.path??[]};if(!e.message){const p=$n((s=(a=(t=e.inst)==null?void 0:t._zod.def)==null?void 0:a.error)==null?void 0:s.call(a,e))??$n((o=r==null?void 0:r.error)==null?void 0:o.call(r,e))??$n((l=n.customError)==null?void 0:l.call(n,e))??$n((d=n.localeError)==null?void 0:d.call(n,e))??"Invalid input";i.message=p}return delete i.inst,delete i.continue,r!=null&&r.reportInput||delete i.input,i}function Qo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Dr(...e){const[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:{...r}}const yh=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,jo,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_h=X("$ZodError",yh),wh=X("$ZodError",yh,{Parent:Error});function Vb(e,r=n=>n.message){const n={},i=[];for(const t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):i.push(r(t));return{formErrors:i,fieldErrors:n}}function Xb(e,r=n=>n.message){const n={_errors:[]},i=t=>{for(const a of t.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s}));else if(a.code==="invalid_key")i({issues:a.issues});else if(a.code==="invalid_element")i({issues:a.issues});else if(a.path.length===0)n._errors.push(r(a));else{let s=n,o=0;for(;o<a.path.length;){const l=a.path[o];o===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],o++}}};return i(e),n}const e0=e=>(r,n,i,t)=>{const a=i?Object.assign(i,{async:!1}):{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new vr;if(s.issues.length){const o=new((t==null?void 0:t.Err)??e)(s.issues.map(l=>Bt(l,a,jt())));throw gh(o,t==null?void 0:t.callee),o}return s.value},t0=e=>async(r,n,i,t)=>{const a=i?Object.assign(i,{async:!0}):{async:!0};let s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){const o=new((t==null?void 0:t.Err)??e)(s.issues.map(l=>Bt(l,a,jt())));throw gh(o,t==null?void 0:t.callee),o}return s.value},Wn=e=>(r,n,i)=>{const t=i?{...i,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},t);if(a instanceof Promise)throw new vr;return a.issues.length?{success:!1,error:new(e??_h)(a.issues.map(s=>Bt(s,t,jt())))}:{success:!0,data:a.value}},kh=Wn(wh),Yn=e=>async(r,n,i)=>{const t=i?Object.assign(i,{async:!0}):{async:!0};let a=r._zod.run({value:n,issues:[]},t);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>Bt(s,t,jt())))}:{success:!0,data:a.value}},Kb=Yn(wh),Qb=e=>(r,n,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return e0(e)(r,n,t)},e3=e=>(r,n,i)=>e0(e)(r,n,i),t3=e=>async(r,n,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return t0(e)(r,n,t)},r3=e=>async(r,n,i)=>t0(e)(r,n,i),n3=e=>(r,n,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Wn(e)(r,n,t)},i3=e=>(r,n,i)=>Wn(e)(r,n,i),a3=e=>async(r,n,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Yn(e)(r,n,t)},s3=e=>async(r,n,i)=>Yn(e)(r,n,i),o3=/^[cC][^\s-]{8,}$/,c3=/^[0-9a-z]+$/,u3=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,l3=/^[0-9a-vA-V]{20}$/,f3=/^[A-Za-z0-9]{27}$/,d3=/^[a-zA-Z0-9_-]{21}$/,h3=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,p3=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Lu=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,v3=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,m3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function g3(){return new RegExp(m3,"u")}const b3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,y3=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,_3=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,w3=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,k3=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$h=/^[A-Za-z0-9_-]*$/,$3=/^\+[1-9]\d{6,14}$/,xh="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",x3=new RegExp(`^${xh}$`);function Sh(e){const r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function S3(e){return new RegExp(`^${Sh(e)}$`)}function I3(e){const r=Sh({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${r}(?:${n.join("|")})`;return new RegExp(`^${xh}T(?:${i})$`)}const T3=e=>{const r=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},C3=/^-?\d+$/,Ih=/^-?\d+(?:\.\d+)?$/,z3=/^(?:true|false)$/i,E3=/^null$/i,N3=/^[^A-Z]*$/,A3=/^[^a-z]*$/,ht=X("$ZodCheck",(e,r)=>{var n;e._zod??(e._zod={}),e._zod.def=r,(n=e._zod).onattach??(n.onattach=[])}),Th={number:"number",bigint:"bigint",object:"date"},Ch=X("$ZodCheckLessThan",(e,r)=>{ht.init(e,r);const n=Th[typeof r.value];e._zod.onattach.push(i=>{const t=i._zod.bag,a=(r.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<a&&(r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value<=r.value:i.value<r.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),zh=X("$ZodCheckGreaterThan",(e,r)=>{ht.init(e,r);const n=Th[typeof r.value];e._zod.onattach.push(i=>{const t=i._zod.bag,a=(r.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>a&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),P3=X("$ZodCheckMultipleOf",(e,r)=>{ht.init(e,r),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):Rb(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),O3=X("$ZodCheckNumberFormat",(e,r)=>{var s;ht.init(e,r),r.format=r.format||"float64";const n=(s=r.format)==null?void 0:s.includes("int"),i=n?"int":"number",[t,a]=Bb[r.format];e._zod.onattach.push(o=>{const l=o._zod.bag;l.format=r.format,l.minimum=t,l.maximum=a,n&&(l.pattern=C3)}),e._zod.check=o=>{const l=o.value;if(n){if(!Number.isInteger(l)){o.issues.push({expected:i,format:r.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?o.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort}):o.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort});return}}l<t&&o.issues.push({origin:"number",input:l,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),l>a&&o.issues.push({origin:"number",input:l,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!r.abort})}}),M3=X("$ZodCheckMaxLength",(e,r)=>{var n;ht.init(e,r),(n=e._zod.def).when??(n.when=i=>{const t=i.value;return!Xo(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<t&&(i._zod.bag.maximum=r.maximum)}),e._zod.check=i=>{const t=i.value;if(t.length<=r.maximum)return;const s=Qo(t);i.issues.push({origin:s,code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),D3=X("$ZodCheckMinLength",(e,r)=>{var n;ht.init(e,r),(n=e._zod.def).when??(n.when=i=>{const t=i.value;return!Xo(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(i._zod.bag.minimum=r.minimum)}),e._zod.check=i=>{const t=i.value;if(t.length>=r.minimum)return;const s=Qo(t);i.issues.push({origin:s,code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),R3=X("$ZodCheckLengthEquals",(e,r)=>{var n;ht.init(e,r),(n=e._zod.def).when??(n.when=i=>{const t=i.value;return!Xo(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag;t.minimum=r.length,t.maximum=r.length,t.length=r.length}),e._zod.check=i=>{const t=i.value,a=t.length;if(a===r.length)return;const s=Qo(t),o=a>r.length;i.issues.push({origin:s,...o?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!r.abort})}}),Vn=X("$ZodCheckStringFormat",(e,r)=>{var n,i;ht.init(e,r),e._zod.onattach.push(t=>{const a=t._zod.bag;a.format=r.format,r.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(r.pattern))}),r.pattern?(n=e._zod).check??(n.check=t=>{r.pattern.lastIndex=0,!r.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:r.format,input:t.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(i=e._zod).check??(i.check=()=>{})}),L3=X("$ZodCheckRegex",(e,r)=>{Vn.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),U3=X("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=N3),Vn.init(e,r)}),Z3=X("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=A3),Vn.init(e,r)}),j3=X("$ZodCheckIncludes",(e,r)=>{ht.init(e,r);const n=gr(r.includes),i=new RegExp(typeof r.position=="number"?`^.{${r.position}}${n}`:n);r.pattern=i,e._zod.onattach.push(t=>{const a=t._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(i)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),B3=X("$ZodCheckStartsWith",(e,r)=>{ht.init(e,r);const n=new RegExp(`^${gr(r.prefix)}.*`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{const t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(r.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:i.value,inst:e,continue:!r.abort})}}),q3=X("$ZodCheckEndsWith",(e,r)=>{ht.init(e,r);const n=new RegExp(`.*${gr(r.suffix)}$`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{const t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(r.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:i.value,inst:e,continue:!r.abort})}}),F3=X("$ZodCheckOverwrite",(e,r)=>{ht.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});class H3{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}const i=r.split(`
|
|
9
|
-
`).filter(
|
|
10
|
-
`))}}const G3={major:4,minor:3,patch:5},Ze=X("$ZodType",(e,r)=>{var t;var n;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=G3;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const a of i)for(const s of a._zod.onattach)s(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),(t=e._zod.deferred)==null||t.push(()=>{e._zod.run=e._zod.parse});else{const a=(o,l,d)=>{let p=hr(o),v;for(const f of l){if(f._zod.def.when){if(!f._zod.def.when(o))continue}else if(p)continue;const u=o.issues.length,h=f._zod.check(o);if(h instanceof Promise&&(d==null?void 0:d.async)===!1)throw new vr;if(v||h instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await h,o.issues.length!==u&&(p||(p=hr(o,u)))});else{if(o.issues.length===u)continue;p||(p=hr(o,u))}}return v?v.then(()=>o):o},s=(o,l,d)=>{if(hr(o))return o.aborted=!0,o;const p=a(l,i,d);if(p instanceof Promise){if(d.async===!1)throw new vr;return p.then(v=>e._zod.parse(v,d))}return e._zod.parse(p,d)};e._zod.run=(o,l)=>{if(l.skipChecks)return e._zod.parse(o,l);if(l.direction==="backward"){const p=e._zod.parse({value:o.value,issues:[]},{...l,skipChecks:!0});return p instanceof Promise?p.then(v=>s(v,o,l)):s(p,o,l)}const d=e._zod.parse(o,l);if(d instanceof Promise){if(l.async===!1)throw new vr;return d.then(p=>a(p,i,l))}return a(d,i,l)}}Ne(e,"~standard",()=>({validate:a=>{var s;try{const o=kh(e,a);return o.success?{value:o.data}:{issues:(s=o.error)==null?void 0:s.issues}}catch{return Kb(e,a).then(l=>{var d;return l.success?{value:l.data}:{issues:(d=l.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),r0=X("$ZodString",(e,r)=>{var n;Ze.init(e,r),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??T3(e._zod.bag),e._zod.parse=(i,t)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),je=X("$ZodStringFormat",(e,r)=>{Vn.init(e,r),r0.init(e,r)}),J3=X("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=p3),je.init(e,r)}),W3=X("$ZodUUID",(e,r)=>{if(r.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(i===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=Lu(i))}else r.pattern??(r.pattern=Lu());je.init(e,r)}),Y3=X("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=v3),je.init(e,r)}),V3=X("$ZodURL",(e,r)=>{je.init(e,r),e._zod.check=n=>{try{const i=n.value.trim(),t=new URL(i);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(t.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),r.normalize?n.value=t.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),X3=X("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=g3()),je.init(e,r)}),K3=X("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=d3),je.init(e,r)}),Q3=X("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=o3),je.init(e,r)}),e6=X("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=c3),je.init(e,r)}),t6=X("$ZodULID",(e,r)=>{r.pattern??(r.pattern=u3),je.init(e,r)}),r6=X("$ZodXID",(e,r)=>{r.pattern??(r.pattern=l3),je.init(e,r)}),n6=X("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=f3),je.init(e,r)}),i6=X("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=I3(r)),je.init(e,r)}),a6=X("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=x3),je.init(e,r)}),s6=X("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=S3(r)),je.init(e,r)}),o6=X("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=h3),je.init(e,r)}),c6=X("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=b3),je.init(e,r),e._zod.bag.format="ipv4"}),u6=X("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=y3),je.init(e,r),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!r.abort})}}}),l6=X("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=_3),je.init(e,r)}),f6=X("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=w3),je.init(e,r),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[t,a]=i;if(!a)throw new Error;const s=Number(a);if(`${s}`!==a)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${t}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!r.abort})}}});function Eh(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const d6=X("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=k3),je.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Eh(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!r.abort})}});function h6(e){if(!$h.test(e))return!1;const r=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return Eh(n)}const p6=X("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=$h),je.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{h6(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!r.abort})}}),v6=X("$ZodE164",(e,r)=>{r.pattern??(r.pattern=$3),je.init(e,r)});function m6(e,r=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const t=JSON.parse(atob(i));return!("typ"in t&&(t==null?void 0:t.typ)!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch{return!1}}const g6=X("$ZodJWT",(e,r)=>{je.init(e,r),e._zod.check=n=>{m6(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),Nh=X("$ZodNumber",(e,r)=>{Ze.init(e,r),e._zod.pattern=e._zod.bag.pattern??Ih,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=Number(n.value)}catch{}const t=n.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return n;const a=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...a?{received:a}:{}}),n}}),b6=X("$ZodNumberFormat",(e,r)=>{O3.init(e,r),Nh.init(e,r)}),y6=X("$ZodBoolean",(e,r)=>{Ze.init(e,r),e._zod.pattern=z3,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=!!n.value}catch{}const t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),_6=X("$ZodNull",(e,r)=>{Ze.init(e,r),e._zod.pattern=E3,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{const t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),w6=X("$ZodUnknown",(e,r)=>{Ze.init(e,r),e._zod.parse=n=>n}),k6=X("$ZodNever",(e,r)=>{Ze.init(e,r),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Uu(e,r,n){e.issues.length&&r.issues.push(...pr(n,e.issues)),r.value[n]=e.value}const $6=X("$ZodArray",(e,r)=>{Ze.init(e,r),e._zod.parse=(n,i)=>{const t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);const a=[];for(let s=0;s<t.length;s++){const o=t[s],l=r.element._zod.run({value:o,issues:[]},i);l instanceof Promise?a.push(l.then(d=>Uu(d,n,s))):Uu(l,n,s)}return a.length?Promise.all(a).then(()=>n):n}});function Pn(e,r,n,i,t){if(e.issues.length){if(t&&!(n in i))return;r.issues.push(...pr(n,e.issues))}e.value===void 0?n in i&&(r.value[n]=void 0):r.value[n]=e.value}function Ah(e){var i,t,a,s;const r=Object.keys(e.shape);for(const o of r)if(!((s=(a=(t=(i=e.shape)==null?void 0:i[o])==null?void 0:t._zod)==null?void 0:a.traits)!=null&&s.has("$ZodType")))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=jb(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)}}function Ph(e,r,n,i,t,a){const s=[],o=t.keySet,l=t.catchall._zod,d=l.def.type,p=l.optout==="optional";for(const v in r){if(o.has(v))continue;if(d==="never"){s.push(v);continue}const f=l.run({value:r[v],issues:[]},i);f instanceof Promise?e.push(f.then(u=>Pn(u,n,v,r,p))):Pn(f,n,v,r,p)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:r,inst:a}),e.length?Promise.all(e).then(()=>n):n}const x6=X("$ZodObject",(e,r)=>{Ze.init(e,r);const n=Object.getOwnPropertyDescriptor(r,"shape");if(!(n!=null&&n.get)){const o=r.shape;Object.defineProperty(r,"shape",{get:()=>{const l={...o};return Object.defineProperty(r,"shape",{value:l}),l}})}const i=Jn(()=>Ah(r));Ne(e._zod,"propValues",()=>{const o=r.shape,l={};for(const d in o){const p=o[d]._zod;if(p.values){l[d]??(l[d]=new Set);for(const v of p.values)l[d].add(v)}}return l});const t=Mr,a=r.catchall;let s;e._zod.parse=(o,l)=>{s??(s=i.value);const d=o.value;if(!t(d))return o.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),o;o.value={};const p=[],v=s.shape;for(const f of s.keys){const u=v[f],h=u._zod.optout==="optional",c=u._zod.run({value:d[f],issues:[]},l);c instanceof Promise?p.push(c.then(m=>Pn(m,o,f,d,h))):Pn(c,o,f,d,h)}return a?Ph(p,d,o,l,i.value,e):p.length?Promise.all(p).then(()=>o):o}}),S6=X("$ZodObjectJIT",(e,r)=>{x6.init(e,r);const n=e._zod.parse,i=Jn(()=>Ah(r)),t=f=>{var w;const u=new H3(["shape","payload","ctx"]),h=i.value,c=k=>{const $=Ru(k);return`shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`};u.write("const input = payload.value;");const m=Object.create(null);let b=0;for(const k of h.keys)m[k]=`key_${b++}`;u.write("const newResult = {};");for(const k of h.keys){const $=m[k],O=Ru(k),P=f[k],y=((w=P==null?void 0:P._zod)==null?void 0:w.optout)==="optional";u.write(`const ${$} = ${c(k)};`),y?u.write(`
|
|
11
|
-
if (${
|
|
12
|
-
if (${
|
|
13
|
-
payload.issues = payload.issues.concat(${
|
|
8
|
+
<script type="module" crossorigin>var Jl=Object.defineProperty;var Ql=(e,t,a)=>t in e?Jl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Ge=(e,t,a)=>Ql(e,typeof t!="symbol"?t+"":t,a);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function a(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=a(r);fetch(r.href,i)}})();function X(e,t,a){function n(u,f){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,f);const g=c.prototype,d=Object.keys(g);for(let p=0;p<d.length;p++){const l=d[p];l in u||(u[l]=g[l].bind(u))}}const r=(a==null?void 0:a.Parent)??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function c(u){var f;const g=a!=null&&a.Parent?new i:this;n(g,u),(f=g._zod).deferred??(f.deferred=[]);for(const d of g._zod.deferred)d();return g}return Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:u=>{var f,g;return a!=null&&a.Parent&&u instanceof a.Parent?!0:(g=(f=u==null?void 0:u._zod)==null?void 0:f.traits)==null?void 0:g.has(e)}}),Object.defineProperty(c,"name",{value:e}),c}class St extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class vc extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const mc={};function ut(e){return mc}function bc(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,r])=>t.indexOf(+n)===-1).map(([n,r])=>r)}function oa(e,t){return typeof t=="bigint"?t.toString():t}function ar(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function fa(e){return e==null}function da(e){const t=e.startsWith("^")?1:0,a=e.endsWith("$")?e.length-1:e.length;return e.slice(t,a)}function eu(e,t){const a=(e.toString().split(".")[1]||"").length,n=t.toString();let r=(n.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(n)){const f=n.match(/\d?e-(\d?)/);f!=null&&f[1]&&(r=Number.parseInt(f[1]))}const i=a>r?a:r,c=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return c%u/10**i}const ri=Symbol("evaluating");function ke(e,t,a){let n;Object.defineProperty(e,t,{get(){if(n!==ri)return n===void 0&&(n=ri,n=a()),n},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function wt(e,t,a){Object.defineProperty(e,t,{value:a,writable:!0,enumerable:!0,configurable:!0})}function ft(...e){const t={};for(const a of e){const n=Object.getOwnPropertyDescriptors(a);Object.assign(t,n)}return Object.defineProperties({},t)}function ni(e){return JSON.stringify(e)}function tu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const yc="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Rt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const ru=ar(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Tt(e){if(Rt(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const a=t.prototype;return!(Rt(a)===!1||Object.prototype.hasOwnProperty.call(a,"isPrototypeOf")===!1)}function wc(e){return Tt(e)?{...e}:Array.isArray(e)?[...e]:e}const nu=new Set(["string","number","symbol"]);function Et(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dt(e,t,a){const n=new e._zod.constr(t??e._zod.def);return(!t||a!=null&&a.parent)&&(n._zod.parent=e),n}function se(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function au(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const iu={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function su(e,t){const a=e._zod.def,n=a.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=ft(e._zod.def,{get shape(){const c={};for(const u in t){if(!(u in a.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(c[u]=a.shape[u])}return wt(this,"shape",c),c},checks:[]});return dt(e,i)}function ou(e,t){const a=e._zod.def,n=a.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=ft(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const u in t){if(!(u in a.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete c[u]}return wt(this,"shape",c),c},checks:[]});return dt(e,i)}function cu(e,t){if(!Tt(t))throw new Error("Invalid input to extend: expected a plain object");const a=e._zod.def.checks;if(a&&a.length>0){const i=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(i,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=ft(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return wt(this,"shape",i),i}});return dt(e,r)}function lu(e,t){if(!Tt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const a=ft(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return wt(this,"shape",n),n}});return dt(e,a)}function uu(e,t){const a=ft(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return wt(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return dt(e,a)}function hu(e,t,a){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=ft(t._zod.def,{get shape(){const u=t._zod.def.shape,f={...u};if(a)for(const g in a){if(!(g in u))throw new Error(`Unrecognized key: "${g}"`);a[g]&&(f[g]=e?new e({type:"optional",innerType:u[g]}):u[g])}else for(const g in u)f[g]=e?new e({type:"optional",innerType:u[g]}):u[g];return wt(this,"shape",f),f},checks:[]});return dt(t,c)}function fu(e,t,a){const n=ft(t._zod.def,{get shape(){const r=t._zod.def.shape,i={...r};if(a)for(const c in a){if(!(c in i))throw new Error(`Unrecognized key: "${c}"`);a[c]&&(i[c]=new e({type:"nonoptional",innerType:r[c]}))}else for(const c in r)i[c]=new e({type:"nonoptional",innerType:r[c]});return wt(this,"shape",i),i}});return dt(t,n)}function xt(e,t=0){var a;if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(((a=e.issues[n])==null?void 0:a.continue)!==!0)return!0;return!1}function Ct(e,t){return t.map(a=>{var n;return(n=a).path??(n.path=[]),a.path.unshift(e),a})}function Yt(e){return typeof e=="string"?e:e==null?void 0:e.message}function ht(e,t,a){var r,i,c,u,f,g;const n={...e,path:e.path??[]};if(!e.message){const d=Yt((c=(i=(r=e.inst)==null?void 0:r._zod.def)==null?void 0:i.error)==null?void 0:c.call(i,e))??Yt((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??Yt((f=a.customError)==null?void 0:f.call(a,e))??Yt((g=a.localeError)==null?void 0:g.call(a,e))??"Invalid input";n.message=d}return delete n.inst,delete n.continue,t!=null&&t.reportInput||delete n.input,n}function pa(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function qt(...e){const[t,a,n]=e;return typeof t=="string"?{message:t,code:"custom",input:a,inst:n}:{...t}}const _c=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,oa,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},kc=X("$ZodError",_c),xc=X("$ZodError",_c,{Parent:Error});function du(e,t=a=>a.message){const a={},n=[];for(const r of e.issues)r.path.length>0?(a[r.path[0]]=a[r.path[0]]||[],a[r.path[0]].push(t(r))):n.push(t(r));return{formErrors:n,fieldErrors:a}}function pu(e,t=a=>a.message){const a={_errors:[]},n=r=>{for(const i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(c=>n({issues:c}));else if(i.code==="invalid_key")n({issues:i.issues});else if(i.code==="invalid_element")n({issues:i.issues});else if(i.path.length===0)a._errors.push(t(i));else{let c=a,u=0;for(;u<i.path.length;){const f=i.path[u];u===i.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(t(i))):c[f]=c[f]||{_errors:[]},c=c[f],u++}}};return n(e),a}const ga=e=>(t,a,n,r)=>{const i=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:a,issues:[]},i);if(c instanceof Promise)throw new St;if(c.issues.length){const u=new((r==null?void 0:r.Err)??e)(c.issues.map(f=>ht(f,i,ut())));throw yc(u,r==null?void 0:r.callee),u}return c.value},va=e=>async(t,a,n,r)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let c=t._zod.run({value:a,issues:[]},i);if(c instanceof Promise&&(c=await c),c.issues.length){const u=new((r==null?void 0:r.Err)??e)(c.issues.map(f=>ht(f,i,ut())));throw yc(u,r==null?void 0:r.callee),u}return c.value},ir=e=>(t,a,n)=>{const r=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:a,issues:[]},r);if(i instanceof Promise)throw new St;return i.issues.length?{success:!1,error:new(e??kc)(i.issues.map(c=>ht(c,r,ut())))}:{success:!0,data:i.value}},Cc=ir(xc),sr=e=>async(t,a,n)=>{const r=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:a,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(c=>ht(c,r,ut())))}:{success:!0,data:i.value}},gu=sr(xc),vu=e=>(t,a,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ga(e)(t,a,r)},mu=e=>(t,a,n)=>ga(e)(t,a,n),bu=e=>async(t,a,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return va(e)(t,a,r)},yu=e=>async(t,a,n)=>va(e)(t,a,n),wu=e=>(t,a,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ir(e)(t,a,r)},_u=e=>(t,a,n)=>ir(e)(t,a,n),ku=e=>async(t,a,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return sr(e)(t,a,r)},xu=e=>async(t,a,n)=>sr(e)(t,a,n),Cu=/^[cC][^\s-]{8,}$/,Su=/^[0-9a-z]+$/,Tu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Eu=/^[0-9a-vA-V]{20}$/,Au=/^[A-Za-z0-9]{27}$/,Mu=/^[a-zA-Z0-9_-]{21}$/,Nu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pu=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ai=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,zu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Iu="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ru(){return new RegExp(Iu,"u")}const qu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Bu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Lu=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ou=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Du=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Sc=/^[A-Za-z0-9_-]*$/,Fu=/^\+[1-9]\d{6,14}$/,Tc="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Hu=new RegExp(`^${Tc}$`);function Ec(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $u(e){return new RegExp(`^${Ec(e)}$`)}function Zu(e){const t=Ec({precision:e.precision}),a=["Z"];e.local&&a.push(""),e.offset&&a.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${a.join("|")})`;return new RegExp(`^${Tc}T(?:${n})$`)}const Gu=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Uu=/^-?\d+$/,Ac=/^-?\d+(?:\.\d+)?$/,ju=/^(?:true|false)$/i,Yu=/^null$/i,Wu=/^undefined$/i,Vu=/^[^A-Z]*$/,Xu=/^[^a-z]*$/,We=X("$ZodCheck",(e,t)=>{var a;e._zod??(e._zod={}),e._zod.def=t,(a=e._zod).onattach??(a.onattach=[])}),Mc={number:"number",bigint:"bigint",object:"date"},Nc=X("$ZodCheckLessThan",(e,t)=>{We.init(e,t);const a=Mc[typeof t.value];e._zod.onattach.push(n=>{const r=n._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:a,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Pc=X("$ZodCheckGreaterThan",(e,t)=>{We.init(e,t);const a=Mc[typeof t.value];e._zod.onattach.push(n=>{const r=n._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:a,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ku=X("$ZodCheckMultipleOf",(e,t)=>{We.init(e,t),e._zod.onattach.push(a=>{var n;(n=a._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=a=>{if(typeof a.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof a.value=="bigint"?a.value%t.value===BigInt(0):eu(a.value,t.value)===0)||a.issues.push({origin:typeof a.value,code:"not_multiple_of",divisor:t.value,input:a.value,inst:e,continue:!t.abort})}}),Ju=X("$ZodCheckNumberFormat",(e,t)=>{var c;We.init(e,t),t.format=t.format||"float64";const a=(c=t.format)==null?void 0:c.includes("int"),n=a?"int":"number",[r,i]=iu[t.format];e._zod.onattach.push(u=>{const f=u._zod.bag;f.format=t.format,f.minimum=r,f.maximum=i,a&&(f.pattern=Uu)}),e._zod.check=u=>{const f=u.value;if(a){if(!Number.isInteger(f)){u.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?u.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):u.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}f<r&&u.issues.push({origin:"number",input:f,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),f>i&&u.issues.push({origin:"number",input:f,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Qu=X("$ZodCheckMaxLength",(e,t)=>{var a;We.init(e,t),(a=e._zod.def).when??(a.when=n=>{const r=n.value;return!fa(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const c=pa(r);n.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),eh=X("$ZodCheckMinLength",(e,t)=>{var a;We.init(e,t),(a=e._zod.def).when??(a.when=n=>{const r=n.value;return!fa(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const c=pa(r);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),th=X("$ZodCheckLengthEquals",(e,t)=>{var a;We.init(e,t),(a=e._zod.def).when??(a.when=n=>{const r=n.value;return!fa(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=n=>{const r=n.value,i=r.length;if(i===t.length)return;const c=pa(r),u=i>t.length;n.issues.push({origin:c,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),or=X("$ZodCheckStringFormat",(e,t)=>{var a,n;We.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(a=e._zod).check??(a.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),rh=X("$ZodCheckRegex",(e,t)=>{or.init(e,t),e._zod.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:"regex",input:a.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),nh=X("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Vu),or.init(e,t)}),ah=X("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xu),or.init(e,t)}),ih=X("$ZodCheckIncludes",(e,t)=>{We.init(e,t);const a=Et(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${a}`:a);t.pattern=n,e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),sh=X("$ZodCheckStartsWith",(e,t)=>{We.init(e,t);const a=new RegExp(`^${Et(t.prefix)}.*`);t.pattern??(t.pattern=a),e._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(a)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),oh=X("$ZodCheckEndsWith",(e,t)=>{We.init(e,t);const a=new RegExp(`.*${Et(t.suffix)}$`);t.pattern??(t.pattern=a),e._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(a)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),ch=X("$ZodCheckOverwrite",(e,t)=>{We.init(e,t),e._zod.check=a=>{a.value=t.tx(a.value)}});class lh{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
|
|
9
|
+
`).filter(c=>c),r=Math.min(...n.map(c=>c.length-c.trimStart().length)),i=n.map(c=>c.slice(r)).map(c=>" ".repeat(this.indent*2)+c);for(const c of i)this.content.push(c)}compile(){const t=Function,a=this==null?void 0:this.args,r=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new t(...a,r.join(`
|
|
10
|
+
`))}}const uh={major:4,minor:3,patch:5},Me=X("$ZodType",(e,t)=>{var r;var a;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=uh;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const i of n)for(const c of i._zod.onattach)c(e);if(n.length===0)(a=e._zod).deferred??(a.deferred=[]),(r=e._zod.deferred)==null||r.push(()=>{e._zod.run=e._zod.parse});else{const i=(u,f,g)=>{let d=xt(u),p;for(const l of f){if(l._zod.def.when){if(!l._zod.def.when(u))continue}else if(d)continue;const o=u.issues.length,h=l._zod.check(u);if(h instanceof Promise&&(g==null?void 0:g.async)===!1)throw new St;if(p||h instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await h,u.issues.length!==o&&(d||(d=xt(u,o)))});else{if(u.issues.length===o)continue;d||(d=xt(u,o))}}return p?p.then(()=>u):u},c=(u,f,g)=>{if(xt(u))return u.aborted=!0,u;const d=i(f,n,g);if(d instanceof Promise){if(g.async===!1)throw new St;return d.then(p=>e._zod.parse(p,g))}return e._zod.parse(d,g)};e._zod.run=(u,f)=>{if(f.skipChecks)return e._zod.parse(u,f);if(f.direction==="backward"){const d=e._zod.parse({value:u.value,issues:[]},{...f,skipChecks:!0});return d instanceof Promise?d.then(p=>c(p,u,f)):c(d,u,f)}const g=e._zod.parse(u,f);if(g instanceof Promise){if(f.async===!1)throw new St;return g.then(d=>i(d,n,f))}return i(g,n,f)}}ke(e,"~standard",()=>({validate:i=>{var c;try{const u=Cc(e,i);return u.success?{value:u.data}:{issues:(c=u.error)==null?void 0:c.issues}}catch{return gu(e,i).then(f=>{var g;return f.success?{value:f.data}:{issues:(g=f.error)==null?void 0:g.issues}})}},vendor:"zod",version:1}))}),ma=X("$ZodString",(e,t)=>{var a;Me.init(e,t),e._zod.pattern=[...((a=e==null?void 0:e._zod.bag)==null?void 0:a.patterns)??[]].pop()??Gu(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Pe=X("$ZodStringFormat",(e,t)=>{or.init(e,t),ma.init(e,t)}),hh=X("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Pu),Pe.init(e,t)}),fh=X("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ai(n))}else t.pattern??(t.pattern=ai());Pe.init(e,t)}),dh=X("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=zu),Pe.init(e,t)}),ph=X("$ZodURL",(e,t)=>{Pe.init(e,t),e._zod.check=a=>{try{const n=a.value.trim(),r=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:a.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:a.value,inst:e,continue:!t.abort})),t.normalize?a.value=r.href:a.value=n;return}catch{a.issues.push({code:"invalid_format",format:"url",input:a.value,inst:e,continue:!t.abort})}}}),gh=X("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ru()),Pe.init(e,t)}),vh=X("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Mu),Pe.init(e,t)}),mh=X("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Cu),Pe.init(e,t)}),bh=X("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Su),Pe.init(e,t)}),yh=X("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Tu),Pe.init(e,t)}),wh=X("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Eu),Pe.init(e,t)}),_h=X("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Au),Pe.init(e,t)}),kh=X("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Zu(t)),Pe.init(e,t)}),xh=X("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Hu),Pe.init(e,t)}),Ch=X("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=$u(t)),Pe.init(e,t)}),Sh=X("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Nu),Pe.init(e,t)}),Th=X("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=qu),Pe.init(e,t),e._zod.bag.format="ipv4"}),Eh=X("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Bu),Pe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=a=>{try{new URL(`http://[${a.value}]`)}catch{a.issues.push({code:"invalid_format",format:"ipv6",input:a.value,inst:e,continue:!t.abort})}}}),Ah=X("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Lu),Pe.init(e,t)}),Mh=X("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ou),Pe.init(e,t),e._zod.check=a=>{const n=a.value.split("/");try{if(n.length!==2)throw new Error;const[r,i]=n;if(!i)throw new Error;const c=Number(i);if(`${c}`!==i)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${r}]`)}catch{a.issues.push({code:"invalid_format",format:"cidrv6",input:a.value,inst:e,continue:!t.abort})}}});function zc(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Nh=X("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Du),Pe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=a=>{zc(a.value)||a.issues.push({code:"invalid_format",format:"base64",input:a.value,inst:e,continue:!t.abort})}});function Ph(e){if(!Sc.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),a=t.padEnd(Math.ceil(t.length/4)*4,"=");return zc(a)}const zh=X("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Sc),Pe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=a=>{Ph(a.value)||a.issues.push({code:"invalid_format",format:"base64url",input:a.value,inst:e,continue:!t.abort})}}),Ih=X("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Fu),Pe.init(e,t)});function Rh(e,t=null){try{const a=e.split(".");if(a.length!==3)return!1;const[n]=a;if(!n)return!1;const r=JSON.parse(atob(n));return!("typ"in r&&(r==null?void 0:r.typ)!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}const qh=X("$ZodJWT",(e,t)=>{Pe.init(e,t),e._zod.check=a=>{Rh(a.value,t.alg)||a.issues.push({code:"invalid_format",format:"jwt",input:a.value,inst:e,continue:!t.abort})}}),Ic=X("$ZodNumber",(e,t)=>{Me.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ac,e._zod.parse=(a,n)=>{if(t.coerce)try{a.value=Number(a.value)}catch{}const r=a.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return a;const i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return a.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),a}}),Bh=X("$ZodNumberFormat",(e,t)=>{Ju.init(e,t),Ic.init(e,t)}),Lh=X("$ZodBoolean",(e,t)=>{Me.init(e,t),e._zod.pattern=ju,e._zod.parse=(a,n)=>{if(t.coerce)try{a.value=!!a.value}catch{}const r=a.value;return typeof r=="boolean"||a.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),a}}),Oh=X("$ZodUndefined",(e,t)=>{Me.init(e,t),e._zod.pattern=Wu,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(a,n)=>{const r=a.value;return typeof r>"u"||a.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),a}}),Dh=X("$ZodNull",(e,t)=>{Me.init(e,t),e._zod.pattern=Yu,e._zod.values=new Set([null]),e._zod.parse=(a,n)=>{const r=a.value;return r===null||a.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),a}}),Fh=X("$ZodUnknown",(e,t)=>{Me.init(e,t),e._zod.parse=a=>a}),Hh=X("$ZodNever",(e,t)=>{Me.init(e,t),e._zod.parse=(a,n)=>(a.issues.push({expected:"never",code:"invalid_type",input:a.value,inst:e}),a)});function ii(e,t,a){e.issues.length&&t.issues.push(...Ct(a,e.issues)),t.value[a]=e.value}const $h=X("$ZodArray",(e,t)=>{Me.init(e,t),e._zod.parse=(a,n)=>{const r=a.value;if(!Array.isArray(r))return a.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),a;a.value=Array(r.length);const i=[];for(let c=0;c<r.length;c++){const u=r[c],f=t.element._zod.run({value:u,issues:[]},n);f instanceof Promise?i.push(f.then(g=>ii(g,a,c))):ii(f,a,c)}return i.length?Promise.all(i).then(()=>a):a}});function Qt(e,t,a,n,r){if(e.issues.length){if(r&&!(a in n))return;t.issues.push(...Ct(a,e.issues))}e.value===void 0?a in n&&(t.value[a]=void 0):t.value[a]=e.value}function Rc(e){var n,r,i,c;const t=Object.keys(e.shape);for(const u of t)if(!((c=(i=(r=(n=e.shape)==null?void 0:n[u])==null?void 0:r._zod)==null?void 0:i.traits)!=null&&c.has("$ZodType")))throw new Error(`Invalid element at key "${u}": expected a Zod schema`);const a=au(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function qc(e,t,a,n,r,i){const c=[],u=r.keySet,f=r.catchall._zod,g=f.def.type,d=f.optout==="optional";for(const p in t){if(u.has(p))continue;if(g==="never"){c.push(p);continue}const l=f.run({value:t[p],issues:[]},n);l instanceof Promise?e.push(l.then(o=>Qt(o,a,p,t,d))):Qt(l,a,p,t,d)}return c.length&&a.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:i}),e.length?Promise.all(e).then(()=>a):a}const Zh=X("$ZodObject",(e,t)=>{Me.init(e,t);const a=Object.getOwnPropertyDescriptor(t,"shape");if(!(a!=null&&a.get)){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...u};return Object.defineProperty(t,"shape",{value:f}),f}})}const n=ar(()=>Rc(t));ke(e._zod,"propValues",()=>{const u=t.shape,f={};for(const g in u){const d=u[g]._zod;if(d.values){f[g]??(f[g]=new Set);for(const p of d.values)f[g].add(p)}}return f});const r=Rt,i=t.catchall;let c;e._zod.parse=(u,f)=>{c??(c=n.value);const g=u.value;if(!r(g))return u.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),u;u.value={};const d=[],p=c.shape;for(const l of c.keys){const o=p[l],h=o._zod.optout==="optional",s=o._zod.run({value:g[l],issues:[]},f);s instanceof Promise?d.push(s.then(v=>Qt(v,u,l,g,h))):Qt(s,u,l,g,h)}return i?qc(d,g,u,f,n.value,e):d.length?Promise.all(d).then(()=>u):u}}),Gh=X("$ZodObjectJIT",(e,t)=>{Zh.init(e,t);const a=e._zod.parse,n=ar(()=>Rc(t)),r=l=>{var _;const o=new lh(["shape","payload","ctx"]),h=n.value,s=k=>{const x=ni(k);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};o.write("const input = payload.value;");const v=Object.create(null);let y=0;for(const k of h.keys)v[k]=`key_${y++}`;o.write("const newResult = {};");for(const k of h.keys){const x=v[k],R=ni(k),I=l[k],b=((_=I==null?void 0:I._zod)==null?void 0:_.optout)==="optional";o.write(`const ${x} = ${s(k)};`),b?o.write(`
|
|
11
|
+
if (${x}.issues.length) {
|
|
12
|
+
if (${R} in input) {
|
|
13
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
14
14
|
...iss,
|
|
15
|
-
path: iss.path ? [${
|
|
15
|
+
path: iss.path ? [${R}, ...iss.path] : [${R}]
|
|
16
16
|
})));
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
if (${
|
|
21
|
-
if (${
|
|
22
|
-
newResult[${
|
|
20
|
+
if (${x}.value === undefined) {
|
|
21
|
+
if (${R} in input) {
|
|
22
|
+
newResult[${R}] = undefined;
|
|
23
23
|
}
|
|
24
24
|
} else {
|
|
25
|
-
newResult[${
|
|
25
|
+
newResult[${R}] = ${x}.value;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
`):
|
|
29
|
-
if (${
|
|
30
|
-
payload.issues = payload.issues.concat(${
|
|
28
|
+
`):o.write(`
|
|
29
|
+
if (${x}.issues.length) {
|
|
30
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
31
31
|
...iss,
|
|
32
|
-
path: iss.path ? [${
|
|
32
|
+
path: iss.path ? [${R}, ...iss.path] : [${R}]
|
|
33
33
|
})));
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
if (${
|
|
37
|
-
if (${
|
|
38
|
-
newResult[${
|
|
36
|
+
if (${x}.value === undefined) {
|
|
37
|
+
if (${R} in input) {
|
|
38
|
+
newResult[${R}] = undefined;
|
|
39
39
|
}
|
|
40
40
|
} else {
|
|
41
|
-
newResult[${
|
|
41
|
+
newResult[${R}] = ${x}.value;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
`)}u.write("payload.value = newResult;"),u.write("return payload;");const g=u.compile();return(k,$)=>g(f,k,$)};let a;const s=Mr,o=!vh.jitless,d=o&&Ub.value,p=r.catchall;let v;e._zod.parse=(f,u)=>{v??(v=i.value);const h=f.value;return s(h)?o&&d&&(u==null?void 0:u.async)===!1&&u.jitless!==!0?(a||(a=t(r.shape)),f=a(f,u),p?Ph([],h,f,u,v,e):f):n(f,u):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function Zu(e,r,n,i){for(const a of e)if(a.issues.length===0)return r.value=a.value,r;const t=e.filter(a=>!hr(a));return t.length===1?(r.value=t[0].value,t[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(a=>a.issues.map(s=>Bt(s,i,jt())))}),r)}const Oh=X("$ZodUnion",(e,r)=>{Ze.init(e,r),Ne(e._zod,"optin",()=>r.options.some(t=>t._zod.optin==="optional")?"optional":void 0),Ne(e._zod,"optout",()=>r.options.some(t=>t._zod.optout==="optional")?"optional":void 0),Ne(e._zod,"values",()=>{if(r.options.every(t=>t._zod.values))return new Set(r.options.flatMap(t=>Array.from(t._zod.values)))}),Ne(e._zod,"pattern",()=>{if(r.options.every(t=>t._zod.pattern)){const t=r.options.map(a=>a._zod.pattern);return new RegExp(`^(${t.map(a=>Ko(a.source)).join("|")})$`)}});const n=r.options.length===1,i=r.options[0]._zod.run;e._zod.parse=(t,a)=>{if(n)return i(t,a);let s=!1;const o=[];for(const l of r.options){const d=l._zod.run({value:t.value,issues:[]},a);if(d instanceof Promise)o.push(d),s=!0;else{if(d.issues.length===0)return d;o.push(d)}}return s?Promise.all(o).then(l=>Zu(l,t,e,a)):Zu(o,t,e,a)}}),I6=X("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,Oh.init(e,r);const n=e._zod.parse;Ne(e._zod,"propValues",()=>{const t={};for(const a of r.options){const s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(a)}"`);for(const[o,l]of Object.entries(s)){t[o]||(t[o]=new Set);for(const d of l)t[o].add(d)}}return t});const i=Jn(()=>{var s;const t=r.options,a=new Map;for(const o of t){const l=(s=o._zod.propValues)==null?void 0:s[r.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(o)}"`);for(const d of l){if(a.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);a.set(d,o)}}return a});e._zod.parse=(t,a)=>{const s=t.value;if(!Mr(s))return t.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),t;const o=i.value.get(s==null?void 0:s[r.discriminator]);return o?o._zod.run(t,a):r.unionFallback?n(t,a):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:s,path:[r.discriminator],inst:e}),t)}}),T6=X("$ZodIntersection",(e,r)=>{Ze.init(e,r),e._zod.parse=(n,i)=>{const t=n.value,a=r.left._zod.run({value:t,issues:[]},i),s=r.right._zod.run({value:t,issues:[]},i);return a instanceof Promise||s instanceof Promise?Promise.all([a,s]).then(([l,d])=>ju(n,l,d)):ju(n,a,s)}});function Bo(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(mr(e)&&mr(r)){const n=Object.keys(r),i=Object.keys(e).filter(a=>n.indexOf(a)!==-1),t={...e,...r};for(const a of i){const s=Bo(e[a],r[a]);if(!s.valid)return{valid:!1,mergeErrorPath:[a,...s.mergeErrorPath]};t[a]=s.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const t=e[i],a=r[i],s=Bo(t,a);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ju(e,r,n){const i=new Map;let t;for(const o of r.issues)if(o.code==="unrecognized_keys"){t??(t=o);for(const l of o.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else e.issues.push(o);for(const o of n.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else e.issues.push(o);const a=[...i].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(a.length&&t&&e.issues.push({...t,keys:a}),hr(e))return e;const s=Bo(r.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const C6=X("$ZodRecord",(e,r)=>{Ze.init(e,r),e._zod.parse=(n,i)=>{const t=n.value;if(!mr(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;const a=[],s=r.keyType._zod.values;if(s){n.value={};const o=new Set;for(const d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){o.add(typeof d=="number"?d.toString():d);const p=r.valueType._zod.run({value:t[d],issues:[]},i);p instanceof Promise?a.push(p.then(v=>{v.issues.length&&n.issues.push(...pr(d,v.issues)),n.value[d]=v.value})):(p.issues.length&&n.issues.push(...pr(d,p.issues)),n.value[d]=p.value)}let l;for(const d in t)o.has(d)||(l=l??[],l.push(d));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:l})}else{n.value={};for(const o of Reflect.ownKeys(t)){if(o==="__proto__")continue;let l=r.keyType._zod.run({value:o,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof o=="string"&&Ih.test(o)&&l.issues.length&&l.issues.some(v=>v.code==="invalid_type"&&v.expected==="number")){const v=r.keyType._zod.run({value:Number(o),issues:[]},i);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(l=v)}if(l.issues.length){r.mode==="loose"?n.value[o]=t[o]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(v=>Bt(v,i,jt())),input:o,path:[o],inst:e});continue}const p=r.valueType._zod.run({value:t[o],issues:[]},i);p instanceof Promise?a.push(p.then(v=>{v.issues.length&&n.issues.push(...pr(o,v.issues)),n.value[l.value]=v.value})):(p.issues.length&&n.issues.push(...pr(o,p.issues)),n.value[l.value]=p.value)}}return a.length?Promise.all(a).then(()=>n):n}}),z6=X("$ZodEnum",(e,r)=>{Ze.init(e,r);const n=mh(r.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(t=>Zb.has(typeof t)).map(t=>typeof t=="string"?gr(t):t.toString()).join("|")})$`),e._zod.parse=(t,a)=>{const s=t.value;return i.has(s)||t.issues.push({code:"invalid_value",values:n,input:s,inst:e}),t}}),E6=X("$ZodLiteral",(e,r)=>{if(Ze.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(r.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.values.map(i=>typeof i=="string"?gr(i):i?gr(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,t)=>{const a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r.values,input:a,inst:e}),i}}),N6=X("$ZodTransform",(e,r)=>{Ze.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ph(e.constructor.name);const t=r.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(s=>(n.value=s,n));if(t instanceof Promise)throw new vr;return n.value=t,n}});function Bu(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}const Mh=X("$ZodOptional",(e,r)=>{Ze.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Ne(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Ne(e._zod,"pattern",()=>{const n=r.innerType._zod.pattern;return n?new RegExp(`^(${Ko(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(r.innerType._zod.optin==="optional"){const t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>Bu(a,n.value)):Bu(t,n.value)}return n.value===void 0?n:r.innerType._zod.run(n,i)}}),A6=X("$ZodExactOptional",(e,r)=>{Mh.init(e,r),Ne(e._zod,"values",()=>r.innerType._zod.values),Ne(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(n,i)=>r.innerType._zod.run(n,i)}),P6=X("$ZodNullable",(e,r)=>{Ze.init(e,r),Ne(e._zod,"optin",()=>r.innerType._zod.optin),Ne(e._zod,"optout",()=>r.innerType._zod.optout),Ne(e._zod,"pattern",()=>{const n=r.innerType._zod.pattern;return n?new RegExp(`^(${Ko(n.source)}|null)$`):void 0}),Ne(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:r.innerType._zod.run(n,i)}),O6=X("$ZodDefault",(e,r)=>{Ze.init(e,r),e._zod.optin="optional",Ne(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);if(n.value===void 0)return n.value=r.defaultValue,n;const t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>qu(a,r)):qu(t,r)}});function qu(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const M6=X("$ZodPrefault",(e,r)=>{Ze.init(e,r),e._zod.optin="optional",Ne(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,i))}),D6=X("$ZodNonOptional",(e,r)=>{Ze.init(e,r),Ne(e._zod,"values",()=>{const n=r.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>Fu(a,e)):Fu(t,e)}});function Fu(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}const R6=X("$ZodCatch",(e,r)=>{Ze.init(e,r),Ne(e._zod,"optin",()=>r.innerType._zod.optin),Ne(e._zod,"optout",()=>r.innerType._zod.optout),Ne(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);const t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>(n.value=a.value,a.issues.length&&(n.value=r.catchValue({...n,error:{issues:a.issues.map(s=>Bt(s,i,jt()))},input:n.value}),n.issues=[]),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue({...n,error:{issues:t.issues.map(a=>Bt(a,i,jt()))},input:n.value}),n.issues=[]),n)}}),L6=X("$ZodPipe",(e,r)=>{Ze.init(e,r),Ne(e._zod,"values",()=>r.in._zod.values),Ne(e._zod,"optin",()=>r.in._zod.optin),Ne(e._zod,"optout",()=>r.out._zod.optout),Ne(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const a=r.out._zod.run(n,i);return a instanceof Promise?a.then(s=>xn(s,r.in,i)):xn(a,r.in,i)}const t=r.in._zod.run(n,i);return t instanceof Promise?t.then(a=>xn(a,r.out,i)):xn(t,r.out,i)}});function xn(e,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},n)}const U6=X("$ZodReadonly",(e,r)=>{Ze.init(e,r),Ne(e._zod,"propValues",()=>r.innerType._zod.propValues),Ne(e._zod,"values",()=>r.innerType._zod.values),Ne(e._zod,"optin",()=>{var n,i;return(i=(n=r.innerType)==null?void 0:n._zod)==null?void 0:i.optin}),Ne(e._zod,"optout",()=>{var n,i;return(i=(n=r.innerType)==null?void 0:n._zod)==null?void 0:i.optout}),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);const t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(Hu):Hu(t)}});function Hu(e){return e.value=Object.freeze(e.value),e}const Z6=X("$ZodCustom",(e,r)=>{ht.init(e,r),Ze.init(e,r),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,t=r.fn(i);if(t instanceof Promise)return t.then(a=>Gu(a,n,i,e));Gu(t,n,i,e)}});function Gu(e,r,n,i){if(!e){const t={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(t.params=i._zod.def.params),r.issues.push(Dr(t))}}var Ju;class j6{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...n){const i=n[0];return this._map.set(r,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){const n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){const n=r._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const t={...i,...this._map.get(r)};return Object.keys(t).length?t:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function B6(){return new j6}(Ju=globalThis).__zod_globalRegistry??(Ju.__zod_globalRegistry=B6());const Pr=globalThis.__zod_globalRegistry;function q6(e,r){return new e({type:"string",...le(r)})}function F6(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...le(r)})}function Wu(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...le(r)})}function H6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...le(r)})}function G6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...le(r)})}function J6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...le(r)})}function W6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...le(r)})}function Y6(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...le(r)})}function V6(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...le(r)})}function X6(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...le(r)})}function K6(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...le(r)})}function Q6(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...le(r)})}function e4(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...le(r)})}function t4(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...le(r)})}function r4(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...le(r)})}function n4(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...le(r)})}function i4(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...le(r)})}function a4(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...le(r)})}function s4(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...le(r)})}function o4(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...le(r)})}function c4(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...le(r)})}function u4(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...le(r)})}function l4(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...le(r)})}function f4(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...le(r)})}function d4(e,r){return new e({type:"string",format:"date",check:"string_format",...le(r)})}function h4(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...le(r)})}function p4(e,r){return new e({type:"string",format:"duration",check:"string_format",...le(r)})}function v4(e,r){return new e({type:"number",checks:[],...le(r)})}function m4(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...le(r)})}function g4(e,r){return new e({type:"boolean",...le(r)})}function b4(e,r){return new e({type:"null",...le(r)})}function y4(e){return new e({type:"unknown"})}function _4(e,r){return new e({type:"never",...le(r)})}function Yu(e,r){return new Ch({check:"less_than",...le(r),value:e,inclusive:!1})}function Yi(e,r){return new Ch({check:"less_than",...le(r),value:e,inclusive:!0})}function Vu(e,r){return new zh({check:"greater_than",...le(r),value:e,inclusive:!1})}function Vi(e,r){return new zh({check:"greater_than",...le(r),value:e,inclusive:!0})}function Xu(e,r){return new P3({check:"multiple_of",...le(r),value:e})}function Dh(e,r){return new M3({check:"max_length",...le(r),maximum:e})}function On(e,r){return new D3({check:"min_length",...le(r),minimum:e})}function Rh(e,r){return new R3({check:"length_equals",...le(r),length:e})}function w4(e,r){return new L3({check:"string_format",format:"regex",...le(r),pattern:e})}function k4(e){return new U3({check:"string_format",format:"lowercase",...le(e)})}function $4(e){return new Z3({check:"string_format",format:"uppercase",...le(e)})}function x4(e,r){return new j3({check:"string_format",format:"includes",...le(r),includes:e})}function S4(e,r){return new B3({check:"string_format",format:"starts_with",...le(r),prefix:e})}function I4(e,r){return new q3({check:"string_format",format:"ends_with",...le(r),suffix:e})}function Ir(e){return new F3({check:"overwrite",tx:e})}function T4(e){return Ir(r=>r.normalize(e))}function C4(){return Ir(e=>e.trim())}function z4(){return Ir(e=>e.toLowerCase())}function E4(){return Ir(e=>e.toUpperCase())}function N4(){return Ir(e=>Lb(e))}function A4(e,r,n){return new e({type:"array",element:r,...le(n)})}function P4(e,r,n){const i=le(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:r,...i})}function O4(e,r,n){return new e({type:"custom",check:"custom",fn:r,...le(n)})}function M4(e){const r=D4(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Dr(i,n.value,r._zod.def));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=r),t.continue??(t.continue=!r._zod.def.abort),n.issues.push(Dr(t))}},e(n.value,n)));return r}function D4(e,r){const n=new ht({check:"custom",...le(r)});return n._zod.check=e,n}function Lh(e){let r=(e==null?void 0:e.target)??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Pr,target:r,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Xe(e,r,n={path:[],schemaPath:[]}){var p,v;var i;const t=e._zod.def,a=r.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};r.seen.set(e,s);const o=(v=(p=e._zod).toJSONSchema)==null?void 0:v.call(p);if(o)s.schema=o;else{const f={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,s.schema,f);else{const h=s.schema,c=r.processors[t.type];if(!c)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);c(e,r,h,f)}const u=e._zod.parent;u&&(s.ref||(s.ref=u),Xe(u,r,f),r.seen.get(u).isParent=!0)}const l=r.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),r.io==="input"&&ut(e)&&(delete s.schema.examples,delete s.schema.default),r.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,r.seen.get(e).schema}function Uh(e,r){var s,o,l,d;const n=e.seen.get(r);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const p of e.seen.entries()){const v=(s=e.metadataRegistry.get(p[0]))==null?void 0:s.id;if(v){const f=i.get(v);if(f&&f!==p[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(v,p[0])}}const t=p=>{var c;const v=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const m=(c=e.external.registry.get(p[0]))==null?void 0:c.id,b=e.external.uri??(w=>w);if(m)return{ref:b(m)};const g=p[1].defId??p[1].schema.id??`schema${e.counter++}`;return p[1].defId=g,{defId:g,ref:`${b("__shared")}#/${v}/${g}`}}if(p[1]===n)return{ref:"#"};const u=`#/${v}/`,h=p[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:u+h}},a=p=>{if(p[1].schema.$ref)return;const v=p[1],{ref:f,defId:u}=t(p);v.def={...v.schema},u&&(v.defId=u);const h=v.schema;for(const c in h)delete h[c];h.$ref=f};if(e.cycles==="throw")for(const p of e.seen.entries()){const v=p[1];if(v.cycle)throw new Error(`Cycle detected: #/${(o=v.cycle)==null?void 0:o.join("/")}/<root>
|
|
44
|
+
`)}o.write("payload.value = newResult;"),o.write("return payload;");const m=o.compile();return(k,x)=>m(l,k,x)};let i;const c=Rt,u=!mc.jitless,g=u&&ru.value,d=t.catchall;let p;e._zod.parse=(l,o)=>{p??(p=n.value);const h=l.value;return c(h)?u&&g&&(o==null?void 0:o.async)===!1&&o.jitless!==!0?(i||(i=r(t.shape)),l=i(l,o),d?qc([],h,l,o,p,e):l):a(l,o):(l.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),l)}});function si(e,t,a,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const r=e.filter(i=>!xt(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:a,errors:e.map(i=>i.issues.map(c=>ht(c,n,ut())))}),t)}const Bc=X("$ZodUnion",(e,t)=>{Me.init(e,t),ke(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ke(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ke(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ke(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>da(i.source)).join("|")})$`)}});const a=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(a)return n(r,i);let c=!1;const u=[];for(const f of t.options){const g=f._zod.run({value:r.value,issues:[]},i);if(g instanceof Promise)u.push(g),c=!0;else{if(g.issues.length===0)return g;u.push(g)}}return c?Promise.all(u).then(f=>si(f,r,e,i)):si(u,r,e,i)}}),Uh=X("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Bc.init(e,t);const a=e._zod.parse;ke(e._zod,"propValues",()=>{const r={};for(const i of t.options){const c=i._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,f]of Object.entries(c)){r[u]||(r[u]=new Set);for(const g of f)r[u].add(g)}}return r});const n=ar(()=>{var c;const r=t.options,i=new Map;for(const u of r){const f=(c=u._zod.propValues)==null?void 0:c[t.discriminator];if(!f||f.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(const g of f){if(i.has(g))throw new Error(`Duplicate discriminator value "${String(g)}"`);i.set(g,u)}}return i});e._zod.parse=(r,i)=>{const c=r.value;if(!Rt(c))return r.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),r;const u=n.value.get(c==null?void 0:c[t.discriminator]);return u?u._zod.run(r,i):t.unionFallback?a(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),r)}}),jh=X("$ZodIntersection",(e,t)=>{Me.init(e,t),e._zod.parse=(a,n)=>{const r=a.value,i=t.left._zod.run({value:r,issues:[]},n),c=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||c instanceof Promise?Promise.all([i,c]).then(([f,g])=>oi(a,f,g)):oi(a,i,c)}});function ca(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Tt(e)&&Tt(t)){const a=Object.keys(t),n=Object.keys(e).filter(i=>a.indexOf(i)!==-1),r={...e,...t};for(const i of n){const c=ca(e[i],t[i]);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};r[i]=c.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const a=[];for(let n=0;n<e.length;n++){const r=e[n],i=t[n],c=ca(r,i);if(!c.valid)return{valid:!1,mergeErrorPath:[n,...c.mergeErrorPath]};a.push(c.data)}return{valid:!0,data:a}}return{valid:!1,mergeErrorPath:[]}}function oi(e,t,a){const n=new Map;let r;for(const u of t.issues)if(u.code==="unrecognized_keys"){r??(r=u);for(const f of u.keys)n.has(f)||n.set(f,{}),n.get(f).l=!0}else e.issues.push(u);for(const u of a.issues)if(u.code==="unrecognized_keys")for(const f of u.keys)n.has(f)||n.set(f,{}),n.get(f).r=!0;else e.issues.push(u);const i=[...n].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&r&&e.issues.push({...r,keys:i}),xt(e))return e;const c=ca(t.value,a.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const Yh=X("$ZodRecord",(e,t)=>{Me.init(e,t),e._zod.parse=(a,n)=>{const r=a.value;if(!Tt(r))return a.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),a;const i=[],c=t.keyType._zod.values;if(c){a.value={};const u=new Set;for(const g of c)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){u.add(typeof g=="number"?g.toString():g);const d=t.valueType._zod.run({value:r[g],issues:[]},n);d instanceof Promise?i.push(d.then(p=>{p.issues.length&&a.issues.push(...Ct(g,p.issues)),a.value[g]=p.value})):(d.issues.length&&a.issues.push(...Ct(g,d.issues)),a.value[g]=d.value)}let f;for(const g in r)u.has(g)||(f=f??[],f.push(g));f&&f.length>0&&a.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:f})}else{a.value={};for(const u of Reflect.ownKeys(r)){if(u==="__proto__")continue;let f=t.keyType._zod.run({value:u,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Ac.test(u)&&f.issues.length&&f.issues.some(p=>p.code==="invalid_type"&&p.expected==="number")){const p=t.keyType._zod.run({value:Number(u),issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(f=p)}if(f.issues.length){t.mode==="loose"?a.value[u]=r[u]:a.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(p=>ht(p,n,ut())),input:u,path:[u],inst:e});continue}const d=t.valueType._zod.run({value:r[u],issues:[]},n);d instanceof Promise?i.push(d.then(p=>{p.issues.length&&a.issues.push(...Ct(u,p.issues)),a.value[f.value]=p.value})):(d.issues.length&&a.issues.push(...Ct(u,d.issues)),a.value[f.value]=d.value)}}return i.length?Promise.all(i).then(()=>a):a}}),Wh=X("$ZodEnum",(e,t)=>{Me.init(e,t);const a=bc(t.entries),n=new Set(a);e._zod.values=n,e._zod.pattern=new RegExp(`^(${a.filter(r=>nu.has(typeof r)).map(r=>typeof r=="string"?Et(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{const c=r.value;return n.has(c)||r.issues.push({code:"invalid_value",values:a,input:c,inst:e}),r}}),Vh=X("$ZodLiteral",(e,t)=>{if(Me.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const a=new Set(t.values);e._zod.values=a,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Et(n):n?Et(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,r)=>{const i=n.value;return a.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),Xh=X("$ZodTransform",(e,t)=>{Me.init(e,t),e._zod.parse=(a,n)=>{if(n.direction==="backward")throw new vc(e.constructor.name);const r=t.transform(a.value,a);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then(c=>(a.value=c,a));if(r instanceof Promise)throw new St;return a.value=r,a}});function ci(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Lc=X("$ZodOptional",(e,t)=>{Me.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ke(e._zod,"pattern",()=>{const a=t.innerType._zod.pattern;return a?new RegExp(`^(${da(a.source)})?$`):void 0}),e._zod.parse=(a,n)=>{if(t.innerType._zod.optin==="optional"){const r=t.innerType._zod.run(a,n);return r instanceof Promise?r.then(i=>ci(i,a.value)):ci(r,a.value)}return a.value===void 0?a:t.innerType._zod.run(a,n)}}),Kh=X("$ZodExactOptional",(e,t)=>{Lc.init(e,t),ke(e._zod,"values",()=>t.innerType._zod.values),ke(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(a,n)=>t.innerType._zod.run(a,n)}),Jh=X("$ZodNullable",(e,t)=>{Me.init(e,t),ke(e._zod,"optin",()=>t.innerType._zod.optin),ke(e._zod,"optout",()=>t.innerType._zod.optout),ke(e._zod,"pattern",()=>{const a=t.innerType._zod.pattern;return a?new RegExp(`^(${da(a.source)}|null)$`):void 0}),ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(a,n)=>a.value===null?a:t.innerType._zod.run(a,n)}),Qh=X("$ZodDefault",(e,t)=>{Me.init(e,t),e._zod.optin="optional",ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(a,n)=>{if(n.direction==="backward")return t.innerType._zod.run(a,n);if(a.value===void 0)return a.value=t.defaultValue,a;const r=t.innerType._zod.run(a,n);return r instanceof Promise?r.then(i=>li(i,t)):li(r,t)}});function li(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ef=X("$ZodPrefault",(e,t)=>{Me.init(e,t),e._zod.optin="optional",ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(a,n)=>(n.direction==="backward"||a.value===void 0&&(a.value=t.defaultValue),t.innerType._zod.run(a,n))}),tf=X("$ZodNonOptional",(e,t)=>{Me.init(e,t),ke(e._zod,"values",()=>{const a=t.innerType._zod.values;return a?new Set([...a].filter(n=>n!==void 0)):void 0}),e._zod.parse=(a,n)=>{const r=t.innerType._zod.run(a,n);return r instanceof Promise?r.then(i=>ui(i,e)):ui(r,e)}});function ui(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const rf=X("$ZodCatch",(e,t)=>{Me.init(e,t),ke(e._zod,"optin",()=>t.innerType._zod.optin),ke(e._zod,"optout",()=>t.innerType._zod.optout),ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(a,n)=>{if(n.direction==="backward")return t.innerType._zod.run(a,n);const r=t.innerType._zod.run(a,n);return r instanceof Promise?r.then(i=>(a.value=i.value,i.issues.length&&(a.value=t.catchValue({...a,error:{issues:i.issues.map(c=>ht(c,n,ut()))},input:a.value}),a.issues=[]),a)):(a.value=r.value,r.issues.length&&(a.value=t.catchValue({...a,error:{issues:r.issues.map(i=>ht(i,n,ut()))},input:a.value}),a.issues=[]),a)}}),nf=X("$ZodPipe",(e,t)=>{Me.init(e,t),ke(e._zod,"values",()=>t.in._zod.values),ke(e._zod,"optin",()=>t.in._zod.optin),ke(e._zod,"optout",()=>t.out._zod.optout),ke(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(a,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(a,n);return i instanceof Promise?i.then(c=>Wt(c,t.in,n)):Wt(i,t.in,n)}const r=t.in._zod.run(a,n);return r instanceof Promise?r.then(i=>Wt(i,t.out,n)):Wt(r,t.out,n)}});function Wt(e,t,a){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},a)}const af=X("$ZodReadonly",(e,t)=>{Me.init(e,t),ke(e._zod,"propValues",()=>t.innerType._zod.propValues),ke(e._zod,"values",()=>t.innerType._zod.values),ke(e._zod,"optin",()=>{var a,n;return(n=(a=t.innerType)==null?void 0:a._zod)==null?void 0:n.optin}),ke(e._zod,"optout",()=>{var a,n;return(n=(a=t.innerType)==null?void 0:a._zod)==null?void 0:n.optout}),e._zod.parse=(a,n)=>{if(n.direction==="backward")return t.innerType._zod.run(a,n);const r=t.innerType._zod.run(a,n);return r instanceof Promise?r.then(hi):hi(r)}});function hi(e){return e.value=Object.freeze(e.value),e}const sf=X("$ZodCustom",(e,t)=>{We.init(e,t),Me.init(e,t),e._zod.parse=(a,n)=>a,e._zod.check=a=>{const n=a.value,r=t.fn(n);if(r instanceof Promise)return r.then(i=>fi(i,a,n,e));fi(r,a,n,e)}});function fi(e,t,a,n){if(!e){const r={code:"custom",input:a,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(r.params=n._zod.def.params),t.issues.push(qt(r))}}var di;class of{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...a){const n=a[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const a=this._map.get(t);return a&&typeof a=="object"&&"id"in a&&this._idmap.delete(a.id),this._map.delete(t),this}get(t){const a=t._zod.parent;if(a){const n={...this.get(a)??{}};delete n.id;const r={...n,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function cf(){return new of}(di=globalThis).__zod_globalRegistry??(di.__zod_globalRegistry=cf());const It=globalThis.__zod_globalRegistry;function lf(e,t){return new e({type:"string",...se(t)})}function uf(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...se(t)})}function pi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...se(t)})}function hf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...se(t)})}function ff(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...se(t)})}function df(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...se(t)})}function pf(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...se(t)})}function gf(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...se(t)})}function vf(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...se(t)})}function mf(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...se(t)})}function bf(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...se(t)})}function yf(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...se(t)})}function wf(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...se(t)})}function _f(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...se(t)})}function kf(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...se(t)})}function xf(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...se(t)})}function Cf(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...se(t)})}function Sf(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...se(t)})}function Tf(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...se(t)})}function Ef(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...se(t)})}function Af(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...se(t)})}function Mf(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...se(t)})}function Nf(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...se(t)})}function Pf(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...se(t)})}function zf(e,t){return new e({type:"string",format:"date",check:"string_format",...se(t)})}function If(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...se(t)})}function Rf(e,t){return new e({type:"string",format:"duration",check:"string_format",...se(t)})}function qf(e,t){return new e({type:"number",checks:[],...se(t)})}function Bf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...se(t)})}function Lf(e,t){return new e({type:"boolean",...se(t)})}function Of(e,t){return new e({type:"undefined",...se(t)})}function Df(e,t){return new e({type:"null",...se(t)})}function Ff(e){return new e({type:"unknown"})}function Hf(e,t){return new e({type:"never",...se(t)})}function gi(e,t){return new Nc({check:"less_than",...se(t),value:e,inclusive:!1})}function gr(e,t){return new Nc({check:"less_than",...se(t),value:e,inclusive:!0})}function vi(e,t){return new Pc({check:"greater_than",...se(t),value:e,inclusive:!1})}function vr(e,t){return new Pc({check:"greater_than",...se(t),value:e,inclusive:!0})}function mi(e,t){return new Ku({check:"multiple_of",...se(t),value:e})}function Oc(e,t){return new Qu({check:"max_length",...se(t),maximum:e})}function er(e,t){return new eh({check:"min_length",...se(t),minimum:e})}function Dc(e,t){return new th({check:"length_equals",...se(t),length:e})}function $f(e,t){return new rh({check:"string_format",format:"regex",...se(t),pattern:e})}function Zf(e){return new nh({check:"string_format",format:"lowercase",...se(e)})}function Gf(e){return new ah({check:"string_format",format:"uppercase",...se(e)})}function Uf(e,t){return new ih({check:"string_format",format:"includes",...se(t),includes:e})}function jf(e,t){return new sh({check:"string_format",format:"starts_with",...se(t),prefix:e})}function Yf(e,t){return new oh({check:"string_format",format:"ends_with",...se(t),suffix:e})}function Mt(e){return new ch({check:"overwrite",tx:e})}function Wf(e){return Mt(t=>t.normalize(e))}function Vf(){return Mt(e=>e.trim())}function Xf(){return Mt(e=>e.toLowerCase())}function Kf(){return Mt(e=>e.toUpperCase())}function Jf(){return Mt(e=>tu(e))}function Qf(e,t,a){return new e({type:"array",element:t,...se(a)})}function e1(e,t,a){const n=se(a);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function t1(e,t,a){return new e({type:"custom",check:"custom",fn:t,...se(a)})}function r1(e){const t=n1(a=>(a.addIssue=n=>{if(typeof n=="string")a.issues.push(qt(n,a.value,t._zod.def));else{const r=n;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=a.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),a.issues.push(qt(r))}},e(a.value,a)));return t}function n1(e,t){const a=new We({check:"custom",...se(t)});return a._zod.check=e,a}function Fc(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??It,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Le(e,t,a={path:[],schemaPath:[]}){var d,p;var n;const r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,a.schemaPath.includes(e)&&(i.cycle=a.path),i.schema;const c={schema:{},count:1,cycle:void 0,path:a.path};t.seen.set(e,c);const u=(p=(d=e._zod).toJSONSchema)==null?void 0:p.call(d);if(u)c.schema=u;else{const l={...a,schemaPath:[...a.schemaPath,e],path:a.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,l);else{const h=c.schema,s=t.processors[r.type];if(!s)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);s(e,t,h,l)}const o=e._zod.parent;o&&(c.ref||(c.ref=o),Le(o,t,l),t.seen.get(o).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(c.schema,f),t.io==="input"&&je(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((n=c.schema).default??(n.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function Hc(e,t){var c,u,f,g;const a=e.seen.get(t);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const d of e.seen.entries()){const p=(c=e.metadataRegistry.get(d[0]))==null?void 0:c.id;if(p){const l=n.get(p);if(l&&l!==d[0])throw new Error(`Duplicate schema id "${p}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(p,d[0])}}const r=d=>{var s;const p=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=(s=e.external.registry.get(d[0]))==null?void 0:s.id,y=e.external.uri??(_=>_);if(v)return{ref:y(v)};const m=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=m,{defId:m,ref:`${y("__shared")}#/${p}/${m}`}}if(d[1]===a)return{ref:"#"};const o=`#/${p}/`,h=d[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:o+h}},i=d=>{if(d[1].schema.$ref)return;const p=d[1],{ref:l,defId:o}=r(d);p.def={...p.schema},o&&(p.defId=o);const h=p.schema;for(const s in h)delete h[s];h.$ref=l};if(e.cycles==="throw")for(const d of e.seen.entries()){const p=d[1];if(p.cycle)throw new Error(`Cycle detected: #/${(u=p.cycle)==null?void 0:u.join("/")}/<root>
|
|
45
45
|
|
|
46
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const p of e.seen.entries()){const v=p[1];if(r===p[0]){a(p);continue}if(e.external){const u=(l=e.external.registry.get(p[0]))==null?void 0:l.id;if(r!==p[0]&&u){a(p);continue}}if((d=e.metadataRegistry.get(p[0]))==null?void 0:d.id){a(p);continue}if(v.cycle){a(p);continue}if(v.count>1&&e.reused==="ref"){a(p);continue}}}function Zh(e,r){var s,o,l;const n=e.seen.get(r);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=d=>{const p=e.seen.get(d);if(p.ref===null)return;const v=p.def??p.schema,f={...v},u=p.ref;if(p.ref=null,u){i(u);const c=e.seen.get(u),m=c.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(m)):Object.assign(v,m),Object.assign(v,f),d._zod.parent===u)for(const g in v)g==="$ref"||g==="allOf"||g in f||delete v[g];if(m.$ref)for(const g in v)g==="$ref"||g==="allOf"||g in c.def&&JSON.stringify(v[g])===JSON.stringify(c.def[g])&&delete v[g]}const h=d._zod.parent;if(h&&h!==u){i(h);const c=e.seen.get(h);if(c!=null&&c.schema.$ref&&(v.$ref=c.schema.$ref,c.def))for(const m in v)m==="$ref"||m==="allOf"||m in c.def&&JSON.stringify(v[m])===JSON.stringify(c.def[m])&&delete v[m]}e.override({zodSchema:d,jsonSchema:v,path:p.path??[]})};for(const d of[...e.seen.entries()].reverse())i(d[0]);const t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,(s=e.external)!=null&&s.uri){const d=(o=e.external.registry.get(r))==null?void 0:o.id;if(!d)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(d)}Object.assign(t,n.def??n.schema);const a=((l=e.external)==null?void 0:l.defs)??{};for(const d of e.seen.entries()){const p=d[1];p.def&&p.defId&&(a[p.defId]=p.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?t.$defs=a:t.definitions=a);try{const d=JSON.parse(JSON.stringify(t));return Object.defineProperty(d,"~standard",{value:{...r["~standard"],jsonSchema:{input:Mn(r,"input",e.processors),output:Mn(r,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function ut(e,r){const n=r??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return ut(i.element,n);if(i.type==="set")return ut(i.valueType,n);if(i.type==="lazy")return ut(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return ut(i.innerType,n);if(i.type==="intersection")return ut(i.left,n)||ut(i.right,n);if(i.type==="record"||i.type==="map")return ut(i.keyType,n)||ut(i.valueType,n);if(i.type==="pipe")return ut(i.in,n)||ut(i.out,n);if(i.type==="object"){for(const t in i.shape)if(ut(i.shape[t],n))return!0;return!1}if(i.type==="union"){for(const t of i.options)if(ut(t,n))return!0;return!1}if(i.type==="tuple"){for(const t of i.items)if(ut(t,n))return!0;return!!(i.rest&&ut(i.rest,n))}return!1}const R4=(e,r={})=>n=>{const i=Lh({...n,processors:r});return Xe(e,i),Uh(i,e),Zh(i,e)},Mn=(e,r,n={})=>i=>{const{libraryOptions:t,target:a}=i??{},s=Lh({...t??{},target:a,io:r,processors:n});return Xe(e,s),Uh(s,e),Zh(s,e)},L4={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},U4=(e,r,n,i)=>{const t=n;t.type="string";const{minimum:a,maximum:s,format:o,patterns:l,contentEncoding:d}=e._zod.bag;if(typeof a=="number"&&(t.minLength=a),typeof s=="number"&&(t.maxLength=s),o&&(t.format=L4[o]??o,t.format===""&&delete t.format,o==="time"&&delete t.format),d&&(t.contentEncoding=d),l&&l.size>0){const p=[...l];p.length===1?t.pattern=p[0].source:p.length>1&&(t.allOf=[...p.map(v=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},Z4=(e,r,n,i)=>{const t=n,{minimum:a,maximum:s,format:o,multipleOf:l,exclusiveMaximum:d,exclusiveMinimum:p}=e._zod.bag;typeof o=="string"&&o.includes("int")?t.type="integer":t.type="number",typeof p=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(t.minimum=p,t.exclusiveMinimum=!0):t.exclusiveMinimum=p),typeof a=="number"&&(t.minimum=a,typeof p=="number"&&r.target!=="draft-04"&&(p>=a?delete t.minimum:delete t.exclusiveMinimum)),typeof d=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(t.maximum=d,t.exclusiveMaximum=!0):t.exclusiveMaximum=d),typeof s=="number"&&(t.maximum=s,typeof d=="number"&&r.target!=="draft-04"&&(d<=s?delete t.maximum:delete t.exclusiveMaximum)),typeof l=="number"&&(t.multipleOf=l)},j4=(e,r,n,i)=>{n.type="boolean"},B4=(e,r,n,i)=>{r.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},q4=(e,r,n,i)=>{n.not={}},F4=(e,r,n,i)=>{},H4=(e,r,n,i)=>{const t=e._zod.def,a=mh(t.entries);a.every(s=>typeof s=="number")&&(n.type="number"),a.every(s=>typeof s=="string")&&(n.type="string"),n.enum=a},G4=(e,r,n,i)=>{const t=e._zod.def,a=[];for(const s of t.values)if(s===void 0){if(r.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(r.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(s))}else a.push(s);if(a.length!==0)if(a.length===1){const s=a[0];n.type=s===null?"null":typeof s,r.target==="draft-04"||r.target==="openapi-3.0"?n.enum=[s]:n.const=s}else a.every(s=>typeof s=="number")&&(n.type="number"),a.every(s=>typeof s=="string")&&(n.type="string"),a.every(s=>typeof s=="boolean")&&(n.type="boolean"),a.every(s=>s===null)&&(n.type="null"),n.enum=a},J4=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},W4=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Y4=(e,r,n,i)=>{const t=n,a=e._zod.def,{minimum:s,maximum:o}=e._zod.bag;typeof s=="number"&&(t.minItems=s),typeof o=="number"&&(t.maxItems=o),t.type="array",t.items=Xe(a.element,r,{...i,path:[...i.path,"items"]})},V4=(e,r,n,i)=>{var d;const t=n,a=e._zod.def;t.type="object",t.properties={};const s=a.shape;for(const p in s)t.properties[p]=Xe(s[p],r,{...i,path:[...i.path,"properties",p]});const o=new Set(Object.keys(s)),l=new Set([...o].filter(p=>{const v=a.shape[p]._zod;return r.io==="input"?v.optin===void 0:v.optout===void 0}));l.size>0&&(t.required=Array.from(l)),((d=a.catchall)==null?void 0:d._zod.def.type)==="never"?t.additionalProperties=!1:a.catchall?a.catchall&&(t.additionalProperties=Xe(a.catchall,r,{...i,path:[...i.path,"additionalProperties"]})):r.io==="output"&&(t.additionalProperties=!1)},X4=(e,r,n,i)=>{const t=e._zod.def,a=t.inclusive===!1,s=t.options.map((o,l)=>Xe(o,r,{...i,path:[...i.path,a?"oneOf":"anyOf",l]}));a?n.oneOf=s:n.anyOf=s},K4=(e,r,n,i)=>{const t=e._zod.def,a=Xe(t.left,r,{...i,path:[...i.path,"allOf",0]}),s=Xe(t.right,r,{...i,path:[...i.path,"allOf",1]}),o=d=>"allOf"in d&&Object.keys(d).length===1,l=[...o(a)?a.allOf:[a],...o(s)?s.allOf:[s]];n.allOf=l},Q4=(e,r,n,i)=>{const t=n,a=e._zod.def;t.type="object";const s=a.keyType,o=s._zod.bag,l=o==null?void 0:o.patterns;if(a.mode==="loose"&&l&&l.size>0){const p=Xe(a.valueType,r,{...i,path:[...i.path,"patternProperties","*"]});t.patternProperties={};for(const v of l)t.patternProperties[v.source]=p}else(r.target==="draft-07"||r.target==="draft-2020-12")&&(t.propertyNames=Xe(a.keyType,r,{...i,path:[...i.path,"propertyNames"]})),t.additionalProperties=Xe(a.valueType,r,{...i,path:[...i.path,"additionalProperties"]});const d=s._zod.values;if(d){const p=[...d].filter(v=>typeof v=="string"||typeof v=="number");p.length>0&&(t.required=p)}},ey=(e,r,n,i)=>{const t=e._zod.def,a=Xe(t.innerType,r,i),s=r.seen.get(e);r.target==="openapi-3.0"?(s.ref=t.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},ty=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType},ry=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},ny=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType,r.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},iy=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType;let s;try{s=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},ay=(e,r,n,i)=>{const t=e._zod.def,a=r.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;Xe(a,r,i);const s=r.seen.get(e);s.ref=a},sy=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType,n.readOnly=!0},jh=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType};function n0(e){return!!e._zod}function Bh(e,r){return n0(e)?kh(e,r):e.safeParse(r)}function oy(e){var n,i;if(!e)return;let r;if(n0(e)?r=(i=(n=e._zod)==null?void 0:n.def)==null?void 0:i.shape:r=e.shape,!!r){if(typeof r=="function")try{return r()}catch{return}return r}}function cy(e){var t;if(n0(e)){const s=(t=e._zod)==null?void 0:t.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}const n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}const i=e.value;if(i!==void 0)return i}const uy=X("ZodISODateTime",(e,r)=>{i6.init(e,r),Je.init(e,r)});function qh(e){return f4(uy,e)}const ly=X("ZodISODate",(e,r)=>{a6.init(e,r),Je.init(e,r)});function fy(e){return d4(ly,e)}const dy=X("ZodISOTime",(e,r)=>{s6.init(e,r),Je.init(e,r)});function hy(e){return h4(dy,e)}const py=X("ZodISODuration",(e,r)=>{o6.init(e,r),Je.init(e,r)});function vy(e){return p4(py,e)}const my=(e,r)=>{_h.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Xb(e,n)},flatten:{value:n=>Vb(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,jo,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,jo,2)}},isEmpty:{get(){return e.issues.length===0}}})},$t=X("ZodError",my,{Parent:Error}),gy=e0($t),by=t0($t),yy=Wn($t),_y=Yn($t),wy=Qb($t),ky=e3($t),$y=t3($t),xy=r3($t),Sy=n3($t),Iy=i3($t),Ty=a3($t),Cy=s3($t),Be=X("ZodType",(e,r)=>(Ze.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:Mn(e,"input"),output:Mn(e,"output")}}),e.toJSONSchema=R4(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...n)=>e.clone(Gt(r,{checks:[...r.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Jt(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>gy(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>yy(e,n,i),e.parseAsync=async(n,i)=>by(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>_y(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>wy(e,n,i),e.decode=(n,i)=>ky(e,n,i),e.encodeAsync=async(n,i)=>$y(e,n,i),e.decodeAsync=async(n,i)=>xy(e,n,i),e.safeEncode=(n,i)=>Sy(e,n,i),e.safeDecode=(n,i)=>Iy(e,n,i),e.safeEncodeAsync=async(n,i)=>Ty(e,n,i),e.safeDecodeAsync=async(n,i)=>Cy(e,n,i),e.refine=(n,i)=>e.check(y5(n,i)),e.superRefine=n=>e.check(_5(n)),e.overwrite=n=>e.check(Ir(n)),e.optional=()=>Ve(e),e.exactOptional=()=>s5(e),e.nullable=()=>el(e),e.nullish=()=>Ve(el(e)),e.nonoptional=n=>d5(e,n),e.array=()=>ze(e),e.or=n=>Ue([e,n]),e.and=n=>i0(e,n),e.transform=n=>Fo(e,Vh(n)),e.default=n=>u5(e,n),e.prefault=n=>f5(e,n),e.catch=n=>p5(e,n),e.pipe=n=>Fo(e,n),e.readonly=()=>g5(e),e.describe=n=>{const i=e.clone();return Pr.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){var n;return(n=Pr.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Pr.get(e);const i=e.clone();return Pr.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Fh=X("_ZodString",(e,r)=>{r0.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(i,t,a)=>U4(e,i,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(w4(...i)),e.includes=(...i)=>e.check(x4(...i)),e.startsWith=(...i)=>e.check(S4(...i)),e.endsWith=(...i)=>e.check(I4(...i)),e.min=(...i)=>e.check(On(...i)),e.max=(...i)=>e.check(Dh(...i)),e.length=(...i)=>e.check(Rh(...i)),e.nonempty=(...i)=>e.check(On(1,...i)),e.lowercase=i=>e.check(k4(i)),e.uppercase=i=>e.check($4(i)),e.trim=()=>e.check(C4()),e.normalize=(...i)=>e.check(T4(...i)),e.toLowerCase=()=>e.check(z4()),e.toUpperCase=()=>e.check(E4()),e.slugify=()=>e.check(N4())}),zy=X("ZodString",(e,r)=>{r0.init(e,r),Fh.init(e,r),e.email=n=>e.check(F6(Ey,n)),e.url=n=>e.check(Y6(Ny,n)),e.jwt=n=>e.check(l4(Gy,n)),e.emoji=n=>e.check(V6(Ay,n)),e.guid=n=>e.check(Wu(Ku,n)),e.uuid=n=>e.check(H6(Sn,n)),e.uuidv4=n=>e.check(G6(Sn,n)),e.uuidv6=n=>e.check(J6(Sn,n)),e.uuidv7=n=>e.check(W6(Sn,n)),e.nanoid=n=>e.check(X6(Py,n)),e.guid=n=>e.check(Wu(Ku,n)),e.cuid=n=>e.check(K6(Oy,n)),e.cuid2=n=>e.check(Q6(My,n)),e.ulid=n=>e.check(e4(Dy,n)),e.base64=n=>e.check(o4(qy,n)),e.base64url=n=>e.check(c4(Fy,n)),e.xid=n=>e.check(t4(Ry,n)),e.ksuid=n=>e.check(r4(Ly,n)),e.ipv4=n=>e.check(n4(Uy,n)),e.ipv6=n=>e.check(i4(Zy,n)),e.cidrv4=n=>e.check(a4(jy,n)),e.cidrv6=n=>e.check(s4(By,n)),e.e164=n=>e.check(u4(Hy,n)),e.datetime=n=>e.check(qh(n)),e.date=n=>e.check(fy(n)),e.time=n=>e.check(hy(n)),e.duration=n=>e.check(vy(n))});function J(e){return q6(zy,e)}const Je=X("ZodStringFormat",(e,r)=>{je.init(e,r),Fh.init(e,r)}),Ey=X("ZodEmail",(e,r)=>{Y3.init(e,r),Je.init(e,r)}),Ku=X("ZodGUID",(e,r)=>{J3.init(e,r),Je.init(e,r)}),Sn=X("ZodUUID",(e,r)=>{W3.init(e,r),Je.init(e,r)}),Ny=X("ZodURL",(e,r)=>{V3.init(e,r),Je.init(e,r)}),Ay=X("ZodEmoji",(e,r)=>{X3.init(e,r),Je.init(e,r)}),Py=X("ZodNanoID",(e,r)=>{K3.init(e,r),Je.init(e,r)}),Oy=X("ZodCUID",(e,r)=>{Q3.init(e,r),Je.init(e,r)}),My=X("ZodCUID2",(e,r)=>{e6.init(e,r),Je.init(e,r)}),Dy=X("ZodULID",(e,r)=>{t6.init(e,r),Je.init(e,r)}),Ry=X("ZodXID",(e,r)=>{r6.init(e,r),Je.init(e,r)}),Ly=X("ZodKSUID",(e,r)=>{n6.init(e,r),Je.init(e,r)}),Uy=X("ZodIPv4",(e,r)=>{c6.init(e,r),Je.init(e,r)}),Zy=X("ZodIPv6",(e,r)=>{u6.init(e,r),Je.init(e,r)}),jy=X("ZodCIDRv4",(e,r)=>{l6.init(e,r),Je.init(e,r)}),By=X("ZodCIDRv6",(e,r)=>{f6.init(e,r),Je.init(e,r)}),qy=X("ZodBase64",(e,r)=>{d6.init(e,r),Je.init(e,r)}),Fy=X("ZodBase64URL",(e,r)=>{p6.init(e,r),Je.init(e,r)}),Hy=X("ZodE164",(e,r)=>{v6.init(e,r),Je.init(e,r)}),Gy=X("ZodJWT",(e,r)=>{g6.init(e,r),Je.init(e,r)}),Hh=X("ZodNumber",(e,r)=>{Nh.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Z4(e,i,t),e.gt=(i,t)=>e.check(Vu(i,t)),e.gte=(i,t)=>e.check(Vi(i,t)),e.min=(i,t)=>e.check(Vi(i,t)),e.lt=(i,t)=>e.check(Yu(i,t)),e.lte=(i,t)=>e.check(Yi(i,t)),e.max=(i,t)=>e.check(Yi(i,t)),e.int=i=>e.check(Qu(i)),e.safe=i=>e.check(Qu(i)),e.positive=i=>e.check(Vu(0,i)),e.nonnegative=i=>e.check(Vi(0,i)),e.negative=i=>e.check(Yu(0,i)),e.nonpositive=i=>e.check(Yi(0,i)),e.multipleOf=(i,t)=>e.check(Xu(i,t)),e.step=(i,t)=>e.check(Xu(i,t)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Pe(e){return v4(Hh,e)}const Jy=X("ZodNumberFormat",(e,r)=>{b6.init(e,r),Hh.init(e,r)});function Qu(e){return m4(Jy,e)}const Wy=X("ZodBoolean",(e,r)=>{y6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>j4(e,n,i)});function Qe(e){return g4(Wy,e)}const Yy=X("ZodNull",(e,r)=>{_6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>B4(e,n,i)});function Gh(e){return b4(Yy,e)}const Vy=X("ZodUnknown",(e,r)=>{w6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>F4()});function He(){return y4(Vy)}const Xy=X("ZodNever",(e,r)=>{k6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>q4(e,n,i)});function Ky(e){return _4(Xy,e)}const Qy=X("ZodArray",(e,r)=>{$6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Y4(e,n,i,t),e.element=r.element,e.min=(n,i)=>e.check(On(n,i)),e.nonempty=n=>e.check(On(1,n)),e.max=(n,i)=>e.check(Dh(n,i)),e.length=(n,i)=>e.check(Rh(n,i)),e.unwrap=()=>e.element});function ze(e,r){return A4(Qy,e,r)}const Jh=X("ZodObject",(e,r)=>{S6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>V4(e,n,i,t),Ne(e,"shape",()=>r.shape),e.keyof=()=>mt(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:He()}),e.loose=()=>e.clone({...e._zod.def,catchall:He()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ky()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Hb(e,n),e.safeExtend=n=>Gb(e,n),e.merge=n=>Jb(e,n),e.pick=n=>qb(e,n),e.omit=n=>Fb(e,n),e.partial=(...n)=>Wb(Xh,e,n[0]),e.required=(...n)=>Yb(Kh,e,n[0])});function oe(e,r){const n={type:"object",shape:e??{},...le(r)};return new Jh(n)}function dt(e,r){return new Jh({type:"object",shape:e,catchall:He(),...le(r)})}const Wh=X("ZodUnion",(e,r)=>{Oh.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>X4(e,n,i,t),e.options=r.options});function Ue(e,r){return new Wh({type:"union",options:e,...le(r)})}const e5=X("ZodDiscriminatedUnion",(e,r)=>{Wh.init(e,r),I6.init(e,r)});function Yh(e,r,n){return new e5({type:"union",options:r,discriminator:e,...le(n)})}const t5=X("ZodIntersection",(e,r)=>{T6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>K4(e,n,i,t)});function i0(e,r){return new t5({type:"intersection",left:e,right:r})}const r5=X("ZodRecord",(e,r)=>{C6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Q4(e,n,i,t),e.keyType=r.keyType,e.valueType=r.valueType});function Ge(e,r,n){return new r5({type:"record",keyType:e,valueType:r,...le(n)})}const qo=X("ZodEnum",(e,r)=>{z6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(i,t,a)=>H4(e,i,t),e.enum=r.entries,e.options=Object.values(r.entries);const n=new Set(Object.keys(r.entries));e.extract=(i,t)=>{const a={};for(const s of i)if(n.has(s))a[s]=r.entries[s];else throw new Error(`Key ${s} not found in enum`);return new qo({...r,checks:[],...le(t),entries:a})},e.exclude=(i,t)=>{const a={...r.entries};for(const s of i)if(n.has(s))delete a[s];else throw new Error(`Key ${s} not found in enum`);return new qo({...r,checks:[],...le(t),entries:a})}});function mt(e,r){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new qo({type:"enum",entries:n,...le(r)})}const n5=X("ZodLiteral",(e,r)=>{E6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>G4(e,n,i),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function de(e,r){return new n5({type:"literal",values:Array.isArray(e)?e:[e],...le(r)})}const i5=X("ZodTransform",(e,r)=>{N6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>W4(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ph(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(Dr(a,n.value,r));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Dr(s))}};const t=r.transform(n.value,n);return t instanceof Promise?t.then(a=>(n.value=a,n)):(n.value=t,n)}});function Vh(e){return new i5({type:"transform",transform:e})}const Xh=X("ZodOptional",(e,r)=>{Mh.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>jh(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Ve(e){return new Xh({type:"optional",innerType:e})}const a5=X("ZodExactOptional",(e,r)=>{A6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>jh(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function s5(e){return new a5({type:"optional",innerType:e})}const o5=X("ZodNullable",(e,r)=>{P6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ey(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function el(e){return new o5({type:"nullable",innerType:e})}const c5=X("ZodDefault",(e,r)=>{O6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ry(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function u5(e,r){return new c5({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():bh(r)}})}const l5=X("ZodPrefault",(e,r)=>{M6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ny(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function f5(e,r){return new l5({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():bh(r)}})}const Kh=X("ZodNonOptional",(e,r)=>{D6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ty(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function d5(e,r){return new Kh({type:"nonoptional",innerType:e,...le(r)})}const h5=X("ZodCatch",(e,r)=>{R6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>iy(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function p5(e,r){return new h5({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}const v5=X("ZodPipe",(e,r)=>{L6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ay(e,n,i,t),e.in=r.in,e.out=r.out});function Fo(e,r){return new v5({type:"pipe",in:e,out:r})}const m5=X("ZodReadonly",(e,r)=>{U6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>sy(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function g5(e){return new m5({type:"readonly",innerType:e})}const Qh=X("ZodCustom",(e,r)=>{Z6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>J4(e,n)});function b5(e,r){return P4(Qh,e??(()=>!0),r)}function y5(e,r={}){return O4(Qh,e,r)}function _5(e){return M4(e)}function e1(e,r){return Fo(Vh(e),r)}const er="io.modelcontextprotocol/related-task",Xn="2.0",et=b5(e=>e!==null&&(typeof e=="object"||typeof e=="function")),t1=Ue([J(),Pe().int()]),r1=J();dt({ttl:Ue([Pe(),Gh()]).optional(),pollInterval:Pe().optional()});const w5=oe({ttl:Pe().optional()}),k5=oe({taskId:J()}),a0=dt({progressToken:t1.optional(),[er]:k5.optional()}),gt=oe({_meta:a0.optional()}),Fr=gt.extend({task:w5.optional()}),$5=e=>Fr.safeParse(e).success,tt=oe({method:J(),params:gt.loose().optional()}),xt=oe({_meta:a0.optional()}),St=oe({method:J(),params:xt.loose().optional()}),rt=dt({_meta:a0.optional()}),Hr=Ue([J(),Pe().int()]),n1=oe({jsonrpc:de(Xn),id:Hr,...tt.shape}).strict(),tl=e=>n1.safeParse(e).success,i1=oe({jsonrpc:de(Xn),...St.shape}).strict(),x5=e=>i1.safeParse(e).success,s0=oe({jsonrpc:de(Xn),id:Hr,result:rt}).strict(),In=e=>s0.safeParse(e).success;var Ae;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Ae||(Ae={}));const o0=oe({jsonrpc:de(Xn),id:Hr.optional(),error:oe({code:Pe().int(),message:J(),data:He().optional()})}).strict(),S5=e=>o0.safeParse(e).success,I5=Ue([n1,i1,s0,o0]);Ue([s0,o0]);const c0=rt.strict(),T5=xt.extend({requestId:Hr.optional(),reason:J().optional()}),u0=St.extend({method:de("notifications/cancelled"),params:T5}),C5=oe({src:J(),mimeType:J().optional(),sizes:ze(J()).optional(),theme:mt(["light","dark"]).optional()}),Gr=oe({icons:ze(C5).optional()}),br=oe({name:J(),title:J().optional()}),Kn=br.extend({...br.shape,...Gr.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),z5=i0(oe({applyDefaults:Qe().optional()}),Ge(J(),He())),E5=e1(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,i0(oe({form:z5.optional(),url:et.optional()}),Ge(J(),He()).optional())),N5=dt({list:et.optional(),cancel:et.optional(),requests:dt({sampling:dt({createMessage:et.optional()}).optional(),elicitation:dt({create:et.optional()}).optional()}).optional()}),A5=dt({list:et.optional(),cancel:et.optional(),requests:dt({tools:dt({call:et.optional()}).optional()}).optional()}),P5=oe({experimental:Ge(J(),et).optional(),sampling:oe({context:et.optional(),tools:et.optional()}).optional(),elicitation:E5.optional(),roots:oe({listChanged:Qe().optional()}).optional(),tasks:N5.optional()}),O5=gt.extend({protocolVersion:J(),capabilities:P5,clientInfo:Kn}),M5=tt.extend({method:de("initialize"),params:O5}),D5=oe({experimental:Ge(J(),et).optional(),logging:et.optional(),completions:et.optional(),prompts:oe({listChanged:Qe().optional()}).optional(),resources:oe({subscribe:Qe().optional(),listChanged:Qe().optional()}).optional(),tools:oe({listChanged:Qe().optional()}).optional(),tasks:A5.optional()}),R5=rt.extend({protocolVersion:J(),capabilities:D5,serverInfo:Kn,instructions:J().optional()}),L5=St.extend({method:de("notifications/initialized"),params:xt.optional()}),Qn=tt.extend({method:de("ping"),params:gt.optional()}),U5=oe({progress:Pe(),total:Ve(Pe()),message:Ve(J())}),Z5=oe({...xt.shape,...U5.shape,progressToken:t1}),l0=St.extend({method:de("notifications/progress"),params:Z5}),j5=gt.extend({cursor:r1.optional()}),Jr=tt.extend({params:j5.optional()}),Wr=rt.extend({nextCursor:r1.optional()}),B5=mt(["working","input_required","completed","failed","cancelled"]),Yr=oe({taskId:J(),status:B5,ttl:Ue([Pe(),Gh()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:Ve(Pe()),statusMessage:Ve(J())}),f0=rt.extend({task:Yr}),q5=xt.merge(Yr),Dn=St.extend({method:de("notifications/tasks/status"),params:q5}),d0=tt.extend({method:de("tasks/get"),params:gt.extend({taskId:J()})}),h0=rt.merge(Yr),p0=tt.extend({method:de("tasks/result"),params:gt.extend({taskId:J()})});rt.loose();const v0=Jr.extend({method:de("tasks/list")}),m0=Wr.extend({tasks:ze(Yr)}),g0=tt.extend({method:de("tasks/cancel"),params:gt.extend({taskId:J()})}),F5=rt.merge(Yr),a1=oe({uri:J(),mimeType:Ve(J()),_meta:Ge(J(),He()).optional()}),s1=a1.extend({text:J()}),b0=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),o1=a1.extend({blob:b0}),Vr=mt(["user","assistant"]),Tr=oe({audience:ze(Vr).optional(),priority:Pe().min(0).max(1).optional(),lastModified:qh({offset:!0}).optional()}),c1=oe({...br.shape,...Gr.shape,uri:J(),description:Ve(J()),mimeType:Ve(J()),annotations:Tr.optional(),_meta:Ve(dt({}))}),H5=oe({...br.shape,...Gr.shape,uriTemplate:J(),description:Ve(J()),mimeType:Ve(J()),annotations:Tr.optional(),_meta:Ve(dt({}))}),G5=Jr.extend({method:de("resources/list")}),J5=Wr.extend({resources:ze(c1)}),W5=Jr.extend({method:de("resources/templates/list")}),Y5=Wr.extend({resourceTemplates:ze(H5)}),y0=gt.extend({uri:J()}),V5=y0,X5=tt.extend({method:de("resources/read"),params:V5}),K5=rt.extend({contents:ze(Ue([s1,o1]))}),Q5=St.extend({method:de("notifications/resources/list_changed"),params:xt.optional()}),e_=y0,t_=tt.extend({method:de("resources/subscribe"),params:e_}),r_=y0,n_=tt.extend({method:de("resources/unsubscribe"),params:r_}),i_=xt.extend({uri:J()}),a_=St.extend({method:de("notifications/resources/updated"),params:i_}),s_=oe({name:J(),description:Ve(J()),required:Ve(Qe())}),o_=oe({...br.shape,...Gr.shape,description:Ve(J()),arguments:Ve(ze(s_)),_meta:Ve(dt({}))}),c_=Jr.extend({method:de("prompts/list")}),u_=Wr.extend({prompts:ze(o_)}),l_=gt.extend({name:J(),arguments:Ge(J(),J()).optional()}),f_=tt.extend({method:de("prompts/get"),params:l_}),_0=oe({type:de("text"),text:J(),annotations:Tr.optional(),_meta:Ge(J(),He()).optional()}),w0=oe({type:de("image"),data:b0,mimeType:J(),annotations:Tr.optional(),_meta:Ge(J(),He()).optional()}),k0=oe({type:de("audio"),data:b0,mimeType:J(),annotations:Tr.optional(),_meta:Ge(J(),He()).optional()}),d_=oe({type:de("tool_use"),name:J(),id:J(),input:Ge(J(),He()),_meta:Ge(J(),He()).optional()}),u1=oe({type:de("resource"),resource:Ue([s1,o1]),annotations:Tr.optional(),_meta:Ge(J(),He()).optional()}),l1=c1.extend({type:de("resource_link")}),Xr=Ue([_0,w0,k0,l1,u1]),h_=oe({role:Vr,content:Xr}),p_=rt.extend({description:J().optional(),messages:ze(h_)}),v_=St.extend({method:de("notifications/prompts/list_changed"),params:xt.optional()}),m_=oe({title:J().optional(),readOnlyHint:Qe().optional(),destructiveHint:Qe().optional(),idempotentHint:Qe().optional(),openWorldHint:Qe().optional()}),g_=oe({taskSupport:mt(["required","optional","forbidden"]).optional()}),$0=oe({...br.shape,...Gr.shape,description:J().optional(),inputSchema:oe({type:de("object"),properties:Ge(J(),et).optional(),required:ze(J()).optional()}).catchall(He()),outputSchema:oe({type:de("object"),properties:Ge(J(),et).optional(),required:ze(J()).optional()}).catchall(He()).optional(),annotations:m_.optional(),execution:g_.optional(),_meta:Ge(J(),He()).optional()}),f1=Jr.extend({method:de("tools/list")}),b_=Wr.extend({tools:ze($0)}),ei=rt.extend({content:ze(Xr).default([]),structuredContent:Ge(J(),He()).optional(),isError:Qe().optional()});ei.or(rt.extend({toolResult:He()}));const y_=Fr.extend({name:J(),arguments:Ge(J(),He()).optional()}),d1=tt.extend({method:de("tools/call"),params:y_}),__=St.extend({method:de("notifications/tools/list_changed"),params:xt.optional()});oe({autoRefresh:Qe().default(!0),debounceMs:Pe().int().nonnegative().default(300)});const h1=mt(["debug","info","notice","warning","error","critical","alert","emergency"]),w_=gt.extend({level:h1}),k_=tt.extend({method:de("logging/setLevel"),params:w_}),$_=xt.extend({level:h1,logger:J().optional(),data:He()}),x_=St.extend({method:de("notifications/message"),params:$_}),S_=oe({name:J().optional()}),I_=oe({hints:ze(S_).optional(),costPriority:Pe().min(0).max(1).optional(),speedPriority:Pe().min(0).max(1).optional(),intelligencePriority:Pe().min(0).max(1).optional()}),T_=oe({mode:mt(["auto","required","none"]).optional()}),C_=oe({type:de("tool_result"),toolUseId:J().describe("The unique identifier for the corresponding tool call."),content:ze(Xr).default([]),structuredContent:oe({}).loose().optional(),isError:Qe().optional(),_meta:Ge(J(),He()).optional()}),z_=Yh("type",[_0,w0,k0]),Rn=Yh("type",[_0,w0,k0,d_,C_]),E_=oe({role:Vr,content:Ue([Rn,ze(Rn)]),_meta:Ge(J(),He()).optional()}),N_=Fr.extend({messages:ze(E_),modelPreferences:I_.optional(),systemPrompt:J().optional(),includeContext:mt(["none","thisServer","allServers"]).optional(),temperature:Pe().optional(),maxTokens:Pe().int(),stopSequences:ze(J()).optional(),metadata:et.optional(),tools:ze($0).optional(),toolChoice:T_.optional()}),A_=tt.extend({method:de("sampling/createMessage"),params:N_}),P_=rt.extend({model:J(),stopReason:Ve(mt(["endTurn","stopSequence","maxTokens"]).or(J())),role:Vr,content:z_}),O_=rt.extend({model:J(),stopReason:Ve(mt(["endTurn","stopSequence","maxTokens","toolUse"]).or(J())),role:Vr,content:Ue([Rn,ze(Rn)])}),M_=oe({type:de("boolean"),title:J().optional(),description:J().optional(),default:Qe().optional()}),D_=oe({type:de("string"),title:J().optional(),description:J().optional(),minLength:Pe().optional(),maxLength:Pe().optional(),format:mt(["email","uri","date","date-time"]).optional(),default:J().optional()}),R_=oe({type:mt(["number","integer"]),title:J().optional(),description:J().optional(),minimum:Pe().optional(),maximum:Pe().optional(),default:Pe().optional()}),L_=oe({type:de("string"),title:J().optional(),description:J().optional(),enum:ze(J()),default:J().optional()}),U_=oe({type:de("string"),title:J().optional(),description:J().optional(),oneOf:ze(oe({const:J(),title:J()})),default:J().optional()}),Z_=oe({type:de("string"),title:J().optional(),description:J().optional(),enum:ze(J()),enumNames:ze(J()).optional(),default:J().optional()}),j_=Ue([L_,U_]),B_=oe({type:de("array"),title:J().optional(),description:J().optional(),minItems:Pe().optional(),maxItems:Pe().optional(),items:oe({type:de("string"),enum:ze(J())}),default:ze(J()).optional()}),q_=oe({type:de("array"),title:J().optional(),description:J().optional(),minItems:Pe().optional(),maxItems:Pe().optional(),items:oe({anyOf:ze(oe({const:J(),title:J()}))}),default:ze(J()).optional()}),F_=Ue([B_,q_]),H_=Ue([Z_,j_,F_]),G_=Ue([H_,M_,D_,R_]),J_=Fr.extend({mode:de("form").optional(),message:J(),requestedSchema:oe({type:de("object"),properties:Ge(J(),G_),required:ze(J()).optional()})}),W_=Fr.extend({mode:de("url"),message:J(),elicitationId:J(),url:J().url()}),Y_=Ue([J_,W_]),V_=tt.extend({method:de("elicitation/create"),params:Y_}),X_=xt.extend({elicitationId:J()}),K_=St.extend({method:de("notifications/elicitation/complete"),params:X_}),Q_=rt.extend({action:mt(["accept","decline","cancel"]),content:e1(e=>e===null?void 0:e,Ge(J(),Ue([J(),Pe(),Qe(),ze(J())])).optional())}),e9=oe({type:de("ref/resource"),uri:J()}),t9=oe({type:de("ref/prompt"),name:J()}),r9=gt.extend({ref:Ue([t9,e9]),argument:oe({name:J(),value:J()}),context:oe({arguments:Ge(J(),J()).optional()}).optional()}),n9=tt.extend({method:de("completion/complete"),params:r9}),i9=rt.extend({completion:dt({values:ze(J()).max(100),total:Ve(Pe().int()),hasMore:Ve(Qe())})}),a9=oe({uri:J().startsWith("file://"),name:J().optional(),_meta:Ge(J(),He()).optional()}),s9=tt.extend({method:de("roots/list"),params:gt.optional()}),o9=rt.extend({roots:ze(a9)}),c9=St.extend({method:de("notifications/roots/list_changed"),params:xt.optional()});Ue([Qn,M5,n9,k_,f_,c_,G5,W5,X5,t_,n_,d1,f1,d0,p0,v0,g0]);Ue([u0,l0,L5,c9,Dn]);Ue([c0,P_,O_,Q_,o9,h0,m0,f0]);Ue([Qn,A_,V_,s9,d0,p0,v0,g0]);Ue([u0,l0,x_,a_,Q5,__,v_,Dn,K_]);Ue([c0,R5,i9,p_,u_,J5,Y5,K5,ei,b_,h0,m0,f0]);class Ee extends Error{constructor(r,n,i){super(`MCP error ${r}: ${n}`),this.code=r,this.data=i,this.name="McpError"}static fromError(r,n,i){if(r===Ae.UrlElicitationRequired&&i){const t=i;if(t.elicitations)return new u9(t.elicitations,n)}return new Ee(r,n,i)}}class u9 extends Ee{constructor(r,n=`URL elicitation${r.length>1?"s":""} required`){super(Ae.UrlElicitationRequired,n,{elicitations:r})}get elicitations(){var r;return((r=this.data)==null?void 0:r.elicitations)??[]}}function Kt(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function rl(e){const r=oy(e),n=r==null?void 0:r.method;if(!n)throw new Error("Schema is missing a method literal");const i=cy(n);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function nl(e,r){const n=Bh(e,r);if(!n.success)throw n.error;return n.data}const l9=6e4;class f9{constructor(r){this._options=r,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(u0,n=>{this._oncancel(n)}),this.setNotificationHandler(l0,n=>{this._onprogress(n)}),this.setRequestHandler(Qn,n=>({})),this._taskStore=r==null?void 0:r.taskStore,this._taskMessageQueue=r==null?void 0:r.taskMessageQueue,this._taskStore&&(this.setRequestHandler(d0,async(n,i)=>{const t=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!t)throw new Ee(Ae.InvalidParams,"Failed to retrieve task: Task not found");return{...t}}),this.setRequestHandler(p0,async(n,i)=>{const t=async()=>{var o;const a=n.params.taskId;if(this._taskMessageQueue){let l;for(;l=await this._taskMessageQueue.dequeue(a,i.sessionId);){if(l.type==="response"||l.type==="error"){const d=l.message,p=d.id,v=this._requestResolvers.get(p);if(v)if(this._requestResolvers.delete(p),l.type==="response")v(d);else{const f=d,u=new Ee(f.error.code,f.error.message,f.error.data);v(u)}else{const f=l.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${p}`))}continue}await((o=this._transport)==null?void 0:o.send(l.message,{relatedRequestId:i.requestId}))}}const s=await this._taskStore.getTask(a,i.sessionId);if(!s)throw new Ee(Ae.InvalidParams,`Task not found: ${a}`);if(!Kt(s.status))return await this._waitForTaskUpdate(a,i.signal),await t();if(Kt(s.status)){const l=await this._taskStore.getTaskResult(a,i.sessionId);return this._clearTaskQueue(a),{...l,_meta:{...l._meta,[er]:{taskId:a}}}}return await t()};return await t()}),this.setRequestHandler(v0,async(n,i)=>{var t;try{const{tasks:a,nextCursor:s}=await this._taskStore.listTasks((t=n.params)==null?void 0:t.cursor,i.sessionId);return{tasks:a,nextCursor:s,_meta:{}}}catch(a){throw new Ee(Ae.InvalidParams,`Failed to list tasks: ${a instanceof Error?a.message:String(a)}`)}}),this.setRequestHandler(g0,async(n,i)=>{try{const t=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!t)throw new Ee(Ae.InvalidParams,`Task not found: ${n.params.taskId}`);if(Kt(t.status))throw new Ee(Ae.InvalidParams,`Cannot cancel task in terminal status: ${t.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(n.params.taskId);const a=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!a)throw new Ee(Ae.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...a}}catch(t){throw t instanceof Ee?t:new Ee(Ae.InvalidRequest,`Failed to cancel task: ${t instanceof Error?t.message:String(t)}`)}}))}async _oncancel(r){if(!r.params.requestId)return;const n=this._requestHandlerAbortControllers.get(r.params.requestId);n==null||n.abort(r.params.reason)}_setupTimeout(r,n,i,t,a=!1){this._timeoutInfo.set(r,{timeoutId:setTimeout(t,n),startTime:Date.now(),timeout:n,maxTotalTimeout:i,resetTimeoutOnProgress:a,onTimeout:t})}_resetTimeout(r){const n=this._timeoutInfo.get(r);if(!n)return!1;const i=Date.now()-n.startTime;if(n.maxTotalTimeout&&i>=n.maxTotalTimeout)throw this._timeoutInfo.delete(r),Ee.fromError(Ae.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:i});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(r){const n=this._timeoutInfo.get(r);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(r))}async connect(r){var a,s,o;this._transport=r;const n=(a=this.transport)==null?void 0:a.onclose;this._transport.onclose=()=>{n==null||n(),this._onclose()};const i=(s=this.transport)==null?void 0:s.onerror;this._transport.onerror=l=>{i==null||i(l),this._onerror(l)};const t=(o=this._transport)==null?void 0:o.onmessage;this._transport.onmessage=(l,d)=>{t==null||t(l,d),In(l)||S5(l)?this._onresponse(l):tl(l)?this._onrequest(l,d):x5(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){var i;const r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const n=Ee.fromError(Ae.ConnectionClosed,"Connection closed");this._transport=void 0,(i=this.onclose)==null||i.call(this);for(const t of r.values())t(n)}_onerror(r){var n;(n=this.onerror)==null||n.call(this,r)}_onnotification(r){const n=this._notificationHandlers.get(r.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(r)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(r,n){var p,v,f,u;const i=this._requestHandlers.get(r.method)??this.fallbackRequestHandler,t=this._transport,a=(f=(v=(p=r.params)==null?void 0:p._meta)==null?void 0:v[er])==null?void 0:f.taskId;if(i===void 0){const h={jsonrpc:"2.0",id:r.id,error:{code:Ae.MethodNotFound,message:"Method not found"}};a&&this._taskMessageQueue?this._enqueueTaskMessage(a,{type:"error",message:h,timestamp:Date.now()},t==null?void 0:t.sessionId).catch(c=>this._onerror(new Error(`Failed to enqueue error response: ${c}`))):t==null||t.send(h).catch(c=>this._onerror(new Error(`Failed to send an error response: ${c}`)));return}const s=new AbortController;this._requestHandlerAbortControllers.set(r.id,s);const o=$5(r.params)?r.params.task:void 0,l=this._taskStore?this.requestTaskStore(r,t==null?void 0:t.sessionId):void 0,d={signal:s.signal,sessionId:t==null?void 0:t.sessionId,_meta:(u=r.params)==null?void 0:u._meta,sendNotification:async h=>{const c={relatedRequestId:r.id};a&&(c.relatedTask={taskId:a}),await this.notification(h,c)},sendRequest:async(h,c,m)=>{var w;const b={...m,relatedRequestId:r.id};a&&!b.relatedTask&&(b.relatedTask={taskId:a});const g=((w=b.relatedTask)==null?void 0:w.taskId)??a;return g&&l&&await l.updateTaskStatus(g,"input_required"),await this.request(h,c,b)},authInfo:n==null?void 0:n.authInfo,requestId:r.id,requestInfo:n==null?void 0:n.requestInfo,taskId:a,taskStore:l,taskRequestedTtl:o==null?void 0:o.ttl,closeSSEStream:n==null?void 0:n.closeSSEStream,closeStandaloneSSEStream:n==null?void 0:n.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(r.method)}).then(()=>i(r,d)).then(async h=>{if(s.signal.aborted)return;const c={result:h,jsonrpc:"2.0",id:r.id};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{type:"response",message:c,timestamp:Date.now()},t==null?void 0:t.sessionId):await(t==null?void 0:t.send(c))},async h=>{if(s.signal.aborted)return;const c={jsonrpc:"2.0",id:r.id,error:{code:Number.isSafeInteger(h.code)?h.code:Ae.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{type:"error",message:c,timestamp:Date.now()},t==null?void 0:t.sessionId):await(t==null?void 0:t.send(c))}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(r.id)})}_onprogress(r){const{progressToken:n,...i}=r.params,t=Number(n),a=this._progressHandlers.get(t);if(!a){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(r)}`));return}const s=this._responseHandlers.get(t),o=this._timeoutInfo.get(t);if(o&&s&&o.resetTimeoutOnProgress)try{this._resetTimeout(t)}catch(l){this._responseHandlers.delete(t),this._progressHandlers.delete(t),this._cleanupTimeout(t),s(l);return}a(i)}_onresponse(r){const n=Number(r.id),i=this._requestResolvers.get(n);if(i){if(this._requestResolvers.delete(n),In(r))i(r);else{const s=new Ee(r.error.code,r.error.message,r.error.data);i(s)}return}const t=this._responseHandlers.get(n);if(t===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(r)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let a=!1;if(In(r)&&r.result&&typeof r.result=="object"){const s=r.result;if(s.task&&typeof s.task=="object"){const o=s.task;typeof o.taskId=="string"&&(a=!0,this._taskProgressTokens.set(o.taskId,n))}}if(a||this._progressHandlers.delete(n),In(r))t(r);else{const s=Ee.fromError(r.error.code,r.error.message,r.error.data);t(s)}}get transport(){return this._transport}async close(){var r;await((r=this._transport)==null?void 0:r.close())}async*requestStream(r,n,i){var s,o;const{task:t}=i??{};if(!t){try{yield{type:"result",result:await this.request(r,n,i)}}catch(l){yield{type:"error",error:l instanceof Ee?l:new Ee(Ae.InternalError,String(l))}}return}let a;try{const l=await this.request(r,f0,i);if(l.task)a=l.task.taskId,yield{type:"taskCreated",task:l.task};else throw new Ee(Ae.InternalError,"Task creation did not return a task");for(;;){const d=await this.getTask({taskId:a},i);if(yield{type:"taskStatus",task:d},Kt(d.status)){d.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:a},n,i)}:d.status==="failed"?yield{type:"error",error:new Ee(Ae.InternalError,`Task ${a} failed`)}:d.status==="cancelled"&&(yield{type:"error",error:new Ee(Ae.InternalError,`Task ${a} was cancelled`)});return}if(d.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:a},n,i)};return}const p=d.pollInterval??((s=this._options)==null?void 0:s.defaultTaskPollInterval)??1e3;await new Promise(v=>setTimeout(v,p)),(o=i==null?void 0:i.signal)==null||o.throwIfAborted()}}catch(l){yield{type:"error",error:l instanceof Ee?l:new Ee(Ae.InternalError,String(l))}}}request(r,n,i){const{relatedRequestId:t,resumptionToken:a,onresumptiontoken:s,task:o,relatedTask:l}=i??{};return new Promise((d,p)=>{var g,w,k,$,O;const v=P=>{p(P)};if(!this._transport){v(new Error("Not connected"));return}if(((g=this._options)==null?void 0:g.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(r.method),o&&this.assertTaskCapability(r.method)}catch(P){v(P);return}(w=i==null?void 0:i.signal)==null||w.throwIfAborted();const f=this._requestMessageId++,u={...r,jsonrpc:"2.0",id:f};i!=null&&i.onprogress&&(this._progressHandlers.set(f,i.onprogress),u.params={...r.params,_meta:{...((k=r.params)==null?void 0:k._meta)||{},progressToken:f}}),o&&(u.params={...u.params,task:o}),l&&(u.params={...u.params,_meta:{...(($=u.params)==null?void 0:$._meta)||{},[er]:l}});const h=P=>{var C;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),(C=this._transport)==null||C.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(P)}},{relatedRequestId:t,resumptionToken:a,onresumptiontoken:s}).catch(E=>this._onerror(new Error(`Failed to send cancellation: ${E}`)));const y=P instanceof Ee?P:new Ee(Ae.RequestTimeout,String(P));p(y)};this._responseHandlers.set(f,P=>{var y;if(!((y=i==null?void 0:i.signal)!=null&&y.aborted)){if(P instanceof Error)return p(P);try{const C=Bh(n,P.result);C.success?d(C.data):p(C.error)}catch(C){p(C)}}}),(O=i==null?void 0:i.signal)==null||O.addEventListener("abort",()=>{var P;h((P=i==null?void 0:i.signal)==null?void 0:P.reason)});const c=(i==null?void 0:i.timeout)??l9,m=()=>h(Ee.fromError(Ae.RequestTimeout,"Request timed out",{timeout:c}));this._setupTimeout(f,c,i==null?void 0:i.maxTotalTimeout,m,(i==null?void 0:i.resetTimeoutOnProgress)??!1);const b=l==null?void 0:l.taskId;if(b){const P=y=>{const C=this._responseHandlers.get(f);C?C(y):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,P),this._enqueueTaskMessage(b,{type:"request",message:u,timestamp:Date.now()}).catch(y=>{this._cleanupTimeout(f),p(y)})}else this._transport.send(u,{relatedRequestId:t,resumptionToken:a,onresumptiontoken:s}).catch(P=>{this._cleanupTimeout(f),p(P)})})}async getTask(r,n){return this.request({method:"tasks/get",params:r},h0,n)}async getTaskResult(r,n,i){return this.request({method:"tasks/result",params:r},n,i)}async listTasks(r,n){return this.request({method:"tasks/list",params:r},m0,n)}async cancelTask(r,n){return this.request({method:"tasks/cancel",params:r},F5,n)}async notification(r,n){var o,l,d,p;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(r.method);const i=(o=n==null?void 0:n.relatedTask)==null?void 0:o.taskId;if(i){const v={...r,jsonrpc:"2.0",params:{...r.params,_meta:{...((l=r.params)==null?void 0:l._meta)||{},[er]:n.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:v,timestamp:Date.now()});return}if((((d=this._options)==null?void 0:d.debouncedNotificationMethods)??[]).includes(r.method)&&!r.params&&!(n!=null&&n.relatedRequestId)&&!(n!=null&&n.relatedTask)){if(this._pendingDebouncedNotifications.has(r.method))return;this._pendingDebouncedNotifications.add(r.method),Promise.resolve().then(()=>{var f,u;if(this._pendingDebouncedNotifications.delete(r.method),!this._transport)return;let v={...r,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(v={...v,params:{...v.params,_meta:{...((f=v.params)==null?void 0:f._meta)||{},[er]:n.relatedTask}}}),(u=this._transport)==null||u.send(v,n).catch(h=>this._onerror(h))});return}let s={...r,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(s={...s,params:{...s.params,_meta:{...((p=s.params)==null?void 0:p._meta)||{},[er]:n.relatedTask}}}),await this._transport.send(s,n)}setRequestHandler(r,n){const i=rl(r);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(t,a)=>{const s=nl(r,t);return Promise.resolve(n(s,a))})}removeRequestHandler(r){this._requestHandlers.delete(r)}assertCanSetRequestHandler(r){if(this._requestHandlers.has(r))throw new Error(`A request handler for ${r} already exists, which would be overridden`)}setNotificationHandler(r,n){const i=rl(r);this._notificationHandlers.set(i,t=>{const a=nl(r,t);return Promise.resolve(n(a))})}removeNotificationHandler(r){this._notificationHandlers.delete(r)}_cleanupTaskProgressHandler(r){const n=this._taskProgressTokens.get(r);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(r))}async _enqueueTaskMessage(r,n,i){var a;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const t=(a=this._options)==null?void 0:a.maxTaskQueueSize;await this._taskMessageQueue.enqueue(r,n,i,t)}async _clearTaskQueue(r,n){if(this._taskMessageQueue){const i=await this._taskMessageQueue.dequeueAll(r,n);for(const t of i)if(t.type==="request"&&tl(t.message)){const a=t.message.id,s=this._requestResolvers.get(a);s?(s(new Ee(Ae.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(a)):this._onerror(new Error(`Resolver missing for request ${a} during task ${r} cleanup`))}}}async _waitForTaskUpdate(r,n){var t,a;let i=((t=this._options)==null?void 0:t.defaultTaskPollInterval)??1e3;try{const s=await((a=this._taskStore)==null?void 0:a.getTask(r));s!=null&&s.pollInterval&&(i=s.pollInterval)}catch{}return new Promise((s,o)=>{if(n.aborted){o(new Ee(Ae.InvalidRequest,"Request cancelled"));return}const l=setTimeout(s,i);n.addEventListener("abort",()=>{clearTimeout(l),o(new Ee(Ae.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(r,n){const i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async t=>{if(!r)throw new Error("No request provided");return await i.createTask(t,r.id,{method:r.method,params:r.params},n)},getTask:async t=>{const a=await i.getTask(t,n);if(!a)throw new Ee(Ae.InvalidParams,"Failed to retrieve task: Task not found");return a},storeTaskResult:async(t,a,s)=>{await i.storeTaskResult(t,a,s,n);const o=await i.getTask(t,n);if(o){const l=Dn.parse({method:"notifications/tasks/status",params:o});await this.notification(l),Kt(o.status)&&this._cleanupTaskProgressHandler(t)}},getTaskResult:t=>i.getTaskResult(t,n),updateTaskStatus:async(t,a,s)=>{const o=await i.getTask(t,n);if(!o)throw new Ee(Ae.InvalidParams,`Task "${t}" not found - it may have been cleaned up`);if(Kt(o.status))throw new Ee(Ae.InvalidParams,`Cannot update task "${t}" from terminal status "${o.status}" to "${a}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(t,a,s,n);const l=await i.getTask(t,n);if(l){const d=Dn.parse({method:"notifications/tasks/status",params:l});await this.notification(d),Kt(l.status)&&this._cleanupTaskProgressHandler(t)}},listTasks:t=>i.listTasks(t,n)}}}var d9=Object.defineProperty,Ot=(e,r)=>{for(var n in r)d9(e,n,{get:r[n],enumerable:!0,configurable:!0,set:i=>r[n]=()=>i})};class h9{constructor(r=window.parent,n){at(this,"eventTarget");at(this,"eventSource");at(this,"messageListener");at(this,"onclose");at(this,"onerror");at(this,"onmessage");at(this,"sessionId");at(this,"setProtocolVersion");this.eventTarget=r,this.eventSource=n,this.messageListener=i=>{var a,s,o;if(n&&i.source!==this.eventSource){console.debug("Ignoring message from unknown source",i);return}let t=I5.safeParse(i.data);t.success?(console.debug("Parsed message",t.data),(a=this.onmessage)==null||a.call(this,t.data)):((s=i.data)==null?void 0:s.jsonrpc)!=="2.0"?console.debug("Ignoring non-JSON-RPC message",t.error.message,i):(console.error("Failed to parse message",t.error.message,i),(o=this.onerror)==null||o.call(this,Error("Invalid JSON-RPC message received: "+t.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(r,n){console.debug("Sending message",r),this.eventTarget.postMessage(r,"*")}async close(){var r;window.removeEventListener("message",this.messageListener),(r=this.onclose)==null||r.call(this)}}var p9="2026-01-26",Z={};Ot(Z,{xor:()=>E2,xid:()=>Qg,void:()=>x2,uuidv7:()=>Hg,uuidv6:()=>Fg,uuidv4:()=>qg,uuid:()=>Bg,util:()=>Te,url:()=>Gg,uppercase:()=>ui,unknown:()=>ar,union:()=>Ui,undefined:()=>k2,ulid:()=>Kg,uint64:()=>_2,uint32:()=>g2,tuple:()=>Hc,trim:()=>vi,treeifyError:()=>C1,transform:()=>ji,toUpperCase:()=>gi,toLowerCase:()=>mi,toJSONSchema:()=>_g,templateLiteral:()=>q2,symbol:()=>w2,superRefine:()=>bu,success:()=>Z2,stringbool:()=>V2,stringFormat:()=>l2,string:()=>Fn,strictObject:()=>C2,startsWith:()=>fi,slugify:()=>bi,size:()=>cn,setErrorMap:()=>Mk,set:()=>M2,safeParseAsync:()=>Ng,safeParse:()=>Eg,safeEncodeAsync:()=>Lg,safeEncode:()=>Dg,safeDecodeAsync:()=>Ug,safeDecode:()=>Rg,registry:()=>Y0,regexes:()=>cr,regex:()=>oi,refine:()=>gu,record:()=>Gc,readonly:()=>fu,property:()=>_c,promise:()=>F2,prettifyError:()=>E1,preprocess:()=>K2,prefault:()=>iu,positive:()=>mc,pipe:()=>jr,partialRecord:()=>A2,parseAsync:()=>zg,parse:()=>Cg,overwrite:()=>Dt,optional:()=>Ur,object:()=>T2,number:()=>zc,nullish:()=>U2,nullable:()=>Zr,null:()=>Oc,normalize:()=>pi,nonpositive:()=>bc,nonoptional:()=>au,nonnegative:()=>yc,never:()=>Ri,negative:()=>gc,nativeEnum:()=>D2,nanoid:()=>Yg,nan:()=>j2,multipleOf:()=>wr,minSize:()=>Ht,minLength:()=>ir,mime:()=>hi,meta:()=>W2,maxSize:()=>Cr,maxLength:()=>un,map:()=>O2,mac:()=>r2,lte:()=>wt,lt:()=>qt,lowercase:()=>ci,looseRecord:()=>P2,looseObject:()=>z2,locales:()=>W0,literal:()=>R2,length:()=>ln,lazy:()=>pu,ksuid:()=>e2,keyof:()=>I2,jwt:()=>u2,json:()=>X2,iso:()=>$c,ipv6:()=>n2,ipv4:()=>t2,intersection:()=>qc,int64:()=>y2,int32:()=>m2,int:()=>Hn,instanceof:()=>Y2,includes:()=>li,httpUrl:()=>Jg,hostname:()=>f2,hex:()=>d2,hash:()=>h2,guid:()=>jg,gte:()=>ft,gt:()=>Ft,globalRegistry:()=>_t,getErrorMap:()=>Dk,function:()=>Gn,fromJSONSchema:()=>Zk,formatError:()=>C0,float64:()=>v2,float32:()=>p2,flattenError:()=>T0,file:()=>L2,exactOptional:()=>Qc,enum:()=>Zi,endsWith:()=>di,encodeAsync:()=>Og,encode:()=>Ag,emoji:()=>Wg,email:()=>Zg,e164:()=>c2,discriminatedUnion:()=>N2,describe:()=>J2,decodeAsync:()=>Mg,decode:()=>Pg,date:()=>S2,custom:()=>G2,cuid2:()=>Xg,cuid:()=>Vg,core:()=>p1,config:()=>ot,coerce:()=>eb,codec:()=>B2,clone:()=>It,cidrv6:()=>a2,cidrv4:()=>i2,check:()=>H2,catch:()=>cu,boolean:()=>Ec,bigint:()=>b2,base64url:()=>o2,base64:()=>s2,array:()=>gn,any:()=>$2,_function:()=>Gn,_default:()=>ru,_ZodString:()=>yi,ZodXor:()=>Zc,ZodXID:()=>Ii,ZodVoid:()=>Lc,ZodUnknown:()=>Dc,ZodUnion:()=>yn,ZodUndefined:()=>Ac,ZodUUID:()=>zt,ZodURL:()=>hn,ZodULID:()=>Si,ZodType:()=>ke,ZodTuple:()=>Fc,ZodTransform:()=>Xc,ZodTemplateLiteral:()=>du,ZodSymbol:()=>Nc,ZodSuccess:()=>su,ZodStringFormat:()=>Re,ZodString:()=>dn,ZodSet:()=>Wc,ZodRecord:()=>_n,ZodRealError:()=>yt,ZodReadonly:()=>lu,ZodPromise:()=>vu,ZodPrefault:()=>nu,ZodPipe:()=>Fi,ZodOptional:()=>Bi,ZodObject:()=>bn,ZodNumberFormat:()=>ur,ZodNumber:()=>pn,ZodNullable:()=>eu,ZodNull:()=>Pc,ZodNonOptional:()=>qi,ZodNever:()=>Rc,ZodNanoID:()=>ki,ZodNaN:()=>uu,ZodMap:()=>Jc,ZodMAC:()=>Cc,ZodLiteral:()=>Yc,ZodLazy:()=>hu,ZodKSUID:()=>Ti,ZodJWT:()=>Mi,ZodIssueCode:()=>Ok,ZodIntersection:()=>Bc,ZodISOTime:()=>Ic,ZodISODuration:()=>Tc,ZodISODateTime:()=>xc,ZodISODate:()=>Sc,ZodIPv6:()=>zi,ZodIPv4:()=>Ci,ZodGUID:()=>Lr,ZodFunction:()=>mu,ZodFirstPartyTypeKind:()=>Vo,ZodFile:()=>Vc,ZodExactOptional:()=>Kc,ZodError:()=>Pk,ZodEnum:()=>Sr,ZodEmoji:()=>wi,ZodEmail:()=>_i,ZodE164:()=>Oi,ZodDiscriminatedUnion:()=>jc,ZodDefault:()=>tu,ZodDate:()=>Li,ZodCustomStringFormat:()=>zr,ZodCustom:()=>wn,ZodCodec:()=>Hi,ZodCatch:()=>ou,ZodCUID2:()=>xi,ZodCUID:()=>$i,ZodCIDRv6:()=>Ni,ZodCIDRv4:()=>Ei,ZodBoolean:()=>vn,ZodBigIntFormat:()=>Di,ZodBigInt:()=>mn,ZodBase64URL:()=>Pi,ZodBase64:()=>Ai,ZodArray:()=>Uc,ZodAny:()=>Mc,TimePrecision:()=>Qv,NEVER:()=>v1,$output:()=>Jv,$input:()=>Wv,$brand:()=>m1});var p1={};Ot(p1,{version:()=>Ep,util:()=>Te,treeifyError:()=>C1,toJSONSchema:()=>_g,toDotPath:()=>z1,safeParseAsync:()=>A1,safeParse:()=>N1,safeEncodeAsync:()=>J9,safeEncode:()=>H9,safeDecodeAsync:()=>W9,safeDecode:()=>G9,registry:()=>Y0,regexes:()=>cr,process:()=>Oe,prettifyError:()=>E1,parseAsync:()=>Jo,parse:()=>Go,meta:()=>Om,locales:()=>W0,isValidJWT:()=>tv,isValidBase64URL:()=>Kp,isValidBase64:()=>j0,initializeContext:()=>kr,globalRegistry:()=>_t,globalConfig:()=>Ln,formatError:()=>C0,flattenError:()=>T0,finalize:()=>xr,extractDefs:()=>$r,encodeAsync:()=>q9,encode:()=>j9,describe:()=>Pm,decodeAsync:()=>F9,decode:()=>B9,createToJSONSchemaMethod:()=>Dm,createStandardJSONSchemaMethod:()=>Rr,config:()=>ot,clone:()=>It,_xor:()=>ck,_xid:()=>sc,_void:()=>$m,_uuidv7:()=>ec,_uuidv6:()=>Q0,_uuidv4:()=>K0,_uuid:()=>X0,_url:()=>si,_uppercase:()=>ui,_unknown:()=>wm,_union:()=>ok,_undefined:()=>bm,_ulid:()=>ac,_uint64:()=>mm,_uint32:()=>lm,_tuple:()=>fk,_trim:()=>vi,_transform:()=>bk,_toUpperCase:()=>gi,_toLowerCase:()=>mi,_templateLiteral:()=>Tk,_symbol:()=>gm,_superRefine:()=>Nm,_success:()=>$k,_stringbool:()=>Mm,_stringFormat:()=>fn,_string:()=>Vv,_startsWith:()=>fi,_slugify:()=>bi,_size:()=>cn,_set:()=>pk,_safeParseAsync:()=>rn,_safeParse:()=>tn,_safeEncodeAsync:()=>M0,_safeEncode:()=>P0,_safeDecodeAsync:()=>D0,_safeDecode:()=>O0,_regex:()=>oi,_refine:()=>Em,_record:()=>dk,_readonly:()=>Ik,_property:()=>_c,_promise:()=>zk,_positive:()=>mc,_pipe:()=>Sk,_parseAsync:()=>en,_parse:()=>Qr,_overwrite:()=>Dt,_optional:()=>yk,_number:()=>im,_nullable:()=>_k,_null:()=>ym,_normalize:()=>pi,_nonpositive:()=>bc,_nonoptional:()=>kk,_nonnegative:()=>yc,_never:()=>km,_negative:()=>gc,_nativeEnum:()=>mk,_nanoid:()=>rc,_nan:()=>Im,_multipleOf:()=>wr,_minSize:()=>Ht,_minLength:()=>ir,_min:()=>ft,_mime:()=>hi,_maxSize:()=>Cr,_maxLength:()=>un,_max:()=>wt,_map:()=>hk,_mac:()=>Kv,_lte:()=>wt,_lt:()=>qt,_lowercase:()=>ci,_literal:()=>gk,_length:()=>ln,_lazy:()=>Ck,_ksuid:()=>oc,_jwt:()=>vc,_isoTime:()=>rm,_isoDuration:()=>nm,_isoDateTime:()=>em,_isoDate:()=>tm,_ipv6:()=>uc,_ipv4:()=>cc,_intersection:()=>lk,_int64:()=>vm,_int32:()=>um,_int:()=>sm,_includes:()=>li,_guid:()=>qn,_gte:()=>ft,_gt:()=>Ft,_float64:()=>cm,_float32:()=>om,_file:()=>Cm,_enum:()=>vk,_endsWith:()=>di,_encodeAsync:()=>N0,_encode:()=>z0,_emoji:()=>tc,_email:()=>V0,_e164:()=>pc,_discriminatedUnion:()=>uk,_default:()=>wk,_decodeAsync:()=>A0,_decode:()=>E0,_date:()=>xm,_custom:()=>zm,_cuid2:()=>ic,_cuid:()=>nc,_coercedString:()=>Xv,_coercedNumber:()=>am,_coercedDate:()=>Sm,_coercedBoolean:()=>dm,_coercedBigint:()=>pm,_cidrv6:()=>fc,_cidrv4:()=>lc,_check:()=>Am,_catch:()=>xk,_boolean:()=>fm,_bigint:()=>hm,_base64url:()=>hc,_base64:()=>dc,_array:()=>Tm,_any:()=>_m,TimePrecision:()=>Qv,NEVER:()=>v1,JSONSchemaGenerator:()=>Nk,JSONSchema:()=>Ak,Doc:()=>zp,$output:()=>Jv,$input:()=>Wv,$constructor:()=>F,$brand:()=>m1,$ZodXor:()=>yv,$ZodXID:()=>Zp,$ZodVoid:()=>dv,$ZodUnknown:()=>lv,$ZodUnion:()=>ai,$ZodUndefined:()=>ov,$ZodUUID:()=>Ap,$ZodURL:()=>Op,$ZodULID:()=>Up,$ZodType:()=>ye,$ZodTuple:()=>H0,$ZodTransform:()=>Cv,$ZodTemplateLiteral:()=>Uv,$ZodSymbol:()=>sv,$ZodSuccess:()=>Ov,$ZodStringFormat:()=>De,$ZodString:()=>on,$ZodSet:()=>xv,$ZodRegistry:()=>Yv,$ZodRecord:()=>kv,$ZodRealError:()=>bt,$ZodReadonly:()=>Lv,$ZodPromise:()=>jv,$ZodPrefault:()=>Av,$ZodPipe:()=>Rv,$ZodOptional:()=>G0,$ZodObjectJIT:()=>bv,$ZodObject:()=>gv,$ZodNumberFormat:()=>iv,$ZodNumber:()=>B0,$ZodNullable:()=>Ev,$ZodNull:()=>cv,$ZodNonOptional:()=>Pv,$ZodNever:()=>fv,$ZodNanoID:()=>Dp,$ZodNaN:()=>Dv,$ZodMap:()=>$v,$ZodMAC:()=>Wp,$ZodLiteral:()=>Iv,$ZodLazy:()=>Bv,$ZodKSUID:()=>jp,$ZodJWT:()=>rv,$ZodIntersection:()=>wv,$ZodISOTime:()=>Fp,$ZodISODuration:()=>Hp,$ZodISODateTime:()=>Bp,$ZodISODate:()=>qp,$ZodIPv6:()=>Jp,$ZodIPv4:()=>Gp,$ZodGUID:()=>Np,$ZodFunction:()=>Zv,$ZodFile:()=>Tv,$ZodExactOptional:()=>zv,$ZodError:()=>I0,$ZodEnum:()=>Sv,$ZodEncodeError:()=>ti,$ZodEmoji:()=>Mp,$ZodEmail:()=>Pp,$ZodE164:()=>ev,$ZodDiscriminatedUnion:()=>_v,$ZodDefault:()=>Nv,$ZodDate:()=>hv,$ZodCustomStringFormat:()=>nv,$ZodCustom:()=>qv,$ZodCodec:()=>J0,$ZodCheckUpperCase:()=>kp,$ZodCheckStringFormat:()=>sn,$ZodCheckStartsWith:()=>xp,$ZodCheckSizeEquals:()=>mp,$ZodCheckRegex:()=>_p,$ZodCheckProperty:()=>Ip,$ZodCheckOverwrite:()=>Cp,$ZodCheckNumberFormat:()=>dp,$ZodCheckMultipleOf:()=>fp,$ZodCheckMinSize:()=>vp,$ZodCheckMinLength:()=>bp,$ZodCheckMimeType:()=>Tp,$ZodCheckMaxSize:()=>pp,$ZodCheckMaxLength:()=>gp,$ZodCheckLowerCase:()=>wp,$ZodCheckLessThan:()=>U0,$ZodCheckLengthEquals:()=>yp,$ZodCheckIncludes:()=>$p,$ZodCheckGreaterThan:()=>Z0,$ZodCheckEndsWith:()=>Sp,$ZodCheckBigIntFormat:()=>hp,$ZodCheck:()=>qe,$ZodCatch:()=>Mv,$ZodCUID2:()=>Lp,$ZodCUID:()=>Rp,$ZodCIDRv6:()=>Vp,$ZodCIDRv4:()=>Yp,$ZodBoolean:()=>q0,$ZodBigIntFormat:()=>av,$ZodBigInt:()=>F0,$ZodBase64URL:()=>Qp,$ZodBase64:()=>Xp,$ZodAsyncError:()=>rr,$ZodArray:()=>pv,$ZodAny:()=>uv});var v1=Object.freeze({status:"aborted"});function F(e,r,n){function i(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),r(o,l);let d=s.prototype,p=Object.keys(d);for(let v=0;v<p.length;v++){let f=p[v];f in o||(o[f]=d[f].bind(o))}}let t=(n==null?void 0:n.Parent)??Object;class a extends t{}Object.defineProperty(a,"name",{value:e});function s(o){var l;let d=n!=null&&n.Parent?new a:this;i(d,o),(l=d._zod).deferred??(l.deferred=[]);for(let p of d._zod.deferred)p();return d}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:o=>{var l,d;return n!=null&&n.Parent&&o instanceof n.Parent?!0:(d=(l=o==null?void 0:o._zod)==null?void 0:l.traits)==null?void 0:d.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}var m1=Symbol("zod_brand");class rr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ti extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}var Ln={};function ot(e){return e&&Object.assign(Ln,e),Ln}var Te={};Ot(Te,{unwrapMessage:()=>Or,uint8ArrayToHex:()=>U9,uint8ArrayToBase64url:()=>R9,uint8ArrayToBase64:()=>I1,stringifyPrimitive:()=>me,slugify:()=>b1,shallowClone:()=>_1,safeExtend:()=>N9,required:()=>O9,randomString:()=>x9,propertyKeyTypes:()=>Zn,promiseAllObject:()=>$9,primitiveTypes:()=>w1,prefixIssues:()=>Tt,pick:()=>C9,partial:()=>P9,parsedType:()=>ge,optionalKeys:()=>k1,omit:()=>z9,objectClone:()=>_9,numKeys:()=>S9,nullish:()=>or,normalizeParams:()=>re,mergeDefs:()=>Mt,merge:()=>A9,jsonStringifyReplacer:()=>Un,joinValues:()=>te,issue:()=>jn,isPlainObject:()=>nr,isObject:()=>yr,hexToUint8Array:()=>L9,getSizableOrigin:()=>ni,getParsedType:()=>I9,getLengthableOrigin:()=>ii,getEnumValues:()=>x0,getElementAtPath:()=>k9,floatSafeRemainder:()=>g1,finalizeIssue:()=>kt,extend:()=>E9,escapeRegex:()=>Pt,esc:()=>Ho,defineLazy:()=>$e,createTransparentProxy:()=>T9,cloneDef:()=>w9,clone:()=>It,cleanRegex:()=>ri,cleanEnum:()=>M9,captureStackTrace:()=>S0,cached:()=>Kr,base64urlToUint8Array:()=>D9,base64ToUint8Array:()=>S1,assignProp:()=>Wt,assertNotEqual:()=>m9,assertNever:()=>b9,assertIs:()=>g9,assertEqual:()=>v9,assert:()=>y9,allowsEval:()=>y1,aborted:()=>tr,NUMBER_FORMAT_RANGES:()=>$1,Class:()=>Z9,BIGINT_FORMAT_RANGES:()=>x1});function v9(e){return e}function m9(e){return e}function g9(e){}function b9(e){throw Error("Unexpected value in exhaustive check")}function y9(e){}function x0(e){let r=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>r.indexOf(+n)===-1).map(([n,i])=>i)}function te(e,r="|"){return e.map(n=>me(n)).join(r)}function Un(e,r){return typeof r=="bigint"?r.toString():r}function Kr(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function or(e){return e==null}function ri(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function g1(e,r){let n=(e.toString().split(".")[1]||"").length,i=r.toString(),t=(i.split(".")[1]||"").length;if(t===0&&/\d?e-\d?/.test(i)){let l=i.match(/\d?e-(\d?)/);l!=null&&l[1]&&(t=Number.parseInt(l[1]))}let a=n>t?n:t,s=Number.parseInt(e.toFixed(a).replace(".","")),o=Number.parseInt(r.toFixed(a).replace(".",""));return s%o/10**a}var il=Symbol("evaluating");function $e(e,r,n){let i;Object.defineProperty(e,r,{get(){if(i!==il)return i===void 0&&(i=il,i=n()),i},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function _9(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Wt(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Mt(...e){let r={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(r,i)}return Object.defineProperties({},r)}function w9(e){return Mt(e._zod.def)}function k9(e,r){return r?r.reduce((n,i)=>n==null?void 0:n[i],e):e}function $9(e){let r=Object.keys(e),n=r.map(i=>e[i]);return Promise.all(n).then(i=>{let t={};for(let a=0;a<r.length;a++)t[r[a]]=i[a];return t})}function x9(e=10){let r="";for(let n=0;n<e;n++)r+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return r}function Ho(e){return JSON.stringify(e)}function b1(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var S0="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function yr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var y1=Kr(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{return new Function(""),!0}catch{return!1}});function nr(e){if(yr(e)===!1)return!1;let r=e.constructor;if(r===void 0||typeof r!="function")return!0;let n=r.prototype;return!(yr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function _1(e){return nr(e)?{...e}:Array.isArray(e)?[...e]:e}function S9(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}var I9=e=>{let r=typeof e;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw Error(`Unknown data type: ${r}`)}},Zn=new Set(["string","number","symbol"]),w1=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Pt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function It(e,r,n){let i=new e._zod.constr(r??e._zod.def);return(!r||n!=null&&n.parent)&&(i._zod.parent=e),i}function re(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if((r==null?void 0:r.message)!==void 0){if((r==null?void 0:r.error)!==void 0)throw Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function T9(e){let r;return new Proxy({},{get(n,i,t){return r??(r=e()),Reflect.get(r,i,t)},set(n,i,t,a){return r??(r=e()),Reflect.set(r,i,t,a)},has(n,i){return r??(r=e()),Reflect.has(r,i)},deleteProperty(n,i){return r??(r=e()),Reflect.deleteProperty(r,i)},ownKeys(n){return r??(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,i){return r??(r=e()),Reflect.getOwnPropertyDescriptor(r,i)},defineProperty(n,i,t){return r??(r=e()),Reflect.defineProperty(r,i,t)}})}function me(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function k1(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var $1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},x1={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function C9(e,r){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let t=Mt(e._zod.def,{get shape(){let a={};for(let s in r){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=n.shape[s])}return Wt(this,"shape",a),a},checks:[]});return It(e,t)}function z9(e,r){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let t=Mt(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in r){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);r[s]&&delete a[s]}return Wt(this,"shape",a),a},checks:[]});return It(e,t)}function E9(e,r){if(!nr(r))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let t=e._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(t,a)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Mt(e._zod.def,{get shape(){let t={...e._zod.def.shape,...r};return Wt(this,"shape",t),t}});return It(e,i)}function N9(e,r){if(!nr(r))throw Error("Invalid input to safeExtend: expected a plain object");let n=Mt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...r};return Wt(this,"shape",i),i}});return It(e,n)}function A9(e,r){let n=Mt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...r._zod.def.shape};return Wt(this,"shape",i),i},get catchall(){return r._zod.def.catchall},checks:[]});return It(e,n)}function P9(e,r,n){let i=r._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let t=Mt(r._zod.def,{get shape(){let a=r._zod.def.shape,s={...a};if(n)for(let o in n){if(!(o in a))throw Error(`Unrecognized key: "${o}"`);n[o]&&(s[o]=e?new e({type:"optional",innerType:a[o]}):a[o])}else for(let o in a)s[o]=e?new e({type:"optional",innerType:a[o]}):a[o];return Wt(this,"shape",s),s},checks:[]});return It(r,t)}function O9(e,r,n){let i=Mt(r._zod.def,{get shape(){let t=r._zod.def.shape,a={...t};if(n)for(let s in n){if(!(s in a))throw Error(`Unrecognized key: "${s}"`);n[s]&&(a[s]=new e({type:"nonoptional",innerType:t[s]}))}else for(let s in t)a[s]=new e({type:"nonoptional",innerType:t[s]});return Wt(this,"shape",a),a}});return It(r,i)}function tr(e,r=0){var n;if(e.aborted===!0)return!0;for(let i=r;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)!==!0)return!0;return!1}function Tt(e,r){return r.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Or(e){return typeof e=="string"?e:e==null?void 0:e.message}function kt(e,r,n){var t,a,s,o,l,d;let i={...e,path:e.path??[]};if(!e.message){let p=Or((s=(a=(t=e.inst)==null?void 0:t._zod.def)==null?void 0:a.error)==null?void 0:s.call(a,e))??Or((o=r==null?void 0:r.error)==null?void 0:o.call(r,e))??Or((l=n.customError)==null?void 0:l.call(n,e))??Or((d=n.localeError)==null?void 0:d.call(n,e))??"Invalid input";i.message=p}return delete i.inst,delete i.continue,!(r!=null&&r.reportInput)&&delete i.input,i}function ni(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ii(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ge(e){let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return r}function jn(...e){let[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:{...r}}function M9(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function S1(e){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}function I1(e){let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}function D9(e){let r=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-r.length%4)%4);return S1(r+n)}function R9(e){return I1(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function L9(e){let r=e.replace(/^0x/,"");if(r.length%2!==0)throw Error("Invalid hex string length");let n=new Uint8Array(r.length/2);for(let i=0;i<r.length;i+=2)n[i/2]=Number.parseInt(r.slice(i,i+2),16);return n}function U9(e){return Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}class Z9{constructor(...r){}}var T1=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Un,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},I0=F("$ZodError",T1),bt=F("$ZodError",T1,{Parent:Error});function T0(e,r=n=>n.message){let n={},i=[];for(let t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):i.push(r(t));return{formErrors:i,fieldErrors:n}}function C0(e,r=n=>n.message){let n={_errors:[]},i=t=>{for(let a of t.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s}));else if(a.code==="invalid_key")i({issues:a.issues});else if(a.code==="invalid_element")i({issues:a.issues});else if(a.path.length===0)n._errors.push(r(a));else{let s=n,o=0;for(;o<a.path.length;){let l=a.path[o];o!==a.path.length-1?s[l]=s[l]||{_errors:[]}:(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))),s=s[l],o++}}};return i(e),n}function C1(e,r=n=>n.message){let n={errors:[]},i=(t,a=[])=>{var s,o;for(let l of t.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(d=>i({issues:d},l.path));else if(l.code==="invalid_key")i({issues:l.issues},l.path);else if(l.code==="invalid_element")i({issues:l.issues},l.path);else{let d=[...a,...l.path];if(d.length===0){n.errors.push(r(l));continue}let p=n,v=0;for(;v<d.length;){let f=d[v],u=v===d.length-1;typeof f=="string"?(p.properties??(p.properties={}),(s=p.properties)[f]??(s[f]={errors:[]}),p=p.properties[f]):(p.items??(p.items=[]),(o=p.items)[f]??(o[f]={errors:[]}),p=p.items[f]),u&&p.errors.push(r(l)),v++}}};return i(e),n}function z1(e){let r=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?r.push(`[${i}]`):typeof i=="symbol"?r.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?r.push(`[${JSON.stringify(i)}]`):(r.length&&r.push("."),r.push(i));return r.join("")}function E1(e){var i;let r=[],n=[...e.issues].sort((t,a)=>(t.path??[]).length-(a.path??[]).length);for(let t of n)r.push(`✖ ${t.message}`),(i=t.path)!=null&&i.length&&r.push(` → at ${z1(t.path)}`);return r.join(`
|
|
47
|
-
`)}var Qr=e=>(r,n,i,t)=>{let a=i?Object.assign(i,{async:!1}):{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new rr;if(s.issues.length){let o=new((t==null?void 0:t.Err)??e)(s.issues.map(l=>kt(l,a,ot())));throw S0(o,t==null?void 0:t.callee),o}return s.value},Go=Qr(bt),en=e=>async(r,n,i,t)=>{let a=i?Object.assign(i,{async:!0}):{async:!0},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let o=new((t==null?void 0:t.Err)??e)(s.issues.map(l=>kt(l,a,ot())));throw S0(o,t==null?void 0:t.callee),o}return s.value},Jo=en(bt),tn=e=>(r,n,i)=>{let t=i?{...i,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},t);if(a instanceof Promise)throw new rr;return a.issues.length?{success:!1,error:new(e??I0)(a.issues.map(s=>kt(s,t,ot())))}:{success:!0,data:a.value}},N1=tn(bt),rn=e=>async(r,n,i)=>{let t=i?Object.assign(i,{async:!0}):{async:!0},a=r._zod.run({value:n,issues:[]},t);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>kt(s,t,ot())))}:{success:!0,data:a.value}},A1=rn(bt),z0=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Qr(e)(r,n,t)},j9=z0(bt),E0=e=>(r,n,i)=>Qr(e)(r,n,i),B9=E0(bt),N0=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return en(e)(r,n,t)},q9=N0(bt),A0=e=>async(r,n,i)=>en(e)(r,n,i),F9=A0(bt),P0=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return tn(e)(r,n,t)},H9=P0(bt),O0=e=>(r,n,i)=>tn(e)(r,n,i),G9=O0(bt),M0=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return rn(e)(r,n,t)},J9=M0(bt),D0=e=>async(r,n,i)=>rn(e)(r,n,i),W9=D0(bt),cr={};Ot(cr,{xid:()=>D1,uuid7:()=>K9,uuid6:()=>X9,uuid4:()=>V9,uuid:()=>_r,uppercase:()=>up,unicodeEmail:()=>B1,undefined:()=>op,ulid:()=>M1,time:()=>ep,string:()=>rp,sha512_hex:()=>y8,sha512_base64url:()=>w8,sha512_base64:()=>_8,sha384_hex:()=>m8,sha384_base64url:()=>b8,sha384_base64:()=>g8,sha256_hex:()=>h8,sha256_base64url:()=>v8,sha256_base64:()=>p8,sha1_hex:()=>l8,sha1_base64url:()=>d8,sha1_base64:()=>f8,rfc5322Email:()=>e8,number:()=>L0,null:()=>sp,nanoid:()=>L1,md5_hex:()=>o8,md5_base64url:()=>u8,md5_base64:()=>c8,mac:()=>G1,lowercase:()=>cp,ksuid:()=>R1,ipv6:()=>H1,ipv4:()=>F1,integer:()=>ip,idnEmail:()=>t8,html5Email:()=>Q9,hostname:()=>i8,hex:()=>s8,guid:()=>Z1,extendedDuration:()=>Y9,emoji:()=>q1,email:()=>j1,e164:()=>V1,duration:()=>U1,domain:()=>a8,datetime:()=>tp,date:()=>K1,cuid2:()=>O1,cuid:()=>P1,cidrv6:()=>W1,cidrv4:()=>J1,browserEmail:()=>r8,boolean:()=>ap,bigint:()=>np,base64url:()=>R0,base64:()=>Y1});var P1=/^[cC][^\s-]{8,}$/,O1=/^[0-9a-z]+$/,M1=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,D1=/^[0-9a-vA-V]{20}$/,R1=/^[A-Za-z0-9]{27}$/,L1=/^[a-zA-Z0-9_-]{21}$/,U1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Y9=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Z1=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,_r=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,V9=_r(4),X9=_r(6),K9=_r(7),j1=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Q9=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,e8=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,B1=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,t8=B1,r8=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,n8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function q1(){return new RegExp(n8,"u")}var F1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,H1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,G1=e=>{let r=Pt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${r}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${r}){5}[0-9a-f]{2}$`)},J1=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,W1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Y1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,R0=/^[A-Za-z0-9_-]*$/,i8=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,a8=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,V1=/^\+[1-9]\d{6,14}$/,X1="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",K1=new RegExp(`^${X1}$`);function Q1(e){return typeof e.precision=="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function ep(e){return new RegExp(`^${Q1(e)}$`)}function tp(e){let r=Q1({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${r}(?:${n.join("|")})`;return new RegExp(`^${X1}T(?:${i})$`)}var rp=e=>{let r=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},np=/^-?\d+n?$/,ip=/^-?\d+$/,L0=/^-?\d+(?:\.\d+)?$/,ap=/^(?:true|false)$/i,sp=/^null$/i,op=/^undefined$/i,cp=/^[^A-Z]*$/,up=/^[^a-z]*$/,s8=/^[0-9a-fA-F]*$/;function nn(e,r){return new RegExp(`^[A-Za-z0-9+/]{${e}}${r}$`)}function an(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var o8=/^[0-9a-fA-F]{32}$/,c8=nn(22,"=="),u8=an(22),l8=/^[0-9a-fA-F]{40}$/,f8=nn(27,"="),d8=an(27),h8=/^[0-9a-fA-F]{64}$/,p8=nn(43,"="),v8=an(43),m8=/^[0-9a-fA-F]{96}$/,g8=nn(64,""),b8=an(64),y8=/^[0-9a-fA-F]{128}$/,_8=nn(86,"=="),w8=an(86),qe=F("$ZodCheck",(e,r)=>{var n;e._zod??(e._zod={}),e._zod.def=r,(n=e._zod).onattach??(n.onattach=[])}),lp={number:"number",bigint:"bigint",object:"date"},U0=F("$ZodCheckLessThan",(e,r)=>{qe.init(e,r);let n=lp[typeof r.value];e._zod.onattach.push(i=>{let t=i._zod.bag,a=(r.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<a&&(r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value<=r.value:i.value<r.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Z0=F("$ZodCheckGreaterThan",(e,r)=>{qe.init(e,r);let n=lp[typeof r.value];e._zod.onattach.push(i=>{let t=i._zod.bag,a=(r.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>a&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),fp=F("$ZodCheckMultipleOf",(e,r)=>{qe.init(e,r),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):g1(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),dp=F("$ZodCheckNumberFormat",(e,r)=>{var s;qe.init(e,r),r.format=r.format||"float64";let n=(s=r.format)==null?void 0:s.includes("int"),i=n?"int":"number",[t,a]=$1[r.format];e._zod.onattach.push(o=>{let l=o._zod.bag;l.format=r.format,l.minimum=t,l.maximum=a,n&&(l.pattern=ip)}),e._zod.check=o=>{let l=o.value;if(n){if(!Number.isInteger(l)){o.issues.push({expected:i,format:r.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?o.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort}):o.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort});return}}l<t&&o.issues.push({origin:"number",input:l,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),l>a&&o.issues.push({origin:"number",input:l,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!r.abort})}}),hp=F("$ZodCheckBigIntFormat",(e,r)=>{qe.init(e,r);let[n,i]=x1[r.format];e._zod.onattach.push(t=>{let a=t._zod.bag;a.format=r.format,a.minimum=n,a.maximum=i}),e._zod.check=t=>{let a=t.value;a<n&&t.issues.push({origin:"bigint",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort}),a>i&&t.issues.push({origin:"bigint",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!r.abort})}}),pp=F("$ZodCheckMaxSize",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!or(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<t&&(i._zod.bag.maximum=r.maximum)}),e._zod.check=i=>{let t=i.value;t.size<=r.maximum||i.issues.push({origin:ni(t),code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),vp=F("$ZodCheckMinSize",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!or(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(i._zod.bag.minimum=r.minimum)}),e._zod.check=i=>{let t=i.value;t.size>=r.minimum||i.issues.push({origin:ni(t),code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),mp=F("$ZodCheckSizeEquals",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!or(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag;t.minimum=r.size,t.maximum=r.size,t.size=r.size}),e._zod.check=i=>{let t=i.value,a=t.size;if(a===r.size)return;let s=a>r.size;i.issues.push({origin:ni(t),...s?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!r.abort})}}),gp=F("$ZodCheckMaxLength",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!or(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<t&&(i._zod.bag.maximum=r.maximum)}),e._zod.check=i=>{let t=i.value;if(t.length<=r.maximum)return;let a=ii(t);i.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),bp=F("$ZodCheckMinLength",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!or(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(i._zod.bag.minimum=r.minimum)}),e._zod.check=i=>{let t=i.value;if(t.length>=r.minimum)return;let a=ii(t);i.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),yp=F("$ZodCheckLengthEquals",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!or(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag;t.minimum=r.length,t.maximum=r.length,t.length=r.length}),e._zod.check=i=>{let t=i.value,a=t.length;if(a===r.length)return;let s=ii(t),o=a>r.length;i.issues.push({origin:s,...o?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!r.abort})}}),sn=F("$ZodCheckStringFormat",(e,r)=>{var n,i;qe.init(e,r),e._zod.onattach.push(t=>{let a=t._zod.bag;a.format=r.format,r.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(r.pattern))}),r.pattern?(n=e._zod).check??(n.check=t=>{r.pattern.lastIndex=0,!r.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:r.format,input:t.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(i=e._zod).check??(i.check=()=>{})}),_p=F("$ZodCheckRegex",(e,r)=>{sn.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),wp=F("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=cp),sn.init(e,r)}),kp=F("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=up),sn.init(e,r)}),$p=F("$ZodCheckIncludes",(e,r)=>{qe.init(e,r);let n=Pt(r.includes),i=new RegExp(typeof r.position=="number"?`^.{${r.position}}${n}`:n);r.pattern=i,e._zod.onattach.push(t=>{let a=t._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(i)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),xp=F("$ZodCheckStartsWith",(e,r)=>{qe.init(e,r);let n=new RegExp(`^${Pt(r.prefix)}.*`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{let t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(r.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:i.value,inst:e,continue:!r.abort})}}),Sp=F("$ZodCheckEndsWith",(e,r)=>{qe.init(e,r);let n=new RegExp(`.*${Pt(r.suffix)}$`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{let t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(r.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:i.value,inst:e,continue:!r.abort})}});function al(e,r,n){e.issues.length&&r.issues.push(...Tt(n,e.issues))}var Ip=F("$ZodCheckProperty",(e,r)=>{qe.init(e,r),e._zod.check=n=>{let i=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(i instanceof Promise)return i.then(t=>al(t,n,r.property));al(i,n,r.property)}}),Tp=F("$ZodCheckMimeType",(e,r)=>{qe.init(e,r);let n=new Set(r.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=r.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:r.mime,input:i.value.type,inst:e,continue:!r.abort})}}),Cp=F("$ZodCheckOverwrite",(e,r)=>{qe.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});class zp{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let n=r.split(`
|
|
48
|
-
`).filter(a=>a),i=Math.min(...n.map(a=>a.length-a.trimStart().length)),t=n.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(let a of t)this.content.push(a)}compile(){let r=Function,n=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(t=>` ${t}`)];return new r(...n,i.join(`
|
|
49
|
-
`))}}var Ep={major:4,minor:3,patch:5},ye=F("$ZodType",(e,r)=>{var t;var n;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=Ep;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let a of i)for(let s of a._zod.onattach)s(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),(t=e._zod.deferred)==null||t.push(()=>{e._zod.run=e._zod.parse});else{let a=(o,l,d)=>{let p=tr(o),v;for(let f of l){if(f._zod.def.when){if(!f._zod.def.when(o))continue}else if(p)continue;let u=o.issues.length,h=f._zod.check(o);if(h instanceof Promise&&(d==null?void 0:d.async)===!1)throw new rr;if(v||h instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await h,o.issues.length!==u&&(p||(p=tr(o,u)))});else{if(o.issues.length===u)continue;p||(p=tr(o,u))}}return v?v.then(()=>o):o},s=(o,l,d)=>{if(tr(o))return o.aborted=!0,o;let p=a(l,i,d);if(p instanceof Promise){if(d.async===!1)throw new rr;return p.then(v=>e._zod.parse(v,d))}return e._zod.parse(p,d)};e._zod.run=(o,l)=>{if(l.skipChecks)return e._zod.parse(o,l);if(l.direction==="backward"){let p=e._zod.parse({value:o.value,issues:[]},{...l,skipChecks:!0});return p instanceof Promise?p.then(v=>s(v,o,l)):s(p,o,l)}let d=e._zod.parse(o,l);if(d instanceof Promise){if(l.async===!1)throw new rr;return d.then(p=>a(p,i,l))}return a(d,i,l)}}$e(e,"~standard",()=>({validate:a=>{var s;try{let o=N1(e,a);return o.success?{value:o.data}:{issues:(s=o.error)==null?void 0:s.issues}}catch{return A1(e,a).then(l=>{var d;return l.success?{value:l.data}:{issues:(d=l.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),on=F("$ZodString",(e,r)=>{var n;ye.init(e,r),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??rp(e._zod.bag),e._zod.parse=(i,t)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),De=F("$ZodStringFormat",(e,r)=>{sn.init(e,r),on.init(e,r)}),Np=F("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=Z1),De.init(e,r)}),Ap=F("$ZodUUID",(e,r)=>{if(r.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(n===void 0)throw Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=_r(n))}else r.pattern??(r.pattern=_r());De.init(e,r)}),Pp=F("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=j1),De.init(e,r)}),Op=F("$ZodURL",(e,r)=>{De.init(e,r),e._zod.check=n=>{try{let i=n.value.trim(),t=new URL(i);r.hostname&&(r.hostname.lastIndex=0,!r.hostname.test(t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,!r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),r.normalize?n.value=t.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),Mp=F("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=q1()),De.init(e,r)}),Dp=F("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=L1),De.init(e,r)}),Rp=F("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=P1),De.init(e,r)}),Lp=F("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=O1),De.init(e,r)}),Up=F("$ZodULID",(e,r)=>{r.pattern??(r.pattern=M1),De.init(e,r)}),Zp=F("$ZodXID",(e,r)=>{r.pattern??(r.pattern=D1),De.init(e,r)}),jp=F("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=R1),De.init(e,r)}),Bp=F("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=tp(r)),De.init(e,r)}),qp=F("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=K1),De.init(e,r)}),Fp=F("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=ep(r)),De.init(e,r)}),Hp=F("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=U1),De.init(e,r)}),Gp=F("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=F1),De.init(e,r),e._zod.bag.format="ipv4"}),Jp=F("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=H1),De.init(e,r),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!r.abort})}}}),Wp=F("$ZodMAC",(e,r)=>{r.pattern??(r.pattern=G1(r.delimiter)),De.init(e,r),e._zod.bag.format="mac"}),Yp=F("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=J1),De.init(e,r)}),Vp=F("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=W1),De.init(e,r),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw Error();let[t,a]=i;if(!a)throw Error();let s=Number(a);if(`${s}`!==a||s<0||s>128)throw Error();new URL(`http://[${t}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!r.abort})}}});function j0(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Xp=F("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=Y1),De.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{j0(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!r.abort})}});function Kp(e){if(!R0.test(e))return!1;let r=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return j0(n)}var Qp=F("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=R0),De.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Kp(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!r.abort})}}),ev=F("$ZodE164",(e,r)=>{r.pattern??(r.pattern=V1),De.init(e,r)});function tv(e,r=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let t=JSON.parse(atob(i));return!("typ"in t&&(t==null?void 0:t.typ)!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch{return!1}}var rv=F("$ZodJWT",(e,r)=>{De.init(e,r),e._zod.check=n=>{tv(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),nv=F("$ZodCustomStringFormat",(e,r)=>{De.init(e,r),e._zod.check=n=>{r.fn(n.value)||n.issues.push({code:"invalid_format",format:r.format,input:n.value,inst:e,continue:!r.abort})}}),B0=F("$ZodNumber",(e,r)=>{ye.init(e,r),e._zod.pattern=e._zod.bag.pattern??L0,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=Number(n.value)}catch{}let t=n.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return n;let a=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...a?{received:a}:{}}),n}}),iv=F("$ZodNumberFormat",(e,r)=>{dp.init(e,r),B0.init(e,r)}),q0=F("$ZodBoolean",(e,r)=>{ye.init(e,r),e._zod.pattern=ap,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=!!n.value}catch{}let t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),F0=F("$ZodBigInt",(e,r)=>{ye.init(e,r),e._zod.pattern=np,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),av=F("$ZodBigIntFormat",(e,r)=>{hp.init(e,r),F0.init(e,r)}),sv=F("$ZodSymbol",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),n}}),ov=F("$ZodUndefined",(e,r)=>{ye.init(e,r),e._zod.pattern=op,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),n}}),cv=F("$ZodNull",(e,r)=>{ye.init(e,r),e._zod.pattern=sp,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),uv=F("$ZodAny",(e,r)=>{ye.init(e,r),e._zod.parse=n=>n}),lv=F("$ZodUnknown",(e,r)=>{ye.init(e,r),e._zod.parse=n=>n}),fv=F("$ZodNever",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),dv=F("$ZodVoid",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),n}}),hv=F("$ZodDate",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=new Date(n.value)}catch{}let t=n.value,a=t instanceof Date;return a&&!Number.isNaN(t.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:t,...a?{received:"Invalid Date"}:{},inst:e}),n}});function sl(e,r,n){e.issues.length&&r.issues.push(...Tt(n,e.issues)),r.value[n]=e.value}var pv=F("$ZodArray",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);let a=[];for(let s=0;s<t.length;s++){let o=t[s],l=r.element._zod.run({value:o,issues:[]},i);l instanceof Promise?a.push(l.then(d=>sl(d,n,s))):sl(l,n,s)}return a.length?Promise.all(a).then(()=>n):n}});function Bn(e,r,n,i,t){if(e.issues.length){if(t&&!(n in i))return;r.issues.push(...Tt(n,e.issues))}e.value===void 0?n in i&&(r.value[n]=void 0):r.value[n]=e.value}function vv(e){var i,t,a,s;let r=Object.keys(e.shape);for(let o of r)if(!((s=(a=(t=(i=e.shape)==null?void 0:i[o])==null?void 0:t._zod)==null?void 0:a.traits)!=null&&s.has("$ZodType")))throw Error(`Invalid element at key "${o}": expected a Zod schema`);let n=k1(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)}}function mv(e,r,n,i,t,a){let s=[],o=t.keySet,l=t.catchall._zod,d=l.def.type,p=l.optout==="optional";for(let v in r){if(o.has(v))continue;if(d==="never"){s.push(v);continue}let f=l.run({value:r[v],issues:[]},i);f instanceof Promise?e.push(f.then(u=>Bn(u,n,v,r,p))):Bn(f,n,v,r,p)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:r,inst:a}),e.length?Promise.all(e).then(()=>n):n}var gv=F("$ZodObject",(e,r)=>{var s;if(ye.init(e,r),!((s=Object.getOwnPropertyDescriptor(r,"shape"))!=null&&s.get)){let o=r.shape;Object.defineProperty(r,"shape",{get:()=>{let l={...o};return Object.defineProperty(r,"shape",{value:l}),l}})}let n=Kr(()=>vv(r));$e(e._zod,"propValues",()=>{let o=r.shape,l={};for(let d in o){let p=o[d]._zod;if(p.values){l[d]??(l[d]=new Set);for(let v of p.values)l[d].add(v)}}return l});let i=yr,t=r.catchall,a;e._zod.parse=(o,l)=>{a??(a=n.value);let d=o.value;if(!i(d))return o.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),o;o.value={};let p=[],v=a.shape;for(let f of a.keys){let u=v[f],h=u._zod.optout==="optional",c=u._zod.run({value:d[f],issues:[]},l);c instanceof Promise?p.push(c.then(m=>Bn(m,o,f,d,h))):Bn(c,o,f,d,h)}return t?mv(p,d,o,l,n.value,e):p.length?Promise.all(p).then(()=>o):o}}),bv=F("$ZodObjectJIT",(e,r)=>{gv.init(e,r);let n=e._zod.parse,i=Kr(()=>vv(r)),t=v=>{var g,w;let f=new zp(["shape","payload","ctx"]),u=i.value,h=k=>{let $=Ho(k);return`shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`};f.write("const input = payload.value;");let c=Object.create(null),m=0;for(let k of u.keys)c[k]=`key_${m++}`;f.write("const newResult = {};");for(let k of u.keys){let $=c[k],O=Ho(k),P=((w=(g=v[k])==null?void 0:g._zod)==null?void 0:w.optout)==="optional";f.write(`const ${$} = ${h(k)};`),P?f.write(`
|
|
50
|
-
if (${$}.issues.length) {
|
|
51
|
-
if (${O} in input) {
|
|
52
|
-
payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
|
|
53
|
-
...iss,
|
|
54
|
-
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
55
|
-
})));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (${$}.value === undefined) {
|
|
60
|
-
if (${O} in input) {
|
|
61
|
-
newResult[${O}] = undefined;
|
|
62
|
-
}
|
|
63
|
-
} else {
|
|
64
|
-
newResult[${O}] = ${$}.value;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
`):f.write(`
|
|
68
|
-
if (${$}.issues.length) {
|
|
69
|
-
payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
|
|
70
|
-
...iss,
|
|
71
|
-
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
72
|
-
})));
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (${$}.value === undefined) {
|
|
76
|
-
if (${O} in input) {
|
|
77
|
-
newResult[${O}] = undefined;
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
newResult[${O}] = ${$}.value;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
`)}f.write("payload.value = newResult;"),f.write("return payload;");let b=f.compile();return(k,$)=>b(v,k,$)},a,s=yr,o=!Ln.jitless,l=o&&y1.value,d=r.catchall,p;e._zod.parse=(v,f)=>{p??(p=i.value);let u=v.value;return s(u)?o&&l&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(a||(a=t(r.shape)),v=a(v,f),d?mv([],u,v,f,p,e):v):n(v,f):(v.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),v)}});function ol(e,r,n,i){for(let a of e)if(a.issues.length===0)return r.value=a.value,r;let t=e.filter(a=>!tr(a));return t.length===1?(r.value=t[0].value,t[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(a=>a.issues.map(s=>kt(s,i,ot())))}),r)}var ai=F("$ZodUnion",(e,r)=>{ye.init(e,r),$e(e._zod,"optin",()=>r.options.some(t=>t._zod.optin==="optional")?"optional":void 0),$e(e._zod,"optout",()=>r.options.some(t=>t._zod.optout==="optional")?"optional":void 0),$e(e._zod,"values",()=>{if(r.options.every(t=>t._zod.values))return new Set(r.options.flatMap(t=>Array.from(t._zod.values)))}),$e(e._zod,"pattern",()=>{if(r.options.every(t=>t._zod.pattern)){let t=r.options.map(a=>a._zod.pattern);return new RegExp(`^(${t.map(a=>ri(a.source)).join("|")})$`)}});let n=r.options.length===1,i=r.options[0]._zod.run;e._zod.parse=(t,a)=>{if(n)return i(t,a);let s=!1,o=[];for(let l of r.options){let d=l._zod.run({value:t.value,issues:[]},a);if(d instanceof Promise)o.push(d),s=!0;else{if(d.issues.length===0)return d;o.push(d)}}return s?Promise.all(o).then(l=>ol(l,t,e,a)):ol(o,t,e,a)}});function cl(e,r,n,i){let t=e.filter(a=>a.issues.length===0);return t.length===1?(r.value=t[0].value,r):(t.length===0?r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(a=>a.issues.map(s=>kt(s,i,ot())))}):r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:[],inclusive:!1}),r)}var yv=F("$ZodXor",(e,r)=>{ai.init(e,r),r.inclusive=!1;let n=r.options.length===1,i=r.options[0]._zod.run;e._zod.parse=(t,a)=>{if(n)return i(t,a);let s=!1,o=[];for(let l of r.options){let d=l._zod.run({value:t.value,issues:[]},a);d instanceof Promise?(o.push(d),s=!0):o.push(d)}return s?Promise.all(o).then(l=>cl(l,t,e,a)):cl(o,t,e,a)}}),_v=F("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,ai.init(e,r);let n=e._zod.parse;$e(e._zod,"propValues",()=>{let t={};for(let a of r.options){let s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index "${r.options.indexOf(a)}"`);for(let[o,l]of Object.entries(s)){t[o]||(t[o]=new Set);for(let d of l)t[o].add(d)}}return t});let i=Kr(()=>{var s;let t=r.options,a=new Map;for(let o of t){let l=(s=o._zod.propValues)==null?void 0:s[r.discriminator];if(!l||l.size===0)throw Error(`Invalid discriminated union option at index "${r.options.indexOf(o)}"`);for(let d of l){if(a.has(d))throw Error(`Duplicate discriminator value "${String(d)}"`);a.set(d,o)}}return a});e._zod.parse=(t,a)=>{let s=t.value;if(!yr(s))return t.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),t;let o=i.value.get(s==null?void 0:s[r.discriminator]);return o?o._zod.run(t,a):r.unionFallback?n(t,a):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:s,path:[r.discriminator],inst:e}),t)}}),wv=F("$ZodIntersection",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value,a=r.left._zod.run({value:t,issues:[]},i),s=r.right._zod.run({value:t,issues:[]},i);return a instanceof Promise||s instanceof Promise?Promise.all([a,s]).then(([o,l])=>ul(n,o,l)):ul(n,a,s)}});function Wo(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(nr(e)&&nr(r)){let n=Object.keys(r),i=Object.keys(e).filter(a=>n.indexOf(a)!==-1),t={...e,...r};for(let a of i){let s=Wo(e[a],r[a]);if(!s.valid)return{valid:!1,mergeErrorPath:[a,...s.mergeErrorPath]};t[a]=s.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let t=e[i],a=r[i],s=Wo(t,a);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ul(e,r,n){let i=new Map,t;for(let o of r.issues)if(o.code==="unrecognized_keys"){t??(t=o);for(let l of o.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else e.issues.push(o);for(let o of n.issues)if(o.code==="unrecognized_keys")for(let l of o.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else e.issues.push(o);let a=[...i].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(a.length&&t&&e.issues.push({...t,keys:a}),tr(e))return e;let s=Wo(r.value,n.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var H0=F("$ZodTuple",(e,r)=>{ye.init(e,r);let n=r.items;e._zod.parse=(i,t)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],o=[...n].reverse().findIndex(p=>p._zod.optin!=="optional"),l=o===-1?0:n.length-o;if(!r.rest){let p=a.length>n.length,v=a.length<l-1;if(p||v)return i.issues.push({...p?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:a,inst:e,origin:"array"}),i}let d=-1;for(let p of n){if(d++,d>=a.length&&d>=l)continue;let v=p._zod.run({value:a[d],issues:[]},t);v instanceof Promise?s.push(v.then(f=>Tn(f,i,d))):Tn(v,i,d)}if(r.rest){let p=a.slice(n.length);for(let v of p){d++;let f=r.rest._zod.run({value:v,issues:[]},t);f instanceof Promise?s.push(f.then(u=>Tn(u,i,d))):Tn(f,i,d)}}return s.length?Promise.all(s).then(()=>i):i}});function Tn(e,r,n){e.issues.length&&r.issues.push(...Tt(n,e.issues)),r.value[n]=e.value}var kv=F("$ZodRecord",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!nr(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let a=[],s=r.keyType._zod.values;if(s){n.value={};let o=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){o.add(typeof d=="number"?d.toString():d);let p=r.valueType._zod.run({value:t[d],issues:[]},i);p instanceof Promise?a.push(p.then(v=>{v.issues.length&&n.issues.push(...Tt(d,v.issues)),n.value[d]=v.value})):(p.issues.length&&n.issues.push(...Tt(d,p.issues)),n.value[d]=p.value)}let l;for(let d in t)o.has(d)||(l=l??[],l.push(d));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:l})}else{n.value={};for(let o of Reflect.ownKeys(t)){if(o==="__proto__")continue;let l=r.keyType._zod.run({value:o,issues:[]},i);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof o=="string"&&L0.test(o)&&l.issues.length&&l.issues.some(p=>p.code==="invalid_type"&&p.expected==="number")){let p=r.keyType._zod.run({value:Number(o),issues:[]},i);if(p instanceof Promise)throw Error("Async schemas not supported in object keys currently");p.issues.length===0&&(l=p)}if(l.issues.length){r.mode==="loose"?n.value[o]=t[o]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>kt(p,i,ot())),input:o,path:[o],inst:e});continue}let d=r.valueType._zod.run({value:t[o],issues:[]},i);d instanceof Promise?a.push(d.then(p=>{p.issues.length&&n.issues.push(...Tt(o,p.issues)),n.value[l.value]=p.value})):(d.issues.length&&n.issues.push(...Tt(o,d.issues)),n.value[l.value]=d.value)}}return a.length?Promise.all(a).then(()=>n):n}}),$v=F("$ZodMap",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),n;let a=[];n.value=new Map;for(let[s,o]of t){let l=r.keyType._zod.run({value:s,issues:[]},i),d=r.valueType._zod.run({value:o,issues:[]},i);l instanceof Promise||d instanceof Promise?a.push(Promise.all([l,d]).then(([p,v])=>{ll(p,v,n,s,t,e,i)})):ll(l,d,n,s,t,e,i)}return a.length?Promise.all(a).then(()=>n):n}});function ll(e,r,n,i,t,a,s){e.issues.length&&(Zn.has(typeof i)?n.issues.push(...Tt(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:t,inst:a,issues:e.issues.map(o=>kt(o,s,ot()))})),r.issues.length&&(Zn.has(typeof i)?n.issues.push(...Tt(i,r.issues)):n.issues.push({origin:"map",code:"invalid_element",input:t,inst:a,key:i,issues:r.issues.map(o=>kt(o,s,ot()))})),n.value.set(e.value,r.value)}var xv=F("$ZodSet",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),n;let a=[];n.value=new Set;for(let s of t){let o=r.valueType._zod.run({value:s,issues:[]},i);o instanceof Promise?a.push(o.then(l=>fl(l,n))):fl(o,n)}return a.length?Promise.all(a).then(()=>n):n}});function fl(e,r){e.issues.length&&r.issues.push(...e.issues),r.value.add(e.value)}var Sv=F("$ZodEnum",(e,r)=>{ye.init(e,r);let n=x0(r.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(t=>Zn.has(typeof t)).map(t=>typeof t=="string"?Pt(t):t.toString()).join("|")})$`),e._zod.parse=(t,a)=>{let s=t.value;return i.has(s)||t.issues.push({code:"invalid_value",values:n,input:s,inst:e}),t}}),Iv=F("$ZodLiteral",(e,r)=>{if(ye.init(e,r),r.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(r.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.values.map(i=>typeof i=="string"?Pt(i):i?Pt(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,t)=>{let a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r.values,input:a,inst:e}),i}}),Tv=F("$ZodFile",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return t instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),n}}),Cv=F("$ZodTransform",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ti(e.constructor.name);let t=r.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(a=>(n.value=a,n));if(t instanceof Promise)throw new rr;return n.value=t,n}});function dl(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}var G0=F("$ZodOptional",(e,r)=>{ye.init(e,r),e._zod.optin="optional",e._zod.optout="optional",$e(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),$e(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${ri(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(r.innerType._zod.optin==="optional"){let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>dl(a,n.value)):dl(t,n.value)}return n.value===void 0?n:r.innerType._zod.run(n,i)}}),zv=F("$ZodExactOptional",(e,r)=>{G0.init(e,r),$e(e._zod,"values",()=>r.innerType._zod.values),$e(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(n,i)=>r.innerType._zod.run(n,i)}),Ev=F("$ZodNullable",(e,r)=>{ye.init(e,r),$e(e._zod,"optin",()=>r.innerType._zod.optin),$e(e._zod,"optout",()=>r.innerType._zod.optout),$e(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${ri(n.source)}|null)$`):void 0}),$e(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:r.innerType._zod.run(n,i)}),Nv=F("$ZodDefault",(e,r)=>{ye.init(e,r),e._zod.optin="optional",$e(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);if(n.value===void 0)return n.value=r.defaultValue,n;let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>hl(a,r)):hl(t,r)}});function hl(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}var Av=F("$ZodPrefault",(e,r)=>{ye.init(e,r),e._zod.optin="optional",$e(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,i))}),Pv=F("$ZodNonOptional",(e,r)=>{ye.init(e,r),$e(e._zod,"values",()=>{let n=r.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>pl(a,e)):pl(t,e)}});function pl(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}var Ov=F("$ZodSuccess",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ti("ZodSuccess");let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>(n.value=a.issues.length===0,n)):(n.value=t.issues.length===0,n)}}),Mv=F("$ZodCatch",(e,r)=>{ye.init(e,r),$e(e._zod,"optin",()=>r.innerType._zod.optin),$e(e._zod,"optout",()=>r.innerType._zod.optout),$e(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>(n.value=a.value,a.issues.length&&(n.value=r.catchValue({...n,error:{issues:a.issues.map(s=>kt(s,i,ot()))},input:n.value}),n.issues=[]),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue({...n,error:{issues:t.issues.map(a=>kt(a,i,ot()))},input:n.value}),n.issues=[]),n)}}),Dv=F("$ZodNaN",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Rv=F("$ZodPipe",(e,r)=>{ye.init(e,r),$e(e._zod,"values",()=>r.in._zod.values),$e(e._zod,"optin",()=>r.in._zod.optin),$e(e._zod,"optout",()=>r.out._zod.optout),$e(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let a=r.out._zod.run(n,i);return a instanceof Promise?a.then(s=>Cn(s,r.in,i)):Cn(a,r.in,i)}let t=r.in._zod.run(n,i);return t instanceof Promise?t.then(a=>Cn(a,r.out,i)):Cn(t,r.out,i)}});function Cn(e,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},n)}var J0=F("$ZodCodec",(e,r)=>{ye.init(e,r),$e(e._zod,"values",()=>r.in._zod.values),$e(e._zod,"optin",()=>r.in._zod.optin),$e(e._zod,"optout",()=>r.out._zod.optout),$e(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let t=r.in._zod.run(n,i);return t instanceof Promise?t.then(a=>zn(a,r,i)):zn(t,r,i)}else{let t=r.out._zod.run(n,i);return t instanceof Promise?t.then(a=>zn(a,r,i)):zn(t,r,i)}}});function zn(e,r,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let i=r.transform(e.value,e);return i instanceof Promise?i.then(t=>En(e,t,r.out,n)):En(e,i,r.out,n)}else{let i=r.reverseTransform(e.value,e);return i instanceof Promise?i.then(t=>En(e,t,r.in,n)):En(e,i,r.in,n)}}function En(e,r,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:r,issues:e.issues},i)}var Lv=F("$ZodReadonly",(e,r)=>{ye.init(e,r),$e(e._zod,"propValues",()=>r.innerType._zod.propValues),$e(e._zod,"values",()=>r.innerType._zod.values),$e(e._zod,"optin",()=>{var n,i;return(i=(n=r.innerType)==null?void 0:n._zod)==null?void 0:i.optin}),$e(e._zod,"optout",()=>{var n,i;return(i=(n=r.innerType)==null?void 0:n._zod)==null?void 0:i.optout}),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(vl):vl(t)}});function vl(e){return e.value=Object.freeze(e.value),e}var Uv=F("$ZodTemplateLiteral",(e,r)=>{ye.init(e,r);let n=[];for(let i of r.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let t=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${i._zod.traits}`);let a=t.startsWith("^")?1:0,s=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(a,s))}else if(i===null||w1.has(typeof i))n.push(Pt(`${i}`));else throw Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,t)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:r.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Zv=F("$ZodFunction",(e,r)=>(ye.init(e,r),e._def=r,e._zod.def=r,e.implement=n=>{if(typeof n!="function")throw Error("implement() must be called with a function");return function(...i){let t=e._def.input?Go(e._def.input,i):i,a=Reflect.apply(n,this,t);return e._def.output?Go(e._def.output,a):a}},e.implementAsync=n=>{if(typeof n!="function")throw Error("implementAsync() must be called with a function");return async function(...i){let t=e._def.input?await Jo(e._def.input,i):i,a=await Reflect.apply(n,this,t);return e._def.output?await Jo(e._def.output,a):a}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new H0({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>new e.constructor({type:"function",input:e._def.input,output:n}),e)),jv=F("$ZodPromise",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(t=>r.innerType._zod.run({value:t,issues:[]},i))}),Bv=F("$ZodLazy",(e,r)=>{ye.init(e,r),$e(e._zod,"innerType",()=>r.getter()),$e(e._zod,"pattern",()=>{var n,i;return(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.pattern}),$e(e._zod,"propValues",()=>{var n,i;return(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.propValues}),$e(e._zod,"optin",()=>{var n,i;return((i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.optin)??void 0}),$e(e._zod,"optout",()=>{var n,i;return((i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.optout)??void 0}),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),qv=F("$ZodCustom",(e,r)=>{qe.init(e,r),ye.init(e,r),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,t=r.fn(i);if(t instanceof Promise)return t.then(a=>ml(a,n,i,e));ml(t,n,i,e)}});function ml(e,r,n,i){if(!e){let t={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(t.params=i._zod.def.params),r.issues.push(jn(t))}}var W0={};Ot(W0,{zhTW:()=>ik,zhCN:()=>rk,yo:()=>sk,vi:()=>ek,uz:()=>Kw,ur:()=>Vw,uk:()=>Gv,ua:()=>Ww,tr:()=>Gw,th:()=>Fw,ta:()=>Bw,sv:()=>Zw,sl:()=>Lw,ru:()=>Dw,pt:()=>Ow,ps:()=>Ew,pl:()=>Aw,ota:()=>Cw,no:()=>Iw,nl:()=>xw,ms:()=>kw,mk:()=>_w,lt:()=>bw,ko:()=>mw,km:()=>Hv,kh:()=>pw,ka:()=>dw,ja:()=>lw,it:()=>cw,is:()=>sw,id:()=>iw,hy:()=>rw,hu:()=>ew,he:()=>K8,frCA:()=>V8,fr:()=>W8,fi:()=>G8,fa:()=>F8,es:()=>B8,eo:()=>Z8,en:()=>Fv,de:()=>R8,da:()=>M8,cs:()=>P8,ca:()=>N8,bg:()=>z8,be:()=>T8,az:()=>S8,ar:()=>$8});var k8=()=>{let e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function r(t){return e[t]??null}let n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${t.expected}، ولكن تم إدخال ${o}`:`مدخلات غير مقبولة: يفترض إدخال ${a}، ولكن تم إدخال ${o}`}case"invalid_value":return t.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${me(t.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?` أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${a} ${t.maximum.toString()} ${s.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${a} ${t.minimum.toString()} ${s.unit}`:`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${t.prefix}"`:a.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${a.suffix}"`:a.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${a.includes}"`:a.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${a.pattern}`:`${n[a.format]??t.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${t.divisor}`;case"unrecognized_keys":return`معرف${t.keys.length>1?"ات":""} غريب${t.keys.length>1?"ة":""}: ${te(t.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${t.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${t.origin}`;default:return"مدخل غير مقبول"}}};function $8(){return{localeError:k8()}}var x8=()=>{let e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function r(t){return e[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Yanlış dəyər: gözlənilən instanceof ${t.expected}, daxil olan ${o}`:`Yanlış dəyər: gözlənilən ${a}, daxil olan ${o}`}case"invalid_value":return t.values.length===1?`Yanlış dəyər: gözlənilən ${me(t.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${a}${t.maximum.toString()} ${s.unit??"element"}`:`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Çox kiçik: gözlənilən ${t.origin} ${a}${t.minimum.toString()} ${s.unit}`:`Çox kiçik: gözlənilən ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Yanlış mətn: "${a.prefix}" ilə başlamalıdır`:a.format==="ends_with"?`Yanlış mətn: "${a.suffix}" ilə bitməlidir`:a.format==="includes"?`Yanlış mətn: "${a.includes}" daxil olmalıdır`:a.format==="regex"?`Yanlış mətn: ${a.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[a.format]??t.format}`}case"not_multiple_of":return`Yanlış ədəd: ${t.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${t.keys.length>1?"lar":""}: ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${t.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function S8(){return{localeError:x8()}}function gl(e,r,n,i){let t=Math.abs(e),a=t%10,s=t%100;return s>=11&&s<=19?i:a===1?r:a>=2&&a<=4?n:i}var I8=()=>{let e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function r(t){return e[t]??null}let n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Няправільны ўвод: чакаўся instanceof ${t.expected}, атрымана ${o}`:`Няправільны ўвод: чакаўся ${a}, атрымана ${o}`}case"invalid_value":return t.values.length===1?`Няправільны ўвод: чакалася ${me(t.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);if(s){let o=Number(t.maximum),l=gl(o,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна ${s.verb} ${a}${t.maximum.toString()} ${l}`}return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна быць ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);if(s){let o=Number(t.minimum),l=gl(o,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${t.origin} павінна ${s.verb} ${a}${t.minimum.toString()} ${l}`}return`Занадта малы: чакалася, што ${t.origin} павінна быць ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${a.prefix}"`:a.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${a.suffix}"`:a.format==="includes"?`Няправільны радок: павінен змяшчаць "${a.includes}"`:a.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${a.pattern}`:`Няправільны ${n[a.format]??t.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${t.keys.length>1?"ключы":"ключ"}: ${te(t.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${t.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${t.origin}`;default:return"Няправільны ўвод"}}};function T8(){return{localeError:I8()}}var C8=()=>{let e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function r(t){return e[t]??null}let n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Невалиден вход: очакван instanceof ${t.expected}, получен ${o}`:`Невалиден вход: очакван ${a}, получен ${o}`}case"invalid_value":return t.values.length===1?`Невалиден вход: очакван ${me(t.values[0])}`:`Невалидна опция: очаквано едно от ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Твърде голямо: очаква се ${t.origin??"стойност"} да съдържа ${a}${t.maximum.toString()} ${s.unit??"елемента"}`:`Твърде голямо: очаква се ${t.origin??"стойност"} да бъде ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Твърде малко: очаква се ${t.origin} да съдържа ${a}${t.minimum.toString()} ${s.unit}`:`Твърде малко: очаква се ${t.origin} да бъде ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;if(a.format==="starts_with")return`Невалиден низ: трябва да започва с "${a.prefix}"`;if(a.format==="ends_with")return`Невалиден низ: трябва да завършва с "${a.suffix}"`;if(a.format==="includes")return`Невалиден низ: трябва да включва "${a.includes}"`;if(a.format==="regex")return`Невалиден низ: трябва да съвпада с ${a.pattern}`;let s="Невалиден";return a.format==="emoji"&&(s="Невалидно"),a.format==="datetime"&&(s="Невалидно"),a.format==="date"&&(s="Невалидна"),a.format==="time"&&(s="Невалидно"),a.format==="duration"&&(s="Невалидна"),`${s} ${n[a.format]??t.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${t.divisor}`;case"unrecognized_keys":return`Неразпознат${t.keys.length>1?"и":""} ключ${t.keys.length>1?"ове":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${t.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${t.origin}`;default:return"Невалиден вход"}}};function z8(){return{localeError:C8()}}var E8=()=>{let e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(t){return e[t]??null}let n={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Tipus invàlid: s'esperava instanceof ${t.expected}, s'ha rebut ${o}`:`Tipus invàlid: s'esperava ${a}, s'ha rebut ${o}`}case"invalid_value":return t.values.length===1?`Valor invàlid: s'esperava ${me(t.values[0])}`:`Opció invàlida: s'esperava una de ${te(t.values," o ")}`;case"too_big":{let a=t.inclusive?"com a màxim":"menys de",s=r(t.origin);return s?`Massa gran: s'esperava que ${t.origin??"el valor"} contingués ${a} ${t.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?"com a mínim":"més de",s=r(t.origin);return s?`Massa petit: s'esperava que ${t.origin} contingués ${a} ${t.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Format invàlid: ha de començar amb "${a.prefix}"`:a.format==="ends_with"?`Format invàlid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format invàlid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${a.pattern}`:`Format invàlid per a ${n[a.format]??t.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${t.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${t.origin}`;default:return"Entrada invàlida"}}};function N8(){return{localeError:E8()}}var A8=()=>{let e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function r(t){return e[t]??null}let n={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Neplatný vstup: očekáváno instanceof ${t.expected}, obdrženo ${o}`:`Neplatný vstup: očekáváno ${a}, obdrženo ${o}`}case"invalid_value":return t.values.length===1?`Neplatný vstup: očekáváno ${me(t.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Hodnota je příliš velká: ${t.origin??"hodnota"} musí mít ${a}${t.maximum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš velká: ${t.origin??"hodnota"} musí být ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Hodnota je příliš malá: ${t.origin??"hodnota"} musí mít ${a}${t.minimum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš malá: ${t.origin??"hodnota"} musí být ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Neplatný řetězec: musí začínat na "${a.prefix}"`:a.format==="ends_with"?`Neplatný řetězec: musí končit na "${a.suffix}"`:a.format==="includes"?`Neplatný řetězec: musí obsahovat "${a.includes}"`:a.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${a.pattern}`:`Neplatný formát ${n[a.format]??t.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${t.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${te(t.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${t.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${t.origin}`;default:return"Neplatný vstup"}}};function P8(){return{localeError:A8()}}var O8=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function r(t){return e[t]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Ugyldigt input: forventede instanceof ${t.expected}, fik ${o}`:`Ugyldigt input: forventede ${a}, fik ${o}`}case"invalid_value":return t.values.length===1?`Ugyldig værdi: forventede ${me(t.values[0])}`:`Ugyldigt valg: forventede en af følgende ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin),o=i[t.origin]??t.origin;return s?`For stor: forventede ${o??"value"} ${s.verb} ${a} ${t.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${o??"value"} havde ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin),o=i[t.origin]??t.origin;return s?`For lille: forventede ${o} ${s.verb} ${a} ${t.minimum.toString()} ${s.unit}`:`For lille: forventede ${o} havde ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche mønsteret ${a.pattern}`:`Ugyldig ${n[a.format]??t.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${te(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${t.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${t.origin}`;default:return"Ugyldigt input"}}};function M8(){return{localeError:O8()}}var D8=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(t){return e[t]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Ungültige Eingabe: erwartet instanceof ${t.expected}, erhalten ${o}`:`Ungültige Eingabe: erwartet ${a}, erhalten ${o}`}case"invalid_value":return t.values.length===1?`Ungültige Eingabe: erwartet ${me(t.values[0])}`:`Ungültige Option: erwartet eine von ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Zu groß: erwartet, dass ${t.origin??"Wert"} ${a}${t.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${t.origin??"Wert"} ${a}${t.maximum.toString()} ist`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Zu klein: erwartet, dass ${t.origin} ${a}${t.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${a}${t.minimum.toString()} ist`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ungültiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ungültiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ungültiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ungültiger String: muss dem Muster ${a.pattern} entsprechen`:`Ungültig: ${n[a.format]??t.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${te(t.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${t.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${t.origin}`;default:return"Ungültige Eingabe"}}};function R8(){return{localeError:D8()}}var L8=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function r(t){return e[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return`Invalid input: expected ${a}, received ${o}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${me(t.values[0])}`:`Invalid option: expected one of ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Too big: expected ${t.origin??"value"} to have ${a}${t.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${t.origin??"value"} to be ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Too small: expected ${t.origin} to have ${a}${t.minimum.toString()} ${s.unit}`:`Too small: expected ${t.origin} to be ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${n[a.format]??t.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${t.divisor}`;case"unrecognized_keys":return`Unrecognized key${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Invalid key in ${t.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${t.origin}`;default:return"Invalid input"}}};function Fv(){return{localeError:L8()}}var U8=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(t){return e[t]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Nevalida enigo: atendiĝis instanceof ${t.expected}, riceviĝis ${o}`:`Nevalida enigo: atendiĝis ${a}, riceviĝis ${o}`}case"invalid_value":return t.values.length===1?`Nevalida enigo: atendiĝis ${me(t.values[0])}`:`Nevalida opcio: atendiĝis unu el ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Tro granda: atendiĝis ke ${t.origin??"valoro"} havu ${a}${t.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${t.origin??"valoro"} havu ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Tro malgranda: atendiĝis ke ${t.origin} havu ${a}${t.minimum.toString()} ${s.unit}`:`Tro malgranda: atendiĝis ke ${t.origin} estu ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${a.prefix}"`:a.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${a.suffix}"`:a.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${a.includes}"`:a.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${a.pattern}`:`Nevalida ${n[a.format]??t.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${t.divisor}`;case"unrecognized_keys":return`Nekonata${t.keys.length>1?"j":""} ŝlosilo${t.keys.length>1?"j":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${t.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${t.origin}`;default:return"Nevalida enigo"}}};function Z8(){return{localeError:U8()}}var j8=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function r(t){return e[t]??null}let n={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Entrada inválida: se esperaba instanceof ${t.expected}, recibido ${o}`:`Entrada inválida: se esperaba ${a}, recibido ${o}`}case"invalid_value":return t.values.length===1?`Entrada inválida: se esperaba ${me(t.values[0])}`:`Opción inválida: se esperaba una de ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin),o=i[t.origin]??t.origin;return s?`Demasiado grande: se esperaba que ${o??"valor"} tuviera ${a}${t.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${o??"valor"} fuera ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin),o=i[t.origin]??t.origin;return s?`Demasiado pequeño: se esperaba que ${o} tuviera ${a}${t.minimum.toString()} ${s.unit}`:`Demasiado pequeño: se esperaba que ${o} fuera ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Cadena inválida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inválida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inválida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${a.pattern}`:`Inválido ${n[a.format]??t.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[t.origin]??t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[t.origin]??t.origin}`;default:return"Entrada inválida"}}};function B8(){return{localeError:j8()}}var q8=()=>{let e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function r(t){return e[t]??null}let n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`ورودی نامعتبر: میبایست instanceof ${t.expected} میبود، ${o} دریافت شد`:`ورودی نامعتبر: میبایست ${a} میبود، ${o} دریافت شد`}case"invalid_value":return t.values.length===1?`ورودی نامعتبر: میبایست ${me(t.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${te(t.values,"|")} میبود`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`خیلی بزرگ: ${t.origin??"مقدار"} باید ${a}${t.maximum.toString()} ${s.unit??"عنصر"} باشد`:`خیلی بزرگ: ${t.origin??"مقدار"} باید ${a}${t.maximum.toString()} باشد`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`خیلی کوچک: ${t.origin} باید ${a}${t.minimum.toString()} ${s.unit} باشد`:`خیلی کوچک: ${t.origin} باید ${a}${t.minimum.toString()} باشد`}case"invalid_format":{let a=t;return a.format==="starts_with"?`رشته نامعتبر: باید با "${a.prefix}" شروع شود`:a.format==="ends_with"?`رشته نامعتبر: باید با "${a.suffix}" تمام شود`:a.format==="includes"?`رشته نامعتبر: باید شامل "${a.includes}" باشد`:a.format==="regex"?`رشته نامعتبر: باید با الگوی ${a.pattern} مطابقت داشته باشد`:`${n[a.format]??t.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${t.divisor} باشد`;case"unrecognized_keys":return`کلید${t.keys.length>1?"های":""} ناشناس: ${te(t.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${t.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${t.origin}`;default:return"ورودی نامعتبر"}}};function F8(){return{localeError:q8()}}var H8=()=>{let e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function r(t){return e[t]??null}let n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${o}`:`Virheellinen tyyppi: odotettiin ${a}, oli ${o}`}case"invalid_value":return t.values.length===1?`Virheellinen syöte: täytyy olla ${me(t.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Liian suuri: ${s.subject} täytyy olla ${a}${t.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon täytyy olla ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Liian pieni: ${s.subject} täytyy olla ${a}${t.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon täytyy olla ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen syöte: täytyy sisältää "${a.includes}"`:a.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${a.pattern}`:`Virheellinen ${n[a.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${te(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function G8(){return{localeError:H8()}}var J8=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function r(t){return e[t]??null}let n={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN",number:"nombre",array:"tableau"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Entrée invalide : instanceof ${t.expected} attendu, ${o} reçu`:`Entrée invalide : ${a} attendu, ${o} reçu`}case"invalid_value":return t.values.length===1?`Entrée invalide : ${me(t.values[0])} attendu`:`Option invalide : une valeur parmi ${te(t.values,"|")} attendue`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Trop grand : ${t.origin??"valeur"} doit ${s.verb} ${a}${t.maximum.toString()} ${s.unit??"élément(s)"}`:`Trop grand : ${t.origin??"valeur"} doit être ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Trop petit : ${t.origin} doit ${s.verb} ${a}${t.minimum.toString()} ${s.unit}`:`Trop petit : ${t.origin} doit être ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Chaîne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Chaîne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Chaîne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${a.pattern}`:`${n[a.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${te(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function W8(){return{localeError:J8()}}var Y8=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function r(t){return e[t]??null}let n={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Entrée invalide : attendu instanceof ${t.expected}, reçu ${o}`:`Entrée invalide : attendu ${a}, reçu ${o}`}case"invalid_value":return t.values.length===1?`Entrée invalide : attendu ${me(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"≤":"<",s=r(t.origin);return s?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${a}${t.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?"≥":">",s=r(t.origin);return s?`Trop petit : attendu que ${t.origin} ait ${a}${t.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${t.origin} soit ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Chaîne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Chaîne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Chaîne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Chaîne invalide : doit correspondre au motif ${a.pattern}`:`${n[a.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${te(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function V8(){return{localeError:Y8()}}var X8=()=>{let e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},r={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=d=>d?e[d]:void 0,i=d=>{let p=n(d);return p?p.label:d??e.unknown.label},t=d=>`ה${i(d)}`,a=d=>{var p;return(((p=n(d))==null?void 0:p.gender)??"m")==="f"?"צריכה להיות":"צריך להיות"},s=d=>d?r[d]??null:null,o={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},l={nan:"NaN"};return d=>{var p;switch(d.code){case"invalid_type":{let v=d.expected,f=l[v??""]??i(v),u=ge(d.input),h=l[u]??((p=e[u])==null?void 0:p.label)??u;return/^[A-Z]/.test(d.expected)?`קלט לא תקין: צריך להיות instanceof ${d.expected}, התקבל ${h}`:`קלט לא תקין: צריך להיות ${f}, התקבל ${h}`}case"invalid_value":{if(d.values.length===1)return`ערך לא תקין: הערך חייב להיות ${me(d.values[0])}`;let v=d.values.map(u=>me(u));if(d.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${v[0]} או ${v[1]}`;let f=v[v.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${v.slice(0,-1).join(", ")} או ${f}`}case"too_big":{let v=s(d.origin),f=t(d.origin??"value");if(d.origin==="string")return`${(v==null?void 0:v.longLabel)??"ארוך"} מדי: ${f} צריכה להכיל ${d.maximum.toString()} ${(v==null?void 0:v.unit)??""} ${d.inclusive?"או פחות":"לכל היותר"}`.trim();if(d.origin==="number"){let c=d.inclusive?`קטן או שווה ל-${d.maximum}`:`קטן מ-${d.maximum}`;return`גדול מדי: ${f} צריך להיות ${c}`}if(d.origin==="array"||d.origin==="set"){let c=d.origin==="set"?"צריכה":"צריך",m=d.inclusive?`${d.maximum} ${(v==null?void 0:v.unit)??""} או פחות`:`פחות מ-${d.maximum} ${(v==null?void 0:v.unit)??""}`;return`גדול מדי: ${f} ${c} להכיל ${m}`.trim()}let u=d.inclusive?"<=":"<",h=a(d.origin??"value");return v!=null&&v.unit?`${v.longLabel} מדי: ${f} ${h} ${u}${d.maximum.toString()} ${v.unit}`:`${(v==null?void 0:v.longLabel)??"גדול"} מדי: ${f} ${h} ${u}${d.maximum.toString()}`}case"too_small":{let v=s(d.origin),f=t(d.origin??"value");if(d.origin==="string")return`${(v==null?void 0:v.shortLabel)??"קצר"} מדי: ${f} צריכה להכיל ${d.minimum.toString()} ${(v==null?void 0:v.unit)??""} ${d.inclusive?"או יותר":"לפחות"}`.trim();if(d.origin==="number"){let c=d.inclusive?`גדול או שווה ל-${d.minimum}`:`גדול מ-${d.minimum}`;return`קטן מדי: ${f} צריך להיות ${c}`}if(d.origin==="array"||d.origin==="set"){let c=d.origin==="set"?"צריכה":"צריך";if(d.minimum===1&&d.inclusive){let b=(d.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${c} להכיל ${b}`}let m=d.inclusive?`${d.minimum} ${(v==null?void 0:v.unit)??""} או יותר`:`יותר מ-${d.minimum} ${(v==null?void 0:v.unit)??""}`;return`קטן מדי: ${f} ${c} להכיל ${m}`.trim()}let u=d.inclusive?">=":">",h=a(d.origin??"value");return v!=null&&v.unit?`${v.shortLabel} מדי: ${f} ${h} ${u}${d.minimum.toString()} ${v.unit}`:`${(v==null?void 0:v.shortLabel)??"קטן"} מדי: ${f} ${h} ${u}${d.minimum.toString()}`}case"invalid_format":{let v=d;if(v.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${v.prefix}"`;if(v.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${v.suffix}"`;if(v.format==="includes")return`המחרוזת חייבת לכלול "${v.includes}"`;if(v.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${v.pattern}`;let f=o[v.format],u=(f==null?void 0:f.label)??v.format,h=((f==null?void 0:f.gender)??"m")==="f"?"תקינה":"תקין";return`${u} לא ${h}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${d.divisor}`;case"unrecognized_keys":return`מפתח${d.keys.length>1?"ות":""} לא מזוה${d.keys.length>1?"ים":"ה"}: ${te(d.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${t(d.origin??"array")}`;default:return"קלט לא תקין"}}};function K8(){return{localeError:X8()}}var Q8=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(t){return e[t]??null}let n={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Érvénytelen bemenet: a várt érték instanceof ${t.expected}, a kapott érték ${o}`:`Érvénytelen bemenet: a várt érték ${a}, a kapott érték ${o}`}case"invalid_value":return t.values.length===1?`Érvénytelen bemenet: a várt érték ${me(t.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Túl nagy: ${t.origin??"érték"} mérete túl nagy ${a}${t.maximum.toString()} ${s.unit??"elem"}`:`Túl nagy: a bemeneti érték ${t.origin??"érték"} túl nagy: ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Túl kicsi: a bemeneti érték ${t.origin} mérete túl kicsi ${a}${t.minimum.toString()} ${s.unit}`:`Túl kicsi: a bemeneti érték ${t.origin} túl kicsi ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Érvénytelen string: "${a.prefix}" értékkel kell kezdődnie`:a.format==="ends_with"?`Érvénytelen string: "${a.suffix}" értékkel kell végződnie`:a.format==="includes"?`Érvénytelen string: "${a.includes}" értéket kell tartalmaznia`:a.format==="regex"?`Érvénytelen string: ${a.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[a.format]??t.format}`}case"not_multiple_of":return`Érvénytelen szám: ${t.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${t.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${t.origin}`;default:return"Érvénytelen bemenet"}}};function ew(){return{localeError:Q8()}}function bl(e,r,n){return Math.abs(e)===1?r:n}function dr(e){if(!e)return"";let r=["ա","ե","ը","ի","ո","ու","օ"],n=e[e.length-1];return e+(r.includes(n)?"ն":"ը")}var tw=()=>{let e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function r(t){return e[t]??null}let n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${t.expected}, ստացվել է ${o}`:`Սխալ մուտքագրում․ սպասվում էր ${a}, ստացվել է ${o}`}case"invalid_value":return t.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${me(t.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);if(s){let o=Number(t.maximum),l=bl(o,s.unit.one,s.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${dr(t.origin??"արժեք")} կունենա ${a}${t.maximum.toString()} ${l}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${dr(t.origin??"արժեք")} լինի ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);if(s){let o=Number(t.minimum),l=bl(o,s.unit.one,s.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${dr(t.origin)} կունենա ${a}${t.minimum.toString()} ${l}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${dr(t.origin)} լինի ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Սխալ տող․ պետք է սկսվի "${a.prefix}"-ով`:a.format==="ends_with"?`Սխալ տող․ պետք է ավարտվի "${a.suffix}"-ով`:a.format==="includes"?`Սխալ տող․ պետք է պարունակի "${a.includes}"`:a.format==="regex"?`Սխալ տող․ պետք է համապատասխանի ${a.pattern} ձևաչափին`:`Սխալ ${n[a.format]??t.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${t.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${t.keys.length>1?"ներ":""}. ${te(t.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${dr(t.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${dr(t.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function rw(){return{localeError:tw()}}var nw=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(t){return e[t]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Input tidak valid: diharapkan instanceof ${t.expected}, diterima ${o}`:`Input tidak valid: diharapkan ${a}, diterima ${o}`}case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${me(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${a}${t.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Terlalu kecil: diharapkan ${t.origin} memiliki ${a}${t.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${n[a.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function iw(){return{localeError:nw()}}var aw=()=>{let e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function r(t){return e[t]??null}let n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Rangt gildi: Þú slóst inn ${o} þar sem á að vera instanceof ${t.expected}`:`Rangt gildi: Þú slóst inn ${o} þar sem á að vera ${a}`}case"invalid_value":return t.values.length===1?`Rangt gildi: gert ráð fyrir ${me(t.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Of stórt: gert er ráð fyrir að ${t.origin??"gildi"} hafi ${a}${t.maximum.toString()} ${s.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${t.origin??"gildi"} sé ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Of lítið: gert er ráð fyrir að ${t.origin} hafi ${a}${t.minimum.toString()} ${s.unit}`:`Of lítið: gert er ráð fyrir að ${t.origin} sé ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ógildur strengur: verður að byrja á "${a.prefix}"`:a.format==="ends_with"?`Ógildur strengur: verður að enda á "${a.suffix}"`:a.format==="includes"?`Ógildur strengur: verður að innihalda "${a.includes}"`:a.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${a.pattern}`:`Rangt ${n[a.format]??t.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${t.divisor}`;case"unrecognized_keys":return`Óþekkt ${t.keys.length>1?"ir lyklar":"ur lykill"}: ${te(t.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${t.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${t.origin}`;default:return"Rangt gildi"}}};function sw(){return{localeError:aw()}}var ow=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(t){return e[t]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Input non valido: atteso instanceof ${t.expected}, ricevuto ${o}`:`Input non valido: atteso ${a}, ricevuto ${o}`}case"invalid_value":return t.values.length===1?`Input non valido: atteso ${me(t.values[0])}`:`Opzione non valida: atteso uno tra ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Troppo grande: ${t.origin??"valore"} deve avere ${a}${t.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Troppo piccolo: ${t.origin} deve avere ${a}${t.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${t.origin} deve essere ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Invalid ${n[a.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${te(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function cw(){return{localeError:ow()}}var uw=()=>{let e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function r(t){return e[t]??null}let n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`無効な入力: instanceof ${t.expected}が期待されましたが、${o}が入力されました`:`無効な入力: ${a}が期待されましたが、${o}が入力されました`}case"invalid_value":return t.values.length===1?`無効な入力: ${me(t.values[0])}が期待されました`:`無効な選択: ${te(t.values,"、")}のいずれかである必要があります`;case"too_big":{let a=t.inclusive?"以下である":"より小さい",s=r(t.origin);return s?`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${s.unit??"要素"}${a}必要があります`:`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${a}必要があります`}case"too_small":{let a=t.inclusive?"以上である":"より大きい",s=r(t.origin);return s?`小さすぎる値: ${t.origin}は${t.minimum.toString()}${s.unit}${a}必要があります`:`小さすぎる値: ${t.origin}は${t.minimum.toString()}${a}必要があります`}case"invalid_format":{let a=t;return a.format==="starts_with"?`無効な文字列: "${a.prefix}"で始まる必要があります`:a.format==="ends_with"?`無効な文字列: "${a.suffix}"で終わる必要があります`:a.format==="includes"?`無効な文字列: "${a.includes}"を含む必要があります`:a.format==="regex"?`無効な文字列: パターン${a.pattern}に一致する必要があります`:`無効な${n[a.format]??t.format}`}case"not_multiple_of":return`無効な数値: ${t.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${t.keys.length>1?"群":""}: ${te(t.keys,"、")}`;case"invalid_key":return`${t.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${t.origin}内の無効な値`;default:return"無効な入力"}}};function lw(){return{localeError:uw()}}var fw=()=>{let e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function r(t){return e[t]??null}let n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${t.expected}, მიღებული ${o}`:`არასწორი შეყვანა: მოსალოდნელი ${a}, მიღებული ${o}`}case"invalid_value":return t.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${me(t.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${te(t.values,"|")}-დან`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`ზედმეტად დიდი: მოსალოდნელი ${t.origin??"მნიშვნელობა"} ${s.verb} ${a}${t.maximum.toString()} ${s.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${t.origin??"მნიშვნელობა"} იყოს ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`ზედმეტად პატარა: მოსალოდნელი ${t.origin} ${s.verb} ${a}${t.minimum.toString()} ${s.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${t.origin} იყოს ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${a.prefix}"-ით`:a.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${a.suffix}"-ით`:a.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${a.includes}"-ს`:a.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${a.pattern}`:`არასწორი ${n[a.format]??t.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${t.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${t.keys.length>1?"ები":"ი"}: ${te(t.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${t.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${t.origin}-ში`;default:return"არასწორი შეყვანა"}}};function dw(){return{localeError:fw()}}var hw=()=>{let e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function r(t){return e[t]??null}let n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${t.expected} ប៉ុន្តែទទួលបាន ${o}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${a} ប៉ុន្តែទទួលបាន ${o}`}case"invalid_value":return t.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${me(t.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${a} ${t.maximum.toString()} ${s.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`តូចពេក៖ ត្រូវការ ${t.origin} ${a} ${t.minimum.toString()} ${s.unit}`:`តូចពេក៖ ត្រូវការ ${t.origin} ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${a.prefix}"`:a.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${a.suffix}"`:a.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${a.includes}"`:a.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${a.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[a.format]??t.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${t.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${te(t.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Hv(){return{localeError:hw()}}function pw(){return Hv()}var vw=()=>{let e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function r(t){return e[t]??null}let n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`잘못된 입력: 예상 타입은 instanceof ${t.expected}, 받은 타입은 ${o}입니다`:`잘못된 입력: 예상 타입은 ${a}, 받은 타입은 ${o}입니다`}case"invalid_value":return t.values.length===1?`잘못된 입력: 값은 ${me(t.values[0])} 이어야 합니다`:`잘못된 옵션: ${te(t.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let a=t.inclusive?"이하":"미만",s=a==="미만"?"이어야 합니다":"여야 합니다",o=r(t.origin),l=(o==null?void 0:o.unit)??"요소";return o?`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()}${l} ${a}${s}`:`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()} ${a}${s}`}case"too_small":{let a=t.inclusive?"이상":"초과",s=a==="이상"?"이어야 합니다":"여야 합니다",o=r(t.origin),l=(o==null?void 0:o.unit)??"요소";return o?`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()}${l} ${a}${s}`:`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()} ${a}${s}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`잘못된 문자열: "${a.prefix}"(으)로 시작해야 합니다`:a.format==="ends_with"?`잘못된 문자열: "${a.suffix}"(으)로 끝나야 합니다`:a.format==="includes"?`잘못된 문자열: "${a.includes}"을(를) 포함해야 합니다`:a.format==="regex"?`잘못된 문자열: 정규식 ${a.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[a.format]??t.format}`}case"not_multiple_of":return`잘못된 숫자: ${t.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${te(t.keys,", ")}`;case"invalid_key":return`잘못된 키: ${t.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${t.origin}`;default:return"잘못된 입력"}}};function mw(){return{localeError:vw()}}var Ar=e=>e.charAt(0).toUpperCase()+e.slice(1);function yl(e){let r=Math.abs(e),n=r%10,i=r%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var gw=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function r(t,a,s,o){let l=e[t]??null;return l===null?l:{unit:l.unit[a],verb:l.verb[o][s?"inclusive":"notInclusive"]}}let n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},i={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Gautas tipas ${o}, o tikėtasi - instanceof ${t.expected}`:`Gautas tipas ${o}, o tikėtasi - ${a}`}case"invalid_value":return t.values.length===1?`Privalo būti ${me(t.values[0])}`:`Privalo būti vienas iš ${te(t.values,"|")} pasirinkimų`;case"too_big":{let a=i[t.origin]??t.origin,s=r(t.origin,yl(Number(t.maximum)),t.inclusive??!1,"smaller");if(s!=null&&s.verb)return`${Ar(a??t.origin??"reikšmė")} ${s.verb} ${t.maximum.toString()} ${s.unit??"elementų"}`;let o=t.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Ar(a??t.origin??"reikšmė")} turi būti ${o} ${t.maximum.toString()} ${s==null?void 0:s.unit}`}case"too_small":{let a=i[t.origin]??t.origin,s=r(t.origin,yl(Number(t.minimum)),t.inclusive??!1,"bigger");if(s!=null&&s.verb)return`${Ar(a??t.origin??"reikšmė")} ${s.verb} ${t.minimum.toString()} ${s.unit??"elementų"}`;let o=t.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Ar(a??t.origin??"reikšmė")} turi būti ${o} ${t.minimum.toString()} ${s==null?void 0:s.unit}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Eilutė privalo prasidėti "${a.prefix}"`:a.format==="ends_with"?`Eilutė privalo pasibaigti "${a.suffix}"`:a.format==="includes"?`Eilutė privalo įtraukti "${a.includes}"`:a.format==="regex"?`Eilutė privalo atitikti ${a.pattern}`:`Neteisingas ${n[a.format]??t.format}`}case"not_multiple_of":return`Skaičius privalo būti ${t.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${t.keys.length>1?"i":"as"} rakt${t.keys.length>1?"ai":"as"}: ${te(t.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let a=i[t.origin]??t.origin;return`${Ar(a??t.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function bw(){return{localeError:gw()}}var yw=()=>{let e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function r(t){return e[t]??null}let n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Грешен внес: се очекува instanceof ${t.expected}, примено ${o}`:`Грешен внес: се очекува ${a}, примено ${o}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${me(t.values[0])}`:`Грешана опција: се очекува една ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Премногу голем: се очекува ${t.origin??"вредноста"} да има ${a}${t.maximum.toString()} ${s.unit??"елементи"}`:`Премногу голем: се очекува ${t.origin??"вредноста"} да биде ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Премногу мал: се очекува ${t.origin} да има ${a}${t.minimum.toString()} ${s.unit}`:`Премногу мал: се очекува ${t.origin} да биде ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Неважечка низа: мора да започнува со "${a.prefix}"`:a.format==="ends_with"?`Неважечка низа: мора да завршува со "${a.suffix}"`:a.format==="includes"?`Неважечка низа: мора да вклучува "${a.includes}"`:a.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${a.pattern}`:`Invalid ${n[a.format]??t.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${te(t.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${t.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${t.origin}`;default:return"Грешен внес"}}};function _w(){return{localeError:yw()}}var ww=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(t){return e[t]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Input tidak sah: dijangka instanceof ${t.expected}, diterima ${o}`:`Input tidak sah: dijangka ${a}, diterima ${o}`}case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${me(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Terlalu besar: dijangka ${t.origin??"nilai"} ${s.verb} ${a}${t.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Terlalu kecil: dijangka ${t.origin} ${s.verb} ${a}${t.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${n[a.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${te(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function kw(){return{localeError:ww()}}var $w=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function r(t){return e[t]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Ongeldige invoer: verwacht instanceof ${t.expected}, ontving ${o}`:`Ongeldige invoer: verwacht ${a}, ontving ${o}`}case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${me(t.values[0])}`:`Ongeldige optie: verwacht één van ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin),o=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";return s?`Te ${o}: verwacht dat ${t.origin??"waarde"} ${a}${t.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${o}: verwacht dat ${t.origin??"waarde"} ${a}${t.maximum.toString()} is`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin),o=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";return s?`Te ${o}: verwacht dat ${t.origin} ${a}${t.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${o}: verwacht dat ${t.origin} ${a}${t.minimum.toString()} is`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${n[a.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function xw(){return{localeError:$w()}}var Sw=()=>{let e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function r(t){return e[t]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Ugyldig input: forventet instanceof ${t.expected}, fikk ${o}`:`Ugyldig input: forventet ${a}, fikk ${o}`}case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${me(t.values[0])}`:`Ugyldig valg: forventet en av ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`For stor(t): forventet ${t.origin??"value"} til å ha ${a}${t.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til å ha ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`For lite(n): forventet ${t.origin} til å ha ${a}${t.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${t.origin} til å ha ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ugyldig streng: må starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: må ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: må inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: må matche mønsteret ${a.pattern}`:`Ugyldig ${n[a.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${te(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function Iw(){return{localeError:Sw()}}var Tw=()=>{let e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function r(t){return e[t]??null}let n={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Fâsit giren: umulan instanceof ${t.expected}, alınan ${o}`:`Fâsit giren: umulan ${a}, alınan ${o}`}case"invalid_value":return t.values.length===1?`Fâsit giren: umulan ${me(t.values[0])}`:`Fâsit tercih: mûteberler ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Fazla büyük: ${t.origin??"value"}, ${a}${t.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${t.origin??"value"}, ${a}${t.maximum.toString()} olmalıydı.`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Fazla küçük: ${t.origin}, ${a}${t.minimum.toString()} ${s.unit} sahip olmalıydı.`:`Fazla küçük: ${t.origin}, ${a}${t.minimum.toString()} olmalıydı.`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Fâsit metin: "${a.prefix}" ile başlamalı.`:a.format==="ends_with"?`Fâsit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`Fâsit metin: "${a.includes}" ihtivâ etmeli.`:a.format==="regex"?`Fâsit metin: ${a.pattern} nakşına uymalı.`:`Fâsit ${n[a.format]??t.format}`}case"not_multiple_of":return`Fâsit sayı: ${t.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${t.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Cw(){return{localeError:Tw()}}var zw=()=>{let e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function r(t){return e[t]??null}let n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`ناسم ورودي: باید instanceof ${t.expected} وای, مګر ${o} ترلاسه شو`:`ناسم ورودي: باید ${a} وای, مګر ${o} ترلاسه شو`}case"invalid_value":return t.values.length===1?`ناسم ورودي: باید ${me(t.values[0])} وای`:`ناسم انتخاب: باید یو له ${te(t.values,"|")} څخه وای`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`ډیر لوی: ${t.origin??"ارزښت"} باید ${a}${t.maximum.toString()} ${s.unit??"عنصرونه"} ولري`:`ډیر لوی: ${t.origin??"ارزښت"} باید ${a}${t.maximum.toString()} وي`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`ډیر کوچنی: ${t.origin} باید ${a}${t.minimum.toString()} ${s.unit} ولري`:`ډیر کوچنی: ${t.origin} باید ${a}${t.minimum.toString()} وي`}case"invalid_format":{let a=t;return a.format==="starts_with"?`ناسم متن: باید د "${a.prefix}" سره پیل شي`:a.format==="ends_with"?`ناسم متن: باید د "${a.suffix}" سره پای ته ورسيږي`:a.format==="includes"?`ناسم متن: باید "${a.includes}" ولري`:a.format==="regex"?`ناسم متن: باید د ${a.pattern} سره مطابقت ولري`:`${n[a.format]??t.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${t.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${t.keys.length>1?"کلیډونه":"کلیډ"}: ${te(t.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${t.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${t.origin} کې`;default:return"ناسمه ورودي"}}};function Ew(){return{localeError:zw()}}var Nw=()=>{let e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function r(t){return e[t]??null}let n={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${t.expected}, otrzymano ${o}`:`Nieprawidłowe dane wejściowe: oczekiwano ${a}, otrzymano ${o}`}case"invalid_value":return t.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${me(t.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Za duża wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${a}${t.maximum.toString()} ${s.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Za mała wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${a}${t.minimum.toString()} ${s.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${a.prefix}"`:a.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${a.suffix}"`:a.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${a.includes}"`:a.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${a.pattern}`:`Nieprawidłow(y/a/e) ${n[a.format]??t.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${t.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${t.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Aw(){return{localeError:Nw()}}var Pw=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(t){return e[t]??null}let n={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"número",null:"nulo"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Tipo inválido: esperado instanceof ${t.expected}, recebido ${o}`:`Tipo inválido: esperado ${a}, recebido ${o}`}case"invalid_value":return t.values.length===1?`Entrada inválida: esperado ${me(t.values[0])}`:`Opção inválida: esperada uma das ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${a}${t.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Muito pequeno: esperado que ${t.origin} tivesse ${a}${t.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Texto inválido: deve começar com "${a.prefix}"`:a.format==="ends_with"?`Texto inválido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inválido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inválido: deve corresponder ao padrão ${a.pattern}`:`${n[a.format]??t.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Chave inválida em ${t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${t.origin}`;default:return"Campo inválido"}}};function Ow(){return{localeError:Pw()}}function _l(e,r,n,i){let t=Math.abs(e),a=t%10,s=t%100;return s>=11&&s<=19?i:a===1?r:a>=2&&a<=4?n:i}var Mw=()=>{let e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function r(t){return e[t]??null}let n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Неверный ввод: ожидалось instanceof ${t.expected}, получено ${o}`:`Неверный ввод: ожидалось ${a}, получено ${o}`}case"invalid_value":return t.values.length===1?`Неверный ввод: ожидалось ${me(t.values[0])}`:`Неверный вариант: ожидалось одно из ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);if(s){let o=Number(t.maximum),l=_l(o,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет иметь ${a}${t.maximum.toString()} ${l}`}return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);if(s){let o=Number(t.minimum),l=_l(o,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${t.origin} будет иметь ${a}${t.minimum.toString()} ${l}`}return`Слишком маленькое значение: ожидалось, что ${t.origin} будет ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Неверная строка: должна начинаться с "${a.prefix}"`:a.format==="ends_with"?`Неверная строка: должна заканчиваться на "${a.suffix}"`:a.format==="includes"?`Неверная строка: должна содержать "${a.includes}"`:a.format==="regex"?`Неверная строка: должна соответствовать шаблону ${a.pattern}`:`Неверный ${n[a.format]??t.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспознанн${t.keys.length>1?"ые":"ый"} ключ${t.keys.length>1?"и":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${t.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${t.origin}`;default:return"Неверные входные данные"}}};function Dw(){return{localeError:Mw()}}var Rw=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(t){return e[t]??null}let n={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Neveljaven vnos: pričakovano instanceof ${t.expected}, prejeto ${o}`:`Neveljaven vnos: pričakovano ${a}, prejeto ${o}`}case"invalid_value":return t.values.length===1?`Neveljaven vnos: pričakovano ${me(t.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} imelo ${a}${t.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Premajhno: pričakovano, da bo ${t.origin} imelo ${a}${t.minimum.toString()} ${s.unit}`:`Premajhno: pričakovano, da bo ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Neveljaven niz: mora se začeti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se končati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${n[a.format]??t.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i ključi":" ključ"}: ${te(t.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function Lw(){return{localeError:Rw()}}var Uw=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function r(t){return e[t]??null}let n={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Ogiltig inmatning: förväntat instanceof ${t.expected}, fick ${o}`:`Ogiltig inmatning: förväntat ${a}, fick ${o}`}case"invalid_value":return t.values.length===1?`Ogiltig inmatning: förväntat ${me(t.values[0])}`:`Ogiltigt val: förväntade en av ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`För stor(t): förväntade ${t.origin??"värdet"} att ha ${a}${t.maximum.toString()} ${s.unit??"element"}`:`För stor(t): förväntat ${t.origin??"värdet"} att ha ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`För lite(t): förväntade ${t.origin??"värdet"} att ha ${a}${t.minimum.toString()} ${s.unit}`:`För lite(t): förväntade ${t.origin??"värdet"} att ha ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ogiltig sträng: måste börja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig sträng: måste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig sträng: måste innehålla "${a.includes}"`:a.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${a.pattern}"`:`Ogiltig(t) ${n[a.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${te(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${t.origin??"värdet"}`;default:return"Ogiltig input"}}};function Zw(){return{localeError:Uw()}}var jw=()=>{let e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function r(t){return e[t]??null}let n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${t.expected}, பெறப்பட்டது ${o}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${a}, பெறப்பட்டது ${o}`}case"invalid_value":return t.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${me(t.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${te(t.values,"|")} இல் ஒன்று`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${a}${t.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${a}${t.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${a}${t.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${a}${t.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let a=t;return a.format==="starts_with"?`தவறான சரம்: "${a.prefix}" இல் தொடங்க வேண்டும்`:a.format==="ends_with"?`தவறான சரம்: "${a.suffix}" இல் முடிவடைய வேண்டும்`:a.format==="includes"?`தவறான சரம்: "${a.includes}" ஐ உள்ளடக்க வேண்டும்`:a.format==="regex"?`தவறான சரம்: ${a.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[a.format]??t.format}`}case"not_multiple_of":return`தவறான எண்: ${t.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${t.keys.length>1?"கள்":""}: ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${t.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Bw(){return{localeError:jw()}}var qw=()=>{let e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function r(t){return e[t]??null}let n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${t.expected} แต่ได้รับ ${o}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${a} แต่ได้รับ ${o}`}case"invalid_value":return t.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${me(t.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"ไม่เกิน":"น้อยกว่า",s=r(t.origin);return s?`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${a} ${t.maximum.toString()} ${s.unit??"รายการ"}`:`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?"อย่างน้อย":"มากกว่า",s=r(t.origin);return s?`น้อยกว่ากำหนด: ${t.origin} ควรมี${a} ${t.minimum.toString()} ${s.unit}`:`น้อยกว่ากำหนด: ${t.origin} ควรมี${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${a.prefix}"`:a.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${a.suffix}"`:a.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${a.includes}" อยู่ในข้อความ`:a.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${a.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[a.format]??t.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${t.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${te(t.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${t.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${t.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Fw(){return{localeError:qw()}}var Hw=()=>{let e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function r(t){return e[t]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Geçersiz değer: beklenen instanceof ${t.expected}, alınan ${o}`:`Geçersiz değer: beklenen ${a}, alınan ${o}`}case"invalid_value":return t.values.length===1?`Geçersiz değer: beklenen ${me(t.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Çok büyük: beklenen ${t.origin??"değer"} ${a}${t.maximum.toString()} ${s.unit??"öğe"}`:`Çok büyük: beklenen ${t.origin??"değer"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Çok küçük: beklenen ${t.origin} ${a}${t.minimum.toString()} ${s.unit}`:`Çok küçük: beklenen ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Geçersiz metin: "${a.prefix}" ile başlamalı`:a.format==="ends_with"?`Geçersiz metin: "${a.suffix}" ile bitmeli`:a.format==="includes"?`Geçersiz metin: "${a.includes}" içermeli`:a.format==="regex"?`Geçersiz metin: ${a.pattern} desenine uymalı`:`Geçersiz ${n[a.format]??t.format}`}case"not_multiple_of":return`Geçersiz sayı: ${t.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${t.keys.length>1?"lar":""}: ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${t.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Gw(){return{localeError:Hw()}}var Jw=()=>{let e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function r(t){return e[t]??null}let n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Неправильні вхідні дані: очікується instanceof ${t.expected}, отримано ${o}`:`Неправильні вхідні дані: очікується ${a}, отримано ${o}`}case"invalid_value":return t.values.length===1?`Неправильні вхідні дані: очікується ${me(t.values[0])}`:`Неправильна опція: очікується одне з ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Занадто велике: очікується, що ${t.origin??"значення"} ${s.verb} ${a}${t.maximum.toString()} ${s.unit??"елементів"}`:`Занадто велике: очікується, що ${t.origin??"значення"} буде ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Занадто мале: очікується, що ${t.origin} ${s.verb} ${a}${t.minimum.toString()} ${s.unit}`:`Занадто мале: очікується, що ${t.origin} буде ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Неправильний рядок: повинен починатися з "${a.prefix}"`:a.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${a.suffix}"`:a.format==="includes"?`Неправильний рядок: повинен містити "${a.includes}"`:a.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${a.pattern}`:`Неправильний ${n[a.format]??t.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${t.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${t.keys.length>1?"і":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${t.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${t.origin}`;default:return"Неправильні вхідні дані"}}};function Gv(){return{localeError:Jw()}}function Ww(){return Gv()}var Yw=()=>{let e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function r(t){return e[t]??null}let n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`غلط ان پٹ: instanceof ${t.expected} متوقع تھا، ${o} موصول ہوا`:`غلط ان پٹ: ${a} متوقع تھا، ${o} موصول ہوا`}case"invalid_value":return t.values.length===1?`غلط ان پٹ: ${me(t.values[0])} متوقع تھا`:`غلط آپشن: ${te(t.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`بہت بڑا: ${t.origin??"ویلیو"} کے ${a}${t.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${t.origin??"ویلیو"} کا ${a}${t.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`بہت چھوٹا: ${t.origin} کے ${a}${t.minimum.toString()} ${s.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${t.origin} کا ${a}${t.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let a=t;return a.format==="starts_with"?`غلط سٹرنگ: "${a.prefix}" سے شروع ہونا چاہیے`:a.format==="ends_with"?`غلط سٹرنگ: "${a.suffix}" پر ختم ہونا چاہیے`:a.format==="includes"?`غلط سٹرنگ: "${a.includes}" شامل ہونا چاہیے`:a.format==="regex"?`غلط سٹرنگ: پیٹرن ${a.pattern} سے میچ ہونا چاہیے`:`غلط ${n[a.format]??t.format}`}case"not_multiple_of":return`غلط نمبر: ${t.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${t.keys.length>1?"ز":""}: ${te(t.keys,"، ")}`;case"invalid_key":return`${t.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${t.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function Vw(){return{localeError:Yw()}}var Xw=()=>{let e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function r(t){return e[t]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${t.expected}, qabul qilingan ${o}`:`Noto‘g‘ri kirish: kutilgan ${a}, qabul qilingan ${o}`}case"invalid_value":return t.values.length===1?`Noto‘g‘ri kirish: kutilgan ${me(t.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Juda katta: kutilgan ${t.origin??"qiymat"} ${a}${t.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${t.origin??"qiymat"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Juda kichik: kutilgan ${t.origin} ${a}${t.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Noto‘g‘ri satr: "${a.prefix}" bilan boshlanishi kerak`:a.format==="ends_with"?`Noto‘g‘ri satr: "${a.suffix}" bilan tugashi kerak`:a.format==="includes"?`Noto‘g‘ri satr: "${a.includes}" ni o‘z ichiga olishi kerak`:a.format==="regex"?`Noto‘g‘ri satr: ${a.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[a.format]??t.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${t.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${t.keys.length>1?"lar":""}: ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${t.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function Kw(){return{localeError:Xw()}}var Qw=()=>{let e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function r(t){return e[t]??null}let n={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${t.expected}, nhận được ${o}`:`Đầu vào không hợp lệ: mong đợi ${a}, nhận được ${o}`}case"invalid_value":return t.values.length===1?`Đầu vào không hợp lệ: mong đợi ${me(t.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Quá lớn: mong đợi ${t.origin??"giá trị"} ${s.verb} ${a}${t.maximum.toString()} ${s.unit??"phần tử"}`:`Quá lớn: mong đợi ${t.origin??"giá trị"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Quá nhỏ: mong đợi ${t.origin} ${s.verb} ${a}${t.minimum.toString()} ${s.unit}`:`Quá nhỏ: mong đợi ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${a.prefix}"`:a.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${a.suffix}"`:a.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${a.includes}"`:a.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${a.pattern}`:`${n[a.format]??t.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${t.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${te(t.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${t.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${t.origin}`;default:return"Đầu vào không hợp lệ"}}};function ek(){return{localeError:Qw()}}var tk=()=>{let e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function r(t){return e[t]??null}let n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`无效输入:期望 instanceof ${t.expected},实际接收 ${o}`:`无效输入:期望 ${a},实际接收 ${o}`}case"invalid_value":return t.values.length===1?`无效输入:期望 ${me(t.values[0])}`:`无效选项:期望以下之一 ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`数值过大:期望 ${t.origin??"值"} ${a}${t.maximum.toString()} ${s.unit??"个元素"}`:`数值过大:期望 ${t.origin??"值"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`数值过小:期望 ${t.origin} ${a}${t.minimum.toString()} ${s.unit}`:`数值过小:期望 ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`无效字符串:必须以 "${a.prefix}" 开头`:a.format==="ends_with"?`无效字符串:必须以 "${a.suffix}" 结尾`:a.format==="includes"?`无效字符串:必须包含 "${a.includes}"`:a.format==="regex"?`无效字符串:必须满足正则表达式 ${a.pattern}`:`无效${n[a.format]??t.format}`}case"not_multiple_of":return`无效数字:必须是 ${t.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${t.origin} 中包含无效值(value)`;default:return"无效输入"}}};function rk(){return{localeError:tk()}}var nk=()=>{let e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function r(t){return e[t]??null}let n={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`無效的輸入值:預期為 instanceof ${t.expected},但收到 ${o}`:`無效的輸入值:預期為 ${a},但收到 ${o}`}case"invalid_value":return t.values.length===1?`無效的輸入值:預期為 ${me(t.values[0])}`:`無效的選項:預期為以下其中之一 ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`數值過大:預期 ${t.origin??"值"} 應為 ${a}${t.maximum.toString()} ${s.unit??"個元素"}`:`數值過大:預期 ${t.origin??"值"} 應為 ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`數值過小:預期 ${t.origin} 應為 ${a}${t.minimum.toString()} ${s.unit}`:`數值過小:預期 ${t.origin} 應為 ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`無效的字串:必須以 "${a.prefix}" 開頭`:a.format==="ends_with"?`無效的字串:必須以 "${a.suffix}" 結尾`:a.format==="includes"?`無效的字串:必須包含 "${a.includes}"`:a.format==="regex"?`無效的字串:必須符合格式 ${a.pattern}`:`無效的 ${n[a.format]??t.format}`}case"not_multiple_of":return`無效的數字:必須為 ${t.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${t.keys.length>1?"們":""}:${te(t.keys,"、")}`;case"invalid_key":return`${t.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${t.origin} 中有無效的值`;default:return"無效的輸入值"}}};function ik(){return{localeError:nk()}}var ak=()=>{let e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function r(t){return e[t]??null}let n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,s=ge(t.input),o=i[s]??s;return/^[A-Z]/.test(t.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${t.expected}, àmọ̀ a rí ${o}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${a}, àmọ̀ a rí ${o}`}case"invalid_value":return t.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${me(t.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?`Tó pọ̀ jù: a ní láti jẹ́ pé ${t.origin??"iye"} ${s.verb} ${a}${t.maximum} ${s.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${a}${t.maximum}`}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?`Kéré ju: a ní láti jẹ́ pé ${t.origin} ${s.verb} ${a}${t.minimum} ${s.unit}`:`Kéré ju: a ní láti jẹ́ ${a}${t.minimum}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${a.prefix}"`:a.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${a.suffix}"`:a.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${a.includes}"`:a.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${a.pattern}`:`Aṣìṣe: ${n[a.format]??t.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${t.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${te(t.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${t.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${t.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function sk(){return{localeError:ak()}}var wl,Jv=Symbol("ZodOutput"),Wv=Symbol("ZodInput");class Yv{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...n){let i=n[0];return this._map.set(r,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){let n=r._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let t={...i,...this._map.get(r)};return Object.keys(t).length?t:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function Y0(){return new Yv}(wl=globalThis).__zod_globalRegistry??(wl.__zod_globalRegistry=Y0());var _t=globalThis.__zod_globalRegistry;function Vv(e,r){return new e({type:"string",...re(r)})}function Xv(e,r){return new e({type:"string",coerce:!0,...re(r)})}function V0(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...re(r)})}function qn(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...re(r)})}function X0(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...re(r)})}function K0(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...re(r)})}function Q0(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...re(r)})}function ec(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...re(r)})}function si(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...re(r)})}function tc(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...re(r)})}function rc(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...re(r)})}function nc(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...re(r)})}function ic(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...re(r)})}function ac(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...re(r)})}function sc(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...re(r)})}function oc(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...re(r)})}function cc(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...re(r)})}function uc(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...re(r)})}function Kv(e,r){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...re(r)})}function lc(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...re(r)})}function fc(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...re(r)})}function dc(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...re(r)})}function hc(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...re(r)})}function pc(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...re(r)})}function vc(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...re(r)})}var Qv={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function em(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...re(r)})}function tm(e,r){return new e({type:"string",format:"date",check:"string_format",...re(r)})}function rm(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...re(r)})}function nm(e,r){return new e({type:"string",format:"duration",check:"string_format",...re(r)})}function im(e,r){return new e({type:"number",checks:[],...re(r)})}function am(e,r){return new e({type:"number",coerce:!0,checks:[],...re(r)})}function sm(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...re(r)})}function om(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...re(r)})}function cm(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...re(r)})}function um(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...re(r)})}function lm(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...re(r)})}function fm(e,r){return new e({type:"boolean",...re(r)})}function dm(e,r){return new e({type:"boolean",coerce:!0,...re(r)})}function hm(e,r){return new e({type:"bigint",...re(r)})}function pm(e,r){return new e({type:"bigint",coerce:!0,...re(r)})}function vm(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...re(r)})}function mm(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...re(r)})}function gm(e,r){return new e({type:"symbol",...re(r)})}function bm(e,r){return new e({type:"undefined",...re(r)})}function ym(e,r){return new e({type:"null",...re(r)})}function _m(e){return new e({type:"any"})}function wm(e){return new e({type:"unknown"})}function km(e,r){return new e({type:"never",...re(r)})}function $m(e,r){return new e({type:"void",...re(r)})}function xm(e,r){return new e({type:"date",...re(r)})}function Sm(e,r){return new e({type:"date",coerce:!0,...re(r)})}function Im(e,r){return new e({type:"nan",...re(r)})}function qt(e,r){return new U0({check:"less_than",...re(r),value:e,inclusive:!1})}function wt(e,r){return new U0({check:"less_than",...re(r),value:e,inclusive:!0})}function Ft(e,r){return new Z0({check:"greater_than",...re(r),value:e,inclusive:!1})}function ft(e,r){return new Z0({check:"greater_than",...re(r),value:e,inclusive:!0})}function mc(e){return Ft(0,e)}function gc(e){return qt(0,e)}function bc(e){return wt(0,e)}function yc(e){return ft(0,e)}function wr(e,r){return new fp({check:"multiple_of",...re(r),value:e})}function Cr(e,r){return new pp({check:"max_size",...re(r),maximum:e})}function Ht(e,r){return new vp({check:"min_size",...re(r),minimum:e})}function cn(e,r){return new mp({check:"size_equals",...re(r),size:e})}function un(e,r){return new gp({check:"max_length",...re(r),maximum:e})}function ir(e,r){return new bp({check:"min_length",...re(r),minimum:e})}function ln(e,r){return new yp({check:"length_equals",...re(r),length:e})}function oi(e,r){return new _p({check:"string_format",format:"regex",...re(r),pattern:e})}function ci(e){return new wp({check:"string_format",format:"lowercase",...re(e)})}function ui(e){return new kp({check:"string_format",format:"uppercase",...re(e)})}function li(e,r){return new $p({check:"string_format",format:"includes",...re(r),includes:e})}function fi(e,r){return new xp({check:"string_format",format:"starts_with",...re(r),prefix:e})}function di(e,r){return new Sp({check:"string_format",format:"ends_with",...re(r),suffix:e})}function _c(e,r,n){return new Ip({check:"property",property:e,schema:r,...re(n)})}function hi(e,r){return new Tp({check:"mime_type",mime:e,...re(r)})}function Dt(e){return new Cp({check:"overwrite",tx:e})}function pi(e){return Dt(r=>r.normalize(e))}function vi(){return Dt(e=>e.trim())}function mi(){return Dt(e=>e.toLowerCase())}function gi(){return Dt(e=>e.toUpperCase())}function bi(){return Dt(e=>b1(e))}function Tm(e,r,n){return new e({type:"array",element:r,...re(n)})}function ok(e,r,n){return new e({type:"union",options:r,...re(n)})}function ck(e,r,n){return new e({type:"union",options:r,inclusive:!1,...re(n)})}function uk(e,r,n,i){return new e({type:"union",options:n,discriminator:r,...re(i)})}function lk(e,r,n){return new e({type:"intersection",left:r,right:n})}function fk(e,r,n,i){let t=n instanceof ye;return new e({type:"tuple",items:r,rest:t?n:null,...re(t?i:n)})}function dk(e,r,n,i){return new e({type:"record",keyType:r,valueType:n,...re(i)})}function hk(e,r,n,i){return new e({type:"map",keyType:r,valueType:n,...re(i)})}function pk(e,r,n){return new e({type:"set",valueType:r,...re(n)})}function vk(e,r,n){let i=Array.isArray(r)?Object.fromEntries(r.map(t=>[t,t])):r;return new e({type:"enum",entries:i,...re(n)})}function mk(e,r,n){return new e({type:"enum",entries:r,...re(n)})}function gk(e,r,n){return new e({type:"literal",values:Array.isArray(r)?r:[r],...re(n)})}function Cm(e,r){return new e({type:"file",...re(r)})}function bk(e,r){return new e({type:"transform",transform:r})}function yk(e,r){return new e({type:"optional",innerType:r})}function _k(e,r){return new e({type:"nullable",innerType:r})}function wk(e,r,n){return new e({type:"default",innerType:r,get defaultValue(){return typeof n=="function"?n():_1(n)}})}function kk(e,r,n){return new e({type:"nonoptional",innerType:r,...re(n)})}function $k(e,r){return new e({type:"success",innerType:r})}function xk(e,r,n){return new e({type:"catch",innerType:r,catchValue:typeof n=="function"?n:()=>n})}function Sk(e,r,n){return new e({type:"pipe",in:r,out:n})}function Ik(e,r){return new e({type:"readonly",innerType:r})}function Tk(e,r,n){return new e({type:"template_literal",parts:r,...re(n)})}function Ck(e,r){return new e({type:"lazy",getter:r})}function zk(e,r){return new e({type:"promise",innerType:r})}function zm(e,r,n){let i=re(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:r,...i})}function Em(e,r,n){return new e({type:"custom",check:"custom",fn:r,...re(n)})}function Nm(e){let r=Am(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(jn(i,n.value,r._zod.def));else{let t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=r),t.continue??(t.continue=!r._zod.def.abort),n.issues.push(jn(t))}},e(n.value,n)));return r}function Am(e,r){let n=new qe({check:"custom",...re(r)});return n._zod.check=e,n}function Pm(e){let r=new qe({check:"describe"});return r._zod.onattach=[n=>{let i=_t.get(n)??{};_t.add(n,{...i,description:e})}],r._zod.check=()=>{},r}function Om(e){let r=new qe({check:"meta"});return r._zod.onattach=[n=>{let i=_t.get(n)??{};_t.add(n,{...i,...e})}],r._zod.check=()=>{},r}function Mm(e,r){let n=re(r),i=n.truthy??["true","1","yes","on","y","enabled"],t=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),t=t.map(f=>typeof f=="string"?f.toLowerCase():f));let a=new Set(i),s=new Set(t),o=e.Codec??J0,l=e.Boolean??q0,d=new(e.String??on)({type:"string",error:n.error}),p=new l({type:"boolean",error:n.error}),v=new o({type:"pipe",in:d,out:p,transform:(f,u)=>{let h=f;return n.case!=="sensitive"&&(h=h.toLowerCase()),a.has(h)?!0:s.has(h)?!1:(u.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...s],input:u.value,inst:v,continue:!1}),{})},reverseTransform:(f,u)=>f===!0?i[0]||"true":t[0]||"false",error:n.error});return v}function fn(e,r,n,i={}){let t=re(i),a={...re(i),check:"string_format",type:"string",format:r,fn:typeof n=="function"?n:s=>n.test(s),...t};return n instanceof RegExp&&(a.pattern=n),new e(a)}function kr(e){let r=(e==null?void 0:e.target)??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??_t,target:r,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Oe(e,r,n={path:[],schemaPath:[]}){var d,p;var i;let t=e._zod.def,a=r.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};r.seen.set(e,s);let o=(p=(d=e._zod).toJSONSchema)==null?void 0:p.call(d);if(o)s.schema=o;else{let v={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,s.schema,v);else{let u=s.schema,h=r.processors[t.type];if(!h)throw Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);h(e,r,u,v)}let f=e._zod.parent;f&&(s.ref||(s.ref=f),Oe(f,r,v),r.seen.get(f).isParent=!0)}let l=r.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),r.io==="input"&<(e)&&(delete s.schema.examples,delete s.schema.default),r.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,r.seen.get(e).schema}function $r(e,r){var s,o,l,d;let n=e.seen.get(r);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let p of e.seen.entries()){let v=(s=e.metadataRegistry.get(p[0]))==null?void 0:s.id;if(v){let f=i.get(v);if(f&&f!==p[0])throw Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(v,p[0])}}let t=p=>{var h;let v=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let c=(h=e.external.registry.get(p[0]))==null?void 0:h.id,m=e.external.uri??(g=>g);if(c)return{ref:m(c)};let b=p[1].defId??p[1].schema.id??`schema${e.counter++}`;return p[1].defId=b,{defId:b,ref:`${m("__shared")}#/${v}/${b}`}}if(p[1]===n)return{ref:"#"};let f=`#/${v}/`,u=p[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:f+u}},a=p=>{if(p[1].schema.$ref)return;let v=p[1],{ref:f,defId:u}=t(p);v.def={...v.schema},u&&(v.defId=u);let h=v.schema;for(let c in h)delete h[c];h.$ref=f};if(e.cycles==="throw")for(let p of e.seen.entries()){let v=p[1];if(v.cycle)throw Error(`Cycle detected: #/${(o=v.cycle)==null?void 0:o.join("/")}/<root>
|
|
84
|
-
|
|
85
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let p of e.seen.entries()){let v=p[1];if(r===p[0]){a(p);continue}if(e.external){let f=(l=e.external.registry.get(p[0]))==null?void 0:l.id;if(r!==p[0]&&f){a(p);continue}}if((d=e.metadataRegistry.get(p[0]))!=null&&d.id){a(p);continue}if(v.cycle){a(p);continue}if(v.count>1&&e.reused==="ref"){a(p);continue}}}function xr(e,r){var s,o,l;let n=e.seen.get(r);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=d=>{let p=e.seen.get(d);if(p.ref===null)return;let v=p.def??p.schema,f={...v},u=p.ref;if(p.ref=null,u){i(u);let c=e.seen.get(u),m=c.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(m)):Object.assign(v,m),Object.assign(v,f),d._zod.parent===u)for(let b in v)b==="$ref"||b==="allOf"||b in f||delete v[b];if(m.$ref)for(let b in v)b==="$ref"||b==="allOf"||b in c.def&&JSON.stringify(v[b])===JSON.stringify(c.def[b])&&delete v[b]}let h=d._zod.parent;if(h&&h!==u){i(h);let c=e.seen.get(h);if(c!=null&&c.schema.$ref&&(v.$ref=c.schema.$ref,c.def))for(let m in v)m==="$ref"||m==="allOf"||m in c.def&&JSON.stringify(v[m])===JSON.stringify(c.def[m])&&delete v[m]}e.override({zodSchema:d,jsonSchema:v,path:p.path??[]})};for(let d of[...e.seen.entries()].reverse())i(d[0]);let t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,(s=e.external)!=null&&s.uri){let d=(o=e.external.registry.get(r))==null?void 0:o.id;if(!d)throw Error("Schema is missing an `id` property");t.$id=e.external.uri(d)}Object.assign(t,n.def??n.schema);let a=((l=e.external)==null?void 0:l.defs)??{};for(let d of e.seen.entries()){let p=d[1];p.def&&p.defId&&(a[p.defId]=p.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?t.$defs=a:t.definitions=a);try{let d=JSON.parse(JSON.stringify(t));return Object.defineProperty(d,"~standard",{value:{...r["~standard"],jsonSchema:{input:Rr(r,"input",e.processors),output:Rr(r,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw Error("Error converting schema to JSON.")}}function lt(e,r){let n=r??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return lt(i.element,n);if(i.type==="set")return lt(i.valueType,n);if(i.type==="lazy")return lt(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return lt(i.innerType,n);if(i.type==="intersection")return lt(i.left,n)||lt(i.right,n);if(i.type==="record"||i.type==="map")return lt(i.keyType,n)||lt(i.valueType,n);if(i.type==="pipe")return lt(i.in,n)||lt(i.out,n);if(i.type==="object"){for(let t in i.shape)if(lt(i.shape[t],n))return!0;return!1}if(i.type==="union"){for(let t of i.options)if(lt(t,n))return!0;return!1}if(i.type==="tuple"){for(let t of i.items)if(lt(t,n))return!0;return!!(i.rest&<(i.rest,n))}return!1}var Dm=(e,r={})=>n=>{let i=kr({...n,processors:r});return Oe(e,i),$r(i,e),xr(i,e)},Rr=(e,r,n={})=>i=>{let{libraryOptions:t,target:a}=i??{},s=kr({...t??{},target:a,io:r,processors:n});return Oe(e,s),$r(s,e),xr(s,e)},Ek={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Rm=(e,r,n,i)=>{let t=n;t.type="string";let{minimum:a,maximum:s,format:o,patterns:l,contentEncoding:d}=e._zod.bag;if(typeof a=="number"&&(t.minLength=a),typeof s=="number"&&(t.maxLength=s),o&&(t.format=Ek[o]??o,t.format===""&&delete t.format,o==="time"&&delete t.format),d&&(t.contentEncoding=d),l&&l.size>0){let p=[...l];p.length===1?t.pattern=p[0].source:p.length>1&&(t.allOf=[...p.map(v=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},Lm=(e,r,n,i)=>{let t=n,{minimum:a,maximum:s,format:o,multipleOf:l,exclusiveMaximum:d,exclusiveMinimum:p}=e._zod.bag;typeof o=="string"&&o.includes("int")?t.type="integer":t.type="number",typeof p=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(t.minimum=p,t.exclusiveMinimum=!0):t.exclusiveMinimum=p),typeof a=="number"&&(t.minimum=a,typeof p=="number"&&r.target!=="draft-04"&&(p>=a?delete t.minimum:delete t.exclusiveMinimum)),typeof d=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(t.maximum=d,t.exclusiveMaximum=!0):t.exclusiveMaximum=d),typeof s=="number"&&(t.maximum=s,typeof d=="number"&&r.target!=="draft-04"&&(d<=s?delete t.maximum:delete t.exclusiveMaximum)),typeof l=="number"&&(t.multipleOf=l)},Um=(e,r,n,i)=>{n.type="boolean"},Zm=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},jm=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},Bm=(e,r,n,i)=>{r.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},qm=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},Fm=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},Hm=(e,r,n,i)=>{n.not={}},Gm=(e,r,n,i)=>{},Jm=(e,r,n,i)=>{},Wm=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},Ym=(e,r,n,i)=>{let t=e._zod.def,a=x0(t.entries);a.every(s=>typeof s=="number")&&(n.type="number"),a.every(s=>typeof s=="string")&&(n.type="string"),n.enum=a},Vm=(e,r,n,i)=>{let t=e._zod.def,a=[];for(let s of t.values)if(s===void 0){if(r.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(r.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(s))}else a.push(s);if(a.length!==0)if(a.length===1){let s=a[0];n.type=s===null?"null":typeof s,r.target==="draft-04"||r.target==="openapi-3.0"?n.enum=[s]:n.const=s}else a.every(s=>typeof s=="number")&&(n.type="number"),a.every(s=>typeof s=="string")&&(n.type="string"),a.every(s=>typeof s=="boolean")&&(n.type="boolean"),a.every(s=>s===null)&&(n.type="null"),n.enum=a},Xm=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},Km=(e,r,n,i)=>{let t=n,a=e._zod.pattern;if(!a)throw Error("Pattern not found in template literal");t.type="string",t.pattern=a.source},Qm=(e,r,n,i)=>{let t=n,a={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:o,mime:l}=e._zod.bag;s!==void 0&&(a.minLength=s),o!==void 0&&(a.maxLength=o),l?l.length===1?(a.contentMediaType=l[0],Object.assign(t,a)):(Object.assign(t,a),t.anyOf=l.map(d=>({contentMediaType:d}))):Object.assign(t,a)},eg=(e,r,n,i)=>{n.type="boolean"},tg=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},rg=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},ng=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},ig=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},ag=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},sg=(e,r,n,i)=>{let t=n,a=e._zod.def,{minimum:s,maximum:o}=e._zod.bag;typeof s=="number"&&(t.minItems=s),typeof o=="number"&&(t.maxItems=o),t.type="array",t.items=Oe(a.element,r,{...i,path:[...i.path,"items"]})},og=(e,r,n,i)=>{var d;let t=n,a=e._zod.def;t.type="object",t.properties={};let s=a.shape;for(let p in s)t.properties[p]=Oe(s[p],r,{...i,path:[...i.path,"properties",p]});let o=new Set(Object.keys(s)),l=new Set([...o].filter(p=>{let v=a.shape[p]._zod;return r.io==="input"?v.optin===void 0:v.optout===void 0}));l.size>0&&(t.required=Array.from(l)),((d=a.catchall)==null?void 0:d._zod.def.type)==="never"?t.additionalProperties=!1:a.catchall?a.catchall&&(t.additionalProperties=Oe(a.catchall,r,{...i,path:[...i.path,"additionalProperties"]})):r.io==="output"&&(t.additionalProperties=!1)},wc=(e,r,n,i)=>{let t=e._zod.def,a=t.inclusive===!1,s=t.options.map((o,l)=>Oe(o,r,{...i,path:[...i.path,a?"oneOf":"anyOf",l]}));a?n.oneOf=s:n.anyOf=s},cg=(e,r,n,i)=>{let t=e._zod.def,a=Oe(t.left,r,{...i,path:[...i.path,"allOf",0]}),s=Oe(t.right,r,{...i,path:[...i.path,"allOf",1]}),o=d=>"allOf"in d&&Object.keys(d).length===1,l=[...o(a)?a.allOf:[a],...o(s)?s.allOf:[s]];n.allOf=l},ug=(e,r,n,i)=>{let t=n,a=e._zod.def;t.type="array";let s=r.target==="draft-2020-12"?"prefixItems":"items",o=r.target==="draft-2020-12"||r.target==="openapi-3.0"?"items":"additionalItems",l=a.items.map((f,u)=>Oe(f,r,{...i,path:[...i.path,s,u]})),d=a.rest?Oe(a.rest,r,{...i,path:[...i.path,o,...r.target==="openapi-3.0"?[a.items.length]:[]]}):null;r.target==="draft-2020-12"?(t.prefixItems=l,d&&(t.items=d)):r.target==="openapi-3.0"?(t.items={anyOf:l},d&&t.items.anyOf.push(d),t.minItems=l.length,!d&&(t.maxItems=l.length)):(t.items=l,d&&(t.additionalItems=d));let{minimum:p,maximum:v}=e._zod.bag;typeof p=="number"&&(t.minItems=p),typeof v=="number"&&(t.maxItems=v)},lg=(e,r,n,i)=>{var d;let t=n,a=e._zod.def;t.type="object";let s=a.keyType,o=(d=s._zod.bag)==null?void 0:d.patterns;if(a.mode==="loose"&&o&&o.size>0){let p=Oe(a.valueType,r,{...i,path:[...i.path,"patternProperties","*"]});t.patternProperties={};for(let v of o)t.patternProperties[v.source]=p}else(r.target==="draft-07"||r.target==="draft-2020-12")&&(t.propertyNames=Oe(a.keyType,r,{...i,path:[...i.path,"propertyNames"]})),t.additionalProperties=Oe(a.valueType,r,{...i,path:[...i.path,"additionalProperties"]});let l=s._zod.values;if(l){let p=[...l].filter(v=>typeof v=="string"||typeof v=="number");p.length>0&&(t.required=p)}},fg=(e,r,n,i)=>{let t=e._zod.def,a=Oe(t.innerType,r,i),s=r.seen.get(e);r.target==="openapi-3.0"?(s.ref=t.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},dg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType},hg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},pg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType,r.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},vg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType;let s;try{s=t.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},mg=(e,r,n,i)=>{let t=e._zod.def,a=r.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;Oe(a,r,i);let s=r.seen.get(e);s.ref=a},gg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType,n.readOnly=!0},bg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType},kc=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType},yg=(e,r,n,i)=>{let t=e._zod.innerType;Oe(t,r,i);let a=r.seen.get(e);a.ref=t},Yo={string:Rm,number:Lm,boolean:Um,bigint:Zm,symbol:jm,null:Bm,undefined:qm,void:Fm,never:Hm,any:Gm,unknown:Jm,date:Wm,enum:Ym,literal:Vm,nan:Xm,template_literal:Km,file:Qm,success:eg,custom:tg,function:rg,transform:ng,map:ig,set:ag,array:sg,object:og,union:wc,intersection:cg,tuple:ug,record:lg,nullable:fg,nonoptional:dg,default:hg,prefault:pg,catch:vg,pipe:mg,readonly:gg,promise:bg,optional:kc,lazy:yg};function _g(e,r){if("_idmap"in e){let i=e,t=kr({...r,processors:Yo}),a={};for(let l of i._idmap.entries()){let[d,p]=l;Oe(p,t)}let s={},o={registry:i,uri:r==null?void 0:r.uri,defs:a};t.external=o;for(let l of i._idmap.entries()){let[d,p]=l;$r(t,p),s[d]=xr(t,p)}if(Object.keys(a).length>0){let l=t.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:a}}return{schemas:s}}let n=kr({...r,processors:Yo});return Oe(e,n),$r(n,e),xr(n,e)}class Nk{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(r){this.ctx.counter=r}get seen(){return this.ctx.seen}constructor(r){let n=(r==null?void 0:r.target)??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=kr({processors:Yo,target:n,...(r==null?void 0:r.metadata)&&{metadata:r.metadata},...(r==null?void 0:r.unrepresentable)&&{unrepresentable:r.unrepresentable},...(r==null?void 0:r.override)&&{override:r.override},...(r==null?void 0:r.io)&&{io:r.io}})}process(r,n={path:[],schemaPath:[]}){return Oe(r,this.ctx,n)}emit(r,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),$r(this.ctx,r);let i=xr(this.ctx,r),{"~standard":t,...a}=i;return a}}var Ak={},wg={};Ot(wg,{xor:()=>E2,xid:()=>Qg,void:()=>x2,uuidv7:()=>Hg,uuidv6:()=>Fg,uuidv4:()=>qg,uuid:()=>Bg,url:()=>Gg,unknown:()=>ar,union:()=>Ui,undefined:()=>k2,ulid:()=>Kg,uint64:()=>_2,uint32:()=>g2,tuple:()=>Hc,transform:()=>ji,templateLiteral:()=>q2,symbol:()=>w2,superRefine:()=>bu,success:()=>Z2,stringbool:()=>V2,stringFormat:()=>l2,string:()=>Fn,strictObject:()=>C2,set:()=>M2,refine:()=>gu,record:()=>Gc,readonly:()=>fu,promise:()=>F2,preprocess:()=>K2,prefault:()=>iu,pipe:()=>jr,partialRecord:()=>A2,optional:()=>Ur,object:()=>T2,number:()=>zc,nullish:()=>U2,nullable:()=>Zr,null:()=>Oc,nonoptional:()=>au,never:()=>Ri,nativeEnum:()=>D2,nanoid:()=>Yg,nan:()=>j2,meta:()=>W2,map:()=>O2,mac:()=>r2,looseRecord:()=>P2,looseObject:()=>z2,literal:()=>R2,lazy:()=>pu,ksuid:()=>e2,keyof:()=>I2,jwt:()=>u2,json:()=>X2,ipv6:()=>n2,ipv4:()=>t2,intersection:()=>qc,int64:()=>y2,int32:()=>m2,int:()=>Hn,instanceof:()=>Y2,httpUrl:()=>Jg,hostname:()=>f2,hex:()=>d2,hash:()=>h2,guid:()=>jg,function:()=>Gn,float64:()=>v2,float32:()=>p2,file:()=>L2,exactOptional:()=>Qc,enum:()=>Zi,emoji:()=>Wg,email:()=>Zg,e164:()=>c2,discriminatedUnion:()=>N2,describe:()=>J2,date:()=>S2,custom:()=>G2,cuid2:()=>Xg,cuid:()=>Vg,codec:()=>B2,cidrv6:()=>a2,cidrv4:()=>i2,check:()=>H2,catch:()=>cu,boolean:()=>Ec,bigint:()=>b2,base64url:()=>o2,base64:()=>s2,array:()=>gn,any:()=>$2,_function:()=>Gn,_default:()=>ru,_ZodString:()=>yi,ZodXor:()=>Zc,ZodXID:()=>Ii,ZodVoid:()=>Lc,ZodUnknown:()=>Dc,ZodUnion:()=>yn,ZodUndefined:()=>Ac,ZodUUID:()=>zt,ZodURL:()=>hn,ZodULID:()=>Si,ZodType:()=>ke,ZodTuple:()=>Fc,ZodTransform:()=>Xc,ZodTemplateLiteral:()=>du,ZodSymbol:()=>Nc,ZodSuccess:()=>su,ZodStringFormat:()=>Re,ZodString:()=>dn,ZodSet:()=>Wc,ZodRecord:()=>_n,ZodReadonly:()=>lu,ZodPromise:()=>vu,ZodPrefault:()=>nu,ZodPipe:()=>Fi,ZodOptional:()=>Bi,ZodObject:()=>bn,ZodNumberFormat:()=>ur,ZodNumber:()=>pn,ZodNullable:()=>eu,ZodNull:()=>Pc,ZodNonOptional:()=>qi,ZodNever:()=>Rc,ZodNanoID:()=>ki,ZodNaN:()=>uu,ZodMap:()=>Jc,ZodMAC:()=>Cc,ZodLiteral:()=>Yc,ZodLazy:()=>hu,ZodKSUID:()=>Ti,ZodJWT:()=>Mi,ZodIntersection:()=>Bc,ZodIPv6:()=>zi,ZodIPv4:()=>Ci,ZodGUID:()=>Lr,ZodFunction:()=>mu,ZodFile:()=>Vc,ZodExactOptional:()=>Kc,ZodEnum:()=>Sr,ZodEmoji:()=>wi,ZodEmail:()=>_i,ZodE164:()=>Oi,ZodDiscriminatedUnion:()=>jc,ZodDefault:()=>tu,ZodDate:()=>Li,ZodCustomStringFormat:()=>zr,ZodCustom:()=>wn,ZodCodec:()=>Hi,ZodCatch:()=>ou,ZodCUID2:()=>xi,ZodCUID:()=>$i,ZodCIDRv6:()=>Ni,ZodCIDRv4:()=>Ei,ZodBoolean:()=>vn,ZodBigIntFormat:()=>Di,ZodBigInt:()=>mn,ZodBase64URL:()=>Pi,ZodBase64:()=>Ai,ZodArray:()=>Uc,ZodAny:()=>Mc});var kg={};Ot(kg,{uppercase:()=>ui,trim:()=>vi,toUpperCase:()=>gi,toLowerCase:()=>mi,startsWith:()=>fi,slugify:()=>bi,size:()=>cn,regex:()=>oi,property:()=>_c,positive:()=>mc,overwrite:()=>Dt,normalize:()=>pi,nonpositive:()=>bc,nonnegative:()=>yc,negative:()=>gc,multipleOf:()=>wr,minSize:()=>Ht,minLength:()=>ir,mime:()=>hi,maxSize:()=>Cr,maxLength:()=>un,lte:()=>wt,lt:()=>qt,lowercase:()=>ci,length:()=>ln,includes:()=>li,gte:()=>ft,gt:()=>Ft,endsWith:()=>di});var $c={};Ot($c,{time:()=>Sg,duration:()=>Ig,datetime:()=>$g,date:()=>xg,ZodISOTime:()=>Ic,ZodISODuration:()=>Tc,ZodISODateTime:()=>xc,ZodISODate:()=>Sc});var xc=F("ZodISODateTime",(e,r)=>{Bp.init(e,r),Re.init(e,r)});function $g(e){return em(xc,e)}var Sc=F("ZodISODate",(e,r)=>{qp.init(e,r),Re.init(e,r)});function xg(e){return tm(Sc,e)}var Ic=F("ZodISOTime",(e,r)=>{Fp.init(e,r),Re.init(e,r)});function Sg(e){return rm(Ic,e)}var Tc=F("ZodISODuration",(e,r)=>{Hp.init(e,r),Re.init(e,r)});function Ig(e){return nm(Tc,e)}var Tg=(e,r)=>{I0.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>C0(e,n)},flatten:{value:n=>T0(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Un,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Un,2)}},isEmpty:{get(){return e.issues.length===0}}})},Pk=F("ZodError",Tg),yt=F("ZodError",Tg,{Parent:Error}),Cg=Qr(yt),zg=en(yt),Eg=tn(yt),Ng=rn(yt),Ag=z0(yt),Pg=E0(yt),Og=N0(yt),Mg=A0(yt),Dg=P0(yt),Rg=O0(yt),Lg=M0(yt),Ug=D0(yt),ke=F("ZodType",(e,r)=>(ye.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:Rr(e,"input"),output:Rr(e,"output")}}),e.toJSONSchema=Dm(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...n)=>e.clone(Te.mergeDefs(r,{checks:[...r.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>It(e,n,i),e.brand=()=>e,e.register=(n,i)=>(n.add(e,i),e),e.parse=(n,i)=>Cg(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Eg(e,n,i),e.parseAsync=async(n,i)=>zg(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Ng(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Ag(e,n,i),e.decode=(n,i)=>Pg(e,n,i),e.encodeAsync=async(n,i)=>Og(e,n,i),e.decodeAsync=async(n,i)=>Mg(e,n,i),e.safeEncode=(n,i)=>Dg(e,n,i),e.safeDecode=(n,i)=>Rg(e,n,i),e.safeEncodeAsync=async(n,i)=>Lg(e,n,i),e.safeDecodeAsync=async(n,i)=>Ug(e,n,i),e.refine=(n,i)=>e.check(gu(n,i)),e.superRefine=n=>e.check(bu(n)),e.overwrite=n=>e.check(Dt(n)),e.optional=()=>Ur(e),e.exactOptional=()=>Qc(e),e.nullable=()=>Zr(e),e.nullish=()=>Ur(Zr(e)),e.nonoptional=n=>au(e,n),e.array=()=>gn(e),e.or=n=>Ui([e,n]),e.and=n=>qc(e,n),e.transform=n=>jr(e,ji(n)),e.default=n=>ru(e,n),e.prefault=n=>iu(e,n),e.catch=n=>cu(e,n),e.pipe=n=>jr(e,n),e.readonly=()=>fu(e),e.describe=n=>{let i=e.clone();return _t.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){var n;return(n=_t.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return _t.get(e);let i=e.clone();return _t.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),yi=F("_ZodString",(e,r)=>{on.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Rm(e,i,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(oi(...i)),e.includes=(...i)=>e.check(li(...i)),e.startsWith=(...i)=>e.check(fi(...i)),e.endsWith=(...i)=>e.check(di(...i)),e.min=(...i)=>e.check(ir(...i)),e.max=(...i)=>e.check(un(...i)),e.length=(...i)=>e.check(ln(...i)),e.nonempty=(...i)=>e.check(ir(1,...i)),e.lowercase=i=>e.check(ci(i)),e.uppercase=i=>e.check(ui(i)),e.trim=()=>e.check(vi()),e.normalize=(...i)=>e.check(pi(...i)),e.toLowerCase=()=>e.check(mi()),e.toUpperCase=()=>e.check(gi()),e.slugify=()=>e.check(bi())}),dn=F("ZodString",(e,r)=>{on.init(e,r),yi.init(e,r),e.email=n=>e.check(V0(_i,n)),e.url=n=>e.check(si(hn,n)),e.jwt=n=>e.check(vc(Mi,n)),e.emoji=n=>e.check(tc(wi,n)),e.guid=n=>e.check(qn(Lr,n)),e.uuid=n=>e.check(X0(zt,n)),e.uuidv4=n=>e.check(K0(zt,n)),e.uuidv6=n=>e.check(Q0(zt,n)),e.uuidv7=n=>e.check(ec(zt,n)),e.nanoid=n=>e.check(rc(ki,n)),e.guid=n=>e.check(qn(Lr,n)),e.cuid=n=>e.check(nc($i,n)),e.cuid2=n=>e.check(ic(xi,n)),e.ulid=n=>e.check(ac(Si,n)),e.base64=n=>e.check(dc(Ai,n)),e.base64url=n=>e.check(hc(Pi,n)),e.xid=n=>e.check(sc(Ii,n)),e.ksuid=n=>e.check(oc(Ti,n)),e.ipv4=n=>e.check(cc(Ci,n)),e.ipv6=n=>e.check(uc(zi,n)),e.cidrv4=n=>e.check(lc(Ei,n)),e.cidrv6=n=>e.check(fc(Ni,n)),e.e164=n=>e.check(pc(Oi,n)),e.datetime=n=>e.check($g(n)),e.date=n=>e.check(xg(n)),e.time=n=>e.check(Sg(n)),e.duration=n=>e.check(Ig(n))});function Fn(e){return Vv(dn,e)}var Re=F("ZodStringFormat",(e,r)=>{De.init(e,r),yi.init(e,r)}),_i=F("ZodEmail",(e,r)=>{Pp.init(e,r),Re.init(e,r)});function Zg(e){return V0(_i,e)}var Lr=F("ZodGUID",(e,r)=>{Np.init(e,r),Re.init(e,r)});function jg(e){return qn(Lr,e)}var zt=F("ZodUUID",(e,r)=>{Ap.init(e,r),Re.init(e,r)});function Bg(e){return X0(zt,e)}function qg(e){return K0(zt,e)}function Fg(e){return Q0(zt,e)}function Hg(e){return ec(zt,e)}var hn=F("ZodURL",(e,r)=>{Op.init(e,r),Re.init(e,r)});function Gg(e){return si(hn,e)}function Jg(e){return si(hn,{protocol:/^https?$/,hostname:cr.domain,...Te.normalizeParams(e)})}var wi=F("ZodEmoji",(e,r)=>{Mp.init(e,r),Re.init(e,r)});function Wg(e){return tc(wi,e)}var ki=F("ZodNanoID",(e,r)=>{Dp.init(e,r),Re.init(e,r)});function Yg(e){return rc(ki,e)}var $i=F("ZodCUID",(e,r)=>{Rp.init(e,r),Re.init(e,r)});function Vg(e){return nc($i,e)}var xi=F("ZodCUID2",(e,r)=>{Lp.init(e,r),Re.init(e,r)});function Xg(e){return ic(xi,e)}var Si=F("ZodULID",(e,r)=>{Up.init(e,r),Re.init(e,r)});function Kg(e){return ac(Si,e)}var Ii=F("ZodXID",(e,r)=>{Zp.init(e,r),Re.init(e,r)});function Qg(e){return sc(Ii,e)}var Ti=F("ZodKSUID",(e,r)=>{jp.init(e,r),Re.init(e,r)});function e2(e){return oc(Ti,e)}var Ci=F("ZodIPv4",(e,r)=>{Gp.init(e,r),Re.init(e,r)});function t2(e){return cc(Ci,e)}var Cc=F("ZodMAC",(e,r)=>{Wp.init(e,r),Re.init(e,r)});function r2(e){return Kv(Cc,e)}var zi=F("ZodIPv6",(e,r)=>{Jp.init(e,r),Re.init(e,r)});function n2(e){return uc(zi,e)}var Ei=F("ZodCIDRv4",(e,r)=>{Yp.init(e,r),Re.init(e,r)});function i2(e){return lc(Ei,e)}var Ni=F("ZodCIDRv6",(e,r)=>{Vp.init(e,r),Re.init(e,r)});function a2(e){return fc(Ni,e)}var Ai=F("ZodBase64",(e,r)=>{Xp.init(e,r),Re.init(e,r)});function s2(e){return dc(Ai,e)}var Pi=F("ZodBase64URL",(e,r)=>{Qp.init(e,r),Re.init(e,r)});function o2(e){return hc(Pi,e)}var Oi=F("ZodE164",(e,r)=>{ev.init(e,r),Re.init(e,r)});function c2(e){return pc(Oi,e)}var Mi=F("ZodJWT",(e,r)=>{rv.init(e,r),Re.init(e,r)});function u2(e){return vc(Mi,e)}var zr=F("ZodCustomStringFormat",(e,r)=>{nv.init(e,r),Re.init(e,r)});function l2(e,r,n={}){return fn(zr,e,r,n)}function f2(e){return fn(zr,"hostname",cr.hostname,e)}function d2(e){return fn(zr,"hex",cr.hex,e)}function h2(e,r){let n=(r==null?void 0:r.enc)??"hex",i=`${e}_${n}`,t=cr[i];if(!t)throw Error(`Unrecognized hash format: ${i}`);return fn(zr,i,t,r)}var pn=F("ZodNumber",(e,r)=>{B0.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Lm(e,i,t),e.gt=(i,t)=>e.check(Ft(i,t)),e.gte=(i,t)=>e.check(ft(i,t)),e.min=(i,t)=>e.check(ft(i,t)),e.lt=(i,t)=>e.check(qt(i,t)),e.lte=(i,t)=>e.check(wt(i,t)),e.max=(i,t)=>e.check(wt(i,t)),e.int=i=>e.check(Hn(i)),e.safe=i=>e.check(Hn(i)),e.positive=i=>e.check(Ft(0,i)),e.nonnegative=i=>e.check(ft(0,i)),e.negative=i=>e.check(qt(0,i)),e.nonpositive=i=>e.check(wt(0,i)),e.multipleOf=(i,t)=>e.check(wr(i,t)),e.step=(i,t)=>e.check(wr(i,t)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function zc(e){return im(pn,e)}var ur=F("ZodNumberFormat",(e,r)=>{iv.init(e,r),pn.init(e,r)});function Hn(e){return sm(ur,e)}function p2(e){return om(ur,e)}function v2(e){return cm(ur,e)}function m2(e){return um(ur,e)}function g2(e){return lm(ur,e)}var vn=F("ZodBoolean",(e,r)=>{q0.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Um(e,n,i)});function Ec(e){return fm(vn,e)}var mn=F("ZodBigInt",(e,r)=>{F0.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Zm(e,i),e.gte=(i,t)=>e.check(ft(i,t)),e.min=(i,t)=>e.check(ft(i,t)),e.gt=(i,t)=>e.check(Ft(i,t)),e.gte=(i,t)=>e.check(ft(i,t)),e.min=(i,t)=>e.check(ft(i,t)),e.lt=(i,t)=>e.check(qt(i,t)),e.lte=(i,t)=>e.check(wt(i,t)),e.max=(i,t)=>e.check(wt(i,t)),e.positive=i=>e.check(Ft(BigInt(0),i)),e.negative=i=>e.check(qt(BigInt(0),i)),e.nonpositive=i=>e.check(wt(BigInt(0),i)),e.nonnegative=i=>e.check(ft(BigInt(0),i)),e.multipleOf=(i,t)=>e.check(wr(i,t));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function b2(e){return hm(mn,e)}var Di=F("ZodBigIntFormat",(e,r)=>{av.init(e,r),mn.init(e,r)});function y2(e){return vm(Di,e)}function _2(e){return mm(Di,e)}var Nc=F("ZodSymbol",(e,r)=>{sv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>jm(e,n)});function w2(e){return gm(Nc,e)}var Ac=F("ZodUndefined",(e,r)=>{ov.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>qm(e,n)});function k2(e){return bm(Ac,e)}var Pc=F("ZodNull",(e,r)=>{cv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Bm(e,n,i)});function Oc(e){return ym(Pc,e)}var Mc=F("ZodAny",(e,r)=>{uv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Gm()});function $2(){return _m(Mc)}var Dc=F("ZodUnknown",(e,r)=>{lv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Jm()});function ar(){return wm(Dc)}var Rc=F("ZodNever",(e,r)=>{fv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Hm(e,n,i)});function Ri(e){return km(Rc,e)}var Lc=F("ZodVoid",(e,r)=>{dv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Fm(e,n)});function x2(e){return $m(Lc,e)}var Li=F("ZodDate",(e,r)=>{hv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Wm(e,i),e.min=(i,t)=>e.check(ft(i,t)),e.max=(i,t)=>e.check(wt(i,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function S2(e){return xm(Li,e)}var Uc=F("ZodArray",(e,r)=>{pv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>sg(e,n,i,t),e.element=r.element,e.min=(n,i)=>e.check(ir(n,i)),e.nonempty=n=>e.check(ir(1,n)),e.max=(n,i)=>e.check(un(n,i)),e.length=(n,i)=>e.check(ln(n,i)),e.unwrap=()=>e.element});function gn(e,r){return Tm(Uc,e,r)}function I2(e){let r=e._zod.def.shape;return Zi(Object.keys(r))}var bn=F("ZodObject",(e,r)=>{bv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>og(e,n,i,t),Te.defineLazy(e,"shape",()=>r.shape),e.keyof=()=>Zi(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ar()}),e.loose=()=>e.clone({...e._zod.def,catchall:ar()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ri()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Te.extend(e,n),e.safeExtend=n=>Te.safeExtend(e,n),e.merge=n=>Te.merge(e,n),e.pick=n=>Te.pick(e,n),e.omit=n=>Te.omit(e,n),e.partial=(...n)=>Te.partial(Bi,e,n[0]),e.required=(...n)=>Te.required(qi,e,n[0])});function T2(e,r){let n={type:"object",shape:e??{},...Te.normalizeParams(r)};return new bn(n)}function C2(e,r){return new bn({type:"object",shape:e,catchall:Ri(),...Te.normalizeParams(r)})}function z2(e,r){return new bn({type:"object",shape:e,catchall:ar(),...Te.normalizeParams(r)})}var yn=F("ZodUnion",(e,r)=>{ai.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>wc(e,n,i,t),e.options=r.options});function Ui(e,r){return new yn({type:"union",options:e,...Te.normalizeParams(r)})}var Zc=F("ZodXor",(e,r)=>{yn.init(e,r),yv.init(e,r),e._zod.processJSONSchema=(n,i,t)=>wc(e,n,i,t),e.options=r.options});function E2(e,r){return new Zc({type:"union",options:e,inclusive:!1,...Te.normalizeParams(r)})}var jc=F("ZodDiscriminatedUnion",(e,r)=>{yn.init(e,r),_v.init(e,r)});function N2(e,r,n){return new jc({type:"union",options:r,discriminator:e,...Te.normalizeParams(n)})}var Bc=F("ZodIntersection",(e,r)=>{wv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>cg(e,n,i,t)});function qc(e,r){return new Bc({type:"intersection",left:e,right:r})}var Fc=F("ZodTuple",(e,r)=>{H0.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ug(e,n,i,t),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Hc(e,r,n){let i=r instanceof ye,t=i?n:r;return new Fc({type:"tuple",items:e,rest:i?r:null,...Te.normalizeParams(t)})}var _n=F("ZodRecord",(e,r)=>{kv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>lg(e,n,i,t),e.keyType=r.keyType,e.valueType=r.valueType});function Gc(e,r,n){return new _n({type:"record",keyType:e,valueType:r,...Te.normalizeParams(n)})}function A2(e,r,n){let i=It(e);return i._zod.values=void 0,new _n({type:"record",keyType:i,valueType:r,...Te.normalizeParams(n)})}function P2(e,r,n){return new _n({type:"record",keyType:e,valueType:r,mode:"loose",...Te.normalizeParams(n)})}var Jc=F("ZodMap",(e,r)=>{$v.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ig(e,n),e.keyType=r.keyType,e.valueType=r.valueType,e.min=(...n)=>e.check(Ht(...n)),e.nonempty=n=>e.check(Ht(1,n)),e.max=(...n)=>e.check(Cr(...n)),e.size=(...n)=>e.check(cn(...n))});function O2(e,r,n){return new Jc({type:"map",keyType:e,valueType:r,...Te.normalizeParams(n)})}var Wc=F("ZodSet",(e,r)=>{xv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ag(e,n),e.min=(...n)=>e.check(Ht(...n)),e.nonempty=n=>e.check(Ht(1,n)),e.max=(...n)=>e.check(Cr(...n)),e.size=(...n)=>e.check(cn(...n))});function M2(e,r){return new Wc({type:"set",valueType:e,...Te.normalizeParams(r)})}var Sr=F("ZodEnum",(e,r)=>{Sv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Ym(e,i,t),e.enum=r.entries,e.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));e.extract=(i,t)=>{let a={};for(let s of i)if(n.has(s))a[s]=r.entries[s];else throw Error(`Key ${s} not found in enum`);return new Sr({...r,checks:[],...Te.normalizeParams(t),entries:a})},e.exclude=(i,t)=>{let a={...r.entries};for(let s of i)if(n.has(s))delete a[s];else throw Error(`Key ${s} not found in enum`);return new Sr({...r,checks:[],...Te.normalizeParams(t),entries:a})}});function Zi(e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Sr({type:"enum",entries:n,...Te.normalizeParams(r)})}function D2(e,r){return new Sr({type:"enum",entries:e,...Te.normalizeParams(r)})}var Yc=F("ZodLiteral",(e,r)=>{Iv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Vm(e,n,i),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function R2(e,r){return new Yc({type:"literal",values:Array.isArray(e)?e:[e],...Te.normalizeParams(r)})}var Vc=F("ZodFile",(e,r)=>{Tv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Qm(e,n,i),e.min=(n,i)=>e.check(Ht(n,i)),e.max=(n,i)=>e.check(Cr(n,i)),e.mime=(n,i)=>e.check(hi(Array.isArray(n)?n:[n],i))});function L2(e){return Cm(Vc,e)}var Xc=F("ZodTransform",(e,r)=>{Cv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ng(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ti(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(Te.issue(a,n.value,r));else{let s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Te.issue(s))}};let t=r.transform(n.value,n);return t instanceof Promise?t.then(a=>(n.value=a,n)):(n.value=t,n)}});function ji(e){return new Xc({type:"transform",transform:e})}var Bi=F("ZodOptional",(e,r)=>{G0.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>kc(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Ur(e){return new Bi({type:"optional",innerType:e})}var Kc=F("ZodExactOptional",(e,r)=>{zv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>kc(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Qc(e){return new Kc({type:"optional",innerType:e})}var eu=F("ZodNullable",(e,r)=>{Ev.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>fg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Zr(e){return new eu({type:"nullable",innerType:e})}function U2(e){return Ur(Zr(e))}var tu=F("ZodDefault",(e,r)=>{Nv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>hg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ru(e,r){return new tu({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Te.shallowClone(r)}})}var nu=F("ZodPrefault",(e,r)=>{Av.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>pg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function iu(e,r){return new nu({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():Te.shallowClone(r)}})}var qi=F("ZodNonOptional",(e,r)=>{Pv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>dg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function au(e,r){return new qi({type:"nonoptional",innerType:e,...Te.normalizeParams(r)})}var su=F("ZodSuccess",(e,r)=>{Ov.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>eg(e,n,i),e.unwrap=()=>e._zod.def.innerType});function Z2(e){return new su({type:"success",innerType:e})}var ou=F("ZodCatch",(e,r)=>{Mv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>vg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function cu(e,r){return new ou({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}var uu=F("ZodNaN",(e,r)=>{Dv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Xm(e,n)});function j2(e){return Im(uu,e)}var Fi=F("ZodPipe",(e,r)=>{Rv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>mg(e,n,i,t),e.in=r.in,e.out=r.out});function jr(e,r){return new Fi({type:"pipe",in:e,out:r})}var Hi=F("ZodCodec",(e,r)=>{Fi.init(e,r),J0.init(e,r)});function B2(e,r,n){return new Hi({type:"pipe",in:e,out:r,transform:n.decode,reverseTransform:n.encode})}var lu=F("ZodReadonly",(e,r)=>{Lv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>gg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function fu(e){return new lu({type:"readonly",innerType:e})}var du=F("ZodTemplateLiteral",(e,r)=>{Uv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Km(e,n,i)});function q2(e,r){return new du({type:"template_literal",parts:e,...Te.normalizeParams(r)})}var hu=F("ZodLazy",(e,r)=>{Bv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>yg(e,n,i,t),e.unwrap=()=>e._zod.def.getter()});function pu(e){return new hu({type:"lazy",getter:e})}var vu=F("ZodPromise",(e,r)=>{jv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>bg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function F2(e){return new vu({type:"promise",innerType:e})}var mu=F("ZodFunction",(e,r)=>{Zv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>rg(e,n)});function Gn(e){return new mu({type:"function",input:Array.isArray(e==null?void 0:e.input)?Hc(e==null?void 0:e.input):(e==null?void 0:e.input)??gn(ar()),output:(e==null?void 0:e.output)??ar()})}var wn=F("ZodCustom",(e,r)=>{qv.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>tg(e,n)});function H2(e){let r=new qe({check:"custom"});return r._zod.check=e,r}function G2(e,r){return zm(wn,e??(()=>!0),r)}function gu(e,r={}){return Em(wn,e,r)}function bu(e){return Nm(e)}var J2=Pm,W2=Om;function Y2(e,r={}){let n=new wn({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...Te.normalizeParams(r)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var V2=(...e)=>Mm({Codec:Hi,Boolean:vn,String:dn},...e);function X2(e){let r=pu(()=>Ui([Fn(e),zc(),Ec(),Oc(),gn(r),Gc(Fn(),r)]));return r}function K2(e,r){return jr(ji(e),r)}var Ok={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Mk(e){ot({customError:e})}function Dk(){return ot().customError}var Vo;Vo||(Vo={});var ie={...wg,...kg,iso:$c},Rk=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Lk(e,r){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":r??"draft-2020-12"}function Uk(e,r){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return r.rootSchema;let i=r.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let t=n[1];if(!t||!r.defs[t])throw Error(`Reference not found: ${e}`);return r.defs[t]}throw Error(`Reference not found: ${e}`)}function Q2(e,r){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ie.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(r.refs.has(t))return r.refs.get(t);if(r.processing.has(t))return ie.lazy(()=>{if(!r.refs.has(t))throw Error(`Circular reference not resolved: ${t}`);return r.refs.get(t)});r.processing.add(t);let a=Uk(t,r),s=st(a,r);return r.refs.set(t,s),r.processing.delete(t),s}if(e.enum!==void 0){let t=e.enum;if(r.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return ie.null();if(t.length===0)return ie.never();if(t.length===1)return ie.literal(t[0]);if(t.every(s=>typeof s=="string"))return ie.enum(t);let a=t.map(s=>ie.literal(s));return a.length<2?a[0]:ie.union([a[0],a[1],...a.slice(2)])}if(e.const!==void 0)return ie.literal(e.const);let n=e.type;if(Array.isArray(n)){let t=n.map(a=>{let s={...e,type:a};return Q2(s,r)});return t.length===0?ie.never():t.length===1?t[0]:ie.union(t)}if(!n)return ie.any();let i;switch(n){case"string":{let t=ie.string();if(e.format){let a=e.format;a==="email"?t=t.check(ie.email()):a==="uri"||a==="uri-reference"?t=t.check(ie.url()):a==="uuid"||a==="guid"?t=t.check(ie.uuid()):a==="date-time"?t=t.check(ie.iso.datetime()):a==="date"?t=t.check(ie.iso.date()):a==="time"?t=t.check(ie.iso.time()):a==="duration"?t=t.check(ie.iso.duration()):a==="ipv4"?t=t.check(ie.ipv4()):a==="ipv6"?t=t.check(ie.ipv6()):a==="mac"?t=t.check(ie.mac()):a==="cidr"?t=t.check(ie.cidrv4()):a==="cidr-v6"?t=t.check(ie.cidrv6()):a==="base64"?t=t.check(ie.base64()):a==="base64url"?t=t.check(ie.base64url()):a==="e164"?t=t.check(ie.e164()):a==="jwt"?t=t.check(ie.jwt()):a==="emoji"?t=t.check(ie.emoji()):a==="nanoid"?t=t.check(ie.nanoid()):a==="cuid"?t=t.check(ie.cuid()):a==="cuid2"?t=t.check(ie.cuid2()):a==="ulid"?t=t.check(ie.ulid()):a==="xid"?t=t.check(ie.xid()):a==="ksuid"&&(t=t.check(ie.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),i=t;break}case"number":case"integer":{let t=n==="integer"?ie.number().int():ie.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),i=t;break}case"boolean":{i=ie.boolean();break}case"null":{i=ie.null();break}case"object":{let t={},a=e.properties||{},s=new Set(e.required||[]);for(let[l,d]of Object.entries(a)){let p=st(d,r);t[l]=s.has(l)?p:p.optional()}if(e.propertyNames){let l=st(e.propertyNames,r),d=e.additionalProperties&&typeof e.additionalProperties=="object"?st(e.additionalProperties,r):ie.any();if(Object.keys(t).length===0){i=ie.record(l,d);break}let p=ie.object(t).passthrough(),v=ie.looseRecord(l,d);i=ie.intersection(p,v);break}if(e.patternProperties){let l=e.patternProperties,d=Object.keys(l),p=[];for(let f of d){let u=st(l[f],r),h=ie.string().regex(new RegExp(f));p.push(ie.looseRecord(h,u))}let v=[];if(Object.keys(t).length>0&&v.push(ie.object(t).passthrough()),v.push(...p),v.length===0)i=ie.object({}).passthrough();else if(v.length===1)i=v[0];else{let f=ie.intersection(v[0],v[1]);for(let u=2;u<v.length;u++)f=ie.intersection(f,v[u]);i=f}break}let o=ie.object(t);e.additionalProperties===!1?i=o.strict():typeof e.additionalProperties=="object"?i=o.catchall(st(e.additionalProperties,r)):i=o.passthrough();break}case"array":{let{prefixItems:t,items:a}=e;if(t&&Array.isArray(t)){let s=t.map(l=>st(l,r)),o=a&&typeof a=="object"&&!Array.isArray(a)?st(a,r):void 0;o?i=ie.tuple(s).rest(o):i=ie.tuple(s),typeof e.minItems=="number"&&(i=i.check(ie.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ie.maxLength(e.maxItems)))}else if(Array.isArray(a)){let s=a.map(l=>st(l,r)),o=e.additionalItems&&typeof e.additionalItems=="object"?st(e.additionalItems,r):void 0;o?i=ie.tuple(s).rest(o):i=ie.tuple(s),typeof e.minItems=="number"&&(i=i.check(ie.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ie.maxLength(e.maxItems)))}else if(a!==void 0){let s=st(a,r),o=ie.array(s);typeof e.minItems=="number"&&(o=o.min(e.minItems)),typeof e.maxItems=="number"&&(o=o.max(e.maxItems)),i=o}else i=ie.array(ie.any());break}default:throw Error(`Unsupported type: ${n}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function st(e,r){if(typeof e=="boolean")return e?ie.any():ie.never();let n=Q2(e,r),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let o=e.anyOf.map(d=>st(d,r)),l=ie.union(o);n=i?ie.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let o=e.oneOf.map(d=>st(d,r)),l=ie.xor(o);n=i?ie.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:ie.any();else{let o=i?n:st(e.allOf[0],r),l=i?0:1;for(let d=l;d<e.allOf.length;d++)o=ie.intersection(o,st(e.allOf[d],r));n=o}e.nullable===!0&&r.version==="openapi-3.0"&&(n=ie.nullable(n)),e.readOnly===!0&&(n=ie.readonly(n));let t={},a=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let o of a)o in e&&(t[o]=e[o]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let o of s)o in e&&(t[o]=e[o]);for(let o of Object.keys(e))Rk.has(o)||(t[o]=e[o]);return Object.keys(t).length>0&&r.registry.add(n,t),n}function Zk(e,r){if(typeof e=="boolean")return e?ie.any():ie.never();let n=Lk(e,r==null?void 0:r.defaultTarget),i=e.$defs||e.definitions||{},t={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:(r==null?void 0:r.registry)??_t};return st(e,t)}var eb={};Ot(eb,{string:()=>jk,number:()=>Bk,date:()=>Hk,boolean:()=>qk,bigint:()=>Fk});function jk(e){return Xv(dn,e)}function Bk(e){return am(pn,e)}function qk(e){return dm(vn,e)}function Fk(e){return pm(mn,e)}function Hk(e){return Sm(Li,e)}ot(Fv());var Gk=Z.union([Z.literal("light"),Z.literal("dark")]).describe("Color theme preference for the host environment."),Br=Z.union([Z.literal("inline"),Z.literal("fullscreen"),Z.literal("pip")]).describe("Display mode for UI presentation."),Jk=Z.union([Z.literal("--color-background-primary"),Z.literal("--color-background-secondary"),Z.literal("--color-background-tertiary"),Z.literal("--color-background-inverse"),Z.literal("--color-background-ghost"),Z.literal("--color-background-info"),Z.literal("--color-background-danger"),Z.literal("--color-background-success"),Z.literal("--color-background-warning"),Z.literal("--color-background-disabled"),Z.literal("--color-text-primary"),Z.literal("--color-text-secondary"),Z.literal("--color-text-tertiary"),Z.literal("--color-text-inverse"),Z.literal("--color-text-ghost"),Z.literal("--color-text-info"),Z.literal("--color-text-danger"),Z.literal("--color-text-success"),Z.literal("--color-text-warning"),Z.literal("--color-text-disabled"),Z.literal("--color-text-ghost"),Z.literal("--color-border-primary"),Z.literal("--color-border-secondary"),Z.literal("--color-border-tertiary"),Z.literal("--color-border-inverse"),Z.literal("--color-border-ghost"),Z.literal("--color-border-info"),Z.literal("--color-border-danger"),Z.literal("--color-border-success"),Z.literal("--color-border-warning"),Z.literal("--color-border-disabled"),Z.literal("--color-ring-primary"),Z.literal("--color-ring-secondary"),Z.literal("--color-ring-inverse"),Z.literal("--color-ring-info"),Z.literal("--color-ring-danger"),Z.literal("--color-ring-success"),Z.literal("--color-ring-warning"),Z.literal("--font-sans"),Z.literal("--font-mono"),Z.literal("--font-weight-normal"),Z.literal("--font-weight-medium"),Z.literal("--font-weight-semibold"),Z.literal("--font-weight-bold"),Z.literal("--font-text-xs-size"),Z.literal("--font-text-sm-size"),Z.literal("--font-text-md-size"),Z.literal("--font-text-lg-size"),Z.literal("--font-heading-xs-size"),Z.literal("--font-heading-sm-size"),Z.literal("--font-heading-md-size"),Z.literal("--font-heading-lg-size"),Z.literal("--font-heading-xl-size"),Z.literal("--font-heading-2xl-size"),Z.literal("--font-heading-3xl-size"),Z.literal("--font-text-xs-line-height"),Z.literal("--font-text-sm-line-height"),Z.literal("--font-text-md-line-height"),Z.literal("--font-text-lg-line-height"),Z.literal("--font-heading-xs-line-height"),Z.literal("--font-heading-sm-line-height"),Z.literal("--font-heading-md-line-height"),Z.literal("--font-heading-lg-line-height"),Z.literal("--font-heading-xl-line-height"),Z.literal("--font-heading-2xl-line-height"),Z.literal("--font-heading-3xl-line-height"),Z.literal("--border-radius-xs"),Z.literal("--border-radius-sm"),Z.literal("--border-radius-md"),Z.literal("--border-radius-lg"),Z.literal("--border-radius-xl"),Z.literal("--border-radius-full"),Z.literal("--border-width-regular"),Z.literal("--shadow-hairline"),Z.literal("--shadow-sm"),Z.literal("--shadow-md"),Z.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),Wk=Z.record(Jk.describe(`Style variables for theming MCP apps.
|
|
46
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const p=d[1];if(t===d[0]){i(d);continue}if(e.external){const o=(f=e.external.registry.get(d[0]))==null?void 0:f.id;if(t!==d[0]&&o){i(d);continue}}if((g=e.metadataRegistry.get(d[0]))==null?void 0:g.id){i(d);continue}if(p.cycle){i(d);continue}if(p.count>1&&e.reused==="ref"){i(d);continue}}}function $c(e,t){var c,u,f;const a=e.seen.get(t);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=g=>{const d=e.seen.get(g);if(d.ref===null)return;const p=d.def??d.schema,l={...p},o=d.ref;if(d.ref=null,o){n(o);const s=e.seen.get(o),v=s.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(v)):Object.assign(p,v),Object.assign(p,l),g._zod.parent===o)for(const m in p)m==="$ref"||m==="allOf"||m in l||delete p[m];if(v.$ref)for(const m in p)m==="$ref"||m==="allOf"||m in s.def&&JSON.stringify(p[m])===JSON.stringify(s.def[m])&&delete p[m]}const h=g._zod.parent;if(h&&h!==o){n(h);const s=e.seen.get(h);if(s!=null&&s.schema.$ref&&(p.$ref=s.schema.$ref,s.def))for(const v in p)v==="$ref"||v==="allOf"||v in s.def&&JSON.stringify(p[v])===JSON.stringify(s.def[v])&&delete p[v]}e.override({zodSchema:g,jsonSchema:p,path:d.path??[]})};for(const g of[...e.seen.entries()].reverse())n(g[0]);const r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,(c=e.external)!=null&&c.uri){const g=(u=e.external.registry.get(t))==null?void 0:u.id;if(!g)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(g)}Object.assign(r,a.def??a.schema);const i=((f=e.external)==null?void 0:f.defs)??{};for(const g of e.seen.entries()){const d=g[1];d.def&&d.defId&&(i[d.defId]=d.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?r.$defs=i:r.definitions=i);try{const g=JSON.parse(JSON.stringify(r));return Object.defineProperty(g,"~standard",{value:{...t["~standard"],jsonSchema:{input:tr(t,"input",e.processors),output:tr(t,"output",e.processors)}},enumerable:!1,writable:!1}),g}catch{throw new Error("Error converting schema to JSON.")}}function je(e,t){const a=t??{seen:new Set};if(a.seen.has(e))return!1;a.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return je(n.element,a);if(n.type==="set")return je(n.valueType,a);if(n.type==="lazy")return je(n.getter(),a);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return je(n.innerType,a);if(n.type==="intersection")return je(n.left,a)||je(n.right,a);if(n.type==="record"||n.type==="map")return je(n.keyType,a)||je(n.valueType,a);if(n.type==="pipe")return je(n.in,a)||je(n.out,a);if(n.type==="object"){for(const r in n.shape)if(je(n.shape[r],a))return!0;return!1}if(n.type==="union"){for(const r of n.options)if(je(r,a))return!0;return!1}if(n.type==="tuple"){for(const r of n.items)if(je(r,a))return!0;return!!(n.rest&&je(n.rest,a))}return!1}const a1=(e,t={})=>a=>{const n=Fc({...a,processors:t});return Le(e,n),Hc(n,e),$c(n,e)},tr=(e,t,a={})=>n=>{const{libraryOptions:r,target:i}=n??{},c=Fc({...r??{},target:i,io:t,processors:a});return Le(e,c),Hc(c,e),$c(c,e)},i1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s1=(e,t,a,n)=>{const r=a;r.type="string";const{minimum:i,maximum:c,format:u,patterns:f,contentEncoding:g}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof c=="number"&&(r.maxLength=c),u&&(r.format=i1[u]??u,r.format===""&&delete r.format,u==="time"&&delete r.format),g&&(r.contentEncoding=g),f&&f.size>0){const d=[...f];d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},o1=(e,t,a,n)=>{const r=a,{minimum:i,maximum:c,format:u,multipleOf:f,exclusiveMaximum:g,exclusiveMinimum:d}=e._zod.bag;typeof u=="string"&&u.includes("int")?r.type="integer":r.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d),typeof i=="number"&&(r.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof g=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=g,r.exclusiveMaximum=!0):r.exclusiveMaximum=g),typeof c=="number"&&(r.maximum=c,typeof g=="number"&&t.target!=="draft-04"&&(g<=c?delete r.maximum:delete r.exclusiveMaximum)),typeof f=="number"&&(r.multipleOf=f)},c1=(e,t,a,n)=>{a.type="boolean"},l1=(e,t,a,n)=>{t.target==="openapi-3.0"?(a.type="string",a.nullable=!0,a.enum=[null]):a.type="null"},u1=(e,t,a,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},h1=(e,t,a,n)=>{a.not={}},f1=(e,t,a,n)=>{},d1=(e,t,a,n)=>{const r=e._zod.def,i=bc(r.entries);i.every(c=>typeof c=="number")&&(a.type="number"),i.every(c=>typeof c=="string")&&(a.type="string"),a.enum=i},p1=(e,t,a,n)=>{const r=e._zod.def,i=[];for(const c of r.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(c))}else i.push(c);if(i.length!==0)if(i.length===1){const c=i[0];a.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?a.enum=[c]:a.const=c}else i.every(c=>typeof c=="number")&&(a.type="number"),i.every(c=>typeof c=="string")&&(a.type="string"),i.every(c=>typeof c=="boolean")&&(a.type="boolean"),i.every(c=>c===null)&&(a.type="null"),a.enum=i},g1=(e,t,a,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},v1=(e,t,a,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},m1=(e,t,a,n)=>{const r=a,i=e._zod.def,{minimum:c,maximum:u}=e._zod.bag;typeof c=="number"&&(r.minItems=c),typeof u=="number"&&(r.maxItems=u),r.type="array",r.items=Le(i.element,t,{...n,path:[...n.path,"items"]})},b1=(e,t,a,n)=>{var g;const r=a,i=e._zod.def;r.type="object",r.properties={};const c=i.shape;for(const d in c)r.properties[d]=Le(c[d],t,{...n,path:[...n.path,"properties",d]});const u=new Set(Object.keys(c)),f=new Set([...u].filter(d=>{const p=i.shape[d]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));f.size>0&&(r.required=Array.from(f)),((g=i.catchall)==null?void 0:g._zod.def.type)==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=Le(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},y1=(e,t,a,n)=>{const r=e._zod.def,i=r.inclusive===!1,c=r.options.map((u,f)=>Le(u,t,{...n,path:[...n.path,i?"oneOf":"anyOf",f]}));i?a.oneOf=c:a.anyOf=c},w1=(e,t,a,n)=>{const r=e._zod.def,i=Le(r.left,t,{...n,path:[...n.path,"allOf",0]}),c=Le(r.right,t,{...n,path:[...n.path,"allOf",1]}),u=g=>"allOf"in g&&Object.keys(g).length===1,f=[...u(i)?i.allOf:[i],...u(c)?c.allOf:[c]];a.allOf=f},_1=(e,t,a,n)=>{const r=a,i=e._zod.def;r.type="object";const c=i.keyType,u=c._zod.bag,f=u==null?void 0:u.patterns;if(i.mode==="loose"&&f&&f.size>0){const d=Le(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});r.patternProperties={};for(const p of f)r.patternProperties[p.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Le(i.keyType,t,{...n,path:[...n.path,"propertyNames"]})),r.additionalProperties=Le(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]});const g=c._zod.values;if(g){const d=[...g].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(r.required=d)}},k1=(e,t,a,n)=>{const r=e._zod.def,i=Le(r.innerType,t,n),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=r.innerType,a.nullable=!0):a.anyOf=[i,{type:"null"}]},x1=(e,t,a,n)=>{const r=e._zod.def;Le(r.innerType,t,n);const i=t.seen.get(e);i.ref=r.innerType},C1=(e,t,a,n)=>{const r=e._zod.def;Le(r.innerType,t,n);const i=t.seen.get(e);i.ref=r.innerType,a.default=JSON.parse(JSON.stringify(r.defaultValue))},S1=(e,t,a,n)=>{const r=e._zod.def;Le(r.innerType,t,n);const i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(a._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},T1=(e,t,a,n)=>{const r=e._zod.def;Le(r.innerType,t,n);const i=t.seen.get(e);i.ref=r.innerType;let c;try{c=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}a.default=c},E1=(e,t,a,n)=>{const r=e._zod.def,i=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;Le(i,t,n);const c=t.seen.get(e);c.ref=i},A1=(e,t,a,n)=>{const r=e._zod.def;Le(r.innerType,t,n);const i=t.seen.get(e);i.ref=r.innerType,a.readOnly=!0},Zc=(e,t,a,n)=>{const r=e._zod.def;Le(r.innerType,t,n);const i=t.seen.get(e);i.ref=r.innerType};function ba(e){return!!e._zod}function Gc(e,t){return ba(e)?Cc(e,t):e.safeParse(t)}function M1(e){var a,n;if(!e)return;let t;if(ba(e)?t=(n=(a=e._zod)==null?void 0:a.def)==null?void 0:n.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function N1(e){var r;if(ba(e)){const c=(r=e._zod)==null?void 0:r.def;if(c){if(c.value!==void 0)return c.value;if(Array.isArray(c.values)&&c.values.length>0)return c.values[0]}}const a=e._def;if(a){if(a.value!==void 0)return a.value;if(Array.isArray(a.values)&&a.values.length>0)return a.values[0]}const n=e.value;if(n!==void 0)return n}const P1=X("ZodISODateTime",(e,t)=>{kh.init(e,t),Ie.init(e,t)});function Uc(e){return Pf(P1,e)}const z1=X("ZodISODate",(e,t)=>{xh.init(e,t),Ie.init(e,t)});function I1(e){return zf(z1,e)}const R1=X("ZodISOTime",(e,t)=>{Ch.init(e,t),Ie.init(e,t)});function q1(e){return If(R1,e)}const B1=X("ZodISODuration",(e,t)=>{Sh.init(e,t),Ie.init(e,t)});function L1(e){return Rf(B1,e)}const O1=(e,t)=>{kc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:a=>pu(e,a)},flatten:{value:a=>du(e,a)},addIssue:{value:a=>{e.issues.push(a),e.message=JSON.stringify(e.issues,oa,2)}},addIssues:{value:a=>{e.issues.push(...a),e.message=JSON.stringify(e.issues,oa,2)}},isEmpty:{get(){return e.issues.length===0}}})},Qe=X("ZodError",O1,{Parent:Error}),D1=ga(Qe),F1=va(Qe),H1=ir(Qe),$1=sr(Qe),Z1=vu(Qe),G1=mu(Qe),U1=bu(Qe),j1=yu(Qe),Y1=wu(Qe),W1=_u(Qe),V1=ku(Qe),X1=xu(Qe),Ne=X("ZodType",(e,t)=>(Me.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:tr(e,"input"),output:tr(e,"output")}}),e.toJSONSchema=a1(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...a)=>e.clone(ft(t,{checks:[...t.checks??[],...a.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(a,n)=>dt(e,a,n),e.brand=()=>e,e.register=((a,n)=>(a.add(e,n),e)),e.parse=(a,n)=>D1(e,a,n,{callee:e.parse}),e.safeParse=(a,n)=>H1(e,a,n),e.parseAsync=async(a,n)=>F1(e,a,n,{callee:e.parseAsync}),e.safeParseAsync=async(a,n)=>$1(e,a,n),e.spa=e.safeParseAsync,e.encode=(a,n)=>Z1(e,a,n),e.decode=(a,n)=>G1(e,a,n),e.encodeAsync=async(a,n)=>U1(e,a,n),e.decodeAsync=async(a,n)=>j1(e,a,n),e.safeEncode=(a,n)=>Y1(e,a,n),e.safeDecode=(a,n)=>W1(e,a,n),e.safeEncodeAsync=async(a,n)=>V1(e,a,n),e.safeDecodeAsync=async(a,n)=>X1(e,a,n),e.refine=(a,n)=>e.check($d(a,n)),e.superRefine=a=>e.check(Zd(a)),e.overwrite=a=>e.check(Mt(a)),e.optional=()=>Be(e),e.exactOptional=()=>Md(e),e.nullable=()=>wi(e),e.nullish=()=>Be(wi(e)),e.nonoptional=a=>qd(e,a),e.array=()=>fe(e),e.or=a=>ye([e,a]),e.and=a=>ya(e,a),e.transform=a=>ha(e,Jc(a)),e.default=a=>zd(e,a),e.prefault=a=>Rd(e,a),e.catch=a=>Ld(e,a),e.pipe=a=>ha(e,a),e.readonly=()=>Fd(e),e.describe=a=>{const n=e.clone();return It.add(n,{description:a}),n},Object.defineProperty(e,"description",{get(){var a;return(a=It.get(e))==null?void 0:a.description},configurable:!0}),e.meta=(...a)=>{if(a.length===0)return It.get(e);const n=e.clone();return It.add(n,a[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=a=>a(e),e)),jc=X("_ZodString",(e,t)=>{ma.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,i)=>s1(e,n,r);const a=e._zod.bag;e.format=a.format??null,e.minLength=a.minimum??null,e.maxLength=a.maximum??null,e.regex=(...n)=>e.check($f(...n)),e.includes=(...n)=>e.check(Uf(...n)),e.startsWith=(...n)=>e.check(jf(...n)),e.endsWith=(...n)=>e.check(Yf(...n)),e.min=(...n)=>e.check(er(...n)),e.max=(...n)=>e.check(Oc(...n)),e.length=(...n)=>e.check(Dc(...n)),e.nonempty=(...n)=>e.check(er(1,...n)),e.lowercase=n=>e.check(Zf(n)),e.uppercase=n=>e.check(Gf(n)),e.trim=()=>e.check(Vf()),e.normalize=(...n)=>e.check(Wf(...n)),e.toLowerCase=()=>e.check(Xf()),e.toUpperCase=()=>e.check(Kf()),e.slugify=()=>e.check(Jf())}),K1=X("ZodString",(e,t)=>{ma.init(e,t),jc.init(e,t),e.email=a=>e.check(uf(J1,a)),e.url=a=>e.check(gf(Q1,a)),e.jwt=a=>e.check(Nf(pd,a)),e.emoji=a=>e.check(vf(ed,a)),e.guid=a=>e.check(pi(bi,a)),e.uuid=a=>e.check(hf(Vt,a)),e.uuidv4=a=>e.check(ff(Vt,a)),e.uuidv6=a=>e.check(df(Vt,a)),e.uuidv7=a=>e.check(pf(Vt,a)),e.nanoid=a=>e.check(mf(td,a)),e.guid=a=>e.check(pi(bi,a)),e.cuid=a=>e.check(bf(rd,a)),e.cuid2=a=>e.check(yf(nd,a)),e.ulid=a=>e.check(wf(ad,a)),e.base64=a=>e.check(Ef(hd,a)),e.base64url=a=>e.check(Af(fd,a)),e.xid=a=>e.check(_f(id,a)),e.ksuid=a=>e.check(kf(sd,a)),e.ipv4=a=>e.check(xf(od,a)),e.ipv6=a=>e.check(Cf(cd,a)),e.cidrv4=a=>e.check(Sf(ld,a)),e.cidrv6=a=>e.check(Tf(ud,a)),e.e164=a=>e.check(Mf(dd,a)),e.datetime=a=>e.check(Uc(a)),e.date=a=>e.check(I1(a)),e.time=a=>e.check(q1(a)),e.duration=a=>e.check(L1(a))});function U(e){return lf(K1,e)}const Ie=X("ZodStringFormat",(e,t)=>{Pe.init(e,t),jc.init(e,t)}),J1=X("ZodEmail",(e,t)=>{dh.init(e,t),Ie.init(e,t)}),bi=X("ZodGUID",(e,t)=>{hh.init(e,t),Ie.init(e,t)}),Vt=X("ZodUUID",(e,t)=>{fh.init(e,t),Ie.init(e,t)}),Q1=X("ZodURL",(e,t)=>{ph.init(e,t),Ie.init(e,t)}),ed=X("ZodEmoji",(e,t)=>{gh.init(e,t),Ie.init(e,t)}),td=X("ZodNanoID",(e,t)=>{vh.init(e,t),Ie.init(e,t)}),rd=X("ZodCUID",(e,t)=>{mh.init(e,t),Ie.init(e,t)}),nd=X("ZodCUID2",(e,t)=>{bh.init(e,t),Ie.init(e,t)}),ad=X("ZodULID",(e,t)=>{yh.init(e,t),Ie.init(e,t)}),id=X("ZodXID",(e,t)=>{wh.init(e,t),Ie.init(e,t)}),sd=X("ZodKSUID",(e,t)=>{_h.init(e,t),Ie.init(e,t)}),od=X("ZodIPv4",(e,t)=>{Th.init(e,t),Ie.init(e,t)}),cd=X("ZodIPv6",(e,t)=>{Eh.init(e,t),Ie.init(e,t)}),ld=X("ZodCIDRv4",(e,t)=>{Ah.init(e,t),Ie.init(e,t)}),ud=X("ZodCIDRv6",(e,t)=>{Mh.init(e,t),Ie.init(e,t)}),hd=X("ZodBase64",(e,t)=>{Nh.init(e,t),Ie.init(e,t)}),fd=X("ZodBase64URL",(e,t)=>{zh.init(e,t),Ie.init(e,t)}),dd=X("ZodE164",(e,t)=>{Ih.init(e,t),Ie.init(e,t)}),pd=X("ZodJWT",(e,t)=>{qh.init(e,t),Ie.init(e,t)}),Yc=X("ZodNumber",(e,t)=>{Ic.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,i)=>o1(e,n,r),e.gt=(n,r)=>e.check(vi(n,r)),e.gte=(n,r)=>e.check(vr(n,r)),e.min=(n,r)=>e.check(vr(n,r)),e.lt=(n,r)=>e.check(gi(n,r)),e.lte=(n,r)=>e.check(gr(n,r)),e.max=(n,r)=>e.check(gr(n,r)),e.int=n=>e.check(yi(n)),e.safe=n=>e.check(yi(n)),e.positive=n=>e.check(vi(0,n)),e.nonnegative=n=>e.check(vr(0,n)),e.negative=n=>e.check(gi(0,n)),e.nonpositive=n=>e.check(gr(0,n)),e.multipleOf=(n,r)=>e.check(mi(n,r)),e.step=(n,r)=>e.check(mi(n,r)),e.finite=()=>e;const a=e._zod.bag;e.minValue=Math.max(a.minimum??Number.NEGATIVE_INFINITY,a.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(a.maximum??Number.POSITIVE_INFINITY,a.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(a.format??"").includes("int")||Number.isSafeInteger(a.multipleOf??.5),e.isFinite=!0,e.format=a.format??null});function me(e){return qf(Yc,e)}const gd=X("ZodNumberFormat",(e,t)=>{Bh.init(e,t),Yc.init(e,t)});function yi(e){return Bf(gd,e)}const vd=X("ZodBoolean",(e,t)=>{Lh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>c1(e,a,n)});function Ae(e){return Lf(vd,e)}const md=X("ZodUndefined",(e,t)=>{Oh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>u1(e,a)});function la(e){return Of(md,e)}const bd=X("ZodNull",(e,t)=>{Dh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>l1(e,a,n)});function Wc(e){return Df(bd,e)}const yd=X("ZodUnknown",(e,t)=>{Fh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>f1()});function Te(){return Ff(yd)}const wd=X("ZodNever",(e,t)=>{Hh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>h1(e,a,n)});function _d(e){return Hf(wd,e)}const kd=X("ZodArray",(e,t)=>{$h.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>m1(e,a,n,r),e.element=t.element,e.min=(a,n)=>e.check(er(a,n)),e.nonempty=a=>e.check(er(1,a)),e.max=(a,n)=>e.check(Oc(a,n)),e.length=(a,n)=>e.check(Dc(a,n)),e.unwrap=()=>e.element});function fe(e,t){return Qf(kd,e,t)}const Vc=X("ZodObject",(e,t)=>{Gh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>b1(e,a,n,r),ke(e,"shape",()=>t.shape),e.keyof=()=>Ke(Object.keys(e._zod.def.shape)),e.catchall=a=>e.clone({...e._zod.def,catchall:a}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Te()}),e.loose=()=>e.clone({...e._zod.def,catchall:Te()}),e.strict=()=>e.clone({...e._zod.def,catchall:_d()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=a=>cu(e,a),e.safeExtend=a=>lu(e,a),e.merge=a=>uu(e,a),e.pick=a=>su(e,a),e.omit=a=>ou(e,a),e.partial=(...a)=>hu(Qc,e,a[0]),e.required=(...a)=>fu(el,e,a[0])});function Y(e,t){const a={type:"object",shape:e??{},...se(t)};return new Vc(a)}function Ye(e,t){return new Vc({type:"object",shape:e,catchall:Te(),...se(t)})}const Xc=X("ZodUnion",(e,t)=>{Bc.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>y1(e,a,n,r),e.options=t.options});function ye(e,t){return new Xc({type:"union",options:e,...se(t)})}const xd=X("ZodDiscriminatedUnion",(e,t)=>{Xc.init(e,t),Uh.init(e,t)});function Kc(e,t,a){return new xd({type:"union",options:t,discriminator:e,...se(a)})}const Cd=X("ZodIntersection",(e,t)=>{jh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>w1(e,a,n,r)});function ya(e,t){return new Cd({type:"intersection",left:e,right:t})}const Sd=X("ZodRecord",(e,t)=>{Yh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>_1(e,a,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Ce(e,t,a){return new Sd({type:"record",keyType:e,valueType:t,...se(a)})}const ua=X("ZodEnum",(e,t)=>{Wh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,i)=>d1(e,n,r),e.enum=t.entries,e.options=Object.values(t.entries);const a=new Set(Object.keys(t.entries));e.extract=(n,r)=>{const i={};for(const c of n)if(a.has(c))i[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new ua({...t,checks:[],...se(r),entries:i})},e.exclude=(n,r)=>{const i={...t.entries};for(const c of n)if(a.has(c))delete i[c];else throw new Error(`Key ${c} not found in enum`);return new ua({...t,checks:[],...se(r),entries:i})}});function Ke(e,t){const a=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ua({type:"enum",entries:a,...se(t)})}const Td=X("ZodLiteral",(e,t)=>{Vh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>p1(e,a,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function G(e,t){return new Td({type:"literal",values:Array.isArray(e)?e:[e],...se(t)})}const Ed=X("ZodTransform",(e,t)=>{Xh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>v1(e,a),e._zod.parse=(a,n)=>{if(n.direction==="backward")throw new vc(e.constructor.name);a.addIssue=i=>{if(typeof i=="string")a.issues.push(qt(i,a.value,t));else{const c=i;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=a.value),c.inst??(c.inst=e),a.issues.push(qt(c))}};const r=t.transform(a.value,a);return r instanceof Promise?r.then(i=>(a.value=i,a)):(a.value=r,a)}});function Jc(e){return new Ed({type:"transform",transform:e})}const Qc=X("ZodOptional",(e,t)=>{Lc.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>Zc(e,a,n,r),e.unwrap=()=>e._zod.def.innerType});function Be(e){return new Qc({type:"optional",innerType:e})}const Ad=X("ZodExactOptional",(e,t)=>{Kh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>Zc(e,a,n,r),e.unwrap=()=>e._zod.def.innerType});function Md(e){return new Ad({type:"optional",innerType:e})}const Nd=X("ZodNullable",(e,t)=>{Jh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>k1(e,a,n,r),e.unwrap=()=>e._zod.def.innerType});function wi(e){return new Nd({type:"nullable",innerType:e})}const Pd=X("ZodDefault",(e,t)=>{Qh.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>C1(e,a,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zd(e,t){return new Pd({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():wc(t)}})}const Id=X("ZodPrefault",(e,t)=>{ef.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>S1(e,a,n,r),e.unwrap=()=>e._zod.def.innerType});function Rd(e,t){return new Id({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():wc(t)}})}const el=X("ZodNonOptional",(e,t)=>{tf.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>x1(e,a,n,r),e.unwrap=()=>e._zod.def.innerType});function qd(e,t){return new el({type:"nonoptional",innerType:e,...se(t)})}const Bd=X("ZodCatch",(e,t)=>{rf.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>T1(e,a,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ld(e,t){return new Bd({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Od=X("ZodPipe",(e,t)=>{nf.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>E1(e,a,n,r),e.in=t.in,e.out=t.out});function ha(e,t){return new Od({type:"pipe",in:e,out:t})}const Dd=X("ZodReadonly",(e,t)=>{af.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>A1(e,a,n,r),e.unwrap=()=>e._zod.def.innerType});function Fd(e){return new Dd({type:"readonly",innerType:e})}const tl=X("ZodCustom",(e,t)=>{sf.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(a,n,r)=>g1(e,a)});function Hd(e,t){return e1(tl,e??(()=>!0),t)}function $d(e,t={}){return t1(tl,e,t)}function Zd(e){return r1(e)}function rl(e,t){return ha(Jc(e),t)}const yt="io.modelcontextprotocol/related-task",cr="2.0",De=Hd(e=>e!==null&&(typeof e=="object"||typeof e=="function")),nl=ye([U(),me().int()]),al=U();Ye({ttl:ye([me(),Wc()]).optional(),pollInterval:me().optional()});const Gd=Y({ttl:me().optional()}),Ud=Y({taskId:U()}),wa=Ye({progressToken:nl.optional(),[yt]:Ud.optional()}),Je=Y({_meta:wa.optional()}),Ot=Je.extend({task:Gd.optional()}),jd=e=>Ot.safeParse(e).success,Fe=Y({method:U(),params:Je.loose().optional()}),et=Y({_meta:wa.optional()}),tt=Y({method:U(),params:et.loose().optional()}),He=Ye({_meta:wa.optional()}),Dt=ye([U(),me().int()]),il=Y({jsonrpc:G(cr),id:Dt,...Fe.shape}).strict(),_i=e=>il.safeParse(e).success,sl=Y({jsonrpc:G(cr),...tt.shape}).strict(),Yd=e=>sl.safeParse(e).success,_a=Y({jsonrpc:G(cr),id:Dt,result:He}).strict(),Xt=e=>_a.safeParse(e).success;var xe;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(xe||(xe={}));const ka=Y({jsonrpc:G(cr),id:Dt.optional(),error:Y({code:me().int(),message:U(),data:Te().optional()})}).strict(),Wd=e=>ka.safeParse(e).success,Vd=ye([il,sl,_a,ka]);ye([_a,ka]);const xa=He.strict(),Xd=et.extend({requestId:Dt.optional(),reason:U().optional()}),Ca=tt.extend({method:G("notifications/cancelled"),params:Xd}),Kd=Y({src:U(),mimeType:U().optional(),sizes:fe(U()).optional(),theme:Ke(["light","dark"]).optional()}),Ft=Y({icons:fe(Kd).optional()}),At=Y({name:U(),title:U().optional()}),lr=At.extend({...At.shape,...Ft.shape,version:U(),websiteUrl:U().optional(),description:U().optional()}),Jd=ya(Y({applyDefaults:Ae().optional()}),Ce(U(),Te())),Qd=rl(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ya(Y({form:Jd.optional(),url:De.optional()}),Ce(U(),Te()).optional())),ep=Ye({list:De.optional(),cancel:De.optional(),requests:Ye({sampling:Ye({createMessage:De.optional()}).optional(),elicitation:Ye({create:De.optional()}).optional()}).optional()}),tp=Ye({list:De.optional(),cancel:De.optional(),requests:Ye({tools:Ye({call:De.optional()}).optional()}).optional()}),rp=Y({experimental:Ce(U(),De).optional(),sampling:Y({context:De.optional(),tools:De.optional()}).optional(),elicitation:Qd.optional(),roots:Y({listChanged:Ae().optional()}).optional(),tasks:ep.optional()}),np=Je.extend({protocolVersion:U(),capabilities:rp,clientInfo:lr}),ap=Fe.extend({method:G("initialize"),params:np}),ip=Y({experimental:Ce(U(),De).optional(),logging:De.optional(),completions:De.optional(),prompts:Y({listChanged:Ae().optional()}).optional(),resources:Y({subscribe:Ae().optional(),listChanged:Ae().optional()}).optional(),tools:Y({listChanged:Ae().optional()}).optional(),tasks:tp.optional()}),sp=He.extend({protocolVersion:U(),capabilities:ip,serverInfo:lr,instructions:U().optional()}),op=tt.extend({method:G("notifications/initialized"),params:et.optional()}),ur=Fe.extend({method:G("ping"),params:Je.optional()}),cp=Y({progress:me(),total:Be(me()),message:Be(U())}),lp=Y({...et.shape,...cp.shape,progressToken:nl}),Sa=tt.extend({method:G("notifications/progress"),params:lp}),up=Je.extend({cursor:al.optional()}),Ht=Fe.extend({params:up.optional()}),$t=He.extend({nextCursor:al.optional()}),hp=Ke(["working","input_required","completed","failed","cancelled"]),Zt=Y({taskId:U(),status:hp,ttl:ye([me(),Wc()]),createdAt:U(),lastUpdatedAt:U(),pollInterval:Be(me()),statusMessage:Be(U())}),Ta=He.extend({task:Zt}),fp=et.merge(Zt),rr=tt.extend({method:G("notifications/tasks/status"),params:fp}),Ea=Fe.extend({method:G("tasks/get"),params:Je.extend({taskId:U()})}),Aa=He.merge(Zt),Ma=Fe.extend({method:G("tasks/result"),params:Je.extend({taskId:U()})});He.loose();const Na=Ht.extend({method:G("tasks/list")}),Pa=$t.extend({tasks:fe(Zt)}),za=Fe.extend({method:G("tasks/cancel"),params:Je.extend({taskId:U()})}),dp=He.merge(Zt),ol=Y({uri:U(),mimeType:Be(U()),_meta:Ce(U(),Te()).optional()}),cl=ol.extend({text:U()}),Ia=U().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),ll=ol.extend({blob:Ia}),Gt=Ke(["user","assistant"]),Nt=Y({audience:fe(Gt).optional(),priority:me().min(0).max(1).optional(),lastModified:Uc({offset:!0}).optional()}),ul=Y({...At.shape,...Ft.shape,uri:U(),description:Be(U()),mimeType:Be(U()),annotations:Nt.optional(),_meta:Be(Ye({}))}),pp=Y({...At.shape,...Ft.shape,uriTemplate:U(),description:Be(U()),mimeType:Be(U()),annotations:Nt.optional(),_meta:Be(Ye({}))}),gp=Ht.extend({method:G("resources/list")}),hl=$t.extend({resources:fe(ul)}),vp=Ht.extend({method:G("resources/templates/list")}),mp=$t.extend({resourceTemplates:fe(pp)}),Ra=Je.extend({uri:U()}),bp=Ra,yp=Fe.extend({method:G("resources/read"),params:bp}),fl=He.extend({contents:fe(ye([cl,ll]))}),wp=tt.extend({method:G("notifications/resources/list_changed"),params:et.optional()}),_p=Ra,kp=Fe.extend({method:G("resources/subscribe"),params:_p}),xp=Ra,Cp=Fe.extend({method:G("resources/unsubscribe"),params:xp}),Sp=et.extend({uri:U()}),Tp=tt.extend({method:G("notifications/resources/updated"),params:Sp}),Ep=Y({name:U(),description:Be(U()),required:Be(Ae())}),Ap=Y({...At.shape,...Ft.shape,description:Be(U()),arguments:Be(fe(Ep)),_meta:Be(Ye({}))}),Mp=Ht.extend({method:G("prompts/list")}),Np=$t.extend({prompts:fe(Ap)}),Pp=Je.extend({name:U(),arguments:Ce(U(),U()).optional()}),zp=Fe.extend({method:G("prompts/get"),params:Pp}),qa=Y({type:G("text"),text:U(),annotations:Nt.optional(),_meta:Ce(U(),Te()).optional()}),Ba=Y({type:G("image"),data:Ia,mimeType:U(),annotations:Nt.optional(),_meta:Ce(U(),Te()).optional()}),La=Y({type:G("audio"),data:Ia,mimeType:U(),annotations:Nt.optional(),_meta:Ce(U(),Te()).optional()}),Ip=Y({type:G("tool_use"),name:U(),id:U(),input:Ce(U(),Te()),_meta:Ce(U(),Te()).optional()}),dl=Y({type:G("resource"),resource:ye([cl,ll]),annotations:Nt.optional(),_meta:Ce(U(),Te()).optional()}),pl=ul.extend({type:G("resource_link")}),Ut=ye([qa,Ba,La,pl,dl]),Rp=Y({role:Gt,content:Ut}),qp=He.extend({description:U().optional(),messages:fe(Rp)}),Bp=tt.extend({method:G("notifications/prompts/list_changed"),params:et.optional()}),Lp=Y({title:U().optional(),readOnlyHint:Ae().optional(),destructiveHint:Ae().optional(),idempotentHint:Ae().optional(),openWorldHint:Ae().optional()}),Op=Y({taskSupport:Ke(["required","optional","forbidden"]).optional()}),Oa=Y({...At.shape,...Ft.shape,description:U().optional(),inputSchema:Y({type:G("object"),properties:Ce(U(),De).optional(),required:fe(U()).optional()}).catchall(Te()),outputSchema:Y({type:G("object"),properties:Ce(U(),De).optional(),required:fe(U()).optional()}).catchall(Te()).optional(),annotations:Lp.optional(),execution:Op.optional(),_meta:Ce(U(),Te()).optional()}),gl=Ht.extend({method:G("tools/list")}),Dp=$t.extend({tools:fe(Oa)}),hr=He.extend({content:fe(Ut).default([]),structuredContent:Ce(U(),Te()).optional(),isError:Ae().optional()});hr.or(He.extend({toolResult:Te()}));const Fp=Ot.extend({name:U(),arguments:Ce(U(),Te()).optional()}),vl=Fe.extend({method:G("tools/call"),params:Fp}),Hp=tt.extend({method:G("notifications/tools/list_changed"),params:et.optional()});Y({autoRefresh:Ae().default(!0),debounceMs:me().int().nonnegative().default(300)});const ml=Ke(["debug","info","notice","warning","error","critical","alert","emergency"]),$p=Je.extend({level:ml}),Zp=Fe.extend({method:G("logging/setLevel"),params:$p}),Gp=et.extend({level:ml,logger:U().optional(),data:Te()}),Up=tt.extend({method:G("notifications/message"),params:Gp}),jp=Y({name:U().optional()}),Yp=Y({hints:fe(jp).optional(),costPriority:me().min(0).max(1).optional(),speedPriority:me().min(0).max(1).optional(),intelligencePriority:me().min(0).max(1).optional()}),Wp=Y({mode:Ke(["auto","required","none"]).optional()}),Vp=Y({type:G("tool_result"),toolUseId:U().describe("The unique identifier for the corresponding tool call."),content:fe(Ut).default([]),structuredContent:Y({}).loose().optional(),isError:Ae().optional(),_meta:Ce(U(),Te()).optional()}),Xp=Kc("type",[qa,Ba,La]),nr=Kc("type",[qa,Ba,La,Ip,Vp]),Kp=Y({role:Gt,content:ye([nr,fe(nr)]),_meta:Ce(U(),Te()).optional()}),Jp=Ot.extend({messages:fe(Kp),modelPreferences:Yp.optional(),systemPrompt:U().optional(),includeContext:Ke(["none","thisServer","allServers"]).optional(),temperature:me().optional(),maxTokens:me().int(),stopSequences:fe(U()).optional(),metadata:De.optional(),tools:fe(Oa).optional(),toolChoice:Wp.optional()}),Qp=Fe.extend({method:G("sampling/createMessage"),params:Jp}),e2=He.extend({model:U(),stopReason:Be(Ke(["endTurn","stopSequence","maxTokens"]).or(U())),role:Gt,content:Xp}),t2=He.extend({model:U(),stopReason:Be(Ke(["endTurn","stopSequence","maxTokens","toolUse"]).or(U())),role:Gt,content:ye([nr,fe(nr)])}),r2=Y({type:G("boolean"),title:U().optional(),description:U().optional(),default:Ae().optional()}),n2=Y({type:G("string"),title:U().optional(),description:U().optional(),minLength:me().optional(),maxLength:me().optional(),format:Ke(["email","uri","date","date-time"]).optional(),default:U().optional()}),a2=Y({type:Ke(["number","integer"]),title:U().optional(),description:U().optional(),minimum:me().optional(),maximum:me().optional(),default:me().optional()}),i2=Y({type:G("string"),title:U().optional(),description:U().optional(),enum:fe(U()),default:U().optional()}),s2=Y({type:G("string"),title:U().optional(),description:U().optional(),oneOf:fe(Y({const:U(),title:U()})),default:U().optional()}),o2=Y({type:G("string"),title:U().optional(),description:U().optional(),enum:fe(U()),enumNames:fe(U()).optional(),default:U().optional()}),c2=ye([i2,s2]),l2=Y({type:G("array"),title:U().optional(),description:U().optional(),minItems:me().optional(),maxItems:me().optional(),items:Y({type:G("string"),enum:fe(U())}),default:fe(U()).optional()}),u2=Y({type:G("array"),title:U().optional(),description:U().optional(),minItems:me().optional(),maxItems:me().optional(),items:Y({anyOf:fe(Y({const:U(),title:U()}))}),default:fe(U()).optional()}),h2=ye([l2,u2]),f2=ye([o2,c2,h2]),d2=ye([f2,r2,n2,a2]),p2=Ot.extend({mode:G("form").optional(),message:U(),requestedSchema:Y({type:G("object"),properties:Ce(U(),d2),required:fe(U()).optional()})}),g2=Ot.extend({mode:G("url"),message:U(),elicitationId:U(),url:U().url()}),v2=ye([p2,g2]),m2=Fe.extend({method:G("elicitation/create"),params:v2}),b2=et.extend({elicitationId:U()}),y2=tt.extend({method:G("notifications/elicitation/complete"),params:b2}),w2=He.extend({action:Ke(["accept","decline","cancel"]),content:rl(e=>e===null?void 0:e,Ce(U(),ye([U(),me(),Ae(),fe(U())])).optional())}),_2=Y({type:G("ref/resource"),uri:U()}),k2=Y({type:G("ref/prompt"),name:U()}),x2=Je.extend({ref:ye([k2,_2]),argument:Y({name:U(),value:U()}),context:Y({arguments:Ce(U(),U()).optional()}).optional()}),C2=Fe.extend({method:G("completion/complete"),params:x2}),S2=He.extend({completion:Ye({values:fe(U()).max(100),total:Be(me().int()),hasMore:Be(Ae())})}),T2=Y({uri:U().startsWith("file://"),name:U().optional(),_meta:Ce(U(),Te()).optional()}),E2=Fe.extend({method:G("roots/list"),params:Je.optional()}),A2=He.extend({roots:fe(T2)}),M2=tt.extend({method:G("notifications/roots/list_changed"),params:et.optional()});ye([ur,ap,C2,Zp,zp,Mp,gp,vp,yp,kp,Cp,vl,gl,Ea,Ma,Na,za]);ye([Ca,Sa,op,M2,rr]);ye([xa,e2,t2,w2,A2,Aa,Pa,Ta]);ye([ur,Qp,m2,E2,Ea,Ma,Na,za]);ye([Ca,Sa,Up,Tp,wp,Hp,Bp,rr,y2]);ye([xa,sp,S2,qp,Np,hl,mp,fl,hr,Dp,Aa,Pa,Ta]);class _e extends Error{constructor(t,a,n){super(`MCP error ${t}: ${a}`),this.code=t,this.data=n,this.name="McpError"}static fromError(t,a,n){if(t===xe.UrlElicitationRequired&&n){const r=n;if(r.elicitations)return new N2(r.elicitations,a)}return new _e(t,a,n)}}class N2 extends _e{constructor(t,a=`URL elicitation${t.length>1?"s":""} required`){super(xe.UrlElicitationRequired,a,{elicitations:t})}get elicitations(){var t;return((t=this.data)==null?void 0:t.elicitations)??[]}}function mt(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function ki(e){const t=M1(e),a=t==null?void 0:t.method;if(!a)throw new Error("Schema is missing a method literal");const n=N1(a);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function xi(e,t){const a=Gc(e,t);if(!a.success)throw a.error;return a.data}const P2=6e4;class z2{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Ca,a=>{this._oncancel(a)}),this.setNotificationHandler(Sa,a=>{this._onprogress(a)}),this.setRequestHandler(ur,a=>({})),this._taskStore=t==null?void 0:t.taskStore,this._taskMessageQueue=t==null?void 0:t.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Ea,async(a,n)=>{const r=await this._taskStore.getTask(a.params.taskId,n.sessionId);if(!r)throw new _e(xe.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(Ma,async(a,n)=>{const r=async()=>{var u;const i=a.params.taskId;if(this._taskMessageQueue){let f;for(;f=await this._taskMessageQueue.dequeue(i,n.sessionId);){if(f.type==="response"||f.type==="error"){const g=f.message,d=g.id,p=this._requestResolvers.get(d);if(p)if(this._requestResolvers.delete(d),f.type==="response")p(g);else{const l=g,o=new _e(l.error.code,l.error.message,l.error.data);p(o)}else{const l=f.type==="response"?"Response":"Error";this._onerror(new Error(`${l} handler missing for request ${d}`))}continue}await((u=this._transport)==null?void 0:u.send(f.message,{relatedRequestId:n.requestId}))}}const c=await this._taskStore.getTask(i,n.sessionId);if(!c)throw new _e(xe.InvalidParams,`Task not found: ${i}`);if(!mt(c.status))return await this._waitForTaskUpdate(i,n.signal),await r();if(mt(c.status)){const f=await this._taskStore.getTaskResult(i,n.sessionId);return this._clearTaskQueue(i),{...f,_meta:{...f._meta,[yt]:{taskId:i}}}}return await r()};return await r()}),this.setRequestHandler(Na,async(a,n)=>{var r;try{const{tasks:i,nextCursor:c}=await this._taskStore.listTasks((r=a.params)==null?void 0:r.cursor,n.sessionId);return{tasks:i,nextCursor:c,_meta:{}}}catch(i){throw new _e(xe.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(za,async(a,n)=>{try{const r=await this._taskStore.getTask(a.params.taskId,n.sessionId);if(!r)throw new _e(xe.InvalidParams,`Task not found: ${a.params.taskId}`);if(mt(r.status))throw new _e(xe.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(a.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(a.params.taskId);const i=await this._taskStore.getTask(a.params.taskId,n.sessionId);if(!i)throw new _e(xe.InvalidParams,`Task not found after cancellation: ${a.params.taskId}`);return{_meta:{},...i}}catch(r){throw r instanceof _e?r:new _e(xe.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;const a=this._requestHandlerAbortControllers.get(t.params.requestId);a==null||a.abort(t.params.reason)}_setupTimeout(t,a,n,r,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(r,a),startTime:Date.now(),timeout:a,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(t){const a=this._timeoutInfo.get(t);if(!a)return!1;const n=Date.now()-a.startTime;if(a.maxTotalTimeout&&n>=a.maxTotalTimeout)throw this._timeoutInfo.delete(t),_e.fromError(xe.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:a.maxTotalTimeout,totalElapsed:n});return clearTimeout(a.timeoutId),a.timeoutId=setTimeout(a.onTimeout,a.timeout),!0}_cleanupTimeout(t){const a=this._timeoutInfo.get(t);a&&(clearTimeout(a.timeoutId),this._timeoutInfo.delete(t))}async connect(t){var i,c,u;this._transport=t;const a=(i=this.transport)==null?void 0:i.onclose;this._transport.onclose=()=>{a==null||a(),this._onclose()};const n=(c=this.transport)==null?void 0:c.onerror;this._transport.onerror=f=>{n==null||n(f),this._onerror(f)};const r=(u=this._transport)==null?void 0:u.onmessage;this._transport.onmessage=(f,g)=>{r==null||r(f,g),Xt(f)||Wd(f)?this._onresponse(f):_i(f)?this._onrequest(f,g):Yd(f)?this._onnotification(f):this._onerror(new Error(`Unknown message type: ${JSON.stringify(f)}`))},await this._transport.start()}_onclose(){var n;const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const a=_e.fromError(xe.ConnectionClosed,"Connection closed");this._transport=void 0,(n=this.onclose)==null||n.call(this);for(const r of t.values())r(a)}_onerror(t){var a;(a=this.onerror)==null||a.call(this,t)}_onnotification(t){const a=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;a!==void 0&&Promise.resolve().then(()=>a(t)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(t,a){var d,p,l,o;const n=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,r=this._transport,i=(l=(p=(d=t.params)==null?void 0:d._meta)==null?void 0:p[yt])==null?void 0:l.taskId;if(n===void 0){const h={jsonrpc:"2.0",id:t.id,error:{code:xe.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:h,timestamp:Date.now()},r==null?void 0:r.sessionId).catch(s=>this._onerror(new Error(`Failed to enqueue error response: ${s}`))):r==null||r.send(h).catch(s=>this._onerror(new Error(`Failed to send an error response: ${s}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(t.id,c);const u=jd(t.params)?t.params.task:void 0,f=this._taskStore?this.requestTaskStore(t,r==null?void 0:r.sessionId):void 0,g={signal:c.signal,sessionId:r==null?void 0:r.sessionId,_meta:(o=t.params)==null?void 0:o._meta,sendNotification:async h=>{const s={relatedRequestId:t.id};i&&(s.relatedTask={taskId:i}),await this.notification(h,s)},sendRequest:async(h,s,v)=>{var _;const y={...v,relatedRequestId:t.id};i&&!y.relatedTask&&(y.relatedTask={taskId:i});const m=((_=y.relatedTask)==null?void 0:_.taskId)??i;return m&&f&&await f.updateTaskStatus(m,"input_required"),await this.request(h,s,y)},authInfo:a==null?void 0:a.authInfo,requestId:t.id,requestInfo:a==null?void 0:a.requestInfo,taskId:i,taskStore:f,taskRequestedTtl:u==null?void 0:u.ttl,closeSSEStream:a==null?void 0:a.closeSSEStream,closeStandaloneSSEStream:a==null?void 0:a.closeStandaloneSSEStream};Promise.resolve().then(()=>{u&&this.assertTaskHandlerCapability(t.method)}).then(()=>n(t,g)).then(async h=>{if(c.signal.aborted)return;const s={result:h,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:s,timestamp:Date.now()},r==null?void 0:r.sessionId):await(r==null?void 0:r.send(s))},async h=>{if(c.signal.aborted)return;const s={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(h.code)?h.code:xe.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:s,timestamp:Date.now()},r==null?void 0:r.sessionId):await(r==null?void 0:r.send(s))}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:a,...n}=t.params,r=Number(a),i=this._progressHandlers.get(r);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const c=this._responseHandlers.get(r),u=this._timeoutInfo.get(r);if(u&&c&&u.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(f){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),c(f);return}i(n)}_onresponse(t){const a=Number(t.id),n=this._requestResolvers.get(a);if(n){if(this._requestResolvers.delete(a),Xt(t))n(t);else{const c=new _e(t.error.code,t.error.message,t.error.data);n(c)}return}const r=this._responseHandlers.get(a);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(a),this._cleanupTimeout(a);let i=!1;if(Xt(t)&&t.result&&typeof t.result=="object"){const c=t.result;if(c.task&&typeof c.task=="object"){const u=c.task;typeof u.taskId=="string"&&(i=!0,this._taskProgressTokens.set(u.taskId,a))}}if(i||this._progressHandlers.delete(a),Xt(t))r(t);else{const c=_e.fromError(t.error.code,t.error.message,t.error.data);r(c)}}get transport(){return this._transport}async close(){var t;await((t=this._transport)==null?void 0:t.close())}async*requestStream(t,a,n){var c,u;const{task:r}=n??{};if(!r){try{yield{type:"result",result:await this.request(t,a,n)}}catch(f){yield{type:"error",error:f instanceof _e?f:new _e(xe.InternalError,String(f))}}return}let i;try{const f=await this.request(t,Ta,n);if(f.task)i=f.task.taskId,yield{type:"taskCreated",task:f.task};else throw new _e(xe.InternalError,"Task creation did not return a task");for(;;){const g=await this.getTask({taskId:i},n);if(yield{type:"taskStatus",task:g},mt(g.status)){g.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},a,n)}:g.status==="failed"?yield{type:"error",error:new _e(xe.InternalError,`Task ${i} failed`)}:g.status==="cancelled"&&(yield{type:"error",error:new _e(xe.InternalError,`Task ${i} was cancelled`)});return}if(g.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},a,n)};return}const d=g.pollInterval??((c=this._options)==null?void 0:c.defaultTaskPollInterval)??1e3;await new Promise(p=>setTimeout(p,d)),(u=n==null?void 0:n.signal)==null||u.throwIfAborted()}}catch(f){yield{type:"error",error:f instanceof _e?f:new _e(xe.InternalError,String(f))}}}request(t,a,n){const{relatedRequestId:r,resumptionToken:i,onresumptiontoken:c,task:u,relatedTask:f}=n??{};return new Promise((g,d)=>{var m,_,k,x,R;const p=I=>{d(I)};if(!this._transport){p(new Error("Not connected"));return}if(((m=this._options)==null?void 0:m.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(t.method),u&&this.assertTaskCapability(t.method)}catch(I){p(I);return}(_=n==null?void 0:n.signal)==null||_.throwIfAborted();const l=this._requestMessageId++,o={...t,jsonrpc:"2.0",id:l};n!=null&&n.onprogress&&(this._progressHandlers.set(l,n.onprogress),o.params={...t.params,_meta:{...((k=t.params)==null?void 0:k._meta)||{},progressToken:l}}),u&&(o.params={...o.params,task:u}),f&&(o.params={...o.params,_meta:{...((x=o.params)==null?void 0:x._meta)||{},[yt]:f}});const h=I=>{var A;this._responseHandlers.delete(l),this._progressHandlers.delete(l),this._cleanupTimeout(l),(A=this._transport)==null||A.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:l,reason:String(I)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:c}).catch(N=>this._onerror(new Error(`Failed to send cancellation: ${N}`)));const b=I instanceof _e?I:new _e(xe.RequestTimeout,String(I));d(b)};this._responseHandlers.set(l,I=>{var b;if(!((b=n==null?void 0:n.signal)!=null&&b.aborted)){if(I instanceof Error)return d(I);try{const A=Gc(a,I.result);A.success?g(A.data):d(A.error)}catch(A){d(A)}}}),(R=n==null?void 0:n.signal)==null||R.addEventListener("abort",()=>{var I;h((I=n==null?void 0:n.signal)==null?void 0:I.reason)});const s=(n==null?void 0:n.timeout)??P2,v=()=>h(_e.fromError(xe.RequestTimeout,"Request timed out",{timeout:s}));this._setupTimeout(l,s,n==null?void 0:n.maxTotalTimeout,v,(n==null?void 0:n.resetTimeoutOnProgress)??!1);const y=f==null?void 0:f.taskId;if(y){const I=b=>{const A=this._responseHandlers.get(l);A?A(b):this._onerror(new Error(`Response handler missing for side-channeled request ${l}`))};this._requestResolvers.set(l,I),this._enqueueTaskMessage(y,{type:"request",message:o,timestamp:Date.now()}).catch(b=>{this._cleanupTimeout(l),d(b)})}else this._transport.send(o,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:c}).catch(I=>{this._cleanupTimeout(l),d(I)})})}async getTask(t,a){return this.request({method:"tasks/get",params:t},Aa,a)}async getTaskResult(t,a,n){return this.request({method:"tasks/result",params:t},a,n)}async listTasks(t,a){return this.request({method:"tasks/list",params:t},Pa,a)}async cancelTask(t,a){return this.request({method:"tasks/cancel",params:t},dp,a)}async notification(t,a){var u,f,g,d;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const n=(u=a==null?void 0:a.relatedTask)==null?void 0:u.taskId;if(n){const p={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...((f=t.params)==null?void 0:f._meta)||{},[yt]:a.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:p,timestamp:Date.now()});return}if((((g=this._options)==null?void 0:g.debouncedNotificationMethods)??[]).includes(t.method)&&!t.params&&!(a!=null&&a.relatedRequestId)&&!(a!=null&&a.relatedTask)){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{var l,o;if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let p={...t,jsonrpc:"2.0"};a!=null&&a.relatedTask&&(p={...p,params:{...p.params,_meta:{...((l=p.params)==null?void 0:l._meta)||{},[yt]:a.relatedTask}}}),(o=this._transport)==null||o.send(p,a).catch(h=>this._onerror(h))});return}let c={...t,jsonrpc:"2.0"};a!=null&&a.relatedTask&&(c={...c,params:{...c.params,_meta:{...((d=c.params)==null?void 0:d._meta)||{},[yt]:a.relatedTask}}}),await this._transport.send(c,a)}setRequestHandler(t,a){const n=ki(t);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(r,i)=>{const c=xi(t,r);return Promise.resolve(a(c,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,a){const n=ki(t);this._notificationHandlers.set(n,r=>{const i=xi(t,r);return Promise.resolve(a(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const a=this._taskProgressTokens.get(t);a!==void 0&&(this._progressHandlers.delete(a),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,a,n){var i;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const r=(i=this._options)==null?void 0:i.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,a,n,r)}async _clearTaskQueue(t,a){if(this._taskMessageQueue){const n=await this._taskMessageQueue.dequeueAll(t,a);for(const r of n)if(r.type==="request"&&_i(r.message)){const i=r.message.id,c=this._requestResolvers.get(i);c?(c(new _e(xe.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,a){var r,i;let n=((r=this._options)==null?void 0:r.defaultTaskPollInterval)??1e3;try{const c=await((i=this._taskStore)==null?void 0:i.getTask(t));c!=null&&c.pollInterval&&(n=c.pollInterval)}catch{}return new Promise((c,u)=>{if(a.aborted){u(new _e(xe.InvalidRequest,"Request cancelled"));return}const f=setTimeout(c,n);a.addEventListener("abort",()=>{clearTimeout(f),u(new _e(xe.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,a){const n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async r=>{if(!t)throw new Error("No request provided");return await n.createTask(r,t.id,{method:t.method,params:t.params},a)},getTask:async r=>{const i=await n.getTask(r,a);if(!i)throw new _e(xe.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(r,i,c)=>{await n.storeTaskResult(r,i,c,a);const u=await n.getTask(r,a);if(u){const f=rr.parse({method:"notifications/tasks/status",params:u});await this.notification(f),mt(u.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>n.getTaskResult(r,a),updateTaskStatus:async(r,i,c)=>{const u=await n.getTask(r,a);if(!u)throw new _e(xe.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(mt(u.status))throw new _e(xe.InvalidParams,`Cannot update task "${r}" from terminal status "${u.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(r,i,c,a);const f=await n.getTask(r,a);if(f){const g=rr.parse({method:"notifications/tasks/status",params:f});await this.notification(g),mt(f.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>n.listTasks(r,a)}}}var I2="2026-01-26",R2="ui/notifications/tool-input-partial";class q2{constructor(t=window.parent,a){Ge(this,"eventTarget");Ge(this,"eventSource");Ge(this,"messageListener");Ge(this,"onclose");Ge(this,"onerror");Ge(this,"onmessage");Ge(this,"sessionId");Ge(this,"setProtocolVersion");this.eventTarget=t,this.eventSource=a,this.messageListener=n=>{var i,c,u;if(a&&n.source!==this.eventSource){console.debug("Ignoring message from unknown source",n);return}let r=Vd.safeParse(n.data);r.success?(console.debug("Parsed message",r.data),(i=this.onmessage)==null||i.call(this,r.data)):((c=n.data)==null?void 0:c.jsonrpc)!=="2.0"?console.debug("Ignoring non-JSON-RPC message",r.error.message,n):(console.error("Failed to parse message",r.error.message,n),(u=this.onerror)==null||u.call(this,Error("Invalid JSON-RPC message received: "+r.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(t,a){t.method!==R2&&console.debug("Sending message",t),this.eventTarget.postMessage(t,"*")}async close(){var t;window.removeEventListener("message",this.messageListener),(t=this.onclose)==null||t.call(this)}}var B2=ye([G("light"),G("dark")]).describe("Color theme preference for the host environment."),Bt=ye([G("inline"),G("fullscreen"),G("pip")]).describe("Display mode for UI presentation."),L2=ye([G("--color-background-primary"),G("--color-background-secondary"),G("--color-background-tertiary"),G("--color-background-inverse"),G("--color-background-ghost"),G("--color-background-info"),G("--color-background-danger"),G("--color-background-success"),G("--color-background-warning"),G("--color-background-disabled"),G("--color-text-primary"),G("--color-text-secondary"),G("--color-text-tertiary"),G("--color-text-inverse"),G("--color-text-ghost"),G("--color-text-info"),G("--color-text-danger"),G("--color-text-success"),G("--color-text-warning"),G("--color-text-disabled"),G("--color-border-primary"),G("--color-border-secondary"),G("--color-border-tertiary"),G("--color-border-inverse"),G("--color-border-ghost"),G("--color-border-info"),G("--color-border-danger"),G("--color-border-success"),G("--color-border-warning"),G("--color-border-disabled"),G("--color-ring-primary"),G("--color-ring-secondary"),G("--color-ring-inverse"),G("--color-ring-info"),G("--color-ring-danger"),G("--color-ring-success"),G("--color-ring-warning"),G("--font-sans"),G("--font-mono"),G("--font-weight-normal"),G("--font-weight-medium"),G("--font-weight-semibold"),G("--font-weight-bold"),G("--font-text-xs-size"),G("--font-text-sm-size"),G("--font-text-md-size"),G("--font-text-lg-size"),G("--font-heading-xs-size"),G("--font-heading-sm-size"),G("--font-heading-md-size"),G("--font-heading-lg-size"),G("--font-heading-xl-size"),G("--font-heading-2xl-size"),G("--font-heading-3xl-size"),G("--font-text-xs-line-height"),G("--font-text-sm-line-height"),G("--font-text-md-line-height"),G("--font-text-lg-line-height"),G("--font-heading-xs-line-height"),G("--font-heading-sm-line-height"),G("--font-heading-md-line-height"),G("--font-heading-lg-line-height"),G("--font-heading-xl-line-height"),G("--font-heading-2xl-line-height"),G("--font-heading-3xl-line-height"),G("--border-radius-xs"),G("--border-radius-sm"),G("--border-radius-md"),G("--border-radius-lg"),G("--border-radius-xl"),G("--border-radius-full"),G("--border-width-regular"),G("--shadow-hairline"),G("--shadow-sm"),G("--shadow-md"),G("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),O2=Ce(L2.describe(`Style variables for theming MCP apps.
|
|
86
47
|
|
|
87
48
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
88
49
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
89
50
|
|
|
90
51
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
91
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),
|
|
52
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),ye([U(),la()]).describe(`Style variables for theming MCP apps.
|
|
92
53
|
|
|
93
54
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
94
55
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -100,10 +61,10 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
100
61
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
101
62
|
|
|
102
63
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
103
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);
|
|
64
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);Y({method:G("ui/open-link"),params:Y({url:U().describe("URL to open in the host's browser")})});var D2=Y({isError:Ae().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),F2=Y({isError:Ae().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),H2=Y({isError:Ae().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();Y({method:G("ui/notifications/sandbox-proxy-ready"),params:Y({})});var Da=Y({connectDomains:fe(U()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
104
65
|
|
|
105
66
|
- Maps to CSP \`connect-src\` directive
|
|
106
|
-
- Empty or omitted → no network connections (secure default)`),resourceDomains:
|
|
67
|
+
- Empty or omitted → no network connections (secure default)`),resourceDomains:fe(U()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:fe(U()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:fe(U()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),Fa=Y({camera:Y({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:Y({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:Y({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:Y({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});Y({method:G("ui/notifications/size-changed"),params:Y({width:me().optional().describe("New width in pixels."),height:me().optional().describe("New height in pixels.")})});var $2=Y({method:G("ui/notifications/tool-input"),params:Y({arguments:Ce(U(),Te().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),Z2=Y({method:G("ui/notifications/tool-input-partial"),params:Y({arguments:Ce(U(),Te().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),G2=Y({method:G("ui/notifications/tool-cancelled"),params:Y({reason:U().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),U2=Y({fonts:U().optional()}),j2=Y({variables:O2.optional().describe("CSS variables for theming the app."),css:U2.optional().describe("CSS blocks that apps can inject.")}),Y2=Y({method:G("ui/resource-teardown"),params:Y({})});Ce(U(),Te());var Ci=Y({text:Y({}).optional().describe("Host supports text content blocks."),image:Y({}).optional().describe("Host supports image content blocks."),audio:Y({}).optional().describe("Host supports audio content blocks."),resource:Y({}).optional().describe("Host supports resource content blocks."),resourceLink:Y({}).optional().describe("Host supports resource link content blocks."),structuredContent:Y({}).optional().describe("Host supports structured content.")}),W2=Y({experimental:Y({}).optional().describe("Experimental features (structure TBD)."),openLinks:Y({}).optional().describe("Host supports opening external URLs."),downloadFile:Y({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:Y({listChanged:Ae().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:Y({listChanged:Ae().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:Y({}).optional().describe("Host accepts log messages."),sandbox:Y({permissions:Fa.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:Da.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Ci.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Ci.optional().describe("Host supports receiving content messages (ui/message) from the view.")}),V2=Y({experimental:Y({}).optional().describe("Experimental features (structure TBD)."),tools:Y({listChanged:Ae().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:fe(Bt).optional().describe("Display modes the app supports.")});Y({method:G("ui/notifications/initialized"),params:Y({}).optional()});Y({csp:Da.optional().describe("Content Security Policy configuration for UI resources."),permissions:Fa.optional().describe("Sandbox permissions requested by the UI resource."),domain:U().optional().describe(`Dedicated origin for view sandbox.
|
|
107
68
|
|
|
108
69
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
109
70
|
|
|
@@ -111,55 +72,55 @@ Useful when views need stable, dedicated origins for OAuth callbacks, CORS polic
|
|
|
111
72
|
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
|
|
112
73
|
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
|
|
113
74
|
|
|
114
|
-
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:
|
|
75
|
+
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:Ae().optional().describe(`Visual boundary preference - true if view prefers a visible border.
|
|
115
76
|
|
|
116
77
|
Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
|
|
117
78
|
|
|
118
79
|
- \`true\`: request visible border + background
|
|
119
80
|
- \`false\`: request no visible border + background
|
|
120
|
-
- omitted: host decides border`)});
|
|
81
|
+
- omitted: host decides border`)});Y({method:G("ui/request-display-mode"),params:Y({mode:Bt.describe("The display mode being requested.")})});var X2=Y({mode:Bt.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),K2=ye([G("model"),G("app")]).describe("Tool visibility scope - who can access the tool.");Y({resourceUri:U().optional(),visibility:fe(K2).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
121
82
|
- "model": Tool visible to and callable by the agent
|
|
122
|
-
- "app": Tool callable by the app from this server only`)});
|
|
123
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:Z.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:Z.string().optional().describe("User's timezone in IANA format."),userAgent:Z.string().optional().describe("Host application identifier."),platform:Z.union([Z.literal("web"),Z.literal("desktop"),Z.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:Z.object({touch:Z.boolean().optional().describe("Whether the device supports touch input."),hover:Z.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:Z.object({top:Z.number().describe("Top safe area inset in pixels."),right:Z.number().describe("Right safe area inset in pixels."),bottom:Z.number().describe("Bottom safe area inset in pixels."),left:Z.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),u7=Z.object({method:Z.literal("ui/notifications/host-context-changed"),params:tb.describe("Partial context update containing only changed fields.")});Z.object({method:Z.literal("ui/update-model-context"),params:Z.object({content:Z.array(Xr).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:Z.record(Z.string(),Z.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});Z.object({method:Z.literal("ui/initialize"),params:Z.object({appInfo:Kn.describe("App identification (name and version)."),appCapabilities:a7.describe("Features and capabilities this app provides."),protocolVersion:Z.string().describe("Protocol version this app supports.")})});var l7=Z.object({protocolVersion:Z.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Kn.describe("Host application identification and version."),hostCapabilities:i7.describe("Features and capabilities provided by the host."),hostContext:tb.describe("Rich context about the host environment.")}).passthrough();class f7 extends f9{constructor(n,i={},t={autoResize:!0}){super(t);at(this,"_appInfo");at(this,"_capabilities");at(this,"options");at(this,"_hostCapabilities");at(this,"_hostInfo");at(this,"_hostContext");at(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=i,this.options=t,this.setRequestHandler(Qn,a=>(console.log("Received ping:",a.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(n){this.setNotificationHandler(Kk,i=>n(i.params))}set ontoolinputpartial(n){this.setNotificationHandler(Qk,i=>n(i.params))}set ontoolresult(n){this.setNotificationHandler(c7,i=>n(i.params))}set ontoolcancelled(n){this.setNotificationHandler(e7,i=>n(i.params))}set onhostcontextchanged(n){this.setNotificationHandler(u7,i=>{this._hostContext={...this._hostContext,...i.params},n(i.params)})}set onteardown(n){this.setRequestHandler(n7,(i,t)=>n(i.params,t))}set oncalltool(n){this.setRequestHandler(d1,(i,t)=>n(i.params,t))}set onlisttools(n){this.setRequestHandler(f1,(i,t)=>n(i.params,t))}assertCapabilityForMethod(n){}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,i){if(typeof n=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${n}"). Did you mean: callServerTool({ name: "${n}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:n},ei,i)}sendMessage(n,i){return this.request({method:"ui/message",params:n},Xk,i)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,i){return this.request({method:"ui/update-model-context",params:n},c0,i)}openLink(n,i){return this.request({method:"ui/open-link",params:n},Yk,i)}downloadFile(n,i){return this.request({method:"ui/download-file",params:n},Vk,i)}requestDisplayMode(n,i){return this.request({method:"ui/request-display-mode",params:n},s7,i)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,i=0,t=0,a=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let o=document.documentElement,l=o.style.width,d=o.style.height;o.style.width="fit-content",o.style.height="fit-content";let p=o.getBoundingClientRect();o.style.width=l,o.style.height=d;let v=window.innerWidth-o.clientWidth,f=Math.ceil(p.width+v),u=Math.ceil(p.height);(f!==i||u!==t)&&(i=f,t=u,this.sendSizeChanged({width:f,height:u}))}))};a();let s=new ResizeObserver(a);return s.observe(document.documentElement),s.observe(document.body),()=>s.disconnect()}async connect(n=new h9(window.parent,window.parent),i){var t;if(this.transport)throw Error("App is already connected. Call close() before connecting again.");await super.connect(n);try{let a=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:p9}},l7,i);if(a===void 0)throw Error(`Server sent invalid initialize result: ${a}`);this._hostCapabilities=a.hostCapabilities,this._hostInfo=a.hostInfo,this._hostContext=a.hostContext,await this.notification({method:"ui/notifications/initialized"}),(t=this.options)!=null&&t.autoResize&&this.setupSizeChangedNotifications()}catch(a){throw this.close(),a}}}function d7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xi,$l;function h7(){if($l)return Xi;$l=1;var e="6.6.0";return Xi=e,Xi}var Ki,xl;function wu(){if(xl)return Ki;xl=1;var e=function(n,i){var t=this;if(i||(i={}),t.qpm=i.qpm?parseInt(i.qpm,10):null,!t.qpm){var a=n.metaText?n.metaText.tempo:null;t.qpm=n.getBpm(a)}t.extraMeasuresAtBeginning=i.extraMeasuresAtBeginning?parseInt(i.extraMeasuresAtBeginning,10):0,t.beatCallback=i.beatCallback,t.eventCallback=i.eventCallback,t.lineEndCallback=i.lineEndCallback,t.lineEndAnticipation=i.lineEndAnticipation?parseInt(i.lineEndAnticipation,10):0,t.beatSubdivisions=i.beatSubdivisions?parseInt(i.beatSubdivisions,10):1,t.beatSubdivisions||(t.beatSubdivisions=1),t.joggerTimer=null,t.replaceTarget=function(o){if(t.noteTimings=o.setTiming(t.qpm,t.extraMeasuresAtBeginning),o.noteTimings.length===0&&(t.noteTimings=o.setTiming(0,0)),t.lineEndCallback&&(t.lineEndTimings=r(o.noteTimings,t.lineEndAnticipation)),t.startTime=null,t.currentBeat=0,t.currentEvent=0,t.currentLine=0,t.currentTime=0,t.isPaused=!1,t.isRunning=!1,t.pausedPercent=null,t.justUnpaused=!1,t.newSeekPercent=0,t.lastTimestamp=0,t.noteTimings.length!==0){t.millisecondsPerBeat=1e3/(t.qpm/60)/t.beatSubdivisions,t.lastMoment=t.noteTimings[t.noteTimings.length-1].milliseconds;var l=o.getMeter(),d="";if(l&&l.type==="specified"&&l.value&&l.value.length>0&&l.value[0].num.indexOf("+")>0&&(d=l.value[0].num),t.beatStarts=[],d){for(var p=t.noteTimings[t.noteTimings.length-1].millisecondsPerMeasure,v=t.lastMoment/p,f=d.split("+"),u=0;u<f.length;u++)f[u]=parseInt(f[u],10)/2;for(var h=0,c=0,m=0;m<v;m++)for(var b=m*p,g=0,w=0;w<f.length;w++){var k=f[w];if(t.beatSubdivisions===1)t.beatSubdivisions===1&&h<t.lastMoment&&t.beatStarts.push({b:c,ts:h}),h+=k*t.millisecondsPerBeat;else for(var $=k*t.beatSubdivisions,O=0;O<Math.floor($);O++){var P=O/$,y=Math.round(b+g*t.millisecondsPerBeat);y<t.lastMoment&&t.beatStarts.push({b:c+P,ts:y}),g++}c++}t.beatStarts.push({b:v*f.length,ts:t.lastMoment}),t.totalBeats=t.beatStarts.length}else{t.totalBeats=Math.round(t.lastMoment/t.millisecondsPerBeat);for(var C=0;C<t.totalBeats+1;C++)t.beatStarts.push({b:C/t.beatSubdivisions,ts:Math.round(C*t.millisecondsPerBeat)})}}},t.replaceTarget(n),t.doTiming=function(o){if(t.lastTimestamp!==o&&(t.lastTimestamp=o,!t.isPaused&&t.isRunning)){for(t.startTime||(t.startTime=o),t.currentTime=o-t.startTime,t.currentTime+=16;t.noteTimings.length>t.currentEvent&&t.noteTimings[t.currentEvent].milliseconds<t.currentTime;){if(t.eventCallback&&t.noteTimings[t.currentEvent].type==="event"){var l=t.startTime;t.eventCallback(t.noteTimings[t.currentEvent]),l!==t.startTime&&(t.currentTime=o-t.startTime)}t.currentEvent++}if(t.lineEndCallback&&t.lineEndTimings.length>t.currentLine&&t.lineEndTimings[t.currentLine].milliseconds<t.currentTime&&t.currentEvent<t.noteTimings.length){var d=t.noteTimings[t.currentEvent].milliseconds===t.currentTime?t.noteTimings[t.currentEvent]:t.noteTimings[t.currentEvent-1];t.lineEndCallback(t.lineEndTimings[t.currentLine],d,{line:t.currentLine,endTimings:t.lineEndTimings,currentTime:t.currentTime}),t.currentLine++}if(t.currentTime<t.lastMoment){if(requestAnimationFrame(t.doTiming),t.currentBeat<t.beatStarts.length&&t.beatStarts[t.currentBeat].ts<=t.currentTime){var p=t.doBeatCallback(o);t.currentBeat++,p!==null&&(t.currentTime=p)}}else if(t.currentBeat<=t.totalBeats&&t.beatCallback){var v=t.doBeatCallback(o);t.currentBeat++,v!==null&&(t.currentTime=v),requestAnimationFrame(t.doTiming)}if(t.currentTime>=t.lastMoment)if(t.eventCallback){var f=t.eventCallback(null);t.shouldStop(f).then(function(u){u&&t.stop()})}else t.stop()}},t.shouldStop=function(o){return new Promise(function(l){if(!o)return l(!0);if(o==="continue")return l(!1);o.then&&o.then(function(d){l(d!=="continue")})})},t.doBeatCallback=function(o){if(t.beatCallback){for(var l=t.currentEvent;l<t.noteTimings.length&&t.noteTimings[l].left===null;)l++;var d,p;if(l<t.noteTimings.length){for(d=t.noteTimings[l].milliseconds,l=Math.max(0,t.currentEvent-1);l>=0&&t.noteTimings[l].left===null;)l--;p=t.noteTimings[l]}var v={},f={};if(p){v.top=p.top,v.height=p.height;var u=Math.max(0,o-t.startTime-p.milliseconds),h=d-p.milliseconds,c=p.endX-p.left,m=h?u*c/h:0;v.left=p.left+m,t.currentEvent===0&&p.milliseconds>o-t.startTime&&(v.left=void 0),f={timestamp:o,startTime:t.startTime,ev:p,endMs:d,offMs:u,offPx:m,gapMs:h,gapPx:c}}else f={timestamp:o,startTime:t.startTime};var b=t.startTime;if(t.beatCallback(t.beatStarts[t.currentBeat].b,t.totalBeats/t.beatSubdivisions,t.lastMoment,v,f),b!==t.startTime)return o-t.startTime}return null};var s=60;t.animationJogger=function(){t.isRunning&&(t.doTiming(performance.now()),t.joggerTimer=setTimeout(t.animationJogger,s))},t.start=function(o,l){if(t.isRunning=!0,t.isPaused&&(t.isPaused=!1,o===void 0&&(t.justUnpaused=!0)),o)t.setProgress(o,l);else if(o===0)t.reset();else if(t.pausedPercent!==null){var d=performance.now();t.currentTime=t.lastMoment*t.pausedPercent,t.startTime=d-t.currentTime,t.pausedPercent=null,t.reportNext=!0}requestAnimationFrame(t.doTiming),t.joggerTimer=setTimeout(t.animationJogger,s)},t.pause=function(){t.isPaused=!0;var o=performance.now();t.pausedPercent=(o-t.startTime)/t.lastMoment,t.isRunning=!1,t.joggerTimer&&(clearTimeout(t.joggerTimer),t.joggerTimer=null)},t.currentMillisecond=function(){return t.currentTime},t.reset=function(){t.currentBeat=0,t.currentEvent=0,t.currentLine=0,t.startTime=null,t.pausedPercent=null},t.stop=function(){t.pause(),t.reset()},t.setProgress=function(o,l){var d;switch(l){case"seconds":t.currentTime=o*1e3,t.currentTime<0&&(t.currentTime=0),t.currentTime>t.lastMoment&&(t.currentTime=t.lastMoment),d=t.currentTime/t.lastMoment;break;case"beats":t.currentTime=o*t.millisecondsPerBeat*t.beatSubdivisions,t.currentTime<0&&(t.currentTime=0),t.currentTime>t.lastMoment&&(t.currentTime=t.lastMoment),d=t.currentTime/t.lastMoment;break;default:d=o,d<0&&(d=0),d>1&&(d=1),t.currentTime=t.lastMoment*d;break}t.isRunning||(t.pausedPercent=d);var p=performance.now();for(t.startTime=p-t.currentTime,t.currentEvent=0;t.noteTimings.length>t.currentEvent&&t.noteTimings[t.currentEvent].milliseconds<t.currentTime;)t.currentEvent++;if(t.lineEndCallback)for(t.currentLine=0;t.lineEndTimings.length>t.currentLine&&t.lineEndTimings[t.currentLine].milliseconds+t.lineEndAnticipation<t.currentTime;)t.currentLine++;var v=t.currentBeat;for(t.currentBeat=0;t.currentBeat<t.beatStarts.length&&!(t.beatStarts[t.currentBeat].ts>t.currentTime);t.currentBeat++);t.currentBeat--,t.beatCallback&&v!==t.currentBeat&&(t.doBeatCallback(t.startTime+t.currentTime),t.currentBeat++),t.eventCallback&&t.currentEvent>=0&&t.noteTimings[t.currentEvent].type==="event"&&t.eventCallback(t.noteTimings[t.currentEvent]),t.lineEndCallback&&t.lineEndCallback(t.lineEndTimings[t.currentLine],t.noteTimings[t.currentEvent],{line:t.currentLine,endTimings:t.lineEndTimings}),t.joggerTimer=setTimeout(t.animationJogger,s)}};function r(n,i){for(var t=[],a=null,s=0;s<n.length;s++){var o=n[s];o.type!=="end"&&o.top!==a&&(t.push({measureNumber:o.measureNumber,milliseconds:o.milliseconds-i,top:o.top,bottom:o.top+o.height}),a=o.top)}return t}return Ki=e,Ki}var Qi,Sl;function p7(){if(Sl)return Qi;Sl=1;var e=wu(),r={};return(function(){var n,i;r.startAnimation=function(t,a,s){n&&(n.stop(),n=void 0),s.showCursor&&(i=t.querySelector(".abcjs-cursor"),i||(i=document.createElement("DIV"),i.className="abcjs-cursor cursor",i.style.position="absolute",t.appendChild(i),t.style.position="relative"));function o(h){for(var c=0;c<h.length;c++){var m=h[c];m.classList.contains("abcjs-bar")||(m.style.display="none")}}var l;function d(h){if(l){var c=t.querySelectorAll(l);o(c)}l=h}function p(h){var c=t.querySelectorAll(h);o(c)}function v(h){s.hideCurrentMeasure?p(h):s.hideFinishedMeasures&&d(h)}function f(h){return".abcjs-l"+h.line+".abcjs-m"+h.measureNumber}function u(h){if(h){if(h.measureStart){var c=f(h);c&&v(c)}i&&(i.style.left=h.left+"px",i.style.top=h.top+"px",i.style.width=h.width+"px",i.style.height=h.height+"px")}else n.stop(),n=void 0}n=new e(a,{qpm:s.bpm,eventCallback:u}),n.start()},r.pauseAnimation=function(t){n&&(t?n.pause():n.start())},r.stopAnimation=function(){n&&(n.stop(),n=void 0)}})(),Qi=r,Qi}var ea,Il;function Et(){if(Il)return ea;Il=1;var e={};return e.cloneArray=function(r){for(var n=[],i=0;i<r.length;i++)n.push(Object.assign({},r[i]));return n},e.cloneHashOfHash=function(r){var n={};for(var i in r)r.hasOwnProperty(i)&&(n[i]=Object.assign({},r[i]));return n},e.cloneHashOfArrayOfHash=function(r){var n={};for(var i in r)r.hasOwnProperty(i)&&(n[i]=e.cloneArray(r[i]));return n},e.strip=function(r){return r.replace(/^\s+/,"").replace(/\s+$/,"")},e.startsWith=function(r,n){return r.indexOf(n)===0},e.endsWith=function(r,n){var i=r.length-n.length;return i>=0&&r.lastIndexOf(n)===i},e.last=function(r){return r.length===0?null:r[r.length-1]},ea=e,ea}var ta,Tl;function ku(){if(Tl)return ta;Tl=1;var e=Et(),r={};return(function(){var n,i,t,a,s;r.initialize=function(_,x,S,M,U){n=_,i=x,t=S,a=M,s=U,o()};function o(){t.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},t.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},t.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},t.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},t.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},t.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},t.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},t.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},t.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},t.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},t.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},a.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},a.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},a.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},a.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},a.formatting.annotationfont=t.annotationfont,a.formatting.gchordfont=t.gchordfont,a.formatting.historyfont=t.historyfont,a.formatting.infofont=t.infofont,a.formatting.measurefont=t.measurefont,a.formatting.partsfont=t.partsfont,a.formatting.repeatfont=t.repeatfont,a.formatting.textfont=t.textfont,a.formatting.tripletfont=t.tripletfont,a.formatting.vocalfont=t.vocalfont,a.formatting.wordsfont=t.wordsfont}var l={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},d=function(_){switch(_){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}},p=function(_,x,S,M,U){function q(){var Me=parseInt(_[0].token);return _.shift(),x?_.length===0?{face:x.face,weight:x.weight,style:x.style,decoration:x.decoration,size:Me}:_.length===1&&_[0].token==="box"&&l[U]?{face:x.face,weight:x.weight,style:x.style,decoration:x.decoration,size:Me,box:!0}:(i("Extra parameters in font definition.",S,M),{face:x.face,weight:x.weight,style:x.style,decoration:x.decoration,size:Me}):(i("Can't set just the size of the font since there is no default value.",S,M),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:Me})}if(_[0].token==="*"){if(_.shift(),_[0].type==="number")return q();i("Expected font size number after *.",S,M)}if(_[0].type==="number")return q();for(var j=[],V,ne="normal",Y="normal",ce="none",fe=!1,pe="face",K=!1;_.length;){var he=_.shift(),ee=he.token.toLowerCase();switch(pe){case"face":K||ee!=="utf"&&he.type!=="number"&&ee!=="bold"&&ee!=="italic"&&ee!=="underline"&&ee!=="box"?j.length>0&&he.token==="-"?(K=!0,j[j.length-1]=j[j.length-1]+he.token):K?(K=!1,j[j.length-1]=j[j.length-1]+he.token):j.push(he.token):he.type==="number"?(V?i("Font size specified twice in font definition.",S,M):V=he.token,pe="modifier"):ee==="bold"?ne="bold":ee==="italic"?Y="italic":ee==="underline"?ce="underline":ee==="box"?(l[U]?fe=!0:i(`This font style doesn't support "box"`,S,M),pe="finished"):ee==="utf"?(he=_.shift(),pe="size"):i("Unknown parameter "+he.token+" in font definition.",S,M);break;case"size":he.type==="number"?V?i("Font size specified twice in font definition.",S,M):V=he.token:i("Expected font size in font definition.",S,M),pe="modifier";break;case"modifier":ee==="bold"?ne="bold":ee==="italic"?Y="italic":ee==="underline"?ce="underline":ee==="box"?(l[U]?fe=!0:i(`This font style doesn't support "box"`,S,M),pe="finished"):i("Unknown parameter "+he.token+" in font definition.",S,M);break;case"finished":i('Extra characters found after "box" in font definition.',S,M);break}}V===void 0?x?V=x.size:(i("Must specify the size of the font since there is no default value.",S,M),V=12):V=parseFloat(V),j=j.join(" "),j===""&&(x?j=x.face:(i("Must specify the name of the font since there is no default value.",S,M),j="sans-serif"));var be=d(j),_e={};return be?(_e.face=be.face,_e.weight=be.weight,_e.style=be.style,_e.decoration=be.decoration,_e.size=V,fe&&(_e.box=!0),_e):(_e.face=j,_e.weight=ne,_e.style=Y,_e.decoration=ce,_e.size=V,fe&&(_e.box=!0),_e)},v=function(_,x,S){return x.length===0?'Directive "'+_+'" requires a font as a parameter.':(t[_]=p(x,t[_],S,0,_),t.is_in_header&&(a.formatting[_]=t[_]),null)},f=function(_,x,S){return x.length===0?'Directive "'+_+'" requires a font as a parameter.':(a.formatting[_]=p(x,a.formatting[_],S,0,_),null)},u=function(_,x){var S="";x.forEach(function(U){S+=U.token});var M=parseFloat(S);if(isNaN(M)||M===0)return'Directive "'+_+'" requires a number as a parameter.';a.formatting.scale=M},h=["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"],c=function(_){var x=_.split(/\s+/);if(x.length!==2&&x.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var S=x[0],M=parseInt(x[1],10);if((isNaN(M)||M<35||M>81)&&x[1]&&(M=h.indexOf(x[1].toLowerCase())+35),isNaN(M)||M<35||M>81)return{error:'Expected drum name, received "'+x[1]+'"'};var U={sound:M};return x.length===3&&(U.noteHead=x[2]),{key:S,value:U}},m=function(_,x){var S=n.getMeasurement(x);return S.used===0||x.length!==0?{error:'Directive "'+_+'" requires a measurement as a parameter.'}:S.value},b=function(_,x){var S=n.getMeasurement(x);return S.used===0||x.length!==0?'Directive "'+_+'" requires a measurement as a parameter.':(a.formatting[_]=S.value,null)},g=function(_,x,S,M,U){if(S.length!==1||S[0].type!=="number")return'Directive "'+x+'" requires a number as a parameter.';var q=S[0].intt;return M!==void 0&&q<M?'Directive "'+x+'" requires a number greater than or equal to '+M+" as a parameter.":U!==void 0&&q>U?'Directive "'+x+'" requires a number less than or equal to '+U+" as a parameter.":(t[_]=q,null)},w=function(_,x,S){if(S.length===1&&(S[0].token==="true"||S[0].token==="false"))return t[_]=S[0].token==="true",null;var M=g(_,x,S,0,1);return M!==null?M:(t[_]=t[_]===1,null)},k=function(_,x,S,M){if(S.length!==1)return'Directive "'+x+'" requires one of [ '+M.join(", ")+" ] as a parameter.";for(var U=S[0].token,q=!1,j=0;!q&&j<M.length;j++)M[j]===U&&(q=!0);return q?(t[_]=U,null):'Directive "'+x+'" requires one of [ '+M.join(", ")+" ] as a parameter."},$=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],O=["gchord","ptstress","beatstring"],P=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],y=["program"],C=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],E=["beat"],z=["drone"],A=["portamento"],R=["expand","grace","trim"],T=["drum","chordname"],I=["bassprog","chordprog"],N=function(_,x,S){var M=_.shift().token,U=[];if($.indexOf(M)>=0)_.length!==0&&i("Unexpected parameter in MIDI "+M,S,0);else if(O.indexOf(M)>=0)_.length!==1?i("Expected one parameter in MIDI "+M,S,0):U.push(_[0].token);else if(P.indexOf(M)>=0)_.length!==1?i("Expected one parameter in MIDI "+M,S,0):_[0].type!=="number"?i("Expected one integer parameter in MIDI "+M,S,0):U.push(_[0].intt);else if(y.indexOf(M)>=0)_.length!==1&&_.length!==2?i("Expected one or two parameters in MIDI "+M,S,0):_[0].type!=="number"||_.length===2&&_[1].type!=="number"?i("Expected integer parameter in MIDI "+M,S,0):(U.push(_[0].intt),_.length===2&&U.push(_[1].intt));else if(C.indexOf(M)>=0)_.length!==2?i("Expected two parameters in MIDI "+M,S,0):_[0].type!=="number"||_[1].type!=="number"?i("Expected two integer parameters in MIDI "+M,S,0):(U.push(_[0].intt),U.push(_[1].intt));else if(A.indexOf(M)>=0)_.length!==2?i("Expected two parameters in MIDI "+M,S,0):_[0].type!=="alpha"||_[1].type!=="number"?i("Expected one string and one integer parameters in MIDI "+M,S,0):(U.push(_[0].token),U.push(_[1].intt));else if(M==="drummap")_.length===2&&_[0].type==="alpha"&&_[1].type==="number"?(x.formatting||(x.formatting={}),x.formatting.midi||(x.formatting.midi={}),x.formatting.midi.drummap||(x.formatting.midi.drummap={}),x.formatting.midi.drummap[_[0].token]=_[1].intt,U=x.formatting.midi.drummap):_.length===3&&_[0].type==="punct"&&_[1].type==="alpha"&&_[2].type==="number"?(x.formatting||(x.formatting={}),x.formatting.midi||(x.formatting.midi={}),x.formatting.midi.drummap||(x.formatting.midi.drummap={}),x.formatting.midi.drummap[_[0].token+_[1].token]=_[2].intt,U=x.formatting.midi.drummap):i("Expected one note name and one integer parameter in MIDI "+M,S,0);else if(R.indexOf(M)>=0)_.length!==3||_[0].type!=="number"||_[1].token!=="/"||_[2].type!=="number"?i("Expected fraction parameter in MIDI "+M,S,0):(U.push(_[0].intt),U.push(_[2].intt));else if(E.indexOf(M)>=0)_.length!==4?i("Expected four parameters in MIDI "+M,S,0):_[0].type!=="number"||_[1].type!=="number"||_[2].type!=="number"||_[3].type!=="number"?i("Expected four integer parameters in MIDI "+M,S,0):(U.push(_[0].intt),U.push(_[1].intt),U.push(_[2].intt),U.push(_[3].intt));else if(z.indexOf(M)>=0)_.length!==5?i("Expected five parameters in MIDI "+M,S,0):_[0].type!=="number"||_[1].type!=="number"||_[2].type!=="number"||_[3].type!=="number"||_[4].type!=="number"?i("Expected five integer parameters in MIDI "+M,S,0):(U.push(_[0].intt),U.push(_[1].intt),U.push(_[2].intt),U.push(_[3].intt),U.push(_[4].intt));else if(y.indexOf(M)>=0)_.length!==1||_.length!==4?i("Expected one or two parameters in MIDI "+M,S,0):_[0].type!=="number"?i("Expected integer parameter in MIDI "+M,S,0):_.length===4?(_[1].token!=="octave"&&i("Expected octave parameter in MIDI "+M,S,0),_[2].token!=="="&&i("Expected octave parameter in MIDI "+M,S,0),_[3].type!=="number"&&i("Expected integer parameter for octave in MIDI "+M,S,0)):(U.push(_[0].intt),_.length===4&&U.push(_[3].intt));else if(T.indexOf(M)>=0)if(_.length<2)i("Expected string parameter and at least one integer parameter in MIDI "+M,S,0);else if(_[0].type!=="alpha")i("Expected string parameter and at least one integer parameter in MIDI "+M,S,0);else{var q=_.shift();for(U.push(q.token);_.length>0;)q=_.shift(),q.type!=="number"&&i("Expected integer parameter in MIDI "+M,S,0),U.push(q.intt)}else if(I.indexOf(M)>=0){if(_.length!==1&&_.length!==2)i("Expected one or two parameters in MIDI "+M,S,0);else if(_[0].type!=="number")i("Expected integer parameter in MIDI "+M,S,0);else if(_.length===2&&_[1].type!=="alpha")i("Expected alpha parameter in MIDI "+M,S,0);else if(U.push(_[0].intt),_.length===2){var j=_[1].token;j.indexOf("octave=")!=-1?(j=j.replace("octave=",""),j=parseInt(j),isNaN(j)?i("Expected octave value in MIDI"+M):(j<-1&&(i("Expected octave= in MIDI "+M+" to be >= -1 (recv:"+j+")"),j=-1),j>3&&(i("Expected octave= in MIDI "+M+" to be <= 3 (recv:"+j+")"),j=3),U.push(j))):i("Expected octave= in MIDI"+M)}}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:M,params:U}):(x.formatting.midi===void 0&&(x.formatting.midi={}),x.formatting.midi[M]=U)};r.parseFontChangeLine=function(_){_=_.replace(/\$\$/g,"");var x=_.split("$");if(x.length>1&&t.setfont){var S=[];x[0]!==""&&S.push({text:x[0]});for(var M=1;M<x.length;M++)if(x[M][0]==="0")S.push({text:x[M].substring(1).replace(/\x03/g,"$$")});else{var U=parseInt(x[M][0],10);t.setfont[U]?S.push({font:t.setfont[U],text:x[M].substring(1).replace(/\x03/g,"$$")}):S[S.length-1].text+="$"+x[M].replace(/\x03/g,"$$")}return S}return _.replace(/\x03/g,"$$")};var D=["auto","above","below","hidden"];r.addDirective=function(_){var x=n.tokenize(_,0,_.length);if(x.length===0||x[0].type!=="alpha")return null;var S=_.substring(_.indexOf(x[0].token)+x[0].token.length);S=n.stripComment(S);var M=x.shift().token.toLowerCase(),U="",q;switch(M){case"bagpipes":a.formatting.bagpipes=!0;break;case"flatbeams":a.formatting.flatbeams=!0;break;case"jazzchords":a.formatting.jazzchords=!0;break;case"accentAbove":a.formatting.accentAbove=!0;break;case"germanAlphabet":a.formatting.germanAlphabet=!0;break;case"landscape":t.landscape=!0;break;case"papersize":t.papersize=S;break;case"graceslurs":if(x.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(x[0].token==="0"||x[0].token==="false")a.formatting.graceSlurs=!1;else if(x[0].token==="1"||x[0].token==="true")a.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+x[0].token+")";break;case"lineThickness":var j=L(x);if(j.value!==void 0&&(a.formatting.lineThickness=j.value),j.error)return j.error;break;case"stretchlast":var V=L(x);if(V.value!==void 0&&(a.formatting.stretchlast=V.value),V.error)return V.error;break;case"titlecaps":t.titlecaps=!0;break;case"titleleft":a.formatting.titleleft=!0;break;case"measurebox":a.formatting.measurebox=!0;break;case"vocal":return k("vocalPosition",M,x,D);case"dynamic":return k("dynamicPosition",M,x,D);case"gchord":return k("chordPosition",M,x,D);case"ornament":return k("ornamentPosition",M,x,D);case"volume":return k("volumePosition",M,x,D);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 b(M,x);case"voicescale":if(x.length!==1||x[0].type!=="number")return"voicescale requires one float as a parameter";var ne=x.shift();return t.currentVoice&&(t.currentVoice.scale=ne.floatt,s.changeVoiceScale(t.currentVoice.scale)),null;case"voicecolor":if(x.length!==1)return"voicecolor requires one string as a parameter";var Y=x.shift();return t.currentVoice&&(t.currentVoice.color=Y.token,s.changeVoiceColor(t.currentVoice.color)),null;case"vskip":var ce=Math.round(m(M,x));return ce.error?ce.error:(s.addSpacing(ce),null);case"scale":u(M,x);break;case"sep":if(x.length===0)s.addSeparator(14,14,85,{startChar:t.iChar,endChar:t.iChar+5});else{var fe=n.getMeasurement(x);if(fe.used===0)return'Directive "'+M+'" requires 3 numbers: space above, space below, length of line';var pe=fe.value;if(fe=n.getMeasurement(x),fe.used===0)return'Directive "'+M+'" requires 3 numbers: space above, space below, length of line';var K=fe.value;if(fe=n.getMeasurement(x),fe.used===0||x.length!==0)return'Directive "'+M+'" requires 3 numbers: space above, space below, length of line';var he=fe.value;s.addSeparator(pe,K,he,{startChar:t.iChar,endChar:t.iChar+S.length})}break;case"barsperstaff":if(U=g("barsperstaff",M,x),U!==null)return U;break;case"staffnonote":if(x.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(x[0].token==="0")t.staffnonote=!0;else if(x[0].token==="1")t.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+x[0].token+")";break;case"printtempo":if(U=w("printTempo",M,x),U!==null)return U;break;case"partsbox":if(U=w("partsBox",M,x),U!==null)return U;t.partsfont.box=t.partsBox;break;case"freegchord":if(U=w("freegchord",M,x),U!==null)return U;break;case"measurenb":case"barnumbers":if(U=g("barNumbers",M,x),U!==null)return U;break;case"setbarnb":if(x.length!==1||x[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";t.currBarNumber=s.setBarNumberImmediate(x[0].intt);break;case"keywarn":if(x.length!==1||x[0].type!=="number"||x[0].intt!==1&&x[0].intt!==0)return"Directive "+M+" requires 0 or 1 as a parameter.";t[M]=x[0].intt===1;break;case"begintext":var ee="";for(q=n.nextLine();q&&q.indexOf("%%endtext")!==0;){if(e.startsWith(q,"%%")){var be=q.substring(2);be=be.trim()+`
|
|
124
|
-
`,ee+=
|
|
125
|
-
`;q=n.nextLine()}s.addText(ee,{startChar:t.iChar,endChar:t.iChar+ee.length+7});break;case"continueall":t.continueall=!0;break;case"beginps":for(q=n.nextLine();q&&q.indexOf("%%endps")!==0;)n.nextLine();i("Postscript ignored",_,0);break;case"deco":S.length>0&&t.ignoredDecorations.push(S.substring(0,S.indexOf(" "))),i("Decoration redefinition ignored",_,0);break;case"text":var _e=n.translateString(S);s.addText(r.parseFontChangeLine(_e),{startChar:t.iChar,endChar:t.iChar+S.length+7});break;case"center":var Me=n.translateString(S);s.addCentered(r.parseFontChangeLine(Me));break;case"font":break;case"setfont":var Ce=n.tokenize(S,0,S.length);if(Ce.length>=4&&Ce[0].token==="-"&&Ce[1].type==="number"){var We=parseInt(Ce[1].token);We>=1&&We<=9&&(t.setfont||(t.setfont=[]),Ce.shift(),Ce.shift(),t.setfont[We]=p(Ce,t.setfont[We],_,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 v(M,x,_);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return f(M,x,_);case"barlabelfont":case"barnumberfont":case"barnumfont":return v("measurefont",x,_);case"staves":case"score":t.score_is_present=!0;for(var Fe=function(Ut,Pb,Ou,Mu,Ob){(Pb||t.staves.length===0)&&t.staves.push({index:t.staves.length,numVoices:0});var Zt=e.last(t.staves);Ou!==void 0&&Zt.bracket===void 0&&(Zt.bracket=Ou),Mu!==void 0&&Zt.brace===void 0&&(Zt.brace=Mu),Ob&&(Zt.connectBarLines="end"),t.voices[Ut]===void 0&&(t.voices[Ut]={staffNum:Zt.index,index:Zt.numVoices},Zt.numVoices++)},Ke=!1,H=!1,W=!1,B=!1,G=!1,Q=!1,ae=!1,ue,xe=function(){if(ae=!0,ue){var Ut="start";ue.staffNum>0&&(t.staves[ue.staffNum-1].connectBarLines==="start"||t.staves[ue.staffNum-1].connectBarLines==="continue")&&(Ut="continue"),t.staves[ue.staffNum].connectBarLines=Ut}};x.length;){var se=x.shift();switch(se.token){case"(":Ke?i("Can't nest parenthesis in %%score",_,se.start):(Ke=!0,B=!0);break;case")":!Ke||B?i("Unexpected close parenthesis in %%score",_,se.start):Ke=!1;break;case"[":H?i("Can't nest brackets in %%score",_,se.start):(H=!0,G=!0);break;case"]":!H||G?i("Unexpected close bracket in %%score",_,se.start):(H=!1,t.staves[ue.staffNum].bracket="end");break;case"{":W?i("Can't nest braces in %%score",_,se.start):(W=!0,Q=!0);break;case"}":!W||Q?i("Unexpected close brace in %%score",_,se.start):(W=!1,t.staves[ue.staffNum].brace="end");break;case"|":xe();break;default:for(var ve="";(se.type==="alpha"||se.type==="number")&&(ve+=se.token,se.continueId);)se=x.shift();var Le=!Ke||B,Ye=G?"start":H?"continue":void 0,we=Q?"start":W?"continue":void 0;Fe(ve,Le,Ye,we,ae),B=!1,G=!1,Q=!1,ae=!1,ue=t.voices[ve],M==="staves"&&xe();break}}break;case"maxstaves":var Ie=n.getInt(S);Ie.digits===0?i("Expected number of staves in maxstaves"):Ie.value>0&&(a.formatting.maxStaves=Ie.value);break;case"newpage":var nt=n.getInt(S);s.addNewPage(nt.digits===0?-1:nt.value);break;case"abc":var Se=S.split(" ");switch(Se[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var Ct=Se.shift();s.addMetaText(M+Ct,Se.join(" "),{startChar:t.iChar,endChar:t.iChar+S.length+5});break;default:return"Unknown directive: "+M+Se[0]}break;case"header":case"footer":var ct=n.getMeat(S,0,S.length);ct=S.substring(ct.start,ct.end),ct[0]==='"'&&ct[ct.length-1]==='"'&&(ct=ct.substring(1,ct.length-1));var it=ct.split(" "),Rt={};it.length===1?Rt={left:"",center:it[0],right:""}:it.length===2?Rt={left:it[0],center:it[1],right:""}:Rt={left:it[0],center:it[1],right:it[2]},it.length>3&&i("Too many tabs in "+M+": "+it.length+" found.",S,0),s.addMetaTextObj(M,Rt,{startChar:t.iChar,endChar:t.iChar+_.length});break;case"midi":var Lt=n.tokenize(S,0,S.length,!0);Lt.length>0&&Lt[0].token==="="&&Lt.shift(),Lt.length===0?i("Expected midi command",S,0):N(Lt,a,S);break;case"percmap":var Xt=c(S);Xt.error?i(Xt.error,_,8):(a.formatting.percmap||(a.formatting.percmap={}),a.formatting.percmap[Xt.key]=Xt.value);break;case"visualtranspose":var fr=n.getInt(S);fr.digits===0?i("Expected number of half steps in visualTranspose"):t.globalTranspose=fr.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":a.formatting[M]=S;break;default:return"Unknown directive: "+M}return null},r.globalFormatting=function(_){for(var x in _)if(_.hasOwnProperty(x)){var S=""+_[x],M=n.tokenize(S,0,S.length),U;switch(x){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":v(x,M,S);break;case"scale":u(x,M);break;case"partsbox":U=w("partsBox",x,M),U!==null&&i(U),t.partsfont.box=t.partsBox;break;case"freegchord":U=w("freegchord",x,M),U!==null&&i(U);break;case"fontboxpadding":(M.length!==1||M[0].type!=="number")&&i('Directive "'+x+'" requires a number as a parameter.'),a.formatting.fontboxpadding=M[0].floatt;break;case"stafftopmargin":(M.length!==1||M[0].type!=="number")&&i('Directive "'+x+'" requires a number as a parameter.'),a.formatting.stafftopmargin=M[0].floatt;break;case"stretchlast":var q=L(M);if(q.value!==void 0&&(a.formatting.stretchlast=q.value),q.error)return q.error;break;default:i("Formatting directive unrecognized: ",x,0)}}};function L(_){if(_.length===0)return{value:1};if(_.length===1)if(_[0].type==="number"){if(_[0].floatt>=0||_[0].floatt<=1)return{value:_[0].floatt}}else{if(_[0].token==="false")return{value:0};if(_[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+_[0].token+")"}}})(),ta=r,ta}var ra,Cl;function v7(){if(Cl)return ra;Cl=1;var e={};const r=["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 e.pitchIndex=function(n){return r.indexOf(n)},e.noteName=function(n){return r[n]},ra=e,ra}var na,zl;function rb(){if(zl)return na;zl=1;var e=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],r=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],n=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],i=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];function t(a,s,o,l){if(!s||s%12===0)return a;for(;s<0;)s+=12;s>11&&(s=s%12);var d=a.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!d)return a;var p=d[1],v=d[2],f=d[3],u=d[4],h=e.indexOf(p);if(h<0&&(h=r.indexOf(p)),h<0&&(h=n.indexOf(p)),h<0&&(h=i.indexOf(p)),h<0)return a;h+=s,h=h%12,o?l?a=i[h]:a=r[h]:l?a=n[h]:a=e[h];var c=v&&(v.indexOf("dim")>=0||v.indexOf("°")>=0);if(c&&a==="A#"&&(a="Bb"),c&&a==="D#"&&(a="Eb"),c&&a==="A♯"&&(a="B♭"),c&&a==="D♯"&&(a="E♭"),v&&(a+=v),f){var h=e.indexOf(f);h<0&&(h=r.indexOf(f)),h<0&&(h=n.indexOf(f)),h<0&&(h=i.indexOf(f)),a+="/",h>=0?(h+=s,h=h%12,o?l?a+=i[h]:a+=r[h]:l?a+=n[h]:a+=e[h]):a+=f}return u&&(a+=u),a}return na=t,na}var ia,El;function nb(){if(El)return ia;El=1;var e={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}},r=["maj","ion","min","aeo","m","mix","dor","phr","lyd","loc"];function n(l){return r.indexOf(l.toLowerCase())>=0}var i=null;function t(){i={};for(var l=Object.keys(e),d=0;d<l.length;d++){var p=e[l[d]];i[l[d].toLowerCase()]=l[d];for(var v=0;v<p.modes.length;v++){var f=p.modes[v].toLowerCase();i[f]=l[d]}}}function a(l){i||t();var d=l.toLowerCase().match(/([a-g][b#]?)(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)?/);if(!d||!d[2])return l;d=d[1]+d[2];var p=i[d];return p||l}function s(l,d){var p=e[l];if(!p||d==="")return l;var v=d.toLowerCase().match(/^(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)/);if(!v)return l;for(var f=v[1],u=0;u<p.modes.length;u++){var h=p.modes[u],c=h.toLowerCase().indexOf(f);if(c!==-1&&c===h.length-f.length)return h.substring(0,h.length-f.length)}return l}function o(l,d){var p=e[l];if(!p)return l;for(;d<0;)d+=12;for(var v=(p.stepsFromC+d)%12,f=0;f<Object.keys(e).length;f++){var u=Object.keys(e)[f];if(e[u].stepsFromC===v)return u}return l}return ia={relativeMajor:a,relativeMode:s,transposeKey:o,isLegalMode:n},ia}var aa,Nl;function ib(){if(Nl)return aa;Nl=1;var{relativeMajor:e}=nb(),r={acc:"sharp",note:"f"},n={acc:"sharp",note:"c"},i={acc:"sharp",note:"g"},t={acc:"sharp",note:"d"},a={acc:"sharp",note:"A"},s={acc:"sharp",note:"e"},o={acc:"sharp",note:"B"},l={acc:"flat",note:"B"},d={acc:"flat",note:"e"},p={acc:"flat",note:"A"},v={acc:"flat",note:"d"},f={acc:"flat",note:"G"},u={acc:"flat",note:"c"},h={acc:"flat",note:"F"},c={"C#":[r,n,i,t,a,s,o],"F#":[r,n,i,t,a,s],B:[r,n,i,t,a],E:[r,n,i,t],A:[r,n,i],D:[r,n],G:[r],C:[],F:[l],Bb:[l,d],Eb:[l,d,p],Cm:[l,d,p],Ab:[l,d,p,v],Db:[l,d,p,v,f],Gb:[l,d,p,v,f,u],Cb:[l,d,p,v,f,u,h],"A#":[l,d],"B#":[],"D#":[l,d,p],"E#":[l],"G#":[l,d,p,v],none:[]};function m(b){var g=c[e(b)];return g?JSON.parse(JSON.stringify(g)):null}return aa=m,aa}var sa,Al;function ab(){if(Al)return sa;Al=1;var e=v7(),r=rb(),n=ib(),i={},t={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},a=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],s=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];i.keySignature=function(f,u,h,c,m){if(f.clef.type==="perc"||f.clef.type==="none")return{accidentals:n(u),root:h,acc:c};m||(m=0),f.localTransposeVerticalMovement=0,f.localTransposePreferFlats=!1;var b=n(u);if(!b)return f.key;if(f.localTranspose=(f.globalTranspose?f.globalTranspose:0)+m,!f.localTranspose)return{accidentals:b,root:h,acc:c};if(f.globalTransposeOrigKeySig=b,f.localTranspose%12===0)return f.localTransposeVerticalMovement=f.localTranspose/12*7,{accidentals:b,root:h,acc:c};var g=u[0];u[1]==="b"||u[1]==="#"?(g+=u[1],u=u.substr(2)):u=u.substr(1);var w=t[g],k=w!==void 0;k||(w=0,g="C",u="");for(var $=w+f.localTranspose;$<0;)$+=12;$>11&&($=$%12);var O=u[0]==="m"?s[$]:a[$],P=O+u,y=n(P);(y.length===0||y[0].acc==="flat")&&(f.localTransposePreferFlats=!0);var C=P.charCodeAt(0)-g.charCodeAt(0);return f.localTranspose>0?(C<0||C===0&&(g[1]==="#"||P[1]==="b"))&&(C+=7):f.localTranspose<0&&(C>0||C===0&&(g[1]==="b"||P[1]==="#"))&&(C-=7),f.localTranspose>0?f.localTransposeVerticalMovement=C+Math.floor(f.localTranspose/12)*7:f.localTransposeVerticalMovement=C+Math.ceil(f.localTranspose/12)*7,k?{accidentals:y,root:O[0],acc:O.length>1?O[1]:""}:{accidentals:[],root:h,acc:c}},i.chordName=function(f,u){return r(u,f.localTranspose,f.localTransposePreferFlats,f.freegchord)};var o=["c","d","e","f","g","a","b"];function l(f,u,h,c,m){for(var b=o[(f+49)%7],g=0,w=0;w<c.length;w++)c[w].note.toLowerCase()===b&&(g=d[c[w].acc]);for(var k=d[h],$=k-g,O=o[(u+49)%7],P=0,y=0;y<m.accidentals.length;y++)m.accidentals[y].note.toLowerCase()===O&&(P=d[m.accidentals[y].acc]);var C=$+P;return C<-2&&(u--,C+=O==="c"||O==="f"?1:2),C>2&&(u++,C-=O==="b"||O==="e"?1:2),[u,C]}var d={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},p={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},v={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return i.note=function(f,u){if(!(!f.localTranspose||f.clef.type==="perc")){var h=u.pitch;if(f.localTransposeVerticalMovement&&(u.pitch=u.pitch+f.localTransposeVerticalMovement,u.name)){var c=u.accidental?u.name.substring(1):u.name,m=u.accidental?u.name[0]:"",b=e.pitchIndex(c);u.name=m+e.noteName(b+f.localTransposeVerticalMovement)}if(u.accidental){var g=l(h,u.pitch,u.accidental,f.globalTransposeOrigKeySig,f.targetKey);u.pitch=g[0],u.accidental=p[g[1]],u.name&&(u.name=v[g[1]]+u.name.replace(/[_^=]/g,""))}}},sa=i,sa}var oa,Pl;function $u(){if(Pl)return oa;Pl=1;var e=ku(),r=ab(),n={};return(function(){var i,t,a,s;n.initialize=function(u,h,c,m,b){i=u,t=h,a=c,s=b},n.standardKey=function(u,h,c,m){return r.keySignature(a,u,h,c,m)};var o={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},l=function(u,h){var c=o[u],m=c?c.mid:0;return m+h};n.fixClef=function(u){var h=o[u.type];h&&(u.clefPos=h.pitch,u.type=h.clef)},n.deepCopyKey=function(u){var h={accidentals:[],root:u.root,acc:u.acc,mode:u.mode};return u.accidentals.forEach(function(c){h.accidentals.push(Object.assign({},c))}),h};var d={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};n.addPosToKey=function(u,h){var c=u.verticalPos;h.accidentals.forEach(function(m){var b=d[m.note];b=b-c,m.verticalPos=b}),h.impliedNaturals&&h.impliedNaturals.forEach(function(m){var b=d[m.note];b=b-c,m.verticalPos=b}),c<-10?(h.accidentals.forEach(function(m){m.verticalPos-=7,(m.verticalPos>=11||m.verticalPos===10&&m.acc==="flat")&&(m.verticalPos-=7),m.note==="A"&&m.acc==="sharp"&&(m.verticalPos-=7),(m.note==="G"||m.note==="F")&&m.acc==="flat"&&(m.verticalPos-=7)}),h.impliedNaturals&&h.impliedNaturals.forEach(function(m){m.verticalPos-=7,(m.verticalPos>=11||m.verticalPos===10&&m.acc==="flat")&&(m.verticalPos-=7),m.note==="A"&&m.acc==="sharp"&&(m.verticalPos-=7),(m.note==="G"||m.note==="F")&&m.acc==="flat"&&(m.verticalPos-=7)})):c<-4?(h.accidentals.forEach(function(m){m.verticalPos-=7,c===-8&&(m.note==="f"||m.note==="g")&&m.acc==="sharp"&&(m.verticalPos-=7)}),h.impliedNaturals&&h.impliedNaturals.forEach(function(m){m.verticalPos-=7,c===-8&&(m.note==="f"||m.note==="g")&&m.acc==="sharp"&&(m.verticalPos-=7)})):c>=7&&(h.accidentals.forEach(function(m){m.verticalPos+=7}),h.impliedNaturals&&h.impliedNaturals.forEach(function(m){m.verticalPos+=7}))},n.fixKey=function(u,h){var c=Object.assign({},h);return n.addPosToKey(u,c),c};var p=function(u){var h=0,c=u[h++];(c==="^"||c==="_")&&(c=u[h++]);var m=d[c];for(m===void 0&&(m=6);h<u.length;h++)if(u[h]===",")m-=7;else if(u[h]==="'")m+=7;else break;return{mid:m-6,str:u.substring(h)}},v=function(u){for(var h=0;h<u.length;h++)u[h].note==="b"?u[h].note="B":u[h].note==="a"?u[h].note="A":u[h].note==="F"?u[h].note="f":u[h].note==="E"?u[h].note="e":u[h].note==="D"?u[h].note="d":u[h].note==="C"?u[h].note="c":u[h].note==="G"&&u[h].acc==="sharp"?u[h].note="g":u[h].note==="g"&&u[h].acc==="flat"&&(u[h].note="G")};n.parseKey=function(u,h){u.length===0&&(u="none");var c=i.tokenize(u,0,u.length),m={};if(c.length===0)return t("Must pass in key signature.",u,0),m;switch(c[0].token){case"HP":e.addDirective("bagpipes"),a.key={root:"HP",accidentals:[],acc:"",mode:""},m.foundKey=!0,c.shift();break;case"Hp":e.addDirective("bagpipes"),a.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},m.foundKey=!0,c.shift();break;case"none":a.key={root:"none",accidentals:[],acc:"",mode:""},m.foundKey=!0,c.shift();break;default:var b=i.getKeyPitch(c[0].token);if(b.len>0){m.foundKey=!0;var g="",w="";c[0].token.length>1?c[0].token=c[0].token.substring(1):c.shift();var k=b.token;if(c.length>0){var $=i.getSharpFlat(c[0].token);if($.len>0&&(c[0].token.length>1?c[0].token=c[0].token.substring(1):c.shift(),k+=$.token,g=$.token),c.length>0){var O=i.getMode(c[0].token);O.len>0&&(c.shift(),k+=O.token,w=O.token)}if(n.standardKey(k,b.token,g,0)===void 0)return t("Unsupported key signature: "+k,u,0),m}var P=n.deepCopyKey(a.key),y=!h&&a.globalTranspose?-a.globalTranspose:0,C;if(h&&(C=a.globalTransposeOrigKeySig),a.key=n.deepCopyKey(n.standardKey(k,b.token,g,y)),h&&(a.globalTransposeOrigKeySig=C),a.key.mode=w,P&&a.keywarn!==!1){for(var E,z=0;z<a.key.accidentals.length;z++)for(E=0;E<P.accidentals.length;E++)P.accidentals[E].note&&a.key.accidentals[z].note.toLowerCase()===P.accidentals[E].note.toLowerCase()&&(P.accidentals[E].note=null);for(E=0;E<P.accidentals.length;E++)P.accidentals[E].note&&(a.key.impliedNaturals||(a.key.impliedNaturals=[]),a.key.impliedNaturals.push({acc:"natural",note:P.accidentals[E].note}))}}break}if(c.length===0||(c[0].token==="exp"&&c.shift(),c.length===0)||(c[0].token==="oct"&&c.shift(),c.length===0))return m;var A=i.getKeyAccidentals2(c);if(A.warn&&t(A.warn,u,0),A.accs){m.foundKey||(m.foundKey=!0,a.key={root:"none",acc:"",mode:"",accidentals:[]}),v(A.accs);for(var R=0;R<A.accs.length;R++){for(var T=!1,I=0;I<a.key.accidentals.length&&!T;I++)a.key.accidentals[I].note===A.accs[R].note&&(T=!0,a.key.accidentals[I].acc!==A.accs[R].acc&&(a.key.accidentals[I].acc=A.accs[R].acc,a.key.explicitAccidentals||(a.key.explicitAccidentals=[]),a.key.explicitAccidentals.push(A.accs[R])));if(!T&&(a.key.explicitAccidentals||(a.key.explicitAccidentals=[]),a.key.explicitAccidentals.push(A.accs[R]),a.key.accidentals.push(A.accs[R]),a.key.impliedNaturals))for(var N=0;N<a.key.impliedNaturals.length;N++)a.key.impliedNaturals[N].note===A.accs[R].note&&a.key.impliedNaturals.splice(N,1)}}for(var D;c.length>0;)switch(c[0].token){case"m":case"middle":if(c.shift(),c.length===0)return t("Expected = after middle",u,0),m;if(D=c.shift(),D.token!=="="){t("Expected = after middle",u,D.start);break}if(c.length===0)return t("Expected parameter after middle=",u,0),m;var L=i.getPitchFromTokens(c);L.warn&&t(L.warn,u,0),L.position&&(a.clef.verticalPos=L.position-6);break;case"transpose":if(c.shift(),c.length===0)return t("Expected = after transpose",u,0),m;if(D=c.shift(),D.token!=="="){t("Expected = after transpose",u,D.start);break}if(c.length===0)return t("Expected parameter after transpose=",u,0),m;if(c[0].type!=="number"){t("Expected number after transpose",u,c[0].start);break}a.clef.transpose=c[0].intt,c.shift();break;case"stafflines":if(c.shift(),c.length===0)return t("Expected = after stafflines",u,0),m;if(D=c.shift(),D.token!=="="){t("Expected = after stafflines",u,D.start);break}if(c.length===0)return t("Expected parameter after stafflines=",u,0),m;if(c[0].type!=="number"){t("Expected number after stafflines",u,c[0].start);break}a.clef.stafflines=c[0].intt,c.shift();break;case"staffscale":if(c.shift(),c.length===0)return t("Expected = after staffscale",u,0),m;if(D=c.shift(),D.token!=="="){t("Expected = after staffscale",u,D.start);break}if(c.length===0)return t("Expected parameter after staffscale=",u,0),m;if(c[0].type!=="number"){t("Expected number after staffscale",u,c[0].start);break}a.clef.staffscale=c[0].floatt,c.shift();break;case"octave":if(c.shift(),c.length===0)return t("Expected = after octave",u,0),m;if(D=c.shift(),D.token!=="="){t("Expected = after octave",u,D.start);break}if(c.length===0)return t("Expected parameter after octave=",u,0),m;if(c[0].type!=="number"){t("Expected number after octave",u,c[0].start);break}a.octave=c[0].intt,c.shift();break;case"style":if(c.shift(),c.length===0)return t("Expected = after style",u,0),m;if(D=c.shift(),D.token!=="="){t("Expected = after style",u,D.start);break}if(c.length===0)return t("Expected parameter after style=",u,0),m;switch(c[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":a.style=c[0].token,c.shift();break;default:t("error parsing style element: "+c[0].token,u,c[0].start);break}break;case"clef":if(c.shift(),c.length===0)return t("Expected = after clef",u,0),m;if(D=c.shift(),D.token!=="="){t("Expected = after clef",u,D.start);break}if(c.length===0)return t("Expected parameter after clef=",u,0),m;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var _=c.shift();switch(_.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":_.token="alto";break;case"F":_.token="bass";break;case"G":_.token="treble";break;case"c":_.token="alto";break;case"f":_.token="bass";break;case"g":_.token="treble";break;default:t("Expected clef name. Found "+_.token,u,_.start);break}c.length>0&&c[0].type==="number"&&(_.token+=c[0].token,c.shift()),c.length>1&&(c[0].token==="-"||c[0].token==="+"||c[0].token==="^"||c[0].token==="_")&&c[1].token==="8"&&(_.token+=c[0].token+c[1].token,c.shift(),c.shift()),a.clef={type:_.token,verticalPos:l(_.token,0)},a.currentVoice&&a.currentVoice.transpose!==void 0&&(a.clef.transpose=a.currentVoice.transpose),m.foundClef=!0;break;default:t("Unknown parameter: "+c[0].token,u,c[0].start),c.shift()}return m};var f=function(u){var h=a.voices[u];if(!(a.currentVoice&&a.currentVoice.index===h.index&&a.currentVoice.staffNum===h.staffNum))return a.currentVoice=h,s.setCurrentVoice(h.staffNum,h.index,u)};n.parseVoice=function(u,h,c){var m=i.getMeat(u,h,c),b=m.start,g=m.end,w=i.getToken(u,b,g);if(w.length===0){t("Expected a voice id",u,b);return}var k=!1;a.voices[w]===void 0&&(a.voices[w]={},k=!0,a.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",u,b)),b+=w.length,b+=i.eatWhiteSpace(u,b);for(var $={startStaff:k},O=function(L){var _=i.getVoiceToken(u,b,g);_.warn!==void 0?t("Expected value for "+L+" in voice: "+_.warn,u,b):_.err!==void 0?t("Expected value for "+L+" in voice: "+_.err,u,b):_.token.length===0&&u[b]!=='"'?t("Expected value for "+L+" in voice",u,b):$[L]=_.token,b+=_.len},P=function(L,_,x){var S=i.getVoiceToken(u,b,g);S.warn!==void 0?t("Expected value for "+_+" in voice: "+S.warn,u,b):S.err!==void 0?t("Expected value for "+_+" in voice: "+S.err,u,b):S.token.length===0&&u[b]!=='"'?t("Expected value for "+_+" in voice",u,b):(S.token=parseFloat(S.token),a.voices[L][_]=S.token),b+=S.len},y=function(L,_){var x=i.getVoiceToken(u,b,g);if(x.warn!==void 0)t("Expected value for "+L+" in voice: "+x.warn,u,b);else if(x.err!==void 0)t("Expected value for "+L+" in voice: "+x.err,u,b);else if(x.token.length===0&&u[b]!=='"')t("Expected value for "+L+" in voice",u,b);else return x.token;b+=x.len},C=function(L,_){var x={_B:2,_E:9,_b:-10,_e:-3},S=i.getVoiceToken(u,b,g);if(S.warn!==void 0)t("Expected one of (_B, _E, _b, _e) for "+_+" in voice: "+S.warn,u,b);else if(S.token.length===0&&u[b]!=='"')t("Expected one of (_B, _E, _b, _e) for "+_+" in voice",u,b);else{var M=x[S.token];M?a.voices[L][_]=M:t("Expected one of (_B, _E, _b, _e) for "+_+" in voice",u,b)}b+=S.len};b<g;){var E=i.getVoiceToken(u,b,g);if(b+=E.len,E.warn)t("Error parsing voice: "+E.warn,u,b);else{var z=null;switch(E.token){case"clef":case"cl":O("clef");var A=0;$.clef!==void 0&&($.clef=$.clef.replace(/[',]/g,""),$.clef.indexOf("+16")!==-1&&(A+=14,$.clef=$.clef.replace("+16","")),$.verticalPos=l($.clef,A));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 R=0;$.clef=E.token.replace(/[',]/g,""),$.verticalPos=l($.clef,R),a.voices[w].clef=E.token;break;case"staves":case"stave":case"stv":O("staves");break;case"brace":case"brc":O("brace");break;case"bracket":case"brk":O("bracket");break;case"name":case"nm":O("name");break;case"subname":case"sname":case"snm":O("subname");break;case"merge":$.startStaff=!1;break;case"stem":case"stems":z=i.getVoiceToken(u,b,g),z.warn!==void 0?t("Expected value for stems in voice: "+z.warn,u,b):z.err!==void 0?t("Expected value for stems in voice: "+z.err,u,b):z.token==="up"||z.token==="down"?a.voices[w].stem=z.token:t("Expected up or down for voice stem",u,b),b+=z.len;break;case"up":case"down":a.voices[w].stem=E.token;break;case"middle":case"m":O("verticalPos"),$.verticalPos=p($.verticalPos).mid;break;case"gchords":case"gch":a.voices[w].suppressChords=!0,z=i.getVoiceToken(u,b,g),z.token==="0"&&(b=b+z.len);break;case"space":case"spc":O("spacing");break;case"scale":P(w,"scale");break;case"score":C(w,"scoreTranspose");break;case"transpose":P(w,"transpose");break;case"stafflines":P(w,"stafflines");break;case"staffscale":P(w,"staffscale");break;case"octave":P(w,"octave");break;case"volume":P(w,"volume");break;case"cue":var T=y("cue");T==="on"?a.voices[w].scale=.6:a.voices[w].scale=1;break;case"style":z=i.getVoiceToken(u,b,g),z.warn!==void 0?t("Expected value for style in voice: "+z.warn,u,b):z.err!==void 0?t("Expected value for style in voice: "+z.err,u,b):z.token==="normal"||z.token==="harmonic"||z.token==="rhythm"||z.token==="x"||z.token==="triangle"?a.voices[w].style=z.token:t("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",u,b),b+=z.len;break}}b+=i.eatWhiteSpace(u,b)}if(($.startStaff||a.staves.length===0)&&(a.staves.push({index:a.staves.length,meter:a.origMeter}),a.score_is_present||(a.staves[a.staves.length-1].numVoices=0)),a.voices[w].staffNum===void 0){a.voices[w].staffNum=a.staves.length-1;var I=0;for(var N in a.voices)a.voices.hasOwnProperty(N)&&a.voices[N].staffNum===a.voices[w].staffNum&&I++;a.voices[w].index=I-1}var D=a.staves[a.voices[w].staffNum];return a.score_is_present||D.numVoices++,$.clef&&(D.clef={type:$.clef,verticalPos:$.verticalPos}),$.spacing&&(D.spacing_below_offset=$.spacing),$.verticalPos&&(D.verticalPos=$.verticalPos),$.name&&(D.name?D.name.push($.name):D.name=[$.name]),$.subname&&(D.subname?D.subname.push($.subname):D.subname=[$.subname]),f(w)}})(),oa=n,oa}var ca,Ol;function m7(){if(Ol)return ca;Ol=1;var e=Et(),r=ku(),n=$u(),i=function(t,a,s,o,l){this.reset=function(v,f,u,h){n.initialize(v,f,u,h,l),r.initialize(v,f,u,h,l)},this.reset(t,a,s,o),this.setTitle=function(v,f){s.hasMainTitle?l.addSubtitle(v,{startChar:s.iChar,endChar:s.iChar+f+2}):(l.addMetaText("title",v,{startChar:s.iChar,endChar:s.iChar+f+2}),s.hasMainTitle=!0)},this.setMeter=function(v){if(v=t.stripComment(v),v==="C")return s.havent_set_length===!0&&(s.default_length=.125,s.havent_set_length=!1),{type:"common_time"};if(v==="C|")return s.havent_set_length===!0&&(s.default_length=.125,s.havent_set_length=!1),{type:"cut_time"};if(v==="o")return s.havent_set_length===!0&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_perfectum"};if(v==="c")return s.havent_set_length===!0&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_imperfectum"};if(v==="o.")return s.havent_set_length===!0&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if(v==="c.")return s.havent_set_length===!0&&(s.default_length=.125,s.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(v.length===0||v.toLowerCase()==="none")return s.havent_set_length===!0&&(s.default_length=.125,s.havent_set_length=!1),null;var f=t.tokenize(v,0,v.length);try{var u=function(){var w={value:0,num:""},k=f.shift();for(k.token==="("&&(k=f.shift());;){if(k.type!=="number")throw"Expected top number of meter";if(w.value+=parseInt(k.token),w.num+=k.token,f.length===0||f[0].token==="/")return w;if(k=f.shift(),k.token===")"){if(f.length===0||f[0].token==="/")return w;throw"Unexpected paren in meter"}if(k.token!=="."&&k.token!=="+"||(w.num+=k.token,f.length===0))throw"Expected top number of meter";k=f.shift()}return w},h=function(){var w=u();if(f.length===0)return w;var k=f.shift();if(k.token!=="/")throw"Expected slash in meter";if(k=f.shift(),k.type!=="number")throw"Expected bottom number of meter";return w.den=k.token,w.value=w.value/parseInt(w.den),w};if(f.length===0)throw"Expected meter definition in M: line";for(var c={type:"specified",value:[]},m=0;;){var b=h();m+=b.value;var g={num:b.num};if(b.den!==void 0&&(g.den=b.den),c.value.push(g),f.length===0)break}return s.havent_set_length===!0&&(s.default_length=m<.75?.0625:.125,s.havent_set_length=!1),c}catch(w){a(w,v,0)}return null},this.calcTempo=function(v){var f=.25;s.meter&&s.meter.type==="specified"?f=1/parseInt(s.meter.value[0].den):s.origMeter&&s.origMeter.type==="specified"&&(f=1/parseInt(s.origMeter.value[0].den));for(var u=0;u<v.duration;u++)v.duration[u]=f*v.duration[u];return v},this.resolveTempo=function(){s.tempo&&(this.calcTempo(s.tempo),o.metaText.tempo=s.tempo,delete s.tempo)},this.addUserDefinition=function(v,f,u){var h=v.indexOf("=",f);if(h===-1){a("Need an = in a macro definition",v,f);return}var c=e.strip(v.substring(f,h)),m=e.strip(v.substring(h+1));if(c.length!==1){a("Macro definitions can only be one character",v,f);return}var b="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~";if(b.indexOf(c)===-1){a("Macro definitions must be H-Y, h-w, or tilde",v,f);return}if(m.length===0){a("Missing macro definition",v,f);return}s.macros===void 0&&(s.macros={}),s.macros[c]=m},this.setDefaultLength=function(v,f,u){var h=v.substring(f,u).replace(/ /g,""),c=h.split("/");if(c.length===2){var m=parseInt(c[0]),b=parseInt(c[1]);b>0&&(s.default_length=m/b,s.havent_set_length=!1)}else c.length===1&&c[0]==="1"&&(s.default_length=1,s.havent_set_length=!1)};var d={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(v,f,u,h){try{var c=t.tokenize(v,f,u);if(c.length===0)throw"Missing parameter in Q: field";var m={startChar:h+f-2,endChar:h+u},b=!0,g=c.shift();if(g.type==="quote"&&(m.preString=g.token,g=c.shift(),c.length===0))return d[m.preString.toLowerCase()]&&(m.bpm=d[m.preString.toLowerCase()],m.suppressBpm=!0),{type:"immediate",tempo:m};if(g.type==="alpha"&&g.token==="C"){if(c.length===0)throw"Missing tempo after C in Q: field";if(g=c.shift(),g.type==="punct"&&g.token==="="){if(c.length===0)throw"Missing tempo after = in Q: field";if(g=c.shift(),g.type!=="number")throw"Expected number after = in Q: field";m.duration=[1],m.bpm=parseInt(g.token)}else if(g.type==="number"){if(m.duration=[parseInt(g.token)],c.length===0)throw"Missing = after duration in Q: field";if(g=c.shift(),g.type!=="punct"||g.token!=="=")throw"Expected = after duration in Q: field";if(c.length===0)throw"Missing tempo after = in Q: field";if(g=c.shift(),g.type!=="number")throw"Expected number after = in Q: field";m.bpm=parseInt(g.token)}else throw"Expected number or equal after C in Q: field"}else if(g.type==="number"){var w=parseInt(g.token);if(c.length===0||c[0].type==="quote")m.duration=[1],m.bpm=w;else{if(b=!1,g=c.shift(),g.type!=="punct"&&g.token!=="/"||(g=c.shift(),g.type!=="number"))throw"Expected fraction in Q: field";var k=parseInt(g.token);for(m.duration=[w/k];c.length>0&&c[0].token!=="="&&c[0].type!=="quote";){if(g=c.shift(),g.type!=="number"||(w=parseInt(g.token),g=c.shift(),g.type!=="punct"&&g.token!=="/")||(g=c.shift(),g.type!=="number"))throw"Expected fraction in Q: field";k=parseInt(g.token),m.duration.push(w/k)}if(g=c.shift(),g.type!=="punct"&&g.token!=="=")throw"Expected = in Q: field";if(g=c.shift(),g.type!=="number")throw"Expected tempo in Q: field";m.bpm=parseInt(g.token)}}else throw"Unknown value in Q: field";if(c.length!==0&&(g=c.shift(),g.type==="quote"&&(m.postString=g.token,g=c.shift()),c.length!==0))throw"Unexpected string at end of Q: field";return s.printTempo===!1&&(m.suppress=!0),{type:b?"delaySet":"immediate",tempo:m}}catch($){return a($,v,f),{type:"none"}}},this.letter_to_inline_header=function(v,f,u){var h=!1,c=t.eatWhiteSpace(v,f);if(f+=c,v.length>=f+5&&v[f]==="["&&v[f+2]===":"){var m=v.indexOf("]",f),b=s.iChar+f,g=s.iChar+m+1;switch(v.substring(f,f+3)){case"[I:":var w=r.addDirective(v.substring(f+3,m));return w&&a(w,v,f),[m-f+1+c];case"[M:":var k=this.setMeter(v.substring(f+3,m));return l.hasBeginMusic()&&k?l.appendStartingElement("meter",b,g,k):s.meter=k,[m-f+1+c];case"[K:":var $=n.parseKey(v.substring(f+3,m),!0);return $.foundClef&&l.hasBeginMusic()&&l.appendStartingElement("clef",b,g,s.clef),$.foundKey&&l.hasBeginMusic()&&l.appendStartingElement("key",b,g,n.fixKey(s.clef,s.key)),[m-f+1+c];case"[P:":var O=r.parseFontChangeLine(v.substring(f+3,m));return u||o.lines.length<=o.lineNum?s.partForNextLine={title:O,startChar:b,endChar:g}:l.appendElement("part",b,g,{title:O}),[m-f+1+c];case"[L:":return this.setDefaultLength(v,f+3,m),[m-f+1+c];case"[Q:":if(m>0){var P=this.setTempo(v,f+3,m,s.iChar);return P.type==="delaySet"?l.hasBeginMusic()?l.appendElement("tempo",b,g,this.calcTempo(P.tempo)):s.tempoForNextLine=["tempo",b,g,this.calcTempo(P.tempo)]:P.type==="immediate"&&(!u&&l.hasBeginMusic()?l.appendElement("tempo",b,g,P.tempo):s.tempoForNextLine=["tempo",b,g,P.tempo]),[m-f+1+c,v[f+1],v.substring(f+3,m)]}break;case"[V:":if(m>0)return h=n.parseVoice(v,f+3,m),[m-f+1+c,v[f+1],v.substring(f+3,m),h];break;case"[r:":return[m-f+1+c]}}return[0]},this.letter_to_body_header=function(v,f){var u=!1;if(v.length>=f+3)switch(v.substring(f,f+2)){case"I:":var h=r.addDirective(v.substring(f+2));return h&&a(h,v,f),[v.length];case"M:":var c=this.setMeter(v.substring(f+2));return l.hasBeginMusic()&&c&&l.appendStartingElement("meter",s.iChar+f,s.iChar+v.length,c),[v.length];case"K:":var m=n.parseKey(v.substring(f+2),l.hasBeginMusic());return m.foundClef&&l.hasBeginMusic()&&s.keywarn!==!1&&l.appendStartingElement("clef",s.iChar+f,s.iChar+v.length,s.clef),m.foundKey&&l.hasBeginMusic()&&s.keywarn!==!1&&l.appendStartingElement("key",s.iChar+f,s.iChar+v.length,n.fixKey(s.clef,s.key)),[v.length];case"P:":return l.hasBeginMusic()&&l.appendElement("part",s.iChar+f,s.iChar+v.length,{title:v.substring(f+2)}),[v.length];case"L:":return this.setDefaultLength(v,f+2,v.length),[v.length];case"Q:":var b=v.indexOf("",f+2);b===-1&&(b=v.length);var g=this.setTempo(v,f+2,b,s.iChar);return g.type==="delaySet"?l.appendElement("tempo",s.iChar+f,s.iChar+v.length,this.calcTempo(g.tempo)):g.type==="immediate"&&l.appendElement("tempo",s.iChar+f,s.iChar+v.length,g.tempo),[b,v[f],e.strip(v.substring(f+2))];case"V:":return u=n.parseVoice(v,f+2,v.length),[v.length,v[f],e.strip(v.substring(f+2)),u]}return[0]};var p={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(v){var f=p[v[0]],u=v.length-2,h=t.translateString(t.stripComment(v.substring(2)));if(f==="unalignedWords"||f==="notes")l.addMetaTextArray(f,r.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+v.length});else if(f!==void 0)l.addMetaText(f,r.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+v.length});else{var c=s.iChar,m=c+v.length;switch(v[0]){case"H":for(l.addMetaTextArray("history",r.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+v.length}),v=t.peekLine();v&&v[1]!==":";)t.nextLine(),l.addMetaTextArray("history",r.parseFontChangeLine(t.translateString(t.stripComment(v))),{startChar:s.iChar,endChar:s.iChar+v.length}),v=t.peekLine();break;case"K":this.resolveTempo();var b=n.parseKey(v.substring(2),!1);!s.is_in_header&&l.hasBeginMusic()&&s.keywarn!==!1&&(b.foundClef&&l.appendStartingElement("clef",c,m,s.clef),b.foundKey&&l.appendStartingElement("key",c,m,n.fixKey(s.clef,s.key))),s.is_in_header=!1;break;case"L":this.setDefaultLength(v,2,v.length);break;case"M":s.origMeter=s.meter=this.setMeter(v.substring(2));break;case"P":s.is_in_header?l.addMetaText("partOrder",r.parseFontChangeLine(h),{startChar:s.iChar,endChar:s.iChar+v.length}):s.partForNextLine={title:h,startChar:c,endChar:m};break;case"Q":var g=this.setTempo(v,2,v.length,s.iChar);g.type==="delaySet"?s.tempo=g.tempo:g.type==="immediate"&&(o.metaText.tempo?s.tempoForNextLine=["tempo",c,m,g.tempo]:o.metaText.tempo=g.tempo);break;case"T":s.titlecaps&&(h=h.toUpperCase()),this.setTitle(r.parseFontChangeLine(t.theReverser(h)),u);break;case"U":this.addUserDefinition(v,2,v.length);break;case"V":if(n.parseVoice(v,2,v.length),!s.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":a("Ignored header",v,0);break;default:return{regular:!0}}}return{}}};return ca=i,ca}var vt={},Ml;function g7(){return Ml||(Ml=1,vt.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"],vt.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],vt.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],vt.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],vt.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],vt.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",vt.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],vt.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},vt.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},vt.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},vt.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),vt}var ua,Dl;function b7(){if(Dl)return ua;Dl=1;var e=$u(),r=ab(),n,i,t,a,s,o,{legalAccents:l,volumeDecorations:d,dynamicDecorations:p,accentPseudonyms:v,accentDynamicPseudonyms:f,nonDecorations:u,durations:h,pitches:c,rests:m,accMap:b,tripletQ:g}=g7(),w=function(_,x,S,M,U,q){n=_,i=x,t=S,a=M,s=U,o=q,this.lineContinuation=!1},k=function(_,x,S){if(_.inTie[x]===void 0)return!1;var M=_.currentVoice?_.currentVoice.staffNum*100+_.currentVoice.index:0;return!!(_.inTie[x][M]&&(S.pitches!==void 0||S.rest.type!=="spacer"))},$={};w.prototype.parseMusic=function(_){o.resolveTempo(),t.is_in_header=!1;for(var x=0,S=t.iChar;n.isWhiteSpace(_[x])&&x<_.length;)x++;if(!(x===_.length||_[x]==="%")){var M=t.start_new_line;t.continueall===void 0?t.start_new_line=!0:t.start_new_line=!1;var U=0,q=o.letter_to_body_header(_,x);q[0]>0&&(x+=q[0],q[1]==="V"&&this.startNewLine());for(var j=0;x<_.length;){var V=x;if(_[x]==="%")break;var ne=o.letter_to_inline_header(_,x,M);if(ne[0]>0)x+=ne[0],ne[1]==="V"&&(M=!0);else{(!s.hasBeginMusic()||M&&!this.lineContinuation)&&(this.startNewLine(),M=!1);for(var Y;;)if(Y=n.eatWhiteSpace(_,x),Y>0&&(x+=Y),x>0&&_[x-1]===""&&(Y=o.letter_to_body_header(_,x),Y[0]>0&&(Y[1]==="V"&&this.startNewLine(),x=Y[0],t.start_new_line=!1)),Y=A(_,x),Y[0]>0&&(x+=Y[0]),Y=P(_,x),Y[0]>0){$.chord||($.chord=[]);var ce=n.translateString(Y[1]);ce=ce.replace(/;/g,`
|
|
126
|
-
`);for(var
|
|
127
|
-
`+ce);fe===!1&&(Y[2]===null&&Y[3]?$.chord.push({name:ce,rel_position:Y[3]}):$.chord.push({name:ce,position:Y[2]})),x+=Y[0];var K=n.skipWhiteSpace(_.substring(x));K>0&&($.force_end_beam_last=!0),x+=K}else if(u.indexOf(_[x])===-1?Y=z(_,x):Y=[0],Y[0]>0)Y[1]===null?x+1<_.length&&this.startNewLine():Y[1].length>0&&(Y[1].indexOf("style=")===0?$.style=Y[1].substr(6):($.decoration===void 0&&($.decoration=[]),Y[1]==="beambr1"?$.beambr=1:Y[1]==="beambr2"?$.beambr=2:$.decoration.push(Y[1]))),x+=Y[0];else if(Y=y(_,x),Y[0]>0)$.gracenotes=Y[1],x+=Y[0];else break;if(Y=R(_,x),Y[0]>0){j=0,$.gracenotes!==void 0&&($.rest={type:"spacer"},$.duration=.125,t.addFormattingOptions($,a.formatting,"note"),s.appendElement("note",S+x,S+x+Y[0],$),t.measureNotEmpty=!0,$={});var he={type:Y[1]};he.type.length===0?i("Unknown bar type",_,x):(t.inEnding&&he.type!=="bar_thin"&&(he.endEnding=!0,t.inEnding=!1),Y[2]&&(he.startEnding=Y[2],t.inEnding&&(he.endEnding=!0),t.inEnding=!0,Y[1]==="bar_right_repeat"?t.restoreStartEndingHoldOvers():t.duplicateStartEndingHoldOvers()),$.decoration!==void 0&&(he.decoration=$.decoration),$.chord!==void 0&&(he.chord=$.chord),he.startEnding&&t.barFirstEndingNum===void 0?t.barFirstEndingNum=t.currBarNumber:he.startEnding&&he.endEnding&&t.barFirstEndingNum?t.currBarNumber=t.barFirstEndingNum:he.endEnding&&(t.barFirstEndingNum=void 0),he.type!=="bar_invisible"&&t.measureNotEmpty&&L()&&(t.currBarNumber++,t.barNumbers&&t.currBarNumber%t.barNumbers===0&&(he.barNumber=t.currBarNumber)),t.addFormattingOptions($,a.formatting,"bar"),s.appendElement("bar",S+V,S+x+Y[0],he),t.measureNotEmpty=!1,$={}),x+=Y[0]}else if(_[x]==="&")Y=C(_,x),Y[0]>0&&(s.appendElement("overlay",S,S+1,{}),x+=1,j++);else{if(Y=T(_,x),Y.consumed>0&&(Y.startSlur!==void 0&&($.startSlur=Y.startSlur),Y.dottedSlur&&($.dottedSlur=!0),Y.triplet!==void 0&&(U>0?i("Can't nest triplets",_,x):($.startTriplet=Y.triplet,$.tripletMultiplier=Y.tripletQ/Y.triplet,$.tripletR=Y.num_notes,U=Y.num_notes===void 0?Y.triplet:Y.num_notes)),x+=Y.consumed),_[x]==="["){x++;for(var ee=null,be=!1,_e=!1;!_e;){var Me=z(_,x);Me[0]>0&&(x+=Me[0]);var Ce=N(_,x,{},!1);if(Ce!==null&&Ce.pitch!==void 0)Me[0]>0&&Me[1].indexOf("style=")!==0&&($.decoration===void 0&&($.decoration=[]),$.decoration.push(Me[1])),Ce.end_beam&&($.end_beam=!0,delete Ce.end_beam),$.pitches===void 0?($.duration=Ce.duration,$.pitches=[Ce]):$.pitches.push(Ce),delete Ce.duration,Me[0]>0&&Me[1].indexOf("style=")===0&&($.pitches[$.pitches.length-1].style=Me[1].substr(6)),t.inTieChord[$.pitches.length]&&(Ce.endTie=!0,t.inTieChord[$.pitches.length]=void 0),Ce.startTie&&(t.inTieChord[$.pitches.length]=!0),x=Ce.endChar,delete Ce.endChar;else if(_[x]===" ")i("Spaces are not allowed in chords",_,x),x++;else{if(x<_.length&&_[x]==="]"){x++,t.next_note_duration!==0&&($.duration=$.duration*t.next_note_duration,t.next_note_duration=0),k(t,j,$)&&($.pitches.forEach(function(Q){Q.endTie=!0}),O(t,j,!1)),U>0&&!($.rest&&$.rest.type==="spacer")&&(U--,U===0&&($.endTriplet=!0));for(var We=!1;x<_.length&&!We;){switch(_[x]){case" ":case" ":I($);break;case")":$.endSlur===void 0?$.endSlur=1:$.endSlur++;break;case"-":$.pitches.forEach(function(Q){Q.startTie={}}),O(t,j,!0);break;case">":case"<":var Fe=D(_,x);x+=Fe[0]-1,t.next_note_duration=Fe[2],ee?ee=ee*Fe[1]:ee=Fe[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var Ke=n.getFraction(_,x);ee=Ke.value,x=Ke.index;var H=_[x];H===" "&&(be=!0),H==="-"||H===")"||H===" "||H==="<"||H===">"?x--:We=!0;break;case"0":ee=0;break;default:We=!0;break}We||x++}}else i("Expected ']' to end the chords",_,x);$.pitches!==void 0&&(ee!==null&&($.duration=$.duration*ee,be&&I($)),t.addFormattingOptions($,a.formatting,"note"),s.appendElement("note",S+V,S+x,$),t.measureNotEmpty=!0,$={}),_e=!0}}}else{var W={},B=N(_,x,W,!0);if(W.endTie!==void 0&&O(t,j,!0),B!==null){B.pitch!==void 0?($.pitches=[{}],B.accidental!==void 0&&($.pitches[0].accidental=B.accidental),$.pitches[0].pitch=B.pitch,$.pitches[0].name=B.name,(B.midipitch||B.midipitch===0)&&($.pitches[0].midipitch=B.midipitch),B.endSlur!==void 0&&($.pitches[0].endSlur=B.endSlur),B.endTie!==void 0&&($.pitches[0].endTie=B.endTie),B.startSlur!==void 0&&($.pitches[0].startSlur=B.startSlur),$.startSlur!==void 0&&($.pitches[0].startSlur=$.startSlur),$.dottedSlur!==void 0&&($.pitches[0].dottedSlur=!0),B.startTie!==void 0&&($.pitches[0].startTie=B.startTie),$.startTie!==void 0&&($.pitches[0].startTie=$.startTie)):($.rest=B.rest,B.rest.type==="multimeasure"&&L()&&(t.currBarNumber+=B.rest.text-1),B.endSlur!==void 0&&($.endSlur=B.endSlur),B.endTie!==void 0&&($.rest.endTie=B.endTie),B.startSlur!==void 0&&($.startSlur=B.startSlur),B.startTie!==void 0&&($.rest.startTie=B.startTie),$.startTie!==void 0&&($.rest.startTie=$.startTie)),B.chord!==void 0&&($.chord=B.chord),B.duration!==void 0&&($.duration=B.duration),B.decoration!==void 0&&($.decoration=B.decoration),B.graceNotes!==void 0&&($.graceNotes=B.graceNotes),delete $.startSlur,delete $.dottedSlur,k(t,j,$)&&($.pitches!==void 0?$.pitches[0].endTie=!0:$.rest.type!=="spacer"&&($.rest.endTie=!0),O(t,j,!1)),(B.startTie||$.startTie)&&O(t,j,!0),x=B.endChar,U>0&&!(B.rest&&B.rest.type==="spacer")&&(U--,U===0&&($.endTriplet=!0)),B.end_beam&&I($),$.rest&&$.rest.type==="rest"&&$.duration===1&&E(t)<=1&&($.rest.type="whole",$.duration=E(t)),$.duration<1&&h.indexOf($.duration)===-1&&$.duration!==0&&(!$.rest||$.rest.type!=="spacer")&&i("Duration not representable: "+_.substring(V,x),_,x),t.addFormattingOptions($,a.formatting,"note");var G=s.appendElement("note",S+V,S+x,$);G||(this.startNewLine(),s.appendElement("note",S+V,S+x,$)),t.measureNotEmpty=!0,$={}}}x===V&&(_[x]!==" "&&_[x]!=="`"&&i("Unknown character ignored",_,x),x++)}}}this.lineContinuation=_.indexOf("")>=0||q[0]>0,this.lineContinuation||($={})}};var O=function(_,x,S){var M=_.currentVoice?_.currentVoice.staffNum*100+_.currentVoice.index:0;_.inTie[x]===void 0&&(_.inTie[x]=[]),_.inTie[x][M]=S},P=function(_,x){if(_[x]==='"'){var S=n.getBrackettedSubstring(_,x,5);if(S[2]||i("Missing the closing quote while parsing the chord symbol",_,x),S[0]>0&&S[1].length>0&&S[1][0]==="^")S[1]=S[1].substring(1),S[2]="above";else if(S[0]>0&&S[1].length>0&&S[1][0]==="_")S[1]=S[1].substring(1),S[2]="below";else if(S[0]>0&&S[1].length>0&&S[1][0]==="<")S[1]=S[1].substring(1),S[2]="left";else if(S[0]>0&&S[1].length>0&&S[1][0]===">")S[1]=S[1].substring(1),S[2]="right";else if(S[0]>0&&S[1].length>0&&S[1][0]==="@"){S[1]=S[1].substring(1);var M=n.getFloat(S[1]);if(M.digits===0)return i("Missing first position in absolutely positioned annotation.",_,x),S[1]=S[1].replace("@",""),S[2]="above",S;if(S[1]=S[1].substring(M.digits),S[1][0]!==",")return i("Missing comma absolutely positioned annotation.",_,x),S[1]=S[1].replace("@",""),S[2]="above",S;S[1]=S[1].substring(1);var U=n.getFloat(S[1]);if(U.digits===0)return i("Missing second position in absolutely positioned annotation.",_,x),S[1]=S[1].replace("@",""),S[2]="above",S;S[1]=S[1].substring(U.digits);var q=n.skipWhiteSpace(S[1]);S[1]=S[1].substring(q),S[2]=null,S[3]={x:M.value,y:U.value}}else t.freegchord!==!0&&(S[1]=S[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),S[1]=S[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),S[2]="default",S[1]=r.chordName(t,S[1]);return S}return[0,""]},y=function(_,x){if(_[x]==="{"){var S=n.getBrackettedSubstring(_,x,1,"}");S[2]||i("Missing the closing '}' while parsing grace note",_,x),_[x+S[0]]===")"&&(S[0]++,S[1]+=")");for(var M=[],U=0,q=!1;U<S[1].length;){var j=!1;S[1][U]==="/"&&(j=!0,U++);var V=N(S[1],U,{},!1);V!==null?(V.duration=V.duration/(t.default_length*8),j&&(V.acciaccatura=!0),V.rest?i("Rests not allowed as grace notes '"+S[1][U]+"' while parsing grace note",_,x):M.push(V),q&&(V.endTie=!0,q=!1),V.startTie&&(q=!0),U=V.endChar,delete V.endChar,V.end_beam&&(V.endBeam=!0,delete V.end_beam)):(S[1][U]===" "?M.length>0&&(M[M.length-1].endBeam=!0):i("Unknown character '"+S[1][U]+"' while parsing grace note",_,x),U++)}if(M.length)return[S[0],M]}return[0]};function C(_,x){if(_[x]==="&"){for(var S=x;_[x]&&_[x]!==":"&&_[x]!=="|";)x++;return[x-S,_.substring(S+1,x)]}return[0]}function E(_){var x=_.origMeter;return!x||x.type!=="specified"||!x.value||x.value.length===0?1:parseInt(x.value[0].num,10)/parseInt(x.value[0].den,10)}var z=function(_,x){var S=t.macros[_[x]];if(S!==void 0)return(S[0]==="!"||S[0]==="+")&&(S=S.substring(1)),(S[S.length-1]==="!"||S[S.length-1]==="+")&&(S=S.substring(0,S.length-1)),l.includes(S)?[1,S]:d.includes(S)?(t.volumePosition==="hidden"&&(S=""),[1,S]):p.includes(S)?(t.dynamicPosition==="hidden"&&(S=""),[1,S]):(t.ignoredDecorations.includes(S)||i("Unknown macro: "+S,_,x),[1,""]);switch(_[x]){case".":if(_[x+1]==="("||_[x+1]==="-")break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var M=n.getBrackettedSubstring(_,x,5);if(M[1].length>1&&(M[1][0]==="^"||M[1][0]==="_")&&(M[1]=M[1].substring(1)),l.includes(M[1]))return M;if(d.includes(M[1]))return t.volumePosition==="hidden"&&(M[1]=""),M;if(p.includes(M[1]))return t.dynamicPosition==="hidden"&&(M[1]=""),M;var U=v.findIndex(function(q){return M[1]===q[0]});return U>=0?(M[1]=v[U][1],M):(U=f.findIndex(function(q){return M[1]===q[0]}),U>=0?(M[1]=f[U][1],t.dynamicPosition==="hidden"&&(M[1]=""),M):_[x]==="!"&&(M[0]===1||_[x+M[0]-1]!=="!")?[1,null]:(i("Unknown decoration: "+M[1],_,x),M[1]="",M));case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"];case"t":return[1,"trillh"]}return[0,0]},A=function(_,x){for(var S=x;n.isWhiteSpace(_[x]);)x++;return[x-S]},R=function(_,x){var S=n.getBarLine(_,x);if(S.len===0)return[0,""];if(S.warn)return i(S.warn,_,x),[S.len,""];for(var M=0;M<_.length&&_[x+S.len+M]===" ";M++);var U=S.len;if(_[x+S.len+M]==="["&&(S.len+=M+1),_[x+S.len]==='"'&&_[x+S.len-1]==="["){var q=n.getBrackettedSubstring(_,x+S.len,5);return[S.len+q[0],S.token,q[1]]}var j=n.getTokenOf(_.substring(x+S.len),"1234567890-,");return j.len===0||j.token[0]==="-"?[U,S.token]:[S.len+j.len,S.token,j.token]},T=function(_,x){var S={},M=x;for(_[x]==="."&&_[x+1]==="("&&(S.dottedSlur=!0,x++);_[x]==="("||n.isWhiteSpace(_[x]);)_[x]==="("&&(x+1<_.length&&_[x+1]>="2"&&_[x+1]<="9"?(S.triplet!==void 0?i("Can't nest triplets",_,x):(S.triplet=_[x+1]-"0",S.tripletQ=g[S.triplet],S.num_notes=S.triplet,x+2<_.length&&_[x+2]===":"&&(x+3<_.length&&_[x+3]===":"?x+4<_.length&&_[x+4]>="1"&&_[x+4]<="9"?(S.num_notes=_[x+4]-"0",x+=3):i("expected number after the two colons after the triplet to mark the duration",_,x):x+3<_.length&&_[x+3]>="1"&&_[x+3]<="9"?(S.tripletQ=_[x+3]-"0",x+4<_.length&&_[x+4]===":"?x+5<_.length&&_[x+5]>="1"&&_[x+5]<="9"&&(S.num_notes=_[x+5]-"0",x+=4):x+=2):i("expected number after the triplet to mark the duration",_,x))),x++):S.startSlur===void 0?S.startSlur=1:S.startSlur++),x++;return S.consumed=x-M,S};w.prototype.startNewLine=function(){var _={startChar:-1,endChar:-1};t.partForNextLine.title&&(_.part=t.partForNextLine),_.clef=t.currentVoice&&t.staves[t.currentVoice.staffNum].clef!==void 0?Object.assign({},t.staves[t.currentVoice.staffNum].clef):Object.assign({},t.clef);var x=t.currentVoice?t.currentVoice.scoreTranspose:0;if(_.key=e.standardKey(t.key.root+t.key.acc+t.key.mode,t.key.root,t.key.acc,x),_.key.mode=t.key.mode,t.key.impliedNaturals&&(_.key.impliedNaturals=t.key.impliedNaturals),t.key.explicitAccidentals)for(var S=0;S<t.key.explicitAccidentals.length;S++){for(var M=!1,U=0;U<_.key.accidentals.length;U++)_.key.accidentals[U].note===t.key.explicitAccidentals[S].note&&(_.key.accidentals[U].acc=t.key.explicitAccidentals[S].acc,M=!0);M||_.key.accidentals.push(t.key.explicitAccidentals[S])}if(t.targetKey=_.key,_.key.explicitAccidentals&&delete _.key.explicitAccidentals,e.addPosToKey(_.clef,_.key),t.meter!==null?(t.currentVoice?(t.staves.forEach(function(ne){ne.meter=t.meter}),_.meter=t.staves[t.currentVoice.staffNum].meter,t.staves[t.currentVoice.staffNum].meter=null):_.meter=t.meter,t.meter=null):t.currentVoice&&t.staves[t.currentVoice.staffNum].meter&&(_.meter=t.staves[t.currentVoice.staffNum].meter,t.staves[t.currentVoice.staffNum].meter=null),t.currentVoice&&t.currentVoice.name&&(_.name=t.currentVoice.name),t.vocalfont&&(_.vocalfont=t.vocalfont),t.tripletfont&&(_.tripletfont=t.tripletfont),t.gchordfont&&(_.gchordfont=t.gchordfont),t.style&&(_.style=t.style),t.currentVoice){var q=t.staves[t.currentVoice.staffNum];q.brace&&(_.brace=q.brace),q.bracket&&(_.bracket=q.bracket),q.connectBarLines&&(_.connectBarLines=q.connectBarLines),q.name&&(_.name=q.name[t.currentVoice.index]),q.subname&&(_.subname=q.subname[t.currentVoice.index]),t.currentVoice.stem&&(_.stem=t.currentVoice.stem),t.currentVoice.stafflines&&(_.stafflines=t.currentVoice.stafflines),t.currentVoice.staffscale&&(_.staffscale=t.currentVoice.staffscale),t.currentVoice.scale&&(_.scale=t.currentVoice.scale),t.currentVoice.color&&(_.color=t.currentVoice.color),t.currentVoice.style&&(_.style=t.currentVoice.style),t.currentVoice.transpose&&(_.clef.transpose=t.currentVoice.transpose),_.currentVoice=t.currentVoice;for(var j=Object.keys(t.voices),V=0;V<j.length;V++)_.currentVoice.staffNum===t.voices[j[V]].staffNum&&_.currentVoice.index===t.voices[j[V]].index&&(_.currentVoiceName=j[V])}t.barNumbers===0&&L()&&t.currBarNumber!==1&&(_.barNumber=t.currBarNumber),s.startNewLine(_),t.key.impliedNaturals&&delete t.key.impliedNaturals,t.partForNextLine={},t.tempoForNextLine.length===4&&s.appendElement(t.tempoForNextLine[0],t.tempoForNextLine[1],t.tempoForNextLine[2],t.tempoForNextLine[3]),t.tempoForNextLine=[]};var I=function(_){return _.duration!==void 0&&_.duration<.25&&(_.end_beam=!0),_},N=function(_,x,S,M){var U=function(pe){return pe==="octave"||pe==="duration"||pe==="Zduration"||pe==="broken_rhythm"||pe==="end_slur"},q;_[x]==="."&&_[x+1]==="-"&&(q=!0,x++);for(var j="startSlur",V=!1;;){switch(_[x]){case"(":if(j==="startSlur")S.startSlur===void 0?S.startSlur=1:S.startSlur++;else return U(j)?(S.endChar=x,S):null;break;case")":if(U(j))S.endSlur===void 0?S.endSlur=1:S.endSlur++;else return null;break;case"^":if(j==="startSlur")S.accidental="sharp",j="sharp2";else if(j==="sharp2")S.accidental="dblsharp",j="pitch";else return U(j)?(S.endChar=x,S):null;break;case"_":if(j==="startSlur")S.accidental="flat",j="flat2";else if(j==="flat2")S.accidental="dblflat",j="pitch";else return U(j)?(S.endChar=x,S):null;break;case"=":if(j==="startSlur")S.accidental="natural",j="pitch";else return U(j)?(S.endChar=x,S):null;break;case"A":case"B":case"C":case"D":case"E":case"F":case"G":case"a":case"b":case"c":case"d":case"e":case"f":case"g":if(j==="startSlur"||j==="sharp2"||j==="flat2"||j==="pitch"){if(S.pitch=c[_[x]],S.pitch+=7*(t.currentVoice&&t.currentVoice.octave!==void 0?t.currentVoice.octave:t.octave),S.name=_[x],S.accidental&&(S.name=b[S.accidental]+S.name),r.note(t,S),j="octave",M&&t.next_note_duration!==0?(S.duration=t.default_length*t.next_note_duration,t.next_note_duration=0,V=!0):S.duration=t.default_length,t.clef&&t.clef.type==="perc"||t.currentVoice&&t.currentVoice.clef==="perc"){var ne=_[x];S.accidental&&(ne=b[S.accidental]+ne),a.formatting&&a.formatting.midi&&a.formatting.midi.drummap&&(S.midipitch=a.formatting.midi.drummap[ne])}}else return U(j)?(S.endChar=x,S):null;break;case",":if(j==="octave")S.pitch-=7,S.name+=",";else return U(j)?(S.endChar=x,S):null;break;case"'":if(j==="octave")S.pitch+=7,S.name+="'";else return U(j)?(S.endChar=x,S):null;break;case"x":case"X":case"y":case"z":case"Z":if(j==="startSlur")S.rest={type:m[_[x]]},delete S.accidental,delete S.startSlur,delete S.startTie,delete S.endSlur,delete S.endTie,delete S.end_beam,delete S.grace_notes,S.rest.type.indexOf("multimeasure")>=0?(S.duration=a.getBarLength(),S.rest.text=1,j="Zduration"):(M&&t.next_note_duration!==0?(S.duration=t.default_length*t.next_note_duration,t.next_note_duration=0,V=!0):S.duration=t.default_length,j="duration");else return U(j)?(S.endChar=x,S):null;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if(j==="octave"||j==="duration"){var Y=n.getFraction(_,x);for(S.duration=S.duration*Y.value,S.endChar=Y.index;Y.index<_.length&&(n.isWhiteSpace(_[Y.index])||_[Y.index]==="-");)_[Y.index]==="-"?S.startTie={}:S=I(S),Y.index++;x=Y.index-1,j="broken_rhythm"}else if(j==="sharp2")S.accidental="quartersharp",j="pitch";else if(j==="flat2")S.accidental="quarterflat",j="pitch";else if(j==="Zduration"){var ce=n.getNumber(_,x);return S.duration=ce.num*a.getBarLength(),S.rest.text=ce.num,S.endChar=ce.index,S}else return null;break;case"-":if(j==="startSlur")s.addTieToLastNote(q),S.endTie=!0;else if(j==="octave"||j==="duration"||j==="end_slur")if(S.startTie={},!V&&M)j="broken_rhythm";else return n.isWhiteSpace(_[x+1])&&I(S),S.endChar=x+1,S;else return j==="broken_rhythm"?(S.endChar=x,S):null;break;case" ":case" ":if(U(j)){S.end_beam=!0,q=!1;do _[x]==="."&&_[x+1]==="-"&&(q=!0,x++),_[x]==="-"&&(S.startTie={},q&&(S.startTie.style="dotted")),x++;while(x<_.length&&(n.isWhiteSpace(_[x])||_[x]==="-")||_[x]==="."&&_[x+1]==="-");if(S.endChar=x,!V&&M&&(_[x]==="<"||_[x]===">"))x--,j="broken_rhythm";else return S}else return null;break;case">":case"<":if(U(j))if(M){var fe=D(_,x);x+=fe[0]-1,t.next_note_duration=fe[2],S.duration=fe[1]*S.duration,j="end_slur"}else return S.endChar=x,S;else return null;break;default:return U(j)?(S.endChar=x,S):null}if(x++,x===_.length)return U(j)?(S.endChar=x,S):null}return null},D=function(_,x){switch(_[x]){case">":return x<_.length-2&&_[x+1]===">"&&_[x+2]===">"?[3,1.875,.125]:x<_.length-1&&_[x+1]===">"?[2,1.75,.25]:[1,1.5,.5];case"<":return x<_.length-2&&_[x+1]==="<"&&_[x+2]==="<"?[3,.125,1.875]:x<_.length-1&&_[x+1]==="<"?[2,.25,1.75]:[1,.5,1.5]}return null};function L(){return t.currentVoice===void 0||t.currentVoice.staffNum===0&&t.currentVoice.index===0}return ua=w,ua}var la,Rl;function y7(){if(Rl)return la;Rl=1;var e=Et(),r=function(n,i){this.lineIndex=0,this.lines=n,this.multilineVars=i,this.skipWhiteSpace=function(u){for(var h=0;h<u.length;h++)if(!this.isWhiteSpace(u[h]))return h;return u.length};var t=function(u,h){return h>=u.length};this.eatWhiteSpace=function(u,h){for(var c=h;c<u.length;c++)if(!this.isWhiteSpace(u[c]))return c-h;return c-h},this.getKeyPitch=function(u){var h=this.skipWhiteSpace(u);if(t(u,h))return{len:0};switch(u[h]){case"A":return{len:h+1,token:"A"};case"B":return{len:h+1,token:"B"};case"C":return{len:h+1,token:"C"};case"D":return{len:h+1,token:"D"};case"E":return{len:h+1,token:"E"};case"F":return{len:h+1,token:"F"};case"G":return{len:h+1,token:"G"}}return{len:0}},this.getSharpFlat=function(u){if(u==="bass")return{len:0};switch(u[0]){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(u){var h=function(b,g){for(;g<b.length&&(b[g]>="a"&&b[g]<="z"||b[g]>="A"&&b[g]<="Z");)g++;return g},c=this.skipWhiteSpace(u);if(t(u,c))return{len:0};var m=u.substring(c,c+3).toLowerCase();switch((m.length>1&&m[1]===" "||m[1]==="^"||m[1]==="_"||m[1]==="=")&&(m=m[0]),m){case"mix":return{len:h(u,c),token:"Mix"};case"dor":return{len:h(u,c),token:"Dor"};case"phr":return{len:h(u,c),token:"Phr"};case"lyd":return{len:h(u,c),token:"Lyd"};case"loc":return{len:h(u,c),token:"Loc"};case"aeo":return{len:h(u,c),token:"m"};case"maj":return{len:h(u,c),token:""};case"ion":return{len:h(u,c),token:""};case"min":return{len:h(u,c),token:"m"};case"m":return{len:h(u,c),token:"m"}}return{len:0}},this.getClef=function(u,h){var c=u,m=this.skipWhiteSpace(u);if(t(u,m))return{len:0};var b=!1,g=u.substring(m);if(e.startsWith(g,"clef=")&&(b=!0,g=g.substring(5),m+=5),g.length===0&&b)return{len:m+5,warn:"No clef specified: "+c};var w=this.skipWhiteSpace(g);if(t(g,w))return{len:0};w>0&&(m+=w,g=g.substring(w));var k=null;if(e.startsWith(g,"treble"))k="treble";else if(e.startsWith(g,"bass3"))k="bass3";else if(e.startsWith(g,"bass"))k="bass";else if(e.startsWith(g,"tenor"))k="tenor";else if(e.startsWith(g,"alto2"))k="alto2";else if(e.startsWith(g,"alto1"))k="alto1";else if(e.startsWith(g,"alto"))k="alto";else if(!h&&b&&e.startsWith(g,"none"))k="none";else if(e.startsWith(g,"perc"))k="perc";else if(!h&&b&&e.startsWith(g,"C"))k="tenor";else if(!h&&b&&e.startsWith(g,"F"))k="bass";else if(!h&&b&&e.startsWith(g,"G"))k="treble";else return{len:m+5,warn:"Unknown clef specified: "+c};return g=g.substring(k.length),w=this.isMatch(g,"+8"),w>0?k+="+8":(w=this.isMatch(g,"-8"),w>0&&(k+="-8")),{len:m+k.length,token:k,explicit:b}},this.getBarLine=function(u,h){switch(u[h]){case"]":switch(++h,u[h]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++h,u[h]>="1"&&u[h]<="9"||u[h]==='"'?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}case":":switch(++h,u[h]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++h,u[h]){case"]":switch(++h,u[h]){case"|":return++h,u[h]===":"?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}case"|":return++h,u[h]===":"?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}default:return{len:1,warn:"Unknown bar symbol"}}case"[":if(++h,u[h]==="|")switch(++h,u[h]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}else return u[h]>="1"&&u[h]<="9"||u[h]==='"'?{len:1,token:"bar_invisible"}:{len:0};case"|":switch(++h,u[h]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++h,u[h]===":"?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var c=0;u[h+c]===":";)c++;return{len:1+c,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(u,h){for(var c=0;c<u.length;c++)if(h.indexOf(u[c])<0)return{len:c,token:u.substring(0,c)};return{len:c,token:u}},this.getToken=function(u,h,c){for(var m=h;m<c&&!this.isWhiteSpace(u[m]);)m++;return u.substring(h,m)},this.isMatch=function(u,h){var c=this.skipWhiteSpace(u);return t(u,c)?0:e.startsWith(u.substring(c),h)?c+h.length:0},this.getPitchFromTokens=function(u){var h={},c={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};if(h.position=c[u[0].token],h.position===void 0)return{warn:"Pitch expected. Found: "+u[0].token};for(u.shift();u.length;)switch(u[0].token){case",":h.position-=7,u.shift();break;case"'":h.position+=7,u.shift();break;default:return h}return h},this.getKeyAccidentals2=function(u){for(var h;u.length>0;){var c;if(u[0].token==="^"){if(c="sharp",u.shift(),u.length===0)return{accs:h,warn:"Expected note name after "+c};switch(u[0].token){case"^":c="dblsharp",u.shift();break;case"/":c="quartersharp",u.shift();break}}else if(u[0].token==="=")c="natural",u.shift();else if(u[0].token==="_"){if(c="flat",u.shift(),u.length===0)return{accs:h,warn:"Expected note name after "+c};switch(u[0].token){case"_":c="dblflat",u.shift();break;case"/":c="quarterflat",u.shift();break}}else return{accs:h};if(u.length===0)return{accs:h,warn:"Expected note name after "+c};switch(u[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":h===void 0&&(h=[]),h.push({acc:c,note:u[0].token[0]}),u[0].token.length===1?u.shift():u[0].token=u[0].token.substring(1);break;default:return{accs:h,warn:"Expected note name after "+c+" Found: "+u[0].token}}}return{accs:h}},this.getKeyAccidental=function(u){var h={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},c=this.skipWhiteSpace(u);if(t(u,c))return{len:0};var m=null;switch(u[c]){case"^":case"_":case"=":m=u[c];break;default:return{len:0}}if(c++,t(u,c))return{len:1,warn:"Expected note name after accidental"};switch(u[c]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:c+1,token:{acc:h[m],note:u[c]}};case"^":case"_":case"/":if(m+=u[c],c++,t(u,c))return{len:2,warn:"Expected note name after accidental"};switch(u[c]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:c+1,token:{acc:h[m],note:u[c]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(u){return u===" "||u===" "||u===""},this.getMeat=function(u,h,c){var m=u.indexOf("%",h);for(m>=0&&m<c&&(c=m);h<c&&(u[h]===" "||u[h]===" "||u[h]==="");)h++;for(;h<c&&(u[c-1]===" "||u[c-1]===" "||u[c-1]==="");)c--;return{start:h,end:c}};var a=function(u){return u>="A"&&u<="Z"||u>="a"&&u<="z"},s=function(u){return u>="0"&&u<="9"};this.tokenize=function(u,h,c,m){var b=this.getMeat(u,h,c);h=b.start,c=b.end;for(var g=[],w;h<c;){if(u[h]==='"'){for(w=h+1;w<c&&u[w]!=='"';)w++;g.push({type:"quote",token:u.substring(h+1,w),start:h+1,end:w}),w++}else if(a(u[h])){if(w=h+1,m)for(;w<c&&!this.isWhiteSpace(u[w]);)w++;else for(;w<c&&a(u[w]);)w++;g.push({type:"alpha",token:u.substring(h,w),continueId:s(u[w]),start:h,end:w}),h=w+1}else if(u[h]==="."&&s(u[w+1])){w=h+1;for(var k=null,$=null;w<c&&s(u[w]);)w++;$=parseFloat(u.substring(h,w)),g.push({type:"number",token:u.substring(h,w),intt:k,floatt:$,continueId:a(u[w]),start:h,end:w}),h=w+1}else if(s(u[h])||u[h]==="-"&&s(u[w+1])){w=h+1;for(var O=null,P=null;w<c&&s(u[w]);)w++;if(u[w]==="."&&s(u[w+1]))for(w++;w<c&&s(u[w]);)w++;else O=parseInt(u.substring(h,w));P=parseFloat(u.substring(h,w)),g.push({type:"number",token:u.substring(h,w),intt:O,floatt:P,continueId:a(u[w]),start:h,end:w}),h=w+1}else u[h]===" "||u[h]===" "||g.push({type:"punct",token:u[h],start:h,end:h+1}),w=h+1;h=w}return g},this.getVoiceToken=function(u,h,c){for(var m=h;m<c&&this.isWhiteSpace(u[m])||u[m]==="=";)m++;if(u[m]==='"'){var b=u.indexOf('"',m+1);return b===-1||b>=c?{len:1,err:"Missing close quote"}:{len:b-h+1,token:this.translateString(u.substring(m+1,b))}}else{for(var g=m;g<c&&!this.isWhiteSpace(u[g])&&u[g]!=="=";)g++;return{len:g-h+1,token:u.substring(m,g)}}};var o={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å",aa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å",AA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~N":"Ñ","~n":"ñ","=s":"š",vs:"š",DH:"Ð",dh:"ð",HO:"Ő",Ho:"ő",HU:"Ű",Hu:"ű","'Y":"Ý","'y":"ý","^Y":"Ŷ","^y":"ŷ",'"Y':"Ÿ",'"y':"ÿ",vS:"Š",vZ:"Ž",vz:"ž"},l={"#":"♯",b:"♭","=":"♮"},d={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:" ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};this.translateString=function(u){var h=u.split("\\");if(h.length===1)return u;var c=null;return h.forEach(function(m){if(c===null)c=m;else{var b=o[m.substring(0,2)];b!==void 0?c+=b+m.substring(2):(b=d[m.substring(0,3)],b!==void 0?c+=b+m.substring(3):(b=l[m.substring(0,1)],b!==void 0?c+=b+m.substring(1):c+="\\"+m))}}),c},this.getNumber=function(u,h){for(var c=0;h<u.length;)switch(u[h]){case"0":c=c*10,h++;break;case"1":c=c*10+1,h++;break;case"2":c=c*10+2,h++;break;case"3":c=c*10+3,h++;break;case"4":c=c*10+4,h++;break;case"5":c=c*10+5,h++;break;case"6":c=c*10+6,h++;break;case"7":c=c*10+7,h++;break;case"8":c=c*10+8,h++;break;case"9":c=c*10+9,h++;break;default:return{num:c,index:h}}return{num:c,index:h}},this.getFraction=function(u,h){var c=1,m=1;if(u[h]!=="/"){var b=this.getNumber(u,h);c=b.num,h=b.index}if(u[h]==="/")if(h++,u[h]==="/"){for(var g=.5;u[h++]==="/";)g=g/2;return{value:c*g,index:h-1}}else{var w=h,k=this.getNumber(u,h);k.num===0&&w===h&&(k.num=2),k.num!==0&&(m=k.num),h=k.index}return{value:c/m,index:h}};function p(u){const c=/^(\d+)\./.exec(u);return c?c[1]:null}var v=[{match:/,\s*The$/,replace:"The "},{match:/,\s*the$/,replace:"the "},{match:/,\s*A$/,replace:"A "},{match:/,\s*a$/,replace:"a "},{match:/,\s*An$/,replace:"An "},{match:/,\s*an$/,replace:"an "},{match:/,\s*Da$/,replace:"Da "},{match:/,\s*La$/,replace:"La "},{match:/,\s*Le$/,replace:"Le "},{match:/,\s*Les$/,replace:"Les "},{match:/,\s*Ye$/,replace:"Ye "}];this.theReverser=function(u){for(var h=0;h<v.length;h++){var c=v[h],m=u.match(c.match);if(m){var b=p(u);b&&(u=u.replace(b+".",""),u=u.trim());var g=m[0].length,w=c.replace+u.substring(0,u.length-g);return b&&(w=b+". "+w),w}}return u},this.stripComment=function(u){var h=u.indexOf("%");return h>=0?e.strip(u.substring(0,h)):e.strip(u)},this.getInt=function(u){var h=parseInt(u);if(isNaN(h))return{digits:0};var c=""+h,m=u.indexOf(c);return{value:h,digits:m+c.length}},this.getFloat=function(u){var h=parseFloat(u);if(isNaN(h))return{digits:0};var c=""+h,m=u.indexOf(c);return{value:h,digits:m+c.length}},this.getMeasurement=function(u){if(u.length===0)return{used:0};var h=1,c="";if(u[0].token==="-")u.shift(),c="-",h++;else if(u[0].type!=="number")return{used:0};if(c+=u.shift().token,u.length===0)return{used:1,value:parseInt(c)};var m=u.shift();if(m.token==="."){if(h++,u.length===0)return{used:h,value:parseInt(c)};if(u[0].type==="number"&&(m=u.shift(),c=c+"."+m.token,h++,u.length===0))return{used:h,value:parseFloat(c)};m=u.shift()}switch(m.token){case"pt":return{used:h+1,value:parseFloat(c)};case"px":return{used:h+1,value:parseFloat(c)};case"cm":return{used:h+1,value:parseFloat(c)/2.54*72};case"in":return{used:h+1,value:parseFloat(c)*72};default:return u.unshift(m),{used:h,value:parseFloat(c)}}};var f=function(u){return u=u.replace(/\\n/g,`
|
|
128
|
-
`),u=u.replace(/\\"/g,'"'),u};this.getBrackettedSubstring=function(u,h,c,m){for(var b=m||u[h],g=h+1,w=!1;g<u.length&&(w||u[g]!==b);)w=u[g]==="\\",++g;return u[g]===b?[g-h+1,f(u.substring(h+1,g)),!0]:(g=h+c,g>u.length-1&&(g=u.length-1),[g-h+1,f(u.substring(h+1,g)),!1])}};return r.prototype.peekLine=function(){return this.lines[this.lineIndex]},r.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex<this.lines.length){var n=this.lines[this.lineIndex];return this.lineIndex++,n}return null},la=r,la}var fa,Ll;function sb(){if(Ll)return fa;Ll=1;function e(p,v,f){if(!(!v||p.lines.length===0)){var u=p.deline({lineBreaks:!1}),h=n(u,v);p.lines=r(u,h,f),p.lineBreaks=h}}function r(p,v,f){for(var u=[],h=[],c=[],m=1,b=0;b<v.length;b++){var g=v[b];if(p[g.ogLine].staff){var w=p[g.ogLine].staff[g.staff];if(u[g.line]||(u[g.line]={staff:[]}),!u[g.line].staff[g.staff]){u[g.line].staff[g.staff]={voices:[]},f!==void 0&&g.staff===0&&g.line>0&&(u[g.line].staff[g.staff].barNumber=m);for(var k=Object.keys(w),$=0;$<k.length;$++){var O=k[$]==="voices";k[$]==="meter"&&g.line!==0&&(O=!0),O||(u[g.line].staff[g.staff][k[$]]=w[k[$]])}h[g.staff]&&(u[g.line].staff[g.staff].key=h[g.staff])}u[g.line].staff[g.staff].voices[g.voice]||(u[g.line].staff[g.staff].voices[g.voice]=[]),u[g.line].staff[g.staff].voices[g.voice]=p[g.ogLine].staff[g.staff].voices[g.voice].slice(g.start,g.end+1),c[g.staff*10+g.voice]&&u[g.line].staff[g.staff].voices[g.voice].unshift({el_type:"stem",direction:c[g.staff*10+g.voice].direction});for(var P=u[g.line].staff[g.staff].voices[g.voice],y=P.length-1;y>=0;y--)if(P[y].el_type==="key"){h[g.staff]={root:P[y].root,acc:P[y].acc,mode:P[y].mode,accidentals:P[y].accidentals.filter(function(E){return E.acc!=="natural"})};break}for(y=P.length-1;y>=0;y--)if(P[y].el_type==="stem"){c[g.staff*10+g.voice]={direction:P[y].direction};break}if(f!==void 0&&g.staff===0&&g.voice===0)for(y=0;y<P.length;y++)P[y].el_type==="bar"&&(m++,y===P.length-1?delete P[y].barNumber:P[y].barNumber=m)}else u[g.line]=p[g.ogLine]}for(var C=0;C<u.length;C++)u[C].staff&&(u[C].staff=u[C].staff.filter(function(E){return E!=null}));return u}function n(p,v){for(var f=[],u=0,h=0,c=0,m=0;m<p.length;m++){var b=p[m];if(b.staff){var g=h,w=v[u];u++;for(var k=0;k<b.staff.length;k++)for(var $=b.staff[k],O=0;O<$.voices.length;O++){c=g;for(var P=0,y=0,C=$.voices[O],E=0,z=0;z<C.length;z++){var A=C[z];A.el_type==="bar"&&(w[y]===P&&(f.push({ogLine:m,line:c,staff:k,voice:O,start:E,end:z}),E=z+1,c++,h=Math.max(h,c),y++),P++)}f.push({ogLine:m,line:c,staff:k,voice:O,start:E,end:C.length}),c++,h=Math.max(h,c)}}else f.push({ogLine:m,line:c}),c++,h=Math.max(h,c)}return f}function i(p,v){for(var f=[],u=[],h=0,c=0;c<p.length;c++){var m=p[c],b=h+m;if(b<v)h=b;else{var g=v-h,w=b-v;g<w&&h>0?(f.push(c-1),u.push(Math.round(h-m)),h=m):c<p.length-1&&(f.push(c),u.push(Math.round(h)),h=0)}}return u.push(Math.round(h)),{lineBreaks:f,totals:u}}function t(p){for(var v=[],f=0;f<p.length;f++)v.push(p[f]);return v}function a(p,v,f,u,h,c,m,b,g,w,k){for(var $=w;$<p.length;$++){var O=p[$];f+=O,u+=O;var P=Math.abs(f-v[b]),y=Math.abs(P-c)<v[0]/10;if(y)if(P<c){var C=t(h),E=t(g);E.push($-1),C.push(u-O),k.push({accumulator:f,lineAccumulator:O,lineWidths:C,lastVariance:Math.abs(f-v[b+1]),highestVariance:Math.max(m,c),currLine:b+1,lineBreaks:E,startIndex:$+1})}else P>c&&$<p.length-1&&(C=t(h),E=t(g),k.push({accumulator:f,lineAccumulator:u,lineWidths:C,lastVariance:P,highestVariance:Math.max(m,P),currLine:b,lineBreaks:E,startIndex:$+1}));P>c?(g.push($-1),b++,m=Math.max(m,c),c=Math.abs(f-v[b]),h.push(u-O),u=O):c=P}h.push(u)}function s(p,v,f,u){for(var h=Math.ceil(p.total/v),c=Math.floor(p.total/h),m=[],b=0;b<h;b++)m.push(c*(b+1));var g=[];g.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var w=0;w<g.length;)a(p.measureWidths,m,g[w].accumulator,g[w].lineAccumulator,g[w].lineWidths,g[w].lastVariance,g[w].highestVariance,g[w].currLine,g[w].lineBreaks,g[w].startIndex,g),w++;for(b=0;b<g.length;b++){var k=g[b];k.variances=[],k.aveVariance=0;for(var $=0;$<k.lineWidths.length;$++){var O=k.lineWidths[$];k.variances.push(O-m[0]),k.aveVariance+=Math.abs(O-m[0])}k.aveVariance=k.aveVariance/k.lineWidths.length,u.attempts.push({type:"optimizeLineWidths",lineBreaks:k.lineBreaks,variances:k.variances,aveVariance:k.aveVariance,widths:p.measureWidths})}var P=9999999,y=-1;for(b=0;b<g.length;b++)k=g[b],k.aveVariance<P&&(P=k.aveVariance,y=b);return{failed:!1,lineBreaks:g[y].lineBreaks,variance:g[y].highestVariance}}function o(p,v,f){for(var u=[],h=[],c=0,m=!1,b=0;b<p.length;b++)c+=p[b],c>v&&(m=!0),b%f===f-1&&(b!==p.length-1&&u.push(b),h.push(Math.round(c)),c=0);return{failed:m,totals:h,lineBreaks:u}}function l(p,v,f){var u={lineBreaks:p,staffwidth:v};for(var h in f)f.hasOwnProperty(h)&&h!=="wrap"&&h!=="staffwidth"&&(u[h]=f[h]);return{revisedParams:u}}function d(p,v,f){if(v.length===0||f.staffwidth<v[0].left)return{reParse:!1,explanation:"Staff width is narrower than the margin",revisedParams:f};var u=f.scale?Math.max(f.scale,.1):1,h=f.wrap.minSpacing?Math.max(parseFloat(f.wrap.minSpacing),1):1,c=f.wrap.minSpacingLimit?Math.max(parseFloat(f.wrap.minSpacingLimit),1):h-.1,m=f.wrap.maxSpacing?Math.max(parseFloat(f.wrap.maxSpacing),1):void 0;f.wrap.lastLineLimit&&!m&&(m=Math.max(parseFloat(f.wrap.lastLineLimit),1));for(var b=f.wrap.preferredMeasuresPerLine?Math.max(parseInt(f.wrap.preferredMeasuresPerLine,10),0):void 0,g=[],w=[],k=0;k<v.length;k++){var $=v[k],O=f.staffwidth-$.left,P=O/h/u,y=O/m/u,C=O/c/u,E={widths:$,lineBreakPoint:P,minLineSize:y,attempts:[],staffWidth:f.staffwidth,minWidth:Math.round(C)},z=null;if(b){var A=o($.measureWidths,P,b);E.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:b,lineBreaks:A.lineBreaks,failed:A.failed,totals:A.totals}),A.failed||(z=A.lineBreaks)}if(!z){var R=i($.measureWidths,P);E.attempts.push({type:"Free Form",lineBreaks:R.lineBreaks,totals:R.totals}),z=R.lineBreaks,z.length>0&&$.measureWidths.length<25&&(R=s($,P,z,E),E.attempts.push({type:"Optimize",failed:R.failed,reason:R.reason,lineBreaks:R.lineBreaks,totals:R.totals}),R.failed||(z=R.lineBreaks))}g.push(z),w.push(E)}var T=f.staffwidth,I=l(g,T,f);return I.explanation=w,I.reParse=!0,I}return fa={wrapLines:e,calcLineWraps:d},fa}var da,Ul;function _7(){if(Ul)return da;Ul=1;function e(l){const d=l.getMeterFraction(),p=d.num===4&&d.den===4;if(!(d.num===2&&d.den===2)&&!p)throw new Error("notCommonTime");const f=l.deline();let u=[],h=!1;return f.forEach(c=>{if(c.subtitle)h&&u.push({type:"subtitle",subtitle:c.subtitle.text});else if(c.text)h=!0,u.push({type:"text",text:c.text.text});else if(c.staff){h=!0;const m=c.staff,b=n(m);u=u.concat(b)}}),t(u),a(u),s(u),u}const r=["break","(break)","no chord","n.c.","tacet"];function n(l){const d=[];let p="",v=[],f={chord:["","","",""]},u="",h="";if(l.forEach((c,m)=>{c.voices&&c.voices.forEach((b,g)=>{let w=0,k=0;b.forEach($=>{if($.el_type==="part")v.length>0&&m===0&&g===0&&(d.push({type:"part",name:p,lines:[v]}),v=[]),p=$.title;else if($.el_type==="note"){o($,f);const O=Math.floor(w);if($.chord&&$.chord.length>0){const P=$.chord[0],y=P.position==="default"||r.indexOf(P.name.toLowerCase())>=0?P.name:"";y&&(O>0&&!f.chord[0]&&(f.chord[0]=u),u=y,f.chord[O]?O<4&&!f.chord[O+1]&&(f.chord[O+1]=y):f.chord[O]=y),$.chord.forEach(C=>{C.position!=="default"&&r.indexOf(P.name.toLowerCase())<0&&(f.annotations||(f.annotations=[]),f.annotations.push(C.name))})}if(!$.rest||$.rest.type!=="spacer"){const P=Math.floor($.duration*4);if(P>4)k+=Math.floor(P/4),w=0;else{let y=$.duration*4;$.tripletMultiplier&&(y*=$.tripletMultiplier),w+=y}}}else if($.el_type==="bar"){if(h&&(f.ending=h,h=""),o($,f),($.type==="bar_dbl_repeat"||$.type==="bar_left_repeat")&&(f.hasStartRepeat=!0),($.type==="bar_dbl_repeat"||$.type==="bar_right_repeat")&&(f.hasEndRepeat=!0),$.startEnding&&(h=$.startEnding),w>=4){if(f.chord[0]===""&&(f.chord[1]||f.chord[2]||f.chord[3])&&(f.chord[0]=i(v)),m===0&&g===0)v.push(f);else{let O=k,P=0;for(;O>=d[P].lines[0].length&&P<d.length;)O-=d[P].lines[0].length,P++;if(P<d.length&&O<d[P].lines[0].length){const y=d[P].lines[0][O];!y.chord[0]&&f.chord[0]&&(y.chord[0]=f.chord[0]),!y.chord[1]&&f.chord[1]&&(y.chord[1]=f.chord[1]),!y.chord[2]&&f.chord[2]&&(y.chord[2]=f.chord[2]),!y.chord[3]&&f.chord[3]&&(y.chord[3]=f.chord[3]),f.annotations&&(y.annotations?y.annotations=y.annotations.concat(f.annotations):y.annotations=f.annotations)}k++}f={chord:["","","",""]}}else f.chord=["","","",""];w=0}else $.el_type}),m===0&&g===0&&d.push({type:"part",name:p,lines:[v]})})}),!u)throw new Error("noChords");return d}function i(l){for(let d=l.length-1;d>=0;d--)for(let p=l[d].chord.length-1;p>=0;p--)if(l[d].chord[p])return l[d].chord[p]}function t(l){l.forEach(d=>{if(d.type==="part"){const p=d.lines[0],v=p.findIndex(u=>!!u.ending),f=p.findIndex((u,h)=>h>v&&!!u.ending);if(v>=0&&f>=0&&f-v===p.length-f){let u=!0;for(let h=0;h<f-v&&u;h++){const c=p[v+h],m=p[f+h];if(c.chord[0]!==m.chord[0]&&(u=!1),c.chord[1]!==m.chord[1]&&(u=!1),c.chord[2]!==m.chord[2]&&(u=!1),c.chord[3]!==m.chord[3]&&(u=!1),c.annotations&&!m.annotations&&(u=!1),!c.annotations&&m.annotations&&(u=!1),c.annotations&&m.annotations)if(c.annotations.length!==m.annotations.length)u=!1;else for(let b=0;b<c.annotations.length;b++)c.annotations[b]!==m.annotations[b]&&(u=!1)}u&&(delete p[v].ending,p.splice(f,p.length-f))}}})}function a(l){l.forEach(d=>{if(d.type==="part"){const p=[],v=d.lines[0];let f=!1;const u=v.findIndex(m=>!!m.hasEndRepeat);(u>=0?Math.min(u+1,v.length):v.length)===12&&(f=!0);const c=f?4:8;for(let m=0;m<v.length;m+=c){const b=v.slice(m,m+c),g=b.findIndex(w=>!!w.hasEndRepeat);g>=0&&g<b.length-1?(p.push(b.slice(0,g+1)),p.push(b.slice(g+1))):p.push(b)}for(let m=0;m<p.length;m++)if(p[m][0].ending){const b=Math.max(0,m-1),g=p[b].length-p[m].length,w=[];for(let k=0;k<g;k++)w.push({noBorder:!0,chord:["","","",""]});p[m]=w.concat(p[m])}d.lines=p}})}function s(l){l.forEach(d=>{if(d.lines){let p=!1,v="";d.lines.forEach(f=>{f.forEach(u=>{if(!u.noBorder){const h=u.chord;!h[0]&&!h[1]&&!h[2]&&!h[3]?(p?v&&(h[0]="%"):h[0]=v,p=!0):!h[1]&&!h[2]&&!h[3]?(p=!0,v=h[0]):(p=!1,v=h[3]||h[2]||h[1])}})})}})}function o(l,d){if(l.decoration)for(let p=0;p<l.decoration.length;p++)switch(l.decoration[p]){case"fermata":case"segno":case"coda":case"D.C.":case"D.S.":case"D.C.alcoda":case"D.C.alfine":case"D.S.alcoda":case"D.S.alfine":case"fine":d.annotations||(d.annotations=[]),d.annotations.push(l.decoration[p]);break}}return da=e,da}var ha,Zl;function pt(){if(Zl)return ha;Zl=1;var e={};return e.FONTEM=360,e.FONTSIZE=30,e.STEP=e.FONTSIZE*93/720,e.SPACE=10,e.TOPNOTE=15,e.STAVEHEIGHT=100,e.INDENT=50,ha=e,ha}var pa,jl;function w7(){if(jl)return pa;jl=1;const e=Et();function r(a){this.sections=[{type:"startRepeat",index:-1}],this.addBar=function(s){var o=a.length-1,l=s.type==="bar_left_repeat"||s.type==="bar_dbl_repeat",d=s.type==="bar_right_repeat"||s.type==="bar_dbl_repeat",p=s.startEnding?t(s.startEnding):void 0;d&&this.sections.push({type:"endRepeat",index:o}),l&&this.sections.push({type:"startRepeat",index:o}),p&&this.sections.push({type:"startEnding",index:o,endings:p})},this.resolveRepeats=function(){var s,o=this.sections[this.sections.length-1],l=a.length-1;if(o.type==="startRepeat"?o.end=l:o.index+1<l&&this.sections.push({type:"startRepeat",index:o.index+1}),this.sections.length<2)return a;for(var d=[],p=null,v=0;v<this.sections.length;v++){var f=this.sections[v];switch(f.type){case"startRepeat":if(p){if(p.common.end||(p.common.end=f.index),p.endings)for(s=0;s<p.endings.length;s++)p.endings[s]&&!p.endings[s].end&&p.endings[s].start!==f.index&&(p.endings[s].end=f.index);this.sections[v-1].type==="endRepeat"&&p.endings&&p.endings.length&&(p.endings[p.endings.length]={start:-1,end:-1}),d.push(p)}if(p){var u=p.common.end;if(p.endings)for(s=0;s<p.endings.length;s++)p.endings[s]&&(u=Math.max(u,p.endings[s].end));u<f.index-1&&(console.log("gap",a.slice(u+1,f.index)),d.push({common:{start:u+1,end:f.index}}))}p={common:{start:f.index}};break;case"startEnding":{if(p)for(p.common.end||(p.common.end=f.index),p.endings||(p.endings=[]),s=0;s<f.endings.length;s++)p.endings[f.endings[s]]={start:f.index+1};break}case"endRepeat":if(p){if(p.endings||(p.endings=[]),p.endings.length>0)for(s=0;s<p.endings.length;s++)p.endings[s]&&!p.endings[s].end&&(p.endings[s].end=f.index);p.common.end||(p.common.end=f.index)}break}}if(p){if(p.common.end||(p.common.end=l),p.endings)for(s=0;s<p.endings.length;s++)p.endings[s]&&!p.endings[s].end&&(p.endings[s].end=l);d.push(p)}for(var h=[],c=-1,m=0;m<d.length;m++){var b=d[m];if(!b.endings)n(a,h,b.common.start,b.common.end);else if(b.endings.length===0)n(a,h,b.common.start,b.common.end),n(a,h,b.common.start,b.common.end);else for(s=0;s<b.endings.length;s++){var g=b.endings[s];g&&(n(a,h,b.common.start,b.common.end),g.start>0&&n(a,h,g.start,g.end),c=Math.max(c,g.end))}}return h}}function n(a,s,o,l){for(var d=o;d<=l;d++)s.push(i(a[d]))}function i(a){var s=Object.assign({},a);return s.pitches&&(s.pitches=e.cloneArray(s.pitches)),s}function t(a){var s=[],o,l,d;if(a.indexOf(",")>0)for(l=a.split(","),d=0;d<l.length;d++)o=parseInt(l[d],10),o>0&&s.push(o);else if(a.indexOf("-")>0){l=a.split("-");var p=parseInt(l[0],10),v=parseInt(l[1],10);for(d=p;d<=v;d++)s.push(d)}else o=parseInt(a,10),o>0&&s.push(o);return s}return pa=r,pa}var va,Bl;function ob(){if(Bl)return va;Bl=1;var e,r=Et(),n=w7();return(function(){var i=1,t=128;e=function(m,b){b=b||{};var g,w=b.program||0,k=b.midiTranspose||0;m.visualTranspose&&(k-=m.visualTranspose);var $=b.channel||0,O=!1,P=b.drum||"",y=b.drumBars||1,C=b.drumIntro||0,E=P!=="",z=!!b.drumOff,A=[],R=50;w=parseInt(w,10),k=parseInt(k,10),$=parseInt($,10),$===10&&(w=t),P=P.split(" "),y=parseInt(y,10),C=parseInt(C,10);var T=m.formatting.bagpipes;T&&(w=71);var I=[];if(m.formatting.midi){var N=m.formatting.midi;N.program&&N.program.length>0&&(w=N.program[0],N.program.length>1&&(w=N.program[1],$=N.program[0]),O=!0),N.transpose&&(k=N.transpose[0]),N.channel&&($=N.channel[0],O=!0),N.drum&&(P=N.drum),N.drumbars&&(y=N.drumbars[0]),N.drumon&&(E=!0),$===10&&(w=t),N.beat&&I.push({el_type:"beat",beats:N.beat}),N.nobeataccents&&I.push({el_type:"beataccents",value:!1})}b.qpm?g=parseInt(b.qpm,10):m.metaText.tempo?g=p(m.metaText.tempo,m.getBeatLength()):b.defaultQpm?g=b.defaultQpm:g=180;var D=[];T&&D.push({el_type:"bagpipes"}),D.push({el_type:"instrument",program:w}),$&&D.push({el_type:"channel",channel:$}),k&&D.push({el_type:"transpose",transpose:k}),D.push({el_type:"tempo",qpm:g});for(var L=0;L<I.length;L++)D.push(I[L]);var _=[],x=[],S=[],M=[],U=[0],q={};q[0]={el_type:"tempo",qpm:g,timing:0};for(var j,V=[],ne=!1,Y=m.lines,ce=0;ce<Y.length;ce++){var fe=Y[ce];if(fe.staff){let we=function(Ie){var nt={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]},Se;if(Ie.decoration){if(Ie.decoration.indexOf("pppp")>=0?Se="pppp":Ie.decoration.indexOf("ppp")>=0?Se="ppp":Ie.decoration.indexOf("pp")>=0?Se="pp":Ie.decoration.indexOf("p")>=0?Se="p":Ie.decoration.indexOf("mp")>=0?Se="mp":Ie.decoration.indexOf("mf")>=0?Se="mf":Ie.decoration.indexOf("f")>=0?Se="f":Ie.decoration.indexOf("ff")>=0?Se="ff":Ie.decoration.indexOf("fff")>=0?Se="fff":Ie.decoration.indexOf("ffff")>=0&&(Se="ffff"),Se){j=nt[Se].slice(0);let fr=[j];Array.isArray(Ie.decoration)&&(fr=[],Ie.decoration.forEach(Ut=>{Ut in nt&&fr.push(nt[Ut].slice(0))})),_[K].push({el_type:"beat",beats:j.slice(0),volumesPerNotePitch:fr}),S[be]=!1,M[be]=!1}if(Ie.decoration.indexOf("crescendo(")>=0){var Ct=a(_e,W,"crescendo)"),ct=Math.min(127,j[0]+R),it=s(_e,W+Ct+1,Object.keys(nt));it&&(ct=nt[it][0]),Ct>0?S[be]=Math.floor((ct-j[0])/Ct):S[be]=!1,M[be]=!1}else if(Ie.decoration.indexOf("crescendo)")>=0)S[be]=!1;else if(Ie.decoration.indexOf("diminuendo(")>=0){var Rt=a(_e,W,"diminuendo)"),Lt=Math.max(15,j[0]-R),Xt=s(_e,W+Rt+1,Object.keys(nt));Xt&&(Lt=nt[Xt][0]),S[be]=!1,Rt>0?M[be]=Math.floor((Lt-j[0])/Rt):M[be]=!1}else Ie.decoration.indexOf("diminuendo)")>=0&&(M[be]=!1)}};for(var Ye=we,pe=fe.staff,K=0,he=0;he<pe.length;he++){var ee=pe[he];if(!(ee.clef&&ee.clef.type==="TAB"))for(var be=0;be<ee.voices.length;be++){var _e=ee.voices[be];if(!_[K]){_[K]=[].concat(JSON.parse(JSON.stringify(D)));var Me=d(fe.staff,K);Me&&_[K].unshift({el_type:"name",trackName:Me}),V[K]=new n(_[K])}if(k&&ee.clef.type==="perc"&&_[K].push({el_type:"transpose",transpose:0}),ee.clef&&ee.clef.type==="perc"&&!O)for(var Ce=0;Ce<_[K].length;Ce++)_[K][Ce].el_type==="instrument"&&(_[K][Ce].program=t);else ee.key&&u(_[K],ee.key);ee.meter&&h(_[K],ee.meter),!ne&&E&&(_[K].push({el_type:"drum",params:{pattern:P,bars:y,on:E,intro:C}}),ne=!0),ee.clef&&ee.clef.type!=="perc"&&ee.clef.transpose&&(ee.clef.el_type="clef",_[K].push({el_type:"transpose",transpose:ee.clef.transpose}),x[K]=!1),ee.clef&&ee.clef.type&&(ee.clef.type.indexOf("-8")>=0?(_[K].push({el_type:"transpose",transpose:-12}),x[K]=!0):ee.clef.type.indexOf("+8")>=0?(_[K].push({el_type:"transpose",transpose:12}),x[K]=!0):x[K]&&(_[K].push({el_type:"transpose",transpose:0}),x[K]=!1)),m.formatting.midi&&m.formatting.midi.drumoff&&(_[K].push({el_type:"bar"}),_[K].push({el_type:"drum",params:{pattern:"",on:!1}}));var We=0,Fe=0,Ke=0,H=0;j=[105,95,85,1];for(var W=0;W<_e.length;W++){var B=_e[W];switch(B.el_type){case"note":if(S[be]&&(j[0]+=S[be],j[1]+=S[be],j[2]+=S[be],_[K].push({el_type:"beat",beats:j.slice(0)})),M[be]&&(j[0]+=M[be],j[1]+=M[be],j[2]+=M[be],_[K].push({el_type:"beat",beats:j.slice(0)})),we(B),!B.rest||B.rest.type!=="spacer"){var G={elem:B,el_type:"note",timing:U[K]};if(B.style?G.style=B.style:A[K]&&(G.style=A[K]),G.duration=B.duration===0?.25:B.duration,B.startTriplet){if(Fe=B.tripletMultiplier,Ke=B.startTriplet*Fe*B.duration,B.startTriplet!==B.tripletR&&W+B.tripletR<=_e.length){for(var Q=0,ae=W;ae<W+B.tripletR;ae++)Q+=_e[ae].duration;Ke=Fe*Q}G.duration=G.duration*Fe,G.duration=Math.round(G.duration*1e6)/1e6,H=G.duration}else Fe&&(B.endTriplet?(Fe=0,G.duration=Math.round((Ke-H)*1e6)/1e6):(G.duration=G.duration*Fe,G.duration=Math.round(G.duration*1e6)/1e6,H+=G.duration));B.rest&&(G.rest=B.rest),B.decoration&&(G.decoration=B.decoration.slice(0)),B.pitches&&(G.pitches=r.cloneArray(B.pitches)),B.gracenotes&&(G.gracenotes=r.cloneArray(B.gracenotes)),B.chord&&(G.chord=r.cloneArray(B.chord)),_[K].push(G),B.style==="rhythm"&&l(_),We++,U[K]+=G.duration}break;case"key":case"keySignature":u(_[K],B);break;case"meter":h(_[K],B);break;case"clef":B.transpose&&_[K].push({el_type:"transpose",transpose:B.transpose}),B.type&&(B.type.indexOf("-8")>=0?_[K].push({el_type:"transpose",transpose:-12}):B.type.indexOf("+8")>=0&&_[K].push({el_type:"transpose",transpose:12}));break;case"tempo":g=p(B,m.getBeatLength()),_[K].push({el_type:"tempo",qpm:g,timing:U[K]}),q[""+U[K]]={el_type:"tempo",qpm:g,timing:U[K]};break;case"bar":We>0&&_[K].push({el_type:"bar"}),we(B),We=0,V[K].addBar(B,K);break;case"style":A[K]=B.head;break;case"timeSignature":_[K].push(v(B));break;case"part":break;case"stem":case"scale":case"break":case"font":break;case"midi":var ue=!1;switch(B.cmd){case"drumon":E=!0,ue=!0;break;case"drumoff":E=!1,ue=!0;break;case"drum":P=B.params,ue=!0;break;case"drumbars":y=B.params[0],ue=!0;break;case"drummap":break;case"channel":B.params[0]===10&&_[K].push({el_type:"instrument",program:t});break;case"program":c(_[K],{el_type:"instrument",program:B.params[0]}),O=!0;break;case"transpose":_[K].push({el_type:"transpose",transpose:B.params[0]});break;case"gchordoff":_[K].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":_[K].push({el_type:"gchordOn",tacet:!1});break;case"beat":_[K].push({el_type:"beat",beats:B.params});break;case"nobeataccents":_[K].push({el_type:"beataccents",value:!1});break;case"beataccents":_[K].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":_[K].push({el_type:B.cmd,volume:B.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":_[K].push({el_type:B.cmd,param:B.params[0]});break;case"bassprog":case"chordprog":_[K].push({el_type:B.cmd,value:B.params[0],octaveShift:B.params[1]});break;case"gchordbars":_[K].push({el_type:B.cmd,param:B.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",B.cmd,B)}ue&&(_[0].push({el_type:"drum",params:{pattern:P,bars:y,intro:C,on:E}}),ne=!0);break;default:console.log("MIDI: element type "+B.el_type+" not handled.")}}K++,U[K]||(U[K]=0)}}}}for(var xe=0;xe<V.length;xe++)_[xe]=V[xe].resolveRepeats();if(o(_,q),C)for(var se=m.getPickupLength(),ve=0;ve<_.length;ve++){for(var Le=0;_[ve][Le].el_type!=="note"&&_[ve].length>Le;)Le++;if(_[ve].length>Le){for(var ae=0;ae<C;ae++)se===0||ae<C-1?(_[ve].splice(Le,0,{el_type:"note",rest:{type:"rest"},duration:i},{el_type:"bar"}),Le+=2):_[ve].splice(Le++,0,{el_type:"note",rest:{type:"rest"},duration:i-se});z&&(E=!1,_[ve].splice(Le++,0,{el_type:"drum",params:{pattern:P,bars:y,intro:C,on:E}}),z=!1)}}return _.length>0&&_[0].length>0&&(_[0][0].pickupLength=m.getPickupLength()),_};function a(m,b,g){for(var w=0,k=b+1;k<m.length;k++)if(m[k].el_type==="note"&&w++,m[k].decoration&&m[k].decoration.indexOf(g)>=0)return w;return w}function s(m,b,g){for(var w=Math.min(m.length,b+3),k=b;k<w;k++)if(m[k].el_type==="note"&&m[k].decoration){for(var $=0;$<m[k].decoration.length;$++)if(g.indexOf(m[k].decoration[$])>=0)return m[k].decoration[$]}return null}function o(m,b){if(!(!b||b.length===0))for(var g=Object.keys(b),w=0;w<m.length;w++)for(var k=m[w],$=b[0]?b[0].qpm:0,O=0;O<k.length;O++){var P=k[O];P.el_type==="tempo"&&($=P.qpm),g.indexOf(""+P.timing)>=0&&$!==b[""+P.timing].qpm&&($=b[""+P.timing].qpm,P.el_type==="tempo"?(P.qpm=b[""+P.timing].qpm,O++):(m[w].splice(O,0,{el_type:"tempo",qpm:b[""+P.timing].qpm,timing:P.timing}),O+=2))}}function l(m){for(var b=0;b<m.length;b++)for(var g=m[b],w=g.length-1;w>=0&&g[w].el_type!=="bar";)g[w].noChordVoice=!0,w--}function d(m,b){if(!(!m||m.length<=b||!m[b].title))return m[b].title.join(" ")}function p(m,b){var g=.25;m.duration&&(g=m.duration[0]);var w=60;return m.bpm&&(w=m.bpm),g*w/b}function v(m){var b;switch(m.type){case"common_time":b={el_type:"meter",num:4,den:4},i=4/4;break;case"cut_time":b={el_type:"meter",num:2,den:2},i=2/2;break;case"specified":let k=0;if(m.value&&m.value.length>0&&m.value[0].num.indexOf("+")>0)for(var g=m.value[0].num.split("+"),w=0;w<g.length;w++)k+=parseInt(g[w],10);else k=parseInt(m.value[0].num,10);b={el_type:"meter",num:k,den:m.value[0].den},i=k/parseInt(m.value[0].den,10);break;default:b={el_type:"meter"},i=1}return b}function f(m){for(var b=[],g=0;g<m.length;g++)m[g].acc!=="natural"&&b.push(m[g]);return b}function u(m,b){var g;b.root==="HP"?g={el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}:g={el_type:"key",accidentals:f(b.accidentals)},c(m,g)}function h(m,b){var g=v(b);c(m,g)}function c(m,b){for(var g=m.length-1;g>=0;g--)if(m[g].el_type===b.el_type){JSON.stringify(m[g])!==JSON.stringify(b)&&m.push(b);return}m.push(b)}})(),va=e,va}var ma,ql;function k7(){if(ql)return ma;ql=1;var e=function(d,p,v,f){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=d,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!p,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=f,this.tempoChangeFactor=1,this.bassInstrument=v.bassprog&&v.bassprog.length>=1?v.bassprog[0]:0,this.chordInstrument=v.chordprog&&v.chordprog.length>=1?v.chordprog[0]:0,this.bassOctaveShift=v.bassprog&&v.bassprog.length===2?v.bassprog[1]:0,this.chordOctaveShift=v.chordprog&&v.chordprog.length===2?v.chordprog[1]:0,this.boomVolume=v.bassvol&&v.bassvol.length===1?v.bassvol[0]:64,this.chickVolume=v.chordvol&&v.chordvol.length===1?v.chordvol[0]:48,v.gchord&&v.gchord.length>0?this.overridePattern=i(v.gchord[0]):this.overridePattern=void 0};e.prototype.setMeter=function(l){this.meter=l},e.prototype.setTempoChangeFactor=function(l){this.tempoChangeFactor=l},e.prototype.setLastBarTime=function(l){this.lastBarTime=l},e.prototype.setTranspose=function(l){this.transpose=l},e.prototype.setRhythmHead=function(l,d){this.hasRhythmHead=l;var p=[];if(l&&this.lastChord&&this.lastChord.chick)for(var v=0;v<this.lastChord.chick.length;v++){var f=Object.assign({},d.pitches[0]);f.actualPitch=this.lastChord.chick[v],p.push(f)}return p},e.prototype.barEnd=function(l){this.chordTrack.length>0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,s(l.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},e.prototype.gChordOn=function(l){this.chordsOff||(this.gChordTacet=l.tacet)},e.prototype.paramChange=function(l){switch(l.el_type){case"gchord":l.param&&l.param.length>0?this.overridePattern=i(l.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=l.value,l.octaveShift!=null&&l.octaveShift!=null?this.bassOctaveShift=l.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=l.value,l.octaveShift!=null&&l.octaveShift!=null?this.chordOctaveShift=l.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=l.param;break;case"chordvol":this.chickVolume=l.param;break;default:console.log("unhandled midi param",l)}},e.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},e.prototype.addTrack=function(l){this.chordTrackEmpty()||l.push(this.chordTrack)},e.prototype.findChord=function(l){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!l.chord||l.chord.length===0)return null;for(var d=0;d<l.chord.length;d++){var p=l.chord[d];if(p.position==="default")return p.name;if(this.breakSynonyms.indexOf(p.name.toLowerCase())>=0)return"break"}return null},e.prototype.interpretChord=function(l){if(l.length!==0){if(l==="break")return{chick:[]};var d=l.substring(0,1);if(d==="("){if(l=l.substring(1,l.length-1),l.length===0)return;d=l.substring(0,1)}var p=this.basses[d];if(p){for(var v=this.transpose;v<-8;)v+=12;for(;v>8;)v-=12;p+=v,p<33?p+=12:p>44&&(p-=12);var f=p;p+=this.bassOctaveShift*12;var u=p-5,h;l.length===1&&(h=this.chordNotes(p,""));var c=l.substring(1),m=c.substring(0,1);m==="b"||m==="♭"?(f--,p--,u--,c=c.substring(1)):(m==="#"||m==="♯")&&(f++,p++,u++,c=c.substring(1));var b=c.split("/");if(h=this.chordNotes(f,b[0]),h.length>=3){var g=h[2]-h[0];u=u+g-7}if(b.length===2){var w=this.basses[b[1].substring(0,1)];if(w){var k=b[1].substring(1),$={"#":1,"♯":1,b:-1,"♭":-1}[k]||0;p=this.basses[b[1].substring(0,1)]+$+v,p+=this.bassOctaveShift*12,u=p}}return{boom:p,boom2:u,chick:h}}}},e.prototype.chordNotes=function(l,d){var p=this.chordIntervals[d];p||(d.slice(0,2).toLowerCase()==="ma"||d[0]==="M"?p=this.chordIntervals.M:d[0]==="m"||d[0]==="-"?p=this.chordIntervals.m:p=this.chordIntervals.M),l+=12,l+=this.chordOctaveShift*12;for(var v=[],f=0;f<p.length;f++)v.push(l+p[f]);return v},e.prototype.writeNote=function(l,d,p,v,f,u){l!==void 0&&this.chordTrack.push({cmd:"note",pitch:l,volume:p,start:this.lastBarTime+v*o(d,this.tempoChangeFactor),duration:o(f,this.tempoChangeFactor),gap:0,instrument:u})},e.prototype.chordTrackEmpty=function(){for(var l=!0,d=0;d<this.chordTrack.length&&l;d++)this.chordTrack[d].cmd==="note"&&(l=!1);return l},e.prototype.resolveChords=function(l,d){if(!this.hasRhythmHead){var p=this.meter.num,v=this.meter.den,f=1/v,u=f/2,h=parseInt(p,10)/parseInt(v,10),c=h-(d-l)/this.tempoChangeFactor;Math.abs(c)<1e-5&&(c=0),(this.currentChords.length===0||this.currentChords[0].beat!==0)&&this.currentChords.unshift({beat:0,chord:this.chordLastBar});var m=t(this.currentChords,8*p/v),b=this.overridePattern?this.overridePattern:this.rhythmPatterns[p+"/"+v];if(c){b=[];for(var g=(d-l)/this.tempoChangeFactor*8,w=0;w<g/2;w+=2)b.push("chick"),b.push("")}if(!b){b=[];for(var w=0;w<8*p/v/2;w++)b.push("chick"),b.push("")}for(var k=!0,$=Math.min(b.length,m.length),w=0;w<$;w++){w>0&&m[w-1]&&m[w]&&m[w-1].boom!==m[w].boom&&(k=!0);var O=b[w],P=O.indexOf("boom")>=0,y=!P&&w!==0&&b[0].indexOf("boom")>=0&&(!m[w-1]||m[w-1].boom!==m[w].boom),C=r(m[w],O,k,y);P&&(k=!1);for(var E=0;E<C.length;E++)this.writeNote(C[E],.125,P||y?this.boomVolume:this.chickVolume,w,u,P||y?this.bassInstrument:this.chordInstrument),y?y=!1:P=!1}}},e.prototype.processChord=function(l){if(!this.chordTrackFinished){var d=this.findChord(l);if(d){var p=this.interpretChord(d);if(p){this.chordTrack.length===0&&this.chordTrack.push({cmd:"program",channel:this.chordChannel,instrument:this.chordInstrument}),this.lastChord=p;var v=a(this.lastBarTime,s(l.time));this.currentChords.push({chord:this.lastChord,beat:v,start:s(l.time)})}}}};function r(l,d,p,v){var f=[];if(!l)return f;d.indexOf("boom")>=0?f.push(p?l.boom:l.boom2):v&&f.push(l.boom);var u=l.chick.length;if(d.indexOf("chick")>=0)for(var h=0;h<u;h++)f.push(l.chick[h]);switch(d){case"DO":f.push(l.chick[0]);break;case"MI":f.push(l.chick[1]);break;case"SOL":f.push(n(l,2));break;case"TI":f.push(n(l,3));break;case"TOP":f.push(n(l,4));break;case"do":f.push(l.chick[0]+12);break;case"mi":f.push(l.chick[1]+12);break;case"sol":f.push(n(l,2)+12);break;case"ti":f.push(n(l,3)+12);break;case"top":f.push(n(l,4)+12);break}return f}function n(l,d){var p=Math.floor(d/l.chick.length),v=l.chick[d%l.chick.length];return v+p*12}function i(l){for(var d=[],p=0;p<l.length;p++){var v=l[p];switch(v){case"z":d.push("");break;case"2":d.push("");break;case"c":d.push("chick");break;case"b":d.push("boom&chick");break;case"f":d.push("boom");break;case"G":d.push("DO");break;case"H":d.push("MI");break;case"I":d.push("SOL");break;case"J":d.push("TI");break;case"K":d.push("TOP");break;case"g":d.push("do");break;case"h":d.push("mi");break;case"i":d.push("sol");break;case"j":d.push("ti");break;case"k":d.push("top");break}}return d}function t(l,d,p){var v=[];if(l.length===0)return v;for(var f=l[0].chord,u=1;u<l.length;u++){for(var h=l[u];v.length<h.beat;)v.push(f);f=h.chord}for(;v.length<d;)v.push(f);return v}function a(l,d){var p=d-l;return p*8}e.prototype.breakSynonyms=["break","(break)","no chord","n.c.","tacet"],e.prototype.basses={A:33,B:35,C:36,D:38,E:40,F:41,G:43},e.prototype.chordIntervals={dim:[0,3,6],"°":[0,3,6],"˚":[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"˚7":[0,3,6,9],ø7:[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7♭5":[0,3,6,10],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"7b5":[0,4,6,10],"7(b5)":[0,4,6,10],"7♭5":[0,4,6,10],"7(b9,b5)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7(#9,b5)":[0,4,6,10,15],"7#9b5":[0,4,6,10,15],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],m:[0,3,7],"-":[0,3,7],m6:[0,3,7,9],"-6":[0,3,7,9],m7:[0,3,7,10],"-7":[0,3,7,10],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"-6/9":[0,3,7,9,14],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-maj7":[0,3,7,11],"-9+7":[0,3,7,11,13],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-maj9":[0,3,7,11,14],"-∆9":[0,3,7,11,14],mM9:[0,3,7,11,14],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],"6add9":[0,4,7,9,14],69:[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,7,10,14,17],13:[0,4,7,10,14,21],"7b9":[0,4,7,10,13],"7♭9":[0,4,7,10,13],"7(b9)":[0,4,7,10,13],"7(#9)":[0,4,7,10,15],"7#9":[0,4,7,10,15],"(13)":[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7(#9,b13)":[0,4,7,10,15,20],"7(#11)":[0,4,7,10,14,18],"7#11":[0,4,7,10,14,18],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"9(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"13(#11)":[0,4,7,10,18,21],"13#11":[0,4,7,10,18,21],maj7:[0,4,7,11],"∆7":[0,4,7,11],Δ7:[0,4,7,11],maj9:[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7(11)":[0,4,7,11,17],"maj7(#11)":[0,4,7,11,18],"maj7(13)":[0,4,7,14,21],"maj7(9,13)":[0,4,7,11,14,21],"7sus4":[0,5,7,10],m7sus4:[0,3,7,10,17],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,10,14],"13sus4":[0,5,7,10,14,21],aug7:[0,4,8,10],"+7":[0,4,8,10],"+":[0,4,8],"7#5":[0,4,8,10],"7♯5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9♯5":[0,4,8,10,14],"9+5":[0,4,8,10,14],"-7(#5)":[0,3,8,10],"-7#5":[0,3,8,10],"7(#5)":[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"maj7(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5,#11)":[0,4,8,11,18],"maj7#5#11":[0,4,8,11,18],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,21],"13#5":[0,4,8,10,14,21],5:[0,7],"5(8)":[0,7,12],"5add8":[0,7,12]},e.prototype.rhythmPatterns={"2/2":["boom","","","","chick","","",""],"3/2":["boom","","","","chick","","","","chick","","",""],"4/2":["boom","","","","chick","","","","boom","","","","chick","","",""],"2/4":["boom","","chick",""],"3/4":["boom","","chick","","chick",""],"4/4":["boom","","chick","","boom","","chick",""],"5/4":["boom","","chick","","chick","","boom","","chick",""],"6/4":["boom","","chick","","boom","","chick","","boom","","chick",""],"3/8":["boom","","chick"],"5/8":["boom","chick","chick","boom","chick"],"6/8":["boom","","chick","boom","","chick"],"7/8":["boom","chick","chick","boom","chick","boom","chick"],"9/8":["boom","","chick","boom","","chick","boom","","chick"],"10/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick"],"11/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick","chick"],"12/8":["boom","","chick","boom","","chick","boom","","chick","boom","","chick"]};function s(l){return l/1e6}function o(l,d){return Math.round(l*d*1e6)/1e6}return ma=e,ma}var ga,Fl;function cb(){if(Fl)return ga;Fl=1;var e={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};function r(n){var i=(n.accidental?n.accidental[0]:"x")+n.verticalPos;return e[i]}return ga=r,ga}var ba,Hl;function $7(){if(Hl)return ba;Hl=1;var e,r=k7(),n=cb();return(function(){var i,t,a,s,o,l=1,d,p,v,f,u,h,c={num:4,den:4},m=128,b,g=!0,w=105,k=95,$=85,O=[[w,k,$]],P=.25,y,C,E=0,z,A={},R,T=0,I,N=0,D=-.001,L=.4;e=function(H,W,B,G){W||(W={}),G||(G={}),i=[],t=[0,0,0,0,0,0,0],s=[],o=W.qpm,l=1,d=void 0,p=void 0,v=void 0,f=void 0,u=0,I=B,c={num:4,den:4},g=!0,w=105,k=95,$=85,O=[],P=.25,y=void 0,C=void 0,E=0,z=[],A={},R=1,H.length>0&&H[0].length>0&&(T=H[0][0].pickupLength),W.bassprog!==void 0&&!G.bassprog&&(G.bassprog=[W.bassprog]),W.bassvol!==void 0&&!G.bassvol&&(G.bassvol=[W.bassvol]),W.chordprog!==void 0&&!G.chordprog&&(G.chordprog=[W.chordprog]),W.chordvol!==void 0&&!G.chordvol&&(G.chordvol=[W.chordvol]),W.gchord!==void 0&&!G.gchord&&(G.gchord=[W.gchord]),h=new r(H.length,W.chordsOff,G,c),M(H,W);for(var Q=0;Q<H.length;Q++){a=0,h.setTranspose(a);var ae=H[Q];v=[{cmd:"program",channel:Q,instrument:d}],f=void 0,b=0,h.setLastBarTime(0);var ue=!1;(W.voicesOff===!0||W.voicesOff&&W.voicesOff.length&&W.voicesOff.indexOf(Q)>=0)&&(ue=!0);for(var xe=0;xe<ae.length;xe++){var se=ae[xe];switch(se.el_type){case"name":f={cmd:"text",type:"name",text:se.trackName};break;case"note":Y(se,ue);break;case"key":t=K(se);break;case"meter":c=se,h.setMeter(c),P=U(c),We();break;case"tempo":o?l=se.qpm?o/se.qpm:1:o=se.qpm,h.setTempoChangeFactor(l);break;case"transpose":a=se.transpose,h.setTranspose(a);break;case"bar":h.barEnd(se),i=[],Q===0&&Fe(H.length+1),h.setRhythmHead(!1),b=x(se.time),h.setLastBarTime(b);break;case"bagpipes":break;case"instrument":if(d===void 0&&(d=se.program),p=se.program,v.length>0&&v[v.length-1].cmd==="program")v[v.length-1].instrument=se.program;else{var ve;for(ve=v.length-1;ve>=0&&v[ve].cmd!=="program";ve--);(ve<0||v[ve].instrument!==se.program)&&v.push({cmd:"program",channel:0,instrument:se.program})}break;case"channel":_(se.channel);break;case"drum":A=Ce(se.params),We();break;case"gchordOn":h.gChordOn(se);break;case"beat":w=se.beats[0],k=se.beats[1],$=se.beats[2],se.volumesPerNotePitch?O=se.volumesPerNotePitch:O=[];break;case"vol":y=se.volume;break;case"volinc":C=se.volume;break;case"beataccents":g=se.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":h.paramChange(se);break;default:console.log("MIDI creation. Unknown el_type: "+se.el_type+`
|
|
129
|
-
`);break}}v[0].instrument===void 0&&(v[0].instrument=d||0),f&&v.unshift(f),s.push(v),h.finish(),z.length>0}return W.detuneOctave&&Ke(s,parseInt(W.detuneOctave,10)),h.addTrack(s),z.length>0&&s.push(z),{tempo:o,instrument:d,tracks:s,totalDuration:u}};function _(H){for(var W=v.length-1;W>=0;W--)if(v[W].cmd==="program"){v[W].channel=H;return}}function x(H){return H/1e6}function S(H){return Math.round(H*l*1e6)/1e6}function M(H,W){for(var B=0;B<H.length;B++){for(var G=H[B],Q={},ae=W.qpm,ue=0,xe=1,se=0;se<G.length;se++){var ve=G[se];if(ve.el_type==="tempo"){ae?xe=ve.qpm?ae/ve.qpm:1:ae=ve.qpm;continue}ve.time=ue;var Le=ve.duration?ve.duration:0;if(ue+=Math.round(Le*xe*1e6),ve.pitches){for(var Ye=0;Ye<ve.pitches.length;Ye++){var we=ve.pitches[Ye];if(we){if(we.duration=ve.duration,we.startTie)Q[we.pitch]===void 0?Q[we.pitch]={el:se,pitch:Ye}:(G[Q[we.pitch].el].pitches[Q[we.pitch].pitch].duration+=we.duration,ve.pitches[Ye]=null);else if(we.endTie){var Ie=Q[we.pitch];if(Ie){var nt=we.duration;delete G[Ie.el].pitches[Ie.pitch].startTie,G[Ie.el].pitches[Ie.pitch].duration+=nt,ve.pitches[Ye]=null,delete Q[we.pitch]}else delete we.endTie}}}delete ve.duration}}for(var Se in Q)if(Q.hasOwnProperty(Se)){var Ct=Q[Se];delete G[Ct.el].pitches[Ct.pitch].startTie}}}function U(H){switch(parseInt(H.den,10)){case 2:return .5;case 4:return .25;case 8:return H.num%3===0?.375:.125;case 16:return .125}return .25}function q(H,W,B){var G=B-H;return G/W}function j(H,W,B){if(W)return 0;let G=w,Q=k,ae=$;B!==void 0&&O.length>=B+1&&(G=O[B][0],Q=O[B][1],ae=O[B][2]);var ue;if(y!==void 0)ue=y,y=void 0;else if(!g)ue=Q;else if(T>H)ue=ae;else{var xe=q(b,U(c),H);xe===0?ue=G:parseInt(xe,10)===xe?ue=Q:ue=ae}return C&&(ue+=C,C=void 0),ue<0&&(ue=0),ue>127&&(ue=127),W?0:ue}function V(H,W){var B={};if(H.decoration)for(var G=0;G<H.decoration.length;G++)H.decoration[G]==="staccato"?B.thisBreakBetweenNotes="staccato":H.decoration[G]==="tenuto"?B.thisBreakBetweenNotes="tenuto":H.decoration[G]==="accent"?B.velocity=Math.min(127,W*1.5):H.decoration[G]==="trill"?B.noteModification="trill":H.decoration[G]==="lowermordent"?B.noteModification="lowermordent":H.decoration[G]==="uppermordent"?B.noteModification="pralltriller":H.decoration[G]==="mordent"?B.noteModification="mordent":H.decoration[G]==="turn"?B.noteModification="turn":H.decoration[G]==="roll"?B.noteModification="roll":H.decoration[G]==="pralltriller"?B.noteModification="pralltriller":H.decoration[G]==="trillh"&&(B.noteModification="trillh");return B}function ne(H,W){var B=W.start,G=W.duration,Q=S(1/32);switch(H){case"trill":for(var ae=2;G>0;)v.push({cmd:"note",pitch:W.pitch+ae,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),ae=ae===2?0:2,G-=Q,B+=Q;break;case"trillh":for(var ae=1;G>0;)v.push({cmd:"note",pitch:W.pitch+ae,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),ae=ae===1?0:1,G-=Q,B+=Q;break;case"pralltriller":v.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),G-=Q,B+=Q,v.push({cmd:"note",pitch:W.pitch+2,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),G-=Q,B+=Q,v.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B,duration:G,gap:0,instrument:p});break;case"mordent":case"lowermordent":v.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),G-=Q,B+=Q,v.push({cmd:"note",pitch:W.pitch-2,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),G-=Q,B+=Q,v.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B,duration:G,gap:0,instrument:p});break;case"turn":Q=W.duration/4,v.push({cmd:"note",pitch:W.pitch+2,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),v.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B+Q,duration:Q,gap:0,instrument:p,style:"decoration"}),v.push({cmd:"note",pitch:W.pitch-1,volume:W.volume,start:B+Q*2,duration:Q,gap:0,instrument:p,style:"decoration"}),v.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B+Q*3,duration:Q,gap:0,instrument:p,style:"decoration"});break;case"roll":for(;G>0;)v.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),G-=Q*2,B+=Q*2;break}}function Y(H,W){var B=j(x(H.time),W);h.processChord(H);var G;if(H.gracenotes&&H.pitches&&H.pitches.length>0&&H.pitches[0]&&(G=he(H.gracenotes,H.pitches[0].duration),H.elem&&(H.elem.midiGraceNotePitches=ee(G,x(H.time),B*2/3,p))),H.elem){var Q=x(H.time),ae=Q/P/o*60*1e3;if(H.elem.currentTrackMilliseconds===void 0)H.elem.currentTrackMilliseconds=ae,H.elem.currentTrackWholeNotes=Q;else if(H.elem.currentTrackMilliseconds.length===void 0)H.elem.currentTrackMilliseconds!==ae&&(H.elem.currentTrackMilliseconds=[H.elem.currentTrackMilliseconds,ae],H.elem.currentTrackWholeNotes=[H.elem.currentTrackWholeNotes,Q]);else{for(var ue=!1,xe=0;xe<H.elem.currentTrackMilliseconds.length;xe++)H.elem.currentTrackMilliseconds[xe]===ae&&(ue=!0);ue||(H.elem.currentTrackMilliseconds.push(ae),H.elem.currentTrackWholeNotes.push(Q))}}if(H.pitches){var se="",ve=V(H,B);ve.thisBreakBetweenNotes&&(se=ve.thisBreakBetweenNotes),ve.velocity&&(B=ve.velocity);var Le=H.pitches;H.style==="rhythm"&&(Le=h.setRhythmHead(!0,H)),H.elem&&(H.elem.midiPitches=[]);for(var Ye=0;Ye<Le.length;Ye++){let it=B;!ve.velocity&&Array.isArray(H.decoration)&&H.decoration.length>Ye&&(it=j(x(H.time),W,Ye));var we=Le[Ye];if(we){we.startSlur&&(E+=we.startSlur.length),we.endSlur&&(E-=we.endSlur.length);var Ie=we.actualPitch?we.actualPitch:pe(we);if(p===m&&I){var nt=n(we);nt&&I[nt]&&(Ie=I[nt].sound)}var Se={cmd:"note",pitch:Ie,volume:it,start:x(H.time),duration:S(we.duration),instrument:p,startChar:H.elem.startChar,endChar:H.elem.endChar};if(Se=be(Se),H.gracenotes&&(Se.duration=Se.duration/2,Se.start=Se.start+Se.duration),H.elem&&H.elem.midiPitches.push(Se),ve.noteModification)ne(ve.noteModification,Se);else{switch(E>0?Se.endType="tenuto":se&&(Se.endType=se),Se.endType){case"tenuto":Se.gap=D;break;case"staccato":var Ct=Se.duration*L;Se.gap=o/60*Ct;break;default:Se.gap=N;break}v.push(Se)}}}v.length-1}var ct=ce(H);u=Math.max(u,x(H.time)+S(ct))}function ce(H){return H.pitches&&H.pitches.length>0&&H.pitches[0]?H.pitches[0].duration:H.elem?H.elem.duration:H.duration}var fe=[0,2,4,5,7,9,11];function pe(H){if(H.midipitch!==void 0)return H.midipitch;var W=H.pitch;if(H.accidental)switch(H.accidental){case"sharp":i[W]=1;break;case"flat":i[W]=-1;break;case"natural":i[W]=0;break;case"dblsharp":i[W]=2;break;case"dblflat":i[W]=-2;break;case"quartersharp":i[W]=.25;break;case"quarterflat":i[W]=-.25;break}var B=_e(W)*12+fe[Me(W)]+60;return i[W]!==void 0?B+=i[W]:B+=t[Me(W)],B+=a,B}function K(H){var W=[0,0,0,0,0,0,0];if(!H.accidentals)return W;for(var B=0;B<H.accidentals.length;B++){var G=H.accidentals[B],Q;switch(G.acc){case"flat":Q=-1;break;case"quarterflat":Q=-.25;break;case"sharp":Q=1;break;case"quartersharp":Q=.25;break;default:Q=0;break}var ae=G.note.toLowerCase(),ue=Me(ae.charCodeAt(0)-99);W[ue]+=Q}return W}function he(H,W){for(var B=0,G=[],Q,ae=0;ae<H.length;ae++)Q=H[ae],B+=Q.duration;var ue=W/2/B;for(ae=0;ae<H.length;ae++){Q=H[ae];var xe=pe(Q);if(p===m&&I){var se=n(Q);se&&I[se]&&(xe=I[se].sound)}var ve={pitch:xe,duration:Q.duration*ue};ve=be(ve),G.push(ve)}return G}function ee(H,W,B,G){var Q=[];B=Math.round(B);for(var ae=0;ae<H.length;ae++){var ue=H[ae];v.push({cmd:"note",pitch:ue.pitch,volume:B,start:W,duration:ue.duration,gap:0,instrument:G,style:"grace"}),Q.push({pitch:ue.pitch,durationInMeasures:ue.duration,volume:B,instrument:G}),W+=ue.duration}return Q}function be(H){var W=""+H.pitch;return W.indexOf(".75")>=0?(H.pitch=Math.round(H.pitch),H.cents=-50):W.indexOf(".25")>=0&&(H.pitch=Math.round(H.pitch),H.cents=50),H}function _e(H){return Math.floor(H/7)}function Me(H){return H=H%7,H<0&&(H+=7),H}function Ce(H){if(H.pattern.length===0||H.on===!1)return{on:!1};for(var W=H.pattern[0],B=[],G="",Q=0,ae=0;ae<W.length;ae++)if(W[ae]==="d"&&Q++,W[ae]==="d"||W[ae]==="z")G.length!==0?(B.push(G),G=W[ae]):G=G+W[ae];else{if(G.length===0)return{on:!1};G=G+W[ae]}if(G.length!==0&&B.push(G),H.pattern.length!==Q*2+1)return{on:!1};for(var ue={on:!0,bars:H.bars,pattern:[]},xe=U(c),se=0,ve=0;ve<B.length;ve++){G=B[ve];for(var Le=1,Ye=!1,we=0,Ie=1;Ie<G.length;Ie++)switch(G[Ie]){case"/":we!==0&&(Le*=we),we=0,Ye=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":we=we*10+G[Ie];break;default:return{on:!1}}Ye?(we===0&&(we=2),Le/=we):we&&(Le*=we),G[0]==="d"?(ue.pattern.push({len:Le*xe,pitch:H.pattern[1+se],velocity:H.pattern[1+se+Q]}),se++):ue.pattern.push({len:Le*xe,pitch:null})}return R=H.bars?H.bars:1,ue}function We(){if(!(!A||!A.pattern)){for(var H=A,W=0,B=c.num/c.den,G=0;G<H.pattern.length;G++)W+=H.pattern[G].len;var Q=W/R/B;for(G=0;G<H.pattern.length;G++)H.pattern[G].len=H.pattern[G].len/Q;A=H}}function Fe(H){if(!(z.length===0&&!A.on)){var W=c.num/c.den;if(z.length===0){if(u<W)return;z.push({cmd:"program",channel:H,instrument:m})}if(A.on)for(var B=b,G=0;G<A.pattern.length;G++){var Q=S(A.pattern[G].len);A.pattern[G].pitch&&z.push({cmd:"note",pitch:A.pattern[G].pitch,volume:A.pattern[G].velocity,start:B,duration:Q,gap:0,instrument:m}),B+=Q}}}function Ke(H,W){for(var B={},G=0;G<H.length;G++)for(var Q=0;Q<H[G].length;Q++){var ae=H[G][Q];ae.cmd==="note"&&(B[ae.start]===void 0&&(B[ae.start]=[]),B[ae.start].push({track:G,event:Q,pitch:ae.pitch}))}var ue=Object.keys(B);for(G=0;G<ue.length;G++){var xe=B[ue[G]];if(xe.length>1){xe=xe.sort(function(we,Ie){return we.pitch-Ie.pitch});var se=xe[xe.length-1],ve=se.pitch%12,Le=!1;for(Q=0;!Le&&Q<xe.length-1;Q++)xe[Q].pitch%12===ve&&(Le=!0);if(Le){var Ye=H[se.track][se.event];Ye.cents||(Ye.cents=0),Ye.cents+=W}}}}})(),ba=e,ba}var ya,Gl;function x7(){if(Gl)return ya;Gl=1;function e(l,d){d||(d={});for(var p=!!d.lineBreaks,v=[],f=!1,u=[],h=[],c=[],m=[],b=[],g=[],w=[],k=0;k<l.length;k++){var $=o(l[k]);if($.staff){if(f&&!$.vskip)for(var O=v[v.length-1],P=0;P<O.staff.length;P++){var y=$.staff[P],C=O.staff[P];if(y&&(s(y.meter,u[P])||(n(y.meter,y.voices),u[P]=y.meter,delete y.meter),s(y.key,h[P])||(i(y.key,y.voices),h[P]=y.key,delete y.key),y.title&&(C.abbrevTitle=y.title),s(y.clef,c[P])||(t(y.clef,y.voices),c[P]=y.clef,delete y.clef),s(y.vocalfont,m[P])||(a(y.vocalfont,y.voices,"vocalfont"),m[P]=y.vocalfont,delete y.vocalfont),s(y.gchordfont,b[P])||(a(y.gchordfont,y.voices,"gchordfont"),b[P]=y.gchordfont,delete y.gchordfont),s(y.tripletfont,g[P])||(a(y.tripletfont,y.voices,"tripletfont"),g[P]=y.tripletfont,delete y.tripletfont),s(y.annotationfont,w[P])||(a(y.annotationfont,y.voices,"annotationfont"),w[P]=y.annotationfont,delete y.annotationfont)),y)for(var E=0;E<C.voices.length;E++){var z=C.voices[E],A=y.voices[E];p&&z.push({el_type:"break"}),A&&(C.voices[E]=z.concat(A))}}else{for(var R=0;R<$.staff.length;R++)h[R]=$.staff[R].key,u[R]=$.staff[R].meter,c[R]=$.staff[R].clef;v.push(o($))}f=!0}else f=!1,v.push($)}return v}function r(l,d){return l==="abselem"?"abselem":d}function n(l,d){l.el_type="meter",l.startChar=-1,l.endChar=-1;for(var p=0;p<d.length;p++)d[p].unshift(l)}function i(l,d){l.el_type="key",l.startChar=-1,l.endChar=-1;for(var p=0;p<d.length;p++)d[p].unshift(l)}function t(l,d){l.el_type="clef",l.startChar=-1,l.endChar=-1;for(var p=0;p<d.length;p++)d[p].unshift(l)}function a(l,d,p){l.el_type="font",l.type=p,l.startChar=-1,l.endChar=-1;for(var v=0;v<d.length;v++)d[v].unshift(l)}function s(l,d){if(!l)return!0;var p=JSON.stringify(l,r),v=JSON.stringify(d,r);return p===v}function o(l){for(var d={},p=Object.keys(l),v=0;v<p.length;v++)if(p[v]!=="staff")d[p[v]]=l[p[v]];else{d.staff=[];for(var f=0;f<l.staff.length;f++){for(var u={},h=Object.keys(l.staff[f]),c=0;c<h.length;c++)if(h[c]!=="voices")u[h[c]]=l.staff[f][h[c]];else{u.voices=[];for(var m=0;m<l.staff[f].voices.length;m++)u.voices.push([].concat(l.staff[f].voices[m]))}d.staff.push(u)}}return d}return ya=e,ya}var _a,Jl;function ub(){if(Jl)return _a;Jl=1;var e=Et(),r=pt(),n=ob(),i=$7(),t=x7(),a=function(){this.reset=function(){this.version="1.1.0",this.media="screen",this.metaText={},this.metaTextInfo={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0,this.runningFonts={},delete this.visualTranspose},this.reset();function s(f,u,h,c){for(var m=0;m<c.length;m++)f[h][c[m]]=u[h][c[m]]}this.copyTopInfo=function(f){var u=["tempo","title","header","rhythm","origin","composer","author","partOrder"];s(this,f,"metaText",u),s(this,f,"metaTextInfo",u)},this.copyBottomInfo=function(f){var u=["unalignedWords","book","source","discography","notes","transcription","history","abc-copyright","abc-creator","abc-edited-by","footer"];s(this,f,"metaText",u),s(this,f,"metaTextInfo",u)},this.getBeatLength=function(){var f=this.getMeterFraction(),u=1;return f.num===6||f.num===9||f.num===12||f.num===3&&f.den===8?u=3:f.den===8&&(f.num===5||f.num===7)&&(u=2),u/f.den};function o(f,u){for(var h=0,c=0;c<f.length;c++)if(f[c].staff)for(var m=0;m<f[c].staff.length;m++)for(var b=0;b<f[c].staff[m].voices.length;b++)for(var g=f[c].staff[m].voices[b],w=1,k=0;k<g.length;k++){var $=g[k].rest&&g[k].rest.type==="spacer";if(g[k].startTriplet&&(w=g[k].tripletMultiplier),g[k].duration&&!$&&g[k].el_type!=="tempo"&&(h+=g[k].duration*w),g[k].endTriplet&&(w=1),h>=u&&(h-=u),g[k].el_type==="bar")return h}return h}this.getPickupLength=function(){var f=this.getBarLength(),u=o(this.lines,f);return u<1e-8||f-u<1e-8?0:u},this.getBarLength=function(){var f=this.getMeterFraction();return f.num/f.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(f){var u;if(f)u=f;else{var h=this.metaText?this.metaText.tempo:null;u=this.getBpm(h)}u<=0&&(u=1);var c=this.getBeatsPerMeasure(),m=c/u;return m*6e4},this.getBeatsPerMeasure=function(){var f=this.getBeatLength(),u=this.getBarLength();return u/f},this.getMeter=function(){for(var f=0;f<this.lines.length;f++){var u=this.lines[f];if(u.staff)for(var h=0;h<u.staff.length;h++){var c=u.staff[h].meter;if(c)return c}}return{type:"common_time"}},this.getMeterFraction=function(){var f=this.getMeter(),u=4,h=4;if(f)if(f.type==="specified"){if(f.value&&f.value.length>0&&f.value[0].num.indexOf("+")>0){var c=f.value[0].num.split("+");u=0;for(var m=0;m<c.length;m++)u+=parseInt(c[m],10)}else u=parseInt(f.value[0].num,10);h=parseInt(f.value[0].den,10)}else f.type==="cut_time"?(u=2,h=2):f.type==="common_time"&&(u=4,h=4);return this.meter={num:u,den:h},this.meter},this.getKeySignature=function(){for(var f=0;f<this.lines.length;f++){var u=this.lines[f];if(u.staff){for(var h=0;h<u.staff.length;h++)if(u.staff[h].key)return u.staff[h].key}}return{}},this.getElementFromChar=function(f){for(var u=0;u<this.lines.length;u++){var h=this.lines[u];if(h.staff)for(var c=0;c<h.staff.length;c++)for(var m=h.staff[c],b=0;b<m.voices.length;b++)for(var g=m.voices[b],w=0;w<g.length;w++){var k=g[w];if(k.startChar&&k.endChar&&k.startChar<=f&&k.endChar>f)return k}}return null};function l(f){for(var u,h,c,m,b=f.length-1;b>=0;b--){var g=f[b];g.type==="bar"?(g.top=c,g.nextTop=u,u=c,g.bottom=m,g.nextBottom=h,h=m):g.type==="event"&&(c=g.top,m=g.top+g.height)}}function d(f){var u=[];for(var h in f)f.hasOwnProperty(h)&&u.push(f[h]);return u=u.sort(function(c,m){var b=c.milliseconds-m.milliseconds;return b!==0?b:c.type==="bar"?-1:1}),u}this.addElementToEvents=function(f,u,h,c,m,b,g,w,k,$){if(u.hint)return{isTiedState:void 0,duration:0};var O=u.durationClass?u.durationClass:u.duration;if(u.abcelem.rest&&u.abcelem.rest.type==="spacer"&&(O=0),O>0){for(var P=[],y=0;y<u.elemset.length;y++)u.elemset[y]!==null&&P.push(u.elemset[y]);var C=u.startTie;if(k!==void 0)f["event"+k].elements.push(P),$&&(f["event"+h]||(f["event"+h]={type:"event",milliseconds:h,line:b,measureNumber:g,top:c,height:m,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),f["event"+h].measureStart=!0,$=!1),C||(k=void 0);else{if(!f["event"+h])f["event"+h]={type:"event",milliseconds:h,line:b,measureNumber:g,top:c,height:m,left:u.x,width:u.w,elements:[P],startChar:u.abcelem.startChar,endChar:u.abcelem.endChar,startCharArray:[u.abcelem.startChar],endCharArray:[u.abcelem.endChar],midiPitches:u.abcelem.midiPitches?e.cloneArray(u.abcelem.midiPitches):[]},u.abcelem.midiGraceNotePitches&&(f["event"+h].midiGraceNotePitches=e.cloneArray(u.abcelem.midiGraceNotePitches));else{if(f["event"+h].left?f["event"+h].left=Math.min(f["event"+h].left,u.x):f["event"+h].left=u.x,f["event"+h].elements.push(P),f["event"+h].startCharArray.push(u.abcelem.startChar),f["event"+h].endCharArray.push(u.abcelem.endChar),f["event"+h].startChar===null&&(f["event"+h].startChar=u.abcelem.startChar),f["event"+h].endChar===null&&(f["event"+h].endChar=u.abcelem.endChar),u.abcelem.midiPitches&&u.abcelem.midiPitches.length){f["event"+h].midiPitches||(f["event"+h].midiPitches=[]);for(var y=0;y<u.abcelem.midiPitches.length;y++)f["event"+h].midiPitches.push(u.abcelem.midiPitches[y])}if(u.abcelem.midiGraceNotePitches&&u.abcelem.midiGraceNotePitches.length){f["event"+h].midiGraceNotePitches||(f["event"+h].midiGraceNotePitches=[]);for(var E=0;E<u.abcelem.midiGraceNotePitches.length;E++)f["event"+h].midiGraceNotePitches.push(u.abcelem.midiGraceNotePitches[E])}}$&&(f["event"+h].measureStart=!0,$=!1)}}return{isTiedState:k,duration:O/w,nextIsBar:$||u.type==="bar"}},this.makeVoicesArray=function(){for(var f=[],u=[],h={},c=0;c<this.engraver.staffgroups.length;c++){var m=this.engraver.staffgroups[c];if(m&&m.staffs&&m.staffs.length>0){var b=m.staffs[0],g=b.absoluteY,w=g-b.top*r.STEP,k=m.staffs[m.staffs.length-1];g=k.absoluteY;for(var $=g-k.bottom*r.STEP,O=$-w,P=m.voices,y=0;y<P.length;y++)if(!(P[y].staff&&P[y].staff.isTabStaff)){var C=!1;f[y]||(f[y]=[]),u[y]===void 0&&(u[y]=0);for(var E=P[y].children,z=0;z<E.length;z++)E[z].type==="tempo"&&(h[u[y]]=this.getBpm(E[z].abcelem)),f[y].push({top:w,height:O,line:m.line,measureNumber:u[y],elem:E[z]}),E[z].type==="bar"&&C&&u[y]++,(E[z].type==="note"||E[z].type==="rest")&&(C=!0)}}}return this.tempoLocations=h,f},this.setupEvents=function(f,u,h,c){c||(c=1);for(var m=[],b={},g=f,w,k=!0,$=this.makeVoicesArray(),O=0,P=0;P<$.length;P++){var y=g,C=Math.round(y*1e3),E=0,z=-1,A=$[P],R=h;u=this.getBeatLength()*R/60;for(var T=-1,I=0;I<A.length;I++){var N=A[I].measureNumber;T!==N&&this.tempoLocations[N]&&(R=this.tempoLocations[N],u=c*this.getBeatLength()*R/60,T=N);var D=A[I].elem,L=this.addElementToEvents(b,D,C,A[I].top,A[I].height,A[I].line,A[I].measureNumber,u,w,k);w=L.isTiedState,k=L.nextIsBar,y+=L.duration;var _;if(D.duration>0&&b["event"+C]&&(_="event"+C),C=Math.round(y*1e3),D.type==="bar"){var x=D.abcelem.type,S=x==="bar_right_repeat"||x==="bar_dbl_repeat",M=D.abcelem.startEnding==="1",U=x==="bar_left_repeat"||x==="bar_dbl_repeat"||x==="bar_right_repeat";if(S){I>0&&(b[_].endX=D.x),z===-1&&(z=I);var q=0;T=-1;for(var j=E;j<z;j++){N=A[j].measureNumber,T!==N&&this.tempoLocations[N]&&(R=this.tempoLocations[N],u=c*this.getBeatLength()*R/60,T=N);var V=A[j].elem;L=this.addElementToEvents(b,V,C,A[j].top,A[j].height,A[j].line,A[j].measureNumber,u,w,k),w=L.isTiedState,k=L.nextIsBar,y+=L.duration,q=C,C=Math.round(y*1e3)}b["event"+q]&&(b["event"+q].endX=A[z].elem.x),k=!0,z=-1}M&&(z=I),U&&(E=I)}}O=Math.max(O,C)}return m=d(b),l(m),v(this.lines,m),m.push({type:"end",milliseconds:O}),this.addUsefulCallbackInfo(m,R*c),m},this.addUsefulCallbackInfo=function(f,u){for(var h=this.millisecondsPerMeasure(u),c=0;c<f.length;c++){var m=f[c];m.millisecondsPerMeasure=h}};function p(f,u){for(;u<f.length&&f[u].left===null;)u++;return f[u]}function v(f,u){if(!(u.length<1)){for(var h=0;h<u.length-1;h++){var c=u[h],m=p(u,h+1);if(c.left!==null){var b=m&&c.top===m.top?m.left:f[c.line].staffGroup.w;c.endX!==void 0?b>c.left&&(c.endX=Math.min(c.endX,b)):c.endX=b}}var g=u[u.length-1];g.endX=f[g.line].staffGroup.w}}this.getBpm=function(f){var u;if(f||(f=this.metaText?this.metaText.tempo:null),f){u=f.bpm;var h=this.getBeatLength(),c=f.duration&&f.duration.length>0?f.duration[0]:h;u=u*c/h}if(!u){u=180;var m=this.getMeterFraction();m&&m.num!==3&&m.num%3===0&&(u=120)}return u},this.setTiming=function(f,u){if(u=u||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var h=this.metaText?this.metaText.tempo:null,c=this.getBpm(h),m=1;f?h&&(m=f/c):f=c;var b=this.getBeatLength(),g=f/60,w=this.getBarLength(),k=w/b*u/g;k&&(k-=this.getPickupLength()/b/g);var $=b*g;return this.noteTimings=this.setupEvents(k,$,f,m),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*g):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(f){f||(f={});var u=n(this,f);return i(u,f,this.formatting.percmap,this.formatting.midi)},this.deline=function(f){return t(this.lines,f)},this.findSelectableElement=function(f){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(f):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}};return _a=a,_a}var wa,Wl;function S7(){if(Wl)return wa;Wl=1;var e=$u(),r=function(y){var C=this,E={},z="";y.reset(),this.setVisualTranspose=function(A){A!==void 0&&(y.visualTranspose=A)},this.cleanUp=function(A,R,T){u(y),delete y.runningFonts,i(y),y.metaText.tempo&&y.metaText.tempo.bpm&&!y.metaText.tempo.duration&&(y.metaText.tempo.duration=[y.getBeatLength()]);var I=!1,N,D,L;for(N=0;N<y.lines.length;N++)if(y.lines[N].staff!==void 0){var _=!1;for(D=0;D<y.lines[N].staff.length;D++)if(y.lines[N].staff[D]===void 0)I=!0,y.lines[N].staff[D]=null;else for(L=0;L<y.lines[N].staff[D].voices.length;L++)y.lines[N].staff[D].voices[L]===void 0?y.lines[N].staff[D].voices[L]=[]:h(y.lines[N].staff[D].voices[L])&&(_=!0);_||(y.lines[N]=null,I=!0)}if(I&&(y.lines=y.lines.filter(function(j){return!!j}),y.lines.forEach(function(j){j.staff&&(j.staff=j.staff.filter(function(V){return!!V}))})),A)for(;l(y.lines,A););if(R){for(I=!1,N=0;N<y.lines.length;N++)if(y.lines[N].staff!==void 0)for(D=0;D<y.lines[N].staff.length;D++){var x=!1;for(L=0;L<y.lines[N].staff[D].voices.length;L++)c(y.lines[N].staff[D].voices[L])&&(x=!0);x||(I=!0,y.lines[N].staff[D]=null)}I&&y.lines.forEach(function(j){j.staff&&(j.staff=j.staff.filter(function(V){return!!V}))})}for(s(y.lines),N=0;N<y.lines.length;N++)if(y.lines[N].staff)for(D=0;D<y.lines[N].staff.length;D++)delete y.lines[N].staff[D].workingClef;for(;t(y););for(var N=0;N<y.lines.length;N++){var S=y.lines[N].staff;if(S)for(y.staffNum=0;y.staffNum<S.length;y.staffNum++)for(S[y.staffNum].clef&&e.fixClef(S[y.staffNum].clef),y.voiceNum=0;y.voiceNum<S[y.staffNum].voices.length;y.voiceNum++){var M=S[y.staffNum].voices[y.voiceNum];o(M,y.staffNum,y.voiceNum,T);for(var U=0;U<M.length;U++)M[U].el_type==="clef"&&e.fixClef(M[U]);if(M.length>0&&M[M.length-1].barNumber){var q=p(y.lines,N);q&&(q.staff[0].barNumber=M[M.length-1].barNumber),delete M[M.length-1].barNumber}}}return delete y.staffNum,delete y.voiceNum,delete y.lineNum,delete y.potentialStartBeam,delete y.potentialEndBeam,delete y.vskipPending,T},this.addTieToLastNote=function(A){var R=v(y);return R&&R.pitches&&R.pitches.length>0?(R.pitches[0].startTie={},A&&(R.pitches[0].startTie.style="dotted"),!0):!1},this.appendElement=function(A,R,T,I){if(I.el_type=A,R!==null&&(I.startChar=R),T!==null&&(I.endChar=T),A==="note"){var N=f(I);N>=.25||I.force_end_beam_last&&y.potentialStartBeam!==void 0?w(y):I.end_beam&&y.potentialStartBeam!==void 0?I.rest===void 0?g(I,y):w(y):I.rest===void 0&&(y.potentialStartBeam===void 0?I.end_beam||(y.potentialStartBeam=I,delete y.potentialEndBeam):y.potentialEndBeam=I)}else w(y);return delete I.end_beam,delete I.force_end_beam_last,I.rest&&I.rest.type==="invisible"&&delete I.decoration,y.lines.length<=y.lineNum||y.lines[y.lineNum].staff.length<=y.staffNum?!1:(b(C,y,I,E,z),!0)},this.appendStartingElement=function(A,R,T,I){u(y);var N;A==="key"&&(N=I.impliedNaturals,delete I.impliedNaturals,delete I.explicitAccidentals);var D=Object.assign({},I);if(y.lines[y.lineNum]){var L=y.lines[y.lineNum].staff;if(L){L.length<=y.staffNum&&(L[y.staffNum]={},L[y.staffNum].clef=Object.assign({},L[0].clef),L[y.staffNum].key=Object.assign({},L[0].key),L[0].meter&&(L[y.staffNum].meter=Object.assign({},L[0].meter)),L[y.staffNum].workingClef=Object.assign({},L[0].workingClef),L[y.staffNum].voices=[[]]),A==="clef"&&(L[y.staffNum].workingClef=D);for(var _=L[y.staffNum].voices[y.voiceNum],x=0;x<_.length;x++){if(_[x].el_type==="note"||_[x].el_type==="bar"){D.el_type=A,D.startChar=R,D.endChar=T,N&&(D.accidentals=N.concat(D.accidentals)),_.push(D);return}if(_[x].el_type===A){D.el_type=A,D.startChar=R,D.endChar=T,N&&(D.accidentals=N.concat(D.accidentals)),_[x]=D;return}}L[y.staffNum][A]=I}}},this.addSubtitle=function(A,R){m(y,{subtitle:{text:A,startChar:R.startChar,endChar:R.endChar}})},this.addSpacing=function(A){y.vskipPending=A},this.addNewPage=function(A){m(y,{newpage:A})},this.addSeparator=function(A,R,T,I){m(y,{separator:{spaceAbove:Math.round(A),spaceBelow:Math.round(R),lineLength:Math.round(T),startChar:I.startChar,endChar:I.endChar}})},this.addText=function(A,R){m(y,{text:{text:A,startChar:R.startChar,endChar:R.endChar}})},this.addCentered=function(A){m(y,{text:[{text:A,center:!0}]})},this.changeVoiceScale=function(A){C.appendElement("scale",null,null,{size:A})},this.changeVoiceColor=function(A){C.appendElement("color",null,null,{color:A})},this.startNewLine=function(A){u(y),A.currentVoiceName&&(z=A.currentVoiceName,E[A.currentVoiceName]=A),y.lines[y.lineNum]===void 0?P(C,y,A):y.lines[y.lineNum].staff===void 0?(y.lineNum++,this.startNewLine(A)):y.lines[y.lineNum].staff[y.staffNum]===void 0?O(C,y,A):y.lines[y.lineNum].staff[y.staffNum].voices[y.voiceNum]===void 0?$(C,y,A):h(y.lines[y.lineNum].staff[y.staffNum].voices[y.voiceNum])?(y.lineNum++,this.startNewLine(A)):A.part&&C.appendElement("part",A.part.startChar,A.part.endChar,{title:A.part.title})},this.setRunningFont=function(A,R){y.runningFonts[A]=R},this.setBarNumberImmediate=function(A){var R=this.getCurrentVoice();if(R&&R.length>0){var T=R[R.length-1];if(T.el_type==="bar")T.barNumber!==void 0&&(T.barNumber=A);else return A-1}return A},this.hasBeginMusic=function(){for(var A=0;A<y.lines.length;A++)if(y.lines[A].staff)return!0;return!1},this.isFirstLine=function(A){for(var R=A-1;R>=0;R--)if(y.lines[R].staff!==void 0)return!1;return!0},this.getCurrentVoice=function(){var A=d(y.lines,y.lineNum);if(!A)return null;var R=A.staff[y.staffNum];return R&&R.voices[y.voiceNum]!==void 0?R.voices[y.voiceNum]:null},this.setCurrentVoice=function(A,R,T){y.staffNum=A,y.voiceNum=R,z=T;for(var I=0;I<y.lines.length;I++)if(y.lines[I].staff&&(y.lines[I].staff[A]===void 0||y.lines[I].staff[A].voices[R]===void 0||!h(y.lines[I].staff[A].voices[R])))return y.lineNum=I,!!(!y.lines[I].staff[A]||y.lines[I].staff[A].voices[R]);return y.lineNum=I,!1},this.addMetaText=function(A,R,T){y.metaText[A]===void 0?(y.metaText[A]=R,y.metaTextInfo[A]=T):(typeof y.metaText[A]=="string"&&typeof R=="string"?y.metaText[A]+=`
|
|
130
|
-
`+
|
|
131
|
-
`)),
|
|
132
|
-
`))}function t(y){for(var C=!1,E=[],z=0;z<y.lines.length;z++){var A=y.lines[z];if(A.staff)for(var R=0;R<A.staff.length;R++){for(var T=A.staff[R],I=[],N=0;N<T.voices.length;N++){var D=T.voices[N];I.push({hasOverlay:!1,voice:[],snip:[]}),E[z]=0;for(var L=0,_=!1,x=-1,S=0;S<D.length;S++){var M=D[S];if(M.el_type==="overlay"&&!_){C=!0,_=!0,x=S,I[N].hasOverlay=!0;for(var U=0;U<z;U++)E[U]&&y.lines[U].staff&&T.voices.length>=y.lines[U].staff[0].voices.length&&y.lines[U].staff[0].voices.push([{el_type:"note",duration:E[U],rest:{type:"invisible"},startChar:M.startChar,endChar:M.endChar}])}else M.el_type==="bar"?(_?(_=!1,I[N].snip.push({start:x,len:S-x}),I[N].voice.push(M)):(L>0&&I[N].voice.push({el_type:"note",duration:L,rest:{type:"invisible"},startChar:M.startChar,endChar:M.endChar}),I[N].voice.push(M)),L=0):M.el_type==="note"?_?I[N].voice.push(M):(!M.rest||M.rest.type!=="spacer")&&(L+=M.duration,E[z]+=M.duration):(M.el_type==="scale"||M.el_type==="stem"||M.el_type==="overlay"||M.el_type==="style"||M.el_type==="transpose"||M.el_type==="color")&&I[N].voice.push(M)}I[N].hasOverlay&&I[N].snip.length===0&&I[N].snip.push({start:x,len:D.length-x})}for(N=0;N<I.length;N++){var q=I[N];if(q.hasOverlay){q.voice.splice(0,0,{el_type:"stem",direction:"down"}),T.voices.push(q.voice);for(var j=q.snip.length-1;j>=0;j--){var V=q.snip[j];T.voices[N].splice(V.start,V.len),T.voices[N].splice(V.start+1,0,{el_type:"stem",direction:"auto"});var ne=a(T.voices[N],V.start);T.voices[N].splice(ne,0,{el_type:"stem",direction:"up"})}for(j=0;j<T.voices[T.voices.length-1].length;j++){T.voices[T.voices.length-1][j]=Object.assign({},T.voices[T.voices.length-1][j]);var Y=T.voices[T.voices.length-1][j];Y.el_type==="bar"&&Y.startEnding&&delete Y.startEnding,Y.el_type==="bar"&&Y.endEnding&&delete Y.endEnding}}}}}return C}function a(y,C){for(var E=C-1;E>0&&y[E].el_type!=="bar";E--);return E}function s(y){for(var C=!0,E=0;E<y.length;E++){var z=y[E];if(z.staff){for(var A=0;A<z.staff.length;A++){var R=z.staff[A];if(R.title){for(var T=!1,I=0;I<R.title.length;I++)R.title[I]?(R.title[I]=C?R.title[I].name:R.title[I].subname,R.title[I]?T=!0:R.title[I]=""):R.title[I]="";T||delete R.title}}C=!1}}}function o(y,C,E,z){z[C]||(z[C]=[]),z[C][E]||(z[C][E]=[]);for(var A,R=function(j,V,ne){if(z[C][E][ne]===void 0){for(A=0;A<z[C][E].length;A++)if(z[C][E][A]!==void 0){ne=A;break}if(z[C][E][ne]===void 0){var Y=ne*100+1;j.endSlur.forEach(function(pe){Y===pe&&--Y}),z[C][E][ne]=[Y]}}for(var ce,fe=0;fe<V;fe++)ce=z[C][E][ne].pop(),j.endSlur.push(ce);return z[C][E][ne].length===0&&delete z[C][E][ne],ce},T=function(j,V,ne,Y){j.startSlur=[],z[C][E][ne]===void 0&&(z[C][E][ne]=[]);for(var ce=ne*100+1,fe=0;fe<V;fe++)Y&&(Y.forEach(function(pe){ce===pe&&++ce}),Y.forEach(function(pe){ce===pe&&++ce}),Y.forEach(function(pe){ce===pe&&++ce})),z[C][E][ne].forEach(function(pe){ce===pe&&++ce}),z[C][E][ne].forEach(function(pe){ce===pe&&++ce}),z[C][E][ne].push(ce),j.startSlur.push({label:ce}),j.dottedSlur&&(j.startSlur[j.startSlur.length-1].style="dotted",delete j.dottedSlur),ce++},I=0;I<y.length;I++){var N=y[I];if(N.el_type==="note"){if(N.gracenotes)for(var D=0;D<N.gracenotes.length;D++){if(N.gracenotes[D].endSlur){var L=N.gracenotes[D].endSlur;N.gracenotes[D].endSlur=[];for(var _=0;_<L;_++)R(N.gracenotes[D],1,20)}N.gracenotes[D].startSlur&&(A=N.gracenotes[D].startSlur,T(N.gracenotes[D],A,20))}if(N.endSlur&&(A=N.endSlur,N.endSlur=[],R(N,A,0)),N.startSlur&&(A=N.startSlur,T(N,A,0)),N.pitches){for(var x=[],S=0;S<N.pitches.length;S++)if(N.pitches[S].endSlur){var M=N.pitches[S].endSlur;N.pitches[S].endSlur=[];for(var U=0;U<M;U++){var q=R(N.pitches[S],1,S+1);x.push(q)}}for(S=0;S<N.pitches.length;S++)N.pitches[S].startSlur&&(A=N.pitches[S].startSlur,T(N.pitches[S],A,S+1,x));N.gracenotes&&N.pitches[0].endSlur&&N.pitches[0].endSlur[0]===100&&N.pitches[0].startSlur&&(N.gracenotes[0].endSlur?N.gracenotes[0].endSlur.push(N.pitches[0].startSlur[0].label):N.gracenotes[0].endSlur=[N.pitches[0].startSlur[0].label],N.pitches[0].endSlur.length===1?delete N.pitches[0].endSlur:N.pitches[0].endSlur[0]===100?N.pitches[0].endSlur.shift():N.pitches[0].endSlur[N.pitches[0].endSlur.length-1]===100&&N.pitches[0].endSlur.pop(),z[C][E][1].length===1?delete z[C][E][1]:z[C][E][1].pop())}}}}function l(y,C){for(var E=0;E<y.length;E++)if(y[E].staff!==void 0)for(var z=0;z<y[E].staff.length;z++)for(var A=[],R=0;R<y[E].staff[z].voices.length;R++)for(var T=y[E].staff[z].voices[R],I=0,N=0;N<T.length;N++)if(T[N].el_type==="bar"){if(I++,I>=C&&N<T.length-1){var D=p(y,E);if(!D){var L=JSON.parse(JSON.stringify(y[E]));y.push(Object.assign({},L)),D=y[y.length-1];for(var _=0;_<D.staff.length;_++)for(var x=0;x<D.staff[_].voices.length;x++)D.staff[_].voices[x]=[]}var S=N+1,M=y[E].staff[z].voices[R].slice(S);return y[E].staff[z].voices[R]=y[E].staff[z].voices[R].slice(0,S),D.staff[z].voices[R]=A.concat(M.concat(D.staff[z].voices[R])),!0}}else T[N].duration||A.push(T[N]);return!1}function d(y,C){if(y.length<=C)return null;for(;C>=0;){if(y[C].staff)return y[C];C--}return null}function p(y,C){for(C++;y.length>C;){if(y[C].staff)return y[C];C++}return null}function v(y){if(!y.lines[y.lineNum]||!y.lines[y.lineNum].staff||!y.lines[y.lineNum].staff[y.staffNum])return null;var C=y.lines[y.lineNum].staff[y.staffNum].voices[y.voiceNum];if(!C)return null;for(var E=C.length-1;E>=0;E--){var z=C[E];if(z.el_type==="note")return z}return null}function f(y){return y.duration?y.duration:0}function u(y){y.potentialStartBeam&&y.potentialEndBeam&&(y.potentialStartBeam.startBeam=!0,y.potentialEndBeam.endBeam=!0),delete y.potentialStartBeam,delete y.potentialEndBeam}function h(y){for(var C=0;C<y.length;C++)if(y[C].el_type==="note"||y[C].el_type==="bar")return!0;return!1}function c(y){for(var C=0;C<y.length;C++)if(y[C].el_type==="note"&&(y[C].rest===void 0||y[C].chord!==void 0))return!0;return!1}function m(y,C){y.vskipPending&&(C.vskip=y.vskipPending,delete y.vskipPending),y.lines.push(C)}function b(y,C,E,z,A){var R=C.lines[C.lineNum].staff[C.staffNum];if(E.pitches!==void 0){var T=R.workingClef.verticalPos;E.pitches.forEach(function(N){N.verticalPos=N.pitch-T})}if(E.gracenotes!==void 0){var I=R.workingClef.verticalPos;E.gracenotes.forEach(function(N){N.verticalPos=N.pitch-I})}R.voices.length<=C.voiceNum&&(z[A]||(z[A]={}),$(y,C,z[A])),R.voices[C.voiceNum].push(E)}function g(y,C){C.potentialStartBeam.startBeam=!0,y.endBeam=!0,delete C.potentialStartBeam,delete C.potentialEndBeam}function w(y){y.potentialStartBeam!==void 0&&y.potentialEndBeam!==void 0&&(y.potentialStartBeam.startBeam=!0,y.potentialEndBeam.endBeam=!0),delete y.potentialStartBeam,delete y.potentialEndBeam}function k(y,C,E){if(y.runningFonts[C]){for(var z=!1,A=Object.keys(E),R=0;R<A.length;R++)y.runningFonts[C][A[R]]!==E[A[R]]&&(z=!0);z&&(y.lines[y.lineNum].staff[y.staffNum][C]=E)}y.runningFonts[C]=E}function $(y,C,E){var z=C.lines[C.lineNum].staff[C.staffNum];if(z.voices[C.voiceNum]=[],z.title||(z.title=[]),z.title[C.voiceNum]={name:E.name,subname:E.subname},E.style&&y.appendElement("style",null,null,{head:E.style}),E.stem)y.appendElement("stem",null,null,{direction:E.stem});else if(C.voiceNum>0){if(z.voices[0]!==void 0){for(var A=!1,R=0;R<z.voices[0].length;R++)z.voices[0].el_type==="stem"&&(A=!0);if(!A){var T={el_type:"stem",direction:"up"};z.voices[0].splice(0,0,T)}}y.appendElement("stem",null,null,{direction:"down"})}E.scale&&y.appendElement("scale",null,null,{size:E.scale}),E.color&&y.appendElement("color",null,null,{color:E.color})}function O(y,C,E){E.key&&E.key.impliedNaturals&&(E.key.accidentals=E.key.accidentals.concat(E.key.impliedNaturals),delete E.key.impliedNaturals),C.lines[C.lineNum].staff[C.staffNum]={voices:[],clef:E.clef,key:E.key,workingClef:E.clef};var z=C.lines[C.lineNum].staff[C.staffNum];E.stafflines!==void 0&&(z.clef.stafflines=E.stafflines,z.workingClef.stafflines=E.stafflines),E.staffscale&&(z.staffscale=E.staffscale),E.annotationfont&&k(C,"annotationfont",E.annotationfont),E.gchordfont&&k(C,"gchordfont",E.gchordfont),E.tripletfont&&k(C,"tripletfont",E.tripletfont),E.vocalfont&&k(C,"vocalfont",E.vocalfont),E.bracket&&(z.bracket=E.bracket),E.brace&&(z.brace=E.brace),E.connectBarLines&&(z.connectBarLines=E.connectBarLines),E.barNumber&&(z.barNumber=E.barNumber),$(y,C,E),E.part&&y.appendElement("part",E.part.startChar,E.part.endChar,{title:E.part.title}),E.meter!==void 0&&(z.meter=E.meter),C.vskipPending&&(C.lines[C.lineNum].vskip=C.vskipPending,delete C.vskipPending)}function P(y,C,E){C.lines[C.lineNum]={staff:[]},O(y,C,E)}return wa=r,wa}var ka,Yl;function lb(){if(Yl)return ka;Yl=1;var e=Et(),r=ku(),n=m7(),i=b7(),t=y7(),a=sb(),s=_7(),o=ub(),l=S7(),d=function(){var p=new o,v=new l(p),f,u="",h="";this.getTune=function(){var T={formatting:p.formatting,lines:p.lines,media:p.media,metaText:p.metaText,metaTextInfo:p.metaTextInfo,version:p.version,addElementToEvents:p.addElementToEvents,addUsefulCallbackInfo:p.addUsefulCallbackInfo,getTotalTime:p.getTotalTime,getTotalBeats:p.getTotalBeats,getBarLength:p.getBarLength,getBeatLength:p.getBeatLength,getBeatsPerMeasure:p.getBeatsPerMeasure,getBpm:p.getBpm,getMeter:p.getMeter,getMeterFraction:p.getMeterFraction,getPickupLength:p.getPickupLength,getKeySignature:p.getKeySignature,getElementFromChar:p.getElementFromChar,makeVoicesArray:p.makeVoicesArray,millisecondsPerMeasure:p.millisecondsPerMeasure,setupEvents:p.setupEvents,setTiming:p.setTiming,setUpAudio:p.setUpAudio,deline:p.deline,findSelectableElement:p.findSelectableElement,getSelectableArray:p.getSelectableArray};return p.lineBreaks&&(T.lineBreaks=p.lineBreaks),p.visualTranspose&&(T.visualTranspose=p.visualTranspose),p.chordGrid&&(T.chordGrid=p.chordGrid),T};function c(T,I,N){T.positioning||(T.positioning={}),T.positioning[I]=N}function m(T,I,N){T.fonts||(T.fonts={}),T.fonts[I]=N}var b={reset:function(){for(var T in this)this.hasOwnProperty(T)&&typeof this[T]!="function"&&delete this[T];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(T,I){return this[T].decoration!==I[T].decoration||this[T].face!==I[T].face||this[T].size!==I[T].size||this[T].style!==I[T].style||this[T].weight!==I[T].weight},addFormattingOptions:function(T,I,N){N==="note"?(this.vocalPosition!=="auto"&&c(T,"vocalPosition",this.vocalPosition),this.dynamicPosition!=="auto"&&c(T,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&c(T,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&c(T,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&c(T,"volumePosition",this.volumePosition),this.differentFont("annotationfont",I)&&m(T,"annotationfont",this.annotationfont),this.differentFont("gchordfont",I)&&m(T,"gchordfont",this.gchordfont),this.differentFont("vocalfont",I)&&m(T,"vocalfont",this.vocalfont),this.differentFont("tripletfont",I)&&m(T,"tripletfont",this.tripletfont)):N==="bar"&&(this.dynamicPosition!=="auto"&&c(T,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&c(T,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&c(T,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&c(T,"volumePosition",this.volumePosition),this.differentFont("measurefont",I)&&m(T,"measurefont",this.measurefont),this.differentFont("repeatfont",I)&&m(T,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var T=0;T<this.inTie.length;T++)if(this.endingHoldOver.inTie.push([]),this.inTie[T])for(var I=0;I<this.inTie[T].length;I++)this.endingHoldOver.inTie[T].push(this.inTie[T][I]);for(var N in this.inTieChord)this.inTieChord.hasOwnProperty(N)&&(this.endingHoldOver.inTieChord[N]=this.inTieChord[N])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var T=0;T<this.endingHoldOver.inTie.length;T++){this.inTie.push([]);for(var I=0;I<this.endingHoldOver.inTie[T].length;I++)this.inTie[T].push(this.endingHoldOver.inTie[T][I])}for(var N in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(N)&&(this.inTieChord[N]=this.endingHoldOver.inTieChord[N])}}},g=function(T){b.warnings||(b.warnings=[]),b.warnings.push(T)},w=function(T){b.warningObjects||(b.warningObjects=[]),b.warningObjects.push(T)},k=function(T){var I=T.replace(/\x12/g," ");return I=I.replace(/&/g,"&"),I=I.replace(/</g,"<"),I.replace(/>/g,">")},$=function(T,I,N){I||(I=" ");var D=I[N];(D===" "||!D)&&(D="SPACE");var L=k(I.substring(N-64,N))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+D+"</span>"+k(I.substring(N+1).substring(0,64));g("Music Line:"+f.lineIndex+":"+(N+1)+": "+T+": "+L),w({message:T,line:I,startChar:b.iChar+N,column:N})},O,P;this.getWarnings=function(){return b.warnings},this.getWarningObjects=function(){return b.warningObjects};var y=function(T,I){if(I.indexOf("")>=0){u+=I;return}if(I=u+I,u="",!T){$("Can't add words before the first line of music",T,0);return}I=e.strip(I),I[I.length-1]!=="-"&&(I=I+" ");for(var N=[],D=0,L=!1,_=function(M){var U=e.strip(I.substring(D,M));if(U=U.replace(/\\([-_*|~])/g,"$1"),D=M+1,U.length>0){L&&(U=U.replace(/~/g," "));var q=I[M];return q!=="_"&&q!=="-"&&(q=" "),N.push({syllable:f.translateString(U),divider:q}),L=!1,!0}return!1},x=!1,S=0;S<I.length;S++){switch(I[S]){case" ":case"":_(S);break;case"-":!x&&!_(S)&&N.length>0&&(e.last(N).divider="-",N.push({skip:!0,to:"next"}));break;case"_":x||(_(S),N.push({skip:!0,to:"slur"}));break;case"*":x||(_(S),N.push({skip:!0,to:"next"}));break;case"|":x||(_(S),N.push({skip:!0,to:"bar"}));break;case"~":x||(L=!0);break}x=I[S]==="\\"}T.forEach(function(M){if(N.length!==0){if(N[0].skip){switch(N[0].to){case"next":M.el_type==="note"&&M.pitches!==null&&N.shift();break;case"slur":M.el_type==="note"&&M.pitches!==null&&N.shift();break;case"bar":M.el_type==="bar"&&N.shift();break}M.el_type!=="bar"&&(M.lyric===void 0?M.lyric=[{syllable:"",divider:" "}]:M.lyric.push({syllable:"",divider:" "}))}else if(M.el_type==="note"&&M.rest===void 0){var U=N.shift();U.syllable&&(U.syllable=U.syllable.replace(/ +/g," ")),M.lyric===void 0?M.lyric=[U]:M.lyric.push(U)}}})},C=function(T,I){if(I.indexOf("")>=0){h+=I;return}if(I=h+I,h="",!T){$("Can't add symbols before the first line of music",T,0);return}I=e.strip(I),I[I.length-1]!=="-"&&(I=I+" ");for(var N=[],D=0,L=!1,_=function(S){var M=e.strip(I.substring(D,S));if(D=S+1,M.length>0){L&&(M=M.replace(/~/g," "));var U=I[S];return U!=="_"&&U!=="-"&&(U=" "),N.push({syllable:f.translateString(M),divider:U}),L=!1,!0}return!1},x=0;x<I.length;x++)switch(I[x]){case" ":case"":_(x);break;case"-":!_(x)&&N.length>0&&(e.last(N).divider="-",N.push({skip:!0,to:"next"}));break;case"_":_(x),N.push({skip:!0,to:"slur"});break;case"*":_(x),N.push({skip:!0,to:"next"});break;case"|":_(x),N.push({skip:!0,to:"bar"});break;case"~":L=!0;break}T.forEach(function(S){if(N.length!==0){if(N[0].skip)switch(N[0].to){case"next":S.el_type==="note"&&S.pitches!==null&&N.shift();break;case"slur":S.el_type==="note"&&S.pitches!==null&&N.shift();break;case"bar":S.el_type==="bar"&&N.shift();break}else if(S.el_type==="note"&&S.rest===void 0){var M=N.shift();S.lyric===void 0?S.lyric=[M]:S.lyric.push(M)}}})},E=function(T){if(e.startsWith(T,"%%")){var I=r.addDirective(T.substring(2));I&&$(I,T,2);return}var N=T.indexOf("%");if(N>=0&&(T=T.substring(0,N)),T=T.replace(/\s+$/,""),T.length!==0){if(u){y(v.getCurrentVoice(),T.substring(2));return}if(h){C(v.getCurrentVoice(),T.substring(2));return}if(T.length<2||T[1]!==":"||P.lineContinuation){P.parseMusic(T);return}var D=O.parseHeader(T);D.regular&&P.parseMusic(T),D.newline&&P.startNewLine(),D.words&&y(v.getCurrentVoice(),T.substring(2)),D.symbols&&C(v.getCurrentVoice(),T.substring(2))}};function z(T,I){T.push({el_type:"hint"});for(var N=0;N<I.length;N++){var D=I[N],L=Object.assign({},D);if(T.push(L),D.el_type==="bar")return}}function A(T,I){for(var N=0;N<T.length;N++){var D=T[N],L=I[N];if(L)for(var _=0;_<L.voices.length;_++){var x=L.voices[_],S=D.voices[_];S&&z(S,x)}}}function R(){for(var T=0;T<p.lines.length;T++){var I=p.lines[T].staff;if(I){for(var N=T+1;N<p.lines.length&&p.lines[N].staff===void 0;)N++;if(N<p.lines.length){var D=p.lines[N].staff;A(I,D)}}}}this.parse=function(T,I,N){I||(I={}),N||(N=0),p.reset(),T=T.replace(/\r\n?/g,`
|
|
83
|
+
- "app": Tool callable by the app from this server only`)});Y({mimeTypes:fe(U()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});Y({method:G("ui/download-file"),params:Y({contents:fe(ye([dl,pl])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})});Y({method:G("ui/message"),params:Y({role:G("user").describe('Message role, currently only "user" is supported.'),content:fe(Ut).describe("Message content blocks (text, image, etc.).")})});Y({method:G("ui/notifications/sandbox-resource-ready"),params:Y({html:U().describe("HTML content to load into the inner iframe."),sandbox:U().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:Da.optional().describe("CSP configuration from resource metadata."),permissions:Fa.optional().describe("Sandbox permissions from resource metadata.")})});var J2=Y({method:G("ui/notifications/tool-result"),params:hr.describe("Standard MCP tool execution result.")}),bl=Y({toolInfo:Y({id:Dt.optional().describe("JSON-RPC id of the tools/call request."),tool:Oa.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:B2.optional().describe("Current color theme preference."),styles:j2.optional().describe("Style configuration for theming the app."),displayMode:Bt.optional().describe("How the UI is currently displayed."),availableDisplayModes:fe(Bt).optional().describe("Display modes the host supports."),containerDimensions:ye([Y({height:me().describe("Fixed container height in pixels.")}),Y({maxHeight:ye([me(),la()]).optional().describe("Maximum container height in pixels.")})]).and(ye([Y({width:me().describe("Fixed container width in pixels.")}),Y({maxWidth:ye([me(),la()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
84
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:U().optional().describe("User's language and region preference in BCP 47 format."),timeZone:U().optional().describe("User's timezone in IANA format."),userAgent:U().optional().describe("Host application identifier."),platform:ye([G("web"),G("desktop"),G("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:Y({touch:Ae().optional().describe("Whether the device supports touch input."),hover:Ae().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:Y({top:me().describe("Top safe area inset in pixels."),right:me().describe("Right safe area inset in pixels."),bottom:me().describe("Bottom safe area inset in pixels."),left:me().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),Q2=Y({method:G("ui/notifications/host-context-changed"),params:bl.describe("Partial context update containing only changed fields.")});Y({method:G("ui/update-model-context"),params:Y({content:fe(Ut).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:Ce(U(),Te().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});Y({method:G("ui/initialize"),params:Y({appInfo:lr.describe("App identification (name and version)."),appCapabilities:V2.describe("Features and capabilities this app provides."),protocolVersion:U().describe("Protocol version this app supports.")})});var eg=Y({protocolVersion:U().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:lr.describe("Host application identification and version."),hostCapabilities:W2.describe("Features and capabilities provided by the host."),hostContext:bl.describe("Rich context about the host environment.")}).passthrough();class tg extends z2{constructor(a,n={},r={autoResize:!0}){super(r);Ge(this,"_appInfo");Ge(this,"_capabilities");Ge(this,"options");Ge(this,"_hostCapabilities");Ge(this,"_hostInfo");Ge(this,"_hostContext");Ge(this,"sendOpenLink",this.openLink);this._appInfo=a,this._capabilities=n,this.options=r,this.setRequestHandler(ur,i=>(console.log("Received ping:",i.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(a){this.setNotificationHandler($2,n=>a(n.params))}set ontoolinputpartial(a){this.setNotificationHandler(Z2,n=>a(n.params))}set ontoolresult(a){this.setNotificationHandler(J2,n=>a(n.params))}set ontoolcancelled(a){this.setNotificationHandler(G2,n=>a(n.params))}set onhostcontextchanged(a){this.setNotificationHandler(Q2,n=>{this._hostContext={...this._hostContext,...n.params},a(n.params)})}set onteardown(a){this.setRequestHandler(Y2,(n,r)=>a(n.params,r))}set oncalltool(a){this.setRequestHandler(vl,(n,r)=>a(n.params,r))}set onlisttools(a){this.setRequestHandler(gl,(n,r)=>a(n.params,r))}assertCapabilityForMethod(a){}assertRequestHandlerCapability(a){switch(a){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${a})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${a} registered`)}}assertNotificationCapability(a){}assertTaskCapability(a){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(a){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(a,n){if(typeof a=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${a}"). Did you mean: callServerTool({ name: "${a}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:a},hr,n)}async readServerResource(a,n){return await this.request({method:"resources/read",params:a},fl,n)}async listServerResources(a,n){return await this.request({method:"resources/list",params:a},hl,n)}sendMessage(a,n){return this.request({method:"ui/message",params:a},H2,n)}sendLog(a){return this.notification({method:"notifications/message",params:a})}updateModelContext(a,n){return this.request({method:"ui/update-model-context",params:a},xa,n)}openLink(a,n){return this.request({method:"ui/open-link",params:a},D2,n)}downloadFile(a,n){return this.request({method:"ui/download-file",params:a},F2,n)}requestDisplayMode(a,n){return this.request({method:"ui/request-display-mode",params:a},X2,n)}sendSizeChanged(a){return this.notification({method:"ui/notifications/size-changed",params:a})}setupSizeChangedNotifications(){let a=!1,n=0,r=0,i=()=>{a||(a=!0,requestAnimationFrame(()=>{a=!1;let u=document.documentElement,f=u.style.width,g=u.style.height;u.style.width="fit-content",u.style.height="max-content";let d=u.getBoundingClientRect();u.style.width=f,u.style.height=g;let p=window.innerWidth-u.clientWidth,l=Math.ceil(d.width+p),o=Math.ceil(d.height);(l!==n||o!==r)&&(n=l,r=o,this.sendSizeChanged({width:l,height:o}))}))};i();let c=new ResizeObserver(i);return c.observe(document.documentElement),c.observe(document.body),()=>c.disconnect()}async connect(a=new q2(window.parent,window.parent),n){var r;if(this.transport)throw Error("App is already connected. Call close() before connecting again.");await super.connect(a);try{let i=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:I2}},eg,n);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);this._hostCapabilities=i.hostCapabilities,this._hostInfo=i.hostInfo,this._hostContext=i.hostContext,await this.notification({method:"ui/notifications/initialized"}),(r=this.options)!=null&&r.autoResize&&this.setupSizeChangedNotifications()}catch(i){throw this.close(),i}}}function rg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mr,Si;function ng(){if(Si)return mr;Si=1;var e="6.6.0";return mr=e,mr}var br,Ti;function Ha(){if(Ti)return br;Ti=1;var e=function(a,n){var r=this;if(n||(n={}),r.qpm=n.qpm?parseInt(n.qpm,10):null,!r.qpm){var i=a.metaText?a.metaText.tempo:null;r.qpm=a.getBpm(i)}r.extraMeasuresAtBeginning=n.extraMeasuresAtBeginning?parseInt(n.extraMeasuresAtBeginning,10):0,r.beatCallback=n.beatCallback,r.eventCallback=n.eventCallback,r.lineEndCallback=n.lineEndCallback,r.lineEndAnticipation=n.lineEndAnticipation?parseInt(n.lineEndAnticipation,10):0,r.beatSubdivisions=n.beatSubdivisions?parseInt(n.beatSubdivisions,10):1,r.beatSubdivisions||(r.beatSubdivisions=1),r.joggerTimer=null,r.replaceTarget=function(u){if(r.noteTimings=u.setTiming(r.qpm,r.extraMeasuresAtBeginning),u.noteTimings.length===0&&(r.noteTimings=u.setTiming(0,0)),r.lineEndCallback&&(r.lineEndTimings=t(u.noteTimings,r.lineEndAnticipation)),r.startTime=null,r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.currentTime=0,r.isPaused=!1,r.isRunning=!1,r.pausedPercent=null,r.justUnpaused=!1,r.newSeekPercent=0,r.lastTimestamp=0,r.noteTimings.length!==0){r.millisecondsPerBeat=1e3/(r.qpm/60)/r.beatSubdivisions,r.lastMoment=r.noteTimings[r.noteTimings.length-1].milliseconds;var f=u.getMeter(),g="";if(f&&f.type==="specified"&&f.value&&f.value.length>0&&f.value[0].num.indexOf("+")>0&&(g=f.value[0].num),r.beatStarts=[],g){for(var d=r.noteTimings[r.noteTimings.length-1].millisecondsPerMeasure,p=r.lastMoment/d,l=g.split("+"),o=0;o<l.length;o++)l[o]=parseInt(l[o],10)/2;for(var h=0,s=0,v=0;v<p;v++)for(var y=v*d,m=0,_=0;_<l.length;_++){var k=l[_];if(r.beatSubdivisions===1)r.beatSubdivisions===1&&h<r.lastMoment&&r.beatStarts.push({b:s,ts:h}),h+=k*r.millisecondsPerBeat;else for(var x=k*r.beatSubdivisions,R=0;R<Math.floor(x);R++){var I=R/x,b=Math.round(y+m*r.millisecondsPerBeat);b<r.lastMoment&&r.beatStarts.push({b:s+I,ts:b}),m++}s++}r.beatStarts.push({b:p*l.length,ts:r.lastMoment}),r.totalBeats=r.beatStarts.length}else{r.totalBeats=Math.round(r.lastMoment/r.millisecondsPerBeat);for(var A=0;A<r.totalBeats+1;A++)r.beatStarts.push({b:A/r.beatSubdivisions,ts:Math.round(A*r.millisecondsPerBeat)})}}},r.replaceTarget(a),r.doTiming=function(u){if(r.lastTimestamp!==u&&(r.lastTimestamp=u,!r.isPaused&&r.isRunning)){for(r.startTime||(r.startTime=u),r.currentTime=u-r.startTime,r.currentTime+=16;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;){if(r.eventCallback&&r.noteTimings[r.currentEvent].type==="event"){var f=r.startTime;r.eventCallback(r.noteTimings[r.currentEvent]),f!==r.startTime&&(r.currentTime=u-r.startTime)}r.currentEvent++}if(r.lineEndCallback&&r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds<r.currentTime&&r.currentEvent<r.noteTimings.length){var g=r.noteTimings[r.currentEvent].milliseconds===r.currentTime?r.noteTimings[r.currentEvent]:r.noteTimings[r.currentEvent-1];r.lineEndCallback(r.lineEndTimings[r.currentLine],g,{line:r.currentLine,endTimings:r.lineEndTimings,currentTime:r.currentTime}),r.currentLine++}if(r.currentTime<r.lastMoment){if(requestAnimationFrame(r.doTiming),r.currentBeat<r.beatStarts.length&&r.beatStarts[r.currentBeat].ts<=r.currentTime){var d=r.doBeatCallback(u);r.currentBeat++,d!==null&&(r.currentTime=d)}}else if(r.currentBeat<=r.totalBeats&&r.beatCallback){var p=r.doBeatCallback(u);r.currentBeat++,p!==null&&(r.currentTime=p),requestAnimationFrame(r.doTiming)}if(r.currentTime>=r.lastMoment)if(r.eventCallback){var l=r.eventCallback(null);r.shouldStop(l).then(function(o){o&&r.stop()})}else r.stop()}},r.shouldStop=function(u){return new Promise(function(f){if(!u)return f(!0);if(u==="continue")return f(!1);u.then&&u.then(function(g){f(g!=="continue")})})},r.doBeatCallback=function(u){if(r.beatCallback){for(var f=r.currentEvent;f<r.noteTimings.length&&r.noteTimings[f].left===null;)f++;var g,d;if(f<r.noteTimings.length){for(g=r.noteTimings[f].milliseconds,f=Math.max(0,r.currentEvent-1);f>=0&&r.noteTimings[f].left===null;)f--;d=r.noteTimings[f]}var p={},l={};if(d){p.top=d.top,p.height=d.height;var o=Math.max(0,u-r.startTime-d.milliseconds),h=g-d.milliseconds,s=d.endX-d.left,v=h?o*s/h:0;p.left=d.left+v,r.currentEvent===0&&d.milliseconds>u-r.startTime&&(p.left=void 0),l={timestamp:u,startTime:r.startTime,ev:d,endMs:g,offMs:o,offPx:v,gapMs:h,gapPx:s}}else l={timestamp:u,startTime:r.startTime};var y=r.startTime;if(r.beatCallback(r.beatStarts[r.currentBeat].b,r.totalBeats/r.beatSubdivisions,r.lastMoment,p,l),y!==r.startTime)return u-r.startTime}return null};var c=60;r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,c))},r.start=function(u,f){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,u===void 0&&(r.justUnpaused=!0)),u)r.setProgress(u,f);else if(u===0)r.reset();else if(r.pausedPercent!==null){var g=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=g-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,c)},r.pause=function(){r.isPaused=!0;var u=performance.now();r.pausedPercent=(u-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.currentMillisecond=function(){return r.currentTime},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(u,f){var g;switch(f){case"seconds":r.currentTime=u*1e3,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),g=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=u*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),g=r.currentTime/r.lastMoment;break;default:g=u,g<0&&(g=0),g>1&&(g=1),r.currentTime=r.lastMoment*g;break}r.isRunning||(r.pausedPercent=g);var d=performance.now();for(r.startTime=d-r.currentTime,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;)r.currentEvent++;if(r.lineEndCallback)for(r.currentLine=0;r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation<r.currentTime;)r.currentLine++;var p=r.currentBeat;for(r.currentBeat=0;r.currentBeat<r.beatStarts.length&&!(r.beatStarts[r.currentBeat].ts>r.currentTime);r.currentBeat++);r.currentBeat--,r.beatCallback&&p!==r.currentBeat&&(r.doBeatCallback(r.startTime+r.currentTime),r.currentBeat++),r.eventCallback&&r.currentEvent>=0&&r.noteTimings[r.currentEvent].type==="event"&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,c)}};function t(a,n){for(var r=[],i=null,c=0;c<a.length;c++){var u=a[c];u.type!=="end"&&u.top!==i&&(r.push({measureNumber:u.measureNumber,milliseconds:u.milliseconds-n,top:u.top,bottom:u.top+u.height}),i=u.top)}return r}return br=e,br}var yr,Ei;function ag(){if(Ei)return yr;Ei=1;var e=Ha(),t={};return(function(){var a,n;t.startAnimation=function(r,i,c){a&&(a.stop(),a=void 0),c.showCursor&&(n=r.querySelector(".abcjs-cursor"),n||(n=document.createElement("DIV"),n.className="abcjs-cursor cursor",n.style.position="absolute",r.appendChild(n),r.style.position="relative"));function u(h){for(var s=0;s<h.length;s++){var v=h[s];v.classList.contains("abcjs-bar")||(v.style.display="none")}}var f;function g(h){if(f){var s=r.querySelectorAll(f);u(s)}f=h}function d(h){var s=r.querySelectorAll(h);u(s)}function p(h){c.hideCurrentMeasure?d(h):c.hideFinishedMeasures&&g(h)}function l(h){return".abcjs-l"+h.line+".abcjs-m"+h.measureNumber}function o(h){if(h){if(h.measureStart){var s=l(h);s&&p(s)}n&&(n.style.left=h.left+"px",n.style.top=h.top+"px",n.style.width=h.width+"px",n.style.height=h.height+"px")}else a.stop(),a=void 0}a=new e(i,{qpm:c.bpm,eventCallback:o}),a.start()},t.pauseAnimation=function(r){a&&(r?a.pause():a.start())},t.stopAnimation=function(){a&&(a.stop(),a=void 0)}})(),yr=t,yr}var wr,Ai;function nt(){if(Ai)return wr;Ai=1;var e={};return e.cloneArray=function(t){for(var a=[],n=0;n<t.length;n++)a.push(Object.assign({},t[n]));return a},e.cloneHashOfHash=function(t){var a={};for(var n in t)t.hasOwnProperty(n)&&(a[n]=Object.assign({},t[n]));return a},e.cloneHashOfArrayOfHash=function(t){var a={};for(var n in t)t.hasOwnProperty(n)&&(a[n]=e.cloneArray(t[n]));return a},e.strip=function(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")},e.startsWith=function(t,a){return t.indexOf(a)===0},e.endsWith=function(t,a){var n=t.length-a.length;return n>=0&&t.lastIndexOf(a)===n},e.last=function(t){return t.length===0?null:t[t.length-1]},wr=e,wr}var _r,Mi;function $a(){if(Mi)return _r;Mi=1;var e=nt(),t={};return(function(){var a,n,r,i,c;t.initialize=function(w,C,S,q,D){a=w,n=C,r=S,i=q,c=D,u()};function u(){r.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},i.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},i.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},i.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},i.formatting.annotationfont=r.annotationfont,i.formatting.gchordfont=r.gchordfont,i.formatting.historyfont=r.historyfont,i.formatting.infofont=r.infofont,i.formatting.measurefont=r.measurefont,i.formatting.partsfont=r.partsfont,i.formatting.repeatfont=r.repeatfont,i.formatting.textfont=r.textfont,i.formatting.tripletfont=r.tripletfont,i.formatting.vocalfont=r.vocalfont,i.formatting.wordsfont=r.wordsfont}var f={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},g=function(w){switch(w){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}},d=function(w,C,S,q,D){function $(){var Se=parseInt(w[0].token);return w.shift(),C?w.length===0?{face:C.face,weight:C.weight,style:C.style,decoration:C.decoration,size:Se}:w.length===1&&w[0].token==="box"&&f[D]?{face:C.face,weight:C.weight,style:C.style,decoration:C.decoration,size:Se,box:!0}:(n("Extra parameters in font definition.",S,q),{face:C.face,weight:C.weight,style:C.style,decoration:C.decoration,size:Se}):(n("Can't set just the size of the font since there is no default value.",S,q),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:Se})}if(w[0].token==="*"){if(w.shift(),w[0].type==="number")return $();n("Expected font size number after *.",S,q)}if(w[0].type==="number")return $();for(var F=[],K,te="normal",V="normal",ae="none",oe=!1,le="face",J=!1;w.length;){var ce=w.shift(),ee=ce.token.toLowerCase();switch(le){case"face":J||ee!=="utf"&&ce.type!=="number"&&ee!=="bold"&&ee!=="italic"&&ee!=="underline"&&ee!=="box"?F.length>0&&ce.token==="-"?(J=!0,F[F.length-1]=F[F.length-1]+ce.token):J?(J=!1,F[F.length-1]=F[F.length-1]+ce.token):F.push(ce.token):ce.type==="number"?(K?n("Font size specified twice in font definition.",S,q):K=ce.token,le="modifier"):ee==="bold"?te="bold":ee==="italic"?V="italic":ee==="underline"?ae="underline":ee==="box"?(f[D]?oe=!0:n(`This font style doesn't support "box"`,S,q),le="finished"):ee==="utf"?(ce=w.shift(),le="size"):n("Unknown parameter "+ce.token+" in font definition.",S,q);break;case"size":ce.type==="number"?K?n("Font size specified twice in font definition.",S,q):K=ce.token:n("Expected font size in font definition.",S,q),le="modifier";break;case"modifier":ee==="bold"?te="bold":ee==="italic"?V="italic":ee==="underline"?ae="underline":ee==="box"?(f[D]?oe=!0:n(`This font style doesn't support "box"`,S,q),le="finished"):n("Unknown parameter "+ce.token+" in font definition.",S,q);break;case"finished":n('Extra characters found after "box" in font definition.',S,q);break}}K===void 0?C?K=C.size:(n("Must specify the size of the font since there is no default value.",S,q),K=12):K=parseFloat(K),F=F.join(" "),F===""&&(C?F=C.face:(n("Must specify the name of the font since there is no default value.",S,q),F="sans-serif"));var he=g(F),de={};return he?(de.face=he.face,de.weight=he.weight,de.style=he.style,de.decoration=he.decoration,de.size=K,oe&&(de.box=!0),de):(de.face=F,de.weight=te,de.style=V,de.decoration=ae,de.size=K,oe&&(de.box=!0),de)},p=function(w,C,S){return C.length===0?'Directive "'+w+'" requires a font as a parameter.':(r[w]=d(C,r[w],S,0,w),r.is_in_header&&(i.formatting[w]=r[w]),null)},l=function(w,C,S){return C.length===0?'Directive "'+w+'" requires a font as a parameter.':(i.formatting[w]=d(C,i.formatting[w],S,0,w),null)},o=function(w,C){var S="";C.forEach(function(D){S+=D.token});var q=parseFloat(S);if(isNaN(q)||q===0)return'Directive "'+w+'" requires a number as a parameter.';i.formatting.scale=q},h=["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"],s=function(w){var C=w.split(/\s+/);if(C.length!==2&&C.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var S=C[0],q=parseInt(C[1],10);if((isNaN(q)||q<35||q>81)&&C[1]&&(q=h.indexOf(C[1].toLowerCase())+35),isNaN(q)||q<35||q>81)return{error:'Expected drum name, received "'+C[1]+'"'};var D={sound:q};return C.length===3&&(D.noteHead=C[2]),{key:S,value:D}},v=function(w,C){var S=a.getMeasurement(C);return S.used===0||C.length!==0?{error:'Directive "'+w+'" requires a measurement as a parameter.'}:S.value},y=function(w,C){var S=a.getMeasurement(C);return S.used===0||C.length!==0?'Directive "'+w+'" requires a measurement as a parameter.':(i.formatting[w]=S.value,null)},m=function(w,C,S,q,D){if(S.length!==1||S[0].type!=="number")return'Directive "'+C+'" requires a number as a parameter.';var $=S[0].intt;return q!==void 0&&$<q?'Directive "'+C+'" requires a number greater than or equal to '+q+" as a parameter.":D!==void 0&&$>D?'Directive "'+C+'" requires a number less than or equal to '+D+" as a parameter.":(r[w]=$,null)},_=function(w,C,S){if(S.length===1&&(S[0].token==="true"||S[0].token==="false"))return r[w]=S[0].token==="true",null;var q=m(w,C,S,0,1);return q!==null?q:(r[w]=r[w]===1,null)},k=function(w,C,S,q){if(S.length!==1)return'Directive "'+C+'" requires one of [ '+q.join(", ")+" ] as a parameter.";for(var D=S[0].token,$=!1,F=0;!$&&F<q.length;F++)q[F]===D&&($=!0);return $?(r[w]=D,null):'Directive "'+C+'" requires one of [ '+q.join(", ")+" ] as a parameter."},x=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],R=["gchord","ptstress","beatstring"],I=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],b=["program"],A=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],N=["beat"],M=["drone"],z=["portamento"],L=["expand","grace","trim"],E=["drum","chordname"],T=["bassprog","chordprog"],P=function(w,C,S){var q=w.shift().token,D=[];if(x.indexOf(q)>=0)w.length!==0&&n("Unexpected parameter in MIDI "+q,S,0);else if(R.indexOf(q)>=0)w.length!==1?n("Expected one parameter in MIDI "+q,S,0):D.push(w[0].token);else if(I.indexOf(q)>=0)w.length!==1?n("Expected one parameter in MIDI "+q,S,0):w[0].type!=="number"?n("Expected one integer parameter in MIDI "+q,S,0):D.push(w[0].intt);else if(b.indexOf(q)>=0)w.length!==1&&w.length!==2?n("Expected one or two parameters in MIDI "+q,S,0):w[0].type!=="number"||w.length===2&&w[1].type!=="number"?n("Expected integer parameter in MIDI "+q,S,0):(D.push(w[0].intt),w.length===2&&D.push(w[1].intt));else if(A.indexOf(q)>=0)w.length!==2?n("Expected two parameters in MIDI "+q,S,0):w[0].type!=="number"||w[1].type!=="number"?n("Expected two integer parameters in MIDI "+q,S,0):(D.push(w[0].intt),D.push(w[1].intt));else if(z.indexOf(q)>=0)w.length!==2?n("Expected two parameters in MIDI "+q,S,0):w[0].type!=="alpha"||w[1].type!=="number"?n("Expected one string and one integer parameters in MIDI "+q,S,0):(D.push(w[0].token),D.push(w[1].intt));else if(q==="drummap")w.length===2&&w[0].type==="alpha"&&w[1].type==="number"?(C.formatting||(C.formatting={}),C.formatting.midi||(C.formatting.midi={}),C.formatting.midi.drummap||(C.formatting.midi.drummap={}),C.formatting.midi.drummap[w[0].token]=w[1].intt,D=C.formatting.midi.drummap):w.length===3&&w[0].type==="punct"&&w[1].type==="alpha"&&w[2].type==="number"?(C.formatting||(C.formatting={}),C.formatting.midi||(C.formatting.midi={}),C.formatting.midi.drummap||(C.formatting.midi.drummap={}),C.formatting.midi.drummap[w[0].token+w[1].token]=w[2].intt,D=C.formatting.midi.drummap):n("Expected one note name and one integer parameter in MIDI "+q,S,0);else if(L.indexOf(q)>=0)w.length!==3||w[0].type!=="number"||w[1].token!=="/"||w[2].type!=="number"?n("Expected fraction parameter in MIDI "+q,S,0):(D.push(w[0].intt),D.push(w[2].intt));else if(N.indexOf(q)>=0)w.length!==4?n("Expected four parameters in MIDI "+q,S,0):w[0].type!=="number"||w[1].type!=="number"||w[2].type!=="number"||w[3].type!=="number"?n("Expected four integer parameters in MIDI "+q,S,0):(D.push(w[0].intt),D.push(w[1].intt),D.push(w[2].intt),D.push(w[3].intt));else if(M.indexOf(q)>=0)w.length!==5?n("Expected five parameters in MIDI "+q,S,0):w[0].type!=="number"||w[1].type!=="number"||w[2].type!=="number"||w[3].type!=="number"||w[4].type!=="number"?n("Expected five integer parameters in MIDI "+q,S,0):(D.push(w[0].intt),D.push(w[1].intt),D.push(w[2].intt),D.push(w[3].intt),D.push(w[4].intt));else if(b.indexOf(q)>=0)w.length!==1||w.length!==4?n("Expected one or two parameters in MIDI "+q,S,0):w[0].type!=="number"?n("Expected integer parameter in MIDI "+q,S,0):w.length===4?(w[1].token!=="octave"&&n("Expected octave parameter in MIDI "+q,S,0),w[2].token!=="="&&n("Expected octave parameter in MIDI "+q,S,0),w[3].type!=="number"&&n("Expected integer parameter for octave in MIDI "+q,S,0)):(D.push(w[0].intt),w.length===4&&D.push(w[3].intt));else if(E.indexOf(q)>=0)if(w.length<2)n("Expected string parameter and at least one integer parameter in MIDI "+q,S,0);else if(w[0].type!=="alpha")n("Expected string parameter and at least one integer parameter in MIDI "+q,S,0);else{var $=w.shift();for(D.push($.token);w.length>0;)$=w.shift(),$.type!=="number"&&n("Expected integer parameter in MIDI "+q,S,0),D.push($.intt)}else if(T.indexOf(q)>=0){if(w.length!==1&&w.length!==2)n("Expected one or two parameters in MIDI "+q,S,0);else if(w[0].type!=="number")n("Expected integer parameter in MIDI "+q,S,0);else if(w.length===2&&w[1].type!=="alpha")n("Expected alpha parameter in MIDI "+q,S,0);else if(D.push(w[0].intt),w.length===2){var F=w[1].token;F.indexOf("octave=")!=-1?(F=F.replace("octave=",""),F=parseInt(F),isNaN(F)?n("Expected octave value in MIDI"+q):(F<-1&&(n("Expected octave= in MIDI "+q+" to be >= -1 (recv:"+F+")"),F=-1),F>3&&(n("Expected octave= in MIDI "+q+" to be <= 3 (recv:"+F+")"),F=3),D.push(F))):n("Expected octave= in MIDI"+q)}}c.hasBeginMusic()?c.appendElement("midi",-1,-1,{cmd:q,params:D}):(C.formatting.midi===void 0&&(C.formatting.midi={}),C.formatting.midi[q]=D)};t.parseFontChangeLine=function(w){w=w.replace(/\$\$/g,"");var C=w.split("$");if(C.length>1&&r.setfont){var S=[];C[0]!==""&&S.push({text:C[0]});for(var q=1;q<C.length;q++)if(C[q][0]==="0")S.push({text:C[q].substring(1).replace(/\x03/g,"$$")});else{var D=parseInt(C[q][0],10);r.setfont[D]?S.push({font:r.setfont[D],text:C[q].substring(1).replace(/\x03/g,"$$")}):S[S.length-1].text+="$"+C[q].replace(/\x03/g,"$$")}return S}return w.replace(/\x03/g,"$$")};var B=["auto","above","below","hidden"];t.addDirective=function(w){var C=a.tokenize(w,0,w.length);if(C.length===0||C[0].type!=="alpha")return null;var S=w.substring(w.indexOf(C[0].token)+C[0].token.length);S=a.stripComment(S);var q=C.shift().token.toLowerCase(),D="",$;switch(q){case"bagpipes":i.formatting.bagpipes=!0;break;case"flatbeams":i.formatting.flatbeams=!0;break;case"jazzchords":i.formatting.jazzchords=!0;break;case"accentAbove":i.formatting.accentAbove=!0;break;case"germanAlphabet":i.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=S;break;case"graceslurs":if(C.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(C[0].token==="0"||C[0].token==="false")i.formatting.graceSlurs=!1;else if(C[0].token==="1"||C[0].token==="true")i.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+C[0].token+")";break;case"lineThickness":var F=O(C);if(F.value!==void 0&&(i.formatting.lineThickness=F.value),F.error)return F.error;break;case"stretchlast":var K=O(C);if(K.value!==void 0&&(i.formatting.stretchlast=K.value),K.error)return K.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":i.formatting.titleleft=!0;break;case"measurebox":i.formatting.measurebox=!0;break;case"vocal":return k("vocalPosition",q,C,B);case"dynamic":return k("dynamicPosition",q,C,B);case"gchord":return k("chordPosition",q,C,B);case"ornament":return k("ornamentPosition",q,C,B);case"volume":return k("volumePosition",q,C,B);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 y(q,C);case"voicescale":if(C.length!==1||C[0].type!=="number")return"voicescale requires one float as a parameter";var te=C.shift();return r.currentVoice&&(r.currentVoice.scale=te.floatt,c.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(C.length!==1)return"voicecolor requires one string as a parameter";var V=C.shift();return r.currentVoice&&(r.currentVoice.color=V.token,c.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var ae=Math.round(v(q,C));return ae.error?ae.error:(c.addSpacing(ae),null);case"scale":o(q,C);break;case"sep":if(C.length===0)c.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var oe=a.getMeasurement(C);if(oe.used===0)return'Directive "'+q+'" requires 3 numbers: space above, space below, length of line';var le=oe.value;if(oe=a.getMeasurement(C),oe.used===0)return'Directive "'+q+'" requires 3 numbers: space above, space below, length of line';var J=oe.value;if(oe=a.getMeasurement(C),oe.used===0||C.length!==0)return'Directive "'+q+'" requires 3 numbers: space above, space below, length of line';var ce=oe.value;c.addSeparator(le,J,ce,{startChar:r.iChar,endChar:r.iChar+S.length})}break;case"barsperstaff":if(D=m("barsperstaff",q,C),D!==null)return D;break;case"staffnonote":if(C.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(C[0].token==="0")r.staffnonote=!0;else if(C[0].token==="1")r.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+C[0].token+")";break;case"printtempo":if(D=_("printTempo",q,C),D!==null)return D;break;case"partsbox":if(D=_("partsBox",q,C),D!==null)return D;r.partsfont.box=r.partsBox;break;case"freegchord":if(D=_("freegchord",q,C),D!==null)return D;break;case"measurenb":case"barnumbers":if(D=m("barNumbers",q,C),D!==null)return D;break;case"setbarnb":if(C.length!==1||C[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=c.setBarNumberImmediate(C[0].intt);break;case"keywarn":if(C.length!==1||C[0].type!=="number"||C[0].intt!==1&&C[0].intt!==0)return"Directive "+q+" requires 0 or 1 as a parameter.";r[q]=C[0].intt===1;break;case"begintext":var ee="";for($=a.nextLine();$&&$.indexOf("%%endtext")!==0;){if(e.startsWith($,"%%")){var he=$.substring(2);he=he.trim()+`
|
|
85
|
+
`,ee+=he}else ee+=$.trim()+`
|
|
86
|
+
`;$=a.nextLine()}c.addText(ee,{startChar:r.iChar,endChar:r.iChar+ee.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for($=a.nextLine();$&&$.indexOf("%%endps")!==0;)a.nextLine();n("Postscript ignored",w,0);break;case"deco":S.length>0&&r.ignoredDecorations.push(S.substring(0,S.indexOf(" "))),n("Decoration redefinition ignored",w,0);break;case"text":var de=a.translateString(S);c.addText(t.parseFontChangeLine(de),{startChar:r.iChar,endChar:r.iChar+S.length+7});break;case"center":var Se=a.translateString(S);c.addCentered(t.parseFontChangeLine(Se));break;case"font":break;case"setfont":var we=a.tokenize(S,0,S.length);if(we.length>=4&&we[0].token==="-"&&we[1].type==="number"){var Re=parseInt(we[1].token);Re>=1&&Re<=9&&(r.setfont||(r.setfont=[]),we.shift(),we.shift(),r.setfont[Re]=d(we,r.setfont[Re],w,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 p(q,C,w);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return l(q,C,w);case"barlabelfont":case"barnumberfont":case"barnumfont":return p("measurefont",C,w);case"staves":case"score":r.score_is_present=!0;for(var ze=function(ct,Xl,ei,ti,Kl){(Xl||r.staves.length===0)&&r.staves.push({index:r.staves.length,numVoices:0});var lt=e.last(r.staves);ei!==void 0&<.bracket===void 0&&(lt.bracket=ei),ti!==void 0&<.brace===void 0&&(lt.brace=ti),Kl&&(lt.connectBarLines="end"),r.voices[ct]===void 0&&(r.voices[ct]={staffNum:lt.index,index:lt.numVoices},lt.numVoices++)},Oe=!1,Z=!1,W=!1,H=!1,j=!1,Q=!1,re=!1,ie,ge=function(){if(re=!0,ie){var ct="start";ie.staffNum>0&&(r.staves[ie.staffNum-1].connectBarLines==="start"||r.staves[ie.staffNum-1].connectBarLines==="continue")&&(ct="continue"),r.staves[ie.staffNum].connectBarLines=ct}};C.length;){var ne=C.shift();switch(ne.token){case"(":Oe?n("Can't nest parenthesis in %%score",w,ne.start):(Oe=!0,H=!0);break;case")":!Oe||H?n("Unexpected close parenthesis in %%score",w,ne.start):Oe=!1;break;case"[":Z?n("Can't nest brackets in %%score",w,ne.start):(Z=!0,j=!0);break;case"]":!Z||j?n("Unexpected close bracket in %%score",w,ne.start):(Z=!1,r.staves[ie.staffNum].bracket="end");break;case"{":W?n("Can't nest braces in %%score",w,ne.start):(W=!0,Q=!0);break;case"}":!W||Q?n("Unexpected close brace in %%score",w,ne.start):(W=!1,r.staves[ie.staffNum].brace="end");break;case"|":ge();break;default:for(var ue="";(ne.type==="alpha"||ne.type==="number")&&(ue+=ne.token,ne.continueId);)ne=C.shift();var Ee=!Oe||H,qe=j?"start":Z?"continue":void 0,pe=Q?"start":W?"continue":void 0;ze(ue,Ee,qe,pe,re),H=!1,j=!1,Q=!1,re=!1,ie=r.voices[ue],q==="staves"&&ge();break}}break;case"maxstaves":var be=a.getInt(S);be.digits===0?n("Expected number of staves in maxstaves"):be.value>0&&(i.formatting.maxStaves=be.value);break;case"newpage":var $e=a.getInt(S);c.addNewPage($e.digits===0?-1:$e.value);break;case"abc":var ve=S.split(" ");switch(ve[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var rt=ve.shift();c.addMetaText(q+rt,ve.join(" "),{startChar:r.iChar,endChar:r.iChar+S.length+5});break;default:return"Unknown directive: "+q+ve[0]}break;case"header":case"footer":var Ue=a.getMeat(S,0,S.length);Ue=S.substring(Ue.start,Ue.end),Ue[0]==='"'&&Ue[Ue.length-1]==='"'&&(Ue=Ue.substring(1,Ue.length-1));var Ze=Ue.split(" "),st={};Ze.length===1?st={left:"",center:Ze[0],right:""}:Ze.length===2?st={left:Ze[0],center:Ze[1],right:""}:st={left:Ze[0],center:Ze[1],right:Ze[2]},Ze.length>3&&n("Too many tabs in "+q+": "+Ze.length+" found.",S,0),c.addMetaTextObj(q,st,{startChar:r.iChar,endChar:r.iChar+w.length});break;case"midi":var ot=a.tokenize(S,0,S.length,!0);ot.length>0&&ot[0].token==="="&&ot.shift(),ot.length===0?n("Expected midi command",S,0):P(ot,i,S);break;case"percmap":var vt=s(S);vt.error?n(vt.error,w,8):(i.formatting.percmap||(i.formatting.percmap={}),i.formatting.percmap[vt.key]=vt.value);break;case"visualtranspose":var kt=a.getInt(S);kt.digits===0?n("Expected number of half steps in visualTranspose"):r.globalTranspose=kt.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":i.formatting[q]=S;break;default:return"Unknown directive: "+q}return null},t.globalFormatting=function(w){for(var C in w)if(w.hasOwnProperty(C)){var S=""+w[C],q=a.tokenize(S,0,S.length),D;switch(C){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":p(C,q,S);break;case"scale":o(C,q);break;case"partsbox":D=_("partsBox",C,q),D!==null&&n(D),r.partsfont.box=r.partsBox;break;case"freegchord":D=_("freegchord",C,q),D!==null&&n(D);break;case"fontboxpadding":(q.length!==1||q[0].type!=="number")&&n('Directive "'+C+'" requires a number as a parameter.'),i.formatting.fontboxpadding=q[0].floatt;break;case"stafftopmargin":(q.length!==1||q[0].type!=="number")&&n('Directive "'+C+'" requires a number as a parameter.'),i.formatting.stafftopmargin=q[0].floatt;break;case"stretchlast":var $=O(q);if($.value!==void 0&&(i.formatting.stretchlast=$.value),$.error)return $.error;break;default:n("Formatting directive unrecognized: ",C,0)}}};function O(w){if(w.length===0)return{value:1};if(w.length===1)if(w[0].type==="number"){if(w[0].floatt>=0||w[0].floatt<=1)return{value:w[0].floatt}}else{if(w[0].token==="false")return{value:0};if(w[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+w[0].token+")"}}})(),_r=t,_r}var kr,Ni;function ig(){if(Ni)return kr;Ni=1;var e={};const t=["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 e.pitchIndex=function(a){return t.indexOf(a)},e.noteName=function(a){return t[a]},kr=e,kr}var xr,Pi;function yl(){if(Pi)return xr;Pi=1;var e=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],t=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],a=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],n=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];function r(i,c,u,f){if(!c||c%12===0)return i;for(;c<0;)c+=12;c>11&&(c=c%12);var g=i.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!g)return i;var d=g[1],p=g[2],l=g[3],o=g[4],h=e.indexOf(d);if(h<0&&(h=t.indexOf(d)),h<0&&(h=a.indexOf(d)),h<0&&(h=n.indexOf(d)),h<0)return i;h+=c,h=h%12,u?f?i=n[h]:i=t[h]:f?i=a[h]:i=e[h];var s=p&&(p.indexOf("dim")>=0||p.indexOf("°")>=0);if(s&&i==="A#"&&(i="Bb"),s&&i==="D#"&&(i="Eb"),s&&i==="A♯"&&(i="B♭"),s&&i==="D♯"&&(i="E♭"),p&&(i+=p),l){var h=e.indexOf(l);h<0&&(h=t.indexOf(l)),h<0&&(h=a.indexOf(l)),h<0&&(h=n.indexOf(l)),i+="/",h>=0?(h+=c,h=h%12,u?f?i+=n[h]:i+=t[h]:f?i+=a[h]:i+=e[h]):i+=l}return o&&(i+=o),i}return xr=r,xr}var Cr,zi;function wl(){if(zi)return Cr;zi=1;var e={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}},t=["maj","ion","min","aeo","m","mix","dor","phr","lyd","loc"];function a(f){return t.indexOf(f.toLowerCase())>=0}var n=null;function r(){n={};for(var f=Object.keys(e),g=0;g<f.length;g++){var d=e[f[g]];n[f[g].toLowerCase()]=f[g];for(var p=0;p<d.modes.length;p++){var l=d.modes[p].toLowerCase();n[l]=f[g]}}}function i(f){n||r();var g=f.toLowerCase().match(/([a-g][b#]?)(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)?/);if(!g||!g[2])return f;g=g[1]+g[2];var d=n[g];return d||f}function c(f,g){var d=e[f];if(!d||g==="")return f;var p=g.toLowerCase().match(/^(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)/);if(!p)return f;for(var l=p[1],o=0;o<d.modes.length;o++){var h=d.modes[o],s=h.toLowerCase().indexOf(l);if(s!==-1&&s===h.length-l.length)return h.substring(0,h.length-l.length)}return f}function u(f,g){var d=e[f];if(!d)return f;for(;g<0;)g+=12;for(var p=(d.stepsFromC+g)%12,l=0;l<Object.keys(e).length;l++){var o=Object.keys(e)[l];if(e[o].stepsFromC===p)return o}return f}return Cr={relativeMajor:i,relativeMode:c,transposeKey:u,isLegalMode:a},Cr}var Sr,Ii;function _l(){if(Ii)return Sr;Ii=1;var{relativeMajor:e}=wl(),t={acc:"sharp",note:"f"},a={acc:"sharp",note:"c"},n={acc:"sharp",note:"g"},r={acc:"sharp",note:"d"},i={acc:"sharp",note:"A"},c={acc:"sharp",note:"e"},u={acc:"sharp",note:"B"},f={acc:"flat",note:"B"},g={acc:"flat",note:"e"},d={acc:"flat",note:"A"},p={acc:"flat",note:"d"},l={acc:"flat",note:"G"},o={acc:"flat",note:"c"},h={acc:"flat",note:"F"},s={"C#":[t,a,n,r,i,c,u],"F#":[t,a,n,r,i,c],B:[t,a,n,r,i],E:[t,a,n,r],A:[t,a,n],D:[t,a],G:[t],C:[],F:[f],Bb:[f,g],Eb:[f,g,d],Cm:[f,g,d],Ab:[f,g,d,p],Db:[f,g,d,p,l],Gb:[f,g,d,p,l,o],Cb:[f,g,d,p,l,o,h],"A#":[f,g],"B#":[],"D#":[f,g,d],"E#":[f],"G#":[f,g,d,p],none:[]};function v(y){var m=s[e(y)];return m?JSON.parse(JSON.stringify(m)):null}return Sr=v,Sr}var Tr,Ri;function kl(){if(Ri)return Tr;Ri=1;var e=ig(),t=yl(),a=_l(),n={},r={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},i=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],c=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];n.keySignature=function(l,o,h,s,v){if(l.clef.type==="perc"||l.clef.type==="none")return{accidentals:a(o),root:h,acc:s};v||(v=0),l.localTransposeVerticalMovement=0,l.localTransposePreferFlats=!1;var y=a(o);if(!y)return l.key;if(l.localTranspose=(l.globalTranspose?l.globalTranspose:0)+v,!l.localTranspose)return{accidentals:y,root:h,acc:s};if(l.globalTransposeOrigKeySig=y,l.localTranspose%12===0)return l.localTransposeVerticalMovement=l.localTranspose/12*7,{accidentals:y,root:h,acc:s};var m=o[0];o[1]==="b"||o[1]==="#"?(m+=o[1],o=o.substr(2)):o=o.substr(1);var _=r[m],k=_!==void 0;k||(_=0,m="C",o="");for(var x=_+l.localTranspose;x<0;)x+=12;x>11&&(x=x%12);var R=o[0]==="m"?c[x]:i[x],I=R+o,b=a(I);(b.length===0||b[0].acc==="flat")&&(l.localTransposePreferFlats=!0);var A=I.charCodeAt(0)-m.charCodeAt(0);return l.localTranspose>0?(A<0||A===0&&(m[1]==="#"||I[1]==="b"))&&(A+=7):l.localTranspose<0&&(A>0||A===0&&(m[1]==="b"||I[1]==="#"))&&(A-=7),l.localTranspose>0?l.localTransposeVerticalMovement=A+Math.floor(l.localTranspose/12)*7:l.localTransposeVerticalMovement=A+Math.ceil(l.localTranspose/12)*7,k?{accidentals:b,root:R[0],acc:R.length>1?R[1]:""}:{accidentals:[],root:h,acc:s}},n.chordName=function(l,o){return t(o,l.localTranspose,l.localTransposePreferFlats,l.freegchord)};var u=["c","d","e","f","g","a","b"];function f(l,o,h,s,v){for(var y=u[(l+49)%7],m=0,_=0;_<s.length;_++)s[_].note.toLowerCase()===y&&(m=g[s[_].acc]);for(var k=g[h],x=k-m,R=u[(o+49)%7],I=0,b=0;b<v.accidentals.length;b++)v.accidentals[b].note.toLowerCase()===R&&(I=g[v.accidentals[b].acc]);var A=x+I;return A<-2&&(o--,A+=R==="c"||R==="f"?1:2),A>2&&(o++,A-=R==="b"||R==="e"?1:2),[o,A]}var g={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},d={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},p={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return n.note=function(l,o){if(!(!l.localTranspose||l.clef.type==="perc")){var h=o.pitch;if(l.localTransposeVerticalMovement&&(o.pitch=o.pitch+l.localTransposeVerticalMovement,o.name)){var s=o.accidental?o.name.substring(1):o.name,v=o.accidental?o.name[0]:"",y=e.pitchIndex(s);o.name=v+e.noteName(y+l.localTransposeVerticalMovement)}if(o.accidental){var m=f(h,o.pitch,o.accidental,l.globalTransposeOrigKeySig,l.targetKey);o.pitch=m[0],o.accidental=d[m[1]],o.name&&(o.name=p[m[1]]+o.name.replace(/[_^=]/g,""))}}},Tr=n,Tr}var Er,qi;function Za(){if(qi)return Er;qi=1;var e=$a(),t=kl(),a={};return(function(){var n,r,i,c;a.initialize=function(o,h,s,v,y){n=o,r=h,i=s,c=y},a.standardKey=function(o,h,s,v){return t.keySignature(i,o,h,s,v)};var u={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}},f=function(o,h){var s=u[o],v=s?s.mid:0;return v+h};a.fixClef=function(o){var h=u[o.type];h&&(o.clefPos=h.pitch,o.type=h.clef)},a.deepCopyKey=function(o){var h={accidentals:[],root:o.root,acc:o.acc,mode:o.mode};return o.accidentals.forEach(function(s){h.accidentals.push(Object.assign({},s))}),h};var g={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};a.addPosToKey=function(o,h){var s=o.verticalPos;h.accidentals.forEach(function(v){var y=g[v.note];y=y-s,v.verticalPos=y}),h.impliedNaturals&&h.impliedNaturals.forEach(function(v){var y=g[v.note];y=y-s,v.verticalPos=y}),s<-10?(h.accidentals.forEach(function(v){v.verticalPos-=7,(v.verticalPos>=11||v.verticalPos===10&&v.acc==="flat")&&(v.verticalPos-=7),v.note==="A"&&v.acc==="sharp"&&(v.verticalPos-=7),(v.note==="G"||v.note==="F")&&v.acc==="flat"&&(v.verticalPos-=7)}),h.impliedNaturals&&h.impliedNaturals.forEach(function(v){v.verticalPos-=7,(v.verticalPos>=11||v.verticalPos===10&&v.acc==="flat")&&(v.verticalPos-=7),v.note==="A"&&v.acc==="sharp"&&(v.verticalPos-=7),(v.note==="G"||v.note==="F")&&v.acc==="flat"&&(v.verticalPos-=7)})):s<-4?(h.accidentals.forEach(function(v){v.verticalPos-=7,s===-8&&(v.note==="f"||v.note==="g")&&v.acc==="sharp"&&(v.verticalPos-=7)}),h.impliedNaturals&&h.impliedNaturals.forEach(function(v){v.verticalPos-=7,s===-8&&(v.note==="f"||v.note==="g")&&v.acc==="sharp"&&(v.verticalPos-=7)})):s>=7&&(h.accidentals.forEach(function(v){v.verticalPos+=7}),h.impliedNaturals&&h.impliedNaturals.forEach(function(v){v.verticalPos+=7}))},a.fixKey=function(o,h){var s=Object.assign({},h);return a.addPosToKey(o,s),s};var d=function(o){var h=0,s=o[h++];(s==="^"||s==="_")&&(s=o[h++]);var v=g[s];for(v===void 0&&(v=6);h<o.length;h++)if(o[h]===",")v-=7;else if(o[h]==="'")v+=7;else break;return{mid:v-6,str:o.substring(h)}},p=function(o){for(var h=0;h<o.length;h++)o[h].note==="b"?o[h].note="B":o[h].note==="a"?o[h].note="A":o[h].note==="F"?o[h].note="f":o[h].note==="E"?o[h].note="e":o[h].note==="D"?o[h].note="d":o[h].note==="C"?o[h].note="c":o[h].note==="G"&&o[h].acc==="sharp"?o[h].note="g":o[h].note==="g"&&o[h].acc==="flat"&&(o[h].note="G")};a.parseKey=function(o,h){o.length===0&&(o="none");var s=n.tokenize(o,0,o.length),v={};if(s.length===0)return r("Must pass in key signature.",o,0),v;switch(s[0].token){case"HP":e.addDirective("bagpipes"),i.key={root:"HP",accidentals:[],acc:"",mode:""},v.foundKey=!0,s.shift();break;case"Hp":e.addDirective("bagpipes"),i.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},v.foundKey=!0,s.shift();break;case"none":i.key={root:"none",accidentals:[],acc:"",mode:""},v.foundKey=!0,s.shift();break;default:var y=n.getKeyPitch(s[0].token);if(y.len>0){v.foundKey=!0;var m="",_="";s[0].token.length>1?s[0].token=s[0].token.substring(1):s.shift();var k=y.token;if(s.length>0){var x=n.getSharpFlat(s[0].token);if(x.len>0&&(s[0].token.length>1?s[0].token=s[0].token.substring(1):s.shift(),k+=x.token,m=x.token),s.length>0){var R=n.getMode(s[0].token);R.len>0&&(s.shift(),k+=R.token,_=R.token)}if(a.standardKey(k,y.token,m,0)===void 0)return r("Unsupported key signature: "+k,o,0),v}var I=a.deepCopyKey(i.key),b=!h&&i.globalTranspose?-i.globalTranspose:0,A;if(h&&(A=i.globalTransposeOrigKeySig),i.key=a.deepCopyKey(a.standardKey(k,y.token,m,b)),h&&(i.globalTransposeOrigKeySig=A),i.key.mode=_,I&&i.keywarn!==!1){for(var N,M=0;M<i.key.accidentals.length;M++)for(N=0;N<I.accidentals.length;N++)I.accidentals[N].note&&i.key.accidentals[M].note.toLowerCase()===I.accidentals[N].note.toLowerCase()&&(I.accidentals[N].note=null);for(N=0;N<I.accidentals.length;N++)I.accidentals[N].note&&(i.key.impliedNaturals||(i.key.impliedNaturals=[]),i.key.impliedNaturals.push({acc:"natural",note:I.accidentals[N].note}))}}break}if(s.length===0||(s[0].token==="exp"&&s.shift(),s.length===0)||(s[0].token==="oct"&&s.shift(),s.length===0))return v;var z=n.getKeyAccidentals2(s);if(z.warn&&r(z.warn,o,0),z.accs){v.foundKey||(v.foundKey=!0,i.key={root:"none",acc:"",mode:"",accidentals:[]}),p(z.accs);for(var L=0;L<z.accs.length;L++){for(var E=!1,T=0;T<i.key.accidentals.length&&!E;T++)i.key.accidentals[T].note===z.accs[L].note&&(E=!0,i.key.accidentals[T].acc!==z.accs[L].acc&&(i.key.accidentals[T].acc=z.accs[L].acc,i.key.explicitAccidentals||(i.key.explicitAccidentals=[]),i.key.explicitAccidentals.push(z.accs[L])));if(!E&&(i.key.explicitAccidentals||(i.key.explicitAccidentals=[]),i.key.explicitAccidentals.push(z.accs[L]),i.key.accidentals.push(z.accs[L]),i.key.impliedNaturals))for(var P=0;P<i.key.impliedNaturals.length;P++)i.key.impliedNaturals[P].note===z.accs[L].note&&i.key.impliedNaturals.splice(P,1)}}for(var B;s.length>0;)switch(s[0].token){case"m":case"middle":if(s.shift(),s.length===0)return r("Expected = after middle",o,0),v;if(B=s.shift(),B.token!=="="){r("Expected = after middle",o,B.start);break}if(s.length===0)return r("Expected parameter after middle=",o,0),v;var O=n.getPitchFromTokens(s);O.warn&&r(O.warn,o,0),O.position&&(i.clef.verticalPos=O.position-6);break;case"transpose":if(s.shift(),s.length===0)return r("Expected = after transpose",o,0),v;if(B=s.shift(),B.token!=="="){r("Expected = after transpose",o,B.start);break}if(s.length===0)return r("Expected parameter after transpose=",o,0),v;if(s[0].type!=="number"){r("Expected number after transpose",o,s[0].start);break}i.clef.transpose=s[0].intt,s.shift();break;case"stafflines":if(s.shift(),s.length===0)return r("Expected = after stafflines",o,0),v;if(B=s.shift(),B.token!=="="){r("Expected = after stafflines",o,B.start);break}if(s.length===0)return r("Expected parameter after stafflines=",o,0),v;if(s[0].type!=="number"){r("Expected number after stafflines",o,s[0].start);break}i.clef.stafflines=s[0].intt,s.shift();break;case"staffscale":if(s.shift(),s.length===0)return r("Expected = after staffscale",o,0),v;if(B=s.shift(),B.token!=="="){r("Expected = after staffscale",o,B.start);break}if(s.length===0)return r("Expected parameter after staffscale=",o,0),v;if(s[0].type!=="number"){r("Expected number after staffscale",o,s[0].start);break}i.clef.staffscale=s[0].floatt,s.shift();break;case"octave":if(s.shift(),s.length===0)return r("Expected = after octave",o,0),v;if(B=s.shift(),B.token!=="="){r("Expected = after octave",o,B.start);break}if(s.length===0)return r("Expected parameter after octave=",o,0),v;if(s[0].type!=="number"){r("Expected number after octave",o,s[0].start);break}i.octave=s[0].intt,s.shift();break;case"style":if(s.shift(),s.length===0)return r("Expected = after style",o,0),v;if(B=s.shift(),B.token!=="="){r("Expected = after style",o,B.start);break}if(s.length===0)return r("Expected parameter after style=",o,0),v;switch(s[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":i.style=s[0].token,s.shift();break;default:r("error parsing style element: "+s[0].token,o,s[0].start);break}break;case"clef":if(s.shift(),s.length===0)return r("Expected = after clef",o,0),v;if(B=s.shift(),B.token!=="="){r("Expected = after clef",o,B.start);break}if(s.length===0)return r("Expected parameter after clef=",o,0),v;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var w=s.shift();switch(w.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":w.token="alto";break;case"F":w.token="bass";break;case"G":w.token="treble";break;case"c":w.token="alto";break;case"f":w.token="bass";break;case"g":w.token="treble";break;default:r("Expected clef name. Found "+w.token,o,w.start);break}s.length>0&&s[0].type==="number"&&(w.token+=s[0].token,s.shift()),s.length>1&&(s[0].token==="-"||s[0].token==="+"||s[0].token==="^"||s[0].token==="_")&&s[1].token==="8"&&(w.token+=s[0].token+s[1].token,s.shift(),s.shift()),i.clef={type:w.token,verticalPos:f(w.token,0)},i.currentVoice&&i.currentVoice.transpose!==void 0&&(i.clef.transpose=i.currentVoice.transpose),v.foundClef=!0;break;default:r("Unknown parameter: "+s[0].token,o,s[0].start),s.shift()}return v};var l=function(o){var h=i.voices[o];if(!(i.currentVoice&&i.currentVoice.index===h.index&&i.currentVoice.staffNum===h.staffNum))return i.currentVoice=h,c.setCurrentVoice(h.staffNum,h.index,o)};a.parseVoice=function(o,h,s){var v=n.getMeat(o,h,s),y=v.start,m=v.end,_=n.getToken(o,y,m);if(_.length===0){r("Expected a voice id",o,y);return}var k=!1;i.voices[_]===void 0&&(i.voices[_]={},k=!0,i.score_is_present&&r("Can't have an unknown V: id when the %score directive is present",o,y)),y+=_.length,y+=n.eatWhiteSpace(o,y);for(var x={startStaff:k},R=function(O){var w=n.getVoiceToken(o,y,m);w.warn!==void 0?r("Expected value for "+O+" in voice: "+w.warn,o,y):w.err!==void 0?r("Expected value for "+O+" in voice: "+w.err,o,y):w.token.length===0&&o[y]!=='"'?r("Expected value for "+O+" in voice",o,y):x[O]=w.token,y+=w.len},I=function(O,w,C){var S=n.getVoiceToken(o,y,m);S.warn!==void 0?r("Expected value for "+w+" in voice: "+S.warn,o,y):S.err!==void 0?r("Expected value for "+w+" in voice: "+S.err,o,y):S.token.length===0&&o[y]!=='"'?r("Expected value for "+w+" in voice",o,y):(S.token=parseFloat(S.token),i.voices[O][w]=S.token),y+=S.len},b=function(O,w){var C=n.getVoiceToken(o,y,m);if(C.warn!==void 0)r("Expected value for "+O+" in voice: "+C.warn,o,y);else if(C.err!==void 0)r("Expected value for "+O+" in voice: "+C.err,o,y);else if(C.token.length===0&&o[y]!=='"')r("Expected value for "+O+" in voice",o,y);else return C.token;y+=C.len},A=function(O,w){var C={_B:2,_E:9,_b:-10,_e:-3},S=n.getVoiceToken(o,y,m);if(S.warn!==void 0)r("Expected one of (_B, _E, _b, _e) for "+w+" in voice: "+S.warn,o,y);else if(S.token.length===0&&o[y]!=='"')r("Expected one of (_B, _E, _b, _e) for "+w+" in voice",o,y);else{var q=C[S.token];q?i.voices[O][w]=q:r("Expected one of (_B, _E, _b, _e) for "+w+" in voice",o,y)}y+=S.len};y<m;){var N=n.getVoiceToken(o,y,m);if(y+=N.len,N.warn)r("Error parsing voice: "+N.warn,o,y);else{var M=null;switch(N.token){case"clef":case"cl":R("clef");var z=0;x.clef!==void 0&&(x.clef=x.clef.replace(/[',]/g,""),x.clef.indexOf("+16")!==-1&&(z+=14,x.clef=x.clef.replace("+16","")),x.verticalPos=f(x.clef,z));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 L=0;x.clef=N.token.replace(/[',]/g,""),x.verticalPos=f(x.clef,L),i.voices[_].clef=N.token;break;case"staves":case"stave":case"stv":R("staves");break;case"brace":case"brc":R("brace");break;case"bracket":case"brk":R("bracket");break;case"name":case"nm":R("name");break;case"subname":case"sname":case"snm":R("subname");break;case"merge":x.startStaff=!1;break;case"stem":case"stems":M=n.getVoiceToken(o,y,m),M.warn!==void 0?r("Expected value for stems in voice: "+M.warn,o,y):M.err!==void 0?r("Expected value for stems in voice: "+M.err,o,y):M.token==="up"||M.token==="down"?i.voices[_].stem=M.token:r("Expected up or down for voice stem",o,y),y+=M.len;break;case"up":case"down":i.voices[_].stem=N.token;break;case"middle":case"m":R("verticalPos"),x.verticalPos=d(x.verticalPos).mid;break;case"gchords":case"gch":i.voices[_].suppressChords=!0,M=n.getVoiceToken(o,y,m),M.token==="0"&&(y=y+M.len);break;case"space":case"spc":R("spacing");break;case"scale":I(_,"scale");break;case"score":A(_,"scoreTranspose");break;case"transpose":I(_,"transpose");break;case"stafflines":I(_,"stafflines");break;case"staffscale":I(_,"staffscale");break;case"octave":I(_,"octave");break;case"volume":I(_,"volume");break;case"cue":var E=b("cue");E==="on"?i.voices[_].scale=.6:i.voices[_].scale=1;break;case"style":M=n.getVoiceToken(o,y,m),M.warn!==void 0?r("Expected value for style in voice: "+M.warn,o,y):M.err!==void 0?r("Expected value for style in voice: "+M.err,o,y):M.token==="normal"||M.token==="harmonic"||M.token==="rhythm"||M.token==="x"||M.token==="triangle"?i.voices[_].style=M.token:r("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",o,y),y+=M.len;break}}y+=n.eatWhiteSpace(o,y)}if((x.startStaff||i.staves.length===0)&&(i.staves.push({index:i.staves.length,meter:i.origMeter}),i.score_is_present||(i.staves[i.staves.length-1].numVoices=0)),i.voices[_].staffNum===void 0){i.voices[_].staffNum=i.staves.length-1;var T=0;for(var P in i.voices)i.voices.hasOwnProperty(P)&&i.voices[P].staffNum===i.voices[_].staffNum&&T++;i.voices[_].index=T-1}var B=i.staves[i.voices[_].staffNum];return i.score_is_present||B.numVoices++,x.clef&&(B.clef={type:x.clef,verticalPos:x.verticalPos}),x.spacing&&(B.spacing_below_offset=x.spacing),x.verticalPos&&(B.verticalPos=x.verticalPos),x.name&&(B.name?B.name.push(x.name):B.name=[x.name]),x.subname&&(B.subname?B.subname.push(x.subname):B.subname=[x.subname]),l(_)}})(),Er=a,Er}var Ar,Bi;function sg(){if(Bi)return Ar;Bi=1;var e=nt(),t=$a(),a=Za(),n=function(r,i,c,u,f){this.reset=function(p,l,o,h){a.initialize(p,l,o,h,f),t.initialize(p,l,o,h,f)},this.reset(r,i,c,u),this.setTitle=function(p,l){c.hasMainTitle?f.addSubtitle(p,{startChar:c.iChar,endChar:c.iChar+l+2}):(f.addMetaText("title",p,{startChar:c.iChar,endChar:c.iChar+l+2}),c.hasMainTitle=!0)},this.setMeter=function(p){if(p=r.stripComment(p),p==="C")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"common_time"};if(p==="C|")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"cut_time"};if(p==="o")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_perfectum"};if(p==="c")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_imperfectum"};if(p==="o.")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if(p==="c.")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(p.length===0||p.toLowerCase()==="none")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),null;var l=r.tokenize(p,0,p.length);try{var o=function(){var _={value:0,num:""},k=l.shift();for(k.token==="("&&(k=l.shift());;){if(k.type!=="number")throw"Expected top number of meter";if(_.value+=parseInt(k.token),_.num+=k.token,l.length===0||l[0].token==="/")return _;if(k=l.shift(),k.token===")"){if(l.length===0||l[0].token==="/")return _;throw"Unexpected paren in meter"}if(k.token!=="."&&k.token!=="+"||(_.num+=k.token,l.length===0))throw"Expected top number of meter";k=l.shift()}return _},h=function(){var _=o();if(l.length===0)return _;var k=l.shift();if(k.token!=="/")throw"Expected slash in meter";if(k=l.shift(),k.type!=="number")throw"Expected bottom number of meter";return _.den=k.token,_.value=_.value/parseInt(_.den),_};if(l.length===0)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},v=0;;){var y=h();v+=y.value;var m={num:y.num};if(y.den!==void 0&&(m.den=y.den),s.value.push(m),l.length===0)break}return c.havent_set_length===!0&&(c.default_length=v<.75?.0625:.125,c.havent_set_length=!1),s}catch(_){i(_,p,0)}return null},this.calcTempo=function(p){var l=.25;c.meter&&c.meter.type==="specified"?l=1/parseInt(c.meter.value[0].den):c.origMeter&&c.origMeter.type==="specified"&&(l=1/parseInt(c.origMeter.value[0].den));for(var o=0;o<p.duration;o++)p.duration[o]=l*p.duration[o];return p},this.resolveTempo=function(){c.tempo&&(this.calcTempo(c.tempo),u.metaText.tempo=c.tempo,delete c.tempo)},this.addUserDefinition=function(p,l,o){var h=p.indexOf("=",l);if(h===-1){i("Need an = in a macro definition",p,l);return}var s=e.strip(p.substring(l,h)),v=e.strip(p.substring(h+1));if(s.length!==1){i("Macro definitions can only be one character",p,l);return}var y="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~";if(y.indexOf(s)===-1){i("Macro definitions must be H-Y, h-w, or tilde",p,l);return}if(v.length===0){i("Missing macro definition",p,l);return}c.macros===void 0&&(c.macros={}),c.macros[s]=v},this.setDefaultLength=function(p,l,o){var h=p.substring(l,o).replace(/ /g,""),s=h.split("/");if(s.length===2){var v=parseInt(s[0]),y=parseInt(s[1]);y>0&&(c.default_length=v/y,c.havent_set_length=!1)}else s.length===1&&s[0]==="1"&&(c.default_length=1,c.havent_set_length=!1)};var g={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(p,l,o,h){try{var s=r.tokenize(p,l,o);if(s.length===0)throw"Missing parameter in Q: field";var v={startChar:h+l-2,endChar:h+o},y=!0,m=s.shift();if(m.type==="quote"&&(v.preString=m.token,m=s.shift(),s.length===0))return g[v.preString.toLowerCase()]&&(v.bpm=g[v.preString.toLowerCase()],v.suppressBpm=!0),{type:"immediate",tempo:v};if(m.type==="alpha"&&m.token==="C"){if(s.length===0)throw"Missing tempo after C in Q: field";if(m=s.shift(),m.type==="punct"&&m.token==="="){if(s.length===0)throw"Missing tempo after = in Q: field";if(m=s.shift(),m.type!=="number")throw"Expected number after = in Q: field";v.duration=[1],v.bpm=parseInt(m.token)}else if(m.type==="number"){if(v.duration=[parseInt(m.token)],s.length===0)throw"Missing = after duration in Q: field";if(m=s.shift(),m.type!=="punct"||m.token!=="=")throw"Expected = after duration in Q: field";if(s.length===0)throw"Missing tempo after = in Q: field";if(m=s.shift(),m.type!=="number")throw"Expected number after = in Q: field";v.bpm=parseInt(m.token)}else throw"Expected number or equal after C in Q: field"}else if(m.type==="number"){var _=parseInt(m.token);if(s.length===0||s[0].type==="quote")v.duration=[1],v.bpm=_;else{if(y=!1,m=s.shift(),m.type!=="punct"&&m.token!=="/"||(m=s.shift(),m.type!=="number"))throw"Expected fraction in Q: field";var k=parseInt(m.token);for(v.duration=[_/k];s.length>0&&s[0].token!=="="&&s[0].type!=="quote";){if(m=s.shift(),m.type!=="number"||(_=parseInt(m.token),m=s.shift(),m.type!=="punct"&&m.token!=="/")||(m=s.shift(),m.type!=="number"))throw"Expected fraction in Q: field";k=parseInt(m.token),v.duration.push(_/k)}if(m=s.shift(),m.type!=="punct"&&m.token!=="=")throw"Expected = in Q: field";if(m=s.shift(),m.type!=="number")throw"Expected tempo in Q: field";v.bpm=parseInt(m.token)}}else throw"Unknown value in Q: field";if(s.length!==0&&(m=s.shift(),m.type==="quote"&&(v.postString=m.token,m=s.shift()),s.length!==0))throw"Unexpected string at end of Q: field";return c.printTempo===!1&&(v.suppress=!0),{type:y?"delaySet":"immediate",tempo:v}}catch(x){return i(x,p,l),{type:"none"}}},this.letter_to_inline_header=function(p,l,o){var h=!1,s=r.eatWhiteSpace(p,l);if(l+=s,p.length>=l+5&&p[l]==="["&&p[l+2]===":"){var v=p.indexOf("]",l),y=c.iChar+l,m=c.iChar+v+1;switch(p.substring(l,l+3)){case"[I:":var _=t.addDirective(p.substring(l+3,v));return _&&i(_,p,l),[v-l+1+s];case"[M:":var k=this.setMeter(p.substring(l+3,v));return f.hasBeginMusic()&&k?f.appendStartingElement("meter",y,m,k):c.meter=k,[v-l+1+s];case"[K:":var x=a.parseKey(p.substring(l+3,v),!0);return x.foundClef&&f.hasBeginMusic()&&f.appendStartingElement("clef",y,m,c.clef),x.foundKey&&f.hasBeginMusic()&&f.appendStartingElement("key",y,m,a.fixKey(c.clef,c.key)),[v-l+1+s];case"[P:":var R=t.parseFontChangeLine(p.substring(l+3,v));return o||u.lines.length<=u.lineNum?c.partForNextLine={title:R,startChar:y,endChar:m}:f.appendElement("part",y,m,{title:R}),[v-l+1+s];case"[L:":return this.setDefaultLength(p,l+3,v),[v-l+1+s];case"[Q:":if(v>0){var I=this.setTempo(p,l+3,v,c.iChar);return I.type==="delaySet"?f.hasBeginMusic()?f.appendElement("tempo",y,m,this.calcTempo(I.tempo)):c.tempoForNextLine=["tempo",y,m,this.calcTempo(I.tempo)]:I.type==="immediate"&&(!o&&f.hasBeginMusic()?f.appendElement("tempo",y,m,I.tempo):c.tempoForNextLine=["tempo",y,m,I.tempo]),[v-l+1+s,p[l+1],p.substring(l+3,v)]}break;case"[V:":if(v>0)return h=a.parseVoice(p,l+3,v),[v-l+1+s,p[l+1],p.substring(l+3,v),h];break;case"[r:":return[v-l+1+s]}}return[0]},this.letter_to_body_header=function(p,l){var o=!1;if(p.length>=l+3)switch(p.substring(l,l+2)){case"I:":var h=t.addDirective(p.substring(l+2));return h&&i(h,p,l),[p.length];case"M:":var s=this.setMeter(p.substring(l+2));return f.hasBeginMusic()&&s&&f.appendStartingElement("meter",c.iChar+l,c.iChar+p.length,s),[p.length];case"K:":var v=a.parseKey(p.substring(l+2),f.hasBeginMusic());return v.foundClef&&f.hasBeginMusic()&&c.keywarn!==!1&&f.appendStartingElement("clef",c.iChar+l,c.iChar+p.length,c.clef),v.foundKey&&f.hasBeginMusic()&&c.keywarn!==!1&&f.appendStartingElement("key",c.iChar+l,c.iChar+p.length,a.fixKey(c.clef,c.key)),[p.length];case"P:":return f.hasBeginMusic()&&f.appendElement("part",c.iChar+l,c.iChar+p.length,{title:p.substring(l+2)}),[p.length];case"L:":return this.setDefaultLength(p,l+2,p.length),[p.length];case"Q:":var y=p.indexOf("",l+2);y===-1&&(y=p.length);var m=this.setTempo(p,l+2,y,c.iChar);return m.type==="delaySet"?f.appendElement("tempo",c.iChar+l,c.iChar+p.length,this.calcTempo(m.tempo)):m.type==="immediate"&&f.appendElement("tempo",c.iChar+l,c.iChar+p.length,m.tempo),[y,p[l],e.strip(p.substring(l+2))];case"V:":return o=a.parseVoice(p,l+2,p.length),[p.length,p[l],e.strip(p.substring(l+2)),o]}return[0]};var d={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(p){var l=d[p[0]],o=p.length-2,h=r.translateString(r.stripComment(p.substring(2)));if(l==="unalignedWords"||l==="notes")f.addMetaTextArray(l,t.parseFontChangeLine(h),{startChar:c.iChar,endChar:c.iChar+p.length});else if(l!==void 0)f.addMetaText(l,t.parseFontChangeLine(h),{startChar:c.iChar,endChar:c.iChar+p.length});else{var s=c.iChar,v=s+p.length;switch(p[0]){case"H":for(f.addMetaTextArray("history",t.parseFontChangeLine(h),{startChar:c.iChar,endChar:c.iChar+p.length}),p=r.peekLine();p&&p[1]!==":";)r.nextLine(),f.addMetaTextArray("history",t.parseFontChangeLine(r.translateString(r.stripComment(p))),{startChar:c.iChar,endChar:c.iChar+p.length}),p=r.peekLine();break;case"K":this.resolveTempo();var y=a.parseKey(p.substring(2),!1);!c.is_in_header&&f.hasBeginMusic()&&c.keywarn!==!1&&(y.foundClef&&f.appendStartingElement("clef",s,v,c.clef),y.foundKey&&f.appendStartingElement("key",s,v,a.fixKey(c.clef,c.key))),c.is_in_header=!1;break;case"L":this.setDefaultLength(p,2,p.length);break;case"M":c.origMeter=c.meter=this.setMeter(p.substring(2));break;case"P":c.is_in_header?f.addMetaText("partOrder",t.parseFontChangeLine(h),{startChar:c.iChar,endChar:c.iChar+p.length}):c.partForNextLine={title:h,startChar:s,endChar:v};break;case"Q":var m=this.setTempo(p,2,p.length,c.iChar);m.type==="delaySet"?c.tempo=m.tempo:m.type==="immediate"&&(u.metaText.tempo?c.tempoForNextLine=["tempo",s,v,m.tempo]:u.metaText.tempo=m.tempo);break;case"T":c.titlecaps&&(h=h.toUpperCase()),this.setTitle(t.parseFontChangeLine(r.theReverser(h)),o);break;case"U":this.addUserDefinition(p,2,p.length);break;case"V":if(a.parseVoice(p,2,p.length),!c.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":i("Ignored header",p,0);break;default:return{regular:!0}}}return{}}};return Ar=n,Ar}var Xe={},Li;function og(){return Li||(Li=1,Xe.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"],Xe.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],Xe.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],Xe.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],Xe.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],Xe.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",Xe.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],Xe.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},Xe.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},Xe.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},Xe.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),Xe}var Mr,Oi;function cg(){if(Oi)return Mr;Oi=1;var e=Za(),t=kl(),a,n,r,i,c,u,{legalAccents:f,volumeDecorations:g,dynamicDecorations:d,accentPseudonyms:p,accentDynamicPseudonyms:l,nonDecorations:o,durations:h,pitches:s,rests:v,accMap:y,tripletQ:m}=og(),_=function(w,C,S,q,D,$){a=w,n=C,r=S,i=q,c=D,u=$,this.lineContinuation=!1},k=function(w,C,S){if(w.inTie[C]===void 0)return!1;var q=w.currentVoice?w.currentVoice.staffNum*100+w.currentVoice.index:0;return!!(w.inTie[C][q]&&(S.pitches!==void 0||S.rest.type!=="spacer"))},x={};_.prototype.parseMusic=function(w){u.resolveTempo(),r.is_in_header=!1;for(var C=0,S=r.iChar;a.isWhiteSpace(w[C])&&C<w.length;)C++;if(!(C===w.length||w[C]==="%")){var q=r.start_new_line;r.continueall===void 0?r.start_new_line=!0:r.start_new_line=!1;var D=0,$=u.letter_to_body_header(w,C);$[0]>0&&(C+=$[0],$[1]==="V"&&this.startNewLine());for(var F=0;C<w.length;){var K=C;if(w[C]==="%")break;var te=u.letter_to_inline_header(w,C,q);if(te[0]>0)C+=te[0],te[1]==="V"&&(q=!0);else{(!c.hasBeginMusic()||q&&!this.lineContinuation)&&(this.startNewLine(),q=!1);for(var V;;)if(V=a.eatWhiteSpace(w,C),V>0&&(C+=V),C>0&&w[C-1]===""&&(V=u.letter_to_body_header(w,C),V[0]>0&&(V[1]==="V"&&this.startNewLine(),C=V[0],r.start_new_line=!1)),V=z(w,C),V[0]>0&&(C+=V[0]),V=I(w,C),V[0]>0){x.chord||(x.chord=[]);var ae=a.translateString(V[1]);ae=ae.replace(/;/g,`
|
|
87
|
+
`);for(var oe=!1,le=0;le<x.chord.length;le++)x.chord[le].position===V[2]&&(oe=!0,x.chord[le].name+=`
|
|
88
|
+
`+ae);oe===!1&&(V[2]===null&&V[3]?x.chord.push({name:ae,rel_position:V[3]}):x.chord.push({name:ae,position:V[2]})),C+=V[0];var J=a.skipWhiteSpace(w.substring(C));J>0&&(x.force_end_beam_last=!0),C+=J}else if(o.indexOf(w[C])===-1?V=M(w,C):V=[0],V[0]>0)V[1]===null?C+1<w.length&&this.startNewLine():V[1].length>0&&(V[1].indexOf("style=")===0?x.style=V[1].substr(6):(x.decoration===void 0&&(x.decoration=[]),V[1]==="beambr1"?x.beambr=1:V[1]==="beambr2"?x.beambr=2:x.decoration.push(V[1]))),C+=V[0];else if(V=b(w,C),V[0]>0)x.gracenotes=V[1],C+=V[0];else break;if(V=L(w,C),V[0]>0){F=0,x.gracenotes!==void 0&&(x.rest={type:"spacer"},x.duration=.125,r.addFormattingOptions(x,i.formatting,"note"),c.appendElement("note",S+C,S+C+V[0],x),r.measureNotEmpty=!0,x={});var ce={type:V[1]};ce.type.length===0?n("Unknown bar type",w,C):(r.inEnding&&ce.type!=="bar_thin"&&(ce.endEnding=!0,r.inEnding=!1),V[2]&&(ce.startEnding=V[2],r.inEnding&&(ce.endEnding=!0),r.inEnding=!0,V[1]==="bar_right_repeat"?r.restoreStartEndingHoldOvers():r.duplicateStartEndingHoldOvers()),x.decoration!==void 0&&(ce.decoration=x.decoration),x.chord!==void 0&&(ce.chord=x.chord),ce.startEnding&&r.barFirstEndingNum===void 0?r.barFirstEndingNum=r.currBarNumber:ce.startEnding&&ce.endEnding&&r.barFirstEndingNum?r.currBarNumber=r.barFirstEndingNum:ce.endEnding&&(r.barFirstEndingNum=void 0),ce.type!=="bar_invisible"&&r.measureNotEmpty&&O()&&(r.currBarNumber++,r.barNumbers&&r.currBarNumber%r.barNumbers===0&&(ce.barNumber=r.currBarNumber)),r.addFormattingOptions(x,i.formatting,"bar"),c.appendElement("bar",S+K,S+C+V[0],ce),r.measureNotEmpty=!1,x={}),C+=V[0]}else if(w[C]==="&")V=A(w,C),V[0]>0&&(c.appendElement("overlay",S,S+1,{}),C+=1,F++);else{if(V=E(w,C),V.consumed>0&&(V.startSlur!==void 0&&(x.startSlur=V.startSlur),V.dottedSlur&&(x.dottedSlur=!0),V.triplet!==void 0&&(D>0?n("Can't nest triplets",w,C):(x.startTriplet=V.triplet,x.tripletMultiplier=V.tripletQ/V.triplet,x.tripletR=V.num_notes,D=V.num_notes===void 0?V.triplet:V.num_notes)),C+=V.consumed),w[C]==="["){C++;for(var ee=null,he=!1,de=!1;!de;){var Se=M(w,C);Se[0]>0&&(C+=Se[0]);var we=P(w,C,{},!1);if(we!==null&&we.pitch!==void 0)Se[0]>0&&Se[1].indexOf("style=")!==0&&(x.decoration===void 0&&(x.decoration=[]),x.decoration.push(Se[1])),we.end_beam&&(x.end_beam=!0,delete we.end_beam),x.pitches===void 0?(x.duration=we.duration,x.pitches=[we]):x.pitches.push(we),delete we.duration,Se[0]>0&&Se[1].indexOf("style=")===0&&(x.pitches[x.pitches.length-1].style=Se[1].substr(6)),r.inTieChord[x.pitches.length]&&(we.endTie=!0,r.inTieChord[x.pitches.length]=void 0),we.startTie&&(r.inTieChord[x.pitches.length]=!0),C=we.endChar,delete we.endChar;else if(w[C]===" ")n("Spaces are not allowed in chords",w,C),C++;else{if(C<w.length&&w[C]==="]"){C++,r.next_note_duration!==0&&(x.duration=x.duration*r.next_note_duration,r.next_note_duration=0),k(r,F,x)&&(x.pitches.forEach(function(Q){Q.endTie=!0}),R(r,F,!1)),D>0&&!(x.rest&&x.rest.type==="spacer")&&(D--,D===0&&(x.endTriplet=!0));for(var Re=!1;C<w.length&&!Re;){switch(w[C]){case" ":case" ":T(x);break;case")":x.endSlur===void 0?x.endSlur=1:x.endSlur++;break;case"-":x.pitches.forEach(function(Q){Q.startTie={}}),R(r,F,!0);break;case">":case"<":var ze=B(w,C);C+=ze[0]-1,r.next_note_duration=ze[2],ee?ee=ee*ze[1]:ee=ze[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var Oe=a.getFraction(w,C);ee=Oe.value,C=Oe.index;var Z=w[C];Z===" "&&(he=!0),Z==="-"||Z===")"||Z===" "||Z==="<"||Z===">"?C--:Re=!0;break;case"0":ee=0;break;default:Re=!0;break}Re||C++}}else n("Expected ']' to end the chords",w,C);x.pitches!==void 0&&(ee!==null&&(x.duration=x.duration*ee,he&&T(x)),r.addFormattingOptions(x,i.formatting,"note"),c.appendElement("note",S+K,S+C,x),r.measureNotEmpty=!0,x={}),de=!0}}}else{var W={},H=P(w,C,W,!0);if(W.endTie!==void 0&&R(r,F,!0),H!==null){H.pitch!==void 0?(x.pitches=[{}],H.accidental!==void 0&&(x.pitches[0].accidental=H.accidental),x.pitches[0].pitch=H.pitch,x.pitches[0].name=H.name,(H.midipitch||H.midipitch===0)&&(x.pitches[0].midipitch=H.midipitch),H.endSlur!==void 0&&(x.pitches[0].endSlur=H.endSlur),H.endTie!==void 0&&(x.pitches[0].endTie=H.endTie),H.startSlur!==void 0&&(x.pitches[0].startSlur=H.startSlur),x.startSlur!==void 0&&(x.pitches[0].startSlur=x.startSlur),x.dottedSlur!==void 0&&(x.pitches[0].dottedSlur=!0),H.startTie!==void 0&&(x.pitches[0].startTie=H.startTie),x.startTie!==void 0&&(x.pitches[0].startTie=x.startTie)):(x.rest=H.rest,H.rest.type==="multimeasure"&&O()&&(r.currBarNumber+=H.rest.text-1),H.endSlur!==void 0&&(x.endSlur=H.endSlur),H.endTie!==void 0&&(x.rest.endTie=H.endTie),H.startSlur!==void 0&&(x.startSlur=H.startSlur),H.startTie!==void 0&&(x.rest.startTie=H.startTie),x.startTie!==void 0&&(x.rest.startTie=x.startTie)),H.chord!==void 0&&(x.chord=H.chord),H.duration!==void 0&&(x.duration=H.duration),H.decoration!==void 0&&(x.decoration=H.decoration),H.graceNotes!==void 0&&(x.graceNotes=H.graceNotes),delete x.startSlur,delete x.dottedSlur,k(r,F,x)&&(x.pitches!==void 0?x.pitches[0].endTie=!0:x.rest.type!=="spacer"&&(x.rest.endTie=!0),R(r,F,!1)),(H.startTie||x.startTie)&&R(r,F,!0),C=H.endChar,D>0&&!(H.rest&&H.rest.type==="spacer")&&(D--,D===0&&(x.endTriplet=!0)),H.end_beam&&T(x),x.rest&&x.rest.type==="rest"&&x.duration===1&&N(r)<=1&&(x.rest.type="whole",x.duration=N(r)),x.duration<1&&h.indexOf(x.duration)===-1&&x.duration!==0&&(!x.rest||x.rest.type!=="spacer")&&n("Duration not representable: "+w.substring(K,C),w,C),r.addFormattingOptions(x,i.formatting,"note");var j=c.appendElement("note",S+K,S+C,x);j||(this.startNewLine(),c.appendElement("note",S+K,S+C,x)),r.measureNotEmpty=!0,x={}}}C===K&&(w[C]!==" "&&w[C]!=="`"&&n("Unknown character ignored",w,C),C++)}}}this.lineContinuation=w.indexOf("")>=0||$[0]>0,this.lineContinuation||(x={})}};var R=function(w,C,S){var q=w.currentVoice?w.currentVoice.staffNum*100+w.currentVoice.index:0;w.inTie[C]===void 0&&(w.inTie[C]=[]),w.inTie[C][q]=S},I=function(w,C){if(w[C]==='"'){var S=a.getBrackettedSubstring(w,C,5);if(S[2]||n("Missing the closing quote while parsing the chord symbol",w,C),S[0]>0&&S[1].length>0&&S[1][0]==="^")S[1]=S[1].substring(1),S[2]="above";else if(S[0]>0&&S[1].length>0&&S[1][0]==="_")S[1]=S[1].substring(1),S[2]="below";else if(S[0]>0&&S[1].length>0&&S[1][0]==="<")S[1]=S[1].substring(1),S[2]="left";else if(S[0]>0&&S[1].length>0&&S[1][0]===">")S[1]=S[1].substring(1),S[2]="right";else if(S[0]>0&&S[1].length>0&&S[1][0]==="@"){S[1]=S[1].substring(1);var q=a.getFloat(S[1]);if(q.digits===0)return n("Missing first position in absolutely positioned annotation.",w,C),S[1]=S[1].replace("@",""),S[2]="above",S;if(S[1]=S[1].substring(q.digits),S[1][0]!==",")return n("Missing comma absolutely positioned annotation.",w,C),S[1]=S[1].replace("@",""),S[2]="above",S;S[1]=S[1].substring(1);var D=a.getFloat(S[1]);if(D.digits===0)return n("Missing second position in absolutely positioned annotation.",w,C),S[1]=S[1].replace("@",""),S[2]="above",S;S[1]=S[1].substring(D.digits);var $=a.skipWhiteSpace(S[1]);S[1]=S[1].substring($),S[2]=null,S[3]={x:q.value,y:D.value}}else r.freegchord!==!0&&(S[1]=S[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),S[1]=S[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),S[2]="default",S[1]=t.chordName(r,S[1]);return S}return[0,""]},b=function(w,C){if(w[C]==="{"){var S=a.getBrackettedSubstring(w,C,1,"}");S[2]||n("Missing the closing '}' while parsing grace note",w,C),w[C+S[0]]===")"&&(S[0]++,S[1]+=")");for(var q=[],D=0,$=!1;D<S[1].length;){var F=!1;S[1][D]==="/"&&(F=!0,D++);var K=P(S[1],D,{},!1);K!==null?(K.duration=K.duration/(r.default_length*8),F&&(K.acciaccatura=!0),K.rest?n("Rests not allowed as grace notes '"+S[1][D]+"' while parsing grace note",w,C):q.push(K),$&&(K.endTie=!0,$=!1),K.startTie&&($=!0),D=K.endChar,delete K.endChar,K.end_beam&&(K.endBeam=!0,delete K.end_beam)):(S[1][D]===" "?q.length>0&&(q[q.length-1].endBeam=!0):n("Unknown character '"+S[1][D]+"' while parsing grace note",w,C),D++)}if(q.length)return[S[0],q]}return[0]};function A(w,C){if(w[C]==="&"){for(var S=C;w[C]&&w[C]!==":"&&w[C]!=="|";)C++;return[C-S,w.substring(S+1,C)]}return[0]}function N(w){var C=w.origMeter;return!C||C.type!=="specified"||!C.value||C.value.length===0?1:parseInt(C.value[0].num,10)/parseInt(C.value[0].den,10)}var M=function(w,C){var S=r.macros[w[C]];if(S!==void 0)return(S[0]==="!"||S[0]==="+")&&(S=S.substring(1)),(S[S.length-1]==="!"||S[S.length-1]==="+")&&(S=S.substring(0,S.length-1)),f.includes(S)?[1,S]:g.includes(S)?(r.volumePosition==="hidden"&&(S=""),[1,S]):d.includes(S)?(r.dynamicPosition==="hidden"&&(S=""),[1,S]):(r.ignoredDecorations.includes(S)||n("Unknown macro: "+S,w,C),[1,""]);switch(w[C]){case".":if(w[C+1]==="("||w[C+1]==="-")break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var q=a.getBrackettedSubstring(w,C,5);if(q[1].length>1&&(q[1][0]==="^"||q[1][0]==="_")&&(q[1]=q[1].substring(1)),f.includes(q[1]))return q;if(g.includes(q[1]))return r.volumePosition==="hidden"&&(q[1]=""),q;if(d.includes(q[1]))return r.dynamicPosition==="hidden"&&(q[1]=""),q;var D=p.findIndex(function($){return q[1]===$[0]});return D>=0?(q[1]=p[D][1],q):(D=l.findIndex(function($){return q[1]===$[0]}),D>=0?(q[1]=l[D][1],r.dynamicPosition==="hidden"&&(q[1]=""),q):w[C]==="!"&&(q[0]===1||w[C+q[0]-1]!=="!")?[1,null]:(n("Unknown decoration: "+q[1],w,C),q[1]="",q));case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"];case"t":return[1,"trillh"]}return[0,0]},z=function(w,C){for(var S=C;a.isWhiteSpace(w[C]);)C++;return[C-S]},L=function(w,C){var S=a.getBarLine(w,C);if(S.len===0)return[0,""];if(S.warn)return n(S.warn,w,C),[S.len,""];for(var q=0;q<w.length&&w[C+S.len+q]===" ";q++);var D=S.len;if(w[C+S.len+q]==="["&&(S.len+=q+1),w[C+S.len]==='"'&&w[C+S.len-1]==="["){var $=a.getBrackettedSubstring(w,C+S.len,5);return[S.len+$[0],S.token,$[1]]}var F=a.getTokenOf(w.substring(C+S.len),"1234567890-,");return F.len===0||F.token[0]==="-"?[D,S.token]:[S.len+F.len,S.token,F.token]},E=function(w,C){var S={},q=C;for(w[C]==="."&&w[C+1]==="("&&(S.dottedSlur=!0,C++);w[C]==="("||a.isWhiteSpace(w[C]);)w[C]==="("&&(C+1<w.length&&w[C+1]>="2"&&w[C+1]<="9"?(S.triplet!==void 0?n("Can't nest triplets",w,C):(S.triplet=w[C+1]-"0",S.tripletQ=m[S.triplet],S.num_notes=S.triplet,C+2<w.length&&w[C+2]===":"&&(C+3<w.length&&w[C+3]===":"?C+4<w.length&&w[C+4]>="1"&&w[C+4]<="9"?(S.num_notes=w[C+4]-"0",C+=3):n("expected number after the two colons after the triplet to mark the duration",w,C):C+3<w.length&&w[C+3]>="1"&&w[C+3]<="9"?(S.tripletQ=w[C+3]-"0",C+4<w.length&&w[C+4]===":"?C+5<w.length&&w[C+5]>="1"&&w[C+5]<="9"&&(S.num_notes=w[C+5]-"0",C+=4):C+=2):n("expected number after the triplet to mark the duration",w,C))),C++):S.startSlur===void 0?S.startSlur=1:S.startSlur++),C++;return S.consumed=C-q,S};_.prototype.startNewLine=function(){var w={startChar:-1,endChar:-1};r.partForNextLine.title&&(w.part=r.partForNextLine),w.clef=r.currentVoice&&r.staves[r.currentVoice.staffNum].clef!==void 0?Object.assign({},r.staves[r.currentVoice.staffNum].clef):Object.assign({},r.clef);var C=r.currentVoice?r.currentVoice.scoreTranspose:0;if(w.key=e.standardKey(r.key.root+r.key.acc+r.key.mode,r.key.root,r.key.acc,C),w.key.mode=r.key.mode,r.key.impliedNaturals&&(w.key.impliedNaturals=r.key.impliedNaturals),r.key.explicitAccidentals)for(var S=0;S<r.key.explicitAccidentals.length;S++){for(var q=!1,D=0;D<w.key.accidentals.length;D++)w.key.accidentals[D].note===r.key.explicitAccidentals[S].note&&(w.key.accidentals[D].acc=r.key.explicitAccidentals[S].acc,q=!0);q||w.key.accidentals.push(r.key.explicitAccidentals[S])}if(r.targetKey=w.key,w.key.explicitAccidentals&&delete w.key.explicitAccidentals,e.addPosToKey(w.clef,w.key),r.meter!==null?(r.currentVoice?(r.staves.forEach(function(te){te.meter=r.meter}),w.meter=r.staves[r.currentVoice.staffNum].meter,r.staves[r.currentVoice.staffNum].meter=null):w.meter=r.meter,r.meter=null):r.currentVoice&&r.staves[r.currentVoice.staffNum].meter&&(w.meter=r.staves[r.currentVoice.staffNum].meter,r.staves[r.currentVoice.staffNum].meter=null),r.currentVoice&&r.currentVoice.name&&(w.name=r.currentVoice.name),r.vocalfont&&(w.vocalfont=r.vocalfont),r.tripletfont&&(w.tripletfont=r.tripletfont),r.gchordfont&&(w.gchordfont=r.gchordfont),r.style&&(w.style=r.style),r.currentVoice){var $=r.staves[r.currentVoice.staffNum];$.brace&&(w.brace=$.brace),$.bracket&&(w.bracket=$.bracket),$.connectBarLines&&(w.connectBarLines=$.connectBarLines),$.name&&(w.name=$.name[r.currentVoice.index]),$.subname&&(w.subname=$.subname[r.currentVoice.index]),r.currentVoice.stem&&(w.stem=r.currentVoice.stem),r.currentVoice.stafflines&&(w.stafflines=r.currentVoice.stafflines),r.currentVoice.staffscale&&(w.staffscale=r.currentVoice.staffscale),r.currentVoice.scale&&(w.scale=r.currentVoice.scale),r.currentVoice.color&&(w.color=r.currentVoice.color),r.currentVoice.style&&(w.style=r.currentVoice.style),r.currentVoice.transpose&&(w.clef.transpose=r.currentVoice.transpose),w.currentVoice=r.currentVoice;for(var F=Object.keys(r.voices),K=0;K<F.length;K++)w.currentVoice.staffNum===r.voices[F[K]].staffNum&&w.currentVoice.index===r.voices[F[K]].index&&(w.currentVoiceName=F[K])}r.barNumbers===0&&O()&&r.currBarNumber!==1&&(w.barNumber=r.currBarNumber),c.startNewLine(w),r.key.impliedNaturals&&delete r.key.impliedNaturals,r.partForNextLine={},r.tempoForNextLine.length===4&&c.appendElement(r.tempoForNextLine[0],r.tempoForNextLine[1],r.tempoForNextLine[2],r.tempoForNextLine[3]),r.tempoForNextLine=[]};var T=function(w){return w.duration!==void 0&&w.duration<.25&&(w.end_beam=!0),w},P=function(w,C,S,q){var D=function(le){return le==="octave"||le==="duration"||le==="Zduration"||le==="broken_rhythm"||le==="end_slur"},$;w[C]==="."&&w[C+1]==="-"&&($=!0,C++);for(var F="startSlur",K=!1;;){switch(w[C]){case"(":if(F==="startSlur")S.startSlur===void 0?S.startSlur=1:S.startSlur++;else return D(F)?(S.endChar=C,S):null;break;case")":if(D(F))S.endSlur===void 0?S.endSlur=1:S.endSlur++;else return null;break;case"^":if(F==="startSlur")S.accidental="sharp",F="sharp2";else if(F==="sharp2")S.accidental="dblsharp",F="pitch";else return D(F)?(S.endChar=C,S):null;break;case"_":if(F==="startSlur")S.accidental="flat",F="flat2";else if(F==="flat2")S.accidental="dblflat",F="pitch";else return D(F)?(S.endChar=C,S):null;break;case"=":if(F==="startSlur")S.accidental="natural",F="pitch";else return D(F)?(S.endChar=C,S):null;break;case"A":case"B":case"C":case"D":case"E":case"F":case"G":case"a":case"b":case"c":case"d":case"e":case"f":case"g":if(F==="startSlur"||F==="sharp2"||F==="flat2"||F==="pitch"){if(S.pitch=s[w[C]],S.pitch+=7*(r.currentVoice&&r.currentVoice.octave!==void 0?r.currentVoice.octave:r.octave),S.name=w[C],S.accidental&&(S.name=y[S.accidental]+S.name),t.note(r,S),F="octave",q&&r.next_note_duration!==0?(S.duration=r.default_length*r.next_note_duration,r.next_note_duration=0,K=!0):S.duration=r.default_length,r.clef&&r.clef.type==="perc"||r.currentVoice&&r.currentVoice.clef==="perc"){var te=w[C];S.accidental&&(te=y[S.accidental]+te),i.formatting&&i.formatting.midi&&i.formatting.midi.drummap&&(S.midipitch=i.formatting.midi.drummap[te])}}else return D(F)?(S.endChar=C,S):null;break;case",":if(F==="octave")S.pitch-=7,S.name+=",";else return D(F)?(S.endChar=C,S):null;break;case"'":if(F==="octave")S.pitch+=7,S.name+="'";else return D(F)?(S.endChar=C,S):null;break;case"x":case"X":case"y":case"z":case"Z":if(F==="startSlur")S.rest={type:v[w[C]]},delete S.accidental,delete S.startSlur,delete S.startTie,delete S.endSlur,delete S.endTie,delete S.end_beam,delete S.grace_notes,S.rest.type.indexOf("multimeasure")>=0?(S.duration=i.getBarLength(),S.rest.text=1,F="Zduration"):(q&&r.next_note_duration!==0?(S.duration=r.default_length*r.next_note_duration,r.next_note_duration=0,K=!0):S.duration=r.default_length,F="duration");else return D(F)?(S.endChar=C,S):null;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if(F==="octave"||F==="duration"){var V=a.getFraction(w,C);for(S.duration=S.duration*V.value,S.endChar=V.index;V.index<w.length&&(a.isWhiteSpace(w[V.index])||w[V.index]==="-");)w[V.index]==="-"?S.startTie={}:S=T(S),V.index++;C=V.index-1,F="broken_rhythm"}else if(F==="sharp2")S.accidental="quartersharp",F="pitch";else if(F==="flat2")S.accidental="quarterflat",F="pitch";else if(F==="Zduration"){var ae=a.getNumber(w,C);return S.duration=ae.num*i.getBarLength(),S.rest.text=ae.num,S.endChar=ae.index,S}else return null;break;case"-":if(F==="startSlur")c.addTieToLastNote($),S.endTie=!0;else if(F==="octave"||F==="duration"||F==="end_slur")if(S.startTie={},!K&&q)F="broken_rhythm";else return a.isWhiteSpace(w[C+1])&&T(S),S.endChar=C+1,S;else return F==="broken_rhythm"?(S.endChar=C,S):null;break;case" ":case" ":if(D(F)){S.end_beam=!0,$=!1;do w[C]==="."&&w[C+1]==="-"&&($=!0,C++),w[C]==="-"&&(S.startTie={},$&&(S.startTie.style="dotted")),C++;while(C<w.length&&(a.isWhiteSpace(w[C])||w[C]==="-")||w[C]==="."&&w[C+1]==="-");if(S.endChar=C,!K&&q&&(w[C]==="<"||w[C]===">"))C--,F="broken_rhythm";else return S}else return null;break;case">":case"<":if(D(F))if(q){var oe=B(w,C);C+=oe[0]-1,r.next_note_duration=oe[2],S.duration=oe[1]*S.duration,F="end_slur"}else return S.endChar=C,S;else return null;break;default:return D(F)?(S.endChar=C,S):null}if(C++,C===w.length)return D(F)?(S.endChar=C,S):null}return null},B=function(w,C){switch(w[C]){case">":return C<w.length-2&&w[C+1]===">"&&w[C+2]===">"?[3,1.875,.125]:C<w.length-1&&w[C+1]===">"?[2,1.75,.25]:[1,1.5,.5];case"<":return C<w.length-2&&w[C+1]==="<"&&w[C+2]==="<"?[3,.125,1.875]:C<w.length-1&&w[C+1]==="<"?[2,.25,1.75]:[1,.5,1.5]}return null};function O(){return r.currentVoice===void 0||r.currentVoice.staffNum===0&&r.currentVoice.index===0}return Mr=_,Mr}var Nr,Di;function lg(){if(Di)return Nr;Di=1;var e=nt(),t=function(a,n){this.lineIndex=0,this.lines=a,this.multilineVars=n,this.skipWhiteSpace=function(o){for(var h=0;h<o.length;h++)if(!this.isWhiteSpace(o[h]))return h;return o.length};var r=function(o,h){return h>=o.length};this.eatWhiteSpace=function(o,h){for(var s=h;s<o.length;s++)if(!this.isWhiteSpace(o[s]))return s-h;return s-h},this.getKeyPitch=function(o){var h=this.skipWhiteSpace(o);if(r(o,h))return{len:0};switch(o[h]){case"A":return{len:h+1,token:"A"};case"B":return{len:h+1,token:"B"};case"C":return{len:h+1,token:"C"};case"D":return{len:h+1,token:"D"};case"E":return{len:h+1,token:"E"};case"F":return{len:h+1,token:"F"};case"G":return{len:h+1,token:"G"}}return{len:0}},this.getSharpFlat=function(o){if(o==="bass")return{len:0};switch(o[0]){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(o){var h=function(y,m){for(;m<y.length&&(y[m]>="a"&&y[m]<="z"||y[m]>="A"&&y[m]<="Z");)m++;return m},s=this.skipWhiteSpace(o);if(r(o,s))return{len:0};var v=o.substring(s,s+3).toLowerCase();switch((v.length>1&&v[1]===" "||v[1]==="^"||v[1]==="_"||v[1]==="=")&&(v=v[0]),v){case"mix":return{len:h(o,s),token:"Mix"};case"dor":return{len:h(o,s),token:"Dor"};case"phr":return{len:h(o,s),token:"Phr"};case"lyd":return{len:h(o,s),token:"Lyd"};case"loc":return{len:h(o,s),token:"Loc"};case"aeo":return{len:h(o,s),token:"m"};case"maj":return{len:h(o,s),token:""};case"ion":return{len:h(o,s),token:""};case"min":return{len:h(o,s),token:"m"};case"m":return{len:h(o,s),token:"m"}}return{len:0}},this.getClef=function(o,h){var s=o,v=this.skipWhiteSpace(o);if(r(o,v))return{len:0};var y=!1,m=o.substring(v);if(e.startsWith(m,"clef=")&&(y=!0,m=m.substring(5),v+=5),m.length===0&&y)return{len:v+5,warn:"No clef specified: "+s};var _=this.skipWhiteSpace(m);if(r(m,_))return{len:0};_>0&&(v+=_,m=m.substring(_));var k=null;if(e.startsWith(m,"treble"))k="treble";else if(e.startsWith(m,"bass3"))k="bass3";else if(e.startsWith(m,"bass"))k="bass";else if(e.startsWith(m,"tenor"))k="tenor";else if(e.startsWith(m,"alto2"))k="alto2";else if(e.startsWith(m,"alto1"))k="alto1";else if(e.startsWith(m,"alto"))k="alto";else if(!h&&y&&e.startsWith(m,"none"))k="none";else if(e.startsWith(m,"perc"))k="perc";else if(!h&&y&&e.startsWith(m,"C"))k="tenor";else if(!h&&y&&e.startsWith(m,"F"))k="bass";else if(!h&&y&&e.startsWith(m,"G"))k="treble";else return{len:v+5,warn:"Unknown clef specified: "+s};return m=m.substring(k.length),_=this.isMatch(m,"+8"),_>0?k+="+8":(_=this.isMatch(m,"-8"),_>0&&(k+="-8")),{len:v+k.length,token:k,explicit:y}},this.getBarLine=function(o,h){switch(o[h]){case"]":switch(++h,o[h]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++h,o[h]>="1"&&o[h]<="9"||o[h]==='"'?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}case":":switch(++h,o[h]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++h,o[h]){case"]":switch(++h,o[h]){case"|":return++h,o[h]===":"?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}case"|":return++h,o[h]===":"?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}default:return{len:1,warn:"Unknown bar symbol"}}case"[":if(++h,o[h]==="|")switch(++h,o[h]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}else return o[h]>="1"&&o[h]<="9"||o[h]==='"'?{len:1,token:"bar_invisible"}:{len:0};case"|":switch(++h,o[h]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++h,o[h]===":"?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var s=0;o[h+s]===":";)s++;return{len:1+s,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(o,h){for(var s=0;s<o.length;s++)if(h.indexOf(o[s])<0)return{len:s,token:o.substring(0,s)};return{len:s,token:o}},this.getToken=function(o,h,s){for(var v=h;v<s&&!this.isWhiteSpace(o[v]);)v++;return o.substring(h,v)},this.isMatch=function(o,h){var s=this.skipWhiteSpace(o);return r(o,s)?0:e.startsWith(o.substring(s),h)?s+h.length:0},this.getPitchFromTokens=function(o){var h={},s={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};if(h.position=s[o[0].token],h.position===void 0)return{warn:"Pitch expected. Found: "+o[0].token};for(o.shift();o.length;)switch(o[0].token){case",":h.position-=7,o.shift();break;case"'":h.position+=7,o.shift();break;default:return h}return h},this.getKeyAccidentals2=function(o){for(var h;o.length>0;){var s;if(o[0].token==="^"){if(s="sharp",o.shift(),o.length===0)return{accs:h,warn:"Expected note name after "+s};switch(o[0].token){case"^":s="dblsharp",o.shift();break;case"/":s="quartersharp",o.shift();break}}else if(o[0].token==="=")s="natural",o.shift();else if(o[0].token==="_"){if(s="flat",o.shift(),o.length===0)return{accs:h,warn:"Expected note name after "+s};switch(o[0].token){case"_":s="dblflat",o.shift();break;case"/":s="quarterflat",o.shift();break}}else return{accs:h};if(o.length===0)return{accs:h,warn:"Expected note name after "+s};switch(o[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":h===void 0&&(h=[]),h.push({acc:s,note:o[0].token[0]}),o[0].token.length===1?o.shift():o[0].token=o[0].token.substring(1);break;default:return{accs:h,warn:"Expected note name after "+s+" Found: "+o[0].token}}}return{accs:h}},this.getKeyAccidental=function(o){var h={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},s=this.skipWhiteSpace(o);if(r(o,s))return{len:0};var v=null;switch(o[s]){case"^":case"_":case"=":v=o[s];break;default:return{len:0}}if(s++,r(o,s))return{len:1,warn:"Expected note name after accidental"};switch(o[s]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:s+1,token:{acc:h[v],note:o[s]}};case"^":case"_":case"/":if(v+=o[s],s++,r(o,s))return{len:2,warn:"Expected note name after accidental"};switch(o[s]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:s+1,token:{acc:h[v],note:o[s]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(o){return o===" "||o===" "||o===""},this.getMeat=function(o,h,s){var v=o.indexOf("%",h);for(v>=0&&v<s&&(s=v);h<s&&(o[h]===" "||o[h]===" "||o[h]==="");)h++;for(;h<s&&(o[s-1]===" "||o[s-1]===" "||o[s-1]==="");)s--;return{start:h,end:s}};var i=function(o){return o>="A"&&o<="Z"||o>="a"&&o<="z"},c=function(o){return o>="0"&&o<="9"};this.tokenize=function(o,h,s,v){var y=this.getMeat(o,h,s);h=y.start,s=y.end;for(var m=[],_;h<s;){if(o[h]==='"'){for(_=h+1;_<s&&o[_]!=='"';)_++;m.push({type:"quote",token:o.substring(h+1,_),start:h+1,end:_}),_++}else if(i(o[h])){if(_=h+1,v)for(;_<s&&!this.isWhiteSpace(o[_]);)_++;else for(;_<s&&i(o[_]);)_++;m.push({type:"alpha",token:o.substring(h,_),continueId:c(o[_]),start:h,end:_}),h=_+1}else if(o[h]==="."&&c(o[_+1])){_=h+1;for(var k=null,x=null;_<s&&c(o[_]);)_++;x=parseFloat(o.substring(h,_)),m.push({type:"number",token:o.substring(h,_),intt:k,floatt:x,continueId:i(o[_]),start:h,end:_}),h=_+1}else if(c(o[h])||o[h]==="-"&&c(o[_+1])){_=h+1;for(var R=null,I=null;_<s&&c(o[_]);)_++;if(o[_]==="."&&c(o[_+1]))for(_++;_<s&&c(o[_]);)_++;else R=parseInt(o.substring(h,_));I=parseFloat(o.substring(h,_)),m.push({type:"number",token:o.substring(h,_),intt:R,floatt:I,continueId:i(o[_]),start:h,end:_}),h=_+1}else o[h]===" "||o[h]===" "||m.push({type:"punct",token:o[h],start:h,end:h+1}),_=h+1;h=_}return m},this.getVoiceToken=function(o,h,s){for(var v=h;v<s&&this.isWhiteSpace(o[v])||o[v]==="=";)v++;if(o[v]==='"'){var y=o.indexOf('"',v+1);return y===-1||y>=s?{len:1,err:"Missing close quote"}:{len:y-h+1,token:this.translateString(o.substring(v+1,y))}}else{for(var m=v;m<s&&!this.isWhiteSpace(o[m])&&o[m]!=="=";)m++;return{len:m-h+1,token:o.substring(v,m)}}};var u={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å",aa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å",AA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~N":"Ñ","~n":"ñ","=s":"š",vs:"š",DH:"Ð",dh:"ð",HO:"Ő",Ho:"ő",HU:"Ű",Hu:"ű","'Y":"Ý","'y":"ý","^Y":"Ŷ","^y":"ŷ",'"Y':"Ÿ",'"y':"ÿ",vS:"Š",vZ:"Ž",vz:"ž"},f={"#":"♯",b:"♭","=":"♮"},g={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:" ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};this.translateString=function(o){var h=o.split("\\");if(h.length===1)return o;var s=null;return h.forEach(function(v){if(s===null)s=v;else{var y=u[v.substring(0,2)];y!==void 0?s+=y+v.substring(2):(y=g[v.substring(0,3)],y!==void 0?s+=y+v.substring(3):(y=f[v.substring(0,1)],y!==void 0?s+=y+v.substring(1):s+="\\"+v))}}),s},this.getNumber=function(o,h){for(var s=0;h<o.length;)switch(o[h]){case"0":s=s*10,h++;break;case"1":s=s*10+1,h++;break;case"2":s=s*10+2,h++;break;case"3":s=s*10+3,h++;break;case"4":s=s*10+4,h++;break;case"5":s=s*10+5,h++;break;case"6":s=s*10+6,h++;break;case"7":s=s*10+7,h++;break;case"8":s=s*10+8,h++;break;case"9":s=s*10+9,h++;break;default:return{num:s,index:h}}return{num:s,index:h}},this.getFraction=function(o,h){var s=1,v=1;if(o[h]!=="/"){var y=this.getNumber(o,h);s=y.num,h=y.index}if(o[h]==="/")if(h++,o[h]==="/"){for(var m=.5;o[h++]==="/";)m=m/2;return{value:s*m,index:h-1}}else{var _=h,k=this.getNumber(o,h);k.num===0&&_===h&&(k.num=2),k.num!==0&&(v=k.num),h=k.index}return{value:s/v,index:h}};function d(o){const s=/^(\d+)\./.exec(o);return s?s[1]:null}var p=[{match:/,\s*The$/,replace:"The "},{match:/,\s*the$/,replace:"the "},{match:/,\s*A$/,replace:"A "},{match:/,\s*a$/,replace:"a "},{match:/,\s*An$/,replace:"An "},{match:/,\s*an$/,replace:"an "},{match:/,\s*Da$/,replace:"Da "},{match:/,\s*La$/,replace:"La "},{match:/,\s*Le$/,replace:"Le "},{match:/,\s*Les$/,replace:"Les "},{match:/,\s*Ye$/,replace:"Ye "}];this.theReverser=function(o){for(var h=0;h<p.length;h++){var s=p[h],v=o.match(s.match);if(v){var y=d(o);y&&(o=o.replace(y+".",""),o=o.trim());var m=v[0].length,_=s.replace+o.substring(0,o.length-m);return y&&(_=y+". "+_),_}}return o},this.stripComment=function(o){var h=o.indexOf("%");return h>=0?e.strip(o.substring(0,h)):e.strip(o)},this.getInt=function(o){var h=parseInt(o);if(isNaN(h))return{digits:0};var s=""+h,v=o.indexOf(s);return{value:h,digits:v+s.length}},this.getFloat=function(o){var h=parseFloat(o);if(isNaN(h))return{digits:0};var s=""+h,v=o.indexOf(s);return{value:h,digits:v+s.length}},this.getMeasurement=function(o){if(o.length===0)return{used:0};var h=1,s="";if(o[0].token==="-")o.shift(),s="-",h++;else if(o[0].type!=="number")return{used:0};if(s+=o.shift().token,o.length===0)return{used:1,value:parseInt(s)};var v=o.shift();if(v.token==="."){if(h++,o.length===0)return{used:h,value:parseInt(s)};if(o[0].type==="number"&&(v=o.shift(),s=s+"."+v.token,h++,o.length===0))return{used:h,value:parseFloat(s)};v=o.shift()}switch(v.token){case"pt":return{used:h+1,value:parseFloat(s)};case"px":return{used:h+1,value:parseFloat(s)};case"cm":return{used:h+1,value:parseFloat(s)/2.54*72};case"in":return{used:h+1,value:parseFloat(s)*72};default:return o.unshift(v),{used:h,value:parseFloat(s)}}};var l=function(o){return o=o.replace(/\\n/g,`
|
|
89
|
+
`),o=o.replace(/\\"/g,'"'),o};this.getBrackettedSubstring=function(o,h,s,v){for(var y=v||o[h],m=h+1,_=!1;m<o.length&&(_||o[m]!==y);)_=o[m]==="\\",++m;return o[m]===y?[m-h+1,l(o.substring(h+1,m)),!0]:(m=h+s,m>o.length-1&&(m=o.length-1),[m-h+1,l(o.substring(h+1,m)),!1])}};return t.prototype.peekLine=function(){return this.lines[this.lineIndex]},t.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex<this.lines.length){var a=this.lines[this.lineIndex];return this.lineIndex++,a}return null},Nr=t,Nr}var Pr,Fi;function xl(){if(Fi)return Pr;Fi=1;function e(d,p,l){if(!(!p||d.lines.length===0)){var o=d.deline({lineBreaks:!1}),h=a(o,p);d.lines=t(o,h,l),d.lineBreaks=h}}function t(d,p,l){for(var o=[],h=[],s=[],v=1,y=0;y<p.length;y++){var m=p[y];if(d[m.ogLine].staff){var _=d[m.ogLine].staff[m.staff];if(o[m.line]||(o[m.line]={staff:[]}),!o[m.line].staff[m.staff]){o[m.line].staff[m.staff]={voices:[]},l!==void 0&&m.staff===0&&m.line>0&&(o[m.line].staff[m.staff].barNumber=v);for(var k=Object.keys(_),x=0;x<k.length;x++){var R=k[x]==="voices";k[x]==="meter"&&m.line!==0&&(R=!0),R||(o[m.line].staff[m.staff][k[x]]=_[k[x]])}h[m.staff]&&(o[m.line].staff[m.staff].key=h[m.staff])}o[m.line].staff[m.staff].voices[m.voice]||(o[m.line].staff[m.staff].voices[m.voice]=[]),o[m.line].staff[m.staff].voices[m.voice]=d[m.ogLine].staff[m.staff].voices[m.voice].slice(m.start,m.end+1),s[m.staff*10+m.voice]&&o[m.line].staff[m.staff].voices[m.voice].unshift({el_type:"stem",direction:s[m.staff*10+m.voice].direction});for(var I=o[m.line].staff[m.staff].voices[m.voice],b=I.length-1;b>=0;b--)if(I[b].el_type==="key"){h[m.staff]={root:I[b].root,acc:I[b].acc,mode:I[b].mode,accidentals:I[b].accidentals.filter(function(N){return N.acc!=="natural"})};break}for(b=I.length-1;b>=0;b--)if(I[b].el_type==="stem"){s[m.staff*10+m.voice]={direction:I[b].direction};break}if(l!==void 0&&m.staff===0&&m.voice===0)for(b=0;b<I.length;b++)I[b].el_type==="bar"&&(v++,b===I.length-1?delete I[b].barNumber:I[b].barNumber=v)}else o[m.line]=d[m.ogLine]}for(var A=0;A<o.length;A++)o[A].staff&&(o[A].staff=o[A].staff.filter(function(N){return N!=null}));return o}function a(d,p){for(var l=[],o=0,h=0,s=0,v=0;v<d.length;v++){var y=d[v];if(y.staff){var m=h,_=p[o];o++;for(var k=0;k<y.staff.length;k++)for(var x=y.staff[k],R=0;R<x.voices.length;R++){s=m;for(var I=0,b=0,A=x.voices[R],N=0,M=0;M<A.length;M++){var z=A[M];z.el_type==="bar"&&(_[b]===I&&(l.push({ogLine:v,line:s,staff:k,voice:R,start:N,end:M}),N=M+1,s++,h=Math.max(h,s),b++),I++)}l.push({ogLine:v,line:s,staff:k,voice:R,start:N,end:A.length}),s++,h=Math.max(h,s)}}else l.push({ogLine:v,line:s}),s++,h=Math.max(h,s)}return l}function n(d,p){for(var l=[],o=[],h=0,s=0;s<d.length;s++){var v=d[s],y=h+v;if(y<p)h=y;else{var m=p-h,_=y-p;m<_&&h>0?(l.push(s-1),o.push(Math.round(h-v)),h=v):s<d.length-1&&(l.push(s),o.push(Math.round(h)),h=0)}}return o.push(Math.round(h)),{lineBreaks:l,totals:o}}function r(d){for(var p=[],l=0;l<d.length;l++)p.push(d[l]);return p}function i(d,p,l,o,h,s,v,y,m,_,k){for(var x=_;x<d.length;x++){var R=d[x];l+=R,o+=R;var I=Math.abs(l-p[y]),b=Math.abs(I-s)<p[0]/10;if(b)if(I<s){var A=r(h),N=r(m);N.push(x-1),A.push(o-R),k.push({accumulator:l,lineAccumulator:R,lineWidths:A,lastVariance:Math.abs(l-p[y+1]),highestVariance:Math.max(v,s),currLine:y+1,lineBreaks:N,startIndex:x+1})}else I>s&&x<d.length-1&&(A=r(h),N=r(m),k.push({accumulator:l,lineAccumulator:o,lineWidths:A,lastVariance:I,highestVariance:Math.max(v,I),currLine:y,lineBreaks:N,startIndex:x+1}));I>s?(m.push(x-1),y++,v=Math.max(v,s),s=Math.abs(l-p[y]),h.push(o-R),o=R):s=I}h.push(o)}function c(d,p,l,o){for(var h=Math.ceil(d.total/p),s=Math.floor(d.total/h),v=[],y=0;y<h;y++)v.push(s*(y+1));var m=[];m.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var _=0;_<m.length;)i(d.measureWidths,v,m[_].accumulator,m[_].lineAccumulator,m[_].lineWidths,m[_].lastVariance,m[_].highestVariance,m[_].currLine,m[_].lineBreaks,m[_].startIndex,m),_++;for(y=0;y<m.length;y++){var k=m[y];k.variances=[],k.aveVariance=0;for(var x=0;x<k.lineWidths.length;x++){var R=k.lineWidths[x];k.variances.push(R-v[0]),k.aveVariance+=Math.abs(R-v[0])}k.aveVariance=k.aveVariance/k.lineWidths.length,o.attempts.push({type:"optimizeLineWidths",lineBreaks:k.lineBreaks,variances:k.variances,aveVariance:k.aveVariance,widths:d.measureWidths})}var I=9999999,b=-1;for(y=0;y<m.length;y++)k=m[y],k.aveVariance<I&&(I=k.aveVariance,b=y);return{failed:!1,lineBreaks:m[b].lineBreaks,variance:m[b].highestVariance}}function u(d,p,l){for(var o=[],h=[],s=0,v=!1,y=0;y<d.length;y++)s+=d[y],s>p&&(v=!0),y%l===l-1&&(y!==d.length-1&&o.push(y),h.push(Math.round(s)),s=0);return{failed:v,totals:h,lineBreaks:o}}function f(d,p,l){var o={lineBreaks:d,staffwidth:p};for(var h in l)l.hasOwnProperty(h)&&h!=="wrap"&&h!=="staffwidth"&&(o[h]=l[h]);return{revisedParams:o}}function g(d,p,l){if(p.length===0||l.staffwidth<p[0].left)return{reParse:!1,explanation:"Staff width is narrower than the margin",revisedParams:l};var o=l.scale?Math.max(l.scale,.1):1,h=l.wrap.minSpacing?Math.max(parseFloat(l.wrap.minSpacing),1):1,s=l.wrap.minSpacingLimit?Math.max(parseFloat(l.wrap.minSpacingLimit),1):h-.1,v=l.wrap.maxSpacing?Math.max(parseFloat(l.wrap.maxSpacing),1):void 0;l.wrap.lastLineLimit&&!v&&(v=Math.max(parseFloat(l.wrap.lastLineLimit),1));for(var y=l.wrap.preferredMeasuresPerLine?Math.max(parseInt(l.wrap.preferredMeasuresPerLine,10),0):void 0,m=[],_=[],k=0;k<p.length;k++){var x=p[k],R=l.staffwidth-x.left,I=R/h/o,b=R/v/o,A=R/s/o,N={widths:x,lineBreakPoint:I,minLineSize:b,attempts:[],staffWidth:l.staffwidth,minWidth:Math.round(A)},M=null;if(y){var z=u(x.measureWidths,I,y);N.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:y,lineBreaks:z.lineBreaks,failed:z.failed,totals:z.totals}),z.failed||(M=z.lineBreaks)}if(!M){var L=n(x.measureWidths,I);N.attempts.push({type:"Free Form",lineBreaks:L.lineBreaks,totals:L.totals}),M=L.lineBreaks,M.length>0&&x.measureWidths.length<25&&(L=c(x,I,M,N),N.attempts.push({type:"Optimize",failed:L.failed,reason:L.reason,lineBreaks:L.lineBreaks,totals:L.totals}),L.failed||(M=L.lineBreaks))}m.push(M),_.push(N)}var E=l.staffwidth,T=f(m,E,l);return T.explanation=_,T.reParse=!0,T}return Pr={wrapLines:e,calcLineWraps:g},Pr}var zr,Hi;function ug(){if(Hi)return zr;Hi=1;function e(f){const g=f.getMeterFraction(),d=g.num===4&&g.den===4;if(!(g.num===2&&g.den===2)&&!d)throw new Error("notCommonTime");const l=f.deline();let o=[],h=!1;return l.forEach(s=>{if(s.subtitle)h&&o.push({type:"subtitle",subtitle:s.subtitle.text});else if(s.text)h=!0,o.push({type:"text",text:s.text.text});else if(s.staff){h=!0;const v=s.staff,y=a(v);o=o.concat(y)}}),r(o),i(o),c(o),o}const t=["break","(break)","no chord","n.c.","tacet"];function a(f){const g=[];let d="",p=[],l={chord:["","","",""]},o="",h="";if(f.forEach((s,v)=>{s.voices&&s.voices.forEach((y,m)=>{let _=0,k=0;y.forEach(x=>{if(x.el_type==="part")p.length>0&&v===0&&m===0&&(g.push({type:"part",name:d,lines:[p]}),p=[]),d=x.title;else if(x.el_type==="note"){u(x,l);const R=Math.floor(_);if(x.chord&&x.chord.length>0){const I=x.chord[0],b=I.position==="default"||t.indexOf(I.name.toLowerCase())>=0?I.name:"";b&&(R>0&&!l.chord[0]&&(l.chord[0]=o),o=b,l.chord[R]?R<4&&!l.chord[R+1]&&(l.chord[R+1]=b):l.chord[R]=b),x.chord.forEach(A=>{A.position!=="default"&&t.indexOf(I.name.toLowerCase())<0&&(l.annotations||(l.annotations=[]),l.annotations.push(A.name))})}if(!x.rest||x.rest.type!=="spacer"){const I=Math.floor(x.duration*4);if(I>4)k+=Math.floor(I/4),_=0;else{let b=x.duration*4;x.tripletMultiplier&&(b*=x.tripletMultiplier),_+=b}}}else if(x.el_type==="bar"){if(h&&(l.ending=h,h=""),u(x,l),(x.type==="bar_dbl_repeat"||x.type==="bar_left_repeat")&&(l.hasStartRepeat=!0),(x.type==="bar_dbl_repeat"||x.type==="bar_right_repeat")&&(l.hasEndRepeat=!0),x.startEnding&&(h=x.startEnding),_>=4){if(l.chord[0]===""&&(l.chord[1]||l.chord[2]||l.chord[3])&&(l.chord[0]=n(p)),v===0&&m===0)p.push(l);else{let R=k,I=0;for(;R>=g[I].lines[0].length&&I<g.length;)R-=g[I].lines[0].length,I++;if(I<g.length&&R<g[I].lines[0].length){const b=g[I].lines[0][R];!b.chord[0]&&l.chord[0]&&(b.chord[0]=l.chord[0]),!b.chord[1]&&l.chord[1]&&(b.chord[1]=l.chord[1]),!b.chord[2]&&l.chord[2]&&(b.chord[2]=l.chord[2]),!b.chord[3]&&l.chord[3]&&(b.chord[3]=l.chord[3]),l.annotations&&(b.annotations?b.annotations=b.annotations.concat(l.annotations):b.annotations=l.annotations)}k++}l={chord:["","","",""]}}else l.chord=["","","",""];_=0}else x.el_type}),v===0&&m===0&&g.push({type:"part",name:d,lines:[p]})})}),!o)throw new Error("noChords");return g}function n(f){for(let g=f.length-1;g>=0;g--)for(let d=f[g].chord.length-1;d>=0;d--)if(f[g].chord[d])return f[g].chord[d]}function r(f){f.forEach(g=>{if(g.type==="part"){const d=g.lines[0],p=d.findIndex(o=>!!o.ending),l=d.findIndex((o,h)=>h>p&&!!o.ending);if(p>=0&&l>=0&&l-p===d.length-l){let o=!0;for(let h=0;h<l-p&&o;h++){const s=d[p+h],v=d[l+h];if(s.chord[0]!==v.chord[0]&&(o=!1),s.chord[1]!==v.chord[1]&&(o=!1),s.chord[2]!==v.chord[2]&&(o=!1),s.chord[3]!==v.chord[3]&&(o=!1),s.annotations&&!v.annotations&&(o=!1),!s.annotations&&v.annotations&&(o=!1),s.annotations&&v.annotations)if(s.annotations.length!==v.annotations.length)o=!1;else for(let y=0;y<s.annotations.length;y++)s.annotations[y]!==v.annotations[y]&&(o=!1)}o&&(delete d[p].ending,d.splice(l,d.length-l))}}})}function i(f){f.forEach(g=>{if(g.type==="part"){const d=[],p=g.lines[0];let l=!1;const o=p.findIndex(v=>!!v.hasEndRepeat);(o>=0?Math.min(o+1,p.length):p.length)===12&&(l=!0);const s=l?4:8;for(let v=0;v<p.length;v+=s){const y=p.slice(v,v+s),m=y.findIndex(_=>!!_.hasEndRepeat);m>=0&&m<y.length-1?(d.push(y.slice(0,m+1)),d.push(y.slice(m+1))):d.push(y)}for(let v=0;v<d.length;v++)if(d[v][0].ending){const y=Math.max(0,v-1),m=d[y].length-d[v].length,_=[];for(let k=0;k<m;k++)_.push({noBorder:!0,chord:["","","",""]});d[v]=_.concat(d[v])}g.lines=d}})}function c(f){f.forEach(g=>{if(g.lines){let d=!1,p="";g.lines.forEach(l=>{l.forEach(o=>{if(!o.noBorder){const h=o.chord;!h[0]&&!h[1]&&!h[2]&&!h[3]?(d?p&&(h[0]="%"):h[0]=p,d=!0):!h[1]&&!h[2]&&!h[3]?(d=!0,p=h[0]):(d=!1,p=h[3]||h[2]||h[1])}})})}})}function u(f,g){if(f.decoration)for(let d=0;d<f.decoration.length;d++)switch(f.decoration[d]){case"fermata":case"segno":case"coda":case"D.C.":case"D.S.":case"D.C.alcoda":case"D.C.alfine":case"D.S.alcoda":case"D.S.alfine":case"fine":g.annotations||(g.annotations=[]),g.annotations.push(f.decoration[d]);break}}return zr=e,zr}var Ir,$i;function Ve(){if($i)return Ir;$i=1;var e={};return e.FONTEM=360,e.FONTSIZE=30,e.STEP=e.FONTSIZE*93/720,e.SPACE=10,e.TOPNOTE=15,e.STAVEHEIGHT=100,e.INDENT=50,Ir=e,Ir}var Rr,Zi;function hg(){if(Zi)return Rr;Zi=1;const e=nt();function t(i){this.sections=[{type:"startRepeat",index:-1}],this.addBar=function(c){var u=i.length-1,f=c.type==="bar_left_repeat"||c.type==="bar_dbl_repeat",g=c.type==="bar_right_repeat"||c.type==="bar_dbl_repeat",d=c.startEnding?r(c.startEnding):void 0;g&&this.sections.push({type:"endRepeat",index:u}),f&&this.sections.push({type:"startRepeat",index:u}),d&&this.sections.push({type:"startEnding",index:u,endings:d})},this.resolveRepeats=function(){var c,u=this.sections[this.sections.length-1],f=i.length-1;if(u.type==="startRepeat"?u.end=f:u.index+1<f&&this.sections.push({type:"startRepeat",index:u.index+1}),this.sections.length<2)return i;for(var g=[],d=null,p=0;p<this.sections.length;p++){var l=this.sections[p];switch(l.type){case"startRepeat":if(d){if(d.common.end||(d.common.end=l.index),d.endings)for(c=0;c<d.endings.length;c++)d.endings[c]&&!d.endings[c].end&&d.endings[c].start!==l.index&&(d.endings[c].end=l.index);this.sections[p-1].type==="endRepeat"&&d.endings&&d.endings.length&&(d.endings[d.endings.length]={start:-1,end:-1}),g.push(d)}if(d){var o=d.common.end;if(d.endings)for(c=0;c<d.endings.length;c++)d.endings[c]&&(o=Math.max(o,d.endings[c].end));o<l.index-1&&(console.log("gap",i.slice(o+1,l.index)),g.push({common:{start:o+1,end:l.index}}))}d={common:{start:l.index}};break;case"startEnding":{if(d)for(d.common.end||(d.common.end=l.index),d.endings||(d.endings=[]),c=0;c<l.endings.length;c++)d.endings[l.endings[c]]={start:l.index+1};break}case"endRepeat":if(d){if(d.endings||(d.endings=[]),d.endings.length>0)for(c=0;c<d.endings.length;c++)d.endings[c]&&!d.endings[c].end&&(d.endings[c].end=l.index);d.common.end||(d.common.end=l.index)}break}}if(d){if(d.common.end||(d.common.end=f),d.endings)for(c=0;c<d.endings.length;c++)d.endings[c]&&!d.endings[c].end&&(d.endings[c].end=f);g.push(d)}for(var h=[],s=-1,v=0;v<g.length;v++){var y=g[v];if(!y.endings)a(i,h,y.common.start,y.common.end);else if(y.endings.length===0)a(i,h,y.common.start,y.common.end),a(i,h,y.common.start,y.common.end);else for(c=0;c<y.endings.length;c++){var m=y.endings[c];m&&(a(i,h,y.common.start,y.common.end),m.start>0&&a(i,h,m.start,m.end),s=Math.max(s,m.end))}}return h}}function a(i,c,u,f){for(var g=u;g<=f;g++)c.push(n(i[g]))}function n(i){var c=Object.assign({},i);return c.pitches&&(c.pitches=e.cloneArray(c.pitches)),c}function r(i){var c=[],u,f,g;if(i.indexOf(",")>0)for(f=i.split(","),g=0;g<f.length;g++)u=parseInt(f[g],10),u>0&&c.push(u);else if(i.indexOf("-")>0){f=i.split("-");var d=parseInt(f[0],10),p=parseInt(f[1],10);for(g=d;g<=p;g++)c.push(g)}else u=parseInt(i,10),u>0&&c.push(u);return c}return Rr=t,Rr}var qr,Gi;function Cl(){if(Gi)return qr;Gi=1;var e,t=nt(),a=hg();return(function(){var n=1,r=128;e=function(v,y){y=y||{};var m,_=y.program||0,k=y.midiTranspose||0;v.visualTranspose&&(k-=v.visualTranspose);var x=y.channel||0,R=!1,I=y.drum||"",b=y.drumBars||1,A=y.drumIntro||0,N=I!=="",M=!!y.drumOff,z=[],L=50;_=parseInt(_,10),k=parseInt(k,10),x=parseInt(x,10),x===10&&(_=r),I=I.split(" "),b=parseInt(b,10),A=parseInt(A,10);var E=v.formatting.bagpipes;E&&(_=71);var T=[];if(v.formatting.midi){var P=v.formatting.midi;P.program&&P.program.length>0&&(_=P.program[0],P.program.length>1&&(_=P.program[1],x=P.program[0]),R=!0),P.transpose&&(k=P.transpose[0]),P.channel&&(x=P.channel[0],R=!0),P.drum&&(I=P.drum),P.drumbars&&(b=P.drumbars[0]),P.drumon&&(N=!0),x===10&&(_=r),P.beat&&T.push({el_type:"beat",beats:P.beat}),P.nobeataccents&&T.push({el_type:"beataccents",value:!1})}y.qpm?m=parseInt(y.qpm,10):v.metaText.tempo?m=d(v.metaText.tempo,v.getBeatLength()):y.defaultQpm?m=y.defaultQpm:m=180;var B=[];E&&B.push({el_type:"bagpipes"}),B.push({el_type:"instrument",program:_}),x&&B.push({el_type:"channel",channel:x}),k&&B.push({el_type:"transpose",transpose:k}),B.push({el_type:"tempo",qpm:m});for(var O=0;O<T.length;O++)B.push(T[O]);var w=[],C=[],S=[],q=[],D=[0],$={};$[0]={el_type:"tempo",qpm:m,timing:0};for(var F,K=[],te=!1,V=v.lines,ae=0;ae<V.length;ae++){var oe=V[ae];if(oe.staff){let pe=function(be){var $e={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]},ve;if(be.decoration){if(be.decoration.indexOf("pppp")>=0?ve="pppp":be.decoration.indexOf("ppp")>=0?ve="ppp":be.decoration.indexOf("pp")>=0?ve="pp":be.decoration.indexOf("p")>=0?ve="p":be.decoration.indexOf("mp")>=0?ve="mp":be.decoration.indexOf("mf")>=0?ve="mf":be.decoration.indexOf("f")>=0?ve="f":be.decoration.indexOf("ff")>=0?ve="ff":be.decoration.indexOf("fff")>=0?ve="fff":be.decoration.indexOf("ffff")>=0&&(ve="ffff"),ve){F=$e[ve].slice(0);let kt=[F];Array.isArray(be.decoration)&&(kt=[],be.decoration.forEach(ct=>{ct in $e&&kt.push($e[ct].slice(0))})),w[J].push({el_type:"beat",beats:F.slice(0),volumesPerNotePitch:kt}),S[he]=!1,q[he]=!1}if(be.decoration.indexOf("crescendo(")>=0){var rt=i(de,W,"crescendo)"),Ue=Math.min(127,F[0]+L),Ze=c(de,W+rt+1,Object.keys($e));Ze&&(Ue=$e[Ze][0]),rt>0?S[he]=Math.floor((Ue-F[0])/rt):S[he]=!1,q[he]=!1}else if(be.decoration.indexOf("crescendo)")>=0)S[he]=!1;else if(be.decoration.indexOf("diminuendo(")>=0){var st=i(de,W,"diminuendo)"),ot=Math.max(15,F[0]-L),vt=c(de,W+st+1,Object.keys($e));vt&&(ot=$e[vt][0]),S[he]=!1,st>0?q[he]=Math.floor((ot-F[0])/st):q[he]=!1}else be.decoration.indexOf("diminuendo)")>=0&&(q[he]=!1)}};for(var qe=pe,le=oe.staff,J=0,ce=0;ce<le.length;ce++){var ee=le[ce];if(!(ee.clef&&ee.clef.type==="TAB"))for(var he=0;he<ee.voices.length;he++){var de=ee.voices[he];if(!w[J]){w[J]=[].concat(JSON.parse(JSON.stringify(B)));var Se=g(oe.staff,J);Se&&w[J].unshift({el_type:"name",trackName:Se}),K[J]=new a(w[J])}if(k&&ee.clef.type==="perc"&&w[J].push({el_type:"transpose",transpose:0}),ee.clef&&ee.clef.type==="perc"&&!R)for(var we=0;we<w[J].length;we++)w[J][we].el_type==="instrument"&&(w[J][we].program=r);else ee.key&&o(w[J],ee.key);ee.meter&&h(w[J],ee.meter),!te&&N&&(w[J].push({el_type:"drum",params:{pattern:I,bars:b,on:N,intro:A}}),te=!0),ee.clef&&ee.clef.type!=="perc"&&ee.clef.transpose&&(ee.clef.el_type="clef",w[J].push({el_type:"transpose",transpose:ee.clef.transpose}),C[J]=!1),ee.clef&&ee.clef.type&&(ee.clef.type.indexOf("-8")>=0?(w[J].push({el_type:"transpose",transpose:-12}),C[J]=!0):ee.clef.type.indexOf("+8")>=0?(w[J].push({el_type:"transpose",transpose:12}),C[J]=!0):C[J]&&(w[J].push({el_type:"transpose",transpose:0}),C[J]=!1)),v.formatting.midi&&v.formatting.midi.drumoff&&(w[J].push({el_type:"bar"}),w[J].push({el_type:"drum",params:{pattern:"",on:!1}}));var Re=0,ze=0,Oe=0,Z=0;F=[105,95,85,1];for(var W=0;W<de.length;W++){var H=de[W];switch(H.el_type){case"note":if(S[he]&&(F[0]+=S[he],F[1]+=S[he],F[2]+=S[he],w[J].push({el_type:"beat",beats:F.slice(0)})),q[he]&&(F[0]+=q[he],F[1]+=q[he],F[2]+=q[he],w[J].push({el_type:"beat",beats:F.slice(0)})),pe(H),!H.rest||H.rest.type!=="spacer"){var j={elem:H,el_type:"note",timing:D[J]};if(H.style?j.style=H.style:z[J]&&(j.style=z[J]),j.duration=H.duration===0?.25:H.duration,H.startTriplet){if(ze=H.tripletMultiplier,Oe=H.startTriplet*ze*H.duration,H.startTriplet!==H.tripletR&&W+H.tripletR<=de.length){for(var Q=0,re=W;re<W+H.tripletR;re++)Q+=de[re].duration;Oe=ze*Q}j.duration=j.duration*ze,j.duration=Math.round(j.duration*1e6)/1e6,Z=j.duration}else ze&&(H.endTriplet?(ze=0,j.duration=Math.round((Oe-Z)*1e6)/1e6):(j.duration=j.duration*ze,j.duration=Math.round(j.duration*1e6)/1e6,Z+=j.duration));H.rest&&(j.rest=H.rest),H.decoration&&(j.decoration=H.decoration.slice(0)),H.pitches&&(j.pitches=t.cloneArray(H.pitches)),H.gracenotes&&(j.gracenotes=t.cloneArray(H.gracenotes)),H.chord&&(j.chord=t.cloneArray(H.chord)),w[J].push(j),H.style==="rhythm"&&f(w),Re++,D[J]+=j.duration}break;case"key":case"keySignature":o(w[J],H);break;case"meter":h(w[J],H);break;case"clef":H.transpose&&w[J].push({el_type:"transpose",transpose:H.transpose}),H.type&&(H.type.indexOf("-8")>=0?w[J].push({el_type:"transpose",transpose:-12}):H.type.indexOf("+8")>=0&&w[J].push({el_type:"transpose",transpose:12}));break;case"tempo":m=d(H,v.getBeatLength()),w[J].push({el_type:"tempo",qpm:m,timing:D[J]}),$[""+D[J]]={el_type:"tempo",qpm:m,timing:D[J]};break;case"bar":Re>0&&w[J].push({el_type:"bar"}),pe(H),Re=0,K[J].addBar(H,J);break;case"style":z[J]=H.head;break;case"timeSignature":w[J].push(p(H));break;case"part":break;case"stem":case"scale":case"break":case"font":break;case"midi":var ie=!1;switch(H.cmd){case"drumon":N=!0,ie=!0;break;case"drumoff":N=!1,ie=!0;break;case"drum":I=H.params,ie=!0;break;case"drumbars":b=H.params[0],ie=!0;break;case"drummap":break;case"channel":H.params[0]===10&&w[J].push({el_type:"instrument",program:r});break;case"program":s(w[J],{el_type:"instrument",program:H.params[0]}),R=!0;break;case"transpose":w[J].push({el_type:"transpose",transpose:H.params[0]});break;case"gchordoff":w[J].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":w[J].push({el_type:"gchordOn",tacet:!1});break;case"beat":w[J].push({el_type:"beat",beats:H.params});break;case"nobeataccents":w[J].push({el_type:"beataccents",value:!1});break;case"beataccents":w[J].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":w[J].push({el_type:H.cmd,volume:H.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":w[J].push({el_type:H.cmd,param:H.params[0]});break;case"bassprog":case"chordprog":w[J].push({el_type:H.cmd,value:H.params[0],octaveShift:H.params[1]});break;case"gchordbars":w[J].push({el_type:H.cmd,param:H.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",H.cmd,H)}ie&&(w[0].push({el_type:"drum",params:{pattern:I,bars:b,intro:A,on:N}}),te=!0);break;default:console.log("MIDI: element type "+H.el_type+" not handled.")}}J++,D[J]||(D[J]=0)}}}}for(var ge=0;ge<K.length;ge++)w[ge]=K[ge].resolveRepeats();if(u(w,$),A)for(var ne=v.getPickupLength(),ue=0;ue<w.length;ue++){for(var Ee=0;w[ue][Ee].el_type!=="note"&&w[ue].length>Ee;)Ee++;if(w[ue].length>Ee){for(var re=0;re<A;re++)ne===0||re<A-1?(w[ue].splice(Ee,0,{el_type:"note",rest:{type:"rest"},duration:n},{el_type:"bar"}),Ee+=2):w[ue].splice(Ee++,0,{el_type:"note",rest:{type:"rest"},duration:n-ne});M&&(N=!1,w[ue].splice(Ee++,0,{el_type:"drum",params:{pattern:I,bars:b,intro:A,on:N}}),M=!1)}}return w.length>0&&w[0].length>0&&(w[0][0].pickupLength=v.getPickupLength()),w};function i(v,y,m){for(var _=0,k=y+1;k<v.length;k++)if(v[k].el_type==="note"&&_++,v[k].decoration&&v[k].decoration.indexOf(m)>=0)return _;return _}function c(v,y,m){for(var _=Math.min(v.length,y+3),k=y;k<_;k++)if(v[k].el_type==="note"&&v[k].decoration){for(var x=0;x<v[k].decoration.length;x++)if(m.indexOf(v[k].decoration[x])>=0)return v[k].decoration[x]}return null}function u(v,y){if(!(!y||y.length===0))for(var m=Object.keys(y),_=0;_<v.length;_++)for(var k=v[_],x=y[0]?y[0].qpm:0,R=0;R<k.length;R++){var I=k[R];I.el_type==="tempo"&&(x=I.qpm),m.indexOf(""+I.timing)>=0&&x!==y[""+I.timing].qpm&&(x=y[""+I.timing].qpm,I.el_type==="tempo"?(I.qpm=y[""+I.timing].qpm,R++):(v[_].splice(R,0,{el_type:"tempo",qpm:y[""+I.timing].qpm,timing:I.timing}),R+=2))}}function f(v){for(var y=0;y<v.length;y++)for(var m=v[y],_=m.length-1;_>=0&&m[_].el_type!=="bar";)m[_].noChordVoice=!0,_--}function g(v,y){if(!(!v||v.length<=y||!v[y].title))return v[y].title.join(" ")}function d(v,y){var m=.25;v.duration&&(m=v.duration[0]);var _=60;return v.bpm&&(_=v.bpm),m*_/y}function p(v){var y;switch(v.type){case"common_time":y={el_type:"meter",num:4,den:4},n=4/4;break;case"cut_time":y={el_type:"meter",num:2,den:2},n=2/2;break;case"specified":let k=0;if(v.value&&v.value.length>0&&v.value[0].num.indexOf("+")>0)for(var m=v.value[0].num.split("+"),_=0;_<m.length;_++)k+=parseInt(m[_],10);else k=parseInt(v.value[0].num,10);y={el_type:"meter",num:k,den:v.value[0].den},n=k/parseInt(v.value[0].den,10);break;default:y={el_type:"meter"},n=1}return y}function l(v){for(var y=[],m=0;m<v.length;m++)v[m].acc!=="natural"&&y.push(v[m]);return y}function o(v,y){var m;y.root==="HP"?m={el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}:m={el_type:"key",accidentals:l(y.accidentals)},s(v,m)}function h(v,y){var m=p(y);s(v,m)}function s(v,y){for(var m=v.length-1;m>=0;m--)if(v[m].el_type===y.el_type){JSON.stringify(v[m])!==JSON.stringify(y)&&v.push(y);return}v.push(y)}})(),qr=e,qr}var Br,Ui;function fg(){if(Ui)return Br;Ui=1;var e=function(g,d,p,l){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=g,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!d,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=l,this.tempoChangeFactor=1,this.bassInstrument=p.bassprog&&p.bassprog.length>=1?p.bassprog[0]:0,this.chordInstrument=p.chordprog&&p.chordprog.length>=1?p.chordprog[0]:0,this.bassOctaveShift=p.bassprog&&p.bassprog.length===2?p.bassprog[1]:0,this.chordOctaveShift=p.chordprog&&p.chordprog.length===2?p.chordprog[1]:0,this.boomVolume=p.bassvol&&p.bassvol.length===1?p.bassvol[0]:64,this.chickVolume=p.chordvol&&p.chordvol.length===1?p.chordvol[0]:48,p.gchord&&p.gchord.length>0?this.overridePattern=n(p.gchord[0]):this.overridePattern=void 0};e.prototype.setMeter=function(f){this.meter=f},e.prototype.setTempoChangeFactor=function(f){this.tempoChangeFactor=f},e.prototype.setLastBarTime=function(f){this.lastBarTime=f},e.prototype.setTranspose=function(f){this.transpose=f},e.prototype.setRhythmHead=function(f,g){this.hasRhythmHead=f;var d=[];if(f&&this.lastChord&&this.lastChord.chick)for(var p=0;p<this.lastChord.chick.length;p++){var l=Object.assign({},g.pitches[0]);l.actualPitch=this.lastChord.chick[p],d.push(l)}return d},e.prototype.barEnd=function(f){this.chordTrack.length>0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,c(f.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},e.prototype.gChordOn=function(f){this.chordsOff||(this.gChordTacet=f.tacet)},e.prototype.paramChange=function(f){switch(f.el_type){case"gchord":f.param&&f.param.length>0?this.overridePattern=n(f.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=f.value,f.octaveShift!=null&&f.octaveShift!=null?this.bassOctaveShift=f.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=f.value,f.octaveShift!=null&&f.octaveShift!=null?this.chordOctaveShift=f.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=f.param;break;case"chordvol":this.chickVolume=f.param;break;default:console.log("unhandled midi param",f)}},e.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},e.prototype.addTrack=function(f){this.chordTrackEmpty()||f.push(this.chordTrack)},e.prototype.findChord=function(f){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!f.chord||f.chord.length===0)return null;for(var g=0;g<f.chord.length;g++){var d=f.chord[g];if(d.position==="default")return d.name;if(this.breakSynonyms.indexOf(d.name.toLowerCase())>=0)return"break"}return null},e.prototype.interpretChord=function(f){if(f.length!==0){if(f==="break")return{chick:[]};var g=f.substring(0,1);if(g==="("){if(f=f.substring(1,f.length-1),f.length===0)return;g=f.substring(0,1)}var d=this.basses[g];if(d){for(var p=this.transpose;p<-8;)p+=12;for(;p>8;)p-=12;d+=p,d<33?d+=12:d>44&&(d-=12);var l=d;d+=this.bassOctaveShift*12;var o=d-5,h;f.length===1&&(h=this.chordNotes(d,""));var s=f.substring(1),v=s.substring(0,1);v==="b"||v==="♭"?(l--,d--,o--,s=s.substring(1)):(v==="#"||v==="♯")&&(l++,d++,o++,s=s.substring(1));var y=s.split("/");if(h=this.chordNotes(l,y[0]),h.length>=3){var m=h[2]-h[0];o=o+m-7}if(y.length===2){var _=this.basses[y[1].substring(0,1)];if(_){var k=y[1].substring(1),x={"#":1,"♯":1,b:-1,"♭":-1}[k]||0;d=this.basses[y[1].substring(0,1)]+x+p,d+=this.bassOctaveShift*12,o=d}}return{boom:d,boom2:o,chick:h}}}},e.prototype.chordNotes=function(f,g){var d=this.chordIntervals[g];d||(g.slice(0,2).toLowerCase()==="ma"||g[0]==="M"?d=this.chordIntervals.M:g[0]==="m"||g[0]==="-"?d=this.chordIntervals.m:d=this.chordIntervals.M),f+=12,f+=this.chordOctaveShift*12;for(var p=[],l=0;l<d.length;l++)p.push(f+d[l]);return p},e.prototype.writeNote=function(f,g,d,p,l,o){f!==void 0&&this.chordTrack.push({cmd:"note",pitch:f,volume:d,start:this.lastBarTime+p*u(g,this.tempoChangeFactor),duration:u(l,this.tempoChangeFactor),gap:0,instrument:o})},e.prototype.chordTrackEmpty=function(){for(var f=!0,g=0;g<this.chordTrack.length&&f;g++)this.chordTrack[g].cmd==="note"&&(f=!1);return f},e.prototype.resolveChords=function(f,g){if(!this.hasRhythmHead){var d=this.meter.num,p=this.meter.den,l=1/p,o=l/2,h=parseInt(d,10)/parseInt(p,10),s=h-(g-f)/this.tempoChangeFactor;Math.abs(s)<1e-5&&(s=0),(this.currentChords.length===0||this.currentChords[0].beat!==0)&&this.currentChords.unshift({beat:0,chord:this.chordLastBar});var v=r(this.currentChords,8*d/p),y=this.overridePattern?this.overridePattern:this.rhythmPatterns[d+"/"+p];if(s){y=[];for(var m=(g-f)/this.tempoChangeFactor*8,_=0;_<m/2;_+=2)y.push("chick"),y.push("")}if(!y){y=[];for(var _=0;_<8*d/p/2;_++)y.push("chick"),y.push("")}for(var k=!0,x=Math.min(y.length,v.length),_=0;_<x;_++){_>0&&v[_-1]&&v[_]&&v[_-1].boom!==v[_].boom&&(k=!0);var R=y[_],I=R.indexOf("boom")>=0,b=!I&&_!==0&&y[0].indexOf("boom")>=0&&(!v[_-1]||v[_-1].boom!==v[_].boom),A=t(v[_],R,k,b);I&&(k=!1);for(var N=0;N<A.length;N++)this.writeNote(A[N],.125,I||b?this.boomVolume:this.chickVolume,_,o,I||b?this.bassInstrument:this.chordInstrument),b?b=!1:I=!1}}},e.prototype.processChord=function(f){if(!this.chordTrackFinished){var g=this.findChord(f);if(g){var d=this.interpretChord(g);if(d){this.chordTrack.length===0&&this.chordTrack.push({cmd:"program",channel:this.chordChannel,instrument:this.chordInstrument}),this.lastChord=d;var p=i(this.lastBarTime,c(f.time));this.currentChords.push({chord:this.lastChord,beat:p,start:c(f.time)})}}}};function t(f,g,d,p){var l=[];if(!f)return l;g.indexOf("boom")>=0?l.push(d?f.boom:f.boom2):p&&l.push(f.boom);var o=f.chick.length;if(g.indexOf("chick")>=0)for(var h=0;h<o;h++)l.push(f.chick[h]);switch(g){case"DO":l.push(f.chick[0]);break;case"MI":l.push(f.chick[1]);break;case"SOL":l.push(a(f,2));break;case"TI":l.push(a(f,3));break;case"TOP":l.push(a(f,4));break;case"do":l.push(f.chick[0]+12);break;case"mi":l.push(f.chick[1]+12);break;case"sol":l.push(a(f,2)+12);break;case"ti":l.push(a(f,3)+12);break;case"top":l.push(a(f,4)+12);break}return l}function a(f,g){var d=Math.floor(g/f.chick.length),p=f.chick[g%f.chick.length];return p+d*12}function n(f){for(var g=[],d=0;d<f.length;d++){var p=f[d];switch(p){case"z":g.push("");break;case"2":g.push("");break;case"c":g.push("chick");break;case"b":g.push("boom&chick");break;case"f":g.push("boom");break;case"G":g.push("DO");break;case"H":g.push("MI");break;case"I":g.push("SOL");break;case"J":g.push("TI");break;case"K":g.push("TOP");break;case"g":g.push("do");break;case"h":g.push("mi");break;case"i":g.push("sol");break;case"j":g.push("ti");break;case"k":g.push("top");break}}return g}function r(f,g,d){var p=[];if(f.length===0)return p;for(var l=f[0].chord,o=1;o<f.length;o++){for(var h=f[o];p.length<h.beat;)p.push(l);l=h.chord}for(;p.length<g;)p.push(l);return p}function i(f,g){var d=g-f;return d*8}e.prototype.breakSynonyms=["break","(break)","no chord","n.c.","tacet"],e.prototype.basses={A:33,B:35,C:36,D:38,E:40,F:41,G:43},e.prototype.chordIntervals={dim:[0,3,6],"°":[0,3,6],"˚":[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"˚7":[0,3,6,9],ø7:[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7♭5":[0,3,6,10],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"7b5":[0,4,6,10],"7(b5)":[0,4,6,10],"7♭5":[0,4,6,10],"7(b9,b5)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7(#9,b5)":[0,4,6,10,15],"7#9b5":[0,4,6,10,15],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],m:[0,3,7],"-":[0,3,7],m6:[0,3,7,9],"-6":[0,3,7,9],m7:[0,3,7,10],"-7":[0,3,7,10],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"-6/9":[0,3,7,9,14],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-maj7":[0,3,7,11],"-9+7":[0,3,7,11,13],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-maj9":[0,3,7,11,14],"-∆9":[0,3,7,11,14],mM9:[0,3,7,11,14],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],"6add9":[0,4,7,9,14],69:[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,7,10,14,17],13:[0,4,7,10,14,21],"7b9":[0,4,7,10,13],"7♭9":[0,4,7,10,13],"7(b9)":[0,4,7,10,13],"7(#9)":[0,4,7,10,15],"7#9":[0,4,7,10,15],"(13)":[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7(#9,b13)":[0,4,7,10,15,20],"7(#11)":[0,4,7,10,14,18],"7#11":[0,4,7,10,14,18],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"9(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"13(#11)":[0,4,7,10,18,21],"13#11":[0,4,7,10,18,21],maj7:[0,4,7,11],"∆7":[0,4,7,11],Δ7:[0,4,7,11],maj9:[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7(11)":[0,4,7,11,17],"maj7(#11)":[0,4,7,11,18],"maj7(13)":[0,4,7,14,21],"maj7(9,13)":[0,4,7,11,14,21],"7sus4":[0,5,7,10],m7sus4:[0,3,7,10,17],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,10,14],"13sus4":[0,5,7,10,14,21],aug7:[0,4,8,10],"+7":[0,4,8,10],"+":[0,4,8],"7#5":[0,4,8,10],"7♯5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9♯5":[0,4,8,10,14],"9+5":[0,4,8,10,14],"-7(#5)":[0,3,8,10],"-7#5":[0,3,8,10],"7(#5)":[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"maj7(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5,#11)":[0,4,8,11,18],"maj7#5#11":[0,4,8,11,18],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,21],"13#5":[0,4,8,10,14,21],5:[0,7],"5(8)":[0,7,12],"5add8":[0,7,12]},e.prototype.rhythmPatterns={"2/2":["boom","","","","chick","","",""],"3/2":["boom","","","","chick","","","","chick","","",""],"4/2":["boom","","","","chick","","","","boom","","","","chick","","",""],"2/4":["boom","","chick",""],"3/4":["boom","","chick","","chick",""],"4/4":["boom","","chick","","boom","","chick",""],"5/4":["boom","","chick","","chick","","boom","","chick",""],"6/4":["boom","","chick","","boom","","chick","","boom","","chick",""],"3/8":["boom","","chick"],"5/8":["boom","chick","chick","boom","chick"],"6/8":["boom","","chick","boom","","chick"],"7/8":["boom","chick","chick","boom","chick","boom","chick"],"9/8":["boom","","chick","boom","","chick","boom","","chick"],"10/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick"],"11/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick","chick"],"12/8":["boom","","chick","boom","","chick","boom","","chick","boom","","chick"]};function c(f){return f/1e6}function u(f,g){return Math.round(f*g*1e6)/1e6}return Br=e,Br}var Lr,ji;function Sl(){if(ji)return Lr;ji=1;var e={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};function t(a){var n=(a.accidental?a.accidental[0]:"x")+a.verticalPos;return e[n]}return Lr=t,Lr}var Or,Yi;function dg(){if(Yi)return Or;Yi=1;var e,t=fg(),a=Sl();return(function(){var n,r,i,c,u,f=1,g,d,p,l,o,h,s={num:4,den:4},v=128,y,m=!0,_=105,k=95,x=85,R=[[_,k,x]],I=.25,b,A,N=0,M,z={},L,E=0,T,P=0,B=-.001,O=.4;e=function(Z,W,H,j){W||(W={}),j||(j={}),n=[],r=[0,0,0,0,0,0,0],c=[],u=W.qpm,f=1,g=void 0,d=void 0,p=void 0,l=void 0,o=0,T=H,s={num:4,den:4},m=!0,_=105,k=95,x=85,R=[],I=.25,b=void 0,A=void 0,N=0,M=[],z={},L=1,Z.length>0&&Z[0].length>0&&(E=Z[0][0].pickupLength),W.bassprog!==void 0&&!j.bassprog&&(j.bassprog=[W.bassprog]),W.bassvol!==void 0&&!j.bassvol&&(j.bassvol=[W.bassvol]),W.chordprog!==void 0&&!j.chordprog&&(j.chordprog=[W.chordprog]),W.chordvol!==void 0&&!j.chordvol&&(j.chordvol=[W.chordvol]),W.gchord!==void 0&&!j.gchord&&(j.gchord=[W.gchord]),h=new t(Z.length,W.chordsOff,j,s),q(Z,W);for(var Q=0;Q<Z.length;Q++){i=0,h.setTranspose(i);var re=Z[Q];p=[{cmd:"program",channel:Q,instrument:g}],l=void 0,y=0,h.setLastBarTime(0);var ie=!1;(W.voicesOff===!0||W.voicesOff&&W.voicesOff.length&&W.voicesOff.indexOf(Q)>=0)&&(ie=!0);for(var ge=0;ge<re.length;ge++){var ne=re[ge];switch(ne.el_type){case"name":l={cmd:"text",type:"name",text:ne.trackName};break;case"note":V(ne,ie);break;case"key":r=J(ne);break;case"meter":s=ne,h.setMeter(s),I=D(s),Re();break;case"tempo":u?f=ne.qpm?u/ne.qpm:1:u=ne.qpm,h.setTempoChangeFactor(f);break;case"transpose":i=ne.transpose,h.setTranspose(i);break;case"bar":h.barEnd(ne),n=[],Q===0&&ze(Z.length+1),h.setRhythmHead(!1),y=C(ne.time),h.setLastBarTime(y);break;case"bagpipes":break;case"instrument":if(g===void 0&&(g=ne.program),d=ne.program,p.length>0&&p[p.length-1].cmd==="program")p[p.length-1].instrument=ne.program;else{var ue;for(ue=p.length-1;ue>=0&&p[ue].cmd!=="program";ue--);(ue<0||p[ue].instrument!==ne.program)&&p.push({cmd:"program",channel:0,instrument:ne.program})}break;case"channel":w(ne.channel);break;case"drum":z=we(ne.params),Re();break;case"gchordOn":h.gChordOn(ne);break;case"beat":_=ne.beats[0],k=ne.beats[1],x=ne.beats[2],ne.volumesPerNotePitch?R=ne.volumesPerNotePitch:R=[];break;case"vol":b=ne.volume;break;case"volinc":A=ne.volume;break;case"beataccents":m=ne.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":h.paramChange(ne);break;default:console.log("MIDI creation. Unknown el_type: "+ne.el_type+`
|
|
90
|
+
`);break}}p[0].instrument===void 0&&(p[0].instrument=g||0),l&&p.unshift(l),c.push(p),h.finish(),M.length>0}return W.detuneOctave&&Oe(c,parseInt(W.detuneOctave,10)),h.addTrack(c),M.length>0&&c.push(M),{tempo:u,instrument:g,tracks:c,totalDuration:o}};function w(Z){for(var W=p.length-1;W>=0;W--)if(p[W].cmd==="program"){p[W].channel=Z;return}}function C(Z){return Z/1e6}function S(Z){return Math.round(Z*f*1e6)/1e6}function q(Z,W){for(var H=0;H<Z.length;H++){for(var j=Z[H],Q={},re=W.qpm,ie=0,ge=1,ne=0;ne<j.length;ne++){var ue=j[ne];if(ue.el_type==="tempo"){re?ge=ue.qpm?re/ue.qpm:1:re=ue.qpm;continue}ue.time=ie;var Ee=ue.duration?ue.duration:0;if(ie+=Math.round(Ee*ge*1e6),ue.pitches){for(var qe=0;qe<ue.pitches.length;qe++){var pe=ue.pitches[qe];if(pe){if(pe.duration=ue.duration,pe.startTie)Q[pe.pitch]===void 0?Q[pe.pitch]={el:ne,pitch:qe}:(j[Q[pe.pitch].el].pitches[Q[pe.pitch].pitch].duration+=pe.duration,ue.pitches[qe]=null);else if(pe.endTie){var be=Q[pe.pitch];if(be){var $e=pe.duration;delete j[be.el].pitches[be.pitch].startTie,j[be.el].pitches[be.pitch].duration+=$e,ue.pitches[qe]=null,delete Q[pe.pitch]}else delete pe.endTie}}}delete ue.duration}}for(var ve in Q)if(Q.hasOwnProperty(ve)){var rt=Q[ve];delete j[rt.el].pitches[rt.pitch].startTie}}}function D(Z){switch(parseInt(Z.den,10)){case 2:return .5;case 4:return .25;case 8:return Z.num%3===0?.375:.125;case 16:return .125}return .25}function $(Z,W,H){var j=H-Z;return j/W}function F(Z,W,H){if(W)return 0;let j=_,Q=k,re=x;H!==void 0&&R.length>=H+1&&(j=R[H][0],Q=R[H][1],re=R[H][2]);var ie;if(b!==void 0)ie=b,b=void 0;else if(!m)ie=Q;else if(E>Z)ie=re;else{var ge=$(y,D(s),Z);ge===0?ie=j:parseInt(ge,10)===ge?ie=Q:ie=re}return A&&(ie+=A,A=void 0),ie<0&&(ie=0),ie>127&&(ie=127),W?0:ie}function K(Z,W){var H={};if(Z.decoration)for(var j=0;j<Z.decoration.length;j++)Z.decoration[j]==="staccato"?H.thisBreakBetweenNotes="staccato":Z.decoration[j]==="tenuto"?H.thisBreakBetweenNotes="tenuto":Z.decoration[j]==="accent"?H.velocity=Math.min(127,W*1.5):Z.decoration[j]==="trill"?H.noteModification="trill":Z.decoration[j]==="lowermordent"?H.noteModification="lowermordent":Z.decoration[j]==="uppermordent"?H.noteModification="pralltriller":Z.decoration[j]==="mordent"?H.noteModification="mordent":Z.decoration[j]==="turn"?H.noteModification="turn":Z.decoration[j]==="roll"?H.noteModification="roll":Z.decoration[j]==="pralltriller"?H.noteModification="pralltriller":Z.decoration[j]==="trillh"&&(H.noteModification="trillh");return H}function te(Z,W){var H=W.start,j=W.duration,Q=S(1/32);switch(Z){case"trill":for(var re=2;j>0;)p.push({cmd:"note",pitch:W.pitch+re,volume:W.volume,start:H,duration:Q,gap:0,instrument:d,style:"decoration"}),re=re===2?0:2,j-=Q,H+=Q;break;case"trillh":for(var re=1;j>0;)p.push({cmd:"note",pitch:W.pitch+re,volume:W.volume,start:H,duration:Q,gap:0,instrument:d,style:"decoration"}),re=re===1?0:1,j-=Q,H+=Q;break;case"pralltriller":p.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:H,duration:Q,gap:0,instrument:d,style:"decoration"}),j-=Q,H+=Q,p.push({cmd:"note",pitch:W.pitch+2,volume:W.volume,start:H,duration:Q,gap:0,instrument:d,style:"decoration"}),j-=Q,H+=Q,p.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:H,duration:j,gap:0,instrument:d});break;case"mordent":case"lowermordent":p.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:H,duration:Q,gap:0,instrument:d,style:"decoration"}),j-=Q,H+=Q,p.push({cmd:"note",pitch:W.pitch-2,volume:W.volume,start:H,duration:Q,gap:0,instrument:d,style:"decoration"}),j-=Q,H+=Q,p.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:H,duration:j,gap:0,instrument:d});break;case"turn":Q=W.duration/4,p.push({cmd:"note",pitch:W.pitch+2,volume:W.volume,start:H,duration:Q,gap:0,instrument:d,style:"decoration"}),p.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:H+Q,duration:Q,gap:0,instrument:d,style:"decoration"}),p.push({cmd:"note",pitch:W.pitch-1,volume:W.volume,start:H+Q*2,duration:Q,gap:0,instrument:d,style:"decoration"}),p.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:H+Q*3,duration:Q,gap:0,instrument:d,style:"decoration"});break;case"roll":for(;j>0;)p.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:H,duration:Q,gap:0,instrument:d,style:"decoration"}),j-=Q*2,H+=Q*2;break}}function V(Z,W){var H=F(C(Z.time),W);h.processChord(Z);var j;if(Z.gracenotes&&Z.pitches&&Z.pitches.length>0&&Z.pitches[0]&&(j=ce(Z.gracenotes,Z.pitches[0].duration),Z.elem&&(Z.elem.midiGraceNotePitches=ee(j,C(Z.time),H*2/3,d))),Z.elem){var Q=C(Z.time),re=Q/I/u*60*1e3;if(Z.elem.currentTrackMilliseconds===void 0)Z.elem.currentTrackMilliseconds=re,Z.elem.currentTrackWholeNotes=Q;else if(Z.elem.currentTrackMilliseconds.length===void 0)Z.elem.currentTrackMilliseconds!==re&&(Z.elem.currentTrackMilliseconds=[Z.elem.currentTrackMilliseconds,re],Z.elem.currentTrackWholeNotes=[Z.elem.currentTrackWholeNotes,Q]);else{for(var ie=!1,ge=0;ge<Z.elem.currentTrackMilliseconds.length;ge++)Z.elem.currentTrackMilliseconds[ge]===re&&(ie=!0);ie||(Z.elem.currentTrackMilliseconds.push(re),Z.elem.currentTrackWholeNotes.push(Q))}}if(Z.pitches){var ne="",ue=K(Z,H);ue.thisBreakBetweenNotes&&(ne=ue.thisBreakBetweenNotes),ue.velocity&&(H=ue.velocity);var Ee=Z.pitches;Z.style==="rhythm"&&(Ee=h.setRhythmHead(!0,Z)),Z.elem&&(Z.elem.midiPitches=[]);for(var qe=0;qe<Ee.length;qe++){let Ze=H;!ue.velocity&&Array.isArray(Z.decoration)&&Z.decoration.length>qe&&(Ze=F(C(Z.time),W,qe));var pe=Ee[qe];if(pe){pe.startSlur&&(N+=pe.startSlur.length),pe.endSlur&&(N-=pe.endSlur.length);var be=pe.actualPitch?pe.actualPitch:le(pe);if(d===v&&T){var $e=a(pe);$e&&T[$e]&&(be=T[$e].sound)}var ve={cmd:"note",pitch:be,volume:Ze,start:C(Z.time),duration:S(pe.duration),instrument:d,startChar:Z.elem.startChar,endChar:Z.elem.endChar};if(ve=he(ve),Z.gracenotes&&(ve.duration=ve.duration/2,ve.start=ve.start+ve.duration),Z.elem&&Z.elem.midiPitches.push(ve),ue.noteModification)te(ue.noteModification,ve);else{switch(N>0?ve.endType="tenuto":ne&&(ve.endType=ne),ve.endType){case"tenuto":ve.gap=B;break;case"staccato":var rt=ve.duration*O;ve.gap=u/60*rt;break;default:ve.gap=P;break}p.push(ve)}}}p.length-1}var Ue=ae(Z);o=Math.max(o,C(Z.time)+S(Ue))}function ae(Z){return Z.pitches&&Z.pitches.length>0&&Z.pitches[0]?Z.pitches[0].duration:Z.elem?Z.elem.duration:Z.duration}var oe=[0,2,4,5,7,9,11];function le(Z){if(Z.midipitch!==void 0)return Z.midipitch;var W=Z.pitch;if(Z.accidental)switch(Z.accidental){case"sharp":n[W]=1;break;case"flat":n[W]=-1;break;case"natural":n[W]=0;break;case"dblsharp":n[W]=2;break;case"dblflat":n[W]=-2;break;case"quartersharp":n[W]=.25;break;case"quarterflat":n[W]=-.25;break}var H=de(W)*12+oe[Se(W)]+60;return n[W]!==void 0?H+=n[W]:H+=r[Se(W)],H+=i,H}function J(Z){var W=[0,0,0,0,0,0,0];if(!Z.accidentals)return W;for(var H=0;H<Z.accidentals.length;H++){var j=Z.accidentals[H],Q;switch(j.acc){case"flat":Q=-1;break;case"quarterflat":Q=-.25;break;case"sharp":Q=1;break;case"quartersharp":Q=.25;break;default:Q=0;break}var re=j.note.toLowerCase(),ie=Se(re.charCodeAt(0)-99);W[ie]+=Q}return W}function ce(Z,W){for(var H=0,j=[],Q,re=0;re<Z.length;re++)Q=Z[re],H+=Q.duration;var ie=W/2/H;for(re=0;re<Z.length;re++){Q=Z[re];var ge=le(Q);if(d===v&&T){var ne=a(Q);ne&&T[ne]&&(ge=T[ne].sound)}var ue={pitch:ge,duration:Q.duration*ie};ue=he(ue),j.push(ue)}return j}function ee(Z,W,H,j){var Q=[];H=Math.round(H);for(var re=0;re<Z.length;re++){var ie=Z[re];p.push({cmd:"note",pitch:ie.pitch,volume:H,start:W,duration:ie.duration,gap:0,instrument:j,style:"grace"}),Q.push({pitch:ie.pitch,durationInMeasures:ie.duration,volume:H,instrument:j}),W+=ie.duration}return Q}function he(Z){var W=""+Z.pitch;return W.indexOf(".75")>=0?(Z.pitch=Math.round(Z.pitch),Z.cents=-50):W.indexOf(".25")>=0&&(Z.pitch=Math.round(Z.pitch),Z.cents=50),Z}function de(Z){return Math.floor(Z/7)}function Se(Z){return Z=Z%7,Z<0&&(Z+=7),Z}function we(Z){if(Z.pattern.length===0||Z.on===!1)return{on:!1};for(var W=Z.pattern[0],H=[],j="",Q=0,re=0;re<W.length;re++)if(W[re]==="d"&&Q++,W[re]==="d"||W[re]==="z")j.length!==0?(H.push(j),j=W[re]):j=j+W[re];else{if(j.length===0)return{on:!1};j=j+W[re]}if(j.length!==0&&H.push(j),Z.pattern.length!==Q*2+1)return{on:!1};for(var ie={on:!0,bars:Z.bars,pattern:[]},ge=D(s),ne=0,ue=0;ue<H.length;ue++){j=H[ue];for(var Ee=1,qe=!1,pe=0,be=1;be<j.length;be++)switch(j[be]){case"/":pe!==0&&(Ee*=pe),pe=0,qe=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":pe=pe*10+j[be];break;default:return{on:!1}}qe?(pe===0&&(pe=2),Ee/=pe):pe&&(Ee*=pe),j[0]==="d"?(ie.pattern.push({len:Ee*ge,pitch:Z.pattern[1+ne],velocity:Z.pattern[1+ne+Q]}),ne++):ie.pattern.push({len:Ee*ge,pitch:null})}return L=Z.bars?Z.bars:1,ie}function Re(){if(!(!z||!z.pattern)){for(var Z=z,W=0,H=s.num/s.den,j=0;j<Z.pattern.length;j++)W+=Z.pattern[j].len;var Q=W/L/H;for(j=0;j<Z.pattern.length;j++)Z.pattern[j].len=Z.pattern[j].len/Q;z=Z}}function ze(Z){if(!(M.length===0&&!z.on)){var W=s.num/s.den;if(M.length===0){if(o<W)return;M.push({cmd:"program",channel:Z,instrument:v})}if(z.on)for(var H=y,j=0;j<z.pattern.length;j++){var Q=S(z.pattern[j].len);z.pattern[j].pitch&&M.push({cmd:"note",pitch:z.pattern[j].pitch,volume:z.pattern[j].velocity,start:H,duration:Q,gap:0,instrument:v}),H+=Q}}}function Oe(Z,W){for(var H={},j=0;j<Z.length;j++)for(var Q=0;Q<Z[j].length;Q++){var re=Z[j][Q];re.cmd==="note"&&(H[re.start]===void 0&&(H[re.start]=[]),H[re.start].push({track:j,event:Q,pitch:re.pitch}))}var ie=Object.keys(H);for(j=0;j<ie.length;j++){var ge=H[ie[j]];if(ge.length>1){ge=ge.sort(function(pe,be){return pe.pitch-be.pitch});var ne=ge[ge.length-1],ue=ne.pitch%12,Ee=!1;for(Q=0;!Ee&&Q<ge.length-1;Q++)ge[Q].pitch%12===ue&&(Ee=!0);if(Ee){var qe=Z[ne.track][ne.event];qe.cents||(qe.cents=0),qe.cents+=W}}}}})(),Or=e,Or}var Dr,Wi;function pg(){if(Wi)return Dr;Wi=1;function e(f,g){g||(g={});for(var d=!!g.lineBreaks,p=[],l=!1,o=[],h=[],s=[],v=[],y=[],m=[],_=[],k=0;k<f.length;k++){var x=u(f[k]);if(x.staff){if(l&&!x.vskip)for(var R=p[p.length-1],I=0;I<R.staff.length;I++){var b=x.staff[I],A=R.staff[I];if(b&&(c(b.meter,o[I])||(a(b.meter,b.voices),o[I]=b.meter,delete b.meter),c(b.key,h[I])||(n(b.key,b.voices),h[I]=b.key,delete b.key),b.title&&(A.abbrevTitle=b.title),c(b.clef,s[I])||(r(b.clef,b.voices),s[I]=b.clef,delete b.clef),c(b.vocalfont,v[I])||(i(b.vocalfont,b.voices,"vocalfont"),v[I]=b.vocalfont,delete b.vocalfont),c(b.gchordfont,y[I])||(i(b.gchordfont,b.voices,"gchordfont"),y[I]=b.gchordfont,delete b.gchordfont),c(b.tripletfont,m[I])||(i(b.tripletfont,b.voices,"tripletfont"),m[I]=b.tripletfont,delete b.tripletfont),c(b.annotationfont,_[I])||(i(b.annotationfont,b.voices,"annotationfont"),_[I]=b.annotationfont,delete b.annotationfont)),b)for(var N=0;N<A.voices.length;N++){var M=A.voices[N],z=b.voices[N];d&&M.push({el_type:"break"}),z&&(A.voices[N]=M.concat(z))}}else{for(var L=0;L<x.staff.length;L++)h[L]=x.staff[L].key,o[L]=x.staff[L].meter,s[L]=x.staff[L].clef;p.push(u(x))}l=!0}else l=!1,p.push(x)}return p}function t(f,g){return f==="abselem"?"abselem":g}function a(f,g){f.el_type="meter",f.startChar=-1,f.endChar=-1;for(var d=0;d<g.length;d++)g[d].unshift(f)}function n(f,g){f.el_type="key",f.startChar=-1,f.endChar=-1;for(var d=0;d<g.length;d++)g[d].unshift(f)}function r(f,g){f.el_type="clef",f.startChar=-1,f.endChar=-1;for(var d=0;d<g.length;d++)g[d].unshift(f)}function i(f,g,d){f.el_type="font",f.type=d,f.startChar=-1,f.endChar=-1;for(var p=0;p<g.length;p++)g[p].unshift(f)}function c(f,g){if(!f)return!0;var d=JSON.stringify(f,t),p=JSON.stringify(g,t);return d===p}function u(f){for(var g={},d=Object.keys(f),p=0;p<d.length;p++)if(d[p]!=="staff")g[d[p]]=f[d[p]];else{g.staff=[];for(var l=0;l<f.staff.length;l++){for(var o={},h=Object.keys(f.staff[l]),s=0;s<h.length;s++)if(h[s]!=="voices")o[h[s]]=f.staff[l][h[s]];else{o.voices=[];for(var v=0;v<f.staff[l].voices.length;v++)o.voices.push([].concat(f.staff[l].voices[v]))}g.staff.push(o)}}return g}return Dr=e,Dr}var Fr,Vi;function Tl(){if(Vi)return Fr;Vi=1;var e=nt(),t=Ve(),a=Cl(),n=dg(),r=pg(),i=function(){this.reset=function(){this.version="1.1.0",this.media="screen",this.metaText={},this.metaTextInfo={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0,this.runningFonts={},delete this.visualTranspose},this.reset();function c(l,o,h,s){for(var v=0;v<s.length;v++)l[h][s[v]]=o[h][s[v]]}this.copyTopInfo=function(l){var o=["tempo","title","header","rhythm","origin","composer","author","partOrder"];c(this,l,"metaText",o),c(this,l,"metaTextInfo",o)},this.copyBottomInfo=function(l){var o=["unalignedWords","book","source","discography","notes","transcription","history","abc-copyright","abc-creator","abc-edited-by","footer"];c(this,l,"metaText",o),c(this,l,"metaTextInfo",o)},this.getBeatLength=function(){var l=this.getMeterFraction(),o=1;return l.num===6||l.num===9||l.num===12||l.num===3&&l.den===8?o=3:l.den===8&&(l.num===5||l.num===7)&&(o=2),o/l.den};function u(l,o){for(var h=0,s=0;s<l.length;s++)if(l[s].staff)for(var v=0;v<l[s].staff.length;v++)for(var y=0;y<l[s].staff[v].voices.length;y++)for(var m=l[s].staff[v].voices[y],_=1,k=0;k<m.length;k++){var x=m[k].rest&&m[k].rest.type==="spacer";if(m[k].startTriplet&&(_=m[k].tripletMultiplier),m[k].duration&&!x&&m[k].el_type!=="tempo"&&(h+=m[k].duration*_),m[k].endTriplet&&(_=1),h>=o&&(h-=o),m[k].el_type==="bar")return h}return h}this.getPickupLength=function(){var l=this.getBarLength(),o=u(this.lines,l);return o<1e-8||l-o<1e-8?0:o},this.getBarLength=function(){var l=this.getMeterFraction();return l.num/l.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(l){var o;if(l)o=l;else{var h=this.metaText?this.metaText.tempo:null;o=this.getBpm(h)}o<=0&&(o=1);var s=this.getBeatsPerMeasure(),v=s/o;return v*6e4},this.getBeatsPerMeasure=function(){var l=this.getBeatLength(),o=this.getBarLength();return o/l},this.getMeter=function(){for(var l=0;l<this.lines.length;l++){var o=this.lines[l];if(o.staff)for(var h=0;h<o.staff.length;h++){var s=o.staff[h].meter;if(s)return s}}return{type:"common_time"}},this.getMeterFraction=function(){var l=this.getMeter(),o=4,h=4;if(l)if(l.type==="specified"){if(l.value&&l.value.length>0&&l.value[0].num.indexOf("+")>0){var s=l.value[0].num.split("+");o=0;for(var v=0;v<s.length;v++)o+=parseInt(s[v],10)}else o=parseInt(l.value[0].num,10);h=parseInt(l.value[0].den,10)}else l.type==="cut_time"?(o=2,h=2):l.type==="common_time"&&(o=4,h=4);return this.meter={num:o,den:h},this.meter},this.getKeySignature=function(){for(var l=0;l<this.lines.length;l++){var o=this.lines[l];if(o.staff){for(var h=0;h<o.staff.length;h++)if(o.staff[h].key)return o.staff[h].key}}return{}},this.getElementFromChar=function(l){for(var o=0;o<this.lines.length;o++){var h=this.lines[o];if(h.staff)for(var s=0;s<h.staff.length;s++)for(var v=h.staff[s],y=0;y<v.voices.length;y++)for(var m=v.voices[y],_=0;_<m.length;_++){var k=m[_];if(k.startChar&&k.endChar&&k.startChar<=l&&k.endChar>l)return k}}return null};function f(l){for(var o,h,s,v,y=l.length-1;y>=0;y--){var m=l[y];m.type==="bar"?(m.top=s,m.nextTop=o,o=s,m.bottom=v,m.nextBottom=h,h=v):m.type==="event"&&(s=m.top,v=m.top+m.height)}}function g(l){var o=[];for(var h in l)l.hasOwnProperty(h)&&o.push(l[h]);return o=o.sort(function(s,v){var y=s.milliseconds-v.milliseconds;return y!==0?y:s.type==="bar"?-1:1}),o}this.addElementToEvents=function(l,o,h,s,v,y,m,_,k,x){if(o.hint)return{isTiedState:void 0,duration:0};var R=o.durationClass?o.durationClass:o.duration;if(o.abcelem.rest&&o.abcelem.rest.type==="spacer"&&(R=0),R>0){for(var I=[],b=0;b<o.elemset.length;b++)o.elemset[b]!==null&&I.push(o.elemset[b]);var A=o.startTie;if(k!==void 0)l["event"+k].elements.push(I),x&&(l["event"+h]||(l["event"+h]={type:"event",milliseconds:h,line:y,measureNumber:m,top:s,height:v,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),l["event"+h].measureStart=!0,x=!1),A||(k=void 0);else{if(!l["event"+h])l["event"+h]={type:"event",milliseconds:h,line:y,measureNumber:m,top:s,height:v,left:o.x,width:o.w,elements:[I],startChar:o.abcelem.startChar,endChar:o.abcelem.endChar,startCharArray:[o.abcelem.startChar],endCharArray:[o.abcelem.endChar],midiPitches:o.abcelem.midiPitches?e.cloneArray(o.abcelem.midiPitches):[]},o.abcelem.midiGraceNotePitches&&(l["event"+h].midiGraceNotePitches=e.cloneArray(o.abcelem.midiGraceNotePitches));else{if(l["event"+h].left?l["event"+h].left=Math.min(l["event"+h].left,o.x):l["event"+h].left=o.x,l["event"+h].elements.push(I),l["event"+h].startCharArray.push(o.abcelem.startChar),l["event"+h].endCharArray.push(o.abcelem.endChar),l["event"+h].startChar===null&&(l["event"+h].startChar=o.abcelem.startChar),l["event"+h].endChar===null&&(l["event"+h].endChar=o.abcelem.endChar),o.abcelem.midiPitches&&o.abcelem.midiPitches.length){l["event"+h].midiPitches||(l["event"+h].midiPitches=[]);for(var b=0;b<o.abcelem.midiPitches.length;b++)l["event"+h].midiPitches.push(o.abcelem.midiPitches[b])}if(o.abcelem.midiGraceNotePitches&&o.abcelem.midiGraceNotePitches.length){l["event"+h].midiGraceNotePitches||(l["event"+h].midiGraceNotePitches=[]);for(var N=0;N<o.abcelem.midiGraceNotePitches.length;N++)l["event"+h].midiGraceNotePitches.push(o.abcelem.midiGraceNotePitches[N])}}x&&(l["event"+h].measureStart=!0,x=!1)}}return{isTiedState:k,duration:R/_,nextIsBar:x||o.type==="bar"}},this.makeVoicesArray=function(){for(var l=[],o=[],h={},s=0;s<this.engraver.staffgroups.length;s++){var v=this.engraver.staffgroups[s];if(v&&v.staffs&&v.staffs.length>0){var y=v.staffs[0],m=y.absoluteY,_=m-y.top*t.STEP,k=v.staffs[v.staffs.length-1];m=k.absoluteY;for(var x=m-k.bottom*t.STEP,R=x-_,I=v.voices,b=0;b<I.length;b++)if(!(I[b].staff&&I[b].staff.isTabStaff)){var A=!1;l[b]||(l[b]=[]),o[b]===void 0&&(o[b]=0);for(var N=I[b].children,M=0;M<N.length;M++)N[M].type==="tempo"&&(h[o[b]]=this.getBpm(N[M].abcelem)),l[b].push({top:_,height:R,line:v.line,measureNumber:o[b],elem:N[M]}),N[M].type==="bar"&&A&&o[b]++,(N[M].type==="note"||N[M].type==="rest")&&(A=!0)}}}return this.tempoLocations=h,l},this.setupEvents=function(l,o,h,s){s||(s=1);for(var v=[],y={},m=l,_,k=!0,x=this.makeVoicesArray(),R=0,I=0;I<x.length;I++){var b=m,A=Math.round(b*1e3),N=0,M=-1,z=x[I],L=h;o=this.getBeatLength()*L/60;for(var E=-1,T=0;T<z.length;T++){var P=z[T].measureNumber;E!==P&&this.tempoLocations[P]&&(L=this.tempoLocations[P],o=s*this.getBeatLength()*L/60,E=P);var B=z[T].elem,O=this.addElementToEvents(y,B,A,z[T].top,z[T].height,z[T].line,z[T].measureNumber,o,_,k);_=O.isTiedState,k=O.nextIsBar,b+=O.duration;var w;if(B.duration>0&&y["event"+A]&&(w="event"+A),A=Math.round(b*1e3),B.type==="bar"){var C=B.abcelem.type,S=C==="bar_right_repeat"||C==="bar_dbl_repeat",q=B.abcelem.startEnding==="1",D=C==="bar_left_repeat"||C==="bar_dbl_repeat"||C==="bar_right_repeat";if(S){T>0&&(y[w].endX=B.x),M===-1&&(M=T);var $=0;E=-1;for(var F=N;F<M;F++){P=z[F].measureNumber,E!==P&&this.tempoLocations[P]&&(L=this.tempoLocations[P],o=s*this.getBeatLength()*L/60,E=P);var K=z[F].elem;O=this.addElementToEvents(y,K,A,z[F].top,z[F].height,z[F].line,z[F].measureNumber,o,_,k),_=O.isTiedState,k=O.nextIsBar,b+=O.duration,$=A,A=Math.round(b*1e3)}y["event"+$]&&(y["event"+$].endX=z[M].elem.x),k=!0,M=-1}q&&(M=T),D&&(N=T)}}R=Math.max(R,A)}return v=g(y),f(v),p(this.lines,v),v.push({type:"end",milliseconds:R}),this.addUsefulCallbackInfo(v,L*s),v},this.addUsefulCallbackInfo=function(l,o){for(var h=this.millisecondsPerMeasure(o),s=0;s<l.length;s++){var v=l[s];v.millisecondsPerMeasure=h}};function d(l,o){for(;o<l.length&&l[o].left===null;)o++;return l[o]}function p(l,o){if(!(o.length<1)){for(var h=0;h<o.length-1;h++){var s=o[h],v=d(o,h+1);if(s.left!==null){var y=v&&s.top===v.top?v.left:l[s.line].staffGroup.w;s.endX!==void 0?y>s.left&&(s.endX=Math.min(s.endX,y)):s.endX=y}}var m=o[o.length-1];m.endX=l[m.line].staffGroup.w}}this.getBpm=function(l){var o;if(l||(l=this.metaText?this.metaText.tempo:null),l){o=l.bpm;var h=this.getBeatLength(),s=l.duration&&l.duration.length>0?l.duration[0]:h;o=o*s/h}if(!o){o=180;var v=this.getMeterFraction();v&&v.num!==3&&v.num%3===0&&(o=120)}return o},this.setTiming=function(l,o){if(o=o||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var h=this.metaText?this.metaText.tempo:null,s=this.getBpm(h),v=1;l?h&&(v=l/s):l=s;var y=this.getBeatLength(),m=l/60,_=this.getBarLength(),k=_/y*o/m;k&&(k-=this.getPickupLength()/y/m);var x=y*m;return this.noteTimings=this.setupEvents(k,x,l,v),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*m):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(l){l||(l={});var o=a(this,l);return n(o,l,this.formatting.percmap,this.formatting.midi)},this.deline=function(l){return r(this.lines,l)},this.findSelectableElement=function(l){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(l):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}};return Fr=i,Fr}var Hr,Xi;function gg(){if(Xi)return Hr;Xi=1;var e=Za(),t=function(b){var A=this,N={},M="";b.reset(),this.setVisualTranspose=function(z){z!==void 0&&(b.visualTranspose=z)},this.cleanUp=function(z,L,E){o(b),delete b.runningFonts,n(b),b.metaText.tempo&&b.metaText.tempo.bpm&&!b.metaText.tempo.duration&&(b.metaText.tempo.duration=[b.getBeatLength()]);var T=!1,P,B,O;for(P=0;P<b.lines.length;P++)if(b.lines[P].staff!==void 0){var w=!1;for(B=0;B<b.lines[P].staff.length;B++)if(b.lines[P].staff[B]===void 0)T=!0,b.lines[P].staff[B]=null;else for(O=0;O<b.lines[P].staff[B].voices.length;O++)b.lines[P].staff[B].voices[O]===void 0?b.lines[P].staff[B].voices[O]=[]:h(b.lines[P].staff[B].voices[O])&&(w=!0);w||(b.lines[P]=null,T=!0)}if(T&&(b.lines=b.lines.filter(function(F){return!!F}),b.lines.forEach(function(F){F.staff&&(F.staff=F.staff.filter(function(K){return!!K}))})),z)for(;f(b.lines,z););if(L){for(T=!1,P=0;P<b.lines.length;P++)if(b.lines[P].staff!==void 0)for(B=0;B<b.lines[P].staff.length;B++){var C=!1;for(O=0;O<b.lines[P].staff[B].voices.length;O++)s(b.lines[P].staff[B].voices[O])&&(C=!0);C||(T=!0,b.lines[P].staff[B]=null)}T&&b.lines.forEach(function(F){F.staff&&(F.staff=F.staff.filter(function(K){return!!K}))})}for(c(b.lines),P=0;P<b.lines.length;P++)if(b.lines[P].staff)for(B=0;B<b.lines[P].staff.length;B++)delete b.lines[P].staff[B].workingClef;for(;r(b););for(var P=0;P<b.lines.length;P++){var S=b.lines[P].staff;if(S)for(b.staffNum=0;b.staffNum<S.length;b.staffNum++)for(S[b.staffNum].clef&&e.fixClef(S[b.staffNum].clef),b.voiceNum=0;b.voiceNum<S[b.staffNum].voices.length;b.voiceNum++){var q=S[b.staffNum].voices[b.voiceNum];u(q,b.staffNum,b.voiceNum,E);for(var D=0;D<q.length;D++)q[D].el_type==="clef"&&e.fixClef(q[D]);if(q.length>0&&q[q.length-1].barNumber){var $=d(b.lines,P);$&&($.staff[0].barNumber=q[q.length-1].barNumber),delete q[q.length-1].barNumber}}}return delete b.staffNum,delete b.voiceNum,delete b.lineNum,delete b.potentialStartBeam,delete b.potentialEndBeam,delete b.vskipPending,E},this.addTieToLastNote=function(z){var L=p(b);return L&&L.pitches&&L.pitches.length>0?(L.pitches[0].startTie={},z&&(L.pitches[0].startTie.style="dotted"),!0):!1},this.appendElement=function(z,L,E,T){if(T.el_type=z,L!==null&&(T.startChar=L),E!==null&&(T.endChar=E),z==="note"){var P=l(T);P>=.25||T.force_end_beam_last&&b.potentialStartBeam!==void 0?_(b):T.end_beam&&b.potentialStartBeam!==void 0?T.rest===void 0?m(T,b):_(b):T.rest===void 0&&(b.potentialStartBeam===void 0?T.end_beam||(b.potentialStartBeam=T,delete b.potentialEndBeam):b.potentialEndBeam=T)}else _(b);return delete T.end_beam,delete T.force_end_beam_last,T.rest&&T.rest.type==="invisible"&&delete T.decoration,b.lines.length<=b.lineNum||b.lines[b.lineNum].staff.length<=b.staffNum?!1:(y(A,b,T,N,M),!0)},this.appendStartingElement=function(z,L,E,T){o(b);var P;z==="key"&&(P=T.impliedNaturals,delete T.impliedNaturals,delete T.explicitAccidentals);var B=Object.assign({},T);if(b.lines[b.lineNum]){var O=b.lines[b.lineNum].staff;if(O){O.length<=b.staffNum&&(O[b.staffNum]={},O[b.staffNum].clef=Object.assign({},O[0].clef),O[b.staffNum].key=Object.assign({},O[0].key),O[0].meter&&(O[b.staffNum].meter=Object.assign({},O[0].meter)),O[b.staffNum].workingClef=Object.assign({},O[0].workingClef),O[b.staffNum].voices=[[]]),z==="clef"&&(O[b.staffNum].workingClef=B);for(var w=O[b.staffNum].voices[b.voiceNum],C=0;C<w.length;C++){if(w[C].el_type==="note"||w[C].el_type==="bar"){B.el_type=z,B.startChar=L,B.endChar=E,P&&(B.accidentals=P.concat(B.accidentals)),w.push(B);return}if(w[C].el_type===z){B.el_type=z,B.startChar=L,B.endChar=E,P&&(B.accidentals=P.concat(B.accidentals)),w[C]=B;return}}O[b.staffNum][z]=T}}},this.addSubtitle=function(z,L){v(b,{subtitle:{text:z,startChar:L.startChar,endChar:L.endChar}})},this.addSpacing=function(z){b.vskipPending=z},this.addNewPage=function(z){v(b,{newpage:z})},this.addSeparator=function(z,L,E,T){v(b,{separator:{spaceAbove:Math.round(z),spaceBelow:Math.round(L),lineLength:Math.round(E),startChar:T.startChar,endChar:T.endChar}})},this.addText=function(z,L){v(b,{text:{text:z,startChar:L.startChar,endChar:L.endChar}})},this.addCentered=function(z){v(b,{text:[{text:z,center:!0}]})},this.changeVoiceScale=function(z){A.appendElement("scale",null,null,{size:z})},this.changeVoiceColor=function(z){A.appendElement("color",null,null,{color:z})},this.startNewLine=function(z){o(b),z.currentVoiceName&&(M=z.currentVoiceName,N[z.currentVoiceName]=z),b.lines[b.lineNum]===void 0?I(A,b,z):b.lines[b.lineNum].staff===void 0?(b.lineNum++,this.startNewLine(z)):b.lines[b.lineNum].staff[b.staffNum]===void 0?R(A,b,z):b.lines[b.lineNum].staff[b.staffNum].voices[b.voiceNum]===void 0?x(A,b,z):h(b.lines[b.lineNum].staff[b.staffNum].voices[b.voiceNum])?(b.lineNum++,this.startNewLine(z)):z.part&&A.appendElement("part",z.part.startChar,z.part.endChar,{title:z.part.title})},this.setRunningFont=function(z,L){b.runningFonts[z]=L},this.setBarNumberImmediate=function(z){var L=this.getCurrentVoice();if(L&&L.length>0){var E=L[L.length-1];if(E.el_type==="bar")E.barNumber!==void 0&&(E.barNumber=z);else return z-1}return z},this.hasBeginMusic=function(){for(var z=0;z<b.lines.length;z++)if(b.lines[z].staff)return!0;return!1},this.isFirstLine=function(z){for(var L=z-1;L>=0;L--)if(b.lines[L].staff!==void 0)return!1;return!0},this.getCurrentVoice=function(){var z=g(b.lines,b.lineNum);if(!z)return null;var L=z.staff[b.staffNum];return L&&L.voices[b.voiceNum]!==void 0?L.voices[b.voiceNum]:null},this.setCurrentVoice=function(z,L,E){b.staffNum=z,b.voiceNum=L,M=E;for(var T=0;T<b.lines.length;T++)if(b.lines[T].staff&&(b.lines[T].staff[z]===void 0||b.lines[T].staff[z].voices[L]===void 0||!h(b.lines[T].staff[z].voices[L])))return b.lineNum=T,!!(!b.lines[T].staff[z]||b.lines[T].staff[z].voices[L]);return b.lineNum=T,!1},this.addMetaText=function(z,L,E){b.metaText[z]===void 0?(b.metaText[z]=L,b.metaTextInfo[z]=E):(typeof b.metaText[z]=="string"&&typeof L=="string"?b.metaText[z]+=`
|
|
91
|
+
`+L:(b.metaText[z]==="string"&&(b.metaText[z]=[{text:b.metaText[z]}]),typeof L=="string"&&(L=[{text:L}]),b.metaText[z]=b.metaText[z].concat(L)),b.metaTextInfo[z].endChar=E.endChar)},this.addMetaTextArray=function(z,L,E){b.metaText[z]===void 0?(b.metaText[z]=[L],b.metaTextInfo[z]=E):(b.metaText[z].push(L),b.metaTextInfo[z].endChar=E.endChar)},this.addMetaTextObj=function(z,L,E){b.metaText[z]=L,b.metaTextInfo[z]=E}};function a(b){if(!b||typeof b=="string")return!1;for(var A=0;A<b.length;A++)if(typeof b[A]!="string")return!1;return!0}function n(b){a(b.metaText.notes)&&(b.metaText.notes=b.metaText.notes.join(`
|
|
92
|
+
`)),a(b.metaText.history)&&(b.metaText.history=b.metaText.history.join(`
|
|
93
|
+
`))}function r(b){for(var A=!1,N=[],M=0;M<b.lines.length;M++){var z=b.lines[M];if(z.staff)for(var L=0;L<z.staff.length;L++){for(var E=z.staff[L],T=[],P=0;P<E.voices.length;P++){var B=E.voices[P];T.push({hasOverlay:!1,voice:[],snip:[]}),N[M]=0;for(var O=0,w=!1,C=-1,S=0;S<B.length;S++){var q=B[S];if(q.el_type==="overlay"&&!w){A=!0,w=!0,C=S,T[P].hasOverlay=!0;for(var D=0;D<M;D++)N[D]&&b.lines[D].staff&&E.voices.length>=b.lines[D].staff[0].voices.length&&b.lines[D].staff[0].voices.push([{el_type:"note",duration:N[D],rest:{type:"invisible"},startChar:q.startChar,endChar:q.endChar}])}else q.el_type==="bar"?(w?(w=!1,T[P].snip.push({start:C,len:S-C}),T[P].voice.push(q)):(O>0&&T[P].voice.push({el_type:"note",duration:O,rest:{type:"invisible"},startChar:q.startChar,endChar:q.endChar}),T[P].voice.push(q)),O=0):q.el_type==="note"?w?T[P].voice.push(q):(!q.rest||q.rest.type!=="spacer")&&(O+=q.duration,N[M]+=q.duration):(q.el_type==="scale"||q.el_type==="stem"||q.el_type==="overlay"||q.el_type==="style"||q.el_type==="transpose"||q.el_type==="color")&&T[P].voice.push(q)}T[P].hasOverlay&&T[P].snip.length===0&&T[P].snip.push({start:C,len:B.length-C})}for(P=0;P<T.length;P++){var $=T[P];if($.hasOverlay){$.voice.splice(0,0,{el_type:"stem",direction:"down"}),E.voices.push($.voice);for(var F=$.snip.length-1;F>=0;F--){var K=$.snip[F];E.voices[P].splice(K.start,K.len),E.voices[P].splice(K.start+1,0,{el_type:"stem",direction:"auto"});var te=i(E.voices[P],K.start);E.voices[P].splice(te,0,{el_type:"stem",direction:"up"})}for(F=0;F<E.voices[E.voices.length-1].length;F++){E.voices[E.voices.length-1][F]=Object.assign({},E.voices[E.voices.length-1][F]);var V=E.voices[E.voices.length-1][F];V.el_type==="bar"&&V.startEnding&&delete V.startEnding,V.el_type==="bar"&&V.endEnding&&delete V.endEnding}}}}}return A}function i(b,A){for(var N=A-1;N>0&&b[N].el_type!=="bar";N--);return N}function c(b){for(var A=!0,N=0;N<b.length;N++){var M=b[N];if(M.staff){for(var z=0;z<M.staff.length;z++){var L=M.staff[z];if(L.title){for(var E=!1,T=0;T<L.title.length;T++)L.title[T]?(L.title[T]=A?L.title[T].name:L.title[T].subname,L.title[T]?E=!0:L.title[T]=""):L.title[T]="";E||delete L.title}}A=!1}}}function u(b,A,N,M){M[A]||(M[A]=[]),M[A][N]||(M[A][N]=[]);for(var z,L=function(F,K,te){if(M[A][N][te]===void 0){for(z=0;z<M[A][N].length;z++)if(M[A][N][z]!==void 0){te=z;break}if(M[A][N][te]===void 0){var V=te*100+1;F.endSlur.forEach(function(le){V===le&&--V}),M[A][N][te]=[V]}}for(var ae,oe=0;oe<K;oe++)ae=M[A][N][te].pop(),F.endSlur.push(ae);return M[A][N][te].length===0&&delete M[A][N][te],ae},E=function(F,K,te,V){F.startSlur=[],M[A][N][te]===void 0&&(M[A][N][te]=[]);for(var ae=te*100+1,oe=0;oe<K;oe++)V&&(V.forEach(function(le){ae===le&&++ae}),V.forEach(function(le){ae===le&&++ae}),V.forEach(function(le){ae===le&&++ae})),M[A][N][te].forEach(function(le){ae===le&&++ae}),M[A][N][te].forEach(function(le){ae===le&&++ae}),M[A][N][te].push(ae),F.startSlur.push({label:ae}),F.dottedSlur&&(F.startSlur[F.startSlur.length-1].style="dotted",delete F.dottedSlur),ae++},T=0;T<b.length;T++){var P=b[T];if(P.el_type==="note"){if(P.gracenotes)for(var B=0;B<P.gracenotes.length;B++){if(P.gracenotes[B].endSlur){var O=P.gracenotes[B].endSlur;P.gracenotes[B].endSlur=[];for(var w=0;w<O;w++)L(P.gracenotes[B],1,20)}P.gracenotes[B].startSlur&&(z=P.gracenotes[B].startSlur,E(P.gracenotes[B],z,20))}if(P.endSlur&&(z=P.endSlur,P.endSlur=[],L(P,z,0)),P.startSlur&&(z=P.startSlur,E(P,z,0)),P.pitches){for(var C=[],S=0;S<P.pitches.length;S++)if(P.pitches[S].endSlur){var q=P.pitches[S].endSlur;P.pitches[S].endSlur=[];for(var D=0;D<q;D++){var $=L(P.pitches[S],1,S+1);C.push($)}}for(S=0;S<P.pitches.length;S++)P.pitches[S].startSlur&&(z=P.pitches[S].startSlur,E(P.pitches[S],z,S+1,C));P.gracenotes&&P.pitches[0].endSlur&&P.pitches[0].endSlur[0]===100&&P.pitches[0].startSlur&&(P.gracenotes[0].endSlur?P.gracenotes[0].endSlur.push(P.pitches[0].startSlur[0].label):P.gracenotes[0].endSlur=[P.pitches[0].startSlur[0].label],P.pitches[0].endSlur.length===1?delete P.pitches[0].endSlur:P.pitches[0].endSlur[0]===100?P.pitches[0].endSlur.shift():P.pitches[0].endSlur[P.pitches[0].endSlur.length-1]===100&&P.pitches[0].endSlur.pop(),M[A][N][1].length===1?delete M[A][N][1]:M[A][N][1].pop())}}}}function f(b,A){for(var N=0;N<b.length;N++)if(b[N].staff!==void 0)for(var M=0;M<b[N].staff.length;M++)for(var z=[],L=0;L<b[N].staff[M].voices.length;L++)for(var E=b[N].staff[M].voices[L],T=0,P=0;P<E.length;P++)if(E[P].el_type==="bar"){if(T++,T>=A&&P<E.length-1){var B=d(b,N);if(!B){var O=JSON.parse(JSON.stringify(b[N]));b.push(Object.assign({},O)),B=b[b.length-1];for(var w=0;w<B.staff.length;w++)for(var C=0;C<B.staff[w].voices.length;C++)B.staff[w].voices[C]=[]}var S=P+1,q=b[N].staff[M].voices[L].slice(S);return b[N].staff[M].voices[L]=b[N].staff[M].voices[L].slice(0,S),B.staff[M].voices[L]=z.concat(q.concat(B.staff[M].voices[L])),!0}}else E[P].duration||z.push(E[P]);return!1}function g(b,A){if(b.length<=A)return null;for(;A>=0;){if(b[A].staff)return b[A];A--}return null}function d(b,A){for(A++;b.length>A;){if(b[A].staff)return b[A];A++}return null}function p(b){if(!b.lines[b.lineNum]||!b.lines[b.lineNum].staff||!b.lines[b.lineNum].staff[b.staffNum])return null;var A=b.lines[b.lineNum].staff[b.staffNum].voices[b.voiceNum];if(!A)return null;for(var N=A.length-1;N>=0;N--){var M=A[N];if(M.el_type==="note")return M}return null}function l(b){return b.duration?b.duration:0}function o(b){b.potentialStartBeam&&b.potentialEndBeam&&(b.potentialStartBeam.startBeam=!0,b.potentialEndBeam.endBeam=!0),delete b.potentialStartBeam,delete b.potentialEndBeam}function h(b){for(var A=0;A<b.length;A++)if(b[A].el_type==="note"||b[A].el_type==="bar")return!0;return!1}function s(b){for(var A=0;A<b.length;A++)if(b[A].el_type==="note"&&(b[A].rest===void 0||b[A].chord!==void 0))return!0;return!1}function v(b,A){b.vskipPending&&(A.vskip=b.vskipPending,delete b.vskipPending),b.lines.push(A)}function y(b,A,N,M,z){var L=A.lines[A.lineNum].staff[A.staffNum];if(N.pitches!==void 0){var E=L.workingClef.verticalPos;N.pitches.forEach(function(P){P.verticalPos=P.pitch-E})}if(N.gracenotes!==void 0){var T=L.workingClef.verticalPos;N.gracenotes.forEach(function(P){P.verticalPos=P.pitch-T})}L.voices.length<=A.voiceNum&&(M[z]||(M[z]={}),x(b,A,M[z])),L.voices[A.voiceNum].push(N)}function m(b,A){A.potentialStartBeam.startBeam=!0,b.endBeam=!0,delete A.potentialStartBeam,delete A.potentialEndBeam}function _(b){b.potentialStartBeam!==void 0&&b.potentialEndBeam!==void 0&&(b.potentialStartBeam.startBeam=!0,b.potentialEndBeam.endBeam=!0),delete b.potentialStartBeam,delete b.potentialEndBeam}function k(b,A,N){if(b.runningFonts[A]){for(var M=!1,z=Object.keys(N),L=0;L<z.length;L++)b.runningFonts[A][z[L]]!==N[z[L]]&&(M=!0);M&&(b.lines[b.lineNum].staff[b.staffNum][A]=N)}b.runningFonts[A]=N}function x(b,A,N){var M=A.lines[A.lineNum].staff[A.staffNum];if(M.voices[A.voiceNum]=[],M.title||(M.title=[]),M.title[A.voiceNum]={name:N.name,subname:N.subname},N.style&&b.appendElement("style",null,null,{head:N.style}),N.stem)b.appendElement("stem",null,null,{direction:N.stem});else if(A.voiceNum>0){if(M.voices[0]!==void 0){for(var z=!1,L=0;L<M.voices[0].length;L++)M.voices[0].el_type==="stem"&&(z=!0);if(!z){var E={el_type:"stem",direction:"up"};M.voices[0].splice(0,0,E)}}b.appendElement("stem",null,null,{direction:"down"})}N.scale&&b.appendElement("scale",null,null,{size:N.scale}),N.color&&b.appendElement("color",null,null,{color:N.color})}function R(b,A,N){N.key&&N.key.impliedNaturals&&(N.key.accidentals=N.key.accidentals.concat(N.key.impliedNaturals),delete N.key.impliedNaturals),A.lines[A.lineNum].staff[A.staffNum]={voices:[],clef:N.clef,key:N.key,workingClef:N.clef};var M=A.lines[A.lineNum].staff[A.staffNum];N.stafflines!==void 0&&(M.clef.stafflines=N.stafflines,M.workingClef.stafflines=N.stafflines),N.staffscale&&(M.staffscale=N.staffscale),N.annotationfont&&k(A,"annotationfont",N.annotationfont),N.gchordfont&&k(A,"gchordfont",N.gchordfont),N.tripletfont&&k(A,"tripletfont",N.tripletfont),N.vocalfont&&k(A,"vocalfont",N.vocalfont),N.bracket&&(M.bracket=N.bracket),N.brace&&(M.brace=N.brace),N.connectBarLines&&(M.connectBarLines=N.connectBarLines),N.barNumber&&(M.barNumber=N.barNumber),x(b,A,N),N.part&&b.appendElement("part",N.part.startChar,N.part.endChar,{title:N.part.title}),N.meter!==void 0&&(M.meter=N.meter),A.vskipPending&&(A.lines[A.lineNum].vskip=A.vskipPending,delete A.vskipPending)}function I(b,A,N){A.lines[A.lineNum]={staff:[]},R(b,A,N)}return Hr=t,Hr}var $r,Ki;function El(){if(Ki)return $r;Ki=1;var e=nt(),t=$a(),a=sg(),n=cg(),r=lg(),i=xl(),c=ug(),u=Tl(),f=gg(),g=function(){var d=new u,p=new f(d),l,o="",h="";this.getTune=function(){var E={formatting:d.formatting,lines:d.lines,media:d.media,metaText:d.metaText,metaTextInfo:d.metaTextInfo,version:d.version,addElementToEvents:d.addElementToEvents,addUsefulCallbackInfo:d.addUsefulCallbackInfo,getTotalTime:d.getTotalTime,getTotalBeats:d.getTotalBeats,getBarLength:d.getBarLength,getBeatLength:d.getBeatLength,getBeatsPerMeasure:d.getBeatsPerMeasure,getBpm:d.getBpm,getMeter:d.getMeter,getMeterFraction:d.getMeterFraction,getPickupLength:d.getPickupLength,getKeySignature:d.getKeySignature,getElementFromChar:d.getElementFromChar,makeVoicesArray:d.makeVoicesArray,millisecondsPerMeasure:d.millisecondsPerMeasure,setupEvents:d.setupEvents,setTiming:d.setTiming,setUpAudio:d.setUpAudio,deline:d.deline,findSelectableElement:d.findSelectableElement,getSelectableArray:d.getSelectableArray};return d.lineBreaks&&(E.lineBreaks=d.lineBreaks),d.visualTranspose&&(E.visualTranspose=d.visualTranspose),d.chordGrid&&(E.chordGrid=d.chordGrid),E};function s(E,T,P){E.positioning||(E.positioning={}),E.positioning[T]=P}function v(E,T,P){E.fonts||(E.fonts={}),E.fonts[T]=P}var y={reset:function(){for(var E in this)this.hasOwnProperty(E)&&typeof this[E]!="function"&&delete this[E];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(E,T){return this[E].decoration!==T[E].decoration||this[E].face!==T[E].face||this[E].size!==T[E].size||this[E].style!==T[E].style||this[E].weight!==T[E].weight},addFormattingOptions:function(E,T,P){P==="note"?(this.vocalPosition!=="auto"&&s(E,"vocalPosition",this.vocalPosition),this.dynamicPosition!=="auto"&&s(E,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&s(E,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&s(E,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&s(E,"volumePosition",this.volumePosition),this.differentFont("annotationfont",T)&&v(E,"annotationfont",this.annotationfont),this.differentFont("gchordfont",T)&&v(E,"gchordfont",this.gchordfont),this.differentFont("vocalfont",T)&&v(E,"vocalfont",this.vocalfont),this.differentFont("tripletfont",T)&&v(E,"tripletfont",this.tripletfont)):P==="bar"&&(this.dynamicPosition!=="auto"&&s(E,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&s(E,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&s(E,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&s(E,"volumePosition",this.volumePosition),this.differentFont("measurefont",T)&&v(E,"measurefont",this.measurefont),this.differentFont("repeatfont",T)&&v(E,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var E=0;E<this.inTie.length;E++)if(this.endingHoldOver.inTie.push([]),this.inTie[E])for(var T=0;T<this.inTie[E].length;T++)this.endingHoldOver.inTie[E].push(this.inTie[E][T]);for(var P in this.inTieChord)this.inTieChord.hasOwnProperty(P)&&(this.endingHoldOver.inTieChord[P]=this.inTieChord[P])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var E=0;E<this.endingHoldOver.inTie.length;E++){this.inTie.push([]);for(var T=0;T<this.endingHoldOver.inTie[E].length;T++)this.inTie[E].push(this.endingHoldOver.inTie[E][T])}for(var P in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(P)&&(this.inTieChord[P]=this.endingHoldOver.inTieChord[P])}}},m=function(E){y.warnings||(y.warnings=[]),y.warnings.push(E)},_=function(E){y.warningObjects||(y.warningObjects=[]),y.warningObjects.push(E)},k=function(E){var T=E.replace(/\x12/g," ");return T=T.replace(/&/g,"&"),T=T.replace(/</g,"<"),T.replace(/>/g,">")},x=function(E,T,P){T||(T=" ");var B=T[P];(B===" "||!B)&&(B="SPACE");var O=k(T.substring(P-64,P))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+B+"</span>"+k(T.substring(P+1).substring(0,64));m("Music Line:"+l.lineIndex+":"+(P+1)+": "+E+": "+O),_({message:E,line:T,startChar:y.iChar+P,column:P})},R,I;this.getWarnings=function(){return y.warnings},this.getWarningObjects=function(){return y.warningObjects};var b=function(E,T){if(T.indexOf("")>=0){o+=T;return}if(T=o+T,o="",!E){x("Can't add words before the first line of music",E,0);return}T=e.strip(T),T[T.length-1]!=="-"&&(T=T+" ");for(var P=[],B=0,O=!1,w=function(q){var D=e.strip(T.substring(B,q));if(D=D.replace(/\\([-_*|~])/g,"$1"),B=q+1,D.length>0){O&&(D=D.replace(/~/g," "));var $=T[q];return $!=="_"&&$!=="-"&&($=" "),P.push({syllable:l.translateString(D),divider:$}),O=!1,!0}return!1},C=!1,S=0;S<T.length;S++){switch(T[S]){case" ":case"":w(S);break;case"-":!C&&!w(S)&&P.length>0&&(e.last(P).divider="-",P.push({skip:!0,to:"next"}));break;case"_":C||(w(S),P.push({skip:!0,to:"slur"}));break;case"*":C||(w(S),P.push({skip:!0,to:"next"}));break;case"|":C||(w(S),P.push({skip:!0,to:"bar"}));break;case"~":C||(O=!0);break}C=T[S]==="\\"}E.forEach(function(q){if(P.length!==0){if(P[0].skip){switch(P[0].to){case"next":q.el_type==="note"&&q.pitches!==null&&P.shift();break;case"slur":q.el_type==="note"&&q.pitches!==null&&P.shift();break;case"bar":q.el_type==="bar"&&P.shift();break}q.el_type!=="bar"&&(q.lyric===void 0?q.lyric=[{syllable:"",divider:" "}]:q.lyric.push({syllable:"",divider:" "}))}else if(q.el_type==="note"&&q.rest===void 0){var D=P.shift();D.syllable&&(D.syllable=D.syllable.replace(/ +/g," ")),q.lyric===void 0?q.lyric=[D]:q.lyric.push(D)}}})},A=function(E,T){if(T.indexOf("")>=0){h+=T;return}if(T=h+T,h="",!E){x("Can't add symbols before the first line of music",E,0);return}T=e.strip(T),T[T.length-1]!=="-"&&(T=T+" ");for(var P=[],B=0,O=!1,w=function(S){var q=e.strip(T.substring(B,S));if(B=S+1,q.length>0){O&&(q=q.replace(/~/g," "));var D=T[S];return D!=="_"&&D!=="-"&&(D=" "),P.push({syllable:l.translateString(q),divider:D}),O=!1,!0}return!1},C=0;C<T.length;C++)switch(T[C]){case" ":case"":w(C);break;case"-":!w(C)&&P.length>0&&(e.last(P).divider="-",P.push({skip:!0,to:"next"}));break;case"_":w(C),P.push({skip:!0,to:"slur"});break;case"*":w(C),P.push({skip:!0,to:"next"});break;case"|":w(C),P.push({skip:!0,to:"bar"});break;case"~":O=!0;break}E.forEach(function(S){if(P.length!==0){if(P[0].skip)switch(P[0].to){case"next":S.el_type==="note"&&S.pitches!==null&&P.shift();break;case"slur":S.el_type==="note"&&S.pitches!==null&&P.shift();break;case"bar":S.el_type==="bar"&&P.shift();break}else if(S.el_type==="note"&&S.rest===void 0){var q=P.shift();S.lyric===void 0?S.lyric=[q]:S.lyric.push(q)}}})},N=function(E){if(e.startsWith(E,"%%")){var T=t.addDirective(E.substring(2));T&&x(T,E,2);return}var P=E.indexOf("%");if(P>=0&&(E=E.substring(0,P)),E=E.replace(/\s+$/,""),E.length!==0){if(o){b(p.getCurrentVoice(),E.substring(2));return}if(h){A(p.getCurrentVoice(),E.substring(2));return}if(E.length<2||E[1]!==":"||I.lineContinuation){I.parseMusic(E);return}var B=R.parseHeader(E);B.regular&&I.parseMusic(E),B.newline&&I.startNewLine(),B.words&&b(p.getCurrentVoice(),E.substring(2)),B.symbols&&A(p.getCurrentVoice(),E.substring(2))}};function M(E,T){E.push({el_type:"hint"});for(var P=0;P<T.length;P++){var B=T[P],O=Object.assign({},B);if(E.push(O),B.el_type==="bar")return}}function z(E,T){for(var P=0;P<E.length;P++){var B=E[P],O=T[P];if(O)for(var w=0;w<O.voices.length;w++){var C=O.voices[w],S=B.voices[w];S&&M(S,C)}}}function L(){for(var E=0;E<d.lines.length;E++){var T=d.lines[E].staff;if(T){for(var P=E+1;P<d.lines.length&&d.lines[P].staff===void 0;)P++;if(P<d.lines.length){var B=d.lines[P].staff;z(T,B)}}}}this.parse=function(E,T,P){T||(T={}),P||(P=0),d.reset(),E=E.replace(/\r\n?/g,`
|
|
133
94
|
`)+`
|
|
134
|
-
`;var
|
|
135
|
-
\\`);if(
|
|
136
|
-
`;)
|
|
137
|
-
`});var
|
|
138
|
-
`);e.last(
|
|
139
|
-
X:`),
|
|
140
|
-
`);
|
|
141
|
-
`)})}var
|
|
142
|
-
|
|
143
|
-
`);
|
|
144
|
-
`),
|
|
145
|
-
`));f.id=e.strip(c)}),{header:v,tunes:l}};return $a=r,$a}var xa,Xl;function T7(){if(Xl)return xa;Xl=1;function e(r,n){this.numLines=r,this.lineSpace=n,this.verticalSize=this.numLines*this.lineSpace;var i=3;this.bar={pitch:i,pitch2:n*r,height:5}}return e.prototype.bypass=function(r){var n=r.staffGroup.voices;return!!(n.length>0&&n[0].isPercussion)},e.prototype.setRelative=function(r,n,i){switch(r.type){case"bar":n.pitch=this.bar.pitch,n.pitch2=this.bar.pitch2,n.height=this.height;break;case"symbol":var t=this.bar.pitch2/2;if(r.name=="dots.dot")return i?(n.pitch=t,!1):(n.pitch=t+this.lineSpace,!0);break}return i},xa=e,xa}var Sa,Kl;function fb(){if(Kl)return Sa;Kl=1;var e=function(n,i){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=n,this.voicetotal=i,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return e.prototype.addChild=function(r){if(r.type==="bar"){for(var n=!0,i=0;n&&i<this.children.length;i++)this.children[i].type.indexOf("staff-extra")<0&&this.children[i].type!=="tempo"&&(n=!1);n||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=r,this.setRange(r)},e.prototype.setLimit=function(r,n){var i=n.specialY;i||(i=n),i[r]&&(this.specialY[r]?this.specialY[r]=Math.max(this.specialY[r],i[r]):this.specialY[r]=i[r])},e.prototype.adjustRange=function(r){r.bottom!==void 0&&(this.bottom=Math.min(this.bottom,r.bottom)),r.top!==void 0&&(this.top=Math.max(this.top,r.top))},e.prototype.setRange=function(r){this.adjustRange(r),this.setLimit("tempoHeightAbove",r),this.setLimit("partHeightAbove",r),this.setLimit("volumeHeightAbove",r),this.setLimit("dynamicHeightAbove",r),this.setLimit("endingHeightAbove",r),this.setLimit("chordHeightAbove",r),this.setLimit("lyricHeightAbove",r),this.setLimit("lyricHeightBelow",r),this.setLimit("chordHeightBelow",r),this.setLimit("volumeHeightBelow",r),this.setLimit("dynamicHeightBelow",r)},e.prototype.addOther=function(r){this.otherchildren.push(r),this.setRange(r)},e.prototype.addBeam=function(r){this.beams.push(r)},e.prototype.setWidth=function(r){this.w=r},Sa=e,Sa}var Ia,Ql;function xu(){if(Ql)return Ia;Ql=1;var e=function(r,n,i,t){if(r)for(var a=0;a<r.length;a++){var s=r[a],o=s.getAttribute("highlight");o||(o="fill"),s.setAttribute(o,t);var l=s.getAttribute("class");l||(l=""),l=l.replace(i,""),l=l.replace(n,""),n.length>0&&(l.length>0&&l[l.length-1]!==" "&&(l+=" "),l+=n),s.setAttribute("class",l)}};return Ia=e,Ia}var Ta,ef;function db(){if(ef)return Ta;ef=1;var e=xu(),r=function(n,i){n===void 0&&(n="abcjs-note_selected"),i===void 0&&(i="#ff0000"),e(this.elemset,n,"",i)};return Ta=r,Ta}var Ca,tf;function hb(){if(tf)return Ca;tf=1;var e=xu(),r=function(n,i){n===void 0&&(n="abcjs-note_selected"),i===void 0&&(i="#000000"),e(this.elemset,"",n,i)};return Ca=r,Ca}var za,rf;function Er(){if(rf)return za;rf=1;var e=db(),r=hb(),n=function(t,a,s,o,l,d){d||(d={}),this.tuneNumber=l,this.abcelem=t,this.duration=a,this.durationClass=d.durationClassOveride?d.durationClassOveride:this.duration,this.minspacing=s||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=o,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return n.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},n.prototype.addExtra=function(i){this.fixed.w=Math.max(this.fixed.w,i.dx+i.w),this.fixed.t===void 0?this.fixed.t=i.top:this.fixed.t=Math.max(this.fixed.t,i.top),this.fixed.b===void 0?this.fixed.b=i.bottom:this.fixed.b=Math.min(this.fixed.b,i.bottom),i.dx<this.extraw&&(this.extraw=i.dx),this.extra[this.extra.length]=i,this._addChild(i)},n.prototype.addHead=function(i){i.dx<this.extraw&&(this.extraw=i.dx),this.heads[this.heads.length]=i,this.addRight(i)},n.prototype.addRight=function(i){this.fixed.w=Math.max(this.fixed.w,i.dx+i.w),i.top!==void 0&&(this.fixed.t===void 0?this.fixed.t=i.top:this.fixed.t=Math.max(this.fixed.t,i.top)),i.bottom!==void 0&&(this.fixed.b===void 0?this.fixed.b=i.bottom:this.fixed.b=Math.min(this.fixed.b,i.bottom)),i.dx+i.w>this.w&&(this.w=i.dx+i.w),this.right[this.right.length]=i,this._addChild(i)},n.prototype.addFixed=function(i){this._addChild(i)},n.prototype.addFixedX=function(i){this._addChild(i)},n.prototype.addCentered=function(i){var t=i.w/2;-t<this.extraw&&(this.extraw=-t),this.extra[this.extra.length]=i,i.dx+t>this.w&&(this.w=i.dx+t),this.right[this.right.length]=i,this._addChild(i)},n.prototype.setLimit=function(i,t){t[i]&&(this.specialY[i]?this.specialY[i]=Math.max(this.specialY[i],t[i]):this.specialY[i]=t[i])},n.prototype._addChild=function(i){var t=!0;this.abcelem.el_type=="clef"&&i.type=="barNumber"&&(t=!1),i.parent=this,this.children[this.children.length]=i,t&&this.pushTop(i.top),this.pushBottom(i.bottom),this.setLimit("tempoHeightAbove",i),this.setLimit("partHeightAbove",i),this.setLimit("volumeHeightAbove",i),this.setLimit("dynamicHeightAbove",i),this.setLimit("endingHeightAbove",i),this.setLimit("chordHeightAbove",i),this.setLimit("lyricHeightAbove",i),this.setLimit("lyricHeightBelow",i),this.setLimit("chordHeightBelow",i),this.setLimit("volumeHeightBelow",i),this.setLimit("dynamicHeightBelow",i)},n.prototype.pushTop=function(i){i!==void 0&&(this.top===void 0?this.top=i:this.top=Math.max(i,this.top))},n.prototype.pushBottom=function(i){i!==void 0&&(this.bottom===void 0?this.bottom=i:this.bottom=Math.min(i,this.bottom))},n.prototype.setX=function(i){this.x=i;for(var t=0;t<this.children.length;t++)this.children[t].setX(i)},n.prototype.center=function(i,t){var a=(t.x-i.x)/2+i.x;this.x=a-this.w/2;for(var s=0;s<this.children.length;s++)this.children[s].setX(this.x)},n.prototype.setHint=function(){this.hint=!0},n.prototype.highlight=function(i,t){e.bind(this)(i,t)},n.prototype.unhighlight=function(i,t){r.bind(this)(i,t)},za=n,za}var Ea,nf;function Nt(){if(nf)return Ea;nf=1;var e=function(n,i,t,a,s){switch(s=s||{},this.x=0,this.c=n,this.dx=i,this.w=t,this.pitch=a,this.scalex=s.scalex||1,this.scaley=s.scaley||1,this.type=s.type||"symbol",this.pitch2=s.pitch2,this.linewidth=s.linewidth,this.klass=s.klass,this.anchor=s.anchor?s.anchor:"middle",this.top=a,this.pitch2!==void 0&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=a,this.pitch2!==void 0&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),s.thickness&&(this.top+=s.thickness/2,this.bottom-=s.thickness/2),s.stemHeight&&(s.stemHeight>0?this.top+=s.stemHeight:this.bottom+=s.stemHeight),s.dim&&(this.dim=s.dim),s.position&&(this.position=s.position),this.height=s.height?s.height:4,s.top&&(this.top=s.top),s.bottom&&(this.bottom=s.bottom),s.name?this.name=s.name:this.c?this.name=this.c:this.name=this.type,s.realWidth?this.realWidth=s.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":s.position&&s.position==="below"?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":s.position&&s.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":this.pitch===void 0?s.position&&s.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height;break}};return e.prototype.getChordDim=function(){if(this.type==="debug"||!this.chordHeightAbove&&!this.chordHeightBelow)return null;var r=0,n=this.type==="chord"?this.realWidth/2:0,i=this.x-n-r,t=i+this.realWidth+r;return{left:i,right:t}},e.prototype.invertLane=function(r){this.lane===void 0&&(this.lane=0),this.lane=r-this.lane-1},e.prototype.putChordInLane=function(r){this.lane=r,this.chordHeightAbove?this.chordHeightAbove=this.height*1.25*this.lane:this.chordHeightBelow=this.height*1.25*this.lane},e.prototype.getLane=function(){return this.lane===void 0?0:this.lane},e.prototype.setX=function(r){this.x=r+this.dx},Ea=e,Ea}var Na,af;function C7(){if(af)return Na;af=1;var e=Er(),r=Nt();function n(c){return c!=null&&c.constructor===Object}function i(c,m){for(var b in m)m.hasOwnProperty(b)&&(Array.isArray(m[b])||n(m[b])||(c[b]=m[b]))}function t(c){var m=new e("",0,0,"",0);return i(m,c),m.top=0,m.bottom=-1,c.abcelem&&(m.abcelem={},i(m.abcelem,c.abcelem),m.abcelem.el_type==="note"&&(m.abcelem.el_type="tabNumber")),c.cloned=m,m}function a(c,m){var b=t(c);if(m)for(var g=c.children,w=!0,k=0;k<g.length;k++){var $=g[k],O=new r("",0,0,0,"");i(O,$),w=m.tablature.setRelative($,O,w),b.children.push(O)}return b}function s(c,m,b){var g="tab.tiny",w=7.5;c.isTabBig&&(g="tab.big",w=10);var k={el_type:"tab",icon:g,Ypos:w};if(w+=c.tabSymbolOffset,!c.hideTabSymbol){var $=new e(k,0,0,"symbol",0);$.x=m;var O=new r(g,0,0,7.5,"tab");O.x=b,$.children.push(O),$.abcelem.el_type=="tab"&&(O.pitch=w)}return $}function o(c){if(c.extra)for(var m=0;m<c.extra.length;m++){var b=c.extra[m];if(b.type=="lyric")return{bottom:b.bottom,height:b.height}}return null}function l(){this.accidentals=null}function d(c){for(var m=0,b=0;b<c.length;b++)c[b].tabNameInfos||m++;return m}function p(c,m,b,g,w){var k=g.num;g.note.quarter!=null&&(k=k.toString(),k+=g.note.quarter);var $=c.semantics.stringToPitch(g.str);b.notes.push({num:k,str:g.str,pitch:g.note.emit()});var O={type:"tabNumber"},P=new r(k,0,0,$+.3,O);return P.x=m,P.isGrace=w,P.isAltered=g.note.isAltered,P}function v(c,m){var b=0;if(c.extra){for(var g=0;g<c.extra.length;g++)if(c.extra[g].c.indexOf("noteheads")>=0){if(b===m)return c.extra[g].x+c.extra[g].w/2;b++}}return-1}function f(c){if(c.abcelem){var m=c.abcelem;if(m.rest)return m.gracenotes}return null}function u(c,m,b){var g=c.semantics.notesToNumber(m,b);if(g.error)return c.setError(g.error),g;if(g.graces&&g.notes){var w=g.notes.length-1;g.notes[w].graces=g.graces}return g}function h(c,m,b,g,w){for(var k=0;k<g.length;k++){var $={el_type:"note",startChar:b.abcelem.startChar,endChar:b.abcelem.endChar,notes:[],grace:!0},O=v(b,k),P=g[k],y=p(c,O,$,P,!0);m.children.push(y),w.push($)}}return l.prototype.build=function(c,m,b,g,w,k,$){d(m);var O=m[w+g],P=m[$],y=null,C=null;O.children[0].abcelem.el_type!="clef"&&k!="none"&&O.children.splice(0,0,k);for(var E=0;E<O.children.length;E++){var z=O.children[E],A=z.x,R=A;switch(z.isClef&&(P.children.push(s(c,A,R)),z.abcelem.type.indexOf("-8")>=0&&(c.semantics.clefTranspose=-12),z.abcelem.type.indexOf("+8")>=0&&(c.semantics.clefTranspose=12)),z.type){case"staff-extra key-signature":this.accidentals=z.abcelem.accidentals,c.semantics.accidentals=this.accidentals;break;case"bar":c.semantics.measureAccidentals={};var T=!1;E===O.children.length-1&&(T=!0);var I=a(z,c);if(I.abcelem.barNumber){delete I.abcelem.barNumber;for(var N=0;N<I.children.length;N++)if(I.children[N].type==="barNumber"){I.children.splice(N,1);break}}I.abcelem.lastBar=T,P.children.push(I),b.push({el_type:z.abcelem.el_type,type:z.abcelem.type,endChar:z.abcelem.endChar,startChar:z.abcelem.startChar,abselem:I});break;case"rest":var D=f(z);if(D){if(y=u(c,null,D),y.error)return;j={el_type:"note",startChar:z.abcelem.startChar,endChar:z.abcelem.endChar,notes:[],grace:!0},h(c,L,z,y.graces,b)}break;case"note":var L=t(z);L.x=z.heads[0].x+z.heads[0].w/2,L.lyricDim=o(z);var _=z.abcelem.pitches,x=z.abcelem.gracenotes;if(L.type="tabNumber",y=u(c,_,x),y.error)return;if(y.graces){var S=y.notes.length-1;y.notes[S].graces=y.graces}C={el_type:"note",startChar:z.abcelem.startChar,endChar:z.abcelem.endChar,notes:[]};for(var M=0;M<y.notes.length;M++){var U=y.notes[M];if(U.graces)for(var q=0;q<U.graces.length;q++){var j={el_type:"note",startChar:z.abcelem.startChar,endChar:z.abcelem.endChar,notes:[],grace:!0},V=v(z,q),ne=U.graces[q],Y=p(c,V,j,ne,!0);L.children.push(Y),b.push(j)}var ce=p(c,L.x+z.heads[M].dx,C,U,!1);L.children.push(ce)}C.notes.length>0&&(C.abselem=L,b.push(C),P.children.push(L));break}}},Na=l,Na}var Aa,sf;function z7(){if(sf)return Aa;sf=1;var e=fb(),r=C7(),n=pt();function i(){return{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}}function t(c){for(var m=0,b=0;b<c.children.length;b++){var g=c.children[b];g.specialY&&g.specialY.lyricHeightBelow>m&&(m=g.specialY.lyricHeightBelow)}return m}function a(c,m,b){var g=c.semantics,w=m.controller.getTextSize,k=g.tabInfos(c),$=g.suppress(c),O=!0;if($&&(O=!1),O){var P=w.calc(k,"tablabelfont","text instrumentname");return b.tabNameInfos={textSize:{height:P.height,width:P.width},name:k},P.height}return 0}function s(c,m){return m[c].isTabStaff?c===m.length-1?!0:!m[c+1].isTabStaff:!1}function o(c){for(var m=0,b=0;b<c.length;b++)c[b].isTabStaff||m++;return m}function l(c,m){for(var b=m;b>=0;b--)if(!c[b].isTabStaff)return b;return-1}function d(c){for(var m=0;m<c.length;m++)if(c[m].isTabStaff){var b=l(c,m);c[m].hasStaff=c[b],c[b].hasTab||(c[b].hasTab=[]),c[b].hasTab.push(c[m])}}function p(c,m){return o(c)===1&&m.voices.length>1}function v(c,m){for(var b=0,g=0,w=!0,k=0;w;){if(!m[b])return-1;if(m[b].isTabStaff||(k=m[b].voices.length),m[b].isTabStaff){if(g++,s(b,m)&&g<k)return b+1}else if(g=0,b>=c&&(b+1==m.length||!m[b+1].isTabStaff))return b+1;if(b++,b>m.length)return-1}}function f(c,m){for(var b=m;b>=0;b--)if(!c[b].isTabStaff)return c[b];return null}function u(c,m){var b=c[m],g=b.children[0].abcelem;return g.el_type==="clef"?null:m==0?"none":c[m-1].children[0]}function h(c,m,b,g){var w=new r,k={clef:{type:"TAB"}},$=c.linePitch*c.nbLines,O=b.staff;if(O){var P=O[0];if(P&&P.clef&&P.clef.stafflines==0){c.setError("No tablatures when stafflines=0");return}O.splice(O.length,0,k)}var y=b.staffGroup,C=y.voices,E=C[0],z=t(E),A=3,R=g,T=y.staffs[R],I=$+A-T.bottom-z;T.isTabStaff&&(I=T.top);var N={bottom:-1,isTabStaff:!0,specialY:i(),lines:c.nbLines,linePitch:c.linePitch,dy:.15,top:I},D=v(g,y.staffs);if(D!==-1){N.parentIndex=D-1,y.staffs.splice(D,0,N),y.height+=$+A;var L=f(y.staffs,D),_=1;p(y.staffs,L)&&(_=L.voices.length),k.voices=[];for(var x=0;x<_;x++){var S=new e(0,0);x>0&&(S.duplicate=!0);var M=a(c,m,S)/n.STEP;M=Math.max(M,1),y.staffs[g].top+=1,y.height+=M,S.staff=N;var U=C.length;C.splice(C.length,0,S);var q=u(C,x+g);k.voices[x]=[],w.build(c,C,k.voices[x],x,g,q,U)}d(y.staffs)}}return Aa=h,Aa}var Pa,of;function pb(){if(of)return Pa;of=1;var e={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},r=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];function n(t){var a=t.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(a&&a.length===5){var s=e[a[1]],o=r.indexOf(a[2]),l=a[4].length-a[3].length;return 48+o+s+l*12}return 0}function i(t){t=parseInt(t,10);var a=Math.floor(t/12),s=t%12,o=r[s];if(o==="-"&&(o="^"+r[s-1]),a>4)for(o=o.toLowerCase(),a-=5;a>0;)o+="'",a--;else for(;a<4;)o+=",",a++;return o}return Pa={noteToMidi:n,midiToNote:i},Pa}var Oa,cf;function vb(){if(cf)return Oa;cf=1;var{noteToMidi:e,midiToNote:r}=pb();function n(t,a){var s=e(t);a&&(s+=a);var o=r(s),l=!1,d=!1,p=!1,v=null,f=null,u=!1,h=0;t.startsWith("_")?(l=!0,h=-1,t[1]=="/"?(l=!1,f="v",h=0):t[1]=="_"&&(u=!0,h-=1)):t.startsWith("^")?(d=!0,h=1,t[1]=="/"?(d=!1,f="^",h=0):t[1]=="^"&&(u=!0,h+=1)):t.startsWith("=")&&(v=!0,h=0),p=l||d||f!=null,(p||v)&&(f!=null||u?o=t.slice(2):o=t.slice(1));var c=(o.match(/,/g)||[]).length,m=(o.match(/'/g)||[]).length;this.pitch=s,this.pitchAltered=0,this.name=o,this.acc=h,this.isSharp=d,this.isKeySharp=!1,this.isDouble=u,this.isAltered=p,this.isFlat=l,this.isKeyFlat=!1,this.natural=v,this.quarter=f,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=c,this.isQuoted=m}function i(t){var a=t.name,s=new n(a);return s.pitch=t.pitch,s.hasComma=t.hasComma,s.isLower=t.isLower,s.isQuoted=t.isQuoted,s.isSharp=t.isSharp,s.isKeySharp=t.isKeySharp,s.isFlat=t.isFlat,s.isKeyFlat=t.isKeyFlat,s}return n.prototype.sameNoteAs=function(t){return t.pitch===this.pitch},n.prototype.isLowerThan=function(t){return t.pitch>this.pitch},n.prototype.checkKeyAccidentals=function(t,a){if(!(this.isAltered||this.natural)){if(a[this.name.toUpperCase()])switch(a[this.name.toUpperCase()]){case"__":this.acc=-2,this.pitchAltered=-2;return;case"_":this.acc=-1,this.pitchAltered=-1;return;case"=":this.acc=0,this.pitchAltered=0;return;case"^":this.acc=1,this.pitchAltered=1;return;case"^^":this.acc=2,this.pitchAltered=2;return}else if(t)for(var s=this.name,o=0;o<t.length;o++){var l=t[o];s==l.note.toUpperCase()&&(l.acc=="flat"&&(this.acc=-1,this.isKeyFlat=!0,this.pitchAltered=-1),l.acc=="sharp"&&(this.acc=1,this.isKeySharp=!0,this.pitchAltered=1))}}},n.prototype.getAccidentalEquiv=function(){var t=i(this);return t.isSharp||t.isKeySharp?(t=t.nextNote(),t.isFlat=!0,t.isSharp=!1,t.isKeySharp=!1):(t.isFlat||t.isKeyFlat)&&(t=t.prevNote(),t.isSharp=!0,t.isFlat=!1,t.isKeyFlat=!1),t},n.prototype.nextNote=function(){var t=r(this.pitch+1+this.pitchAltered);return new n(t)},n.prototype.prevNote=function(){var t=r(this.pitch-1+this.pitchAltered);return new n(t)},n.prototype.emitNoAccidentals=function(){var t=this.name;this.isLower&&(t=t.toLowerCase());for(var a=0;a<this.isQuoted;a++)t+="'";for(var s=0;s<this.hasComma;s++)t+=",";return t},n.prototype.emit=function(){var t=this.name;(this.isSharp||this.isKeySharp)&&(t="^"+t,this.isDouble&&(t="^"+t)),(this.isFlat||this.isKeyFlat)&&(t="_"+t,this.isDouble&&(t="_"+t)),this.quarter&&(this.quarter=="^"?t="^/"+t:t="_/"+t),this.natural&&(t="="+t);for(var a=1;a<=this.hasComma;a++)t+=",";if(this.isLower){t=t.toLowerCase();for(var s=1;s<=this.isQuoted;s++)t+="'"}return t},Oa=n,Oa}var Ma,uf;function E7(){if(uf)return Ma;uf=1;var e=vb(),r=["A","B","C","D","E","F","G"];function n(i,t){var a=new e(i),s=new e(t);if(s.isLowerThan(a)){var o=a.emit(),l=s.emit();return{error:"Invalid string Instrument tuning : "+l+" string lower than "+o+" string"}}var d=[],p=r.indexOf(a.name),v=r.indexOf(s.name);if(p==-1||v==-1)return d;for(var f=!1;!f;)d.push(a.emit()),a=a.nextNote(),a.sameNoteAs(s)&&(f=!0);return d}return Ma=n,Ma}var Da,lf;function N7(){if(lf)return Da;lf=1;const{noteToMidi:e}=pb();var r=vb(),n=E7();function i(f){var u=null,h=f.tuning;if(f.capo>0){u=[];for(var c=0;c<h.length;c++){for(var m=new r(h[c]),b=0;b<f.capo;b++)m=m.nextNote();u[c]=m.emit()}}return u}function t(f){var u=[],h=f.tuning;f.capo>0&&(h=f.capoTuning);for(var c=h.length-1,m=0;m<h.length;m++){var b=f.highestNote;m!=h.length-1&&(b=h[m+1]);var g=n(h[m],b);if(g.error)return g;u[c--]=g}return u}function a(f){var u=[];u[0]=[];for(var h=f.strings,c=1;c<h.length;c++)u[c]=h[c-1];return u}function s(f,u){for(var h=0;h<u.length-1;h++){var c=u[h],m=u[h+1];if(c.str==m.str){if(c.str==f.strings.length-1){c.num="?",m.num="?";return}m.num<c.num?(m.str++,m=l(f,m.note,m.str,f.secondPos,f.strings[m.str].length)):(c.str++,c=l(f,c.note,c.str,f.secondPos,f.strings[c.str].length)),u[h]=c,u[h+1]=m}}return null}function o(f,u){for(var h=[],c=0;c<u.length;c++)if(!u[c].endTie){var m=new r(u[c].name,f.clefTranspose);m.checkKeyAccidentals(f.accidentals,f.measureAccidentals);var b=d(f,m);h.push(b)}return s(f,h),h}function l(f,u,h,c,m){var b=f.strings;u.checkKeyAccidentals(f.accidentals,f.measureAccidentals),c&&(b=c);var g=u.emitNoAccidentals(),w=b[h].indexOf(g),k=u.acc;if(w!=-1){if(c&&(w+=m),(u.isFlat||u.acc==-1)&&w==0){var $=u.getAccidentalEquiv();h++,w=b[h].indexOf($.emit()),k=0}return{num:w+k,str:h,note:u}}return null}function d(f,u){if(u.isAltered||u.natural){var h;u.isFlat?u.isDouble?h="__":h="_":u.isSharp?u.isDouble?h="^^":h="^":u.natural&&(h="="),f.measureAccidentals[u.name.toUpperCase()]=h}for(var c=f.stringPitches.length-1;c>=0;c--)if(u.pitch+u.pitchAltered>=f.stringPitches[c]){var m=u.pitch+u.pitchAltered-f.stringPitches[c];return u.quarter==="^"?m-=.5:u.quarter==="v"&&(m+=.5),{num:Math.round(m),str:f.stringPitches.length-1-c,note:u}}return{num:"?",str:f.stringPitches.length-1,note:u}}v.prototype.stringToPitch=function(f){var u=5.3,h=this.strings.length-1;return u+(h-f)*this.linePitch};function p(f,u){var h={num:"?",str:0,note:u};f.push(h),f.error=u.emit()+": unexpected note for instrument"}v.prototype.notesToNumber=function(f,u){var h,c,m=null,b=null;if(f&&(b=[],f.length>1?(b=o(this,f),b.error&&(m=b.error)):f[0].endTie||(h=new r(f[0].name,this.clefTranspose),h.checkKeyAccidentals(this.accidentals,this.measureAccidentals),c=d(this,h),c?b.push(c):(p(b,h),m=b.error))),m)return b;var g=null;if(u){g=[];for(var w=0;w<u.length;w++)h=new r(u[w].name,this.clefTranspose),h.checkKeyAccidentals(this.accidentals,this.measureAccidentals),c=d(this,h),c?g.push(c):(p(g,h),m=b.error)}return{notes:b,graces:g,error:m}},v.prototype.toString=function(){for(var f=[],u=0;u<this.tuning.length;u++){var h=this.tuning[u].replaceAll(",","").replaceAll("'","").toUpperCase();h[0]==="_"?h=h[1]+"b ":h[0]==="^"&&(h=h[1]+"# "),f.push(h)}return f.join("")},v.prototype.tabInfos=function(f){var u=f.params.label;if(u){var h=u.indexOf("%T"),c="";return h!=-1&&(c=this.toString(),f.capo>0&&(c+=" capo:"+f.capo),u=u.replace("%T",c)),u}return""},v.prototype.suppress=function(f){var u=f.params.suppress;return!!u};function v(f){var u=f.tuning,h=f.capo,c=f.params.highestNote;this.linePitch=f.linePitch,this.highestNote="a'",c&&(this.highestNote=c),this.measureAccidentals={},this.capo=0,h&&(this.capo=parseInt(h,10)),this.transpose=f.transpose?f.transpose:0,this.tuning=u,this.stringPitches=[];for(var m=0;m<this.tuning.length;m++){var b=e(this.tuning[m])+this.capo;this.stringPitches.push(b)}if(this.capo>0&&(this.capoTuning=i(this)),this.strings=t(this),this.strings.error){f.setError(this.strings.error),f.inError=!0;return}this.secondPos=a(this)}return Da=v,Da}var Ra,ff;function A7(){if(ff)return Ra;ff=1;var e=T7(),r=z7(),n=N7();i.prototype.init=function(a,s,o,l){this.tune=a,this.params=o,this.tuneNumber=s,this.inError=!1,this.abcTune=a,this.linePitch=3,this.nbLines=l.defaultTuning.length,this.isTabBig=l.isTabBig,this.tabSymbolOffset=l.tabSymbolOffset,this.capo=o.capo,this.transpose=o.visualTranspose,this.hideTabSymbol=o.hideTabSymbol,this.tablature=new e(this.nbLines,this.linePitch);var d=o.tuning;d||(d=l.defaultTuning),this.tuning=d,this.semantics=new n(this)},i.prototype.setError=function(a){a&&(this.error=a,this.inError=!0,this.tune.warnings?this.tune.warnings.push(a):this.tune.warnings=[a])},i.prototype.render=function(a,s,o){this.inError||this.tablature.bypass(s)||r(this,a,s,o)};function i(){}var t=function(){return{name:"StringTab",tablature:i}};return Ra=t,Ra}var La,df;function mb(){if(df)return La;df=1;var e=A7(),r={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},n={inited:!1,plugins:{},register:function(i){var t=i.name,a=i.tablature;this.plugins[t]=a},setError:function(i,t){i.warnings?i.warning.push(t):i.warnings=[t]},preparePlugins:function(i,t,a){this.inited||(this.register(new e),this.inited=!0);var s=null;if(a.tablature){var o=a.tablature;s=[];for(var l=0;l<o.length;l++){var d=o[l],p=d.instrument;if(p==null)return this.setError(i,"tablature 'instrument' is missing"),s;var v=r[p],f=null;if(v&&(f=this.plugins[v.name]),f){a.visualTranspose!=0&&(d.visualTranspose=a.visualTranspose),d.abcSrc=a.tablature.abcSrc;var u={classz:f,tuneNumber:t,params:d,instance:null,tabType:v};s.push(u)}else if(p==="")s.push(null);else return this.setError(i,"Undefined tablature plugin: "+p),s}}return s},layoutTablatures:function(t,a){var s=a.tablatures,o=0;if(s&&s.length>0)for(var l=s.length,d=0;d<l;++d)s[d]&&s[d].params.firstStaffOnly&&(s[d].params.suppress=!1);for(var p=0;p<a.lines.length;p++){var v=a.lines[p];if(v.staff&&o++,o>1&&s&&s.length>0)for(var l=s.length,d=0;d<l;++d)s[d].params.firstStaffOnly&&(s[d].params.suppress=!0);var f=v.staff;if(f){for(var u=f.length,h=0;h<f.length;h++)if(s[h]&&h<u){var c=s[h];c.instance==null&&(c.instance=new c.classz,c.instance.init(a,c.tuneNumber,c.params,c.tabType)),c.instance.render(t,v,h)}}}}};return La=n,La}var Ua,hf;function Gi(){if(hf)return Ua;hf=1;var e=lb(),r=I7(),n=mb(),i={};return(function(){i.numberOfTunes=function(a){var s=a.split(`
|
|
146
|
-
X:`),
|
|
147
|
-
`),
|
|
148
|
-
`,u=null,h=null,c=null,m=[],b=!1,g=i.parseOnly(d.abc)[0],w=g.getPickupLength()>0,k=0;k<g.lines.length;k++){var $=g.lines[k];if($.staff)for(var O=0;O<1;O++)for(var P=$.staff[O],y=0;y<1;y++)for(var C=P.voices[y],E=0;E<C.length;E++){var z=C[E];if(c===null&&z.startChar>=0&&(c=z.startChar,z.chord===void 0?h=u:h=null),z.chord&&(u=z),z.el_type==="bar"){if(b){var A=d.abc.substring(c,z.endChar),R={abc:A};u=h&&h.chord&&h.chord.length>0?h.chord[0].name:null,u&&(R.lastChord=u),z.startEnding&&(R.startEnding=z.startEnding),z.endEnding&&(R.endEnding=z.endEnding),m.push(R),c=null,b=!1}}else z.el_type==="note"&&(b=!0)}}s.push({header:f,measures:m,hasPickup:w})}return s}})(),Ua=i,Ua}var Za,pf;function P7(){if(pf)return Za;pf=1;var e=ib(),{relativeMajor:r,transposeKey:n,relativeMode:i,isLegalMode:t}=nb(),a=rb(),s;return(function(){s=function(y,C,E){if(C==="TEST")return{keyAccidentals:e,relativeMajor:r,transposeKey:n,relativeMode:i,transposeChordName:a};E=parseInt(E,10);var z=[],A;for(A=0;A<C.length;A++)z=z.concat(o(y,C[A],E));z=z.sort(function(I,N){return N.start-I.start});var R=y.split("");for(A=0;A<z.length;A++){var T=z[A];R.splice(T.start,T.end-T.start,T.note)}return R.join("")};function o(y,C,E){var z=[],A=C.getKeySignature();if(A.root==="Hp"||A.root==="HP")return z;z=z.concat(l(y,E));for(var R=0;R<C.lines.length;R++){var T=C.lines[R].staff;if(T)for(var I=0;I<T.length;I++){var N=T[I];N.clef.type!=="perc"&&(z=z.concat(d(y,N.voices,N.key,E)))}}return z}function l(y,C){for(var E=[],z=y.split("K:"),A=z[0].length,R=1;R<z.length;R++){var T=z[R],I=T.match(/^( *)([A-G])([#b]?)( ?)(\w*)/);if(I){var N=A+2+I[1].length,D=t(I[5])?I[5]:"",L=I[2]+I[3]+I[4]+D,_=c({root:I[2],acc:I[3],mode:D},C),x=_.root+_.acc+I[4]+_.mode;E.push({start:N,end:N+L.length,note:x})}A+=T.length+2}return E}function d(y,C,E,z){for(var A=[],R=c(E,z),T=0;T<C.length;T++)A=A.concat(f(y,C[T],E.root,p(E),R,z));return A}function p(y){for(var C={},E=0;E<y.accidentals.length;E++){var z=y.accidentals[E];z.acc==="flat"?C[z.note.toUpperCase()]="_":z.acc==="sharp"&&(C[z.note.toUpperCase()]="^")}return C}function v(y,C,E){var z=u.indexOf(y.root)-u.indexOf(C);return C==="none"&&(z=u.indexOf(y.root)),z===0?E>2?z+=7:E===-12&&(z-=7):E>0&&z<0?z+=7:E<0&&z>0&&(z-=7),E>12?z+=7:E<-12&&(z-=7),z}function f(y,C,E,z,A,R){for(var T=[],I=v(A,E,R),N={},D={},L=0;L<C.length;L++){var _=C[L];if(_.chord)for(var x=0;x<_.chord.length;x++){var S=_.chord[x];if(S.position==="default"){var M=A.accidentals.length&&A.accidentals[0].acc==="flat",U=a(S.name,R,M,!0);U=U.replace(/♭/g,"b").replace(/♯/g,"#"),U!==S.name&&T.push(O(y,_.startChar,_.endChar,U))}}if(_.el_type==="note"&&_.pitches){for(var q=k(y,_.startChar,_.endChar),j=0;j<q.length;j++){var V=w(q[j].note,E,z,N);V.acc&&(N[V.name.toUpperCase()]=V.acc);var ne=m(V,A,I,D);ne.acc&&(D[ne.upper]=ne.acc),T.push({note:ne.acc+ne.name,start:q[j].index,end:q[j].index+q[j].note.length})}if(_.gracenotes)for(var Y=0;Y<_.gracenotes.length;Y++){var ce=w(_.gracenotes[Y].name,E,z,N);ce.acc&&(N[ce.name.toUpperCase()]=ce.acc);var fe=m(ce,A,I,N);fe.acc&&(D[fe.upper]=fe.acc),T.push($(y,_.startChar,_.endChar,fe.acc+fe.name,Y))}}else _.el_type==="bar"?(N={},D={}):_.el_type==="keySignature"&&(E=_.root,z=p(_),A=c(_,R),I=v(A,E,R))}return T}var u="CDEFGAB",h=[",,,,",",,,",",,",",","","'","''","'''","''''"];function c(y,C){if(y.root==="none")return{root:n("C",C),mode:"",acc:"",accidentals:[]};var E=r(y.root+y.acc+y.mode),z=n(E,C),A=i(z,y.mode),R=e(z);return{root:A[0],mode:y.mode,acc:A.length>1?A[1]:"",accidentals:R}}function m(y,C,E,z){for(var A=y.pitch,R=u.indexOf(y.name),T=u.indexOf(C.root),I=(T+A)%7,N=R+E,D=y.oct;N>6;)D++,N-=7;for(;N<0;)D--,N+=7;for(var L=u[I],_="",x=y.adj,S="=",M=0;M<C.accidentals.length;M++)if(C.accidentals[M].note.toLowerCase()===L.toLowerCase()){x=x+(C.accidentals[M].acc==="flat"?-1:1),S=C.accidentals[M].acc==="flat"?"_":"^";break}var U;switch(x){case-2:_="__";break;case-1:_="_";break;case 0:_="=";break;case 1:_="^";break;case 2:_="^^";break;case-3:return U={},U.pitch=y.pitch-1,U.oct=y.oct,U.name=u[u.indexOf(y.name)-1],U.name||(U.name="B",U.oct--),U.name==="B"||U.name==="E"?U.adj=y.adj+1:U.adj=y.adj+2,m(U,C,E+1,z);case 3:return U={},U.pitch=y.pitch+1,U.oct=y.oct,U.name=u[u.indexOf(y.name)+1],U.name||(U.name="C",U.oct++),U.name==="C"||U.name==="F"?U.adj=y.adj-1:U.adj=y.adj-2,m(U,C,E+1,z)}switch((z[L]===_||!z[L]&&_===S)&&!y.courtesy&&(_=""),D){case 0:L=L+",,,";break;case 1:L=L+",,";break;case 2:L=L+",";break;case 4:L=L.toLowerCase();break;case 5:L=L.toLowerCase()+"'";break;case 6:L=L.toLowerCase()+"''";break;case 7:L=L.toLowerCase()+"'''";break;case 8:L=L.toLowerCase()+"''''";break}return D>4&&(L=L.toLowerCase()),{acc:_,name:L,upper:L.toUpperCase()}}var b=/([_^=]*)([A-Ga-g])([,']*)/,g=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/;function w(y,C,E,z){var A=C==="none"?0:u.indexOf(C),R=y.match(b),T=R[2].toUpperCase(),I=u.indexOf(T)-A;I<0&&(I+=7);var N=h.indexOf(R[3]);T===R[2]&&N--;var D=z[T]||E[T]||"=";return{acc:R[1],name:T,pitch:I,oct:N,adj:P(R[1],E[T],z[T]),courtesy:R[1]===D}}function k(y,C,E){for(var z=y.substring(C,E),A,R=[],T=/("[^"]+")+/g;(A=T.exec(z))!==null;)R.push({start:T.lastIndex-A[0].length,end:T.lastIndex});for(var I=/(![^!]+!)+/g;(A=I.exec(z))!==null;)R.push({start:I.lastIndex-A[0].length,end:I.lastIndex});for(var N=[],D=/([_^=]*)([A-Ga-g])([,']*)/g;(A=D.exec(z))!==null;){for(var L=!1,_=0;_<R.length;_++)D.lastIndex>=R[_].start&&D.lastIndex<=R[_].end&&(L=!0);L||N.push({note:A[0],index:C+D.lastIndex-A[0].length})}return N}function $(y,C,E,z,A){var R=y.substring(C,E),T=/\{/,I=/\}/,N=/([^\{]*)/,D=/(\/*)/,L=R.match(new RegExp(N.source+T.source+D.source+g.source+D.source+g.source+D.source+g.source+D.source+g.source+D.source+g.source+D.source+g.source+D.source+g.source+D.source+g.source+I.source));if(L){for(var _=1+L[1].length,x=0;x<A;x++)L[x*3+2]&&(_+=L[x*3+2].length),L[x*3+3]&&(_+=L[x*3+3].length),L[x*3+4]&&(_+=L[x*3+4].length),L[x*3+5]&&(_+=L[x*3+5].length);L[A*3+2]&&(_+=L[x*3+2].length),C+=_;var S=L[A*3+3]?L[A*3+3].length:0;S+=L[A*3+4]?L[A*3+4].length:0,S+=L[A*3+5]?L[A*3+5].length:0,E=C+S}return{start:C,end:E,note:z}}function O(y,C,E,z){var A=y.substring(C,E).match(/([^"]+)?(".+")+/);return A[1]&&(C+=A[1].length),E=C+A[2].length,{start:C+1,end:E-1,note:z}}function P(y,C,E){if(!y&&E&&(y=E),!y)return 0;switch(C){case void 0:switch(y){case"__":return-2;case"_":return-1;case"=":return 0;case"^":return 1;case"^^":return 2;default:return 0}case"_":switch(y){case"__":return-1;case"_":return 0;case"=":return 1;case"^":return 2;case"^^":return 3;default:return 0}case"^":switch(y){case"__":return-3;case"_":return-2;case"=":return-1;case"^":return 0;case"^^":return 1;default:return 0}}return 0}})(),Za=s,Za}var ja,vf;function O7(){if(vf)return ja;vf=1;var e=function(i,t,a,s){this.type="BeamElem",this.isflat=!!a,this.isgrace=!!(t&&t==="grace"),this.forceup=!!(this.isgrace||t&&t==="up"),this.forcedown=!!(t&&t==="down"),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=i,this.beams=[],s&&s.duration?(this.duration=s.duration,s.startTriplet&&(this.duration*=s.tripletMultiplier),this.duration=Math.round(this.duration*1e3)/1e3):this.duration=0};e.prototype.setHint=function(){this.hint=!0},e.prototype.runningDirection=function(n){var i=n.averagepitch;i!==void 0&&(this.total=Math.round(this.total+i),this.count||(this.count=0),this.count++)},e.prototype.add=function(n){var i=n.abcelem.averagepitch;i!==void 0&&(n.abcelem.rest||(this.allrests=!1),n.beam=this,this.elems.push(n),this.total=Math.round(this.total+i),(this.min===void 0||n.abcelem.minpitch<this.min)&&(this.min=n.abcelem.minpitch),(this.max===void 0||n.abcelem.maxpitch>this.max)&&(this.max=n.abcelem.maxpitch))},e.prototype.addBeam=function(n){this.beams.push(n)},e.prototype.setStemDirection=function(){if(this.average=r(this.total,this.count),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var n=6;this.stemsUp=this.average<n}delete this.count,this.total=0},e.prototype.calcDir=function(){if(this.average=r(this.total,this.elems.length),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var n=6;this.stemsUp=this.average<n}for(var i=this.stemsUp?"up":"down",t=0;t<this.elems.length;t++)for(var a=0;a<this.elems[t].heads.length;a++)this.elems[t].heads[a].stemDir=i};function r(n,i){return i?n/i:0}return ja=e,ja}var Ba,mf;function M7(){if(mf)return Ba;mf=1;var e=function(n,i){this.startVoice=n,this.type=i};return e.prototype.setBottomStaff=function(r){this.endVoice=r,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},e.prototype.continuing=function(r){this.lastContinuedVoice=r},e.prototype.getWidth=function(){return 10},e.prototype.isStartVoice=function(r){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===r)},Ba=e,Ba}var qa,gf;function Yt(){if(gf)return qa;gf=1;var e=pt(),r={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"tab.big":{d:[["M",20.16,-21.66],["c",.24,-.09,.66,.09,.78,.36],["c",.09,.21,.09,.24,-.18,.54],["c",-.78,.81,-1.86,1.44,-2.94,1.71],["c",-.87,.24,-1.71,.24,-2.55,.03],["l",-.06,-.03],["l",-.18,.99],["c",-.33,1.98,-.75,4.26,-.96,5.04],["c",-.42,1.65,-1.26,3.18,-2.28,4.14],["c",-.57,.57,-1.17,.9,-1.86,1.08],["c",-.18,.06,-.33,.06,-.66,.06],["c",-.54,0,-.78,-.03,-1.23,-.27],["c",-.39,-.18,-.66,-.39,-1.38,-.99],["c",-.3,-.24,-.66,-.51,-.75,-.57],["c",-.21,-.15,-.27,-.24,-.24,-.45],["c",.06,-.27,.36,-.6,.6,-.66],["c",.18,-.03,.33,.06,.9,.57],["c",.48,.42,.72,.57,.93,.69],["c",.66,.33,1.38,.21,1.95,-.36],["c",.63,-.6,1.05,-1.62,1.23,-3],["c",.03,-.18,.09,-.66,.09,-1.11],["c",.09,-1.56,.33,-3.81,.57,-5.49],["c",.06,-.33,.09,-.63,.09,-.63],["c",-.03,-.03,-.81,-.12,-1.02,-.12],["c",-.57,0,-1.32,.12,-1.8,.33],["c",-.87,.3,-1.35,.78,-1.5,1.41],["c",-.18,.63,.09,1.26,.66,1.65],["c",.12,.06,.15,.12,.18,.24],["c",.09,.27,.06,.57,-.09,.75],["c",-.03,.06,-.12,.09,-.27,.15],["c",-.72,.21,-1.44,.15,-2.1,-.18],["c",-.54,-.27,-.96,-.66,-1.2,-1.14],["c",-.39,-.75,-.33,-1.74,.15,-2.52],["c",.27,-.42,.84,-.93,1.41,-1.23],["c",1.17,-.57,2.88,-.9,4.8,-.9],["c",.69,0,.78,0,1.08,.06],["c",.45,.09,1.11,.3,2.07,.6],["c",1.47,.48,1.83,.57,2.55,.54],["c",1.02,-.06,2.04,-.45,2.94,-1.11],["c",.12,-.09,.24,-.18,.27,-.18],["z"],["m",-5.88,13.05],["c",.21,-.03,.81,0,1.08,.06],["c",.48,.12,.9,.42,.99,.69],["c",.03,.09,.03,.15,0,.27],["c",0,.09,-.03,.57,-.06,1.08],["c",-.09,2.19,-.24,5.76,-.39,8.28],["c",-.06,1.53,-.06,1.77,.03,2.01],["c",.09,.18,.15,.24,.3,.3],["c",.24,.12,.54,.06,1.23,-.27],["c",.57,-.27,.66,-.3,.75,-.24],["c",.09,.06,.18,.3,.18,.45],["c",0,.33,-.15,.51,-.45,.63],["c",-.12,.03,-.39,.15,-.6,.27],["c",-1.17,.6,-1.38,.69,-1.8,.72],["c",-.45,.03,-.78,-.09,-1.08,-.39],["c",-.39,-.42,-.66,-1.2,-1.02,-3.12],["c",-.24,-1.23,-.36,-2.07,-.54,-3.75],["l",0,-.18],["l",-.36,.45],["c",-.6,.75,-1.32,1.59,-1.95,2.25],["c",-.15,.18,-.27,.3,-.27,.33],["c",0,0,.06,.09,.15,.18],["c",.24,.33,.6,.57,1.05,.69],["c",.18,.06,.3,.06,.69,.06],["l",.48,.03],["l",.06,.12],["c",.15,.27,.03,.72,-.21,.9],["c",-.18,.12,-.93,.27,-1.41,.27],["c",-.84,0,-1.59,-.3,-1.98,-.84],["l",-.12,-.15],["l",-.45,.42],["c",-.99,.87,-1.53,1.32,-2.16,1.74],["c",-.78,.51,-1.5,.84,-2.1,.93],["c",-.69,.12,-1.2,.03,-1.95,-.42],["c",-.21,-.12,-.51,-.27,-.66,-.36],["c",-.24,-.12,-.3,-.18,-.33,-.24],["c",-.12,-.27,.15,-.78,.45,-.93],["c",.24,-.12,.33,-.09,.9,.18],["c",.6,.3,.84,.39,1.2,.36],["c",.87,-.09,1.77,-.69,3.24,-2.31],["c",2.67,-2.85,4.59,-5.94,5.7,-9.15],["c",.15,-.45,.24,-.63,.42,-.81],["c",.21,-.24,.6,-.45,.99,-.51],["z"],["m",-3.99,16.05],["c",.18,0,.69,-.03,1.17,0],["c",3.27,.03,5.37,.75,6,2.07],["c",.45,.99,.12,2.4,-.81,3.42],["c",-.24,.27,-.57,.57,-.84,.75],["c",-.09,.06,-.18,.09,-.18,.12],["c",0,0,.18,.03,.42,.09],["c",1.23,.3,2.01,.81,2.37,1.59],["c",.27,.54,.3,1.32,.09,2.1],["c",-.12,.36,-.45,1.05,-.69,1.35],["c",-.87,1.17,-2.1,1.92,-3.54,2.25],["c",-.36,.06,-.48,.06,-.96,.06],["c",-.45,0,-.66,0,-.84,-.03],["c",-.84,-.18,-1.47,-.51,-2.07,-1.11],["c",-.33,-.33,-.45,-.51,-.45,-.63],["c",0,-.06,.03,-.15,.06,-.24],["c",.18,-.33,.69,-.6,.93,-.48],["c",.03,.03,.15,.12,.27,.24],["c",.39,.42,.99,.57,1.62,.45],["c",1.05,-.21,1.98,-1.02,2.31,-2.01],["c",.48,-1.53,-.48,-2.55,-2.58,-2.67],["c",-.21,0,-.36,-.03,-.42,-.06],["c",-.15,-.09,-.21,-.51,-.06,-.78],["c",.12,-.27,.24,-.33,.6,-.36],["c",.57,-.06,1.11,-.42,1.5,-.99],["c",.48,-.72,.54,-1.59,.18,-2.31],["c",-.12,-.21,-.45,-.54,-.69,-.69],["c",-.33,-.21,-.93,-.45,-1.35,-.51],["l",-.12,-.03],["l",-.06,.48],["c",-.54,2.94,-1.14,6.24,-1.29,6.75],["c",-.33,1.35,-.93,2.61,-1.65,3.6],["c",-.3,.36,-.81,.9,-1.14,1.14],["c",-.3,.24,-.84,.48,-1.14,.57],["c",-.33,.09,-.96,.09,-1.26,.03],["c",-.45,-.12,-.87,-.39,-1.53,-.96],["c",-.24,-.15,-.51,-.39,-.63,-.48],["c",-.3,-.21,-.33,-.33,-.21,-.63],["c",.12,-.18,.27,-.36,.42,-.45],["c",.27,-.12,.36,-.09,.87,.33],["c",.78,.6,1.08,.75,1.65,.72],["c",.45,-.03,.81,-.21,1.17,-.54],["c",.87,-.9,1.38,-2.85,1.38,-5.37],["c",0,-.6,.03,-1.11,.12,-2.04],["c",.06,-.69,.24,-2.01,.33,-2.58],["c",.06,-.24,.06,-.42,.06,-.42],["c",0,0,-.12,.03,-.21,.09],["c",-1.44,.57,-2.16,1.65,-1.74,2.55],["c",.09,.15,.18,.24,.27,.33],["c",.24,.21,.3,.27,.33,.39],["c",.06,.24,0,.63,-.15,.78],["c",-.09,.12,-.54,.21,-.96,.24],["c",-1.02,.03,-2.01,-.48,-2.43,-1.32],["c",-.21,-.45,-.27,-.9,-.15,-1.44],["c",.06,-.27,.21,-.66,.39,-.93],["c",.87,-1.29,3,-2.22,5.64,-2.43],["z"]],w:19.643,h:43.325},"tab.tiny":{d:[["M",16.02,-17.25],["c",.12,-.09,.15,-.09,.27,-.09],["c",.21,.03,.51,.3,.51,.45],["c",0,.06,-.12,.18,-.3,.36],["c",-1.11,1.08,-2.55,1.59,-3.84,1.41],["c",-.15,-.03,-.33,-.06,-.39,-.09],["c",-.06,-.03,-.09,-.03,-.12,-.03],["c",0,0,-.06,.42,-.15,.93],["c",-.33,2.01,-.66,3.69,-.84,4.26],["c",-.42,1.41,-1.23,2.67,-2.16,3.33],["c",-.27,.18,-.75,.42,-.99,.48],["c",-.3,.09,-.72,.09,-1.02,.06],["c",-.45,-.09,-.84,-.33,-1.53,-.9],["c",-.21,-.18,-.51,-.39,-.63,-.48],["c",-.27,-.21,-.3,-.24,-.3,-.36],["c",0,-.12,.09,-.36,.18,-.45],["c",.09,-.09,.27,-.18,.36,-.18],["c",.12,0,.3,.12,.66,.45],["c",.57,.51,.87,.69,1.23,.72],["c",.93,.06,1.68,-.78,1.98,-2.37],["c",.09,-.39,.15,-.75,.18,-1.53],["c",.06,-.99,.24,-2.79,.42,-4.05],["c",.03,-.3,.06,-.57,.06,-.6],["c",0,-.06,-.03,-.09,-.15,-.12],["c",-.9,-.18,-2.13,.06,-2.76,.57],["c",-.36,.3,-.51,.6,-.51,1.02],["c",0,.45,.15,.75,.48,.99],["c",.06,.06,.15,.18,.18,.24],["c",.12,.24,.03,.63,-.15,.69],["c",-.24,.12,-.6,.15,-.9,.15],["c",-.36,-.03,-.57,-.09,-.87,-.24],["c",-.78,-.36,-1.23,-1.11,-1.2,-1.92],["c",.12,-1.53,1.74,-2.49,4.62,-2.7],["c",1.2,-.09,1.47,-.03,3.33,.57],["c",.9,.3,1.14,.36,1.56,.39],["c",.45,0,.93,-.06,1.38,-.21],["c",.51,-.18,.81,-.33,1.41,-.75],["z"],["m",-4.68,10.38],["c",.39,-.06,.84,0,1.2,.15],["c",.24,.12,.36,.21,.45,.36],["l",.09,.09],["l",-.06,1.41],["c",-.09,2.19,-.18,3.96,-.27,5.49],["c",-.03,.78,-.06,1.59,-.06,1.86],["c",0,.42,0,.48,.06,.57],["c",.06,.18,.18,.24,.36,.27],["c",.18,0,.39,-.06,.84,-.27],["c",.45,-.21,.54,-.24,.63,-.18],["c",.12,.12,.15,.54,.03,.69],["c",-.03,.03,-.15,.12,-.27,.18],["c",-.15,.03,-.3,.12,-.36,.15],["c",-.87,.45,-1.02,.51,-1.26,.57],["c",-.33,.09,-.6,.06,-.84,-.06],["c",-.42,-.18,-.63,-.6,-.87,-1.44],["c",-.3,-1.23,-.57,-2.97,-.66,-4.08],["c",0,-.18,-.03,-.3,-.03,-.33],["l",-.06,.06],["c",-.18,.27,-1.11,1.38,-1.68,2.01],["l",-.33,.33],["l",.06,.09],["c",.06,.15,.27,.33,.48,.42],["c",.27,.18,.51,.24,.96,.27],["l",.39,0],["l",.03,.12],["c",.12,.21,.03,.57,-.15,.69],["c",-.03,.03,-.21,.09,-.36,.15],["c",-.27,.06,-.39,.06,-.75,.06],["c",-.48,0,-.75,-.03,-1.08,-.21],["c",-.21,-.12,-.51,-.36,-.57,-.48],["l",-.03,-.09],["l",-.39,.36],["c",-1.47,1.35,-2.49,1.98,-3.42,2.13],["c",-.54,.09,-.96,-.03,-1.62,-.39],["c",-.21,-.15,-.45,-.27,-.54,-.3],["c",-.18,-.09,-.21,-.21,-.12,-.45],["c",.06,-.27,.33,-.48,.54,-.48],["c",.03,0,.27,.09,.48,.21],["c",.48,.24,.69,.27,.99,.27],["c",.6,-.06,1.17,-.42,2.1,-1.35],["c",2.22,-2.22,4.02,-4.98,4.95,-7.59],["c",.21,-.57,.3,-.78,.48,-.93],["c",.15,-.15,.42,-.27,.66,-.33],["z"],["m",-3.06,12.84],["c",.27,-.03,1.68,0,2.01,.03],["c",1.92,.18,3.15,.69,3.63,1.5],["c",.18,.33,.24,.51,.21,.93],["c",0,.45,-.06,.72,-.24,1.11],["c",-.24,.51,-.69,1.02,-1.17,1.35],["c",-.21,.15,-.21,.15,-.12,.18],["c",.72,.15,1.11,.3,1.5,.57],["c",.39,.24,.63,.57,.75,.96],["c",.09,.3,.09,.96,0,1.29],["c",-.15,.57,-.39,1.05,-.78,1.5],["c",-.66,.75,-1.62,1.32,-2.61,1.53],["c",-.27,.06,-.42,.06,-.84,.06],["c",-.48,0,-.57,0,-.81,-.06],["c",-.6,-.18,-1.05,-.42,-1.47,-.81],["c",-.36,-.39,-.42,-.51,-.3,-.75],["c",.12,-.21,.39,-.39,.6,-.39],["c",.09,0,.15,.03,.33,.18],["c",.12,.12,.27,.24,.36,.27],["c",.96,.48,2.46,-.33,2.82,-1.5],["c",.24,-.81,-.03,-1.44,-.69,-1.77],["c",-.39,-.21,-1.02,-.33,-1.53,-.33],["c",-.18,0,-.21,0,-.27,-.09],["c",-.06,-.09,-.06,-.3,-.03,-.48],["c",.06,-.18,.18,-.36,.33,-.36],["c",.39,-.06,.51,-.09,.72,-.18],["c",.69,-.36,1.11,-1.23,.99,-2.01],["c",-.09,-.51,-.42,-.9,-.93,-1.17],["c",-.24,-.12,-.6,-.27,-.87,-.3],["c",-.09,-.03,-.09,-.03,-.12,.12],["c",0,.09,-.21,1.11,-.42,2.25],["c",-.66,3.75,-.72,3.99,-1.26,5.07],["c",-.9,1.89,-2.25,2.85,-3.48,2.61],["c",-.39,-.09,-.69,-.27,-1.38,-.84],["c",-.63,-.51,-.63,-.48,-.63,-.6],["c",0,-.18,.18,-.48,.39,-.57],["c",.21,-.12,.3,-.09,.81,.33],["c",.15,.15,.39,.3,.54,.36],["c",.18,.12,.27,.12,.48,.15],["c",.99,.06,1.71,-.78,2.04,-2.46],["c",.12,-.66,.18,-1.14,.21,-2.22],["c",.03,-1.23,.12,-2.25,.36,-3.63],["c",.03,-.24,.06,-.45,.06,-.48],["c",-.06,-.03,-.66,.27,-.9,.42],["c",-.06,.06,-.21,.18,-.33,.3],["c",-.57,.57,-.6,1.35,-.06,1.74],["c",.18,.12,.24,.24,.21,.51],["c",-.03,.3,-.15,.42,-.57,.48],["c",-1.11,.24,-2.22,-.42,-2.43,-1.38],["c",-.09,-.45,.03,-1.02,.3,-1.47],["c",.18,-.24,.6,-.63,.9,-.84],["c",.9,-.6,2.28,-1.02,3.69,-1.11],["z"]],w:15.709,h:34.656},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.85,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84}};r["noteheads.slash.whole"]={d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},r["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},r["noteheads.harmonic.quarter"]={d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165},r["noteheads.triangle.quarter"]={d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9};var n=function(a){for(var s=[],o=0,l=a.length;o<l;o++){s[o]=[];for(var d=0,p=a[o].length;d<p;d++)s[o][d]=a[o][d]}return s},i=function(a,s,o){for(var l=0,d=a.length;l<d;l++){var p=a[l],v,f;for(v=1,f=p.length;v<f;v++)p[v]*=v%2?s:o}},t={printSymbol:function(a,s,o,l,d){if(!r[o])return null;var p=n(r[o].d);p[0][1]+=a,p[0][2]+=s;for(var v="",f=0;f<p.length;f++)v+=p[f].join(" ");return d.path=v,l.path(d)},getPathForSymbol:function(a,s,o,l,d){if(l=l||1,d=d||1,!r[o])return null;var p=n(r[o].d);return(l!==1||d!==1)&&i(p,l,d),p[0][1]+=a,p[0][2]+=s,p},getSymbolWidth:function(a){return r[a]?r[a].w:0},symbolHeightInPitches:function(a){var s=r[a]?r[a].h:0;return s/e.STEP},getSymbolAlign:function(a){return a.substring(0,7)==="scripts"&&a!=="scripts.roll"?"center":"left"},getYCorr:function(a){switch(a){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":return-2;case"timesig.common":case"timesig.cut":return 0;case"flags.d32nd":return-1;case"flags.d64th":return-2;case"flags.u32nd":return 1;case"flags.u64th":return 3;case"rests.whole":return 1;case"rests.half":return-1;case"rests.8th":return-1;case"rests.quarter":return-1;case"rests.16th":return-1;case"rests.32nd":return-1;case"rests.64th":return-1;case"f":case"m":case"p":case"s":case"z":return-4;case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"scripts.dfermata":return 1;default:return 0}},setSymbol:function(a,s){r[a]=s}};return qa=t,qa}var Fa,bf;function D7(){if(bf)return Fa;bf=1;var e=Er(),r=Yt(),n=Nt(),i=function(a,s){var o,l=0;a.el_type="clef";var d=new e(a,0,10,"staff-extra clef",s);switch(d.isClef=!0,a.type){case"treble":o="clefs.G";break;case"tenor":o="clefs.C";break;case"alto":o="clefs.C";break;case"bass":o="clefs.F";break;case"treble+8":o="clefs.G",l=1;break;case"tenor+8":o="clefs.C",l=1;break;case"bass+8":o="clefs.F",l=1;break;case"alto+8":o="clefs.C",l=1;break;case"treble-8":o="clefs.G",l=-1;break;case"tenor-8":o="clefs.C",l=-1;break;case"bass-8":o="clefs.F",l=-1;break;case"alto-8":o="clefs.C",l=-1;break;case"none":return null;case"perc":o="clefs.perc";break;default:d.addFixed(new n("clef="+a.type,0,0,void 0,{type:"debug"}))}var p=5;if(o){var v=r.symbolHeightInPitches(o),f=t(o);if(d.addRight(new n(o,p,r.getSymbolWidth(o),a.clefPos,{top:v+a.clefPos+f,bottom:a.clefPos+f})),l!==0){var u=.6666666666666666,h=(r.getSymbolWidth(o)-r.getSymbolWidth("8")*u)/2,c=l>0?d.top+3:d.bottom-1,m=l>0?d.top+3:d.bottom-3,b=m-2;a.type==="bass-8"&&(c=3,h=0),d.addRight(new n("8",p+h,r.getSymbolWidth("8")*u,c,{scalex:u,scaley:u,top:m,bottom:b}))}}return d};function t(a){switch(a){case"clefs.G":return-5;case"clefs.C":return-4;case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}return Fa=i,Fa}var Ha,yf;function R7(){if(yf)return Ha;yf=1;var e=Er(),r=Yt(),n=Nt(),i=function(t,a){if(t.el_type="keySignature",!t.accidentals||t.accidentals.length===0)return null;var s=new e(t,0,10,"staff-extra key-signature",a);s.isKeySig=!0;var o=0;return t.accidentals.forEach(function(l){var d,p=0;switch(l.acc){case"sharp":d="accidentals.sharp",p=-3;break;case"natural":d="accidentals.nat";break;case"flat":d="accidentals.flat",p=-1.2;break;case"quartersharp":d="accidentals.halfsharp",p=-2.5;break;case"quarterflat":d="accidentals.halfflat",p=-1.2;break;default:d="accidentals.flat"}s.addRight(new n(d,o,r.getSymbolWidth(d),l.verticalPos,{thickness:r.symbolHeightInPitches(d),top:l.verticalPos+r.symbolHeightInPitches(d)+p,bottom:l.verticalPos+p})),o+=r.getSymbolWidth(d)+2},this),s};return Ha=i,Ha}var Ga,_f;function L7(){if(_f)return Ga;_f=1;var e=Yt(),r=Nt(),n=function(i,t,a,s){s||(s={});var o=s.dir!==void 0?s.dir:null,l=s.headx!==void 0?s.headx:0,d=s.extrax!==void 0?s.extrax:0,p=s.flag!==void 0?s.flag:null,v=s.dot!==void 0?s.dot:0,f=s.dotshiftx!==void 0?s.dotshiftx:0,u=s.scale!==void 0?s.scale:1,h=s.accidentalSlot!==void 0?s.accidentalSlot:[],c=s.shouldExtendStem!==void 0?s.shouldExtendStem:!1,m=s.printAccidentals!==void 0?s.printAccidentals:!0,b=a.verticalPos,g,w=0,k=0,$=0;if(t===void 0)i.addFixed(new r("pitch is undefined",0,0,0,{type:"debug"}));else if(t==="")g=new r(null,0,0,b);else{var O=l;if(a.printer_shift){var P=a.printer_shift==="same"?1:0;O=o==="down"?-e.getSymbolWidth(t)*u+P:e.getSymbolWidth(t)*u-P}var y={scalex:u,scaley:u,thickness:e.symbolHeightInPitches(t)*u,name:a.name};if(g=new r(t,O,e.getSymbolWidth(t)*u,b,y),g.stemDir=o,p){var C=b+(o==="down"?-7:7)*u;c&&(o==="down"&&C>6&&(C=6),o==="up"&&C<6&&(C=6));var E=o==="down"?l:l+g.w-.6;i.addRight(new r(p,E,e.getSymbolWidth(p)*u,C,{scalex:u,scaley:u}))}for(k=g.w+f-2+5*v;v>0;v--){var z=1-Math.abs(b)%2;i.addRight(new r("dots.dot",g.w+f-2+5*v,e.getSymbolWidth("dots.dot"),b+z))}}if(g&&(g.highestVert=a.highestVert),m&&a.accidental){var A;switch(a.accidental){case"quartersharp":A="accidentals.halfsharp";break;case"dblsharp":A="accidentals.dblsharp";break;case"sharp":A="accidentals.sharp";break;case"quarterflat":A="accidentals.halfflat";break;case"flat":A="accidentals.flat";break;case"dblflat":A="accidentals.dblflat";break;case"natural":A="accidentals.nat"}for(var R=!1,T=d,I=0;I<h.length;I++)if(b-h[I][0]>=6){h[I][0]=b,T=h[I][1],R=!0;break}R===!1&&(T-=e.getSymbolWidth(A)*u+2,h.push([b,T]),w=e.getSymbolWidth(A)*u+2);var N=e.symbolHeightInPitches(A);i.addExtra(new r(A,T,e.getSymbolWidth(A),b,{scalex:u,scaley:u,top:b+N/2,bottom:b-N/2})),$=e.getSymbolWidth(A)/2}return{notehead:g,accidentalshiftx:w,dotshiftx:k,extraLeft:$}};return Ga=n,Ga}var Ja,wf;function U7(){if(wf)return Ja;wf=1;var e=Er(),r=Yt(),n=Nt(),i=function(t,a){t.el_type="timeSignature";var s=new e(t,0,10,"staff-extra time-signature",a);if(t.type==="specified")for(var o=0,l=0;l<t.value.length;l++)if(l!==0&&(s.addRight(new n("+",o+1,r.getSymbolWidth("+"),6,{thickness:r.symbolHeightInPitches("+")})),o+=r.getSymbolWidth("+")+2),t.value[l].den){for(var d=0,p=0;p<t.value[l].num.length;p++)d+=r.getSymbolWidth(t.value[l].num[p]);var v=0;for(p=0;p<t.value[l].num.length;p++)v+=r.getSymbolWidth(t.value[l].den[p]);var f=Math.max(d,v);s.addRight(new n(t.value[l].num,o+(f-d)/2,d,8,{thickness:r.symbolHeightInPitches(t.value[l].num[0])})),s.addRight(new n(t.value[l].den,o+(f-v)/2,v,4,{thickness:r.symbolHeightInPitches(t.value[l].den[0])})),o+=f}else{for(var u=0,h=0;h<t.value[l].num.length;h++)u+=r.getSymbolWidth(t.value[l].num[h]);s.addRight(new n(t.value[l].num,o,u,6,{thickness:r.symbolHeightInPitches(t.value[l].num[0])})),o+=u}else t.type==="common_time"?s.addRight(new n("timesig.common",0,r.getSymbolWidth("timesig.common"),6,{thickness:r.symbolHeightInPitches("timesig.common")})):t.type==="cut_time"?s.addRight(new n("timesig.cut",0,r.getSymbolWidth("timesig.cut"),6,{thickness:r.symbolHeightInPitches("timesig.cut")})):t.type==="tempus_imperfectum"?s.addRight(new n("timesig.imperfectum",0,r.getSymbolWidth("timesig.imperfectum"),6,{thickness:r.symbolHeightInPitches("timesig.imperfectum")})):t.type==="tempus_imperfectum_prolatio"?s.addRight(new n("timesig.imperfectum2",0,r.getSymbolWidth("timesig.imperfectum2"),6,{thickness:r.symbolHeightInPitches("timesig.imperfectum2")})):t.type==="tempus_perfectum"?s.addRight(new n("timesig.perfectum",0,r.getSymbolWidth("timesig.perfectum"),6,{thickness:r.symbolHeightInPitches("timesig.perfectum")})):t.type==="tempus_perfectum_prolatio"?s.addRight(new n("timesig.perfectum2",0,r.getSymbolWidth("timesig.perfectum2"),6,{thickness:r.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",t);return s};return Ja=i,Ja}var Wa,kf;function Z7(){if(kf)return Wa;kf=1;var e=function(n,i,t){this.type="DynamicDecoration",this.anchor=n,this.dec=i,t==="below"?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0};return Wa=e,Wa}var Ya,$f;function j7(){if($f)return Ya;$f=1;var e=function(n,i,t,a){this.type="CrescendoElem",this.anchor1=n,this.anchor2=i,this.dir=t,a==="above"?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0};return Ya=e,Ya}var Va,xf;function B7(){if(xf)return Va;xf=1;var e=function(n,i){this.type="GlissandoElem",this.anchor1=n,this.anchor2=i};return Va=e,Va}var Xa,Sf;function gb(){if(Sf)return Xa;Sf=1;var e=function(n){this.type="TieElem",this.anchor1=n.anchor1,this.anchor2=n.anchor2,n.isGrace&&(this.isGrace=!0),n.fixedY&&(this.fixedY=!0),n.stemDir&&(this.stemDir=n.stemDir),n.voiceNumber!==void 0&&(this.voiceNumber=n.voiceNumber),n.style!==void 0&&(this.dotted=!0),this.internalNotes=[]};return e.prototype.addInternalNote=function(r){this.internalNotes.push(r)},e.prototype.setEndAnchor=function(r){this.anchor2=r,this.anchor1?(this.top=Math.max(this.anchor1.pitch,this.anchor2.pitch)+4,this.bottom=Math.min(this.anchor1.pitch,this.anchor2.pitch)-4):(this.top=this.anchor2.pitch+4,this.bottom=this.anchor2.pitch-4)},e.prototype.setStartX=function(r){this.startLimitX=r},e.prototype.setEndX=function(r){this.endLimitX=r},e.prototype.setHint=function(){this.hint=!0},e.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var r;this.anchor1?r=this.anchor1.pitch:this.anchor2?r=this.anchor2.pitch:r=14,this.anchor1&&this.anchor1.stemDir==="down"&&this.anchor2&&this.anchor2.stemDir==="down"?this.above=!0:this.anchor1&&this.anchor1.stemDir==="up"&&this.anchor2&&this.anchor2.stemDir==="up"?this.above=!1:this.anchor1&&this.anchor2?this.above=r>=6:this.anchor1?this.above=this.anchor1.stemDir==="down":this.anchor2?this.above=this.anchor2.stemDir==="down":this.above=r>=6}},e.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var r=!1;this.anchor1&&this.anchor1.stemDir==="down"&&(r=!0),this.anchor2&&this.anchor2.stemDir==="down"&&(r=!0);for(var n=0;n<this.internalNotes.length;n++){var i=this.internalNotes[n];i.stemDir==="down"&&(r=!0)}this.above=r}},e.prototype.calcX=function(r,n){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.anchor2?this.startX=this.anchor2.x-20:this.startX=r,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=n},e.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0},e.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&this.anchor1.stemDir==="up"&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var r=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,n=(this.anchor2.highestVert+this.anchor2.pitch)/2;if(this.above&&this.anchor2.stemDir==="up"&&!this.fixedY&&!r&&n<this.startY?(this.endY=n,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&r?this.anchor2.highestVert:this.anchor2.pitch,this.anchor1.scalex===1){var i=!!this.anchor1.parent.beam,t=!!this.anchor2.parent.beam;if(i){var a=this.anchor1.parent===this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1];a||(this.above?this.startY=this.anchor1.parent.fixed.t:this.startY=this.anchor1.parent.fixed.b)}if(t){var s=this.anchor2.parent===this.anchor2.parent.beam.elems[0];s||(this.above?this.endY=this.anchor2.parent.fixed.t:this.endY=this.anchor2.parent.fixed.b)}}}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},e.prototype.avoidCollisionAbove=function(){if(this.above){for(var r=-50,n=0;n<this.internalNotes.length;n++)this.internalNotes[n].highestVert>r&&(r=this.internalNotes[n].highestVert);r>this.startY&&r>this.endY&&(this.startY=this.endY=r-1)}},e.prototype.getYBounds=function(){var r=10,n=1e3;this.isTie?(this.calcTieDirection(),this.calcX(r,n),this.calcTieY()):(this.calcSlurDirection(),this.calcX(r,n),this.calcSlurY());var i,t;return this.above?(t=Math.min(this.startY,this.endY),i=t+3):(i=Math.min(this.startY,this.endY),t=i-3),[i,t]},Xa=e,Xa}var Ka,If;function q7(){if(If)return Ka;If=1;var e=Z7(),r=j7(),n=B7(),i=Yt(),t=Nt(),a=gb(),s=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},o=function(f,u,h,c,m,b,g,w,k){for(var $,O=0;O<u.length;O++){if(u[O]==="staccato"||u[O]==="tenuto"||u[O]==="accent"&&!k){var P="scripts."+u[O];if(u[O]==="accent"&&(P="scripts.sforzato"),$===void 0?$=g==="down"?h+2:w-2:$=g==="down"?$+2:$-2,u[O]==="accent")g==="up"?$--:$++;else switch($){case 2:case 4:case 6:case 8:case 10:g==="up"?$--:$++;break}h>9&&$++;var y=c/2;i.getSymbolAlign(P)!=="center"&&(y-=i.getSymbolWidth(P)/2),m.addFixedX(new t(P,y,i.getSymbolWidth(P),$))}if(u[O]==="slide"&&m.heads[0]){var C=m.heads[0].pitch;C-=2;var E=new t("",-b-15,0,C-1),z=new t("",-b-5,0,C+1);m.addFixedX(E),m.addFixedX(z),f.addOther(new a({anchor1:E,anchor2:z,fixedY:!0}))}}return $===void 0&&($=h),{above:$,below:m.bottom}},l=function(f,u,h,c){for(var m=0;m<u.length;m++)switch(u[m]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var b=new e(h,u[m],c);f.addOther(b)}},d=function(f,u,h,c,m){function b(){if(c.heads.length===0)return 10;for(var $=c.heads[0].pitch,O=1;O<c.heads.length;O++)$=Math.max($,c.heads[O].pitch);return $}function g(){if(c.heads.length===0)return 2;for(var $=c.heads[0].pitch,O=1;O<c.heads.length;O++)$=Math.min($,c.heads[O].pitch);return $}function w($,O){var P=m==="down"?g()+1:b()+9;m!=="down"&&O===1&&P--;var y=h/2;y+=m==="down"?-5:3;for(var C=0;C<O;C++)P-=1,c.addFixedX(new t($,y,i.getSymbolWidth($),P))}for(var k=0;k<f.length;k++)switch(f[k]){case"/":w("flags.ugrace",1);break;case"//":w("flags.ugrace",2);break;case"///":w("flags.ugrace",3);break;case"////":w("flags.ugrace",4);break}},p=function(f,u,h,c,m,b,g,w){function k(z,A){z==="above"?c.above+=A:c.below-=A}function $(z){var A;return z==="above"?(A=c.above,A<b&&(A=b)):(A=c.below,A>g&&(A=g)),A}function O(z,A,R){var T=$(A),I=2,N=5;h.addFixedX(new t(z,u/2,0,T+I,{type:"decoration",klass:"ornament",thickness:3,anchor:R})),k(A,N)}function P(z,A){var R=u/2;i.getSymbolAlign(z)!=="center"&&(R-=i.getSymbolWidth(z)/2);var T=i.symbolHeightInPitches(z)+1,I=$(A);I=A==="above"?I+T/2:I-T/2,h.addFixedX(new t(z,R,i.getSymbolWidth(z),I,{klass:"ornament",thickness:i.symbolHeightInPitches(z),position:A})),k(A,T)}for(var y={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",trillh:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},C=!1,E=0;E<f.length;E++)switch(f[E]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":O(f[E],m,"middle"),C=!0;break;case"D.C.alcoda":O("D.C. al coda",m,"end"),C=!0;break;case"D.C.alfine":O("D.C. al fine",m,"end"),C=!0;break;case"D.S.alcoda":O("D.S. al coda",m,"end"),C=!0;break;case"D.S.alfine":O("D.S. al fine",m,"end"),C=!0;break;case"fine":O("FINE",m,"middle"),C=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"trillh":case"roll":case"irishroll":case"marcato":case"dmarcato":case"turn":case"uppermordent":case"pralltriller":case"mordent":case"lowermordent":case"downbow":case"upbow":case"fermata":case"breath":case"umarcato":case"coda":case"segno":P(y[f[E]],m),C=!0;break;case"invertedfermata":P(y[f[E]],"below"),C=!0;break;case"mark":h.klass="mark";break;case"accent":w&&(P("scripts.sforzato",m),C=!0);break}return C};function v(f,u,h){for(var c=0;c<f.length;c++)switch(f[c]){case"arpeggio":for(var m=u.abcelem.minpitch-1;m<=u.abcelem.maxpitch;m+=2)u.addExtra(new t("scripts.arpeggio",-i.getSymbolWidth("scripts.arpeggio")*2-h,0,m+2,{klass:"ornament",thickness:i.symbolHeightInPitches("scripts.arpeggio")}));break}}return s.prototype.dynamicDecoration=function(f,u,h,c){for(var m,b,g,w=0;w<u.length;w++)switch(u[w]){case"diminuendo(":this.startDiminuendoX=h,m=void 0;break;case"diminuendo)":m={start:this.startDiminuendoX,stop:h},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=h,b=void 0;break;case"crescendo)":b={start:this.startCrescendoX,stop:h},this.startCrescendoX=void 0;break;case"~(":case"glissando(":this.startGlissandoX=h,g=void 0;break;case"~)":case"glissando)":g={start:this.startGlissandoX,stop:h},this.startGlissandoX=void 0;break}m&&f.addOther(new r(m.start,m.stop,">",c)),b&&f.addOther(new r(b.start,b.stop,"<",c)),g&&f.addOther(new n(g.start,g.stop))},s.prototype.createDecoration=function(f,u,h,c,m,b,g,w,k,$,O){k||(k={ornamentPosition:"above",volumePosition:$?"above":"below",dynamicPosition:$?"above":"below"}),l(f,u,m,k.volumePosition),this.dynamicDecoration(f,u,m,k.dynamicPosition),d(u,h,c,m,g);var P=o(f,u,h,c,m,b,g,w,O);P.above=Math.max(P.above,this.minTop),P.below=Math.min(P.below,w),p(u,c,m,P,k.ornamentPosition,this.minTop,w,O),v(u,m,b)},Ka=s,Ka}var Qa,Tf;function F7(){if(Tf)return Qa;Tf=1;var e=function(n,i,t){this.type="EndingElem",this.text=n,this.anchor1=i,this.anchor2=t,this.endingHeightAbove=5,this.pitch=void 0};return Qa=e,Qa}var es,Cf;function H7(){if(Cf)return es;Cf=1;var e=function(r){for(var n=0,i=0;i<r.voices.length;i++){var t=r.voices[i].staff;r.voices[i].duplicate||(n+=t.top,n+=-t.bottom)}return n};return es=e,es}var ts,zf;function G7(){if(zf)return ts;zf=1;var e=H7(),r=function(n){this.getTextSize=n,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};return r.prototype.setLimit=function(n,i){i.specialY[n]&&(i.staff.specialY[n]?i.staff.specialY[n]=Math.max(i.staff.specialY[n],i.specialY[n]):i.staff.specialY[n]=i.specialY[n])},r.prototype.addVoice=function(n,i,t){var a=this.voices.length;this.voices[a]=n,this.staffs[i]?this.staffs[i].voices.push(a):this.staffs[this.staffs.length]={top:10,bottom:2,lines:t,voices:[a],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},n.staff=this.staffs[i]},r.prototype.setHeight=function(){this.height=e(this)},r.prototype.setWidth=function(n){this.w=n;for(var i=0;i<this.voices.length;i++)this.voices[i].setWidth(n)},r.prototype.setStaffLimits=function(n){n.staff.top=Math.max(n.staff.top,n.top),n.staff.bottom=Math.min(n.staff.bottom,n.bottom),this.setLimit("tempoHeightAbove",n),this.setLimit("partHeightAbove",n),this.setLimit("volumeHeightAbove",n),this.setLimit("dynamicHeightAbove",n),this.setLimit("endingHeightAbove",n),this.setLimit("chordHeightAbove",n),this.setLimit("lyricHeightAbove",n),this.setLimit("lyricHeightBelow",n),this.setLimit("chordHeightBelow",n),this.setLimit("volumeHeightBelow",n),this.setLimit("dynamicHeightBelow",n)},ts=r,ts}var rs,Ef;function J7(){if(Ef)return rs;Ef=1;var e=Er(),r=Nt(),n=function(t,a,s){this.type="TempoElement",this.tempo=t,this.tempo.type="tempo",this.tuneNumber=a,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(s,t,a))};return n.prototype.setX=function(i){this.x=i},n.prototype.createNote=function(i,t,a){var s=.75,o=t.duration[0],l=new e(t,o,1,"tempo",a),d,p,v;o<=1/32?(v="noteheads.quarter",p="flags.u32nd",d=0):o<=1/16?(v="noteheads.quarter",p="flags.u16th",d=0):o<=3/32?(v="noteheads.quarter",p="flags.u16nd",d=1):o<=1/8?(v="noteheads.quarter",p="flags.u8th",d=0):o<=3/16?(v="noteheads.quarter",p="flags.u8th",d=1):o<=1/4?(v="noteheads.quarter",d=0):o<=3/8?(v="noteheads.quarter",d=1):o<=1/2?(v="noteheads.half",d=0):o<=3/4?(v="noteheads.half",d=1):o<=1?(v="noteheads.whole",d=0):o<=1.5?(v="noteheads.whole",d=1):o<=2?(v="noteheads.dbl",d=0):(v="noteheads.dbl",d=1);var f=i(l,v,{verticalPos:0},{dir:"up",flag:p,dot:d,scale:s}),u=f.notehead;l.addHead(u);var h;if(v!=="noteheads.whole"&&v!=="noteheads.dbl"){var c=.3333333333333333*s,m=5*s,b=u.dx+u.w,g=-.6;h=new r(null,b,0,c,{type:"stem",pitch2:m,linewidth:g}),l.addRight(h)}return l},rs=n,rs}var ns,Nf;function W7(){if(Nf)return ns;Nf=1;var e=function(n,i,t){this.type="TripletElem",this.anchor1=i,this.number=n,this.durationClass=("d"+Math.round(i.parent.durationClass*1e3)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=t.flatBeams};return e.prototype.isClosed=function(){return!!this.anchor2},e.prototype.middleNote=function(r){this.middleElems.push(r)},e.prototype.setCloseAnchor=function(r){this.anchor2=r,(!this.anchor1.parent.beam||this.anchor1.stemDir==="up")&&(this.endingHeightAbove=4)},ns=e,ns}var is,Af;function Y7(){if(Af)return is;Af=1;function e(n){switch(n){case"B#":return"H#";case"B♯":return"H♯";case"B":return"H";case"Bb":return"B";case"B♭":return"B"}return n}function r(n,i,t){var a=n.split(`
|
|
149
|
-
`);for(let
|
|
150
|
-
`)}return
|
|
151
|
-
`)
|
|
152
|
-
`),x.headerPosition=6+T.getTextSize.baselineToCenter(x.header,"voicefont","staff-extra voice-name",_,I.voices.length)/v.STEP),I.clef&&I.clef.type==="perc"&&(x.isPercussion=!0);var S=(!this.initialClef||L===0)&&i(I.clef,this.tuneNumber);S&&(_===0&&I.barNumber&&this.addMeasureNumber(I.barNumber,S),x.addChild(S),this.startlimitelem=S);var M=t(I.key,this.tuneNumber);if(M&&(x.addChild(M),this.startlimitelem=M),I.meter){I.meter.type==="specified"?this.measureLength=I.meter.value[0].num/I.meter.value[0].den:this.measureLength=1;var U=s(I.meter,this.tuneNumber);x.addChild(U),this.startlimitelem=U}x.duplicate&&(x.children=[]);var q=I.clef.stafflines||I.clef.stafflines===0?I.clef.stafflines:5;T.addVoice(x,D,q);var j=q===1;this.createABCVoice(I.voices[_],N,D,_,j,x),T.setStaffLimits(x),_===0&&(I.brace==="start"||!T.brace&&I.brace?(T.brace||(T.brace=[]),T.brace.push(new n(x,"brace"))):I.brace==="end"&&T.brace?T.brace[T.brace.length-1].setBottomStaff(x):I.brace==="continue"&&T.brace&&T.brace[T.brace.length-1].continuing(x),I.bracket==="start"||!T.bracket&&I.bracket?(T.bracket||(T.bracket=[]),T.bracket.push(new n(x,"bracket"))):I.bracket==="end"&&T.bracket?T.bracket[T.bracket.length-1].setBottomStaff(x):I.bracket==="continue"&&T.bracket&&T.bracket[T.bracket.length-1].continuing(x))}};function y(T,I){var N=T[I];if(N.el_type!=="note"||!N.startBeam||N.endBeam)return{count:1,elem:N};for(var D=[];I<T.length&&T[I].el_type==="note"&&(D.push(T[I]),!T[I].endBeam);)I++;return{count:D.length,elem:D}}P.prototype.createABCVoice=function(T,I,N,D,L,_){this.popCrossLineElems(N,D),this.stemdir=this.isBagpipes?"down":null,this.abcline=T,this.partstartelem&&(this.partstartelem=new l("",null,null),_.addOther(this.partstartelem));var x=_.voicetotal<2?-1:_.voicenumber;for(var S in this.slurs)this.slurs.hasOwnProperty(S)&&(this.slurs[S]=new h({force:this.slurs[S].force,voiceNumber:x,stemDir:this.slurs[S].stemDir,style:this.slurs[S].dotted}),$&&this.slurs[S].setHint(),_.addOther(this.slurs[S]));for(var M=0;M<this.ties.length;M++)this.ties[M]=new h({force:this.ties[M].force,stemDir:this.ties[M].stemDir,voiceNumber:x,style:this.ties[M].dotted}),$&&this.ties[M].setHint(),_.addOther(this.ties[M]);for(var U=0;U<this.abcline.length;U++)C(this.abcline[U]),this.minY=Math.min(this.abcline[U].minpitch,this.minY);for(var q=N===0,j=0;j<this.abcline.length;){var V=y(this.abcline,j),ne=this.createABCElement(q,L,_,V.elem);if(ne)for(M=0;M<ne.length;M++){if(!this.tempoSet&&I&&!I.suppress){this.tempoSet=!0;var Y=new e(I,0,0,"tempo",this.tuneNumber,{});Y.addFixedX(new u(I,this.tuneNumber,a)),_.addChild(Y)}_.addChild(ne[M])}j+=V.count}this.pushCrossLineElems(N,D)},P.prototype.saveState=function(){this.tiesSave=w.cloneArray(this.ties),this.slursSave=w.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=w.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=w.cloneHashOfArrayOfHash(this.tiesbyvoice)},P.prototype.restoreState=function(){this.ties=w.cloneArray(this.tiesSave),this.slurs=w.cloneHashOfHash(this.slursSave),this.slursbyvoice=w.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=w.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},P.prototype.createABCElement=function(T,I,N,D){var L=[];switch(D.el_type){case void 0:L=this.createBeam(I,N,D);break;case"note":L[0]=this.createNote(D,!1,I,N),this.triplet&&this.triplet.isClosed()&&(N.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":L[0]=this.createBarLine(N,D,T),N.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"meter":L[0]=s(D,this.tuneNumber),this.startlimitelem=L[0],N.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"clef":if(L[0]=i(D,this.tuneNumber),!L[0])return null;N.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"key":var _=t(D,this.tuneNumber);_&&(L[0]=_,this.startlimitelem=L[0]),N.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"stem":this.stemdir=D.direction==="auto"?void 0:D.direction;break;case"part":var x=new e(D,0,0,"part",this.tuneNumber),S=this.getTextSize.calc(D.title,"partsfont","part");x.addFixedX(new p(D.title,0,0,void 0,{type:"part",height:S.height/v.STEP})),L[0]=x;break;case"tempo":var M=new e(D,0,0,"tempo",this.tuneNumber);D.suppress||M.addFixedX(new u(D,this.tuneNumber,a)),L[0]=M;break;case"style":D.head==="normal"?delete this.style:this.style=D.head;break;case"hint":$=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=D.size;break;case"color":this.voiceColor=D.color,N.color=this.voiceColor;break;default:var U=new e(D,0,0,"unsupported",this.tuneNumber);U.addFixed(new p("element type "+D.el_type,0,0,void 0,{type:"debug"})),L[0]=U}return L};function C(T){if(T.pitches){E(T);for(var I=0,N=0;N<T.pitches.length;N++)I+=T.pitches[N].verticalPos;T.averagepitch=I/T.pitches.length,T.minpitch=T.pitches[0].verticalPos,T.maxpitch=T.pitches[T.pitches.length-1].verticalPos}}P.prototype.createBeam=function(T,I,N){var D=[],L=new r(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,N[0]);$&&L.setHint();for(var _=0;_<N.length;_++)L.runningDirection(N[_]);L.setStemDirection();var x=this.stemdir;for(this.stemdir=L.stemsUp?"up":"down",_=0;_<N.length;_++){var S=N[_],M=this.createNote(S,!0,T,I);D.push(M),L.add(M),this.triplet&&this.triplet.isClosed()&&(I.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return L.calcDir(),I.addBeam(L),this.stemdir=x,D};var E=function(T){var I;do{I=!0;for(var N=0;N<T.pitches.length-1;N++)if(T.pitches[N].pitch>T.pitches[N+1].pitch){I=!1;var D=T.pitches[N];T.pitches[N]=T.pitches[N+1],T.pitches[N+1]=D}}while(!I)},z=function(T,I,N,D,L,_,x,S,M){for(var U=N;U>11;U--)U%2===0&&!D&&T.addFixed(new p(null,S,(L+4)*M,U,{type:"ledger"}));for(U=I;U<1;U++)U%2===0&&!D&&T.addFixed(new p(null,S,(L+4)*M,U,{type:"ledger"}));for(U=0;U<_.length;U++){var q=L;x==="down"&&(q=-q),T.addFixed(new p(null,q+S,(L+4)*M,_[U],{type:"ledger"}))}};P.prototype.addGraceNotes=function(T,I,N,D,L,_,x){var S=.6,M=3.5/5;L=Math.round(L*M);var U=null,q;T.gracenotes.length>1&&(U=new r(L,"grace",_),$&&U.setHint(),U.mainNote=N);var j,V=[];for(j=T.gracenotes.length-1;j>=0;j--)x+=10,V[j]=x,T.gracenotes[j].accidental&&(x+=7);for(j=0;j<T.gracenotes.length;j++){var ne=T.gracenotes[j].verticalPos;q=U?null:O.uflags[_?5:3];var Y=[],ce=a(N,"noteheads.quarter",T.gracenotes[j],{dir:"up",headx:-V[j],extrax:-V[j],flag:q,scale:S*this.voiceScale,accidentalSlot:Y});ce.notehead.highestVert=ce.notehead.pitch+L;var fe=ce.notehead;if(this.addSlursAndTies(N,T.gracenotes[j],fe,I,"up",!0),N.addExtra(fe),T.gracenotes[j].acciaccatura){var pe=T.gracenotes[j].verticalPos+7*S,K=U?5:6;N.addRight(new p("flags.ugrace",-V[j]+K,0,pe,{scalex:S,scaley:S}))}if(U){var he=T.gracenotes[j].duration/2;_&&(he/=2);var ee={heads:[fe],abcelem:{averagepitch:ne,minpitch:ne,maxpitch:ne,duration:he}};U.add(ee)}else{var be=ne+.3333333333333333*S,_e=ne+7*S,Me=fe.dx+fe.w,Ce=-.6;N.addExtra(new p(null,Me,0,be,{type:"stem",pitch2:_e,linewidth:Ce}))}z(N,ne,ne,!1,d.getSymbolWidth("noteheads.quarter"),[],!0,fe.dx-1,.6);var We=T.rest&&(T.rest.type==="spacer"||T.rest.type==="invisible");j===0&&!_&&this.graceSlurs&&!We&&I.addOther(new h({anchor1:fe,anchor2:D,isGrace:!0}))}return U&&(U.calcDir(),I.addBeam(U)),x};function A(T,I,N,D,L,_,x,S,M){var U,q=7,j,V,ne;switch(L&&(_==="down"&&(q=3),_==="up"&&(q=11)),x&&(N<.5||N<1?q=7:q=5),I.rest.type){case"whole":U=O.rest[0],I.averagepitch=q,I.minpitch=q,I.maxpitch=q,D=0;break;case"rest":I.style==="rhythm"?U=O.rhythm[-S]:U=O.rest[-S],I.averagepitch=q,I.minpitch=q,I.maxpitch=q;break;case"invisible":case"invisible-multimeasure":case"spacer":U="",I.averagepitch=q,I.minpitch=q,I.maxpitch=q;break;case"multimeasure":U=O.rest.multi,I.averagepitch=q,I.minpitch=q,I.maxpitch=q,D=0;var Y=d.getSymbolWidth(U);T.addHead(new p(U,Y,Y*2,7));var ce=new p(""+I.rest.text,Y,Y,16,{type:"multimeasure-text"});T.addExtra(ce)}if(I.rest.type.indexOf("multimeasure")<0&&I.rest.type!=="invisible"){var fe=a(T,U,{verticalPos:q},{dot:D,scale:M});j=fe.notehead,j&&(T.addHead(j),V=fe.accidentalshiftx,ne=fe.dotshiftx)}return{noteHead:j,roomTaken:V,roomTakenRight:ne}}function R(T,I){for(var N=0;N<T.length;N++)if(JSON.stringify(T[N])===JSON.stringify(I))return;T.push(I)}return P.prototype.addNoteToAbcElement=function(T,I,N,D,L,_,x,S,M){var U=0,q,j=0,V=0,ne,Y,ce=[],fe=[],pe=0,K=I.averagepitch>=6?"down":"up";D&&(K=D),L=I.style?I.style:L,(!L||L==="normal")&&(L="note");var he;_?he=O[L].nostem:he=O[L][-x],he||console.log("noteSymbol:",L,x,_);var ee;for(ee=K==="down"?I.pitches.length-2:1;K==="down"?ee>=0:ee<I.pitches.length;ee=K==="down"?ee-1:ee+1){var be=I.pitches[K==="down"?ee+1:ee-1],_e=I.pitches[ee],Me=K==="down"?be.pitch-_e.pitch:_e.pitch-be.pitch;Me<=1&&!be.printer_shift&&(_e.printer_shift=Me?"different":"same",(_e.verticalPos>11||_e.verticalPos<1)&&ce.push(_e.verticalPos-_e.verticalPos%2),K==="down"?j=d.getSymbolWidth(he)+2:U=d.getSymbolWidth(he)+2)}var Ce=I.pitches.length;for(ee=0;ee<I.pitches.length;ee++){if(!S){var We;K==="down"&&ee!==0||K==="up"&&ee!==Ce-1?We=null:We=O[K==="down"?"dflags":"uflags"][-x]}var Fe;if(I.pitches[ee].style)Fe=O[I.pitches[ee].style][-x];else if(M.isPercussion&&this.percmap){Fe=he;var Ke=this.percmap[g(I.pitches[ee])];Ke&&Ke.noteHead&&O[Ke.noteHead]&&(Fe=O[Ke.noteHead][-x])}else Fe=he;I.pitches[ee].highestVert=I.pitches[ee].verticalPos;var H=(D==="up"||K==="up")&&ee===0,W=(D==="down"||K==="down")&&ee===Ce-1;if(H||W){if((I.startSlur||Ce===1)&&(I.pitches[ee].highestVert=I.pitches[Ce-1].verticalPos,k(I)<1&&(D==="up"||K==="up")&&(I.pitches[ee].highestVert+=6)),I.startSlur)for(I.pitches[ee].startSlur||(I.pitches[ee].startSlur=[]),Y=0;Y<I.startSlur.length;Y++)R(I.pitches[ee].startSlur,I.startSlur[Y]);if(I.endSlur)for(I.pitches[ee].highestVert=I.pitches[Ce-1].verticalPos,k(I)<1&&(D==="up"||K==="up")&&(I.pitches[ee].highestVert+=6),I.pitches[ee].endSlur||(I.pitches[ee].endSlur=[]),Y=0;Y<I.endSlur.length;Y++)R(I.pitches[ee].endSlur,I.endSlur[Y])}var B=!S&&x<=-1,G=a(T,Fe,I.pitches[ee],{dir:K,extrax:-j,flag:We,dot:N,dotshiftx:U,scale:this.voiceScale,accidentalSlot:fe,shouldExtendStem:!D,printAccidentals:!M.isPercussion});pe=Math.max(d.getSymbolWidth(Fe),pe),T.extraw-=G.extraLeft,q=G.notehead,q&&(this.addSlursAndTies(T,I.pitches[ee],q,M,B?K:null,!1),I.gracenotes&&I.gracenotes.length>0&&(q.bottom=q.bottom-1),T.addHead(q)),j+=G.accidentalshiftx,V=Math.max(V,G.dotshiftx)}if(B){var Q=Math.round(70*this.voiceScale)/10,ae=K==="down"?I.minpitch-Q:I.minpitch+1/3;ae>6&&!D&&(ae=6);var ue=K==="down"?I.maxpitch-1/3:I.maxpitch+Q;ue<6&&!D&&(ue=6);var xe=K==="down"||T.heads.length===0?0:T.heads[0].w,se=K==="down"?1:-1;q&&q.c==="noteheads.slash.quarter"&&(K==="down"?ue-=1:ae+=1),q&&q.c==="noteheads.triangle.quarter"&&(K==="down"?ue-=.7:ae-=1.2),T.addRight(new p(null,xe,0,ae,{type:"stem",pitch2:ue,linewidth:se,bottom:ae-1})),ne=Math.min(ae,ue)}return{noteHead:q,roomTaken:j,roomTakenRight:V,min:ne,additionalLedgers:ce,dir:K,symbolWidth:pe}},P.prototype.addLyric=function(T,I){var N="";I.lyric.forEach(function(_){var x=_.divider===" "?"":_.divider;N+=_.syllable+x+`
|
|
153
|
-
`});var
|
|
154
|
-
`),h=0;h<
|
|
155
|
-
`)};var
|
|
156
|
-
`).length;if(
|
|
157
|
-
`&&
|
|
158
|
-
`+o),e(a,{marginLeft:l,text:o,font:d,absElemType:"extraText",name:u,"dominant-baseline":"middle",klass:f},m);else{a.push({startGroup:v,klass:f,name:u}),a.push({move:h.info}),s&&(e(a,{marginLeft:l,text:s,font:d,absElemType:"extraText",name:u,"dominant-baseline":"middle"},m),a.push({move:b.height*3/4}));for(var g=0;g<o.length;g++)r(a,o[g],d,"",u,l,{anchor:"start"},m),g<o.length-1&&typeof o[g]=="string"&&typeof o[g+1]!="string"&&a.push({move:b.height*3/4});a.push({endGroup:v,absElemType:p,startChar:-1,endChar:-1,name:u}),a.push({move:b.height})}}}return n.prototype.extraText=function(a,s,o,l,d){i(this.rows,"Book: ",a.book,s,"abcjs-book",l,d),i(this.rows,"Source: ",a.source,s,"abcjs-source",l,d),i(this.rows,"Discography: ",a.discography,s,"abcjs-discography",l,d),t(this.rows,"Notes:",a.notes,s,"historyfont","extraText","notes","abcjs-notes","description",o,l,d),i(this.rows,"Transcription: ",a.transcription,s,"abcjs-transcription",l,d),t(this.rows,"History:",a.history,s,"historyfont","extraText","history","abcjs-history","description",o,l,d),i(this.rows,"Copyright: ",a["abc-copyright"],s,"abcjs-copyright",l,d),i(this.rows,"Creator: ",a["abc-creator"],s,"abcjs-creator",l,d),i(this.rows,"Edited By: ",a["abc-edited-by"],s,"abcjs-edited-by",l,d)},n.prototype.footer=function(a,s,o,l){var d="header meta-bottom",p="footerfont";this.rows.push({startGroup:"footer",klass:d}),e(this.rows,{marginLeft:o,text:a.left,font:p,klass:d,name:"footer"},l),e(this.rows,{marginLeft:o+s/2,text:a.center,font:p,klass:d,anchor:"middle",name:"footer"},l),e(this.rows,{marginLeft:o+s,text:a.right,font:p,klass:d,anchor:"end",name:"footer"},l)},vs=n,vs}var ms,Ff;function yb(){if(Ff)return ms;Ff=1;function e(n,i,t,a){if(n.indexOf(i)===0){var s=n.replace(i,""),o=parseInt(s,10);""+o===s&&(t[a]=o)}}function r(n,i){var t=[];if(n.absEl.elemset){for(var a={},s=0;s<n.absEl.elemset.length;s++){var o=n.absEl.elemset[s];if(o)for(var l=o.getAttribute("class").split(" "),d=0;d<l.length;d++)a[l[d]]=!0}for(var p=0;p<Object.keys(a).length;p++)t.push(Object.keys(a)[p])}for(var v={},f=0;f<t.length;f++)e(t[f],"abcjs-v",v,"voice"),e(t[f],"abcjs-l",v,"line"),e(t[f],"abcjs-m",v,"measure");n.staffPos&&(v.staffPos=n.staffPos);for(var u=i.target;u&&u.dataset&&!u.dataset.name&&u.tagName.toLowerCase()!=="svg";)u=u.parentNode;for(var h=i.target;h&&h.dataset&&!h.dataset.index&&h.tagName.toLowerCase()!=="svg";)h=h.parentNode;return h&&h.dataset&&(v.name=h.dataset.name,v.clickedName=u.dataset.name,v.parentClasses=h.classList),u&&u.classList&&(v.clickedClasses=u.classList),v.selectableElement=n.svgEl,{classes:t,analysis:v}}return ms=r,ms}var gs,Hf;function a$(){if(Hf)return gs;Hf=1;var e=pt(),r=yb();function n(y,C){if(y.rangeHighlight=w,y.dragging)for(var E=0;E<y.selectables.length;E++){var z=y.selectables[E];z.svgEl.getAttribute("selectable")==="true"&&(z.svgEl.setAttribute("tabindex",0),z.svgEl.setAttribute("data-index",E),z.svgEl.addEventListener("keydown",a.bind(y)),z.svgEl.addEventListener("keyup",s.bind(y)),z.svgEl.addEventListener("focus",t.bind(y)))}for(var A=0;A<C.length;A++)C[A].addEventListener("touchstart",u.bind(y),{passive:!0}),C[A].addEventListener("touchmove",h.bind(y),{passive:!0}),C[A].addEventListener("touchend",c.bind(y),{passive:!0}),C[A].addEventListener("mousedown",u.bind(y)),C[A].addEventListener("mousemove",h.bind(y)),C[A].addEventListener("mouseup",c.bind(y))}function i(y){var C=1,E=1,z=y.target.closest("svg"),A=0;z&&z.viewBox&&z.viewBox.baseVal&&(z.viewBox.baseVal.width!==0&&(C=z.viewBox.baseVal.width/z.clientWidth),z.viewBox.baseVal.height!==0&&(E=z.viewBox.baseVal.height/z.clientHeight),A=z.viewBox.baseVal.y);var R=y.target&&y.target.tagName==="svg",T,I;return R?(T=y.offsetX,I=y.offsetY):(T=y.layerX,I=y.layerY),T=T*C,I=I*E,[T,I+A]}function t(y){this.dragMechanism==="keyboard"&&this.dragYStep!==0&&this.dragTarget&&b.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,y),this.dragYStep=0}function a(y){switch(y.keyCode){case 38:case 40:y.preventDefault()}}function s(y){var C=!1,E=y.target.dataset.index;switch(y.keyCode){case 13:case 32:C=!0,this.dragTarget=this.selectables[E],this.dragIndex=E,this.dragMechanism="keyboard",c.bind(this)(y);break;case 38:C=!0,this.dragTarget=this.selectables[E],this.dragIndex=E,this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*e.STEP+")"));break;case 40:C=!0,this.dragTarget=this.selectables[E],this.dragIndex=E,this.dragMechanism="keyboard",this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*e.STEP+")"));break;case 9:this.dragYStep!==0&&c.bind(this)(y);break}C&&y.preventDefault()}function o(y,C){if(!C)return-1;var E=C.dataset;if(!E)return-1;for(var z=E.index,A=0;A<y.length;A++){var R=y[A].svgEl.dataset;if(R&&z===R.index)return A}return-1}function l(y,C,E){for(var z=9999999,A=-1,R=0;R<y.selectables.length&&z>0;R++){var T=y.selectables[R];if(y.getDim(T),T.dim.left<C&&T.dim.right>C&&T.dim.top<E&&T.dim.bottom>E)A=R,z=0;else if(T.dim.top<E&&T.dim.bottom>E){var I=Math.min(Math.abs(T.dim.left-C),Math.abs(T.dim.right-C));I<z&&(z=I,A=R)}else if(T.dim.left<C&&T.dim.right>C){var N=Math.min(Math.abs(T.dim.top-E),Math.abs(T.dim.bottom-E));N<z&&(z=N,A=R)}else{var D=Math.abs(C-T.dim.left)>Math.abs(C-T.dim.right)?Math.abs(C-T.dim.right):Math.abs(C-T.dim.left),L=Math.abs(E-T.dim.top)>Math.abs(E-T.dim.bottom)?Math.abs(E-T.dim.bottom):Math.abs(E-T.dim.top),_=Math.sqrt(D*D+L*L);_<z&&(z=_,A=R)}}return A>=0&&z<=12?A:-1}function d(y,C,E){if(y.x<=C.offsetX&&y.x+y.width>=C.offsetX&&y.y<=C.offsetY&&y.y+y.height>=C.offsetY)return[C.offsetX,C.offsetY];var z=Math.abs(C.layerY/E-C.offsetY);return z<3?[C.offsetX,C.offsetY]:[C.layerX,C.layerY]}function p(y){if(!y)return null;if(y.tagName==="svg")return y;if(!y.getAttribute)return null;for(var C=y.getAttribute("selectable");!C;)y.parentElement?(y=y.parentElement,y.tagName==="svg"?C=!0:C=y.getAttribute("selectable")):C=!0;return y}function v(y,C){var E,z,A,R=o(y.selectables,p(C.target));return R>=0?(A=d(y.selectables[R].svgEl.getBBox(),C,y.scale),E=A[0],z=A[1]):(A=i(C),E=A[0],z=A[1],R=l(y,E,z)),{x:E,y:z,clickedOn:R}}function f(y){if(!(!y||!y.target||!y.touches||y.touches.length<1)){var C=y.target.getBoundingClientRect(),E=y.touches[0].pageX-C.left,z=y.touches[0].pageY-C.top;y.touches[0].offsetX=E,y.touches[0].offsetY=z,y.touches[0].layerX=y.touches[0].pageX,y.touches[0].layerY=y.touches[0].pageY}}function u(y){var C=y;y.type==="touchstart"&&(f(y),y.touches.length>0&&(C=y.touches[0]));var E=v(this,C);E.clickedOn>=0&&(y.type==="touchstart"||y.button===0)&&this.selectables[E.clickedOn]&&(this.dragTarget=this.selectables[E.clickedOn],this.dragIndex=E.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:E.x,y:E.y},this.dragging&&this.dragTarget.isDraggable&&(O(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function h(y){var C=y;if(y.type==="touchmove"&&(f(y),y.touches.length>0&&(C=y.touches[0])),this.lastTouchMove=y,!(!this.dragTarget||!this.dragging||!this.dragTarget.isDraggable||this.dragMechanism!=="mouse"||!this.dragMouseStart)){var E=v(this,C),z=Math.round((E.y-this.dragMouseStart.y)/e.STEP);z!==this.dragYStep&&(this.dragYStep=z,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+z*e.STEP+")"))}}function c(y){var C=y;y.type==="touchend"&&this.lastTouchMove&&(f(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(C=this.lastTouchMove.touches[0])),this.dragTarget&&(g.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),b.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,C),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),P(this.renderer.svg,"abcjs-dragging-in-progress"))}function m(y){y>=0&&y<this.selectables.length&&(this.dragTarget=this.selectables[y],this.dragIndex=y,this.dragMechanism="keyboard",c.bind(this)({target:this.dragTarget.svgEl}))}function b(y,C,E,z,A){for(var R=r(y,A),T=R.classes,I=R.analysis,N=0;N<this.listeners.length;N++)this.listeners[N](y.absEl.abcelem,y.absEl.tuneNumber,T.join(" "),I,{step:C,max:E,index:z,setSelection:m.bind(this)},A)}function g(){for(var y=0;y<this.selected.length;y++)this.selected[y].unhighlight(void 0,this.renderer.foregroundColor);this.selected=[]}function w(y,C){g.bind(this)();for(var E=0;E<this.staffgroups.length;E++)for(var z=this.staffgroups[E].voices,A=0;A<z.length;A++)for(var R=z[A].children,T=0;T<R.length;T++){var I=R[T].abcelem.startChar,N=R[T].abcelem.endChar;(C>I&&y<N||C===y&&C===N)&&(this.selected[this.selected.length]=R[T],R[T].highlight(void 0,this.selectionColor))}}function k(y){var C=y.getAttribute("class");C||(C="");for(var E=C.split(" "),z={},A=0;A<E.length;A++)z[E[A]]=!0;return z}function $(y,C){var E=[];for(var z in C)C.hasOwnProperty(z)&&E.push(z);y.setAttribute("class",E.join(" "))}function O(y,C){if(y){var E=k(y.svg);E[C]=!0,$(y.svg,E)}}function P(y,C){if(y){var E=k(y.svg);delete E[C],$(y.svg,E)}}return gs=n,gs}var bs,Gf;function Iu(){if(Gf)return bs;Gf=1;function e(r,n,i,t,a){return n+(t-n)/(i-r)*(a-r)}return bs=e,bs}var ys,Jf;function s$(){if(Jf)return ys;Jf=1;var e=Nt(),r=pt(),n=Iu(),i=function(f){if(!(f.elems.length===0||f.allrests)){var u=o(f.stemsUp,f.isgrace),h=f.elems[0],c=f.elems[f.elems.length-1],m=0,b=f.stemsUp?h.abcelem.maxpitch:h.abcelem.minpitch;m=a(h,f.stemsUp,b,m),m=a(c,f.stemsUp,b,m),m=Math.max(f.stemHeight,m+3);var g=d(f.average,f.elems.length,m,f.stemsUp,h.abcelem.averagepitch,c.abcelem.averagepitch,f.isflat,f.min,f.max,f.isgrace),w=l(f.stemsUp,h,c);f.addBeam({startX:w[0],endX:w[1],startY:g[0],endY:g[1],dy:u});for(var k=v(f.elems,f.stemsUp,f.beams[0],f.isgrace,u),$=0;$<k.length;$++)f.addBeam(k[$]);p(f.elems,f.stemsUp,f.beams[0],u,f.mainNote)}},t=function(f){return f===void 0?0:Math.floor(Math.log(f)/Math.log(2))};function a(f,u,h,c){if(!f.children)return c;for(var m=0;m<f.children.length;m++){var b=f.children[m];u&&b.top!==void 0&&b.c==="flags.ugrace"?c=Math.max(c,b.top-h):!u&&b.bottom!==void 0&&b.c==="flags.ugrace"&&(c=Math.max(c,h-b.bottom+7))}return c}function s(f,u,h,c){if(c)return 0;var m=f-u,b=h/2;return m>b&&(m=b),m<-b&&(m=-b),m}function o(f,u){var h=f?r.STEP:-r.STEP;return u&&(h=h*.4),h}function l(f,u,h){var c=u.heads[f?0:u.heads.length-1],m=h.heads[f?0:h.heads.length-1],b=c.x;f&&(b+=c.w-.6);var g=m.x;return g+=f?m.w:.6,[b,g]}function d(f,u,h,c,m,b,g,w,k,$){var O=h-2,P=h-2,y=Math.round(c?Math.max(f+O,k+P):Math.min(f-O,w-P)),C=s(m,b,u,g),E=y+Math.floor(C/2),z=y+Math.floor(-C/2);return $||(c&&y<6||!c&&y>6)&&(E=6,z=6),[E,z]}function p(f,u,h,c,m){for(var b=0;b<f.length;b++){var g=f[b];if(!g.abcelem.rest){var w=!g.addExtra,k=w?m:g,$=g.heads[u?0:g.heads.length-1],O=1/5,P=$.pitch+(u?O:-O),y=u?$.w:0;w||(y+=$.dx);var C=$.x+y,E=n(h.startX,h.startY,h.endX,h.endY,C),z=u?-.6:.6;u||(E-=c/2/r.STEP),w&&(y+=g.heads[0].dx),$.c==="noteheads.slash.quarter"&&(u?P+=1:P-=1);var A=new e(null,y,0,P,{type:"stem",pitch2:E,linewidth:z});A.setX(k.x),k.addRight(A)}}}function v(f,u,h,c,m){for(var b=[],g=[],w=0;w<f.length;w++){var k=f[w];if(!k.abcelem.rest){var $=k.heads[u?0:k.heads.length-1],O=$.x+(u?$.w:0),P=n(h.startX,h.startY,h.endX,h.endY,O),y=u?-1.5:1.5;c&&(y=y*2/3);var C=k.abcelem.duration;C===0&&(C=.25);for(var E=t(C);E<-3;E++){var z=-4-E;if(g[z]?g[z].single=!1:g[z]={x:O+(u?-.6:0),y:P+y*(z+1),durlog:E,single:!0},w>0&&k.abcelem.beambr&&k.abcelem.beambr<=z+1){g[z].split||(g[z].split=[g[z].x]);var A=l(u,f[w-1],k);g[z].split[g[z].split.length-1]>=A[0]&&(A[0]+=k.w),g[z].split.push(A[0]),g[z].split.push(A[1])}}for(var R=g.length-1;R>=0;R--)if(w===f.length-1||t(f[w+1].abcelem.duration)>-R-4){var T=O,I=P+y*(R+1);g[R].single&&(w===0?T=O+5:w===f.length-1?T=O-5:f[w-1].duration===f[w+1].duration?T=w%2===0?O+5:O-5:T=f[w-1].duration>f[w+1].duration?O+5:O-5,I=n(h.startX,h.startY,h.endX,h.endY,T)+y*(R+1));var N={startX:g[R].x,endX:T,startY:g[R].y,endY:I,dy:m};if(g[R].split!==void 0){var D=g[R].split;N.endX<=D[D.length-1]&&(D[D.length-1]-=k.w),D.push(N.endX),N.split=g[R].split}b.push(N),g=g.slice(0,R)}}}return b}return ys=i,ys}var _s,Wf;function o$(){if(Wf)return _s;Wf=1;var e=Iu();function r(a){if(a.anchor1&&a.anchor2){a.hasBeam=!!a.anchor1.parent.beam&&a.anchor1.parent.beam===a.anchor2.parent.beam;var s=a.anchor1.parent.beam;if(a.hasBeam&&(s.elems[0]!==a.anchor1.parent||s.elems[s.elems.length-1]!==a.anchor2.parent)&&(a.hasBeam=!1),a.hasBeam){var o=n(s)?a.anchor1.x+a.anchor1.w:a.anchor1.x;a.yTextPos=i(o,a.anchor2.x,s),a.yTextPos+=n(s)?3:-2,a.xTextPos=t(o,a.anchor2.x),a.top=a.yTextPos+1,a.bottom=a.yTextPos-2,n(s)&&(a.endingHeightAbove=4)}else{a.startNote=Math.max(a.anchor1.parent.top,9)+4,a.endNote=Math.max(a.anchor2.parent.top,9)+4,a.anchor1.parent.type==="rest"&&a.anchor2.parent.type!=="rest"?a.startNote=a.endNote:a.anchor2.parent.type==="rest"&&a.anchor1.parent.type!=="rest"&&(a.endNote=a.startNote);for(var l=0,d=0;d<a.middleElems.length;d++)l=Math.max(l,a.middleElems[d].top);l+=4,(l>a.startNote||l>a.endNote)&&(a.startNote=l,a.endNote=l),a.flatBeams&&(a.startNote=Math.max(a.startNote,a.endNote),a.endNote=Math.max(a.startNote,a.endNote)),a.yTextPos=a.startNote+(a.endNote-a.startNote)/2,a.xTextPos=a.anchor1.x+(a.anchor2.x+a.anchor2.w-a.anchor1.x)/2,a.top=a.yTextPos+1}}delete a.middleElems,delete a.flatBeams}function n(a){return a.stemsUp}function i(a,s,o){if(o.beams.length===0)return 0;o=o.beams[0];var l=a+(s-a)/2;return e(o.startX,o.startY,o.endX,o.endY,l)}function t(a,s){return a+(s-a)/2}return _s=r,_s}var ws,Yf;function c$(){if(Yf)return ws;Yf=1;var e=s$(),r=Iu(),n=o$(),i=function(p){for(var v=0;v<p.beams.length;v++)if(p.beams[v].type==="BeamElem"){e(p.beams[v]),t(p.beams[v]);for(var f=0;f<p.beams[v].elems.length;f++)p.adjustRange(p.beams[v].elems[f])}for(p.staff.specialY.chordLines=s(p.children),v=0;v<p.otherchildren.length;v++){var u=p.otherchildren[v];u.type==="TripletElem"&&(n(u),p.adjustRange(u))}p.staff.top=Math.max(p.staff.top,p.top),p.staff.bottom=Math.min(p.staff.bottom,p.bottom)};function t(p){for(var v=1.5,f=0;f<p.elems.length;f++){var u=p.elems[f];if(u.top)for(var h=d(u,p),c=0;c<u.children.length;c++){var m=u.children[c];if(m.klass==="ornament"&&m.position!=="below"&&m.bottom-v<h){var b=h-m.bottom+v;m.bottom+=b,m.top+=b,m.pitch+=b,h=u.top=m.top}}}}function a(p,v){var f=v.getChordDim();if(f){for(var u=0;u<p.length;u++){var h=p[u]<f.left;if(h){u>0&&v.putChordInLane(u),p[u]=f.right;return}}p.push(f.right),v.putChordInLane(p.length-1)}}function s(p){var v=[0],f=[0],u,h,c;for(u=0;u<p.length;u++){for(h=0;h<p[u].children.length;h++)c=p[u].children[h],c.chordHeightAbove&&a(v,c);for(h=p[u].children.length-1;h>=0;h--)c=p[u].children[h],c.chordHeightBelow&&a(f,c)}return(v.length>1||f.length>1)&&l(p,v.length,f.length),{above:v.length,below:f.length}}function o(p){for(var v=0,f=0;f<p.children.length;f++){var u=p.children[f];u.chordHeightBelow&&v++}return v}function l(p,v,f){for(var u=0;u<p.length;u++){o(p[u]);for(var h=0;h<p[u].children.length;h++){var c=p[u].children[h];c.chordHeightAbove&&c.invertLane(v)}}}function d(p,v){return v=v.beams[0],r(v.startX,v.startY,v.endX,v.endY,p.x)}return ws=i,ws}var ks,Vf;function u$(){if(Vf)return ks;Vf=1;var e=pt(),r=function(v,f){for(var u,h=0;h<f.staffs.length;h++){var c=f.staffs[h],m={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(v.showDebug&&v.showDebug.indexOf("box")>=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),i(c,m,"lyricHeightAbove"),i(c,m,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+n,m.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+n,m.dynamicHeightAbove=c.top,m.volumeHeightAbove=c.top):(i(c,m,"dynamicHeightAbove"),i(c,m,"volumeHeightAbove")),i(c,m,"partHeightAbove"),i(c,m,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=v.spacing.vocal/e.STEP,m.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+n),c.specialY.chordHeightBelow){m.chordHeightBelow=c.bottom;var b=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(b*=c.specialY.chordLines.below),c.bottom-=b+n}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(m.volumeHeightBelow=c.bottom,m.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+n):c.specialY.volumeHeightBelow?(m.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+n):c.specialY.dynamicHeightBelow&&(m.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+n),v.showDebug&&v.showDebug.indexOf("box")>=0&&(c.positionY=m);for(var g=0;g<c.voices.length;g++){var w=f.voices[c.voices[g]];t(m,w,v.spacing)}if(u!==void 0){var k=c.top-10,$=u+k,O=v.spacing.systemStaffSeparation/e.STEP,P=O-$;P>0&&(c.top+=P)}c.top+=v.spacing.staffTopMargin/e.STEP,u=2-c.bottom}},n=1;function i(v,f,u,h){if(v.specialY[u]){var c=v.specialY[u];h&&(c*=h),v.top+=c+n,f[u]=v.top}}function t(v,f,u){var h,c;for(h=0;h<f.children.length;h++)c=f.children[h],a(v,c,u);for(h=0;h<f.otherchildren.length;h++)switch(c=f.otherchildren[h],c.type){case"CrescendoElem":s(v,c);break;case"DynamicDecoration":o(v,c);break;case"EndingElem":l(v,c);break;case"TieElem":var m=c.getYBounds();f.staff.top=Math.max(f.staff.top,m[0]),f.staff.top=Math.max(f.staff.top,m[1]),f.staff.bottom=Math.min(f.staff.bottom,m[0]),f.staff.bottom=Math.min(f.staff.bottom,m[1]);break}}function a(v,f,u){for(var h=0;h<f.children.length;h++){var c=f.children[h];for(var m in f.specialY)f.specialY.hasOwnProperty(m)&&c[m]&&(c.pitch=v[m],c.top===void 0&&(c.type==="TempoElement"?d(v,c):p(v,c,u),f.pushTop(c.top),f.pushBottom(c.bottom)))}}function s(v,f){f.dynamicHeightAbove?f.pitch=v.dynamicHeightAbove:f.pitch=v.dynamicHeightBelow}function o(v,f){f.volumeHeightAbove?f.pitch=v.volumeHeightAbove:f.pitch=v.volumeHeightBelow}function l(v,f){f.pitch=v.endingHeightAbove-2}function d(v,f){if(f.pitch=v.tempoHeightAbove,f.top=v.tempoHeightAbove,f.bottom=v.tempoHeightAbove,f.note){var u=f.pitch-f.totalHeightInPitches+1;f.note.top=u,f.note.bottom=u;for(var h=0;h<f.note.children.length;h++){var c=f.note.children[h];c.top+=u,c.bottom+=u,c.pitch+=u,c.pitch2!==void 0&&(c.pitch2+=u)}}}function p(v,f,u){switch(f.type){case"part":f.top=v.partHeightAbove+f.height,f.bottom=v.partHeightAbove;break;case"text":case"chord":f.chordHeightAbove?(f.top=v.chordHeightAbove,f.bottom=v.chordHeightAbove):(f.top=v.chordHeightBelow,f.bottom=v.chordHeightBelow);break;case"lyric":f.lyricHeightAbove?(f.top=v.lyricHeightAbove,f.bottom=v.lyricHeightAbove):(f.top=v.lyricHeightBelow+u.vocal/e.STEP,f.bottom=v.lyricHeightBelow+u.vocal/e.STEP,f.pitch-=u.vocal/e.STEP);break;case"debug":f.top=v.chordHeightAbove,f.bottom=v.chordHeightAbove;break}(f.pitch===void 0||f.top===void 0)&&console.error("RelativeElement position not set.",f.type,f.pitch,f.top,v)}return ks=r,ks}var $s,Xf;function l$(){if(Xf)return $s;Xf=1;var e=function(){};e.beginLayout=function(i,t){t.i=0,t.durationindex=0,t.startx=i,t.minx=i,t.nextx=i,t.spacingduration=0},e.layoutEnded=function(i){return i.i>=i.children.length},e.getNextX=function(i){return Math.max(i.minx,i.nextx)},e.getSpacingUnits=function(i){return Math.sqrt(i.spacingduration*8)},e.layoutOneItem=function(i,t,a,s,o){var l=a.children[a.i];if(!l)return 0;var d=i-a.minx,p=a.durationindex+l.duration>0?s:0;if(l.abcelem.el_type==="note"&&!l.abcelem.rest&&a.voicenumber!==0&&o){var v=o.children[o.i],f=v&&(l.abcelem.maxpitch<=v.abcelem.maxpitch+1&&l.abcelem.maxpitch>=v.abcelem.minpitch-1||l.abcelem.minpitch<=v.abcelem.maxpitch+1&&l.abcelem.minpitch>=v.abcelem.minpitch-1);if(f&&l.abcelem.minpitch===v.abcelem.minpitch&&l.abcelem.maxpitch===v.abcelem.maxpitch&&v.heads&&v.heads.length>0&&l.heads&&l.heads.length>0&&v.heads[0].c===l.heads[0].c&&(f=!1),f){var u=v.heads&&v.heads.length>0?v.heads[0].realWidth:v.fixed.w;l.adjustedWidth||(l.adjustedWidth=u+l.w),l.w=l.adjustedWidth;for(var h=0;h<l.children.length;h++){var c=l.children[h];c.name.indexOf("accidental")<0&&(c.adjustedWidth||(c.adjustedWidth=c.dx+u),c.dx=c.adjustedWidth)}}}var m=r(l,p);return d<m&&(a.i===0||l.type!=="bar"||a.children[a.i-1].type!=="part"&&a.children[a.i-1].type!=="tempo")&&(i+=m-d),l.setX(i),a.spacingduration=l.duration,a.minx=i+n(l),a.i!==a.children.length-1&&(a.minx+=l.minspacing),this.updateNextX(i,t,a),i},e.shiftRight=function(i,t){var a=t.children[t.i];a&&(a.setX(a.x+i),t.minx+=i,t.nextx+=i)},e.updateNextX=function(i,t,a){a.nextx=i+t*this.getSpacingUnits(a)},e.updateIndices=function(i){this.layoutEnded(i)||(i.durationindex+=i.children[i.i].duration,i.children[i.i].type==="bar"&&(i.durationindex=Math.round(i.durationindex*64)/64),i.i++)};function r(i,t){var a=0;return(i.type==="note"||i.type==="bar")&&(a=t),-i.extraw+a}function n(i){return i.w}return $s=e,$s}var xs,Kf;function f$(){if(Kf)return xs;Kf=1;var e=l$();function r(s){for(var o=0,l=0;l<s.length;l++){var d=s[l];if(d.children.length>0){var p=d.children.length-1,v=d.children[p];if(v.abcelem.el_type==="bar"){var f=v.children[0].x;f>o?o=f:v.children[0].x=o}}}}var n=function(s,o,l,d,p){var v=1e-7,f=0,u=1e3,h=p;d.startx=h;var c,m=0;for(l&&console.log("init layout",s),c=0;c<d.voices.length;c++)e.beginLayout(h,d.voices[c]);for(var b=0;!i(d.voices);){for(m=null,c=0;c<d.voices.length;c++)!e.layoutEnded(d.voices[c])&&(!m||t(d.voices[c])<m)&&(m=t(d.voices[c]));var g=[],w=[];for(c=0;c<d.voices.length;c++){var k=t(d.voices[c]);k-m>v?w.push(d.voices[c]):g.push(d.voices[c])}b=0;var $=0;for(c=0;c<g.length;c++)e.getNextX(g[c])>h&&(h=e.getNextX(g[c]),b=e.getSpacingUnits(g[c]),$=g[c].spacingduration);f+=b,u=Math.min(u,b),l&&console.log("currentduration: ",m,f,u);var O=void 0;for(c=0;c<g.length;c++){var P=g[c];P.voicenumber===0&&(O=c);var y=O!==void 0&&g[O].voicenumber!==P.voicenumber?g[O]:void 0;a(P,y)||(y=void 0);var C=e.layoutOneItem(h,s,P,o,y),E=C-h;if(E>0){h=C;for(var z=0;z<c;z++)e.shiftRight(E,g[z])}}for(c=0;c<w.length;c++)w[c].spacingduration-=$,e.updateNextX(h,s,w[c]);for(c=0;c<g.length;c++){var A=g[c];e.updateIndices(A)}}for(c=0;c<d.voices.length;c++)e.getNextX(d.voices[c])>h&&(h=e.getNextX(d.voices[c]),b=e.getSpacingUnits(d.voices[c]));return r(d.voices),f+=b,d.setWidth(h),{spacingUnits:f,minSpace:u}};function i(s){for(var o=0;o<s.length;o++)if(!e.layoutEnded(s[o]))return!1;return!0}function t(s){return s.durationindex-(s.children[s.i]&&s.children[s.i].duration>0?0:5e-7)}function a(s,o){return!s||!s.staff||!s.staff.voices||s.staff.voices.length===0||!o||!o.staff||!o.staff.voices||o.staff.voices.length===0?!1:s.staff.voices[0]===o.staff.voices[0]}return xs=n,xs}var Ss,Qf;function _b(){if(Qf)return Ss;Qf=1;function e(t,a,s,o,l){var d=t.padding.left,p=0,v,f;for(v=0;v<s.length;v++)s[v].header&&(f=a.calc(s[v].header,"voicefont",""),p=Math.max(p,f.width));if(p=r(p,o,a),p=r(p,l,a),p){var u=a.calc("A","voicefont","");p+=u.width}d+=p;var h=0;return h=n(o,d,h),h=n(l,d,h),d+h}function r(t,a,s){if(a){for(var o=0;o<a.length;o++)if(a[o].header){var l=s.calc(a[o].header,"voicefont","");t=Math.max(t,l.width)}}return t}function n(t,a,s){if(t)for(var o=0;o<t.length;o++)i(a,t[o]),s=Math.max(s,t[o].getWidth());return s}function i(t,a){a.x=t}return Ss=e,Ss}var Is,ed;function d$(){if(ed)return Is;ed=1;var e=_b();function r(i,t,a){var s=e(i,t.getTextSize,t.voices,t.brace,t.bracket),o=n(t,a.minPadding),l=o.totalDuration,d=o.minSpacing,p=d*l;a.minWidth&&(p=Math.max(p,a.minWidth));var v=a.minPadding?a.minPadding/2:2;t.startx=s,t.w=p+s;for(var f=0;f<t.voices.length;f++){var u=t.voices[f];u.startx=s,u.w=p+s;for(var h=s,c=!1,m=0,b=0;b<u.children.length;b++){var g=u.children[b];c||(g.duration!==0?(c=!0,m=(p+s-h)/l,t.gridStart=h):(g.x=h,h+=g.w+g.minspacing)),c&&(a.align==="center"?g.x=h+g.duration*m/2-g.w/2:g.duration===0?g.x=h+1-g.w:g.x=h+v-g.extraw,h+=g.duration*m);for(var w=0;w<g.children.length;w++){var k=g.children[w],$=k.dx?k.dx:0;k.x=g.x+$}}t.gridEnd=h}return p}function n(i,t){for(var a=0,s=0,o=0;o<i.voices.length;o++){for(var l=0,d=i.voices[o],p=0;p<d.children.length;p++){var v=d.children[p];if(l+=v.duration,v.duration){var f=(v.w+t)/v.duration;a=Math.max(a,f)}}s=Math.max(s,l)}return{totalDuration:s,minSpacing:a}}return Is=r,Is}var Ts,td;function h$(){if(td)return Ts;td=1;var e=c$(),r=u$(),n=f$(),i=_b(),t=d$(),a=function(d,p,v,f,u,h){var c,m,b=v;for(c=0;c<p.lines.length;c++)if(m=p.lines[c],m.staff){var g;h!==void 0?g=t(d,m.staffGroup,h):g=s(d,b,f,m.staffGroup,p.formatting,c===p.lines.length-1,!1),Math.round(g)>Math.round(b)&&(b=g,u&&(c=-1))}for(c=0;c<p.lines.length;c++)if(m=p.lines[c],m.staffGroup&&m.staffGroup.voices){for(var w=0;w<m.staffGroup.voices.length;w++)e(m.staffGroup.voices[w]);r(d,m.staffGroup)}for(c=0;c<p.lines.length;c++)m=p.lines[c],m.staffGroup&&m.staffGroup.setHeight();return b},s=function(d,p,v,f,u,h,c){for(var m=i(d,f.getTextSize,f.voices,f.brace,f.bracket),b=v,g=0;g<8;g++){var w=n(b,d.minPadding,c,f,m);if(b=o(h,u.stretchlast,p+d.padding.left,f.w,b,w.spacingUnits,w.minSpace,d.padding.left+d.padding.right),b===null)break}return l(f.voices),f.w-m};function o(d,p,v,f,u,h,c,m){if(d)if(p===void 0){if(f/v<.66)return null}else{var b=1-(f+m)/v,g=b<p;if(!g)return null}if(Math.abs(v-f)<2)return null;var w=h*u,k=f-w;return h>0?(u=(v-k)/h,u*c>50&&(u=50/c),u):null}function l(d){for(var p=0;p<d.length;p++)for(var v=d[p],f=1;f<v.children.length-1;f++){var u=v.children[f];if(u.abcelem.rest&&(u.abcelem.rest.type==="whole"||u.abcelem.rest.type==="multimeasure")){var h=v.children[f-1],c=v.children[f+1];u.center(h,c)}}}return Ts=a,Ts}var Cs,rd;function p$(){if(rd)return Cs;rd=1;var e=function(n){this.shouldAddClasses=n.shouldAddClasses,this.reset()};return e.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null},e.prototype.incrLine=function(){this.lineNumber===null?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},e.prototype.incrVoice=function(){this.voiceNumber===null?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},e.prototype.isInMeasure=function(){return this.measureNumber!==null},e.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null},e.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},e.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},e.prototype.incrNote=function(){this.noteNumber++},e.prototype.measureTotal=function(){for(var r=0,n=0;n<this.lineNumber;n++)r+=this.measureTotalPerLine[n]?this.measureTotalPerLine[n]:0;return this.measureNumber&&(r+=this.measureNumber),r},e.prototype.getCurrent=function(r){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}},e.prototype.generate=function(r){if(!this.shouldAddClasses)return"";var n=[];if(r&&r.length>0&&n.push(r),r==="abcjs-tab-number")return n.join(" ");if(r==="text instrument-name")return"abcjs-text abcjs-instrument-name";if(this.lineNumber!==null&&n.push("l"+this.lineNumber),this.measureNumber!==null&&n.push("m"+this.measureNumber),this.measureNumber!==null&&n.push("mm"+this.measureTotal()),this.voiceNumber!==null&&n.push("v"+this.voiceNumber),r&&(r.indexOf("note")>=0||r.indexOf("rest")>=0||r.indexOf("lyric")>=0)&&this.noteNumber!==null&&n.push("n"+this.noteNumber),n.length>0){n=n.join(" "),n=n.split(" ");for(var i=0;i<n.length;i++)n[i].indexOf("abcjs-")!==0&&n[i].length>0&&(n[i]="abcjs-"+n[i])}return n.join(" ")},Cs=e,Cs}var zs,nd;function v$(){if(nd)return zs;nd=1;var e=function(n,i){this.formatting=n,this.classes=i};return e.prototype.updateFonts=function(r){r.gchordfont&&(this.formatting.gchordfont=r.gchordfont),r.tripletfont&&(this.formatting.tripletfont=r.tripletfont),r.annotationfont&&(this.formatting.annotationfont=r.annotationfont),r.vocalfont&&(this.formatting.vocalfont=r.vocalfont)},e.prototype.getFamily=function(r){return r[0]==='"'&&r[r.length-1]==='"'?r.substring(1,r.length-1):r},e.prototype.calc=function(r,n){var i;typeof r=="string"?(i=this.formatting[r],i?i={face:i.face,size:Math.round(i.size*4/3),decoration:i.decoration,style:i.style,weight:i.weight,box:i.box}:i={face:"Arial",size:Math.round(48/3),decoration:"underline",style:"normal",weight:"normal"}):i={face:r.face,size:Math.round(r.size*4/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box};var t=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;i.padding=i.size*t;var a={"font-size":i.size,"font-style":i.style,"font-family":this.getFamily(i.face),"font-weight":i.weight,"text-decoration":i.decoration,class:this.classes.generate(n)};return{font:i,attr:a}},zs=e,zs}var Es,id;function m$(){if(id)return Es;id=1;var e=function(n,i){this.getFontAndAttr=n,this.svg=i};return e.prototype.updateFonts=function(r){this.getFontAndAttr.updateFonts(r)},e.prototype.attr=function(r,n){return this.getFontAndAttr.calc(r,n)},e.prototype.getFamily=function(r){return r[0]==='"'&&r[r.length-1]==='"'?r.substring(1,r.length-1):r},e.prototype.calc=function(r,n,i,t){var a;typeof n=="string"?a=this.attr(n,i):a={font:{face:n.face,size:n.size,decoration:n.decoration,style:n.style,weight:n.weight},attr:{"font-size":n.size,"font-style":n.style,"font-family":this.getFamily(n.face),"font-weight":n.weight,"text-decoration":n.decoration,class:this.getFontAndAttr.classes.generate(i)}};var s=this.svg.getTextSize(r,a.attr,t);return a.font.box?{height:s.height+a.font.padding*4,width:s.width+a.font.padding*4}:s},e.prototype.baselineToCenter=function(r,n,i,t,a){var s=this.calc(r,n,i).height,o=this.attr(n,i).font.size;return s*.5+(a-t-2)*o},Es=e,Es}var Ns,ad;function lr(){if(ad)return Ns;ad=1;var e=function(){for(var r=0,n,i=arguments[r++],t=[],a,s,o,l;i;){if(a=/^[^\x25]+/.exec(i))t.push(a[0]);else if(a=/^\x25{2}/.exec(i))t.push("%");else if(a=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(i)){if((n=arguments[a[1]||r++])==null||n==null)throw"Too few arguments.";if(/[^s]/.test(a[7])&&typeof n!="number")throw"Expecting number but found "+typeof n;switch(a[7]){case"b":n=n.toString(2);break;case"c":n=String.fromCharCode(n);break;case"d":n=parseInt(n);break;case"e":n=a[6]?n.toExponential(a[6]):n.toExponential();break;case"f":n=a[6]?parseFloat(n).toFixed(a[6]):parseFloat(n);break;case"o":n=n.toString(8);break;case"s":n=(n=String(n))&&a[6]?n.substring(0,a[6]):n;break;case"u":n=Math.abs(n);break;case"x":n=n.toString(16);break;case"X":n=n.toString(16).toUpperCase();break}n=/[def]/.test(a[7])&&a[2]&&n>0?"+"+n:n,o=a[3]?a[3]=="0"?"0":a[3][1]:" ",l=a[5]-String(n).length,s=a[5]?str_repeat(o,l):"",t.push(a[4]?n+s:s+n)}else throw"Huh ?!";i=i.substring(a[0].length)}return t.join("")};return Ns=e,Ns}var As,sd;function At(){if(sd)return As;sd=1;function e(r){return parseFloat(r.toFixed(2))}return As=e,As}var Ps,od;function Vt(){if(od)return Ps;od=1;var e=At();function r(n,i,t){var a=i.y;if(i.phrases){var d=n.paper.richTextLine(i.phrases,i.x,i.y,i.klass,i.anchor);return d}if(i.lane){var s=i.dim.font.size*.25;a+=(i.dim.font.size+s)*i.lane}var o;i.dim?(o=i.dim,o.attr.class=i.klass):o=n.controller.getFontAndAttr.calc(i.type,i.klass),i.anchor&&(o.attr["text-anchor"]=i.anchor),i["dominant-baseline"]&&(o.attr["dominant-baseline"]=i["dominant-baseline"]),o.attr.x=i.x,o.attr.y=a,i.centerVertically||(o.attr.y+=o.font.size),i.type==="debugfont"&&(console.log("Debug msg: "+i.text),o.attr.stroke="#ff0000"),i.cursor&&(o.attr.cursor=i.cursor);var l;i.name==="free-text"?l=i.text.replace(/^[ \t]*\n/gm,`
|
|
159
|
-
`):
|
|
95
|
+
`;var B=E.split(`
|
|
96
|
+
\\`);if(B.length>1){for(var O=1;O<B.length;O++)for(;B[O].length>0&&B[O][0]!==`
|
|
97
|
+
`;)B[O]=B[O].substr(1),B[O-1]+=" ";E=B.join(" ")}E=E.replace(/\\([ \t]*)(%.*)*\n/g,function(F,K,te){var V=te?Array(te.length+1).join(" "):"";return K+""+V+`
|
|
98
|
+
`});var w=E.split(`
|
|
99
|
+
`);e.last(w).length===0&&w.pop(),l=new r(w,y),R=new a(l,x,y,d,p),I=new n(l,x,y,d,p,R),T.print&&(d.media="print"),y.reset(),y.iChar=P,T.visualTranspose?(y.globalTranspose=parseInt(T.visualTranspose),y.globalTranspose===0?y.globalTranspose=void 0:p.setVisualTranspose(T.visualTranspose)):y.globalTranspose=void 0,T.lineBreaks&&(y.lineBreaks=T.lineBreaks),R.reset(l,x,y,d);try{T.format&&t.globalFormatting(T.format);for(var C=l.nextLine();C;){if(T.header_only&&y.is_in_header===!1||T.stop_on_warning&&y.warnings)throw"normal_abort";var S=y.is_in_header;N(C),S&&!y.is_in_header&&(p.setRunningFont("annotationfont",y.annotationfont),p.setRunningFont("gchordfont",y.gchordfont),p.setRunningFont("tripletfont",y.tripletfont),p.setRunningFont("vocalfont",y.vocalfont)),C=l.nextLine()}o&&b(p.getCurrentVoice(),""),h&&A(p.getCurrentVoice(),""),y.openSlurs=p.cleanUp(y.barsperstaff,y.staffnonote,y.openSlurs)}catch(F){if(F!=="normal_abort")throw F}var q=792,D=8.5*72;switch(y.papersize){case"legal":q=1008,D=8.5*72;break;case"A4":q=11.7*72,D=8.3*72;break}if(y.landscape){var $=q;q=D,D=$}if(d.formatting.pagewidth||(d.formatting.pagewidth=D),d.formatting.pageheight||(d.formatting.pageheight=q),T.hint_measures&&L(),i.wrapLines(d,y.lineBreaks,y.barNumbers),T.chordGrid)try{d.chordGrid=c(d)}catch(F){switch(F.message){case"notCommonTime":x("Chord grid only works for 2/2 and 4/4 time.",0,0);break;case"noChords":x("No chords are found in the tune.",0,0);break;default:x(F.message,0,0)}}}};return $r=g,$r}var Zr,Ji;function vg(){if(Ji)return Zr;Ji=1;var e=nt(),t=function(a){var n="",r=a.match(/(\s*)/);a=e.strip(a);for(var i=a.split(`
|
|
100
|
+
X:`),c=1;c<i.length;c++)i[c]="X:"+i[c];var u=r?r[0].length:0,f=[];if(i.forEach(function(l){f.push({abc:l,startPos:u}),u+=l.length+1}),f.length>1&&!e.startsWith(f[0].abc,"X:")){var g=f.shift(),d=g.abc.split(`
|
|
101
|
+
`);d.forEach(function(l){e.startsWith(l,"%%")&&(n+=l+`
|
|
102
|
+
`)})}var p=n;return f.forEach(function(l){var o=l.abc.indexOf(`
|
|
103
|
+
|
|
104
|
+
`);o>0&&(l.abc=l.abc.substring(0,o)),l.pure=l.abc,l.abc=n+l.abc,l.title="";var h=l.pure.split("T:");h.length>1&&(h=h[1].split(`
|
|
105
|
+
`),l.title=e.strip(h[0]));var s=l.pure.substring(2,l.pure.indexOf(`
|
|
106
|
+
`));l.id=e.strip(s)}),{header:p,tunes:f}};return Zr=t,Zr}var Gr,Qi;function mg(){if(Qi)return Gr;Qi=1;function e(t,a){this.numLines=t,this.lineSpace=a,this.verticalSize=this.numLines*this.lineSpace;var n=3;this.bar={pitch:n,pitch2:a*t,height:5}}return e.prototype.bypass=function(t){var a=t.staffGroup.voices;return!!(a.length>0&&a[0].isPercussion)},e.prototype.setRelative=function(t,a,n){switch(t.type){case"bar":a.pitch=this.bar.pitch,a.pitch2=this.bar.pitch2,a.height=this.height;break;case"symbol":var r=this.bar.pitch2/2;if(t.name=="dots.dot")return n?(a.pitch=r,!1):(a.pitch=r+this.lineSpace,!0);break}return n},Gr=e,Gr}var Ur,es;function Al(){if(es)return Ur;es=1;var e=function(a,n){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=a,this.voicetotal=n,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return e.prototype.addChild=function(t){if(t.type==="bar"){for(var a=!0,n=0;a&&n<this.children.length;n++)this.children[n].type.indexOf("staff-extra")<0&&this.children[n].type!=="tempo"&&(a=!1);a||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=t,this.setRange(t)},e.prototype.setLimit=function(t,a){var n=a.specialY;n||(n=a),n[t]&&(this.specialY[t]?this.specialY[t]=Math.max(this.specialY[t],n[t]):this.specialY[t]=n[t])},e.prototype.adjustRange=function(t){t.bottom!==void 0&&(this.bottom=Math.min(this.bottom,t.bottom)),t.top!==void 0&&(this.top=Math.max(this.top,t.top))},e.prototype.setRange=function(t){this.adjustRange(t),this.setLimit("tempoHeightAbove",t),this.setLimit("partHeightAbove",t),this.setLimit("volumeHeightAbove",t),this.setLimit("dynamicHeightAbove",t),this.setLimit("endingHeightAbove",t),this.setLimit("chordHeightAbove",t),this.setLimit("lyricHeightAbove",t),this.setLimit("lyricHeightBelow",t),this.setLimit("chordHeightBelow",t),this.setLimit("volumeHeightBelow",t),this.setLimit("dynamicHeightBelow",t)},e.prototype.addOther=function(t){this.otherchildren.push(t),this.setRange(t)},e.prototype.addBeam=function(t){this.beams.push(t)},e.prototype.setWidth=function(t){this.w=t},Ur=e,Ur}var jr,ts;function Ga(){if(ts)return jr;ts=1;var e=function(t,a,n,r){if(t)for(var i=0;i<t.length;i++){var c=t[i],u=c.getAttribute("highlight");u||(u="fill"),c.setAttribute(u,r);var f=c.getAttribute("class");f||(f=""),f=f.replace(n,""),f=f.replace(a,""),a.length>0&&(f.length>0&&f[f.length-1]!==" "&&(f+=" "),f+=a),c.setAttribute("class",f)}};return jr=e,jr}var Yr,rs;function Ml(){if(rs)return Yr;rs=1;var e=Ga(),t=function(a,n){a===void 0&&(a="abcjs-note_selected"),n===void 0&&(n="#ff0000"),e(this.elemset,a,"",n)};return Yr=t,Yr}var Wr,ns;function Nl(){if(ns)return Wr;ns=1;var e=Ga(),t=function(a,n){a===void 0&&(a="abcjs-note_selected"),n===void 0&&(n="#000000"),e(this.elemset,"",a,n)};return Wr=t,Wr}var Vr,as;function Pt(){if(as)return Vr;as=1;var e=Ml(),t=Nl(),a=function(r,i,c,u,f,g){g||(g={}),this.tuneNumber=f,this.abcelem=r,this.duration=i,this.durationClass=g.durationClassOveride?g.durationClassOveride:this.duration,this.minspacing=c||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=u,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return a.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},a.prototype.addExtra=function(n){this.fixed.w=Math.max(this.fixed.w,n.dx+n.w),this.fixed.t===void 0?this.fixed.t=n.top:this.fixed.t=Math.max(this.fixed.t,n.top),this.fixed.b===void 0?this.fixed.b=n.bottom:this.fixed.b=Math.min(this.fixed.b,n.bottom),n.dx<this.extraw&&(this.extraw=n.dx),this.extra[this.extra.length]=n,this._addChild(n)},a.prototype.addHead=function(n){n.dx<this.extraw&&(this.extraw=n.dx),this.heads[this.heads.length]=n,this.addRight(n)},a.prototype.addRight=function(n){this.fixed.w=Math.max(this.fixed.w,n.dx+n.w),n.top!==void 0&&(this.fixed.t===void 0?this.fixed.t=n.top:this.fixed.t=Math.max(this.fixed.t,n.top)),n.bottom!==void 0&&(this.fixed.b===void 0?this.fixed.b=n.bottom:this.fixed.b=Math.min(this.fixed.b,n.bottom)),n.dx+n.w>this.w&&(this.w=n.dx+n.w),this.right[this.right.length]=n,this._addChild(n)},a.prototype.addFixed=function(n){this._addChild(n)},a.prototype.addFixedX=function(n){this._addChild(n)},a.prototype.addCentered=function(n){var r=n.w/2;-r<this.extraw&&(this.extraw=-r),this.extra[this.extra.length]=n,n.dx+r>this.w&&(this.w=n.dx+r),this.right[this.right.length]=n,this._addChild(n)},a.prototype.setLimit=function(n,r){r[n]&&(this.specialY[n]?this.specialY[n]=Math.max(this.specialY[n],r[n]):this.specialY[n]=r[n])},a.prototype._addChild=function(n){var r=!0;this.abcelem.el_type=="clef"&&n.type=="barNumber"&&(r=!1),n.parent=this,this.children[this.children.length]=n,r&&this.pushTop(n.top),this.pushBottom(n.bottom),this.setLimit("tempoHeightAbove",n),this.setLimit("partHeightAbove",n),this.setLimit("volumeHeightAbove",n),this.setLimit("dynamicHeightAbove",n),this.setLimit("endingHeightAbove",n),this.setLimit("chordHeightAbove",n),this.setLimit("lyricHeightAbove",n),this.setLimit("lyricHeightBelow",n),this.setLimit("chordHeightBelow",n),this.setLimit("volumeHeightBelow",n),this.setLimit("dynamicHeightBelow",n)},a.prototype.pushTop=function(n){n!==void 0&&(this.top===void 0?this.top=n:this.top=Math.max(n,this.top))},a.prototype.pushBottom=function(n){n!==void 0&&(this.bottom===void 0?this.bottom=n:this.bottom=Math.min(n,this.bottom))},a.prototype.setX=function(n){this.x=n;for(var r=0;r<this.children.length;r++)this.children[r].setX(n)},a.prototype.center=function(n,r){var i=(r.x-n.x)/2+n.x;this.x=i-this.w/2;for(var c=0;c<this.children.length;c++)this.children[c].setX(this.x)},a.prototype.setHint=function(){this.hint=!0},a.prototype.highlight=function(n,r){e.bind(this)(n,r)},a.prototype.unhighlight=function(n,r){t.bind(this)(n,r)},Vr=a,Vr}var Xr,is;function at(){if(is)return Xr;is=1;var e=function(a,n,r,i,c){switch(c=c||{},this.x=0,this.c=a,this.dx=n,this.w=r,this.pitch=i,this.scalex=c.scalex||1,this.scaley=c.scaley||1,this.type=c.type||"symbol",this.pitch2=c.pitch2,this.linewidth=c.linewidth,this.klass=c.klass,this.anchor=c.anchor?c.anchor:"middle",this.top=i,this.pitch2!==void 0&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=i,this.pitch2!==void 0&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),c.thickness&&(this.top+=c.thickness/2,this.bottom-=c.thickness/2),c.stemHeight&&(c.stemHeight>0?this.top+=c.stemHeight:this.bottom+=c.stemHeight),c.dim&&(this.dim=c.dim),c.position&&(this.position=c.position),this.height=c.height?c.height:4,c.top&&(this.top=c.top),c.bottom&&(this.bottom=c.bottom),c.name?this.name=c.name:this.c?this.name=this.c:this.name=this.type,c.realWidth?this.realWidth=c.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":c.position&&c.position==="below"?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":c.position&&c.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":this.pitch===void 0?c.position&&c.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height;break}};return e.prototype.getChordDim=function(){if(this.type==="debug"||!this.chordHeightAbove&&!this.chordHeightBelow)return null;var t=0,a=this.type==="chord"?this.realWidth/2:0,n=this.x-a-t,r=n+this.realWidth+t;return{left:n,right:r}},e.prototype.invertLane=function(t){this.lane===void 0&&(this.lane=0),this.lane=t-this.lane-1},e.prototype.putChordInLane=function(t){this.lane=t,this.chordHeightAbove?this.chordHeightAbove=this.height*1.25*this.lane:this.chordHeightBelow=this.height*1.25*this.lane},e.prototype.getLane=function(){return this.lane===void 0?0:this.lane},e.prototype.setX=function(t){this.x=t+this.dx},Xr=e,Xr}var Kr,ss;function bg(){if(ss)return Kr;ss=1;var e=Pt(),t=at();function a(s){return s!=null&&s.constructor===Object}function n(s,v){for(var y in v)v.hasOwnProperty(y)&&(Array.isArray(v[y])||a(v[y])||(s[y]=v[y]))}function r(s){var v=new e("",0,0,"",0);return n(v,s),v.top=0,v.bottom=-1,s.abcelem&&(v.abcelem={},n(v.abcelem,s.abcelem),v.abcelem.el_type==="note"&&(v.abcelem.el_type="tabNumber")),s.cloned=v,v}function i(s,v){var y=r(s);if(v)for(var m=s.children,_=!0,k=0;k<m.length;k++){var x=m[k],R=new t("",0,0,0,"");n(R,x),_=v.tablature.setRelative(x,R,_),y.children.push(R)}return y}function c(s,v,y){var m="tab.tiny",_=7.5;s.isTabBig&&(m="tab.big",_=10);var k={el_type:"tab",icon:m,Ypos:_};if(_+=s.tabSymbolOffset,!s.hideTabSymbol){var x=new e(k,0,0,"symbol",0);x.x=v;var R=new t(m,0,0,7.5,"tab");R.x=y,x.children.push(R),x.abcelem.el_type=="tab"&&(R.pitch=_)}return x}function u(s){if(s.extra)for(var v=0;v<s.extra.length;v++){var y=s.extra[v];if(y.type=="lyric")return{bottom:y.bottom,height:y.height}}return null}function f(){this.accidentals=null}function g(s){for(var v=0,y=0;y<s.length;y++)s[y].tabNameInfos||v++;return v}function d(s,v,y,m,_){var k=m.num;m.note.quarter!=null&&(k=k.toString(),k+=m.note.quarter);var x=s.semantics.stringToPitch(m.str);y.notes.push({num:k,str:m.str,pitch:m.note.emit()});var R={type:"tabNumber"},I=new t(k,0,0,x+.3,R);return I.x=v,I.isGrace=_,I.isAltered=m.note.isAltered,I}function p(s,v){var y=0;if(s.extra){for(var m=0;m<s.extra.length;m++)if(s.extra[m].c.indexOf("noteheads")>=0){if(y===v)return s.extra[m].x+s.extra[m].w/2;y++}}return-1}function l(s){if(s.abcelem){var v=s.abcelem;if(v.rest)return v.gracenotes}return null}function o(s,v,y){var m=s.semantics.notesToNumber(v,y);if(m.error)return s.setError(m.error),m;if(m.graces&&m.notes){var _=m.notes.length-1;m.notes[_].graces=m.graces}return m}function h(s,v,y,m,_){for(var k=0;k<m.length;k++){var x={el_type:"note",startChar:y.abcelem.startChar,endChar:y.abcelem.endChar,notes:[],grace:!0},R=p(y,k),I=m[k],b=d(s,R,x,I,!0);v.children.push(b),_.push(x)}}return f.prototype.build=function(s,v,y,m,_,k,x){g(v);var R=v[_+m],I=v[x],b=null,A=null;R.children[0].abcelem.el_type!="clef"&&k!="none"&&R.children.splice(0,0,k);for(var N=0;N<R.children.length;N++){var M=R.children[N],z=M.x,L=z;switch(M.isClef&&(I.children.push(c(s,z,L)),M.abcelem.type.indexOf("-8")>=0&&(s.semantics.clefTranspose=-12),M.abcelem.type.indexOf("+8")>=0&&(s.semantics.clefTranspose=12)),M.type){case"staff-extra key-signature":this.accidentals=M.abcelem.accidentals,s.semantics.accidentals=this.accidentals;break;case"bar":s.semantics.measureAccidentals={};var E=!1;N===R.children.length-1&&(E=!0);var T=i(M,s);if(T.abcelem.barNumber){delete T.abcelem.barNumber;for(var P=0;P<T.children.length;P++)if(T.children[P].type==="barNumber"){T.children.splice(P,1);break}}T.abcelem.lastBar=E,I.children.push(T),y.push({el_type:M.abcelem.el_type,type:M.abcelem.type,endChar:M.abcelem.endChar,startChar:M.abcelem.startChar,abselem:T});break;case"rest":var B=l(M);if(B){if(b=o(s,null,B),b.error)return;F={el_type:"note",startChar:M.abcelem.startChar,endChar:M.abcelem.endChar,notes:[],grace:!0},h(s,O,M,b.graces,y)}break;case"note":var O=r(M);O.x=M.heads[0].x+M.heads[0].w/2,O.lyricDim=u(M);var w=M.abcelem.pitches,C=M.abcelem.gracenotes;if(O.type="tabNumber",b=o(s,w,C),b.error)return;if(b.graces){var S=b.notes.length-1;b.notes[S].graces=b.graces}A={el_type:"note",startChar:M.abcelem.startChar,endChar:M.abcelem.endChar,notes:[]};for(var q=0;q<b.notes.length;q++){var D=b.notes[q];if(D.graces)for(var $=0;$<D.graces.length;$++){var F={el_type:"note",startChar:M.abcelem.startChar,endChar:M.abcelem.endChar,notes:[],grace:!0},K=p(M,$),te=D.graces[$],V=d(s,K,F,te,!0);O.children.push(V),y.push(F)}var ae=d(s,O.x+M.heads[q].dx,A,D,!1);O.children.push(ae)}A.notes.length>0&&(A.abselem=O,y.push(A),I.children.push(O));break}}},Kr=f,Kr}var Jr,os;function yg(){if(os)return Jr;os=1;var e=Al(),t=bg(),a=Ve();function n(){return{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}}function r(s){for(var v=0,y=0;y<s.children.length;y++){var m=s.children[y];m.specialY&&m.specialY.lyricHeightBelow>v&&(v=m.specialY.lyricHeightBelow)}return v}function i(s,v,y){var m=s.semantics,_=v.controller.getTextSize,k=m.tabInfos(s),x=m.suppress(s),R=!0;if(x&&(R=!1),R){var I=_.calc(k,"tablabelfont","text instrumentname");return y.tabNameInfos={textSize:{height:I.height,width:I.width},name:k},I.height}return 0}function c(s,v){return v[s].isTabStaff?s===v.length-1?!0:!v[s+1].isTabStaff:!1}function u(s){for(var v=0,y=0;y<s.length;y++)s[y].isTabStaff||v++;return v}function f(s,v){for(var y=v;y>=0;y--)if(!s[y].isTabStaff)return y;return-1}function g(s){for(var v=0;v<s.length;v++)if(s[v].isTabStaff){var y=f(s,v);s[v].hasStaff=s[y],s[y].hasTab||(s[y].hasTab=[]),s[y].hasTab.push(s[v])}}function d(s,v){return u(s)===1&&v.voices.length>1}function p(s,v){for(var y=0,m=0,_=!0,k=0;_;){if(!v[y])return-1;if(v[y].isTabStaff||(k=v[y].voices.length),v[y].isTabStaff){if(m++,c(y,v)&&m<k)return y+1}else if(m=0,y>=s&&(y+1==v.length||!v[y+1].isTabStaff))return y+1;if(y++,y>v.length)return-1}}function l(s,v){for(var y=v;y>=0;y--)if(!s[y].isTabStaff)return s[y];return null}function o(s,v){var y=s[v],m=y.children[0].abcelem;return m.el_type==="clef"?null:v==0?"none":s[v-1].children[0]}function h(s,v,y,m){var _=new t,k={clef:{type:"TAB"}},x=s.linePitch*s.nbLines,R=y.staff;if(R){var I=R[0];if(I&&I.clef&&I.clef.stafflines==0){s.setError("No tablatures when stafflines=0");return}R.splice(R.length,0,k)}var b=y.staffGroup,A=b.voices,N=A[0],M=r(N),z=3,L=m,E=b.staffs[L],T=x+z-E.bottom-M;E.isTabStaff&&(T=E.top);var P={bottom:-1,isTabStaff:!0,specialY:n(),lines:s.nbLines,linePitch:s.linePitch,dy:.15,top:T},B=p(m,b.staffs);if(B!==-1){P.parentIndex=B-1,b.staffs.splice(B,0,P),b.height+=x+z;var O=l(b.staffs,B),w=1;d(b.staffs,O)&&(w=O.voices.length),k.voices=[];for(var C=0;C<w;C++){var S=new e(0,0);C>0&&(S.duplicate=!0);var q=i(s,v,S)/a.STEP;q=Math.max(q,1),b.staffs[m].top+=1,b.height+=q,S.staff=P;var D=A.length;A.splice(A.length,0,S);var $=o(A,C+m);k.voices[C]=[],_.build(s,A,k.voices[C],C,m,$,D)}g(b.staffs)}}return Jr=h,Jr}var Qr,cs;function Pl(){if(cs)return Qr;cs=1;var e={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},t=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];function a(r){var i=r.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(i&&i.length===5){var c=e[i[1]],u=t.indexOf(i[2]),f=i[4].length-i[3].length;return 48+u+c+f*12}return 0}function n(r){r=parseInt(r,10);var i=Math.floor(r/12),c=r%12,u=t[c];if(u==="-"&&(u="^"+t[c-1]),i>4)for(u=u.toLowerCase(),i-=5;i>0;)u+="'",i--;else for(;i<4;)u+=",",i++;return u}return Qr={noteToMidi:a,midiToNote:n},Qr}var e0,ls;function zl(){if(ls)return e0;ls=1;var{noteToMidi:e,midiToNote:t}=Pl();function a(r,i){var c=e(r);i&&(c+=i);var u=t(c),f=!1,g=!1,d=!1,p=null,l=null,o=!1,h=0;r.startsWith("_")?(f=!0,h=-1,r[1]=="/"?(f=!1,l="v",h=0):r[1]=="_"&&(o=!0,h-=1)):r.startsWith("^")?(g=!0,h=1,r[1]=="/"?(g=!1,l="^",h=0):r[1]=="^"&&(o=!0,h+=1)):r.startsWith("=")&&(p=!0,h=0),d=f||g||l!=null,(d||p)&&(l!=null||o?u=r.slice(2):u=r.slice(1));var s=(u.match(/,/g)||[]).length,v=(u.match(/'/g)||[]).length;this.pitch=c,this.pitchAltered=0,this.name=u,this.acc=h,this.isSharp=g,this.isKeySharp=!1,this.isDouble=o,this.isAltered=d,this.isFlat=f,this.isKeyFlat=!1,this.natural=p,this.quarter=l,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=s,this.isQuoted=v}function n(r){var i=r.name,c=new a(i);return c.pitch=r.pitch,c.hasComma=r.hasComma,c.isLower=r.isLower,c.isQuoted=r.isQuoted,c.isSharp=r.isSharp,c.isKeySharp=r.isKeySharp,c.isFlat=r.isFlat,c.isKeyFlat=r.isKeyFlat,c}return a.prototype.sameNoteAs=function(r){return r.pitch===this.pitch},a.prototype.isLowerThan=function(r){return r.pitch>this.pitch},a.prototype.checkKeyAccidentals=function(r,i){if(!(this.isAltered||this.natural)){if(i[this.name.toUpperCase()])switch(i[this.name.toUpperCase()]){case"__":this.acc=-2,this.pitchAltered=-2;return;case"_":this.acc=-1,this.pitchAltered=-1;return;case"=":this.acc=0,this.pitchAltered=0;return;case"^":this.acc=1,this.pitchAltered=1;return;case"^^":this.acc=2,this.pitchAltered=2;return}else if(r)for(var c=this.name,u=0;u<r.length;u++){var f=r[u];c==f.note.toUpperCase()&&(f.acc=="flat"&&(this.acc=-1,this.isKeyFlat=!0,this.pitchAltered=-1),f.acc=="sharp"&&(this.acc=1,this.isKeySharp=!0,this.pitchAltered=1))}}},a.prototype.getAccidentalEquiv=function(){var r=n(this);return r.isSharp||r.isKeySharp?(r=r.nextNote(),r.isFlat=!0,r.isSharp=!1,r.isKeySharp=!1):(r.isFlat||r.isKeyFlat)&&(r=r.prevNote(),r.isSharp=!0,r.isFlat=!1,r.isKeyFlat=!1),r},a.prototype.nextNote=function(){var r=t(this.pitch+1+this.pitchAltered);return new a(r)},a.prototype.prevNote=function(){var r=t(this.pitch-1+this.pitchAltered);return new a(r)},a.prototype.emitNoAccidentals=function(){var r=this.name;this.isLower&&(r=r.toLowerCase());for(var i=0;i<this.isQuoted;i++)r+="'";for(var c=0;c<this.hasComma;c++)r+=",";return r},a.prototype.emit=function(){var r=this.name;(this.isSharp||this.isKeySharp)&&(r="^"+r,this.isDouble&&(r="^"+r)),(this.isFlat||this.isKeyFlat)&&(r="_"+r,this.isDouble&&(r="_"+r)),this.quarter&&(this.quarter=="^"?r="^/"+r:r="_/"+r),this.natural&&(r="="+r);for(var i=1;i<=this.hasComma;i++)r+=",";if(this.isLower){r=r.toLowerCase();for(var c=1;c<=this.isQuoted;c++)r+="'"}return r},e0=a,e0}var t0,us;function wg(){if(us)return t0;us=1;var e=zl(),t=["A","B","C","D","E","F","G"];function a(n,r){var i=new e(n),c=new e(r);if(c.isLowerThan(i)){var u=i.emit(),f=c.emit();return{error:"Invalid string Instrument tuning : "+f+" string lower than "+u+" string"}}var g=[],d=t.indexOf(i.name),p=t.indexOf(c.name);if(d==-1||p==-1)return g;for(var l=!1;!l;)g.push(i.emit()),i=i.nextNote(),i.sameNoteAs(c)&&(l=!0);return g}return t0=a,t0}var r0,hs;function _g(){if(hs)return r0;hs=1;const{noteToMidi:e}=Pl();var t=zl(),a=wg();function n(l){var o=null,h=l.tuning;if(l.capo>0){o=[];for(var s=0;s<h.length;s++){for(var v=new t(h[s]),y=0;y<l.capo;y++)v=v.nextNote();o[s]=v.emit()}}return o}function r(l){var o=[],h=l.tuning;l.capo>0&&(h=l.capoTuning);for(var s=h.length-1,v=0;v<h.length;v++){var y=l.highestNote;v!=h.length-1&&(y=h[v+1]);var m=a(h[v],y);if(m.error)return m;o[s--]=m}return o}function i(l){var o=[];o[0]=[];for(var h=l.strings,s=1;s<h.length;s++)o[s]=h[s-1];return o}function c(l,o){for(var h=0;h<o.length-1;h++){var s=o[h],v=o[h+1];if(s.str==v.str){if(s.str==l.strings.length-1){s.num="?",v.num="?";return}v.num<s.num?(v.str++,v=f(l,v.note,v.str,l.secondPos,l.strings[v.str].length)):(s.str++,s=f(l,s.note,s.str,l.secondPos,l.strings[s.str].length)),o[h]=s,o[h+1]=v}}return null}function u(l,o){for(var h=[],s=0;s<o.length;s++)if(!o[s].endTie){var v=new t(o[s].name,l.clefTranspose);v.checkKeyAccidentals(l.accidentals,l.measureAccidentals);var y=g(l,v);h.push(y)}return c(l,h),h}function f(l,o,h,s,v){var y=l.strings;o.checkKeyAccidentals(l.accidentals,l.measureAccidentals),s&&(y=s);var m=o.emitNoAccidentals(),_=y[h].indexOf(m),k=o.acc;if(_!=-1){if(s&&(_+=v),(o.isFlat||o.acc==-1)&&_==0){var x=o.getAccidentalEquiv();h++,_=y[h].indexOf(x.emit()),k=0}return{num:_+k,str:h,note:o}}return null}function g(l,o){if(o.isAltered||o.natural){var h;o.isFlat?o.isDouble?h="__":h="_":o.isSharp?o.isDouble?h="^^":h="^":o.natural&&(h="="),l.measureAccidentals[o.name.toUpperCase()]=h}for(var s=l.stringPitches.length-1;s>=0;s--)if(o.pitch+o.pitchAltered>=l.stringPitches[s]){var v=o.pitch+o.pitchAltered-l.stringPitches[s];return o.quarter==="^"?v-=.5:o.quarter==="v"&&(v+=.5),{num:Math.round(v),str:l.stringPitches.length-1-s,note:o}}return{num:"?",str:l.stringPitches.length-1,note:o}}p.prototype.stringToPitch=function(l){var o=5.3,h=this.strings.length-1;return o+(h-l)*this.linePitch};function d(l,o){var h={num:"?",str:0,note:o};l.push(h),l.error=o.emit()+": unexpected note for instrument"}p.prototype.notesToNumber=function(l,o){var h,s,v=null,y=null;if(l&&(y=[],l.length>1?(y=u(this,l),y.error&&(v=y.error)):l[0].endTie||(h=new t(l[0].name,this.clefTranspose),h.checkKeyAccidentals(this.accidentals,this.measureAccidentals),s=g(this,h),s?y.push(s):(d(y,h),v=y.error))),v)return y;var m=null;if(o){m=[];for(var _=0;_<o.length;_++)h=new t(o[_].name,this.clefTranspose),h.checkKeyAccidentals(this.accidentals,this.measureAccidentals),s=g(this,h),s?m.push(s):(d(m,h),v=y.error)}return{notes:y,graces:m,error:v}},p.prototype.toString=function(){for(var l=[],o=0;o<this.tuning.length;o++){var h=this.tuning[o].replaceAll(",","").replaceAll("'","").toUpperCase();h[0]==="_"?h=h[1]+"b ":h[0]==="^"&&(h=h[1]+"# "),l.push(h)}return l.join("")},p.prototype.tabInfos=function(l){var o=l.params.label;if(o){var h=o.indexOf("%T"),s="";return h!=-1&&(s=this.toString(),l.capo>0&&(s+=" capo:"+l.capo),o=o.replace("%T",s)),o}return""},p.prototype.suppress=function(l){var o=l.params.suppress;return!!o};function p(l){var o=l.tuning,h=l.capo,s=l.params.highestNote;this.linePitch=l.linePitch,this.highestNote="a'",s&&(this.highestNote=s),this.measureAccidentals={},this.capo=0,h&&(this.capo=parseInt(h,10)),this.transpose=l.transpose?l.transpose:0,this.tuning=o,this.stringPitches=[];for(var v=0;v<this.tuning.length;v++){var y=e(this.tuning[v])+this.capo;this.stringPitches.push(y)}if(this.capo>0&&(this.capoTuning=n(this)),this.strings=r(this),this.strings.error){l.setError(this.strings.error),l.inError=!0;return}this.secondPos=i(this)}return r0=p,r0}var n0,fs;function kg(){if(fs)return n0;fs=1;var e=mg(),t=yg(),a=_g();n.prototype.init=function(i,c,u,f){this.tune=i,this.params=u,this.tuneNumber=c,this.inError=!1,this.abcTune=i,this.linePitch=3,this.nbLines=f.defaultTuning.length,this.isTabBig=f.isTabBig,this.tabSymbolOffset=f.tabSymbolOffset,this.capo=u.capo,this.transpose=u.visualTranspose,this.hideTabSymbol=u.hideTabSymbol,this.tablature=new e(this.nbLines,this.linePitch);var g=u.tuning;g||(g=f.defaultTuning),this.tuning=g,this.semantics=new a(this)},n.prototype.setError=function(i){i&&(this.error=i,this.inError=!0,this.tune.warnings?this.tune.warnings.push(i):this.tune.warnings=[i])},n.prototype.render=function(i,c,u){this.inError||this.tablature.bypass(c)||t(this,i,c,u)};function n(){}var r=function(){return{name:"StringTab",tablature:n}};return n0=r,n0}var a0,ds;function Il(){if(ds)return a0;ds=1;var e=kg(),t={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},a={inited:!1,plugins:{},register:function(n){var r=n.name,i=n.tablature;this.plugins[r]=i},setError:function(n,r){n.warnings?n.warning.push(r):n.warnings=[r]},preparePlugins:function(n,r,i){this.inited||(this.register(new e),this.inited=!0);var c=null;if(i.tablature){var u=i.tablature;c=[];for(var f=0;f<u.length;f++){var g=u[f],d=g.instrument;if(d==null)return this.setError(n,"tablature 'instrument' is missing"),c;var p=t[d],l=null;if(p&&(l=this.plugins[p.name]),l){i.visualTranspose!=0&&(g.visualTranspose=i.visualTranspose),g.abcSrc=i.tablature.abcSrc;var o={classz:l,tuneNumber:r,params:g,instance:null,tabType:p};c.push(o)}else if(d==="")c.push(null);else return this.setError(n,"Undefined tablature plugin: "+d),c}}return c},layoutTablatures:function(r,i){var c=i.tablatures,u=0;if(c&&c.length>0)for(var f=c.length,g=0;g<f;++g)c[g]&&c[g].params.firstStaffOnly&&(c[g].params.suppress=!1);for(var d=0;d<i.lines.length;d++){var p=i.lines[d];if(p.staff&&u++,u>1&&c&&c.length>0)for(var f=c.length,g=0;g<f;++g)c[g].params.firstStaffOnly&&(c[g].params.suppress=!0);var l=p.staff;if(l){for(var o=l.length,h=0;h<l.length;h++)if(c[h]&&h<o){var s=c[h];s.instance==null&&(s.instance=new s.classz,s.instance.init(i,s.tuneNumber,s.params,s.tabType)),s.instance.render(r,p,h)}}}}};return a0=a,a0}var i0,ps;function fr(){if(ps)return i0;ps=1;var e=El(),t=vg(),a=Il(),n={};return(function(){n.numberOfTunes=function(i){var c=i.split(`
|
|
107
|
+
X:`),u=c.length;return u===0&&(u=1),u};var r=n.TuneBook=function(i){var c=t(i);this.header=c.header,this.tunes=c.tunes};r.prototype.getTuneById=function(i){for(var c=0;c<this.tunes.length;c++)if(this.tunes[c].id===""+i)return this.tunes[c];return null},r.prototype.getTuneByTitle=function(i){for(var c=0;c<this.tunes.length;c++)if(this.tunes[c].title===i)return this.tunes[c];return null},n.parseOnly=function(i,c){for(var u=n.numberOfTunes(i),f=[],g=0;g<u;g++)f.push(1);function d(){}return n.renderEngine(d,f,i,c)},n.renderEngine=function(i,c,u,f){var g=[],d=function(_){return _&&!_.propertyIsEnumerable("length")&&typeof _=="object"&&typeof _.length=="number"};if(!(c===void 0||u===void 0)){d(c)||(c=[c]),f===void 0&&(f={});for(var p=f.startingTune?parseInt(f.startingTune,10):0,l=new r(u),o=new e,h=0;h<c.length;h++){var s=c[h];if(s==="*"||typeof s=="string"&&(s=document.getElementById(s)),s)if(p>=0&&p<l.tunes.length){o.parse(l.tunes[p].abc,f,l.tunes[p].startPos-l.header.length);var v=o.getTune();f.tablature&&(v.tablatures=a.preparePlugins(v,p,f));var y=o.getWarnings();y&&(v.warnings=y);var m=i(s,v,h,l.tunes[p].abc);g.push(m||v)}else s.innerHTML&&(s.innerHTML="");p++}return g}},n.extractMeasures=function(i){for(var c=[],u=new r(i),f=0;f<u.tunes.length;f++){for(var g=u.tunes[f],d=g.abc.split("K:"),p=d[1].split(`
|
|
108
|
+
`),l=d[0]+"K:"+p[0]+`
|
|
109
|
+
`,o=null,h=null,s=null,v=[],y=!1,m=n.parseOnly(g.abc)[0],_=m.getPickupLength()>0,k=0;k<m.lines.length;k++){var x=m.lines[k];if(x.staff)for(var R=0;R<1;R++)for(var I=x.staff[R],b=0;b<1;b++)for(var A=I.voices[b],N=0;N<A.length;N++){var M=A[N];if(s===null&&M.startChar>=0&&(s=M.startChar,M.chord===void 0?h=o:h=null),M.chord&&(o=M),M.el_type==="bar"){if(y){var z=g.abc.substring(s,M.endChar),L={abc:z};o=h&&h.chord&&h.chord.length>0?h.chord[0].name:null,o&&(L.lastChord=o),M.startEnding&&(L.startEnding=M.startEnding),M.endEnding&&(L.endEnding=M.endEnding),v.push(L),s=null,y=!1}}else M.el_type==="note"&&(y=!0)}}c.push({header:l,measures:v,hasPickup:_})}return c}})(),i0=n,i0}var s0,gs;function xg(){if(gs)return s0;gs=1;var e=_l(),{relativeMajor:t,transposeKey:a,relativeMode:n,isLegalMode:r}=wl(),i=yl(),c;return(function(){c=function(b,A,N){if(A==="TEST")return{keyAccidentals:e,relativeMajor:t,transposeKey:a,relativeMode:n,transposeChordName:i};N=parseInt(N,10);var M=[],z;for(z=0;z<A.length;z++)M=M.concat(u(b,A[z],N));M=M.sort(function(T,P){return P.start-T.start});var L=b.split("");for(z=0;z<M.length;z++){var E=M[z];L.splice(E.start,E.end-E.start,E.note)}return L.join("")};function u(b,A,N){var M=[],z=A.getKeySignature();if(z.root==="Hp"||z.root==="HP")return M;M=M.concat(f(b,N));for(var L=0;L<A.lines.length;L++){var E=A.lines[L].staff;if(E)for(var T=0;T<E.length;T++){var P=E[T];P.clef.type!=="perc"&&(M=M.concat(g(b,P.voices,P.key,N)))}}return M}function f(b,A){for(var N=[],M=b.split("K:"),z=M[0].length,L=1;L<M.length;L++){var E=M[L],T=E.match(/^( *)([A-G])([#b]?)( ?)(\w*)/);if(T){var P=z+2+T[1].length,B=r(T[5])?T[5]:"",O=T[2]+T[3]+T[4]+B,w=s({root:T[2],acc:T[3],mode:B},A),C=w.root+w.acc+T[4]+w.mode;N.push({start:P,end:P+O.length,note:C})}z+=E.length+2}return N}function g(b,A,N,M){for(var z=[],L=s(N,M),E=0;E<A.length;E++)z=z.concat(l(b,A[E],N.root,d(N),L,M));return z}function d(b){for(var A={},N=0;N<b.accidentals.length;N++){var M=b.accidentals[N];M.acc==="flat"?A[M.note.toUpperCase()]="_":M.acc==="sharp"&&(A[M.note.toUpperCase()]="^")}return A}function p(b,A,N){var M=o.indexOf(b.root)-o.indexOf(A);return A==="none"&&(M=o.indexOf(b.root)),M===0?N>2?M+=7:N===-12&&(M-=7):N>0&&M<0?M+=7:N<0&&M>0&&(M-=7),N>12?M+=7:N<-12&&(M-=7),M}function l(b,A,N,M,z,L){for(var E=[],T=p(z,N,L),P={},B={},O=0;O<A.length;O++){var w=A[O];if(w.chord)for(var C=0;C<w.chord.length;C++){var S=w.chord[C];if(S.position==="default"){var q=z.accidentals.length&&z.accidentals[0].acc==="flat",D=i(S.name,L,q,!0);D=D.replace(/♭/g,"b").replace(/♯/g,"#"),D!==S.name&&E.push(R(b,w.startChar,w.endChar,D))}}if(w.el_type==="note"&&w.pitches){for(var $=k(b,w.startChar,w.endChar),F=0;F<$.length;F++){var K=_($[F].note,N,M,P);K.acc&&(P[K.name.toUpperCase()]=K.acc);var te=v(K,z,T,B);te.acc&&(B[te.upper]=te.acc),E.push({note:te.acc+te.name,start:$[F].index,end:$[F].index+$[F].note.length})}if(w.gracenotes)for(var V=0;V<w.gracenotes.length;V++){var ae=_(w.gracenotes[V].name,N,M,P);ae.acc&&(P[ae.name.toUpperCase()]=ae.acc);var oe=v(ae,z,T,P);oe.acc&&(B[oe.upper]=oe.acc),E.push(x(b,w.startChar,w.endChar,oe.acc+oe.name,V))}}else w.el_type==="bar"?(P={},B={}):w.el_type==="keySignature"&&(N=w.root,M=d(w),z=s(w,L),T=p(z,N,L))}return E}var o="CDEFGAB",h=[",,,,",",,,",",,",",","","'","''","'''","''''"];function s(b,A){if(b.root==="none")return{root:a("C",A),mode:"",acc:"",accidentals:[]};var N=t(b.root+b.acc+b.mode),M=a(N,A),z=n(M,b.mode),L=e(M);return{root:z[0],mode:b.mode,acc:z.length>1?z[1]:"",accidentals:L}}function v(b,A,N,M){for(var z=b.pitch,L=o.indexOf(b.name),E=o.indexOf(A.root),T=(E+z)%7,P=L+N,B=b.oct;P>6;)B++,P-=7;for(;P<0;)B--,P+=7;for(var O=o[T],w="",C=b.adj,S="=",q=0;q<A.accidentals.length;q++)if(A.accidentals[q].note.toLowerCase()===O.toLowerCase()){C=C+(A.accidentals[q].acc==="flat"?-1:1),S=A.accidentals[q].acc==="flat"?"_":"^";break}var D;switch(C){case-2:w="__";break;case-1:w="_";break;case 0:w="=";break;case 1:w="^";break;case 2:w="^^";break;case-3:return D={},D.pitch=b.pitch-1,D.oct=b.oct,D.name=o[o.indexOf(b.name)-1],D.name||(D.name="B",D.oct--),D.name==="B"||D.name==="E"?D.adj=b.adj+1:D.adj=b.adj+2,v(D,A,N+1,M);case 3:return D={},D.pitch=b.pitch+1,D.oct=b.oct,D.name=o[o.indexOf(b.name)+1],D.name||(D.name="C",D.oct++),D.name==="C"||D.name==="F"?D.adj=b.adj-1:D.adj=b.adj-2,v(D,A,N+1,M)}switch((M[O]===w||!M[O]&&w===S)&&!b.courtesy&&(w=""),B){case 0:O=O+",,,";break;case 1:O=O+",,";break;case 2:O=O+",";break;case 4:O=O.toLowerCase();break;case 5:O=O.toLowerCase()+"'";break;case 6:O=O.toLowerCase()+"''";break;case 7:O=O.toLowerCase()+"'''";break;case 8:O=O.toLowerCase()+"''''";break}return B>4&&(O=O.toLowerCase()),{acc:w,name:O,upper:O.toUpperCase()}}var y=/([_^=]*)([A-Ga-g])([,']*)/,m=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/;function _(b,A,N,M){var z=A==="none"?0:o.indexOf(A),L=b.match(y),E=L[2].toUpperCase(),T=o.indexOf(E)-z;T<0&&(T+=7);var P=h.indexOf(L[3]);E===L[2]&&P--;var B=M[E]||N[E]||"=";return{acc:L[1],name:E,pitch:T,oct:P,adj:I(L[1],N[E],M[E]),courtesy:L[1]===B}}function k(b,A,N){for(var M=b.substring(A,N),z,L=[],E=/("[^"]+")+/g;(z=E.exec(M))!==null;)L.push({start:E.lastIndex-z[0].length,end:E.lastIndex});for(var T=/(![^!]+!)+/g;(z=T.exec(M))!==null;)L.push({start:T.lastIndex-z[0].length,end:T.lastIndex});for(var P=[],B=/([_^=]*)([A-Ga-g])([,']*)/g;(z=B.exec(M))!==null;){for(var O=!1,w=0;w<L.length;w++)B.lastIndex>=L[w].start&&B.lastIndex<=L[w].end&&(O=!0);O||P.push({note:z[0],index:A+B.lastIndex-z[0].length})}return P}function x(b,A,N,M,z){var L=b.substring(A,N),E=/\{/,T=/\}/,P=/([^\{]*)/,B=/(\/*)/,O=L.match(new RegExp(P.source+E.source+B.source+m.source+B.source+m.source+B.source+m.source+B.source+m.source+B.source+m.source+B.source+m.source+B.source+m.source+B.source+m.source+T.source));if(O){for(var w=1+O[1].length,C=0;C<z;C++)O[C*3+2]&&(w+=O[C*3+2].length),O[C*3+3]&&(w+=O[C*3+3].length),O[C*3+4]&&(w+=O[C*3+4].length),O[C*3+5]&&(w+=O[C*3+5].length);O[z*3+2]&&(w+=O[C*3+2].length),A+=w;var S=O[z*3+3]?O[z*3+3].length:0;S+=O[z*3+4]?O[z*3+4].length:0,S+=O[z*3+5]?O[z*3+5].length:0,N=A+S}return{start:A,end:N,note:M}}function R(b,A,N,M){var z=b.substring(A,N).match(/([^"]+)?(".+")+/);return z[1]&&(A+=z[1].length),N=A+z[2].length,{start:A+1,end:N-1,note:M}}function I(b,A,N){if(!b&&N&&(b=N),!b)return 0;switch(A){case void 0:switch(b){case"__":return-2;case"_":return-1;case"=":return 0;case"^":return 1;case"^^":return 2;default:return 0}case"_":switch(b){case"__":return-1;case"_":return 0;case"=":return 1;case"^":return 2;case"^^":return 3;default:return 0}case"^":switch(b){case"__":return-3;case"_":return-2;case"=":return-1;case"^":return 0;case"^^":return 1;default:return 0}}return 0}})(),s0=c,s0}var o0,vs;function Cg(){if(vs)return o0;vs=1;var e=function(n,r,i,c){this.type="BeamElem",this.isflat=!!i,this.isgrace=!!(r&&r==="grace"),this.forceup=!!(this.isgrace||r&&r==="up"),this.forcedown=!!(r&&r==="down"),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=n,this.beams=[],c&&c.duration?(this.duration=c.duration,c.startTriplet&&(this.duration*=c.tripletMultiplier),this.duration=Math.round(this.duration*1e3)/1e3):this.duration=0};e.prototype.setHint=function(){this.hint=!0},e.prototype.runningDirection=function(a){var n=a.averagepitch;n!==void 0&&(this.total=Math.round(this.total+n),this.count||(this.count=0),this.count++)},e.prototype.add=function(a){var n=a.abcelem.averagepitch;n!==void 0&&(a.abcelem.rest||(this.allrests=!1),a.beam=this,this.elems.push(a),this.total=Math.round(this.total+n),(this.min===void 0||a.abcelem.minpitch<this.min)&&(this.min=a.abcelem.minpitch),(this.max===void 0||a.abcelem.maxpitch>this.max)&&(this.max=a.abcelem.maxpitch))},e.prototype.addBeam=function(a){this.beams.push(a)},e.prototype.setStemDirection=function(){if(this.average=t(this.total,this.count),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var a=6;this.stemsUp=this.average<a}delete this.count,this.total=0},e.prototype.calcDir=function(){if(this.average=t(this.total,this.elems.length),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var a=6;this.stemsUp=this.average<a}for(var n=this.stemsUp?"up":"down",r=0;r<this.elems.length;r++)for(var i=0;i<this.elems[r].heads.length;i++)this.elems[r].heads[i].stemDir=n};function t(a,n){return n?a/n:0}return o0=e,o0}var c0,ms;function Sg(){if(ms)return c0;ms=1;var e=function(a,n){this.startVoice=a,this.type=n};return e.prototype.setBottomStaff=function(t){this.endVoice=t,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},e.prototype.continuing=function(t){this.lastContinuedVoice=t},e.prototype.getWidth=function(){return 10},e.prototype.isStartVoice=function(t){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===t)},c0=e,c0}var l0,bs;function pt(){if(bs)return l0;bs=1;var e=Ve(),t={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"tab.big":{d:[["M",20.16,-21.66],["c",.24,-.09,.66,.09,.78,.36],["c",.09,.21,.09,.24,-.18,.54],["c",-.78,.81,-1.86,1.44,-2.94,1.71],["c",-.87,.24,-1.71,.24,-2.55,.03],["l",-.06,-.03],["l",-.18,.99],["c",-.33,1.98,-.75,4.26,-.96,5.04],["c",-.42,1.65,-1.26,3.18,-2.28,4.14],["c",-.57,.57,-1.17,.9,-1.86,1.08],["c",-.18,.06,-.33,.06,-.66,.06],["c",-.54,0,-.78,-.03,-1.23,-.27],["c",-.39,-.18,-.66,-.39,-1.38,-.99],["c",-.3,-.24,-.66,-.51,-.75,-.57],["c",-.21,-.15,-.27,-.24,-.24,-.45],["c",.06,-.27,.36,-.6,.6,-.66],["c",.18,-.03,.33,.06,.9,.57],["c",.48,.42,.72,.57,.93,.69],["c",.66,.33,1.38,.21,1.95,-.36],["c",.63,-.6,1.05,-1.62,1.23,-3],["c",.03,-.18,.09,-.66,.09,-1.11],["c",.09,-1.56,.33,-3.81,.57,-5.49],["c",.06,-.33,.09,-.63,.09,-.63],["c",-.03,-.03,-.81,-.12,-1.02,-.12],["c",-.57,0,-1.32,.12,-1.8,.33],["c",-.87,.3,-1.35,.78,-1.5,1.41],["c",-.18,.63,.09,1.26,.66,1.65],["c",.12,.06,.15,.12,.18,.24],["c",.09,.27,.06,.57,-.09,.75],["c",-.03,.06,-.12,.09,-.27,.15],["c",-.72,.21,-1.44,.15,-2.1,-.18],["c",-.54,-.27,-.96,-.66,-1.2,-1.14],["c",-.39,-.75,-.33,-1.74,.15,-2.52],["c",.27,-.42,.84,-.93,1.41,-1.23],["c",1.17,-.57,2.88,-.9,4.8,-.9],["c",.69,0,.78,0,1.08,.06],["c",.45,.09,1.11,.3,2.07,.6],["c",1.47,.48,1.83,.57,2.55,.54],["c",1.02,-.06,2.04,-.45,2.94,-1.11],["c",.12,-.09,.24,-.18,.27,-.18],["z"],["m",-5.88,13.05],["c",.21,-.03,.81,0,1.08,.06],["c",.48,.12,.9,.42,.99,.69],["c",.03,.09,.03,.15,0,.27],["c",0,.09,-.03,.57,-.06,1.08],["c",-.09,2.19,-.24,5.76,-.39,8.28],["c",-.06,1.53,-.06,1.77,.03,2.01],["c",.09,.18,.15,.24,.3,.3],["c",.24,.12,.54,.06,1.23,-.27],["c",.57,-.27,.66,-.3,.75,-.24],["c",.09,.06,.18,.3,.18,.45],["c",0,.33,-.15,.51,-.45,.63],["c",-.12,.03,-.39,.15,-.6,.27],["c",-1.17,.6,-1.38,.69,-1.8,.72],["c",-.45,.03,-.78,-.09,-1.08,-.39],["c",-.39,-.42,-.66,-1.2,-1.02,-3.12],["c",-.24,-1.23,-.36,-2.07,-.54,-3.75],["l",0,-.18],["l",-.36,.45],["c",-.6,.75,-1.32,1.59,-1.95,2.25],["c",-.15,.18,-.27,.3,-.27,.33],["c",0,0,.06,.09,.15,.18],["c",.24,.33,.6,.57,1.05,.69],["c",.18,.06,.3,.06,.69,.06],["l",.48,.03],["l",.06,.12],["c",.15,.27,.03,.72,-.21,.9],["c",-.18,.12,-.93,.27,-1.41,.27],["c",-.84,0,-1.59,-.3,-1.98,-.84],["l",-.12,-.15],["l",-.45,.42],["c",-.99,.87,-1.53,1.32,-2.16,1.74],["c",-.78,.51,-1.5,.84,-2.1,.93],["c",-.69,.12,-1.2,.03,-1.95,-.42],["c",-.21,-.12,-.51,-.27,-.66,-.36],["c",-.24,-.12,-.3,-.18,-.33,-.24],["c",-.12,-.27,.15,-.78,.45,-.93],["c",.24,-.12,.33,-.09,.9,.18],["c",.6,.3,.84,.39,1.2,.36],["c",.87,-.09,1.77,-.69,3.24,-2.31],["c",2.67,-2.85,4.59,-5.94,5.7,-9.15],["c",.15,-.45,.24,-.63,.42,-.81],["c",.21,-.24,.6,-.45,.99,-.51],["z"],["m",-3.99,16.05],["c",.18,0,.69,-.03,1.17,0],["c",3.27,.03,5.37,.75,6,2.07],["c",.45,.99,.12,2.4,-.81,3.42],["c",-.24,.27,-.57,.57,-.84,.75],["c",-.09,.06,-.18,.09,-.18,.12],["c",0,0,.18,.03,.42,.09],["c",1.23,.3,2.01,.81,2.37,1.59],["c",.27,.54,.3,1.32,.09,2.1],["c",-.12,.36,-.45,1.05,-.69,1.35],["c",-.87,1.17,-2.1,1.92,-3.54,2.25],["c",-.36,.06,-.48,.06,-.96,.06],["c",-.45,0,-.66,0,-.84,-.03],["c",-.84,-.18,-1.47,-.51,-2.07,-1.11],["c",-.33,-.33,-.45,-.51,-.45,-.63],["c",0,-.06,.03,-.15,.06,-.24],["c",.18,-.33,.69,-.6,.93,-.48],["c",.03,.03,.15,.12,.27,.24],["c",.39,.42,.99,.57,1.62,.45],["c",1.05,-.21,1.98,-1.02,2.31,-2.01],["c",.48,-1.53,-.48,-2.55,-2.58,-2.67],["c",-.21,0,-.36,-.03,-.42,-.06],["c",-.15,-.09,-.21,-.51,-.06,-.78],["c",.12,-.27,.24,-.33,.6,-.36],["c",.57,-.06,1.11,-.42,1.5,-.99],["c",.48,-.72,.54,-1.59,.18,-2.31],["c",-.12,-.21,-.45,-.54,-.69,-.69],["c",-.33,-.21,-.93,-.45,-1.35,-.51],["l",-.12,-.03],["l",-.06,.48],["c",-.54,2.94,-1.14,6.24,-1.29,6.75],["c",-.33,1.35,-.93,2.61,-1.65,3.6],["c",-.3,.36,-.81,.9,-1.14,1.14],["c",-.3,.24,-.84,.48,-1.14,.57],["c",-.33,.09,-.96,.09,-1.26,.03],["c",-.45,-.12,-.87,-.39,-1.53,-.96],["c",-.24,-.15,-.51,-.39,-.63,-.48],["c",-.3,-.21,-.33,-.33,-.21,-.63],["c",.12,-.18,.27,-.36,.42,-.45],["c",.27,-.12,.36,-.09,.87,.33],["c",.78,.6,1.08,.75,1.65,.72],["c",.45,-.03,.81,-.21,1.17,-.54],["c",.87,-.9,1.38,-2.85,1.38,-5.37],["c",0,-.6,.03,-1.11,.12,-2.04],["c",.06,-.69,.24,-2.01,.33,-2.58],["c",.06,-.24,.06,-.42,.06,-.42],["c",0,0,-.12,.03,-.21,.09],["c",-1.44,.57,-2.16,1.65,-1.74,2.55],["c",.09,.15,.18,.24,.27,.33],["c",.24,.21,.3,.27,.33,.39],["c",.06,.24,0,.63,-.15,.78],["c",-.09,.12,-.54,.21,-.96,.24],["c",-1.02,.03,-2.01,-.48,-2.43,-1.32],["c",-.21,-.45,-.27,-.9,-.15,-1.44],["c",.06,-.27,.21,-.66,.39,-.93],["c",.87,-1.29,3,-2.22,5.64,-2.43],["z"]],w:19.643,h:43.325},"tab.tiny":{d:[["M",16.02,-17.25],["c",.12,-.09,.15,-.09,.27,-.09],["c",.21,.03,.51,.3,.51,.45],["c",0,.06,-.12,.18,-.3,.36],["c",-1.11,1.08,-2.55,1.59,-3.84,1.41],["c",-.15,-.03,-.33,-.06,-.39,-.09],["c",-.06,-.03,-.09,-.03,-.12,-.03],["c",0,0,-.06,.42,-.15,.93],["c",-.33,2.01,-.66,3.69,-.84,4.26],["c",-.42,1.41,-1.23,2.67,-2.16,3.33],["c",-.27,.18,-.75,.42,-.99,.48],["c",-.3,.09,-.72,.09,-1.02,.06],["c",-.45,-.09,-.84,-.33,-1.53,-.9],["c",-.21,-.18,-.51,-.39,-.63,-.48],["c",-.27,-.21,-.3,-.24,-.3,-.36],["c",0,-.12,.09,-.36,.18,-.45],["c",.09,-.09,.27,-.18,.36,-.18],["c",.12,0,.3,.12,.66,.45],["c",.57,.51,.87,.69,1.23,.72],["c",.93,.06,1.68,-.78,1.98,-2.37],["c",.09,-.39,.15,-.75,.18,-1.53],["c",.06,-.99,.24,-2.79,.42,-4.05],["c",.03,-.3,.06,-.57,.06,-.6],["c",0,-.06,-.03,-.09,-.15,-.12],["c",-.9,-.18,-2.13,.06,-2.76,.57],["c",-.36,.3,-.51,.6,-.51,1.02],["c",0,.45,.15,.75,.48,.99],["c",.06,.06,.15,.18,.18,.24],["c",.12,.24,.03,.63,-.15,.69],["c",-.24,.12,-.6,.15,-.9,.15],["c",-.36,-.03,-.57,-.09,-.87,-.24],["c",-.78,-.36,-1.23,-1.11,-1.2,-1.92],["c",.12,-1.53,1.74,-2.49,4.62,-2.7],["c",1.2,-.09,1.47,-.03,3.33,.57],["c",.9,.3,1.14,.36,1.56,.39],["c",.45,0,.93,-.06,1.38,-.21],["c",.51,-.18,.81,-.33,1.41,-.75],["z"],["m",-4.68,10.38],["c",.39,-.06,.84,0,1.2,.15],["c",.24,.12,.36,.21,.45,.36],["l",.09,.09],["l",-.06,1.41],["c",-.09,2.19,-.18,3.96,-.27,5.49],["c",-.03,.78,-.06,1.59,-.06,1.86],["c",0,.42,0,.48,.06,.57],["c",.06,.18,.18,.24,.36,.27],["c",.18,0,.39,-.06,.84,-.27],["c",.45,-.21,.54,-.24,.63,-.18],["c",.12,.12,.15,.54,.03,.69],["c",-.03,.03,-.15,.12,-.27,.18],["c",-.15,.03,-.3,.12,-.36,.15],["c",-.87,.45,-1.02,.51,-1.26,.57],["c",-.33,.09,-.6,.06,-.84,-.06],["c",-.42,-.18,-.63,-.6,-.87,-1.44],["c",-.3,-1.23,-.57,-2.97,-.66,-4.08],["c",0,-.18,-.03,-.3,-.03,-.33],["l",-.06,.06],["c",-.18,.27,-1.11,1.38,-1.68,2.01],["l",-.33,.33],["l",.06,.09],["c",.06,.15,.27,.33,.48,.42],["c",.27,.18,.51,.24,.96,.27],["l",.39,0],["l",.03,.12],["c",.12,.21,.03,.57,-.15,.69],["c",-.03,.03,-.21,.09,-.36,.15],["c",-.27,.06,-.39,.06,-.75,.06],["c",-.48,0,-.75,-.03,-1.08,-.21],["c",-.21,-.12,-.51,-.36,-.57,-.48],["l",-.03,-.09],["l",-.39,.36],["c",-1.47,1.35,-2.49,1.98,-3.42,2.13],["c",-.54,.09,-.96,-.03,-1.62,-.39],["c",-.21,-.15,-.45,-.27,-.54,-.3],["c",-.18,-.09,-.21,-.21,-.12,-.45],["c",.06,-.27,.33,-.48,.54,-.48],["c",.03,0,.27,.09,.48,.21],["c",.48,.24,.69,.27,.99,.27],["c",.6,-.06,1.17,-.42,2.1,-1.35],["c",2.22,-2.22,4.02,-4.98,4.95,-7.59],["c",.21,-.57,.3,-.78,.48,-.93],["c",.15,-.15,.42,-.27,.66,-.33],["z"],["m",-3.06,12.84],["c",.27,-.03,1.68,0,2.01,.03],["c",1.92,.18,3.15,.69,3.63,1.5],["c",.18,.33,.24,.51,.21,.93],["c",0,.45,-.06,.72,-.24,1.11],["c",-.24,.51,-.69,1.02,-1.17,1.35],["c",-.21,.15,-.21,.15,-.12,.18],["c",.72,.15,1.11,.3,1.5,.57],["c",.39,.24,.63,.57,.75,.96],["c",.09,.3,.09,.96,0,1.29],["c",-.15,.57,-.39,1.05,-.78,1.5],["c",-.66,.75,-1.62,1.32,-2.61,1.53],["c",-.27,.06,-.42,.06,-.84,.06],["c",-.48,0,-.57,0,-.81,-.06],["c",-.6,-.18,-1.05,-.42,-1.47,-.81],["c",-.36,-.39,-.42,-.51,-.3,-.75],["c",.12,-.21,.39,-.39,.6,-.39],["c",.09,0,.15,.03,.33,.18],["c",.12,.12,.27,.24,.36,.27],["c",.96,.48,2.46,-.33,2.82,-1.5],["c",.24,-.81,-.03,-1.44,-.69,-1.77],["c",-.39,-.21,-1.02,-.33,-1.53,-.33],["c",-.18,0,-.21,0,-.27,-.09],["c",-.06,-.09,-.06,-.3,-.03,-.48],["c",.06,-.18,.18,-.36,.33,-.36],["c",.39,-.06,.51,-.09,.72,-.18],["c",.69,-.36,1.11,-1.23,.99,-2.01],["c",-.09,-.51,-.42,-.9,-.93,-1.17],["c",-.24,-.12,-.6,-.27,-.87,-.3],["c",-.09,-.03,-.09,-.03,-.12,.12],["c",0,.09,-.21,1.11,-.42,2.25],["c",-.66,3.75,-.72,3.99,-1.26,5.07],["c",-.9,1.89,-2.25,2.85,-3.48,2.61],["c",-.39,-.09,-.69,-.27,-1.38,-.84],["c",-.63,-.51,-.63,-.48,-.63,-.6],["c",0,-.18,.18,-.48,.39,-.57],["c",.21,-.12,.3,-.09,.81,.33],["c",.15,.15,.39,.3,.54,.36],["c",.18,.12,.27,.12,.48,.15],["c",.99,.06,1.71,-.78,2.04,-2.46],["c",.12,-.66,.18,-1.14,.21,-2.22],["c",.03,-1.23,.12,-2.25,.36,-3.63],["c",.03,-.24,.06,-.45,.06,-.48],["c",-.06,-.03,-.66,.27,-.9,.42],["c",-.06,.06,-.21,.18,-.33,.3],["c",-.57,.57,-.6,1.35,-.06,1.74],["c",.18,.12,.24,.24,.21,.51],["c",-.03,.3,-.15,.42,-.57,.48],["c",-1.11,.24,-2.22,-.42,-2.43,-1.38],["c",-.09,-.45,.03,-1.02,.3,-1.47],["c",.18,-.24,.6,-.63,.9,-.84],["c",.9,-.6,2.28,-1.02,3.69,-1.11],["z"]],w:15.709,h:34.656},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.85,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84}};t["noteheads.slash.whole"]={d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},t["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},t["noteheads.harmonic.quarter"]={d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165},t["noteheads.triangle.quarter"]={d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9};var a=function(i){for(var c=[],u=0,f=i.length;u<f;u++){c[u]=[];for(var g=0,d=i[u].length;g<d;g++)c[u][g]=i[u][g]}return c},n=function(i,c,u){for(var f=0,g=i.length;f<g;f++){var d=i[f],p,l;for(p=1,l=d.length;p<l;p++)d[p]*=p%2?c:u}},r={printSymbol:function(i,c,u,f,g){if(!t[u])return null;var d=a(t[u].d);d[0][1]+=i,d[0][2]+=c;for(var p="",l=0;l<d.length;l++)p+=d[l].join(" ");return g.path=p,f.path(g)},getPathForSymbol:function(i,c,u,f,g){if(f=f||1,g=g||1,!t[u])return null;var d=a(t[u].d);return(f!==1||g!==1)&&n(d,f,g),d[0][1]+=i,d[0][2]+=c,d},getSymbolWidth:function(i){return t[i]?t[i].w:0},symbolHeightInPitches:function(i){var c=t[i]?t[i].h:0;return c/e.STEP},getSymbolAlign:function(i){return i.substring(0,7)==="scripts"&&i!=="scripts.roll"?"center":"left"},getYCorr:function(i){switch(i){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":return-2;case"timesig.common":case"timesig.cut":return 0;case"flags.d32nd":return-1;case"flags.d64th":return-2;case"flags.u32nd":return 1;case"flags.u64th":return 3;case"rests.whole":return 1;case"rests.half":return-1;case"rests.8th":return-1;case"rests.quarter":return-1;case"rests.16th":return-1;case"rests.32nd":return-1;case"rests.64th":return-1;case"f":case"m":case"p":case"s":case"z":return-4;case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"scripts.dfermata":return 1;default:return 0}},setSymbol:function(i,c){t[i]=c}};return l0=r,l0}var u0,ys;function Tg(){if(ys)return u0;ys=1;var e=Pt(),t=pt(),a=at(),n=function(i,c){var u,f=0;i.el_type="clef";var g=new e(i,0,10,"staff-extra clef",c);switch(g.isClef=!0,i.type){case"treble":u="clefs.G";break;case"tenor":u="clefs.C";break;case"alto":u="clefs.C";break;case"bass":u="clefs.F";break;case"treble+8":u="clefs.G",f=1;break;case"tenor+8":u="clefs.C",f=1;break;case"bass+8":u="clefs.F",f=1;break;case"alto+8":u="clefs.C",f=1;break;case"treble-8":u="clefs.G",f=-1;break;case"tenor-8":u="clefs.C",f=-1;break;case"bass-8":u="clefs.F",f=-1;break;case"alto-8":u="clefs.C",f=-1;break;case"none":return null;case"perc":u="clefs.perc";break;default:g.addFixed(new a("clef="+i.type,0,0,void 0,{type:"debug"}))}var d=5;if(u){var p=t.symbolHeightInPitches(u),l=r(u);if(g.addRight(new a(u,d,t.getSymbolWidth(u),i.clefPos,{top:p+i.clefPos+l,bottom:i.clefPos+l})),f!==0){var o=.6666666666666666,h=(t.getSymbolWidth(u)-t.getSymbolWidth("8")*o)/2,s=f>0?g.top+3:g.bottom-1,v=f>0?g.top+3:g.bottom-3,y=v-2;i.type==="bass-8"&&(s=3,h=0),g.addRight(new a("8",d+h,t.getSymbolWidth("8")*o,s,{scalex:o,scaley:o,top:v,bottom:y}))}}return g};function r(i){switch(i){case"clefs.G":return-5;case"clefs.C":return-4;case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}return u0=n,u0}var h0,ws;function Eg(){if(ws)return h0;ws=1;var e=Pt(),t=pt(),a=at(),n=function(r,i){if(r.el_type="keySignature",!r.accidentals||r.accidentals.length===0)return null;var c=new e(r,0,10,"staff-extra key-signature",i);c.isKeySig=!0;var u=0;return r.accidentals.forEach(function(f){var g,d=0;switch(f.acc){case"sharp":g="accidentals.sharp",d=-3;break;case"natural":g="accidentals.nat";break;case"flat":g="accidentals.flat",d=-1.2;break;case"quartersharp":g="accidentals.halfsharp",d=-2.5;break;case"quarterflat":g="accidentals.halfflat",d=-1.2;break;default:g="accidentals.flat"}c.addRight(new a(g,u,t.getSymbolWidth(g),f.verticalPos,{thickness:t.symbolHeightInPitches(g),top:f.verticalPos+t.symbolHeightInPitches(g)+d,bottom:f.verticalPos+d})),u+=t.getSymbolWidth(g)+2},this),c};return h0=n,h0}var f0,_s;function Ag(){if(_s)return f0;_s=1;var e=pt(),t=at(),a=function(n,r,i,c){c||(c={});var u=c.dir!==void 0?c.dir:null,f=c.headx!==void 0?c.headx:0,g=c.extrax!==void 0?c.extrax:0,d=c.flag!==void 0?c.flag:null,p=c.dot!==void 0?c.dot:0,l=c.dotshiftx!==void 0?c.dotshiftx:0,o=c.scale!==void 0?c.scale:1,h=c.accidentalSlot!==void 0?c.accidentalSlot:[],s=c.shouldExtendStem!==void 0?c.shouldExtendStem:!1,v=c.printAccidentals!==void 0?c.printAccidentals:!0,y=i.verticalPos,m,_=0,k=0,x=0;if(r===void 0)n.addFixed(new t("pitch is undefined",0,0,0,{type:"debug"}));else if(r==="")m=new t(null,0,0,y);else{var R=f;if(i.printer_shift){var I=i.printer_shift==="same"?1:0;R=u==="down"?-e.getSymbolWidth(r)*o+I:e.getSymbolWidth(r)*o-I}var b={scalex:o,scaley:o,thickness:e.symbolHeightInPitches(r)*o,name:i.name};if(m=new t(r,R,e.getSymbolWidth(r)*o,y,b),m.stemDir=u,d){var A=y+(u==="down"?-7:7)*o;s&&(u==="down"&&A>6&&(A=6),u==="up"&&A<6&&(A=6));var N=u==="down"?f:f+m.w-.6;n.addRight(new t(d,N,e.getSymbolWidth(d)*o,A,{scalex:o,scaley:o}))}for(k=m.w+l-2+5*p;p>0;p--){var M=1-Math.abs(y)%2;n.addRight(new t("dots.dot",m.w+l-2+5*p,e.getSymbolWidth("dots.dot"),y+M))}}if(m&&(m.highestVert=i.highestVert),v&&i.accidental){var z;switch(i.accidental){case"quartersharp":z="accidentals.halfsharp";break;case"dblsharp":z="accidentals.dblsharp";break;case"sharp":z="accidentals.sharp";break;case"quarterflat":z="accidentals.halfflat";break;case"flat":z="accidentals.flat";break;case"dblflat":z="accidentals.dblflat";break;case"natural":z="accidentals.nat"}for(var L=!1,E=g,T=0;T<h.length;T++)if(y-h[T][0]>=6){h[T][0]=y,E=h[T][1],L=!0;break}L===!1&&(E-=e.getSymbolWidth(z)*o+2,h.push([y,E]),_=e.getSymbolWidth(z)*o+2);var P=e.symbolHeightInPitches(z);n.addExtra(new t(z,E,e.getSymbolWidth(z),y,{scalex:o,scaley:o,top:y+P/2,bottom:y-P/2})),x=e.getSymbolWidth(z)/2}return{notehead:m,accidentalshiftx:_,dotshiftx:k,extraLeft:x}};return f0=a,f0}var d0,ks;function Mg(){if(ks)return d0;ks=1;var e=Pt(),t=pt(),a=at(),n=function(r,i){r.el_type="timeSignature";var c=new e(r,0,10,"staff-extra time-signature",i);if(r.type==="specified")for(var u=0,f=0;f<r.value.length;f++)if(f!==0&&(c.addRight(new a("+",u+1,t.getSymbolWidth("+"),6,{thickness:t.symbolHeightInPitches("+")})),u+=t.getSymbolWidth("+")+2),r.value[f].den){for(var g=0,d=0;d<r.value[f].num.length;d++)g+=t.getSymbolWidth(r.value[f].num[d]);var p=0;for(d=0;d<r.value[f].num.length;d++)p+=t.getSymbolWidth(r.value[f].den[d]);var l=Math.max(g,p);c.addRight(new a(r.value[f].num,u+(l-g)/2,g,8,{thickness:t.symbolHeightInPitches(r.value[f].num[0])})),c.addRight(new a(r.value[f].den,u+(l-p)/2,p,4,{thickness:t.symbolHeightInPitches(r.value[f].den[0])})),u+=l}else{for(var o=0,h=0;h<r.value[f].num.length;h++)o+=t.getSymbolWidth(r.value[f].num[h]);c.addRight(new a(r.value[f].num,u,o,6,{thickness:t.symbolHeightInPitches(r.value[f].num[0])})),u+=o}else r.type==="common_time"?c.addRight(new a("timesig.common",0,t.getSymbolWidth("timesig.common"),6,{thickness:t.symbolHeightInPitches("timesig.common")})):r.type==="cut_time"?c.addRight(new a("timesig.cut",0,t.getSymbolWidth("timesig.cut"),6,{thickness:t.symbolHeightInPitches("timesig.cut")})):r.type==="tempus_imperfectum"?c.addRight(new a("timesig.imperfectum",0,t.getSymbolWidth("timesig.imperfectum"),6,{thickness:t.symbolHeightInPitches("timesig.imperfectum")})):r.type==="tempus_imperfectum_prolatio"?c.addRight(new a("timesig.imperfectum2",0,t.getSymbolWidth("timesig.imperfectum2"),6,{thickness:t.symbolHeightInPitches("timesig.imperfectum2")})):r.type==="tempus_perfectum"?c.addRight(new a("timesig.perfectum",0,t.getSymbolWidth("timesig.perfectum"),6,{thickness:t.symbolHeightInPitches("timesig.perfectum")})):r.type==="tempus_perfectum_prolatio"?c.addRight(new a("timesig.perfectum2",0,t.getSymbolWidth("timesig.perfectum2"),6,{thickness:t.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",r);return c};return d0=n,d0}var p0,xs;function Ng(){if(xs)return p0;xs=1;var e=function(a,n,r){this.type="DynamicDecoration",this.anchor=a,this.dec=n,r==="below"?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0};return p0=e,p0}var g0,Cs;function Pg(){if(Cs)return g0;Cs=1;var e=function(a,n,r,i){this.type="CrescendoElem",this.anchor1=a,this.anchor2=n,this.dir=r,i==="above"?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0};return g0=e,g0}var v0,Ss;function zg(){if(Ss)return v0;Ss=1;var e=function(a,n){this.type="GlissandoElem",this.anchor1=a,this.anchor2=n};return v0=e,v0}var m0,Ts;function Rl(){if(Ts)return m0;Ts=1;var e=function(a){this.type="TieElem",this.anchor1=a.anchor1,this.anchor2=a.anchor2,a.isGrace&&(this.isGrace=!0),a.fixedY&&(this.fixedY=!0),a.stemDir&&(this.stemDir=a.stemDir),a.voiceNumber!==void 0&&(this.voiceNumber=a.voiceNumber),a.style!==void 0&&(this.dotted=!0),this.internalNotes=[]};return e.prototype.addInternalNote=function(t){this.internalNotes.push(t)},e.prototype.setEndAnchor=function(t){this.anchor2=t,this.anchor1?(this.top=Math.max(this.anchor1.pitch,this.anchor2.pitch)+4,this.bottom=Math.min(this.anchor1.pitch,this.anchor2.pitch)-4):(this.top=this.anchor2.pitch+4,this.bottom=this.anchor2.pitch-4)},e.prototype.setStartX=function(t){this.startLimitX=t},e.prototype.setEndX=function(t){this.endLimitX=t},e.prototype.setHint=function(){this.hint=!0},e.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var t;this.anchor1?t=this.anchor1.pitch:this.anchor2?t=this.anchor2.pitch:t=14,this.anchor1&&this.anchor1.stemDir==="down"&&this.anchor2&&this.anchor2.stemDir==="down"?this.above=!0:this.anchor1&&this.anchor1.stemDir==="up"&&this.anchor2&&this.anchor2.stemDir==="up"?this.above=!1:this.anchor1&&this.anchor2?this.above=t>=6:this.anchor1?this.above=this.anchor1.stemDir==="down":this.anchor2?this.above=this.anchor2.stemDir==="down":this.above=t>=6}},e.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var t=!1;this.anchor1&&this.anchor1.stemDir==="down"&&(t=!0),this.anchor2&&this.anchor2.stemDir==="down"&&(t=!0);for(var a=0;a<this.internalNotes.length;a++){var n=this.internalNotes[a];n.stemDir==="down"&&(t=!0)}this.above=t}},e.prototype.calcX=function(t,a){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.anchor2?this.startX=this.anchor2.x-20:this.startX=t,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=a},e.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0},e.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&this.anchor1.stemDir==="up"&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var t=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,a=(this.anchor2.highestVert+this.anchor2.pitch)/2;if(this.above&&this.anchor2.stemDir==="up"&&!this.fixedY&&!t&&a<this.startY?(this.endY=a,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&t?this.anchor2.highestVert:this.anchor2.pitch,this.anchor1.scalex===1){var n=!!this.anchor1.parent.beam,r=!!this.anchor2.parent.beam;if(n){var i=this.anchor1.parent===this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1];i||(this.above?this.startY=this.anchor1.parent.fixed.t:this.startY=this.anchor1.parent.fixed.b)}if(r){var c=this.anchor2.parent===this.anchor2.parent.beam.elems[0];c||(this.above?this.endY=this.anchor2.parent.fixed.t:this.endY=this.anchor2.parent.fixed.b)}}}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},e.prototype.avoidCollisionAbove=function(){if(this.above){for(var t=-50,a=0;a<this.internalNotes.length;a++)this.internalNotes[a].highestVert>t&&(t=this.internalNotes[a].highestVert);t>this.startY&&t>this.endY&&(this.startY=this.endY=t-1)}},e.prototype.getYBounds=function(){var t=10,a=1e3;this.isTie?(this.calcTieDirection(),this.calcX(t,a),this.calcTieY()):(this.calcSlurDirection(),this.calcX(t,a),this.calcSlurY());var n,r;return this.above?(r=Math.min(this.startY,this.endY),n=r+3):(n=Math.min(this.startY,this.endY),r=n-3),[n,r]},m0=e,m0}var b0,Es;function Ig(){if(Es)return b0;Es=1;var e=Ng(),t=Pg(),a=zg(),n=pt(),r=at(),i=Rl(),c=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},u=function(l,o,h,s,v,y,m,_,k){for(var x,R=0;R<o.length;R++){if(o[R]==="staccato"||o[R]==="tenuto"||o[R]==="accent"&&!k){var I="scripts."+o[R];if(o[R]==="accent"&&(I="scripts.sforzato"),x===void 0?x=m==="down"?h+2:_-2:x=m==="down"?x+2:x-2,o[R]==="accent")m==="up"?x--:x++;else switch(x){case 2:case 4:case 6:case 8:case 10:m==="up"?x--:x++;break}h>9&&x++;var b=s/2;n.getSymbolAlign(I)!=="center"&&(b-=n.getSymbolWidth(I)/2),v.addFixedX(new r(I,b,n.getSymbolWidth(I),x))}if(o[R]==="slide"&&v.heads[0]){var A=v.heads[0].pitch;A-=2;var N=new r("",-y-15,0,A-1),M=new r("",-y-5,0,A+1);v.addFixedX(N),v.addFixedX(M),l.addOther(new i({anchor1:N,anchor2:M,fixedY:!0}))}}return x===void 0&&(x=h),{above:x,below:v.bottom}},f=function(l,o,h,s){for(var v=0;v<o.length;v++)switch(o[v]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var y=new e(h,o[v],s);l.addOther(y)}},g=function(l,o,h,s,v){function y(){if(s.heads.length===0)return 10;for(var x=s.heads[0].pitch,R=1;R<s.heads.length;R++)x=Math.max(x,s.heads[R].pitch);return x}function m(){if(s.heads.length===0)return 2;for(var x=s.heads[0].pitch,R=1;R<s.heads.length;R++)x=Math.min(x,s.heads[R].pitch);return x}function _(x,R){var I=v==="down"?m()+1:y()+9;v!=="down"&&R===1&&I--;var b=h/2;b+=v==="down"?-5:3;for(var A=0;A<R;A++)I-=1,s.addFixedX(new r(x,b,n.getSymbolWidth(x),I))}for(var k=0;k<l.length;k++)switch(l[k]){case"/":_("flags.ugrace",1);break;case"//":_("flags.ugrace",2);break;case"///":_("flags.ugrace",3);break;case"////":_("flags.ugrace",4);break}},d=function(l,o,h,s,v,y,m,_){function k(M,z){M==="above"?s.above+=z:s.below-=z}function x(M){var z;return M==="above"?(z=s.above,z<y&&(z=y)):(z=s.below,z>m&&(z=m)),z}function R(M,z,L){var E=x(z),T=2,P=5;h.addFixedX(new r(M,o/2,0,E+T,{type:"decoration",klass:"ornament",thickness:3,anchor:L})),k(z,P)}function I(M,z){var L=o/2;n.getSymbolAlign(M)!=="center"&&(L-=n.getSymbolWidth(M)/2);var E=n.symbolHeightInPitches(M)+1,T=x(z);T=z==="above"?T+E/2:T-E/2,h.addFixedX(new r(M,L,n.getSymbolWidth(M),T,{klass:"ornament",thickness:n.symbolHeightInPitches(M),position:z})),k(z,E)}for(var b={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",trillh:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},A=!1,N=0;N<l.length;N++)switch(l[N]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":R(l[N],v,"middle"),A=!0;break;case"D.C.alcoda":R("D.C. al coda",v,"end"),A=!0;break;case"D.C.alfine":R("D.C. al fine",v,"end"),A=!0;break;case"D.S.alcoda":R("D.S. al coda",v,"end"),A=!0;break;case"D.S.alfine":R("D.S. al fine",v,"end"),A=!0;break;case"fine":R("FINE",v,"middle"),A=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"trillh":case"roll":case"irishroll":case"marcato":case"dmarcato":case"turn":case"uppermordent":case"pralltriller":case"mordent":case"lowermordent":case"downbow":case"upbow":case"fermata":case"breath":case"umarcato":case"coda":case"segno":I(b[l[N]],v),A=!0;break;case"invertedfermata":I(b[l[N]],"below"),A=!0;break;case"mark":h.klass="mark";break;case"accent":_&&(I("scripts.sforzato",v),A=!0);break}return A};function p(l,o,h){for(var s=0;s<l.length;s++)switch(l[s]){case"arpeggio":for(var v=o.abcelem.minpitch-1;v<=o.abcelem.maxpitch;v+=2)o.addExtra(new r("scripts.arpeggio",-n.getSymbolWidth("scripts.arpeggio")*2-h,0,v+2,{klass:"ornament",thickness:n.symbolHeightInPitches("scripts.arpeggio")}));break}}return c.prototype.dynamicDecoration=function(l,o,h,s){for(var v,y,m,_=0;_<o.length;_++)switch(o[_]){case"diminuendo(":this.startDiminuendoX=h,v=void 0;break;case"diminuendo)":v={start:this.startDiminuendoX,stop:h},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=h,y=void 0;break;case"crescendo)":y={start:this.startCrescendoX,stop:h},this.startCrescendoX=void 0;break;case"~(":case"glissando(":this.startGlissandoX=h,m=void 0;break;case"~)":case"glissando)":m={start:this.startGlissandoX,stop:h},this.startGlissandoX=void 0;break}v&&l.addOther(new t(v.start,v.stop,">",s)),y&&l.addOther(new t(y.start,y.stop,"<",s)),m&&l.addOther(new a(m.start,m.stop))},c.prototype.createDecoration=function(l,o,h,s,v,y,m,_,k,x,R){k||(k={ornamentPosition:"above",volumePosition:x?"above":"below",dynamicPosition:x?"above":"below"}),f(l,o,v,k.volumePosition),this.dynamicDecoration(l,o,v,k.dynamicPosition),g(o,h,s,v,m);var I=u(l,o,h,s,v,y,m,_,R);I.above=Math.max(I.above,this.minTop),I.below=Math.min(I.below,_),d(o,s,v,I,k.ornamentPosition,this.minTop,_,R),p(o,v,y)},b0=c,b0}var y0,As;function Rg(){if(As)return y0;As=1;var e=function(a,n,r){this.type="EndingElem",this.text=a,this.anchor1=n,this.anchor2=r,this.endingHeightAbove=5,this.pitch=void 0};return y0=e,y0}var w0,Ms;function qg(){if(Ms)return w0;Ms=1;var e=function(t){for(var a=0,n=0;n<t.voices.length;n++){var r=t.voices[n].staff;t.voices[n].duplicate||(a+=r.top,a+=-r.bottom)}return a};return w0=e,w0}var _0,Ns;function Bg(){if(Ns)return _0;Ns=1;var e=qg(),t=function(a){this.getTextSize=a,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};return t.prototype.setLimit=function(a,n){n.specialY[a]&&(n.staff.specialY[a]?n.staff.specialY[a]=Math.max(n.staff.specialY[a],n.specialY[a]):n.staff.specialY[a]=n.specialY[a])},t.prototype.addVoice=function(a,n,r){var i=this.voices.length;this.voices[i]=a,this.staffs[n]?this.staffs[n].voices.push(i):this.staffs[this.staffs.length]={top:10,bottom:2,lines:r,voices:[i],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},a.staff=this.staffs[n]},t.prototype.setHeight=function(){this.height=e(this)},t.prototype.setWidth=function(a){this.w=a;for(var n=0;n<this.voices.length;n++)this.voices[n].setWidth(a)},t.prototype.setStaffLimits=function(a){a.staff.top=Math.max(a.staff.top,a.top),a.staff.bottom=Math.min(a.staff.bottom,a.bottom),this.setLimit("tempoHeightAbove",a),this.setLimit("partHeightAbove",a),this.setLimit("volumeHeightAbove",a),this.setLimit("dynamicHeightAbove",a),this.setLimit("endingHeightAbove",a),this.setLimit("chordHeightAbove",a),this.setLimit("lyricHeightAbove",a),this.setLimit("lyricHeightBelow",a),this.setLimit("chordHeightBelow",a),this.setLimit("volumeHeightBelow",a),this.setLimit("dynamicHeightBelow",a)},_0=t,_0}var k0,Ps;function Lg(){if(Ps)return k0;Ps=1;var e=Pt(),t=at(),a=function(r,i,c){this.type="TempoElement",this.tempo=r,this.tempo.type="tempo",this.tuneNumber=i,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(c,r,i))};return a.prototype.setX=function(n){this.x=n},a.prototype.createNote=function(n,r,i){var c=.75,u=r.duration[0],f=new e(r,u,1,"tempo",i),g,d,p;u<=1/32?(p="noteheads.quarter",d="flags.u32nd",g=0):u<=1/16?(p="noteheads.quarter",d="flags.u16th",g=0):u<=3/32?(p="noteheads.quarter",d="flags.u16nd",g=1):u<=1/8?(p="noteheads.quarter",d="flags.u8th",g=0):u<=3/16?(p="noteheads.quarter",d="flags.u8th",g=1):u<=1/4?(p="noteheads.quarter",g=0):u<=3/8?(p="noteheads.quarter",g=1):u<=1/2?(p="noteheads.half",g=0):u<=3/4?(p="noteheads.half",g=1):u<=1?(p="noteheads.whole",g=0):u<=1.5?(p="noteheads.whole",g=1):u<=2?(p="noteheads.dbl",g=0):(p="noteheads.dbl",g=1);var l=n(f,p,{verticalPos:0},{dir:"up",flag:d,dot:g,scale:c}),o=l.notehead;f.addHead(o);var h;if(p!=="noteheads.whole"&&p!=="noteheads.dbl"){var s=.3333333333333333*c,v=5*c,y=o.dx+o.w,m=-.6;h=new t(null,y,0,s,{type:"stem",pitch2:v,linewidth:m}),f.addRight(h)}return f},k0=a,k0}var x0,zs;function Og(){if(zs)return x0;zs=1;var e=function(a,n,r){this.type="TripletElem",this.anchor1=n,this.number=a,this.durationClass=("d"+Math.round(n.parent.durationClass*1e3)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=r.flatBeams};return e.prototype.isClosed=function(){return!!this.anchor2},e.prototype.middleNote=function(t){this.middleElems.push(t)},e.prototype.setCloseAnchor=function(t){this.anchor2=t,(!this.anchor1.parent.beam||this.anchor1.stemDir==="up")&&(this.endingHeightAbove=4)},x0=e,x0}var C0,Is;function Dg(){if(Is)return C0;Is=1;function e(a){switch(a){case"B#":return"H#";case"B♯":return"H♯";case"B":return"H";case"Bb":return"B";case"B♭":return"B"}return a}function t(a,n,r){var i=a.split(`
|
|
110
|
+
`);for(let c=0;c<i.length;c++){let f=i[c].match(/^([ABCDEFG][♯♭]?)?([^\/]+)?(\/([ABCDEFG][#b♯♭]?))?/);if(!f)continue;let g=f[1]||"",d=f[2]||"",p=f[4]||"";r&&(g=e(g),p=e(p));const l=n?"":"",o=p?"/"+p:"";i[c]=[g,d,o].join(l)}return i.join(`
|
|
111
|
+
`)}return C0=t,C0}var S0,Rs;function Fg(){if(Rs)return S0;Rs=1;var e=at(),t=Ve();const a=Dg();var n=function(i,c,u,f,g,d,p,l){for(var o=0;o<u.chord.length;o++){var h=u.chord[o].position,s=u.chord[o].rel_position,v=h==="left"||h==="right"||h==="below"||h==="above"||!!s,y,m;v?(y="annotationfont",m="abcjs-annotation"):(y="gchordfont",m="abcjs-chord");var _=i.attr(y,m),k=u.chord[o].name,x;if(typeof k=="string")x=r(k,h,s,v,y,m,_,i,c,u,f,g,d,p,l),f=x.roomTaken,g=x.roomTakenRight;else for(var R=0;R<k.length;R++)x=r(k[R].text,h,s,v,y,m,_,i,c,u,f,g,d,p,l),f=x.roomTaken,g=x.roomTakenRight}return{roomTaken:f,roomTakenRight:g}};function r(i,c,u,f,g,d,p,l,o,h,s,v,y,m,_){for(var k=i.split(`
|
|
112
|
+
`),x=k.length-1;x>=0;x--){var R=k[x],I=0,b;f||(R=a(R,m,_));var A=l.calc(R,g,d),N=A.width,M=A.height/t.STEP;switch(c){case"left":s+=N+7,I=-s,b=h.averagepitch,o.addExtra(new e(R,I,N+4,b,{type:"text",height:M,dim:p,position:"left"}));break;case"right":v+=4,I=v,b=h.averagepitch,o.addRight(new e(R,I,N+4,b,{type:"text",height:M,dim:p,position:"right"}));break;case"below":o.addRight(new e(R,0,0,void 0,{type:"text",position:"below",height:M,dim:p,realWidth:N}));break;case"above":o.addRight(new e(R,0,0,void 0,{type:"text",position:"above",height:M,dim:p,realWidth:N}));break;default:if(u){var z=u.y+3*t.STEP;o.addRight(new e(R,I+u.x,0,h.minpitch+z/t.STEP,{position:"relative",type:"text",height:M,dim:p}))}else{var L="above";h.positioning&&h.positioning.chordPosition&&(L=h.positioning.chordPosition),L!=="hidden"&&o.addCentered(new e(R,y/2,N,void 0,{type:"chord",position:L,height:M,dim:p,realWidth:N}))}}}return{roomTaken:s,roomTakenRight:v}}return S0=n,S0}var T0,qs;function Hg(){if(qs)return T0;qs=1;var e=Pt(),t=Cg(),a=Sg(),n=Tg(),r=Eg(),i=Ag(),c=Mg(),u=Ig(),f=Rg(),g=pt(),d=at(),p=Ve(),l=Bg(),o=Lg(),h=Rl(),s=Og(),v=Al(),y=Fg(),m=Sl(),_=nt(),k=function(E){var T=0;return E.duration&&(T=E.duration),T},x=!1,R={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},triangle:{"-1":"noteheads.triangle.quarter",0:"noteheads.triangle.quarter",1:"noteheads.triangle.quarter",2:"noteheads.triangle.quarter",3:"noteheads.triangle.quarter",4:"noteheads.triangle.quarter",5:"noteheads.triangle.quarter",6:"noteheads.triangle.quarter",7:"noteheads.triangle.quarter",nostem:"noteheads.triangle.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}},I=function(E,T,P){this.decoration=new u,this.getTextSize=E,this.tuneNumber=T,this.isBagpipes=P.bagpipes,this.flatBeams=P.flatbeams,this.graceSlurs=P.graceSlurs,this.percmap=P.percmap,this.initialClef=P.initialClef,this.jazzchords=!!P.jazzchords,this.accentAbove=!!P.accentAbove,this.germanAlphabet=!!P.germanAlphabet,this.reset()};I.prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.voiceColor=void 0,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.colorByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},I.prototype.setStemHeight=function(E){this.stemHeight=Math.round(E*10/p.STEP)/10},I.prototype.getCurrentVoiceId=function(E,T){return"s"+E+"v"+T},I.prototype.pushCrossLineElems=function(E,T){this.slursbyvoice[this.getCurrentVoiceId(E,T)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(E,T)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(E,T)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(E,T)]=this.voiceScale,this.voiceColor&&(this.colorByVoice[this.getCurrentVoiceId(E,T)]=this.voiceColor)},I.prototype.popCrossLineElems=function(E,T){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(E,T)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(E,T)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(E,T)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(E,T)],this.voiceScale===void 0&&(this.voiceScale=1),this.voiceColor=this.colorByVoice[this.getCurrentVoiceId(E,T)]},I.prototype.containsLyrics=function(E){for(var T=0;T<E.length;T++)for(var P=0;P<E[T].voices.length;P++)for(var B=0;B<E[T].voices[P].length;B++){var O=E[T].voices[P][B];if(O.lyric){(!O.positioning||O.positioning.vocalPosition==="below")&&(this.hasVocals=!0);return}}},I.prototype.createABCLine=function(E,T,P){this.minY=2,this.containsLyrics(E);var B=new l(this.getTextSize);this.tempoSet=!1;for(var O=0;O<E.length;O++)x&&this.restoreState(),x=!1,this.createABCStaff(B,E[O],T,O,P);return B},I.prototype.createABCStaff=function(E,T,P,B,O){E.getTextSize.updateFonts(T);for(var w=0;w<T.voices.length;w++){var C=new v(w,T.voices.length);w===0?(C.barfrom=T.connectBarLines==="start"||T.connectBarLines==="continue",C.barto=T.connectBarLines==="continue"||T.connectBarLines==="end"):C.duplicate=!0,T.title&&T.title[w]&&(C.header=T.title[w].replace(/\\n/g,`
|
|
113
|
+
`),C.headerPosition=6+E.getTextSize.baselineToCenter(C.header,"voicefont","staff-extra voice-name",w,T.voices.length)/p.STEP),T.clef&&T.clef.type==="perc"&&(C.isPercussion=!0);var S=(!this.initialClef||O===0)&&n(T.clef,this.tuneNumber);S&&(w===0&&T.barNumber&&this.addMeasureNumber(T.barNumber,S),C.addChild(S),this.startlimitelem=S);var q=r(T.key,this.tuneNumber);if(q&&(C.addChild(q),this.startlimitelem=q),T.meter){T.meter.type==="specified"?this.measureLength=T.meter.value[0].num/T.meter.value[0].den:this.measureLength=1;var D=c(T.meter,this.tuneNumber);C.addChild(D),this.startlimitelem=D}C.duplicate&&(C.children=[]);var $=T.clef.stafflines||T.clef.stafflines===0?T.clef.stafflines:5;E.addVoice(C,B,$);var F=$===1;this.createABCVoice(T.voices[w],P,B,w,F,C),E.setStaffLimits(C),w===0&&(T.brace==="start"||!E.brace&&T.brace?(E.brace||(E.brace=[]),E.brace.push(new a(C,"brace"))):T.brace==="end"&&E.brace?E.brace[E.brace.length-1].setBottomStaff(C):T.brace==="continue"&&E.brace&&E.brace[E.brace.length-1].continuing(C),T.bracket==="start"||!E.bracket&&T.bracket?(E.bracket||(E.bracket=[]),E.bracket.push(new a(C,"bracket"))):T.bracket==="end"&&E.bracket?E.bracket[E.bracket.length-1].setBottomStaff(C):T.bracket==="continue"&&E.bracket&&E.bracket[E.bracket.length-1].continuing(C))}};function b(E,T){var P=E[T];if(P.el_type!=="note"||!P.startBeam||P.endBeam)return{count:1,elem:P};for(var B=[];T<E.length&&E[T].el_type==="note"&&(B.push(E[T]),!E[T].endBeam);)T++;return{count:B.length,elem:B}}I.prototype.createABCVoice=function(E,T,P,B,O,w){this.popCrossLineElems(P,B),this.stemdir=this.isBagpipes?"down":null,this.abcline=E,this.partstartelem&&(this.partstartelem=new f("",null,null),w.addOther(this.partstartelem));var C=w.voicetotal<2?-1:w.voicenumber;for(var S in this.slurs)this.slurs.hasOwnProperty(S)&&(this.slurs[S]=new h({force:this.slurs[S].force,voiceNumber:C,stemDir:this.slurs[S].stemDir,style:this.slurs[S].dotted}),x&&this.slurs[S].setHint(),w.addOther(this.slurs[S]));for(var q=0;q<this.ties.length;q++)this.ties[q]=new h({force:this.ties[q].force,stemDir:this.ties[q].stemDir,voiceNumber:C,style:this.ties[q].dotted}),x&&this.ties[q].setHint(),w.addOther(this.ties[q]);for(var D=0;D<this.abcline.length;D++)A(this.abcline[D]),this.minY=Math.min(this.abcline[D].minpitch,this.minY);for(var $=P===0,F=0;F<this.abcline.length;){var K=b(this.abcline,F),te=this.createABCElement($,O,w,K.elem);if(te)for(q=0;q<te.length;q++){if(!this.tempoSet&&T&&!T.suppress){this.tempoSet=!0;var V=new e(T,0,0,"tempo",this.tuneNumber,{});V.addFixedX(new o(T,this.tuneNumber,i)),w.addChild(V)}w.addChild(te[q])}F+=K.count}this.pushCrossLineElems(P,B)},I.prototype.saveState=function(){this.tiesSave=_.cloneArray(this.ties),this.slursSave=_.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=_.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=_.cloneHashOfArrayOfHash(this.tiesbyvoice)},I.prototype.restoreState=function(){this.ties=_.cloneArray(this.tiesSave),this.slurs=_.cloneHashOfHash(this.slursSave),this.slursbyvoice=_.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=_.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},I.prototype.createABCElement=function(E,T,P,B){var O=[];switch(B.el_type){case void 0:O=this.createBeam(T,P,B);break;case"note":O[0]=this.createNote(B,!1,T,P),this.triplet&&this.triplet.isClosed()&&(P.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":O[0]=this.createBarLine(P,B,E),P.duplicate&&O.length>0&&(O[0].invisible=!0);break;case"meter":O[0]=c(B,this.tuneNumber),this.startlimitelem=O[0],P.duplicate&&O.length>0&&(O[0].invisible=!0);break;case"clef":if(O[0]=n(B,this.tuneNumber),!O[0])return null;P.duplicate&&O.length>0&&(O[0].invisible=!0);break;case"key":var w=r(B,this.tuneNumber);w&&(O[0]=w,this.startlimitelem=O[0]),P.duplicate&&O.length>0&&(O[0].invisible=!0);break;case"stem":this.stemdir=B.direction==="auto"?void 0:B.direction;break;case"part":var C=new e(B,0,0,"part",this.tuneNumber),S=this.getTextSize.calc(B.title,"partsfont","part");C.addFixedX(new d(B.title,0,0,void 0,{type:"part",height:S.height/p.STEP})),O[0]=C;break;case"tempo":var q=new e(B,0,0,"tempo",this.tuneNumber);B.suppress||q.addFixedX(new o(B,this.tuneNumber,i)),O[0]=q;break;case"style":B.head==="normal"?delete this.style:this.style=B.head;break;case"hint":x=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=B.size;break;case"color":this.voiceColor=B.color,P.color=this.voiceColor;break;default:var D=new e(B,0,0,"unsupported",this.tuneNumber);D.addFixed(new d("element type "+B.el_type,0,0,void 0,{type:"debug"})),O[0]=D}return O};function A(E){if(E.pitches){N(E);for(var T=0,P=0;P<E.pitches.length;P++)T+=E.pitches[P].verticalPos;E.averagepitch=T/E.pitches.length,E.minpitch=E.pitches[0].verticalPos,E.maxpitch=E.pitches[E.pitches.length-1].verticalPos}}I.prototype.createBeam=function(E,T,P){var B=[],O=new t(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,P[0]);x&&O.setHint();for(var w=0;w<P.length;w++)O.runningDirection(P[w]);O.setStemDirection();var C=this.stemdir;for(this.stemdir=O.stemsUp?"up":"down",w=0;w<P.length;w++){var S=P[w],q=this.createNote(S,!0,E,T);B.push(q),O.add(q),this.triplet&&this.triplet.isClosed()&&(T.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return O.calcDir(),T.addBeam(O),this.stemdir=C,B};var N=function(E){var T;do{T=!0;for(var P=0;P<E.pitches.length-1;P++)if(E.pitches[P].pitch>E.pitches[P+1].pitch){T=!1;var B=E.pitches[P];E.pitches[P]=E.pitches[P+1],E.pitches[P+1]=B}}while(!T)},M=function(E,T,P,B,O,w,C,S,q){for(var D=P;D>11;D--)D%2===0&&!B&&E.addFixed(new d(null,S,(O+4)*q,D,{type:"ledger"}));for(D=T;D<1;D++)D%2===0&&!B&&E.addFixed(new d(null,S,(O+4)*q,D,{type:"ledger"}));for(D=0;D<w.length;D++){var $=O;C==="down"&&($=-$),E.addFixed(new d(null,$+S,(O+4)*q,w[D],{type:"ledger"}))}};I.prototype.addGraceNotes=function(E,T,P,B,O,w,C){var S=.6,q=3.5/5;O=Math.round(O*q);var D=null,$;E.gracenotes.length>1&&(D=new t(O,"grace",w),x&&D.setHint(),D.mainNote=P);var F,K=[];for(F=E.gracenotes.length-1;F>=0;F--)C+=10,K[F]=C,E.gracenotes[F].accidental&&(C+=7);for(F=0;F<E.gracenotes.length;F++){var te=E.gracenotes[F].verticalPos;$=D?null:R.uflags[w?5:3];var V=[],ae=i(P,"noteheads.quarter",E.gracenotes[F],{dir:"up",headx:-K[F],extrax:-K[F],flag:$,scale:S*this.voiceScale,accidentalSlot:V});ae.notehead.highestVert=ae.notehead.pitch+O;var oe=ae.notehead;if(this.addSlursAndTies(P,E.gracenotes[F],oe,T,"up",!0),P.addExtra(oe),E.gracenotes[F].acciaccatura){var le=E.gracenotes[F].verticalPos+7*S,J=D?5:6;P.addRight(new d("flags.ugrace",-K[F]+J,0,le,{scalex:S,scaley:S}))}if(D){var ce=E.gracenotes[F].duration/2;w&&(ce/=2);var ee={heads:[oe],abcelem:{averagepitch:te,minpitch:te,maxpitch:te,duration:ce}};D.add(ee)}else{var he=te+.3333333333333333*S,de=te+7*S,Se=oe.dx+oe.w,we=-.6;P.addExtra(new d(null,Se,0,he,{type:"stem",pitch2:de,linewidth:we}))}M(P,te,te,!1,g.getSymbolWidth("noteheads.quarter"),[],!0,oe.dx-1,.6);var Re=E.rest&&(E.rest.type==="spacer"||E.rest.type==="invisible");F===0&&!w&&this.graceSlurs&&!Re&&T.addOther(new h({anchor1:oe,anchor2:B,isGrace:!0}))}return D&&(D.calcDir(),T.addBeam(D)),C};function z(E,T,P,B,O,w,C,S,q){var D,$=7,F,K,te;switch(O&&(w==="down"&&($=3),w==="up"&&($=11)),C&&(P<.5||P<1?$=7:$=5),T.rest.type){case"whole":D=R.rest[0],T.averagepitch=$,T.minpitch=$,T.maxpitch=$,B=0;break;case"rest":T.style==="rhythm"?D=R.rhythm[-S]:D=R.rest[-S],T.averagepitch=$,T.minpitch=$,T.maxpitch=$;break;case"invisible":case"invisible-multimeasure":case"spacer":D="",T.averagepitch=$,T.minpitch=$,T.maxpitch=$;break;case"multimeasure":D=R.rest.multi,T.averagepitch=$,T.minpitch=$,T.maxpitch=$,B=0;var V=g.getSymbolWidth(D);E.addHead(new d(D,V,V*2,7));var ae=new d(""+T.rest.text,V,V,16,{type:"multimeasure-text"});E.addExtra(ae)}if(T.rest.type.indexOf("multimeasure")<0&&T.rest.type!=="invisible"){var oe=i(E,D,{verticalPos:$},{dot:B,scale:q});F=oe.notehead,F&&(E.addHead(F),K=oe.accidentalshiftx,te=oe.dotshiftx)}return{noteHead:F,roomTaken:K,roomTakenRight:te}}function L(E,T){for(var P=0;P<E.length;P++)if(JSON.stringify(E[P])===JSON.stringify(T))return;E.push(T)}return I.prototype.addNoteToAbcElement=function(E,T,P,B,O,w,C,S,q){var D=0,$,F=0,K=0,te,V,ae=[],oe=[],le=0,J=T.averagepitch>=6?"down":"up";B&&(J=B),O=T.style?T.style:O,(!O||O==="normal")&&(O="note");var ce;w?ce=R[O].nostem:ce=R[O][-C],ce||console.log("noteSymbol:",O,C,w);var ee;for(ee=J==="down"?T.pitches.length-2:1;J==="down"?ee>=0:ee<T.pitches.length;ee=J==="down"?ee-1:ee+1){var he=T.pitches[J==="down"?ee+1:ee-1],de=T.pitches[ee],Se=J==="down"?he.pitch-de.pitch:de.pitch-he.pitch;Se<=1&&!he.printer_shift&&(de.printer_shift=Se?"different":"same",(de.verticalPos>11||de.verticalPos<1)&&ae.push(de.verticalPos-de.verticalPos%2),J==="down"?F=g.getSymbolWidth(ce)+2:D=g.getSymbolWidth(ce)+2)}var we=T.pitches.length;for(ee=0;ee<T.pitches.length;ee++){if(!S){var Re;J==="down"&&ee!==0||J==="up"&&ee!==we-1?Re=null:Re=R[J==="down"?"dflags":"uflags"][-C]}var ze;if(T.pitches[ee].style)ze=R[T.pitches[ee].style][-C];else if(q.isPercussion&&this.percmap){ze=ce;var Oe=this.percmap[m(T.pitches[ee])];Oe&&Oe.noteHead&&R[Oe.noteHead]&&(ze=R[Oe.noteHead][-C])}else ze=ce;T.pitches[ee].highestVert=T.pitches[ee].verticalPos;var Z=(B==="up"||J==="up")&&ee===0,W=(B==="down"||J==="down")&&ee===we-1;if(Z||W){if((T.startSlur||we===1)&&(T.pitches[ee].highestVert=T.pitches[we-1].verticalPos,k(T)<1&&(B==="up"||J==="up")&&(T.pitches[ee].highestVert+=6)),T.startSlur)for(T.pitches[ee].startSlur||(T.pitches[ee].startSlur=[]),V=0;V<T.startSlur.length;V++)L(T.pitches[ee].startSlur,T.startSlur[V]);if(T.endSlur)for(T.pitches[ee].highestVert=T.pitches[we-1].verticalPos,k(T)<1&&(B==="up"||J==="up")&&(T.pitches[ee].highestVert+=6),T.pitches[ee].endSlur||(T.pitches[ee].endSlur=[]),V=0;V<T.endSlur.length;V++)L(T.pitches[ee].endSlur,T.endSlur[V])}var H=!S&&C<=-1,j=i(E,ze,T.pitches[ee],{dir:J,extrax:-F,flag:Re,dot:P,dotshiftx:D,scale:this.voiceScale,accidentalSlot:oe,shouldExtendStem:!B,printAccidentals:!q.isPercussion});le=Math.max(g.getSymbolWidth(ze),le),E.extraw-=j.extraLeft,$=j.notehead,$&&(this.addSlursAndTies(E,T.pitches[ee],$,q,H?J:null,!1),T.gracenotes&&T.gracenotes.length>0&&($.bottom=$.bottom-1),E.addHead($)),F+=j.accidentalshiftx,K=Math.max(K,j.dotshiftx)}if(H){var Q=Math.round(70*this.voiceScale)/10,re=J==="down"?T.minpitch-Q:T.minpitch+1/3;re>6&&!B&&(re=6);var ie=J==="down"?T.maxpitch-1/3:T.maxpitch+Q;ie<6&&!B&&(ie=6);var ge=J==="down"||E.heads.length===0?0:E.heads[0].w,ne=J==="down"?1:-1;$&&$.c==="noteheads.slash.quarter"&&(J==="down"?ie-=1:re+=1),$&&$.c==="noteheads.triangle.quarter"&&(J==="down"?ie-=.7:re-=1.2),E.addRight(new d(null,ge,0,re,{type:"stem",pitch2:ie,linewidth:ne,bottom:re-1})),te=Math.min(re,ie)}return{noteHead:$,roomTaken:F,roomTakenRight:K,min:te,additionalLedgers:ae,dir:J,symbolWidth:le}},I.prototype.addLyric=function(E,T){var P="";T.lyric.forEach(function(w){var C=w.divider===" "?"":w.divider;P+=w.syllable+C+`
|
|
114
|
+
`});var B=this.getTextSize.calc(P,"vocalfont","lyric"),O=T.positioning?T.positioning.vocalPosition:"below";E.addCentered(new d(P,0,B.width,void 0,{type:"lyric",position:O,height:B.height/p.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},I.prototype.createNote=function(E,T,P,B){var O=null,w=0,C=0,S=0,q=[],D,$=k(E),F=!1;$===0&&(F=!0,$=.25,T=!0);for(var K=Math.floor(Math.log($)/Math.log(2)),te=0,V=Math.pow(2,K),ae=V/2;V<$;te++,V+=ae,ae/=2);E.startTriplet&&(this.tripletmultiplier=E.tripletMultiplier);var oe=$*this.tripletmultiplier;E.rest&&E.rest.type==="multimeasure"&&(oe=1),E.rest&&E.rest.type==="invisible-multimeasure"&&(oe=this.measureLength*E.rest.text);var le=E.rest?"rest":"note",J=new e(E,oe,1,le,this.tuneNumber,{durationClassOveride:E.duration*this.tripletmultiplier});if(x&&J.setHint(),E.rest){this.measureLength===$&&E.rest.type!=="invisible"&&E.rest.type!=="spacer"&&E.rest.type.indexOf("multimeasure")<0&&(E.rest.type="whole");var ce=z(J,E,$,te,B.voicetotal>1,this.stemdir,P,K,this.voiceScale);O=ce.noteHead,w=ce.roomTaken,C=ce.roomTakenRight}else{var ee=this.addNoteToAbcElement(J,E,te,this.stemdir,this.style,F,K,T,B);ee.min!==void 0&&(this.minY=Math.min(ee.min,this.minY)),O=ee.noteHead,w=ee.roomTaken,C=ee.roomTakenRight,q=ee.additionalLedgers,D=ee.dir,S=ee.symbolWidth}if(E.lyric!==void 0&&this.addLyric(J,E),E.gracenotes!==void 0&&(w+=this.addGraceNotes(E,B,J,O,this.stemHeight*this.voiceScale,this.isBagpipes,w)),E.decoration){var he=T&&D!=="up"?Math.min(-3,J.bottom-6):J.bottom;this.decoration.createDecoration(B,E.decoration,J.top,O?O.w:0,J,w,D,he,E.positioning,this.hasVocals,this.accentAbove)}if(E.barNumber&&J.addFixed(new d(E.barNumber,-10,0,0,{type:"barNumber"})),M(J,E.minpitch,E.maxpitch,E.rest,S,q,D,-2,1),E.chord!==void 0){var de=y(this.getTextSize,J,E,w,C,S,this.jazzchords,this.germanAlphabet);w=de.roomTaken,C=de.roomTakenRight}return E.startTriplet&&(this.triplet=new s(E.startTriplet,O,{flatBeams:this.flatBeams})),E.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(O),this.triplet&&!E.startTriplet&&!E.endTriplet&&!(E.rest&&E.rest.type==="spacer")&&this.triplet.middleNote(O),J},I.prototype.addSlursAndTies=function(E,T,P,B,O,w){if(T.endTie&&this.ties.length>0){for(var C=!1,S=0;S<this.ties.length;S++)if(this.ties[S].anchor1&&this.ties[S].anchor1.pitch===P.pitch){this.ties[S].setEndAnchor(P),B.setRange(this.ties[S]),this.ties.splice(S,1),C=!0;break}C||(this.ties[0].setEndAnchor(P),B.setRange(this.ties[0]),this.ties.splice(0,1))}var q=B.voicetotal<2?-1:B.voicenumber;if(T.startTie){var D=new h({anchor1:P,force:this.stemdir==="down"||this.stemdir==="up",stemDir:this.stemdir,isGrace:w,voiceNumber:q,style:T.startTie.style});x&&D.setHint(),this.ties[this.ties.length]=D,B.addOther(D),E.startTie=!0}var $,F;if(T.endSlur)for(var K=0;K<T.endSlur.length;K++)F=T.endSlur[K],this.slurs[F]?($=this.slurs[F],$.setEndAnchor(P),B.setRange($),delete this.slurs[F]):($=new h({anchor2:P,stemDir:this.stemdir,voiceNumber:q}),x&&$.setHint(),B.addOther($)),this.startlimitelem&&$.setStartX(this.startlimitelem);else if(!w)for(var te in this.slurs)this.slurs.hasOwnProperty(te)&&this.slurs[te].addInternalNote(P);if(T.startSlur)for(K=0;K<T.startSlur.length;K++)F=T.startSlur[K].label,$=new h({anchor1:P,stemDir:this.stemdir,voiceNumber:q,style:T.startSlur[K].style}),x&&$.setHint(),this.slurs[F]=$,B.addOther($)},I.prototype.addMeasureNumber=function(E,T){var P=this.getTextSize.calc(E,"measurefont","bar-number"),B=0;T.isClef&&(B+=P.width/2);var O=P.width>10&&T.abcelem.type==="treble"?13.5:11;T.addFixed(new d(E,B,P.width,O+P.height/p.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},I.prototype.createBarLine=function(E,T,P){var B=new e(T,0,10,"bar",this.tuneNumber),O=null,w=0;T.barNumber&&this.addMeasureNumber(T.barNumber,B);var C=T.type==="bar_right_repeat"||T.type==="bar_dbl_repeat",S=T.type!=="bar_left_repeat"&&T.type!=="bar_thick_thin"&&T.type!=="bar_invisible",q=T.type==="bar_right_repeat"||T.type==="bar_dbl_repeat"||T.type==="bar_left_repeat"||T.type==="bar_thin_thick"||T.type==="bar_thick_thin",D=T.type==="bar_left_repeat"||T.type==="bar_thick_thin"||T.type==="bar_thin_thin"||T.type==="bar_dbl_repeat",$=T.type==="bar_left_repeat"||T.type==="bar_dbl_repeat";if(C||$){for(var F in this.slurs)this.slurs.hasOwnProperty(F)&&this.slurs[F].setEndX(B);this.startlimitelem=B}if(C&&(B.addRight(new d("dots.dot",w,1,7)),B.addRight(new d("dots.dot",w,1,5)),w+=6),S&&(O=new d(null,w,1,2,{type:"bar",pitch2:10,linewidth:.6}),B.addRight(O)),T.type==="bar_invisible"&&(O=new d(null,w,1,2,{type:"none",pitch2:10,linewidth:.6}),B.addRight(O)),T.decoration&&this.decoration.createDecoration(E,T.decoration,12,q?3:1,B,0,"down",2,T.positioning,this.hasVocals,this.accentAbove),q&&(w+=4,O=new d(null,w,4,2,{type:"bar",pitch2:10,linewidth:4}),B.addRight(O),w+=5),this.partstartelem&&T.endEnding&&(this.partstartelem.anchor2=O,this.partstartelem=null),D&&(w+=3,O=new d(null,w,1,2,{type:"bar",pitch2:10,linewidth:.6}),B.addRight(O)),$&&(w+=3,B.addRight(new d("dots.dot",w,1,7)),B.addRight(new d("dots.dot",w,1,5))),T.startEnding&&P&&E.voicenumber===0){var K=this.getTextSize.calc(T.startEnding,"repeatfont","").width;B.minspacing+=K+10,this.partstartelem=new f(T.startEnding,O,null),E.addOther(this.partstartelem)}return B.extraw-=5,T.chord!==void 0&&y(this.getTextSize,B,T,0,0,0,!1,this.germanAlphabet),B},T0=I,T0}var E0,Bs;function $g(){if(Bs)return E0;Bs=1;var e="http://www.w3.org/2000/svg";function t(c){this.svg=i(),this.currentGroup=[],c.appendChild(this.svg)}t.prototype.clear=function(){if(this.svg){var c=this.svg.parentNode;this.svg=i(),this.currentGroup=[],c&&(c.innerHTML="",c.appendChild(this.svg))}},t.prototype.setTitle=function(c){var u=document.createElement("title"),f=document.createTextNode(c);u.appendChild(f),this.svg.insertBefore(u,this.svg.firstChild)},t.prototype.setResponsiveWidth=function(c,u){if(this.svg.setAttribute("viewBox","0 0 "+c+" "+u),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var f=this.svg.parentNode.getAttribute("class");f?f.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",f+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var g=u/c*100;this.svg.parentNode.style["padding-bottom"]=g+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},t.prototype.setSize=function(c,u){this.svg.setAttribute("width",c),this.svg.setAttribute("height",u)},t.prototype.setAttribute=function(c,u){this.svg.setAttribute(c,u)},t.prototype.setScale=function(c){c!==1?(this.svg.style.transform="scale("+c+","+c+")",this.svg.style["-ms-transform"]="scale("+c+","+c+")",this.svg.style["-webkit-transform"]="scale("+c+","+c+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},t.prototype.insertStyles=function(c){var u=document.createElementNS(e,"style");u.textContent=c,this.svg.insertBefore(u,this.svg.firstChild)},t.prototype.setParentStyles=function(c){for(var u in c)c.hasOwnProperty(u)&&this.svg.parentNode&&(this.svg.parentNode.style[u]=c[u]);if(this.dummySvg){var f=document.querySelector("body");f.removeChild(this.dummySvg),this.dummySvg=null}};function a(c,u,f){var g=f-c;return"M "+c+" "+u+" l "+g+" 0 l 0 1 l "+-g+" 0 z "}function n(c,u,f){var g=f-u;return"M "+c+" "+u+" l 0 "+g+" l 1 0 l 0 "+-g+" z "}t.prototype.rect=function(c){var u=[],f=c.x,g=c.y,d=c.x+c.width,p=c.y+c.height;return u.push(a(f,g,d)),u.push(a(f,p,d)),u.push(n(d,g,p)),u.push(n(f,p,g)),this.path({path:u.join(" "),stroke:"none","data-name":c["data-name"]})},t.prototype.dottedLine=function(c){var u=document.createElementNS(e,"line");u.setAttribute("x1",c.x1),u.setAttribute("x2",c.x2),u.setAttribute("y1",c.y1),u.setAttribute("y2",c.y2),u.setAttribute("stroke",c.stroke),u.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(u,this.svg.firstChild)},t.prototype.rectBeneath=function(c){var u=document.createElementNS(e,"rect");u.setAttribute("x",c.x),u.setAttribute("width",c.width),u.setAttribute("y",c.y),u.setAttribute("height",c.height),c.stroke&&u.setAttribute("stroke",c.stroke),c["stroke-opacity"]&&u.setAttribute("stroke-opacity",c["stroke-opacity"]),c.fill&&u.setAttribute("fill",c.fill),c["fill-opacity"]&&u.setAttribute("fill-opacity",c["fill-opacity"]),this.svg.insertBefore(u,this.svg.firstChild)},t.prototype.text=function(c,u,f,g){var d=document.createElementNS(e,"text");d.setAttribute("stroke","none");for(var p in u)u.hasOwnProperty(p)&&d.setAttribute(p,u[p]);for(var l=u["data-name"]=="free-text",o=(""+c).split(`
|
|
115
|
+
`),h=0;h<o.length;h++)if(!(l&&o[h]=="")){var s=document.createElementNS(e,"tspan");if(g)for(var v in g)g.hasOwnProperty(v)&&s.setAttribute(v,g[v]);if(s.setAttribute("x",u.x?u.x:0),h!==0&&s.setAttribute("dy","1.2em"),o[h].indexOf("")!==-1){var y=o[h].split("");if(s.textContent=y[0],y[1]){var m=document.createElementNS(e,"tspan");m.setAttribute("dy","-0.3em"),m.setAttribute("style","font-size:0.7em"),m.textContent=y[1],s.appendChild(m)}if(y[2]){var _=y[1]?"0.4em":"0.1em",k=document.createElementNS(e,"tspan");k.setAttribute("dy",_),k.setAttribute("style","font-size:0.7em"),k.textContent=y[2],s.appendChild(k)}}else l&&o[h].trim()==""?s.innerHTML=" ":s.textContent=o[h];d.appendChild(s)}return f?f.appendChild(d):this.append(d),d},t.prototype.richTextLine=function(c,u,f,g,d,p){var l=document.createElementNS(e,"text");l.setAttribute("stroke","none"),l.setAttribute("class",g),l.setAttribute("x",u),l.setAttribute("y",f),l.setAttribute("text-anchor",d),l.setAttribute("dominant-baseline","middle");for(var o=0;o<c.length;o++){for(var h=c[o],s=document.createElementNS(e,"tspan"),v=Object.keys(h.attrs),y=0;y<v.length;y++){var m=h.attrs[v[y]];m!==""&&s.setAttribute(v[y],m)}s.textContent=h.content,l.appendChild(s)}return p?p.appendChild(l):this.append(l),l},t.prototype.guessWidth=function(c,u){var f=this.createDummySvg(),g=this.text(c,u,f),d;try{d=g.getBBox(),isNaN(d.height)||!d.height?d={width:u["font-size"]/2,height:u["font-size"]+2}:d={width:d.width,height:d.height}}catch{d={width:u["font-size"]/2,height:u["font-size"]+2}}return f.removeChild(g),d},t.prototype.createDummySvg=function(){if(!this.dummySvg){this.dummySvg=i();var c=["display: block !important;","height: 1px;","width: 1px;","position: absolute;"];this.dummySvg.setAttribute("style",c.join(""));var u=document.querySelector("body");u.appendChild(this.dummySvg)}return this.dummySvg};var r={};t.prototype.getTextSize=function(c,u,f){if(typeof c=="number"&&(c=""+c),!c||c.match(/^\s+$/))return{width:0,height:0};var g;if(c.length<20&&(g=c+JSON.stringify(u),r[g]))return r[g];var d=!f;f||(f=this.text(c,u));var p;try{p=f.getBBox(),isNaN(p.height)||!p.height?p=this.guessWidth(c,u):p={width:p.width,height:p.height}}catch{p=this.guessWidth(c,u)}return d&&(this.currentGroup.length>0?this.currentGroup[0].removeChild(f):this.svg.removeChild(f)),g&&(r[g]=p),p},t.prototype.openGroup=function(c){c=c||{};var u=document.createElementNS(e,"g");return c.klass&&u.setAttribute("class",c.klass),c.fill&&u.setAttribute("fill",c.fill),c.stroke&&u.setAttribute("stroke",c.stroke),c["data-name"]&&u.setAttribute("data-name",c["data-name"]),c.prepend?this.prepend(u):this.append(u),this.currentGroup.unshift(u),u},t.prototype.closeGroup=function(){var c=this.currentGroup.shift();return c&&c.children.length===0?(c.parentElement.removeChild(c),null):c},t.prototype.path=function(c){var u=document.createElementNS(e,"path");for(var f in c)c.hasOwnProperty(f)&&(f==="path"?u.setAttributeNS(null,"d",c.path):f==="klass"?u.setAttributeNS(null,"class",c[f]):c[f]!==void 0&&u.setAttributeNS(null,f,c[f]));return this.append(u),u},t.prototype.pathToBack=function(c){var u=document.createElementNS(e,"path");for(var f in c)c.hasOwnProperty(f)&&(f==="path"?u.setAttributeNS(null,"d",c.path):f==="klass"?u.setAttributeNS(null,"class",c[f]):u.setAttributeNS(null,f,c[f]));return this.prepend(u),u},t.prototype.lineToBack=function(c){for(var u=document.createElementNS(e,"line"),f=Object.keys(c),g=0;g<f.length;g++)u.setAttribute(f[g],c[f[g]]);return this.prepend(u),u},t.prototype.append=function(c){this.currentGroup.length>0?this.currentGroup[0].appendChild(c):this.svg.appendChild(c)},t.prototype.prepend=function(c){this.currentGroup.length>0?this.currentGroup[0].appendChild(c):this.svg.insertBefore(c,this.svg.firstChild)},t.prototype.setAttributeOnElement=function(c,u){for(var f in u)u.hasOwnProperty(f)&&c.setAttributeNS(null,f,u[f])},t.prototype.moveElementToChild=function(c,u){c.appendChild(u)};function i(){var c=document.createElementNS(e,"svg");return c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),c.setAttribute("role","img"),c.setAttribute("fill","currentColor"),c.setAttribute("stroke","currentColor"),c}return E0=t,E0}var A0,Ls;function Zg(){if(Ls)return A0;Ls=1;var e=Ve(),t=$g(),a=function(n){this.paper=new t(n),this.controller=null,this.space=3*e.SPACE,this.padding={},this.reset(),this.firefox112=navigator.userAgent.indexOf("Firefox/112.0")>=0};return a.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},a.prototype.newTune=function(n){this.abctune=n,this.setVerticalSpace(n.formatting),this.isPrint=n.media==="print",this.setPadding(n)},a.prototype.setLineThickness=function(n){this.lineThickness=n},a.prototype.setPaddingOverride=function(n){this.paddingOverride={top:n.paddingtop,bottom:n.paddingbottom,right:n.paddingright,left:n.paddingleft}},a.prototype.setPadding=function(n){function r(i,c,u,f,g){n.formatting[u]!==void 0?i.padding[c]=n.formatting[u]:i.paddingOverride[c]!==void 0?i.padding[c]=i.paddingOverride[c]:i.isPrint?i.padding[c]=f:i.padding[c]=g}r(this,"top","topmargin",38,15),r(this,"bottom","botmargin",38,15),r(this,"left","leftmargin",68,15),r(this,"right","rightmargin",68,15)},a.prototype.adjustNonScaledItems=function(n){this.padding.top/=n,this.padding.bottom/=n,this.padding.left/=n,this.padding.right/=n,this.abctune.formatting.headerfont.size/=n,this.abctune.formatting.footerfont.size/=n},a.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:26.67+10,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},a.prototype.setVerticalSpace=function(n){n.staffsep!==void 0&&(this.spacing.staffSeparation=n.staffsep*4/3),n.composerspace!==void 0&&(this.spacing.composer=n.composerspace*4/3),n.partsspace!==void 0&&(this.spacing.parts=n.partsspace*4/3),n.textspace!==void 0&&(this.spacing.text=n.textspace*4/3),n.musicspace!==void 0&&(this.spacing.music=n.musicspace*4/3),n.titlespace!==void 0&&(this.spacing.title=n.titlespace*4/3),n.sysstaffsep!==void 0&&(this.spacing.systemStaffSeparation=n.sysstaffsep*4/3),n.stafftopmargin!==void 0&&(this.spacing.staffTopMargin=n.stafftopmargin*4/3),n.subtitlespace!==void 0&&(this.spacing.subtitle=n.subtitlespace*4/3),n.topspace!==void 0&&(this.spacing.top=n.topspace*4/3),n.vocalspace!==void 0&&(this.spacing.vocal=n.vocalspace*4/3),n.wordsspace!==void 0&&(this.spacing.words=n.wordsspace*4/3)},a.prototype.calcY=function(n){return this.y-n*e.STEP},a.prototype.yToPitch=function(n){return n/e.STEP},a.prototype.moveY=function(n,r){r===void 0&&(r=1),this.y+=n*r},a.prototype.absolutemoveY=function(n){this.y=n},A0=a,A0}var M0,Os;function Gg(){if(Os)return M0;Os=1;function e(t,a,n,r,i,c){var u=t.text;this.rows=[];var f;a&&this.rows.push({move:a});var g=n.calc("textfont","defined-text");if(u==="")this.rows.push({move:g.attr["font-size"]*2});else if(typeof u=="string"){let y=function(m){return m.replace(/^[ \t]*\n/gm,`X
|
|
116
|
+
`)};var v=y;this.rows.push({move:g.attr["font-size"]/2}),this.rows.push({left:r,text:u,font:"textfont",klass:"defined-text",anchor:"start",startChar:t.startChar,endChar:t.endChar,absElemType:"freeText",name:"free-text"});var d=y(u);f=c.calc(d,"textfont","defined-text"),this.rows.push({move:f.height})}else if(u){for(var p=0,l=r,o="textfont",h=0;h<u.length;h++)u[h].font?o=u[h].font:o="textfont",this.rows.push({left:l,text:u[h].text,font:o,klass:"defined-text",anchor:"start",startChar:t.startChar,endChar:t.endChar,absElemType:"freeText",name:"free-text"}),f=c.calc(u[h].text,n.calc(o,"defined-text").font,"defined-text"),l+=f.width+f.height/2,p=Math.max(p,f.height);this.rows.push({move:p})}else if(t.length===1){var s=i/2;this.rows.push({left:s,text:t[0].text,font:"textfont",klass:"defined-text",anchor:"middle",startChar:t.startChar,endChar:t.endChar,absElemType:"freeText",name:"free-text"}),f=c.calc(t[0].text,"textfont","defined-text"),this.rows.push({move:f.height})}}return M0=e,M0}var N0,Ds;function Ug(){if(Ds)return N0;Ds=1;function e(t,a,n){this.rows=[],t&&this.rows.push({move:t}),this.rows.push({separator:a,absElemType:"separator"}),n&&this.rows.push({move:n})}return N0=e,N0}var P0,Fs;function jg(){if(Fs)return P0;Fs=1;function e(t,a,n,r,i,c){this.rows=[],t&&this.rows.push({move:t});var u=a.titleleft?"start":"middle",f=a.titleleft?i:r;this.rows.push({left:f,text:n.text,font:"subtitlefont",klass:"text subtitle",anchor:u,startChar:n.startChar,endChar:n.endChar,absElemType:"subtitle",name:"subtitle"});var g=c.calc(n.text,"subtitlefont","text subtitle");this.rows.push({move:g.height})}return P0=e,P0}var z0,Hs;function Ua(){if(Hs)return z0;Hs=1;function e(t,a,n){if(a.text){a.marginLeft||(a.marginLeft=0),a.klass||(a.klass=""),a.anchor||(a.anchor="start"),a.info||(a.info={startChar:-2,endChar:-2}),a.marginTop&&t.push({move:a.marginTop});var r={left:a.marginLeft,text:a.text,font:a.font,anchor:a.anchor,startChar:a.info.startChar,endChar:a.info.endChar,"dominant-baseline":a["dominant-baseline"]};a.absElemType&&(r.absElemType=a.absElemType),!a.inGroup&&a.klass&&(r.klass=a.klass),a.name&&(r.name=a.name),t.push(r);var i=n.calc("A",a.font,a.klass),c=a.text.split(`
|
|
117
|
+
`).length;if(a.text[a.text.length-1]===`
|
|
118
|
+
`&&c--,!a.noMove){var u=i.height*1.1*c;t.push({move:Math.round(u)}),a.marginBottom&&t.push({move:a.marginBottom})}}}return z0=e,z0}var I0,$s;function ql(){if($s)return I0;$s=1;const e=Ua();function t(a,n,r,i,c,u,f,g){var d=g.calc("i",r,i);if(n==="")a.push({move:d.height});else{if(typeof n=="string"){e(a,{marginLeft:u,text:n,font:r,klass:i,marginTop:f.marginTop,anchor:f.anchor,absElemType:f.absElemType,info:f.info,name:c},g);return}f.marginTop&&a.push({move:f.marginTop});var p=0,l={left:u,anchor:f.anchor,phrases:[]};i&&(l.klass=i),a.push(l);for(var o=0;o<n.length;o++){var h=n[o],s=h.font?h.font:g.attr(r,i).font,v={content:h.text};s&&(v.attrs={"font-family":g.getFamily(s.face),"font-size":s.size,"font-weight":s.weight,"font-style":s.style,"font-decoration":s.decoration}),l.phrases.push(v);var y=g.calc(h.text,s,i);p=Math.max(p,y.height),h.text[h.text.length-1]===" "&&d.width}a.push({move:p})}}return I0=t,I0}var R0,Zs;function Yg(){if(Zs)return R0;Zs=1;const e=Ua(),t=ql();function a(n,r,i,c,u,f,g,d,p,l){if(this.rows=[],n.header&&f){var o=l.calc("X","headerfont","abcjs-header abcjs-meta-top").height;e(this.rows,{marginLeft:g,text:n.header.left,font:"headerfont",klass:"header meta-top",marginTop:-o,info:r.header,name:"header"},l),e(this.rows,{marginLeft:g+u/2,text:n.header.center,font:"headerfont",klass:"header meta-top",marginTop:-o,anchor:"middle",info:r.header,name:"header"},l),e(this.rows,{marginLeft:g+u,text:n.header.right,font:"headerfont",klass:"header meta-top",marginTop:-o,anchor:"end",info:r.header,name:"header"},l)}f&&this.rows.push({move:d.top});var h=i.titleleft?"start":"middle",s=i.titleleft?g:g+u/2;if(n.title){var v=p?"abcjs-title":"";t(this.rows,n.title,"titlefont",v,"title",s,{marginTop:d.title,anchor:h,absElemType:"title",info:r.title},l)}if(c.length)for(var y=0;y<c.length&&c[y].subtitle;){var v=p?"abcjs-text abcjs-subtitle":"";t(this.rows,c[y].subtitle.text,"subtitlefont",v,"subtitle",s,{marginTop:d.subtitle,anchor:h,absElemType:"subtitle",info:c[y].subtitle},l),y++}if(n.rhythm||n.origin||n.composer){if(this.rows.push({move:d.composer}),n.rhythm&&n.rhythm.length>0){var m=!!(n.composer||n.origin),v=p?"abcjs-rhythm":"";e(this.rows,{marginLeft:g,text:n.rhythm,font:"infofont",klass:v,absElemType:"rhythm",noMove:m,info:r.rhythm,name:"rhythm"},l)}n.composer&&n.composer,n.origin&&n.origin;var _=n.composer?n.composer:"";if(n.origin&&(typeof _=="string"&&typeof n.origin=="string"?_+=" ("+n.origin+")":typeof _=="string"&&typeof n.origin!="string"?(_=[{text:_}],_.push({text:" ("}),_=_.concat(n.origin),_.push({text:")"})):(_.push({text:" ("}),_=_.concat(n.origin),_.push({text:")"}))),_){var v=p?"abcjs-composer":"";t(this.rows,_,"composerfont",v,"composer",g+u,{anchor:"end",absElemType:"composer",info:r.composer,ingroup:!0},l)}}if(n.author&&n.author.length>0){var v=p?"abcjs-author":"";t(this.rows,n.author,"composerfont",v,"author",g+u,{anchor:"end",absElemType:"author",info:r.author},l)}if(n.partOrder&&n.partOrder.length>0){var v=p?"abcjs-part-order":"";t(this.rows,n.partOrder,"partsfont",v,"part-order",g,{absElemType:"partOrder",info:r.partOrder,anchor:"start"},l)}}return R0=a,R0}var q0,Gs;function Wg(){if(Gs)return q0;Gs=1;const e=Ua(),t=ql();function a(i,c,u,f,g,d,p){this.rows=[],i.unalignedWords&&i.unalignedWords.length>0&&this.unalignedWords(i.unalignedWords,f,g,d,p),this.extraText(i,f,g,d,p),i.footer&&u&&this.footer(i.footer,c,f,p)}a.prototype.unalignedWords=function(i,c,u,f,g){var d=f?"abcjs-unaligned-words":"",p="wordsfont",l=g.calc("i",p,d);this.rows.push({move:u.words}),r(this.rows,"",i,c,p,"unalignedWords","unalignedWords",d,"unalignedWords",u,f,g),this.rows.push({move:l.height})};function n(i,c,u,f,g,d,p){u&&(c&&(typeof u=="string"?u=c+u:u=[{text:c}].concat(u)),g=d?"abcjs-extra-text "+g:"",t(i,u,"historyfont",g,"description",f,{absElemType:"extraText",anchor:"start"},p))}function r(i,c,u,f,g,d,p,l,o,h,s,v){if(u){l=s?"abcjs-extra-text "+l:"";var y=v.calc("A",g,l);if(typeof u=="string")c&&(u=c+`
|
|
119
|
+
`+u),e(i,{marginLeft:f,text:u,font:g,absElemType:"extraText",name:o,"dominant-baseline":"middle",klass:l},v);else{i.push({startGroup:p,klass:l,name:o}),i.push({move:h.info}),c&&(e(i,{marginLeft:f,text:c,font:g,absElemType:"extraText",name:o,"dominant-baseline":"middle"},v),i.push({move:y.height*3/4}));for(var m=0;m<u.length;m++)t(i,u[m],g,"",o,f,{anchor:"start"},v),m<u.length-1&&typeof u[m]=="string"&&typeof u[m+1]!="string"&&i.push({move:y.height*3/4});i.push({endGroup:p,absElemType:d,startChar:-1,endChar:-1,name:o}),i.push({move:y.height})}}}return a.prototype.extraText=function(i,c,u,f,g){n(this.rows,"Book: ",i.book,c,"abcjs-book",f,g),n(this.rows,"Source: ",i.source,c,"abcjs-source",f,g),n(this.rows,"Discography: ",i.discography,c,"abcjs-discography",f,g),r(this.rows,"Notes:",i.notes,c,"historyfont","extraText","notes","abcjs-notes","description",u,f,g),n(this.rows,"Transcription: ",i.transcription,c,"abcjs-transcription",f,g),r(this.rows,"History:",i.history,c,"historyfont","extraText","history","abcjs-history","description",u,f,g),n(this.rows,"Copyright: ",i["abc-copyright"],c,"abcjs-copyright",f,g),n(this.rows,"Creator: ",i["abc-creator"],c,"abcjs-creator",f,g),n(this.rows,"Edited By: ",i["abc-edited-by"],c,"abcjs-edited-by",f,g)},a.prototype.footer=function(i,c,u,f){var g="header meta-bottom",d="footerfont";this.rows.push({startGroup:"footer",klass:g}),e(this.rows,{marginLeft:u,text:i.left,font:d,klass:g,name:"footer"},f),e(this.rows,{marginLeft:u+c/2,text:i.center,font:d,klass:g,anchor:"middle",name:"footer"},f),e(this.rows,{marginLeft:u+c,text:i.right,font:d,klass:g,anchor:"end",name:"footer"},f)},q0=a,q0}var B0,Us;function Bl(){if(Us)return B0;Us=1;function e(a,n,r,i){if(a.indexOf(n)===0){var c=a.replace(n,""),u=parseInt(c,10);""+u===c&&(r[i]=u)}}function t(a,n){var r=[];if(a.absEl.elemset){for(var i={},c=0;c<a.absEl.elemset.length;c++){var u=a.absEl.elemset[c];if(u)for(var f=u.getAttribute("class").split(" "),g=0;g<f.length;g++)i[f[g]]=!0}for(var d=0;d<Object.keys(i).length;d++)r.push(Object.keys(i)[d])}for(var p={},l=0;l<r.length;l++)e(r[l],"abcjs-v",p,"voice"),e(r[l],"abcjs-l",p,"line"),e(r[l],"abcjs-m",p,"measure");a.staffPos&&(p.staffPos=a.staffPos);for(var o=n.target;o&&o.dataset&&!o.dataset.name&&o.tagName.toLowerCase()!=="svg";)o=o.parentNode;for(var h=n.target;h&&h.dataset&&!h.dataset.index&&h.tagName.toLowerCase()!=="svg";)h=h.parentNode;return h&&h.dataset&&(p.name=h.dataset.name,p.clickedName=o.dataset.name,p.parentClasses=h.classList),o&&o.classList&&(p.clickedClasses=o.classList),p.selectableElement=a.svgEl,{classes:r,analysis:p}}return B0=t,B0}var L0,js;function Vg(){if(js)return L0;js=1;var e=Ve(),t=Bl();function a(b,A){if(b.rangeHighlight=_,b.dragging)for(var N=0;N<b.selectables.length;N++){var M=b.selectables[N];M.svgEl.getAttribute("selectable")==="true"&&(M.svgEl.setAttribute("tabindex",0),M.svgEl.setAttribute("data-index",N),M.svgEl.addEventListener("keydown",i.bind(b)),M.svgEl.addEventListener("keyup",c.bind(b)),M.svgEl.addEventListener("focus",r.bind(b)))}for(var z=0;z<A.length;z++)A[z].addEventListener("touchstart",o.bind(b),{passive:!0}),A[z].addEventListener("touchmove",h.bind(b),{passive:!0}),A[z].addEventListener("touchend",s.bind(b),{passive:!0}),A[z].addEventListener("mousedown",o.bind(b)),A[z].addEventListener("mousemove",h.bind(b)),A[z].addEventListener("mouseup",s.bind(b))}function n(b){var A=1,N=1,M=b.target.closest("svg"),z=0;M&&M.viewBox&&M.viewBox.baseVal&&(M.viewBox.baseVal.width!==0&&(A=M.viewBox.baseVal.width/M.clientWidth),M.viewBox.baseVal.height!==0&&(N=M.viewBox.baseVal.height/M.clientHeight),z=M.viewBox.baseVal.y);var L=b.target&&b.target.tagName==="svg",E,T;return L?(E=b.offsetX,T=b.offsetY):(E=b.layerX,T=b.layerY),E=E*A,T=T*N,[E,T+z]}function r(b){this.dragMechanism==="keyboard"&&this.dragYStep!==0&&this.dragTarget&&y.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,b),this.dragYStep=0}function i(b){switch(b.keyCode){case 38:case 40:b.preventDefault()}}function c(b){var A=!1,N=b.target.dataset.index;switch(b.keyCode){case 13:case 32:A=!0,this.dragTarget=this.selectables[N],this.dragIndex=N,this.dragMechanism="keyboard",s.bind(this)(b);break;case 38:A=!0,this.dragTarget=this.selectables[N],this.dragIndex=N,this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*e.STEP+")"));break;case 40:A=!0,this.dragTarget=this.selectables[N],this.dragIndex=N,this.dragMechanism="keyboard",this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*e.STEP+")"));break;case 9:this.dragYStep!==0&&s.bind(this)(b);break}A&&b.preventDefault()}function u(b,A){if(!A)return-1;var N=A.dataset;if(!N)return-1;for(var M=N.index,z=0;z<b.length;z++){var L=b[z].svgEl.dataset;if(L&&M===L.index)return z}return-1}function f(b,A,N){for(var M=9999999,z=-1,L=0;L<b.selectables.length&&M>0;L++){var E=b.selectables[L];if(b.getDim(E),E.dim.left<A&&E.dim.right>A&&E.dim.top<N&&E.dim.bottom>N)z=L,M=0;else if(E.dim.top<N&&E.dim.bottom>N){var T=Math.min(Math.abs(E.dim.left-A),Math.abs(E.dim.right-A));T<M&&(M=T,z=L)}else if(E.dim.left<A&&E.dim.right>A){var P=Math.min(Math.abs(E.dim.top-N),Math.abs(E.dim.bottom-N));P<M&&(M=P,z=L)}else{var B=Math.abs(A-E.dim.left)>Math.abs(A-E.dim.right)?Math.abs(A-E.dim.right):Math.abs(A-E.dim.left),O=Math.abs(N-E.dim.top)>Math.abs(N-E.dim.bottom)?Math.abs(N-E.dim.bottom):Math.abs(N-E.dim.top),w=Math.sqrt(B*B+O*O);w<M&&(M=w,z=L)}}return z>=0&&M<=12?z:-1}function g(b,A,N){if(b.x<=A.offsetX&&b.x+b.width>=A.offsetX&&b.y<=A.offsetY&&b.y+b.height>=A.offsetY)return[A.offsetX,A.offsetY];var M=Math.abs(A.layerY/N-A.offsetY);return M<3?[A.offsetX,A.offsetY]:[A.layerX,A.layerY]}function d(b){if(!b)return null;if(b.tagName==="svg")return b;if(!b.getAttribute)return null;for(var A=b.getAttribute("selectable");!A;)b.parentElement?(b=b.parentElement,b.tagName==="svg"?A=!0:A=b.getAttribute("selectable")):A=!0;return b}function p(b,A){var N,M,z,L=u(b.selectables,d(A.target));return L>=0?(z=g(b.selectables[L].svgEl.getBBox(),A,b.scale),N=z[0],M=z[1]):(z=n(A),N=z[0],M=z[1],L=f(b,N,M)),{x:N,y:M,clickedOn:L}}function l(b){if(!(!b||!b.target||!b.touches||b.touches.length<1)){var A=b.target.getBoundingClientRect(),N=b.touches[0].pageX-A.left,M=b.touches[0].pageY-A.top;b.touches[0].offsetX=N,b.touches[0].offsetY=M,b.touches[0].layerX=b.touches[0].pageX,b.touches[0].layerY=b.touches[0].pageY}}function o(b){var A=b;b.type==="touchstart"&&(l(b),b.touches.length>0&&(A=b.touches[0]));var N=p(this,A);N.clickedOn>=0&&(b.type==="touchstart"||b.button===0)&&this.selectables[N.clickedOn]&&(this.dragTarget=this.selectables[N.clickedOn],this.dragIndex=N.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:N.x,y:N.y},this.dragging&&this.dragTarget.isDraggable&&(R(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function h(b){var A=b;if(b.type==="touchmove"&&(l(b),b.touches.length>0&&(A=b.touches[0])),this.lastTouchMove=b,!(!this.dragTarget||!this.dragging||!this.dragTarget.isDraggable||this.dragMechanism!=="mouse"||!this.dragMouseStart)){var N=p(this,A),M=Math.round((N.y-this.dragMouseStart.y)/e.STEP);M!==this.dragYStep&&(this.dragYStep=M,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+M*e.STEP+")"))}}function s(b){var A=b;b.type==="touchend"&&this.lastTouchMove&&(l(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(A=this.lastTouchMove.touches[0])),this.dragTarget&&(m.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),y.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,A),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),I(this.renderer.svg,"abcjs-dragging-in-progress"))}function v(b){b>=0&&b<this.selectables.length&&(this.dragTarget=this.selectables[b],this.dragIndex=b,this.dragMechanism="keyboard",s.bind(this)({target:this.dragTarget.svgEl}))}function y(b,A,N,M,z){for(var L=t(b,z),E=L.classes,T=L.analysis,P=0;P<this.listeners.length;P++)this.listeners[P](b.absEl.abcelem,b.absEl.tuneNumber,E.join(" "),T,{step:A,max:N,index:M,setSelection:v.bind(this)},z)}function m(){for(var b=0;b<this.selected.length;b++)this.selected[b].unhighlight(void 0,this.renderer.foregroundColor);this.selected=[]}function _(b,A){m.bind(this)();for(var N=0;N<this.staffgroups.length;N++)for(var M=this.staffgroups[N].voices,z=0;z<M.length;z++)for(var L=M[z].children,E=0;E<L.length;E++){var T=L[E].abcelem.startChar,P=L[E].abcelem.endChar;(A>T&&b<P||A===b&&A===P)&&(this.selected[this.selected.length]=L[E],L[E].highlight(void 0,this.selectionColor))}}function k(b){var A=b.getAttribute("class");A||(A="");for(var N=A.split(" "),M={},z=0;z<N.length;z++)M[N[z]]=!0;return M}function x(b,A){var N=[];for(var M in A)A.hasOwnProperty(M)&&N.push(M);b.setAttribute("class",N.join(" "))}function R(b,A){if(b){var N=k(b.svg);N[A]=!0,x(b.svg,N)}}function I(b,A){if(b){var N=k(b.svg);delete N[A],x(b.svg,N)}}return L0=a,L0}var O0,Ys;function ja(){if(Ys)return O0;Ys=1;function e(t,a,n,r,i){return a+(r-a)/(n-t)*(i-t)}return O0=e,O0}var D0,Ws;function Xg(){if(Ws)return D0;Ws=1;var e=at(),t=Ve(),a=ja(),n=function(l){if(!(l.elems.length===0||l.allrests)){var o=u(l.stemsUp,l.isgrace),h=l.elems[0],s=l.elems[l.elems.length-1],v=0,y=l.stemsUp?h.abcelem.maxpitch:h.abcelem.minpitch;v=i(h,l.stemsUp,y,v),v=i(s,l.stemsUp,y,v),v=Math.max(l.stemHeight,v+3);var m=g(l.average,l.elems.length,v,l.stemsUp,h.abcelem.averagepitch,s.abcelem.averagepitch,l.isflat,l.min,l.max,l.isgrace),_=f(l.stemsUp,h,s);l.addBeam({startX:_[0],endX:_[1],startY:m[0],endY:m[1],dy:o});for(var k=p(l.elems,l.stemsUp,l.beams[0],l.isgrace,o),x=0;x<k.length;x++)l.addBeam(k[x]);d(l.elems,l.stemsUp,l.beams[0],o,l.mainNote)}},r=function(l){return l===void 0?0:Math.floor(Math.log(l)/Math.log(2))};function i(l,o,h,s){if(!l.children)return s;for(var v=0;v<l.children.length;v++){var y=l.children[v];o&&y.top!==void 0&&y.c==="flags.ugrace"?s=Math.max(s,y.top-h):!o&&y.bottom!==void 0&&y.c==="flags.ugrace"&&(s=Math.max(s,h-y.bottom+7))}return s}function c(l,o,h,s){if(s)return 0;var v=l-o,y=h/2;return v>y&&(v=y),v<-y&&(v=-y),v}function u(l,o){var h=l?t.STEP:-t.STEP;return o&&(h=h*.4),h}function f(l,o,h){var s=o.heads[l?0:o.heads.length-1],v=h.heads[l?0:h.heads.length-1],y=s.x;l&&(y+=s.w-.6);var m=v.x;return m+=l?v.w:.6,[y,m]}function g(l,o,h,s,v,y,m,_,k,x){var R=h-2,I=h-2,b=Math.round(s?Math.max(l+R,k+I):Math.min(l-R,_-I)),A=c(v,y,o,m),N=b+Math.floor(A/2),M=b+Math.floor(-A/2);return x||(s&&b<6||!s&&b>6)&&(N=6,M=6),[N,M]}function d(l,o,h,s,v){for(var y=0;y<l.length;y++){var m=l[y];if(!m.abcelem.rest){var _=!m.addExtra,k=_?v:m,x=m.heads[o?0:m.heads.length-1],R=1/5,I=x.pitch+(o?R:-R),b=o?x.w:0;_||(b+=x.dx);var A=x.x+b,N=a(h.startX,h.startY,h.endX,h.endY,A),M=o?-.6:.6;o||(N-=s/2/t.STEP),_&&(b+=m.heads[0].dx),x.c==="noteheads.slash.quarter"&&(o?I+=1:I-=1);var z=new e(null,b,0,I,{type:"stem",pitch2:N,linewidth:M});z.setX(k.x),k.addRight(z)}}}function p(l,o,h,s,v){for(var y=[],m=[],_=0;_<l.length;_++){var k=l[_];if(!k.abcelem.rest){var x=k.heads[o?0:k.heads.length-1],R=x.x+(o?x.w:0),I=a(h.startX,h.startY,h.endX,h.endY,R),b=o?-1.5:1.5;s&&(b=b*2/3);var A=k.abcelem.duration;A===0&&(A=.25);for(var N=r(A);N<-3;N++){var M=-4-N;if(m[M]?m[M].single=!1:m[M]={x:R+(o?-.6:0),y:I+b*(M+1),durlog:N,single:!0},_>0&&k.abcelem.beambr&&k.abcelem.beambr<=M+1){m[M].split||(m[M].split=[m[M].x]);var z=f(o,l[_-1],k);m[M].split[m[M].split.length-1]>=z[0]&&(z[0]+=k.w),m[M].split.push(z[0]),m[M].split.push(z[1])}}for(var L=m.length-1;L>=0;L--)if(_===l.length-1||r(l[_+1].abcelem.duration)>-L-4){var E=R,T=I+b*(L+1);m[L].single&&(_===0?E=R+5:_===l.length-1?E=R-5:l[_-1].duration===l[_+1].duration?E=_%2===0?R+5:R-5:E=l[_-1].duration>l[_+1].duration?R+5:R-5,T=a(h.startX,h.startY,h.endX,h.endY,E)+b*(L+1));var P={startX:m[L].x,endX:E,startY:m[L].y,endY:T,dy:v};if(m[L].split!==void 0){var B=m[L].split;P.endX<=B[B.length-1]&&(B[B.length-1]-=k.w),B.push(P.endX),P.split=m[L].split}y.push(P),m=m.slice(0,L)}}}return y}return D0=n,D0}var F0,Vs;function Kg(){if(Vs)return F0;Vs=1;var e=ja();function t(i){if(i.anchor1&&i.anchor2){i.hasBeam=!!i.anchor1.parent.beam&&i.anchor1.parent.beam===i.anchor2.parent.beam;var c=i.anchor1.parent.beam;if(i.hasBeam&&(c.elems[0]!==i.anchor1.parent||c.elems[c.elems.length-1]!==i.anchor2.parent)&&(i.hasBeam=!1),i.hasBeam){var u=a(c)?i.anchor1.x+i.anchor1.w:i.anchor1.x;i.yTextPos=n(u,i.anchor2.x,c),i.yTextPos+=a(c)?3:-2,i.xTextPos=r(u,i.anchor2.x),i.top=i.yTextPos+1,i.bottom=i.yTextPos-2,a(c)&&(i.endingHeightAbove=4)}else{i.startNote=Math.max(i.anchor1.parent.top,9)+4,i.endNote=Math.max(i.anchor2.parent.top,9)+4,i.anchor1.parent.type==="rest"&&i.anchor2.parent.type!=="rest"?i.startNote=i.endNote:i.anchor2.parent.type==="rest"&&i.anchor1.parent.type!=="rest"&&(i.endNote=i.startNote);for(var f=0,g=0;g<i.middleElems.length;g++)f=Math.max(f,i.middleElems[g].top);f+=4,(f>i.startNote||f>i.endNote)&&(i.startNote=f,i.endNote=f),i.flatBeams&&(i.startNote=Math.max(i.startNote,i.endNote),i.endNote=Math.max(i.startNote,i.endNote)),i.yTextPos=i.startNote+(i.endNote-i.startNote)/2,i.xTextPos=i.anchor1.x+(i.anchor2.x+i.anchor2.w-i.anchor1.x)/2,i.top=i.yTextPos+1}}delete i.middleElems,delete i.flatBeams}function a(i){return i.stemsUp}function n(i,c,u){if(u.beams.length===0)return 0;u=u.beams[0];var f=i+(c-i)/2;return e(u.startX,u.startY,u.endX,u.endY,f)}function r(i,c){return i+(c-i)/2}return F0=t,F0}var H0,Xs;function Jg(){if(Xs)return H0;Xs=1;var e=Xg(),t=ja(),a=Kg(),n=function(d){for(var p=0;p<d.beams.length;p++)if(d.beams[p].type==="BeamElem"){e(d.beams[p]),r(d.beams[p]);for(var l=0;l<d.beams[p].elems.length;l++)d.adjustRange(d.beams[p].elems[l])}for(d.staff.specialY.chordLines=c(d.children),p=0;p<d.otherchildren.length;p++){var o=d.otherchildren[p];o.type==="TripletElem"&&(a(o),d.adjustRange(o))}d.staff.top=Math.max(d.staff.top,d.top),d.staff.bottom=Math.min(d.staff.bottom,d.bottom)};function r(d){for(var p=1.5,l=0;l<d.elems.length;l++){var o=d.elems[l];if(o.top)for(var h=g(o,d),s=0;s<o.children.length;s++){var v=o.children[s];if(v.klass==="ornament"&&v.position!=="below"&&v.bottom-p<h){var y=h-v.bottom+p;v.bottom+=y,v.top+=y,v.pitch+=y,h=o.top=v.top}}}}function i(d,p){var l=p.getChordDim();if(l){for(var o=0;o<d.length;o++){var h=d[o]<l.left;if(h){o>0&&p.putChordInLane(o),d[o]=l.right;return}}d.push(l.right),p.putChordInLane(d.length-1)}}function c(d){var p=[0],l=[0],o,h,s;for(o=0;o<d.length;o++){for(h=0;h<d[o].children.length;h++)s=d[o].children[h],s.chordHeightAbove&&i(p,s);for(h=d[o].children.length-1;h>=0;h--)s=d[o].children[h],s.chordHeightBelow&&i(l,s)}return(p.length>1||l.length>1)&&f(d,p.length,l.length),{above:p.length,below:l.length}}function u(d){for(var p=0,l=0;l<d.children.length;l++){var o=d.children[l];o.chordHeightBelow&&p++}return p}function f(d,p,l){for(var o=0;o<d.length;o++){u(d[o]);for(var h=0;h<d[o].children.length;h++){var s=d[o].children[h];s.chordHeightAbove&&s.invertLane(p)}}}function g(d,p){return p=p.beams[0],t(p.startX,p.startY,p.endX,p.endY,d.x)}return H0=n,H0}var $0,Ks;function Qg(){if(Ks)return $0;Ks=1;var e=Ve(),t=function(p,l){for(var o,h=0;h<l.staffs.length;h++){var s=l.staffs[h],v={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(p.showDebug&&p.showDebug.indexOf("box")>=0&&(s.originalTop=s.top,s.originalBottom=s.bottom),n(s,v,"lyricHeightAbove"),n(s,v,"chordHeightAbove",s.specialY.chordLines.above),s.specialY.endingHeightAbove&&(s.specialY.chordHeightAbove?s.top+=2:s.top+=s.specialY.endingHeightAbove+a,v.endingHeightAbove=s.top),s.specialY.dynamicHeightAbove&&s.specialY.volumeHeightAbove?(s.top+=Math.max(s.specialY.dynamicHeightAbove,s.specialY.volumeHeightAbove)+a,v.dynamicHeightAbove=s.top,v.volumeHeightAbove=s.top):(n(s,v,"dynamicHeightAbove"),n(s,v,"volumeHeightAbove")),n(s,v,"partHeightAbove"),n(s,v,"tempoHeightAbove"),s.specialY.lyricHeightBelow&&(s.specialY.lyricHeightBelow+=p.spacing.vocal/e.STEP,v.lyricHeightBelow=s.bottom,s.bottom-=s.specialY.lyricHeightBelow+a),s.specialY.chordHeightBelow){v.chordHeightBelow=s.bottom;var y=s.specialY.chordHeightBelow;s.specialY.chordLines.below&&(y*=s.specialY.chordLines.below),s.bottom-=y+a}s.specialY.volumeHeightBelow&&s.specialY.dynamicHeightBelow?(v.volumeHeightBelow=s.bottom,v.dynamicHeightBelow=s.bottom,s.bottom-=Math.max(s.specialY.volumeHeightBelow,s.specialY.dynamicHeightBelow)+a):s.specialY.volumeHeightBelow?(v.volumeHeightBelow=s.bottom,s.bottom-=s.specialY.volumeHeightBelow+a):s.specialY.dynamicHeightBelow&&(v.dynamicHeightBelow=s.bottom,s.bottom-=s.specialY.dynamicHeightBelow+a),p.showDebug&&p.showDebug.indexOf("box")>=0&&(s.positionY=v);for(var m=0;m<s.voices.length;m++){var _=l.voices[s.voices[m]];r(v,_,p.spacing)}if(o!==void 0){var k=s.top-10,x=o+k,R=p.spacing.systemStaffSeparation/e.STEP,I=R-x;I>0&&(s.top+=I)}s.top+=p.spacing.staffTopMargin/e.STEP,o=2-s.bottom}},a=1;function n(p,l,o,h){if(p.specialY[o]){var s=p.specialY[o];h&&(s*=h),p.top+=s+a,l[o]=p.top}}function r(p,l,o){var h,s;for(h=0;h<l.children.length;h++)s=l.children[h],i(p,s,o);for(h=0;h<l.otherchildren.length;h++)switch(s=l.otherchildren[h],s.type){case"CrescendoElem":c(p,s);break;case"DynamicDecoration":u(p,s);break;case"EndingElem":f(p,s);break;case"TieElem":var v=s.getYBounds();l.staff.top=Math.max(l.staff.top,v[0]),l.staff.top=Math.max(l.staff.top,v[1]),l.staff.bottom=Math.min(l.staff.bottom,v[0]),l.staff.bottom=Math.min(l.staff.bottom,v[1]);break}}function i(p,l,o){for(var h=0;h<l.children.length;h++){var s=l.children[h];for(var v in l.specialY)l.specialY.hasOwnProperty(v)&&s[v]&&(s.pitch=p[v],s.top===void 0&&(s.type==="TempoElement"?g(p,s):d(p,s,o),l.pushTop(s.top),l.pushBottom(s.bottom)))}}function c(p,l){l.dynamicHeightAbove?l.pitch=p.dynamicHeightAbove:l.pitch=p.dynamicHeightBelow}function u(p,l){l.volumeHeightAbove?l.pitch=p.volumeHeightAbove:l.pitch=p.volumeHeightBelow}function f(p,l){l.pitch=p.endingHeightAbove-2}function g(p,l){if(l.pitch=p.tempoHeightAbove,l.top=p.tempoHeightAbove,l.bottom=p.tempoHeightAbove,l.note){var o=l.pitch-l.totalHeightInPitches+1;l.note.top=o,l.note.bottom=o;for(var h=0;h<l.note.children.length;h++){var s=l.note.children[h];s.top+=o,s.bottom+=o,s.pitch+=o,s.pitch2!==void 0&&(s.pitch2+=o)}}}function d(p,l,o){switch(l.type){case"part":l.top=p.partHeightAbove+l.height,l.bottom=p.partHeightAbove;break;case"text":case"chord":l.chordHeightAbove?(l.top=p.chordHeightAbove,l.bottom=p.chordHeightAbove):(l.top=p.chordHeightBelow,l.bottom=p.chordHeightBelow);break;case"lyric":l.lyricHeightAbove?(l.top=p.lyricHeightAbove,l.bottom=p.lyricHeightAbove):(l.top=p.lyricHeightBelow+o.vocal/e.STEP,l.bottom=p.lyricHeightBelow+o.vocal/e.STEP,l.pitch-=o.vocal/e.STEP);break;case"debug":l.top=p.chordHeightAbove,l.bottom=p.chordHeightAbove;break}(l.pitch===void 0||l.top===void 0)&&console.error("RelativeElement position not set.",l.type,l.pitch,l.top,p)}return $0=t,$0}var Z0,Js;function ev(){if(Js)return Z0;Js=1;var e=function(){};e.beginLayout=function(n,r){r.i=0,r.durationindex=0,r.startx=n,r.minx=n,r.nextx=n,r.spacingduration=0},e.layoutEnded=function(n){return n.i>=n.children.length},e.getNextX=function(n){return Math.max(n.minx,n.nextx)},e.getSpacingUnits=function(n){return Math.sqrt(n.spacingduration*8)},e.layoutOneItem=function(n,r,i,c,u){var f=i.children[i.i];if(!f)return 0;var g=n-i.minx,d=i.durationindex+f.duration>0?c:0;if(f.abcelem.el_type==="note"&&!f.abcelem.rest&&i.voicenumber!==0&&u){var p=u.children[u.i],l=p&&(f.abcelem.maxpitch<=p.abcelem.maxpitch+1&&f.abcelem.maxpitch>=p.abcelem.minpitch-1||f.abcelem.minpitch<=p.abcelem.maxpitch+1&&f.abcelem.minpitch>=p.abcelem.minpitch-1);if(l&&f.abcelem.minpitch===p.abcelem.minpitch&&f.abcelem.maxpitch===p.abcelem.maxpitch&&p.heads&&p.heads.length>0&&f.heads&&f.heads.length>0&&p.heads[0].c===f.heads[0].c&&(l=!1),l){var o=p.heads&&p.heads.length>0?p.heads[0].realWidth:p.fixed.w;f.adjustedWidth||(f.adjustedWidth=o+f.w),f.w=f.adjustedWidth;for(var h=0;h<f.children.length;h++){var s=f.children[h];s.name.indexOf("accidental")<0&&(s.adjustedWidth||(s.adjustedWidth=s.dx+o),s.dx=s.adjustedWidth)}}}var v=t(f,d);return g<v&&(i.i===0||f.type!=="bar"||i.children[i.i-1].type!=="part"&&i.children[i.i-1].type!=="tempo")&&(n+=v-g),f.setX(n),i.spacingduration=f.duration,i.minx=n+a(f),i.i!==i.children.length-1&&(i.minx+=f.minspacing),this.updateNextX(n,r,i),n},e.shiftRight=function(n,r){var i=r.children[r.i];i&&(i.setX(i.x+n),r.minx+=n,r.nextx+=n)},e.updateNextX=function(n,r,i){i.nextx=n+r*this.getSpacingUnits(i)},e.updateIndices=function(n){this.layoutEnded(n)||(n.durationindex+=n.children[n.i].duration,n.children[n.i].type==="bar"&&(n.durationindex=Math.round(n.durationindex*64)/64),n.i++)};function t(n,r){var i=0;return(n.type==="note"||n.type==="bar")&&(i=r),-n.extraw+i}function a(n){return n.w}return Z0=e,Z0}var G0,Qs;function tv(){if(Qs)return G0;Qs=1;var e=ev();function t(c){for(var u=0,f=0;f<c.length;f++){var g=c[f];if(g.children.length>0){var d=g.children.length-1,p=g.children[d];if(p.abcelem.el_type==="bar"){var l=p.children[0].x;l>u?u=l:p.children[0].x=u}}}}var a=function(c,u,f,g,d){var p=1e-7,l=0,o=1e3,h=d;g.startx=h;var s,v=0;for(f&&console.log("init layout",c),s=0;s<g.voices.length;s++)e.beginLayout(h,g.voices[s]);for(var y=0;!n(g.voices);){for(v=null,s=0;s<g.voices.length;s++)!e.layoutEnded(g.voices[s])&&(!v||r(g.voices[s])<v)&&(v=r(g.voices[s]));var m=[],_=[];for(s=0;s<g.voices.length;s++){var k=r(g.voices[s]);k-v>p?_.push(g.voices[s]):m.push(g.voices[s])}y=0;var x=0;for(s=0;s<m.length;s++)e.getNextX(m[s])>h&&(h=e.getNextX(m[s]),y=e.getSpacingUnits(m[s]),x=m[s].spacingduration);l+=y,o=Math.min(o,y),f&&console.log("currentduration: ",v,l,o);var R=void 0;for(s=0;s<m.length;s++){var I=m[s];I.voicenumber===0&&(R=s);var b=R!==void 0&&m[R].voicenumber!==I.voicenumber?m[R]:void 0;i(I,b)||(b=void 0);var A=e.layoutOneItem(h,c,I,u,b),N=A-h;if(N>0){h=A;for(var M=0;M<s;M++)e.shiftRight(N,m[M])}}for(s=0;s<_.length;s++)_[s].spacingduration-=x,e.updateNextX(h,c,_[s]);for(s=0;s<m.length;s++){var z=m[s];e.updateIndices(z)}}for(s=0;s<g.voices.length;s++)e.getNextX(g.voices[s])>h&&(h=e.getNextX(g.voices[s]),y=e.getSpacingUnits(g.voices[s]));return t(g.voices),l+=y,g.setWidth(h),{spacingUnits:l,minSpace:o}};function n(c){for(var u=0;u<c.length;u++)if(!e.layoutEnded(c[u]))return!1;return!0}function r(c){return c.durationindex-(c.children[c.i]&&c.children[c.i].duration>0?0:5e-7)}function i(c,u){return!c||!c.staff||!c.staff.voices||c.staff.voices.length===0||!u||!u.staff||!u.staff.voices||u.staff.voices.length===0?!1:c.staff.voices[0]===u.staff.voices[0]}return G0=a,G0}var U0,eo;function Ll(){if(eo)return U0;eo=1;function e(r,i,c,u,f){var g=r.padding.left,d=0,p,l;for(p=0;p<c.length;p++)c[p].header&&(l=i.calc(c[p].header,"voicefont",""),d=Math.max(d,l.width));if(d=t(d,u,i),d=t(d,f,i),d){var o=i.calc("A","voicefont","");d+=o.width}g+=d;var h=0;return h=a(u,g,h),h=a(f,g,h),g+h}function t(r,i,c){if(i){for(var u=0;u<i.length;u++)if(i[u].header){var f=c.calc(i[u].header,"voicefont","");r=Math.max(r,f.width)}}return r}function a(r,i,c){if(r)for(var u=0;u<r.length;u++)n(i,r[u]),c=Math.max(c,r[u].getWidth());return c}function n(r,i){i.x=r}return U0=e,U0}var j0,to;function rv(){if(to)return j0;to=1;var e=Ll();function t(n,r,i){var c=e(n,r.getTextSize,r.voices,r.brace,r.bracket),u=a(r,i.minPadding),f=u.totalDuration,g=u.minSpacing,d=g*f;i.minWidth&&(d=Math.max(d,i.minWidth));var p=i.minPadding?i.minPadding/2:2;r.startx=c,r.w=d+c;for(var l=0;l<r.voices.length;l++){var o=r.voices[l];o.startx=c,o.w=d+c;for(var h=c,s=!1,v=0,y=0;y<o.children.length;y++){var m=o.children[y];s||(m.duration!==0?(s=!0,v=(d+c-h)/f,r.gridStart=h):(m.x=h,h+=m.w+m.minspacing)),s&&(i.align==="center"?m.x=h+m.duration*v/2-m.w/2:m.duration===0?m.x=h+1-m.w:m.x=h+p-m.extraw,h+=m.duration*v);for(var _=0;_<m.children.length;_++){var k=m.children[_],x=k.dx?k.dx:0;k.x=m.x+x}}r.gridEnd=h}return d}function a(n,r){for(var i=0,c=0,u=0;u<n.voices.length;u++){for(var f=0,g=n.voices[u],d=0;d<g.children.length;d++){var p=g.children[d];if(f+=p.duration,p.duration){var l=(p.w+r)/p.duration;i=Math.max(i,l)}}c=Math.max(c,f)}return{totalDuration:c,minSpacing:i}}return j0=t,j0}var Y0,ro;function nv(){if(ro)return Y0;ro=1;var e=Jg(),t=Qg(),a=tv(),n=Ll(),r=rv(),i=function(g,d,p,l,o,h){var s,v,y=p;for(s=0;s<d.lines.length;s++)if(v=d.lines[s],v.staff){var m;h!==void 0?m=r(g,v.staffGroup,h):m=c(g,y,l,v.staffGroup,d.formatting,s===d.lines.length-1,!1),Math.round(m)>Math.round(y)&&(y=m,o&&(s=-1))}for(s=0;s<d.lines.length;s++)if(v=d.lines[s],v.staffGroup&&v.staffGroup.voices){for(var _=0;_<v.staffGroup.voices.length;_++)e(v.staffGroup.voices[_]);t(g,v.staffGroup)}for(s=0;s<d.lines.length;s++)v=d.lines[s],v.staffGroup&&v.staffGroup.setHeight();return y},c=function(g,d,p,l,o,h,s){for(var v=n(g,l.getTextSize,l.voices,l.brace,l.bracket),y=p,m=0;m<8;m++){var _=a(y,g.minPadding,s,l,v);if(y=u(h,o.stretchlast,d+g.padding.left,l.w,y,_.spacingUnits,_.minSpace,g.padding.left+g.padding.right),y===null)break}return f(l.voices),l.w-v};function u(g,d,p,l,o,h,s,v){if(g)if(d===void 0){if(l/p<.66)return null}else{var y=1-(l+v)/p,m=y<d;if(!m)return null}if(Math.abs(p-l)<2)return null;var _=h*o,k=l-_;return h>0?(o=(p-k)/h,o*s>50&&(o=50/s),o):null}function f(g){for(var d=0;d<g.length;d++)for(var p=g[d],l=1;l<p.children.length-1;l++){var o=p.children[l];if(o.abcelem.rest&&(o.abcelem.rest.type==="whole"||o.abcelem.rest.type==="multimeasure")){var h=p.children[l-1],s=p.children[l+1];o.center(h,s)}}}return Y0=i,Y0}var W0,no;function av(){if(no)return W0;no=1;var e=function(a){this.shouldAddClasses=a.shouldAddClasses,this.reset()};return e.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null},e.prototype.incrLine=function(){this.lineNumber===null?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},e.prototype.incrVoice=function(){this.voiceNumber===null?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},e.prototype.isInMeasure=function(){return this.measureNumber!==null},e.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null},e.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},e.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},e.prototype.incrNote=function(){this.noteNumber++},e.prototype.measureTotal=function(){for(var t=0,a=0;a<this.lineNumber;a++)t+=this.measureTotalPerLine[a]?this.measureTotalPerLine[a]:0;return this.measureNumber&&(t+=this.measureNumber),t},e.prototype.getCurrent=function(t){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}},e.prototype.generate=function(t){if(!this.shouldAddClasses)return"";var a=[];if(t&&t.length>0&&a.push(t),t==="abcjs-tab-number")return a.join(" ");if(t==="text instrument-name")return"abcjs-text abcjs-instrument-name";if(this.lineNumber!==null&&a.push("l"+this.lineNumber),this.measureNumber!==null&&a.push("m"+this.measureNumber),this.measureNumber!==null&&a.push("mm"+this.measureTotal()),this.voiceNumber!==null&&a.push("v"+this.voiceNumber),t&&(t.indexOf("note")>=0||t.indexOf("rest")>=0||t.indexOf("lyric")>=0)&&this.noteNumber!==null&&a.push("n"+this.noteNumber),a.length>0){a=a.join(" "),a=a.split(" ");for(var n=0;n<a.length;n++)a[n].indexOf("abcjs-")!==0&&a[n].length>0&&(a[n]="abcjs-"+a[n])}return a.join(" ")},W0=e,W0}var V0,ao;function iv(){if(ao)return V0;ao=1;var e=function(a,n){this.formatting=a,this.classes=n};return e.prototype.updateFonts=function(t){t.gchordfont&&(this.formatting.gchordfont=t.gchordfont),t.tripletfont&&(this.formatting.tripletfont=t.tripletfont),t.annotationfont&&(this.formatting.annotationfont=t.annotationfont),t.vocalfont&&(this.formatting.vocalfont=t.vocalfont)},e.prototype.getFamily=function(t){return t[0]==='"'&&t[t.length-1]==='"'?t.substring(1,t.length-1):t},e.prototype.calc=function(t,a){var n;typeof t=="string"?(n=this.formatting[t],n?n={face:n.face,size:Math.round(n.size*4/3),decoration:n.decoration,style:n.style,weight:n.weight,box:n.box}:n={face:"Arial",size:Math.round(48/3),decoration:"underline",style:"normal",weight:"normal"}):n={face:t.face,size:Math.round(t.size*4/3),decoration:t.decoration,style:t.style,weight:t.weight,box:t.box};var r=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;n.padding=n.size*r;var i={"font-size":n.size,"font-style":n.style,"font-family":this.getFamily(n.face),"font-weight":n.weight,"text-decoration":n.decoration,class:this.classes.generate(a)};return{font:n,attr:i}},V0=e,V0}var X0,io;function sv(){if(io)return X0;io=1;var e=function(a,n){this.getFontAndAttr=a,this.svg=n};return e.prototype.updateFonts=function(t){this.getFontAndAttr.updateFonts(t)},e.prototype.attr=function(t,a){return this.getFontAndAttr.calc(t,a)},e.prototype.getFamily=function(t){return t[0]==='"'&&t[t.length-1]==='"'?t.substring(1,t.length-1):t},e.prototype.calc=function(t,a,n,r){var i;typeof a=="string"?i=this.attr(a,n):i={font:{face:a.face,size:a.size,decoration:a.decoration,style:a.style,weight:a.weight},attr:{"font-size":a.size,"font-style":a.style,"font-family":this.getFamily(a.face),"font-weight":a.weight,"text-decoration":a.decoration,class:this.getFontAndAttr.classes.generate(n)}};var c=this.svg.getTextSize(t,i.attr,r);return i.font.box?{height:c.height+i.font.padding*4,width:c.width+i.font.padding*4}:c},e.prototype.baselineToCenter=function(t,a,n,r,i){var c=this.calc(t,a,n).height,u=this.attr(a,n).font.size;return c*.5+(i-r-2)*u},X0=e,X0}var K0,so;function _t(){if(so)return K0;so=1;var e=function(){for(var t=0,a,n=arguments[t++],r=[],i,c,u,f;n;){if(i=/^[^\x25]+/.exec(n))r.push(i[0]);else if(i=/^\x25{2}/.exec(n))r.push("%");else if(i=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(n)){if((a=arguments[i[1]||t++])==null||a==null)throw"Too few arguments.";if(/[^s]/.test(i[7])&&typeof a!="number")throw"Expecting number but found "+typeof a;switch(i[7]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a);break;case"e":a=i[6]?a.toExponential(i[6]):a.toExponential();break;case"f":a=i[6]?parseFloat(a).toFixed(i[6]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&i[6]?a.substring(0,i[6]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase();break}a=/[def]/.test(i[7])&&i[2]&&a>0?"+"+a:a,u=i[3]?i[3]=="0"?"0":i[3][1]:" ",f=i[5]-String(a).length,c=i[5]?str_repeat(u,f):"",r.push(i[4]?a+c:c+a)}else throw"Huh ?!";n=n.substring(i[0].length)}return r.join("")};return K0=e,K0}var J0,oo;function it(){if(oo)return J0;oo=1;function e(t){return parseFloat(t.toFixed(2))}return J0=e,J0}var Q0,co;function gt(){if(co)return Q0;co=1;var e=it();function t(a,n,r){var i=n.y;if(n.phrases){var g=a.paper.richTextLine(n.phrases,n.x,n.y,n.klass,n.anchor);return g}if(n.lane){var c=n.dim.font.size*.25;i+=(n.dim.font.size+c)*n.lane}var u;n.dim?(u=n.dim,u.attr.class=n.klass):u=a.controller.getFontAndAttr.calc(n.type,n.klass),n.anchor&&(u.attr["text-anchor"]=n.anchor),n["dominant-baseline"]&&(u.attr["dominant-baseline"]=n["dominant-baseline"]),u.attr.x=n.x,u.attr.y=i,n.centerVertically||(u.attr.y+=u.font.size),n.type==="debugfont"&&(console.log("Debug msg: "+n.text),u.attr.stroke="#ff0000"),n.cursor&&(u.attr.cursor=n.cursor);var f;n.name==="free-text"?f=n.text.replace(/^[ \t]*\n/gm,`
|
|
120
|
+
`):f=n.text.replace(/\n\n/g,`
|
|
160
121
|
|
|
161
|
-
`),
|
|
162
|
-
`),o.font.box&&(t||n.paper.openGroup({klass:o.attr.class,fill:n.foregroundColor,"data-name":i.name}),o.attr["text-anchor"]==="end"?o.attr.x-=o.font.padding:o.attr["text-anchor"]==="start"&&(o.attr.x+=o.font.padding),o.attr.y+=o.font.padding,delete o.attr.class),i.noClass&&delete o.attr.class,o.attr.x=e(o.attr.x),o.attr.y=e(o.attr.y),i.name&&(o.attr["data-name"]=i.name);var d=n.paper.text(l,o.attr);if(o.font.box){var p=d.getBBox(),v=0;o.attr["text-anchor"]==="middle"?v=p.width/2+o.font.padding:o.attr["text-anchor"]==="end"&&(v=p.width+o.font.padding*2);var f=0;i.centerVertically&&(f=p.height-o.font.padding),n.paper.rect({"data-name":"box",x:Math.round(i.x-v),y:Math.round(a-f),width:Math.round(p.width+o.font.padding*2),height:Math.round(p.height+o.font.padding*2)}),t||(d=n.paper.closeGroup())}return d}return Ps=r,Ps}var Os,cd;function g$(){if(cd)return Os;cd=1;var e=lr(),r=pt(),n=Vt();function i(l,d,p){var v=d.startVoice.staff.absoluteY-r.STEP*10;return d.endVoice&&d.endVoice.staff?d.endY=d.endVoice.staff.absoluteY-r.STEP*2:d.lastContinuedVoice&&d.lastContinuedVoice.staff?d.endY=d.lastContinuedVoice.staff.absoluteY-r.STEP*2:d.endY=d.startVoice.staff.absoluteY-r.STEP*2,o(l,d.x,v,d.endY,d.type,d.header,p)}function t(l,d,p,v,f){d+=r.STEP;var u=r.STEP*.75,h=r.STEP*.75,c=v-p,m=e("M %f %f l %f %f l %f %f l %f %f z",d,p-h,0,c+h*2,u,0,0,-(c+h*2)),b=r.STEP*2,g=r.STEP;return m+=e("M %f %f q %f %f %f %f q %f %f %f %f z",d+u,p-h,b*.6,g*.2,b,-g,-b*.1,g*.3,-b,g+r.STEP),m+=e("M %f %f q %f %f %f %f q %f %f %f %f z",d+u,p+h+c,b*.6,-g*.2,b,g,-b*.1,-g*.3,-b,-g-r.STEP),l.paper.path({path:m,stroke:l.foregroundColor,fill:l.foregroundColor,class:l.controller.classes.generate(f),"data-name":f})}function a(l,d,p,v,f){var u=v-p,h=s(d,p,[7.5,-8,21,0,18.5,-10.5,7.5],[0,u/5.5,u/3.14,u/2,u/2.93,u/4.88,0]);return h+=s(d,p,[0,17.5,-7.5,6.6,-5,20,0],[u/2,u/1.46,u/1.22,u,u/1.19,u/1.42,u/2]),l.paper.path({path:h,stroke:l.foregroundColor,fill:l.foregroundColor,class:l.controller.classes.generate(f),"data-name":f})}function s(l,d,p,v){return e("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",l+p[0],d+v[0],l+p[1],d+v[1],l+p[2],d+v[2],l+p[3],d+v[3],l+p[4],d+v[4],l+p[5],d+v[5],l+p[6],d+v[6])}var o=function(l,d,p,v,f,u,h){var c;if(u){l.paper.openGroup({klass:l.controller.classes.generate("staff-extra voice-name"),"data-name":f});var m=p+(v-p)/2;m=m-l.controller.getTextSize.baselineToCenter(u,"voicefont","staff-extra voice-name",0,1),n(l,{x:l.padding.left,y:m,text:u,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return f==="brace"?c=a(l,d,p,v,f):f==="bracket"&&(c=t(l,d,p,v,f)),u&&(c=l.paper.closeGroup()),h.wrapSvgEl({el_type:f,startChar:-1,endChar:-1},c),c};return Os=i,Os}var Ms,ud;function kn(){if(ud)return Ms;ud=1;function e(r,n,i){var t=r.paper.path(n);return t}return Ms=e,Ms}var Ds,ld;function b$(){if(ld)return Ds;ld=1;var e=lr(),r=kn(),n=At();function i(c,m,b){(!m.anchor1||!m.anchor2||!m.anchor1.heads||!m.anchor2.heads||m.anchor1.heads.length===0||m.anchor2.heads.length===0)&&window.console.error("Glissando Element not set.");var g=4,w=c.calcY(m.anchor1.heads[0].pitch),k=c.calcY(m.anchor2.heads[0].pitch),$=m.anchor1.x+m.anchor1.w/2,O=m.anchor2.x+m.anchor2.w/2,P=t($,w,O,k),y=m.anchor1.w/2+g,C=m.anchor2.w/2+g,E=a($,w,O,k),z=s(w,E,y);s(k,E,-C);var A=o(P-y-C),R=h(c,$+y,z,A,E);return b.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},R),[R]}function t(c,m,b,g){var w=b-c,k=g-m;return Math.sqrt(w*w+k*k)}function a(c,m,b,g){return(g-m)/(b-c)}function s(c,m,b){return n(c+b*m)}function o(c){var m=5;return Math.max(2,Math.floor((c-m*2)/6))}var l=[[3.5,-4.8]],d=[[1.5,-1],[.3,-.3],[-3.5,3.8]],p=[[-1.5,2]],v=[[3,4],[3,-4]],f=[[-3,4],[-3,-4]];function u(c,m){for(var b="",g=0;g<c.length;g++)b+="l"+c[g][0]+" "+s(c[g][1],m,c[g][0]);return b}var h=function(c,m,b,g,w){var k=e("M %f %f",m,b);k+=u(l,w);var $;for($=0;$<g;$++)k+=u(v,w);for(k+=u(d,w),$=0;$<g;$++)k+=u(f,w);return k+=u(p,w)+"z",r(c,{path:k,highlight:"stroke",stroke:c.foregroundColor,class:c.controller.classes.generate("decoration"),"data-name":"glissando"})};return Ds=i,Ds}var Rs,fd;function y$(){if(fd)return Rs;fd=1;var e=lr(),r=kn(),n=At();function i(a,s,o){s.pitch===void 0&&window.console.error("Crescendo Element y-coordinate not set.");var l=a.calcY(s.pitch)+4,d=8,p=s.anchor1?s.anchor1.x:0,v=s.anchor2?s.anchor2.x:800,f;return s.dir==="<"?f=t(a,l+d/2,l,l+d/2,l+d,p,v):f=t(a,l,l+d/2,l+d,l+d/2,p,v),o.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},f),[f]}var t=function(a,s,o,l,d,p,v){s=n(s),o=n(o),l=n(l),d=n(d),p=n(p),v=n(v);var f=e("M %f %f L %f %f M %f %f L %f %f",p,s,v,o,p,l,v,d);return r(a,{path:f,highlight:"stroke",stroke:a.foregroundColor,class:a.controller.classes.generate("dynamics decoration"),"data-name":"dynamics"})};return Rs=i,Rs}var Ls,dd;function Tu(){if(dd)return Ls;dd=1;var e=At();function r(){this.ingroup=!1}r.prototype.beginGroup=function(i,t){this.paper=i,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0,this.paper.openGroup()},r.prototype.isInGroup=function(){return this.ingroup},r.prototype.addPath=function(i){if(i=i||[],i.length!==0){i[0][0]="m",i[0][1]=e(i[0][1]-this.lastM[0]),i[0][2]=e(i[0][2]-this.lastM[1]),this.lastM[0]+=i[0][1],this.lastM[1]+=i[0][2],this.path.push(i[0]);for(var t=1,a=i.length;t<a;t++)i[t][0]==="m"&&(this.lastM[0]+=i[t][1],this.lastM[1]+=i[t][2]),this.path.push(i[t])}},r.prototype.endGroup=function(i,t){this.ingroup=!1;for(var a="",s=0;s<this.path.length;s++)a+=this.path[s].join(" ");this.path=[];var o=this.paper.closeGroup();return o&&(o.setAttribute("class",this.controller.classes.generate(i)),o.setAttribute("fill",this.controller.renderer.foregroundColor),o.setAttribute("stroke","none"),o.setAttribute("data-name",t)),o};var n=new r;return Ls=n,Ls}var Us,hd;function Cu(){if(hd)return Us;hd=1;var e=Vt(),r=Yt(),n=Tu();function i(a,s,o,l,d){var p,v;if(!l)return null;if(l.length>1&&l.indexOf(".")<0){var f=n.isInGroup()?"":d.klass;a.paper.openGroup({"data-name":d.name,klass:f});for(var u=0,h=0;h<l.length;h++){var c=l[h];v=r.getYCorr(c),p=r.printSymbol(s+u,a.calcY(o+v),c,a.paper,{stroke:d.stroke,fill:d.fill}),p?h<l.length-1&&(u+=t(c,l[h+1],r.getSymbolWidth(c))):e(a,{x:s,y:a.y,text:"no symbol:"+l,type:"debugfont",klass:"debug-msg",anchor:"start"},!1)}var m=a.paper.closeGroup();return m}else return v=r.getYCorr(l),n.isInGroup()?p=r.printSymbol(s,a.calcY(o+v),l,a.paper,{"data-name":d.name}):p=r.printSymbol(s,a.calcY(o+v),l,a.paper,{klass:d.klass,stroke:d.stroke,fill:d.fill,"data-name":d.name}),p||(e(a,{x:s,y:a.y,text:"no symbol:"+l,type:"debugfont",klass:"debug-msg",anchor:"start"},!1),null)}function t(a,s,o){var l=o;return a==="f"&&s==="f"&&(l=l*2/3),a==="p"&&s==="p"&&(l=l*5/6),a==="f"&&s==="z"&&(l=l*5/8),l}return Us=i,Us}var Zs,pd;function _$(){if(pd)return Zs;pd=1;var e=Cu();function r(n,i,t){i.pitch===void 0&&window.console.error("Dynamic Element y-coordinate not set.");var a=1,s=1,o=e(n,i.anchor.x,i.pitch,i.dec,{scalex:a,scaley:s,klass:n.controller.classes.generate("decoration dynamics"),fill:n.foregroundColor,stroke:"none",name:"dynamics"});return t.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:i.dec},o),[o]}return Zs=r,Zs}var js,vd;function w$(){if(vd)return js;vd=1;var e=lr(),r=Vt(),n=kn(),i=At();function t(o,l,d){o.paper.openGroup({klass:o.controller.classes.generate("triplet "+l.durationClass),"data-name":"triplet"}),l.hasBeam||s(o,l.anchor1.x,l.startNote,l.anchor2.x+l.anchor2.w,l.endNote),r(o,{x:l.xTextPos,y:o.calcY(l.yTextPos-1),text:""+l.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0,name:""+l.number},!0);var p=o.paper.closeGroup();return d.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},p),p}function a(o,l,d,p){return e("M %f %f L %f %f",i(o),i(l),i(d),i(p))}function s(o,l,d,p,v){d=o.calcY(d),v=o.calcY(v);var f=5,u="";u+=a(l,d,l,d+f),u+=a(p,v,p,v+f);var h=l+(p-l)/2,c=8,m=(v-d)/(p-l),b=h-c,g=d+(b-l)*m;u+=a(l,d,b,g);var w=h+c,k=d+(w-l)*m;u+=a(w,k,p,v),n(o,{path:u,stroke:o.foregroundColor,"data-name":"triplet-bracket"})}return js=t,js}var Bs,md;function k$(){if(md)return Bs;md=1;var e=lr(),r=Vt(),n=kn(),i=At();function t(a,s,o,l,d){s.pitch===void 0&&window.console.error("Ending Element y-coordinate not set.");var p=i(a.calcY(s.pitch)),v=20,f="";s.anchor1&&(o=i(s.anchor1.x+s.anchor1.w),f+=e("M %f %f L %f %f ",o,p,o,i(p+v))),s.anchor2&&(l=i(s.anchor2.x),f+=e("M %f %f L %f %f ",l,p,l,i(p+v))),f+=e("M %f %f L %f %f ",o,p,l,p),a.paper.openGroup({klass:a.controller.classes.generate("ending"),fill:a.foregroundColor,"data-name":"ending"}),n(a,{path:f,stroke:a.foregroundColor,fill:a.foregroundColor,"data-name":"line"}),s.anchor1&&r(a,{x:i(o+5),y:i(a.calcY(s.pitch-.5)),text:s.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:s.text});var u=a.paper.closeGroup();return d.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},u),[u]}return Bs=t,Bs}var qs,gd;function $$(){if(gd)return qs;gd=1;var e=lr(),r=At();function n(a,s,o,l,d){i(s,o,l);var p="";s.anchor1?p+="abcjs-start-m"+s.anchor1.parent.counters.measure+"-n"+s.anchor1.parent.counters.note:p+="abcjs-start-edge",s.anchor2?p+=" abcjs-end-m"+s.anchor2.parent.counters.measure+"-n"+s.anchor2.parent.counters.note:p+=" abcjs-end-edge",s.hint&&(p="abcjs-hint");var v=s.fixedY?1.5:0,f=t(a,s.startX,s.endX,s.startY+v,s.endY+v,s.above,p,s.isTie,s.dotted),u=-1;s.anchor1&&!s.isTie&&(u=s.anchor1.parent.abcelem.startChar-1);var h=-1;return s.anchor2&&!s.isTie&&(h=s.anchor2.parent.abcelem.endChar+1),d.wrapSvgEl({el_type:"slur",startChar:u,endChar:h},f),[f]}var i=function(a,s,o){!a.anchor1||!a.anchor2||a.anchor1.pitch===a.anchor2.pitch&&a.internalNotes.length===0?a.isTie=!0:a.isTie=!1,a.isTie?(a.calcTieDirection(),a.calcX(s,o),a.calcTieY()):(a.calcSlurDirection(),a.calcX(s,o),a.calcSlurY()),a.avoidCollisionAbove()},t=function(a,s,o,l,d,p,v,f,u){var h=f?1.2:1.5;s=r(s+6),o=r(o+4),l=l+(p?h:-h),d=d+(p?h:-h);var c=r(a.calcY(l)),m=r(a.calcY(d)),b=o-s,g=m-c,w=Math.sqrt(b*b+g*g),k=b/w,$=g/w,O=w/3.5,P=f?10:25,y=(p?-1:1)*Math.min(P,Math.max(4,O)),C=r(s+O*k-y*$),E=r(c+O*$+y*k),z=r(o-O*k-y*$),A=r(m-O*$+y*k),R=2;v?v+=" slur":v="slur",v+=f?" tie":" legato";var T;if(u){v+=" dotted";var I=e("M %f %f C %f %f %f %f %f %f",s,c,C,E,z,A,o,m);T=a.paper.path({path:I,stroke:a.foregroundColor,fill:"none","stroke-dasharray":"5 5",class:a.controller.classes.generate(v),"data-name":f?"tie":"slur"})}else{var N=e("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",s,c,C,E,z,A,o,m,r(z-R*$),r(A+R*k),r(C-R*$),r(E+R*k),s,c);T=a.paper.path({path:N,stroke:"none",fill:a.foregroundColor,class:a.controller.classes.generate(v),"data-name":f?"tie":"slur"})}return T};return qs=n,qs}var Fs,bd;function x$(){if(bd)return Fs;bd=1;var e=kn(),r=At();function n(s,o){if(o.beams.length!==0){for(var l="",d=0;d<o.beams.length;d++){var p=o.beams[d];if(p.split){for(var v=t(s,p.startX,p.startY,p.endX,p.endY),f=[],u=0;u<p.split.length;u+=2)f.push([p.split[u],p.split[u+1]]);for(u=0;u<f.length;u++){var h=a(p.startX,p.startY,v,f[u][0]),c=a(p.startX,p.startY,v,f[u][1]);l+=i(s,f[u][0],h,f[u][1],c,p.dy)}}else l+=i(s,p.startX,p.startY,p.endX,p.endY,p.dy)}var m=("abcjs-d"+o.duration).replace(/\./g,"-"),b=s.controller.classes.generate("beam-elem "+m),g=e(s,{path:l,stroke:"none",fill:s.foregroundColor,class:b});return[g]}}function i(s,o,l,d,p,v){l=r(s.calcY(l)),p=r(s.calcY(p)),o=r(o),d=r(d);var f=r(l+v),u=r(p+v);return"M"+o+" "+l+" L"+d+" "+p+"L"+d+" "+u+" L"+o+" "+f+"z"}function t(s,o,l,d,p){return(p-l)/(d-o)}function a(s,o,l,d){var p=d-s;return o+p*l}return Fs=n,Fs}var Hs,yd;function zu(){if(yd)return Hs;yd=1;var e=Tu(),r=At();function n(i,t,a,s,o,l,d){if(a<0||s<o){var p=r(o);o=r(s),s=p}else s=r(s),o=r(o);t=r(t);var v=r(t+a);if(i.firefox112){t+=a/2;var u={x1:t,x2:t,y1:s,y2:o,stroke:i.foregroundColor,"stroke-width":Math.abs(a)};return l&&(u.class=l),d&&(u["data-name"]=d),i.paper.lineToBack(u)}for(var f=[["M",t,s],["L",t,o],["L",v,o],["L",v,s],["z"]],u={path:""},h=0;h<f.length;h++)u.path+=f[h].join(" ");return l&&(u.class=l),d&&(u["data-name"]=d),e.isInGroup()||(u.stroke="none",u.fill=i.foregroundColor),i.paper.pathToBack(u)}return Hs=n,Hs}var Gs,_d;function S$(){if(_d)return Gs;_d=1;var e=lr(),r=At();function n(i,t,a,s,o,l,d){var p=i.foregroundColor;t=r(t),a=r(a);var v=r(s-d),f=r(s+d);if(i.firefox112){s+=d/2;var u={x1:t,x2:a,y1:s,y2:s,stroke:i.foregroundColor,"stroke-width":Math.abs(d*2)};return o&&(u.class=o),l&&(u["data-name"]=l),i.paper.lineToBack(u)}var h=e("M %f %f L %f %f L %f %f L %f %f z",t,v,a,v,a,f,t,f),c={path:h,stroke:"none",fill:p};l&&(c["data-name"]=l),o&&(c.class=o);var m=i.paper.pathToBack(c);return m}return Gs=n,Gs}var Js,wd;function wb(){if(wd)return Js;wd=1;var e=S$();function r(n,i,t,a,s,o,l){var d=n.calcY(a);return e(n,i,t,d,s,o,l)}return Js=r,Js}var Ws,kd;function kb(){if(kd)return Ws;kd=1;var e=Vt(),r=zu(),n=wb(),i=Cu();function t(s,o,l){o.pitch===void 0&&window.console.error(o.type+" Relative Element y-coordinate not set.");var d=s.calcY(o.pitch);switch(o.type){case"symbol":if(o.c===null)return null;var p="symbol";o.klass&&(p+=" "+o.klass),o.graphelem=i(s,o.x,o.pitch,o.c,{scalex:o.scalex,scaley:o.scaley,klass:s.controller.classes.generate(p),name:o.name});break;case"debug":o.graphelem=e(s,{x:o.x,y:s.calcY(15),text:""+o.c,type:"debugfont",klass:s.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:o.dim},!1);break;case"tabNumber":var v="middle",f="tabnumberfont",u="abcjs-tab-number";o.isGrace&&(f="tabgracefont",d+=2.5,u="tab-grace"),o.graphelem=e(s,{x:o.x,y:d,text:""+o.c,type:f,klass:s.controller.classes.generate(u),anchor:v,centerVertically:!1,dim:o.dim,cursor:"default"},!1);break;case"barNumber":o.graphelem=e(s,{x:o.x,y:d,text:""+o.c,type:"measurefont",klass:s.controller.classes.generate("bar-number"),anchor:"middle",dim:o.dim,name:"bar-number"},!0);break;case"lyric":o.graphelem=e(s,{x:o.x,y:d,text:o.c,type:"vocalfont",klass:s.controller.classes.generate("lyric"),anchor:"middle",dim:o.dim,name:"lyric"},!1);break;case"chord":o.graphelem=e(s,{x:o.x,y:d,text:o.c,type:"gchordfont",klass:s.controller.classes.generate("chord"),anchor:"middle",dim:o.dim,lane:o.getLane(),name:"chord"},!1);break;case"decoration":o.graphelem=e(s,{x:o.x,y:d+6,text:o.c,type:"annotationfont",klass:s.controller.classes.generate("annotation"),anchor:o.anchor,centerVertically:!0,dim:o.dim},!1);break;case"text":o.graphelem=e(s,{x:o.x,y:d,text:o.c,type:"annotationfont",klass:s.controller.classes.generate("annotation"),anchor:"start",centerVertically:o.centerVertically,dim:o.dim,lane:o.getLane(),name:"annotation"},!1);break;case"multimeasure-text":o.graphelem=e(s,{x:o.x+o.w/2,y:d,text:o.c,type:"tempofont",klass:s.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:o.dim},!1);break;case"part":o.graphelem=e(s,{x:o.x,y:d,text:o.c,type:"partsfont",klass:s.controller.classes.generate("part"),anchor:"start",dim:o.dim,name:o.c},!0);break;case"bar":o.graphelem=r(s,o.x,o.linewidth+s.lineThickness,d,l||s.calcY(o.pitch2),null,"bar");break;case"stem":var h=o.linewidth>0?o.linewidth+s.lineThickness:o.linewidth-s.lineThickness;o.graphelem=r(s,o.x,h,d,s.calcY(o.pitch2),"abcjs-stem","stem");break;case"ledger":o.graphelem=n(s,o.x,o.x+o.w,o.pitch,"abcjs-ledger","ledger",.35+s.lineThickness);break}return o.scalex!==1&&o.graphelem&&a(s.paper,o.graphelem,o.scalex,o.scaley,o.x,d),o.graphelem}function a(s,o,l,d,p,v){s.setAttributeOnElement(o,{style:"transform:scale("+l+","+d+");transform-origin:"+p+"px "+v+"px;"})}return Ws=t,Ws}var Ys,$d;function I$(){if($d)return Ys;$d=1;var e=kb(),r=Vt();function n(i,t){var a=t.x;t.pitch===void 0&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo";var s=i.calcY(t.pitch)+2,o,l;if(t.tempo.preString){o=r(i,{x:a,y:s,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0),l=i.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",o);var d=l.width,p=d/t.tempo.preString.length;a+=d+p}if(t.note){t.note.setX(a);for(var v=0;v<t.note.children.length;v++)e(i,t.note.children[v],a);a+=t.note.w+5;var f="= "+t.tempo.bpm;o=r(i,{x:a,y:s,text:f,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"beats"}),l=i.controller.getTextSize.calc(f,"tempofont","tempo",o);var u=l.width,h=u/f.length;a+=u+h}t.tempo.postString&&r(i,{x:a,y:s,text:t.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"post"},!0)}return Ys=n,Ys}var Vs,xd;function T$(){if(xd)return Vs;xd=1;var e=I$(),r=kb(),n=pt(),i=xu(),t=Tu();function a(s,o,l,d,p){if(!o.invisible){var v=o.children.length>0&&o.children[0].type==="TempoElement";o.elemset=[],t.beginGroup(s.paper,s.controller);for(var f=0;f<o.children.length;f++){var u=o.children[f];switch(u.type){case"TempoElement":e(s,u);break;default:var h=r(s,u,l);u.type==="symbol"&&u.c&&u.c.indexOf("notehead")>=0&&h.setAttribute("class","abcjs-notehead")}}var c=o.type;if((o.type==="note"||o.type==="rest")&&(o.counters=s.controller.classes.getCurrent(),c+=" d"+Math.round(o.durationClass*1e3)/1e3,c=c.replace(/\./g,"-"),o.abcelem.pitches))for(var m=0;m<o.abcelem.pitches.length;m++)c+=" p"+o.abcelem.pitches[m].pitch;var b=t.endGroup(c,o.type);if(b){if(o.cloned&&(o.cloned.overrideClasses=b.className.baseVal),o.overrideClasses){var g=b.classList&&b.classList.length>0?b.classList[0]+" ":"";b.setAttribute("class",g+o.overrideClasses)}if(v)o.startChar=o.abcelem.startChar,o.endChar=o.abcelem.endChar,d.add(o,b,!1,p);else{o.elemset.push(b);var w=!1;(o.type==="note"||o.type==="tabNumber")&&(w=!0),d.add(o,b,w,p)}}else o.elemset.length>0&&d.add(o,o.elemset[0],o.type==="note",p);if(o.klass&&i(o.elemset,"mark","","#00ff00"),o.hint&&i(o.elemset,"abcjs-hint","",null),o.abcelem.abselem=o,o.heads&&o.heads.length>0){o.notePositions=[];for(var k=0;k<o.heads.length;k++)o.notePositions.push({x:o.heads[k].x+o.heads[k].w/2,y:p.zero-o.heads[k].pitch*n.STEP})}}}return Vs=a,Vs}var Xs,Sd;function C$(){if(Sd)return Xs;Sd=1;var e=b$(),r=y$(),n=_$(),i=w$(),t=k$(),a=$$(),s=x$(),o=Vt(),l=T$();function d(v,f,u,h,c){var m=f.w-1;v.staffbottom=f.staff.bottom;var b=v.foregroundColor;if(f.color&&(v.foregroundColor=f.color),f.header){var g=o(v,{x:v.padding.left,y:v.calcY(f.headerPosition),text:f.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0,name:"voice-name"},!0);h.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:f.header},g)}var w,k,$=!1;for(w=0;w<f.children.length;w++){k=f.children[w],(k.type==="note"||k.type==="rest")&&($=!0);var O=!1;k.type!=="staff-extra"&&!v.controller.classes.isInMeasure()&&(v.controller.classes.startMeasure(),O=!0),f.staff.isTabStaff&&(k.invisible=!1,k.type=="bar"&&k.abcelem.lastBar&&(u=f.topLine)),l(v,k,f.barto||w===f.children.length-1?u:0,h,c),(k.type==="note"||p(k))&&v.controller.classes.incrNote(),k.type==="bar"&&!O&&$&&v.controller.classes.incrMeasure()}for(v.controller.classes.startMeasure(),w=0;w<f.beams.length;w++){var P=f.beams[w];P==="bar"?v.controller.classes.incrMeasure():s(v,P,h)}for(v.controller.classes.startMeasure(),w=0;w<f.otherchildren.length;w++)if(k=f.otherchildren[w],k==="bar")v.controller.classes.incrMeasure();else switch(k.type){case"GlissandoElem":k.elemset=e(v,k,h);break;case"CrescendoElem":k.elemset=r(v,k,h);break;case"DynamicDecoration":k.elemset=n(v,k,h);break;case"TripletElem":i(v,k,h);break;case"EndingElem":k.elemset=t(v,k,f.startx+10,m,h);break;case"TieElem":k.elemset=a(v,k,f.startx+10,m,h);break;default:console.log(k),l(v,k,f.startx+10,m,h,c)}v.foregroundColor=b}function p(v){return v.type!=="rest"?!1:!!(v.abcelem&&v.abcelem.rest&&v.abcelem.rest.type!=="spacer")}return Xs=d,Xs}var Ks,Id;function z$(){if(Id)return Ks;Id=1;var e=wb();function r(n,i,t,a,s,o){var l="abcjs-top-line",d=2;s&&(d=s),n.paper.openGroup({prepend:!0,klass:n.controller.classes.generate("abcjs-staff")});var p=0,v=0;if(a===1)e(n,i,t,6,l,null,o+n.lineThickness),p=n.calcY(10),v=n.calcY(2);else for(var f=a-1;f>=0;f--){var u=(f+1)*d;v=n.calcY(u),p===0&&(p=v),e(n,i,t,u,l,null,o+n.lineThickness),l=void 0}return n.paper.closeGroup(),[p,v]}return Ks=r,Ks}var Qs,Td;function E$(){if(Td)return Qs;Td=1;function e(r,n,i){var t=r.paper.rectBeneath(n);return i&&r.paper.text(i,{x:0,y:n.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),t}return Qs=e,Qs}var eo,Cd;function N$(){if(Cd)return eo;Cd=1;function e(r,n){var i="rgba(0,0,0,255)",t="rgba(0,0,0,0)",a=Math.round(r.y),s=r.controller.width,o=(s-n)/2,l=o+n,d="M "+o+" "+a+" L "+l+" "+a+" L "+l+" "+(a+1)+" L "+o+" "+(a+1)+" L "+o+" "+a+" z";r.paper.pathToBack({path:d,stroke:t,fill:i,class:r.controller.classes.generate("defined-text")})}return eo=e,eo}var to,zd;function $b(){if(zd)return to;zd=1;var e=N$(),r=Vt();function n(i,t,a){for(var s=0;s<t.rows.length;s++){var o=t.rows[s];if(o.absmove)i.absolutemoveY(o.absmove);else if(o.move)i.moveY(o.move);else if(o.text||o.phrases){var l=o.left?o.left:0,d=r(i,{x:l,y:i.y,text:o.text,phrases:o.phrases,"dominant-baseline":o["dominant-baseline"],type:o.font,klass:o.klass,name:o.name,anchor:o.anchor});o.absElemType&&a.wrapSvgEl({el_type:o.absElemType,name:o.name,startChar:o.startChar,endChar:o.endChar,text:o.text},d)}else if(o.separator)e(i,o.separator);else if(o.startGroup)i.paper.openGroup({klass:o.klass,"data-name":o.name});else if(o.endGroup){var p=i.paper.closeGroup();o.absElemType&&a.wrapSvgEl({el_type:o.absElemType,name:o.name,startChar:o.startChar,endChar:o.endChar,text:""},p)}}}return to=n,to}var ro,Ed;function A$(){if(Ed)return ro;Ed=1;var e=pt(),r=g$(),n=C$(),i=z$(),t=E$(),a=zu(),s=$b();function o(p,v,f,u){for(var h,c=p.y,m=0;m<v.staffs.length;m++){var b=v.staffs[m];p.moveY(e.STEP,b.top),b.absoluteY=p.y,p.showDebug&&(p.showDebug.indexOf("box")>=0&&b.voices&&d(p,v.voices,b.voices),p.showDebug.indexOf("grid")>=0&&(p.paper.dottedLine({x1:p.padding.left,x2:p.padding.left+p.controller.width,y1:c,y2:c,stroke:"#0000ff"}),t(p,{x:p.padding.left,y:p.calcY(b.originalTop),width:p.controller.width,height:p.calcY(b.originalBottom)-p.calcY(b.originalTop),fill:p.foregroundColor,stroke:p.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),h=0,T(b,"chordHeightAbove"),T(b,"chordHeightBelow"),T(b,"dynamicHeightAbove"),T(b,"dynamicHeightBelow"),T(b,"endingHeightAbove"),T(b,"lyricHeightAbove"),T(b,"lyricHeightBelow"),T(b,"partHeightAbove"),T(b,"tempoHeightAbove"),T(b,"volumeHeightAbove"),T(b,"volumeHeightBelow"))),p.moveY(e.STEP,-b.bottom),p.showDebug&&p.showDebug.indexOf("grid")>=0&&p.paper.dottedLine({x1:p.padding.left,x2:p.padding.left+p.controller.width,y1:p.y,y2:p.y,stroke:"#0000aa"})}for(var g,w,k=2,$=0,O=0;O<v.voices.length;O++){var P=v.voices[O].staff,y=v.voices[O].tabNameInfos;if(p.y=P.absoluteY,p.controller.classes.incrVoice(),!v.voices[O].duplicate){if(g||(g=p.calcY(10)),w=p.calcY(k),P.lines!==0){P.linePitch&&(k=P.linePitch),p.controller.classes.newMeasure();var C=i(p,v.startx,v.w,P.lines,P.linePitch,.35);w=C[1],P.bottomLine=w,P.topLine=C[0],P.hasTab&&($=P.topLine),P.hasStaff&&($=P.hasStaff.topLine,v.voices[O].barto=!0,v.voices[O].topLine=g)}l(p,P.absoluteY,v.brace,O,f),l(p,P.absoluteY,v.bracket,O,f)}n(p,v.voices[O],$,f,{top:c,zero:p.y,height:v.height*e.STEP});var E=0;if(y){var z={rows:[]};z.rows.push({absmove:w+2});var A=8;z.rows.push({left:v.startx+A,text:y.name,font:"tablabelfont",klass:"text instrument-name",anchor:"start"}),z.rows.push({move:y.textSize.height}),s(p,z),E=y.textSize.height}p.controller.classes.newMeasure(),v.voices[O].duplicate||($=p.calcY(2+E))}p.controller.classes.newMeasure();var R=v.staffs.length;R>1&&(g=v.staffs[0].topLine,w=v.staffs[R-1].bottomLine,a(p,v.startx,.6,g,w,null)),p.y=c;function T(I,N){var D=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(I.positionY&&I.positionY[N]){var L=I.specialY[N]*e.STEP;N==="chordHeightAbove"&&I.specialY.chordLines&&I.specialY.chordLines.above&&(L*=I.specialY.chordLines.above),N==="chordHeightBelow"&&I.specialY.chordLines&&I.specialY.chordLines.below&&(L*=I.specialY.chordLines.below),t(p,{x:p.padding.left,y:p.calcY(I.positionY[N]),width:p.controller.width,height:L,fill:D[h],stroke:D[h],"fill-opacity":.4,"stroke-opacity":.4},N.substr(0,4)),h+=1,h>6&&(h=0)}}}function l(p,v,f,u,h){if(f)for(var c=0;c<f.length;c++)f[c].isStartVoice(u)&&(f[c].startY=v-e.STEP*10,f[c].elemset=r(p,f[c],h))}function d(p,v,f){for(var u=0;u<f.length;u++)for(var h=v[f[u]].children,c=0;c<h.length;c++){var m=h[c],b=m.getFixedCoords();if(!(m.invisible||b.t===void 0||b.b===void 0)){var g=(b.t-b.b)*e.STEP;t(p,{x:b.x,y:p.calcY(b.t),width:b.w,height:g,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var w=0;w<m.children.length;w++){var k=m.children[w],$=k.getChordDim();if($){var O=p.calcY(k.pitch);O+=k.dim.font.size*k.getLane(),t(p,{x:$.left,y:O,width:$.right-$.left,height:k.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}return ro=o,ro}var no,Nd;function P$(){if(Nd)return no;Nd=1;function e(r,n,i,t){var a=(n+r.padding.left+r.padding.right)*i,s=(r.y+r.padding.bottom)*i;if(r.isPrint&&(s=Math.max(s,1056)),r.ariaLabel!==""){var o="Sheet Music";r.abctune&&r.abctune.metaText&&r.abctune.metaText.title&&(o+=' for "'+r.abctune.metaText.title+'"'),r.paper.setTitle(o);var l=r.ariaLabel?r.ariaLabel:o;r.paper.setAttribute("aria-label",l)}var d=["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"];r.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+d.join(" ")+"}");var p={overflow:"hidden"};t==="resize"?r.paper.setResponsiveWidth(a,s):(p.width="",p.height=s+"px",i<1?(p.width=a+"px",r.paper.setSize(a/i,s/i)):r.paper.setSize(a,s)),r.paper.setScale(i),r.paper.setParentStyles(p)}return no=e,no}var io,Ad;function O$(){if(Ad)return io;Ad=1;var e=db(),r=hb();function n(i,t,a){this.elements=[],this.paper=i,this.tuneNumber=a,this.selectTypes=t}return n.prototype.getElements=function(){return this.elements},n.prototype.add=function(i,t,a,s){if(this.canSelect(i)){var o;this.selectTypes===void 0?o={selectable:!1,"data-index":this.elements.length}:o={selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,o);var l={absEl:i,svgEl:t,isDraggable:a};s!==void 0&&(l.staffPos=s),this.elements.push(l)}},n.prototype.canSelect=function(i){return this.selectTypes===!1||!i||!i.abcelem?!1:this.selectTypes===!0?!0:this.selectTypes===void 0?i.abcelem.el_type==="note"||i.abcelem.el_type==="tabNumber":this.selectTypes.indexOf(i.abcelem.el_type)>=0},n.prototype.wrapSvgEl=function(i,t){var a={tuneNumber:this.tuneNumber,abcelem:i,elemset:[t],highlight:e,unhighlight:r};this.add(a,t,!1)},io=n,io}var ao,Pd;function M$(){if(Pd)return ao;Pd=1;const e=Cu(),r=zu();function n(g,w,k,$,O){const P=O.gchordfont;O.partsfont;const y=O.annotationfont,C=O.repeatfont,E=O.textfont,z=O.subtitlefont,A=50,R=10,T=14,I=10,N=20,D=16;w.forEach(L=>{switch(L.type){case"text":b(g,L.text,k,g.y,16,E,null,null,!1),g.moveY(D);break;case"subtitle":b(g,L.subtitle,k,g.y+I,20,z,null,"abcjs-subtitle",!1),g.moveY(N);break;case"part":if(L.lines.length>0){b(g,L.name,k,g.y+I,20,z,L.name,"abcjs-part",!1),g.moveY(N);const _=L.lines[0].length,x=$/_;L.lines.forEach((S,M)=>{let U=!1,q=!1;S.forEach(V=>{V.ending&&(U=!0),V.annotations&&V.annotations.length>0&&(q=!0)});const j=q?T:U?R:0;S.forEach((V,ne)=>{if(!V.noBorder){g.paper.rect({x:k+ne*x,y:g.y,width:x,height:j+A}),g.paper.rect({x:k+ne*x+1,y:g.y+1,width:x-2,height:j+A-2});let ce=0,fe=0;const pe=g.y,K=k+x*ne;V.hasStartRepeat&&(t(g,K,pe,pe+A+j,!0,j),ce=12),V.hasEndRepeat&&(t(g,K+x,pe,pe+A+j,!1,j),fe=12);let he=0;V.ending&&(he=b(g,V.ending,k+ne*x+4,pe+10,12,C,null,null,!1).getBBox().width+4),o(g,pe,k+ce,x,M,ne,V.chord,P,ce+fe,A,j),V.annotations&&V.annotations.length>0&&s(g,pe,k+ne*x+he,V.annotations,y),j&&g.paper.rectBeneath({x:k+ne*x,y:g.y,width:x,height:j,fill:"#e8e8e8",stroke:"none"})}}),g.moveY(j+A)}),g.moveY(N)}break}})}function i(g,w,k,$){var O=w-10,P=w+10,y=k+10,C=k-10,E=w-10,z=-g.yToPitch($)+2,A=w+6.5,R=-g.yToPitch($)-2.3;g.paper.lineToBack({x1:O,x2:P,y1:y,y2:C,"stroke-width":"3px","stroke-linecap":"round"}),e(g,E,z,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),e(g,A,R,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"})}function t(g,w,k,$,O,P){const y=O?w+2:w-4,C=O?w+9:w-11;g.paper.openGroup({klass:"abcjs-repeat"}),r(g,y,3+g.lineThickness,k,$,null,"bar"),e(g,C,-g.yToPitch(P)-4,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),e(g,C,-g.yToPitch(P)-8,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),g.paper.closeGroup()}const a={segno:"scripts.segno",coda:"scripts.coda",fermata:"scripts.ufermata"};function s(g,w,k,$,O){k+=3;let P;for(let y=0;y<$.length;y++)switch($[y]){case"segno":case"coda":case"fermata":{k+=12,P=e(g,k,-3,a[$[y]],{scalex:1,scaley:1,name:a[$[y]]});const C=P.getBBox();k+=C.width}break;default:b(g,$[y],k,w+12,12,O,null,null,!1)}}function o(g,w,k,$,O,P,y,C,E,z,A){const R=k+$*P;!y[1]&&!y[2]&&!y[3]?u(g,R,w+A,$-E,z,y[0],C,A):!y[1]&&!y[3]?h(g,R,w,$-E,z,y[0],y[2],C,A):c(g,R,w,$-E,z,y,C,A)}function l(g,w,k,$,O,P,y){const C=b(g,O,w,k,$,P,null,"abcjs-chord",!0);let E=C.getBBox(),z=$;for(;E.width>y&&z>=14;)z-=2,C.setAttribute("font-size",z),E=C.getBBox()}const d=34,p=26,v=20,f=-3;function u(g,w,k,$,O,P,y,C){P==="%"?i(g,w+$/2,k+O/2,C+O/2):l(g,w+$/2,k+O/2+f,d,P,y,$)}function h(g,w,k,$,O,P,y,C,E){g.paper.lineToBack({x1:w,x2:w+$,y1:k+O+E,y2:k+2}),l(g,w+$/4,k+O/4+5+E+f,p,P,C,$/2),l(g,w+3*$/4,k+3*O/4+E+f,p,y,C,$/2)}function c(g,w,k,$,O,P,y,C){g.paper.lineToBack({x1:w+3,x2:w+$-3,y1:k+O/2+C,y2:k+O/2+C}),g.paper.lineToBack({x1:w+$/2,x2:w+$/2,y1:k+3+C,y2:k+O-3+C}),P[0]&&l(g,w+$/4,k+O/4+2+C+f,v,m(P[0]),y,$/2),P[1]&&l(g,w+3*$/4,k+O/4+2+C+f,v,m(P[1]),y,$/2),P[2]&&l(g,w+$/4,k+3*O/4+C+f,v,m(P[2]),y,$/2),P[3]&&l(g,w+3*$/4,k+3*O/4+C+f,v,m(P[3]),y,$/2)}function m(g){return g==="No Chord"?"N.C.":g}function b(g,w,k,$,O,P,y,C,E){const z={x:k,y:$,stroke:"none","font-size":O,"font-style":P.style,"font-family":P.face,"font-weight":P.weight,"text-decoration":P.decoration};return y&&(z["data-name"]=y),C&&(z.class=C),z["text-anchor"]=E?"middle":"start",g.paper.text(w,z,null,{"alignment-baseline":"middle"})}return ao=n,ao}var so,Od;function D$(){if(Od)return so;Od=1;var e=A$(),r=P$(),n=$b(),i=pt(),t=O$(),a=M$();function s(d,p,v,f,u,h,c,m,b,g,w){var k=new t(d.paper,m,b),$={};p.shouldAddClasses&&($.klass="abcjs-meta-top"),d.paper.openGroup($),d.moveY(d.padding.top),n(d,v.topText,k),d.paper.closeGroup(),d.moveY(d.spacing.music);let O=!1;w&&v.chordGrid&&(a(d,v.chordGrid,d.padding.left,f,v.formatting),w==="noMusic"&&(O=!0));var P=[],y=0;if(!O)for(var C=0;C<v.lines.length;C++){p.incrLine();var E=v.lines[C];if(E.staff){if(y++,v.formatting.maxStaves&&y>v.formatting.maxStaves)break;p.shouldAddClasses&&($.klass="abcjs-staff-wrapper abcjs-l"+p.lineNumber),d.paper.openGroup($),E.vskip&&d.moveY(E.vskip),P.length>=1&&l(d,d.spacing.staffSeparation,P[P.length-1],E.staffGroup);var z=o(d,E.staffGroup,k,C);z.line=g+C,P.push(z),d.paper.closeGroup()}else E.nonMusic&&(p.shouldAddClasses&&($.klass="abcjs-non-music"),d.paper.openGroup($),n(d,E.nonMusic,k),d.paper.closeGroup())}return p.reset(),O||v.bottomText&&v.bottomText.rows&&v.bottomText.rows.length>0&&(p.shouldAddClasses&&($.klass="abcjs-meta-bottom"),d.paper.openGroup($),d.moveY(24),n(d,v.bottomText,k),d.paper.closeGroup()),r(d,u,c,h),{staffgroups:P,selectables:k.getElements()}}function o(d,p,v,f){e(d,p,v,f);var u=p.height*i.STEP;return d.y+=u,p}function l(d,p,v,f){var u=v.staffs[v.staffs.length-1],h=-(u.bottom-2),c=f.staffs[0].top-10,m=c+h,b=m*i.STEP;b<p&&d.moveY(p-b)}return so=s,so}var oo,Md;function R$(){if(Md)return oo;Md=1;var e=yb();function r(n){for(var i=n;i&&i.attributes&&i.tagName.toLowerCase()!=="svg"&&!i.attributes.selectable;)i=i.parentNode;if(i&&i.attributes&&i.attributes.selectable){var t=i.attributes["data-index"].nodeValue;if(t&&(t=parseInt(t,10),t>=0&&t<this.selectables.length)){var a=this.selectables[t],s=e(a,n);return s.index=t,s.element=a,s}}return null}return oo=r,oo}var co,Dd;function xb(){if(Dd)return co;Dd=1;var e=pt(),r=X7(),n=Q7(),i=e$(),t=t$(),a=r$(),s=n$(),o=i$(),l=a$(),d=h$(),p=p$(),v=v$(),f=m$(),u=D$(),h=mb(),c=R$(),m=function(w,k){k=k||{},this.findSelectableElement=c,this.oneSvgPerLine=k.oneSvgPerLine,this.selectionColor=k.selectionColor,this.dragColor=k.dragColor?k.dragColor:k.selectionColor,this.dragging=!!k.dragging,this.selectTypes=k.selectTypes,this.responsive=k.responsive,this.space=3*e.SPACE,this.initialClef=k.initialClef,this.timeBasedLayout=k.timeBasedLayout,this.expandToWidest=!!k.expandToWidest,this.scale=k.scale?parseFloat(k.scale):0,this.classes=new p({shouldAddClasses:k.add_classes}),this.scale>.1||(this.scale=void 0),k.staffwidth?(this.staffwidthScreen=k.staffwidth,this.staffwidthPrint=k.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],k.clickListener&&this.addSelectListener(k.clickListener),this.renderer=new n(w),this.renderer.setPaddingOverride(k),k.showDebug&&(this.renderer.showDebug=k.showDebug),k.jazzchords&&(this.jazzchords=k.jazzchords),k.accentAbove&&(this.accentAbove=k.accentAbove),k.germanAlphabet&&(this.germanAlphabet=k.germanAlphabet),k.lineThickness&&(this.lineThickness=k.lineThickness),k.chordGrid&&(this.chordGrid=k.chordGrid),this.renderer.controller=this,this.renderer.foregroundColor=k.foregroundColor?k.foregroundColor:"currentColor",k.ariaLabel!==void 0&&(this.renderer.ariaLabel=k.ariaLabel),this.renderer.minPadding=k.minPadding?k.minPadding:0,this.reset()};m.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0,this.lineThickness&&this.renderer.setLineThickness(this.lineThickness)},m.prototype.engraveABC=function(w,k,$){w[0]===void 0&&(w=[w]),this.reset();for(var O=0;O<w.length;O++)k===void 0&&(k=O),this.getFontAndAttr=new v(w[O].formatting,this.classes),this.getTextSize=new f(this.getFontAndAttr,this.renderer.paper),this.engraveTune(w[O],k,$)},m.prototype.adjustNonScaledItems=function(w){this.width/=w,this.renderer.adjustNonScaledItems(w)},m.prototype.getMeasureWidths=function(w){this.reset(),this.getFontAndAttr=new v(w.formatting,this.classes),this.getTextSize=new f(this.getFontAndAttr,this.renderer.paper);var k=this.jazzchords;this.setupTune(w,0),this.constructTuneElements(w),d(this.renderer,w,0,this.space,this.timeBasedLayout);for(var $=[],O,P=!0,y=0;y<w.lines.length;y++){var C=w.lines[y];if(C.staff){if(P&&(O={left:0,measureWidths:[],total:0},$.push(O),P=!1),C.staffGroup.voices.length>0)for(var E=C.staffGroup.voices[0],z=!1,A=0,R=0;R<E.children.length;R++){var T=E.children[R];!z&&!T.isClef&&!T.isKeySig&&(z=!0,O.left=T.x,A=T.x),T.type==="bar"&&(O.measureWidths.push(T.x-A),O.total+=T.x-A,A=T.x)}}else P=!0}return this.jazzchords=k,$},m.prototype.setupTune=function(w,k){this.classes.reset(),w.formatting.jazzchords!==void 0&&(this.jazzchords=w.formatting.jazzchords),w.formatting.accentAbove!==void 0&&(this.accentAbove=w.formatting.accentAbove),this.renderer.newTune(w),this.engraver=new r(this.getTextSize,k,{bagpipes:w.formatting.bagpipes,flatbeams:w.formatting.flatbeams,graceSlurs:w.formatting.graceSlurs!==!1,percmap:w.formatting.percmap,initialClef:this.initialClef,jazzchords:this.jazzchords,timeBasedLayout:this.timeBasedLayout,accentAbove:this.accentAbove,germanAlphabet:this.germanAlphabet}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=w.getMeterFraction().num/w.getMeterFraction().den,w.formatting.staffwidth?this.width=w.formatting.staffwidth*1.33:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var $=w.formatting.scale?w.formatting.scale:this.scale;return this.responsive==="resize"&&($=void 0),$===void 0&&($=this.renderer.isPrint?.75:1),this.adjustNonScaledItems($),$},m.prototype.constructTuneElements=function(w){w.topText=new s(w.metaText,w.metaTextInfo,w.formatting,w.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize);var k,$,O=!1,P=!1;for(k=0;k<w.lines.length;k++)if($=w.lines[k],$.staff)P=!0,$.staffGroup=this.engraver.createABCLine($.staff,O?null:w.metaText.tempo,k),O=!0;else if($.subtitle){if(P){var y=this.width/2+this.renderer.padding.left;$.nonMusic=new a(this.renderer.spacing.subtitle,w.formatting,$.subtitle,y,this.renderer.padding.left,this.getTextSize)}}else $.text!==void 0?(P=!0,$.nonMusic=new i($.text,$.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):$.separator!==void 0&&$.separator.lineLength&&(P=!0,$.nonMusic=new t($.separator.spaceAbove,$.separator.lineLength,$.separator.spaceBelow));w.bottomText=new o(w.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize)},m.prototype.engraveTune=function(w,k,$){var O=this.jazzchords,P=this.setupTune(w,k);this.constructTuneElements(w);var y=d(this.renderer,w,this.width,this.space,this.expandToWidest,this.timeBasedLayout);if(this.expandToWidest&&y>this.width+1&&(w.topText=new s(w.metaText,w.metaTextInfo,w.formatting,w.lines,y,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),w.lines&&w.lines.length>0))for(var C=w.lines.length,E=0;E<C;++E){var z=w.lines[E];if(z.nonMusic&&z.nonMusic.rows&&z.nonMusic.rows.length>0)for(var A=z.nonMusic.rows.length,R=0;R<A;++R){var T=z.nonMusic.rows[R];T.left&&(z.subtitle?T.left=y/2+this.renderer.padding.left:z.text&&z.text.length>0&&z.text[0].center&&(T.left=y/2+this.renderer.padding.left))}}w.tablatures&&h.layoutTablatures(this.renderer,w);var I=u(this.renderer,this.classes,w,this.width,y,this.responsive,P,this.selectTypes,k,$,this.chordGrid);if(this.staffgroups=I.staffgroups,this.selectables=I.selectables,this.oneSvgPerLine){var N=this.renderer.paper.svg.parentNode;this.svgs=b(this.renderer,N,w.metaText.title,this.responsive,P)}else this.svgs=[this.renderer.paper.svg];l(this,this.svgs),this.jazzchords=O};function b(w,k,$,O,P){$||($="Untitled");var y=k.querySelector("svg");O==="resize"&&(k.style.paddingBottom="");for(var C=y.querySelector("style"),E=O==="resize"?y.viewBox.baseVal.width:y.getAttribute("width"),z=k.querySelectorAll("svg > g"),A=0,R=[],T=0;T<z.length;T++){var I=z[T],N=I.getBBox(),D=N.y-A,L=N.height+D,_=document.createElement("div"),x="overflow: hidden;";O!=="resize"&&(x+="height:"+L*P+"px;"),_.setAttribute("style",x);var S=g(y),M='Sheet Music for "'+$+'" section '+(T+1);S.setAttribute("aria-label",M),O!=="resize"&&S.setAttribute("height",L),O==="resize"&&(S.style.position="");var U=w.firefox112?L+1:L;S.setAttribute("viewBox","0 "+A+" "+E+" "+U),S.appendChild(C.cloneNode(!0));var q=document.createElement("title");q.innerText=M,S.appendChild(q),S.appendChild(I),_.appendChild(S),R.push(S),k.appendChild(_),A=N.y+N.height}return k.removeChild(y),R}function g(w){for(var k="http://www.w3.org/2000/svg",$=document.createElementNS(k,"svg"),O=0;O<w.attributes.length;O++){var P=w.attributes[O];P.name!=="height"&&P.name!="aria-label"&&$.setAttribute(P.name,P.value)}return $}return m.prototype.getDim=function(w){if(!w.dim){var k=w.svgEl.getBBox();w.dim={left:Math.round(k.x),top:Math.round(k.y),right:Math.round(k.x+k.width),bottom:Math.round(k.y+k.height)}}return w.dim},m.prototype.addSelectListener=function(w){this.listeners[this.listeners.length]=w},co=m,co}var uo,Rd;function Sb(){if(Rd)return uo;Rd=1;var e=Gi();ub();var r=xb(),n=lb(),i=sb(),t={};function a(){var d=window.innerWidth;for(var p in t)if(t.hasOwnProperty(p)){var v=t[p],f=v.offsetLeft;d-=f*2,v.style.width=d+"px"}}try{window.addEventListener("resize",a),window.addEventListener("orientationChange",a)}catch{}function s(d,p,v,f,u){v.viewportHorizontal?(d.innerHTML='<div class="abcjs-inner"></div>',v.scrollHorizontal?(d.style.overflowX="auto",d.style.overflowY="hidden"):d.style.overflow="hidden",t[d.id]=d,d=d.children[0]):v.viewportVertical?(d.innerHTML='<div class="abcjs-inner scroll-amount"></div>',d.style.overflowX="hidden",d.style.overflowY="auto",d=d.children[0]):d.innerHTML="";var h=new r(d,v);if(h.engraveABC(p,f,u),p.engraver=h,v.viewportVertical||v.viewportHorizontal){var c=d.parentNode;c.style.width=d.style.width}}var o=function(d,p,v,f,u){var h={},c;if(v){for(c in v)v.hasOwnProperty(c)&&(h[c]=v[c]);h.warnings_id&&h.tablature&&(h.tablature.warning_id=h.warnings_id)}if(f)for(c in f)f.hasOwnProperty(c)&&(c==="listener"?f[c].highlight&&(h.clickListener=f[c].highlight):h[c]=f[c]);if(u)for(c in u)u.hasOwnProperty(c)&&(h[c]=u[c]);function m(b,g,w,k){var $=!1;return b==="*"&&($=!0,b=document.createElement("div"),b.setAttribute("style","visibility: hidden;"),document.body.appendChild(b)),!$&&h.wrap&&h.staffwidth?(g=l(b,g,w,k,h),g):(h.afterParsing&&h.afterParsing(g,w,k),s(b,g,h,w,0),$&&b.parentNode.removeChild(b),null)}return e.renderEngine(m,d,p,h)};function l(d,p,v,f,u){var h=new r(d,u),c=h.getMeasureWidths(p),m=i.calcLineWraps(p,c,u);if(m.reParse){var b=new n;b.parse(f,m.revisedParams),p=b.getTune();var g=b.getWarnings();g&&(p.warnings=g)}return u.afterParsing&&u.afterParsing(p,v,f),s(d,p,m.revisedParams,v,0),p.explanation=m.explanation,p}return uo=o,uo}var lo,Ld;function L$(){if(Ld)return lo;Ld=1;var e=Gi(),r=xb(),n=function(i,t){function a(s,o,l,d){s=document.createElement("div"),s.setAttribute("style","visibility: hidden;"),document.body.appendChild(s);var p=new r(s,t),v=p.getMeasureWidths(o);return s.parentNode.removeChild(s),{sections:v}}return e.renderEngine(a,"*",i,t)};return lo=n,lo}var fo,Ud;function Eu(){if(Ud)return fo;Ud=1;var e={};return fo=e,fo}var ho,Zd;function U$(){if(Zd)return ho;Zd=1;var e=Eu(),r=function(n,i,t,a){e[i]||(e[i]={});var s=e[i];return s[t]||(s[t]=new Promise(function(o,l){var d=new XMLHttpRequest;let p=n+i+"-mp3/"+t+".mp3";d.open("GET",p,!0),d.responseType="arraybuffer",d.onload=function(){if(d.status!==200){l(Error("Can't load sound at "+p+" status="+d.status));return}var v=function(u){o({instrument:i,name:t,status:"loaded",audioBuffer:u})},f=a.decodeAudioData(d.response,v,function(){l(Error("Can't decode sound at "+p))});f&&typeof f.catch=="function"&&f.catch(l)},d.onerror=function(){l(Error("Can't load sound at "+p))},d.send()}).catch(o=>{throw console.error("Didn't load note",i,t,":",o.message),o})),s[t]};return ho=r,ho}var po,jd;function Nu(){if(jd)return po;jd=1;var e=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];return po=e,po}var vo,Bd;function Z$(){if(Bd)return vo;Bd=1;var e=Nu(),r=function(n){for(var i=[],t=0;t<n.tracks.length;t++)i.push([]);var a=e[0];return n.tracks.forEach(function(s,o){s.forEach(function(l){switch(l.cmd){case"note":var d=l.instrument!==void 0?e[l.instrument]:a;if(l.duration>0){var p=l.gap?l.gap:0,v=l.duration;p=Math.min(p,v*2/3);var f={pitch:l.pitch,instrument:d,start:Math.round(l.start*1e6)/1e6,end:Math.round((l.start+v-p)*1e6)/1e6,volume:l.volume};l.startChar&&(f.startChar=l.startChar),l.endChar&&(f.endChar=l.endChar),l.style&&(f.style=l.style),l.cents&&(f.cents=l.cents),i[o].push(f)}break;case"program":a=e[l.instrument];break;case"text":break;default:console.log("Unhandled midi event",l)}})}),i};return vo=r,vo}var mo,qd;function Ji(){if(qd)return mo;qd=1;function e(r){if(r)window.abcjsAudioContext=r;else if(!window.abcjsAudioContext){var n=window.AudioContext||window.webkitAudioContext;if(n)window.abcjsAudioContext=new n;else return!1}return window.abcjsAudioContext.state!=="suspended"}return mo=e,mo}var go,Fd;function Nr(){if(Fd)return go;Fd=1;var e=Ji();function r(){return window.abcjsAudioContext||e(),window.abcjsAudioContext}return go=r,go}var bo,Hd;function Wi(){if(Hd)return bo;Hd=1;var e=Nr();function r(){if(!window.Promise||!window.AudioContext&&!window.webkitAudioContext&&!navigator.mozAudioContext&&!navigator.msAudioContext)return!1;var n=e();if(n)return n.resume!==void 0}return bo=r,bo}var yo,Gd;function Au(){if(Gd)return yo;Gd=1;var e={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"};return yo=e,yo}var _o,Jd;function j$(){if(Jd)return _o;Jd=1;var e=function(n){return window.URL.createObjectURL(r(n.audioBuffers))};function r(n){var i=n[0],t=i.numberOfChannels,a=i.length*t*2+44,s=new ArrayBuffer(a),o=new DataView(s),l=[],d,p,v=0,f=0;for(h(1179011410),h(a-8),h(1163280727),h(544501094),h(16),u(1),u(t),h(i.sampleRate),h(i.sampleRate*2*t),u(t*2),u(16),h(1635017060),h(a-f-4),d=0;d<t;d++)l.push(i.getChannelData(d));for(;f<a;){for(d=0;d<l.length;d++)p=Math.max(-1,Math.min(1,l[d][v])),p=(.5+p<0?p*32768:p*32767)|0,o.setInt16(f,p,!0),f+=2;v++}return new Blob([s],{type:"audio/wav"});function u(c){o.setUint16(f,c,!0),f+=2}function h(c){o.setUint32(f,c,!0),f+=4}}return _o=e,_o}var wo,Wd;function Ib(){if(Wd)return wo;Wd=1;function e(r){return Math.pow(2,r/1200)}return wo=e,wo}var ko,Yd;function B$(){if(Yd)return ko;Yd=1;var e=Eu(),r=Au(),n=Ib();function i(a,s,o,l,d,p,v,f,u){var h=window.OfflineAudioContext||window.webkitOfflineAudioContext,c=o.len*o.tempoMultiplier;p&&(c+=p/1e3),c-=f,c<0&&(c=.005);var m=new h(2,Math.floor((c+v)*s),s),b=r[o.pitch];if(!e[o.instrument])return u&&u("placeNote skipped (instrument empty): "+o.instrument+":"+b),Promise.resolve();var g=e[o.instrument][b];return g?g.then(function(w){var k=m.createBufferSource();k.buffer=w.audioBuffer;var $=o.volume/96*d;k.gainNode=m.createGain(),o.pan&&m.createStereoPanner&&(k.panNode=m.createStereoPanner(),k.panNode.pan.setValueAtTime(o.pan,0)),k.gainNode.gain.value=$,k.gainNode.gain.linearRampToValueAtTime(k.gainNode.gain.value,c),k.gainNode.gain.linearRampToValueAtTime(0,c+v),o.cents&&(k.playbackRate.value=n(o.cents)),k.panNode?(k.panNode.connect(m.destination),k.gainNode.connect(k.panNode)):k.gainNode.connect(m.destination),k.connect(k.gainNode),k.start(0),k.noteOff?k.noteOff(c+v):k.stop(c+v);var O;return m.oncomplete=function(P){if(P.renderedBuffer&&P.renderedBuffer.getChannelData)for(var y=0;y<l.length;y++){var C=l[y]*o.tempoMultiplier;p&&(C-=p/1e3),C<0&&(C=0),C=Math.floor(C*s),t(a,P.renderedBuffer,C)}u&&u("placeNote: "+o.instrument+":"+b),O()},m.startRendering(),new Promise(function(P){O=P})}).catch(function(w){return u&&u("placeNote catch: "+w.message),Promise.reject(w)}):(u&&u("placeNote skipped: "+o.instrument+":"+b),Promise.resolve())}var t=function(a,s,o){for(var l=0;l<2;l++)for(var d=s.getChannelData(l),p=a.getChannelData(l),v=0;v<d.length;v++)p[v+o]+=d[v]};return ko=i,ko}var $o,Vd;function Pu(){if(Vd)return $o;Vd=1;var e=U$(),r=Z$(),n=Ji(),i=Nr(),t=Wi(),a=Au(),s=Nu(),o=j$(),l=B$(),d=Eu(),p="MIDI is not supported in this browser.",v="https://paulrosen.github.io/midi-js-soundfonts/abcjs/",f="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/",u="https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/";function h(){var c=this;c.audioBufferPossible=void 0,c.directSource=[],c.startTimeSec=void 0,c.pausedTimeSec=void 0,c.audioBuffers=[],c.duration=void 0,c.isRunning=!1,c.options={},c.pickupLength=0,c.init=function(g){g||(g={}),g.options&&(c.options=g.options),n(g.audioContext);var w=i().currentTime;if(c.debugCallback=g.debugCallback,c.debugCallback&&c.debugCallback("init called"),c.audioBufferPossible=c._deviceCapable(),!c.audioBufferPossible)return Promise.reject({status:"NotSupported",message:p});var k=g.options?g.options:{};c.soundFontUrl=k.soundFontUrl?k.soundFontUrl:f,c.soundFontUrl[c.soundFontUrl.length-1]!=="/"&&(c.soundFontUrl+="/"),k.soundFontVolumeMultiplier||k.soundFontVolumeMultiplier===0?c.soundFontVolumeMultiplier=k.soundFontVolumeMultiplier:c.soundFontUrl===f||c.soundFontUrl===u?c.soundFontVolumeMultiplier=3:c.soundFontUrl===v?c.soundFontVolumeMultiplier=.4:c.soundFontVolumeMultiplier=1,k.programOffsets?c.programOffsets=k.programOffsets:c.soundFontUrl===v?c.programOffsets={bright_acoustic_piano:20,honkytonk_piano:20,electric_piano_1:30,electric_piano_2:30,harpsichord:40,clavinet:20,celesta:20,glockenspiel:40,vibraphone:30,marimba:35,xylophone:30,tubular_bells:35,dulcimer:30,drawbar_organ:20,percussive_organ:25,rock_organ:20,church_organ:40,reed_organ:40,accordion:40,harmonica:40,acoustic_guitar_nylon:20,acoustic_guitar_steel:30,electric_guitar_jazz:25,electric_guitar_clean:15,electric_guitar_muted:35,overdriven_guitar:25,distortion_guitar:20,guitar_harmonics:30,electric_bass_finger:15,electric_bass_pick:30,fretless_bass:40,violin:105,viola:50,cello:40,contrabass:60,trumpet:10,trombone:90,alto_sax:20,tenor_sax:20,clarinet:20,flute:50,banjo:50,woodblock:20}:c.programOffsets={};var $=k.fadeLength!==void 0?parseInt(k.fadeLength,10):NaN;if(c.fadeLength=isNaN($)?200:$,$=k.noteEnd!==void 0?parseInt(k.noteEnd,10):NaN,c.noteEnd=isNaN($)?0:$,c.pan=k.pan,c.meterSize=1,g.visualObj){c.flattened=g.visualObj.setUpAudio(k);var O=g.visualObj.getMeterFraction();O.den&&(c.meterSize=O.num/O.den),c.pickupLength=g.visualObj.getPickupLength()}else if(g.sequence)c.flattened=g.sequence;else return Promise.reject(new Error("Must pass in either a visualObj or a sequence"));c.millisecondsPerMeasure=g.millisecondsPerMeasure?g.millisecondsPerMeasure:g.visualObj?g.visualObj.millisecondsPerMeasure(c.flattened.tempo):1e3,c.beatsPerMeasure=g.visualObj?g.visualObj.getBeatsPerMeasure():4,c.sequenceCallback=k.sequenceCallback,c.callbackContext=k.callbackContext,c.onEnded=k.onEnded,c.meterFraction=g.visualObj?g.visualObj.getMeterFraction():{den:1};var P={},y=[],C=[],E=s[0];c.flattened.tracks.forEach(function(I){I.forEach(function(N){if(N.cmd==="program"&&s[N.instrument]&&(E=s[N.instrument]),N.pitch!==void 0){var D=N.pitch,L=a[D],_=N.instrument!==void 0?s[N.instrument]:E;if(L)if(P[_]||(P[_]={}),!d[_]||!d[_][L])P[_][L]=!0;else{var x=_+":"+L;y.indexOf(x)<0&&y.push(x)}else{var S=_+":"+L;console.log("Can't find note: ",D,S),C.indexOf(S)<0&&C.push(S)}}})}),c.debugCallback&&c.debugCallback("note gathering time = "+Math.floor((i().currentTime-w)*1e3)+"ms"),w=i().currentTime;var z=[];Object.keys(P).forEach(function(I){Object.keys(P[I]).forEach(function(N){z.push({instrument:I,note:N})})}),c.debugCallback&&c.debugCallback("notes "+JSON.stringify(z));for(var A=[],R=256,T=0;T<z.length;T+=R)A.push(z.slice(T,T+R));return new Promise(function(I,N){var D={cached:y,error:C,loaded:[]},L=0,_=function(){c.debugCallback&&c.debugCallback("loadBatch idx="+L+" len="+A.length),L<A.length?c._loadBatch(A[L],c.soundFontUrl,w).then(function(x){c.debugCallback&&c.debugCallback("loadBatch then"),w=i().currentTime,x&&(x.error&&(D.error=D.error.concat(x.error)),x.loaded&&(D.loaded=D.loaded.concat(x.loaded))),L++,_()},N):(c.debugCallback&&c.debugCallback("resolve init"),I(D))};_()})},c._loadBatch=(function(g,w,k,$){var O=[];return g.forEach(function(P){c.debugCallback&&c.debugCallback("getNote "+P.instrument+":"+P.note),O.push(e(w,P.instrument,P.note,i()))}),Promise.all(O).then(function(P){c.debugCallback&&c.debugCallback("mp3 load time = "+Math.floor((i().currentTime-k)*1e3)+"ms");for(var y=[],C=[],E=[],z=[],A=0;A<P.length;A++){var R=P[A],T=R.instrument+":"+R.name;R.status==="loaded"?y.push(T):R.status==="pending"?E.push(T):R.status==="cached"?C.push(T):z.push(T+" "+R.message)}if(E.length>0){if(c.debugCallback&&c.debugCallback("pending "+JSON.stringify(E)),$?$=$*2:$=50,$<9e4)return new Promise(function(D,L){setTimeout(function(){var _=[];for(A=0;A<E.length;A++)T=E[A].split(":"),_.push({instrument:T[0],note:T[1]});c.debugCallback&&c.debugCallback("retry "+JSON.stringify(_)),c._loadBatch(_,w,k,$).then(function(x){D(x)}).catch(function(x){L(x)})},$)});for(var I=[],N=0;N<g.length;N++)I.push(g[N].instrument+"/"+g[N].note);return c.debugCallback&&c.debugCallback("loadBatch timeout"),Promise.reject(new Error("timeout attempting to load: "+I.join(", ")))}else return c.debugCallback&&c.debugCallback("loadBatch resolve"),Promise.resolve({loaded:y,cached:C,error:z})}).catch(function(P){c.debugCallback&&c.debugCallback("loadBatch catch "+P.message)})}),c.prime=function(){var g=c.fadeLength/1e3;return c.isRunning=!1,c.audioBufferPossible?(c.debugCallback&&c.debugCallback("prime called"),new Promise(function(w,k){try{let L=function(_){var x=_&&_.audioBuffers&&_.audioBuffers.length>0?_.audioBuffers[0].duration:0;return{status:i().state,duration:x}};var D=L,$=i().currentTime,O=c.millisecondsPerMeasure/1e3/c.meterSize;if(c.duration=c.flattened.totalDuration*O,c.duration<=0)return c.audioBuffers=[],w({status:"empty",seconds:0});c.duration+=g;var P=Math.floor(i().sampleRate*c.duration);c.stop();var y=r(c.flattened);c.options.swing&&b(y,c.options.swing,c.meterFraction,c.pickupLength),c.sequenceCallback&&c.sequenceCallback(y,c.callbackContext);var C=m(y.length,c.pan),E={};y.forEach(function(_,x){var S=C&&C.length>x?C[x]:0;_.forEach(function(M){var U=M.instrument+":"+M.pitch+":"+M.volume+":"+Math.round((M.end-M.start)*1e3)/1e3+":"+S+":"+O+":"+(M.cents?M.cents:0);c.debugCallback&&c.debugCallback("noteMapTrack "+U),E[U]||(E[U]=[]),E[U].push(M.start)})});for(var z=[],A=i().createBuffer(2,P,i().sampleRate),R=0;R<Object.keys(E).length;R++){var T=Object.keys(E)[R],I=T.split(":"),N=I[6]!==void 0?parseFloat(I[6]):0;I={instrument:I[0],pitch:parseInt(I[1],10),volume:parseInt(I[2],10),len:parseFloat(I[3]),pan:parseFloat(I[4]),tempoMultiplier:parseFloat(I[5]),cents:N},z.push(l(A,i().sampleRate,I,E[T],c.soundFontVolumeMultiplier,c.programOffsets[I.instrument],g,c.noteEnd/1e3,c.debugCallback))}c.audioBuffers=[A],c.debugCallback&&(c.debugCallback("sampleRate = "+i().sampleRate),c.debugCallback("totalSamples = "+P),c.debugCallback("creationTime = "+Math.floor((i().currentTime-$)*1e3)+"ms")),Promise.all(z).then(function(){i().state==="suspended"?i().resume().then(function(){w(L(c))}):i().state==="interrupted"?i().suspend().then(function(){i().resume().then(function(){w(L(c))})}):w(L(c))}).catch(function(_){k(_)})}catch(L){k(L)}})):Promise.reject(new Error(p))};function m(g,w){if(w==null)return null;var k=[];if(w.length){for(var $=0;$<g;$++)if($<w.length){var O=parseFloat(w[$]);O<-1?O=-1:O>1&&(O=1),k.push(O)}else k.push(0);return k}else{var P=parseFloat(w);if(P*(g-1)>2)return null;for(var y=g%2===0,C=y?0-P/2:0,E=C+P,z=0;z<g;z++)y=z%2===0,y?(k.push(C),C-=P):(k.push(E),E+=P);return k}}c.start=function(){if(!c.audioBufferPossible)throw new Error(p);c.debugCallback&&c.debugCallback("start called");var g=c.pausedTimeSec?c.pausedTimeSec:0;c._kickOffSound(g),c.startTimeSec=i().currentTime-g,c.pausedTimeSec=void 0,c.debugCallback&&c.debugCallback("MIDI STARTED",c.startTimeSec)},c.pause=function(){if(!c.audioBufferPossible)throw new Error(p);return c.debugCallback&&c.debugCallback("pause called"),c.pausedTimeSec=c.stop(),c.pausedTimeSec},c.resume=function(){c.start()},c.seek=function(g,w){var k;switch(w){case"seconds":k=g;break;case"beats":k=g*c.millisecondsPerMeasure/c.beatsPerMeasure/1e3;break;default:k=(c.duration-c.fadeLength/1e3)*g;break}if(!c.audioBufferPossible)throw new Error(p);c.debugCallback&&c.debugCallback("seek called sec="+k),c.isRunning?(c.stop(),c._kickOffSound(k)):c.pausedTimeSec=k,c.pausedTimeSec=k},c.stop=function(){c.isRunning=!1,c.pausedTimeSec=void 0,c.directSource.forEach(function(w){try{w.stop()}catch(k){console.log("direct source didn't stop:",k)}}),c.directSource=[];var g=i().currentTime-c.startTimeSec;return g},c.finished=function(){c.startTimeSec=void 0,c.pausedTimeSec=void 0,c.isRunning=!1},c.download=function(){return o(c)},c.getAudioBuffer=function(){return c.audioBuffers[0]},c.getIsRunning=function(){return c.isRunning},c._deviceCapable=function(){return t()?!0:(console.warn(p),c.debugCallback&&c.debugCallback(p),!1)},c._kickOffSound=function(g){c.isRunning=!0,c.directSource=[],c.audioBuffers.forEach(function(w,k){c.directSource[k]=i().createBufferSource(),c.directSource[k].buffer=w,c.directSource[k].connect(i().destination)}),c.directSource.forEach(function(w){w.start(0,g)}),c.onEnded&&(c.directSource[0].onended=function(){c.onEnded(c.callbackContext)})};function b(g,w,k,$){if(!(k.den!=4&&k.den!=8)&&(w=parseFloat(w),!(isNaN(w)||w<=50))){w>75&&(w=75),w=w/50-1;var O=0,P=.25;k.den===8&&(P=P/2);for(var y=P/2,C=y*w,E=0;E<g.length;E++)for(var z=g[E],A=0;A<z.length;A++){var R=z[A];if((R.start-$)%y==0&&(R.start-$)%P!=0&&(A==0||z[A-1].start<=z[A].start-y)&&(A==z.length-1||z[A+1].start>=z[A].start+y)){var T=R.start;R.start+=C,R.volume*=1+O,A>0&&z[A-1].end==T&&(z[A-1].end=R.start,z[A-1].volume*=1-O)}}}}}return $o=h,$o}var xo,Xd;function Tb(){if(Xd)return xo;Xd=1;var e=function(){var r=this;r.tracks=[],r.totalDuration=0,r.currentInstrument=[],r.starts=[],r.addTrack=function(){return r.tracks.push([]),r.currentInstrument.push(0),r.starts.push(0),r.tracks.length-1},r.setInstrument=function(n,i){r.tracks[n].push({channel:0,cmd:"program",instrument:i}),r.currentInstrument[n]=i},r.appendNote=function(n,i,t,a,s){var o={cmd:"note",duration:t,gap:0,instrument:r.currentInstrument[n],pitch:i,start:r.starts[n],volume:a};s&&(o.cents=s),r.tracks[n].push(o),r.starts[n]+=t,r.totalDuration=Math.max(r.totalDuration,r.starts[n])}};return xo=e,xo}var So,Kd;function q$(){if(Kd)return So;Kd=1;var e=`
|
|
122
|
+
`),f=f.replace(/^\n/,`
|
|
123
|
+
`),u.font.box&&(r||a.paper.openGroup({klass:u.attr.class,fill:a.foregroundColor,"data-name":n.name}),u.attr["text-anchor"]==="end"?u.attr.x-=u.font.padding:u.attr["text-anchor"]==="start"&&(u.attr.x+=u.font.padding),u.attr.y+=u.font.padding,delete u.attr.class),n.noClass&&delete u.attr.class,u.attr.x=e(u.attr.x),u.attr.y=e(u.attr.y),n.name&&(u.attr["data-name"]=n.name);var g=a.paper.text(f,u.attr);if(u.font.box){var d=g.getBBox(),p=0;u.attr["text-anchor"]==="middle"?p=d.width/2+u.font.padding:u.attr["text-anchor"]==="end"&&(p=d.width+u.font.padding*2);var l=0;n.centerVertically&&(l=d.height-u.font.padding),a.paper.rect({"data-name":"box",x:Math.round(n.x-p),y:Math.round(i-l),width:Math.round(d.width+u.font.padding*2),height:Math.round(d.height+u.font.padding*2)}),r||(g=a.paper.closeGroup())}return g}return Q0=t,Q0}var en,lo;function ov(){if(lo)return en;lo=1;var e=_t(),t=Ve(),a=gt();function n(f,g,d){var p=g.startVoice.staff.absoluteY-t.STEP*10;return g.endVoice&&g.endVoice.staff?g.endY=g.endVoice.staff.absoluteY-t.STEP*2:g.lastContinuedVoice&&g.lastContinuedVoice.staff?g.endY=g.lastContinuedVoice.staff.absoluteY-t.STEP*2:g.endY=g.startVoice.staff.absoluteY-t.STEP*2,u(f,g.x,p,g.endY,g.type,g.header,d)}function r(f,g,d,p,l){g+=t.STEP;var o=t.STEP*.75,h=t.STEP*.75,s=p-d,v=e("M %f %f l %f %f l %f %f l %f %f z",g,d-h,0,s+h*2,o,0,0,-(s+h*2)),y=t.STEP*2,m=t.STEP;return v+=e("M %f %f q %f %f %f %f q %f %f %f %f z",g+o,d-h,y*.6,m*.2,y,-m,-y*.1,m*.3,-y,m+t.STEP),v+=e("M %f %f q %f %f %f %f q %f %f %f %f z",g+o,d+h+s,y*.6,-m*.2,y,m,-y*.1,-m*.3,-y,-m-t.STEP),f.paper.path({path:v,stroke:f.foregroundColor,fill:f.foregroundColor,class:f.controller.classes.generate(l),"data-name":l})}function i(f,g,d,p,l){var o=p-d,h=c(g,d,[7.5,-8,21,0,18.5,-10.5,7.5],[0,o/5.5,o/3.14,o/2,o/2.93,o/4.88,0]);return h+=c(g,d,[0,17.5,-7.5,6.6,-5,20,0],[o/2,o/1.46,o/1.22,o,o/1.19,o/1.42,o/2]),f.paper.path({path:h,stroke:f.foregroundColor,fill:f.foregroundColor,class:f.controller.classes.generate(l),"data-name":l})}function c(f,g,d,p){return e("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",f+d[0],g+p[0],f+d[1],g+p[1],f+d[2],g+p[2],f+d[3],g+p[3],f+d[4],g+p[4],f+d[5],g+p[5],f+d[6],g+p[6])}var u=function(f,g,d,p,l,o,h){var s;if(o){f.paper.openGroup({klass:f.controller.classes.generate("staff-extra voice-name"),"data-name":l});var v=d+(p-d)/2;v=v-f.controller.getTextSize.baselineToCenter(o,"voicefont","staff-extra voice-name",0,1),a(f,{x:f.padding.left,y:v,text:o,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return l==="brace"?s=i(f,g,d,p,l):l==="bracket"&&(s=r(f,g,d,p,l)),o&&(s=f.paper.closeGroup()),h.wrapSvgEl({el_type:l,startChar:-1,endChar:-1},s),s};return en=n,en}var tn,uo;function jt(){if(uo)return tn;uo=1;function e(t,a,n){var r=t.paper.path(a);return r}return tn=e,tn}var rn,ho;function cv(){if(ho)return rn;ho=1;var e=_t(),t=jt(),a=it();function n(s,v,y){(!v.anchor1||!v.anchor2||!v.anchor1.heads||!v.anchor2.heads||v.anchor1.heads.length===0||v.anchor2.heads.length===0)&&window.console.error("Glissando Element not set.");var m=4,_=s.calcY(v.anchor1.heads[0].pitch),k=s.calcY(v.anchor2.heads[0].pitch),x=v.anchor1.x+v.anchor1.w/2,R=v.anchor2.x+v.anchor2.w/2,I=r(x,_,R,k),b=v.anchor1.w/2+m,A=v.anchor2.w/2+m,N=i(x,_,R,k),M=c(_,N,b);c(k,N,-A);var z=u(I-b-A),L=h(s,x+b,M,z,N);return y.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},L),[L]}function r(s,v,y,m){var _=y-s,k=m-v;return Math.sqrt(_*_+k*k)}function i(s,v,y,m){return(m-v)/(y-s)}function c(s,v,y){return a(s+y*v)}function u(s){var v=5;return Math.max(2,Math.floor((s-v*2)/6))}var f=[[3.5,-4.8]],g=[[1.5,-1],[.3,-.3],[-3.5,3.8]],d=[[-1.5,2]],p=[[3,4],[3,-4]],l=[[-3,4],[-3,-4]];function o(s,v){for(var y="",m=0;m<s.length;m++)y+="l"+s[m][0]+" "+c(s[m][1],v,s[m][0]);return y}var h=function(s,v,y,m,_){var k=e("M %f %f",v,y);k+=o(f,_);var x;for(x=0;x<m;x++)k+=o(p,_);for(k+=o(g,_),x=0;x<m;x++)k+=o(l,_);return k+=o(d,_)+"z",t(s,{path:k,highlight:"stroke",stroke:s.foregroundColor,class:s.controller.classes.generate("decoration"),"data-name":"glissando"})};return rn=n,rn}var nn,fo;function lv(){if(fo)return nn;fo=1;var e=_t(),t=jt(),a=it();function n(i,c,u){c.pitch===void 0&&window.console.error("Crescendo Element y-coordinate not set.");var f=i.calcY(c.pitch)+4,g=8,d=c.anchor1?c.anchor1.x:0,p=c.anchor2?c.anchor2.x:800,l;return c.dir==="<"?l=r(i,f+g/2,f,f+g/2,f+g,d,p):l=r(i,f,f+g/2,f+g,f+g/2,d,p),u.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},l),[l]}var r=function(i,c,u,f,g,d,p){c=a(c),u=a(u),f=a(f),g=a(g),d=a(d),p=a(p);var l=e("M %f %f L %f %f M %f %f L %f %f",d,c,p,u,d,f,p,g);return t(i,{path:l,highlight:"stroke",stroke:i.foregroundColor,class:i.controller.classes.generate("dynamics decoration"),"data-name":"dynamics"})};return nn=n,nn}var an,po;function Ya(){if(po)return an;po=1;var e=it();function t(){this.ingroup=!1}t.prototype.beginGroup=function(n,r){this.paper=n,this.controller=r,this.path=[],this.lastM=[0,0],this.ingroup=!0,this.paper.openGroup()},t.prototype.isInGroup=function(){return this.ingroup},t.prototype.addPath=function(n){if(n=n||[],n.length!==0){n[0][0]="m",n[0][1]=e(n[0][1]-this.lastM[0]),n[0][2]=e(n[0][2]-this.lastM[1]),this.lastM[0]+=n[0][1],this.lastM[1]+=n[0][2],this.path.push(n[0]);for(var r=1,i=n.length;r<i;r++)n[r][0]==="m"&&(this.lastM[0]+=n[r][1],this.lastM[1]+=n[r][2]),this.path.push(n[r])}},t.prototype.endGroup=function(n,r){this.ingroup=!1;for(var i="",c=0;c<this.path.length;c++)i+=this.path[c].join(" ");this.path=[];var u=this.paper.closeGroup();return u&&(u.setAttribute("class",this.controller.classes.generate(n)),u.setAttribute("fill",this.controller.renderer.foregroundColor),u.setAttribute("stroke","none"),u.setAttribute("data-name",r)),u};var a=new t;return an=a,an}var sn,go;function Wa(){if(go)return sn;go=1;var e=gt(),t=pt(),a=Ya();function n(i,c,u,f,g){var d,p;if(!f)return null;if(f.length>1&&f.indexOf(".")<0){var l=a.isInGroup()?"":g.klass;i.paper.openGroup({"data-name":g.name,klass:l});for(var o=0,h=0;h<f.length;h++){var s=f[h];p=t.getYCorr(s),d=t.printSymbol(c+o,i.calcY(u+p),s,i.paper,{stroke:g.stroke,fill:g.fill}),d?h<f.length-1&&(o+=r(s,f[h+1],t.getSymbolWidth(s))):e(i,{x:c,y:i.y,text:"no symbol:"+f,type:"debugfont",klass:"debug-msg",anchor:"start"},!1)}var v=i.paper.closeGroup();return v}else return p=t.getYCorr(f),a.isInGroup()?d=t.printSymbol(c,i.calcY(u+p),f,i.paper,{"data-name":g.name}):d=t.printSymbol(c,i.calcY(u+p),f,i.paper,{klass:g.klass,stroke:g.stroke,fill:g.fill,"data-name":g.name}),d||(e(i,{x:c,y:i.y,text:"no symbol:"+f,type:"debugfont",klass:"debug-msg",anchor:"start"},!1),null)}function r(i,c,u){var f=u;return i==="f"&&c==="f"&&(f=f*2/3),i==="p"&&c==="p"&&(f=f*5/6),i==="f"&&c==="z"&&(f=f*5/8),f}return sn=n,sn}var on,vo;function uv(){if(vo)return on;vo=1;var e=Wa();function t(a,n,r){n.pitch===void 0&&window.console.error("Dynamic Element y-coordinate not set.");var i=1,c=1,u=e(a,n.anchor.x,n.pitch,n.dec,{scalex:i,scaley:c,klass:a.controller.classes.generate("decoration dynamics"),fill:a.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:n.dec},u),[u]}return on=t,on}var cn,mo;function hv(){if(mo)return cn;mo=1;var e=_t(),t=gt(),a=jt(),n=it();function r(u,f,g){u.paper.openGroup({klass:u.controller.classes.generate("triplet "+f.durationClass),"data-name":"triplet"}),f.hasBeam||c(u,f.anchor1.x,f.startNote,f.anchor2.x+f.anchor2.w,f.endNote),t(u,{x:f.xTextPos,y:u.calcY(f.yTextPos-1),text:""+f.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0,name:""+f.number},!0);var d=u.paper.closeGroup();return g.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},d),d}function i(u,f,g,d){return e("M %f %f L %f %f",n(u),n(f),n(g),n(d))}function c(u,f,g,d,p){g=u.calcY(g),p=u.calcY(p);var l=5,o="";o+=i(f,g,f,g+l),o+=i(d,p,d,p+l);var h=f+(d-f)/2,s=8,v=(p-g)/(d-f),y=h-s,m=g+(y-f)*v;o+=i(f,g,y,m);var _=h+s,k=g+(_-f)*v;o+=i(_,k,d,p),a(u,{path:o,stroke:u.foregroundColor,"data-name":"triplet-bracket"})}return cn=r,cn}var ln,bo;function fv(){if(bo)return ln;bo=1;var e=_t(),t=gt(),a=jt(),n=it();function r(i,c,u,f,g){c.pitch===void 0&&window.console.error("Ending Element y-coordinate not set.");var d=n(i.calcY(c.pitch)),p=20,l="";c.anchor1&&(u=n(c.anchor1.x+c.anchor1.w),l+=e("M %f %f L %f %f ",u,d,u,n(d+p))),c.anchor2&&(f=n(c.anchor2.x),l+=e("M %f %f L %f %f ",f,d,f,n(d+p))),l+=e("M %f %f L %f %f ",u,d,f,d),i.paper.openGroup({klass:i.controller.classes.generate("ending"),fill:i.foregroundColor,"data-name":"ending"}),a(i,{path:l,stroke:i.foregroundColor,fill:i.foregroundColor,"data-name":"line"}),c.anchor1&&t(i,{x:n(u+5),y:n(i.calcY(c.pitch-.5)),text:c.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:c.text});var o=i.paper.closeGroup();return g.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},o),[o]}return ln=r,ln}var un,yo;function dv(){if(yo)return un;yo=1;var e=_t(),t=it();function a(i,c,u,f,g){n(c,u,f);var d="";c.anchor1?d+="abcjs-start-m"+c.anchor1.parent.counters.measure+"-n"+c.anchor1.parent.counters.note:d+="abcjs-start-edge",c.anchor2?d+=" abcjs-end-m"+c.anchor2.parent.counters.measure+"-n"+c.anchor2.parent.counters.note:d+=" abcjs-end-edge",c.hint&&(d="abcjs-hint");var p=c.fixedY?1.5:0,l=r(i,c.startX,c.endX,c.startY+p,c.endY+p,c.above,d,c.isTie,c.dotted),o=-1;c.anchor1&&!c.isTie&&(o=c.anchor1.parent.abcelem.startChar-1);var h=-1;return c.anchor2&&!c.isTie&&(h=c.anchor2.parent.abcelem.endChar+1),g.wrapSvgEl({el_type:"slur",startChar:o,endChar:h},l),[l]}var n=function(i,c,u){!i.anchor1||!i.anchor2||i.anchor1.pitch===i.anchor2.pitch&&i.internalNotes.length===0?i.isTie=!0:i.isTie=!1,i.isTie?(i.calcTieDirection(),i.calcX(c,u),i.calcTieY()):(i.calcSlurDirection(),i.calcX(c,u),i.calcSlurY()),i.avoidCollisionAbove()},r=function(i,c,u,f,g,d,p,l,o){var h=l?1.2:1.5;c=t(c+6),u=t(u+4),f=f+(d?h:-h),g=g+(d?h:-h);var s=t(i.calcY(f)),v=t(i.calcY(g)),y=u-c,m=v-s,_=Math.sqrt(y*y+m*m),k=y/_,x=m/_,R=_/3.5,I=l?10:25,b=(d?-1:1)*Math.min(I,Math.max(4,R)),A=t(c+R*k-b*x),N=t(s+R*x+b*k),M=t(u-R*k-b*x),z=t(v-R*x+b*k),L=2;p?p+=" slur":p="slur",p+=l?" tie":" legato";var E;if(o){p+=" dotted";var T=e("M %f %f C %f %f %f %f %f %f",c,s,A,N,M,z,u,v);E=i.paper.path({path:T,stroke:i.foregroundColor,fill:"none","stroke-dasharray":"5 5",class:i.controller.classes.generate(p),"data-name":l?"tie":"slur"})}else{var P=e("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",c,s,A,N,M,z,u,v,t(M-L*x),t(z+L*k),t(A-L*x),t(N+L*k),c,s);E=i.paper.path({path:P,stroke:"none",fill:i.foregroundColor,class:i.controller.classes.generate(p),"data-name":l?"tie":"slur"})}return E};return un=a,un}var hn,wo;function pv(){if(wo)return hn;wo=1;var e=jt(),t=it();function a(c,u){if(u.beams.length!==0){for(var f="",g=0;g<u.beams.length;g++){var d=u.beams[g];if(d.split){for(var p=r(c,d.startX,d.startY,d.endX,d.endY),l=[],o=0;o<d.split.length;o+=2)l.push([d.split[o],d.split[o+1]]);for(o=0;o<l.length;o++){var h=i(d.startX,d.startY,p,l[o][0]),s=i(d.startX,d.startY,p,l[o][1]);f+=n(c,l[o][0],h,l[o][1],s,d.dy)}}else f+=n(c,d.startX,d.startY,d.endX,d.endY,d.dy)}var v=("abcjs-d"+u.duration).replace(/\./g,"-"),y=c.controller.classes.generate("beam-elem "+v),m=e(c,{path:f,stroke:"none",fill:c.foregroundColor,class:y});return[m]}}function n(c,u,f,g,d,p){f=t(c.calcY(f)),d=t(c.calcY(d)),u=t(u),g=t(g);var l=t(f+p),o=t(d+p);return"M"+u+" "+f+" L"+g+" "+d+"L"+g+" "+o+" L"+u+" "+l+"z"}function r(c,u,f,g,d){return(d-f)/(g-u)}function i(c,u,f,g){var d=g-c;return u+d*f}return hn=a,hn}var fn,_o;function Va(){if(_o)return fn;_o=1;var e=Ya(),t=it();function a(n,r,i,c,u,f,g){if(i<0||c<u){var d=t(u);u=t(c),c=d}else c=t(c),u=t(u);r=t(r);var p=t(r+i);if(n.firefox112){r+=i/2;var o={x1:r,x2:r,y1:c,y2:u,stroke:n.foregroundColor,"stroke-width":Math.abs(i)};return f&&(o.class=f),g&&(o["data-name"]=g),n.paper.lineToBack(o)}for(var l=[["M",r,c],["L",r,u],["L",p,u],["L",p,c],["z"]],o={path:""},h=0;h<l.length;h++)o.path+=l[h].join(" ");return f&&(o.class=f),g&&(o["data-name"]=g),e.isInGroup()||(o.stroke="none",o.fill=n.foregroundColor),n.paper.pathToBack(o)}return fn=a,fn}var dn,ko;function gv(){if(ko)return dn;ko=1;var e=_t(),t=it();function a(n,r,i,c,u,f,g){var d=n.foregroundColor;r=t(r),i=t(i);var p=t(c-g),l=t(c+g);if(n.firefox112){c+=g/2;var o={x1:r,x2:i,y1:c,y2:c,stroke:n.foregroundColor,"stroke-width":Math.abs(g*2)};return u&&(o.class=u),f&&(o["data-name"]=f),n.paper.lineToBack(o)}var h=e("M %f %f L %f %f L %f %f L %f %f z",r,p,i,p,i,l,r,l),s={path:h,stroke:"none",fill:d};f&&(s["data-name"]=f),u&&(s.class=u);var v=n.paper.pathToBack(s);return v}return dn=a,dn}var pn,xo;function Ol(){if(xo)return pn;xo=1;var e=gv();function t(a,n,r,i,c,u,f){var g=a.calcY(i);return e(a,n,r,g,c,u,f)}return pn=t,pn}var gn,Co;function Dl(){if(Co)return gn;Co=1;var e=gt(),t=Va(),a=Ol(),n=Wa();function r(c,u,f){u.pitch===void 0&&window.console.error(u.type+" Relative Element y-coordinate not set.");var g=c.calcY(u.pitch);switch(u.type){case"symbol":if(u.c===null)return null;var d="symbol";u.klass&&(d+=" "+u.klass),u.graphelem=n(c,u.x,u.pitch,u.c,{scalex:u.scalex,scaley:u.scaley,klass:c.controller.classes.generate(d),name:u.name});break;case"debug":u.graphelem=e(c,{x:u.x,y:c.calcY(15),text:""+u.c,type:"debugfont",klass:c.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:u.dim},!1);break;case"tabNumber":var p="middle",l="tabnumberfont",o="abcjs-tab-number";u.isGrace&&(l="tabgracefont",g+=2.5,o="tab-grace"),u.graphelem=e(c,{x:u.x,y:g,text:""+u.c,type:l,klass:c.controller.classes.generate(o),anchor:p,centerVertically:!1,dim:u.dim,cursor:"default"},!1);break;case"barNumber":u.graphelem=e(c,{x:u.x,y:g,text:""+u.c,type:"measurefont",klass:c.controller.classes.generate("bar-number"),anchor:"middle",dim:u.dim,name:"bar-number"},!0);break;case"lyric":u.graphelem=e(c,{x:u.x,y:g,text:u.c,type:"vocalfont",klass:c.controller.classes.generate("lyric"),anchor:"middle",dim:u.dim,name:"lyric"},!1);break;case"chord":u.graphelem=e(c,{x:u.x,y:g,text:u.c,type:"gchordfont",klass:c.controller.classes.generate("chord"),anchor:"middle",dim:u.dim,lane:u.getLane(),name:"chord"},!1);break;case"decoration":u.graphelem=e(c,{x:u.x,y:g+6,text:u.c,type:"annotationfont",klass:c.controller.classes.generate("annotation"),anchor:u.anchor,centerVertically:!0,dim:u.dim},!1);break;case"text":u.graphelem=e(c,{x:u.x,y:g,text:u.c,type:"annotationfont",klass:c.controller.classes.generate("annotation"),anchor:"start",centerVertically:u.centerVertically,dim:u.dim,lane:u.getLane(),name:"annotation"},!1);break;case"multimeasure-text":u.graphelem=e(c,{x:u.x+u.w/2,y:g,text:u.c,type:"tempofont",klass:c.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:u.dim},!1);break;case"part":u.graphelem=e(c,{x:u.x,y:g,text:u.c,type:"partsfont",klass:c.controller.classes.generate("part"),anchor:"start",dim:u.dim,name:u.c},!0);break;case"bar":u.graphelem=t(c,u.x,u.linewidth+c.lineThickness,g,f||c.calcY(u.pitch2),null,"bar");break;case"stem":var h=u.linewidth>0?u.linewidth+c.lineThickness:u.linewidth-c.lineThickness;u.graphelem=t(c,u.x,h,g,c.calcY(u.pitch2),"abcjs-stem","stem");break;case"ledger":u.graphelem=a(c,u.x,u.x+u.w,u.pitch,"abcjs-ledger","ledger",.35+c.lineThickness);break}return u.scalex!==1&&u.graphelem&&i(c.paper,u.graphelem,u.scalex,u.scaley,u.x,g),u.graphelem}function i(c,u,f,g,d,p){c.setAttributeOnElement(u,{style:"transform:scale("+f+","+g+");transform-origin:"+d+"px "+p+"px;"})}return gn=r,gn}var vn,So;function vv(){if(So)return vn;So=1;var e=Dl(),t=gt();function a(n,r){var i=r.x;r.pitch===void 0&&window.console.error("Tempo Element y-coordinate not set."),r.tempo.el_type="tempo";var c=n.calcY(r.pitch)+2,u,f;if(r.tempo.preString){u=t(n,{x:i,y:c,text:r.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0),f=n.controller.getTextSize.calc(r.tempo.preString,"tempofont","tempo",u);var g=f.width,d=g/r.tempo.preString.length;i+=g+d}if(r.note){r.note.setX(i);for(var p=0;p<r.note.children.length;p++)e(n,r.note.children[p],i);i+=r.note.w+5;var l="= "+r.tempo.bpm;u=t(n,{x:i,y:c,text:l,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"beats"}),f=n.controller.getTextSize.calc(l,"tempofont","tempo",u);var o=f.width,h=o/l.length;i+=o+h}r.tempo.postString&&t(n,{x:i,y:c,text:r.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"post"},!0)}return vn=a,vn}var mn,To;function mv(){if(To)return mn;To=1;var e=vv(),t=Dl(),a=Ve(),n=Ga(),r=Ya();function i(c,u,f,g,d){if(!u.invisible){var p=u.children.length>0&&u.children[0].type==="TempoElement";u.elemset=[],r.beginGroup(c.paper,c.controller);for(var l=0;l<u.children.length;l++){var o=u.children[l];switch(o.type){case"TempoElement":e(c,o);break;default:var h=t(c,o,f);o.type==="symbol"&&o.c&&o.c.indexOf("notehead")>=0&&h.setAttribute("class","abcjs-notehead")}}var s=u.type;if((u.type==="note"||u.type==="rest")&&(u.counters=c.controller.classes.getCurrent(),s+=" d"+Math.round(u.durationClass*1e3)/1e3,s=s.replace(/\./g,"-"),u.abcelem.pitches))for(var v=0;v<u.abcelem.pitches.length;v++)s+=" p"+u.abcelem.pitches[v].pitch;var y=r.endGroup(s,u.type);if(y){if(u.cloned&&(u.cloned.overrideClasses=y.className.baseVal),u.overrideClasses){var m=y.classList&&y.classList.length>0?y.classList[0]+" ":"";y.setAttribute("class",m+u.overrideClasses)}if(p)u.startChar=u.abcelem.startChar,u.endChar=u.abcelem.endChar,g.add(u,y,!1,d);else{u.elemset.push(y);var _=!1;(u.type==="note"||u.type==="tabNumber")&&(_=!0),g.add(u,y,_,d)}}else u.elemset.length>0&&g.add(u,u.elemset[0],u.type==="note",d);if(u.klass&&n(u.elemset,"mark","","#00ff00"),u.hint&&n(u.elemset,"abcjs-hint","",null),u.abcelem.abselem=u,u.heads&&u.heads.length>0){u.notePositions=[];for(var k=0;k<u.heads.length;k++)u.notePositions.push({x:u.heads[k].x+u.heads[k].w/2,y:d.zero-u.heads[k].pitch*a.STEP})}}}return mn=i,mn}var bn,Eo;function bv(){if(Eo)return bn;Eo=1;var e=cv(),t=lv(),a=uv(),n=hv(),r=fv(),i=dv(),c=pv(),u=gt(),f=mv();function g(p,l,o,h,s){var v=l.w-1;p.staffbottom=l.staff.bottom;var y=p.foregroundColor;if(l.color&&(p.foregroundColor=l.color),l.header){var m=u(p,{x:p.padding.left,y:p.calcY(l.headerPosition),text:l.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0,name:"voice-name"},!0);h.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:l.header},m)}var _,k,x=!1;for(_=0;_<l.children.length;_++){k=l.children[_],(k.type==="note"||k.type==="rest")&&(x=!0);var R=!1;k.type!=="staff-extra"&&!p.controller.classes.isInMeasure()&&(p.controller.classes.startMeasure(),R=!0),l.staff.isTabStaff&&(k.invisible=!1,k.type=="bar"&&k.abcelem.lastBar&&(o=l.topLine)),f(p,k,l.barto||_===l.children.length-1?o:0,h,s),(k.type==="note"||d(k))&&p.controller.classes.incrNote(),k.type==="bar"&&!R&&x&&p.controller.classes.incrMeasure()}for(p.controller.classes.startMeasure(),_=0;_<l.beams.length;_++){var I=l.beams[_];I==="bar"?p.controller.classes.incrMeasure():c(p,I,h)}for(p.controller.classes.startMeasure(),_=0;_<l.otherchildren.length;_++)if(k=l.otherchildren[_],k==="bar")p.controller.classes.incrMeasure();else switch(k.type){case"GlissandoElem":k.elemset=e(p,k,h);break;case"CrescendoElem":k.elemset=t(p,k,h);break;case"DynamicDecoration":k.elemset=a(p,k,h);break;case"TripletElem":n(p,k,h);break;case"EndingElem":k.elemset=r(p,k,l.startx+10,v,h);break;case"TieElem":k.elemset=i(p,k,l.startx+10,v,h);break;default:console.log(k),f(p,k,l.startx+10,v,h,s)}p.foregroundColor=y}function d(p){return p.type!=="rest"?!1:!!(p.abcelem&&p.abcelem.rest&&p.abcelem.rest.type!=="spacer")}return bn=g,bn}var yn,Ao;function yv(){if(Ao)return yn;Ao=1;var e=Ol();function t(a,n,r,i,c,u){var f="abcjs-top-line",g=2;c&&(g=c),a.paper.openGroup({prepend:!0,klass:a.controller.classes.generate("abcjs-staff")});var d=0,p=0;if(i===1)e(a,n,r,6,f,null,u+a.lineThickness),d=a.calcY(10),p=a.calcY(2);else for(var l=i-1;l>=0;l--){var o=(l+1)*g;p=a.calcY(o),d===0&&(d=p),e(a,n,r,o,f,null,u+a.lineThickness),f=void 0}return a.paper.closeGroup(),[d,p]}return yn=t,yn}var wn,Mo;function wv(){if(Mo)return wn;Mo=1;function e(t,a,n){var r=t.paper.rectBeneath(a);return n&&t.paper.text(n,{x:0,y:a.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),r}return wn=e,wn}var _n,No;function _v(){if(No)return _n;No=1;function e(t,a){var n="rgba(0,0,0,255)",r="rgba(0,0,0,0)",i=Math.round(t.y),c=t.controller.width,u=(c-a)/2,f=u+a,g="M "+u+" "+i+" L "+f+" "+i+" L "+f+" "+(i+1)+" L "+u+" "+(i+1)+" L "+u+" "+i+" z";t.paper.pathToBack({path:g,stroke:r,fill:n,class:t.controller.classes.generate("defined-text")})}return _n=e,_n}var kn,Po;function Fl(){if(Po)return kn;Po=1;var e=_v(),t=gt();function a(n,r,i){for(var c=0;c<r.rows.length;c++){var u=r.rows[c];if(u.absmove)n.absolutemoveY(u.absmove);else if(u.move)n.moveY(u.move);else if(u.text||u.phrases){var f=u.left?u.left:0,g=t(n,{x:f,y:n.y,text:u.text,phrases:u.phrases,"dominant-baseline":u["dominant-baseline"],type:u.font,klass:u.klass,name:u.name,anchor:u.anchor});u.absElemType&&i.wrapSvgEl({el_type:u.absElemType,name:u.name,startChar:u.startChar,endChar:u.endChar,text:u.text},g)}else if(u.separator)e(n,u.separator);else if(u.startGroup)n.paper.openGroup({klass:u.klass,"data-name":u.name});else if(u.endGroup){var d=n.paper.closeGroup();u.absElemType&&i.wrapSvgEl({el_type:u.absElemType,name:u.name,startChar:u.startChar,endChar:u.endChar,text:""},d)}}}return kn=a,kn}var xn,zo;function kv(){if(zo)return xn;zo=1;var e=Ve(),t=ov(),a=bv(),n=yv(),r=wv(),i=Va(),c=Fl();function u(d,p,l,o){for(var h,s=d.y,v=0;v<p.staffs.length;v++){var y=p.staffs[v];d.moveY(e.STEP,y.top),y.absoluteY=d.y,d.showDebug&&(d.showDebug.indexOf("box")>=0&&y.voices&&g(d,p.voices,y.voices),d.showDebug.indexOf("grid")>=0&&(d.paper.dottedLine({x1:d.padding.left,x2:d.padding.left+d.controller.width,y1:s,y2:s,stroke:"#0000ff"}),r(d,{x:d.padding.left,y:d.calcY(y.originalTop),width:d.controller.width,height:d.calcY(y.originalBottom)-d.calcY(y.originalTop),fill:d.foregroundColor,stroke:d.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),h=0,E(y,"chordHeightAbove"),E(y,"chordHeightBelow"),E(y,"dynamicHeightAbove"),E(y,"dynamicHeightBelow"),E(y,"endingHeightAbove"),E(y,"lyricHeightAbove"),E(y,"lyricHeightBelow"),E(y,"partHeightAbove"),E(y,"tempoHeightAbove"),E(y,"volumeHeightAbove"),E(y,"volumeHeightBelow"))),d.moveY(e.STEP,-y.bottom),d.showDebug&&d.showDebug.indexOf("grid")>=0&&d.paper.dottedLine({x1:d.padding.left,x2:d.padding.left+d.controller.width,y1:d.y,y2:d.y,stroke:"#0000aa"})}for(var m,_,k=2,x=0,R=0;R<p.voices.length;R++){var I=p.voices[R].staff,b=p.voices[R].tabNameInfos;if(d.y=I.absoluteY,d.controller.classes.incrVoice(),!p.voices[R].duplicate){if(m||(m=d.calcY(10)),_=d.calcY(k),I.lines!==0){I.linePitch&&(k=I.linePitch),d.controller.classes.newMeasure();var A=n(d,p.startx,p.w,I.lines,I.linePitch,.35);_=A[1],I.bottomLine=_,I.topLine=A[0],I.hasTab&&(x=I.topLine),I.hasStaff&&(x=I.hasStaff.topLine,p.voices[R].barto=!0,p.voices[R].topLine=m)}f(d,I.absoluteY,p.brace,R,l),f(d,I.absoluteY,p.bracket,R,l)}a(d,p.voices[R],x,l,{top:s,zero:d.y,height:p.height*e.STEP});var N=0;if(b){var M={rows:[]};M.rows.push({absmove:_+2});var z=8;M.rows.push({left:p.startx+z,text:b.name,font:"tablabelfont",klass:"text instrument-name",anchor:"start"}),M.rows.push({move:b.textSize.height}),c(d,M),N=b.textSize.height}d.controller.classes.newMeasure(),p.voices[R].duplicate||(x=d.calcY(2+N))}d.controller.classes.newMeasure();var L=p.staffs.length;L>1&&(m=p.staffs[0].topLine,_=p.staffs[L-1].bottomLine,i(d,p.startx,.6,m,_,null)),d.y=s;function E(T,P){var B=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(T.positionY&&T.positionY[P]){var O=T.specialY[P]*e.STEP;P==="chordHeightAbove"&&T.specialY.chordLines&&T.specialY.chordLines.above&&(O*=T.specialY.chordLines.above),P==="chordHeightBelow"&&T.specialY.chordLines&&T.specialY.chordLines.below&&(O*=T.specialY.chordLines.below),r(d,{x:d.padding.left,y:d.calcY(T.positionY[P]),width:d.controller.width,height:O,fill:B[h],stroke:B[h],"fill-opacity":.4,"stroke-opacity":.4},P.substr(0,4)),h+=1,h>6&&(h=0)}}}function f(d,p,l,o,h){if(l)for(var s=0;s<l.length;s++)l[s].isStartVoice(o)&&(l[s].startY=p-e.STEP*10,l[s].elemset=t(d,l[s],h))}function g(d,p,l){for(var o=0;o<l.length;o++)for(var h=p[l[o]].children,s=0;s<h.length;s++){var v=h[s],y=v.getFixedCoords();if(!(v.invisible||y.t===void 0||y.b===void 0)){var m=(y.t-y.b)*e.STEP;r(d,{x:y.x,y:d.calcY(y.t),width:y.w,height:m,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var _=0;_<v.children.length;_++){var k=v.children[_],x=k.getChordDim();if(x){var R=d.calcY(k.pitch);R+=k.dim.font.size*k.getLane(),r(d,{x:x.left,y:R,width:x.right-x.left,height:k.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}return xn=u,xn}var Cn,Io;function xv(){if(Io)return Cn;Io=1;function e(t,a,n,r){var i=(a+t.padding.left+t.padding.right)*n,c=(t.y+t.padding.bottom)*n;if(t.isPrint&&(c=Math.max(c,1056)),t.ariaLabel!==""){var u="Sheet Music";t.abctune&&t.abctune.metaText&&t.abctune.metaText.title&&(u+=' for "'+t.abctune.metaText.title+'"'),t.paper.setTitle(u);var f=t.ariaLabel?t.ariaLabel:u;t.paper.setAttribute("aria-label",f)}var g=["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"];t.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+g.join(" ")+"}");var d={overflow:"hidden"};r==="resize"?t.paper.setResponsiveWidth(i,c):(d.width="",d.height=c+"px",n<1?(d.width=i+"px",t.paper.setSize(i/n,c/n)):t.paper.setSize(i,c)),t.paper.setScale(n),t.paper.setParentStyles(d)}return Cn=e,Cn}var Sn,Ro;function Cv(){if(Ro)return Sn;Ro=1;var e=Ml(),t=Nl();function a(n,r,i){this.elements=[],this.paper=n,this.tuneNumber=i,this.selectTypes=r}return a.prototype.getElements=function(){return this.elements},a.prototype.add=function(n,r,i,c){if(this.canSelect(n)){var u;this.selectTypes===void 0?u={selectable:!1,"data-index":this.elements.length}:u={selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(r,u);var f={absEl:n,svgEl:r,isDraggable:i};c!==void 0&&(f.staffPos=c),this.elements.push(f)}},a.prototype.canSelect=function(n){return this.selectTypes===!1||!n||!n.abcelem?!1:this.selectTypes===!0?!0:this.selectTypes===void 0?n.abcelem.el_type==="note"||n.abcelem.el_type==="tabNumber":this.selectTypes.indexOf(n.abcelem.el_type)>=0},a.prototype.wrapSvgEl=function(n,r){var i={tuneNumber:this.tuneNumber,abcelem:n,elemset:[r],highlight:e,unhighlight:t};this.add(i,r,!1)},Sn=a,Sn}var Tn,qo;function Sv(){if(qo)return Tn;qo=1;const e=Wa(),t=Va();function a(m,_,k,x,R){const I=R.gchordfont;R.partsfont;const b=R.annotationfont,A=R.repeatfont,N=R.textfont,M=R.subtitlefont,z=50,L=10,E=14,T=10,P=20,B=16;_.forEach(O=>{switch(O.type){case"text":y(m,O.text,k,m.y,16,N,null,null,!1),m.moveY(B);break;case"subtitle":y(m,O.subtitle,k,m.y+T,20,M,null,"abcjs-subtitle",!1),m.moveY(P);break;case"part":if(O.lines.length>0){y(m,O.name,k,m.y+T,20,M,O.name,"abcjs-part",!1),m.moveY(P);const w=O.lines[0].length,C=x/w;O.lines.forEach((S,q)=>{let D=!1,$=!1;S.forEach(K=>{K.ending&&(D=!0),K.annotations&&K.annotations.length>0&&($=!0)});const F=$?E:D?L:0;S.forEach((K,te)=>{if(!K.noBorder){m.paper.rect({x:k+te*C,y:m.y,width:C,height:F+z}),m.paper.rect({x:k+te*C+1,y:m.y+1,width:C-2,height:F+z-2});let ae=0,oe=0;const le=m.y,J=k+C*te;K.hasStartRepeat&&(r(m,J,le,le+z+F,!0,F),ae=12),K.hasEndRepeat&&(r(m,J+C,le,le+z+F,!1,F),oe=12);let ce=0;K.ending&&(ce=y(m,K.ending,k+te*C+4,le+10,12,A,null,null,!1).getBBox().width+4),u(m,le,k+ae,C,q,te,K.chord,I,ae+oe,z,F),K.annotations&&K.annotations.length>0&&c(m,le,k+te*C+ce,K.annotations,b),F&&m.paper.rectBeneath({x:k+te*C,y:m.y,width:C,height:F,fill:"#e8e8e8",stroke:"none"})}}),m.moveY(F+z)}),m.moveY(P)}break}})}function n(m,_,k,x){var R=_-10,I=_+10,b=k+10,A=k-10,N=_-10,M=-m.yToPitch(x)+2,z=_+6.5,L=-m.yToPitch(x)-2.3;m.paper.lineToBack({x1:R,x2:I,y1:b,y2:A,"stroke-width":"3px","stroke-linecap":"round"}),e(m,N,M,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),e(m,z,L,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"})}function r(m,_,k,x,R,I){const b=R?_+2:_-4,A=R?_+9:_-11;m.paper.openGroup({klass:"abcjs-repeat"}),t(m,b,3+m.lineThickness,k,x,null,"bar"),e(m,A,-m.yToPitch(I)-4,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),e(m,A,-m.yToPitch(I)-8,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),m.paper.closeGroup()}const i={segno:"scripts.segno",coda:"scripts.coda",fermata:"scripts.ufermata"};function c(m,_,k,x,R){k+=3;let I;for(let b=0;b<x.length;b++)switch(x[b]){case"segno":case"coda":case"fermata":{k+=12,I=e(m,k,-3,i[x[b]],{scalex:1,scaley:1,name:i[x[b]]});const A=I.getBBox();k+=A.width}break;default:y(m,x[b],k,_+12,12,R,null,null,!1)}}function u(m,_,k,x,R,I,b,A,N,M,z){const L=k+x*I;!b[1]&&!b[2]&&!b[3]?o(m,L,_+z,x-N,M,b[0],A,z):!b[1]&&!b[3]?h(m,L,_,x-N,M,b[0],b[2],A,z):s(m,L,_,x-N,M,b,A,z)}function f(m,_,k,x,R,I,b){const A=y(m,R,_,k,x,I,null,"abcjs-chord",!0);let N=A.getBBox(),M=x;for(;N.width>b&&M>=14;)M-=2,A.setAttribute("font-size",M),N=A.getBBox()}const g=34,d=26,p=20,l=-3;function o(m,_,k,x,R,I,b,A){I==="%"?n(m,_+x/2,k+R/2,A+R/2):f(m,_+x/2,k+R/2+l,g,I,b,x)}function h(m,_,k,x,R,I,b,A,N){m.paper.lineToBack({x1:_,x2:_+x,y1:k+R+N,y2:k+2}),f(m,_+x/4,k+R/4+5+N+l,d,I,A,x/2),f(m,_+3*x/4,k+3*R/4+N+l,d,b,A,x/2)}function s(m,_,k,x,R,I,b,A){m.paper.lineToBack({x1:_+3,x2:_+x-3,y1:k+R/2+A,y2:k+R/2+A}),m.paper.lineToBack({x1:_+x/2,x2:_+x/2,y1:k+3+A,y2:k+R-3+A}),I[0]&&f(m,_+x/4,k+R/4+2+A+l,p,v(I[0]),b,x/2),I[1]&&f(m,_+3*x/4,k+R/4+2+A+l,p,v(I[1]),b,x/2),I[2]&&f(m,_+x/4,k+3*R/4+A+l,p,v(I[2]),b,x/2),I[3]&&f(m,_+3*x/4,k+3*R/4+A+l,p,v(I[3]),b,x/2)}function v(m){return m==="No Chord"?"N.C.":m}function y(m,_,k,x,R,I,b,A,N){const M={x:k,y:x,stroke:"none","font-size":R,"font-style":I.style,"font-family":I.face,"font-weight":I.weight,"text-decoration":I.decoration};return b&&(M["data-name"]=b),A&&(M.class=A),M["text-anchor"]=N?"middle":"start",m.paper.text(_,M,null,{"alignment-baseline":"middle"})}return Tn=a,Tn}var En,Bo;function Tv(){if(Bo)return En;Bo=1;var e=kv(),t=xv(),a=Fl(),n=Ve(),r=Cv(),i=Sv();function c(g,d,p,l,o,h,s,v,y,m,_){var k=new r(g.paper,v,y),x={};d.shouldAddClasses&&(x.klass="abcjs-meta-top"),g.paper.openGroup(x),g.moveY(g.padding.top),a(g,p.topText,k),g.paper.closeGroup(),g.moveY(g.spacing.music);let R=!1;_&&p.chordGrid&&(i(g,p.chordGrid,g.padding.left,l,p.formatting),_==="noMusic"&&(R=!0));var I=[],b=0;if(!R)for(var A=0;A<p.lines.length;A++){d.incrLine();var N=p.lines[A];if(N.staff){if(b++,p.formatting.maxStaves&&b>p.formatting.maxStaves)break;d.shouldAddClasses&&(x.klass="abcjs-staff-wrapper abcjs-l"+d.lineNumber),g.paper.openGroup(x),N.vskip&&g.moveY(N.vskip),I.length>=1&&f(g,g.spacing.staffSeparation,I[I.length-1],N.staffGroup);var M=u(g,N.staffGroup,k,A);M.line=m+A,I.push(M),g.paper.closeGroup()}else N.nonMusic&&(d.shouldAddClasses&&(x.klass="abcjs-non-music"),g.paper.openGroup(x),a(g,N.nonMusic,k),g.paper.closeGroup())}return d.reset(),R||p.bottomText&&p.bottomText.rows&&p.bottomText.rows.length>0&&(d.shouldAddClasses&&(x.klass="abcjs-meta-bottom"),g.paper.openGroup(x),g.moveY(24),a(g,p.bottomText,k),g.paper.closeGroup()),t(g,o,s,h),{staffgroups:I,selectables:k.getElements()}}function u(g,d,p,l){e(g,d,p,l);var o=d.height*n.STEP;return g.y+=o,d}function f(g,d,p,l){var o=p.staffs[p.staffs.length-1],h=-(o.bottom-2),s=l.staffs[0].top-10,v=s+h,y=v*n.STEP;y<d&&g.moveY(d-y)}return En=c,En}var An,Lo;function Ev(){if(Lo)return An;Lo=1;var e=Bl();function t(a){for(var n=a;n&&n.attributes&&n.tagName.toLowerCase()!=="svg"&&!n.attributes.selectable;)n=n.parentNode;if(n&&n.attributes&&n.attributes.selectable){var r=n.attributes["data-index"].nodeValue;if(r&&(r=parseInt(r,10),r>=0&&r<this.selectables.length)){var i=this.selectables[r],c=e(i,a);return c.index=r,c.element=i,c}}return null}return An=t,An}var Mn,Oo;function Hl(){if(Oo)return Mn;Oo=1;var e=Ve(),t=Hg(),a=Zg(),n=Gg(),r=Ug(),i=jg(),c=Yg(),u=Wg(),f=Vg(),g=nv(),d=av(),p=iv(),l=sv(),o=Tv(),h=Il(),s=Ev(),v=function(_,k){k=k||{},this.findSelectableElement=s,this.oneSvgPerLine=k.oneSvgPerLine,this.selectionColor=k.selectionColor,this.dragColor=k.dragColor?k.dragColor:k.selectionColor,this.dragging=!!k.dragging,this.selectTypes=k.selectTypes,this.responsive=k.responsive,this.space=3*e.SPACE,this.initialClef=k.initialClef,this.timeBasedLayout=k.timeBasedLayout,this.expandToWidest=!!k.expandToWidest,this.scale=k.scale?parseFloat(k.scale):0,this.classes=new d({shouldAddClasses:k.add_classes}),this.scale>.1||(this.scale=void 0),k.staffwidth?(this.staffwidthScreen=k.staffwidth,this.staffwidthPrint=k.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],k.clickListener&&this.addSelectListener(k.clickListener),this.renderer=new a(_),this.renderer.setPaddingOverride(k),k.showDebug&&(this.renderer.showDebug=k.showDebug),k.jazzchords&&(this.jazzchords=k.jazzchords),k.accentAbove&&(this.accentAbove=k.accentAbove),k.germanAlphabet&&(this.germanAlphabet=k.germanAlphabet),k.lineThickness&&(this.lineThickness=k.lineThickness),k.chordGrid&&(this.chordGrid=k.chordGrid),this.renderer.controller=this,this.renderer.foregroundColor=k.foregroundColor?k.foregroundColor:"currentColor",k.ariaLabel!==void 0&&(this.renderer.ariaLabel=k.ariaLabel),this.renderer.minPadding=k.minPadding?k.minPadding:0,this.reset()};v.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0,this.lineThickness&&this.renderer.setLineThickness(this.lineThickness)},v.prototype.engraveABC=function(_,k,x){_[0]===void 0&&(_=[_]),this.reset();for(var R=0;R<_.length;R++)k===void 0&&(k=R),this.getFontAndAttr=new p(_[R].formatting,this.classes),this.getTextSize=new l(this.getFontAndAttr,this.renderer.paper),this.engraveTune(_[R],k,x)},v.prototype.adjustNonScaledItems=function(_){this.width/=_,this.renderer.adjustNonScaledItems(_)},v.prototype.getMeasureWidths=function(_){this.reset(),this.getFontAndAttr=new p(_.formatting,this.classes),this.getTextSize=new l(this.getFontAndAttr,this.renderer.paper);var k=this.jazzchords;this.setupTune(_,0),this.constructTuneElements(_),g(this.renderer,_,0,this.space,this.timeBasedLayout);for(var x=[],R,I=!0,b=0;b<_.lines.length;b++){var A=_.lines[b];if(A.staff){if(I&&(R={left:0,measureWidths:[],total:0},x.push(R),I=!1),A.staffGroup.voices.length>0)for(var N=A.staffGroup.voices[0],M=!1,z=0,L=0;L<N.children.length;L++){var E=N.children[L];!M&&!E.isClef&&!E.isKeySig&&(M=!0,R.left=E.x,z=E.x),E.type==="bar"&&(R.measureWidths.push(E.x-z),R.total+=E.x-z,z=E.x)}}else I=!0}return this.jazzchords=k,x},v.prototype.setupTune=function(_,k){this.classes.reset(),_.formatting.jazzchords!==void 0&&(this.jazzchords=_.formatting.jazzchords),_.formatting.accentAbove!==void 0&&(this.accentAbove=_.formatting.accentAbove),this.renderer.newTune(_),this.engraver=new t(this.getTextSize,k,{bagpipes:_.formatting.bagpipes,flatbeams:_.formatting.flatbeams,graceSlurs:_.formatting.graceSlurs!==!1,percmap:_.formatting.percmap,initialClef:this.initialClef,jazzchords:this.jazzchords,timeBasedLayout:this.timeBasedLayout,accentAbove:this.accentAbove,germanAlphabet:this.germanAlphabet}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=_.getMeterFraction().num/_.getMeterFraction().den,_.formatting.staffwidth?this.width=_.formatting.staffwidth*1.33:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var x=_.formatting.scale?_.formatting.scale:this.scale;return this.responsive==="resize"&&(x=void 0),x===void 0&&(x=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(x),x},v.prototype.constructTuneElements=function(_){_.topText=new c(_.metaText,_.metaTextInfo,_.formatting,_.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize);var k,x,R=!1,I=!1;for(k=0;k<_.lines.length;k++)if(x=_.lines[k],x.staff)I=!0,x.staffGroup=this.engraver.createABCLine(x.staff,R?null:_.metaText.tempo,k),R=!0;else if(x.subtitle){if(I){var b=this.width/2+this.renderer.padding.left;x.nonMusic=new i(this.renderer.spacing.subtitle,_.formatting,x.subtitle,b,this.renderer.padding.left,this.getTextSize)}}else x.text!==void 0?(I=!0,x.nonMusic=new n(x.text,x.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):x.separator!==void 0&&x.separator.lineLength&&(I=!0,x.nonMusic=new r(x.separator.spaceAbove,x.separator.lineLength,x.separator.spaceBelow));_.bottomText=new u(_.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize)},v.prototype.engraveTune=function(_,k,x){var R=this.jazzchords,I=this.setupTune(_,k);this.constructTuneElements(_);var b=g(this.renderer,_,this.width,this.space,this.expandToWidest,this.timeBasedLayout);if(this.expandToWidest&&b>this.width+1&&(_.topText=new c(_.metaText,_.metaTextInfo,_.formatting,_.lines,b,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),_.lines&&_.lines.length>0))for(var A=_.lines.length,N=0;N<A;++N){var M=_.lines[N];if(M.nonMusic&&M.nonMusic.rows&&M.nonMusic.rows.length>0)for(var z=M.nonMusic.rows.length,L=0;L<z;++L){var E=M.nonMusic.rows[L];E.left&&(M.subtitle?E.left=b/2+this.renderer.padding.left:M.text&&M.text.length>0&&M.text[0].center&&(E.left=b/2+this.renderer.padding.left))}}_.tablatures&&h.layoutTablatures(this.renderer,_);var T=o(this.renderer,this.classes,_,this.width,b,this.responsive,I,this.selectTypes,k,x,this.chordGrid);if(this.staffgroups=T.staffgroups,this.selectables=T.selectables,this.oneSvgPerLine){var P=this.renderer.paper.svg.parentNode;this.svgs=y(this.renderer,P,_.metaText.title,this.responsive,I)}else this.svgs=[this.renderer.paper.svg];f(this,this.svgs),this.jazzchords=R};function y(_,k,x,R,I){x||(x="Untitled");var b=k.querySelector("svg");R==="resize"&&(k.style.paddingBottom="");for(var A=b.querySelector("style"),N=R==="resize"?b.viewBox.baseVal.width:b.getAttribute("width"),M=k.querySelectorAll("svg > g"),z=0,L=[],E=0;E<M.length;E++){var T=M[E],P=T.getBBox(),B=P.y-z,O=P.height+B,w=document.createElement("div"),C="overflow: hidden;";R!=="resize"&&(C+="height:"+O*I+"px;"),w.setAttribute("style",C);var S=m(b),q='Sheet Music for "'+x+'" section '+(E+1);S.setAttribute("aria-label",q),R!=="resize"&&S.setAttribute("height",O),R==="resize"&&(S.style.position="");var D=_.firefox112?O+1:O;S.setAttribute("viewBox","0 "+z+" "+N+" "+D),S.appendChild(A.cloneNode(!0));var $=document.createElement("title");$.innerText=q,S.appendChild($),S.appendChild(T),w.appendChild(S),L.push(S),k.appendChild(w),z=P.y+P.height}return k.removeChild(b),L}function m(_){for(var k="http://www.w3.org/2000/svg",x=document.createElementNS(k,"svg"),R=0;R<_.attributes.length;R++){var I=_.attributes[R];I.name!=="height"&&I.name!="aria-label"&&x.setAttribute(I.name,I.value)}return x}return v.prototype.getDim=function(_){if(!_.dim){var k=_.svgEl.getBBox();_.dim={left:Math.round(k.x),top:Math.round(k.y),right:Math.round(k.x+k.width),bottom:Math.round(k.y+k.height)}}return _.dim},v.prototype.addSelectListener=function(_){this.listeners[this.listeners.length]=_},Mn=v,Mn}var Nn,Do;function $l(){if(Do)return Nn;Do=1;var e=fr();Tl();var t=Hl(),a=El(),n=xl(),r={};function i(){var g=window.innerWidth;for(var d in r)if(r.hasOwnProperty(d)){var p=r[d],l=p.offsetLeft;g-=l*2,p.style.width=g+"px"}}try{window.addEventListener("resize",i),window.addEventListener("orientationChange",i)}catch{}function c(g,d,p,l,o){p.viewportHorizontal?(g.innerHTML='<div class="abcjs-inner"></div>',p.scrollHorizontal?(g.style.overflowX="auto",g.style.overflowY="hidden"):g.style.overflow="hidden",r[g.id]=g,g=g.children[0]):p.viewportVertical?(g.innerHTML='<div class="abcjs-inner scroll-amount"></div>',g.style.overflowX="hidden",g.style.overflowY="auto",g=g.children[0]):g.innerHTML="";var h=new t(g,p);if(h.engraveABC(d,l,o),d.engraver=h,p.viewportVertical||p.viewportHorizontal){var s=g.parentNode;s.style.width=g.style.width}}var u=function(g,d,p,l,o){var h={},s;if(p){for(s in p)p.hasOwnProperty(s)&&(h[s]=p[s]);h.warnings_id&&h.tablature&&(h.tablature.warning_id=h.warnings_id)}if(l)for(s in l)l.hasOwnProperty(s)&&(s==="listener"?l[s].highlight&&(h.clickListener=l[s].highlight):h[s]=l[s]);if(o)for(s in o)o.hasOwnProperty(s)&&(h[s]=o[s]);function v(y,m,_,k){var x=!1;return y==="*"&&(x=!0,y=document.createElement("div"),y.setAttribute("style","visibility: hidden;"),document.body.appendChild(y)),!x&&h.wrap&&h.staffwidth?(m=f(y,m,_,k,h),m):(h.afterParsing&&h.afterParsing(m,_,k),c(y,m,h,_,0),x&&y.parentNode.removeChild(y),null)}return e.renderEngine(v,g,d,h)};function f(g,d,p,l,o){var h=new t(g,o),s=h.getMeasureWidths(d),v=n.calcLineWraps(d,s,o);if(v.reParse){var y=new a;y.parse(l,v.revisedParams),d=y.getTune();var m=y.getWarnings();m&&(d.warnings=m)}return o.afterParsing&&o.afterParsing(d,p,l),c(g,d,v.revisedParams,p,0),d.explanation=v.explanation,d}return Nn=u,Nn}var Pn,Fo;function Av(){if(Fo)return Pn;Fo=1;var e=fr(),t=Hl(),a=function(n,r){function i(c,u,f,g){c=document.createElement("div"),c.setAttribute("style","visibility: hidden;"),document.body.appendChild(c);var d=new t(c,r),p=d.getMeasureWidths(u);return c.parentNode.removeChild(c),{sections:p}}return e.renderEngine(i,"*",n,r)};return Pn=a,Pn}var zn,Ho;function Xa(){if(Ho)return zn;Ho=1;var e={};return zn=e,zn}var In,$o;function Mv(){if($o)return In;$o=1;var e=Xa(),t=function(a,n,r,i){e[n]||(e[n]={});var c=e[n];return c[r]||(c[r]=new Promise(function(u,f){var g=new XMLHttpRequest;let d=a+n+"-mp3/"+r+".mp3";g.open("GET",d,!0),g.responseType="arraybuffer",g.onload=function(){if(g.status!==200){f(Error("Can't load sound at "+d+" status="+g.status));return}var p=function(o){u({instrument:n,name:r,status:"loaded",audioBuffer:o})},l=i.decodeAudioData(g.response,p,function(){f(Error("Can't decode sound at "+d))});l&&typeof l.catch=="function"&&l.catch(f)},g.onerror=function(){f(Error("Can't load sound at "+d))},g.send()}).catch(u=>{throw console.error("Didn't load note",n,r,":",u.message),u})),c[r]};return In=t,In}var Rn,Zo;function Ka(){if(Zo)return Rn;Zo=1;var e=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];return Rn=e,Rn}var qn,Go;function Nv(){if(Go)return qn;Go=1;var e=Ka(),t=function(a){for(var n=[],r=0;r<a.tracks.length;r++)n.push([]);var i=e[0];return a.tracks.forEach(function(c,u){c.forEach(function(f){switch(f.cmd){case"note":var g=f.instrument!==void 0?e[f.instrument]:i;if(f.duration>0){var d=f.gap?f.gap:0,p=f.duration;d=Math.min(d,p*2/3);var l={pitch:f.pitch,instrument:g,start:Math.round(f.start*1e6)/1e6,end:Math.round((f.start+p-d)*1e6)/1e6,volume:f.volume};f.startChar&&(l.startChar=f.startChar),f.endChar&&(l.endChar=f.endChar),f.style&&(l.style=f.style),f.cents&&(l.cents=f.cents),n[u].push(l)}break;case"program":i=e[f.instrument];break;case"text":break;default:console.log("Unhandled midi event",f)}})}),n};return qn=t,qn}var Bn,Uo;function dr(){if(Uo)return Bn;Uo=1;function e(t){if(t)window.abcjsAudioContext=t;else if(!window.abcjsAudioContext){var a=window.AudioContext||window.webkitAudioContext;if(a)window.abcjsAudioContext=new a;else return!1}return window.abcjsAudioContext.state!=="suspended"}return Bn=e,Bn}var Ln,jo;function zt(){if(jo)return Ln;jo=1;var e=dr();function t(){return window.abcjsAudioContext||e(),window.abcjsAudioContext}return Ln=t,Ln}var On,Yo;function pr(){if(Yo)return On;Yo=1;var e=zt();function t(){if(!window.Promise||!window.AudioContext&&!window.webkitAudioContext&&!navigator.mozAudioContext&&!navigator.msAudioContext)return!1;var a=e();if(a)return a.resume!==void 0}return On=t,On}var Dn,Wo;function Ja(){if(Wo)return Dn;Wo=1;var e={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"};return Dn=e,Dn}var Fn,Vo;function Pv(){if(Vo)return Fn;Vo=1;var e=function(a){return window.URL.createObjectURL(t(a.audioBuffers))};function t(a){var n=a[0],r=n.numberOfChannels,i=n.length*r*2+44,c=new ArrayBuffer(i),u=new DataView(c),f=[],g,d,p=0,l=0;for(h(1179011410),h(i-8),h(1163280727),h(544501094),h(16),o(1),o(r),h(n.sampleRate),h(n.sampleRate*2*r),o(r*2),o(16),h(1635017060),h(i-l-4),g=0;g<r;g++)f.push(n.getChannelData(g));for(;l<i;){for(g=0;g<f.length;g++)d=Math.max(-1,Math.min(1,f[g][p])),d=(.5+d<0?d*32768:d*32767)|0,u.setInt16(l,d,!0),l+=2;p++}return new Blob([c],{type:"audio/wav"});function o(s){u.setUint16(l,s,!0),l+=2}function h(s){u.setUint32(l,s,!0),l+=4}}return Fn=e,Fn}var Hn,Xo;function Zl(){if(Xo)return Hn;Xo=1;function e(t){return Math.pow(2,t/1200)}return Hn=e,Hn}var $n,Ko;function zv(){if(Ko)return $n;Ko=1;var e=Xa(),t=Ja(),a=Zl();function n(i,c,u,f,g,d,p,l,o){var h=window.OfflineAudioContext||window.webkitOfflineAudioContext,s=u.len*u.tempoMultiplier;d&&(s+=d/1e3),s-=l,s<0&&(s=.005);var v=new h(2,Math.floor((s+p)*c),c),y=t[u.pitch];if(!e[u.instrument])return o&&o("placeNote skipped (instrument empty): "+u.instrument+":"+y),Promise.resolve();var m=e[u.instrument][y];return m?m.then(function(_){var k=v.createBufferSource();k.buffer=_.audioBuffer;var x=u.volume/96*g;k.gainNode=v.createGain(),u.pan&&v.createStereoPanner&&(k.panNode=v.createStereoPanner(),k.panNode.pan.setValueAtTime(u.pan,0)),k.gainNode.gain.value=x,k.gainNode.gain.linearRampToValueAtTime(k.gainNode.gain.value,s),k.gainNode.gain.linearRampToValueAtTime(0,s+p),u.cents&&(k.playbackRate.value=a(u.cents)),k.panNode?(k.panNode.connect(v.destination),k.gainNode.connect(k.panNode)):k.gainNode.connect(v.destination),k.connect(k.gainNode),k.start(0),k.noteOff?k.noteOff(s+p):k.stop(s+p);var R;return v.oncomplete=function(I){if(I.renderedBuffer&&I.renderedBuffer.getChannelData)for(var b=0;b<f.length;b++){var A=f[b]*u.tempoMultiplier;d&&(A-=d/1e3),A<0&&(A=0),A=Math.floor(A*c),r(i,I.renderedBuffer,A)}o&&o("placeNote: "+u.instrument+":"+y),R()},v.startRendering(),new Promise(function(I){R=I})}).catch(function(_){return o&&o("placeNote catch: "+_.message),Promise.reject(_)}):(o&&o("placeNote skipped: "+u.instrument+":"+y),Promise.resolve())}var r=function(i,c,u){for(var f=0;f<2;f++)for(var g=c.getChannelData(f),d=i.getChannelData(f),p=0;p<g.length;p++)d[p+u]+=g[p]};return $n=n,$n}var Zn,Jo;function Qa(){if(Jo)return Zn;Jo=1;var e=Mv(),t=Nv(),a=dr(),n=zt(),r=pr(),i=Ja(),c=Ka(),u=Pv(),f=zv(),g=Xa(),d="MIDI is not supported in this browser.",p="https://paulrosen.github.io/midi-js-soundfonts/abcjs/",l="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/",o="https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/";function h(){var s=this;s.audioBufferPossible=void 0,s.directSource=[],s.startTimeSec=void 0,s.pausedTimeSec=void 0,s.audioBuffers=[],s.duration=void 0,s.isRunning=!1,s.options={},s.pickupLength=0,s.init=function(m){m||(m={}),m.options&&(s.options=m.options),a(m.audioContext);var _=n().currentTime;if(s.debugCallback=m.debugCallback,s.debugCallback&&s.debugCallback("init called"),s.audioBufferPossible=s._deviceCapable(),!s.audioBufferPossible)return Promise.reject({status:"NotSupported",message:d});var k=m.options?m.options:{};s.soundFontUrl=k.soundFontUrl?k.soundFontUrl:l,s.soundFontUrl[s.soundFontUrl.length-1]!=="/"&&(s.soundFontUrl+="/"),k.soundFontVolumeMultiplier||k.soundFontVolumeMultiplier===0?s.soundFontVolumeMultiplier=k.soundFontVolumeMultiplier:s.soundFontUrl===l||s.soundFontUrl===o?s.soundFontVolumeMultiplier=3:s.soundFontUrl===p?s.soundFontVolumeMultiplier=.4:s.soundFontVolumeMultiplier=1,k.programOffsets?s.programOffsets=k.programOffsets:s.soundFontUrl===p?s.programOffsets={bright_acoustic_piano:20,honkytonk_piano:20,electric_piano_1:30,electric_piano_2:30,harpsichord:40,clavinet:20,celesta:20,glockenspiel:40,vibraphone:30,marimba:35,xylophone:30,tubular_bells:35,dulcimer:30,drawbar_organ:20,percussive_organ:25,rock_organ:20,church_organ:40,reed_organ:40,accordion:40,harmonica:40,acoustic_guitar_nylon:20,acoustic_guitar_steel:30,electric_guitar_jazz:25,electric_guitar_clean:15,electric_guitar_muted:35,overdriven_guitar:25,distortion_guitar:20,guitar_harmonics:30,electric_bass_finger:15,electric_bass_pick:30,fretless_bass:40,violin:105,viola:50,cello:40,contrabass:60,trumpet:10,trombone:90,alto_sax:20,tenor_sax:20,clarinet:20,flute:50,banjo:50,woodblock:20}:s.programOffsets={};var x=k.fadeLength!==void 0?parseInt(k.fadeLength,10):NaN;if(s.fadeLength=isNaN(x)?200:x,x=k.noteEnd!==void 0?parseInt(k.noteEnd,10):NaN,s.noteEnd=isNaN(x)?0:x,s.pan=k.pan,s.meterSize=1,m.visualObj){s.flattened=m.visualObj.setUpAudio(k);var R=m.visualObj.getMeterFraction();R.den&&(s.meterSize=R.num/R.den),s.pickupLength=m.visualObj.getPickupLength()}else if(m.sequence)s.flattened=m.sequence;else return Promise.reject(new Error("Must pass in either a visualObj or a sequence"));s.millisecondsPerMeasure=m.millisecondsPerMeasure?m.millisecondsPerMeasure:m.visualObj?m.visualObj.millisecondsPerMeasure(s.flattened.tempo):1e3,s.beatsPerMeasure=m.visualObj?m.visualObj.getBeatsPerMeasure():4,s.sequenceCallback=k.sequenceCallback,s.callbackContext=k.callbackContext,s.onEnded=k.onEnded,s.meterFraction=m.visualObj?m.visualObj.getMeterFraction():{den:1};var I={},b=[],A=[],N=c[0];s.flattened.tracks.forEach(function(T){T.forEach(function(P){if(P.cmd==="program"&&c[P.instrument]&&(N=c[P.instrument]),P.pitch!==void 0){var B=P.pitch,O=i[B],w=P.instrument!==void 0?c[P.instrument]:N;if(O)if(I[w]||(I[w]={}),!g[w]||!g[w][O])I[w][O]=!0;else{var C=w+":"+O;b.indexOf(C)<0&&b.push(C)}else{var S=w+":"+O;console.log("Can't find note: ",B,S),A.indexOf(S)<0&&A.push(S)}}})}),s.debugCallback&&s.debugCallback("note gathering time = "+Math.floor((n().currentTime-_)*1e3)+"ms"),_=n().currentTime;var M=[];Object.keys(I).forEach(function(T){Object.keys(I[T]).forEach(function(P){M.push({instrument:T,note:P})})}),s.debugCallback&&s.debugCallback("notes "+JSON.stringify(M));for(var z=[],L=256,E=0;E<M.length;E+=L)z.push(M.slice(E,E+L));return new Promise(function(T,P){var B={cached:b,error:A,loaded:[]},O=0,w=function(){s.debugCallback&&s.debugCallback("loadBatch idx="+O+" len="+z.length),O<z.length?s._loadBatch(z[O],s.soundFontUrl,_).then(function(C){s.debugCallback&&s.debugCallback("loadBatch then"),_=n().currentTime,C&&(C.error&&(B.error=B.error.concat(C.error)),C.loaded&&(B.loaded=B.loaded.concat(C.loaded))),O++,w()},P):(s.debugCallback&&s.debugCallback("resolve init"),T(B))};w()})},s._loadBatch=(function(m,_,k,x){var R=[];return m.forEach(function(I){s.debugCallback&&s.debugCallback("getNote "+I.instrument+":"+I.note),R.push(e(_,I.instrument,I.note,n()))}),Promise.all(R).then(function(I){s.debugCallback&&s.debugCallback("mp3 load time = "+Math.floor((n().currentTime-k)*1e3)+"ms");for(var b=[],A=[],N=[],M=[],z=0;z<I.length;z++){var L=I[z],E=L.instrument+":"+L.name;L.status==="loaded"?b.push(E):L.status==="pending"?N.push(E):L.status==="cached"?A.push(E):M.push(E+" "+L.message)}if(N.length>0){if(s.debugCallback&&s.debugCallback("pending "+JSON.stringify(N)),x?x=x*2:x=50,x<9e4)return new Promise(function(B,O){setTimeout(function(){var w=[];for(z=0;z<N.length;z++)E=N[z].split(":"),w.push({instrument:E[0],note:E[1]});s.debugCallback&&s.debugCallback("retry "+JSON.stringify(w)),s._loadBatch(w,_,k,x).then(function(C){B(C)}).catch(function(C){O(C)})},x)});for(var T=[],P=0;P<m.length;P++)T.push(m[P].instrument+"/"+m[P].note);return s.debugCallback&&s.debugCallback("loadBatch timeout"),Promise.reject(new Error("timeout attempting to load: "+T.join(", ")))}else return s.debugCallback&&s.debugCallback("loadBatch resolve"),Promise.resolve({loaded:b,cached:A,error:M})}).catch(function(I){s.debugCallback&&s.debugCallback("loadBatch catch "+I.message)})}),s.prime=function(){var m=s.fadeLength/1e3;return s.isRunning=!1,s.audioBufferPossible?(s.debugCallback&&s.debugCallback("prime called"),new Promise(function(_,k){try{let O=function(w){var C=w&&w.audioBuffers&&w.audioBuffers.length>0?w.audioBuffers[0].duration:0;return{status:n().state,duration:C}};var B=O,x=n().currentTime,R=s.millisecondsPerMeasure/1e3/s.meterSize;if(s.duration=s.flattened.totalDuration*R,s.duration<=0)return s.audioBuffers=[],_({status:"empty",seconds:0});s.duration+=m;var I=Math.floor(n().sampleRate*s.duration);s.stop();var b=t(s.flattened);s.options.swing&&y(b,s.options.swing,s.meterFraction,s.pickupLength),s.sequenceCallback&&s.sequenceCallback(b,s.callbackContext);var A=v(b.length,s.pan),N={};b.forEach(function(w,C){var S=A&&A.length>C?A[C]:0;w.forEach(function(q){var D=q.instrument+":"+q.pitch+":"+q.volume+":"+Math.round((q.end-q.start)*1e3)/1e3+":"+S+":"+R+":"+(q.cents?q.cents:0);s.debugCallback&&s.debugCallback("noteMapTrack "+D),N[D]||(N[D]=[]),N[D].push(q.start)})});for(var M=[],z=n().createBuffer(2,I,n().sampleRate),L=0;L<Object.keys(N).length;L++){var E=Object.keys(N)[L],T=E.split(":"),P=T[6]!==void 0?parseFloat(T[6]):0;T={instrument:T[0],pitch:parseInt(T[1],10),volume:parseInt(T[2],10),len:parseFloat(T[3]),pan:parseFloat(T[4]),tempoMultiplier:parseFloat(T[5]),cents:P},M.push(f(z,n().sampleRate,T,N[E],s.soundFontVolumeMultiplier,s.programOffsets[T.instrument],m,s.noteEnd/1e3,s.debugCallback))}s.audioBuffers=[z],s.debugCallback&&(s.debugCallback("sampleRate = "+n().sampleRate),s.debugCallback("totalSamples = "+I),s.debugCallback("creationTime = "+Math.floor((n().currentTime-x)*1e3)+"ms")),Promise.all(M).then(function(){n().state==="suspended"?n().resume().then(function(){_(O(s))}):n().state==="interrupted"?n().suspend().then(function(){n().resume().then(function(){_(O(s))})}):_(O(s))}).catch(function(w){k(w)})}catch(O){k(O)}})):Promise.reject(new Error(d))};function v(m,_){if(_==null)return null;var k=[];if(_.length){for(var x=0;x<m;x++)if(x<_.length){var R=parseFloat(_[x]);R<-1?R=-1:R>1&&(R=1),k.push(R)}else k.push(0);return k}else{var I=parseFloat(_);if(I*(m-1)>2)return null;for(var b=m%2===0,A=b?0-I/2:0,N=A+I,M=0;M<m;M++)b=M%2===0,b?(k.push(A),A-=I):(k.push(N),N+=I);return k}}s.start=function(){if(!s.audioBufferPossible)throw new Error(d);s.debugCallback&&s.debugCallback("start called");var m=s.pausedTimeSec?s.pausedTimeSec:0;s._kickOffSound(m),s.startTimeSec=n().currentTime-m,s.pausedTimeSec=void 0,s.debugCallback&&s.debugCallback("MIDI STARTED",s.startTimeSec)},s.pause=function(){if(!s.audioBufferPossible)throw new Error(d);return s.debugCallback&&s.debugCallback("pause called"),s.pausedTimeSec=s.stop(),s.pausedTimeSec},s.resume=function(){s.start()},s.seek=function(m,_){var k;switch(_){case"seconds":k=m;break;case"beats":k=m*s.millisecondsPerMeasure/s.beatsPerMeasure/1e3;break;default:k=(s.duration-s.fadeLength/1e3)*m;break}if(!s.audioBufferPossible)throw new Error(d);s.debugCallback&&s.debugCallback("seek called sec="+k),s.isRunning?(s.stop(),s._kickOffSound(k)):s.pausedTimeSec=k,s.pausedTimeSec=k},s.stop=function(){s.isRunning=!1,s.pausedTimeSec=void 0,s.directSource.forEach(function(_){try{_.stop()}catch(k){console.log("direct source didn't stop:",k)}}),s.directSource=[];var m=n().currentTime-s.startTimeSec;return m},s.finished=function(){s.startTimeSec=void 0,s.pausedTimeSec=void 0,s.isRunning=!1},s.download=function(){return u(s)},s.getAudioBuffer=function(){return s.audioBuffers[0]},s.getIsRunning=function(){return s.isRunning},s._deviceCapable=function(){return r()?!0:(console.warn(d),s.debugCallback&&s.debugCallback(d),!1)},s._kickOffSound=function(m){s.isRunning=!0,s.directSource=[],s.audioBuffers.forEach(function(_,k){s.directSource[k]=n().createBufferSource(),s.directSource[k].buffer=_,s.directSource[k].connect(n().destination)}),s.directSource.forEach(function(_){_.start(0,m)}),s.onEnded&&(s.directSource[0].onended=function(){s.onEnded(s.callbackContext)})};function y(m,_,k,x){if(!(k.den!=4&&k.den!=8)&&(_=parseFloat(_),!(isNaN(_)||_<=50))){_>75&&(_=75),_=_/50-1;var R=0,I=.25;k.den===8&&(I=I/2);for(var b=I/2,A=b*_,N=0;N<m.length;N++)for(var M=m[N],z=0;z<M.length;z++){var L=M[z];if((L.start-x)%b==0&&(L.start-x)%I!=0&&(z==0||M[z-1].start<=M[z].start-b)&&(z==M.length-1||M[z+1].start>=M[z].start+b)){var E=L.start;L.start+=A,L.volume*=1+R,z>0&&M[z-1].end==E&&(M[z-1].end=L.start,M[z-1].volume*=1-R)}}}}}return Zn=h,Zn}var Gn,Qo;function Gl(){if(Qo)return Gn;Qo=1;var e=function(){var t=this;t.tracks=[],t.totalDuration=0,t.currentInstrument=[],t.starts=[],t.addTrack=function(){return t.tracks.push([]),t.currentInstrument.push(0),t.starts.push(0),t.tracks.length-1},t.setInstrument=function(a,n){t.tracks[a].push({channel:0,cmd:"program",instrument:n}),t.currentInstrument[a]=n},t.appendNote=function(a,n,r,i,c){var u={cmd:"note",duration:r,gap:0,instrument:t.currentInstrument[a],pitch:n,start:t.starts[a],volume:i};c&&(u.cents=c),t.tracks[a].push(u),t.starts[a]+=r,t.totalDuration=Math.max(t.totalDuration,t.starts[a])}};return Gn=e,Gn}var Un,ec;function Iv(){if(ec)return Un;ec=1;var e=`
|
|
163
124
|
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" preserveAspectRatio="xMidYMid meet">
|
|
164
125
|
<g transform="translate(0,700) scale(0.1,-0.1)" >
|
|
165
126
|
<path d="M3111 6981 c-20 -37 -90 -55 -364 -96 -120 -18 -190 -33 -244 -55
|
|
@@ -221,39 +182,39 @@ X:`),o=s.length;return o===0&&(o=1),o};var t=i.TuneBook=function(a){var s=r(a);t
|
|
|
221
182
|
0 -1086 -11z"></path>
|
|
222
183
|
</g>
|
|
223
184
|
</svg>
|
|
224
|
-
`;return
|
|
185
|
+
`;return Un=e,Un}var jn,tc;function Rv(){if(tc)return jn;tc=1;var e=`
|
|
225
186
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-play-svg">
|
|
226
187
|
<g>
|
|
227
188
|
<polygon points="4 0 23 12.5 4 25"/>
|
|
228
189
|
</g>
|
|
229
190
|
</svg>
|
|
230
|
-
`;return
|
|
191
|
+
`;return jn=e,jn}var Yn,rc;function qv(){if(rc)return Yn;rc=1;var e=`
|
|
231
192
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-pause-svg">
|
|
232
193
|
<g>
|
|
233
194
|
<rect width="8.23" height="25"/>
|
|
234
195
|
<rect width="8.23" height="25" x="17"/>
|
|
235
196
|
</g>
|
|
236
197
|
</svg>
|
|
237
|
-
`;return
|
|
198
|
+
`;return Yn=e,Yn}var Wn,nc;function Bv(){if(nc)return Wn;nc=1;var e=`
|
|
238
199
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="abcjs-loading-svg">
|
|
239
200
|
<circle cx="50" cy="50" fill="none" stroke-width="20" r="35" stroke-dasharray="160 55"></circle>
|
|
240
201
|
</svg>
|
|
241
|
-
`;return
|
|
202
|
+
`;return Wn=e,Wn}var Vn,ac;function Lv(){if(ac)return Vn;ac=1;var e=`
|
|
242
203
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25">
|
|
243
204
|
<g>
|
|
244
205
|
<polygon points="5 12.5 24 0 24 25"/>
|
|
245
206
|
<rect width="3" height="25" x="0" y="0"/>
|
|
246
207
|
</g>
|
|
247
208
|
</svg>
|
|
248
|
-
`;return
|
|
249
|
-
`;if(
|
|
250
|
-
`}if(
|
|
251
|
-
`}if(
|
|
252
|
-
`}if(
|
|
253
|
-
`}if(k&&(
|
|
254
|
-
`),
|
|
255
|
-
`}
|
|
256
|
-
`,u.innerHTML=$}function p(u,h,c,m,b){var g=!0;if(n()?g=n().state==="suspended":r(),!e())throw{status:"NotSupported",message:"This browser does not support audio."};(g||b)&&c&&c.classList.add("abcjs-loading"),g?n().resume().then(function(){m?m().then(function(w){v(u,h,c,b)}):v(u,h,c,b)}):v(u,h,c,b)}function v(u,h,c,m){m?u(h).then(function(){c&&c.classList.remove("abcjs-loading")}):(u(h),c&&c.classList.remove("abcjs-loading"))}function f(u){var h=!!u.options.loopHandler,c=!!u.options.restartHandler,m=!!u.options.playHandler||!!u.options.playPromiseHandler,b=!!u.options.progressHandler,g=!!u.options.warpHandler,w=u.parent.querySelector(".abcjs-midi-start");h&&u.parent.querySelector(".abcjs-midi-loop").addEventListener("click",function(k){p(u.options.loopHandler,k,w,u.options.afterResume)}),c&&u.parent.querySelector(".abcjs-midi-reset").addEventListener("click",function(k){p(u.options.restartHandler,k,w,u.options.afterResume)}),m&&w.addEventListener("click",function(k){p(u.options.playPromiseHandler||u.options.playHandler,k,w,u.options.afterResume,!!u.options.playPromiseHandler)}),b&&u.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",function(k){p(u.options.progressHandler,k,w,u.options.afterResume)}),g&&u.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",function(k){p(u.options.warpHandler,k,w,u.options.afterResume)})}return Eo=l,Eo}var No,ih;function W$(){if(ih)return No;ih=1;var e=Tb(),r=Pu(),n=Nr();function i(a,s,o,l,d){for(var p=new e,v=0;v<a.length;v++){var f=a[v],u=p.addTrack();if(p.setInstrument(u,f.instrument),v===0&&s)for(var h=0;h<s.length;h++){var c=s[h];p.appendNote(u,c.pitch,1/64,c.volume,c.cents)}p.appendNote(u,f.pitch,f.duration,f.volume,f.cents)}var m=n();return m.state==="suspended"?m.resume().then(function(){return t(p,o,l,d)}):t(p,o,l,d)}function t(a,s,o,l){var d=new r;return d.init({sequence:a,millisecondsPerMeasure:s,options:{soundFontUrl:o},debugCallback:l}).then(function(){return d.prime()}).then(function(){return d.start(),Promise.resolve()})}return No=i,No}var Ao,ah;function zb(){if(ah)return Ao;ah=1;var e=Cb(),r=Pu(),n=wu(),i=Nr();function t(){var a=this;a.warp=100,a.cursorControl=null,a.visualObj=null,a.timer=null,a.midiBuffer=null,a.options=null,a.currentTempo=null,a.control=null,a.isLooping=!1,a.isStarted=!1,a.isLoaded=!1,a.isLoading=!1,a.load=function(o,l,d){d||(d={}),d.displayPlay===void 0&&(d.displayPlay=!0),d.displayProgress===void 0&&(d.displayProgress=!0),a.control=new e(o,{loopHandler:d.displayLoop?a.toggleLoop:void 0,restartHandler:d.displayRestart?a.restart:void 0,playPromiseHandler:d.displayPlay?a.play:void 0,progressHandler:d.displayProgress?a.randomAccess:void 0,warpHandler:d.displayWarp?a.onWarp:void 0,afterResume:a.init}),a.cursorControl=l,a.disable(!0)},a.disable=function(o){a.control&&a.control.disable(o)},a.setTune=function(o,l,d){return a.visualObj=o,a.disable(!1),a.options=d||{},a.control&&(a.pause(),a.setProgress(0,1),a.control.resetAll(),a.restart(),a.isStarted=!1),a.isLooping=!1,l?a.go():Promise.resolve({status:"no-audio-context"})},a.go=function(){a.isLoading=!0;var o=a.visualObj.millisecondsPerMeasure()*100/a.warp;a.currentTempo=Math.round(a.visualObj.getBeatsPerMeasure()/o*6e4),a.control&&a.control.setTempo(a.currentTempo),a.percent=0;var l;return a.midiBuffer||(a.midiBuffer=new r),i().resume().then(function(d){return a.midiBuffer.init({visualObj:a.visualObj,options:a.options,millisecondsPerMeasure:o})}).then(function(d){return l=d,a.midiBuffer.prime()}).then(function(){var d=16;return a.cursorControl&&a.cursorControl.beatSubdivisions!==void 0&&parseInt(a.cursorControl.beatSubdivisions,10)>=1&&parseInt(a.cursorControl.beatSubdivisions,10)<=64&&(d=parseInt(a.cursorControl.beatSubdivisions,10)),a.timer=new n(a.visualObj,{beatCallback:a.beatCallback,eventCallback:a.eventCallback,lineEndCallback:a.lineEndCallback,qpm:a.currentTempo,extraMeasuresAtBeginning:a.cursorControl?a.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:a.cursorControl?a.cursorControl.lineEndAnticipation:0,beatSubdivisions:d}),a.cursorControl&&a.cursorControl.onReady&&typeof a.cursorControl.onReady=="function"&&a.cursorControl.onReady(a),a.isLoaded=!0,a.isLoading=!1,Promise.resolve({status:"created",notesStatus:l})})},a.destroy=function(){a.timer&&(a.timer.reset(),a.timer.stop(),a.timer=null),a.midiBuffer&&(a.midiBuffer.stop(),a.midiBuffer=null),a.setProgress(0,1),a.control&&a.control.resetAll()},a.play=function(){return a.runWhenReady(a._play,void 0)};function s(o){return new Promise(function(l){setTimeout(l,o)})}a.runWhenReady=function(o,l){return a.visualObj?a.isLoading?s(500).then(function(){return a.isLoading?a.runWhenReady(o,l):o(l)}):a.isLoaded?o(l):a.go().then(function(){return o(l)}):Promise.resolve({status:"loading"})},a._play=function(){return i().resume().then(function(){return a.isStarted=!a.isStarted,a.isStarted?(a.cursorControl&&a.cursorControl.onStart&&typeof a.cursorControl.onStart=="function"&&a.cursorControl.onStart(),a.midiBuffer.start(),a.timer.start(a.percent),a.control&&a.control.pushPlay(!0)):a.pause(),Promise.resolve({status:"ok"})})},a.pause=function(){a.timer&&(a.timer.pause(),a.midiBuffer.pause(),a.control&&a.control.pushPlay(!1))},a.toggleLoop=function(){a.isLooping=!a.isLooping,a.control&&a.control.pushLoop(a.isLooping)},a.restart=function(){a.timer&&(a.timer.setProgress(0),a.midiBuffer.seek(0))},a.randomAccess=function(o){return a.runWhenReady(a._randomAccess,o)},a._randomAccess=function(o){var l=o.target.classList.contains("abcjs-midi-progress-indicator")?o.target.parentNode:o.target,d=(o.x-l.getBoundingClientRect().left)/l.offsetWidth;return d<0&&(d=0),d>1&&(d=1),a.seek(d),Promise.resolve({status:"ok"})},a.seek=function(o,l){a.timer&&a.midiBuffer&&(a.timer.setProgress(o,l),a.midiBuffer.seek(o,l))},a.setWarp=function(o){if(parseInt(o,10)>0){a.warp=parseInt(o,10);var l=a.isStarted,d=a.percent;return a.destroy(),a.isStarted=!1,a.go().then(function(){return a.setProgress(d,a.midiBuffer.duration*1e3),a.control&&a.control.setWarp(a.currentTempo,a.warp),l?a.play().then(function(){return a.seek(d),Promise.resolve()}):(a.seek(d),Promise.resolve())})}return Promise.resolve()},a.onWarp=function(o){var l=o.target.value;return a.setWarp(l)},a.setProgress=function(o,l){a.percent=o,a.control&&a.control.setProgress(o,l)},a.finished=function(){if(a.timer.reset(),a.isLooping)return a.timer.start(0),a.midiBuffer.finished(),a.midiBuffer.start(),"continue";a.timer.stop(),a.isStarted&&(a.control&&a.control.pushPlay(!1),a.isStarted=!1,a.midiBuffer.finished(),a.cursorControl&&a.cursorControl.onFinished&&typeof a.cursorControl.onFinished=="function"&&a.cursorControl.onFinished(),a.setProgress(0,1))},a.beatCallback=function(o,l,d,p){var v=o/l;a.setProgress(v,d),a.cursorControl&&a.cursorControl.onBeat&&typeof a.cursorControl.onBeat=="function"&&a.cursorControl.onBeat(o,l,d,p)},a.eventCallback=function(o){if(o)a.cursorControl&&a.cursorControl.onEvent&&typeof a.cursorControl.onEvent=="function"&&a.cursorControl.onEvent(o);else return a.finished()},a.lineEndCallback=function(o,l){a.cursorControl&&a.cursorControl.onLineEnd&&typeof a.cursorControl.onLineEnd=="function"&&a.cursorControl.onLineEnd(o,l)},a.getUrl=function(){return a.midiBuffer.download()},a.download=function(o){var l=a.getUrl(),d=document.createElement("a");document.body.appendChild(d),d.setAttribute("style","display: none;"),d.href=l,d.download=o||"output.wav",d.click(),window.URL.revokeObjectURL(l),document.body.removeChild(d)}}return Ao=t,Ao}var Po,sh;function Eb(){if(sh)return Po;sh=1;var e=Ib(),r;return(function(){function n(f,u){for(var h in u)u.hasOwnProperty(h)&&f.setAttribute(h,u[h]);return f}function i(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}i.prototype.setTempo=function(f){this.trackcount===0&&(this.startTrack(),this.track+="%00%FF%51%03"+d(Math.round(6e7/f),6),this.endTrack())},i.prototype.setGlobalInfo=function(f,u,h,c){if(this.trackcount===0){this.startTrack();var m=Math.round(6e7/f);this.track+="%00%FF%51%03"+d(m,6),h&&(this.track+=s(h)),c&&(this.track+=o(c)),u&&(this.track+=a(u,"%01")),this.endTrack()}},i.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},i.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var f=d(this.track.length/3+4,8);this.track="MTrk"+f+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},i.prototype.setText=function(f,u){switch(f){case"name":this.trackName=a(u,"%03");break}},i.prototype.setInstrument=function(f){this.trackInstrument="%00%C0"+d(f,2),this.instrument=f},i.prototype.setChannel=function(f,u){this.channel=f;var h="%00%B"+this.channel.toString(16);this.track+=h+"%79%00",this.track+=h+"%40%00",this.track+=h+"%5B%30",u||(u=0),u=Math.round((u+1)*64),this.track+=h+"%0A"+d(u,2),this.track+=h+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};var t=4096;i.prototype.startNote=function(f,u,h){if(this.track+=v(this.silencelength),this.silencelength=0,h){this.track+="%e"+this.channel.toString(16);var c=Math.round(e(h)*t);this.track+=p(8192+c),this.track+=v(0),this.noteWarped[f]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+f.toString(16)+d(u,2)},i.prototype.endNote=function(f){this.track+=v(this.silencelength),this.silencelength=0,this.noteWarped[f]&&(this.track+="%e"+this.channel.toString(16),this.track+=p(8192),this.track+=v(0),this.noteWarped[f]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+f.toString(16)+"%00"},i.prototype.addRest=function(f){this.silencelength+=f,this.silencelength<0&&(this.silencelength=0)},i.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+d(this.trackcount,4)+"%01%e0"+this.trackstrings},i.prototype.embed=function(f,u){var h=this.getData(),c=n(document.createElement("a"),{href:h});if(c.innerHTML="download midi",f.insertBefore(c,f.firstChild),!u){var m=n(document.createElement("embed"),{src:h,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});f.insertBefore(m,f.firstChild)}};function a(f,u){for(var h="",c=0;c<f.length;c++)h+=d(f.charCodeAt(c),2);return"%00%FF"+u+d(h.length/3,2)+h}function s(f){if(!f||!f.accidentals)return"";for(var u="%00%FF%59%02",h=0,c=256,m=0;m<f.accidentals.length;m++)f.accidentals[m].acc==="sharp"?h++:f.accidentals[m].acc==="flat"&&c--;var b=d(c!==256?c:h,2),g=f.mode==="m"?"%01":"%00";return u+b+g}function o(f){var u="%00%FF%58%04"+d(f.num,2),h={1:0,2:1,4:2,8:3,16:4,32:5},c=h[f.den];if(!c)return"";u+=d(c,2);var m;switch(f.num+"/"+f.den){case"2/4":case"3/4":case"4/4":case"5/4":m=24;break;case"6/4":m=72;break;case"2/2":case"3/2":case"4/2":m=48;break;case"3/8":case"6/8":case"9/8":case"12/8":m=36;break}return m?(u+=d(m,2),u+"%08"):""}function l(f){for(var u="",h=0;h<f.length;h+=2)u+="%",u+=f.substr(h,2);return u}function d(f,u){var h=f.toString(16);for(h=h.split(".")[0];h.length<u;)h="0"+h;return h.length>u&&(h=h.substring(0,u)),l(h)}function p(f){f=Math.round(f);var u=f%128,h=f-u;return d(h*2+u,4)}function v(f){var u=0,h=[];for(f=Math.round(f);f!==0;)h.push(f&127),f=f>>7;for(var c=h.length-1;c>=0;c--){u=u<<8;var m=h[c];c!==0&&(m=m|128),u=u|m}var b=u.toString(16).length;return b+=b%2,d(u,b)}r=function(){return new i}})(),Po=r,Po}var Oo,oh;function Y$(){if(oh)return Oo;oh=1;var e=Eb(),r;return(function(){var n=1920;r=function(a,s){s===void 0&&(s={});var o=a.setUpAudio(s),l=e(),d=a.metaText?a.metaText.title:void 0;d&&d.length>128&&(d=d.substring(0,124)+"...");var p=a.getKeySignature(),v=a.getMeterFraction(),f=o.tempo,u=f/60;if(v.den===8&&v.num!==5&&v.num!==7){var h=a.millisecondsPerMeasure();f=6e4/(h/v.num)/2,u=f/60}l.setGlobalInfo(f,d,p,v);for(var c=0;c<o.tracks.length;c++){l.startTrack();for(var m={},b=0;b<o.tracks[c].length;b++){var g=o.tracks[c][b];switch(g.cmd){case"text":l.setText(g.type,g.text);break;case"program":var w=0;s.pan&&s.pan.length>c&&(w=s.pan[c]),g.instrument===128?(l.setChannel(9,w),l.setInstrument(0)):(l.setChannel(g.channel,w),l.setInstrument(g.instrument));break;case"note":var k=g.gap*u,$=g.start,O=$+g.duration-k;m[$]||(m[$]=[]),m[$].push({pitch:g.pitch,volume:g.volume,cents:g.cents}),m[O]||(m[O]=[]),m[O].push({pitch:g.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+g.cmd)}}i(l,m,n),l.endTrack()}return l.getData()};function i(t,a,s){for(var o=Object.keys(a),l=0;l<o.length;l++)o[l]=parseFloat(o[l]);o.sort(function(c,m){return c-m});for(var d=0,p=0;p<o.length;p++){var v=a[o[p]];if(o[p]>d){var f=(o[p]-d)*s;t.addRest(f),d=o[p]}for(var u=0;u<v.length;u++){var h=v[u];h.volume?t.startNote(h.pitch,h.volume,h.cents):t.endNote(h.pitch)}}}})(),Oo=r,Oo}var Mo,ch;function V$(){if(ch)return Mo;ch=1;var e=Gi(),r=Y$(),n=function(a,s){var o={};if(s)for(var l in s)s.hasOwnProperty(l)&&(o[l]=s[l]);o.generateInline=!1;function d(p,v,f){var u=r(v,o);switch(o.midiOutputType){case"encoded":return u;case"binary":var h=u.replace("data:audio/midi,","");h=h.replace(/MThd/g,"%4d%54%68%64"),h=h.replace(/MTrk/g,"%4d%54%72%6b");for(var c=new ArrayBuffer(h.length/3),m=new Uint8Array(c),b=0;b<h.length/3;b++){var g=b*3+1,w=parseInt(h.substring(g,g+2),16);m[b]=w}return m;case"link":default:return t(v,o,u,f)}}return typeof a=="string"?e.renderEngine(d,"*",a,o):d(null,a,0)};function i(a){var s={};return a&&s.toString.call(a)==="[object Function]"}var t=function(a,s,o,l){var d=["abcjs-download-midi","abcjs-midi-"+l];s.downloadClass&&d.push(s.downloadClass);var p='<div class="'+d.join(" ")+'">';s.preTextDownload&&(p+=s.preTextDownload);var v=a.metaText&&a.metaText.title?a.metaText.title:"Untitled",f;s.downloadLabel&&i(s.downloadLabel)?f=s.downloadLabel(a,l):s.downloadLabel?f=s.downloadLabel.replace(/%T/,v):f='Download MIDI for "'+v+'"',v=v.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_");var u=s.fileName?s.fileName:v+".midi";return p+='<a download="'+u+'" href="'+o+'">'+f+"</a>",s.postTextDownload&&(p+=s.postTextDownload),p+"</div>"};return Mo=n,Mo}var Do,uh;function Nb(){if(uh)return Do;uh=1;try{if(typeof window.CustomEvent!="function"){var e=function(n,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var t=document.createEvent("CustomEvent");return t.initCustomEvent(n,i.bubbles,i.cancelable,i.detail),t};e.prototype=window.Event.prototype,window.CustomEvent=e}}catch{}var r=function(n){this.isEditArea=!0,typeof n=="string"?(this.textarea=document.getElementById(n),this.textarea||(this.textarea=document.querySelector(n))):this.textarea=n,this.initialText=this.textarea.value,this.isDragging=!1};return r.prototype.addSelectionListener=function(n){this.textarea.onmousemove=function(i){this.isDragging&&n.fireSelectionChanged()}},r.prototype.addChangeListener=function(n){this.changelistener=n,this.textarea.onkeyup=function(){n.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,n.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,n.fireChanged()},this.textarea.onchange=function(){n.fireChanged()}},r.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},r.prototype.setSelection=function(n,i){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(n,i);else if(this.textarea.createTextRange){var t=this.textarea.createTextRange();t.collapse(!0),t.moveEnd("character",i),t.moveStart("character",n),t.select()}this.textarea.focus()},r.prototype.getString=function(){return this.textarea.value},r.prototype.setString=function(n){this.textarea.value=n,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},r.prototype.getElem=function(){return this.textarea},Do=r,Do}var Ro,lh;function X$(){if(lh)return Ro;lh=1;var e=Et(),r=zb(),n=Wi(),i=Sb(),t=Nb();function a(o){var l={},d;if(o.abcjsParams)for(d in o.abcjsParams)o.abcjsParams.hasOwnProperty(d)&&(l[d]=o.abcjsParams[d]);if(o.midi_options)for(d in o.midi_options)o.midi_options.hasOwnProperty(d)&&(l[d]=o.midi_options[d]);if(o.parser_options)for(d in o.parser_options)o.parser_options.hasOwnProperty(d)&&(l[d]=o.parser_options[d]);if(o.render_options)for(d in o.render_options)o.render_options.hasOwnProperty(d)&&(l[d]=o.render_options[d]);return l.tablature&&o.warnings_id&&(l.tablature.warnings_id=o.warnings_id),l}var s=function(o,l){this.abcjsParams=a(l),l.indicate_changed&&(this.indicate_changed=!0),typeof o=="string"?this.editarea=new t(o):o.isEditArea?this.editarea=o:this.editarea=new t(o),this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),l.canvas_id?this.div=l.canvas_id:l.paper_id?this.div=l.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),typeof this.div=="string"&&(this.div=document.getElementById(this.div)),l.selectionChangeCallback&&(this.selectionChangeCallback=l.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),l.synth&&n()&&(this.synth={el:l.synth.el,cursorControl:l.synth.cursorControl,options:l.synth.options}),l.generate_midi&&(this.generate_midi=l.generate_midi,this.abcjsParams.generateDownload&&(typeof l.midi_download_id=="string"?this.downloadMidi=document.getElementById(l.midi_download_id):l.midi_download_id&&(this.downloadMidi=l.midi_download_id)),this.abcjsParams.generateInline!==!1&&(typeof l.midi_id=="string"?this.inlineMidi=document.getElementById(l.midi_id):l.midi_id&&(this.inlineMidi=l.midi_id))),l.warnings_id?typeof l.warnings_id=="string"?this.warningsdiv=document.getElementById(l.warnings_id):this.warningsdiv=l.warnings_id:l.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=l.onchange,this.redrawCallback=l.redrawCallback,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(d,p){var v=function(f,u){var h=f.className;return h.length>0&&(h===u||new RegExp("(^|\\s)"+u+"(\\s|$)").test(h))};return v(d,p)||(d.className+=(d.className?" ":"")+p),d},this.removeClassName=function(d,p){return d.className=e.strip(d.className.replace(new RegExp("(^|\\s+)"+p+"(\\s+|$)")," ")),d},this.setReadOnly=function(d){var p="abc_textarea_readonly",v=this.editarea.getElem();d?(v.setAttribute("readonly","yes"),this.addClassName(v,p)):(v.removeAttribute("readonly"),this.removeClassName(v,p))}};return s.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var o=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(o)}if(this.synth){var l=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new r,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],l,this.synth.options)}},s.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.redrawCallback&&this.redrawCallback(!0),this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=i(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.redrawCallback&&this.redrawCallback(!1)}catch(o){console.error("ABCJS error: ",o),this.warnings||(this.warnings=[]),this.warnings.push(o.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.updateSelection(),this.bReentry=!1}},s.prototype.paramChanged=function(o){if(o)for(var l in o)o.hasOwnProperty(l)&&(this.abcjsParams[l]=o[l]);this.currentAbc="",this.fireChanged()},s.prototype.getTunes=function(){return this.tunes},s.prototype.synthParamChanged=function(o){if(this.synth){if(this.synth.options={},o)for(var l in o)o.hasOwnProperty(l)&&(this.synth.options[l]=o[l]);this.currentAbc="",this.fireChanged()}},s.prototype.parseABC=function(){var o=this.editarea.getString();return o===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=o,!0)},s.prototype.updateSelection=function(){var o=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(o.start,o.end)}catch{}this.selectionChangeCallback&&this.selectionChangeCallback(o.start,o.end)},s.prototype.fireSelectionChanged=function(){this.updateSelection()},s.prototype.setDirtyStyle=function(o){if(this.indicate_changed!==void 0){var l=function(f,u){var h=function(c,m){var b=c.className;return b.length>0&&(b===m||new RegExp("(^|\\s)"+m+"(\\s|$)").test(b))};return h(f,u)||(f.className+=(f.className?" ":"")+u),f},d=function(f,u){return f.className=e.strip(f.className.replace(new RegExp("(^|\\s+)"+u+"(\\s+|$)")," ")),f},p="abc_textarea_dirty",v=this.editarea.getElem();o?l(v,p):d(v,p)}},s.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var o=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){o.modelChanged()},300);var l=this.isDirty();this.wasDirty!==l&&(this.wasDirty=l,this.setDirtyStyle(l)),this.onchangeCallback&&this.onchangeCallback(this)}},s.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},s.prototype.isDirty=function(){return this.indicate_changed===void 0?!1:this.editarea.initialText!==this.editarea.getString()},s.prototype.highlight=function(o,l,d,p,v,f){this.editarea.setSelection(o.startChar,o.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(o.startChar,o.endChar),this.clientClickListener&&this.clientClickListener(o,l,d,p,v,f)},s.prototype.pause=function(o){this.bIsPaused=o,o||this.fireChanged()},s.prototype.millisecondsPerMeasure=function(){return!this.synth||!this.synth.synthControl||!this.synth.synthControl.visualObj?0:this.synth.synthControl.visualObj.millisecondsPerMeasure()},s.prototype.pauseMidi=function(o){this.midiPause=o,o||this.redrawMidi()},Ro=s,Ro}var Lo,fh;function K$(){if(fh)return Lo;fh=1;var e=h7(),r=p7(),n=Gi(),i=ob(),t=P7(),a={};a.signature="abcjs-basic v"+e,Object.keys(r).forEach(function(w){a[w]=r[w]}),Object.keys(n).forEach(function(w){a[w]=n[w]}),a.renderAbc=Sb(),a.tuneMetrics=L$(),a.TimingCallbacks=wu();var s=Yt();a.setGlyph=s.setSymbol,a.strTranspose=t;var o=Pu(),l=Nu(),d=Au(),p=Tb(),v=Cb(),f=Ji(),u=Nr(),h=Wi(),c=W$(),m=zb(),b=V$(),g=Eb();return a.synth={CreateSynth:o,instrumentIndexToName:l,pitchToNoteName:d,SynthController:m,SynthSequence:p,CreateSynthControl:v,registerAudioContext:f,activeAudioContext:u,supportsAudio:h,playEvent:c,getMidiFile:b,sequence:i,midiRenderer:g},a.Editor=X$(),a.EditArea=Nb(),Lo=a,Lo}var Q$=K$();const Uo=d7(Q$),Qt={visualObj:null,synthControl:null},Nn=document.querySelector(".main"),dh=document.getElementById("status"),hh=document.getElementById("sheet-music"),Zo=document.getElementById("audio-controls");"audioSession"in navigator&&(navigator.audioSession.type="playback");function An(e,r=!1){dh.textContent=e,dh.classList.toggle("error",r)}async function ex(e){try{if(An("Rendering..."),hh.innerHTML="",Zo.innerHTML="",Qt.visualObj=Uo.renderAbc(hh,e,{responsive:"resize",add_classes:!0}),!Qt.visualObj||Qt.visualObj.length===0)throw new Error("Failed to parse music notation");if(!Uo.synth.supportsAudio())throw new Error("Audio not supported in this browser");Qt.synthControl=new Uo.synth.SynthController,Qt.synthControl.load(Zo,null,{displayLoop:!0,displayPlay:!0,displayProgress:!0}),await Qt.synthControl.setTune(Qt.visualObj[0],!1,{}),An("Ready to play!")}catch(r){console.error("Render error:",r),An(`Error: ${r.message}`,!0),Zo.innerHTML=""}}const qr=new f7({name:"Sheet Music App",version:"1.0.0"});qr.ontoolinput=e=>{var n;console.info("Received tool input:",e);const r=(n=e.arguments)==null?void 0:n.abcNotation;r?ex(r):An("No ABC notation provided",!0)};qr.onerror=console.error;function Ab(e){e.safeAreaInsets&&(Nn.style.paddingTop=`${e.safeAreaInsets.top}px`,Nn.style.paddingRight=`${e.safeAreaInsets.right}px`,Nn.style.paddingBottom=`${e.safeAreaInsets.bottom}px`,Nn.style.paddingLeft=`${e.safeAreaInsets.left}px`)}qr.onhostcontextchanged=Ab;qr.connect().then(()=>{const e=qr.getHostContext();e&&Ab(e)});</script>
|
|
209
|
+
`;return Vn=e,Vn}var Xn,ic;function Ul(){if(ic)return Xn;ic=1;var e=pr(),t=dr(),a=zt(),n=Iv(),r=Rv(),i=qv(),c=Bv(),u=Lv();function f(o,h){var s=this;if(typeof o=="string"){var v=o;if(o=document.querySelector(v),!o)throw new Error('Cannot find element "'+v+'" in the DOM.')}else if(!(o instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(s.parent=o,s.options={},h&&(s.options=Object.assign({},h)),s.options.ac&&t(s.options.ac),g(s.parent,s.options),l(s),s.disable=function(m){var _=s.parent.querySelector(".abcjs-inline-audio");m?_.classList.add("abcjs-disabled"):_.classList.remove("abcjs-disabled")},s.setWarp=function(m,_){var k=s.parent.querySelector(".abcjs-midi-tempo");k.value=Math.round(_),s.setTempo(m)},s.setTempo=function(m){var _=s.parent.querySelector(".abcjs-midi-current-tempo");_&&(_.innerHTML=Math.round(m))},s.resetAll=function(){for(var m=s.parent.querySelectorAll(".abcjs-pushed"),_=0;_<m.length;_++){var k=m[_];k.classList.remove("abcjs-pushed")}},s.pushPlay=function(m){var _=s.parent.querySelector(".abcjs-midi-start");_&&(m?_.classList.add("abcjs-pushed"):_.classList.remove("abcjs-pushed"))},s.pushLoop=function(m){var _=s.parent.querySelector(".abcjs-midi-loop");_&&(m?_.classList.add("abcjs-pushed"):_.classList.remove("abcjs-pushed"))},s.setProgress=function(m,_){var k=s.parent.querySelector(".abcjs-midi-progress-background"),x=s.parent.querySelector(".abcjs-midi-progress-indicator");if(!(!k||!x)){var R=k.clientWidth,I=R*m;x.style.left=I+"px";var b=s.parent.querySelector(".abcjs-midi-clock");if(b){var A=_*m/1e3,N=Math.floor(A/60),M=Math.floor(A%60),z=M<10?"0"+M:M;b.innerHTML=N+":"+z}}},s.options.afterResume){var y=!1;s.options.ac?y=s.options.ac.state!=="suspended":a()&&(y=a().state!=="suspended"),y&&s.options.afterResume()}}function g(o,h){var s=!!h.loopHandler,v=!!h.restartHandler,y=!!h.playHandler||!!h.playPromiseHandler,m=!!h.progressHandler,_=!!h.warpHandler,k=h.hasClock!==!1,x=`<div class="abcjs-inline-audio">
|
|
210
|
+
`;if(s){var R=h.repeatTitle?h.repeatTitle:"Click to toggle play once/repeat.",I=h.repeatAria?h.repeatAria:R;x+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+R+'" aria-label="'+I+'">'+n+`</button>
|
|
211
|
+
`}if(v){var b=h.restartTitle?h.restartTitle:"Click to go to beginning.",A=h.restartAria?h.restartAria:b;x+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+b+'" aria-label="'+A+'">'+u+`</button>
|
|
212
|
+
`}if(y){var N=h.playTitle?h.playTitle:"Click to play/pause.",M=h.playAria?h.playAria:N;x+='<button type="button" class="abcjs-midi-start abcjs-btn" title="'+N+'" aria-label="'+M+'">'+r+i+c+`</button>
|
|
213
|
+
`}if(m){var z=h.randomTitle?h.randomTitle:"Click to change the playback position.",L=h.randomAria?h.randomAria:z;x+='<button type="button" class="abcjs-midi-progress-background" title="'+z+'" aria-label="'+L+`"><span class="abcjs-midi-progress-indicator"></span></button>
|
|
214
|
+
`}if(k&&(x+=`<span class="abcjs-midi-clock"></span>
|
|
215
|
+
`),_){var E=h.warpTitle?h.warpTitle:"Change the playback speed.",T=h.warpAria?h.warpAria:E,P=h.bpm?h.bpm:"BPM";x+='<span class="abcjs-tempo-wrapper"><label><input class="abcjs-midi-tempo" type="number" min="1" max="300" value="100" title="'+E+'" aria-label="'+T+'">%</label><span> (<span class="abcjs-midi-current-tempo"></span> '+P+`)</span></span>
|
|
216
|
+
`}x+='<div class="abcjs-css-warning" style="font-size: 12px;color:red;border: 1px solid red;text-align: center;width: 300px;margin-top: 4px;font-weight: bold;border-radius: 4px;">CSS required: load abcjs-audio.css</div>',x+=`</div>
|
|
217
|
+
`,o.innerHTML=x}function d(o,h,s,v,y){var m=!0;if(a()?m=a().state==="suspended":t(),!e())throw{status:"NotSupported",message:"This browser does not support audio."};(m||y)&&s&&s.classList.add("abcjs-loading"),m?a().resume().then(function(){v?v().then(function(_){p(o,h,s,y)}):p(o,h,s,y)}):p(o,h,s,y)}function p(o,h,s,v){v?o(h).then(function(){s&&s.classList.remove("abcjs-loading")}):(o(h),s&&s.classList.remove("abcjs-loading"))}function l(o){var h=!!o.options.loopHandler,s=!!o.options.restartHandler,v=!!o.options.playHandler||!!o.options.playPromiseHandler,y=!!o.options.progressHandler,m=!!o.options.warpHandler,_=o.parent.querySelector(".abcjs-midi-start");h&&o.parent.querySelector(".abcjs-midi-loop").addEventListener("click",function(k){d(o.options.loopHandler,k,_,o.options.afterResume)}),s&&o.parent.querySelector(".abcjs-midi-reset").addEventListener("click",function(k){d(o.options.restartHandler,k,_,o.options.afterResume)}),v&&_.addEventListener("click",function(k){d(o.options.playPromiseHandler||o.options.playHandler,k,_,o.options.afterResume,!!o.options.playPromiseHandler)}),y&&o.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",function(k){d(o.options.progressHandler,k,_,o.options.afterResume)}),m&&o.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",function(k){d(o.options.warpHandler,k,_,o.options.afterResume)})}return Xn=f,Xn}var Kn,sc;function Ov(){if(sc)return Kn;sc=1;var e=Gl(),t=Qa(),a=zt();function n(i,c,u,f,g){for(var d=new e,p=0;p<i.length;p++){var l=i[p],o=d.addTrack();if(d.setInstrument(o,l.instrument),p===0&&c)for(var h=0;h<c.length;h++){var s=c[h];d.appendNote(o,s.pitch,1/64,s.volume,s.cents)}d.appendNote(o,l.pitch,l.duration,l.volume,l.cents)}var v=a();return v.state==="suspended"?v.resume().then(function(){return r(d,u,f,g)}):r(d,u,f,g)}function r(i,c,u,f){var g=new t;return g.init({sequence:i,millisecondsPerMeasure:c,options:{soundFontUrl:u},debugCallback:f}).then(function(){return g.prime()}).then(function(){return g.start(),Promise.resolve()})}return Kn=n,Kn}var Jn,oc;function jl(){if(oc)return Jn;oc=1;var e=Ul(),t=Qa(),a=Ha(),n=zt();function r(){var i=this;i.warp=100,i.cursorControl=null,i.visualObj=null,i.timer=null,i.midiBuffer=null,i.options=null,i.currentTempo=null,i.control=null,i.isLooping=!1,i.isStarted=!1,i.isLoaded=!1,i.isLoading=!1,i.load=function(u,f,g){g||(g={}),g.displayPlay===void 0&&(g.displayPlay=!0),g.displayProgress===void 0&&(g.displayProgress=!0),i.control=new e(u,{loopHandler:g.displayLoop?i.toggleLoop:void 0,restartHandler:g.displayRestart?i.restart:void 0,playPromiseHandler:g.displayPlay?i.play:void 0,progressHandler:g.displayProgress?i.randomAccess:void 0,warpHandler:g.displayWarp?i.onWarp:void 0,afterResume:i.init}),i.cursorControl=f,i.disable(!0)},i.disable=function(u){i.control&&i.control.disable(u)},i.setTune=function(u,f,g){return i.visualObj=u,i.disable(!1),i.options=g||{},i.control&&(i.pause(),i.setProgress(0,1),i.control.resetAll(),i.restart(),i.isStarted=!1),i.isLooping=!1,f?i.go():Promise.resolve({status:"no-audio-context"})},i.go=function(){i.isLoading=!0;var u=i.visualObj.millisecondsPerMeasure()*100/i.warp;i.currentTempo=Math.round(i.visualObj.getBeatsPerMeasure()/u*6e4),i.control&&i.control.setTempo(i.currentTempo),i.percent=0;var f;return i.midiBuffer||(i.midiBuffer=new t),n().resume().then(function(g){return i.midiBuffer.init({visualObj:i.visualObj,options:i.options,millisecondsPerMeasure:u})}).then(function(g){return f=g,i.midiBuffer.prime()}).then(function(){var g=16;return i.cursorControl&&i.cursorControl.beatSubdivisions!==void 0&&parseInt(i.cursorControl.beatSubdivisions,10)>=1&&parseInt(i.cursorControl.beatSubdivisions,10)<=64&&(g=parseInt(i.cursorControl.beatSubdivisions,10)),i.timer=new a(i.visualObj,{beatCallback:i.beatCallback,eventCallback:i.eventCallback,lineEndCallback:i.lineEndCallback,qpm:i.currentTempo,extraMeasuresAtBeginning:i.cursorControl?i.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:i.cursorControl?i.cursorControl.lineEndAnticipation:0,beatSubdivisions:g}),i.cursorControl&&i.cursorControl.onReady&&typeof i.cursorControl.onReady=="function"&&i.cursorControl.onReady(i),i.isLoaded=!0,i.isLoading=!1,Promise.resolve({status:"created",notesStatus:f})})},i.destroy=function(){i.timer&&(i.timer.reset(),i.timer.stop(),i.timer=null),i.midiBuffer&&(i.midiBuffer.stop(),i.midiBuffer=null),i.setProgress(0,1),i.control&&i.control.resetAll()},i.play=function(){return i.runWhenReady(i._play,void 0)};function c(u){return new Promise(function(f){setTimeout(f,u)})}i.runWhenReady=function(u,f){return i.visualObj?i.isLoading?c(500).then(function(){return i.isLoading?i.runWhenReady(u,f):u(f)}):i.isLoaded?u(f):i.go().then(function(){return u(f)}):Promise.resolve({status:"loading"})},i._play=function(){return n().resume().then(function(){return i.isStarted=!i.isStarted,i.isStarted?(i.cursorControl&&i.cursorControl.onStart&&typeof i.cursorControl.onStart=="function"&&i.cursorControl.onStart(),i.midiBuffer.start(),i.timer.start(i.percent),i.control&&i.control.pushPlay(!0)):i.pause(),Promise.resolve({status:"ok"})})},i.pause=function(){i.timer&&(i.timer.pause(),i.midiBuffer.pause(),i.control&&i.control.pushPlay(!1))},i.toggleLoop=function(){i.isLooping=!i.isLooping,i.control&&i.control.pushLoop(i.isLooping)},i.restart=function(){i.timer&&(i.timer.setProgress(0),i.midiBuffer.seek(0))},i.randomAccess=function(u){return i.runWhenReady(i._randomAccess,u)},i._randomAccess=function(u){var f=u.target.classList.contains("abcjs-midi-progress-indicator")?u.target.parentNode:u.target,g=(u.x-f.getBoundingClientRect().left)/f.offsetWidth;return g<0&&(g=0),g>1&&(g=1),i.seek(g),Promise.resolve({status:"ok"})},i.seek=function(u,f){i.timer&&i.midiBuffer&&(i.timer.setProgress(u,f),i.midiBuffer.seek(u,f))},i.setWarp=function(u){if(parseInt(u,10)>0){i.warp=parseInt(u,10);var f=i.isStarted,g=i.percent;return i.destroy(),i.isStarted=!1,i.go().then(function(){return i.setProgress(g,i.midiBuffer.duration*1e3),i.control&&i.control.setWarp(i.currentTempo,i.warp),f?i.play().then(function(){return i.seek(g),Promise.resolve()}):(i.seek(g),Promise.resolve())})}return Promise.resolve()},i.onWarp=function(u){var f=u.target.value;return i.setWarp(f)},i.setProgress=function(u,f){i.percent=u,i.control&&i.control.setProgress(u,f)},i.finished=function(){if(i.timer.reset(),i.isLooping)return i.timer.start(0),i.midiBuffer.finished(),i.midiBuffer.start(),"continue";i.timer.stop(),i.isStarted&&(i.control&&i.control.pushPlay(!1),i.isStarted=!1,i.midiBuffer.finished(),i.cursorControl&&i.cursorControl.onFinished&&typeof i.cursorControl.onFinished=="function"&&i.cursorControl.onFinished(),i.setProgress(0,1))},i.beatCallback=function(u,f,g,d){var p=u/f;i.setProgress(p,g),i.cursorControl&&i.cursorControl.onBeat&&typeof i.cursorControl.onBeat=="function"&&i.cursorControl.onBeat(u,f,g,d)},i.eventCallback=function(u){if(u)i.cursorControl&&i.cursorControl.onEvent&&typeof i.cursorControl.onEvent=="function"&&i.cursorControl.onEvent(u);else return i.finished()},i.lineEndCallback=function(u,f){i.cursorControl&&i.cursorControl.onLineEnd&&typeof i.cursorControl.onLineEnd=="function"&&i.cursorControl.onLineEnd(u,f)},i.getUrl=function(){return i.midiBuffer.download()},i.download=function(u){var f=i.getUrl(),g=document.createElement("a");document.body.appendChild(g),g.setAttribute("style","display: none;"),g.href=f,g.download=u||"output.wav",g.click(),window.URL.revokeObjectURL(f),document.body.removeChild(g)}}return Jn=r,Jn}var Qn,cc;function Yl(){if(cc)return Qn;cc=1;var e=Zl(),t;return(function(){function a(l,o){for(var h in o)o.hasOwnProperty(h)&&l.setAttribute(h,o[h]);return l}function n(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}n.prototype.setTempo=function(l){this.trackcount===0&&(this.startTrack(),this.track+="%00%FF%51%03"+g(Math.round(6e7/l),6),this.endTrack())},n.prototype.setGlobalInfo=function(l,o,h,s){if(this.trackcount===0){this.startTrack();var v=Math.round(6e7/l);this.track+="%00%FF%51%03"+g(v,6),h&&(this.track+=c(h)),s&&(this.track+=u(s)),o&&(this.track+=i(o,"%01")),this.endTrack()}},n.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},n.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var l=g(this.track.length/3+4,8);this.track="MTrk"+l+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},n.prototype.setText=function(l,o){switch(l){case"name":this.trackName=i(o,"%03");break}},n.prototype.setInstrument=function(l){this.trackInstrument="%00%C0"+g(l,2),this.instrument=l},n.prototype.setChannel=function(l,o){this.channel=l;var h="%00%B"+this.channel.toString(16);this.track+=h+"%79%00",this.track+=h+"%40%00",this.track+=h+"%5B%30",o||(o=0),o=Math.round((o+1)*64),this.track+=h+"%0A"+g(o,2),this.track+=h+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};var r=4096;n.prototype.startNote=function(l,o,h){if(this.track+=p(this.silencelength),this.silencelength=0,h){this.track+="%e"+this.channel.toString(16);var s=Math.round(e(h)*r);this.track+=d(8192+s),this.track+=p(0),this.noteWarped[l]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+l.toString(16)+g(o,2)},n.prototype.endNote=function(l){this.track+=p(this.silencelength),this.silencelength=0,this.noteWarped[l]&&(this.track+="%e"+this.channel.toString(16),this.track+=d(8192),this.track+=p(0),this.noteWarped[l]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+l.toString(16)+"%00"},n.prototype.addRest=function(l){this.silencelength+=l,this.silencelength<0&&(this.silencelength=0)},n.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+g(this.trackcount,4)+"%01%e0"+this.trackstrings},n.prototype.embed=function(l,o){var h=this.getData(),s=a(document.createElement("a"),{href:h});if(s.innerHTML="download midi",l.insertBefore(s,l.firstChild),!o){var v=a(document.createElement("embed"),{src:h,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});l.insertBefore(v,l.firstChild)}};function i(l,o){for(var h="",s=0;s<l.length;s++)h+=g(l.charCodeAt(s),2);return"%00%FF"+o+g(h.length/3,2)+h}function c(l){if(!l||!l.accidentals)return"";for(var o="%00%FF%59%02",h=0,s=256,v=0;v<l.accidentals.length;v++)l.accidentals[v].acc==="sharp"?h++:l.accidentals[v].acc==="flat"&&s--;var y=g(s!==256?s:h,2),m=l.mode==="m"?"%01":"%00";return o+y+m}function u(l){var o="%00%FF%58%04"+g(l.num,2),h={1:0,2:1,4:2,8:3,16:4,32:5},s=h[l.den];if(!s)return"";o+=g(s,2);var v;switch(l.num+"/"+l.den){case"2/4":case"3/4":case"4/4":case"5/4":v=24;break;case"6/4":v=72;break;case"2/2":case"3/2":case"4/2":v=48;break;case"3/8":case"6/8":case"9/8":case"12/8":v=36;break}return v?(o+=g(v,2),o+"%08"):""}function f(l){for(var o="",h=0;h<l.length;h+=2)o+="%",o+=l.substr(h,2);return o}function g(l,o){var h=l.toString(16);for(h=h.split(".")[0];h.length<o;)h="0"+h;return h.length>o&&(h=h.substring(0,o)),f(h)}function d(l){l=Math.round(l);var o=l%128,h=l-o;return g(h*2+o,4)}function p(l){var o=0,h=[];for(l=Math.round(l);l!==0;)h.push(l&127),l=l>>7;for(var s=h.length-1;s>=0;s--){o=o<<8;var v=h[s];s!==0&&(v=v|128),o=o|v}var y=o.toString(16).length;return y+=y%2,g(o,y)}t=function(){return new n}})(),Qn=t,Qn}var ea,lc;function Dv(){if(lc)return ea;lc=1;var e=Yl(),t;return(function(){var a=1920;t=function(i,c){c===void 0&&(c={});var u=i.setUpAudio(c),f=e(),g=i.metaText?i.metaText.title:void 0;g&&g.length>128&&(g=g.substring(0,124)+"...");var d=i.getKeySignature(),p=i.getMeterFraction(),l=u.tempo,o=l/60;if(p.den===8&&p.num!==5&&p.num!==7){var h=i.millisecondsPerMeasure();l=6e4/(h/p.num)/2,o=l/60}f.setGlobalInfo(l,g,d,p);for(var s=0;s<u.tracks.length;s++){f.startTrack();for(var v={},y=0;y<u.tracks[s].length;y++){var m=u.tracks[s][y];switch(m.cmd){case"text":f.setText(m.type,m.text);break;case"program":var _=0;c.pan&&c.pan.length>s&&(_=c.pan[s]),m.instrument===128?(f.setChannel(9,_),f.setInstrument(0)):(f.setChannel(m.channel,_),f.setInstrument(m.instrument));break;case"note":var k=m.gap*o,x=m.start,R=x+m.duration-k;v[x]||(v[x]=[]),v[x].push({pitch:m.pitch,volume:m.volume,cents:m.cents}),v[R]||(v[R]=[]),v[R].push({pitch:m.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+m.cmd)}}n(f,v,a),f.endTrack()}return f.getData()};function n(r,i,c){for(var u=Object.keys(i),f=0;f<u.length;f++)u[f]=parseFloat(u[f]);u.sort(function(s,v){return s-v});for(var g=0,d=0;d<u.length;d++){var p=i[u[d]];if(u[d]>g){var l=(u[d]-g)*c;r.addRest(l),g=u[d]}for(var o=0;o<p.length;o++){var h=p[o];h.volume?r.startNote(h.pitch,h.volume,h.cents):r.endNote(h.pitch)}}}})(),ea=t,ea}var ta,uc;function Fv(){if(uc)return ta;uc=1;var e=fr(),t=Dv(),a=function(i,c){var u={};if(c)for(var f in c)c.hasOwnProperty(f)&&(u[f]=c[f]);u.generateInline=!1;function g(d,p,l){var o=t(p,u);switch(u.midiOutputType){case"encoded":return o;case"binary":var h=o.replace("data:audio/midi,","");h=h.replace(/MThd/g,"%4d%54%68%64"),h=h.replace(/MTrk/g,"%4d%54%72%6b");for(var s=new ArrayBuffer(h.length/3),v=new Uint8Array(s),y=0;y<h.length/3;y++){var m=y*3+1,_=parseInt(h.substring(m,m+2),16);v[y]=_}return v;case"link":default:return r(p,u,o,l)}}return typeof i=="string"?e.renderEngine(g,"*",i,u):g(null,i,0)};function n(i){var c={};return i&&c.toString.call(i)==="[object Function]"}var r=function(i,c,u,f){var g=["abcjs-download-midi","abcjs-midi-"+f];c.downloadClass&&g.push(c.downloadClass);var d='<div class="'+g.join(" ")+'">';c.preTextDownload&&(d+=c.preTextDownload);var p=i.metaText&&i.metaText.title?i.metaText.title:"Untitled",l;c.downloadLabel&&n(c.downloadLabel)?l=c.downloadLabel(i,f):c.downloadLabel?l=c.downloadLabel.replace(/%T/,p):l='Download MIDI for "'+p+'"',p=p.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_");var o=c.fileName?c.fileName:p+".midi";return d+='<a download="'+o+'" href="'+u+'">'+l+"</a>",c.postTextDownload&&(d+=c.postTextDownload),d+"</div>"};return ta=a,ta}var ra,hc;function Wl(){if(hc)return ra;hc=1;try{if(typeof window.CustomEvent!="function"){var e=function(a,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(a,n.bubbles,n.cancelable,n.detail),r};e.prototype=window.Event.prototype,window.CustomEvent=e}}catch{}var t=function(a){this.isEditArea=!0,typeof a=="string"?(this.textarea=document.getElementById(a),this.textarea||(this.textarea=document.querySelector(a))):this.textarea=a,this.initialText=this.textarea.value,this.isDragging=!1};return t.prototype.addSelectionListener=function(a){this.textarea.onmousemove=function(n){this.isDragging&&a.fireSelectionChanged()}},t.prototype.addChangeListener=function(a){this.changelistener=a,this.textarea.onkeyup=function(){a.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,a.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,a.fireChanged()},this.textarea.onchange=function(){a.fireChanged()}},t.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},t.prototype.setSelection=function(a,n){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(a,n);else if(this.textarea.createTextRange){var r=this.textarea.createTextRange();r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",a),r.select()}this.textarea.focus()},t.prototype.getString=function(){return this.textarea.value},t.prototype.setString=function(a){this.textarea.value=a,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},t.prototype.getElem=function(){return this.textarea},ra=t,ra}var na,fc;function Hv(){if(fc)return na;fc=1;var e=nt(),t=jl(),a=pr(),n=$l(),r=Wl();function i(u){var f={},g;if(u.abcjsParams)for(g in u.abcjsParams)u.abcjsParams.hasOwnProperty(g)&&(f[g]=u.abcjsParams[g]);if(u.midi_options)for(g in u.midi_options)u.midi_options.hasOwnProperty(g)&&(f[g]=u.midi_options[g]);if(u.parser_options)for(g in u.parser_options)u.parser_options.hasOwnProperty(g)&&(f[g]=u.parser_options[g]);if(u.render_options)for(g in u.render_options)u.render_options.hasOwnProperty(g)&&(f[g]=u.render_options[g]);return f.tablature&&u.warnings_id&&(f.tablature.warnings_id=u.warnings_id),f}var c=function(u,f){this.abcjsParams=i(f),f.indicate_changed&&(this.indicate_changed=!0),typeof u=="string"?this.editarea=new r(u):u.isEditArea?this.editarea=u:this.editarea=new r(u),this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),f.canvas_id?this.div=f.canvas_id:f.paper_id?this.div=f.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),typeof this.div=="string"&&(this.div=document.getElementById(this.div)),f.selectionChangeCallback&&(this.selectionChangeCallback=f.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),f.synth&&a()&&(this.synth={el:f.synth.el,cursorControl:f.synth.cursorControl,options:f.synth.options}),f.generate_midi&&(this.generate_midi=f.generate_midi,this.abcjsParams.generateDownload&&(typeof f.midi_download_id=="string"?this.downloadMidi=document.getElementById(f.midi_download_id):f.midi_download_id&&(this.downloadMidi=f.midi_download_id)),this.abcjsParams.generateInline!==!1&&(typeof f.midi_id=="string"?this.inlineMidi=document.getElementById(f.midi_id):f.midi_id&&(this.inlineMidi=f.midi_id))),f.warnings_id?typeof f.warnings_id=="string"?this.warningsdiv=document.getElementById(f.warnings_id):this.warningsdiv=f.warnings_id:f.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=f.onchange,this.redrawCallback=f.redrawCallback,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(g,d){var p=function(l,o){var h=l.className;return h.length>0&&(h===o||new RegExp("(^|\\s)"+o+"(\\s|$)").test(h))};return p(g,d)||(g.className+=(g.className?" ":"")+d),g},this.removeClassName=function(g,d){return g.className=e.strip(g.className.replace(new RegExp("(^|\\s+)"+d+"(\\s+|$)")," ")),g},this.setReadOnly=function(g){var d="abc_textarea_readonly",p=this.editarea.getElem();g?(p.setAttribute("readonly","yes"),this.addClassName(p,d)):(p.removeAttribute("readonly"),this.removeClassName(p,d))}};return c.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var u=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(u)}if(this.synth){var f=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new t,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],f,this.synth.options)}},c.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.redrawCallback&&this.redrawCallback(!0),this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=n(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.redrawCallback&&this.redrawCallback(!1)}catch(u){console.error("ABCJS error: ",u),this.warnings||(this.warnings=[]),this.warnings.push(u.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.updateSelection(),this.bReentry=!1}},c.prototype.paramChanged=function(u){if(u)for(var f in u)u.hasOwnProperty(f)&&(this.abcjsParams[f]=u[f]);this.currentAbc="",this.fireChanged()},c.prototype.getTunes=function(){return this.tunes},c.prototype.synthParamChanged=function(u){if(this.synth){if(this.synth.options={},u)for(var f in u)u.hasOwnProperty(f)&&(this.synth.options[f]=u[f]);this.currentAbc="",this.fireChanged()}},c.prototype.parseABC=function(){var u=this.editarea.getString();return u===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=u,!0)},c.prototype.updateSelection=function(){var u=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(u.start,u.end)}catch{}this.selectionChangeCallback&&this.selectionChangeCallback(u.start,u.end)},c.prototype.fireSelectionChanged=function(){this.updateSelection()},c.prototype.setDirtyStyle=function(u){if(this.indicate_changed!==void 0){var f=function(l,o){var h=function(s,v){var y=s.className;return y.length>0&&(y===v||new RegExp("(^|\\s)"+v+"(\\s|$)").test(y))};return h(l,o)||(l.className+=(l.className?" ":"")+o),l},g=function(l,o){return l.className=e.strip(l.className.replace(new RegExp("(^|\\s+)"+o+"(\\s+|$)")," ")),l},d="abc_textarea_dirty",p=this.editarea.getElem();u?f(p,d):g(p,d)}},c.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var u=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){u.modelChanged()},300);var f=this.isDirty();this.wasDirty!==f&&(this.wasDirty=f,this.setDirtyStyle(f)),this.onchangeCallback&&this.onchangeCallback(this)}},c.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},c.prototype.isDirty=function(){return this.indicate_changed===void 0?!1:this.editarea.initialText!==this.editarea.getString()},c.prototype.highlight=function(u,f,g,d,p,l){this.editarea.setSelection(u.startChar,u.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(u.startChar,u.endChar),this.clientClickListener&&this.clientClickListener(u,f,g,d,p,l)},c.prototype.pause=function(u){this.bIsPaused=u,u||this.fireChanged()},c.prototype.millisecondsPerMeasure=function(){return!this.synth||!this.synth.synthControl||!this.synth.synthControl.visualObj?0:this.synth.synthControl.visualObj.millisecondsPerMeasure()},c.prototype.pauseMidi=function(u){this.midiPause=u,u||this.redrawMidi()},na=c,na}var aa,dc;function $v(){if(dc)return aa;dc=1;var e=ng(),t=ag(),a=fr(),n=Cl(),r=xg(),i={};i.signature="abcjs-basic v"+e,Object.keys(t).forEach(function(_){i[_]=t[_]}),Object.keys(a).forEach(function(_){i[_]=a[_]}),i.renderAbc=$l(),i.tuneMetrics=Av(),i.TimingCallbacks=Ha();var c=pt();i.setGlyph=c.setSymbol,i.strTranspose=r;var u=Qa(),f=Ka(),g=Ja(),d=Gl(),p=Ul(),l=dr(),o=zt(),h=pr(),s=Ov(),v=jl(),y=Fv(),m=Yl();return i.synth={CreateSynth:u,instrumentIndexToName:f,pitchToNoteName:g,SynthController:v,SynthSequence:d,CreateSynthControl:p,registerAudioContext:l,activeAudioContext:o,supportsAudio:h,playEvent:s,getMidiFile:y,sequence:n,midiRenderer:m},i.Editor=Hv(),i.EditArea=Wl(),aa=i,aa}var Zv=$v();const ia=rg(Zv),bt={visualObj:null,synthControl:null},Kt=document.querySelector(".main"),pc=document.getElementById("status"),gc=document.getElementById("sheet-music"),sa=document.getElementById("audio-controls");"audioSession"in navigator&&(navigator.audioSession.type="playback");function Jt(e,t=!1){pc.textContent=e,pc.classList.toggle("error",t)}async function Gv(e){try{if(Jt("Rendering..."),gc.innerHTML="",sa.innerHTML="",bt.visualObj=ia.renderAbc(gc,e,{responsive:"resize",add_classes:!0}),!bt.visualObj||bt.visualObj.length===0)throw new Error("Failed to parse music notation");if(!ia.synth.supportsAudio())throw new Error("Audio not supported in this browser");bt.synthControl=new ia.synth.SynthController,bt.synthControl.load(sa,null,{displayLoop:!0,displayPlay:!0,displayProgress:!0}),await bt.synthControl.setTune(bt.visualObj[0],!1,{}),Jt("Ready to play!")}catch(t){console.error("Render error:",t),Jt(`Error: ${t.message}`,!0),sa.innerHTML=""}}const Lt=new tg({name:"Sheet Music App",version:"1.0.0"});Lt.ontoolinput=e=>{var a;console.info("Received tool input:",e);const t=(a=e.arguments)==null?void 0:a.abcNotation;t?Gv(t):Jt("No ABC notation provided",!0)};Lt.onerror=console.error;function Vl(e){e.safeAreaInsets&&(Kt.style.paddingTop=`${e.safeAreaInsets.top}px`,Kt.style.paddingRight=`${e.safeAreaInsets.right}px`,Kt.style.paddingBottom=`${e.safeAreaInsets.bottom}px`,Kt.style.paddingLeft=`${e.safeAreaInsets.left}px`)}Lt.onhostcontextchanged=Vl;Lt.connect().then(()=>{const e=Lt.getHostContext();e&&Vl(e)});</script>
|
|
257
218
|
<style rel="stylesheet" crossorigin>.abcjs-inline-audio{height:26px;padding:0 5px;border-radius:3px;background-color:#424242;display:flex;align-items:center;box-sizing:border-box}.abcjs-inline-audio.abcjs-disabled{opacity:.5}.abcjs-inline-audio .abcjs-btn{display:block;width:28px;height:34px;margin-right:2px;padding:7px 4px;background:none!important;border:1px solid transparent;box-sizing:border-box;line-height:1}.abcjs-btn g{fill:#f4f4f4;stroke:#f4f4f4}.abcjs-inline-audio .abcjs-btn:hover g{fill:#ccc;stroke:#ccc}.abcjs-inline-audio .abcjs-midi-selection.abcjs-pushed,.abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed,.abcjs-inline-audio .abcjs-midi-reset.abcjs-pushed{border:1px solid #cccccc;background-color:#666;box-sizing:border-box}.abcjs-inline-audio .abcjs-midi-start .abcjs-pause-svg,.abcjs-inline-audio .abcjs-midi-start .abcjs-loading-svg,.abcjs-inline-audio .abcjs-midi-start.abcjs-pushed .abcjs-play-svg,.abcjs-inline-audio .abcjs-midi-start.abcjs-loading .abcjs-play-svg{display:none}.abcjs-inline-audio .abcjs-midi-start.abcjs-pushed .abcjs-pause-svg{display:block}.abcjs-inline-audio .abcjs-midi-progress-background{background-color:#424242;height:10px;border-radius:5px;border:2px solid #cccccc;margin:0 8px 0 15px;position:relative;flex:1;padding:0;box-sizing:border-box}.abcjs-inline-audio .abcjs-midi-progress-indicator{width:20px;margin-left:-10px;height:14px;background-color:#f4f4f4;position:absolute;display:inline-block;border-radius:6px;top:-4px;left:0;box-sizing:border-box}.abcjs-inline-audio .abcjs-midi-clock{margin-left:4px;margin-top:1px;margin-right:2px;display:inline-block;font-family:sans-serif;font-size:16px;box-sizing:border-box;color:#f4f4f4}.abcjs-inline-audio .abcjs-tempo-wrapper{font-size:10px;color:#f4f4f4;box-sizing:border-box;display:flex;align-items:center}.abcjs-inline-audio .abcjs-midi-tempo{border-radius:2px;border:none;margin:0 2px 0 4px;width:42px;padding-left:2px;box-sizing:border-box}.abcjs-inline-audio .abcjs-loading .abcjs-loading-svg{display:inherit}.abcjs-inline-audio .abcjs-loading{outline:none;animation-name:abcjs-spin;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}.abcjs-inline-audio .abcjs-loading-svg circle{stroke:#f4f4f4}@keyframes abcjs-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.abcjs-large .abcjs-inline-audio{height:52px}.abcjs-large .abcjs-btn{width:56px;height:52px;font-size:28px;padding:6px 8px}.abcjs-large .abcjs-midi-progress-background{height:20px;border:4px solid #cccccc}.abcjs-large .abcjs-midi-progress-indicator{height:28px;top:-8px;width:40px}.abcjs-large .abcjs-midi-clock{font-size:32px;margin-right:10px;margin-left:10px;margin-top:-1px}.abcjs-large .abcjs-midi-tempo{font-size:20px;width:50px}.abcjs-large .abcjs-tempo-wrapper{font-size:20px}.abcjs-css-warning{display:none}*{box-sizing:border-box}html,body{font-family:system-ui,-apple-system,sans-serif;font-size:1rem}code{font-size:1em}:root{--color-bg: #ffffff;--color-text: #1f2937;--color-text-muted: #6b7280;--color-primary: #2563eb;--color-success: #10b981;--color-danger: #ef4444;--color-card-bg: #f9fafb;--color-border: #e5e7eb}@media(prefers-color-scheme:dark){:root{--color-bg: #111827;--color-text: #f9fafb;--color-text-muted: #9ca3af;--color-primary: #3b82f6;--color-success: #34d399;--color-danger: #f87171;--color-card-bg: #1f2937;--color-border: #374151}}html,body{margin:0;padding:0;background:var(--color-bg);color:var(--color-text)}.main{width:100%;margin:0 auto;padding:8px;display:flex;flex-direction:column;gap:8px}#audio-controls:empty{display:none}#audio-controls:not(:empty)~#status{display:none}.audio-controls{width:100%}.audio-controls .abcjs-inline-audio{border-radius:8px}.audio-controls .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed{background-color:var(--color-success)!important;border-color:var(--color-success)!important}.status{font-size:.875rem;color:var(--color-text-muted)}.status.error{color:var(--color-danger)}.sheet-section{background:var(--color-card-bg);border-radius:8px;padding:16px;border:1px solid var(--color-border);min-height:500px}.sheet-section .sheet-music-container{width:100%;overflow-x:auto}</style>
|
|
258
219
|
</head>
|
|
259
220
|
<body>
|