index-legacy-89a79221.js 2.6 KB

1
  1. System.register(["./index-legacy-216ebbcc.js","./instrument-legacy-848a3720.js","./vue3-lottie.es-legacy-5f286f1a.js","./index-legacy-84caf5f7.js","./index-legacy-4b1acba5.js","./index-legacy-1a0614ea.js"],(function(e,t){"use strict";var i,n,s,o,a,r,d,l,c,u,p,g,h=document.createElement("style");return h.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(h),{setters:[e=>{i=e.d,n=e.F,s=e.V,o=e.bt,a=e.M,r=e.U,d=e.ao,l=e.j,c=e.aJ,u=e.A,p=e.aq},e=>{g=e.s},null,null,null,null],execute:function(){const t="_detail_vtlsh_12",h="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i=s({isLoading:!0,isProductLoading:!1,step:0,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});a((()=>{window.appName="colexiu",r.xmlUrl=e.xmlUrl,r.musicRenderType=i.product[i.step].type,d({message:"生成中",duration:0}),setTimeout((()=>{i.isLoading=!1}),500)}));const m=async()=>{var e;i.product[i.step].state=!0,i.product[i.step].base64=await v();try{console.log(JSON.parse(JSON.stringify(i.product)),i.step)}catch(t){}if(i.step+=1,i.step!==i.product.length)return r.musicRenderType=i.product[i.step].type,void u((()=>{i.isLoading=!0,setTimeout((()=>{i.isLoading=!1}),500)}));p(),console.log(i.product),null===(e=window.parent)||void 0===e||e.postMessage({api:"webApi_renderSvg",product:JSON.stringify(i.product)},"*")},v=()=>new Promise((e=>{setTimeout((async()=>{try{var t;const i=null===(t=document.getElementById("osmdSvgPage1"))||void 0===t?void 0:t.cloneNode(!0);if(!i)return void e("");const n=i.width.animVal.value,s=i.height.animVal.value,o=document.createElementNS("http://www.w3.org/2000/svg","rect");o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("width",""+2*n),o.setAttribute("height",""+2*s),o.setAttribute("fill","#fff"),i.prepend(o);const a=g(i.outerHTML).toDataURL("image/png",1);e(a)}catch(i){e("")}}),500)}));return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[h,"hideCursor"]},[!i.isLoading&&l(c,{showSelection:!1,onRendered:m},null)])])}}))}}}));