!function(){var e=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).parcelRequire55a5;e.register("h7G9L",(function(t,n){var r,i,o,u;r=t.exports,i="Sync",o=function(){return w},Object.defineProperty(r,i,{get:o,set:u,enumerable:!0,configurable:!0});var s=e("f1evb"),c=e("hnmIs"),a=e("9Klpk"),l=e("3bWnf"),f=e("eT7f3"),d=e("9WzNc"),h=e("div3d"),y=e("kb0qF"),p=e("bWNdT"),b=e("32Euv"),v=e("auvHb"),m=e("ie2ZQ"),w=function(e){"use strict";(0,y.default)(n,e);var t=(0,p.default)(n);function n(){var e;return(0,a.default)(this,n),e=t.apply(this,arguments),(0,f.default)((0,s.default)(e),"subject","liasync"),(0,f.default)((0,s.default)(e),"connected",!1),e}return(0,l.default)(n,[{key:"connect",value:function(e){var t=this,r=this;return(0,c.default)((function(){return(0,b.__generator)(this,(function(i){return(0,d.default)((0,h.default)(n.prototype),"connect",t).call(r,e),r.init(!0),[2]}))}))()}},{key:"destroy",value:function(){this.listener&&window.removeEventListener("message",this.listener),(0,d.default)((0,h.default)(n.prototype),"destroy",this).call(this)}},{key:"init",value:function(e,t){if(e){this.subject=this.room||"liasync";var n=this;this.listener=function(e){try{var t=e.data;switch(t.subject){case"init":t.body&&(n.connected=!0,n.sendConnect());break;case"publish":t.body&&n.pubsubReceive(t.body);break;default:t.body&&n.applyUpdate((0,m.decode)(t.body))}}catch(e){console.warn("Edrys",e.message)}},window.addEventListener("message",this.listener),this.broadcast(!0,null,"init"),setTimeout((function(){n.connected||n.sendDisconnectError("This seems not to be an Edrys classroom")}),2e3)}}},{key:"broadcast",value:function(e,t,n){var r=e?n||this.subject:"publish";window.parent.postMessage({subject:r,body:t?(0,m.encode)(t):null},"*")}}]),n}(v.Sync)})),e.register("84cK9",(function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var c,a=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?a=c.concat(a):f=-1,a.length&&h())}function h(){if(!l){var e=s(d);l=!0;for(var t=a.length;t;){for(c=a,a=[];++f<t;)c&&c[f].run();f=-1,t=a.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.push(new y(e,t)),1!==a.length||l||s(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}))}();