(function(){var t;t=function(t,n){var e,i,r,o,u,a;return u={},i=new DUIClient,i.connect(function(t){var n;return null!=(n=u[t.action])?n.map(function(n){return setTimeout(function(){return n(t)},0)}):void 0}),i.initOK(),a=null,e=function(){function t(t,n,e,r){var o,s,c;this.engine=t,this.HB=n,this.execution_listener=e,this.yatta=r,this.duiClient=i,this.iwcHandler=u,c=function(t){return function(n){return t.send(n)}}(this),this.execution_listener.push(c),o=function(t){return function(n){var e;return e=n.extras,t.receive(e)}}(this),this.iwcHandler.Yatta_new_operation=[o],null!=a&&this.engine.applyOpsCheckDouble(a),s=function(t){return function(){var n;return n={HB:t.yatta.getHistoryBuffer()._encode()},t.sendIwcIntent("Yatta_push_HB_element",n)}}(this),this.iwcHandler.Yatta_get_HB_element=[s]}return t.prototype.send=function(t){return t.uid.creator===this.HB.getUserId()&&"string"!=typeof t.uid.op_number?this.sendIwcIntent("Yatta_new_operation",t):void 0},t.prototype.receive=function(t){return t.uid.creator!==this.HB.getUserId()?this.engine.applyOp(t):void 0},t.prototype.sendIwcIntent=function(t,n){var e;return e={action:t,component:"",data:"",dataType:"",flags:["PUBLISH_GLOBAL"],extras:n},this.duiClient.sendIntent(e)},t}(),r={action:"Yatta_get_HB_element",component:"",data:"",dataType:"",flags:["PUBLISH_GLOBAL"],extras:{}},o=function(){var o,s;return i.sendIntent(r),o=!1,s=function(r){var u;return u=null,u=null!=n?n:i.getIwcClient()._componentName,a=null!=r?r.extras.HB:void 0,o?void 0:(o=!0,t(e,u))},u.Yatta_push_HB_element=[s],setTimeout(s,4e3)},void setTimeout(o,1e3)},module.exports=t,"undefined"!=typeof window&&null!==window&&(window.createConnector=t)}).call(this); //# sourceMappingURL=../Connectors/IwcConnector.js.map