1 |
- !function(){function e(e,n,r,t,a,o,s){try{var i=e[o](s),u=i.value}catch(c){return void r(c)}i.done?n(u):Promise.resolve(u).then(t,a)}function n(n){return function(){var r=this,t=arguments;return new Promise((function(a,o){var s=n.apply(r,t);function i(n){e(s,a,o,i,u,"next",n)}function u(n){e(s,a,o,i,u,"throw",n)}i(void 0)}))}}System.register(["./App-legacy.705693f7.js","./index-legacy.f25f109a.js"],(function(){"use strict";var e,r,t,a,o,s,i,u,c,l,d,f,p,v;return{setters:[function(n){e=n.u,r=n.r,t=n.d,a=n.ah,o=n.a,s=n.M,i=n.a2,u=n.H,c=n.Z,l=n.ai,d=n.s,f=n.f,p=n.D,v=n.c},function(){}],execute:function(){!function(e,n){var r=n.documentElement,t=e.devicePixelRatio||1;function a(){var e=r.clientWidth/10;r.style.fontSize=e+"px"}if(function e(){n.body?n.body.style.fontSize="12px":n.addEventListener("DOMContentLoaded",e)}(),a(),e.addEventListener("resize",a),e.addEventListener("pageshow",(function(e){e.persisted&&a()})),t>=2){var o=n.createElement("body"),s=n.createElement("div");s.style.border=".5px solid transparent",o.appendChild(s),r.appendChild(o),1===s.offsetHeight&&r.classList.add("hairlines"),r.removeChild(o)}}(window,document);var m=e(),g=r(),x=t({name:"Colexiu",setup:function(){var e=0,t=r(!0),d=r(!1),f=r(""),p=new i(650,884),v=r({}),x=r(!1),w=r("staff"),h=r({staff:null,first:null,fixed:null});"more"===m.pageType&&(v.value={PageFormat:p,DYMusicScoreType:"staff",RenderKeySignatures:!0}),n(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,console.log("需要渲染的xml search.xml:",m.xml),e.next=4,a(m.xml,{musicSheetName:m.title||""});case 4:if((n=e.sent).value){e.next=11;break}return t.value=!1,d.value=!0,console.log("没有xml错误了"),window.parent.postMessage({api:"osdmRenderedError"},"*"),e.abrupt("return");case 11:f.value=n.value,e.next=18;break;case 14:e.prev=14,e.t0=e.catch(0),console.log("获取xml错误了",e.t0),window.parent.postMessage({api:"osdmRenderedError"},"*");case 18:case"end":return e.stop()}}),e,null,[[0,14]])})))();var y=function(){var r=n(regeneratorRuntime.mark((function r(t){var a,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(u({api:"cloudLoading",content:{show:!1,type:"fullscreen"}}),a=function(){var e=n(regeneratorRuntime.mark((function e(n){var r,t,a,o,s,i,u,c,d,f,p,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=18;break}if(r=[],!(n.Drawer.Backends.length>0)){e.next=18;break}t=0,a=n.Drawer.Backends.length;case 4:if(!(t<a)){e.next=17;break}return o=n.Drawer.Backends[t],s=o.ctx,i=s.state,u=s.width,c=s.height,d=i.scale,f=d.x,p=d.y,v=(new XMLSerializer).serializeToString(o.ctx.svg),e.t0=r,e.next=12,l(v,u/f,c/p);case 12:e.t1=e.sent,e.t0.push.call(e.t0,e.t1);case 14:t++,e.next=4;break;case 17:return e.abrupt("return",r);case 18:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),!window.parent){r.next=40;break}return r.prev=3,r.next=6,a(t);case 6:if(o=r.sent,"staff"!==w.value){r.next=19;break}return e=1,w.value="first",h.value.staff=o,v.value.DYMusicScoreType="jianpu",v.value.RenderKeySignatures=!0,r.next=15,c();case 15:x.value=!0,setTimeout((function(){x.value=!1}),100),r.next=32;break;case 19:if("first"!==w.value){r.next=31;break}return e=2,w.value="fixed",h.value.first=o,v.value.DYMusicScoreType="jianpu",v.value.RenderKeySignatures=!1,r.next=27,c();case 27:x.value=!0,setTimeout((function(){x.value=!1}),100),r.next=32;break;case 31:"fixed"===w.value&&(e=3,h.value.fixed=o,console.log(h.value,"staffImgs fixed = last"));case 32:3===e&&(console.log(h.value,"staffImgs ------------- postMessage"),window.parent.postMessage({api:"osdmRendered",content:{img:JSON.parse(JSON.stringify(h.value))}},"*")),r.next=40;break;case 35:r.prev=35,r.t0=r.catch(3),console.log("渲染错误了"),console.log(r.t0,"error"),window.parent.postMessage({api:"osdmRenderedError"},"*");case 40:case"end":return r.stop()}}),r,null,[[3,35]])})));return function(e){return r.apply(this,arguments)}}(),R=function(){var e=n(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){console.log("onRenderError错误了"),u({api:"cloudLoading",content:{show:!1,type:"fullscreen"}}),d.value=!0,t.value=!1,window.parent&&window.parent.postMessage({api:"osdmRenderedError"},"*")};return function(){return!x.value&&o(s,{ref:g,score:f.value,isSoundEffect:!0,opotions:{drawTitle:!1,drawComposer:!0,drawLyricist:!1,drawMetronomeMarks:!0,drawMeasureNumbers:!0,autoResize:!1},EngravingRules:v,onStartRender:R,onRenderError:b,onRerender:y},null)}}});d.clintNmae="colexiu",window.DYEnvironment="COLEXIU",document.body.style.setProperty("--osdm-zoom",""+f()),p(),v(x).mount("#app")}}}))}();
|