deciphony-renderer 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +4 -0
- package/package.json +4 -3
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),on="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='500'%20height='80'%3e%3cline%20x1='0'%20y1='0'%20x2='500'%20y2='000'%20stroke='black'%20stroke-width='1'%3e%3c/line%3e%3cline%20x1='0'%20y1='20'%20x2='500'%20y2='20'%20stroke='black'%20stroke-width='1'%3e%3c/line%3e%3cline%20x1='0'%20y1='40'%20x2='500'%20y2='40'%20stroke='black'%20stroke-width='1'%3e%3c/line%3e%3cline%20x1='0'%20y1='60'%20x2='500'%20y2='60'%20stroke='black'%20stroke-width='1'%3e%3c/line%3e%3cline%20x1='0'%20y1='80'%20x2='500'%20y2='80'%20stroke='black'%20stroke-width='1'%3e%3c/line%3e%3c/svg%3e",rn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='500'%20height='80'%3e%3cline%20x1='0'%20y1='0'%20x2='500'%20y2='000'%20stroke='white'%20stroke-width='1'%3e%3c/line%3e%3cline%20x1='0'%20y1='80'%20x2='500'%20y2='80'%20stroke='white'%20stroke-width='1'%3e%3c/line%3e%3c/svg%3e";var ee=(e=>(e[e.MultipStaves=1]="MultipStaves",e[e.SingleStaff=2]="SingleStaff",e[e.Measure=3]="Measure",e[e.SpanSymbol=4]="SpanSymbol",e[e.MsSymbolContainer=5]="MsSymbolContainer",e[e.MsSymbol=6]="MsSymbol",e))(ee||{}),jt=(e=>(e.Line="line",e.Space="space",e))(jt||{}),Wt=(e=>(e.Lower="lower",e.Main="main",e.Upper="upper",e))(Wt||{}),$=(e=>(e[e.Treble=1]="Treble",e[e.MezzoSoprano=2]="MezzoSoprano",e[e.Alto=3]="Alto",e[e.Tenor=4]="Tenor",e[e.BaritoneF=5]="BaritoneF",e[e.BaritoneC=6]="BaritoneC",e[e.Bass=7]="Bass",e[e.Subbass=8]="Subbass",e))($||{}),Ft=(e=>(e.Cb="Cb",e.Gb="Gb",e.Db="Db",e.Ab="Ab",e.Eb="Eb",e.Bb="Bb",e.F="F",e.C="C",e.G="G",e.D="D",e.A="A",e.E="E",e.B="B",e["F#"]="F#",e["C#"]="C#",e))(Ft||{}),le=(e=>(e[e.DO=1]="DO",e[e.RE=2]="RE",e[e.MI=3]="MI",e[e.FA=4]="FA",e[e.SOL=5]="SOL",e[e.LA=6]="LA",e[e.TI=7]="TI",e))(le||{}),ye=(e=>(e.None="",e.Natural="&",e.Sharp="#",e.Flat="b",e.DoubleSharp="##",e.DoubleFlat="bb",e))(ye||{}),D=(e=>(e[e.whole=1]="whole",e[e.half=2]="half",e[e.quarter=4]="quarter",e[e.eighth=8]="eighth",e[e.sixteenth=16]="sixteenth",e[e.thirtySecond=32]="thirtySecond",e[e.sixtyFourth=64]="sixtyFourth",e))(D||{}),b=(e=>(e.NoteHead="noteHead",e.NoteStem="noteStem",e.NoteTail="noteTail",e.NoteNumber="noteNumber",e.ChronaxieReducingLine="chronaxieReducingLine",e.ChronaxieIncreasingLine="chronaxieIncreasingLine",e.NoteDot="noteDot",e.Rest="rest",e.Slur="slur",e.Tie="tie",e.DurationDot="durationDot",e.Accidental="accidental",e.Tuplet="tuplet",e.Clef="clef",e.Clef_f="clef_f",e.KeySignature="keySignature",e.TimeSignature="timeSignature",e.BarLine="barLine",e.BarLine_f="barLine_f",e))(b||{}),E=(e=>(e[e.standardStaff=1]="standardStaff",e[e.numberNotation=2]="numberNotation",e[e.rhythmNotation=3]="rhythmNotation",e[e.percussion=4]="percussion",e))(E||{}),Ce=(e=>(e[e.volta=1]="volta",e[e.slur=2]="slur",e[e.tie=3]="tie",e))(Ce||{}),Fe=(e=>(e[e.frontFixed=1]="frontFixed",e[e.rearFixed=2]="rearFixed",e[e.variable=3]="variable",e[e.span=4]="span",e))(Fe||{}),J=(e=>(e[e.single=1]="single",e[e.final=2]="final",e[e.reverseFinal=3]="reverseFinal",e[e.startRepeatSign=4]="startRepeatSign",e[e.endRepeatSign=5]="endRepeatSign",e))(J||{}),re=(e=>(e[e.normal=1]="normal",e[e.edit=2]="edit",e))(re||{}),ue=(e=>(e[e.note=1]="note",e[e.rest=2]="rest",e))(ue||{});const an=r.defineComponent({__name:"measure",props:{measure:{type:Object,required:!0},x:{type:Number,default:0},y:{type:Number,default:0},width:{type:Number,default:400},height:{type:Number,default:80},componentWidth:{type:Number,default:1e3},componentHeight:{type:Number,default:800},strokeWidth:{type:Number,default:1},musicScore:{type:Object,default:{}}},emits:["measureMouseDown"],setup(e,{emit:t}){const n=e,o=r.computed(()=>({width:"100%",display:"grid","grid-template-rows":"1fr","grid-template-columns":"1fr"})),i=r.computed(()=>{const d={width:n.width+"px",height:n.height+"px","background-color":"black",background:n.measure.options.highlight?n.measure.options.highlightColor:n.measure.options.color,pointerEvents:"none"};switch(n.musicScore.showMode){case E.standardStaff:{d.mask=`url("${on}") no-repeat center`,d["mask-size"]="100% 100%";break}case E.numberNotation:{d.mask=`url("${rn}") no-repeat center`,d["mask-size"]="100% 100%";break}}return d}),a=t;function l(d){a("measureMouseDown",d,n.measure)}return(d,u)=>(r.openBlock(),r.createElementBlock("div",{class:"measure",style:r.normalizeStyle(o.value),onMousedown:r.withModifiers(l,["self"])},[r.createElementVNode("div",{style:r.normalizeStyle(i.value)},null,4)],36))}}),X=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},sn=X(an,[["__scopeId","data-v-45ed8482"]]);var de;(function(e){e[e.MultipStaves=1]="MultipStaves",e[e.SingleStaff=2]="SingleStaff",e[e.Measure=3]="Measure",e[e.SpanSymbol=4]="SpanSymbol",e[e.MsSymbolContainer=5]="MsSymbolContainer",e[e.MsSymbol=6]="MsSymbol"})(de||(de={}));var F;(function(e){e.Line="line",e.Space="space"})(F||(F={}));var M;(function(e){e.Lower="lower",e.Main="main",e.Upper="upper"})(M||(M={}));var L;(function(e){e[e.Treble=1]="Treble",e[e.MezzoSoprano=2]="MezzoSoprano",e[e.Alto=3]="Alto",e[e.Tenor=4]="Tenor",e[e.BaritoneF=5]="BaritoneF",e[e.BaritoneC=6]="BaritoneC",e[e.Bass=7]="Bass",e[e.Subbass=8]="Subbass"})(L||(L={}));var S;(function(e){e.Cb="Cb",e.Gb="Gb",e.Db="Db",e.Ab="Ab",e.Eb="Eb",e.Bb="Bb",e.F="F",e.C="C",e.G="G",e.D="D",e.A="A",e.E="E",e.B="B",e["F#"]="F#",e["C#"]="C#"})(S||(S={}));var A;(function(e){e[e.DO=1]="DO",e[e.RE=2]="RE",e[e.MI=3]="MI",e[e.FA=4]="FA",e[e.SOL=5]="SOL",e[e.LA=6]="LA",e[e.TI=7]="TI"})(A||(A={}));var T;(function(e){e.C="C",e.D="D",e.E="E",e.F="F",e.G="G",e.A="A",e.B="B"})(T||(T={}));var f;(function(e){e.None="",e.Natural="&",e.Sharp="#",e.Flat="b",e.DoubleSharp="##",e.DoubleFlat="bb"})(f||(f={}));var ft;(function(e){e.None="",e.Single=".",e.Double="..",e.Triple="..."})(ft||(ft={}));var x;(function(e){e[e.whole=1]="whole",e[e.half=2]="half",e[e.quarter=4]="quarter",e[e.eighth=8]="eighth",e[e.sixteenth=16]="sixteenth",e[e.thirtySecond=32]="thirtySecond",e[e.sixtyFourth=64]="sixtyFourth"})(x||(x={}));var h;(function(e){e.NoteHead="noteHead",e.NoteStem="noteStem",e.NoteTail="noteTail",e.NoteNumber="noteNumber",e.ChronaxieReducingLine="chronaxieReducingLine",e.ChronaxieIncreasingLine="chronaxieIncreasingLine",e.NoteDot="noteDot",e.Rest="rest",e.Slur="slur",e.Tie="tie",e.DurationDot="durationDot",e.Accidental="accidental",e.Tuplet="tuplet",e.Clef="clef",e.Clef_f="clef_f",e.KeySignature="keySignature",e.TimeSignature="timeSignature",e.BarLine="barLine",e.BarLine_f="barLine_f"})(h||(h={}));var Ne;(function(e){e[e.standardStaff=1]="standardStaff",e[e.numberNotation=2]="numberNotation",e[e.rhythmNotation=3]="rhythmNotation",e[e.percussion=4]="percussion"})(Ne||(Ne={}));var z;(function(e){e[e.singleMeasure=1]="singleMeasure",e[e.multipleMeasure=2]="multipleMeasure"})(z||(z={}));var ht;(function(e){e[e.volta=1]="volta",e[e.slur=2]="slur",e[e.tie=3]="tie"})(ht||(ht={}));var pt;(function(e){e[e.msSymbol=1]="msSymbol",e[e.measure=2]="measure",e[e.singleStaff=3]="singleStaff",e[e.multipleStaves=4]="multipleStaves"})(pt||(pt={}));var O;(function(e){e[e.frontFixed=1]="frontFixed",e[e.rearFixed=2]="rearFixed",e[e.variable=3]="variable",e[e.span=4]="span"})(O||(O={}));var P;(function(e){e[e.single=1]="single",e[e.final=2]="final",e[e.reverseFinal=3]="reverseFinal",e[e.startRepeatSign=4]="startRepeatSign",e[e.endRepeatSign=5]="endRepeatSign"})(P||(P={}));var yt;(function(e){e[e.highlight=1]="highlight"})(yt||(yt={}));var St;(function(e){e[e.normal=1]="normal",e[e.edit=2]="edit"})(St||(St={}));var bt;(function(e){e[e.note=1]="note",e[e.rest=2]="rest"})(bt||(bt={}));var Qe;(function(e){e[e.left=1]="left"})(Qe||(Qe={}));function ln(e){return e>=x.eighth}function cn(e){return e!==x.whole}function zt(e,t){let n=f.None;if(!e.msSymbolArray)return{accidental:n,measureAccidental:f.None};const o=W(e.index,t),i=o.msSymbolContainer,a=o.measure,l=o.singleStaff,d=a==null?void 0:a.index.measureIndex,u=i==null?void 0:i.index.msSymbolContainerIndex;if(!i||!a||!l||u==null||d==null)return console.error("索引数据查找出错,获取符号的谱号失败"),{accidental:n,measureAccidental:f.None};let c=f.None;for(let s=d;s>=0;s--){const m=l.measureArray[s];if(s===d)for(let g=u;g>=0;g--){const y=m.msSymbolContainerArray[g].msSymbolArray[0];if(h.Accidental===y.type){c=y.accidental;break}}else for(let g=m.msSymbolContainerArray.length-1;g>=0;g--){const y=m.msSymbolContainerArray[g].msSymbolArray[0];if(h.Accidental===y.type){c=y.accidental;break}}}for(let s of e.msSymbolArray)if(s.type===h.Accidental)return n=s.accidental,{accidental:n,measureAccidental:c};return{accidental:n,measureAccidental:c}}function Tt(e,t){const n=W(e.index,t),o=n.msSymbolContainer,i=n.measure,a=n.singleStaff,l=i==null?void 0:i.index.measureIndex,d=o==null?void 0:o.index.msSymbolContainerIndex;if(!o||!i||!a||d==null||l==null)return console.error("索引数据查找出错,获取符号的谱号失败"),S.C;for(let u=l;u>=0;u--){const c=a.measureArray[u];if(u===l)for(let s=d;s>=0;s--){const g=c.msSymbolContainerArray[s].msSymbolArray[0];if(h.KeySignature===g.type)return g.keySignature}else for(let s=c.msSymbolContainerArray.length-1;s>=0;s--){const g=c.msSymbolContainerArray[s].msSymbolArray[0];if(h.KeySignature===g.type)return g.keySignature}}return S.C}function nt(e,t){const n=W(e.index,t),o=n.msSymbolContainer,i=n.measure,a=n.singleStaff,l=i==null?void 0:i.index.measureIndex,d=o==null?void 0:o.index.msSymbolContainerIndex;if(!o||!i||!a||d==null||l==null)return console.error("索引数据查找出错,获取符号的谱号失败"),L.Treble;for(let u=l;u>=0;u--){const c=a.measureArray[u];if(u===l)for(let s=d;s>=0;s--){const g=c.msSymbolContainerArray[s].msSymbolArray[0];if(h.Clef===g.type||h.Clef_f===g.type)return g.clef}else for(let s=c.msSymbolContainerArray.length-1;s>=0;s--){const g=c.msSymbolContainerArray[s].msSymbolArray[0];if(h.Clef===g.type||h.Clef_f===g.type)return g.clef}}return L.Treble}function un(e,{level:t="symbol",order:n="asc",callback:o}){const i=l=>n==="asc"?[...Array(l).keys()]:[...Array(l).keys()].reverse(),a=e.multipleStavesArray;for(const l of i(a.length)){const d=a[l];if(t==="multipleStaves"){if(o({multipleStavesIndex:l,singleStaffIndex:-1,measureIndex:-1,multipleStaves:d}))return;continue}for(const u of i(d.singleStaffArray.length)){const c=d.singleStaffArray[u];if(t==="singleStaff"){if(o({multipleStavesIndex:l,singleStaffIndex:u,measureIndex:-1,multipleStaves:d,singleStaff:c}))return;continue}for(const s of i(c.measureArray.length)){const m=c.measureArray[s];if(t==="measure"){if(o({multipleStavesIndex:l,singleStaffIndex:u,measureIndex:s,multipleStaves:d,singleStaff:c,measure:m}))return;continue}for(const g of i(m.msSymbolContainerArray.length)){const p=m.msSymbolContainerArray[g];if(t==="container"){if(o({multipleStavesIndex:l,singleStaffIndex:u,measureIndex:s,msSymbolContainerIndex:g,multipleStaves:d,singleStaff:c,measure:m,msSymbolContainer:p}))return;continue}for(const y of i(p.msSymbolArray.length)){const v=p.msSymbolArray[y];if(o({multipleStavesIndex:l,singleStaffIndex:u,measureIndex:s,msSymbolContainerIndex:g,msSymbolIndex:y,multipleStaves:d,singleStaff:c,measure:m,msSymbolContainer:p,msSymbol:v}))return}}}}}}function dn(e,t,n,o){if(t.multipleStavesIndex==null||e.multipleStavesIndex==null||e.measureIndex==null||t.measureIndex==null||e.singleStaffIndex==null)return console.error("索引元素有误,无法正确执行traverseMeasure");const i=e.singleStaffIndex,a=W(e,n),l=W(t,n),d=a.singleStaff;l.singleStaff;const u=a.multipleStaves,c=l.multipleStaves;if(u===c){if(d==null||u==null)return console.error("索引元素有误,无法正确执行traverseMeasure");for(let s=e.measureIndex;s<=t.measureIndex;s++){const m=d.measureArray[s];o(m,d,u)}}else for(let s=e.multipleStavesIndex;s<=t.multipleStavesIndex;s++){const m=n.multipleStavesArray[s],g=m.singleStaffArray[i];if(u===m)for(let p=e.measureIndex;p<g.measureArray.length;p++){const y=g.measureArray[p];o(y,g,m)}else if(u!==m&&c!==m)for(let p=0;p<g.measureArray.length;p++){const y=g.measureArray[p];o(y,g,m)}else if(c===m&&u!==c)for(let p=0;p<t.measureIndex;p++){const y=g.measureArray[p];o(y,g,m)}}}function mn(e){e.multipleStavesArray.forEach((t,n)=>{t.index={multipleStavesIndex:n,singleStaffIndex:-1,measureIndex:-1,msSymbolContainerIndex:-1,msSymbolIndex:-1},gn(t)})}function gn(e){const t=e.index.multipleStavesIndex;if(t==null)return console.error("数据有误,复谱表索引生成失败");e.singleStaffArray.forEach((n,o)=>{n.index={multipleStavesIndex:t,singleStaffIndex:o,measureIndex:-1,msSymbolContainerIndex:-1,msSymbolIndex:-1},Ot(n)})}function Ot(e){const t=e.index.singleStaffIndex,n=e.index.multipleStavesIndex;if(n==null||t==null)return console.error("数据有误,单谱表索引生成失败");e.measureArray.forEach((o,i)=>{o.index={multipleStavesIndex:n,singleStaffIndex:t,measureIndex:i,msSymbolContainerIndex:-1,msSymbolIndex:-1},ze(o)})}function ze(e){const t=e.index.singleStaffIndex,n=e.index.multipleStavesIndex,o=e.index.measureIndex;if(n==null||t==null||o==null)return console.error("数据有误,符号容器索引生成失败");e.msSymbolContainerArray.forEach((i,a)=>{i.index={multipleStavesIndex:n,singleStaffIndex:t,measureIndex:o,msSymbolContainerIndex:a,msSymbolIndex:-1},Xe(i)})}function Xe(e){const t=e.index.singleStaffIndex,n=e.index.multipleStavesIndex,o=e.index.measureIndex,i=e.index.msSymbolContainerIndex;if(n==null||t==null||o==null||i==null)return console.error("数据有误,符号索引生成失败");e.msSymbolArray.forEach((a,l)=>{const d={multipleStavesIndex:n,singleStaffIndex:t,measureIndex:o,msSymbolContainerIndex:i,msSymbolIndex:l};a.index=d,ot(a)})}function ot(e,t){let n=null;n=e,n.msSymbolArray.forEach((o,i)=>{o.index=n.index,o.msSymbolArray.length>0&&ot(o)})}function fn(e){const t=e.map;for(let n=0;n<e.multipleStavesArray.length;n++){const o=e.multipleStavesArray[n];t[o.id]=o;for(let i=0;i<o.singleStaffArray.length;i++){const a=o.singleStaffArray[i];t[a.id]=a;for(let l=0;l<a.measureArray.length;l++){const d=a.measureArray[l];t[d.id]=d;for(let u=0;u<d.msSymbolContainerArray.length;u++){const c=d.msSymbolContainerArray[u];t[c.id]=c;for(let s=0;s<c.msSymbolArray.length;s++){const m=c.msSymbolArray[s];t[m.id]=m}}}}}}function V(e){if(e.region===M.Main)return(e.index-1)*2+(e.type===F.Space?1:0);if(e.region===M.Lower)return-(e.index*2)+(e.type===F.Space?1:0);if(e.region===M.Upper)return 8+e.index*2+(e.type===F.Space?1:0);throw new Error("Invalid StaffRegion")}function Ke(e){if(e>=0&&e<=9){const t=e%2===0?F.Line:F.Space,n=Math.floor(e/2)+1,o=Math.floor(e/2)+1;return{region:M.Main,type:t,index:t===F.Line?n:o}}if(e<0){const t=Math.abs(e),n=t%2===0?F.Line:F.Space,o=Math.floor((t+1)/2);return{region:M.Lower,type:n,index:o}}if(e>=10){const t=e-10,n=t%2===0?F.Line:F.Space,o=Math.floor(t/2)+1;return{region:M.Upper,type:n,index:o}}throw new Error("Invalid index for StaffRegion")}function vt(e){return typeof e=="number"?e<=3?"up":"down":V(e)<=3?"up":"down"}function je(e,t){const n=t[e];if(n)return n;console.warn("此id元素不存在")}function W(e,t){const n={multipleStaves:null,singleStaff:null,measure:null,msSymbolContainer:null,msSymbol:null};if(e.multipleStavesIndex!==-1){const o=t.multipleStavesArray[e.multipleStavesIndex];if(n.multipleStaves=o,e.singleStaffIndex!==-1){const i=o.singleStaffArray[e.singleStaffIndex];if(n.singleStaff=i,e.measureIndex!==-1){const a=i.measureArray[e.measureIndex];if(n.measure=a,e.msSymbolContainerIndex!==-1){const l=a.msSymbolContainerArray[e.msSymbolContainerIndex];n.msSymbolContainer=l,e.msSymbolIndex!==-1&&(n.msSymbol=l.msSymbolArray[e.msSymbolIndex])}}}}return n}function hn(e,t){const n=new Set;return e.bindingEndId.forEach(o=>{n.add(o)}),e.bindingStartId.forEach(o=>{n.add(o)}),e.msSymbolContainerArray.forEach((o,i)=>{o.msSymbolArray.forEach((a,l)=>{a.bindingEndId.forEach(d=>{n.add(d)}),a.bindingStartId.forEach(d=>{n.add(d)})})}),n}function rt(e,t){let n=new Set;return e.measureArray.forEach(o=>{const i=hn(o);n=new Set([...n,...i])}),n}function it(e,t){t.spanSymbolArray.forEach(n=>{e.has(n.id)&&(n.vueKey=Date.now())})}function De(e,t){const n=W(e.index,t).msSymbol;return n||(console.error("获取主符号失败"),e)}function Be(e,t){const n=[];return e===-1?[]:(t.msSymbolContainerArray.forEach(o=>{o.msSymbolArray.forEach(i=>{if(i.type===h.NoteHead&&i.beamId===e){const a={beamId:i.beamId,note:i,region:i.region,chronaxie:i.chronaxie};n.push(a)}})}),n)}function Pt(e,t){e.id=t.id,e.bindingEndId=t.bindingEndId,e.bindingStartId=t.bindingStartId}function G(e={}){const t={id:Math.random()*Date.now()+1,msTypeName:de.MsSymbol,index:{multipleStavesIndex:-1,singleStaffIndex:-1,measureIndex:-1,msSymbolContainerIndex:-1,msSymbolIndex:-1},options:{highlight:!1,highlightColor:"red",color:"black"},bindingStartId:[],bindingEndId:[],msSymbolArray:[],vueKey:Math.random()*Date.now()};switch(e.type){case h.NoteHead:{const n=e.region||{region:M.Main,type:F.Line,index:1};if(!e.chronaxie||![x.whole].includes(e.chronaxie)){const o=G({type:h.NoteStem,direction:vt(V(n))});t.msSymbolArray.push(o)}if(e.chronaxie&&![x.whole,x.half,x.quarter].includes(e.chronaxie)){const o=G({type:h.NoteTail,chronaxie:e.chronaxie||x.quarter,direction:vt(n)});t.msSymbolArray.push(o)}return{...t,beamId:-1,type:h.NoteHead,region:n,chronaxie:e.chronaxie||x.quarter}}case h.NoteDot:return{...t,type:h.NoteDot,octave:e.octave??4};case h.NoteNumber:{e.chronaxie&&[x.whole,x.half].includes(e.chronaxie)&&(console.error("noteNumber的时值最大为四分音符"),e.chronaxie=x.quarter);const n={...t,type:h.NoteNumber,solmization:e.solmization||A.DO,chronaxie:e.chronaxie||x.quarter,octave:e.octave??4,beamId:-1};if(e.chronaxie&&![x.quarter].includes(e.chronaxie)){const o=G({type:h.ChronaxieReducingLine,chronaxie:e.chronaxie});t.msSymbolArray.push(o)}return n}case h.ChronaxieIncreasingLine:return{...t,type:h.ChronaxieIncreasingLine};case h.ChronaxieReducingLine:return{...t,type:h.ChronaxieReducingLine,chronaxie:e.chronaxie??x.eighth};case h.Rest:return{...t,type:h.Rest,chronaxie:e.chronaxie||x.quarter};case h.BarLine:{const n=e.barLineType??P.single;return P.endRepeatSign===n||P.startRepeatSign===n?{...t,type:h.BarLine,barLineType:n,loopCount:2}:{...t,type:h.BarLine,barLineType:n}}case h.BarLine_f:{const n=e.barLineType??P.single;return P.endRepeatSign===n||P.startRepeatSign===n?{...t,type:h.BarLine_f,barLineType:n,loopCount:2}:{...t,type:h.BarLine_f,barLineType:n}}case h.NoteStem:return{...t,direction:e.direction||"up",type:h.NoteStem};case h.NoteTail:return{...t,type:h.NoteTail,chronaxie:e.chronaxie||x.quarter,beamType:Qe.left,direction:e.direction||"up"};case h.Clef_f:return{...t,type:h.Clef_f,clef:e.clef||L.Treble};case h.Clef:return{...t,type:h.Clef,clef:e.clef||L.Treble};case h.KeySignature:return{...t,type:h.KeySignature,keySignature:e.keySignature||S.C};case h.TimeSignature:return{...t,type:h.TimeSignature,timeSignature:e.timeSignature||{beat:1,chronaxie:4}};case h.Accidental:return{...t,type:h.Accidental,accidental:e.accidental||f.Sharp};default:return console.error("type不被识别,符号模版返回noteHead"),{...t,type:h.NoteHead,region:e.region||{region:M.Main,type:F.Line,index:1},chronaxie:e.chronaxie||x.quarter,beamId:-1}}}function Te(e={}){return{id:Math.random()*Date.now()+2,msSymbolArray:[],type:e.type||O.variable,index:{multipleStavesIndex:-1,singleStaffIndex:-1,measureIndex:-1,msSymbolContainerIndex:-1,msSymbolIndex:-1},bindingStartId:[],bindingEndId:[],options:{highlight:!1,highlightColor:"red",color:"black"},vueKey:Math.random()*Date.now(),msTypeName:de.MsSymbolContainer}}function at(e,t){t.map[e.id]=e}function st(e,t){t.map[e]&&delete t.map[e]}function Se(e,t,n){t.msSymbolArray.push(e),ot(t),at(e,n)}function be(e,t,n,o="after"){if(t.msTypeName===de.MsSymbol){if(typeof o=="number"){console.error("以符号为定位元素添加符号时,position只可以传after或before");return}const l=W(t.index,n).msSymbolContainer,d=W(t.index,n).msSymbol;if(!l)return console.error("符号容器不存在,符号添加失败");if(!d)return console.error("符号不存在,符号添加失败");const u=l.msSymbolArray,c=u.findIndex(s=>s===d);o==="before"?u.splice(c,0,e):u.splice(c+1,0,e),Xe(l)}else if(t.msTypeName===de.MsSymbolContainer){const l=t;if(!l)return console.error("小节不存在,符号容器添加失败");const d=l.msSymbolArray;if(o===-1||typeof o=="string")d.push(e);else if(o>=0&&o<=d.length)d.splice(o,0,e);else{console.error("索引有误,符号添加失败");return}Xe(l)}if(at(e,n),!("index"in t))return console.error("当前选中对象缺少index,符号添加失败");const i=W(t.index,n).singleStaff;if(!i)return console.error("单谱表查找出错,符号添加失败");Ot(i);const a=rt(i);it(a,n)}function ce(e,t,n,o="after"){if(t.msTypeName===de.MsSymbolContainer){if(typeof o=="number"){console.error("以符号容器为定位元素添加符号容器时,position只可以传after或before");return}const i=W(t.index,n).measure,a=W(t.index,n).msSymbolContainer;if(!i)return console.error("小节不存在,符号容器添加失败");if(!a)return console.error("符号容器不存在,符号容器添加失败");const l=i.msSymbolContainerArray,d=l.findIndex(u=>u===a);o==="before"?l.splice(d,0,e):l.splice(d+1,0,e),ze(i)}else if(t.msTypeName===de.Measure){const i=t;if(!i)return console.error("小节不存在,符号容器添加失败");const a=i.msSymbolContainerArray;if(o===-1||typeof o=="string")a.push(e);else if(o>=0&&o<=a.length)a.splice(o,0,e);else{console.error("索引有误,符号容器添加失败");return}ze(i)}at(e,n)}function pn(e,t){const n=W(e.index,t),o=n.measure,i=n.singleStaff;if(!o||!i)return console.error("索引数据出错,符号容器移除失败");const a=o.msSymbolContainerArray,l=a.findIndex(u=>u===e);if(l===-1)return console.error("找不到目标符号容器");a.splice(l,1),st(e.id,t),ze(o),Sn(e,t);const d=rt(i);it(d,t)}function yn(e,t){for(let n=t.spanSymbolArray.length-1;n>=0;n--){const o=t.spanSymbolArray[n];(e.bindingStartId.includes(o.id)||e.bindingEndId.includes(o.id))&&(Gt(o,t),st(o.id,t))}}function Sn(e,t){e.msSymbolArray.forEach(n=>{yn(n,t)});for(let n=t.spanSymbolArray.length-1;n>=0;n--){const o=t.spanSymbolArray[n];(e.bindingStartId.includes(o.id)||e.bindingEndId.includes(o.id))&&(Gt(o,t),st(o.id,t))}}function Gt(e,t){const n=t.spanSymbolArray.indexOf(e),o=e.startTargetId,i=e.endTargetId;t.spanSymbolArray.splice(n,1);const a=e.id,l=t.map[o];l&&"bindingStartId"in l&&l.bindingStartId.indexOf(a)!==-1&&l.bindingStartId.splice(n,1);const d=t.map[i];d&&"bindingEndId"in d&&d.bindingEndId.indexOf(a)!==-1&&d.bindingEndId.splice(n,1)}function Je(e,t){t.direction=e,t.vueKey=Math.random()*Date.now()}function _e(e,t){t.direction=e,t.vueKey=Math.random()*Date.now()}function bn(e,t,n){const o=[];let i="up",a=4,l=!1;for(const d in t.msSymbolContainerArray){const u=t.msSymbolContainerArray[d];for(const c in u.msSymbolArray){const s=u.msSymbolArray[c];if(s.type===h.NoteHead&&![x.whole,x.half,x.quarter].includes(s.chronaxie)){const m=Math.abs(V(s.region)-4),g=Math.abs(a-4);m>g&&(a=V(s.region));const p=s.msSymbolArray.find(v=>v.type===h.NoteStem),y=s.msSymbolArray.find(v=>v.type===h.NoteTail);y&&p&&s.beamId===e&&(o.push({noteStem:p,noteTail:y}),l=!0)}else if(l)break}}i=a>=3?"down":"up";for(const d in o){const u=o[d].noteStem,c=o[d].noteTail;Je(i,u),_e(i,c)}}T.C,f.None,T.C,f.Sharp,T.D,f.None,T.D,f.Sharp,T.E,f.None,T.F,f.None,T.F,f.Sharp,T.G,f.None,T.G,f.Sharp,T.A,f.None,T.A,f.Sharp,T.B,f.None;const vn={[S.Cb]:59,[S.Gb]:66,[S.Db]:61,[S.Ab]:68,[S.Eb]:63,[S.Bb]:70,[S.F]:65,[S.C]:60,[S.G]:67,[S.D]:62,[S.A]:69,[S.E]:64,[S.B]:71,"F#":66,"C#":61};function xn(e,t,n,o){const i=vn[n];let l={[A.DO]:0,[A.RE]:2,[A.MI]:4,[A.FA]:5,[A.SOL]:7,[A.LA]:9,[A.TI]:11}[e];switch(t){case f.Sharp:l+=1;break;case f.Flat:l-=1;break;case f.DoubleSharp:l+=2;break;case f.DoubleFlat:l-=2;break;case f.None:break}return i+(o-4)*12+l}f.Natural,f.Sharp,f.Flat;f.Natural,f.Flat,f.Sharp;function wn(e,t,n=f.Sharp){const o=["C","D","E","F","G","A","B"],i={0:["C",f.None],1:["C",f.Sharp],2:["D",f.None],3:["D",f.Sharp],4:["E",f.None],5:["F",f.None],6:["F",f.Sharp],7:["G",f.None],8:["G",f.Sharp],9:["A",f.None],10:["A",f.Sharp],11:["B",f.None]},a={0:["C",f.None],1:["D",f.Flat],2:["D",f.None],3:["E",f.Flat],4:["E",f.None],5:["F",f.None],6:["G",f.Flat],7:["G",f.None],8:["A",f.Flat],9:["A",f.None],10:["B",f.Flat],11:["B",f.None]},l=n===f.Sharp?i:a,d=(e%12+12)%12,[u,c]=l[d],s=Math.floor(e/12)-1,m=o.indexOf(u),g=s*7+m;function p(H,Q){const ie=o.indexOf(H);return Q*7+ie}const y={[L.Treble]:{diatonic:p("G",4),staffStep:2},[L.MezzoSoprano]:{diatonic:p("C",4),staffStep:2},[L.Alto]:{diatonic:p("C",4),staffStep:4},[L.Tenor]:{diatonic:p("C",4),staffStep:6},[L.BaritoneF]:{diatonic:p("F",3),staffStep:4},[L.BaritoneC]:{diatonic:p("C",4),staffStep:8},[L.Bass]:{diatonic:p("F",3),staffStep:6},[L.Subbass]:{diatonic:p("F",2),staffStep:6}},v=y[t]??y[L.Treble],k=g-v.diatonic+v.staffStep;let w,N,C;if(k>=0&&k<=8)w=M.Main,k%2===0?(N=F.Line,C=Math.floor(k/2)+1):(N=F.Space,C=Math.floor((k+1)/2));else if(k<0){w=M.Lower;const H=-k;H%2===1?(N=F.Space,C=Math.floor((H+1)/2)):(N=F.Line,C=H/2)}else{w=M.Upper;const H=k-8;H%2===1?(N=F.Space,C=Math.floor((H+1)/2)):(N=F.Line,C=H/2)}return{staffRegion:{region:w,type:N,index:C},accidental:c}}const In={[L.Treble]:{[M.Main]:64,[M.Upper]:79,[M.Lower]:62},[L.MezzoSoprano]:{[M.Main]:57,[M.Upper]:72,[M.Lower]:55},[L.Alto]:{[M.Main]:53,[M.Upper]:69,[M.Lower]:52},[L.Tenor]:{[M.Main]:50,[M.Upper]:65,[M.Lower]:48},[L.BaritoneF]:{[M.Main]:47,[M.Upper]:62,[M.Lower]:45},[L.BaritoneC]:{[M.Main]:53,[M.Upper]:62,[M.Lower]:52},[L.Bass]:{[M.Main]:43,[M.Upper]:60,[M.Lower]:41},[L.Subbass]:{[M.Main]:28,[M.Upper]:43,[M.Lower]:26}},Mn=[2,2,1,2,2,2,1],Cn={0:0,2:1,4:2,5:3,7:4,9:5,11:6};function kn(e,t){return t=(t%e.length+e.length)%e.length,e.slice(t).concat(e.slice(0,t))}function An(e,t,n){const o=In[n];if(!o||typeof o[M.Main]!="number")throw new Error(`No clef mapping for clef ${n}. please add clefMidiMap entry.`);const i=o[M.Main],{region:a,type:l,index:d}=e;if(d<1)throw new Error("StaffRegion.index should be >= 1");let u;if(a===M.Main)u=(d-1)*2+(l===F.Space?1:0);else if(a===M.Upper)u=8+(d-1)*2+(l===F.Space?1:2);else if(a===M.Lower)u=-((d-1)*2+(l===F.Space?1:2));else throw new Error("Unknown StaffRegionEnum: "+a);const c=(i%12+12)%12;let s=Cn[c];s===void 0&&(s=0);const m=kn(Mn,s);let g=0;if(u>0)for(let y=0;y<u;y++)g+=m[y%m.length];else if(u<0){const y=Math.abs(u);for(let v=0;v<y;v++)(m.length-1-v)%m.length,g-=m[(m.length-1-v%7)%m.length]}let p=0;switch(t){case f.Sharp:p=1;break;case f.Flat:p=-1;break;case f.DoubleSharp:p=2;break;case f.DoubleFlat:p=-2;break;default:p=0}return i+g+p}f.Natural,f.Sharp,f.Flat;f.Natural,f.Flat,f.Sharp;const Nn={[S.Cb]:59,[S.Gb]:66,[S.Db]:61,[S.Ab]:68,[S.Eb]:63,[S.Bb]:70,[S.F]:65,[S.C]:60,[S.G]:67,[S.D]:62,[S.A]:69,[S.E]:64,[S.B]:71,"F#":66,"C#":61},Ln={0:{sharp:{solmization:A.DO,accidental:f.None},flat:{solmization:A.DO,accidental:f.None}},1:{sharp:{solmization:A.DO,accidental:f.Sharp},flat:{solmization:A.RE,accidental:f.Flat}},2:{sharp:{solmization:A.RE,accidental:f.None},flat:{solmization:A.RE,accidental:f.None}},3:{sharp:{solmization:A.RE,accidental:f.Sharp},flat:{solmization:A.MI,accidental:f.Flat}},4:{sharp:{solmization:A.MI,accidental:f.None},flat:{solmization:A.MI,accidental:f.None}},5:{sharp:{solmization:A.FA,accidental:f.None},flat:{solmization:A.FA,accidental:f.None}},6:{sharp:{solmization:A.FA,accidental:f.Sharp},flat:{solmization:A.SOL,accidental:f.Flat}},7:{sharp:{solmization:A.SOL,accidental:f.None},flat:{solmization:A.SOL,accidental:f.None}},8:{sharp:{solmization:A.SOL,accidental:f.Sharp},flat:{solmization:A.LA,accidental:f.Flat}},9:{sharp:{solmization:A.LA,accidental:f.None},flat:{solmization:A.LA,accidental:f.None}},10:{sharp:{solmization:A.LA,accidental:f.Sharp},flat:{solmization:A.TI,accidental:f.Flat}},11:{sharp:{solmization:A.TI,accidental:f.None},flat:{solmization:A.TI,accidental:f.None}}};function Dn(e,t,n=f.Sharp){const o=Nn[t],i=e-o,a=(i%12+12)%12,l=Math.floor(i/12)+4,d=Ln[a],u=n===f.Sharp?d.sharp:d.flat;return{solmization:u.solmization,accidental:u.accidental,octave:l}}function Bn(e){e.showMode=Ne.numberNotation;for(let t=0;t<e.multipleStavesArray.length;t++){const n=e.multipleStavesArray[t];for(let o=0;o<n.singleStaffArray.length;o++){const i=n.singleStaffArray[o];for(let a=0;a<i.measureArray.length;a++){const l=i.measureArray[a];for(let d=0;d<l.msSymbolContainerArray.length;d++){const u=l.msSymbolContainerArray[d];for(let c=0;c<u.msSymbolArray.length;c++){const s=u.msSymbolArray[c];if(s.type===h.NoteHead){const m=G({type:h.NoteNumber,chronaxie:x.quarter});Pt(m,s);const{accidental:g,measureAccidental:p}=zt(s,e);let y=g;p&&y===f.Natural&&(y=p);const v=nt(s,e),k=Tt(s,e),w=An(s.region,y,v),N=Dn(w,k);if(m.solmization=N.solmization,m.octave=N.octave,m.msSymbolArray=[],[x.whole,x.half,x.quarter].includes(s.chronaxie)||(m.chronaxie=s.chronaxie),u.msSymbolArray.splice(c,1),be(m,u,e,c),N.octave!==4){const C=G({type:h.NoteDot,octave:N.octave});Se(C,m,e)}if(![x.whole,x.half,x.quarter].includes(m.chronaxie)){const C=G({type:h.ChronaxieReducingLine,chronaxie:m.chronaxie});Se(C,m,e)}if(N.accidental){const C=G({type:h.Accidental,accidental:N.accidental});Se(C,m,e)}}if(s.type===h.NoteHead){if(s.chronaxie===x.whole){for(let m=0;m<3;m++){const g=G({type:h.ChronaxieIncreasingLine}),p=Te({type:O.variable});ce(p,u,e,"after"),be(g,p,e,"after")}d+=3}else if(s.chronaxie===x.half){const m=G({type:h.ChronaxieIncreasingLine}),g=Te({type:O.variable});ce(g,u,e,"after"),be(m,g,e,"after"),d+=1}}}}}}}}function Hn(e){var t;for(let n=0;n<e.multipleStavesArray.length;n++){const o=e.multipleStavesArray[n];for(let i=0;i<o.singleStaffArray.length;i++){const a=o.singleStaffArray[i];for(let l=0;l<a.measureArray.length;l++){const d=a.measureArray[l];for(let u=0;u<d.msSymbolContainerArray.length;u++){const c=d.msSymbolContainerArray[u];for(let s=0;s<c.msSymbolArray.length;s++){const m=c.msSymbolArray[s];if(m.type===h.ChronaxieIncreasingLine){pn(c,e),u--;continue}if(m.type===h.NoteNumber){const g=G({type:h.NoteHead});Pt(g,m);const{accidental:p,measureAccidental:y}=zt(m,e);let v=p;y&&v===f.Natural&&(v=y);const k=nt(m,e),w=Tt(m,e),N=xn(m.solmization,v,w,m.octave),C=wn(N,k);if(g.region=C.staffRegion,g.vueKey=Date.now(),g.msSymbolArray=[],m.chronaxie===x.quarter){let B=0;for(let H=u+1;H<d.msSymbolContainerArray.length&&((t=d.msSymbolContainerArray[H])==null?void 0:t.msSymbolArray[0]).type===h.ChronaxieIncreasingLine;H++)B++;B===0?g.chronaxie=x.quarter:B===1?g.chronaxie=x.half:B===3&&(g.chronaxie=x.whole)}else g.chronaxie=m.chronaxie;if(c.msSymbolArray.splice(s,1),be(g,c,e,s),C.accidental){const B=G({type:h.Accidental,accidental:C.accidental});Se(B,g,e)}if(cn(g.chronaxie)){const B=G({type:h.NoteStem});B.index=g.index,Se(B,g,e)}if(ln(g.chronaxie)){const B=G({type:h.NoteTail,chronaxie:g.chronaxie});Se(B,g,e)}}}}}}}e.showMode=Ne.standardStaff}L.Treble+"",L.MezzoSoprano+"",L.Alto+"",L.Tenor+"",L.BaritoneF+"",L.BaritoneC+"",L.Bass+"",L.Subbass+"";f.Natural,f.Sharp,f.Flat;f.Natural,f.Flat,f.Sharp;T.C+"",T.D+"",T.E+"",T.F+"",T.G+"",T.A+"",T.B+"";f.None+"",f.Sharp+"",f.Flat+"",f.DoubleFlat+"",f.DoubleSharp+"";const Rn={[S.Cb]:11,[S.Gb]:6,[S.Db]:1,[S.Ab]:8,[S.Eb]:3,[S.Bb]:10,[S.F]:5,[S.C]:0,[S.G]:7,[S.D]:2,[S.A]:9,[S.E]:4,[S.B]:11,[S["F#"]]:6,[S["C#"]]:1},q={[h.NoteHead]:{containerType:O.variable,aspectRatio:1,widthRatioConstant:1,category:z.singleMeasure,heightMultiplier:.25,space:{top:0,bottom:0,left:0,right:0}},[h.NoteNumber]:{containerType:O.variable,aspectRatio:1,widthRatioConstant:1,category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.NoteDot]:{aspectRatio:{0:1/.7,1:1/.5,2:1/.3,3:1/.1,5:1/.1,6:1/.3,7:1/.5,8:1/.7},category:z.singleMeasure,widthRatioConstant:0,heightMultiplier:{0:.7,1:.5,2:.3,3:.1,5:.1,6:.3,7:.5,8:.7},space:{top:.1,bottom:.1,left:0,right:0}},[h.ChronaxieIncreasingLine]:{containerType:O.variable,aspectRatio:5,widthRatioConstant:1,category:z.singleMeasure,heightMultiplier:.1,space:{top:0,bottom:0,left:0,right:0}},[h.ChronaxieReducingLine]:{aspectRatio:{[x.eighth]:1/.1,[x.sixteenth]:1/.15,[x.thirtySecond]:1/.2,[x.sixtyFourth]:1/.25},category:z.singleMeasure,widthRatioConstant:0,heightMultiplier:{[x.eighth]:.1,[x.sixteenth]:.15,[x.thirtySecond]:.2,[x.sixtyFourth]:.25},space:{top:0,bottom:.1,left:0,right:0}},[h.NoteStem]:{aspectRatio:.05,category:z.singleMeasure,widthRatioConstant:0,heightMultiplier:.75,space:{top:0,bottom:0,left:0,right:0}},[h.NoteTail]:{aspectRatio:{[x.eighth]:.5,[x.sixteenth]:.5},category:z.singleMeasure,widthRatioConstant:0,heightMultiplier:.5,space:{top:0,bottom:0,left:0,right:0}},[h.Rest]:{containerType:O.variable,aspectRatio:.25,widthRatioConstant:1,category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.Slur]:{category:z.multipleMeasure,space:{top:0,bottom:0,left:0,right:0}},[h.Tie]:{category:z.multipleMeasure,space:{top:0,bottom:0,left:0,right:0}},[h.DurationDot]:{aspectRatio:1,category:z.singleMeasure,widthRatioConstant:.5,heightMultiplier:.1,space:{top:0,bottom:0,left:0,right:0}},[h.Accidental]:{aspectRatio:1,category:z.singleMeasure,widthRatioConstant:.5,heightMultiplier:.4,space:{top:0,bottom:0,left:0,right:0}},[h.Tuplet]:{category:z.multipleMeasure,space:{top:0,bottom:0,left:0,right:0}},[h.Clef]:{containerType:O.rearFixed,aspectRatio:.6,category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.Clef_f]:{containerType:O.frontFixed,aspectRatio:.6,category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.TimeSignature]:{containerType:O.frontFixed,aspectRatio:.6,category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.KeySignature]:{containerType:O.frontFixed,aspectRatio:{[S.Cb]:.4*7,[S.Gb]:.4*6,[S.Db]:.4*5,[S.Ab]:.4*4,[S.Eb]:.4*3,[S.Bb]:.4*2,[S.F]:.4,[S.C]:0,[S.G]:.4,[S.D]:.4*2,[S.A]:.4*3,[S.E]:.4*4,[S.B]:.4*5,[S["F#"]]:.4*6,[S["C#"]]:.4*7},category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.BarLine]:{containerType:O.rearFixed,aspectRatio:{[P.single]:1/50,[P.final]:2/5,[P.reverseFinal]:2/5,[P.startRepeatSign]:3/5,[P.endRepeatSign]:3/5},category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.BarLine_f]:{containerType:O.frontFixed,aspectRatio:{[P.single]:1/400,[P.final]:2/5,[P.reverseFinal]:2/5,[P.startRepeatSign]:3/5,[P.endRepeatSign]:3/5},category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}}};function qt(e){let t=0;const n=q[e.type];if("widthRatioConstant"in n&&(t+=n.widthRatioConstant),e.msSymbolArray)for(let o=0;o<e.msSymbolArray.length;o++){const i=e.msSymbolArray[o],a=q[i.type];"widthRatioConstant"in a&&(t+=a.widthRatioConstant)}return t}function lt(e){let t=0;if(e.msSymbolArray)for(let n=0;n<e.msSymbolArray.length;n++){const o=e.msSymbolArray[n],i=qt(o);t<i&&(t=i)}return t}function me(e,t){let n=0;for(let o=0;o<e.msSymbolContainerArray.length;o++){const i=e.msSymbolContainerArray[o];if(t&&i===t)return n;n+=lt(i)}return n===0?1:n}function Vt(e,t,n){let o=0;for(let i=0;i<e.measureArray.length;i++){const a=e.measureArray[i];o+=me(a,n)}return o}const jn=Object.freeze(Object.defineProperty({__proto__:null,getWidthConstantInMeasure:me,getWidthConstantInMsSymbol:qt,getWidthConstantInMsSymbolContainer:lt,getWidthConstantInSingleStaff:Vt},Symbol.toStringTag,{value:"Module"}));function Wn(e){const t=q[e.type];if("aspectRatio"in t&&typeof t.aspectRatio=="object"){if(e.type===b.KeySignature)return t.aspectRatio[e.keySignature];if(e.type===b.BarLine||e.type===b.BarLine_f)return t.aspectRatio[e.barLineType];if(e.type===b.NoteTail)return t.aspectRatio[e.chronaxie];if(e.type===b.NoteDot)return t.aspectRatio[e.octave];if(e.type===b.ChronaxieReducingLine)return t.aspectRatio[e.chronaxie]}return console.error("符号有误或符号不是复合aspectRatio类型"),0}function fe(e){if(!(e!=null&&e.type))return console.error("缺少符号传参,宽高比获取失败"),1;const t=q[e.type];return"aspectRatio"in t&&typeof t.aspectRatio=="number"?t.aspectRatio:"aspectRatio"in t&&typeof t.aspectRatio=="object"?Wn(e):(console.error("未找到符号对应宽高比"),1)}function Fn(e){const t=q[e.type];if("heightMultiplier"in t&&typeof t.heightMultiplier=="object"){if(e.type===b.ChronaxieReducingLine)return t.heightMultiplier[e.chronaxie];if(e.type===b.NoteDot)return t.heightMultiplier[e.octave]}return console.error("符号有误或符号不是复合heightMultiplier类型"),0}function Ge(e){if(!(e!=null&&e.type))return console.error("缺少符号传参,高度乘数获取失败"),1;const t=q[e.type];return"heightMultiplier"in t&&typeof t.heightMultiplier=="number"?t.heightMultiplier:"heightMultiplier"in t&&typeof t.heightMultiplier=="object"?Fn(e):1}function ke(e,t){const n=q[e.type],o=t.measureHeight;return{top:n.space.top*o,bottom:n.space.bottom*o,left:n.space.left*o,right:n.space.right*o}}const zn=Object.freeze(Object.defineProperty({__proto__:null,getHeightMultiplier:Ge,getMsSymbolAspectRatio:fe,getSpace:ke},Symbol.toStringTag,{value:"Module"}));function ct(e,t){return t*((V(e)-1)*2)/16}function ut(e,t){const n=W(e.index,t).msSymbol,o=t.measureHeight;switch(e==null?void 0:e.type){case h.NoteStem:return e.direction==="up"?o/8:-Z(e,t)+o/8;case h.NoteTail:{te(e,t);const i=n==null?void 0:n.msSymbolArray.find(u=>u.type===h.NoteStem);if(!i)return console.error("找不到符杠,符尾bottom计算失败"),0;const a=o*1/8,l=Z(e,t),d=Z(i,t);return e.direction==="up"?d-l+a:-d+a}case h.NoteDot:{q[h.NoteDot];const i=ke(e,t).bottom,a=ke(e,t).top,l=De(e,t);let d=0;const u=l.msSymbolArray.find(s=>s.type===h.ChronaxieReducingLine);let c=0;return u&&(c=ke(u,t).bottom,d=Z(u,t)),[0,1,2,3].includes(e.octave)?-Z(e,t)-i-d-c:[5,6,7,8].includes(e.octave)?o+a:0}case h.ChronaxieIncreasingLine:{const l=q[h.ChronaxieIncreasingLine].heightMultiplier*o;return o/2-l/2}case h.ChronaxieReducingLine:{q[h.ChronaxieReducingLine];const i=Ge(e),a=ke(e,t).bottom;return-(i*o)-a}default:return 0}}function te(e,t){var i;if(!e)return 0;const n=t.measureHeight,o=(i=W(e.index,t))==null?void 0:i.msSymbol;switch(o.type){case h.NoteHead:{if(!o||t.showMode===Ne.numberNotation)return 0;const a=o.region;return ct(a,n)}default:return 0}}function Ut(e,t,n=!0){let o=0;t.measureHeight;for(let i of e.msSymbolArray){const a=te(i,t),l=Z(i,t),d=a+l;n?o=Math.max(d,o):o=Math.max(a,o)}return o}function $t(e,t){let n=1e4;for(let o of e.msSymbolArray){const i=te(o,t);n=Math.min(i,n)}return n}function Oe(e,t,n=!0){let o=0;for(let i of e.msSymbolContainerArray){const a=Ut(i,t,n);o=Math.max(a,o)}return o}function Zt(e,t){let n=1e4;for(let o of e.msSymbolContainerArray){const i=$t(o,t);n=Math.min(i,n)}return n}function Tn(e,t,n=!0){let o=0;for(let i of e.measureArray){const a=Oe(i,t,n);o=Math.max(a,o)}return o}function On(e,t){let n=1e4;for(let o of e.measureArray){const i=Zt(o,t);n=Math.min(i,n)}return n}function Ye(e,t,n){let o=0;return un(t,{level:"multipleStaves",order:"asc",callback:({multipleStaves:i})=>{if(!i)return!0;o+=i.multipleStavesPaddingTop;for(let a of i.singleStaffArray){o+=a.singleStaffPaddingTop+t.measureHeight;for(let l of a.measureArray)if(l===e)return!0;o+=a.singleStaffPaddingBottom+a.singleStaffMarginBottom}return o+=i.multipleStavesPaddingBottom+i.multipleStavesMarginBottom,!1}}),n-o}const Pn=Object.freeze(Object.defineProperty({__proto__:null,getMaxMsSymbolBottomInMeasure:Oe,getMaxMsSymbolBottomInMsSymbolContainer:Ut,getMaxMsSymbolBottomInSingleStaff:Tn,getMeasureBottomToMusicScore:Ye,getMinMsSymbolBottomInMeasure:Zt,getMinMsSymbolBottomInMsSymbolContainer:$t,getMinMsSymbolBottomInSingleStaff:On,getMsSymbolBottomToSlot:ut,getSlotBottomToMeasure:te,staffRegionToBottom:ct},Symbol.toStringTag,{value:"Module"}));function Qt(e,t){const n=W(e.index,t).msSymbol,o=q[e==null?void 0:e.type],i=t.measureHeight;let a=0;if("heightMultiplier"in o){const c=o.heightMultiplier;a=i*c}const l=i*1/8,d=W(n.index,t).measure;if(!d)return console.error("索引找不到measure,符杠height计算失败"),0;const u=Be(n.beamId,d);if(n.beamId===-1||!u||u.length===0){const c=te(e,t);return e.direction==="up"?Math.max(a,Math.abs(c)+a-l):Math.max(a,Math.abs(c)-i+a+l)}else{const c=te(e,t);if(e.direction==="up"){const s=u.reduce((g,p)=>{const y=g,v=p.note;return V(y.region)<V(v.region)?p.note:g},u[0].note),m=te(s,t);return V(s.region)>0?s===n?a:-c+m+a:-c-l+a}else{const s=u.reduce((g,p)=>{const y=g,v=p.note;return V(y.region)>V(v.region)?v:g},u[0].note),m=te(s,t);return V(s.region)<8?s===n?a:c-m+a:c-i+l+a}}}function Z(e,t){q[e==null?void 0:e.type];const n=t.measureHeight,o=Ge(e);switch(e.type){case b.NoteStem:return Qt(e,t);default:return n*o}}const Gn=Object.freeze(Object.defineProperty({__proto__:null,getMsSymbolHeight:Z,getNoteStemHeight:Qt},Symbol.toStringTag,{value:"Module"}));function Ae(e,t){let n=0;for(let o=0;o<e.msSymbolArray.length;o++){const i=e.msSymbolArray[o],a=q[i.type];let l=0;"aspectRatio"in a&&typeof a.aspectRatio=="number"?l+=a.aspectRatio*t:"aspectRatio"in a&&typeof a.aspectRatio=="object"?i.type===h.KeySignature?l+=a.aspectRatio[i.keySignature]*t:(i.type===h.BarLine||i.type===h.BarLine_f)&&(l+=a.aspectRatio[i.barLineType]*t):console.error("符号的svg宽高比不存在"),n<l&&(n=l)}return n}function ne(e,t,n,o,i){const a=o.measureHeight;if(!e||!t)return console.error("缺少必要的参数,坐标计算出错"),0;let l=0;const d=e.type;if([O.frontFixed,O.rearFixed].includes(d))l=Ae(e,a);else{const u=_(t,a),c=me(t),s=lt(e);l=(ge(t,n,o,i)-u)/c*s}return l}function ge(e,t,n,o){const i=Vt(t,n.showMode),a=me(e),l=Xt(t,n.measureHeight,n.showMode),d=_(e,n.measureHeight),u=t.measureArray.length,c=o-l,s=c/i*n.widthDynamicRatio,m=c*(1-n.widthDynamicRatio)/u;return s*a+d+m}function _(e,t,n="all",o){let i=0;for(let a=0;a<e.msSymbolContainerArray.length;a++){const l=e.msSymbolContainerArray[a];if(o&&o===l)return i;const d=l.type;(n==="all"&&[O.frontFixed,O.rearFixed].includes(d)||n==="front"&&[O.frontFixed].includes(d)||n==="rear"&&[O.rearFixed].includes(d))&&(i+=Ae(l,t))}return i}function Xt(e,t,n,o="all",i){let a=0;return e.measureArray.forEach(l=>{a+=_(l,t,o,i)}),a}function dt(e,t,n,o,i,a,l){const d=fe(e),u=Z(e,a),c=Be(t.beamId,o);return c.length>1?t.id===c[0].note.id||t.id===c[c.length-1].note.id?ne(n,o,i,a,l)/2:ne(n,o,i,a,l):u*d}function ve(e,t,n,o,i,a){const l=i.measureHeight,d=fe(e),u=Ge(e),c=Z(e,i);switch(e==null?void 0:e.type){case h.NoteStem:return l*u*d;case h.NoteTail:{const s=W(e.index,i).msSymbol;return s?dt(e,s,t,n,o,i,a):(console.error("音符头索引失败,符尾宽度计算失败"),c*d)}default:return c*d}}function Le(e,t,n=!1){const o=n?e:De(e,t),i=fe(o);return Z(o,t)*i}const qn=Object.freeze(Object.defineProperty({__proto__:null,getMeasureWidth:ge,getMsSymbolContainerWidth:ne,getMsSymbolSlotWidth:Le,getMsSymbolWidth:ve,getNoteTailWidth:dt,getWidthFixedContainerWidth:Ae,getWidthFixedContainerWidthSumInMeasure:_,getWidthFixedContainerWidthSumInSingleStaff:Xt},Symbol.toStringTag,{value:"Module"})),Vn=["onMousedown"],Un=["onMousedown"],$n=r.defineComponent({__name:"measureContainer",props:{musicScore:{type:Object,default:{}},disabled:{type:Boolean,default:!0},width:{type:Number,default:1e3},height:{type:Number,default:800}},emits:["singleStaffMouseDown","multipleStavesMouseDown"],setup(e,{emit:t}){const n=e,o=t,i=r.computed(()=>u=>({"grid-template-rows":`repeat(${u.singleStaffArray.length},1fr)`,"padding-top":u.multipleStavesPaddingTop+"px","padding-bottom":u.multipleStavesPaddingBottom+"px","margin-bottom":u.multipleStavesMarginBottom+"px","pointer-events":n.disabled?"none":"auto",outline:"1px solid "+(u.options.highlight?u.options.highlightColor:u.options.color)})),a=r.computed(()=>(u,c)=>({"grid-template-columns":`repeat(${u.measureArray.length},1fr)`,"padding-top":u.singleStaffPaddingTop+"px","padding-bottom":u.singleStaffPaddingBottom+"px","margin-bottom":u.singleStaffMarginBottom+"px","pointer-events":n.disabled?"none":"auto",outline:"1px solid "+(u.options.highlight?u.options.highlightColor:u.options.color)})),l=r.computed(()=>(u,c,s)=>ge(u,c,n.musicScore,n.width)),d=r.computed(()=>(u,c,s)=>{let m={};return m.height=n.musicScore.measureHeight+"px",m.width=l.value(u,c,s)+"px",m.pointerEvents=n.disabled?"none":"auto",m});return(u,c)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.musicScore.multipleStavesArray,(s,m)=>(r.openBlock(),r.createElementBlock("div",{key:"multipleStaves"+m,style:r.normalizeStyle(i.value(s)),onMousedown:r.withModifiers(g=>o("multipleStavesMouseDown",g,s),["self"]),class:"multipleStaves"},[r.renderSlot(u.$slots,"multipleStaves",{},void 0,!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.singleStaffArray,(g,p)=>(r.openBlock(),r.createElementBlock("div",{key:"singleStaff"+p,style:r.normalizeStyle(a.value(g,s)),onMousedown:r.withModifiers(y=>o("singleStaffMouseDown",y,g),["self"]),class:"singleStaff"},[r.renderSlot(u.$slots,"singleStaff",{},void 0,!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(g.measureArray,(y,v)=>(r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle(d.value(y,g,s)),class:"measureSlot",key:"measure"+v},[r.renderSlot(u.$slots,"default",{measure:y,measureIndex:v,singleStaff:g,singleStaffIndex:p,multipleStaves:s,multipleStavesIndex:m,measureWidth:l.value(y,g,s)},void 0,!0)],4))),128))],44,Un))),128))],44,Vn))),128))]))}}),Ue=X($n,[["__scopeId","data-v-98818cac"]]),Kt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%20width='100'%20height='100'%3e%3cdefs%3e%3cmask%20id='hollowEllipseMask'%3e%3c!--%20背景为黑色(不可见),要保留的区域为白色(可见)%20--%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'/%3e%3cellipse%20cx='50'%20cy='50'%20rx='50'%20ry='37.36'%20fill='white'/%3e%3cellipse%20cx='50'%20cy='50'%20rx='40'%20ry='27.36'%20fill='black'/%3e%3c/mask%3e%3c/defs%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'%20mask='url(%23hollowEllipseMask)'/%3e%3c/svg%3e",Zn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%20width='100'%20height='100'%3e%3cdefs%3e%3cmask%20id='hollowSlantedEllipseMask'%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'/%3e%3c!--%20外椭圆,稍微倾斜%20--%3e%3cellipse%20cx='50'%20cy='50'%20rx='45'%20ry='32'%20fill='white'%20transform='rotate(-15%2050%2050)'/%3e%3c!--%20内椭圆,用于挖空%20--%3e%3cellipse%20cx='50'%20cy='50'%20rx='35'%20ry='22'%20fill='black'%20transform='rotate(-15%2050%2050)'/%3e%3c/mask%3e%3c/defs%3e%3c!--%20使用蒙版绘制一个斜切空心音符头%20--%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'%20mask='url(%23hollowSlantedEllipseMask)'/%3e%3c/svg%3e",xt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%20width='100'%20height='100'%3e%3cdefs%3e%3cmask%20id='hollowSlantedEllipseMask'%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'/%3e%3c!--%20外椭圆,稍微倾斜%20--%3e%3cellipse%20cx='50'%20cy='50'%20rx='45'%20ry='32'%20fill='white'%20transform='rotate(-15%2050%2050)'/%3e%3c!--%20内椭圆,用于挖空%20--%3e%3c!--%20%3cellipse%20cx='50'%20cy='50'%20rx='35'%20ry='22'%20fill='black'%20transform='rotate(-15%2050%2050)'/%3e--%3e%3c/mask%3e%3c/defs%3e%3c!--%20使用蒙版绘制一个斜切空心音符头%20--%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'%20mask='url(%23hollowSlantedEllipseMask)'/%3e%3c/svg%3e",wt="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+MTwvdGV4dD4NCjwvc3ZnPg0K",Qn="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+MjwvdGV4dD4NCjwvc3ZnPg0K",Xn="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+MzwvdGV4dD4NCjwvc3ZnPg0K",Kn="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+NDwvdGV4dD4NCjwvc3ZnPg0K",Jn="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+NTwvdGV4dD4NCjwvc3ZnPg0K",_n="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+NjwvdGV4dD4NCjwvc3ZnPg0K",Yn="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+NzwvdGV4dD4NCjwvc3ZnPg0K",It="data:image/svg+xml,%3csvg%20viewBox='0%200%20100%20100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='50'%20/%3e%3c/svg%3e",Mt="data:image/svg+xml,%3csvg%20viewBox='0%200%20100%20300'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='250'%20r='50'%20/%3e%3c/svg%3e",En="data:image/svg+xml,%3csvg%20viewBox='0%200%20100%20500'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='250'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='450'%20r='50'%20/%3e%3c/svg%3e",Ct="data:image/svg+xml,%3csvg%20viewBox='0%200%20100%20700'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='250'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='450'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='650'%20r='50'%20/%3e%3c/svg%3e",$e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20210%20210'%20style='enable-background:new%200%200%20210%20210;'%20xml:space='preserve'%3e%3cpolygon%20id='XMLID_830_'%20points='210,60%200,60%200,90%2030,90%2030,150%20180,150%20180,90%20210,90%20'/%3e%3c/svg%3e",eo="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20210%20210'%20style='enable-background:new%200%200%20210%20210;'%20xml:space='preserve'%3e%3cpolygon%20id='XMLID_819_'%20points='180,120%20180,60%2030,60%2030,120%200,120%200,150%20210,150%20210,120%20'/%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",kt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20275.734%20275.734'%20style='enable-background:new%200%200%20275.734%20275.734;'%20xml:space='preserve'%3e%3cpath%20id='XMLID_831_'%20d='M149.83,130.355l42.148-41.852L103.474,0L82.261,21.213l42.143,42.143l-42.143,41.857l52.543,52.543%20c-25.63,6.826-44.571,30.229-44.571,57.979c0,33.084,26.916,60,60,60v-30c-16.542,0-30-13.457-30-30c0-16.541,13.458-30,30-30%20c7.948,0,15.438,3.078,21.089,8.664l0.063-0.063l0.877,0.877L193.474,174L149.83,130.355z'/%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",to="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20180%20180'%20style='enable-background:new%200%200%20180%20180;'%20xml:space='preserve'%3e%3cg%20id='XMLID_19_'%3e%3cpath%20id='XMLID_833_'%20d='M119.771,30l-7.279,16.325C107.142,54.543,97.898,60,87.381,60c-5.458,0-10.575-1.472-14.988-4.029%20C81.351,50.781,87.381,41.099,87.381,30c0-16.569-13.43-30-30-30c-16.569,0-30,13.431-30,30c0,0.519,0.013,1.034,0.039,1.546%20C28.246,63.917,54.815,90,87.381,90c1.945,0,3.866-0.102,5.764-0.284L52.888,180h32.847l66.884-150H119.771z'/%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",no="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20360%20360'%20style='enable-background:new%200%200%20360%20360;'%20xml:space='preserve'%3e%3cg%20id='XMLID_18_'%3e%3cpath%20id='XMLID_835_'%20d='M249.901,30l-6.545,14.678C238.211,53.806,228.456,60,217.251,60c-5.457,0-10.574-1.472-14.988-4.029%20c8.958-5.189,14.988-14.872,14.988-25.971c0-16.569-13.43-30-30-30c-16.569,0-30,13.431-30,30c0,0.519,0.014,1.034,0.039,1.546%20C158.116,63.917,184.686,90,217.251,90c2.038,0,4.05-0.112,6.036-0.312l-20.467,45.9c-5.27,8.626-14.741,14.411-25.569,14.411%20c-5.457,0-10.574-1.472-14.988-4.029c8.958-5.189,14.988-14.872,14.988-25.971c0-16.569-13.43-30-30-30c-16.569,0-30,13.431-30,30%20c0,0.519,0.014,1.034,0.039,1.546c0.826,32.37,27.395,58.454,59.961,58.454c1.989,0,3.956-0.099,5.896-0.29l-20.787,46.617%20C157.01,234.544,147.768,240,137.251,240c-5.457,0-10.574-1.472-14.988-4.029c8.958-5.189,14.988-14.872,14.988-25.971%20c0-16.569-13.43-30-30-30c-16.569,0-30,13.431-30,30c0,0.519,0.014,1.034,0.039,1.546C78.116,243.917,104.686,270,137.251,270%20c1.943,0,3.865-0.098,5.762-0.28L102.758,360h32.848L282.749,30H249.901z'/%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",oo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='100'%3e%3c!--%20音符杆%20--%3e%3cline%20x1='5'%20y1='0'%20x2='5'%20y2='100'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",Ee="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20395%20395'%20style='enable-background:new%200%200%20395%20395;'%20xml:space='preserve'%3e%3cpath%20id='XMLID_905_'%20d='M272.833,80h30l-45-80l-45,80h30v47.358l-90,22.714V90h-30v67.645l-30.666,7.739v60l30.666-7.739v52.478%20l-30.666,7.739v60l30.666-7.739V395h30v-72.449l90-22.714V365h30v-72.734l29.334-7.403v-60l-29.334,7.403v-52.479l29.334-7.403v-60%20l-29.334,7.403V80z%20M242.833,239.837l-90,22.714v-52.479l90-22.714V239.837z'/%3e%3c/svg%3e",et="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cpath%20id='XMLID_920_'%20d='M174.642,156.642c-10.662-17.767-29.276-25.48-48.578-20.137c-2.379,0.659-4.681,1.507-6.901,2.507V0h-30%20v270h30c5.88-4.736,21.586-18.098,35.412-34.425C172.578,214.313,190.674,183.359,174.642,156.642z%20M131.944,215.875%20c-4.175,4.955-8.586,9.608-12.782,13.75V185c0-10.037,7.682-17.581,14.91-19.584c6.258-1.733,11.115,0.446,14.846,6.661%20C151.41,176.231,154.746,188.814,131.944,215.875z'/%3e%3c/svg%3e",ro="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cg%20id='XMLID_14_'%3e%3cpath%20id='XMLID_906_'%20d='M90,60V0H60v240l120-30v60h30V30L90,60z%20M180,150l-90,22.5V120l90-22.5V150z'/%3e%3c/g%3e%3c/svg%3e",At="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='800'%3e%3crect%20width='100'%20height='800'/%3e%3c/svg%3e",Nt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='200'%20height='500'%3e%3cstyle%3e%3c/style%3e%3cg%3e%3cline%20x1='50'%20x2='50'%20y1='0'%20y2='500'%20stroke-width='50'%20class='line'%20stroke='black'/%3e%3cline%20x1='150'%20x2='150'%20y1='0'%20y2='500'%20stroke-width='100'%20class='line'%20stroke='black'/%3e%3c/g%3e%3c/svg%3e",Lt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='200'%20height='500'%3e%3cstyle%3e%3c/style%3e%3cg%3e%3cline%20x1='150'%20x2='150'%20y1='0'%20y2='500'%20stroke-width='50'%20class='line'%20stroke='black'/%3e%3cline%20x1='50'%20x2='50'%20y1='0'%20y2='500'%20stroke-width='100'%20class='line'%20stroke='black'/%3e%3c/g%3e%3c/svg%3e",Dt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='300'%20height='500'%3e%3cg%3e%3ccircle%20cx='240'%20cy='180'%20r='30'%20fill='black'/%3e%3ccircle%20cx='240'%20cy='320'%20r='30'%20fill='black'/%3e%3cline%20x1='150'%20x2='150'%20y1='0'%20y2='500'%20stroke-width='50'%20class='line'%20stroke='black'/%3e%3cline%20x1='50'%20x2='50'%20y1='0'%20y2='500'%20stroke-width='100'%20class='line'%20stroke='black'/%3e%3c/g%3e%3c/svg%3e",Bt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='300'%20height='500'%3e%3cstyle%3e%3c/style%3e%3cg%3e%3ccircle%20cx='60'%20cy='180'%20r='30'%20fill='black'/%3e%3ccircle%20cx='60'%20cy='320'%20r='30'%20fill='black'/%3e%3cline%20x1='150'%20x2='150'%20y1='0'%20y2='500'%20stroke-width='50'%20class='line'%20stroke='black'/%3e%3cline%20x1='250'%20x2='250'%20y1='0'%20y2='500'%20stroke-width='100'%20class='line'%20stroke='black'/%3e%3c/g%3e%3c/svg%3e",io="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2018.1.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='30'%20height='50'%20viewBox='0%200%2025.8%2025.8'%20style='enable-background:new%200%200%2025.8%2025.8;'%20xml:space='preserve'%3e%3cg%20transform='translate(12.9,%2012.9)%20scale(1.67)%20translate(-12.9,%20-12.9)'%3e%3cpath%20style='fill:%23030104;'%20d='M16.681,13.4c-0.7-0.8-1.7-1.3-2.9-1.2c-0.1-0.2-0.5-2.2-0.5-2.2s1.4-2.1,1.7-2.5%20c1.5-2.4,1.6-4.3,0.7-6.2c-0.3-0.7-1.1-1.3-1.9-1.3c-0.6,0-1.1,0.5-1.4,1.1c-1,1.7-1,4.9-0.5,7.1c0,0-0.5,0.5-1,1.1%20c-1,1.1-2.1,2.3-2.5,3.9c-0.5,1.8-0.1,3.5,1,4.8c1.2,1.5,3,2.2,5.2,2c0.4,1.9,0.7,3.1,0.1,4.2c-0.2,0.4-0.6,0.8-1.3,0.8%20c-0.2,0-0.3,0-0.5-0.1c0.6-0.3,1.1-0.9,1.1-1.6c0-1-0.8-1.8-1.8-1.8c-1.7,0.1-1.8,1.8-1.8,1.8c0,0.6,0.2,1.2,0.6,1.6%20c0.5,0.5,1.3,0.9,2.2,0.9c1.1,0,2.2-0.4,2.6-2c0.4-1.3-0.3-3.4-0.4-4.1c1.1-0.5,2.1-2,2.2-3C17.781,15.6,17.381,14.3,16.681,13.4z%20M13.481,2.3c0.1-0.2,0.3-0.3,0.5-0.3c0.1,0,0.3,0.1,0.4,0.2c0.4,0.2,0.5,0.6,0.5,1.2c-0.1,1.5-1.4,3.3-2.1,3.9%20C12.481,5.9,12.681,3.3,13.481,2.3z%20M10.581,18c-0.7-0.7-1-1.7-0.9-2.7c0.2-1.6,1.3-2.9,2.2-3.9c0.2-0.2,0.4-0.4,0.5-0.6%20c0.1,0.5,0.4,1.3,0.5,1.7c-1.2,0.5-1.9,2.1-1.8,3.4c0,0.6,0.2,1,0.5,1.4c0.1,0.1,0.2,0.2,0.3,0.2s0.3-0.1,0.3-0.2l0,0%20c0.1-0.1,0.1-0.3,0-0.4s-0.1-0.2-0.1-0.4c-0.1-0.9,0.5-1.6,1.2-1.9c0.1,0.6,0.8,3.7,0.9,4.4C12.881,19.4,11.481,19,10.581,18z%20M15.081,18.6c-0.2-0.7-0.3-1.5-0.5-2.4c-0.1-0.6-0.2-1.3-0.4-1.9c1.3,0,1.7,1.1,1.8,1.5C16.281,16.9,15.981,18,15.081,18.6z'/%3e%3c/g%3e%3c/svg%3e",ao="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='30'%20height='50'%20viewBox='0%200%20285%20285'%20xml:space='preserve'%3e%3cg%20id='XMLID_516_'%20transform='translate(0,%20142.5)%20scale(1,1.8)%20translate(0,%20-142.5)%20'%3e%3crect%20id='XMLID_517_'%20y='7.5'%20width='60'%20height='270'/%3e%3crect%20id='XMLID_518_'%20x='90'%20y='7.5'%20width='30'%20height='270'/%3e%3cpath%20id='XMLID_519_'%20d='M225,157.428v-29.855c33.084,0,60-26.916,60-60c0-33.084-26.916-60-60-60%20c-31.424,0-57.18,23.901-59.779,54.892c-0.02,0.158-0.173,1.825-0.173,2.515c0,0.031,0.005,0.06,0.005,0.091%20c-0.001,0.024-0.004,0.047-0.005,0.071l0.009,0.001c0.088,10.97,9,19.837,19.991,19.837c11.046,0,20-8.954,20-20%20c0-5.252-2.041-10.017-5.353-13.586c5.326-8.344,14.666-13.821,25.305-13.821c16.542,0,30,13.458,30,30c0,16.542-13.458,30-30,30%20V82.5l-75,60l75,60v-15.072c16.542,0,30,13.458,30,29.999c0,16.542-13.458,30.001-30,30.001c-10.639,0-19.979-5.477-25.305-13.821%20c3.312-3.569,5.353-8.333,5.353-13.586c0-11.046-8.954-20-20-20c-10.991,0-19.903,8.868-19.991,19.837l-0.009,0.001%20c0.001,0.024,0.004,0.047,0.005,0.071c0,0.031-0.005,0.06-0.005,0.091c0,0.69,0.153,2.357,0.173,2.515%20c2.6,30.991,28.355,54.892,59.779,54.892c33.084,0,60-26.916,60-60.001C285,184.343,258.084,157.428,225,157.428z'/%3e%3c/g%3e%3c/svg%3e",so="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='30'%20height='50'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cg%20id='XMLID_520_'%20transform='translate(135,%20135)%20scale(1.2,1.7)%20translate(-135,%20-135)'%3e%3cpath%20id='XMLID_521_'%20d='M95,0C46.286,0,20,35.035,20,68c0,16.393,5.134,30.499,14.848,40.794C44.851,119.396,58.736,125,75,125%20c16.569,0,30-13.431,30-30S91.569,65,75,65c-9.828,0-18.551,4.726-24.023,12.028C50.234,73.834,50,70.676,50,68%20c0-18.884,15.457-38,45-38c37.664,0,65,35.748,65,85c0,47.058-20.573,76.48-37.831,92.875C100.995,227.991,72.146,240,45,240v30%20c35.164,0,70.822-14.716,97.831-40.375C173.248,200.729,190,160.02,190,115c0-31.97-9.544-61.113-26.874-82.062%20C145.554,11.698,121.36,0,95,0z'/%3e%3ccircle%20id='XMLID_522_'%20cx='235'%20cy='60'%20r='15'/%3e%3ccircle%20id='XMLID_523_'%20cx='235'%20cy='120'%20r='15'/%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",lo=r.defineComponent({__name:"clef",props:{clef:{type:Object,required:!0},musicScore:{required:!0,type:Object}},setup(e){const t=e,n=r.computed(()=>{let o="";return t.clef.clef===$.Treble?o=io:t.clef.clef===$.Alto?o=ao:t.clef.clef===$.Bass&&(o=so),{mask:`url("${o}") center center / 100% 100% no-repeat`}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle(n.value)},null,4))}}),co={class:"keySignature"},uo=r.defineComponent({__name:"keySignature",props:{keySignature:{type:Object,required:!0},slotWidth:{type:Number,default:50},measureHeight:{type:Number,default:60},musicScore:{type:Object,default:{}}},setup(e){const t=e,n=r.computed(()=>t.keySignature?nt(t.keySignature,t.musicScore):$.Treble),o=r.computed(()=>{const s={Cb:{type:"flat",count:7},Gb:{type:"flat",count:6},Db:{type:"flat",count:5},Ab:{type:"flat",count:4},Eb:{type:"flat",count:3},Bb:{type:"flat",count:2},F:{type:"flat",count:1},C:{type:"none",count:0},G:{type:"sharp",count:1},D:{type:"sharp",count:2},A:{type:"sharp",count:3},E:{type:"sharp",count:4},B:{type:"sharp",count:5},"F#":{type:"sharp",count:6},"C#":{type:"sharp",count:7}};return t.keySignature.type===b.KeySignature?s[t.keySignature.keySignature]:(console.error("keySignature出错,没有keySignature属性",t.keySignature),s[Ft.C])}),i=r.computed(()=>o.value.type==="sharp"?Ee:et),a=r.computed(()=>t.measureHeight/8),l={[$.Treble]:[6,3.5,5,2.5,4,2,3],[$.Bass]:[3,.5,2,-.5,1,-1,0],[$.Alto]:[4.5,2,3.5,1,2.5,0,1.5]},d={[$.Treble]:[5,8,4,7,3,6,2],[$.Bass]:[6,3.5,5,2.5,4,2,3],[$.Alto]:[2,4.5,1,3.5,0,2.5,-.5]},u=r.computed(()=>o.value.type==="sharp"?(l[n.value]||l[$.Treble]).slice(0,o.value.count).map(m=>m*a.value):o.value.type==="flat"?(d[n.value]||d[$.Treble]).slice(0,o.value.count).map(m=>m*a.value):[]),c=r.computed(()=>{const s=t.measureHeight*.5,m=t.measureHeight*.4;return(g,p)=>({width:s+"px",height:s+"px",position:"absolute",pointerEvents:"none",left:`${g*m}px`,top:`${t.measureHeight-p-s/2}px`,backgroundColor:t.keySignature.options.highlight?t.keySignature.options.highlightColor:t.keySignature.options.color,maskImage:`url("${i.value}")`,WebkitMaskImage:`url("${i.value}")`,maskRepeat:"no-repeat",WebkitMaskRepeat:"no-repeat",maskSize:"contain",WebkitMaskSize:"contain",maskPosition:"center",WebkitMaskPosition:"center"})});return(s,m)=>(r.openBlock(),r.createElementBlock("div",co,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,(g,p)=>(r.openBlock(),r.createElementBlock("div",{key:p,class:"symbol",style:r.normalizeStyle(c.value(p,g))},null,4))),128))]))}}),mo=X(uo,[["__scopeId","data-v-2bd67863"]]),go=r.defineComponent({__name:"timeSignature",props:{timeSignature:{type:Object,required:!0},measureHeight:{type:Number,default:60}},setup(e){const t=e,n=r.computed(()=>({fontSize:t.measureHeight/3+"px",userSelect:"none",color:t.timeSignature.options.highlight?t.timeSignature.options.highlightColor:t.timeSignature.options.color}));return(o,i)=>e.timeSignature&&e.timeSignature.type===r.unref(b).TimeSignature?(r.openBlock(),r.createElementBlock("div",{key:0,class:"timeSignature",style:r.normalizeStyle(n.value)},[r.createElementVNode("div",null,r.toDisplayString(e.timeSignature.timeSignature.beat),1),r.createElementVNode("div",null,r.toDisplayString(e.timeSignature.timeSignature.chronaxie),1)],4)):r.createCommentVNode("",!0)}}),fo=X(go,[["__scopeId","data-v-08c2b53d"]]);function We(e,t,n){const o=W(e.index,t);if(o.singleStaff==null)return console.error("没有单谱表信息,无法计算小节left"),0;let i=0;for(let a of o.singleStaff.measureArray){if(a===e)return i;i+=ge(a,o.singleStaff,t,n)}return i}function Jt(e,t,n,o,i,a,l,d,u){const c=a.measureHeight;if(!n||!o||!i)return console.error("数据索引有误,符尾left计算出错"),0;const s=ve(e,n,o,i,a,u),m=Be(t.beamId,o),g=q[b.NoteStem];if(!("aspectRatio"in g)||typeof g.aspectRatio!="number")return console.error("符杠aspectRatio获取失败,符尾left计算出错"),0;if(m.length>1)return t.id===m[0].note.id?e.direction==="up"?l:0:t.id===m[m.length-1].note.id?e.direction==="up"?-s+l:-s:-qe(t,n,o,i,a,l,u);if(e.direction==="up")return l;{const p=q[b.NoteStem];if(!("aspectRatio"in p)||typeof p.aspectRatio!="number")return console.error("符杠aspectRatio获取失败,符杠left计算出错"),0;const y=p.heightMultiplier;return c*y*p.aspectRatio}}function mt(e,t,n,o,i,a,l,d,u=!1){const c=u?e:De(e,i),s=Le(e,i),m=ve(e,t,n,o,i,d);switch(e==null?void 0:e.type){case b.NoteHead:return 0;case b.NoteStem:return e.direction==="up"?s-m:0;case b.NoteTail:return c.type!==b.NoteHead?(console.error("找不到音符头,符尾left计算出错"),0):Jt(e,c,t,n,o,i,s,l,d);case b.Accidental:return-m;case b.NoteDot:{const g=ve(e,t,n,o,i,d);return s/2-g/2}}return 0}function qe(e,t,n,o,i,a,l,d=!1){const u=d?e:De(e,i),c=ne(t,n,o,i,l);switch(i.measureHeight,u==null?void 0:u.type){case b.NoteHead:return c/2-a/2;case b.NoteNumber:return c/2-a/2;case b.Rest:return c/2-a/2;case b.ChronaxieIncreasingLine:return c/2-a/2}return 0}function gt(e,t,n,o,i){const a=o.measureHeight;if(!e||!t||!n)return console.error("缺少必要的参数,坐标计算出错"),0;let l=0;const d=e.type;if([Fe.frontFixed].includes(d))l=_(t,a,"front",e);else if([Fe.rearFixed].includes(d))l=i-_(t,a)+_(t,a,"all",e);else{const u=_(t,a),c=me(t),s=me(t,e),m=_(t,a,"front");l=(i-u)/c*s+m}return l}function tt(e,t,n,o,i,a,l,d,u=!1){const c=u?e:De(e,i),s=qe(c,t,n,o,i,a,d),m=gt(t,n,o,i,l);return s+m}const ho=Object.freeze(Object.defineProperty({__proto__:null,getContainerLeftToMeasure:gt,getMeasureLeftToMusicScore:We,getMsSymbolLeftToSlot:mt,getNoteTailLeftToSlot:Jt,getSlotLeftToContainer:qe,getSlotLeftToMeasure:tt},Symbol.toStringTag,{value:"Module"})),po="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='200'%3e%3c!--%20音符尾%20--%3e%3cpath%20d='%20M%200%200%20L%200%2040%20L%20100%20200%20L%20100%20180%20Z%20'%20fill='black'/%3e%3c/svg%3e",yo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='200'%3e%3c!--%20音符尾%20--%3e%3cpath%20d='%20M%200%200%20L%200%2040%20L%20100%20120%20L%20100%20100%20M%200%2080%20L%200%20120%20L%20100%20200%20L%20100%20180%20Z%20'%20fill='black'/%3e%3c/svg%3e",So="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='200'%3e%3c!--%20音符尾%20--%3e%3cg%3e%3cpath%20d='%20M%200%20200%20L%200%20160%20L%20100%200%20L%20100%200%20Z%20'%20fill='black'/%3e%3c/g%3e%3c/svg%3e",bo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='200'%3e%3c!--%20音符尾%20--%3e%3cpath%20d='%20M%200%20200%20L%200%20160%20L%20100%2080%20L%20100%20100%20M%200%20120%20L%200%2080%20L%20100%200%20L%20100%2020%20Z%20'%20fill='black'/%3e%3c/svg%3e",vo=r.defineComponent({__name:"noteTail",props:{noteTail:{type:Object,required:!0},noteHead:{type:Object,required:!0},preContainer:{type:Object,required:!0},nextContainer:{type:Object,required:!0},msSymbolContainer:{type:Object,required:!0},measure:{type:Object,required:!0},singleStaff:{type:Object,required:!0},musicScore:{type:Object,required:!0},parentMsSymbol:{type:Object},slotLeft:{type:Number,required:!0},measureWidth:{type:Number,required:!0},componentWidth:{type:Number,required:!0}},setup(e){const t=e,n=r.computed(()=>Be(t.noteHead.beamId,t.measure));r.computed(()=>fe(t.noteTail));const o=r.computed(()=>{var s;switch((s=t.noteTail)==null?void 0:s.chronaxie){case D.eighth:return 1;case D.sixteenth:return 2}return 0}),i=r.computed(()=>Z(t.noteTail,t.musicScore)),a=r.computed(()=>t.noteTail.type===b.NoteTail&&t.nextContainer?dt(t.noteTail,t.noteHead,t.msSymbolContainer,t.measure,t.singleStaff,t.musicScore,t.componentWidth):ve(t.noteTail,t.msSymbolContainer,t.measure,t.singleStaff,t.musicScore,t.componentWidth)),l=r.computed(()=>{var m;const s={width:`${a.value}px`,height:`${i.value}px`,display:"flex",flexDirection:((m=t.noteTail)==null?void 0:m.direction)==="up"?"column":"column-reverse",position:"absolute",left:d.value+"px",bottom:u.value+"px",background:t.noteTail.options.highlight?t.noteTail.options.highlightColor:t.noteTail.options.color};return c.value&&n.value.length<2?s.mask=`url("${c.value}") center center / cover no-repeat`:s.background="transparent",s}),d=r.computed(()=>mt(t.noteTail,t.msSymbolContainer,t.measure,t.singleStaff,t.musicScore,t.slotLeft,t.measureWidth,t.componentWidth)),u=r.computed(()=>ut(t.noteTail,t.musicScore)),c=r.computed(()=>{const s=W(t.noteTail.index,t.musicScore).msSymbol;if(s&&"chronaxie"in s&&V(s.region)<=3)switch(t.noteTail.chronaxie){case D.eighth:return po;case D.sixteenth:return yo;default:return""}else switch(t.noteTail.chronaxie){case D.eighth:return So;case D.sixteenth:return bo;default:return""}});return(s,m)=>(r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle(l.value)},[n.value.length>1?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(o.value*2-1,(g,p)=>(r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle({backgroundColor:p%2===0?"black":"transparent",height:i.value/5+"px",width:"100%"})},null,4))),256)):r.createCommentVNode("",!0)],4))}}),xo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='10'%3e%3cline%20x1='0'%20y1='5'%20x2='100'%20y2='5'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",wo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='10'%3e%3cline%20x1='0'%20y1='5'%20x2='100'%20y2='5'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",Io="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='30'%3e%3cline%20x1='0'%20y1='5'%20x2='100'%20y2='5'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='25'%20x2='100'%20y2='25'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",Mo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='50'%3e%3cline%20x1='0'%20y1='5'%20x2='100'%20y2='5'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='25'%20x2='100'%20y2='25'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='45'%20x2='100'%20y2='45'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",Co="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='70'%3e%3cline%20x1='0'%20y1='5'%20x2='100'%20y2='5'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='25'%20x2='100'%20y2='25'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='45'%20x2='100'%20y2='45'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='65'%20x2='100'%20y2='65'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",ko=r.defineComponent({__name:"msSymbol",props:{msSymbol:{type:Object,required:!0},msSymbolContainer:{type:Object,required:!0},preContainer:{type:Object,required:!0},nextContainer:{type:Object,required:!0},measure:{type:Object,required:!0},measureWidth:{type:Number,required:!0},singleStaff:{type:Object,required:!0},musicScore:{type:Object,required:!0},containerWidth:{type:Number,required:!0},isMain:{type:Boolean,default:!1},measureHeight:{type:Number,required:!0},parentMsSymbol:{type:Object},slotWidth:{type:Number,required:!0},slotBottom:{type:Number,required:!0},slotLeft:{type:Number,required:!0},componentWidth:{type:Number,required:!0},componentHeight:{type:Number,required:!0}},emits:["msSymbolMouseDown","msSymbolMouseUp"],setup(e,{expose:t,emit:n}){const o=e;r.watch(()=>{var k;return(k=o.msSymbol)==null?void 0:k.vueKey},()=>{i()});function i(){var k,w,N,C,B,H,Q;switch((k=o.msSymbol)==null?void 0:k.type){case b.NoteHead:switch((w=o.msSymbol)==null?void 0:w.chronaxie){case D.whole:return Kt;case D.half:return Zn;case D.quarter:return xt;default:return xt}case b.Rest:switch((N=o.msSymbol)==null?void 0:N.chronaxie){case D.whole:return $e;case D.half:return eo;case D.quarter:return kt;case D.eighth:return to;case D.sixteenth:return no;case D.thirtySecond:return $e;case D.sixtyFourth:return $e;default:return kt}case b.NoteStem:return oo;case b.NoteTail:return"";case b.Clef:return"";case b.Clef_f:return"";case b.BarLine:{switch((C=o.msSymbol)==null?void 0:C.barLineType){case J.single:return At;case J.final:return Nt;case J.reverseFinal:return Lt;case J.startRepeatSign:return Dt;case J.endRepeatSign:return Bt}return""}case b.BarLine_f:{switch((B=o.msSymbol)==null?void 0:B.barLineType){case J.single:return At;case J.final:return Nt;case J.reverseFinal:return Lt;case J.startRepeatSign:return Dt;case J.endRepeatSign:return Bt}return console.error("未知的小节线类型",o.msSymbol),""}case b.KeySignature:return"";case b.TimeSignature:return"";case b.Accidental:{switch((H=o.msSymbol)==null?void 0:H.accidental){case ye.Sharp:return Ee;case ye.Flat:return et;case ye.Natural:return ro;case ye.DoubleSharp:return Ee;case ye.DoubleFlat:return et}return console.error("未知的变音符号",o.msSymbol),""}case b.NoteNumber:switch((Q=o.msSymbol)==null?void 0:Q.solmization){case le.DO:return wt;case le.RE:return Qn;case le.MI:return Xn;case le.FA:return Kn;case le.SOL:return Jn;case le.LA:return _n;case le.TI:return Yn;default:return wt}case b.NoteDot:switch(o.msSymbol.octave){case 1:return Ct;case 2:return Mt;case 3:return It;case 5:return It;case 6:return Mt;case 7:return En;case 8:return Ct;default:return""}case b.ChronaxieReducingLine:switch(o.msSymbol.chronaxie){case D.eighth:return wo;case D.sixteenth:return Io;case D.thirtySecond:return Mo;case D.sixtyFourth:return Co;default:return""}case b.ChronaxieIncreasingLine:return xo;default:return console.error("未知的符号类别",o.msSymbol),""}}const a=r.computed(()=>i()),l=r.ref(null),d=r.computed(()=>fe(o.msSymbol)),u=r.computed(()=>Z(o.msSymbol,o.musicScore)),c=r.computed(()=>ve(o.msSymbol,o.msSymbolContainer,o.measure,o.singleStaff,o.musicScore,o.componentWidth)),s=r.computed(()=>mt(o.msSymbol,o.msSymbolContainer,o.measure,o.singleStaff,o.musicScore,o.slotLeft,o.measureWidth,o.componentWidth)),m=r.computed(()=>ut(o.msSymbol,o.musicScore)),g=r.computed(()=>{var w;const k={width:`${c.value}px`,height:`${u.value}px`,position:"absolute",pointerEvents:"auto",left:s.value+"px",bottom:m.value+"px",background:o.msSymbol.options.highlight?o.msSymbol.options.highlightColor:o.msSymbol.options.color};return(w=o.msSymbol)!=null&&w.type&&[b.KeySignature,b.TimeSignature,b.NoteTail].includes(o.msSymbol.type)&&(k.background="unset"),a.value&&(k.mask=`url("${a.value}") no-repeat center`,k["mask-size"]="100% 100%"),k}),p=n;function y(k){p("msSymbolMouseDown",k,o.msSymbol)}function v(k){p("msSymbolMouseUp",k,o.msSymbol)}return r.onMounted(()=>{}),t({aspectRatio:d}),(k,w)=>{var N,C,B,H,Q,ie;return((N=e.msSymbol)==null?void 0:N.type)===r.unref(b).Clef||((C=e.msSymbol)==null?void 0:C.type)===r.unref(b).Clef_f&&"clef"in e.msSymbol?r.withDirectives((r.openBlock(),r.createBlock(lo,{key:0,clef:e.msSymbol,onMouseup:r.withModifiers(v,["self"]),onMousedown:r.withModifiers(y,["self"]),musicScore:e.musicScore,style:r.normalizeStyle(g.value)},null,8,["clef","musicScore","style"])),[[r.vShow,e.musicScore.showMode===r.unref(E).standardStaff]]):((B=e.msSymbol)==null?void 0:B.type)===r.unref(b).KeySignature?r.withDirectives((r.openBlock(),r.createBlock(mo,{key:1,"measure-height":e.measureHeight,slotWidth:e.slotWidth,onMouseup:r.withModifiers(v,["self"]),onMousedown:r.withModifiers(y,["self"]),musicScore:e.musicScore,style:r.normalizeStyle(g.value),keySignature:e.msSymbol},null,8,["measure-height","slotWidth","musicScore","style","keySignature"])),[[r.vShow,e.musicScore.showMode===r.unref(E).standardStaff]]):((H=e.msSymbol)==null?void 0:H.type)===r.unref(b).TimeSignature?r.withDirectives((r.openBlock(),r.createBlock(fo,{key:2,style:r.normalizeStyle(g.value),onMouseup:r.withModifiers(v,["self"]),onMousedown:r.withModifiers(y,["self"]),"time-signature":e.msSymbol,"measure-height":e.measureHeight},null,8,["style","time-signature","measure-height"])),[[r.vShow,e.musicScore.showMode===r.unref(E).standardStaff]]):((Q=e.msSymbol)==null?void 0:Q.type)===r.unref(b).NoteTail?r.withDirectives((r.openBlock(),r.createBlock(vo,{key:3,"ms-symbol-container":e.msSymbolContainer,"pre-container":e.preContainer,"next-container":e.nextContainer,"measure-width":e.measureWidth,"single-staff":e.singleStaff,"slot-left":e.slotLeft,"component-width":e.componentWidth,noteTail:e.msSymbol,noteHead:e.parentMsSymbol,measure:e.measure,musicScore:e.musicScore},null,8,["ms-symbol-container","pre-container","next-container","measure-width","single-staff","slot-left","component-width","noteTail","noteHead","measure","musicScore"])),[[r.vShow,e.musicScore.showMode===r.unref(E).standardStaff]]):((ie=e.msSymbol)==null?void 0:ie.type)===r.unref(b).NoteStem?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:4,ref_key:"msSymbolRef",ref:l,class:"msSymbol",style:r.normalizeStyle(g.value),onMouseup:r.withModifiers(v,["self"]),onMousedown:r.withModifiers(y,["self"])},null,36)),[[r.vShow,e.musicScore.showMode===r.unref(E).standardStaff]]):(r.openBlock(),r.createElementBlock("div",{key:5,ref_key:"msSymbolRef",ref:l,class:"msSymbol",style:r.normalizeStyle(g.value),onMouseup:r.withModifiers(v,["self"]),onMousedown:r.withModifiers(y,["self"])},null,36))}}}),Ht=X(ko,[["__scopeId","data-v-5b6eb544"]]),Ao=r.defineComponent({__name:"msSymbolSlot",props:{msSymbol:{type:Object,required:!0},msSymbolContainer:{type:Object,required:!0},preContainer:{type:Object,required:!0},nextContainer:{type:Object,required:!0},containerWidth:{type:Number,default:60,required:!0},measureHeight:{type:Number,default:60,required:!0},measure:{type:Object,required:!0},measureWidth:{type:Number,default:200,required:!0},componentWidth:{type:Number,default:1e3},componentHeight:{type:Number,default:800},singleStaff:{type:Object,required:!0},multipleStaves:{type:Object,required:!0},musicScore:{type:Object,default:{}}},emits:["msSymbolMouseDown","msSymbolMouseUp"],setup(e,{emit:t}){const n=e,o=r.computed(()=>!n.msSymbol||!n.measure||!n.singleStaff?(console.error("缺少必要的参数,坐标计算出错"),{}):{left:a.value+"px",height:n.measureHeight+"px",width:i.value+"px",bottom:l.value+"px",pointEvents:" none"});r.computed(()=>fe(n.msSymbol)),r.computed(()=>Z(n.msSymbol,n.musicScore));const i=r.computed(()=>Le(n.msSymbol,n.musicScore)),a=r.computed(()=>qe(n.msSymbol,n.msSymbolContainer,n.measure,n.singleStaff,n.musicScore,i.value,n.componentWidth)),l=r.computed(()=>te(n.msSymbol,n.musicScore)),d=t;return(u,c)=>{var s;return r.openBlock(),r.createElementBlock("div",{class:"msSymbolSlot p-stackItem",style:r.normalizeStyle(o.value)},[e.msSymbol?(r.openBlock(),r.createBlock(Ht,{key:0,ref:"mainMsSymbolRef",measureHeight:e.measureHeight,msSymbolContainer:n.msSymbolContainer,preContainer:n.preContainer,nextContainer:n.nextContainer,"slot-width":i.value,slotBottom:l.value,"slot-left":a.value,containerWidth:e.containerWidth,"measure-width":e.measureWidth,isMain:!0,componentWidth:e.componentWidth,componentHeight:e.componentHeight,measure:e.measure,"single-staff":e.singleStaff,musicScore:n.musicScore,onMsSymbolMouseDown:c[0]||(c[0]=(m,g)=>d("msSymbolMouseDown",m,g)),onMsSymbolMouseUp:c[1]||(c[1]=(m,g)=>d("msSymbolMouseUp",m,g)),"ms-symbol":e.msSymbol},null,8,["measureHeight","msSymbolContainer","preContainer","nextContainer","slot-width","slotBottom","slot-left","containerWidth","measure-width","componentWidth","componentHeight","measure","single-staff","musicScore","ms-symbol"])):r.createCommentVNode("",!0),(s=e.msSymbol)!=null&&s.msSymbolArray?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(e.msSymbol.msSymbolArray,m=>(r.openBlock(),r.createBlock(Ht,{measureHeight:e.measureHeight,msSymbolContainer:n.msSymbolContainer,preContainer:n.preContainer,nextContainer:n.nextContainer,containerWidth:e.containerWidth,"measure-width":e.measureWidth,isMain:!1,slotBottom:l.value,measure:e.measure,"single-staff":e.singleStaff,"slot-width":i.value,"slot-left":a.value,"parent-ms-symbol":e.msSymbol,componentWidth:e.componentWidth,onMsSymbolMouseDown:c[2]||(c[2]=(g,p)=>d("msSymbolMouseDown",g,p)),onMsSymbolMouseUp:c[3]||(c[3]=(g,p)=>d("msSymbolMouseUp",g,p)),componentHeight:e.componentHeight,musicScore:n.musicScore,"ms-symbol":m},null,8,["measureHeight","msSymbolContainer","preContainer","nextContainer","containerWidth","measure-width","slotBottom","measure","single-staff","slot-width","slot-left","parent-ms-symbol","componentWidth","componentHeight","musicScore","ms-symbol"]))),256)):r.createCommentVNode("",!0)],4)}}}),No=X(Ao,[["__scopeId","data-v-501cb6ae"]]),Lo=r.defineComponent({__name:"msSymbolContainer",props:{msSymbolContainer:{type:Object,required:!0},preContainer:{type:Object,required:!0},nextContainer:{type:Object,required:!0},measureHeight:{type:Number,required:!0},measure:{type:Object,required:!0},measureWidth:{type:Number,required:!0},componentWidth:{type:Number,required:!0},componentHeight:{type:Number,required:!0},singleStaff:{type:Object,required:!0},multipleStaves:{type:Object,required:!0},musicScore:{type:Object,required:!0}},emits:["msSymbolMouseDown","msSymbolMouseUp"],setup(e,{emit:t}){const n=e,o=r.computed(()=>!n.msSymbolContainer||!n.measure||!n.singleStaff?(console.error("缺少必要的参数,坐标计算出错"),{}):{left:a.value+"px",height:n.measureHeight+"px",width:i.value+"px",bottom:"0px",pointerEvents:"none"}),i=r.computed(()=>ne(n.msSymbolContainer,n.measure,n.singleStaff,n.musicScore,n.componentWidth)),a=r.computed(()=>gt(n.msSymbolContainer,n.measure,n.singleStaff,n.musicScore,n.measureWidth)),l=t;return(d,u)=>{var c;return r.openBlock(),r.createElementBlock("div",{class:"msSymbolContainer",style:r.normalizeStyle(o.value)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList((c=e.msSymbolContainer)==null?void 0:c.msSymbolArray,s=>(r.openBlock(),r.createBlock(No,{msSymbol:s,msSymbolContainer:n.msSymbolContainer,preContainer:n.preContainer,nextContainer:n.nextContainer,measure:n.measure,measureWidth:n.measureWidth,singleStaff:n.singleStaff,containerWidth:i.value,componentWidth:e.componentWidth,componentHeight:e.componentHeight,onMsSymbolMouseDown:(m,g)=>l("msSymbolMouseDown",m,g),onMsSymbolMouseUp:(m,g)=>l("msSymbolMouseUp",m,g),multipleStaves:n.multipleStaves,musicScore:n.musicScore,measureHeight:n.measureHeight},null,8,["msSymbol","msSymbolContainer","preContainer","nextContainer","measure","measureWidth","singleStaff","containerWidth","componentWidth","componentHeight","onMsSymbolMouseDown","onMsSymbolMouseUp","multipleStaves","musicScore","measureHeight"]))),256))],4)}}}),Do=X(Lo,[["__scopeId","data-v-a10cc562"]]),Bo=r.defineComponent({__name:"rectDragShell",props:{rect:{required:!0,type:Object}},setup(e){const t=e,n=r.ref({left:t.rect.left,top:t.rect.top,width:t.rect.width,height:t.rect.height}),o=r.ref(!1),i=r.ref(null);function a(u,c){c.stopPropagation(),c.preventDefault(),o.value=!0,i.value=u,window.addEventListener("mousemove",l),window.addEventListener("mouseup",d)}function l(u){if(!o.value||!i.value)return;const{clientX:c,clientY:s}=u;switch(i.value){case"tl":n.value.width+=n.value.left-c,n.value.height+=n.value.top-s,n.value.left=c,n.value.top=s;break;case"tr":n.value.width=c-n.value.left,n.value.height+=n.value.top-s,n.value.top=s;break;case"bl":n.value.width+=n.value.left-c,n.value.left=c,n.value.height=s-n.value.top;break;case"br":n.value.width=c-n.value.left,n.value.height=s-n.value.top;break}}function d(){o.value=!1,i.value=null,window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",d)}return(u,c)=>(r.openBlock(),r.createElementBlock("div",{class:"resizable-box",style:r.normalizeStyle({position:"absolute",left:n.value.left+"px",top:n.value.top+"px",width:n.value.width+"px",height:n.value.height+"px"})},[r.renderSlot(u.$slots,"default",{},void 0,!0),r.createElementVNode("div",{class:"drag-point top-left",onMousedown:c[0]||(c[0]=s=>a("tl",s))},null,32),r.createElementVNode("div",{class:"drag-point top-right",onMousedown:c[1]||(c[1]=s=>a("tr",s))},null,32),r.createElementVNode("div",{class:"drag-point bottom-left",onMousedown:c[2]||(c[2]=s=>a("bl",s))},null,32),r.createElementVNode("div",{class:"drag-point bottom-right",onMousedown:c[3]||(c[3]=s=>a("br",s))},null,32)],4))}}),Rt=X(Bo,[["__scopeId","data-v-5a499cb9"]]),Ho=r.defineComponent({__name:"volta",props:{volta:{type:Object,required:!0}},setup(e){const t=r.computed(()=>({width:"100%",height:"100%"}));return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:"volta",style:r.normalizeStyle(t.value)},o[0]||(o[0]=[r.createElementVNode("div",null,"1,2,3",-1)]),4))}}),Ro=X(Ho,[["__scopeId","data-v-71eea7f6"]]),jo={class:"slur"},Wo={class:"slur-svg",viewBox:"0 0 100 100",preserveAspectRatio:"none"},Fo=["d"],zo=r.defineComponent({__name:"slur",props:{slur:{type:Object,required:!0}},setup(e){const t=r.computed(()=>`
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),on="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='500'%20height='80'%3e%3cline%20x1='0'%20y1='0'%20x2='500'%20y2='000'%20stroke='black'%20stroke-width='1'%3e%3c/line%3e%3cline%20x1='0'%20y1='20'%20x2='500'%20y2='20'%20stroke='black'%20stroke-width='1'%3e%3c/line%3e%3cline%20x1='0'%20y1='40'%20x2='500'%20y2='40'%20stroke='black'%20stroke-width='1'%3e%3c/line%3e%3cline%20x1='0'%20y1='60'%20x2='500'%20y2='60'%20stroke='black'%20stroke-width='1'%3e%3c/line%3e%3cline%20x1='0'%20y1='80'%20x2='500'%20y2='80'%20stroke='black'%20stroke-width='1'%3e%3c/line%3e%3c/svg%3e",rn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='500'%20height='80'%3e%3cline%20x1='0'%20y1='0'%20x2='500'%20y2='000'%20stroke='white'%20stroke-width='1'%3e%3c/line%3e%3cline%20x1='0'%20y1='80'%20x2='500'%20y2='80'%20stroke='white'%20stroke-width='1'%3e%3c/line%3e%3c/svg%3e";var ee=(e=>(e[e.MultipStaves=1]="MultipStaves",e[e.SingleStaff=2]="SingleStaff",e[e.Measure=3]="Measure",e[e.SpanSymbol=4]="SpanSymbol",e[e.MsSymbolContainer=5]="MsSymbolContainer",e[e.MsSymbol=6]="MsSymbol",e))(ee||{}),jt=(e=>(e.Line="line",e.Space="space",e))(jt||{}),Wt=(e=>(e.Lower="lower",e.Main="main",e.Upper="upper",e))(Wt||{}),$=(e=>(e[e.Treble=1]="Treble",e[e.MezzoSoprano=2]="MezzoSoprano",e[e.Alto=3]="Alto",e[e.Tenor=4]="Tenor",e[e.BaritoneF=5]="BaritoneF",e[e.BaritoneC=6]="BaritoneC",e[e.Bass=7]="Bass",e[e.Subbass=8]="Subbass",e))($||{}),Ft=(e=>(e.Cb="Cb",e.Gb="Gb",e.Db="Db",e.Ab="Ab",e.Eb="Eb",e.Bb="Bb",e.F="F",e.C="C",e.G="G",e.D="D",e.A="A",e.E="E",e.B="B",e["F#"]="F#",e["C#"]="C#",e))(Ft||{}),le=(e=>(e[e.DO=1]="DO",e[e.RE=2]="RE",e[e.MI=3]="MI",e[e.FA=4]="FA",e[e.SOL=5]="SOL",e[e.LA=6]="LA",e[e.TI=7]="TI",e))(le||{}),ye=(e=>(e.None="",e.Natural="&",e.Sharp="#",e.Flat="b",e.DoubleSharp="##",e.DoubleFlat="bb",e))(ye||{}),D=(e=>(e[e.whole=1]="whole",e[e.half=2]="half",e[e.quarter=4]="quarter",e[e.eighth=8]="eighth",e[e.sixteenth=16]="sixteenth",e[e.thirtySecond=32]="thirtySecond",e[e.sixtyFourth=64]="sixtyFourth",e))(D||{}),b=(e=>(e.NoteHead="noteHead",e.NoteStem="noteStem",e.NoteTail="noteTail",e.NoteNumber="noteNumber",e.ChronaxieReducingLine="chronaxieReducingLine",e.ChronaxieIncreasingLine="chronaxieIncreasingLine",e.NoteDot="noteDot",e.Rest="rest",e.Slur="slur",e.Tie="tie",e.DurationDot="durationDot",e.Accidental="accidental",e.Tuplet="tuplet",e.Clef="clef",e.Clef_f="clef_f",e.KeySignature="keySignature",e.TimeSignature="timeSignature",e.BarLine="barLine",e.BarLine_f="barLine_f",e))(b||{}),E=(e=>(e[e.standardStaff=1]="standardStaff",e[e.numberNotation=2]="numberNotation",e[e.rhythmNotation=3]="rhythmNotation",e[e.percussion=4]="percussion",e))(E||{}),Ce=(e=>(e[e.volta=1]="volta",e[e.slur=2]="slur",e[e.tie=3]="tie",e))(Ce||{}),Fe=(e=>(e[e.frontFixed=1]="frontFixed",e[e.rearFixed=2]="rearFixed",e[e.variable=3]="variable",e[e.span=4]="span",e))(Fe||{}),J=(e=>(e[e.single=1]="single",e[e.final=2]="final",e[e.reverseFinal=3]="reverseFinal",e[e.startRepeatSign=4]="startRepeatSign",e[e.endRepeatSign=5]="endRepeatSign",e))(J||{}),re=(e=>(e[e.normal=1]="normal",e[e.edit=2]="edit",e))(re||{}),ue=(e=>(e[e.note=1]="note",e[e.rest=2]="rest",e))(ue||{});const an=r.defineComponent({__name:"measure",props:{measure:{type:Object,required:!0},x:{type:Number,default:0},y:{type:Number,default:0},width:{type:Number,default:400},height:{type:Number,default:80},componentWidth:{type:Number,default:1e3},componentHeight:{type:Number,default:800},strokeWidth:{type:Number,default:1},musicScore:{type:Object,default:{}}},emits:["measureMouseDown"],setup(e,{emit:t}){const n=e,o=r.computed(()=>({width:"100%",display:"grid","grid-template-rows":"1fr","grid-template-columns":"1fr"})),i=r.computed(()=>{const d={width:n.width+"px",height:n.height+"px","background-color":"black",background:n.measure.options.highlight?n.measure.options.highlightColor:n.measure.options.color,pointerEvents:"none"};switch(n.musicScore.showMode){case E.standardStaff:{d.mask=`url("${on}") no-repeat center`,d["mask-size"]="100% 100%";break}case E.numberNotation:{d.mask=`url("${rn}") no-repeat center`,d["mask-size"]="100% 100%";break}}return d}),a=t;function l(d){a("measureMouseDown",d,n.measure)}return(d,u)=>(r.openBlock(),r.createElementBlock("div",{class:"measure",style:r.normalizeStyle(o.value),onMousedown:r.withModifiers(l,["self"])},[r.createElementVNode("div",{style:r.normalizeStyle(i.value)},null,4)],36))}}),X=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},sn=X(an,[["__scopeId","data-v-45ed8482"]]);var de;(function(e){e[e.MultipStaves=1]="MultipStaves",e[e.SingleStaff=2]="SingleStaff",e[e.Measure=3]="Measure",e[e.SpanSymbol=4]="SpanSymbol",e[e.MsSymbolContainer=5]="MsSymbolContainer",e[e.MsSymbol=6]="MsSymbol"})(de||(de={}));var F;(function(e){e.Line="line",e.Space="space"})(F||(F={}));var M;(function(e){e.Lower="lower",e.Main="main",e.Upper="upper"})(M||(M={}));var L;(function(e){e[e.Treble=1]="Treble",e[e.MezzoSoprano=2]="MezzoSoprano",e[e.Alto=3]="Alto",e[e.Tenor=4]="Tenor",e[e.BaritoneF=5]="BaritoneF",e[e.BaritoneC=6]="BaritoneC",e[e.Bass=7]="Bass",e[e.Subbass=8]="Subbass"})(L||(L={}));var S;(function(e){e.Cb="Cb",e.Gb="Gb",e.Db="Db",e.Ab="Ab",e.Eb="Eb",e.Bb="Bb",e.F="F",e.C="C",e.G="G",e.D="D",e.A="A",e.E="E",e.B="B",e["F#"]="F#",e["C#"]="C#"})(S||(S={}));var A;(function(e){e[e.DO=1]="DO",e[e.RE=2]="RE",e[e.MI=3]="MI",e[e.FA=4]="FA",e[e.SOL=5]="SOL",e[e.LA=6]="LA",e[e.TI=7]="TI"})(A||(A={}));var T;(function(e){e.C="C",e.D="D",e.E="E",e.F="F",e.G="G",e.A="A",e.B="B"})(T||(T={}));var f;(function(e){e.None="",e.Natural="&",e.Sharp="#",e.Flat="b",e.DoubleSharp="##",e.DoubleFlat="bb"})(f||(f={}));var ft;(function(e){e.None="",e.Single=".",e.Double="..",e.Triple="..."})(ft||(ft={}));var x;(function(e){e[e.whole=1]="whole",e[e.half=2]="half",e[e.quarter=4]="quarter",e[e.eighth=8]="eighth",e[e.sixteenth=16]="sixteenth",e[e.thirtySecond=32]="thirtySecond",e[e.sixtyFourth=64]="sixtyFourth"})(x||(x={}));var h;(function(e){e.NoteHead="noteHead",e.NoteStem="noteStem",e.NoteTail="noteTail",e.NoteNumber="noteNumber",e.ChronaxieReducingLine="chronaxieReducingLine",e.ChronaxieIncreasingLine="chronaxieIncreasingLine",e.NoteDot="noteDot",e.Rest="rest",e.Slur="slur",e.Tie="tie",e.DurationDot="durationDot",e.Accidental="accidental",e.Tuplet="tuplet",e.Clef="clef",e.Clef_f="clef_f",e.KeySignature="keySignature",e.TimeSignature="timeSignature",e.BarLine="barLine",e.BarLine_f="barLine_f"})(h||(h={}));var Ne;(function(e){e[e.standardStaff=1]="standardStaff",e[e.numberNotation=2]="numberNotation",e[e.rhythmNotation=3]="rhythmNotation",e[e.percussion=4]="percussion"})(Ne||(Ne={}));var z;(function(e){e[e.singleMeasure=1]="singleMeasure",e[e.multipleMeasure=2]="multipleMeasure"})(z||(z={}));var ht;(function(e){e[e.volta=1]="volta",e[e.slur=2]="slur",e[e.tie=3]="tie"})(ht||(ht={}));var pt;(function(e){e[e.msSymbol=1]="msSymbol",e[e.measure=2]="measure",e[e.singleStaff=3]="singleStaff",e[e.multipleStaves=4]="multipleStaves"})(pt||(pt={}));var O;(function(e){e[e.frontFixed=1]="frontFixed",e[e.rearFixed=2]="rearFixed",e[e.variable=3]="variable",e[e.span=4]="span"})(O||(O={}));var P;(function(e){e[e.single=1]="single",e[e.final=2]="final",e[e.reverseFinal=3]="reverseFinal",e[e.startRepeatSign=4]="startRepeatSign",e[e.endRepeatSign=5]="endRepeatSign"})(P||(P={}));var yt;(function(e){e[e.highlight=1]="highlight"})(yt||(yt={}));var St;(function(e){e[e.normal=1]="normal",e[e.edit=2]="edit"})(St||(St={}));var bt;(function(e){e[e.note=1]="note",e[e.rest=2]="rest"})(bt||(bt={}));var Qe;(function(e){e[e.left=1]="left"})(Qe||(Qe={}));function ln(e){return e>=x.eighth}function cn(e){return e!==x.whole}function zt(e,t){let n=f.None;if(!e.msSymbolArray)return{accidental:n,measureAccidental:f.None};const o=W(e.index,t),i=o.msSymbolContainer,a=o.measure,l=o.singleStaff,d=a==null?void 0:a.index.measureIndex,u=i==null?void 0:i.index.msSymbolContainerIndex;if(!i||!a||!l||u==null||d==null)return console.error("索引数据查找出错,获取符号的谱号失败"),{accidental:n,measureAccidental:f.None};let c=f.None;for(let s=d;s>=0;s--){const m=l.measureArray[s];if(s===d)for(let g=u;g>=0;g--){const y=m.msSymbolContainerArray[g].msSymbolArray[0];if(h.Accidental===y.type){c=y.accidental;break}}else for(let g=m.msSymbolContainerArray.length-1;g>=0;g--){const y=m.msSymbolContainerArray[g].msSymbolArray[0];if(h.Accidental===y.type){c=y.accidental;break}}}for(let s of e.msSymbolArray)if(s.type===h.Accidental)return n=s.accidental,{accidental:n,measureAccidental:c};return{accidental:n,measureAccidental:c}}function Tt(e,t){const n=W(e.index,t),o=n.msSymbolContainer,i=n.measure,a=n.singleStaff,l=i==null?void 0:i.index.measureIndex,d=o==null?void 0:o.index.msSymbolContainerIndex;if(!o||!i||!a||d==null||l==null)return console.error("索引数据查找出错,获取符号的谱号失败"),S.C;for(let u=l;u>=0;u--){const c=a.measureArray[u];if(u===l)for(let s=d;s>=0;s--){const g=c.msSymbolContainerArray[s].msSymbolArray[0];if(h.KeySignature===g.type)return g.keySignature}else for(let s=c.msSymbolContainerArray.length-1;s>=0;s--){const g=c.msSymbolContainerArray[s].msSymbolArray[0];if(h.KeySignature===g.type)return g.keySignature}}return S.C}function nt(e,t){const n=W(e.index,t),o=n.msSymbolContainer,i=n.measure,a=n.singleStaff,l=i==null?void 0:i.index.measureIndex,d=o==null?void 0:o.index.msSymbolContainerIndex;if(!o||!i||!a||d==null||l==null)return console.error("索引数据查找出错,获取符号的谱号失败"),L.Treble;for(let u=l;u>=0;u--){const c=a.measureArray[u];if(u===l)for(let s=d;s>=0;s--){const g=c.msSymbolContainerArray[s].msSymbolArray[0];if(h.Clef===g.type||h.Clef_f===g.type)return g.clef}else for(let s=c.msSymbolContainerArray.length-1;s>=0;s--){const g=c.msSymbolContainerArray[s].msSymbolArray[0];if(h.Clef===g.type||h.Clef_f===g.type)return g.clef}}return L.Treble}function un(e,{level:t="symbol",order:n="asc",callback:o}){const i=l=>n==="asc"?[...Array(l).keys()]:[...Array(l).keys()].reverse(),a=e.multipleStavesArray;for(const l of i(a.length)){const d=a[l];if(t==="multipleStaves"){if(o({multipleStavesIndex:l,singleStaffIndex:-1,measureIndex:-1,multipleStaves:d}))return;continue}for(const u of i(d.singleStaffArray.length)){const c=d.singleStaffArray[u];if(t==="singleStaff"){if(o({multipleStavesIndex:l,singleStaffIndex:u,measureIndex:-1,multipleStaves:d,singleStaff:c}))return;continue}for(const s of i(c.measureArray.length)){const m=c.measureArray[s];if(t==="measure"){if(o({multipleStavesIndex:l,singleStaffIndex:u,measureIndex:s,multipleStaves:d,singleStaff:c,measure:m}))return;continue}for(const g of i(m.msSymbolContainerArray.length)){const p=m.msSymbolContainerArray[g];if(t==="container"){if(o({multipleStavesIndex:l,singleStaffIndex:u,measureIndex:s,msSymbolContainerIndex:g,multipleStaves:d,singleStaff:c,measure:m,msSymbolContainer:p}))return;continue}for(const y of i(p.msSymbolArray.length)){const v=p.msSymbolArray[y];if(o({multipleStavesIndex:l,singleStaffIndex:u,measureIndex:s,msSymbolContainerIndex:g,msSymbolIndex:y,multipleStaves:d,singleStaff:c,measure:m,msSymbolContainer:p,msSymbol:v}))return}}}}}}function dn(e,t,n,o){if(t.multipleStavesIndex==null||e.multipleStavesIndex==null||e.measureIndex==null||t.measureIndex==null||e.singleStaffIndex==null)return console.error("索引元素有误,无法正确执行traverseMeasure");const i=e.singleStaffIndex,a=W(e,n),l=W(t,n),d=a.singleStaff;l.singleStaff;const u=a.multipleStaves,c=l.multipleStaves;if(u===c){if(d==null||u==null)return console.error("索引元素有误,无法正确执行traverseMeasure");for(let s=e.measureIndex;s<=t.measureIndex;s++){const m=d.measureArray[s];o(m,d,u)}}else for(let s=e.multipleStavesIndex;s<=t.multipleStavesIndex;s++){const m=n.multipleStavesArray[s],g=m.singleStaffArray[i];if(u===m)for(let p=e.measureIndex;p<g.measureArray.length;p++){const y=g.measureArray[p];o(y,g,m)}else if(u!==m&&c!==m)for(let p=0;p<g.measureArray.length;p++){const y=g.measureArray[p];o(y,g,m)}else if(c===m&&u!==c)for(let p=0;p<t.measureIndex;p++){const y=g.measureArray[p];o(y,g,m)}}}function mn(e){e.multipleStavesArray.forEach((t,n)=>{t.index={multipleStavesIndex:n,singleStaffIndex:-1,measureIndex:-1,msSymbolContainerIndex:-1,msSymbolIndex:-1},gn(t)})}function gn(e){const t=e.index.multipleStavesIndex;if(t==null)return console.error("数据有误,复谱表索引生成失败");e.singleStaffArray.forEach((n,o)=>{n.index={multipleStavesIndex:t,singleStaffIndex:o,measureIndex:-1,msSymbolContainerIndex:-1,msSymbolIndex:-1},Ot(n)})}function Ot(e){const t=e.index.singleStaffIndex,n=e.index.multipleStavesIndex;if(n==null||t==null)return console.error("数据有误,单谱表索引生成失败");e.measureArray.forEach((o,i)=>{o.index={multipleStavesIndex:n,singleStaffIndex:t,measureIndex:i,msSymbolContainerIndex:-1,msSymbolIndex:-1},ze(o)})}function ze(e){const t=e.index.singleStaffIndex,n=e.index.multipleStavesIndex,o=e.index.measureIndex;if(n==null||t==null||o==null)return console.error("数据有误,符号容器索引生成失败");e.msSymbolContainerArray.forEach((i,a)=>{i.index={multipleStavesIndex:n,singleStaffIndex:t,measureIndex:o,msSymbolContainerIndex:a,msSymbolIndex:-1},Xe(i)})}function Xe(e){const t=e.index.singleStaffIndex,n=e.index.multipleStavesIndex,o=e.index.measureIndex,i=e.index.msSymbolContainerIndex;if(n==null||t==null||o==null||i==null)return console.error("数据有误,符号索引生成失败");e.msSymbolArray.forEach((a,l)=>{const d={multipleStavesIndex:n,singleStaffIndex:t,measureIndex:o,msSymbolContainerIndex:i,msSymbolIndex:l};a.index=d,ot(a)})}function ot(e,t){let n=null;n=e,n.msSymbolArray.forEach((o,i)=>{o.index=n.index,o.msSymbolArray.length>0&&ot(o)})}function fn(e){const t=e.map;for(let n=0;n<e.multipleStavesArray.length;n++){const o=e.multipleStavesArray[n];t[o.id]=o;for(let i=0;i<o.singleStaffArray.length;i++){const a=o.singleStaffArray[i];t[a.id]=a;for(let l=0;l<a.measureArray.length;l++){const d=a.measureArray[l];t[d.id]=d;for(let u=0;u<d.msSymbolContainerArray.length;u++){const c=d.msSymbolContainerArray[u];t[c.id]=c;for(let s=0;s<c.msSymbolArray.length;s++){const m=c.msSymbolArray[s];t[m.id]=m}}}}}}function V(e){if(e.region===M.Main)return(e.index-1)*2+(e.type===F.Space?1:0);if(e.region===M.Lower)return-(e.index*2)+(e.type===F.Space?1:0);if(e.region===M.Upper)return 8+e.index*2+(e.type===F.Space?1:0);throw new Error("Invalid StaffRegion")}function Ke(e){if(e>=0&&e<=9){const t=e%2===0?F.Line:F.Space,n=Math.floor(e/2)+1,o=Math.floor(e/2)+1;return{region:M.Main,type:t,index:t===F.Line?n:o}}if(e<0){const t=Math.abs(e),n=t%2===0?F.Line:F.Space,o=Math.floor((t+1)/2);return{region:M.Lower,type:n,index:o}}if(e>=10){const t=e-10,n=t%2===0?F.Line:F.Space,o=Math.floor(t/2)+1;return{region:M.Upper,type:n,index:o}}throw new Error("Invalid index for StaffRegion")}function vt(e){return typeof e=="number"?e<=3?"up":"down":V(e)<=3?"up":"down"}function je(e,t){const n=t[e];if(n)return n;console.warn("此id元素不存在")}function W(e,t){const n={multipleStaves:null,singleStaff:null,measure:null,msSymbolContainer:null,msSymbol:null};if(e.multipleStavesIndex!==-1){const o=t.multipleStavesArray[e.multipleStavesIndex];if(n.multipleStaves=o,e.singleStaffIndex!==-1){const i=o.singleStaffArray[e.singleStaffIndex];if(n.singleStaff=i,e.measureIndex!==-1){const a=i.measureArray[e.measureIndex];if(n.measure=a,e.msSymbolContainerIndex!==-1){const l=a.msSymbolContainerArray[e.msSymbolContainerIndex];n.msSymbolContainer=l,e.msSymbolIndex!==-1&&(n.msSymbol=l.msSymbolArray[e.msSymbolIndex])}}}}return n}function hn(e,t){const n=new Set;return e.bindingEndId.forEach(o=>{n.add(o)}),e.bindingStartId.forEach(o=>{n.add(o)}),e.msSymbolContainerArray.forEach((o,i)=>{o.msSymbolArray.forEach((a,l)=>{a.bindingEndId.forEach(d=>{n.add(d)}),a.bindingStartId.forEach(d=>{n.add(d)})})}),n}function rt(e,t){let n=new Set;return e.measureArray.forEach(o=>{const i=hn(o);n=new Set([...n,...i])}),n}function it(e,t){t.spanSymbolArray.forEach(n=>{e.has(n.id)&&(n.vueKey=Date.now())})}function De(e,t){const n=W(e.index,t).msSymbol;return n||(console.error("获取主符号失败"),e)}function Be(e,t){const n=[];return e===-1?[]:(t.msSymbolContainerArray.forEach(o=>{o.msSymbolArray.forEach(i=>{if(i.type===h.NoteHead&&i.beamId===e){const a={beamId:i.beamId,note:i,region:i.region,chronaxie:i.chronaxie};n.push(a)}})}),n)}function Pt(e,t){e.id=t.id,e.bindingEndId=t.bindingEndId,e.bindingStartId=t.bindingStartId}function G(e={}){const t={id:Math.random()*Date.now()+1,msTypeName:de.MsSymbol,index:{multipleStavesIndex:-1,singleStaffIndex:-1,measureIndex:-1,msSymbolContainerIndex:-1,msSymbolIndex:-1},options:{highlight:!1,highlightColor:"red",color:"black"},bindingStartId:[],bindingEndId:[],msSymbolArray:[],vueKey:Math.random()*Date.now()};switch(e.type){case h.NoteHead:{const n=e.region||{region:M.Main,type:F.Line,index:1};if(!e.chronaxie||![x.whole].includes(e.chronaxie)){const o=G({type:h.NoteStem,direction:vt(V(n))});t.msSymbolArray.push(o)}if(e.chronaxie&&![x.whole,x.half,x.quarter].includes(e.chronaxie)){const o=G({type:h.NoteTail,chronaxie:e.chronaxie||x.quarter,direction:vt(n)});t.msSymbolArray.push(o)}return{...t,beamId:-1,type:h.NoteHead,region:n,chronaxie:e.chronaxie||x.quarter}}case h.NoteDot:return{...t,type:h.NoteDot,octave:e.octave??4};case h.NoteNumber:{e.chronaxie&&[x.whole,x.half].includes(e.chronaxie)&&(console.error("noteNumber的时值最大为四分音符"),e.chronaxie=x.quarter);const n={...t,type:h.NoteNumber,solmization:e.solmization||A.DO,chronaxie:e.chronaxie||x.quarter,octave:e.octave??4,beamId:-1};if(e.chronaxie&&![x.quarter].includes(e.chronaxie)){const o=G({type:h.ChronaxieReducingLine,chronaxie:e.chronaxie});t.msSymbolArray.push(o)}return n}case h.ChronaxieIncreasingLine:return{...t,type:h.ChronaxieIncreasingLine};case h.ChronaxieReducingLine:return{...t,type:h.ChronaxieReducingLine,chronaxie:e.chronaxie??x.eighth};case h.Rest:return{...t,type:h.Rest,chronaxie:e.chronaxie||x.quarter};case h.BarLine:{const n=e.barLineType??P.single;return P.endRepeatSign===n||P.startRepeatSign===n?{...t,type:h.BarLine,barLineType:n,loopCount:2}:{...t,type:h.BarLine,barLineType:n}}case h.BarLine_f:{const n=e.barLineType??P.single;return P.endRepeatSign===n||P.startRepeatSign===n?{...t,type:h.BarLine_f,barLineType:n,loopCount:2}:{...t,type:h.BarLine_f,barLineType:n}}case h.NoteStem:return{...t,direction:e.direction||"up",type:h.NoteStem};case h.NoteTail:return{...t,type:h.NoteTail,chronaxie:e.chronaxie||x.quarter,beamType:Qe.left,direction:e.direction||"up"};case h.Clef_f:return{...t,type:h.Clef_f,clef:e.clef||L.Treble};case h.Clef:return{...t,type:h.Clef,clef:e.clef||L.Treble};case h.KeySignature:return{...t,type:h.KeySignature,keySignature:e.keySignature||S.C};case h.TimeSignature:return{...t,type:h.TimeSignature,timeSignature:e.timeSignature||{beat:1,chronaxie:4}};case h.Accidental:return{...t,type:h.Accidental,accidental:e.accidental||f.Sharp};default:return console.error("type不被识别,符号模版返回noteHead"),{...t,type:h.NoteHead,region:e.region||{region:M.Main,type:F.Line,index:1},chronaxie:e.chronaxie||x.quarter,beamId:-1}}}function Te(e={}){return{id:Math.random()*Date.now()+2,msSymbolArray:[],type:e.type||O.variable,index:{multipleStavesIndex:-1,singleStaffIndex:-1,measureIndex:-1,msSymbolContainerIndex:-1,msSymbolIndex:-1},bindingStartId:[],bindingEndId:[],options:{highlight:!1,highlightColor:"red",color:"black"},vueKey:Math.random()*Date.now(),msTypeName:de.MsSymbolContainer}}function at(e,t){t.map[e.id]=e}function st(e,t){t.map[e]&&delete t.map[e]}function Se(e,t,n){t.msSymbolArray.push(e),ot(t),at(e,n)}function be(e,t,n,o="after"){if(t.msTypeName===de.MsSymbol){if(typeof o=="number"){console.error("以符号为定位元素添加符号时,position只可以传after或before");return}const l=W(t.index,n).msSymbolContainer,d=W(t.index,n).msSymbol;if(!l)return console.error("符号容器不存在,符号添加失败");if(!d)return console.error("符号不存在,符号添加失败");const u=l.msSymbolArray,c=u.findIndex(s=>s===d);o==="before"?u.splice(c,0,e):u.splice(c+1,0,e),Xe(l)}else if(t.msTypeName===de.MsSymbolContainer){const l=t;if(!l)return console.error("小节不存在,符号容器添加失败");const d=l.msSymbolArray;if(o===-1||typeof o=="string")d.push(e);else if(o>=0&&o<=d.length)d.splice(o,0,e);else{console.error("索引有误,符号添加失败");return}Xe(l)}if(at(e,n),!("index"in t))return console.error("当前选中对象缺少index,符号添加失败");const i=W(t.index,n).singleStaff;if(!i)return console.error("单谱表查找出错,符号添加失败");Ot(i);const a=rt(i);it(a,n)}function ce(e,t,n,o="after"){if(t.msTypeName===de.MsSymbolContainer){if(typeof o=="number"){console.error("以符号容器为定位元素添加符号容器时,position只可以传after或before");return}const i=W(t.index,n).measure,a=W(t.index,n).msSymbolContainer;if(!i)return console.error("小节不存在,符号容器添加失败");if(!a)return console.error("符号容器不存在,符号容器添加失败");const l=i.msSymbolContainerArray,d=l.findIndex(u=>u===a);o==="before"?l.splice(d,0,e):l.splice(d+1,0,e),ze(i)}else if(t.msTypeName===de.Measure){const i=t;if(!i)return console.error("小节不存在,符号容器添加失败");const a=i.msSymbolContainerArray;if(o===-1||typeof o=="string")a.push(e);else if(o>=0&&o<=a.length)a.splice(o,0,e);else{console.error("索引有误,符号容器添加失败");return}ze(i)}at(e,n)}function pn(e,t){const n=W(e.index,t),o=n.measure,i=n.singleStaff;if(!o||!i)return console.error("索引数据出错,符号容器移除失败");const a=o.msSymbolContainerArray,l=a.findIndex(u=>u===e);if(l===-1)return console.error("找不到目标符号容器");a.splice(l,1),st(e.id,t),ze(o),Sn(e,t);const d=rt(i);it(d,t)}function yn(e,t){for(let n=t.spanSymbolArray.length-1;n>=0;n--){const o=t.spanSymbolArray[n];(e.bindingStartId.includes(o.id)||e.bindingEndId.includes(o.id))&&(Gt(o,t),st(o.id,t))}}function Sn(e,t){e.msSymbolArray.forEach(n=>{yn(n,t)});for(let n=t.spanSymbolArray.length-1;n>=0;n--){const o=t.spanSymbolArray[n];(e.bindingStartId.includes(o.id)||e.bindingEndId.includes(o.id))&&(Gt(o,t),st(o.id,t))}}function Gt(e,t){const n=t.spanSymbolArray.indexOf(e),o=e.startTargetId,i=e.endTargetId;t.spanSymbolArray.splice(n,1);const a=e.id,l=t.map[o];l&&"bindingStartId"in l&&l.bindingStartId.indexOf(a)!==-1&&l.bindingStartId.splice(n,1);const d=t.map[i];d&&"bindingEndId"in d&&d.bindingEndId.indexOf(a)!==-1&&d.bindingEndId.splice(n,1)}function Je(e,t){t.direction=e,t.vueKey=Math.random()*Date.now()}function _e(e,t){t.direction=e,t.vueKey=Math.random()*Date.now()}function bn(e,t,n){const o=[];let i="up",a=4,l=!1;for(const d in t.msSymbolContainerArray){const u=t.msSymbolContainerArray[d];for(const c in u.msSymbolArray){const s=u.msSymbolArray[c];if(s.type===h.NoteHead&&![x.whole,x.half,x.quarter].includes(s.chronaxie)){const m=Math.abs(V(s.region)-4),g=Math.abs(a-4);m>g&&(a=V(s.region));const p=s.msSymbolArray.find(v=>v.type===h.NoteStem),y=s.msSymbolArray.find(v=>v.type===h.NoteTail);y&&p&&s.beamId===e&&(o.push({noteStem:p,noteTail:y}),l=!0)}else if(l)break}}i=a>=3?"down":"up";for(const d in o){const u=o[d].noteStem,c=o[d].noteTail;Je(i,u),_e(i,c)}}T.C,f.None,T.C,f.Sharp,T.D,f.None,T.D,f.Sharp,T.E,f.None,T.F,f.None,T.F,f.Sharp,T.G,f.None,T.G,f.Sharp,T.A,f.None,T.A,f.Sharp,T.B,f.None;const vn={[S.Cb]:59,[S.Gb]:66,[S.Db]:61,[S.Ab]:68,[S.Eb]:63,[S.Bb]:70,[S.F]:65,[S.C]:60,[S.G]:67,[S.D]:62,[S.A]:69,[S.E]:64,[S.B]:71,"F#":66,"C#":61};function xn(e,t,n,o){const i=vn[n];let l={[A.DO]:0,[A.RE]:2,[A.MI]:4,[A.FA]:5,[A.SOL]:7,[A.LA]:9,[A.TI]:11}[e];switch(t){case f.Sharp:l+=1;break;case f.Flat:l-=1;break;case f.DoubleSharp:l+=2;break;case f.DoubleFlat:l-=2;break;case f.None:break}return i+(o-4)*12+l}f.Natural,f.Sharp,f.Flat;f.Natural,f.Flat,f.Sharp;function wn(e,t,n=f.Sharp){const o=["C","D","E","F","G","A","B"],i={0:["C",f.None],1:["C",f.Sharp],2:["D",f.None],3:["D",f.Sharp],4:["E",f.None],5:["F",f.None],6:["F",f.Sharp],7:["G",f.None],8:["G",f.Sharp],9:["A",f.None],10:["A",f.Sharp],11:["B",f.None]},a={0:["C",f.None],1:["D",f.Flat],2:["D",f.None],3:["E",f.Flat],4:["E",f.None],5:["F",f.None],6:["G",f.Flat],7:["G",f.None],8:["A",f.Flat],9:["A",f.None],10:["B",f.Flat],11:["B",f.None]},l=n===f.Sharp?i:a,d=(e%12+12)%12,[u,c]=l[d],s=Math.floor(e/12)-1,m=o.indexOf(u),g=s*7+m;function p(H,Q){const ie=o.indexOf(H);return Q*7+ie}const y={[L.Treble]:{diatonic:p("G",4),staffStep:2},[L.MezzoSoprano]:{diatonic:p("C",4),staffStep:2},[L.Alto]:{diatonic:p("C",4),staffStep:4},[L.Tenor]:{diatonic:p("C",4),staffStep:6},[L.BaritoneF]:{diatonic:p("F",3),staffStep:4},[L.BaritoneC]:{diatonic:p("C",4),staffStep:8},[L.Bass]:{diatonic:p("F",3),staffStep:6},[L.Subbass]:{diatonic:p("F",2),staffStep:6}},v=y[t]??y[L.Treble],k=g-v.diatonic+v.staffStep;let w,N,C;if(k>=0&&k<=8)w=M.Main,k%2===0?(N=F.Line,C=Math.floor(k/2)+1):(N=F.Space,C=Math.floor((k+1)/2));else if(k<0){w=M.Lower;const H=-k;H%2===1?(N=F.Space,C=Math.floor((H+1)/2)):(N=F.Line,C=H/2)}else{w=M.Upper;const H=k-8;H%2===1?(N=F.Space,C=Math.floor((H+1)/2)):(N=F.Line,C=H/2)}return{staffRegion:{region:w,type:N,index:C},accidental:c}}const In={[L.Treble]:{[M.Main]:64,[M.Upper]:79,[M.Lower]:62},[L.MezzoSoprano]:{[M.Main]:57,[M.Upper]:72,[M.Lower]:55},[L.Alto]:{[M.Main]:53,[M.Upper]:69,[M.Lower]:52},[L.Tenor]:{[M.Main]:50,[M.Upper]:65,[M.Lower]:48},[L.BaritoneF]:{[M.Main]:47,[M.Upper]:62,[M.Lower]:45},[L.BaritoneC]:{[M.Main]:53,[M.Upper]:62,[M.Lower]:52},[L.Bass]:{[M.Main]:43,[M.Upper]:60,[M.Lower]:41},[L.Subbass]:{[M.Main]:28,[M.Upper]:43,[M.Lower]:26}},Mn=[2,2,1,2,2,2,1],Cn={0:0,2:1,4:2,5:3,7:4,9:5,11:6};function kn(e,t){return t=(t%e.length+e.length)%e.length,e.slice(t).concat(e.slice(0,t))}function An(e,t,n){const o=In[n];if(!o||typeof o[M.Main]!="number")throw new Error(`No clef mapping for clef ${n}. please add clefMidiMap entry.`);const i=o[M.Main],{region:a,type:l,index:d}=e;if(d<1)throw new Error("StaffRegion.index should be >= 1");let u;if(a===M.Main)u=(d-1)*2+(l===F.Space?1:0);else if(a===M.Upper)u=8+(d-1)*2+(l===F.Space?1:2);else if(a===M.Lower)u=-((d-1)*2+(l===F.Space?1:2));else throw new Error("Unknown StaffRegionEnum: "+a);const c=(i%12+12)%12;let s=Cn[c];s===void 0&&(s=0);const m=kn(Mn,s);let g=0;if(u>0)for(let y=0;y<u;y++)g+=m[y%m.length];else if(u<0){const y=Math.abs(u);for(let v=0;v<y;v++)(m.length-1-v)%m.length,g-=m[(m.length-1-v%7)%m.length]}let p=0;switch(t){case f.Sharp:p=1;break;case f.Flat:p=-1;break;case f.DoubleSharp:p=2;break;case f.DoubleFlat:p=-2;break;default:p=0}return i+g+p}f.Natural,f.Sharp,f.Flat;f.Natural,f.Flat,f.Sharp;const Nn={[S.Cb]:59,[S.Gb]:66,[S.Db]:61,[S.Ab]:68,[S.Eb]:63,[S.Bb]:70,[S.F]:65,[S.C]:60,[S.G]:67,[S.D]:62,[S.A]:69,[S.E]:64,[S.B]:71,"F#":66,"C#":61},Ln={0:{sharp:{solmization:A.DO,accidental:f.None},flat:{solmization:A.DO,accidental:f.None}},1:{sharp:{solmization:A.DO,accidental:f.Sharp},flat:{solmization:A.RE,accidental:f.Flat}},2:{sharp:{solmization:A.RE,accidental:f.None},flat:{solmization:A.RE,accidental:f.None}},3:{sharp:{solmization:A.RE,accidental:f.Sharp},flat:{solmization:A.MI,accidental:f.Flat}},4:{sharp:{solmization:A.MI,accidental:f.None},flat:{solmization:A.MI,accidental:f.None}},5:{sharp:{solmization:A.FA,accidental:f.None},flat:{solmization:A.FA,accidental:f.None}},6:{sharp:{solmization:A.FA,accidental:f.Sharp},flat:{solmization:A.SOL,accidental:f.Flat}},7:{sharp:{solmization:A.SOL,accidental:f.None},flat:{solmization:A.SOL,accidental:f.None}},8:{sharp:{solmization:A.SOL,accidental:f.Sharp},flat:{solmization:A.LA,accidental:f.Flat}},9:{sharp:{solmization:A.LA,accidental:f.None},flat:{solmization:A.LA,accidental:f.None}},10:{sharp:{solmization:A.LA,accidental:f.Sharp},flat:{solmization:A.TI,accidental:f.Flat}},11:{sharp:{solmization:A.TI,accidental:f.None},flat:{solmization:A.TI,accidental:f.None}}};function Dn(e,t,n=f.Sharp){const o=Nn[t],i=e-o,a=(i%12+12)%12,l=Math.floor(i/12)+4,d=Ln[a],u=n===f.Sharp?d.sharp:d.flat;return{solmization:u.solmization,accidental:u.accidental,octave:l}}function Bn(e){e.showMode=Ne.numberNotation;for(let t=0;t<e.multipleStavesArray.length;t++){const n=e.multipleStavesArray[t];for(let o=0;o<n.singleStaffArray.length;o++){const i=n.singleStaffArray[o];for(let a=0;a<i.measureArray.length;a++){const l=i.measureArray[a];for(let d=0;d<l.msSymbolContainerArray.length;d++){const u=l.msSymbolContainerArray[d];for(let c=0;c<u.msSymbolArray.length;c++){const s=u.msSymbolArray[c];if(s.type===h.NoteHead){const m=G({type:h.NoteNumber,chronaxie:x.quarter});Pt(m,s);const{accidental:g,measureAccidental:p}=zt(s,e);let y=g;p&&y===f.Natural&&(y=p);const v=nt(s,e),k=Tt(s,e),w=An(s.region,y,v),N=Dn(w,k);if(m.solmization=N.solmization,m.octave=N.octave,m.msSymbolArray=[],[x.whole,x.half,x.quarter].includes(s.chronaxie)||(m.chronaxie=s.chronaxie),u.msSymbolArray.splice(c,1),be(m,u,e,c),N.octave!==4){const C=G({type:h.NoteDot,octave:N.octave});Se(C,m,e)}if(![x.whole,x.half,x.quarter].includes(m.chronaxie)){const C=G({type:h.ChronaxieReducingLine,chronaxie:m.chronaxie});Se(C,m,e)}if(N.accidental){const C=G({type:h.Accidental,accidental:N.accidental});Se(C,m,e)}}if(s.type===h.NoteHead){if(s.chronaxie===x.whole){for(let m=0;m<3;m++){const g=G({type:h.ChronaxieIncreasingLine}),p=Te({type:O.variable});ce(p,u,e,"after"),be(g,p,e,"after")}d+=3}else if(s.chronaxie===x.half){const m=G({type:h.ChronaxieIncreasingLine}),g=Te({type:O.variable});ce(g,u,e,"after"),be(m,g,e,"after"),d+=1}}}}}}}}function Hn(e){var t;for(let n=0;n<e.multipleStavesArray.length;n++){const o=e.multipleStavesArray[n];for(let i=0;i<o.singleStaffArray.length;i++){const a=o.singleStaffArray[i];for(let l=0;l<a.measureArray.length;l++){const d=a.measureArray[l];for(let u=0;u<d.msSymbolContainerArray.length;u++){const c=d.msSymbolContainerArray[u];for(let s=0;s<c.msSymbolArray.length;s++){const m=c.msSymbolArray[s];if(m.type===h.ChronaxieIncreasingLine){pn(c,e),u--;continue}if(m.type===h.NoteNumber){const g=G({type:h.NoteHead});Pt(g,m);const{accidental:p,measureAccidental:y}=zt(m,e);let v=p;y&&v===f.Natural&&(v=y);const k=nt(m,e),w=Tt(m,e),N=xn(m.solmization,v,w,m.octave),C=wn(N,k);if(g.region=C.staffRegion,g.vueKey=Date.now(),g.msSymbolArray=[],m.chronaxie===x.quarter){let B=0;for(let H=u+1;H<d.msSymbolContainerArray.length&&((t=d.msSymbolContainerArray[H])==null?void 0:t.msSymbolArray[0]).type===h.ChronaxieIncreasingLine;H++)B++;B===0?g.chronaxie=x.quarter:B===1?g.chronaxie=x.half:B===3&&(g.chronaxie=x.whole)}else g.chronaxie=m.chronaxie;if(c.msSymbolArray.splice(s,1),be(g,c,e,s),C.accidental){const B=G({type:h.Accidental,accidental:C.accidental});Se(B,g,e)}if(cn(g.chronaxie)){const B=G({type:h.NoteStem});B.index=g.index,Se(B,g,e)}if(ln(g.chronaxie)){const B=G({type:h.NoteTail,chronaxie:g.chronaxie});Se(B,g,e)}}}}}}}e.showMode=Ne.standardStaff}L.Treble+"",L.MezzoSoprano+"",L.Alto+"",L.Tenor+"",L.BaritoneF+"",L.BaritoneC+"",L.Bass+"",L.Subbass+"";f.Natural,f.Sharp,f.Flat;f.Natural,f.Flat,f.Sharp;T.C+"",T.D+"",T.E+"",T.F+"",T.G+"",T.A+"",T.B+"";f.None+"",f.Sharp+"",f.Flat+"",f.DoubleFlat+"",f.DoubleSharp+"";const Rn={[S.Cb]:11,[S.Gb]:6,[S.Db]:1,[S.Ab]:8,[S.Eb]:3,[S.Bb]:10,[S.F]:5,[S.C]:0,[S.G]:7,[S.D]:2,[S.A]:9,[S.E]:4,[S.B]:11,[S["F#"]]:6,[S["C#"]]:1},q={[h.NoteHead]:{containerType:O.variable,aspectRatio:1,widthRatioConstant:1,category:z.singleMeasure,heightMultiplier:.25,space:{top:0,bottom:0,left:0,right:0}},[h.NoteNumber]:{containerType:O.variable,aspectRatio:1,widthRatioConstant:1,category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.NoteDot]:{aspectRatio:{0:1/.7,1:1/.5,2:1/.3,3:1/.1,5:1/.1,6:1/.3,7:1/.5,8:1/.7},category:z.singleMeasure,widthRatioConstant:0,heightMultiplier:{0:.7,1:.5,2:.3,3:.1,5:.1,6:.3,7:.5,8:.7},space:{top:.1,bottom:.1,left:0,right:0}},[h.ChronaxieIncreasingLine]:{containerType:O.variable,aspectRatio:5,widthRatioConstant:1,category:z.singleMeasure,heightMultiplier:.1,space:{top:0,bottom:0,left:0,right:0}},[h.ChronaxieReducingLine]:{aspectRatio:{[x.eighth]:1/.1,[x.sixteenth]:1/.15,[x.thirtySecond]:1/.2,[x.sixtyFourth]:1/.25},category:z.singleMeasure,widthRatioConstant:0,heightMultiplier:{[x.eighth]:.1,[x.sixteenth]:.15,[x.thirtySecond]:.2,[x.sixtyFourth]:.25},space:{top:0,bottom:.1,left:0,right:0}},[h.NoteStem]:{aspectRatio:.05,category:z.singleMeasure,widthRatioConstant:0,heightMultiplier:.75,space:{top:0,bottom:0,left:0,right:0}},[h.NoteTail]:{aspectRatio:{[x.eighth]:.5,[x.sixteenth]:.5},category:z.singleMeasure,widthRatioConstant:0,heightMultiplier:.5,space:{top:0,bottom:0,left:0,right:0}},[h.Rest]:{containerType:O.variable,aspectRatio:.25,widthRatioConstant:1,category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.Slur]:{category:z.multipleMeasure,space:{top:0,bottom:0,left:0,right:0}},[h.Tie]:{category:z.multipleMeasure,space:{top:0,bottom:0,left:0,right:0}},[h.DurationDot]:{aspectRatio:1,category:z.singleMeasure,widthRatioConstant:.5,heightMultiplier:.1,space:{top:0,bottom:0,left:0,right:0}},[h.Accidental]:{aspectRatio:1,category:z.singleMeasure,widthRatioConstant:.5,heightMultiplier:.4,space:{top:0,bottom:0,left:0,right:0}},[h.Tuplet]:{category:z.multipleMeasure,space:{top:0,bottom:0,left:0,right:0}},[h.Clef]:{containerType:O.rearFixed,aspectRatio:.6,category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.Clef_f]:{containerType:O.frontFixed,aspectRatio:.6,category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.TimeSignature]:{containerType:O.frontFixed,aspectRatio:.6,category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.KeySignature]:{containerType:O.frontFixed,aspectRatio:{[S.Cb]:.4*7,[S.Gb]:.4*6,[S.Db]:.4*5,[S.Ab]:.4*4,[S.Eb]:.4*3,[S.Bb]:.4*2,[S.F]:.4,[S.C]:0,[S.G]:.4,[S.D]:.4*2,[S.A]:.4*3,[S.E]:.4*4,[S.B]:.4*5,[S["F#"]]:.4*6,[S["C#"]]:.4*7},category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.BarLine]:{containerType:O.rearFixed,aspectRatio:{[P.single]:1/50,[P.final]:2/5,[P.reverseFinal]:2/5,[P.startRepeatSign]:3/5,[P.endRepeatSign]:3/5},category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}},[h.BarLine_f]:{containerType:O.frontFixed,aspectRatio:{[P.single]:1/400,[P.final]:2/5,[P.reverseFinal]:2/5,[P.startRepeatSign]:3/5,[P.endRepeatSign]:3/5},category:z.singleMeasure,heightMultiplier:1,space:{top:0,bottom:0,left:0,right:0}}};function qt(e){let t=0;const n=q[e.type];if(!n)return console.error("符号没有匹配到正确的information",e),t;if("widthRatioConstant"in n&&(t+=n.widthRatioConstant),e.msSymbolArray)for(let o=0;o<e.msSymbolArray.length;o++){const i=e.msSymbolArray[o],a=q[i.type];if(!n)return console.error("子符号没有匹配到正确的information",i),t;"widthRatioConstant"in a&&(t+=a.widthRatioConstant)}return t}function lt(e){let t=0;if(e.msSymbolArray)for(let n=0;n<e.msSymbolArray.length;n++){const o=e.msSymbolArray[n],i=qt(o);t<i&&(t=i)}return t}function me(e,t){let n=0;for(let o=0;o<e.msSymbolContainerArray.length;o++){const i=e.msSymbolContainerArray[o];if(t&&i===t)return n;n+=lt(i)}return n===0?1:n}function Vt(e,t,n){let o=0;for(let i=0;i<e.measureArray.length;i++){const a=e.measureArray[i];o+=me(a,n)}return o}const jn=Object.freeze(Object.defineProperty({__proto__:null,getWidthConstantInMeasure:me,getWidthConstantInMsSymbol:qt,getWidthConstantInMsSymbolContainer:lt,getWidthConstantInSingleStaff:Vt},Symbol.toStringTag,{value:"Module"}));function Wn(e){const t=q[e.type];if("aspectRatio"in t&&typeof t.aspectRatio=="object"){if(e.type===b.KeySignature)return t.aspectRatio[e.keySignature];if(e.type===b.BarLine||e.type===b.BarLine_f)return t.aspectRatio[e.barLineType];if(e.type===b.NoteTail)return t.aspectRatio[e.chronaxie];if(e.type===b.NoteDot)return t.aspectRatio[e.octave];if(e.type===b.ChronaxieReducingLine)return t.aspectRatio[e.chronaxie]}return console.error("符号有误或符号不是复合aspectRatio类型"),0}function fe(e){if(!(e!=null&&e.type))return console.error("缺少符号传参,宽高比获取失败"),1;const t=q[e.type];return"aspectRatio"in t&&typeof t.aspectRatio=="number"?t.aspectRatio:"aspectRatio"in t&&typeof t.aspectRatio=="object"?Wn(e):(console.error("未找到符号对应宽高比"),1)}function Fn(e){const t=q[e.type];if("heightMultiplier"in t&&typeof t.heightMultiplier=="object"){if(e.type===b.ChronaxieReducingLine)return t.heightMultiplier[e.chronaxie];if(e.type===b.NoteDot)return t.heightMultiplier[e.octave]}return console.error("符号有误或符号不是复合heightMultiplier类型"),0}function Ge(e){if(!(e!=null&&e.type))return console.error("缺少符号传参,高度乘数获取失败"),1;const t=q[e.type];return"heightMultiplier"in t&&typeof t.heightMultiplier=="number"?t.heightMultiplier:"heightMultiplier"in t&&typeof t.heightMultiplier=="object"?Fn(e):1}function ke(e,t){const n=q[e.type],o=t.measureHeight;return{top:n.space.top*o,bottom:n.space.bottom*o,left:n.space.left*o,right:n.space.right*o}}const zn=Object.freeze(Object.defineProperty({__proto__:null,getHeightMultiplier:Ge,getMsSymbolAspectRatio:fe,getSpace:ke},Symbol.toStringTag,{value:"Module"}));function ct(e,t){return t*((V(e)-1)*2)/16}function ut(e,t){const n=W(e.index,t).msSymbol,o=t.measureHeight;switch(e==null?void 0:e.type){case h.NoteStem:return e.direction==="up"?o/8:-Z(e,t)+o/8;case h.NoteTail:{te(e,t);const i=n==null?void 0:n.msSymbolArray.find(u=>u.type===h.NoteStem);if(!i)return console.error("找不到符杠,符尾bottom计算失败"),0;const a=o*1/8,l=Z(e,t),d=Z(i,t);return e.direction==="up"?d-l+a:-d+a}case h.NoteDot:{q[h.NoteDot];const i=ke(e,t).bottom,a=ke(e,t).top,l=De(e,t);let d=0;const u=l.msSymbolArray.find(s=>s.type===h.ChronaxieReducingLine);let c=0;return u&&(c=ke(u,t).bottom,d=Z(u,t)),[0,1,2,3].includes(e.octave)?-Z(e,t)-i-d-c:[5,6,7,8].includes(e.octave)?o+a:0}case h.ChronaxieIncreasingLine:{const l=q[h.ChronaxieIncreasingLine].heightMultiplier*o;return o/2-l/2}case h.ChronaxieReducingLine:{q[h.ChronaxieReducingLine];const i=Ge(e),a=ke(e,t).bottom;return-(i*o)-a}default:return 0}}function te(e,t){var i;if(!e)return 0;const n=t.measureHeight,o=(i=W(e.index,t))==null?void 0:i.msSymbol;switch(o.type){case h.NoteHead:{if(!o||t.showMode===Ne.numberNotation)return 0;const a=o.region;return ct(a,n)}default:return 0}}function Ut(e,t,n=!0){let o=0;t.measureHeight;for(let i of e.msSymbolArray){const a=te(i,t),l=Z(i,t),d=a+l;n?o=Math.max(d,o):o=Math.max(a,o)}return o}function $t(e,t){let n=1e4;for(let o of e.msSymbolArray){const i=te(o,t);n=Math.min(i,n)}return n}function Oe(e,t,n=!0){let o=0;for(let i of e.msSymbolContainerArray){const a=Ut(i,t,n);o=Math.max(a,o)}return o}function Zt(e,t){let n=1e4;for(let o of e.msSymbolContainerArray){const i=$t(o,t);n=Math.min(i,n)}return n}function Tn(e,t,n=!0){let o=0;for(let i of e.measureArray){const a=Oe(i,t,n);o=Math.max(a,o)}return o}function On(e,t){let n=1e4;for(let o of e.measureArray){const i=Zt(o,t);n=Math.min(i,n)}return n}function Ye(e,t,n){let o=0;return un(t,{level:"multipleStaves",order:"asc",callback:({multipleStaves:i})=>{if(!i)return!0;o+=i.multipleStavesPaddingTop;for(let a of i.singleStaffArray){o+=a.singleStaffPaddingTop+t.measureHeight;for(let l of a.measureArray)if(l===e)return!0;o+=a.singleStaffPaddingBottom+a.singleStaffMarginBottom}return o+=i.multipleStavesPaddingBottom+i.multipleStavesMarginBottom,!1}}),n-o}const Pn=Object.freeze(Object.defineProperty({__proto__:null,getMaxMsSymbolBottomInMeasure:Oe,getMaxMsSymbolBottomInMsSymbolContainer:Ut,getMaxMsSymbolBottomInSingleStaff:Tn,getMeasureBottomToMusicScore:Ye,getMinMsSymbolBottomInMeasure:Zt,getMinMsSymbolBottomInMsSymbolContainer:$t,getMinMsSymbolBottomInSingleStaff:On,getMsSymbolBottomToSlot:ut,getSlotBottomToMeasure:te,staffRegionToBottom:ct},Symbol.toStringTag,{value:"Module"}));function Qt(e,t){const n=W(e.index,t).msSymbol,o=q[e==null?void 0:e.type],i=t.measureHeight;let a=0;if("heightMultiplier"in o){const c=o.heightMultiplier;a=i*c}const l=i*1/8,d=W(n.index,t).measure;if(!d)return console.error("索引找不到measure,符杠height计算失败"),0;const u=Be(n.beamId,d);if(n.beamId===-1||!u||u.length===0){const c=te(e,t);return e.direction==="up"?Math.max(a,Math.abs(c)+a-l):Math.max(a,Math.abs(c)-i+a+l)}else{const c=te(e,t);if(e.direction==="up"){const s=u.reduce((g,p)=>{const y=g,v=p.note;return V(y.region)<V(v.region)?p.note:g},u[0].note),m=te(s,t);return V(s.region)>0?s===n?a:-c+m+a:-c-l+a}else{const s=u.reduce((g,p)=>{const y=g,v=p.note;return V(y.region)>V(v.region)?v:g},u[0].note),m=te(s,t);return V(s.region)<8?s===n?a:c-m+a:c-i+l+a}}}function Z(e,t){q[e==null?void 0:e.type];const n=t.measureHeight,o=Ge(e);switch(e.type){case b.NoteStem:return Qt(e,t);default:return n*o}}const Gn=Object.freeze(Object.defineProperty({__proto__:null,getMsSymbolHeight:Z,getNoteStemHeight:Qt},Symbol.toStringTag,{value:"Module"}));function Ae(e,t){let n=0;for(let o=0;o<e.msSymbolArray.length;o++){const i=e.msSymbolArray[o],a=q[i.type];let l=0;"aspectRatio"in a&&typeof a.aspectRatio=="number"?l+=a.aspectRatio*t:"aspectRatio"in a&&typeof a.aspectRatio=="object"?i.type===h.KeySignature?l+=a.aspectRatio[i.keySignature]*t:(i.type===h.BarLine||i.type===h.BarLine_f)&&(l+=a.aspectRatio[i.barLineType]*t):console.error("符号的svg宽高比不存在"),n<l&&(n=l)}return n}function ne(e,t,n,o,i){const a=o.measureHeight;if(!e||!t)return console.error("缺少必要的参数,坐标计算出错"),0;let l=0;const d=e.type;if([O.frontFixed,O.rearFixed].includes(d))l=Ae(e,a);else{const u=_(t,a),c=me(t),s=lt(e);l=(ge(t,n,o,i)-u)/c*s}return l}function ge(e,t,n,o){const i=Vt(t,n.showMode),a=me(e),l=Xt(t,n.measureHeight,n.showMode),d=_(e,n.measureHeight),u=t.measureArray.length,c=o-l,s=c/i*n.widthDynamicRatio,m=c*(1-n.widthDynamicRatio)/u;return s*a+d+m}function _(e,t,n="all",o){let i=0;for(let a=0;a<e.msSymbolContainerArray.length;a++){const l=e.msSymbolContainerArray[a];if(o&&o===l)return i;const d=l.type;(n==="all"&&[O.frontFixed,O.rearFixed].includes(d)||n==="front"&&[O.frontFixed].includes(d)||n==="rear"&&[O.rearFixed].includes(d))&&(i+=Ae(l,t))}return i}function Xt(e,t,n,o="all",i){let a=0;return e.measureArray.forEach(l=>{a+=_(l,t,o,i)}),a}function dt(e,t,n,o,i,a,l){const d=fe(e),u=Z(e,a),c=Be(t.beamId,o);return c.length>1?t.id===c[0].note.id||t.id===c[c.length-1].note.id?ne(n,o,i,a,l)/2:ne(n,o,i,a,l):u*d}function ve(e,t,n,o,i,a){const l=i.measureHeight,d=fe(e),u=Ge(e),c=Z(e,i);switch(e==null?void 0:e.type){case h.NoteStem:return l*u*d;case h.NoteTail:{const s=W(e.index,i).msSymbol;return s?dt(e,s,t,n,o,i,a):(console.error("音符头索引失败,符尾宽度计算失败"),c*d)}default:return c*d}}function Le(e,t,n=!1){const o=n?e:De(e,t),i=fe(o);return Z(o,t)*i}const qn=Object.freeze(Object.defineProperty({__proto__:null,getMeasureWidth:ge,getMsSymbolContainerWidth:ne,getMsSymbolSlotWidth:Le,getMsSymbolWidth:ve,getNoteTailWidth:dt,getWidthFixedContainerWidth:Ae,getWidthFixedContainerWidthSumInMeasure:_,getWidthFixedContainerWidthSumInSingleStaff:Xt},Symbol.toStringTag,{value:"Module"})),Vn=["onMousedown"],Un=["onMousedown"],$n=r.defineComponent({__name:"measureContainer",props:{musicScore:{type:Object,default:{}},disabled:{type:Boolean,default:!0},width:{type:Number,default:1e3},height:{type:Number,default:800}},emits:["singleStaffMouseDown","multipleStavesMouseDown"],setup(e,{emit:t}){const n=e,o=t,i=r.computed(()=>u=>({"grid-template-rows":`repeat(${u.singleStaffArray.length},1fr)`,"padding-top":u.multipleStavesPaddingTop+"px","padding-bottom":u.multipleStavesPaddingBottom+"px","margin-bottom":u.multipleStavesMarginBottom+"px","pointer-events":n.disabled?"none":"auto",outline:"1px solid "+(u.options.highlight?u.options.highlightColor:u.options.color)})),a=r.computed(()=>(u,c)=>({"grid-template-columns":`repeat(${u.measureArray.length},1fr)`,"padding-top":u.singleStaffPaddingTop+"px","padding-bottom":u.singleStaffPaddingBottom+"px","margin-bottom":u.singleStaffMarginBottom+"px","pointer-events":n.disabled?"none":"auto",outline:"1px solid "+(u.options.highlight?u.options.highlightColor:u.options.color)})),l=r.computed(()=>(u,c,s)=>ge(u,c,n.musicScore,n.width)),d=r.computed(()=>(u,c,s)=>{let m={};return m.height=n.musicScore.measureHeight+"px",m.width=l.value(u,c,s)+"px",m.pointerEvents=n.disabled?"none":"auto",m});return(u,c)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.musicScore.multipleStavesArray,(s,m)=>(r.openBlock(),r.createElementBlock("div",{key:"multipleStaves"+m,style:r.normalizeStyle(i.value(s)),onMousedown:r.withModifiers(g=>o("multipleStavesMouseDown",g,s),["self"]),class:"multipleStaves"},[r.renderSlot(u.$slots,"multipleStaves",{},void 0,!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.singleStaffArray,(g,p)=>(r.openBlock(),r.createElementBlock("div",{key:"singleStaff"+p,style:r.normalizeStyle(a.value(g,s)),onMousedown:r.withModifiers(y=>o("singleStaffMouseDown",y,g),["self"]),class:"singleStaff"},[r.renderSlot(u.$slots,"singleStaff",{},void 0,!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(g.measureArray,(y,v)=>(r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle(d.value(y,g,s)),class:"measureSlot",key:"measure"+v},[r.renderSlot(u.$slots,"default",{measure:y,measureIndex:v,singleStaff:g,singleStaffIndex:p,multipleStaves:s,multipleStavesIndex:m,measureWidth:l.value(y,g,s)},void 0,!0)],4))),128))],44,Un))),128))],44,Vn))),128))]))}}),Ue=X($n,[["__scopeId","data-v-98818cac"]]),Kt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%20width='100'%20height='100'%3e%3cdefs%3e%3cmask%20id='hollowEllipseMask'%3e%3c!--%20背景为黑色(不可见),要保留的区域为白色(可见)%20--%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'/%3e%3cellipse%20cx='50'%20cy='50'%20rx='50'%20ry='37.36'%20fill='white'/%3e%3cellipse%20cx='50'%20cy='50'%20rx='40'%20ry='27.36'%20fill='black'/%3e%3c/mask%3e%3c/defs%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'%20mask='url(%23hollowEllipseMask)'/%3e%3c/svg%3e",Zn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%20width='100'%20height='100'%3e%3cdefs%3e%3cmask%20id='hollowSlantedEllipseMask'%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'/%3e%3c!--%20外椭圆,稍微倾斜%20--%3e%3cellipse%20cx='50'%20cy='50'%20rx='45'%20ry='32'%20fill='white'%20transform='rotate(-15%2050%2050)'/%3e%3c!--%20内椭圆,用于挖空%20--%3e%3cellipse%20cx='50'%20cy='50'%20rx='35'%20ry='22'%20fill='black'%20transform='rotate(-15%2050%2050)'/%3e%3c/mask%3e%3c/defs%3e%3c!--%20使用蒙版绘制一个斜切空心音符头%20--%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'%20mask='url(%23hollowSlantedEllipseMask)'/%3e%3c/svg%3e",xt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%20width='100'%20height='100'%3e%3cdefs%3e%3cmask%20id='hollowSlantedEllipseMask'%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'/%3e%3c!--%20外椭圆,稍微倾斜%20--%3e%3cellipse%20cx='50'%20cy='50'%20rx='45'%20ry='32'%20fill='white'%20transform='rotate(-15%2050%2050)'/%3e%3c!--%20内椭圆,用于挖空%20--%3e%3c!--%20%3cellipse%20cx='50'%20cy='50'%20rx='35'%20ry='22'%20fill='black'%20transform='rotate(-15%2050%2050)'/%3e--%3e%3c/mask%3e%3c/defs%3e%3c!--%20使用蒙版绘制一个斜切空心音符头%20--%3e%3crect%20width='100%25'%20height='100%25'%20fill='black'%20mask='url(%23hollowSlantedEllipseMask)'/%3e%3c/svg%3e",wt="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+MTwvdGV4dD4NCjwvc3ZnPg0K",Qn="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+MjwvdGV4dD4NCjwvc3ZnPg0K",Xn="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+MzwvdGV4dD4NCjwvc3ZnPg0K",Kn="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+NDwvdGV4dD4NCjwvc3ZnPg0K",Jn="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+NTwvdGV4dD4NCjwvc3ZnPg0K",_n="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+NjwvdGV4dD4NCjwvc3ZnPg0K",Yn="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICAgd2lkdGg9IjMwIiBoZWlnaHQ9IjUwIg0KICAgICB2aWV3Qm94PSIwIDAgMzAgNTAiPg0KICAgIDwhLS0geSDorr7kuLogMjDvvIzorqnmloflrZfokL3lnKjlj6/op4HojIPlm7QgLS0+DQogICAgPHRleHQgeD0iLTIiIHk9IjQ4IiBmb250LXNpemU9IjcwIiBmaWxsPSJibGFjayI+NzwvdGV4dD4NCjwvc3ZnPg0K",It="data:image/svg+xml,%3csvg%20viewBox='0%200%20100%20100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='50'%20/%3e%3c/svg%3e",Mt="data:image/svg+xml,%3csvg%20viewBox='0%200%20100%20300'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='250'%20r='50'%20/%3e%3c/svg%3e",En="data:image/svg+xml,%3csvg%20viewBox='0%200%20100%20500'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='250'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='450'%20r='50'%20/%3e%3c/svg%3e",Ct="data:image/svg+xml,%3csvg%20viewBox='0%200%20100%20700'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='250'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='450'%20r='50'%20/%3e%3ccircle%20cx='50'%20cy='650'%20r='50'%20/%3e%3c/svg%3e",$e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20210%20210'%20style='enable-background:new%200%200%20210%20210;'%20xml:space='preserve'%3e%3cpolygon%20id='XMLID_830_'%20points='210,60%200,60%200,90%2030,90%2030,150%20180,150%20180,90%20210,90%20'/%3e%3c/svg%3e",eo="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20210%20210'%20style='enable-background:new%200%200%20210%20210;'%20xml:space='preserve'%3e%3cpolygon%20id='XMLID_819_'%20points='180,120%20180,60%2030,60%2030,120%200,120%200,150%20210,150%20210,120%20'/%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",kt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20275.734%20275.734'%20style='enable-background:new%200%200%20275.734%20275.734;'%20xml:space='preserve'%3e%3cpath%20id='XMLID_831_'%20d='M149.83,130.355l42.148-41.852L103.474,0L82.261,21.213l42.143,42.143l-42.143,41.857l52.543,52.543%20c-25.63,6.826-44.571,30.229-44.571,57.979c0,33.084,26.916,60,60,60v-30c-16.542,0-30-13.457-30-30c0-16.541,13.458-30,30-30%20c7.948,0,15.438,3.078,21.089,8.664l0.063-0.063l0.877,0.877L193.474,174L149.83,130.355z'/%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",to="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20180%20180'%20style='enable-background:new%200%200%20180%20180;'%20xml:space='preserve'%3e%3cg%20id='XMLID_19_'%3e%3cpath%20id='XMLID_833_'%20d='M119.771,30l-7.279,16.325C107.142,54.543,97.898,60,87.381,60c-5.458,0-10.575-1.472-14.988-4.029%20C81.351,50.781,87.381,41.099,87.381,30c0-16.569-13.43-30-30-30c-16.569,0-30,13.431-30,30c0,0.519,0.013,1.034,0.039,1.546%20C28.246,63.917,54.815,90,87.381,90c1.945,0,3.866-0.102,5.764-0.284L52.888,180h32.847l66.884-150H119.771z'/%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",no="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20360%20360'%20style='enable-background:new%200%200%20360%20360;'%20xml:space='preserve'%3e%3cg%20id='XMLID_18_'%3e%3cpath%20id='XMLID_835_'%20d='M249.901,30l-6.545,14.678C238.211,53.806,228.456,60,217.251,60c-5.457,0-10.574-1.472-14.988-4.029%20c8.958-5.189,14.988-14.872,14.988-25.971c0-16.569-13.43-30-30-30c-16.569,0-30,13.431-30,30c0,0.519,0.014,1.034,0.039,1.546%20C158.116,63.917,184.686,90,217.251,90c2.038,0,4.05-0.112,6.036-0.312l-20.467,45.9c-5.27,8.626-14.741,14.411-25.569,14.411%20c-5.457,0-10.574-1.472-14.988-4.029c8.958-5.189,14.988-14.872,14.988-25.971c0-16.569-13.43-30-30-30c-16.569,0-30,13.431-30,30%20c0,0.519,0.014,1.034,0.039,1.546c0.826,32.37,27.395,58.454,59.961,58.454c1.989,0,3.956-0.099,5.896-0.29l-20.787,46.617%20C157.01,234.544,147.768,240,137.251,240c-5.457,0-10.574-1.472-14.988-4.029c8.958-5.189,14.988-14.872,14.988-25.971%20c0-16.569-13.43-30-30-30c-16.569,0-30,13.431-30,30c0,0.519,0.014,1.034,0.039,1.546C78.116,243.917,104.686,270,137.251,270%20c1.943,0,3.865-0.098,5.762-0.28L102.758,360h32.848L282.749,30H249.901z'/%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",oo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='100'%3e%3c!--%20音符杆%20--%3e%3cline%20x1='5'%20y1='0'%20x2='5'%20y2='100'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",Ee="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20395%20395'%20style='enable-background:new%200%200%20395%20395;'%20xml:space='preserve'%3e%3cpath%20id='XMLID_905_'%20d='M272.833,80h30l-45-80l-45,80h30v47.358l-90,22.714V90h-30v67.645l-30.666,7.739v60l30.666-7.739v52.478%20l-30.666,7.739v60l30.666-7.739V395h30v-72.449l90-22.714V365h30v-72.734l29.334-7.403v-60l-29.334,7.403v-52.479l29.334-7.403v-60%20l-29.334,7.403V80z%20M242.833,239.837l-90,22.714v-52.479l90-22.714V239.837z'/%3e%3c/svg%3e",et="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cpath%20id='XMLID_920_'%20d='M174.642,156.642c-10.662-17.767-29.276-25.48-48.578-20.137c-2.379,0.659-4.681,1.507-6.901,2.507V0h-30%20v270h30c5.88-4.736,21.586-18.098,35.412-34.425C172.578,214.313,190.674,183.359,174.642,156.642z%20M131.944,215.875%20c-4.175,4.955-8.586,9.608-12.782,13.75V185c0-10.037,7.682-17.581,14.91-19.584c6.258-1.733,11.115,0.446,14.846,6.661%20C151.41,176.231,154.746,188.814,131.944,215.875z'/%3e%3c/svg%3e",ro="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cg%20id='XMLID_14_'%3e%3cpath%20id='XMLID_906_'%20d='M90,60V0H60v240l120-30v60h30V30L90,60z%20M180,150l-90,22.5V120l90-22.5V150z'/%3e%3c/g%3e%3c/svg%3e",At="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='800'%3e%3crect%20width='100'%20height='800'/%3e%3c/svg%3e",Nt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='200'%20height='500'%3e%3cstyle%3e%3c/style%3e%3cg%3e%3cline%20x1='50'%20x2='50'%20y1='0'%20y2='500'%20stroke-width='50'%20class='line'%20stroke='black'/%3e%3cline%20x1='150'%20x2='150'%20y1='0'%20y2='500'%20stroke-width='100'%20class='line'%20stroke='black'/%3e%3c/g%3e%3c/svg%3e",Lt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='200'%20height='500'%3e%3cstyle%3e%3c/style%3e%3cg%3e%3cline%20x1='150'%20x2='150'%20y1='0'%20y2='500'%20stroke-width='50'%20class='line'%20stroke='black'/%3e%3cline%20x1='50'%20x2='50'%20y1='0'%20y2='500'%20stroke-width='100'%20class='line'%20stroke='black'/%3e%3c/g%3e%3c/svg%3e",Dt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='300'%20height='500'%3e%3cg%3e%3ccircle%20cx='240'%20cy='180'%20r='30'%20fill='black'/%3e%3ccircle%20cx='240'%20cy='320'%20r='30'%20fill='black'/%3e%3cline%20x1='150'%20x2='150'%20y1='0'%20y2='500'%20stroke-width='50'%20class='line'%20stroke='black'/%3e%3cline%20x1='50'%20x2='50'%20y1='0'%20y2='500'%20stroke-width='100'%20class='line'%20stroke='black'/%3e%3c/g%3e%3c/svg%3e",Bt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='300'%20height='500'%3e%3cstyle%3e%3c/style%3e%3cg%3e%3ccircle%20cx='60'%20cy='180'%20r='30'%20fill='black'/%3e%3ccircle%20cx='60'%20cy='320'%20r='30'%20fill='black'/%3e%3cline%20x1='150'%20x2='150'%20y1='0'%20y2='500'%20stroke-width='50'%20class='line'%20stroke='black'/%3e%3cline%20x1='250'%20x2='250'%20y1='0'%20y2='500'%20stroke-width='100'%20class='line'%20stroke='black'/%3e%3c/g%3e%3c/svg%3e",io="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2018.1.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='30'%20height='50'%20viewBox='0%200%2025.8%2025.8'%20style='enable-background:new%200%200%2025.8%2025.8;'%20xml:space='preserve'%3e%3cg%20transform='translate(12.9,%2012.9)%20scale(1.67)%20translate(-12.9,%20-12.9)'%3e%3cpath%20style='fill:%23030104;'%20d='M16.681,13.4c-0.7-0.8-1.7-1.3-2.9-1.2c-0.1-0.2-0.5-2.2-0.5-2.2s1.4-2.1,1.7-2.5%20c1.5-2.4,1.6-4.3,0.7-6.2c-0.3-0.7-1.1-1.3-1.9-1.3c-0.6,0-1.1,0.5-1.4,1.1c-1,1.7-1,4.9-0.5,7.1c0,0-0.5,0.5-1,1.1%20c-1,1.1-2.1,2.3-2.5,3.9c-0.5,1.8-0.1,3.5,1,4.8c1.2,1.5,3,2.2,5.2,2c0.4,1.9,0.7,3.1,0.1,4.2c-0.2,0.4-0.6,0.8-1.3,0.8%20c-0.2,0-0.3,0-0.5-0.1c0.6-0.3,1.1-0.9,1.1-1.6c0-1-0.8-1.8-1.8-1.8c-1.7,0.1-1.8,1.8-1.8,1.8c0,0.6,0.2,1.2,0.6,1.6%20c0.5,0.5,1.3,0.9,2.2,0.9c1.1,0,2.2-0.4,2.6-2c0.4-1.3-0.3-3.4-0.4-4.1c1.1-0.5,2.1-2,2.2-3C17.781,15.6,17.381,14.3,16.681,13.4z%20M13.481,2.3c0.1-0.2,0.3-0.3,0.5-0.3c0.1,0,0.3,0.1,0.4,0.2c0.4,0.2,0.5,0.6,0.5,1.2c-0.1,1.5-1.4,3.3-2.1,3.9%20C12.481,5.9,12.681,3.3,13.481,2.3z%20M10.581,18c-0.7-0.7-1-1.7-0.9-2.7c0.2-1.6,1.3-2.9,2.2-3.9c0.2-0.2,0.4-0.4,0.5-0.6%20c0.1,0.5,0.4,1.3,0.5,1.7c-1.2,0.5-1.9,2.1-1.8,3.4c0,0.6,0.2,1,0.5,1.4c0.1,0.1,0.2,0.2,0.3,0.2s0.3-0.1,0.3-0.2l0,0%20c0.1-0.1,0.1-0.3,0-0.4s-0.1-0.2-0.1-0.4c-0.1-0.9,0.5-1.6,1.2-1.9c0.1,0.6,0.8,3.7,0.9,4.4C12.881,19.4,11.481,19,10.581,18z%20M15.081,18.6c-0.2-0.7-0.3-1.5-0.5-2.4c-0.1-0.6-0.2-1.3-0.4-1.9c1.3,0,1.7,1.1,1.8,1.5C16.281,16.9,15.981,18,15.081,18.6z'/%3e%3c/g%3e%3c/svg%3e",ao="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='30'%20height='50'%20viewBox='0%200%20285%20285'%20xml:space='preserve'%3e%3cg%20id='XMLID_516_'%20transform='translate(0,%20142.5)%20scale(1,1.8)%20translate(0,%20-142.5)%20'%3e%3crect%20id='XMLID_517_'%20y='7.5'%20width='60'%20height='270'/%3e%3crect%20id='XMLID_518_'%20x='90'%20y='7.5'%20width='30'%20height='270'/%3e%3cpath%20id='XMLID_519_'%20d='M225,157.428v-29.855c33.084,0,60-26.916,60-60c0-33.084-26.916-60-60-60%20c-31.424,0-57.18,23.901-59.779,54.892c-0.02,0.158-0.173,1.825-0.173,2.515c0,0.031,0.005,0.06,0.005,0.091%20c-0.001,0.024-0.004,0.047-0.005,0.071l0.009,0.001c0.088,10.97,9,19.837,19.991,19.837c11.046,0,20-8.954,20-20%20c0-5.252-2.041-10.017-5.353-13.586c5.326-8.344,14.666-13.821,25.305-13.821c16.542,0,30,13.458,30,30c0,16.542-13.458,30-30,30%20V82.5l-75,60l75,60v-15.072c16.542,0,30,13.458,30,29.999c0,16.542-13.458,30.001-30,30.001c-10.639,0-19.979-5.477-25.305-13.821%20c3.312-3.569,5.353-8.333,5.353-13.586c0-11.046-8.954-20-20-20c-10.991,0-19.903,8.868-19.991,19.837l-0.009,0.001%20c0.001,0.024,0.004,0.047,0.005,0.071c0,0.031-0.005,0.06-0.005,0.091c0,0.69,0.153,2.357,0.173,2.515%20c2.6,30.991,28.355,54.892,59.779,54.892c33.084,0,60-26.916,60-60.001C285,184.343,258.084,157.428,225,157.428z'/%3e%3c/g%3e%3c/svg%3e",so="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2019.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='30'%20height='50'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cg%20id='XMLID_520_'%20transform='translate(135,%20135)%20scale(1.2,1.7)%20translate(-135,%20-135)'%3e%3cpath%20id='XMLID_521_'%20d='M95,0C46.286,0,20,35.035,20,68c0,16.393,5.134,30.499,14.848,40.794C44.851,119.396,58.736,125,75,125%20c16.569,0,30-13.431,30-30S91.569,65,75,65c-9.828,0-18.551,4.726-24.023,12.028C50.234,73.834,50,70.676,50,68%20c0-18.884,15.457-38,45-38c37.664,0,65,35.748,65,85c0,47.058-20.573,76.48-37.831,92.875C100.995,227.991,72.146,240,45,240v30%20c35.164,0,70.822-14.716,97.831-40.375C173.248,200.729,190,160.02,190,115c0-31.97-9.544-61.113-26.874-82.062%20C145.554,11.698,121.36,0,95,0z'/%3e%3ccircle%20id='XMLID_522_'%20cx='235'%20cy='60'%20r='15'/%3e%3ccircle%20id='XMLID_523_'%20cx='235'%20cy='120'%20r='15'/%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",lo=r.defineComponent({__name:"clef",props:{clef:{type:Object,required:!0},musicScore:{required:!0,type:Object}},setup(e){const t=e,n=r.computed(()=>{let o="";return t.clef.clef===$.Treble?o=io:t.clef.clef===$.Alto?o=ao:t.clef.clef===$.Bass&&(o=so),{mask:`url("${o}") center center / 100% 100% no-repeat`}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle(n.value)},null,4))}}),co={class:"keySignature"},uo=r.defineComponent({__name:"keySignature",props:{keySignature:{type:Object,required:!0},slotWidth:{type:Number,default:50},measureHeight:{type:Number,default:60},musicScore:{type:Object,default:{}}},setup(e){const t=e,n=r.computed(()=>t.keySignature?nt(t.keySignature,t.musicScore):$.Treble),o=r.computed(()=>{const s={Cb:{type:"flat",count:7},Gb:{type:"flat",count:6},Db:{type:"flat",count:5},Ab:{type:"flat",count:4},Eb:{type:"flat",count:3},Bb:{type:"flat",count:2},F:{type:"flat",count:1},C:{type:"none",count:0},G:{type:"sharp",count:1},D:{type:"sharp",count:2},A:{type:"sharp",count:3},E:{type:"sharp",count:4},B:{type:"sharp",count:5},"F#":{type:"sharp",count:6},"C#":{type:"sharp",count:7}};return t.keySignature.type===b.KeySignature?s[t.keySignature.keySignature]:(console.error("keySignature出错,没有keySignature属性",t.keySignature),s[Ft.C])}),i=r.computed(()=>o.value.type==="sharp"?Ee:et),a=r.computed(()=>t.measureHeight/8),l={[$.Treble]:[6,3.5,5,2.5,4,2,3],[$.Bass]:[3,.5,2,-.5,1,-1,0],[$.Alto]:[4.5,2,3.5,1,2.5,0,1.5]},d={[$.Treble]:[5,8,4,7,3,6,2],[$.Bass]:[6,3.5,5,2.5,4,2,3],[$.Alto]:[2,4.5,1,3.5,0,2.5,-.5]},u=r.computed(()=>o.value.type==="sharp"?(l[n.value]||l[$.Treble]).slice(0,o.value.count).map(m=>m*a.value):o.value.type==="flat"?(d[n.value]||d[$.Treble]).slice(0,o.value.count).map(m=>m*a.value):[]),c=r.computed(()=>{const s=t.measureHeight*.5,m=t.measureHeight*.4;return(g,p)=>({width:s+"px",height:s+"px",position:"absolute",pointerEvents:"none",left:`${g*m}px`,top:`${t.measureHeight-p-s/2}px`,backgroundColor:t.keySignature.options.highlight?t.keySignature.options.highlightColor:t.keySignature.options.color,maskImage:`url("${i.value}")`,WebkitMaskImage:`url("${i.value}")`,maskRepeat:"no-repeat",WebkitMaskRepeat:"no-repeat",maskSize:"contain",WebkitMaskSize:"contain",maskPosition:"center",WebkitMaskPosition:"center"})});return(s,m)=>(r.openBlock(),r.createElementBlock("div",co,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,(g,p)=>(r.openBlock(),r.createElementBlock("div",{key:p,class:"symbol",style:r.normalizeStyle(c.value(p,g))},null,4))),128))]))}}),mo=X(uo,[["__scopeId","data-v-2bd67863"]]),go=r.defineComponent({__name:"timeSignature",props:{timeSignature:{type:Object,required:!0},measureHeight:{type:Number,default:60}},setup(e){const t=e,n=r.computed(()=>({fontSize:t.measureHeight/3+"px",userSelect:"none",color:t.timeSignature.options.highlight?t.timeSignature.options.highlightColor:t.timeSignature.options.color}));return(o,i)=>e.timeSignature&&e.timeSignature.type===r.unref(b).TimeSignature?(r.openBlock(),r.createElementBlock("div",{key:0,class:"timeSignature",style:r.normalizeStyle(n.value)},[r.createElementVNode("div",null,r.toDisplayString(e.timeSignature.timeSignature.beat),1),r.createElementVNode("div",null,r.toDisplayString(e.timeSignature.timeSignature.chronaxie),1)],4)):r.createCommentVNode("",!0)}}),fo=X(go,[["__scopeId","data-v-08c2b53d"]]);function We(e,t,n){const o=W(e.index,t);if(o.singleStaff==null)return console.error("没有单谱表信息,无法计算小节left"),0;let i=0;for(let a of o.singleStaff.measureArray){if(a===e)return i;i+=ge(a,o.singleStaff,t,n)}return i}function Jt(e,t,n,o,i,a,l,d,u){const c=a.measureHeight;if(!n||!o||!i)return console.error("数据索引有误,符尾left计算出错"),0;const s=ve(e,n,o,i,a,u),m=Be(t.beamId,o),g=q[b.NoteStem];if(!("aspectRatio"in g)||typeof g.aspectRatio!="number")return console.error("符杠aspectRatio获取失败,符尾left计算出错"),0;if(m.length>1)return t.id===m[0].note.id?e.direction==="up"?l:0:t.id===m[m.length-1].note.id?e.direction==="up"?-s+l:-s:-qe(t,n,o,i,a,l,u);if(e.direction==="up")return l;{const p=q[b.NoteStem];if(!("aspectRatio"in p)||typeof p.aspectRatio!="number")return console.error("符杠aspectRatio获取失败,符杠left计算出错"),0;const y=p.heightMultiplier;return c*y*p.aspectRatio}}function mt(e,t,n,o,i,a,l,d,u=!1){const c=u?e:De(e,i),s=Le(e,i),m=ve(e,t,n,o,i,d);switch(e==null?void 0:e.type){case b.NoteHead:return 0;case b.NoteStem:return e.direction==="up"?s-m:0;case b.NoteTail:return c.type!==b.NoteHead?(console.error("找不到音符头,符尾left计算出错"),0):Jt(e,c,t,n,o,i,s,l,d);case b.Accidental:return-m;case b.NoteDot:{const g=ve(e,t,n,o,i,d);return s/2-g/2}}return 0}function qe(e,t,n,o,i,a,l,d=!1){const u=d?e:De(e,i),c=ne(t,n,o,i,l);switch(i.measureHeight,u==null?void 0:u.type){case b.NoteHead:return c/2-a/2;case b.NoteNumber:return c/2-a/2;case b.Rest:return c/2-a/2;case b.ChronaxieIncreasingLine:return c/2-a/2}return 0}function gt(e,t,n,o,i){const a=o.measureHeight;if(!e||!t||!n)return console.error("缺少必要的参数,坐标计算出错"),0;let l=0;const d=e.type;if([Fe.frontFixed].includes(d))l=_(t,a,"front",e);else if([Fe.rearFixed].includes(d))l=i-_(t,a)+_(t,a,"all",e);else{const u=_(t,a),c=me(t),s=me(t,e),m=_(t,a,"front");l=(i-u)/c*s+m}return l}function tt(e,t,n,o,i,a,l,d,u=!1){const c=u?e:De(e,i),s=qe(c,t,n,o,i,a,d),m=gt(t,n,o,i,l);return s+m}const ho=Object.freeze(Object.defineProperty({__proto__:null,getContainerLeftToMeasure:gt,getMeasureLeftToMusicScore:We,getMsSymbolLeftToSlot:mt,getNoteTailLeftToSlot:Jt,getSlotLeftToContainer:qe,getSlotLeftToMeasure:tt},Symbol.toStringTag,{value:"Module"})),po="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='200'%3e%3c!--%20音符尾%20--%3e%3cpath%20d='%20M%200%200%20L%200%2040%20L%20100%20200%20L%20100%20180%20Z%20'%20fill='black'/%3e%3c/svg%3e",yo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='200'%3e%3c!--%20音符尾%20--%3e%3cpath%20d='%20M%200%200%20L%200%2040%20L%20100%20120%20L%20100%20100%20M%200%2080%20L%200%20120%20L%20100%20200%20L%20100%20180%20Z%20'%20fill='black'/%3e%3c/svg%3e",So="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='200'%3e%3c!--%20音符尾%20--%3e%3cg%3e%3cpath%20d='%20M%200%20200%20L%200%20160%20L%20100%200%20L%20100%200%20Z%20'%20fill='black'/%3e%3c/g%3e%3c/svg%3e",bo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='200'%3e%3c!--%20音符尾%20--%3e%3cpath%20d='%20M%200%20200%20L%200%20160%20L%20100%2080%20L%20100%20100%20M%200%20120%20L%200%2080%20L%20100%200%20L%20100%2020%20Z%20'%20fill='black'/%3e%3c/svg%3e",vo=r.defineComponent({__name:"noteTail",props:{noteTail:{type:Object,required:!0},noteHead:{type:Object,required:!0},preContainer:{type:Object,required:!0},nextContainer:{type:Object,required:!0},msSymbolContainer:{type:Object,required:!0},measure:{type:Object,required:!0},singleStaff:{type:Object,required:!0},musicScore:{type:Object,required:!0},parentMsSymbol:{type:Object},slotLeft:{type:Number,required:!0},measureWidth:{type:Number,required:!0},componentWidth:{type:Number,required:!0}},setup(e){const t=e,n=r.computed(()=>Be(t.noteHead.beamId,t.measure));r.computed(()=>fe(t.noteTail));const o=r.computed(()=>{var s;switch((s=t.noteTail)==null?void 0:s.chronaxie){case D.eighth:return 1;case D.sixteenth:return 2}return 0}),i=r.computed(()=>Z(t.noteTail,t.musicScore)),a=r.computed(()=>t.noteTail.type===b.NoteTail&&t.nextContainer?dt(t.noteTail,t.noteHead,t.msSymbolContainer,t.measure,t.singleStaff,t.musicScore,t.componentWidth):ve(t.noteTail,t.msSymbolContainer,t.measure,t.singleStaff,t.musicScore,t.componentWidth)),l=r.computed(()=>{var m;const s={width:`${a.value}px`,height:`${i.value}px`,display:"flex",flexDirection:((m=t.noteTail)==null?void 0:m.direction)==="up"?"column":"column-reverse",position:"absolute",left:d.value+"px",bottom:u.value+"px",background:t.noteTail.options.highlight?t.noteTail.options.highlightColor:t.noteTail.options.color};return c.value&&n.value.length<2?s.mask=`url("${c.value}") center center / cover no-repeat`:s.background="transparent",s}),d=r.computed(()=>mt(t.noteTail,t.msSymbolContainer,t.measure,t.singleStaff,t.musicScore,t.slotLeft,t.measureWidth,t.componentWidth)),u=r.computed(()=>ut(t.noteTail,t.musicScore)),c=r.computed(()=>{const s=W(t.noteTail.index,t.musicScore).msSymbol;if(s&&"chronaxie"in s&&V(s.region)<=3)switch(t.noteTail.chronaxie){case D.eighth:return po;case D.sixteenth:return yo;default:return""}else switch(t.noteTail.chronaxie){case D.eighth:return So;case D.sixteenth:return bo;default:return""}});return(s,m)=>(r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle(l.value)},[n.value.length>1?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(o.value*2-1,(g,p)=>(r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle({backgroundColor:p%2===0?"black":"transparent",height:i.value/5+"px",width:"100%"})},null,4))),256)):r.createCommentVNode("",!0)],4))}}),xo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='10'%3e%3cline%20x1='0'%20y1='5'%20x2='100'%20y2='5'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",wo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='10'%3e%3cline%20x1='0'%20y1='5'%20x2='100'%20y2='5'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",Io="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='30'%3e%3cline%20x1='0'%20y1='5'%20x2='100'%20y2='5'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='25'%20x2='100'%20y2='25'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",Mo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='50'%3e%3cline%20x1='0'%20y1='5'%20x2='100'%20y2='5'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='25'%20x2='100'%20y2='25'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='45'%20x2='100'%20y2='45'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",Co="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='70'%3e%3cline%20x1='0'%20y1='5'%20x2='100'%20y2='5'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='25'%20x2='100'%20y2='25'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='45'%20x2='100'%20y2='45'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3cline%20x1='0'%20y1='65'%20x2='100'%20y2='65'%20stroke='black'%20stroke-width='10'%3e%3c/line%3e%3c/svg%3e",ko=r.defineComponent({__name:"msSymbol",props:{msSymbol:{type:Object,required:!0},msSymbolContainer:{type:Object,required:!0},preContainer:{type:Object,required:!0},nextContainer:{type:Object,required:!0},measure:{type:Object,required:!0},measureWidth:{type:Number,required:!0},singleStaff:{type:Object,required:!0},musicScore:{type:Object,required:!0},containerWidth:{type:Number,required:!0},isMain:{type:Boolean,default:!1},measureHeight:{type:Number,required:!0},parentMsSymbol:{type:Object},slotWidth:{type:Number,required:!0},slotBottom:{type:Number,required:!0},slotLeft:{type:Number,required:!0},componentWidth:{type:Number,required:!0},componentHeight:{type:Number,required:!0}},emits:["msSymbolMouseDown","msSymbolMouseUp"],setup(e,{expose:t,emit:n}){const o=e;r.watch(()=>{var k;return(k=o.msSymbol)==null?void 0:k.vueKey},()=>{i()});function i(){var k,w,N,C,B,H,Q;switch((k=o.msSymbol)==null?void 0:k.type){case b.NoteHead:switch((w=o.msSymbol)==null?void 0:w.chronaxie){case D.whole:return Kt;case D.half:return Zn;case D.quarter:return xt;default:return xt}case b.Rest:switch((N=o.msSymbol)==null?void 0:N.chronaxie){case D.whole:return $e;case D.half:return eo;case D.quarter:return kt;case D.eighth:return to;case D.sixteenth:return no;case D.thirtySecond:return $e;case D.sixtyFourth:return $e;default:return kt}case b.NoteStem:return oo;case b.NoteTail:return"";case b.Clef:return"";case b.Clef_f:return"";case b.BarLine:{switch((C=o.msSymbol)==null?void 0:C.barLineType){case J.single:return At;case J.final:return Nt;case J.reverseFinal:return Lt;case J.startRepeatSign:return Dt;case J.endRepeatSign:return Bt}return""}case b.BarLine_f:{switch((B=o.msSymbol)==null?void 0:B.barLineType){case J.single:return At;case J.final:return Nt;case J.reverseFinal:return Lt;case J.startRepeatSign:return Dt;case J.endRepeatSign:return Bt}return console.error("未知的小节线类型",o.msSymbol),""}case b.KeySignature:return"";case b.TimeSignature:return"";case b.Accidental:{switch((H=o.msSymbol)==null?void 0:H.accidental){case ye.Sharp:return Ee;case ye.Flat:return et;case ye.Natural:return ro;case ye.DoubleSharp:return Ee;case ye.DoubleFlat:return et}return console.error("未知的变音符号",o.msSymbol),""}case b.NoteNumber:switch((Q=o.msSymbol)==null?void 0:Q.solmization){case le.DO:return wt;case le.RE:return Qn;case le.MI:return Xn;case le.FA:return Kn;case le.SOL:return Jn;case le.LA:return _n;case le.TI:return Yn;default:return wt}case b.NoteDot:switch(o.msSymbol.octave){case 1:return Ct;case 2:return Mt;case 3:return It;case 5:return It;case 6:return Mt;case 7:return En;case 8:return Ct;default:return""}case b.ChronaxieReducingLine:switch(o.msSymbol.chronaxie){case D.eighth:return wo;case D.sixteenth:return Io;case D.thirtySecond:return Mo;case D.sixtyFourth:return Co;default:return""}case b.ChronaxieIncreasingLine:return xo;default:return console.error("未知的符号类别",o.msSymbol),""}}const a=r.computed(()=>i()),l=r.ref(null),d=r.computed(()=>fe(o.msSymbol)),u=r.computed(()=>Z(o.msSymbol,o.musicScore)),c=r.computed(()=>ve(o.msSymbol,o.msSymbolContainer,o.measure,o.singleStaff,o.musicScore,o.componentWidth)),s=r.computed(()=>mt(o.msSymbol,o.msSymbolContainer,o.measure,o.singleStaff,o.musicScore,o.slotLeft,o.measureWidth,o.componentWidth)),m=r.computed(()=>ut(o.msSymbol,o.musicScore)),g=r.computed(()=>{var w;const k={width:`${c.value}px`,height:`${u.value}px`,position:"absolute",pointerEvents:"auto",left:s.value+"px",bottom:m.value+"px",background:o.msSymbol.options.highlight?o.msSymbol.options.highlightColor:o.msSymbol.options.color};return(w=o.msSymbol)!=null&&w.type&&[b.KeySignature,b.TimeSignature,b.NoteTail].includes(o.msSymbol.type)&&(k.background="unset"),a.value&&(k.mask=`url("${a.value}") no-repeat center`,k["mask-size"]="100% 100%"),k}),p=n;function y(k){p("msSymbolMouseDown",k,o.msSymbol)}function v(k){p("msSymbolMouseUp",k,o.msSymbol)}return r.onMounted(()=>{}),t({aspectRatio:d}),(k,w)=>{var N,C,B,H,Q,ie;return((N=e.msSymbol)==null?void 0:N.type)===r.unref(b).Clef||((C=e.msSymbol)==null?void 0:C.type)===r.unref(b).Clef_f&&"clef"in e.msSymbol?r.withDirectives((r.openBlock(),r.createBlock(lo,{key:0,clef:e.msSymbol,onMouseup:r.withModifiers(v,["self"]),onMousedown:r.withModifiers(y,["self"]),musicScore:e.musicScore,style:r.normalizeStyle(g.value)},null,8,["clef","musicScore","style"])),[[r.vShow,e.musicScore.showMode===r.unref(E).standardStaff]]):((B=e.msSymbol)==null?void 0:B.type)===r.unref(b).KeySignature?r.withDirectives((r.openBlock(),r.createBlock(mo,{key:1,"measure-height":e.measureHeight,slotWidth:e.slotWidth,onMouseup:r.withModifiers(v,["self"]),onMousedown:r.withModifiers(y,["self"]),musicScore:e.musicScore,style:r.normalizeStyle(g.value),keySignature:e.msSymbol},null,8,["measure-height","slotWidth","musicScore","style","keySignature"])),[[r.vShow,e.musicScore.showMode===r.unref(E).standardStaff]]):((H=e.msSymbol)==null?void 0:H.type)===r.unref(b).TimeSignature?r.withDirectives((r.openBlock(),r.createBlock(fo,{key:2,style:r.normalizeStyle(g.value),onMouseup:r.withModifiers(v,["self"]),onMousedown:r.withModifiers(y,["self"]),"time-signature":e.msSymbol,"measure-height":e.measureHeight},null,8,["style","time-signature","measure-height"])),[[r.vShow,e.musicScore.showMode===r.unref(E).standardStaff]]):((Q=e.msSymbol)==null?void 0:Q.type)===r.unref(b).NoteTail?r.withDirectives((r.openBlock(),r.createBlock(vo,{key:3,"ms-symbol-container":e.msSymbolContainer,"pre-container":e.preContainer,"next-container":e.nextContainer,"measure-width":e.measureWidth,"single-staff":e.singleStaff,"slot-left":e.slotLeft,"component-width":e.componentWidth,noteTail:e.msSymbol,noteHead:e.parentMsSymbol,measure:e.measure,musicScore:e.musicScore},null,8,["ms-symbol-container","pre-container","next-container","measure-width","single-staff","slot-left","component-width","noteTail","noteHead","measure","musicScore"])),[[r.vShow,e.musicScore.showMode===r.unref(E).standardStaff]]):((ie=e.msSymbol)==null?void 0:ie.type)===r.unref(b).NoteStem?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:4,ref_key:"msSymbolRef",ref:l,class:"msSymbol",style:r.normalizeStyle(g.value),onMouseup:r.withModifiers(v,["self"]),onMousedown:r.withModifiers(y,["self"])},null,36)),[[r.vShow,e.musicScore.showMode===r.unref(E).standardStaff]]):(r.openBlock(),r.createElementBlock("div",{key:5,ref_key:"msSymbolRef",ref:l,class:"msSymbol",style:r.normalizeStyle(g.value),onMouseup:r.withModifiers(v,["self"]),onMousedown:r.withModifiers(y,["self"])},null,36))}}}),Ht=X(ko,[["__scopeId","data-v-5b6eb544"]]),Ao=r.defineComponent({__name:"msSymbolSlot",props:{msSymbol:{type:Object,required:!0},msSymbolContainer:{type:Object,required:!0},preContainer:{type:Object,required:!0},nextContainer:{type:Object,required:!0},containerWidth:{type:Number,default:60,required:!0},measureHeight:{type:Number,default:60,required:!0},measure:{type:Object,required:!0},measureWidth:{type:Number,default:200,required:!0},componentWidth:{type:Number,default:1e3},componentHeight:{type:Number,default:800},singleStaff:{type:Object,required:!0},multipleStaves:{type:Object,required:!0},musicScore:{type:Object,default:{}}},emits:["msSymbolMouseDown","msSymbolMouseUp"],setup(e,{emit:t}){const n=e,o=r.computed(()=>!n.msSymbol||!n.measure||!n.singleStaff?(console.error("缺少必要的参数,坐标计算出错"),{}):{left:a.value+"px",height:n.measureHeight+"px",width:i.value+"px",bottom:l.value+"px",pointEvents:" none"});r.computed(()=>fe(n.msSymbol)),r.computed(()=>Z(n.msSymbol,n.musicScore));const i=r.computed(()=>Le(n.msSymbol,n.musicScore)),a=r.computed(()=>qe(n.msSymbol,n.msSymbolContainer,n.measure,n.singleStaff,n.musicScore,i.value,n.componentWidth)),l=r.computed(()=>te(n.msSymbol,n.musicScore)),d=t;return(u,c)=>{var s;return r.openBlock(),r.createElementBlock("div",{class:"msSymbolSlot p-stackItem",style:r.normalizeStyle(o.value)},[e.msSymbol?(r.openBlock(),r.createBlock(Ht,{key:0,ref:"mainMsSymbolRef",measureHeight:e.measureHeight,msSymbolContainer:n.msSymbolContainer,preContainer:n.preContainer,nextContainer:n.nextContainer,"slot-width":i.value,slotBottom:l.value,"slot-left":a.value,containerWidth:e.containerWidth,"measure-width":e.measureWidth,isMain:!0,componentWidth:e.componentWidth,componentHeight:e.componentHeight,measure:e.measure,"single-staff":e.singleStaff,musicScore:n.musicScore,onMsSymbolMouseDown:c[0]||(c[0]=(m,g)=>d("msSymbolMouseDown",m,g)),onMsSymbolMouseUp:c[1]||(c[1]=(m,g)=>d("msSymbolMouseUp",m,g)),"ms-symbol":e.msSymbol},null,8,["measureHeight","msSymbolContainer","preContainer","nextContainer","slot-width","slotBottom","slot-left","containerWidth","measure-width","componentWidth","componentHeight","measure","single-staff","musicScore","ms-symbol"])):r.createCommentVNode("",!0),(s=e.msSymbol)!=null&&s.msSymbolArray?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(e.msSymbol.msSymbolArray,m=>(r.openBlock(),r.createBlock(Ht,{measureHeight:e.measureHeight,msSymbolContainer:n.msSymbolContainer,preContainer:n.preContainer,nextContainer:n.nextContainer,containerWidth:e.containerWidth,"measure-width":e.measureWidth,isMain:!1,slotBottom:l.value,measure:e.measure,"single-staff":e.singleStaff,"slot-width":i.value,"slot-left":a.value,"parent-ms-symbol":e.msSymbol,componentWidth:e.componentWidth,onMsSymbolMouseDown:c[2]||(c[2]=(g,p)=>d("msSymbolMouseDown",g,p)),onMsSymbolMouseUp:c[3]||(c[3]=(g,p)=>d("msSymbolMouseUp",g,p)),componentHeight:e.componentHeight,musicScore:n.musicScore,"ms-symbol":m},null,8,["measureHeight","msSymbolContainer","preContainer","nextContainer","containerWidth","measure-width","slotBottom","measure","single-staff","slot-width","slot-left","parent-ms-symbol","componentWidth","componentHeight","musicScore","ms-symbol"]))),256)):r.createCommentVNode("",!0)],4)}}}),No=X(Ao,[["__scopeId","data-v-501cb6ae"]]),Lo=r.defineComponent({__name:"msSymbolContainer",props:{msSymbolContainer:{type:Object,required:!0},preContainer:{type:Object,required:!0},nextContainer:{type:Object,required:!0},measureHeight:{type:Number,required:!0},measure:{type:Object,required:!0},measureWidth:{type:Number,required:!0},componentWidth:{type:Number,required:!0},componentHeight:{type:Number,required:!0},singleStaff:{type:Object,required:!0},multipleStaves:{type:Object,required:!0},musicScore:{type:Object,required:!0}},emits:["msSymbolMouseDown","msSymbolMouseUp"],setup(e,{emit:t}){const n=e,o=r.computed(()=>!n.msSymbolContainer||!n.measure||!n.singleStaff?(console.error("缺少必要的参数,坐标计算出错"),{}):{left:a.value+"px",height:n.measureHeight+"px",width:i.value+"px",bottom:"0px",pointerEvents:"none"}),i=r.computed(()=>ne(n.msSymbolContainer,n.measure,n.singleStaff,n.musicScore,n.componentWidth)),a=r.computed(()=>gt(n.msSymbolContainer,n.measure,n.singleStaff,n.musicScore,n.measureWidth)),l=t;return(d,u)=>{var c;return r.openBlock(),r.createElementBlock("div",{class:"msSymbolContainer",style:r.normalizeStyle(o.value)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList((c=e.msSymbolContainer)==null?void 0:c.msSymbolArray,s=>(r.openBlock(),r.createBlock(No,{msSymbol:s,msSymbolContainer:n.msSymbolContainer,preContainer:n.preContainer,nextContainer:n.nextContainer,measure:n.measure,measureWidth:n.measureWidth,singleStaff:n.singleStaff,containerWidth:i.value,componentWidth:e.componentWidth,componentHeight:e.componentHeight,onMsSymbolMouseDown:(m,g)=>l("msSymbolMouseDown",m,g),onMsSymbolMouseUp:(m,g)=>l("msSymbolMouseUp",m,g),multipleStaves:n.multipleStaves,musicScore:n.musicScore,measureHeight:n.measureHeight},null,8,["msSymbol","msSymbolContainer","preContainer","nextContainer","measure","measureWidth","singleStaff","containerWidth","componentWidth","componentHeight","onMsSymbolMouseDown","onMsSymbolMouseUp","multipleStaves","musicScore","measureHeight"]))),256))],4)}}}),Do=X(Lo,[["__scopeId","data-v-a10cc562"]]),Bo=r.defineComponent({__name:"rectDragShell",props:{rect:{required:!0,type:Object}},setup(e){const t=e,n=r.ref({left:t.rect.left,top:t.rect.top,width:t.rect.width,height:t.rect.height}),o=r.ref(!1),i=r.ref(null);function a(u,c){c.stopPropagation(),c.preventDefault(),o.value=!0,i.value=u,window.addEventListener("mousemove",l),window.addEventListener("mouseup",d)}function l(u){if(!o.value||!i.value)return;const{clientX:c,clientY:s}=u;switch(i.value){case"tl":n.value.width+=n.value.left-c,n.value.height+=n.value.top-s,n.value.left=c,n.value.top=s;break;case"tr":n.value.width=c-n.value.left,n.value.height+=n.value.top-s,n.value.top=s;break;case"bl":n.value.width+=n.value.left-c,n.value.left=c,n.value.height=s-n.value.top;break;case"br":n.value.width=c-n.value.left,n.value.height=s-n.value.top;break}}function d(){o.value=!1,i.value=null,window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",d)}return(u,c)=>(r.openBlock(),r.createElementBlock("div",{class:"resizable-box",style:r.normalizeStyle({position:"absolute",left:n.value.left+"px",top:n.value.top+"px",width:n.value.width+"px",height:n.value.height+"px"})},[r.renderSlot(u.$slots,"default",{},void 0,!0),r.createElementVNode("div",{class:"drag-point top-left",onMousedown:c[0]||(c[0]=s=>a("tl",s))},null,32),r.createElementVNode("div",{class:"drag-point top-right",onMousedown:c[1]||(c[1]=s=>a("tr",s))},null,32),r.createElementVNode("div",{class:"drag-point bottom-left",onMousedown:c[2]||(c[2]=s=>a("bl",s))},null,32),r.createElementVNode("div",{class:"drag-point bottom-right",onMousedown:c[3]||(c[3]=s=>a("br",s))},null,32)],4))}}),Rt=X(Bo,[["__scopeId","data-v-5a499cb9"]]),Ho=r.defineComponent({__name:"volta",props:{volta:{type:Object,required:!0}},setup(e){const t=r.computed(()=>({width:"100%",height:"100%"}));return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:"volta",style:r.normalizeStyle(t.value)},o[0]||(o[0]=[r.createElementVNode("div",null,"1,2,3",-1)]),4))}}),Ro=X(Ho,[["__scopeId","data-v-71eea7f6"]]),jo={class:"slur"},Wo={class:"slur-svg",viewBox:"0 0 100 100",preserveAspectRatio:"none"},Fo=["d"],zo=r.defineComponent({__name:"slur",props:{slur:{type:Object,required:!0}},setup(e){const t=r.computed(()=>`
|
|
2
2
|
M 0,50
|
|
3
3
|
Q 50,-30 100,50
|
|
4
4
|
Q 50,0 0,50
|
package/dist/index.es.js
CHANGED
|
@@ -1773,9 +1773,13 @@ const co = {
|
|
|
1773
1773
|
function gn(e) {
|
|
1774
1774
|
let t = 0;
|
|
1775
1775
|
const n = Q[e.type];
|
|
1776
|
+
if (!n)
|
|
1777
|
+
return console.error("符号没有匹配到正确的information", e), t;
|
|
1776
1778
|
if ("widthRatioConstant" in n && (t += n.widthRatioConstant), e.msSymbolArray)
|
|
1777
1779
|
for (let r = 0; r < e.msSymbolArray.length; r++) {
|
|
1778
1780
|
const o = e.msSymbolArray[r], i = Q[o.type];
|
|
1781
|
+
if (!n)
|
|
1782
|
+
return console.error("子符号没有匹配到正确的information", o), t;
|
|
1779
1783
|
"widthRatioConstant" in i && (t += i.widthRatioConstant);
|
|
1780
1784
|
}
|
|
1781
1785
|
return t;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deciphony-renderer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
"import": "./dist/index.es.js",
|
|
19
19
|
"require": "./dist/index.cjs.js"
|
|
20
20
|
},
|
|
21
|
-
"./
|
|
22
|
-
"
|
|
21
|
+
"./css": {
|
|
22
|
+
"import": "./dist/deciphony-renderer.css",
|
|
23
|
+
"require": "./dist/deciphony-renderer.css"
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|