diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/03f27253a7cb8a9453861e8ca725c5c43d17f07f.js b/build-buffer/.module-cache/03f27253a7cb8a9453861e8ca725c5c43d17f07f.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/049940721d6f9db5305f1390a1c74b7bd58f4283.js b/build-buffer/.module-cache/049940721d6f9db5305f1390a1c74b7bd58f4283.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/05478a34c8646461365eecde8113063dd163039e.js b/build-buffer/.module-cache/05478a34c8646461365eecde8113063dd163039e.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/08ba113dea06afc09322946eccacf4b8e30595ab.js b/build-buffer/.module-cache/08ba113dea06afc09322946eccacf4b8e30595ab.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/0a3822c3e3d4885298697d52cec56bd622ab2da1.js b/build-buffer/.module-cache/0a3822c3e3d4885298697d52cec56bd622ab2da1.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/0d2bbdbe3dd4155f37e9eeebfb2050adb55d4292.js b/build-buffer/.module-cache/0d2bbdbe3dd4155f37e9eeebfb2050adb55d4292.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/0d3beb2d6c38b0a1bad0eb60f46351791f619025.js b/build-buffer/.module-cache/0d3beb2d6c38b0a1bad0eb60f46351791f619025.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/107775a85be88b24d7f081e9b34ead8b7eaee187.js b/build-buffer/.module-cache/107775a85be88b24d7f081e9b34ead8b7eaee187.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/12865e3e68a7858659862c24c5cd6011d2a6f549.js b/build-buffer/.module-cache/12865e3e68a7858659862c24c5cd6011d2a6f549.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/1481637775089844184af71820625492ebd04146.js b/build-buffer/.module-cache/1481637775089844184af71820625492ebd04146.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/15915b843035fbde5b599eb19787af49f6645374.js b/build-buffer/.module-cache/15915b843035fbde5b599eb19787af49f6645374.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/15bc58ed41004dd5138e60c2103125788d3dbe89.js b/build-buffer/.module-cache/15bc58ed41004dd5138e60c2103125788d3dbe89.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/199f6a1a9143a558cccb515245f4d815910e9f15.js b/build-buffer/.module-cache/199f6a1a9143a558cccb515245f4d815910e9f15.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/1afac1eafca18bafc8c1b2a96c621b0a9c9ed6ec.js b/build-buffer/.module-cache/1afac1eafca18bafc8c1b2a96c621b0a9c9ed6ec.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/1db5bdc1586498beeb21f2f9179896b78e613be4.js b/build-buffer/.module-cache/1db5bdc1586498beeb21f2f9179896b78e613be4.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/1df6239e1779391ca66ddfd584263e6ff6369fe6.js b/build-buffer/.module-cache/1df6239e1779391ca66ddfd584263e6ff6369fe6.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/20db71076a525ed87d3d9dfbd98c8b31be8c6896.js b/build-buffer/.module-cache/20db71076a525ed87d3d9dfbd98c8b31be8c6896.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/242ec183241b4b53f4ddae69b8afb6b60426ec42.js b/build-buffer/.module-cache/242ec183241b4b53f4ddae69b8afb6b60426ec42.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/2488cd11dd784c443ff3c92bd935ddf3b02bd514.js b/build-buffer/.module-cache/2488cd11dd784c443ff3c92bd935ddf3b02bd514.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/26f32192795794df066874d39d57c713d43118d5.js b/build-buffer/.module-cache/26f32192795794df066874d39d57c713d43118d5.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/27cf137b4997ad99060ff30628d206ab438b57d8.js b/build-buffer/.module-cache/27cf137b4997ad99060ff30628d206ab438b57d8.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/2938e617c1bbeb23185550de3c0c75fbcc86c00b.js b/build-buffer/.module-cache/2938e617c1bbeb23185550de3c0c75fbcc86c00b.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/299f979899a857c45bf2f5de63a5ca750da60433.js b/build-buffer/.module-cache/299f979899a857c45bf2f5de63a5ca750da60433.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/2c7bf22660370ffafc0a9613728e6c2a08ea121a.js b/build-buffer/.module-cache/2c7bf22660370ffafc0a9613728e6c2a08ea121a.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/2de2b640924ce6f2e88ac6b7386117977aa41666.js b/build-buffer/.module-cache/2de2b640924ce6f2e88ac6b7386117977aa41666.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/30ab483f9e1e0fc403c63052bef1adb5258ceba8.js b/build-buffer/.module-cache/30ab483f9e1e0fc403c63052bef1adb5258ceba8.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/3214b8eb4b88501bf6c5adfe1526f5224781a148.js b/build-buffer/.module-cache/3214b8eb4b88501bf6c5adfe1526f5224781a148.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/328bf67f73b5a92db86c637d302034bea07a131e.js b/build-buffer/.module-cache/328bf67f73b5a92db86c637d302034bea07a131e.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/32f5e362d1029dc429facd4377e3a3fada7f12bd.js b/build-buffer/.module-cache/32f5e362d1029dc429facd4377e3a3fada7f12bd.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/33f7f924700e03ecb65d08652d118c3cb46ec280.js b/build-buffer/.module-cache/33f7f924700e03ecb65d08652d118c3cb46ec280.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/3628b5fb4a7df7d7208cdb5789146dc85018932f.js b/build-buffer/.module-cache/3628b5fb4a7df7d7208cdb5789146dc85018932f.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/38e3cc72af24ddb96884506416d1a140d84277fe.js b/build-buffer/.module-cache/38e3cc72af24ddb96884506416d1a140d84277fe.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/396d87add76534cdec416b34a3ad3d0fc0ee3784.js b/build-buffer/.module-cache/396d87add76534cdec416b34a3ad3d0fc0ee3784.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/3deeb9b94028f27bf88717a7e599b296937c2a76.js b/build-buffer/.module-cache/3deeb9b94028f27bf88717a7e599b296937c2a76.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/3e76d1923512635c2f70125b4d5bc2d784959424.js b/build-buffer/.module-cache/3e76d1923512635c2f70125b4d5bc2d784959424.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/3f6f8f6c4b5b68dbf1f336a05e36af6135c5c973.js b/build-buffer/.module-cache/3f6f8f6c4b5b68dbf1f336a05e36af6135c5c973.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/4047caae16d07c2794d548b2c8ad49991732fcfc.js b/build-buffer/.module-cache/4047caae16d07c2794d548b2c8ad49991732fcfc.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/42a9ad6e83cff4214ae7f4e976fe656a8ebb3db7.js b/build-buffer/.module-cache/42a9ad6e83cff4214ae7f4e976fe656a8ebb3db7.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/43f7e66978218f2215f5b550f0b58b80987a13d2.js b/build-buffer/.module-cache/43f7e66978218f2215f5b550f0b58b80987a13d2.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/456c741544ed31d48c69ec38adbdec4865ad01b1.js b/build-buffer/.module-cache/456c741544ed31d48c69ec38adbdec4865ad01b1.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/4d349e32b6888025766ae7a8aec0fde61fcedd42.js b/build-buffer/.module-cache/4d349e32b6888025766ae7a8aec0fde61fcedd42.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/4eaf099ba145fcad6b74c97767d9b5fa0c98d175.js b/build-buffer/.module-cache/4eaf099ba145fcad6b74c97767d9b5fa0c98d175.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/4f96f7e1c9f2ce04e66020d01ee3311079ada71d.js b/build-buffer/.module-cache/4f96f7e1c9f2ce04e66020d01ee3311079ada71d.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/5042ec7afc69d44b4ec48c17d0b5abb4b4190ed8.js b/build-buffer/.module-cache/5042ec7afc69d44b4ec48c17d0b5abb4b4190ed8.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/51c3e6b3bcb1c0159e46a85ab825692fc1346ac0.js b/build-buffer/.module-cache/51c3e6b3bcb1c0159e46a85ab825692fc1346ac0.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/554c0472fa2a84503eaaf26b3309e1653fdcf098.js b/build-buffer/.module-cache/554c0472fa2a84503eaaf26b3309e1653fdcf098.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/59f9370a612e38f0ce74c2f7170f8584c4746685.js b/build-buffer/.module-cache/59f9370a612e38f0ce74c2f7170f8584c4746685.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/5a4e7284b041965784a6cb9ed9d13b8b22f155ff.js b/build-buffer/.module-cache/5a4e7284b041965784a6cb9ed9d13b8b22f155ff.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/5a74625927f8db00f9534603090659177286605c.js b/build-buffer/.module-cache/5a74625927f8db00f9534603090659177286605c.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/5cd585d27a4e583d4e7cc29c8c30d28fb590886d.js b/build-buffer/.module-cache/5cd585d27a4e583d4e7cc29c8c30d28fb590886d.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/5dc2ead2f3a1b4984001a0cda03d175eed73329d.js b/build-buffer/.module-cache/5dc2ead2f3a1b4984001a0cda03d175eed73329d.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/5e1b34c32a648c6d9cd27c7c5aabbf2aeb8f8f6c.js b/build-buffer/.module-cache/5e1b34c32a648c6d9cd27c7c5aabbf2aeb8f8f6c.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/5f0f87bf9d4cf642dbfbf2bcc97740b5a75ebddd.js b/build-buffer/.module-cache/5f0f87bf9d4cf642dbfbf2bcc97740b5a75ebddd.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/60152e60e6d1517f778e2085e952dd94181c1bb2.js b/build-buffer/.module-cache/60152e60e6d1517f778e2085e952dd94181c1bb2.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/601799dfb15a8ec90f7b52a87303adda1b62b90d.js b/build-buffer/.module-cache/601799dfb15a8ec90f7b52a87303adda1b62b90d.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/625611310810fe1998dacde8c42764c369dc54fe.js b/build-buffer/.module-cache/625611310810fe1998dacde8c42764c369dc54fe.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/6493c9af5de5221e62663d6396e4d1d6e1cac7d5.js b/build-buffer/.module-cache/6493c9af5de5221e62663d6396e4d1d6e1cac7d5.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/6761b0b28ab94c9c1a245e5e811968ab2b888456.js b/build-buffer/.module-cache/6761b0b28ab94c9c1a245e5e811968ab2b888456.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/687d82f854fc75d0f0c20547641192995852a13e.js b/build-buffer/.module-cache/687d82f854fc75d0f0c20547641192995852a13e.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/73fa9807dda9e80fb6ad32754f045082e2014a26.js b/build-buffer/.module-cache/73fa9807dda9e80fb6ad32754f045082e2014a26.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/743777cc3e78c4cf0bdebfcc6119a4eb98658970.js b/build-buffer/.module-cache/743777cc3e78c4cf0bdebfcc6119a4eb98658970.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/74b99648f76da49c8104e07e7092c77646117d9d.js b/build-buffer/.module-cache/74b99648f76da49c8104e07e7092c77646117d9d.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/750752b2240ed0d10d1525272540d6ff40e19851.js b/build-buffer/.module-cache/750752b2240ed0d10d1525272540d6ff40e19851.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/7b5f4f98c79393354f44412127d1b1b4768c7ae2.js b/build-buffer/.module-cache/7b5f4f98c79393354f44412127d1b1b4768c7ae2.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/7d12c44c0295a598cd41094648fface61ff71ac3.js b/build-buffer/.module-cache/7d12c44c0295a598cd41094648fface61ff71ac3.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/85884273cb1ff85d5ea8ede2ce31844979bee49f.js b/build-buffer/.module-cache/85884273cb1ff85d5ea8ede2ce31844979bee49f.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/86803fe0a78c4afe2464e3e844859fe6f2b3f66e.js b/build-buffer/.module-cache/86803fe0a78c4afe2464e3e844859fe6f2b3f66e.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/8c368d0d549a5b2572bb4c972c1853a70cdc7d48.js b/build-buffer/.module-cache/8c368d0d549a5b2572bb4c972c1853a70cdc7d48.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/9225d2d031ed98409d5d98b50378aef8212c95ea.js b/build-buffer/.module-cache/9225d2d031ed98409d5d98b50378aef8212c95ea.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/92d2490ec9a51d21611a0de311fd3ca11f3ed1bd.js b/build-buffer/.module-cache/92d2490ec9a51d21611a0de311fd3ca11f3ed1bd.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/93c589af2ea9a9e95b18f39ecae5d2ab2fe21e50.js b/build-buffer/.module-cache/93c589af2ea9a9e95b18f39ecae5d2ab2fe21e50.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/9886a44e9c0912701f96b62b01138c72da887276.js b/build-buffer/.module-cache/9886a44e9c0912701f96b62b01138c72da887276.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/9931ad652eb6e8ca2894bd14427c23666981781e.js b/build-buffer/.module-cache/9931ad652eb6e8ca2894bd14427c23666981781e.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/9971f5ccd8b37a6730c0f6cd4c32889a9bafe119.js b/build-buffer/.module-cache/9971f5ccd8b37a6730c0f6cd4c32889a9bafe119.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/9dff733c4585512f6ed2deca306255214765bbe7.js b/build-buffer/.module-cache/9dff733c4585512f6ed2deca306255214765bbe7.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/9edff359398f41cae41dfb2061a18f1f24c22acb.js b/build-buffer/.module-cache/9edff359398f41cae41dfb2061a18f1f24c22acb.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/9fc14ade32e04296d9f74634da69458d5595110f.js b/build-buffer/.module-cache/9fc14ade32e04296d9f74634da69458d5595110f.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/a30e36ba6bbeb542b32a8366b2b518d1b3793ae1.js b/build-buffer/.module-cache/a30e36ba6bbeb542b32a8366b2b518d1b3793ae1.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/a32b9e50286f4ef963c13ecdef690cdc5fd9efc2.js b/build-buffer/.module-cache/a32b9e50286f4ef963c13ecdef690cdc5fd9efc2.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/a7badd4149dc6388508e91daba3c7a3180647b26.js b/build-buffer/.module-cache/a7badd4149dc6388508e91daba3c7a3180647b26.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/a819303b708bd096642210c472f68aca8015dfa9.js b/build-buffer/.module-cache/a819303b708bd096642210c472f68aca8015dfa9.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/abdc9a91033610379ab39caefc7f9cb24a65cad1.js b/build-buffer/.module-cache/abdc9a91033610379ab39caefc7f9cb24a65cad1.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/b0190c0711457bd7d7cfa521b8a8378bd5dd61d0.js b/build-buffer/.module-cache/b0190c0711457bd7d7cfa521b8a8378bd5dd61d0.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/b593375b3040be6a249438846e5d4c907e02e88e.js b/build-buffer/.module-cache/b593375b3040be6a249438846e5d4c907e02e88e.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/b7f1c6ad2faa40d5e21d30c00fbf877ad00ab2db.js b/build-buffer/.module-cache/b7f1c6ad2faa40d5e21d30c00fbf877ad00ab2db.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/b9885473d1d1c0f78345079d927219c60497a5cb.js b/build-buffer/.module-cache/b9885473d1d1c0f78345079d927219c60497a5cb.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/bb5e20b0dfe1177cc608549060d0883ef58e156b.js b/build-buffer/.module-cache/bb5e20b0dfe1177cc608549060d0883ef58e156b.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/bd19abac2e2e24498b933499d1eff7ae0825111d.js b/build-buffer/.module-cache/bd19abac2e2e24498b933499d1eff7ae0825111d.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/c0507185a13a0cc7a2425906aba3e513eaa09886.js b/build-buffer/.module-cache/c0507185a13a0cc7a2425906aba3e513eaa09886.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/cb77aaa9efe01495730de6fe1e66b40528f0d3da.js b/build-buffer/.module-cache/cb77aaa9efe01495730de6fe1e66b40528f0d3da.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/ceef9710d72e64f29b890368710478c2e8f47f67.js b/build-buffer/.module-cache/ceef9710d72e64f29b890368710478c2e8f47f67.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/d094b051e3d1daa0fe9b12a26ff4ba6149ab891a.js b/build-buffer/.module-cache/d094b051e3d1daa0fe9b12a26ff4ba6149ab891a.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/d1468fde5f28d9145dbd5292cc4bc56024e85ac6.js b/build-buffer/.module-cache/d1468fde5f28d9145dbd5292cc4bc56024e85ac6.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/d2565bc443d9402fe2f3d7f16ba85c4378d132f4.js b/build-buffer/.module-cache/d2565bc443d9402fe2f3d7f16ba85c4378d132f4.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/d33e863ad34154f54a43fa2e43e161c04d397c4c.js b/build-buffer/.module-cache/d33e863ad34154f54a43fa2e43e161c04d397c4c.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/d4893764446faf2854d00b331306d0e80e44e42f.js b/build-buffer/.module-cache/d4893764446faf2854d00b331306d0e80e44e42f.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/d4ec4f49030bae01ad30c4dbee07bad6cad83aac.js b/build-buffer/.module-cache/d4ec4f49030bae01ad30c4dbee07bad6cad83aac.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/d608bc17cc77e484bcee7a0c4613dcfc7c7e9352.js b/build-buffer/.module-cache/d608bc17cc77e484bcee7a0c4613dcfc7c7e9352.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/d7af02f72efb9e19bd527c2a4c4f4efe255f5469.js b/build-buffer/.module-cache/d7af02f72efb9e19bd527c2a4c4f4efe255f5469.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/d7e8646c084253b7cfd0f981f734a2b391aa60a5.js b/build-buffer/.module-cache/d7e8646c084253b7cfd0f981f734a2b391aa60a5.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/dc618a3770560e1678e194d92e56035e18eecdde.js b/build-buffer/.module-cache/dc618a3770560e1678e194d92e56035e18eecdde.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/dea17f9cee8acb42aaea8c4b65723338c5d1feb2.js b/build-buffer/.module-cache/dea17f9cee8acb42aaea8c4b65723338c5d1feb2.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/e2379e7fa9c6a787baa9417d1103590b1a54a212.js b/build-buffer/.module-cache/e2379e7fa9c6a787baa9417d1103590b1a54a212.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/e2700f3eddcf47a0235b40f1879c236d04edfb9f.js b/build-buffer/.module-cache/e2700f3eddcf47a0235b40f1879c236d04edfb9f.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/e394633e8498d5a50e1a34cd73f803421446d4f3.js b/build-buffer/.module-cache/e394633e8498d5a50e1a34cd73f803421446d4f3.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/eab3b56b4d3e94f9fa12bc8100d00e6ce45adb87.js b/build-buffer/.module-cache/eab3b56b4d3e94f9fa12bc8100d00e6ce45adb87.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/eb71242f15539e93a058501425a14e880c4e664f.js b/build-buffer/.module-cache/eb71242f15539e93a058501425a14e880c4e664f.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/ebc99b0d6e721965f3a268c3be5601c088683488.js b/build-buffer/.module-cache/ebc99b0d6e721965f3a268c3be5601c088683488.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/eccf75aafdeeae5a595d6bc3b1bddf63be6ae9f3.js b/build-buffer/.module-cache/eccf75aafdeeae5a595d6bc3b1bddf63be6ae9f3.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/f2fb481dcfbd635108d5a83e5e3fcf22423b13a5.js b/build-buffer/.module-cache/f2fb481dcfbd635108d5a83e5e3fcf22423b13a5.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/f4b9b074b597f1c6fa5619150a029e480feb0947.js b/build-buffer/.module-cache/f4b9b074b597f1c6fa5619150a029e480feb0947.js old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/03f27253a7cb8a9453861e8ca725c5c43d17f07f.json b/build-buffer/.module-cache/manifest/03f27253a7cb8a9453861e8ca725c5c43d17f07f.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/049940721d6f9db5305f1390a1c74b7bd58f4283.json b/build-buffer/.module-cache/manifest/049940721d6f9db5305f1390a1c74b7bd58f4283.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/05478a34c8646461365eecde8113063dd163039e.json b/build-buffer/.module-cache/manifest/05478a34c8646461365eecde8113063dd163039e.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/08ba113dea06afc09322946eccacf4b8e30595ab.json b/build-buffer/.module-cache/manifest/08ba113dea06afc09322946eccacf4b8e30595ab.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/0a3822c3e3d4885298697d52cec56bd622ab2da1.json b/build-buffer/.module-cache/manifest/0a3822c3e3d4885298697d52cec56bd622ab2da1.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/0d2bbdbe3dd4155f37e9eeebfb2050adb55d4292.json b/build-buffer/.module-cache/manifest/0d2bbdbe3dd4155f37e9eeebfb2050adb55d4292.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/0d3beb2d6c38b0a1bad0eb60f46351791f619025.json b/build-buffer/.module-cache/manifest/0d3beb2d6c38b0a1bad0eb60f46351791f619025.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/107775a85be88b24d7f081e9b34ead8b7eaee187.json b/build-buffer/.module-cache/manifest/107775a85be88b24d7f081e9b34ead8b7eaee187.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/12865e3e68a7858659862c24c5cd6011d2a6f549.json b/build-buffer/.module-cache/manifest/12865e3e68a7858659862c24c5cd6011d2a6f549.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/1481637775089844184af71820625492ebd04146.json b/build-buffer/.module-cache/manifest/1481637775089844184af71820625492ebd04146.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/15915b843035fbde5b599eb19787af49f6645374.json b/build-buffer/.module-cache/manifest/15915b843035fbde5b599eb19787af49f6645374.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/15bc58ed41004dd5138e60c2103125788d3dbe89.json b/build-buffer/.module-cache/manifest/15bc58ed41004dd5138e60c2103125788d3dbe89.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/199f6a1a9143a558cccb515245f4d815910e9f15.json b/build-buffer/.module-cache/manifest/199f6a1a9143a558cccb515245f4d815910e9f15.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/1afac1eafca18bafc8c1b2a96c621b0a9c9ed6ec.json b/build-buffer/.module-cache/manifest/1afac1eafca18bafc8c1b2a96c621b0a9c9ed6ec.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/1db5bdc1586498beeb21f2f9179896b78e613be4.json b/build-buffer/.module-cache/manifest/1db5bdc1586498beeb21f2f9179896b78e613be4.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/1df6239e1779391ca66ddfd584263e6ff6369fe6.json b/build-buffer/.module-cache/manifest/1df6239e1779391ca66ddfd584263e6ff6369fe6.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/20db71076a525ed87d3d9dfbd98c8b31be8c6896.json b/build-buffer/.module-cache/manifest/20db71076a525ed87d3d9dfbd98c8b31be8c6896.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/242ec183241b4b53f4ddae69b8afb6b60426ec42.json b/build-buffer/.module-cache/manifest/242ec183241b4b53f4ddae69b8afb6b60426ec42.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/2488cd11dd784c443ff3c92bd935ddf3b02bd514.json b/build-buffer/.module-cache/manifest/2488cd11dd784c443ff3c92bd935ddf3b02bd514.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/26f32192795794df066874d39d57c713d43118d5.json b/build-buffer/.module-cache/manifest/26f32192795794df066874d39d57c713d43118d5.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/27cf137b4997ad99060ff30628d206ab438b57d8.json b/build-buffer/.module-cache/manifest/27cf137b4997ad99060ff30628d206ab438b57d8.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/2938e617c1bbeb23185550de3c0c75fbcc86c00b.json b/build-buffer/.module-cache/manifest/2938e617c1bbeb23185550de3c0c75fbcc86c00b.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/299f979899a857c45bf2f5de63a5ca750da60433.json b/build-buffer/.module-cache/manifest/299f979899a857c45bf2f5de63a5ca750da60433.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/2c7bf22660370ffafc0a9613728e6c2a08ea121a.json b/build-buffer/.module-cache/manifest/2c7bf22660370ffafc0a9613728e6c2a08ea121a.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/2de2b640924ce6f2e88ac6b7386117977aa41666.json b/build-buffer/.module-cache/manifest/2de2b640924ce6f2e88ac6b7386117977aa41666.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/30ab483f9e1e0fc403c63052bef1adb5258ceba8.json b/build-buffer/.module-cache/manifest/30ab483f9e1e0fc403c63052bef1adb5258ceba8.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/3214b8eb4b88501bf6c5adfe1526f5224781a148.json b/build-buffer/.module-cache/manifest/3214b8eb4b88501bf6c5adfe1526f5224781a148.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/328bf67f73b5a92db86c637d302034bea07a131e.json b/build-buffer/.module-cache/manifest/328bf67f73b5a92db86c637d302034bea07a131e.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/32f5e362d1029dc429facd4377e3a3fada7f12bd.json b/build-buffer/.module-cache/manifest/32f5e362d1029dc429facd4377e3a3fada7f12bd.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/33f7f924700e03ecb65d08652d118c3cb46ec280.json b/build-buffer/.module-cache/manifest/33f7f924700e03ecb65d08652d118c3cb46ec280.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/3628b5fb4a7df7d7208cdb5789146dc85018932f.json b/build-buffer/.module-cache/manifest/3628b5fb4a7df7d7208cdb5789146dc85018932f.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/38e3cc72af24ddb96884506416d1a140d84277fe.json b/build-buffer/.module-cache/manifest/38e3cc72af24ddb96884506416d1a140d84277fe.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/396d87add76534cdec416b34a3ad3d0fc0ee3784.json b/build-buffer/.module-cache/manifest/396d87add76534cdec416b34a3ad3d0fc0ee3784.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/3deeb9b94028f27bf88717a7e599b296937c2a76.json b/build-buffer/.module-cache/manifest/3deeb9b94028f27bf88717a7e599b296937c2a76.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/3e76d1923512635c2f70125b4d5bc2d784959424.json b/build-buffer/.module-cache/manifest/3e76d1923512635c2f70125b4d5bc2d784959424.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/3f6f8f6c4b5b68dbf1f336a05e36af6135c5c973.json b/build-buffer/.module-cache/manifest/3f6f8f6c4b5b68dbf1f336a05e36af6135c5c973.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/4047caae16d07c2794d548b2c8ad49991732fcfc.json b/build-buffer/.module-cache/manifest/4047caae16d07c2794d548b2c8ad49991732fcfc.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/42a9ad6e83cff4214ae7f4e976fe656a8ebb3db7.json b/build-buffer/.module-cache/manifest/42a9ad6e83cff4214ae7f4e976fe656a8ebb3db7.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/43f7e66978218f2215f5b550f0b58b80987a13d2.json b/build-buffer/.module-cache/manifest/43f7e66978218f2215f5b550f0b58b80987a13d2.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/456c741544ed31d48c69ec38adbdec4865ad01b1.json b/build-buffer/.module-cache/manifest/456c741544ed31d48c69ec38adbdec4865ad01b1.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/4d349e32b6888025766ae7a8aec0fde61fcedd42.json b/build-buffer/.module-cache/manifest/4d349e32b6888025766ae7a8aec0fde61fcedd42.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/4eaf099ba145fcad6b74c97767d9b5fa0c98d175.json b/build-buffer/.module-cache/manifest/4eaf099ba145fcad6b74c97767d9b5fa0c98d175.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/4f96f7e1c9f2ce04e66020d01ee3311079ada71d.json b/build-buffer/.module-cache/manifest/4f96f7e1c9f2ce04e66020d01ee3311079ada71d.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/5042ec7afc69d44b4ec48c17d0b5abb4b4190ed8.json b/build-buffer/.module-cache/manifest/5042ec7afc69d44b4ec48c17d0b5abb4b4190ed8.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/51c3e6b3bcb1c0159e46a85ab825692fc1346ac0.json b/build-buffer/.module-cache/manifest/51c3e6b3bcb1c0159e46a85ab825692fc1346ac0.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/554c0472fa2a84503eaaf26b3309e1653fdcf098.json b/build-buffer/.module-cache/manifest/554c0472fa2a84503eaaf26b3309e1653fdcf098.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/59f9370a612e38f0ce74c2f7170f8584c4746685.json b/build-buffer/.module-cache/manifest/59f9370a612e38f0ce74c2f7170f8584c4746685.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/5a4e7284b041965784a6cb9ed9d13b8b22f155ff.json b/build-buffer/.module-cache/manifest/5a4e7284b041965784a6cb9ed9d13b8b22f155ff.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/5a74625927f8db00f9534603090659177286605c.json b/build-buffer/.module-cache/manifest/5a74625927f8db00f9534603090659177286605c.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/5cd585d27a4e583d4e7cc29c8c30d28fb590886d.json b/build-buffer/.module-cache/manifest/5cd585d27a4e583d4e7cc29c8c30d28fb590886d.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/5dc2ead2f3a1b4984001a0cda03d175eed73329d.json b/build-buffer/.module-cache/manifest/5dc2ead2f3a1b4984001a0cda03d175eed73329d.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/5e1b34c32a648c6d9cd27c7c5aabbf2aeb8f8f6c.json b/build-buffer/.module-cache/manifest/5e1b34c32a648c6d9cd27c7c5aabbf2aeb8f8f6c.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/5f0f87bf9d4cf642dbfbf2bcc97740b5a75ebddd.json b/build-buffer/.module-cache/manifest/5f0f87bf9d4cf642dbfbf2bcc97740b5a75ebddd.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/60152e60e6d1517f778e2085e952dd94181c1bb2.json b/build-buffer/.module-cache/manifest/60152e60e6d1517f778e2085e952dd94181c1bb2.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/601799dfb15a8ec90f7b52a87303adda1b62b90d.json b/build-buffer/.module-cache/manifest/601799dfb15a8ec90f7b52a87303adda1b62b90d.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/625611310810fe1998dacde8c42764c369dc54fe.json b/build-buffer/.module-cache/manifest/625611310810fe1998dacde8c42764c369dc54fe.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/6493c9af5de5221e62663d6396e4d1d6e1cac7d5.json b/build-buffer/.module-cache/manifest/6493c9af5de5221e62663d6396e4d1d6e1cac7d5.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/6761b0b28ab94c9c1a245e5e811968ab2b888456.json b/build-buffer/.module-cache/manifest/6761b0b28ab94c9c1a245e5e811968ab2b888456.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/687d82f854fc75d0f0c20547641192995852a13e.json b/build-buffer/.module-cache/manifest/687d82f854fc75d0f0c20547641192995852a13e.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/73fa9807dda9e80fb6ad32754f045082e2014a26.json b/build-buffer/.module-cache/manifest/73fa9807dda9e80fb6ad32754f045082e2014a26.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/743777cc3e78c4cf0bdebfcc6119a4eb98658970.json b/build-buffer/.module-cache/manifest/743777cc3e78c4cf0bdebfcc6119a4eb98658970.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/74b99648f76da49c8104e07e7092c77646117d9d.json b/build-buffer/.module-cache/manifest/74b99648f76da49c8104e07e7092c77646117d9d.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/750752b2240ed0d10d1525272540d6ff40e19851.json b/build-buffer/.module-cache/manifest/750752b2240ed0d10d1525272540d6ff40e19851.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/7b5f4f98c79393354f44412127d1b1b4768c7ae2.json b/build-buffer/.module-cache/manifest/7b5f4f98c79393354f44412127d1b1b4768c7ae2.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/7d12c44c0295a598cd41094648fface61ff71ac3.json b/build-buffer/.module-cache/manifest/7d12c44c0295a598cd41094648fface61ff71ac3.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/85884273cb1ff85d5ea8ede2ce31844979bee49f.json b/build-buffer/.module-cache/manifest/85884273cb1ff85d5ea8ede2ce31844979bee49f.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/86803fe0a78c4afe2464e3e844859fe6f2b3f66e.json b/build-buffer/.module-cache/manifest/86803fe0a78c4afe2464e3e844859fe6f2b3f66e.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/8c368d0d549a5b2572bb4c972c1853a70cdc7d48.json b/build-buffer/.module-cache/manifest/8c368d0d549a5b2572bb4c972c1853a70cdc7d48.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/9225d2d031ed98409d5d98b50378aef8212c95ea.json b/build-buffer/.module-cache/manifest/9225d2d031ed98409d5d98b50378aef8212c95ea.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/92d2490ec9a51d21611a0de311fd3ca11f3ed1bd.json b/build-buffer/.module-cache/manifest/92d2490ec9a51d21611a0de311fd3ca11f3ed1bd.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/93c589af2ea9a9e95b18f39ecae5d2ab2fe21e50.json b/build-buffer/.module-cache/manifest/93c589af2ea9a9e95b18f39ecae5d2ab2fe21e50.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/9886a44e9c0912701f96b62b01138c72da887276.json b/build-buffer/.module-cache/manifest/9886a44e9c0912701f96b62b01138c72da887276.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/9931ad652eb6e8ca2894bd14427c23666981781e.json b/build-buffer/.module-cache/manifest/9931ad652eb6e8ca2894bd14427c23666981781e.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/9971f5ccd8b37a6730c0f6cd4c32889a9bafe119.json b/build-buffer/.module-cache/manifest/9971f5ccd8b37a6730c0f6cd4c32889a9bafe119.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/9dff733c4585512f6ed2deca306255214765bbe7.json b/build-buffer/.module-cache/manifest/9dff733c4585512f6ed2deca306255214765bbe7.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/9edff359398f41cae41dfb2061a18f1f24c22acb.json b/build-buffer/.module-cache/manifest/9edff359398f41cae41dfb2061a18f1f24c22acb.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/9fc14ade32e04296d9f74634da69458d5595110f.json b/build-buffer/.module-cache/manifest/9fc14ade32e04296d9f74634da69458d5595110f.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/a30e36ba6bbeb542b32a8366b2b518d1b3793ae1.json b/build-buffer/.module-cache/manifest/a30e36ba6bbeb542b32a8366b2b518d1b3793ae1.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/a32b9e50286f4ef963c13ecdef690cdc5fd9efc2.json b/build-buffer/.module-cache/manifest/a32b9e50286f4ef963c13ecdef690cdc5fd9efc2.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/a7badd4149dc6388508e91daba3c7a3180647b26.json b/build-buffer/.module-cache/manifest/a7badd4149dc6388508e91daba3c7a3180647b26.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/a819303b708bd096642210c472f68aca8015dfa9.json b/build-buffer/.module-cache/manifest/a819303b708bd096642210c472f68aca8015dfa9.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/abdc9a91033610379ab39caefc7f9cb24a65cad1.json b/build-buffer/.module-cache/manifest/abdc9a91033610379ab39caefc7f9cb24a65cad1.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/b0190c0711457bd7d7cfa521b8a8378bd5dd61d0.json b/build-buffer/.module-cache/manifest/b0190c0711457bd7d7cfa521b8a8378bd5dd61d0.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/b593375b3040be6a249438846e5d4c907e02e88e.json b/build-buffer/.module-cache/manifest/b593375b3040be6a249438846e5d4c907e02e88e.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/b7f1c6ad2faa40d5e21d30c00fbf877ad00ab2db.json b/build-buffer/.module-cache/manifest/b7f1c6ad2faa40d5e21d30c00fbf877ad00ab2db.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/b9885473d1d1c0f78345079d927219c60497a5cb.json b/build-buffer/.module-cache/manifest/b9885473d1d1c0f78345079d927219c60497a5cb.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/bb5e20b0dfe1177cc608549060d0883ef58e156b.json b/build-buffer/.module-cache/manifest/bb5e20b0dfe1177cc608549060d0883ef58e156b.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/bd19abac2e2e24498b933499d1eff7ae0825111d.json b/build-buffer/.module-cache/manifest/bd19abac2e2e24498b933499d1eff7ae0825111d.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/c0507185a13a0cc7a2425906aba3e513eaa09886.json b/build-buffer/.module-cache/manifest/c0507185a13a0cc7a2425906aba3e513eaa09886.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/cb77aaa9efe01495730de6fe1e66b40528f0d3da.json b/build-buffer/.module-cache/manifest/cb77aaa9efe01495730de6fe1e66b40528f0d3da.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/ceef9710d72e64f29b890368710478c2e8f47f67.json b/build-buffer/.module-cache/manifest/ceef9710d72e64f29b890368710478c2e8f47f67.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/d094b051e3d1daa0fe9b12a26ff4ba6149ab891a.json b/build-buffer/.module-cache/manifest/d094b051e3d1daa0fe9b12a26ff4ba6149ab891a.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/d1468fde5f28d9145dbd5292cc4bc56024e85ac6.json b/build-buffer/.module-cache/manifest/d1468fde5f28d9145dbd5292cc4bc56024e85ac6.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/d2565bc443d9402fe2f3d7f16ba85c4378d132f4.json b/build-buffer/.module-cache/manifest/d2565bc443d9402fe2f3d7f16ba85c4378d132f4.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/d33e863ad34154f54a43fa2e43e161c04d397c4c.json b/build-buffer/.module-cache/manifest/d33e863ad34154f54a43fa2e43e161c04d397c4c.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/d4893764446faf2854d00b331306d0e80e44e42f.json b/build-buffer/.module-cache/manifest/d4893764446faf2854d00b331306d0e80e44e42f.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/d4ec4f49030bae01ad30c4dbee07bad6cad83aac.json b/build-buffer/.module-cache/manifest/d4ec4f49030bae01ad30c4dbee07bad6cad83aac.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/d608bc17cc77e484bcee7a0c4613dcfc7c7e9352.json b/build-buffer/.module-cache/manifest/d608bc17cc77e484bcee7a0c4613dcfc7c7e9352.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/d7af02f72efb9e19bd527c2a4c4f4efe255f5469.json b/build-buffer/.module-cache/manifest/d7af02f72efb9e19bd527c2a4c4f4efe255f5469.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/d7e8646c084253b7cfd0f981f734a2b391aa60a5.json b/build-buffer/.module-cache/manifest/d7e8646c084253b7cfd0f981f734a2b391aa60a5.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/dc618a3770560e1678e194d92e56035e18eecdde.json b/build-buffer/.module-cache/manifest/dc618a3770560e1678e194d92e56035e18eecdde.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/dea17f9cee8acb42aaea8c4b65723338c5d1feb2.json b/build-buffer/.module-cache/manifest/dea17f9cee8acb42aaea8c4b65723338c5d1feb2.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/e2379e7fa9c6a787baa9417d1103590b1a54a212.json b/build-buffer/.module-cache/manifest/e2379e7fa9c6a787baa9417d1103590b1a54a212.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/e2700f3eddcf47a0235b40f1879c236d04edfb9f.json b/build-buffer/.module-cache/manifest/e2700f3eddcf47a0235b40f1879c236d04edfb9f.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/e394633e8498d5a50e1a34cd73f803421446d4f3.json b/build-buffer/.module-cache/manifest/e394633e8498d5a50e1a34cd73f803421446d4f3.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/eab3b56b4d3e94f9fa12bc8100d00e6ce45adb87.json b/build-buffer/.module-cache/manifest/eab3b56b4d3e94f9fa12bc8100d00e6ce45adb87.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/eb71242f15539e93a058501425a14e880c4e664f.json b/build-buffer/.module-cache/manifest/eb71242f15539e93a058501425a14e880c4e664f.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/ebc99b0d6e721965f3a268c3be5601c088683488.json b/build-buffer/.module-cache/manifest/ebc99b0d6e721965f3a268c3be5601c088683488.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/eccf75aafdeeae5a595d6bc3b1bddf63be6ae9f3.json b/build-buffer/.module-cache/manifest/eccf75aafdeeae5a595d6bc3b1bddf63be6ae9f3.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/f2fb481dcfbd635108d5a83e5e3fcf22423b13a5.json b/build-buffer/.module-cache/manifest/f2fb481dcfbd635108d5a83e5e3fcf22423b13a5.json old mode 100644 new mode 100755 diff --git a/build-buffer/.module-cache/manifest/f4b9b074b597f1c6fa5619150a029e480feb0947.json b/build-buffer/.module-cache/manifest/f4b9b074b597f1c6fa5619150a029e480feb0947.json old mode 100644 new mode 100755 diff --git a/build-buffer/App.js b/build-buffer/App.js old mode 100644 new mode 100755 index c47b251..8392772 --- a/build-buffer/App.js +++ b/build-buffer/App.js @@ -85,65 +85,22 @@ App = React.createClass({displayName: "App", getInitialState: function () { - Twister.deserializeCache(JSON.parse(localStorage.getItem("twister-cache"))); - - //this.clearCache(); - var state={}; state.activeAccount = localStorage.getItem("twister-react-activeAccount") state.accounts = Twister.getAccounts(); + if (!state.activeAccount) { state.activeAccount=state.accounts[0]; } + //console.log(state); return state; + }, componentDidMount: function () { - var thisComponent = this; - - if (this.state.accounts.length==0) { - - Twister.init({ - host: this.state.appSettings.host, - logfunc: function(log){console.log(log)}, - outdatedLimit: this.state.appSettings.pollInterval, - querySettingsByType: { - - outdatedLimit: { - pubkey: this.state.appSettings.pollIntervalProfile, - profile: this.state.appSettings.pollIntervalProfile, - avatar: this.state.appSettings.pollIntervalProfile, - torrent: this.state.appSettings.pollIntervalProfile, - followings: this.state.appSettings.pollIntervalProfile - } - - } - }); - - Twister.loadServerAccounts(function(){ - - thisComponent.setStateSafe(function(state){ - - state.accounts = Twister.getAccounts(); - //console.log(state.accounts); - state.activeAccount = state.accounts[0]; - - return state; - - },function(){ - thisComponent.switchAccount(thisComponent.state.activeAccount); - }); - }); - - } else { - - this.switchAccount(this.state.activeAccount); - - } - this.setInterval(this.saveCache,300000); }, @@ -228,12 +185,84 @@ var routes = ( ); +initializeApp = function () { -Router.run(routes, function (Handler) { - React.render(React.createElement(Handler, null), document.getElementById('content')); -}); + Router.run(routes, function (Handler) { + React.render(React.createElement(Handler, null), document.getElementById('content')); + }); +} + +Twister.deserializeCache(JSON.parse(localStorage.getItem("twister-cache"))); + +Twister.setup({logfunc: function(log){console.log(log)}}) + +var accounts = Twister.getAccounts(); + +if (accounts.length==0) { + + if (!localStorage.getItem("twister-react-settings")) { + + var appSettings = { + + pollInterval:60, + pollIntervalProfile: 3600, + ignoredUsers: "nobody", + host: "http://user:pwd@localhost:28332" + + }; + } else { + + var appSettings = JSON.parse(localStorage.getItem("twister-react-settings")); + + } + + Twister.setup({ + host: appSettings.host, + //logfunc: function(log){console.log(log)}, + outdatedLimit: appSettings.pollInterval, + querySettingsByType: { + + outdatedLimit: { + pubkey: appSettings.pollIntervalProfile, + profile: appSettings.pollIntervalProfile, + avatar: appSettings.pollIntervalProfile, + torrent: appSettings.pollIntervalProfile, + followings: appSettings.pollIntervalProfile + } + + } + }); + + Twister.loadServerAccounts(function(){ + + var activeAccount = localStorage.getItem("twister-react-activeAccount"); + + var accounts = Twister.getAccounts(); + + if (!activeAccount) { + + activeAccount = accounts[0]; + localStorage.setItem("twister-react-activeAccount",activeAccount); + + } + + console.log("active account defaulted to "+activeAccount) + + Twister.getAccount(activeAccount).activateTorrents(function(){ + + initializeApp(); + + }); + + }); + +} else { + + initializeApp(); + +} ////// INIT EVENTLISTENERS ON WINDOW diff --git a/build-buffer/common/AppSettingsMixin.js b/build-buffer/common/AppSettingsMixin.js old mode 100644 new mode 100755 diff --git a/build-buffer/common/EventListenerMixin.js b/build-buffer/common/EventListenerMixin.js old mode 100644 new mode 100755 diff --git a/build-buffer/common/MiniProfile.js b/build-buffer/common/MiniProfile.js old mode 100644 new mode 100755 diff --git a/build-buffer/common/Post.js b/build-buffer/common/Post.js old mode 100644 new mode 100755 index c999cb9..8f69855 --- a/build-buffer/common/Post.js +++ b/build-buffer/common/Post.js @@ -16,11 +16,12 @@ var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js'); module.exports = Post = React.createClass({displayName: "Post", mixins: [SetIntervalMixin,SafeStateChangeMixin], getInitialState: function() { + return { avatar: "img/genericPerson.png", - fullname: "", - retwistingUser: this.props.post.retwistingUser, - timeAgo: "" + fullname: "", + timeAgo: "", + retwistingUser: this.props.post.username }; }, updateTimeAgo: function() { @@ -39,39 +40,54 @@ module.exports = Post = React.createClass({displayName: "Post", }, componentDidMount: function () { + var thisComponent = this; + var post = Twister.getUser(this.props.post.username).getPost(this.props.post.id); + + if (post.isRetwist()) { + + post.getUser().doProfile(function(profile){ + thisComponent.setStateSafe({retwistingUser: profile.getField("fullname")}); + }); + + post=post.getRetwistedPost(); + + } + //console.log(this.props.post.username+":post"+this.props.post.id); - Twister.getUser(this.props.post.username).doAvatar(function(avatar){ + post.getUser().doAvatar(function(avatar){ if (avatar.getUrl()) { thisComponent.setStateSafe({avatar: avatar.getUrl()}); } }); - Twister.getUser(this.props.post.username).doProfile(function(profile){ + post.getUser().doProfile(function(profile){ thisComponent.setStateSafe({fullname: profile.getField("fullname")}); }); - if (this.props.post.isRetwist) { - Twister.getUser(this.props.post.retwistingUser).doProfile(function(profile){ - thisComponent.setStateSafe({retwistingUser: profile.getField("fullname")}); - }); - } - this.updateTimeAgo(); this.setInterval(this.updateTimeAgo,60000); }, render: function() { - var post = this.props.post; - if (post.isReply) { + var post = Twister.getUser(this.props.post.username).getPost(this.props.post.id); + var retwist = false; + + if (post.isRetwist()) { + retwist = true; + post=post.getRetwistedPost(); + + } + + if (post.isReply()) { var conversationLink = ( React.createElement(OverlayTrigger, {placement: "left", overlay: React.createElement(Tooltip, null, "View Conversation") }, - React.createElement("small", null, React.createElement("a", {href: "#/conversation/"+post.replyUser+"/"+post.replyId, className: "link-button-gray"}, React.createElement(Glyphicon, {glyph: "comment"}))) + React.createElement("small", null, React.createElement("a", {href: "#/conversation/"+post.getUsername()+"/"+post.getId(), className: "link-button-gray"}, React.createElement(Glyphicon, {glyph: "comment"}))) ) ); } else { @@ -82,19 +98,19 @@ module.exports = Post = React.createClass({displayName: "Post", React.createElement(ListGroupItem, null, React.createElement(Row, {className: "nomargin"}, React.createElement(Col, {xs: 2, md: 2, className: "fullytight"}, - React.createElement("a", {href: "#/profile/"+this.props.post.username}, + React.createElement("a", {href: "#/profile/"+post.getUsername()}, React.createElement("img", {className: "img-responsive", src: this.state.avatar}) ) ), React.createElement(Col, {xs: 9, md: 9}, React.createElement("strong", null, this.state.fullname), " ", - post.content + post.getContent() ), React.createElement(Col, {xs: 1, md: 1, className: "fullytight text-align-right"}, this.state.timeAgo) ), React.createElement(Row, {className: "nomargin"}, React.createElement(Col, {xs: 6, md: 6, className: "fullytight"}, - post.isRetwist && React.createElement("small", null, React.createElement(Glyphicon, {glyph: "retweet", "aria-hidden": "true"}), React.createElement("em", null, "  retwisted by ", this.state.retwistingUser)) + retwist && React.createElement("small", null, React.createElement("em", null, "  retwisted by ", this.state.retwistingUser)) ), React.createElement(Col, {xs: 6, md: 6, className: "fullytight text-align-right"}, conversationLink) diff --git a/build-buffer/common/Postboard.js b/build-buffer/common/Postboard.js old mode 100644 new mode 100755 diff --git a/build-buffer/common/ProfileBoard.js b/build-buffer/common/ProfileBoard.js old mode 100644 new mode 100755 diff --git a/build-buffer/common/ProfileMixin.js b/build-buffer/common/ProfileMixin.js old mode 100644 new mode 100755 diff --git a/build-buffer/common/SafeStateChangeMixin.js b/build-buffer/common/SafeStateChangeMixin.js old mode 100644 new mode 100755 diff --git a/build-buffer/common/SetIntervalMixin.js b/build-buffer/common/SetIntervalMixin.js old mode 100644 new mode 100755 diff --git a/build-buffer/common/StreamMixin.js b/build-buffer/common/StreamMixin.js old mode 100644 new mode 100755 index 5e9c226..54b8c04 --- a/build-buffer/common/StreamMixin.js +++ b/build-buffer/common/StreamMixin.js @@ -1,72 +1,42 @@ module.exports = StreamMixin = { - addPost: function(post) { - - var postid = post.getUsername() + ":post" + post.getId(); - - if (!this.state.postIdentifiers[postid]) { - - this.setStateSafe(function(previousState, currentProps) { - - previousState.postIdentifiers[postid] = true; + addPost: function(post) { - if (post.isRetwist()){ - - - var postdata = { - username: post.getRetwistedUser(), - retwistingUser: post.getUsername(), - content: post.getRetwistedContent(), - id: post.getRetwistedId(), - timestamp: post.getTimestamp(), - postid: postid, - isRetwist: true - } - - } else { - - var postdata = { - username: post.getUsername(), - content: post.getContent(), - id: post.getId(), - timestamp: post.getTimestamp(), - postid: postid, - isRetwist: false - - } - - } - - if (post.isReply()) { - - postdata.isReply = true; - postdata.replyUser = post.getReplyUser(); - postdata.replyId = post.getReplyId(); - - } else { - - postdata.isReply = false; - - } - - previousState.data.push(postdata) + var postid = post.getUsername() + ":post" + post.getId(); - var compare = function (a,b) { - if (a.timestamp < b.timestamp) - return 1; - if (a.timestamp > b.timestamp) - return -1; - return 0; - } + if (!this.state.postIdentifiers[postid]) { - previousState.data.sort(compare); + this.setStateSafe(function(previousState, currentProps) { - return {data: previousState.data, postIdentifiers: previousState.postIdentifiers }; - }); - - } else { - - + previousState.postIdentifiers[postid] = true; + + var postdata = { + username: post.getUsername(), + id: post.getId(), + timestamp: post.getTimestamp(), + postid: postid } + + previousState.data.push(postdata) + + var compare = function (a,b) { + if (a.timestamp < b.timestamp) + return 1; + if (a.timestamp > b.timestamp) + return -1; + return 0; + } + + previousState.data.sort(compare); + + return {data: previousState.data, postIdentifiers: previousState.postIdentifiers }; + }); + + } else { + + } + + } + } \ No newline at end of file diff --git a/build-buffer/home/Home.js b/build-buffer/home/Home.js old mode 100644 new mode 100755 index 68964db..9147dbc --- a/build-buffer/home/Home.js +++ b/build-buffer/home/Home.js @@ -52,19 +52,18 @@ module.exports = Home = React.createClass({displayName: "Home", Twister.getUser(username).doLatestPostsUntil(function(post){ - if (post!==null) { - if(post.getTimestamp() b.timestamp) - return -1; - return 0; - } + var postid = post.getUsername() + ":post" + post.getId(); - previousState.data.sort(compare); + if (!this.state.postIdentifiers[postid]) { - return {data: previousState.data, postIdentifiers: previousState.postIdentifiers }; - }); - - } else { - - + this.setStateSafe(function(previousState, currentProps) { + + previousState.postIdentifiers[postid] = true; + + var postdata = { + username: post.getUsername(), + id: post.getId(), + timestamp: post.getTimestamp(), + postid: postid + } + + previousState.data.push(postdata) + + var compare = function (a,b) { + if (a.timestamp < b.timestamp) + return 1; + if (a.timestamp > b.timestamp) + return -1; + return 0; } + + previousState.data.sort(compare); + + return {data: previousState.data, postIdentifiers: previousState.postIdentifiers }; + }); + + } else { + + } + + } + } },{}],12:[function(require,module,exports){ var React = require('react'); @@ -840,19 +855,18 @@ module.exports = Home = React.createClass({displayName: "Home", Twister.getUser(username).doLatestPostsUntil(function(post){ - if (post!==null) { - if(post.getTimestamp() this._messages[id].getTimestamp() ) ) { + + delete this._messages[id]; + + } + + } + + var postCount = Object.keys(this._posts).length; + + if ( postCount<=1 && (!timestamp || timestamp > this._lastUpdate) ){ + + if ( this._posts[this._latestId] && ( + !timestamp || timestamp>this._messages[this._latestId].getTimestamp() + )) { + + delete this._posts[this._latestId]; + + } + + var postCount = Object.keys(this._posts).length; + + if (postCount==0) { + + var thisAccount = this._scope.getAccount(this._walletusername); + + delete thisAccount._diretmessages[this._name]; + + } + + } } TwisterDirectMessages.prototype._do = function (cbfunc) { - this._doMessage(this._latestId,cbfunc); + this._doMessage(this._latestId,cbfunc); } @@ -30198,6 +30452,18 @@ TwisterTorrent.prototype.inflate = function (flatData) { } +TwisterTorrent.prototype.trim = function (timestamp) { + + if ( !this._active && (!timestamp || timestamp > this._lastUpdate) ){ + + var thisAccount = this._scope.getAccount(this._walletusername); + + delete thisAccount._torrents[this._name]; + + } + +} + TwisterTorrent.prototype.activate = function () { this._active = true; @@ -30287,15 +30553,18 @@ TwisterTorrent.prototype._queryAndDo = function (cbfunc) { thisTorrent._log("updating other torrents based on getlasthave result") for (var username in res) { + + if (username in thisAccount._torrents) { - var resTorrent = thisAccount._torrents[username]; + var resTorrent = thisAccount._torrents[username]; - if (resTorrent._active) { + if (resTorrent._active) { - resTorrent._latestId = res[username]; - resTorrent._lastUpdate = Date.now()/1000; - resTorrent._updateInProgress = false; + resTorrent._latestId = res[username]; + resTorrent._lastUpdate = Date.now()/1000; + resTorrent._updateInProgress = false; + } } } @@ -30332,7 +30601,10 @@ TwisterTorrent.prototype._queryAndDo = function (cbfunc) { } else { - thisTorrent._handleError({message: "Activate torrent first"}); + thisTorrent._handleError({ + message: "Torrent inactive. Activate torrent first!", + code: 32082 + }); } @@ -30594,10 +30866,10 @@ Twister._averageSignatureCompTime = 200; Twister._signatureVerificationsInProgress = 0; //default query settings: -Twister._outdatedLimit = 90; +Twister._outdatedLimit = 45; Twister._querySettingsByType = {}; Twister._logfunc = function(){}; -Twister._host = ""; +Twister._host = "http://user:pwd@127.0.0.1:28332"; Twister._timeout = 20000; Twister._errorfunc = function(error){console.log("Twister error: "+error.message);}; @@ -30618,7 +30890,7 @@ Twister._promotedPosts = new TwisterPromotedPosts(Twister); * @param {bool} options.querySettingsByType * @param {bool} options.maxDHTQueries */ -Twister.init = function (options) { +Twister.setup = function (options) { for (var key in options) { @@ -30749,7 +31021,10 @@ Twister.loadServerAccounts = function (cbfunc) { } else { - Twister._handleError({message:"no wallet users found on the server."}) + Twister._handleError({ + message: "No wallet users found on the server.", + code: 32081 + }) } @@ -30812,12 +31087,15 @@ Twister.deserializeCache = function (flatData) { if (flatData) { - Twister.init(flatData.options); + Twister.setup(flatData.options); if (Twister._walletType=="server") { var TwisterAccount = require('./ServerWallet/TwisterAccount.js'); } else { - Twister._handleError({message: "Unsupported wallet type."}) + Twister._handleError({ + message: "Unsupported wallet type.", + code: 32080 + }) return; } @@ -30855,6 +31133,24 @@ Twister.deserializeCache = function (flatData) { } +Twister.trimCache = function (timestamp) { + + for (var username in this._userCache){ + this._userCache[username].trim(timestamp); + } + + for (var username in this._wallet){ + this._wallet[username].trim(timestamp); + } + + for (var tag in this._hashtags){ + this._hashtags[tag].trim(timestamp); + } + + this._promotedPosts.trim(timestamp); + +} + module.exports = Twister; },{"./ServerWallet/TwisterAccount.js":139,"./TwisterHashtag.js":145,"./TwisterPromotedPosts.js":149,"./TwisterResource.js":152,"./TwisterUser.js":155}],143:[function(require,module,exports){ @@ -30866,7 +31162,7 @@ var TwisterResource = require('./TwisterResource.js'); * Describes the avatar of a {@link TwisterUser}. * @module */ -TwisterAvatar = function (name,scope) { +var TwisterAvatar = function (name,scope) { TwisterResource.call(this,name,scope); @@ -30878,6 +31174,20 @@ inherits(TwisterAvatar,TwisterResource); module.exports = TwisterAvatar; +TwisterAvatar.prototype.trim = function (timestamp) { + + if (!timestamp || timestamp > this._lastUpdate){ + + var thisUser = this._scope.getUser(this._name); + + var TwisterAvatar = require("./TwisterAvatar.js"); + + thisUser._avatar = new TwisterAvatar(this._name,this._scope); + + } + +} + TwisterAvatar.prototype._queryAndDo = function (cbfunc) { var thisResource = this; @@ -30899,10 +31209,13 @@ TwisterAvatar.prototype._queryAndDo = function (cbfunc) { } else { - + thisResource._handleError({ + message: "DHT resource is empty.", + code: 32052 + }) thisResource._revisionNumber=0; thisResource._lastUpdate=Date.now()/1000; - cbfunc(thisResource); + //cbfunc(thisResource); } @@ -30921,7 +31234,7 @@ TwisterAvatar.prototype.getUrl = function () { return this._data; } -},{"./TwisterResource.js":152,"inherits":52}],144:[function(require,module,exports){ +},{"./TwisterAvatar.js":143,"./TwisterResource.js":152,"inherits":52}],144:[function(require,module,exports){ var inherits = require('inherits'); var TwisterResource = require('./TwisterResource.js'); @@ -30930,7 +31243,7 @@ var TwisterResource = require('./TwisterResource.js'); * Describes the followings of a {@link TwisterUser} * @module */ -TwisterFollowings = function (name,scope) { +var TwisterFollowings = function (name,scope) { TwisterResource.call(this,name,scope); this._type = "followings"; @@ -30939,15 +31252,53 @@ TwisterFollowings = function (name,scope) { inherits(TwisterFollowings,TwisterResource); +TwisterFollowings.prototype.trim = function (timestamp) { + + if (!timestamp || timestamp > this._lastUpdate){ + + var thisUser = this._scope.getUser(this._name); + + var TwisterFollowings = require("./TwisterFollowings.js"); + + thisUser._followings = new TwisterFollowings(this._name,this._scope); + + } + +} + TwisterFollowings.prototype._do= function (cbfunc) { this.doUsers(cbfunc); } TwisterFollowings.prototype._queryAndDo = function (cbfunc) { + + var thisResource = this; + var Twister = this._scope; + + var thisStream = Twister.getUser(this._name)._stream; + + if (thisStream._activeTorrentUser && thisStream._activeTorrentUser==this._name) { + + thisResource._log("using getfollowing rpc method") + + var thisAccount = Twister._wallet[this._name]; + + thisAccount.RPC("getfollowing",[thisAccount._name],function(result){ + + thisResource._data = result; + thisResource._lastUpdate=Date.now()/1000; + thisResource._do(cbfunc); + + },function(error){ + + thisResource._handleError(error); + + }); + + } else { + var currentCounter = 1; - - var thisResource = this; thisResource._data = []; @@ -30984,6 +31335,8 @@ TwisterFollowings.prototype._queryAndDo = function (cbfunc) { }; requestTilEmpty(cbfunc); + + } } @@ -31022,7 +31375,7 @@ TwisterFollowings.prototype.doUsers = function(cbfunc) { } module.exports = TwisterFollowings; -},{"./TwisterResource.js":152,"inherits":52}],145:[function(require,module,exports){ +},{"./TwisterFollowings.js":144,"./TwisterResource.js":152,"inherits":52}],145:[function(require,module,exports){ var inherits = require('inherits'); var TwisterResource = require('./TwisterResource.js'); @@ -31032,7 +31385,7 @@ var TwisterResource = require('./TwisterResource.js'); * Describes a hashtag resource. * @module */ -TwisterHashtag = function (name,scope) { +var TwisterHashtag = function (name,scope) { TwisterResource.call(this,name,scope); this._type = "hashtag"; @@ -31043,6 +31396,16 @@ TwisterHashtag = function (name,scope) { inherits(TwisterHashtag,TwisterResource); +TwisterHashtag.prototype.trim = function (timestamp) { + + if (!timestamp || timestamp > this._lastUpdate){ + + delete this._scope._hashtags[this._name]; + + } + +} + TwisterHashtag.prototype._do = function (cbfunc) { this.doPosts(cbfunc); } @@ -31122,7 +31485,7 @@ var TwisterResource = require('./TwisterResource.js'); * Describes the mentions of a {@link TwisterUser}. * @module */ -TwisterMentions = function (name,scope) { +var TwisterMentions = function (name,scope) { TwisterResource.call(this,name,scope); this._type = "mentions"; @@ -31132,6 +31495,20 @@ TwisterMentions = function (name,scope) { inherits(TwisterMentions,TwisterResource); +TwisterMentions.prototype.trim = function (timestamp) { + + if (!timestamp || timestamp > this._lastUpdate){ + + var thisUser = this._scope.getUser(this._name); + + var TwisterMentions = require("./TwisterMentions.js"); + + thisUser._mentions = new TwisterMentions(this._name,this._scope); + + } + +} + TwisterMentions.prototype._do = function (cbfunc) { this.doPosts(cbfunc); } @@ -31203,7 +31580,7 @@ TwisterMentions.prototype.doPosts = function (cbfunc) { } module.exports = TwisterMentions; -},{"./TwisterPost.js":147,"./TwisterResource.js":152,"inherits":52}],147:[function(require,module,exports){ +},{"./TwisterMentions.js":146,"./TwisterPost.js":147,"./TwisterResource.js":152,"inherits":52}],147:[function(require,module,exports){ "use strict"; var inherits = require('inherits'); @@ -31215,7 +31592,7 @@ var TwisterRetwists = require('./TwisterRetwists.js'); * Describes a single post of a {@link TwisterUser}. * @module */ -function TwisterPost(data,scope) { +function TwisterPost(data,signature,scope) { var name = data.n; var id = data.k; @@ -31224,6 +31601,7 @@ function TwisterPost(data,scope) { this._type = "post"; this._data = data; + this._signature = signature; this._isPromotedPost = false; this._replies = new TwisterReplies(name,id,scope); this._retwists = new TwisterRetwists(name,id,scope); @@ -31240,6 +31618,9 @@ TwisterPost.prototype.flatten = function () { flatData.retwists = this._retwists.flatten(); flatData.replies = this._replies.flatten(); + + flatData.isPromotedPost = this._isPromotedPost; + flatData.signature = this._signature; return flatData; @@ -31252,6 +31633,35 @@ TwisterPost.prototype.inflate = function (flatData) { this._replies.inflate(flatData.replies); this._retwists.inflate(flatData.retwists); + this._signature = flatData.signature; + this._isPromotedPost = flatData.isPromotedPost; + +} + +TwisterPost.prototype.trim = function (timestamp) { + + var keepPost = false; + + this._replies.trim(timestamp); + keepPost = keepPost || this._replies.inCache(); + + this._retwists.trim(timestamp); + keepPost = keepPost || this._retwists.inCache(); + + if ( !keepPost && ( !timestamp || timestamp > this.getTimestamp() ) ){ + + if (this._isPromotedPost) { + var thisStream = this._scope._promotedPosts; + } else { + var thisStream = this._scope.getUser(this._name)._stream; + } + + delete thisStream._posts[this.getId()]; + + thisStream._latestId = Math.max.apply(Math,Object.keys(thisStream._posts)); + + } + } TwisterPost.prototype._do = function (cbfunc) { @@ -31330,6 +31740,14 @@ TwisterPost.prototype.getUsername = function () { return this._data.n; } +/** @function + * @name getUsername + * @description returns the {@link TwisterUser} object of the user that posted the post. + */ +TwisterPost.prototype.getUser = function () { + return this._scope.getUser(this._data.n); +} + /** @function * @name isReply @@ -31341,10 +31759,10 @@ TwisterPost.prototype.isReply = function () { /** @function - * @name getReplyUser + * @name getReplyUsername * @description returns the username of the user to which this post is a reply. */ -TwisterPost.prototype.getReplyUser = function () { +TwisterPost.prototype.getReplyUsername = function () { return this._data.reply.n; } @@ -31375,7 +31793,7 @@ TwisterPost.prototype.doReplies = function (cbfunc,querySettings) { * @param querySettings {Object} */ TwisterPost.prototype.doPostRepliedTo = function (cbfunc,querySettings) { - this._scope.getUser(this.getReplyUser()).doPost(this.getReplyId(),cbfunc,querySettings); + this._scope.getUser(this.getReplyUsername()).doPost(this.getReplyId(),cbfunc,querySettings); } /** @function @@ -31423,7 +31841,7 @@ TwisterPost.prototype.getRetwistedContent = function () { * @name getRetwistedUser * @description returns the username of the retwisted post. */ -TwisterPost.prototype.getRetwistedUser = function () { +TwisterPost.prototype.getRetwistedUsername = function () { return this._data.rt.n; } @@ -31438,9 +31856,20 @@ TwisterPost.prototype.doRetwistingPosts = function (cbfunc,querySettings) { } +/** @function + * @name getRetwistedPost + * @description return an uncached and unverified {@link TwisterPost} object of the retwisted post. + * @param cbfunc {function} + */ +TwisterPost.prototype.getRetwistedPost = function (cbfunc) { + + return new TwisterPost(this._data.rt,this._data.sig_rt,this._scope); + +} + /** @function * @name doRetwistedPost - * @description calls cbfunc the retwisted post. + * @description Verifies and caches the retwisted post and calls cbfunc with it. * @param cbfunc {function} */ TwisterPost.prototype.doRetwistedPost = function (cbfunc) { @@ -31475,7 +31904,7 @@ var TwisterResource = require('./TwisterResource.js'); * Describes the profile of a {@link TwisterUser}. * @class */ -TwisterProfile = function (name,scope) { +var TwisterProfile = function (name,scope) { TwisterResource.call(this,name,scope); @@ -31488,6 +31917,20 @@ inherits(TwisterProfile,TwisterResource); module.exports = TwisterProfile; +TwisterProfile.prototype.trim = function (timestamp) { + + if (!timestamp || timestamp > this._lastUpdate){ + + var thisUser = this._scope.getUser(this._name); + + var TwisterProfile = require("./TwisterProfile.js"); + + thisUser._profile = new TwisterProfile(this._name,this._scope); + + } + +} + TwisterProfile.prototype._queryAndDo = function (cbfunc) { var thisResource = this; @@ -31509,10 +31952,13 @@ TwisterProfile.prototype._queryAndDo = function (cbfunc) { } else { - + thisResource._handleError({ + message: "DHT resource is empty.", + code: 32052 + }) thisResource._revisionNumber=0; thisResource._lastUpdate=Date.now()/1000; - cbfunc(thisResource); + //cbfunc(thisResource); } @@ -31532,6 +31978,10 @@ TwisterProfile.prototype.getAllFields = function () { } +TwisterProfile.prototype.getUsername = function () { + return this._name; +} + /** @function * @name getField * @description returns a single field of the profile @@ -31543,7 +31993,7 @@ TwisterProfile.prototype.getField = function (fieldname) { } else { return null } } -},{"./TwisterResource.js":152,"inherits":52}],149:[function(require,module,exports){ +},{"./TwisterProfile.js":148,"./TwisterResource.js":152,"inherits":52}],149:[function(require,module,exports){ var inherits = require('inherits'); var TwisterResource = require('./TwisterResource.js'); @@ -31552,7 +32002,7 @@ var TwisterResource = require('./TwisterResource.js'); * Describes the promoted posts that are part of the twister blockchain. * @class */ -TwisterPromotedPosts = function (scope) { +var TwisterPromotedPosts = function (scope) { var name = "promoted"; this._hasParentUser = false; @@ -31595,7 +32045,7 @@ TwisterPromotedPosts.prototype.inflate = function (flatData) { for(var i = 0; i < flatData.posts.length; i++){ - var newpost = new TwisterPost(flatData.posts[i].data,this._scope); + var newpost = new TwisterPost(flatData.posts[i].data,flatData.posts[i].signature,this._scope); newpost.inflate(flatData.posts[i]); this._posts[newpost.getId()]=newpost; @@ -31603,6 +32053,42 @@ TwisterPromotedPosts.prototype.inflate = function (flatData) { } +TwisterPromotedPosts.prototype.trim = function (timestamp) { + + for (var id in this._posts) { + + if (id!=this._latestId) { + + this._posts[id].trim(timestamp); + + } + + } + + var postCount = Object.keys(this._posts).length; + + if ( postCount<=1 && (!timestamp || timestamp > this._lastUpdate) ){ + + if (this._posts[this._latestId]) { + + this._posts[this._latestId].trim(); + + } + + var postCount = Object.keys(this._posts).length; + + if (postCount==0) { + + var TwisterPromotedPosts = require("./TwisterPromotedPosts.js"); + + this._scope._promotedPosts = new TwisterPromotedPosts(this._name,this._scope); + + } + + } + +} + TwisterPromotedPosts.prototype._do = function (cbfunc) { this._doPost(this._latestId,cbfunc); @@ -31662,7 +32148,7 @@ TwisterPromotedPosts.prototype._verifyAndCachePost = function (payload,cbfunc) var TwisterPost = require('./TwisterPost.js'); - var newpost = new TwisterPost(payload.userpost,thisResource._scope); + var newpost = new TwisterPost(payload.userpost,payload.sig_userpost,thisResource._scope); newpost._isPromotedPost = true; @@ -31674,39 +32160,14 @@ TwisterPromotedPosts.prototype._verifyAndCachePost = function (payload,cbfunc) } - if (cbfunc && signatureVerification=="none") { + if (cbfunc) { newpost._verified = true; cbfunc(newpost); - } else { - - if (cbfunc && signatureVerification=="background") { cbfunc(newpost); } - - Twister.getUser(thisResource._name)._doPubKey(function(pubkey){ - - pubkey.verifySignature(payload.userpost,payload.sig_userpost,function(verified){ - - - if (verified) { - - thisResource._verified=true; - - if (signatureVerification=="instant") { cbfunc(newpost); } - - } else { - - thisResource._handleError({message:"signature of post could not be verified"}); - - } - - }); - - }); - - } - + } + } } @@ -31773,7 +32234,7 @@ TwisterPromotedPosts.prototype.doLatestPostsUntil = function (cbfunc, querySetti module.exports = TwisterPromotedPosts; -},{"./TwisterPost.js":147,"./TwisterResource.js":152,"inherits":52}],150:[function(require,module,exports){ +},{"./TwisterPost.js":147,"./TwisterPromotedPosts.js":149,"./TwisterResource.js":152,"inherits":52}],150:[function(require,module,exports){ (function (Buffer){ var inherits = require('inherits'); @@ -31789,12 +32250,11 @@ var twister_network = { pubKeyHash: 0x00, } - /** * Describes the public key of a user. * @class */ -TwisterPubKey = function (name,scope) { +var TwisterPubKey = function (name,scope) { this._name = name; this._data = null; @@ -31825,6 +32285,20 @@ TwisterPubKey.prototype.inflate = function (flatData) { } +TwisterPubKey.prototype.trim = function (timestamp) { + + if (!timestamp || timestamp > this._lastUpdate){ + + var thisUser = this._scope.getUser(this._name); + + var TwisterPubKey = require("./TwisterPubKey.js"); + + thisUser._pubkey = new TwisterPubKey(this._name,this._scope); + + } + +} + TwisterPubKey.prototype._queryAndDo = function (cbfunc) { var thisResource = this; @@ -31845,7 +32319,14 @@ TwisterPubKey.prototype._queryAndDo = function (cbfunc) { } - } else { thisResource._handleError({message:"pubkey not available on server"}) } + } else { + + thisResource._handleError({ + message: "Public key not available on server.", + code: 32061 + }) + + } }, function(ret) { @@ -31907,11 +32388,11 @@ TwisterPubKey.prototype.verifySignature = function (message_ori, signature_ori, var retVal = Bitcoin.Message.verify(thisPubKey.getAddress(), signature, message, twister_network); } catch(e) { var retVal = false; - thisResource._handleError({message:"verification went sideways"}); + thisResource._log("verification went sideways"); } } catch(e) { var retVal = false; - thisResource._handleError({message:"signature is malformed"}) + thisResource._log("signature is malformed"); } @@ -31929,7 +32410,7 @@ TwisterPubKey.prototype.verifySignature = function (message_ori, signature_ori, } }).call(this,require("buffer").Buffer) -},{"./TwisterResource.js":152,"bencode":1,"bitcoinjs-lib":43,"buffer":172,"crypto":178,"inherits":52}],151:[function(require,module,exports){ +},{"./TwisterPubKey.js":150,"./TwisterResource.js":152,"bencode":1,"bitcoinjs-lib":43,"buffer":172,"crypto":178,"inherits":52}],151:[function(require,module,exports){ var inherits = require('inherits'); var TwisterResource = require('./TwisterResource.js'); @@ -31938,7 +32419,7 @@ var TwisterResource = require('./TwisterResource.js'); * Describes the replies to a {ælink TwisterPost}. * @class */ -TwisterReplies = function (name,id,scope) { +var TwisterReplies = function (name,id,scope) { TwisterResource.call(this,name,scope); this._type = "replies"; @@ -31968,6 +32449,20 @@ TwisterReplies.prototype.inflate = function (flatData) { } +TwisterReplies.prototype.trim = function (timestamp) { + + if (!timestamp || timestamp > this._lastUpdate){ + + var thisPost = this._scope.getUser(this._name).getPost(this._id); + + var TwisterReplies = require("./TwisterReplies.js"); + + thisPost._replies = new TwisterReplies(this._name,this._id,this._scope); + + } + +} + TwisterReplies.prototype._do = function (cbfunc) { this.doPosts(cbfunc); } @@ -32034,7 +32529,7 @@ TwisterReplies.prototype.doPosts = function (cbfunc) { } module.exports = TwisterReplies; -},{"./TwisterPost.js":147,"./TwisterResource.js":152,"inherits":52}],152:[function(require,module,exports){ +},{"./TwisterPost.js":147,"./TwisterReplies.js":151,"./TwisterResource.js":152,"inherits":52}],152:[function(require,module,exports){ "use strict"; /** @@ -32047,6 +32542,8 @@ function TwisterResource (name,scope) { this._scope = scope; this._name = name; this._hasParentUser = true; + + this._stash = null; this._data = null; this._verified = false; @@ -32136,7 +32633,7 @@ TwisterResource.prototype._checkQueryAndDo = function (cbfunc,querySettings) { thisResource._do(cbfunc); - thisResource._log("resource not in cahce. querying"); + thisResource._log("resource not in cache. querying"); thisResource._activeQuerySettings = {}; thisResource._updateInProgress = false; @@ -32166,7 +32663,7 @@ TwisterResource.prototype._checkQueryAndDo = function (cbfunc,querySettings) { */ TwisterResource.prototype.getQuerySetting = function (setting) { - //console.log(this._name); + //console.log(setting,this._activeQuerySettings); var Twister = this._scope; @@ -32192,13 +32689,20 @@ TwisterResource.prototype.getQuerySetting = function (setting) { return Twister[("_"+setting)]; } - this._handleError({message:"unknown query setting was requested."}); + this._handleError({ + message:"Unknown query setting was requested.", + code: 32051 + }); } -TwisterResource.prototype.setQuerySetting = function (setting,value) { +TwisterResource.prototype.setQuerySettings = function (settings) { - this._querySettings[settings] = value; + for (var key in settings) { + + this._querySettings[key] = settings[key]; + + } } @@ -32228,8 +32732,8 @@ TwisterResource.prototype.RPC = function (method, params, resultFunc, errorFunc) } - this._activeQuerySettings["method"]=method; - this._activeQuerySettings["params"]=params; + //this._activeQuerySettings["method"]=method; + //this._activeQuerySettings["params"]=params; //console.log("rpc by "+this._name+" : "+method+" "+JSON.stringify(this._activeQuerySettings)) @@ -32294,7 +32798,7 @@ TwisterResource.prototype.dhtget = function (args,cbfunc) { Twister._activeDHTQueries--; - thisResource._log("dhtger restul: "+JSON.stringify(res)); + thisResource._log("dhtget result: "+JSON.stringify(res)); if (res[0]) { @@ -32303,9 +32807,11 @@ TwisterResource.prototype.dhtget = function (args,cbfunc) { var signingUser = res[0].sig_user; if (signatureVerification!="none" - && (args[2]="m" || (args[0]==signingUser) ) ) { + && (args[2]=="m" || (args[0]==signingUser) ) ) { thisResource._log("issuing signature verification"); + + var stash = JSON.parse(JSON.stringify(thisResource.flatten())); if (signatureVerification=="background") { cbfunc(res); } @@ -32322,7 +32828,12 @@ TwisterResource.prototype.dhtget = function (args,cbfunc) { } else { - thisResource._handleError({message: "DHT resource signature could not be verified"}) + thisResource.inflate(stash); + + thisResource._handleError({ + message: "DHT resource signature could not be verified", + code: 32050 + }) } @@ -32337,8 +32848,8 @@ TwisterResource.prototype.dhtget = function (args,cbfunc) { } } else { + thisResource._log("dht resource is empty"); cbfunc(res); - thisResource._handleError({message:"dht resource is empty"}); } }, function(error) { @@ -32368,7 +32879,7 @@ var TwisterResource = require('./TwisterResource.js'); * Describes the retwists of a {@link TwisterPost}. * @class */ -TwisterRetwists = function (name,id,scope) { +var TwisterRetwists = function (name,id,scope) { TwisterResource.call(this,name,scope); this._type = "retwists"; @@ -32398,6 +32909,20 @@ TwisterRetwists.prototype.inflate = function (flatData) { } +TwisterRetwists.prototype.trim = function (timestamp) { + + if (!timestamp || timestamp > this._lastUpdate){ + + var thisPost = this._scope.getUser(this._name).getPost(this._id); + + var TwisterRetwists = require("./TwisterRetwists.js"); + + thisPost._retwists = new TwisterRetwists(this._name,this._id,this._scope); + + } + +} + TwisterRetwists.prototype._do = function (cbfunc) { this.doPosts(cbfunc); } @@ -32455,7 +32980,7 @@ TwisterRetwists.prototype.doPosts = function (cbfunc) { var username = nandk[0]; var id = parseInt(nandk[1]); - posts.push(Twister.getUser(username).getPost(id)); + posts.push(this._scope.getUser(username).getPost(id)); } @@ -32463,7 +32988,7 @@ TwisterRetwists.prototype.doPosts = function (cbfunc) { } module.exports = TwisterRetwists; -},{"./TwisterPost.js":147,"./TwisterResource.js":152,"inherits":52}],154:[function(require,module,exports){ +},{"./TwisterPost.js":147,"./TwisterResource.js":152,"./TwisterRetwists.js":153,"inherits":52}],154:[function(require,module,exports){ var inherits = require('inherits'); var TwisterResource = require('./TwisterResource.js'); @@ -32473,7 +32998,7 @@ var TwisterResource = require('./TwisterResource.js'); * Describes the stream of posts of a {@link TwisterUser}. * @class */ -TwisterStream = function (name,scope) { +var TwisterStream = function (name,scope) { TwisterResource.call(this,name,scope); @@ -32489,6 +33014,44 @@ TwisterStream = function (name,scope) { inherits(TwisterStream,TwisterResource); +TwisterStream.prototype.trim = function (timestamp) { + + for (var id in this._posts) { + + if (id!=this._latestId) { + + this._posts[id].trim(timestamp); + + } + + } + + var postCount = Object.keys(this._posts).length; + + if ( postCount<=1 && (!timestamp || timestamp > this._lastUpdate) && !this._activeTorrentUser ) { + + if (this._posts[this._latestId]) { + + this._posts[this._latestId].trim(); + + } + + var postCount = Object.keys(this._posts).length; + + if (postCount==0) { + + var thisUser = this._scope.getUser(this._name); + + var TwisterStream = require("./TwisterStream.js"); + + thisUser._stream = new TwisterStream(this._name,this._scope); + + } + + } + +} + TwisterStream.prototype.flatten = function () { var flatData = TwisterResource.prototype.flatten.call(this); @@ -32503,10 +33066,8 @@ TwisterStream.prototype.flatten = function () { flatData.latestId = this._latestId; flatData.activeTorrentUser = this._activeTorrentUser; - return flatData; - } TwisterStream.prototype.inflate = function (flatData) { @@ -32519,12 +33080,12 @@ TwisterStream.prototype.inflate = function (flatData) { this._latestId = flatData.latestId; this._activeTorrentUser = flatData.activeTorrentUser; - - for(var i = 0; i < flatData.posts.length; i++){ + + for(var i in flatData.posts){ if (flatData.posts[i].verified) { - var newpost = new TwisterPost(flatData.posts[i].data,Twister); + var newpost = new TwisterPost(flatData.posts[i].data,flatData.posts[i].signature,Twister); newpost.inflate(flatData.posts[i]); this._posts[newpost.getId()]=newpost; @@ -32605,8 +33166,14 @@ TwisterStream.prototype._queryAndDo = function (cbfunc) { } else { - cbfunc(null); + + thisResource._handleError({ + message: "DHT resource is empty.", + code: 32052 + }) thisResource._updateInProgress = false; + //cbfunc(null); + } } @@ -32636,7 +33203,7 @@ TwisterStream.prototype._verifyAndCachePost = function (payload,cbfunc) { var TwisterPost = require('./TwisterPost.js'); - var newpost = new TwisterPost(payload.userpost,Twister); + var newpost = new TwisterPost(payload.userpost,payload.sig_userpost,Twister); thisResource._posts[newpost.getId()] = newpost; @@ -32664,21 +33231,61 @@ TwisterStream.prototype._verifyAndCachePost = function (payload,cbfunc) { cbfunc(newpost); } + + var errorfunc = thisResource.getQuerySetting("errorfunc"); Twister.getUser(thisResource._name)._doPubKey(function(pubkey){ pubkey.verifySignature(payload.userpost,payload.sig_userpost,function(verified){ - if (verified) { newpost._verified=true; - - if (cbfunc && signatureVerification=="instant") { cbfunc(newpost); } + + if (newpost.isRetwist()) { + + var post_rt = payload.userpost.rt; + var sig_rt = payload.userpost.sig_rt; + + Twister.getUser(post_rt.n)._doPubKey(function(pubkey){ + + pubkey.verifySignature(post_rt,sig_rt,function(verified){ + + if (verified) { + + if (cbfunc && signatureVerification=="instant") { + cbfunc(newpost); + } + + } else { + + newpost.trim(); + + errorfunc.call(thisResource,{ + message: "Signature of retwisted post could not be verified.", + code: 32062 + }); + + } + + }); + + }); + + } else { + + if (cbfunc && signatureVerification=="instant") { cbfunc(newpost); } + + } } else { + + newpost.trim(); - thisResource._handleError({message:"signature of post could not be verified"}); + errorfunc.call(thisResource,{ + message: "Post signature could not be verified.", + code: 32060 + }); } @@ -32694,10 +33301,16 @@ TwisterStream.prototype._verifyAndCachePost = function (payload,cbfunc) { } -TwisterStream.prototype._doPost = function (id,cbfunc) { +TwisterStream.prototype._doPost = function (id, cbfunc, querySettings) { + if (querySettings===undefined) {querySettings={};} + + //console.log(querySettings) + var Twister = this._scope; + var thisResource = this; + if (id && id>0) { if (id in this._posts){ @@ -32707,6 +33320,9 @@ TwisterStream.prototype._doPost = function (id,cbfunc) { this._log("post already in cache"); } else { + + thisResource._activeQuerySettings = querySettings; + thisResource._updateInProgress = true; this._log("post "+id+" not in cache"); @@ -32717,6 +33333,9 @@ TwisterStream.prototype._doPost = function (id,cbfunc) { if (success) { thisResource._log("fill cache was successfull") + + thisResource._activeQuerySettings = {}; + thisResource._updateInProgress = false; cbfunc(thisResource._posts[id]) @@ -32726,7 +33345,23 @@ TwisterStream.prototype._doPost = function (id,cbfunc) { function (result) { - thisResource._verifyAndCachePost(result[0].p.v,cbfunc); + if (result[0]) { + + thisResource._verifyAndCachePost(result[0].p.v,cbfunc); + + } else { + + thisResource._handleError({ + message: "DHT resource is empty.", + code: 32052 + }) + thisResource._updateInProgress = false; + //cbfunc(null); + + } + + thisResource._activeQuerySettings = {}; + thisResource._updateInProgress = false; } @@ -32748,7 +33383,7 @@ TwisterStream.prototype._doUntil = function (cbfunc, querySettings) { var retVal = cbfunc(post); - if( post.getId()!=1 && retVal!==false ) { + if( post.getLastId() && retVal!==false ) { post.doPreviousPost(doUntil, querySettings); @@ -32761,7 +33396,7 @@ TwisterStream.prototype._doUntil = function (cbfunc, querySettings) { module.exports = TwisterStream; -},{"./TwisterPost.js":147,"./TwisterResource.js":152,"inherits":52}],155:[function(require,module,exports){ +},{"./TwisterPost.js":147,"./TwisterResource.js":152,"./TwisterStream.js":154,"inherits":52}],155:[function(require,module,exports){ 'use strict'; var TwisterProfile = require('./TwisterProfile.js'); @@ -32795,6 +33430,12 @@ function TwisterUser(name,scope) { module.exports = TwisterUser; +TwisterUser.prototype.trim = function () { + + delete Twister._userCache[this._name]; + +} + TwisterUser.prototype.flatten = function () { return { @@ -32827,6 +33468,34 @@ TwisterUser.prototype.inflate = function (flatData) { } +TwisterUser.prototype.trim = function (timestamp) { + + var keepUser = false; + + this._profile.trim(timestamp); + keepUser = keepUser || this._profile.inCache(); + + this._avatar.trim(timestamp); + keepUser = keepUser || this._avatar.inCache(); + + this._followings.trim(timestamp); + keepUser = keepUser || this._followings.inCache(); + + this._mentions.trim(timestamp); + keepUser = keepUser || this._mentions.inCache(); + + this._stream.trim(timestamp); + keepUser = keepUser || this._stream.inCache(); + + this._pubkey.trim(timestamp); + keepUser = keepUser || this._pubkey.inCache(); + + if ( !keepUser ) { + delete this._scope._userCache[this._name]; + } + +} + TwisterUser.prototype.getUsername = function () { return this._name; } @@ -32863,8 +33532,8 @@ TwisterUser.prototype.doStatus = function (cbfunc, querySettings) { this._stream._checkQueryAndDo(cbfunc, querySettings); }; -TwisterUser.prototype.doPost = function (id, cbfunc) { - this._stream._doPost(id, cbfunc); +TwisterUser.prototype.doPost = function (id, cbfunc, querySettings) { + this._stream._doPost(id, cbfunc, querySettings); } diff --git a/css/main.css b/css/main.css old mode 100644 new mode 100755 diff --git a/css/paper-theme.css b/css/paper-theme.css old mode 100644 new mode 100755 diff --git a/fonts/glyphicons-halflings-regular.woff b/fonts/glyphicons-halflings-regular.woff old mode 100644 new mode 100755 diff --git a/img/bouncing_ball.gif b/img/bouncing_ball.gif old mode 100644 new mode 100755 diff --git a/img/genericPerson.png b/img/genericPerson.png old mode 100644 new mode 100755 diff --git a/index.html b/index.html old mode 100644 new mode 100755 diff --git a/jsx/App.js b/jsx/App.js old mode 100644 new mode 100755 index 5060a24..5c9d17b --- a/jsx/App.js +++ b/jsx/App.js @@ -66,6 +66,8 @@ App = React.createClass({ }, saveCache: function () { + var timestamp = Date.now()/1000 - 60*60*24*14; + Twister.trimCache(timestamp); localStorage.setItem("twister-cache", JSON.stringify(Twister.serializeCache())) }, @@ -85,65 +87,22 @@ App = React.createClass({ getInitialState: function () { - Twister.deserializeCache(JSON.parse(localStorage.getItem("twister-cache"))); - - //this.clearCache(); - var state={}; state.activeAccount = localStorage.getItem("twister-react-activeAccount") state.accounts = Twister.getAccounts(); + if (!state.activeAccount) { state.activeAccount=state.accounts[0]; } + //console.log(state); return state; + }, componentDidMount: function () { - var thisComponent = this; - - if (this.state.accounts.length==0) { - - Twister.init({ - host: this.state.appSettings.host, - logfunc: function(log){console.log(log)}, - outdatedLimit: this.state.appSettings.pollInterval, - querySettingsByType: { - - outdatedLimit: { - pubkey: this.state.appSettings.pollIntervalProfile, - profile: this.state.appSettings.pollIntervalProfile, - avatar: this.state.appSettings.pollIntervalProfile, - torrent: this.state.appSettings.pollIntervalProfile, - followings: this.state.appSettings.pollIntervalProfile - } - - } - }); - - Twister.loadServerAccounts(function(){ - - thisComponent.setStateSafe(function(state){ - - state.accounts = Twister.getAccounts(); - //console.log(state.accounts); - state.activeAccount = state.accounts[0]; - - return state; - - },function(){ - thisComponent.switchAccount(thisComponent.state.activeAccount); - }); - }); - - } else { - - this.switchAccount(this.state.activeAccount); - - } - this.setInterval(this.saveCache,300000); }, @@ -228,12 +187,84 @@ var routes = ( ); +initializeApp = function () { -Router.run(routes, function (Handler) { - React.render(, document.getElementById('content')); -}); + Router.run(routes, function (Handler) { + React.render(, document.getElementById('content')); + }); +} + +Twister.deserializeCache(JSON.parse(localStorage.getItem("twister-cache"))); + +Twister.setup({logfunc: function(log){console.log(log)}}) + +var accounts = Twister.getAccounts(); + +if (accounts.length==0) { + + if (!localStorage.getItem("twister-react-settings")) { + + var appSettings = { + + pollInterval:60, + pollIntervalProfile: 3600, + ignoredUsers: "nobody", + host: "http://user:pwd@localhost:28332" + + }; + } else { + + var appSettings = JSON.parse(localStorage.getItem("twister-react-settings")); + + } + + Twister.setup({ + host: appSettings.host, + //logfunc: function(log){console.log(log)}, + outdatedLimit: appSettings.pollInterval, + querySettingsByType: { + + outdatedLimit: { + pubkey: appSettings.pollIntervalProfile, + profile: appSettings.pollIntervalProfile, + avatar: appSettings.pollIntervalProfile, + torrent: appSettings.pollIntervalProfile, + followings: appSettings.pollIntervalProfile + } + + } + }); + + Twister.loadServerAccounts(function(){ + + var activeAccount = localStorage.getItem("twister-react-activeAccount"); + + var accounts = Twister.getAccounts(); + + if (!activeAccount) { + + activeAccount = accounts[0]; + localStorage.setItem("twister-react-activeAccount",activeAccount); + + } + + console.log("active account defaulted to "+activeAccount) + + Twister.getAccount(activeAccount).activateTorrents(function(){ + + initializeApp(); + + }); + + }); + +} else { + + initializeApp(); + +} ////// INIT EVENTLISTENERS ON WINDOW diff --git a/jsx/common/AppSettingsMixin.js b/jsx/common/AppSettingsMixin.js old mode 100644 new mode 100755 diff --git a/jsx/common/EventListenerMixin.js b/jsx/common/EventListenerMixin.js old mode 100644 new mode 100755 diff --git a/jsx/common/MiniProfile.js b/jsx/common/MiniProfile.js old mode 100644 new mode 100755 diff --git a/jsx/common/Post.js b/jsx/common/Post.js old mode 100644 new mode 100755 index f114c6d..4a9366e --- a/jsx/common/Post.js +++ b/jsx/common/Post.js @@ -16,11 +16,12 @@ var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js'); module.exports = Post = React.createClass({ mixins: [SetIntervalMixin,SafeStateChangeMixin], getInitialState: function() { + return { avatar: "img/genericPerson.png", - fullname: "", - retwistingUser: this.props.post.retwistingUser, - timeAgo: "" + fullname: "", + timeAgo: "", + retwistingUser: this.props.post.username }; }, updateTimeAgo: function() { @@ -39,39 +40,54 @@ module.exports = Post = React.createClass({ }, componentDidMount: function () { + var thisComponent = this; + var post = Twister.getUser(this.props.post.username).getPost(this.props.post.id); + + if (post.isRetwist()) { + + post.getUser().doProfile(function(profile){ + thisComponent.setStateSafe({retwistingUser: profile.getField("fullname")}); + }); + + post=post.getRetwistedPost(); + + } + //console.log(this.props.post.username+":post"+this.props.post.id); - Twister.getUser(this.props.post.username).doAvatar(function(avatar){ + post.getUser().doAvatar(function(avatar){ if (avatar.getUrl()) { thisComponent.setStateSafe({avatar: avatar.getUrl()}); } }); - Twister.getUser(this.props.post.username).doProfile(function(profile){ + post.getUser().doProfile(function(profile){ thisComponent.setStateSafe({fullname: profile.getField("fullname")}); }); - if (this.props.post.isRetwist) { - Twister.getUser(this.props.post.retwistingUser).doProfile(function(profile){ - thisComponent.setStateSafe({retwistingUser: profile.getField("fullname")}); - }); - } - this.updateTimeAgo(); this.setInterval(this.updateTimeAgo,60000); }, render: function() { - var post = this.props.post; - if (post.isReply) { + var post = Twister.getUser(this.props.post.username).getPost(this.props.post.id); + var retwist = false; + + if (post.isRetwist()) { + retwist = true; + post=post.getRetwistedPost(); + + } + + if (post.isReply()) { var conversationLink = ( View Conversation }> - + ); } else { @@ -82,19 +98,19 @@ module.exports = Post = React.createClass({ - + {this.state.fullname}  - {post.content} + {post.getContent()} {this.state.timeAgo} - {post.isRetwist && + {retwist &&  retwisted by {this.state.retwistingUser} } {conversationLink} diff --git a/jsx/common/Postboard.js b/jsx/common/Postboard.js old mode 100644 new mode 100755 diff --git a/jsx/common/ProfileBoard.js b/jsx/common/ProfileBoard.js old mode 100644 new mode 100755 diff --git a/jsx/common/ProfileMixin.js b/jsx/common/ProfileMixin.js old mode 100644 new mode 100755 diff --git a/jsx/common/SafeStateChangeMixin.js b/jsx/common/SafeStateChangeMixin.js old mode 100644 new mode 100755 diff --git a/jsx/common/SetIntervalMixin.js b/jsx/common/SetIntervalMixin.js old mode 100644 new mode 100755 diff --git a/jsx/common/StreamMixin.js b/jsx/common/StreamMixin.js old mode 100644 new mode 100755 index 5e9c226..54b8c04 --- a/jsx/common/StreamMixin.js +++ b/jsx/common/StreamMixin.js @@ -1,72 +1,42 @@ module.exports = StreamMixin = { - addPost: function(post) { - - var postid = post.getUsername() + ":post" + post.getId(); - - if (!this.state.postIdentifiers[postid]) { - - this.setStateSafe(function(previousState, currentProps) { - - previousState.postIdentifiers[postid] = true; + addPost: function(post) { - if (post.isRetwist()){ - - - var postdata = { - username: post.getRetwistedUser(), - retwistingUser: post.getUsername(), - content: post.getRetwistedContent(), - id: post.getRetwistedId(), - timestamp: post.getTimestamp(), - postid: postid, - isRetwist: true - } - - } else { - - var postdata = { - username: post.getUsername(), - content: post.getContent(), - id: post.getId(), - timestamp: post.getTimestamp(), - postid: postid, - isRetwist: false - - } - - } - - if (post.isReply()) { - - postdata.isReply = true; - postdata.replyUser = post.getReplyUser(); - postdata.replyId = post.getReplyId(); - - } else { - - postdata.isReply = false; - - } - - previousState.data.push(postdata) + var postid = post.getUsername() + ":post" + post.getId(); - var compare = function (a,b) { - if (a.timestamp < b.timestamp) - return 1; - if (a.timestamp > b.timestamp) - return -1; - return 0; - } + if (!this.state.postIdentifiers[postid]) { - previousState.data.sort(compare); + this.setStateSafe(function(previousState, currentProps) { - return {data: previousState.data, postIdentifiers: previousState.postIdentifiers }; - }); - - } else { - - + previousState.postIdentifiers[postid] = true; + + var postdata = { + username: post.getUsername(), + id: post.getId(), + timestamp: post.getTimestamp(), + postid: postid } + + previousState.data.push(postdata) + + var compare = function (a,b) { + if (a.timestamp < b.timestamp) + return 1; + if (a.timestamp > b.timestamp) + return -1; + return 0; + } + + previousState.data.sort(compare); + + return {data: previousState.data, postIdentifiers: previousState.postIdentifiers }; + }); + + } else { + + } + + } + } \ No newline at end of file diff --git a/jsx/home/Home.js b/jsx/home/Home.js old mode 100644 new mode 100755 index 140cae2..ca96a6b --- a/jsx/home/Home.js +++ b/jsx/home/Home.js @@ -52,19 +52,18 @@ module.exports = Home = React.createClass({ Twister.getUser(username).doLatestPostsUntil(function(post){ - if (post!==null) { - if(post.getTimestamp()