define("share/assert/js/ioutil_android",["./ioutil","share/assert/js/appcontext","share/assert/js/path"],function(require,exports){function a(){}var b=require("./ioutil").IOUtilBase,c=require("share/assert/js/appcontext").AppContext;a.prototype=new b,a.prototype.constructor=a,a.prototype.readFile=function(a){var b=jQuery.Deferred();if(!a)throw new Error("error argument");var d=a.match(/newBlank\d{1,}.sco/),e=null;if(d){for(var f=0;f<c.newBlankSlides.length;f++)c.newBlankSlides[f][0]==d&&(e=c.newBlankSlides[f][1]);if(e){console.log(e);var g=new Image;g.src=e,$("body").append(g),g.onload=function(){$(g).css("visibility","hidden");var a,d,f=$(g).width(),h=$(g).height(),i=f/h,j=c.containerOffset.width/c.containerOffset.height;i>=j&&(a=f<c.containerOffset.width?f:c.containerOffset.width,d=a/i),j>i&&(d=h<c.containerOffset.height?h:c.containerOffset.height,a=d*i),$(g).css({height:d,width:a});var k=(c.containerOffset.height-d)/2,l=(c.containerOffset.width-a)/2;$(g).remove(),b.resolve('{"canvas":{"objects":[],"background":null,"backgroundImage":{"type":"image","originX":"left","originY":"top","left":'+l+',"top":'+k+',"width":'+a+',"height":'+d+',"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":1,"strokeDashArray":null,"strokeLineCap":"butt","strokeLineJoin":"miter","strokeMiterLimit":10,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"clipTo":null,"backgroundColor":"","src":"'+e+'","filters":[],"crossOrigin":""}},"rels":[],"animationInfo":[],"presentfmt":"840:525"}')}}else b.resolve('{"canvas":{"objects":[],"background":"white"},"rels":[],"animationInfo":[],"presentfmt":"840:525"}')}else androidSink.execute("com.iflytek.teachingMachine.mcv.slide.androidSink.IOUtil","readFile",a,!1,function(a,c){a&&console.error(a),c=c.replace(/\\n/g,"\n"),console.log(c),b.resolve(c)});return b.promise()},a.prototype.writeFile=function(){throw new Error("writeFile need impl")},a.prototype.shellexecute=function(a){var b=jQuery.Deferred();if(!a)throw new Error("error argument");return androidSink.execute("com.iflytek.teachingMachine.mcv.slide.androidSink.IOUtil","shellexecute",a,!1,function(a,c){a&&console.error(a),console.log(c),b.resolve(c)}),b.promise()},exports.IOUtil=new a}),define("share/assert/js/ioutil",[],function(require,exports){function a(){}a.prototype.readFile=function(){},a.prototype.writeFile=function(){},a.prototype.mkdir=function(){},a.prototype.shellexecute=function(){},exports.IOUtilBase=a});