!function(t){functione(n){if(r[n])returnr[n].exports;vari=r[n]={exports:{},id:n,loaded:!1};returnt[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}varr={};returne.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){functionn(){vart=this;i.call(t),t.runtime=news,t.editingTarget=null,t.runtime.on(s.SCRIPT_GLOW_ON,function(e){t.emit(s.SCRIPT_GLOW_ON,{id:e})}),t.runtime.on(s.SCRIPT_GLOW_OFF,function(e){t.emit(s.SCRIPT_GLOW_OFF,{id:e})}),t.runtime.on(s.BLOCK_GLOW_ON,function(e){t.emit(s.BLOCK_GLOW_ON,{id:e})}),t.runtime.on(s.BLOCK_GLOW_OFF,function(e){t.emit(s.BLOCK_GLOW_OFF,{id:e})}),t.runtime.on(s.VISUAL_REPORT,function(e,r){t.emit(s.VISUAL_REPORT,{id:e,value:r})}),this.blockListener=this.blockListener.bind(this)}vari=r(1),o=r(2),s=r(6),a=r(33),u=r(85),c=r(34);o.inherits(n,i),n.prototype.start=function(){this.runtime.start()},n.prototype.greenFlag=function(){this.runtime.greenFlag()},n.prototype.stopAll=function(){this.runtime.stopAll()},n.prototype.getPlaygroundData=function(){this.emit("playgroundData",{blocks:this.editingTarget.blocks,threads:this.runtime.threads})},n.prototype.animationFrame=function(){this.runtime.animationFrame()},n.prototype.postIOData=function(t,e){this.runtime.ioDevices[t]&&this.runtime.ioDevices[t].postData(e)},n.prototype.loadProject=function(t){a(t,this.runtime),this.editingTarget=this.runtime.targets[0],this.emitTargetsUpdate(),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(this.editingTarget)},n.prototype.createEmptyProject=function(){vart=newc,e=newu(t);e.name="Stage",e.costumes.push({skin:"/assets/stage.png",name:"backdrop1",bitmapResolution:1,rotationCenterX:240,rotationCenterY:180});varr=e.createClone();this.runtime.targets.push(r),r.x=0,r.y=0,r.direction=90,r.size=200,r.visible=!0,r.isStage=!0;varn=newc,i=newu(n);i.name="Sprite1",i.costumes.push({skin:"/assets/scratch_cat.svg",name:"costume1",bitmapResolution:1,rotationCenterX:47,rotationCenterY:55});varo=i.createClone();this.runtime.targets.push(o),o.x=0,o.y=0,o.direction=90,o.size=100,o.visible=!0,this.editingTarget=this.runtime.targets[0],this.emitTargetsUpdate(),this.emitWorkspaceUpdate()},n.prototype.blockListener=function(t){this.editingTarget&&this.editingTarget.blocks.blocklyListen(t,!1,this.runtime)},n.prototype.setEditingTarget=function(t){if(t!=this.editingTarget.id){vare=this.runtime.getTargetById(t);e&&(this.editingTarget=e,this.emitTargetsUpdate(),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(e))}},n.prototype.emitTargetsUpdate=function(){this.emit("targetsUpdate",{targetList:this.runtime.targets.map(function(t){return[t.id,t.getName()]}),editingTarget:this.editingTarget.id})},n.prototype.emitWorkspaceUpdate=function(){this.emit("workspaceUpdate",{xml:this.editingTarget.blocks.toXML()})},t.exports=n,"undefined"!=typeofwindow&&(window.VirtualMachine=t.exports)},function(t,e){functionr(){this._events=this._events||{},this._maxListeners=this._maxListeners||void0}functionn(t){return"function"==typeoft}functioni(t){return"number"==typeoft}functiono(t){return"object"==typeoft&&null!==t}functions(t){returnvoid0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void0,r.prototype._maxListeners=void0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throwTypeError("n must be a positive number");returnthis._maxListeners=t,this},r.prototype.emit=function(t){vare,r,i,a,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],einstanceofError)throwe;varp=newError('Uncaught, unspecified "error" event. ('+e+")");throwp.context=e,p}if(r=this._events[t],s(r))return!1;if(n(r))switch(arguments.length){case1:r.call(this);break;case2:r.call(this,arguments[1]);break;case3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}elseif(o(r))for(a=Array.prototype.slice.call(arguments,1),c=r.slice(),i=c.length,u=0;u<i;u++)c[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){vari;if(!n(e))throw
"use strict";functionn(t){vare=newi(i._61);returne._81=1,e._65=t,e}vari=r(20);t.exports=i;varo=n(!0),s=n(!1),a=n(null),u=n(void0),c=n(0),p=n("");i.resolve=function(t){if(tinstanceofi)returnt;if(null===t)returna;if(void0===t)returnu;if(t===!0)returno;if(t===!1)returns;if(0===t)returnc;if(""===t)returnp;if("object"==typeoft||"function"==typeoft)try{vare=t.then;if("function"==typeofe)returnnewi(e.bind(t))}catch(r){returnnewi(function(t,e){e(r)})}returnn(t)},i.all=function(t){vare=Array.prototype.slice.call(t);returnnewi(function(t,r){functionn(s,a){if(a&&("object"==typeofa||"function"==typeofa)){if(ainstanceofi&&a.then===i.prototype.then){for(;3===a._81;)a=a._65;return1===a._81?n(s,a._65):(2===a._81&&r(a._65),voida.then(function(t){n(s,t)},r))}varu=a.then;if("function"==typeofu){varc=newi(u.bind(a));returnvoidc.then(function(t){n(s,t)},r)}}e[s]=a,0===--o&&t(e)}if(0===e.length)returnt([]);for(varo=e.length,s=0;s<e.length;s++)n(s,e[s])})},i.reject=function(t){returnnewi(function(e,r){r(t)})},i.race=function(t){returnnewi(function(e,r){t.forEach(function(t){i.resolve(t).then(e,r)})})},i.prototype["catch"]=function(t){returnthis.then(null,t)}},function(t,e,r){"use strict";functionn(t,e){for(varr=[],n=0;n<e;n++)r.push("a"+n);vari=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([a]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");returnFunction(["Promise","fn"],i)(o,t)}functioni(t){for(vare=Math.max(t.length-1,3),r=[],n=0;n<e;n++)r.push("a"+n);vari=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+a+";","var res;","switch (argLength) {",r.concat(["extra"]).map(function(t,e){return"case "+e+":res = fn.call("+["self"].concat(r.slice(0,e)).concat("cb").join(",")+");break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");returnFunction(["Promise","fn"],i)(o,t)}varo=r(20),s=r(26);t.exports=o,o.denodeify=function(t,e){return"number"==typeofe&&e!==1/0?n(t,e):i(t)};vara="function (err, res) {if (err) { rj(err); } else { rs(res); }}";o.nodeify=function(t){returnfunction(){vare=Array.prototype.slice.call(arguments),r="function"==typeofe[e.length-1]?e.pop():null,n=this;try{returnt.apply(this,arguments).nodeify(r,n)}catch(i){if(null===r||"undefined"==typeofr)returnnewo(function(t,e){e(i)});s(function(){r.call(n,i)})}}},o.prototype.nodeify=function(t,e){return"function"!=typeoft?this:voidthis.then(function(r){s(function(){t.call(e,null,r)})},function(r){s(function(){t.call(e,r)})})}},function(t,e,r){"use strict";functionn(){if(u.length)throwu.shift()}functioni(t){vare;e=a.length?a.pop():newo,e.task=t,s(e)}functiono(){this.task=null}vars=r(21),a=[],u=[],c=s.makeRequestCallFromTimer(n);t.exports=i,o.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(u.push(t),c())}finally{this.task=null,a[a.length]=this}}},function(t,e,r){"use strict";varn=r(20);t.exports=n,n.enableSynchronous=function(){n.prototype.isPending=function(){return0==this.getState()},n.prototype.isFulfilled=function(){return1==this.getState()},n.prototype.isRejected=function(){return2==this.getState()},n.prototype.getValue=function(){if(3===this._81)returnthis._65.getValue();if(!this.isFulfilled())thrownewError("Cannot get a value of an unfulfilled promise.");returnthis._65},n.prototype.getReason=function(){if(3===this._81)returnthis._65.getReason();if(!this.isRejected())thrownewError("Cannotgetarejectionreasonofanon-rejected
"use strict";functioni(){try{vart=newUint8Array(1);returnt.__proto__={__proto__:Uint8Array.prototype,foo:function(){return42}},42===t.foo()&&"function"==typeoft.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}functiono(){returnt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}functions(e,r){if(o()<r)thrownewRangeError("Invalid typed array length");returnt.TYPED_ARRAY_SUPPORT?(e=newUint8Array(r),e.__proto__=t.prototype):(null===e&&(e=newt(r)),e.length=r),e}functiont(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||thisinstanceoft))returnnewt(e,r,n);if("number"==typeofe){if("string"==typeofr)thrownewError("If encoding is specified then the first argument must be a string");returnp(this,e)}returna(this,e,r,n)}functiona(t,e,r,n){if("number"==typeofe)thrownewTypeError('"value" argument must not be a number');return"undefined"!=typeofArrayBuffer&&einstanceofArrayBuffer?f(t,e,r,n):"string"==typeofe?h(t,e,r):d(t,e)}functionu(t){if("number"!=typeoft)thrownewTypeError('"size" argument must be a number');if(t<0)thrownewRangeError('"size" argument must not be negative')}functionc(t,e,r,n){returnu(e),e<=0?s(t,e):void0!==r?"string"==typeofn?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}functionp(e,r){if(u(r),e=s(e,r<0?0:0|g(r)),!t.TYPED_ARRAY_SUPPORT)for(varn=0;n<r;++n)e[n]=0;returne}functionh(e,r,n){if("string"==typeofn&&""!==n||(n="utf8"),!t.isEncoding(n))thrownewTypeError('"encoding" must be a valid string encoding');vari=0|_(r,n);e=s(e,i);varo=e.write(r,n);returno!==i&&(e=e.slice(0,o)),e}functionl(t,e){varr=e.length<0?0:0|g(e.length);t=s(t,r);for(varn=0;n<r;n+=1)t[n]=255&e[n];returnt}functionf(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)thrownewRangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))thrownewRangeError("'length' is out of bounds");returnr=void0===n&&void0===i?newUint8Array(r):void0===i?newUint8Array(r,n):newUint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}functiond(e,r){if(t.isBuffer(r)){varn=0|g(r.length);returne=s(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeofArrayBuffer&&r.bufferinstanceofArrayBuffer||"length"inr)return"number"!=typeofr.length||Q(r.length)?s(e,0):l(e,r);if("Buffer"===r.type&&$(r.data))returnl(e,r.data)}thrownewTypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}functiong(t){if(t>=o())thrownewRangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return0|t}functionm(e){return+e!=e&&(e=0),t.alloc(+e)}function_(e,r){if(t.isBuffer(e))returne.length;if("undefined"!=typeofArrayBuffer&&"function"==typeofArrayBuffer.isView&&(ArrayBuffer.isView(e)||einstanceofArrayBuffer))returne.byteLength;"string"!=typeofe&&(e=""+e);varn=e.length;if(0===n)return0;for(vari=!1;;)switch(r){case"ascii":case"latin1":case"binary":returnn;case"utf8":case"utf-8":casevoid0:returnY(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return2*n;case"hex":returnn>>>1;case"base64":returnW(e).length;default:if(i)returnY(e).length;r=(""+r).toLowerCase(),i=!0}}functiony(t,e,r){varn=!1;if((void0===e||e<0)&&(e=0),e>this.length)return"";if((void0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":returnR(this,e,r);case"utf8":case"utf-8":returnA(this,e,r);case"ascii":returnM(this,e,r);case"latin1":case"binary":returnL(this,e,r);case"base64":returnO(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnD(this,e,r);default:if(n)thrownewTypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}functionb(t,e,r){varn=t[e];t[e]=t[r],t[r]=n}functionv(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeofn?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}elseif(n<0){if(!o)return-1;n=0}if("string"==typeofr&&(r=t.from(r,i)),t.isBuffer(r))return0===r.length?-1:w(e,r,n,i,o);if("number"==ty
}},function(t,e,r){functionn(t){returnthisinstanceofn?voidi.call(this,t):newn(t)}t.exports=n;vari=r(64),o=r(59);o.inherits=r(5),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(62)},function(t,e,r){t.exports=r(61)},function(t,e,r){t.exports=r(64)},function(t,e,r){t.exports=r(65)},function(t,e){},function(t,e,r){functionn(t){this._cbs=t||{}}t.exports=n;vari=r(36).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};elseif(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throwError("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){varn=t.exports;[r(73),r(79),r(80),r(81),r(82),r(83)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){functionn(t,e){returnt.children?t.children.map(function(t){returns(t,e)}).join(""):""}functioni(t){returnArray.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}varo=r(45),s=r(74),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i}},function(t,e,r){functionn(t,e){if(t){varr,n="";for(variint)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?p.encodeXML(r):r)+'"';returnn}}functioni(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});varr="<"+t.name,i=n(t.attribs,e);returni&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),f[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):r+="/>",r}functiono(t){return"<"+t.data+">"}functions(t,e){varr=t.data||"";return!e.decodeEntities||t.parent&&t.parent.nameinl||(r=p.encodeXML(r)),r}functiona(t){return"<![CDATA["+t.children[0].data+"]]>"}functionu(t){return"<!--"+t.data+"-->"}varc=r(75),p=r(76),h={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,"default":!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},l={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},f={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},d=t.exports=function(t,e){Array.isArray(t)||t.cheerio||(t=[t]),e=e||{};for(varr="",n=0;n<t.length;n++){varp=t[n];r+="root"===p.type?d(p.children,e):c.isTag(p)?i(p,e):p.type===c.Directive?o(p):p.type===c.Comment?u(p):p.type===c.CDATA?a(p):s(p,e)}returnr}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){varn=r(77),i=r(78);e.decode=function(t,e){return(!e||e<=0?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||e<=0?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||e<=0?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){functionn(t){returnObject.keys(t).sort().reduce(function(e,r){returne[t[r]]="&"+r+";",e},{})}functioni(t){vare=[],r=[];returnObject.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),newRegExp(r.join("|"),"g")}functiono(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}functions(t){vare=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}functiona(t,e){functionr(e){returnt[e]}returnfunction(t){returnt.replace(e,r).replace(d,s).replace(f,o)}}functionu(t){returnt.replace(g,o).replace(d,s).replace(f,o)}varc=n(r(43)),p=i(c);e.XML=a(c,p);varh=n(r(41)),