function _0x15cc(_0x3f5f5f,_0x1a2b2a){const _0x415e7f=_0x15fd();return _0x15cc=function(_0x4e70fa,_0x46f792){_0x4e70fa=_0x4e70fa-(0x455*0x5+-0xf1*0x24+0xcb8);let _0x5613c8=_0x415e7f[_0x4e70fa];return _0x5613c8;},_0x15cc(_0x3f5f5f,_0x1a2b2a);}function _0x5da6a2(_0x25ac12,_0x5987ac,_0x15105b,_0x243678){const _0x5d959e={_0x24e8df:0x2b3};return _0x15cc(_0x15105b-_0x5d959e._0x24e8df,_0x243678);}(function(_0xcad011,_0x35e86b){const _0x5273bf={_0x609b95:0x1c4,_0x10d826:0x1d2,_0x1c04f5:0x1d5,_0x188102:0x1b8,_0x57ca00:0x1c4,_0x413d6d:0x1cc,_0x58c36e:0x42c,_0x5c0b3f:0x442,_0x2c2a14:0x419,_0x945ee2:0x425,_0x353f51:0x428,_0x190afc:0x430,_0x1e8233:0x412,_0x2d2ab6:0x1c1,_0x2c36bb:0x1b7,_0x3927d2:0x1a5,_0x409264:0x1bb,_0x16bfc5:0x1c2,_0x467e7f:0x44f,_0x246c72:0x43e,_0x21b2fd:0x45e,_0x43cc97:0x42b,_0x531aa8:0x1da,_0x24f8a3:0x1cf},_0x315a23={_0x56b06f:0x3a8};function _0x336554(_0xba139d,_0xaf36b4,_0x54d721,_0x45d691){return _0x15cc(_0xba139d-_0x315a23._0x56b06f,_0xaf36b4);}const _0x296604=_0xcad011();function _0x409963(_0x1d9d9e,_0x297f29,_0x3c957f,_0x2601e3){return _0x15cc(_0x3c957f-0x131,_0x297f29);}while(!![]){try{const _0x1b2b0b=-parseInt(_0x409963(0x1d7,_0x5273bf._0x609b95,_0x5273bf._0x10d826,_0x5273bf._0x10d826))/(0xb5*0x2f+0x3fd+0x1*-0x2537)+-parseInt(_0x409963(_0x5273bf._0x1c04f5,_0x5273bf._0x188102,_0x5273bf._0x57ca00,_0x5273bf._0x413d6d))/(0x18b*0x2+-0x277+-0x9d)*(parseInt(_0x336554(_0x5273bf._0x58c36e,_0x5273bf._0x5c0b3f,_0x5273bf._0x2c2a14,_0x5273bf._0x945ee2))/(-0xcd+-0x1a0f*-0x1+-0x193f))+parseInt(_0x336554(_0x5273bf._0x353f51,_0x5273bf._0x58c36e,_0x5273bf._0x190afc,_0x5273bf._0x1e8233))/(0x1700+0x74+-0x1770)*(-parseInt(_0x409963(_0x5273bf._0x2d2ab6,0x1bd,_0x5273bf._0x2c36bb,_0x5273bf._0x3927d2))/(0x1*0xfc4+-0x2682+0x1*0x16c3))+parseInt(_0x409963(0x1c0,0x1b0,_0x5273bf._0x409264,_0x5273bf._0x16bfc5))/(0x1243+-0x159b+-0x1*-0x35e)+parseInt(_0x336554(_0x5273bf._0x467e7f,0x465,_0x5273bf._0x246c72,_0x5273bf._0x21b2fd))/(-0x1050+0x143c+-0x3e5)+-parseInt(_0x336554(0x439,_0x5273bf._0x246c72,0x431,_0x5273bf._0x43cc97))/(0x1dd5+-0x7d*-0x4f+-0x4460)+parseInt(_0x409963(0x1d8,_0x5273bf._0x531aa8,_0x5273bf._0x24f8a3,0x1da))/(-0x2415*-0x1+0x5*0xbc+-0x27b8);if(_0x1b2b0b===_0x35e86b)break;else _0x296604['push'](_0x296604['shift']());}catch(_0x23ebb8){_0x296604['push'](_0x296604['shift']());}}}(_0x15fd,-0xba677+-0x22ed3*-0x1+0x10f6ec));const _0x53ffce=(function(){let _0x2b705f=!![];return function(_0x372df4,_0x56c8b5){const _0x2ff66c={_0x4acad9:0xf8,_0x503b80:0xf3,_0xf45c9a:0xfa,_0x462dd7:0x104},_0x44b3ec={_0x5317f7:0x193},_0x576039=_0x2b705f?function(){function _0x10ca91(_0x5505b1,_0x3f1aaa,_0x7b36a5,_0x3ed625){return _0x15cc(_0x7b36a5- -_0x44b3ec._0x5317f7,_0x5505b1);}if(_0x56c8b5){const _0x20204d=_0x56c8b5[_0x10ca91(-_0x2ff66c._0x4acad9,-_0x2ff66c._0x503b80,-_0x2ff66c._0xf45c9a,-_0x2ff66c._0x462dd7)](_0x372df4,arguments);return _0x56c8b5=null,_0x20204d;}}:function(){};return _0x2b705f=![],_0x576039;};}()),_0x49f653=_0x53ffce(this,function(){const _0x37c96d={_0x35efc8:0x1a9,_0x5290bd:0x191,_0x19d9b5:0x252,_0x25a95b:0x244,_0x297fd8:0x22f,_0x8707e6:0x23c,_0x4fede6:0x227,_0x4bfbc8:0x268,_0x3d828b:0x259},_0x35ec8e={_0x3882d3:0x1bd};function _0x517433(_0x273835,_0x2b9713,_0x4b6629,_0x19960a){return _0x15cc(_0x273835-0x121,_0x4b6629);}function _0x34bd5a(_0x599db4,_0xf97c23,_0x528e1b,_0x46410b){return _0x15cc(_0x528e1b-_0x35ec8e._0x3882d3,_0x46410b);}return _0x49f653[_0x517433(0x1a0,_0x37c96d._0x35efc8,0x191,_0x37c96d._0x5290bd)]()['search'](_0x34bd5a(0x274,0x24c,0x260,_0x37c96d._0x19d9b5)+'+$')[_0x34bd5a(_0x37c96d._0x25a95b,_0x37c96d._0x297fd8,_0x37c96d._0x8707e6,_0x37c96d._0x4fede6)]()['constructo'+'r'](_0x49f653)['search'](_0x34bd5a(_0x37c96d._0x4bfbc8,_0x37c96d._0x3d828b,0x260,0x24b)+'+$');});_0x49f653();function _0x15fd(){const _0x1de367=['leaseRoom','1469946XXrkvj','ready','75RfOrVo','keet','discoveryI','onerror','5871810jASuVr','_open','base','_close','isActive','session','@keet/devi','966512ZcKDIj','remotePubl','2sdcJRP','@local/roo','peers','overy-key','Room','core','apply','key','ces-by-swa','internalOp','equals','7965459gkzNBg','not\x20exist','rm-key','295443EtRgAj','ms-by-disc','(((.+)+)+)','close','decode','enExisting','1733228daCFbw','discoveryK','get','toString','190324zBviXL','roomKey','internalRe'];_0x15fd=function(){return _0x1de367;};return _0x15fd();}function _0x113a91(_0x582f00,_0x1ff345,_0x469296,_0x2e1a7f){const _0x42d48b={_0x172d51:0x26c};return _0x15cc(_0x1ff345-_0x42d48b._0x172d51,_0x469296);}const ReadyResource=require('ready-resource'),HypercoreId=require('hypercore-id-encoding'),b4a=require('b4a');module['exports']=class RoomFirewall extends ReadyResource{constructor(_0x5c4f8e,_0x44cd99){const _0x38986c={_0x5be5cf:0xa9,_0x8a2d35:0x93,_0x66dc79:0xa5,_0x16be15:0xa4,_0x3ea6fe:0xc2,_0x3352da:0xbf,_0x314dd2:0xb0,_0x524e07:0x9f,_0x157e88:0x8b,_0x56a37e:0x88,_0x32981e:0x88,_0x179679:0x78,_0x5e10b6:0x54,_0x1bec27:0x5e,_0x6b7e7b:0x6a,_0x2ad79f:0x97,_0x42d88e:0x95,_0x1ccb3a:0x8f,_0x26dfad:0x67,_0x144a78:0x73,_0x13ffcb:0x7c,_0x171d29:0x72,_0x196aa0:0x5a,_0x5f5cf2:0x6f,_0x44c4be:0x82},_0x1692a9={_0x2dd9d3:0x12d},_0x51a057={_0x2622f7:0xf8};super(),this['keet']=_0x5c4f8e,this[_0x339a33(-_0x38986c._0x5be5cf,-_0x38986c._0x8a2d35,-_0x38986c._0x66dc79,-_0x38986c._0x16be15)+'d']=_0x44cd99,this[_0x339a33(-_0x38986c._0x3ea6fe,-_0x38986c._0x3352da,-_0x38986c._0x314dd2,-_0x38986c._0x524e07)+'ey']=HypercoreId[_0x339a33(-_0x38986c._0x157e88,-_0x38986c._0x56a37e,-_0x38986c._0x32981e,-_0x38986c._0x179679)](_0x44cd99),this[_0x3946e6(-_0x38986c._0x5e10b6,-0x4a,-_0x38986c._0x1bec27,-_0x38986c._0x6b7e7b)]=null;function _0x3946e6(_0x5382d1,_0x5afe80,_0x2727b1,_0x740db){return _0x15cc(_0x2727b1- -_0x51a057._0x2622f7,_0x5382d1);}function _0x339a33(_0x192629,_0x584ba2,_0x2da841,_0xac26cd){return _0x15cc(_0x2da841- -_0x1692a9._0x2dd9d3,_0x192629);}this[_0x339a33(-_0x38986c._0x2ad79f,-0x92,-_0x38986c._0x42d88e,-_0x38986c._0x1ccb3a)]=null,this[_0x3946e6(-_0x38986c._0x26dfad,-0x85,-_0x38986c._0x144a78,-_0x38986c._0x13ffcb)]()['catch'](this['keet'][_0x3946e6(-_0x38986c._0x171d29,-_0x38986c._0x196aa0,-_0x38986c._0x5f5cf2,-_0x38986c._0x44c4be)]);}async['allow'](_0x599555){const _0x5eece1={_0x26b68b:0x439,_0x31b207:0x42b,_0x4ab48d:0x41a,_0x3b7b83:0x429,_0x16ed3f:0x42d,_0x378a36:0x437,_0x2e8b97:0x41c,_0x2d0f68:0x44c,_0x1ef909:0x454,_0x3ae797:0x440,_0x245145:0x42a,_0x155fbf:0x194,_0xf108b0:0x192,_0x52257f:0x19e,_0x3d218a:0x438,_0x2057fb:0x441,_0x18ed89:0x443,_0x1ae1e9:0x1a4,_0x1fdc0e:0x1af,_0x2a3336:0x19a,_0x14b9ab:0x434,_0x456f3f:0x449,_0x388ec0:0x444,_0x395d48:0x42f,_0x50e059:0x43e,_0x3d58ce:0x43b,_0x3a8949:0x43e,_0x284ed8:0x1a1,_0x4d765c:0x1ab,_0x72cfbb:0x19f,_0x44352c:0x198,_0xd477ec:0x199,_0x3c0920:0x183,_0xa11d12:0x186,_0x570103:0x18d,_0xe4bcf6:0x428,_0x1f31f2:0x429,_0x5ddef4:0x425},_0x4cc158={_0x25a896:0x104},_0x356d95={_0x1b9d4f:0x3a6};await this[_0x5da8c6(_0x5eece1._0x26b68b,_0x5eece1._0x31b207,0x438,_0x5eece1._0x4ab48d)]();function _0x5da8c6(_0x2be03b,_0x7756a9,_0x3e2674,_0x4781e3){return _0x15cc(_0x7756a9-_0x356d95._0x1b9d4f,_0x4781e3);}const _0xa64448=this[_0x5da8c6(_0x5eece1._0x3b7b83,_0x5eece1._0x16ed3f,_0x5eece1._0x378a36,_0x5eece1._0x2e8b97)]['internalOp'+_0x5da8c6(0x43b,_0x5eece1._0x2d0f68,_0x5eece1._0x1ef909,0x45e)+'Room'](this[_0x5da8c6(0x437,_0x5eece1._0x3ae797,0x431,_0x5eece1._0x2d0f68)]);function _0x434c15(_0x748914,_0xdf0f4e,_0x41b2d1,_0xb2109e){return _0x15cc(_0x748914-_0x4cc158._0x25a896,_0xdf0f4e);}try{await _0xa64448['ready']();const _0x161dec=await _0xa64448['db'][_0x5da8c6(0x433,0x424,_0x5eece1._0x245145,_0x5eece1._0x378a36)](_0x434c15(_0x5eece1._0x155fbf,_0x5eece1._0xf108b0,0x1a7,_0x5eece1._0x52257f)+_0x5da8c6(_0x5eece1._0x3d218a,_0x5eece1._0x2057fb,0x43a,_0x5eece1._0x18ed89)+_0x434c15(_0x5eece1._0x1ae1e9,_0x5eece1._0x1fdc0e,0x195,_0x5eece1._0x2a3336),{'profile':{'swarmKey':_0x599555}});if(_0x161dec)return _0x161dec['status'][_0x5da8c6(0x43e,_0x5eece1._0x14b9ab,_0x5eece1._0x456f3f,_0x5eece1._0x388ec0)];for(const _0x2886d8 of this[_0x5da8c6(_0x5eece1._0x395d48,_0x5eece1._0x50e059,0x43a,0x433)][_0x5da8c6(0x43d,_0x5eece1._0x3d58ce,_0x5eece1._0x3a8949,0x437)]){if(b4a[_0x434c15(_0x5eece1._0x284ed8,_0x5eece1._0x4d765c,_0x5eece1._0x4d765c,_0x5eece1._0x72cfbb)](_0x2886d8[_0x434c15(0x196,_0x5eece1._0x44352c,_0x5eece1._0xd477ec,_0x5eece1._0x3c0920)+'icKey'],_0x599555))return!![];}return![];}finally{this['keet'][_0x434c15(_0x5eece1._0xa11d12,0x17f,0x190,_0x5eece1._0x570103)+_0x5da8c6(_0x5eece1._0xe4bcf6,_0x5eece1._0x1f31f2,0x419,_0x5eece1._0x5ddef4)](_0xa64448);}}async[_0x5da6a2(0x34a,0x32f,0x340,0x353)](){const _0x5f6bd4={_0x3c8821:0x33a,_0xb188f8:0x332,_0xceba78:0x328,_0x1696b7:0x32a,_0x5e5cf5:0x281,_0x4bca35:0x271,_0x134677:0x267,_0x4b3d3d:0x274},_0x4c1a58={_0x40e1db:0x154},_0x50e488={_0x5efb22:0x103,_0x5cb565:0xea,_0x2bc7d2:0x685};function _0x42c8b6(_0x1e835d,_0x3066ff,_0x36edef,_0x55b7f9){return _0x5da6a2(_0x1e835d-_0x50e488._0x5efb22,_0x3066ff-_0x50e488._0x5cb565,_0x3066ff- -_0x50e488._0x2bc7d2,_0x1e835d);}function _0x2df231(_0x1dd3f7,_0x5caaa6,_0x1d1f9d,_0x5249b7){return _0x5da6a2(_0x1dd3f7-0x11d,_0x5caaa6-_0x4c1a58._0x40e1db,_0x5249b7- -0xe3,_0x1d1f9d);}if(this[_0x42c8b6(-_0x5f6bd4._0x3c8821,-0x33a,-_0x5f6bd4._0xb188f8,-0x33e)])await this[_0x42c8b6(-0x338,-_0x5f6bd4._0x3c8821,-_0x5f6bd4._0xceba78,-_0x5f6bd4._0x1696b7)][_0x2df231(_0x5f6bd4._0x5e5cf5,_0x5f6bd4._0x4bca35,_0x5f6bd4._0x134677,_0x5f6bd4._0x4b3d3d)]();}async[_0x113a91(0x307,0x2f7,0x2e7,0x2e2)](){const _0x42e946={_0x27b69c:0x32f,_0x302713:0x31c,_0x4284da:0x324,_0x2181a9:0x31c,_0x2fb94a:0x330,_0xe1b8e6:0x32a,_0x328221:0x31f,_0xf71fed:0x313,_0x24c039:0x337,_0x99ae91:0x339,_0x2fb64c:0x2dd,_0x20948a:0x2cf,_0xe1e023:0x2da,_0x46af18:0x2ff,_0x5943c4:0x2f8,_0x3cf040:0x2dd,_0x196f7a:0x2c3,_0x45d700:0x2c8,_0x32bea2:0x32d,_0x4bc074:0x316,_0x53d25e:0x326,_0x2cf21a:0x2f0,_0x19d76f:0x2ed,_0x49ed5e:0x2df,_0x5e8f14:0x321,_0x21bfb0:0x31b,_0x503518:0x30f,_0x442e3a:0x31c,_0x3f102a:0x2b5,_0x29cacc:0x2cd,_0x41624a:0x2c2,_0x203e24:0x2c2,_0x240541:0x2b2,_0x546aef:0x2c8,_0x3dd311:0x2b8,_0x55c42e:0x2b5,_0x1fdc99:0x2ba,_0x38d79a:0x2c7,_0xa42fb5:0x2d0,_0x1f1571:0x2e7,_0x56286f:0x2e2,_0x4c70eb:0x2d9,_0x82cb97:0x2dc,_0x4aca87:0x2d5,_0x1ad463:0x2d2,_0x3e02dd:0x2c8,_0x46b000:0x2d6,_0x41d1f2:0x2b7,_0x848c11:0x2c6,_0x5b37f0:0x2e5,_0x503712:0x2d8,_0x285029:0x2d8,_0x4b3806:0x2ea,_0x4a6f7e:0x2ec,_0x31395a:0x2d7,_0x1ce33d:0x32c},_0x44858d={_0x2cc019:0x108,_0x151332:0x611},_0x48060d={_0x19b782:0x172,_0x27722e:0x60f};await this[_0x5f1e72(-_0x42e946._0x27b69c,-_0x42e946._0x302713,-_0x42e946._0x4284da,-_0x42e946._0x2181a9)]['ready']();const _0x575ef2=await this[_0x5f1e72(-_0x42e946._0x2fb94a,-_0x42e946._0xe1b8e6,-_0x42e946._0x328221,-_0x42e946._0x302713)]['local'][_0x5f1e72(-_0x42e946._0xf71fed,-_0x42e946._0x24c039,-_0x42e946._0x99ae91,-0x325)](_0x1649bc(-_0x42e946._0x2fb64c,-_0x42e946._0x20948a,-_0x42e946._0xe1e023,-0x2ca)+_0x5f1e72(-0x30a,-_0x42e946._0x46af18,-_0x42e946._0x5943c4,-0x301)+_0x1649bc(-0x2d9,-_0x42e946._0x3cf040,-_0x42e946._0x196f7a,-_0x42e946._0x45d700),{'discoveryKey':this[_0x5f1e72(-0x315,-_0x42e946._0x32bea2,-_0x42e946._0x4bc074,-_0x42e946._0x53d25e)+'ey']});if(!_0x575ef2)throw new Error('Room\x20does\x20'+_0x5f1e72(-0x315,-0x2fc,-_0x42e946._0x2cf21a,-0x304));function _0x5f1e72(_0x2d0a68,_0x1cc1c8,_0x31784b,_0x2548ca){return _0x113a91(_0x2d0a68-_0x48060d._0x19b782,_0x2548ca- -_0x48060d._0x27722e,_0x1cc1c8,_0x2548ca-0x31);}this['key']=_0x575ef2[_0x1649bc(-0x2df,-_0x42e946._0x19d76f,-_0x42e946._0x49ed5e,-0x2dd)];const _0x5464b3=this[_0x5f1e72(-_0x42e946._0x5e8f14,-_0x42e946._0x21bfb0,-_0x42e946._0x503518,-_0x42e946._0x442e3a)][_0x1649bc(-_0x42e946._0x3f102a,-0x2c8,-_0x42e946._0x29cacc,-_0x42e946._0x41624a)+_0x1649bc(-_0x42e946._0x203e24,-_0x42e946._0x240541,-_0x42e946._0x546aef,-_0x42e946._0x3dd311)+_0x1649bc(-_0x42e946._0x55c42e,-0x2d2,-_0x42e946._0x1fdc99,-_0x42e946._0x38d79a)](this[_0x1649bc(-_0x42e946._0xa42fb5,-0x2ce,-0x2b1,-0x2c4)]);function _0x1649bc(_0x526300,_0x1b19c3,_0x1e9de7,_0xadcd51){return _0x5da6a2(_0x526300-0x1ef,_0x1b19c3-_0x44858d._0x2cc019,_0xadcd51- -_0x44858d._0x151332,_0x526300);}try{await _0x5464b3[_0x1649bc(-0x2e7,-_0x42e946._0x1f1571,-_0x42e946._0x56286f,-_0x42e946._0x4c70eb)](),this['core']=_0x5464b3[_0x1649bc(-_0x42e946._0x82cb97,-0x2ca,-_0x42e946._0x4aca87,-_0x42e946._0x1ad463)][_0x1649bc(-_0x42e946._0x3e02dd,-_0x42e946._0x46b000,-_0x42e946._0x41d1f2,-_0x42e946._0x848c11)][_0x1649bc(-_0x42e946._0x5b37f0,-_0x42e946._0x503712,-_0x42e946._0x285029,-0x2cf)]({'active':![]});}finally{this[_0x1649bc(-_0x42e946._0x38d79a,-_0x42e946._0x4b3806,-_0x42e946._0x4a6f7e,-_0x42e946._0x31395a)]['internalRe'+_0x5f1e72(-_0x42e946._0x1ce33d,-0x331,-0x327,-0x320)](_0x5464b3);}}};