diff --git a/app/js/controllers/init/sync/SyncController.js b/app/js/controllers/init/sync/SyncController.js index 690e112f8c2bda69f582cadecedd6420d2558e8e..10bfba74ed4851ecdc9181d9a97770f08c19da85 100644 --- a/app/js/controllers/init/sync/SyncController.js +++ b/app/js/controllers/init/sync/SyncController.js @@ -52,6 +52,9 @@ module.exports = ($scope, $http, $state, $timeout, $stateParams, $translate, UIU $scope.startSync = () => { $scope.down_percent = 0; $scope.apply_percent = 0; + $scope.storage_percent = 0; + $scope.sbx_percent = 0; + $scope.peers_percent = 0; $scope.sync_failed = false; $scope.synchronizing = true; return co(function *() { @@ -62,6 +65,9 @@ module.exports = ($scope, $http, $state, $timeout, $stateParams, $translate, UIU if (data.type == 'sync') { $scope.down_percent = 100; $scope.apply_percent = 100; + $scope.storage_percent = 100; + $scope.sbx_percent = 100; + $scope.peers_percent = 100; $scope.sync_failed = data.value; let errorMessage = data.msg && (data.msg.message || data.msg); errorMessage = translatedErr + ' « ' + errorMessage + ' »'; @@ -82,6 +88,18 @@ module.exports = ($scope, $http, $state, $timeout, $stateParams, $translate, UIU $scope.apply_percent = data.value; changed = true; } + if (data.type == 'saved' && $scope.storage_percent != data.value) { + $scope.storage_percent = data.value; + changed = true; + } + if (data.type == 'sandbox' && $scope.sbx_percent != data.value) { + $scope.sbx_percent = data.value; + changed = true; + } + if (data.type == 'peersSync' && $scope.peers_percent != data.value) { + $scope.peers_percent = data.value; + changed = true; + } if (changed) { $scope.$apply(); } diff --git a/app/views/init/sync/sync.jade b/app/views/init/sync/sync.jade index 89d096f3aa7eec19d5df9bf9bfa6762baf4cda0d..62ed0f88805a48ad0ccfdf78dd84b033558ef700 100644 --- a/app/views/init/sync/sync.jade +++ b/app/views/init/sync/sync.jade @@ -63,11 +63,26 @@ main(class="syncMain") .progress .determinate(style="width: {{ down_percent }}%") .col.s4.m3.left-align - span Downloading... ({{ down_percent }}%) + span Download... ({{ down_percent }}%) + .col.s8.m9 + .progress + .determinate(style="width: {{ storage_percent }}%") + .col.s4.m3.left-align + span Storage... ({{ storage_percent }}%) .col.s8.m9 .progress .determinate(style="width: {{ apply_percent }}%") .col.s4.m3.left-align - span Applying... ({{ apply_percent }}%) + span Apply... ({{ apply_percent }}%) + .col.s8.m9 + .progress + .determinate(style="width: {{ sbx_percent }}%") + .col.s4.m3.left-align + span Sandbox... ({{ sbx_percent }}%) + .col.s8.m9 + .progress + .determinate(style="width: {{ peers_percent }}%") + .col.s4.m3.left-align + span Peers... ({{ peers_percent }}%) blockquote.card-panel.left-align(ng-show="sync_failed") {{ 'sync.failed' | translate }} \ No newline at end of file diff --git a/public/app.js b/public/app.js index beca0ab02b5201c28128f3970e3c86a53cb4d127..cb9719c1be385c65eb8191b8b907b0b09f58fd75 100644 --- a/public/app.js +++ b/public/app.js @@ -582,6 +582,9 @@ module.exports = function ($scope, $http, $state, $timeout, $stateParams, $trans $scope.startSync = function () { $scope.down_percent = 0; $scope.apply_percent = 0; + $scope.storage_percent = 0; + $scope.sbx_percent = 0; + $scope.peers_percent = 0; $scope.sync_failed = false; $scope.synchronizing = true; return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() { @@ -609,6 +612,9 @@ module.exports = function ($scope, $http, $state, $timeout, $stateParams, $trans if (data.type == 'sync') { $scope.down_percent = 100; $scope.apply_percent = 100; + $scope.storage_percent = 100; + $scope.sbx_percent = 100; + $scope.peers_percent = 100; $scope.sync_failed = data.value; var errorMessage = data.msg && (data.msg.message || data.msg); errorMessage = translatedErr + ' « ' + errorMessage + ' »'; @@ -630,6 +636,18 @@ module.exports = function ($scope, $http, $state, $timeout, $stateParams, $trans $scope.apply_percent = data.value; changed = true; } + if (data.type == 'saved' && $scope.storage_percent != data.value) { + $scope.storage_percent = data.value; + changed = true; + } + if (data.type == 'sandbox' && $scope.sbx_percent != data.value) { + $scope.sbx_percent = data.value; + changed = true; + } + if (data.type == 'peersSync' && $scope.peers_percent != data.value) { + $scope.peers_percent = data.value; + changed = true; + } if (changed) { $scope.$apply(); } diff --git a/public/app.js.map b/public/app.js.map index 30561a89c03ea8e26ef076ac49793f6d83809953..b557c7444dea5e2246f883fda1e5d88500ada9c5 100644 --- a/public/app.js.map +++ b/public/app.js.map @@ -1 +1 @@ -{"version":3,"sources":["app/js/controllers/AboutController.js","app/js/controllers/IndexController.js","app/js/controllers/init/create/IdentityController.js","app/js/controllers/init/create/ParametersController.js","app/js/controllers/init/create/RootBlockController.js","app/js/controllers/init/sync/SyncController.js","app/js/controllers/main/MainController.js","app/js/controllers/main/graphs/GraphsBlockchainController.js","app/js/controllers/main/graphs/GraphsController.js","app/js/controllers/main/home/HomeController.js","app/js/controllers/main/home/tabs/HomeConnectionsController.js","app/js/controllers/main/home/tabs/HomeNetworkController.js","app/js/controllers/main/home/tabs/OverviewController.js","app/js/controllers/main/settings/SettingsController.js","app/js/controllers/main/settings/tabs/BackupController.js","app/js/controllers/main/settings/tabs/CPUController.js","app/js/controllers/main/settings/tabs/CurrencyController.js","app/js/controllers/main/settings/tabs/DataController.js","app/js/controllers/main/settings/tabs/KeyController.js","app/js/controllers/main/settings/tabs/LogsController.js","app/js/controllers/main/settings/tabs/LogsSettingsController.js","app/js/controllers/main/settings/tabs/ModulesController.js","app/js/controllers/main/settings/tabs/NetworkController.js","app/js/app.config.js","app/js/application.js","app/js/lib/conf/conf.js","app/js/lib/conf/i18n/en.json","app/js/lib/conf/routes.js","app/js/lib/conf/translate.js","app/js/lib/entity/peer.js","app/js/lib/mobileDetector.js","app/js/services/base58.js","app/js/services/datetime.js","app/js/services/graphs.js","app/js/services/importer.js","app/js/services/pubkeyGenerator.js","app/js/services/ui_utils.js","app/js/services/webmin.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3BA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1DA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1BA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzNA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzLA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApNA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA9JA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjKA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjZA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnDA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzFA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArDA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvKA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArFA;AAAA;CCAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlGA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlBA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlQA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAheA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnHA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxFA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1BA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlPA;AAAA;CCAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7DA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApDA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvPA;AAAA","file":"public/app.js","sourcesContent":["\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, version, UIUtils) {\n\n $scope.version = version;\n\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return UIUtils.translate('help.about_duniter.title');\n\n case 2:\n $scope.$parent.title = _context.sent;\n\n case 3:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $http, $state, Webmin, summary, UIUtils) {\n\n UIUtils.changeTitle(summary.version, summary.parameters.currency, summary.conf.prefix);\n\n $scope.message = 'index.message.loading';\n co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var connected, _summary;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n connected = false;\n _context.prev = 1;\n _context.next = 4;\n return Webmin.summary();\n\n case 4:\n _summary = _context.sent;\n\n if (!_summary.current) {\n _context.next = 7;\n break;\n }\n\n return _context.abrupt('return', $state.go('main.home.overview'));\n\n case 7:\n return _context.abrupt('return', $state.go('configure.choose'));\n\n case 10:\n _context.prev = 10;\n _context.t0 = _context['catch'](1);\n\n console.error(connected, _context.t0);\n\n if (connected) {\n _context.next = 15;\n break;\n }\n\n return _context.abrupt('return', $state.go('error', { err: 'err.connection' }));\n\n case 15:\n return _context.abrupt('return', $state.go('error', { err: _context.t0 }));\n\n case 16:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[1, 10]]);\n }));\n};\n","\"use strict\";\n\nvar conf = require('js/lib/conf/conf');\n\nmodule.exports = function ($scope, $state, PubkeyGenerator) {\n\n setTimeout(function () {\n $('select').material_select();\n }, 500);\n\n $scope.accept = function () {\n var modal = $('#modal1');\n if (modal.css('display') == 'none') {\n $('#modal1').openModal();\n }\n };\n\n PubkeyGenerator($scope);\n\n if (conf.dev_autoconf) {\n $scope.$parent.conf.idty_uid = 'dev_' + ~~(Math.random() * 2147483647);\n $scope.$parent.conf.idty_entropy = ~~(Math.random() * 2147483647) + \"\";\n $scope.$parent.conf.idty_password = ~~(Math.random() * 2147483647) + \"\";\n $state.go('configure.create.network');\n }\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, UIUtils) {\n\n UIUtils.enableInputs();\n};\n","\"use strict\";\n\nvar co = require('co');\nvar conf = require('js/lib/conf/conf');\n\nmodule.exports = function ($scope, $http, $state, Webmin) {\n\n $scope.generated = '';\n $scope.started = false;\n $scope.message = 'configuration.create_root.need_a_try';\n\n $scope.start = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var hosts;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.prev = 0;\n hosts = [];\n\n if ($scope.$parent.conf.remote_ipv4) {\n hosts.push([$scope.$parent.conf.remote_ipv4, $scope.$parent.conf.rport].join(':'));\n }\n if ($scope.$parent.conf.remote_ipv6) {\n hosts.push([\"[\" + $scope.$parent.conf.remote_ipv6 + \"]\", $scope.$parent.conf.rport].join(':'));\n }\n $scope.host_listening = hosts.join('\\n');\n $scope.started = true;\n _context.next = 8;\n return Webmin.server.sendConf({\n conf: $scope.$parent.conf\n });\n\n case 8:\n _context.next = 10;\n return $scope.try();\n\n case 10:\n _context.next = 15;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](0);\n\n $scope.message = _context.t0.message;\n\n case 15:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[0, 12]]);\n }));\n };\n\n $scope.stop = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n $scope.started = false;\n\n case 1:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n };\n\n $scope.try = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.prev = 0;\n _context3.next = 3;\n return Webmin.server.previewNext();\n\n case 3:\n $scope.block = _context3.sent;\n\n $scope.generated = $scope.block.raw;\n $scope.message = '';\n _context3.next = 11;\n break;\n\n case 8:\n _context3.prev = 8;\n _context3.t0 = _context3['catch'](0);\n\n $scope.message = _context3.t0.message;\n\n case 11:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this, [[0, 8]]);\n }));\n };\n\n $scope.accept = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var res;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return Webmin.blockchain.block_add({\n block: $scope.generated\n });\n\n case 2:\n res = _context4.sent;\n\n if (!(res.number == 0)) {\n _context4.next = 6;\n break;\n }\n\n _context4.next = 6;\n return $scope.startServices();\n\n case 6:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n };\n\n $scope.startServices = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n _context5.next = 2;\n return Webmin.server.services.startAll();\n\n case 2:\n $state.go('index');\n\n case 3:\n case 'end':\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n };\n\n $scope.cancelAndReset = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n _context6.next = 2;\n return Webmin.server.services.stopAll();\n\n case 2:\n _context6.next = 4;\n return Webmin.server.resetData();\n\n case 4:\n $state.go('index');\n\n case 5:\n case 'end':\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n };\n\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {\n return regeneratorRuntime.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n _context7.prev = 0;\n _context7.next = 3;\n return $scope.start();\n\n case 3:\n _context7.next = 5;\n return $scope.try();\n\n case 5:\n $scope.started = true;\n _context7.next = 11;\n break;\n\n case 8:\n _context7.prev = 8;\n _context7.t0 = _context7['catch'](0);\n\n $scope.started = false;\n\n case 11:\n case 'end':\n return _context7.stop();\n }\n }\n }, _callee7, this, [[0, 8]]);\n }));\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $http, $state, $timeout, $stateParams, $translate, UIUtils, Webmin) {\n\n var syncWS = Webmin.ws();\n\n UIUtils.enableInputs();\n $scope.sync_mode = 'simplified';\n $scope.simplified_host = '';\n $scope.synchronizing = false;\n $scope.sync_failed = false;\n $scope.host = $stateParams.host || localStorage.getItem('sync_host') || '';\n $scope.port = parseInt($stateParams.port) || parseInt(localStorage.getItem('sync_port')) || 10901;\n $scope.to = parseInt($stateParams.to);\n $scope.wrong_host = false;\n $scope.remote_current = null;\n\n $scope.checkNode = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var current, targetHost;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n $scope.checked_host = '';\n $scope.sync_error = '';\n $scope.sync_message = '';\n if ($scope.sync_mode == 'simplified') {\n $scope.host = $scope.simplified_host.split(':')[0];\n $scope.port = parseInt($scope.simplified_host.split(':')[1]);\n }\n $scope.checking = true;\n _context.prev = 5;\n _context.next = 8;\n return Webmin.server.testSync({\n host: $scope.host,\n port: $scope.port\n });\n\n case 8:\n current = _context.sent;\n targetHost = [$scope.host, $scope.port].join(':');\n\n if (current) {\n $scope.remote_current = current;\n $scope.checked_host = targetHost;\n }\n UIUtils.toast('sync.ready.node.part1');\n $timeout(function () {\n if (!$scope.synchronizing) {\n UIUtils.toast('sync.ready.node.part2');\n }\n }, 6000);\n _context.next = 18;\n break;\n\n case 15:\n _context.prev = 15;\n _context.t0 = _context['catch'](5);\n\n $scope.sync_error = 'sync.error.unreachable.try.another.node';\n\n case 18:\n $scope.checking = false;\n return _context.abrupt('return', $scope.checked_host ? true : false);\n\n case 20:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[5, 15]]);\n }));\n };\n\n $scope.startSync = function () {\n $scope.down_percent = 0;\n $scope.apply_percent = 0;\n $scope.sync_failed = false;\n $scope.synchronizing = true;\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var sp, translatedErr;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return $translate('sync.started.node');\n\n case 2:\n _context2.t0 = _context2.sent;\n _context2.t1 = _context2.t0 + ' ';\n _context2.t2 = $scope.checked_host;\n $scope.sync_message = _context2.t1 + _context2.t2;\n sp = $scope.checked_host.split(':');\n _context2.next = 9;\n return $translate('err.sync.interrupted');\n\n case 9:\n translatedErr = _context2.sent;\n\n syncWS.on(undefined, function (data) {\n if (data.type == 'sync') {\n $scope.down_percent = 100;\n $scope.apply_percent = 100;\n $scope.sync_failed = data.value;\n var errorMessage = data.msg && (data.msg.message || data.msg);\n errorMessage = translatedErr + ' « ' + errorMessage + ' »';\n Webmin.server.republishNewSelfPeer().then(function () {\n return console.log('Peer republished');\n });\n if (data.value === true) {\n $state.go('index');\n } else {\n $state.go('error', { err: errorMessage });\n }\n } else {\n var changed = true;\n if (data.type == 'download' && $scope.down_percent != data.value) {\n $scope.down_percent = data.value;\n changed = true;\n }\n if (data.type == 'applied' && $scope.apply_percent != data.value) {\n $scope.apply_percent = data.value;\n changed = true;\n }\n if (changed) {\n $scope.$apply();\n }\n }\n });\n _context2.next = 13;\n return Webmin.server.autoConfNetwork();\n\n case 13:\n localStorage.setItem(\"sync_host\", sp[0]);\n localStorage.setItem(\"sync_port\", sp[1]);\n Webmin.server.startSync({\n host: sp[0],\n port: sp[1],\n to: $scope.to,\n chunkLen: Math.max(500, Math.min(25, $scope.remote_current ? $scope.remote_current.number / 100 : 0))\n });\n\n case 16:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n };\n\n // Autostart\n if ($scope.host && $scope.port && $stateParams.sync) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var nodeOK;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return $scope.checkNode();\n\n case 2:\n nodeOK = _context3.sent;\n\n if (!nodeOK) {\n _context3.next = 5;\n break;\n }\n\n return _context3.abrupt('return', $scope.startSync());\n\n case 5:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n }\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $state, $http, $timeout, $interval, Webmin, uiModules, summary, UIUtils) {\n\n $scope.externalMenus = [];\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n var _loop = function _loop() {\n var moduleName = _step.value;\n\n var module = window.uiModules[moduleName];\n if (module) {\n $scope.externalMenus.push({\n menuOpen: function menuOpen() {\n return module.menuOpen(summary);\n },\n menuIconClass: module.menuIconClass,\n menuLabel: module.menuLabel\n });\n }\n };\n\n for (var _iterator = uiModules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n _loop();\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n $scope.notifications = {\n help: []\n };\n\n Waves.displayEffect();\n\n var isMobile = require('js/lib/mobileDetector');\n if (isMobile()) {\n $(\".button-collapse\").sideNav({\n menuWidth: 280\n });\n }\n\n UIUtils.changeTitle(summary.version, summary.parameters.currency, summary.conf.prefix);\n\n var aboutWin = void 0;\n\n $scope.showAbout = function () {\n if (aboutWin) {\n aboutWin.focus();\n } else {\n openWindow(window.location.origin + '/#/about', {\n position: 'center',\n height: 380,\n width: 510\n }, function (subwin) {\n subwin.window.gui = window.gui;\n subwin.on('closed', function () {\n aboutWin = null;\n mainWindow.focus();\n });\n aboutWin = subwin;\n });\n }\n };\n\n $scope.startServer = function () {\n $scope.server_stopped = false;\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.server.services.startAll();\n\n case 2:\n $scope.server_started = true;\n\n case 3:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n\n $scope.stopServer = function () {\n $scope.server_started = false;\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Webmin.server.services.stopAll();\n\n case 2:\n $scope.server_stopped = true;\n\n case 3:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n };\n\n $scope.restartServer = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return $scope.stopServer();\n\n case 2:\n _context3.next = 4;\n return $scope.startServer();\n\n case 4:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n };\n\n function checkUpdates() {\n var LATEST_RELEASE_URL = 'https://api.github.com/repos/duniter/duniter/releases/latest';\n co( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var latest, local_string_version, m, localVersion, localSuffix, isLocalAPreRelease, remoteVersion, localMajor, localMinor, localFix, remoteMajor, remoteMinor, remoteFix, newMajor, newMinor, newFix;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.prev = 0;\n _context4.next = 3;\n return $http.get(LATEST_RELEASE_URL);\n\n case 3:\n latest = _context4.sent;\n local_string_version = 'v' + summary.version;\n m = local_string_version.match(/^v([\\d.]+)([ab]?\\d*)/);\n localVersion = m && m[1] || \"\";\n localSuffix = m && m[2];\n isLocalAPreRelease = !!localSuffix;\n remoteVersion = latest.data.tag_name.substr(1);\n localMajor = parseInt(localVersion.split('.')[0]);\n localMinor = parseInt(localVersion.split('.')[1]);\n localFix = parseInt(localVersion.split('.')[2]);\n remoteMajor = parseInt(remoteVersion.split('.')[0]);\n remoteMinor = parseInt(remoteVersion.split('.')[1]);\n remoteFix = parseInt(remoteVersion.split('.')[2]);\n newMajor = remoteMajor > localMajor;\n newMinor = !newMajor && remoteMinor > localMinor;\n newFix = !newMinor && remoteFix > localFix;\n\n if (newMajor || newMinor || newFix || localVersion == remoteVersion && isLocalAPreRelease) {\n if ($scope.notifications.help.filter(function (entry) {\n return entry.message == 'help.new_version_available';\n }).length == 0) {\n $scope.notifications.help.push({\n icon: 'play_for_work',\n message: 'help.new_version_available',\n onclick: function onclick() {\n return openExternal('https://github.com/duniter/duniter/releases/latest');\n }\n });\n }\n }\n _context4.next = 25;\n break;\n\n case 22:\n _context4.prev = 22;\n _context4.t0 = _context4['catch'](0);\n\n console.error(_context4.t0);\n\n case 25:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this, [[0, 22]]);\n }));\n }\n\n $interval(checkUpdates, 1000 * 3600);\n $timeout(checkUpdates, 1000);\n};\n","\"use strict\";\n\nvar BLOCKS_COUNT = 40;\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $state, $timeout, Webmin, UIUtils, Graph) {\n\n var data = {};\n\n $scope.loading = true;\n $scope.blocksCount = $scope.blocksCount || BLOCKS_COUNT;\n\n $scope.$watch('withTime', function (newValue) {\n if (newValue) {\n timeGraph();\n }\n });\n\n $scope.$watch('withSpeed', function (newValue) {\n if (newValue) {\n speedGraph();\n }\n });\n\n $scope.$watch('withDifficulty', function (newValue) {\n if (newValue) {\n diffGraph();\n }\n });\n\n $scope.updateGraphs = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var summary, parameters, blocks, speeds, accelerations, medianTimeIncrements, actualDurations, BY_HOUR, i, len, block, acc, previousPos, j, availPreviousBlocks, localAvgSpeed, realDuration, graphs, _i, _len;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.summary();\n\n case 2:\n summary = _context.sent;\n _context.next = 5;\n return Webmin.currency.parameters();\n\n case 5:\n parameters = _context.sent;\n _context.next = 8;\n return Webmin.blockchain.blocks({\n count: $scope.blocksCount,\n from: Math.max(0, summary.current.number - $scope.blocksCount)\n });\n\n case 8:\n blocks = _context.sent;\n speeds = [], accelerations = [], medianTimeIncrements = [], actualDurations = [];\n BY_HOUR = 3600;\n\n for (i = 0, len = blocks.length; i < len; i++) {\n block = blocks[i];\n acc = 0;\n previousPos = Math.max(0, i - parameters.dtDiffEval);\n\n for (j = previousPos; j < i; j++) {\n acc += blocks[j + 1].medianTime - blocks[j].medianTime;\n }\n availPreviousBlocks = i - 1 - previousPos;\n localAvgSpeed = acc / (availPreviousBlocks || 1);\n realDuration = !isNaN(localAvgSpeed) && localAvgSpeed != 0 ? localAvgSpeed : parameters.avgGenTime;\n\n actualDurations.push(parseFloat(realDuration.toFixed(2)));\n speeds.push(parseFloat((BY_HOUR / realDuration).toFixed(2)));\n accelerations.push(block.time - block.medianTime);\n medianTimeIncrements.push(block.medianTime - (i ? blocks[i - 1].medianTime : block.medianTime));\n }\n data.summary = summary;\n data.speeds = speeds;\n data.accelerations = accelerations;\n data.medianTimeIncrements = medianTimeIncrements;\n data.actualDurations = actualDurations;\n data.minSpeeds = speeds.map(function () {\n return parseFloat((BY_HOUR / Math.ceil(parameters.avgGenTime * Math.sqrt(1.066))).toFixed(2));\n });\n data.maxSpeeds = speeds.map(function () {\n return parseFloat((BY_HOUR / Math.floor(parameters.avgGenTime / Math.sqrt(1.066))).toFixed(2));\n });\n data.minDurations = speeds.map(function () {\n return parseFloat((parameters.avgGenTime / 1.066).toFixed(2));\n });\n data.maxDurations = speeds.map(function () {\n return parseFloat((parameters.avgGenTime * 1.066).toFixed(2));\n });\n data.difficulties = blocks.map(function (b) {\n return b.powMin;\n });\n\n graphs = [];\n\n if ($scope.withTime) graphs.push(timeGraph);\n if ($scope.withSpeed) graphs.push(speedGraph);\n if ($scope.withDifficulty) graphs.push(diffGraph);\n for (_i = 0, _len = graphs.length; _i < _len; _i++) {\n graphs[_i]();\n }\n $scope.loading = false;\n\n case 28:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n\n function timeGraph() {\n if ($scope.withTime) {\n Graph.timeGraphs('#timeGraph', Math.max(0, data.summary.current.number - $scope.blocksCount + 1), data.accelerations, data.medianTimeIncrements, data.actualDurations, data.minDurations, data.maxDurations);\n }\n }\n\n function speedGraph() {\n if ($scope.withSpeed) {\n Graph.speedGraph('#speedGraph', Math.max(0, data.summary.current.number - $scope.blocksCount), data.speeds, data.minSpeeds, data.maxSpeeds, function (series) {\n $scope.series = series;\n });\n }\n }\n\n function diffGraph() {\n if ($scope.withDifficulty) {\n Graph.difficultyGraph('#difficultyGraph', Math.max(0, data.summary.current.number - $scope.blocksCount), data.difficulties);\n }\n }\n\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return $scope.updateGraphs();\n\n case 2:\n $scope.withTime = true;\n $scope.withDifficulty = true;\n $scope.$apply();\n\n case 5:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, UIUtils) {\n\n UIUtils.enableTabs();\n\n $scope.$parent.menu = 'graphs';\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, UIUtils) {\n\n UIUtils.enableTabs();\n\n $scope.$parent.menu = 'home';\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, Webmin, heads, info, conf, ws) {\n\n $scope.discriminateNodes = function (info) {\n info.connections.level1.concat(info.connections.level2).forEach(function (c) {\n c.prefered = (conf.preferedNodes || []).indexOf(c.pubkey) !== -1;\n c.privileged = (conf.privilegedNodes || []).indexOf(c.pubkey) !== -1;\n });\n return info;\n };\n\n $scope.info = $scope.discriminateNodes(info);\n $scope.heads = [];\n\n var headsMap = {};\n\n $scope.headsIntoMap = function (heads) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = heads[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var value = _step.value;\n\n var sp = value.message.split(':');\n var api = sp[0];\n var pubkey = sp[3];\n var blockstamp = sp[4];\n var ws2pId = sp[5];\n var software = sp[6];\n var softVersion = sp[7];\n var prefix = sp[8];\n var uid = value.uid;\n var freeRooms = \"\";\n var step = \"\";\n // Gestion des anciens formats\n console.log(value.message);\n if (value.messageV2 && value.messageV2.match(/:2:/)) {\n // HEAD V2\n freeRooms = value.freeRooms;\n step = value.step;\n } else if (value.message.match(/:1:/)) {\n // HEAD v1\n } else {\n // HEAD v0\n pubkey = sp[2];\n blockstamp = sp[3];\n }\n var ws2pFullId = pubkey + \"-\" + ws2pId;\n headsMap[ws2pFullId] = {\n api: api, blockstamp: blockstamp, uid: uid, ws2pId: ws2pId, software: software, softVersion: softVersion, prefix: prefix, freeRooms: freeRooms, step: step\n };\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n $scope.heads = Object.keys(headsMap).map(function (k) {\n return {\n pubkey: k,\n api: headsMap[k].api,\n uid: headsMap[k].uid,\n blockstamp: headsMap[k].blockstamp,\n ws2pId: headsMap[k].ws2pId,\n software: headsMap[k].software,\n softVersion: headsMap[k].softVersion,\n prefix: headsMap[k].prefix,\n freeRooms: headsMap[k].freeRooms,\n step: headsMap[k].step\n };\n });\n };\n\n $scope.headsIntoMap(heads);\n\n ws.on('ws2p', function (obj) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (obj.value.ws2p === 'heads') {\n $scope.headsIntoMap(obj.value.added);\n } else if (obj.value.ws2p === 'connected' || obj.value.ws2p === 'disconnected') {\n co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.t0 = $scope;\n _context.next = 3;\n return Webmin.network.ws2p.info();\n\n case 3:\n _context.t1 = _context.sent;\n $scope.info = _context.t0.discriminateNodes.call(_context.t0, _context.t1);\n\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n }\n $scope.$apply();\n\n case 2:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n });\n\n var co = require('co');\n\n $scope.update = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var delayP;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n $scope.searching = true;\n delayP = Q.delay(500);\n _context3.next = 4;\n return Webmin.network.peers();\n\n case 4:\n $scope.peers = _context3.sent.peers;\n _context3.next = 7;\n return delayP;\n\n case 7:\n $scope.searching = false;\n $scope.$apply();\n\n case 9:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n };\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, Webmin, peers) {\n\n $scope.peers = peers.peers;\n\n var co = require('co');\n\n $scope.update = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var delayP;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n $scope.searching = true;\n delayP = Q.delay(500);\n _context.next = 4;\n return Webmin.network.peers();\n\n case 4:\n $scope.peers = _context.sent.peers;\n _context.next = 7;\n return delayP;\n\n case 7:\n $scope.searching = false;\n $scope.$apply();\n\n case 9:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, $interval, Webmin, UIUtils, summary, ws) {\n\n UIUtils.enableTabs();\n var co = require('co');\n var moment = require('moment');\n\n $scope.$parent.isStarted = false;\n $scope.connected_ws2p_peers = 0;\n\n $scope.updateInfo = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var info, map, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, level1, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, level2;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.network.ws2p.info();\n\n case 2:\n info = _context.sent;\n map = {};\n _iteratorNormalCompletion = true;\n _didIteratorError = false;\n _iteratorError = undefined;\n _context.prev = 7;\n\n for (_iterator = info.connections.level1[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n level1 = _step.value;\n\n map[level1.pubkey] = true;\n }\n _context.next = 15;\n break;\n\n case 11:\n _context.prev = 11;\n _context.t0 = _context['catch'](7);\n _didIteratorError = true;\n _iteratorError = _context.t0;\n\n case 15:\n _context.prev = 15;\n _context.prev = 16;\n\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n\n case 18:\n _context.prev = 18;\n\n if (!_didIteratorError) {\n _context.next = 21;\n break;\n }\n\n throw _iteratorError;\n\n case 21:\n return _context.finish(18);\n\n case 22:\n return _context.finish(15);\n\n case 23:\n _iteratorNormalCompletion2 = true;\n _didIteratorError2 = false;\n _iteratorError2 = undefined;\n _context.prev = 26;\n for (_iterator2 = info.connections.level2[Symbol.iterator](); !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n level2 = _step2.value;\n\n map[level2.pubkey] = true;\n }\n _context.next = 34;\n break;\n\n case 30:\n _context.prev = 30;\n _context.t1 = _context['catch'](26);\n _didIteratorError2 = true;\n _iteratorError2 = _context.t1;\n\n case 34:\n _context.prev = 34;\n _context.prev = 35;\n\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n\n case 37:\n _context.prev = 37;\n\n if (!_didIteratorError2) {\n _context.next = 40;\n break;\n }\n\n throw _iteratorError2;\n\n case 40:\n return _context.finish(37);\n\n case 41:\n return _context.finish(34);\n\n case 42:\n $scope.connected_ws2p_peers = Object.keys(map).length;\n\n case 43:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[7, 11, 15, 23], [16,, 18, 22], [26, 30, 34, 42], [35,, 37, 41]]);\n }));\n };\n\n bindBlockWS(function () {\n $scope.loadPowData();\n });\n var M = summary.current.monetaryMass || 0;\n // const nbUDperYear = Math.ceil(365.25 * 3600 * 24 / summary.parameters.dt);\n // const globalC = Math.round(Math.pow(1 + summary.parameters.c, nbUDperYear) * 100) / 100 - 1;\n var UD = summary.parameters.ud0;\n if (summary.lastUDBlock) {\n var N = summary.current.membersCount;\n UD = parseInt(Math.round(summary.lastUDBlock.dividend * Math.pow(10, summary.lastUDBlock.unitbase)));\n }\n $scope.current = summary.current;\n $scope.current_currency = summary.current.currency;\n $scope.current_number = summary.current.number;\n $scope.current_membersCount = summary.current.membersCount;\n $scope.current_medianTime = summary.current.medianTime;\n $scope.current_powMin = summary.current.powMin;\n $scope.monetaryMass = parseInt(M / UD) || 0;\n $scope.server_started = true;\n $scope.server_stopped = false;\n $scope.phones = [];\n $scope.abc = 'abcdef';\n $scope.newIdentities = 2;\n\n $(\".dropdown-button\").dropdown({ constrainwidth: false });\n\n $scope.lastNearPoW = '';\n $scope.totalPoW = '...';\n $scope.sync_state = 'home.pulling.state.unkown';\n $scope.network_percent = 0;\n $scope.peer_percent = 0;\n $scope.has_pulled = false;\n $scope.is_pulling = false;\n $scope.last_pulling = 0;\n var start_block = 0;\n\n $interval(function () {\n if ($scope.last_pulling) {\n $scope.sync_state = $scope.is_pulling ? 'home.pulling.state.syncing' : 'home.pulling.state.synced';\n $scope.sync_time = moment($scope.last_pulling).fromNow();\n }\n }, 1000);\n\n $scope.loadPowData = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var res;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Webmin.powSummary();\n\n case 2:\n res = _context2.sent;\n\n $scope.pow_total = res.total;\n $scope.pow_mirror = res.mirror;\n $scope.pow_waiting = res.waiting;\n\n case 6:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n };\n\n ws.on(undefined, function (data) {\n if (data.type === 'started') {\n $scope.server_started = true;\n $scope.server_stopped = false;\n bindBlockWS(function () {\n $scope.loadPowData();\n });\n UIUtils.toast('general.server.started');\n $scope.$apply();\n }\n if (data.type === 'already_started') {\n $scope.server_started = true;\n $scope.server_stopped = false;\n bindBlockWS(function () {\n $scope.loadPowData();\n });\n $scope.$apply();\n }\n if (data.type === 'stopped') {\n $scope.server_stopped = true;\n $scope.server_started = false;\n UIUtils.toast('general.server.stopped');\n $scope.$apply();\n }\n if (data.type === 'pulling') {\n $scope.is_pulling = true;\n $scope.has_pulled = true;\n var event = data.value;\n if ($scope.last_pulling && event.type === 'start' || !$scope.last_pulling && event.type !== 'end') {\n $scope.last_pulling = moment();\n }\n if (event.type === 'peer') {\n $scope.network_percent = parseInt((event.data.number + 1) / event.data.length * 100);\n $scope.peer_percent = 100;\n start_block = 0;\n }\n if (event.type === 'applying') {\n if (!start_block) {\n start_block = event.data.number;\n }\n var total = event.data.last - start_block;\n var doneCount = event.data.number - start_block;\n $scope.peer_percent = parseInt(doneCount / total * 100);\n }\n if (event.type === 'end') {\n $scope.is_pulling = false;\n $scope.network_percent = 0;\n $scope.peer_percent = 0;\n start_block = 0;\n }\n }\n if (data.type === 'pow') {\n var pow = data.value;\n if (pow.found) {\n $scope.pow_waiting = true;\n $scope.lastNearPoW = '#' + pow.hash;\n $scope.$apply();\n } else {\n $scope.pow_waiting = false;\n $scope.lastNearPoW = '#' + pow.hash;\n $scope.$apply();\n }\n }\n if (data.type === 'ws2p') {\n if (data.value.ws2p === 'connected' || data.value.ws2p === 'disconnected') {\n co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return $scope.updateInfo();\n\n case 2:\n $scope.$apply();\n\n case 3:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n }\n }\n });\n\n function bindBlockWS(cb) {\n Webmin.wsBlock().on(undefined, function (block) {\n $scope.current_currency = block.currency;\n $scope.current_number = block.number;\n $scope.current_membersCount = block.membersCount;\n $scope.current_medianTime = block.medianTime;\n $scope.current_powMin = block.powMin;\n var M = summary.current.monetaryMass || 0;\n var UD = summary.parameters.ud0;\n if (summary.lastUDBlock) {\n var _N = summary.current.membersCount;\n UD = parseInt(Math.round(summary.lastUDBlock.dividend * Math.pow(10, summary.lastUDBlock.unitbase)));\n }\n $scope.monetaryMass = parseInt(M / UD) || 0;\n $scope.$apply();\n cb && cb();\n });\n }\n\n $scope.reconfigure_network = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var delay, netinferfaces, conf;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n $scope.reconfiguring = true;\n delay = Q.delay(1000);\n _context4.prev = 2;\n _context4.next = 5;\n return Webmin.network.interfaces();\n\n case 5:\n netinferfaces = _context4.sent;\n conf = {};\n\n conf.local_ipv4 = netinferfaces.auto.local.ipv4 || '';\n conf.local_ipv6 = netinferfaces.auto.local.ipv6 || '';\n conf.remote_ipv4 = netinferfaces.auto.remote.ipv4 || '';\n conf.remote_ipv6 = netinferfaces.auto.remote.ipv6 || '';\n conf.lport = netinferfaces.auto.local.port || 9330;\n conf.rport = netinferfaces.auto.remote.port || 9330;\n conf.upnp = netinferfaces.auto.remote.upnp || false;\n conf.dns = netinferfaces.auto.remote.dns || '';\n _context4.next = 17;\n return Webmin.server.netConf({\n conf: conf\n });\n\n case 17:\n _context4.next = 19;\n return delay;\n\n case 19:\n $scope.should_reconfigure = false;\n UIUtils.toast('general.network.reconf_ok');\n $scope.$apply();\n _context4.next = 30;\n break;\n\n case 24:\n _context4.prev = 24;\n _context4.t0 = _context4['catch'](2);\n _context4.next = 28;\n return delay;\n\n case 28:\n $scope.reconfiguring = false;\n $scope.$apply();\n\n case 30:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this, [[2, 24]]);\n }));\n };\n\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n var reachable;\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n _context5.next = 2;\n return $scope.startServer();\n\n case 2:\n _context5.prev = 2;\n\n $scope.updateInfo();\n _context5.next = 6;\n return $scope.loadPowData();\n\n case 6:\n _context5.next = 8;\n return Webmin.isNodePubliclyReachable();\n\n case 8:\n reachable = _context5.sent;\n\n if (!reachable || !reachable.success) {\n $scope.should_reconfigure = true;\n }\n _context5.next = 15;\n break;\n\n case 12:\n _context5.prev = 12;\n _context5.t0 = _context5['catch'](2);\n\n console.log(_context5.t0);\n\n case 15:\n case 'end':\n return _context5.stop();\n }\n }\n }, _callee5, this, [[2, 12]]);\n }));\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $http, $state, $location, Webmin, UIUtils) {\n\n UIUtils.enableTabs();\n\n $scope.$parent.conf = $scope.$parent.conf || {};\n $scope.$parent.menu = 'settings';\n\n $(\".dropdown-button\").dropdown({ constrainwidth: false });\n\n $scope.fullReset = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.server.services.stopAll();\n\n case 2:\n _context.next = 4;\n return Webmin.server.resetData();\n\n case 4:\n $state.go('index');\n\n case 5:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, Importer, Webmin) {\n\n $scope.export_link = Webmin.getExportURL();\n\n Importer($scope);\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $http, $state, $timeout, UIUtils, summary, Webmin) {\n\n $scope.cpuPower = parseInt(summary.conf.cpu * 100);\n\n $scope.updateCPUpower = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n $scope.savingCPU = true;\n _context.next = 3;\n return Webmin.server.cpuConf({\n cpu: parseFloat(($scope.cpuPower / 100).toFixed(2))\n });\n\n case 3:\n UIUtils.toast('settings.cpu.saved');\n $scope.savingCPU = false;\n\n case 5:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, conf, UIUtils) {\n\n $scope.$parent.conf = conf;\n\n UIUtils.enableInputs();\n $('input').attr('disabled', 'disabled');\n};\n","\"use strict\";\n\nvar co = require('co');\nvar Peer = require('js/lib/entity/peer');\n\nmodule.exports = function ($scope, $http, $state, Webmin, peers) {\n\n $scope.peers = peers.map(function (peer) {\n var p = new Peer(peer);\n return {\n name: [p.getURL(), \"(\" + p.pubkey.slice(0, 6) + \")\"].join(' '),\n host_port: [p.getHost(), p.getPort()].join('|')\n };\n });\n\n $scope.resetNode = function () {\n $('#modalReset').openModal();\n };\n\n $scope.resetNodeAndSync = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var sp;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.server.services.stopAll();\n\n case 2:\n _context.next = 4;\n return Webmin.server.resetData();\n\n case 4:\n sp = $scope.remote_host.split('|');\n\n $state.go('sync', {\n host: sp[0],\n port: sp[1],\n sync: true\n });\n\n case 6:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $state, Webmin, summary, PubkeyGenerator) {\n\n $scope.pubkey = summary.pubkey;\n\n setTimeout(function () {\n $('select').material_select();\n }, 500);\n\n $scope.accept = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.server.keyConf({\n conf: $scope.$parent.conf\n });\n\n case 2:\n $scope.$parent.conf.idty_entropy = '';\n $scope.$parent.conf.idty_password = '';\n $state.reload();\n $scope.restartServer();\n\n case 6:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n\n PubkeyGenerator($scope);\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, ws, UIUtils) {\n\n UIUtils.enableTabs();\n\n var co = require('co');\n var _ = require('underscore');\n\n // Default values\n if (!localStorage.getItem('log_error')) localStorage.setItem('log_error', true);\n if (!localStorage.getItem('log_warn')) localStorage.setItem('log_warn', true);\n if (!localStorage.getItem('log_info')) localStorage.setItem('log_info', true);\n\n $scope.logsSize = parseInt(localStorage.getItem('log_size')) || 100;\n $scope.logs = _.range(0, $scope.logsSize).map(function () {\n return \"\";\n });\n $scope.logsString = \"\";\n $scope.follow = true;\n $scope.levels = {\n error: localStorage.getItem('log_error') == \"true\",\n warn: localStorage.getItem('log_warn') == \"true\",\n info: localStorage.getItem('log_info') == \"true\",\n debug: localStorage.getItem('log_debug') == \"true\",\n trace: localStorage.getItem('log_trace') == \"true\"\n };\n\n _.keys($scope.levels).map(function (level) {\n $scope.$watch('levels.' + level, function (newValue) {\n localStorage.setItem('log_' + level, newValue);\n $scope.logs.splice(0, $scope.logs.length);\n ws.send();\n });\n });\n\n $scope.$watch('logsSize', function (newValue) {\n localStorage.setItem('log_size', newValue);\n addLogs({ value: [] }, true);\n });\n\n ws.on('log', addLogs);\n\n function addLogs(res, autoDigest) {\n\n if (!$scope.pause) {\n var newlogs = _.filter(res.value, function (log) {\n return $scope.levels[log.level];\n });\n // Add at max LOGS_FLOW_SIZE new lines\n newlogs.splice(0, Math.max(0, newlogs.length - $scope.logsSize));\n // Add just enough space for incoming logs\n $scope.logs.splice(0, Math.max(0, $scope.logs.length + newlogs.length - $scope.logsSize));\n for (var i = 0, len = newlogs.length; i < len; i++) {\n var log = newlogs[i];\n $scope.logs.push(log);\n }\n if (!autoDigest) {\n $scope.$apply();\n }\n }\n\n if ($scope.follow) {\n var elem = document.getElementById('logs');\n if (elem) {\n elem.scrollTop = elem.scrollHeight;\n }\n }\n }\n\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return ws.whenOpened();\n\n case 2:\n ws.send();\n\n case 3:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, Webmin) {\n\n $scope.generating = false;\n $scope.error = '';\n\n $scope.shareLogs = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var res;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if ($scope.generating) {\n _context.next = 14;\n break;\n }\n\n _context.prev = 1;\n\n $scope.error = '';\n $scope.generating = true;\n _context.next = 6;\n return Webmin.logsExport(2000);\n\n case 6:\n res = _context.sent;\n\n $scope.link = res.link;\n _context.next = 13;\n break;\n\n case 10:\n _context.prev = 10;\n _context.t0 = _context['catch'](1);\n\n $scope.error = _context.t0 && _context.t0.message || _context.t0 || 'Unknown error';\n\n case 13:\n $scope.generating = false;\n\n case 14:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[1, 10]]);\n }));\n };\n};\n","\"use strict\";\n\nvar co = require('co');\nvar _ = require('underscore');\n\nmodule.exports = function ($scope, $http, $state, $interval, $timeout, UIUtils, summary, Webmin, allModules, hasAccess) {\n\n var interval = void 0;\n $scope.hasAccess = hasAccess.hasAccess;\n $scope.module_to_install = '';\n $scope.installing = false;\n\n $scope.showWarning = function () {\n return $scope.warningShown = true;\n };\n $scope.hideWarning = function () {\n return $scope.warningShown = false;\n };\n\n $scope.modules = modulesTransform(allModules);\n\n $scope.switchModule = function (mod) {\n $scope.modules.map(function (m) {\n return m.disabled = true;\n });\n mod.installing = !mod.installing;\n Webmin.plugin.removePackage(mod.name);\n $scope.checkModulesInstallation();\n };\n\n $scope.installModule = function () {\n var pkg = $scope.module_to_install;\n if (!(pkg.match(/^.+@(~||\\^)?\\d+\\.\\d+\\.\\d+$/) || pkg.match(/^file:\\/\\//) || pkg.match(/^https?:\\/\\/.+\\.(tar\\.gz|tgz)$/) || pkg.match(/^git(\\+ssh|\\+http|\\+https)?:\\/\\/.+\\.git$/))) {\n UIUtils.toast('settings.modules.wrong_package_source');\n return;\n }\n $scope.modules.map(function (m) {\n return m.disabled = true;\n });\n co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var res;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.plugin.addPackage($scope.module_to_install);\n\n case 2:\n res = _context.sent;\n\n if (res.success) {\n $scope.modules.push({\n fullName: $scope.module_to_install,\n disabled: true,\n installing: true,\n installed: true\n });\n $scope.installing = true;\n $scope.checkModulesInstallation();\n } else {\n $scope.modules = modulesTransform(allModules);\n if (res.error === 1) {\n UIUtils.toast('settings.modules.already_install');\n } else if (res.error === 2) {\n UIUtils.toast('settings.modules.path_does_not_exist');\n } else {\n UIUtils.toast('settings.modules.unknown_error');\n }\n }\n\n case 4:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n\n $scope.checkModulesInstallation = function () {\n interval = $interval(function () {\n Webmin.plugin.allModules().then(function (modules) {\n var initialModulesNames = _.pluck(allModules, 'name');\n var newModulesNames = _.pluck(modules, 'name');\n var added = _.difference(newModulesNames, initialModulesNames);\n var removed = _.difference(initialModulesNames, newModulesNames);\n if (added.length || removed.length) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = added[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var addedName = _step.value;\n\n UIUtils.toastRaw('Installed module \\'' + addedName + '\\'');\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = removed[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var removedName = _step2.value;\n\n UIUtils.toastRaw('Removed module \\'' + removedName + '\\'');\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n allModules = modules;\n $scope.modules = modulesTransform(modules);\n $scope.installing = false;\n $interval.cancel(interval);\n $scope.notifications.help.push({\n icon: 'loop',\n message: 'help.restart_required',\n onclick: function onclick() {\n return UIUtils.toast('help.restart_required.message');\n }\n });\n }\n });\n }, 1500);\n };\n\n function modulesTransform(modules) {\n return modules.map(function (m) {\n return {\n name: m.name,\n fullName: [m.name, m.version].join('@'),\n locked: m.locked,\n disabled: !$scope.hasAccess || m.locked,\n installing: false,\n installed: true\n };\n });\n }\n};\n","\"use strict\";\n\nvar co = require('co');\nvar conf = require('js/lib/conf/conf');\n\nmodule.exports = function ($scope, $http, $state, Webmin, UIUtils, netinterfaces, firstConf) {\n\n var autoconf = netinterfaces.auto;\n\n $scope.autoconfig = function () {\n $scope.$parent.conf.local_ipv4 = autoconf.local.ipv4 || '';\n $scope.$parent.conf.local_ipv6 = autoconf.local.ipv6 || '';\n $scope.$parent.conf.remote_ipv4 = autoconf.remote.ipv4 || '';\n $scope.$parent.conf.remote_ipv6 = autoconf.remote.ipv6 || '';\n $scope.$parent.conf.lport = autoconf.local.port || $scope.$parent.conf.lport;\n $scope.$parent.conf.rport = autoconf.remote.port || $scope.$parent.conf.rport;\n $scope.$parent.conf.upnp = autoconf.remote.upnp || $scope.$parent.conf.upnp;\n $scope.$parent.conf.dns = autoconf.remote.dns || $scope.$parent.conf.dns;\n\n if (conf.dev_autoconf && firstConf) {\n $state.go('configure.create.root');\n }\n };\n\n $scope.local_neti = toArrayOfAddresses(netinterfaces.local);\n $scope.remote_neti = toArrayOfAddresses(netinterfaces.remote);\n\n $scope.$parent.conf = $scope.$parent.conf || {};\n $scope.$parent.conf.ws2p = netinterfaces.conf.ws2p;\n $scope.$parent.conf.proxiesConf = netinterfaces.conf.proxiesConf;\n $scope.$parent.conf.bma = !netinterfaces.conf.nobma;\n $scope.$parent.conf.local_ipv4 = netinterfaces.conf.local.ipv4;\n $scope.$parent.conf.local_ipv6 = netinterfaces.conf.local.ipv6;\n $scope.$parent.conf.remote_ipv4 = netinterfaces.conf.remote.ipv4;\n $scope.$parent.conf.remote_ipv6 = netinterfaces.conf.remote.ipv6;\n $scope.$parent.conf.lport = netinterfaces.conf.local.port;\n $scope.$parent.conf.rport = netinterfaces.conf.remote.port;\n $scope.$parent.conf.upnp = netinterfaces.conf.remote.upnp;\n $scope.$parent.conf.dns = netinterfaces.conf.remote.dns;\n\n UIUtils.enableInputs();\n\n if (firstConf) {\n $scope.$parent.conf.lport = conf.default_port;\n $scope.$parent.conf.rport = conf.default_port;\n // Trigger autoconfig\n $scope.autoconfig();\n }\n\n $scope.saveConf = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n $scope.$parent.conf.remote_ipv6 = $scope.$parent.conf.local_ipv6;\n _context.next = 3;\n return Webmin.server.netConf({\n conf: $scope.$parent.conf\n });\n\n case 3:\n UIUtils.toast('settings.network.saved');\n\n case 4:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n};\n\nfunction toArrayOfAddresses(netiScope) {\n return netiScope.reduce(function (arr, neti) {\n return arr.concat(neti.addresses.map(function (addr) {\n return {\n name: [neti.name, addr.address].join(' '),\n addr: addr.address,\n family: addr.family\n };\n }));\n }, []);\n}\n","'use strict';\n\nmodule.exports = function () {\n\n window.uiModules = {};\n\n require('./services/webmin')(angular);\n\n var duniterApp = angular.module('duniterUIApp', ['ui.router', 'homeControllers', 'pascalprecht.translate']);\n\n duniterApp.config(['$compileProvider', function ($compileProvider) {\n return $compileProvider.aHrefSanitizationWhitelist(/^\\s*(https?|data):/);\n }]);\n\n require('./lib/conf/translate')(duniterApp);\n require('./lib/conf/routes')(duniterApp);\n require('js/services/datetime')(duniterApp);\n require('js/services/ui_utils')(duniterApp);\n require('js/services/graphs')(duniterApp);\n require('js/services/pubkeyGenerator')(duniterApp);\n require('js/services/importer')(duniterApp);\n require('js/services/base58')(duniterApp);\n\n window.duniterChildCallback = function (gui) {\n window.gui = gui;\n };\n\n window.onresize = function () {\n window.onResize && window.onResize(window);\n };\n\n window.openWindow = function openWindow(url, options, callback) {\n if (window.gui) {\n // Duniter Desktop\n window.gui.Window.open(url, options, callback);\n } else {\n // Browser\n var innerHeight = options.height || 375;\n var innerWidth = options.width || 500;\n window.open(url, '_blank ', ['top=' + (window.screenTop + (options.top || 200)), 'left=' + (window.screenLeft + (options.left || 200)), 'height=' + (innerHeight + 8), 'width=' + (innerWidth + 16), 'menubar=no', 'status=no'].join(','));\n }\n };\n\n window.openNewTab = function openWindow(url, options, callback) {\n if (window.gui) {\n // Duniter Desktop\n window.gui.Window.open(url, options, callback);\n } else {\n // Browser\n window.open(url, '_blank ');\n }\n };\n\n window.openModule = function openWindow(path, options, callback) {\n var url = window.location.origin + '/modules' + path;\n if (window.gui) {\n // Duniter Desktop\n window.gui.Window.open(url, options, callback);\n } else {\n // Browser\n window.open(url, '_blank ');\n }\n };\n\n window.openExternal = function openExternal(url) {\n if (window.gui) {\n window.gui.Shell.openExternal(url);\n } else {\n window.open(url, '_blank');\n }\n };\n\n var homeControllers = angular.module('homeControllers', ['duniter.services.webmin', 'ngFileUpload']);\n\n homeControllers.controller('IndexController', require('./controllers/IndexController'));\n homeControllers.controller('AboutController', require('./controllers/AboutController'));\n homeControllers.controller('IdentityController', require('./controllers/init/create/IdentityController'));\n homeControllers.controller('ParametersController', require('./controllers/init/create/ParametersController'));\n homeControllers.controller('RootBlockController', require('./controllers/init/create/RootBlockController'));\n homeControllers.controller('SyncController', require('./controllers/init/sync/SyncController'));\n homeControllers.controller('MainController', require('./controllers/main/MainController'));\n homeControllers.controller('HomeController', require('./controllers/main/home/HomeController'));\n homeControllers.controller('OverviewController', require('./controllers/main/home/tabs/OverviewController'));\n homeControllers.controller('HomeNetworkController', require('./controllers/main/home/tabs/HomeNetworkController'));\n homeControllers.controller('HomeConnectionsController', require('./controllers/main/home/tabs/HomeConnectionsController'));\n homeControllers.controller('LogsController', require('./controllers/main/settings/tabs/LogsController'));\n homeControllers.controller('LogsSettingsController', require('./controllers/main/settings/tabs/LogsSettingsController'));\n homeControllers.controller('NetworkController', require('./controllers/main/settings/tabs/NetworkController'));\n homeControllers.controller('SettingsController', require('./controllers/main/settings/SettingsController'));\n homeControllers.controller('DataController', require('./controllers/main/settings/tabs/DataController'));\n homeControllers.controller('BackupController', require('./controllers/main/settings/tabs/BackupController'));\n homeControllers.controller('CPUController', require('./controllers/main/settings/tabs/CPUController'));\n homeControllers.controller('CurrencyController', require('./controllers/main/settings/tabs/CurrencyController'));\n homeControllers.controller('KeyController', require('./controllers/main/settings/tabs/KeyController'));\n homeControllers.controller('ModulesController', require('./controllers/main/settings/tabs/ModulesController'));\n homeControllers.controller('GraphsController', require('./controllers/main/graphs/GraphsController'));\n homeControllers.controller('GraphsBlockchainController', require('./controllers/main/graphs/GraphsBlockchainController'));\n};\n","\"use strict\";\n\nmodule.exports = {\n\n init: function init() {\n\n // Hack since Node v5\n try {\n window.jade = require('jade' + '/' + 'runtime');\n } catch (e) {}\n\n console.log('Configuring Angular app...');\n\n require('./app.config')();\n\n console.log('App initialized.');\n }\n};\n","\"use strict\";\n\nmodule.exports = {\n server: \"\", // Empty server will use the browser current host\n port: \"\", // Empty port will use the browser current port\n default_port: 9220,\n dev_autoconf: false,\n api_timeout: 10000 // 10 sec timeout\n};\n","module.exports = {\n \"top.menu.overview\": \"Home\",\n \"top.menu.data\": \"Explore\",\n \"top.menu.settings\": \"Settings\",\n \"top.menu.wallet\": \"Wallet\",\n \"general.server.started\": \"Server started\",\n \"general.server.stopped\": \"Server stopped\",\n \"general.choose_option\": \"Choose your option\",\n \"general.network.reconf_ok\": \"Reconfiguration success\",\n \"global.button.validate\": \"Validate\",\n \"global.button.start\": \"Start\",\n \"err.unknown\": \"Unknown error\",\n \"err.connection\": \"Could not connect to node\",\n \"err.back_index\": \"Get back to previous screen\",\n \"err.sync.interrupted\": \"Sync interrupted because the following error occured:\",\n \"index.message.loading\": \"Loading...\",\n \"crypto.secret_key\": \"Secret key\",\n \"index.message.current_block\": \"Current block {{ number }}\",\n \"configuration.init.choose.title\": \"Initialization\",\n \"configuration.init.choose.message\": \"Your software has to be initialized. You may either connect to an existing one or restore a backup file.\",\n \"configuration.init.choose.create\": \"Create a new currency\",\n \"configuration.init.choose.connect\": \"Connect to an existing currency\",\n \"configuration.init.choose.import\": \"Import from a backup file\",\n \"configuration.create_currency.cancel\": \"Cancel & go home\",\n \"configuration.create_uid.title\": \"Your identity\",\n \"configuration.create_uid.message\": \"As a first step, you need to define your personal, unique identity.<br/>The following informations will be <strong>definitive</strong> for this currency: please choose them carefully.\",\n \"configuration.create_uid.uid.tooltip\": \"The name you will be known as.\",\n \"configuration.create_uid.entropy.tooltip\": \"An entropy source to make your key unique: an e-mail, a phone n°, ...\",\n \"configuration.create_uid.password.tooltip\": \"A secret password to protect your key.\",\n \"configuration.create_uid.create_button\": \"Continue\",\n \"configuration.create_uid.preview_button\": \"Preview pubkey\",\n \"configuration.create_uid.nrp_algo_choose\": \"NRP algorithm\",\n \"configuration.create_uid.nrp_algo_choose_1\": \"N = 4096 ; r = 16 ; p = 1\",\n \"configuration.create_uid.modal_title\": \"Identity confirmation\",\n \"configuration.create_uid.modal_message\": \"This identity will be definitive for this currency: you will be known by your User ID and will be able to access your account using your Secret Key and Password values.\",\n \"configuration.create_uid.modal_agree\": \"Agree\",\n \"configuration.create_uid.modal_disagree\": \"Disagree\",\n \"configuration.create_uid.modal_preview_title\": \"Preview of pubkey\",\n \"configuration.create_uid.modal_preview_ok\": \"OK\",\n \"configuration.ws2p.private\": \"Enable WS2P Private access\",\n \"configuration.ws2p.private.desc\": \"<b>Strongly recommanded</b>. <i>No configuration required</i>. Private WS2P access allows your node to connect through P2P to other nodes without exposing itself to the Internet. This is the most secure and efficient way to connect your node to the network.\",\n \"configuration.ws2p.private.connections.title\": \"Connections\",\n \"configuration.ws2p.private.connections.message\": \"You can limit the number of active private connections.\",\n \"configuration.ws2p.private.max\": \"Maximum\",\n \"configuration.proxiesConf.title\": \"Setting up a Proxy\",\n \"configuration.proxiesConf.proxySocksAddress\": \"Classical socks proxy\",\n \"configuration.proxiesConf.torMessage\": \"<b>Warning :</b> If you want to use a socks proxy to redirect all outgoing traffic via <b>Tor</b>, you must use the <i>\\\"Tor socks proxy\\\"</i> field :\",\n \"configuration.proxiesConf.proxyTorAddress\": \"Tor socks proxy\",\n \"configuration.proxiesConf.clear\": \"clear\",\n \"configuration.proxiesConf.tor\": \"tor\",\n \"configuration.proxiesConf.none\": \"none\",\n \"configuration.proxiesConf.reachingClearEp\": \"How do you want to reach the classic nodes ? (clear endpoints)\",\n \"configuration.ws2p.public\": \"Enable WS2P Public access\",\n \"configuration.ws2p.public.desc\": \"<b>Recommanded</b>. Public WS2P access allows your node to be publicly visible to communicate through WS2P. Considering that most of the nodes will communicate through WS2P access, it is important to have a maximum number of nodes with Public WS2P access enabled to have a decentralized network.\",\n \"configuration.ws2p.public.upnp.title\": \"UPnP\",\n \"configuration.ws2p.public.upnp.message\": \"Automated configuration. You need to have a box (router) for this to work. Typically true if you use Duniter at home.\",\n \"configuration.ws2p.public.upnp.value\": \"Enable Public WS2P accss through UPnP\",\n \"configuration.ws2p.public.manual.title\": \"Manual configuration\",\n \"configuration.ws2p.public.manual.message\": \"You can also manually configure your node for Public WS2P access.\",\n \"configuration.ws2p.public.manual.local_ipv4\": \"Private (computer)\",\n \"configuration.ws2p.public.manual.host\": \"Public (remote host)\",\n \"configuration.ws2p.public.manual.lport\": \"Private port\",\n \"configuration.ws2p.public.manual.rport\": \"Public port\",\n \"configuration.ws2p.public.manual.rpath\": \"WebSocket web path\",\n \"configuration.ws2p.public.connections.title\": \"Connections\",\n \"configuration.ws2p.public.connections.message\": \"You can limit the number of active public connections.\",\n \"configuration.ws2p.public.max\": \"Maximum\",\n \"configuration.create_network.desc\": \"<b>Deprecated</b>. BMA is the legacy communication interface for Duniter nodes. It is being deprecated. Yet, you can activate it if you know what you are doing.\",\n \"configuration.create_network.title\": \"Network\",\n \"configuration.create_network.message\": \"Duniter is a P2P software and needs bidirectionnal access to the network. Please chose carefully the following parameters.\",\n \"configuration.create_network.none\": \"None\",\n \"configuration.create_network.ipv4.title\": \"IPv4\",\n \"configuration.create_network.ipv6.title\": \"IPv6\",\n \"configuration.create_network.ipv4.message\": \"For compatibilty reasons, you may prefer to use classic IPv4 interfaces. The configuration is more complicated.\",\n \"configuration.create_network.local_ipv4\": \"Private (computer)\",\n \"configuration.create_network.remote_ipv4\": \"Public (box/router)\",\n \"configuration.create_network.local_ipv6\": \"IPv6\",\n \"configuration.create_network.lport\": \"Local port\",\n \"configuration.create_network.rport\": \"Remote port\",\n \"configuration.create_network.port.title\": \"Ports\",\n \"configuration.create_network.ipv6.message\": \"IPv6 gives your computer a unique, direct address to your node over the Internet. This is the <b>recommended way</b> to connect your node to the network.\",\n \"configuration.create_network.port.message\": \"Wether you use IPv6 or IPv4, Duniter node will use this port number for connection to the network. If you use IPv6, local and remote port should equal each other.\",\n \"configuration.create_network.dns.title\": \"Domain name\",\n \"configuration.create_network.dns\": \"Domain name\",\n \"configuration.create_network.dns.message\": \"IPv6 (AAAA) and IPv4 (A) DNS records will be used.\",\n \"configuration.create_network.upnp\": \"Use UPnP\",\n \"configuration.create_network.bma\": \"Enable BMA access\",\n \"configuration.create_network.button.validate\": \"Continue\",\n \"configuration.create_network.button.autoconf\": \"Automatic configuration\",\n \"configuration.create_parameters.title\": \"Currency\",\n \"configuration.create_parameters.message\": \"Initial parameters of the currency. It should be carefully chosen, as these parameters never change once the currency is started.\",\n \"configuration.create_parameters.currency.title\": \"Money units\",\n \"configuration.create_parameters.currency.message\": \"Give a name to your currency. The 3 following parameters configure the way new money units are created.\",\n \"configuration.create_parameters.currency\": \"Currency name\",\n \"configuration.create_parameters.c\": \"c\",\n \"configuration.create_parameters.dt\": \"UD period\",\n \"configuration.create_parameters.ud0\": \"UD(0)\",\n \"configuration.create_parameters.button.validate\": \"Continue\",\n \"configuration.create_parameters.wot.title\": \"Web of Trust\",\n \"configuration.create_parameters.wot.message\": \"The following parameters deal with identities and their links gathered in the Web of Trust concept.\",\n \"configuration.create_parameters.sigStock\": \"Max cert stock\",\n \"configuration.create_parameters.sigPeriod\": \"Delay between 2 certs\",\n \"configuration.create_parameters.sigValidity\": \"Cert expiry delay\",\n \"configuration.create_parameters.msValidity\": \"Membership expiry delay\",\n \"configuration.create_parameters.sigQty\": \"Min required certs\",\n \"configuration.create_parameters.sigWindow\": \"Cert time window\",\n \"configuration.create_parameters.stepMax\": \"Max distance\",\n \"configuration.create_parameters.xpercent\": \"Percent of distance\",\n \"configuration.create_parameters.blockchain.title\": \"Blockchain\",\n \"configuration.create_parameters.blockchain.message\": \"The technical support of money and identities is the blockchain. It also has some parameters driving its behavior.\",\n \"configuration.create_parameters.medianTimeBlocks\": \"Blocks count\",\n \"configuration.create_parameters.avgGenTime\": \"Block gen. duration\",\n \"configuration.create_parameters.dtDiffEval\": \"Blocks count for diff.\",\n \"configuration.create_parameters.blocksRot\": \"Personal diff. blocks\",\n \"configuration.create_parameters.percentRot\": \"Personal diff. rotation\",\n \"configuration.create_root.title\": \"Root block creation\",\n \"configuration.create_root.message\": \"This is the final step to create the new currency! The root block or <i>genesis</i> will include the first members and define the currency parameters. Once generated and submitted, the blockchain will be started.\",\n \"configuration.create_root.button.start\": \"Start HTTP\",\n \"configuration.create_root.button.stop\": \"Stop HTTP\",\n \"configuration.create_root.button.generate\": \"Give a try\",\n \"configuration.create_root.need_a_try\": \"You need to generate a first block with the « Give a try » button. Start HTTP server to do so.\",\n \"configuration.create_root.button.accept_and_send\": \"Accept this block and start currency\",\n \"configuration.create_root.button.cancel\": \"Cancel creation and go to home screen\",\n \"configuration.create_root.host_listening\": \"Host listening at:\",\n \"configuration.create_uid.pubkey_preview\": \"Public key preview\",\n \"home.ws2p_peers\": \"Connected peers\",\n \"home.current.number\": \"Current block #\",\n \"home.current.membersCount\": \"Members count\",\n \"home.current.medianTime\": \"Median time\",\n \"home.current.powMin\": \"Common difficulty level\",\n \"home.current.mmass\": \"Monetary mass\",\n \"home.pulling.network\": \"Network\",\n \"home.pulling.peer\": \"Peer\",\n \"home.pulling.state.unkown\": \"Next sync in few minutes\",\n \"home.pulling.state.synced\": \"Synced\",\n \"home.pulling.state.syncing\": \"Syncing...\",\n \"home.pow.unit\": \"blocks made by this key\",\n \"home.pow.is_mirror\": \"This node is a mirror\",\n \"home.pow.is_waiting\": \"Waiting for better proof conditions\",\n \"home.tabs.overview\": \"Overview\",\n \"home.tabs.overview.should_reconfigure\": \"Your configuration has changed and your node is no more reachable from the network. You should reconfigure it to have a functional node. If this message appears again, you should manually configure the network settings. Often, selecting only IPv6 interface (disabling IPv4) solves the problem.\",\n \"home.tabs.network\": \"Peers\",\n \"home.tabs.network.button.update\": \"Check peers again\",\n \"home.tabs.connections\": \"Network\",\n \"home.tabs.connections.title.connections\": \"WS2P Connections\",\n \"home.tabs.connections.title.network\": \"Network view\",\n \"home.tabs.connections.legend.title\": \"Legend\",\n \"home.tabs.connections.legend.prefered\": \"Prefered: nodes that you prefer for outcoming connections\",\n \"home.tabs.connections.legend.privileged\": \"Privileged: nodes that you privilege the incoming connections (= invitation)\",\n \"home.tabs.logs\": \"Logs\",\n \"home.tabs.logs.follow.logs\": \"Follow logs\",\n \"home.tabs.logs.pause.logs\": \"Pause logs\",\n \"home.tabs.logs.level.error\": \"Error\",\n \"home.tabs.logs.level.warn\": \"Warning\",\n \"home.tabs.logs.level.info\": \"Info\",\n \"home.tabs.logs.level.debug\": \"Debug\",\n \"home.tabs.logs.level.trace\": \"Trace\",\n \"sync.title\": \"Synchronize\",\n \"sync.message\": \"Your node will be synchronized with an existing currency: just enter technical details about a node to sync with it.\",\n \"sync.host\": \"Host\",\n \"sync.port\": \"Port\",\n \"sync.check\": \"Check node\",\n \"sync.start\": \"Synchronize with this node\",\n \"sync.failed\": \"Synchronization failed.\",\n \"sync.mode.simplified\": \"Simplified mode\",\n \"sync.mode.manual\": \"Manual mode\",\n \"sync.simplified.choose\": \"Node to connect to\",\n \"sync.simplified.default_option\": \"Please select a node to continue\",\n \"sync.simplified.currency\": \"Currency\",\n \"sync.simplified.main_mirror\": \"(main mirror)\",\n \"sync.simplified.other mirror\": \"(other mirror)\",\n \"sync.ready.node.part1\": \"This node is available!\",\n \"sync.ready.node.part2\": \"Click on the green button to proceed.\",\n \"sync.started.node\": \"Synchronization started on node:\",\n \"sync.error.unreachable.try.another.node\": \"This node is not available. Please select another one.\",\n \"home.menu.server.stop\": \"Stop server\",\n \"home.menu.server.start\": \"Start server\",\n \"home.menu.server.restart\": \"Restart server\",\n \"home.state\": \"Server:\",\n \"home.state.started\": \"STARTED\",\n \"home.state.stopped\": \"STOPPED\",\n \"settings.tabs.logs\": \"Logs\",\n \"settings.tabs.data\": \"Data\",\n \"settings.tabs.backup\": \"Backup\",\n \"settings.tabs.identity\": \"Crypto\",\n \"settings.tabs.network\": \"Network\",\n \"settings.tabs.currency\": \"Currency\",\n \"settings.tabs.cpu\": \"CPU\",\n \"settings.tabs.modules\": \"Modules\",\n \"settings.data.reset.title\": \"Reset this node\",\n \"settings.data.reset.message\": \"If you desire to reset this node's data and sync it again with the network, please select a node to sync against and validate.\",\n \"settings.data.reset.warning\": \"This process <strong>will not</strong> reset the node identity and network settings, which will be reused.\",\n \"settings.data.reset.peer.none_option\": \"Select a node\",\n \"settings.data.reset.peer.label\": \"Synchronization peer\",\n \"settings.data.reset.button\": \"Full reset of the node\",\n \"settings.data.reset_sync.button\": \"Reset data and start sync\",\n \"settings.logs.title\": \"Logs\",\n \"settings.logs.consult.message\": \"Your node continually generates information messages in a log file. This information may help you understand what your node <i>is doing</i> or what it <i>has done</i> few times ago.\",\n \"settings.logs.consult.button\": \"View real-time logs\",\n \"settings.logs.share.message\": \"You may want to <b>share your logs</b> with other people, sometimes to get help or to add informations in a bug tracker. Clicking on below button will extract the last 2000 lines of your logs and push it on the web, returning you a link to be shared with whoever you want.\",\n \"settings.logs.share.button\": \"Create a web link to your logs\",\n \"settings.logs.share.generating\": \"Generating your link...\",\n \"settings.logs.share.error\": \"An error occurred during the generation of your link:\",\n \"settings.data.backup.title\": \"Backup\",\n \"settings.data.backup.message\": \"You can create backups of your node's data and restore them using the buttons below.\",\n \"settings.data.backup.warning\": \"<b>Export</b> will only backup your node's data, which <i>excludes your secret key and configuration details</i>.<br><b>Import</b> will reset your node's data by applying the backup. Your secret keys and configuration remains untouched.\",\n \"settings.data.backup.button.export\": \"Create a data backup\",\n \"settings.data.backup.button.import\": \"Import a data backup\",\n \"settings.data.backup.importing\": \"Importing data...\",\n \"settings.data.backup.imported\": \"Import successfull!\",\n \"settings.network.button.validate\": \"Save and apply network settings\",\n \"settings.network.saved\": \"Configuration saved and applied successfully\",\n \"settings.key.title\": \"Public key of this node:\",\n \"settings.key.button.validate\": \"Save and use this key\",\n \"settings.key.button.change\": \"Change keyring\",\n \"settings.key.pubkey.description\": \"This public key is the public part of your keyring, which is composed of a public key and a private key. This public key is shared with all the peers of the network and users of the currency, while your private key is secretely kept and used by this node to process operations on the network.\",\n \"settings.data.modal_title\": \"Confirm full reset\",\n \"settings.data.modal_message\": \"This action will completely reset the data of your node and redirect you to initial configuration screen. Do you confirm?\",\n \"settings.data.modal_disagree\": \"No, cancel this\",\n \"settings.data.modal_agree\": \"Yes, process the reset\",\n \"settings.data.reset.experimental\": \"This functionality is still considered experimental. If you encounters strange behaviors, please stop the software and reset manually your node by removing all the files BUT conf.json under ~/.config/duniter/duniter_default, and restart the software.\",\n \"settings.cpu.title\": \"CPU settings\",\n \"settings.cpu.message\": \"You can adjust the CPU power dedicated to proof-of-work computation. The higher the value, the faster is your node, the higher the chances you have to compute a block early.\",\n \"settings.cpu.warning\": \"<b>Up to 8 cores</b> of your machine are dedicated to proof-of-work computation currently. Also, setting CPU to 100% does not mean Duniter will use 100% of each core, but will use as much as possible each of them, as a core is also shared with other programs.\",\n \"settings.cpu.range\": \"% of CPU power core dedicated to proof-of-work :\",\n \"settings.cpu.power\": \"Core power:\",\n \"settings.cpu.saved\": \"CPU settings saved.\",\n \"settings.modules.title\": \"Modules\",\n \"settings.modules.message\": \"You can install extensions to your Duniter node to provide new features. These extensions are called <b>Duniter modules</b>.\",\n \"settings.modules.no_access\": \"This instance does not have enough system rights to install new modules on disk.\",\n \"settings.modules.install\": \"Install this module\",\n \"settings.modules.already_install\": \"Module already installed\",\n \"settings.modules.path_does_not_exist\": \"Path does not lead to a module\",\n \"settings.modules.wrong_package_source\": \"Package URL has wrong format\",\n \"settings.modules.warning\": \"Please be <b>VERY CAREFUL</b> when installing a module: you should <b>check that it is not a virus</b>, nor wants to steal your informations. <b>A MODULE HAS A LOT OF POWER</b> and can access/modify any part of your system (including your private key), in the limit of the user's access rights.\",\n \"settings.modules.warning_light\": \"WARNING! (click to see more)\",\n \"settings.modules.warning_close\": \"Close this message\",\n \"settings.modules.on\": \"On\",\n \"settings.modules.off\": \"Off\",\n \"settings.modules.installing\": \"Installation...\",\n \"settings.modules.installing_warn\": \"Please <b>do not close Duniter</b> during this process!\",\n \"settings.modules.uninstalling\": \"Removal...\",\n \"graphs.tabs.blockchain\": \"Blockchain\",\n \"graphs.tabs.currency\": \"Currency\",\n \"graphs.blockchain.range\": \"Graphs for the last X blocks: (please choose X value)\",\n \"graphs.blockchain.with.time\": \"Time variations graph\",\n \"graphs.blockchain.with.speed\": \"Writing speed graph\",\n \"graphs.blockchain.with.difficulty\": \"Difficulty graph\",\n \"help.about_duniter\": \"About Duniter\",\n \"help.about_duniter.title\": \"About\",\n \"help.about_duniter.subtitle\": \"Duniter Desktop\",\n \"help.about_duniter.version\": \"Version: \",\n \"help.about_duniter.forum\": \"Forum\",\n \"help.about_duniter.chat\": \"Chat\",\n \"help.new_version_available\": \"New version available\",\n \"help.restart_required\": \"Restart to apply changes\",\n \"help.restart_required.message\": \"Please close Duniter and restart it.\"\n}\n;","'use strict';\n\nvar co = require('co');\nvar _ = require('underscore');\n\nmodule.exports = function (app) {\n\n app.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {\n\n // States\n $stateProvider.state('index', {\n url: '/',\n template: require('views/index'),\n resolve: {\n ws: function ws(Webmin) {\n return Webmin.ws();\n },\n summary: function summary(Webmin) {\n return Webmin.summary();\n }\n },\n controller: 'IndexController'\n }).state('about', {\n url: '/about',\n template: require('views/about'),\n resolve: {\n summary: function summary(Webmin) {\n return Webmin.summary();\n },\n version: function version(summary) {\n return summary && 'v' + summary.version || 'unknown version';\n }\n },\n controller: 'AboutController'\n }).state('configure', {\n abstract: true,\n url: '/configure',\n template: require('views/init/layout'),\n controller: function controller($scope) {\n $scope.conf = {\n currency: 'super_currency',\n c: 0.007376575,\n dt: 30.4375 * 24 * 3600,\n ud0: 100,\n stepMax: 3,\n sigDelay: 3600 * 24 * 365 * 5,\n sigPeriod: 0, // Instant\n sigStock: 40,\n sigWindow: 3600 * 24 * 14, // 2 weeks\n sigValidity: 3600 * 24 * 365,\n msValidity: 3600 * 24 * 365,\n sigQty: 0,\n xpercent: 0.9,\n percentRot: 0.66,\n blocksRot: 20,\n avgGenTime: 16 * 60,\n dtDiffEval: 10,\n medianTimeBlocks: 20\n };\n }\n }).state('configure.choose', {\n url: '/choose',\n template: require('views/init/choose'),\n controller: function controller($scope, Importer) {\n Importer($scope);\n }\n }).state('configure.create', {\n url: '/create',\n template: '<div class=\"ui-scrollable\" ui-view=\"\"></div>'\n }).state('configure.create.uid', {\n url: '/create/uid',\n template: require('views/init/create/create_uid'),\n controller: 'IdentityController'\n }).state('configure.create.network', {\n url: '/create/network',\n template: require('views/init/create/create_network'),\n resolve: {\n netinterfaces: function netinterfaces(Webmin) {\n return resolveNetworkAutoConf(Webmin);\n },\n firstConf: function firstConf() {\n return true;\n }\n },\n controller: 'NetworkController'\n }).state('configure.create.parameters', {\n url: '/create/parameters',\n template: require('views/init/create/create_parameters'),\n controller: 'ParametersController'\n }).state('configure.create.root', {\n url: '/create/root',\n template: require('views/init/create/create_root'),\n controller: 'RootBlockController'\n }).state('sync', {\n url: '/sync?host=&port=&sync=&to=',\n template: require('views/init/sync/sync'),\n controller: 'SyncController'\n }).state('main', {\n abstract: true,\n url: '/main',\n template: require('views/main/main'),\n resolve: {\n ws: function ws(Webmin) {\n return Webmin.ws();\n },\n summary: function summary(Webmin) {\n return Webmin.summary();\n },\n uiModules: function uiModules(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var modules, i, _module, injection, script;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.plugin.uiModules();\n\n case 2:\n modules = _context.sent;\n i = 0;\n\n case 4:\n if (!(i < modules.length)) {\n _context.next = 16;\n break;\n }\n\n _module = modules[i];\n _context.next = 8;\n return Webmin.plugin.uiGetMenuInjection(_module);\n\n case 8:\n injection = _context.sent;\n script = document.createElement(\"script\");\n\n script.type = \"text/javascript\";\n script.text = \";\" + injection.menu;\n document.body.appendChild(script);\n\n case 13:\n i++;\n _context.next = 4;\n break;\n\n case 16:\n return _context.abrupt('return', modules);\n\n case 17:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n }\n },\n controller: 'MainController'\n }).state('main.home', {\n abstract: true,\n url: '/home',\n template: require('views/main/home/home'),\n controller: 'HomeController'\n }).state('main.home.overview', {\n url: '/overview',\n template: require('views/main/home/tabs/overview'),\n resolve: {\n summary: function summary(Webmin) {\n return Webmin.summary();\n }\n },\n controller: 'OverviewController'\n }).state('main.home.network', {\n url: '/network',\n template: require('views/main/home/tabs/network'),\n resolve: {\n peers: function peers(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n return _context2.abrupt('return', Webmin.network.peers());\n\n case 1:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n }\n },\n controller: 'HomeNetworkController'\n }).state('main.home.connections', {\n url: '/connections',\n template: require('views/main/home/tabs/connections'),\n resolve: {\n conf: function conf(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt('return', Webmin.network.ws2p.conf());\n\n case 1:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n },\n info: function info(Webmin, conf) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n return _context4.abrupt('return', Webmin.network.ws2p.info());\n\n case 1:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n },\n heads: function heads(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n return _context5.abrupt('return', Webmin.network.ws2p.heads());\n\n case 1:\n case 'end':\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n }\n },\n controller: 'HomeConnectionsController'\n }).state('main.settings', {\n abstract: true,\n url: '/settings',\n template: require('views/main/settings/settings'),\n resolve: {\n summary: function summary(Webmin) {\n return Webmin.summary();\n }\n },\n controller: 'SettingsController'\n }).state('main.settings.data', {\n url: '/data',\n template: require('views/main/settings/tabs/data'),\n resolve: {\n peers: function peers(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {\n var self, res;\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n _context6.prev = 0;\n _context6.next = 3;\n return Webmin.network.selfPeer();\n\n case 3:\n self = _context6.sent;\n _context6.next = 6;\n return Webmin.network.peers();\n\n case 6:\n res = _context6.sent;\n return _context6.abrupt('return', _.filter(res.peers, function (p) {\n return p.pubkey != self.pubkey && p.status == 'UP';\n }));\n\n case 10:\n _context6.prev = 10;\n _context6.t0 = _context6['catch'](0);\n\n console.error(_context6.t0);\n return _context6.abrupt('return', []);\n\n case 14:\n case 'end':\n return _context6.stop();\n }\n }\n }, _callee6, this, [[0, 10]]);\n }));\n }\n },\n controller: 'DataController'\n }).state('main.settings.logs', {\n url: '/logs',\n template: require('views/main/settings/tabs/logs'),\n controller: 'LogsSettingsController'\n }).state('main.settings.backup', {\n url: '/backup',\n template: require('views/main/settings/tabs/backup'),\n controller: 'BackupController'\n }).state('main.settings.cpu', {\n url: '/cpu',\n template: require('views/main/settings/tabs/cpu'),\n resolve: {\n summary: function summary(Webmin) {\n return Webmin.summary();\n }\n },\n controller: 'CPUController'\n }).state('main.settings.modules', {\n url: '/modules',\n template: require('views/main/settings/tabs/modules'),\n resolve: {\n summary: function summary(Webmin) {\n return Webmin.summary();\n },\n hasAccess: function hasAccess(Webmin) {\n return Webmin.plugin.checkAccess();\n },\n allModules: function allModules(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {\n var modules;\n return regeneratorRuntime.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n _context7.next = 2;\n return Webmin.plugin.allModules();\n\n case 2:\n modules = _context7.sent;\n return _context7.abrupt('return', modules);\n\n case 4:\n case 'end':\n return _context7.stop();\n }\n }\n }, _callee7, this);\n }));\n }\n },\n controller: 'ModulesController'\n }).state('main.settings.crypto', {\n url: '/crypto',\n template: require('views/main/settings/tabs/crypto'),\n controller: 'KeyController'\n }).state('main.settings.network', {\n url: '/network',\n resolve: {\n netinterfaces: function netinterfaces(Webmin) {\n return resolveNetworkAutoConf(Webmin);\n },\n firstConf: function firstConf() {\n return false;\n }\n },\n template: require('views/main/settings/tabs/network'),\n controller: 'NetworkController'\n }).state('main.settings.currency', {\n url: '/currency',\n resolve: {\n conf: function conf(summary) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {\n return regeneratorRuntime.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n return _context8.abrupt('return', summary.parameters);\n\n case 1:\n case 'end':\n return _context8.stop();\n }\n }\n }, _callee8, this);\n }));\n }\n },\n template: require('views/main/settings/tabs/currency'),\n controller: 'CurrencyController'\n }).state('main.graphs', {\n abstract: true,\n url: '/graphs',\n template: require('views/main/graphs/graphs'),\n controller: 'GraphsController'\n }).state('main.graphs.blockchain', {\n url: '/blockchain',\n template: require('views/main/graphs/blockchain'),\n controller: 'GraphsBlockchainController'\n }).\n\n //state('graphs.crypto', {\n // url: '/crypto',\n // template: require('views/graphs/crypto'),\n // controller: 'KeyController'\n //}).\n //\n //state('graphs.network', {\n // url: '/network',\n // resolve: {\n // netinterfaces: (Webmin) => resolveNetworkAutoConf(Webmin),\n // firstConf: () => false\n // },\n // template: require('views/graphs/network'),\n // controller: 'NetworkController'\n //}).\n //\n //state('graphs.currency', {\n // url: '/currency',\n // resolve: {\n // conf: (bmapi) => co(function *() {\n // return bmapi.currency.parameters();\n // })\n // },\n // template: require('views/graphs/currency'),\n // controller: 'CurrencyController'\n //}).\n\n state('logs', {\n url: '/logs',\n template: require('views/logs'),\n resolve: {\n ws: function ws(Webmin) {\n return Webmin.ws();\n }\n },\n controller: 'LogsController'\n }).state('error', {\n url: '/error\\?err',\n template: require('views/error'),\n controller: function controller($scope, $stateParams) {\n return $scope.errorMsg = $stateParams.err || 'err.unknown';\n }\n });\n\n // Default route\n $urlRouterProvider.otherwise('/');\n }]);\n\n app.run(function ($rootScope, $state) {\n $rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, error) {\n console.error(error);\n $state.go('error', { err: error.message });\n });\n });\n\n function resolveNetworkAutoConf(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {\n var netinterfaces;\n return regeneratorRuntime.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n _context9.next = 2;\n return Webmin.network.interfaces();\n\n case 2:\n netinterfaces = _context9.sent;\n return _context9.abrupt('return', netinterfaces || { local: {}, remote: {} });\n\n case 4:\n case 'end':\n return _context9.stop();\n }\n }\n }, _callee9, this);\n }));\n }\n};\n","'use strict';\n\nmodule.exports = function (app) {\n\n app.config(['$translateProvider', function ($translateProvider) {\n\n $translateProvider.translations('en', require('./i18n/en'));\n\n // Default language\n $translateProvider.preferredLanguage('en');\n\n // Other parameters\n $translateProvider.useSanitizeValueStrategy('');\n }]);\n};\n","\"use strict\";\n\nmodule.exports = function Peer(json) {\n\n var that = this;\n\n var BMA_REGEXP = /^BASIC_MERKLED_API( ([a-z_][a-z0-9-_.]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))$/;\n\n Object.keys(json).forEach(function (key) {\n that[key] = json[key];\n });\n\n that.endpoints = that.endpoints || [];\n that.statusTS = that.statusTS || 0;\n\n that.keyID = function () {\n return that.pubkey && that.pubkey.length > 10 ? that.pubkey.substring(0, 10) : \"Unknown\";\n };\n\n that.copyValues = function (to) {\n var obj = that;\n [\"version\", \"currency\", \"pub\", \"endpoints\", \"hash\", \"status\", \"statusTS\", \"block\", \"signature\"].forEach(function (key) {\n to[key] = obj[key];\n });\n };\n\n that.copyValuesFrom = function (from) {\n var obj = that;\n [\"version\", \"currency\", \"pub\", \"endpoints\", \"block\", \"signature\"].forEach(function (key) {\n obj[key] = from[key];\n });\n };\n\n that.json = function () {\n var obj = that;\n var json = {};\n [\"version\", \"currency\", \"endpoints\", \"status\", \"block\", \"signature\"].forEach(function (key) {\n json[key] = obj[key];\n });\n json.raw = that.getRaw();\n json.pubkey = that.pubkey;\n return json;\n };\n\n that.getBMA = function () {\n var bma = null;\n that.endpoints.forEach(function (ep) {\n var matches = !bma && ep.match(BMA_REGEXP);\n if (matches) {\n bma = {\n \"dns\": matches[2] || '',\n \"ipv4\": matches[4] || '',\n \"ipv6\": matches[6] || '',\n \"port\": matches[8] || 9101\n };\n }\n });\n return bma || {};\n };\n\n that.getDns = function () {\n var bma = that.getBMA();\n return bma.dns ? bma.dns : null;\n };\n\n that.getIPv4 = function () {\n var bma = that.getBMA();\n return bma.ipv4 ? bma.ipv4 : null;\n };\n\n that.getIPv6 = function () {\n var bma = that.getBMA();\n return bma.ipv6 ? bma.ipv6 : null;\n };\n\n that.getPort = function () {\n var bma = that.getBMA();\n return bma.port ? bma.port : null;\n };\n\n that.getHost = function () {\n var bma = that.getBMA();\n var host = that.hasValid4(bma) ? bma.ipv4 : bma.dns ? bma.dns : bma.ipv6 ? '[' + bma.ipv6 + ']' : '';\n return host;\n };\n\n that.getURL = function () {\n var bma = that.getBMA();\n var base = '';\n if (bma.dns) {\n base = bma.dns;\n } else if (that.hasValid4(bma)) {\n base = bma.ipv4;\n } else if (bma.ipv6) {\n base = '[' + bma.ipv6 + ']';\n }\n if (bma.port) base += ':' + bma.port;\n return base;\n };\n\n that.hasValid4 = function (bma) {\n return bma.ipv4 && !bma.ipv4.match(/^127.0/) && !bma.ipv4.match(/^192.168/) ? true : false;\n };\n\n that.getNamedURL = function () {\n var bma = that.getBMA();\n var base = that.hasValid4(bma) ? bma.ipv4 : bma.dns ? bma.dns : bma.ipv6 ? '[' + bma.ipv6 + ']' : '';\n if (bma.port) base += ':' + bma.port;\n return base;\n };\n\n that.isReachable = function () {\n return that.getURL() ? true : false;\n };\n};\n","\"use strict\";\n\nmodule.exports = function mobilecheck() {\n var check = false;\n (function (a) {\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) check = true;\n })(navigator.userAgent || navigator.vendor || window.opera);\n return check;\n};\n","'use strict';\n\nmodule.exports = function (app) {\n\n var Base58 = {};\n\n Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';\n Base58.alphabetMap = {};\n\n for (var i = 0; i < Base58.alphabet.length; i++) {\n Base58.alphabetMap[Base58.alphabet.charAt(i)] = i;\n }\n\n Base58.encode = function (buffer) {\n if (buffer.length === 0) return '';\n\n var i = void 0,\n j = void 0,\n digits = [0];\n for (i = 0; i < buffer.length; i++) {\n for (j = 0; j < digits.length; j++) {\n digits[j] <<= 8;\n }digits[digits.length - 1] += buffer[i];\n\n var carry = 0;\n for (j = digits.length - 1; j >= 0; j--) {\n digits[j] += carry;\n carry = digits[j] / 58 | 0;\n digits[j] %= 58;\n }\n\n while (carry) {\n digits.unshift(carry);\n carry = digits[0] / 58 | 0;\n digits[0] %= 58;\n }\n }\n\n // deal with leading zeros\n for (i = 0; i < buffer.length - 1 && buffer[i] == 0; i++) {\n digits.unshift(0);\n }return digits.map(function (digit) {\n return Base58.alphabet[digit];\n }).join('');\n };\n\n Base58.decode = function (string) {\n if (string.length === 0) return new Uint8Array();\n\n var input = string.split('').map(function (c) {\n return Base58.alphabetMap[c];\n });\n\n var i = void 0,\n j = void 0,\n bytes = [0];\n for (i = 0; i < input.length; i++) {\n for (j = 0; j < bytes.length; j++) {\n bytes[j] *= 58;\n }bytes[bytes.length - 1] += input[i];\n\n var carry = 0;\n for (j = bytes.length - 1; j >= 0; j--) {\n bytes[j] += carry;\n carry = bytes[j] >> 8;\n bytes[j] &= 0xff;\n }\n\n while (carry) {\n bytes.unshift(carry);\n carry = bytes[0] >> 8;\n bytes[0] &= 0xff;\n }\n }\n\n // deal with leading zeros\n for (i = 0; i < input.length - 1 && input[i] == 0; i++) {\n bytes.unshift(0);\n }return new Uint8Array(bytes);\n };\n\n app.factory('Base58', function () {\n return {\n encode: Base58.encode,\n decode: Base58.decode\n };\n });\n};\n","'use strict';\n\nvar _ = require('underscore');\nvar conf = require('../lib/conf/conf');\nvar moment = require('moment');\n\nmodule.exports = function (app) {\n\n app.filter('mt_date', function () {\n return function (input) {\n if (input == null) {\n return \"\";\n }\n return moment(input * 1000).format('YYYY MM DD');\n };\n });\n\n app.filter('mt_time', function () {\n return function (input) {\n if (input == null) {\n return \"\";\n }\n return moment(input * 1000).format('HH:mm:ss');\n };\n });\n};\n","'use strict';\n\nmodule.exports = function (app) {\n\n app.factory('Graph', function () {\n return {\n\n speedGraph: function speedGraphs(id, offset, speeds, minSpeeds, maxSpeeds, getSeries) {\n var xValuex = [];\n for (var i = 0, len = speeds.length; i < len; i++) {\n xValuex.push(i + offset);\n }\n $(id).highcharts({\n chart: {\n type: \"area\",\n zoomType: 'x',\n events: {\n load: function load() {\n getSeries(this.series);\n }\n }\n },\n title: {\n text: 'Blocks writing speed'\n },\n subtitle: {\n text: document.ontouchstart === undefined ? 'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'\n },\n xAxis: {\n //categories: xValuex,\n minRange: 3, // 10 blocks,\n labels: {\n formatter: function formatter() {\n return this.value + offset;\n }\n }\n },\n yAxis: {\n //type: 'logarithmic',\n minorTickInterval: 1,\n title: {\n text: 'Blocks per hour (logarithmic scale)'\n },\n floor: 0,\n min: 0\n },\n colors: ['#ff0000', '#7cb5ec', '#000000'],\n legend: {\n enabled: true\n },\n tooltip: {\n shared: true,\n crosshairs: true,\n formatter: blockFormatter(offset)\n },\n plotOptions: {\n area: {\n fillColor: {\n linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },\n stops: [[0, Highcharts.getOptions().colors[0]], [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]]\n },\n marker: {\n radius: 2\n },\n lineWidth: 1,\n states: {\n hover: {\n lineWidth: 1\n }\n },\n threshold: null\n }\n },\n\n series: [{\n type: 'line',\n name: \"Upper limit\",\n data: maxSpeeds\n }, {\n type: 'area',\n name: \"Actual speed\",\n data: speeds\n }, {\n type: 'line',\n name: \"Lower limit\",\n data: minSpeeds\n }]\n });\n },\n\n difficultyGraph: function difficultyGraph(id, offset, difficulties) {\n $(id).highcharts({\n chart: {\n type: \"area\",\n zoomType: 'x'\n },\n title: {\n text: 'Proof-of-Work difficulty by block'\n },\n subtitle: {\n text: document.ontouchstart === undefined ? 'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'\n },\n xAxis: {\n minRange: 10, // 10 blocks,\n labels: {\n formatter: function formatter() {\n return this.value + offset;\n }\n }\n },\n yAxis: {\n title: {\n text: 'Number of zeros'\n },\n floor: 0,\n min: 0\n },\n legend: {\n enabled: true\n },\n tooltip: {\n shared: true,\n crosshairs: true,\n formatter: blockFormatter(offset)\n },\n plotOptions: {\n area: {\n fillColor: {\n linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },\n stops: [[0, Highcharts.getOptions().colors[0]], [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]]\n },\n marker: {\n radius: 2\n },\n lineWidth: 1,\n states: {\n hover: {\n lineWidth: 1\n }\n },\n threshold: null\n }\n },\n\n series: [{\n name: 'PoW difficulty',\n data: difficulties\n }]\n });\n },\n\n timeGraphs: function timeGraphs(id, offset, timeAccelerations, medianTimeIncrements, speeds, minSpeeds, maxSpeeds) {\n var timesInc = [];\n medianTimeIncrements.forEach(function (inc) {\n timesInc.push(inc == 0 ? 1 : inc);\n });\n $(id).highcharts({\n chart: {\n // type: \"area\",\n zoomType: 'x'\n },\n title: {\n text: 'Blockchain time variations'\n },\n subtitle: {\n text: document.ontouchstart === undefined ? 'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'\n },\n xAxis: {\n minRange: 10, // 10 blocks,\n labels: {\n formatter: function formatter() {\n return this.value + offset;\n }\n }\n },\n yAxis: {\n //type: 'logarithmic',\n minorTickInterval: 1,\n title: {\n text: 'Number of seconds (logarithmic scale)'\n }\n },\n legend: {\n enabled: true\n },\n tooltip: {\n shared: true,\n crosshairs: true,\n formatter: blockFormatter(offset)\n },\n plotOptions: {\n area: {\n fillColor: {\n linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },\n stops: [[0, Highcharts.getOptions().colors[0]], [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]]\n },\n marker: {\n radius: 2\n },\n lineWidth: 1,\n states: {\n hover: {\n lineWidth: 1\n }\n },\n threshold: null\n }\n },\n\n series: [{\n name: 'Time acceleration',\n data: timeAccelerations\n }, {\n name: \"Median Time variation\",\n data: timesInc\n }, {\n name: \"Too high duration\",\n data: maxSpeeds\n }, {\n name: \"Actual duration\",\n data: speeds\n }, {\n name: \"Too low duration\",\n data: minSpeeds\n }]\n });\n }\n };\n });\n};\n\nfunction blockFormatter(offset) {\n return function () {\n var html = '<span style=\"font-size: 10px\">' + (this.x + offset) + '</span><br/>';\n for (var i = 0, len = this.points.length; i < len; i++) {\n var point = this.points[i];\n var series = point.series;\n html += '<span style=\"color:' + series.color + '\">\\u25CF</span>' + series.name + ': <b>' + point.y + '</b><br/>';\n }\n return html;\n };\n}\n","'use strict';\n\nmodule.exports = function (app) {\n\n app.factory('Importer', function ($http, $state, $timeout, UIUtils, Upload, Webmin) {\n\n return function ($scope) {\n\n $scope.uploadFiles = function (file, errFiles) {\n $scope.f = file;\n $scope.errFile = errFiles && errFiles[0];\n if (file) {\n UIUtils.toast('settings.data.backup.importing');\n file.upload = Upload.upload({\n url: Webmin.getImportURL(),\n data: { importData: file }\n });\n\n file.upload.then(function (response) {\n $timeout(function () {\n UIUtils.toast('settings.data.backup.imported');\n $state.go('main.home.overview');\n file.result = response.data;\n });\n }, function (response) {\n if (response.status > 0) $scope.errorMsg = response.status + ': ' + response.data;\n }, function (evt) {\n file.progress = Math.min(100, parseInt(100.0 * evt.loaded / evt.total));\n });\n }\n };\n };\n });\n};\n","'use strict';\n\nmodule.exports = function (app) {\n\n app.factory('PubkeyGenerator', function ($timeout, Webmin) {\n\n var co = require('co');\n\n return function ($scope) {\n\n var concat = \"\";\n $scope.pubkey_preview = \"\";\n var timeout = preview();\n\n function preview() {\n return $timeout(function () {\n if ($scope.$parent) {\n var salt = $scope.$parent.conf.idty_entropy;\n var pass = $scope.$parent.conf.idty_password;\n var newConcat = [salt, pass].join('');\n if (salt && pass && newConcat != concat) {\n concat = newConcat;\n $scope.previewPubkey(concat);\n timeout = preview();\n } else {\n timeout = preview();\n }\n }\n }, 100);\n }\n\n $scope.previewPubkey = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var data;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.key.preview({\n conf: $scope.$parent.conf\n });\n\n case 2:\n data = _context.sent;\n\n $scope.pubkey_preview = data.pubkey;\n\n case 4:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n })).catch(function () {\n return null;\n });\n };\n };\n });\n};\n","'use strict';\n\nmodule.exports = function (app) {\n\n app.factory('UIUtils', function ($q, $translate, $state, $location) {\n return {\n\n translate: function translate(msg) {\n return $q.when($translate(msg));\n },\n\n toastRaw: function toastRaw(msg) {\n return Materialize.toast(msg, 4000);\n },\n\n toast: function toast(msg) {\n return $q.when($translate(msg)).then(function (translated) {\n return Materialize.toast(translated, 4000);\n });\n },\n\n enableInputs: function enableInputs() {\n return $('i.prefix, label[value!=\"\"]').addClass('active');\n },\n\n enableTabs: function enableTabs() {\n var jTabs = $('ul.tabs');\n jTabs.tabs();\n $('ul.tabs a').click(function (e) {\n var href = $(e.currentTarget).attr('href');\n var state = href.slice(1);\n $state.go(state);\n });\n\n var currentID = $location.path().replace(/\\//g, '.').replace(/\\./, '');\n\n jTabs.tabs('select_tab', currentID);\n },\n\n changeTitle: function changeTitle(version, currency, prefix) {\n var printCurrency = \"\";\n if (typeof currency != \"undefined\" && currency != null) {\n printCurrency = currency;\n if (currency == \"g1\" || currency == \"g1-test\") {\n printCurrency = currency = 'ğ' + currency.slice(1);\n }\n }\n return document.title = typeof prefix != \"undefined\" && prefix != 1 ? 'Duniter ' + version + ' : ' + printCurrency + '-' + prefix : 'Duniter ' + version + ' : ' + printCurrency;\n }\n };\n });\n};\n","'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar co = require('co');\nvar _ = require('underscore');\nvar conf = require('../lib/conf/conf');\n\nmodule.exports = function (angular) {\n\n angular.module('duniter.services.webmin', ['ngResource']).factory('Webmin', function ($http, $q) {\n\n function httpProtocol() {\n return window.location.protocol + '//';\n }\n\n function wsProtocol() {\n return window.location.protocol === 'https:' ? 'wss://' : 'ws://';\n }\n\n function Webmin(server) {\n\n function getResource(uri, protocol) {\n return function (params) {\n return $q.when(httpGet(uri, params, protocol));\n };\n }\n\n function httpGet(uri, params, protocol) {\n return Q.Promise(function (resolve, reject) {\n var config = {\n timeout: conf.api_timeout\n },\n suffix = '',\n pkeys = [],\n queryParams = null;\n if ((typeof params === 'undefined' ? 'undefined' : _typeof(params)) == 'object') {\n pkeys = _.keys(params);\n queryParams = {};\n }\n pkeys.forEach(function (pkey) {\n var prevURI = uri;\n uri = uri.replace(new RegExp(':' + pkey), params[pkey]);\n if (prevURI == uri) {\n queryParams[pkey] = params[pkey];\n }\n });\n config.params = queryParams;\n $http.get((protocol || httpProtocol()) + server + uri + suffix, config).success(function (data, status, headers, config) {\n resolve(data);\n }).error(function (data, status, headers, config) {\n console.log(data);\n reject(data);\n });\n });\n }\n\n function postResource(uri) {\n return function (data, params) {\n return $q.when(Q.Promise(function (resolve, reject) {\n var config = {\n timeout: 4000\n },\n suffix = '',\n pkeys = [],\n queryParams = null;\n if ((typeof params === 'undefined' ? 'undefined' : _typeof(params)) == 'object') {\n pkeys = _.keys(params);\n queryParams = {};\n }\n pkeys.forEach(function (pkey) {\n var prevURI = uri;\n uri = uri.replace(new RegExp(':' + pkey), params[pkey]);\n if (prevURI == uri) {\n queryParams[pkey] = params[pkey];\n }\n });\n config.params = queryParams;\n $http.post(httpProtocol() + server + uri + suffix, data, config).success(function (data, status, headers, config) {\n resolve(data);\n }).error(function (data, status, headers, config) {\n reject(data);\n });\n }));\n };\n }\n\n var wsMap = {};\n\n function _ws(uri) {\n var sock = wsMap[uri] || new WebSocket(uri);\n wsMap[uri] = sock;\n sock.onclose = function (e) {\n console.log('close');\n console.log(e);\n };\n sock.onerror = function (e) {\n console.log('onerror');\n console.log(e);\n };\n var opened = false,\n openedCallback = void 0;\n sock.onopen = function () {\n opened = true;\n openedCallback && openedCallback();\n };\n var listener = void 0,\n messageType = void 0;\n sock.onmessage = function (e) {\n var res = JSON.parse(e.data);\n if (res.type == 'log') {\n for (var i = 0, len = res.value.length; i < len; i++) {\n var log = res.value[i];\n // console[log.level](log.msg);\n }\n }\n if (listener && (messageType === undefined || res.type === messageType)) {\n listener(res);\n }\n };\n return {\n on: function on(type, callback) {\n messageType = type;\n listener = callback;\n },\n whenOpened: function whenOpened() {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!opened) {\n _context.next = 4;\n break;\n }\n\n return _context.abrupt('return', true);\n\n case 4:\n _context.next = 6;\n return Q.Promise(function (resolve) {\n openedCallback = resolve;\n });\n\n case 6:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n },\n send: function send(msg) {\n return sock.send(msg);\n }\n };\n }\n\n return {\n getExportURL: function getExportURL() {\n return httpProtocol() + server + '/webmin/data/duniter_export';\n },\n getImportURL: function getImportURL() {\n return httpProtocol() + server + '/webmin/data/duniter_import';\n },\n isNodePubliclyReachable: getResource('/webmin/server/reachable'),\n ws: function ws() {\n return _ws(wsProtocol() + server + '/webmin/ws');\n },\n wsBlock: function wsBlock() {\n return _ws(wsProtocol() + server + '/webmin/ws_block');\n },\n wsPeer: function wsPeer() {\n return _ws(wsProtocol() + server + '/webmin/ws_peer');\n },\n summary: getResource('/webmin/summary'),\n powSummary: getResource('/webmin/summary/pow'),\n logsExport: function logsExport(nbLines) {\n return getResource('/webmin/logs/export/' + nbLines)();\n },\n blockchain: {\n blocks: function blocks(opts) {\n return getResource('/webmin/blockchain/blocks/' + opts.count + '/' + opts.from)();\n },\n block_add: postResource('/webmin/blockchain/add')\n },\n server: {\n http: {\n start: getResource('/webmin/server/http/start'),\n stop: getResource('/webmin/server/http/stop'),\n openUPnP: getResource('/webmin/server/http/upnp/open'),\n regularUPnP: getResource('/webmin/server/http/upnp/regular')\n },\n services: {\n startAll: getResource('/webmin/server/services/start_all'),\n stopAll: getResource('/webmin/server/services/stop_all')\n },\n sendConf: postResource('/webmin/server/send_conf'),\n netConf: postResource('/webmin/server/net_conf'),\n keyConf: postResource('/webmin/server/key_conf'),\n cpuConf: postResource('/webmin/server/cpu_conf'),\n testSync: postResource('/webmin/server/test_sync'),\n startSync: postResource('/webmin/server/start_sync'),\n previewNext: getResource('/webmin/server/preview_next'),\n autoConfNetwork: getResource('/webmin/server/auto_conf_network'),\n resetData: getResource('/webmin/server/reset/data'),\n republishNewSelfPeer: getResource('/webmin/server/republish_selfpeer')\n },\n key: {\n preview: postResource('/webmin/key/preview')\n },\n network: {\n interfaces: getResource('/webmin/network/interfaces'),\n selfPeer: getResource('/webmin/network/self'),\n peers: getResource('/webmin/network/peers'),\n ws2p: {\n info: getResource('/webmin/network/ws2p/info'),\n heads: getResource('/webmin/network/ws2p/heads'),\n conf: getResource('/webmin/network/ws2p/conf')\n }\n },\n currency: {\n parameters: getResource('/webmin/currency/parameters')\n },\n plugin: {\n allModules: getResource('/webmin/plug/modules'),\n uiModules: getResource('/webmin/plug/ui_modules'),\n uiGetMenuInjection: function uiGetMenuInjection(moduleName) {\n return getResource('/webmin/plug/ui_modules/inject/' + moduleName)();\n },\n checkAccess: getResource('/webmin/plug/check_access'),\n addPackage: function addPackage(pkg) {\n return postResource('/webmin/plug/add/')({ pkg: pkg });\n },\n removePackage: function removePackage(pkg) {\n return postResource('/webmin/plug/rem/')({ pkg: pkg });\n }\n }\n };\n }\n var server = window.location.hostname;\n var port = window.location.port;\n var service = Webmin([server, port].join(':'));\n service.instance = Webmin;\n return service;\n });\n};\n"]} \ No newline at end of file +{"version":3,"sources":["app/js/controllers/AboutController.js","app/js/controllers/IndexController.js","app/js/controllers/init/create/IdentityController.js","app/js/controllers/init/create/ParametersController.js","app/js/controllers/init/create/RootBlockController.js","app/js/controllers/init/sync/SyncController.js","app/js/controllers/main/MainController.js","app/js/controllers/main/graphs/GraphsBlockchainController.js","app/js/controllers/main/graphs/GraphsController.js","app/js/controllers/main/home/HomeController.js","app/js/controllers/main/home/tabs/HomeConnectionsController.js","app/js/controllers/main/home/tabs/HomeNetworkController.js","app/js/controllers/main/home/tabs/OverviewController.js","app/js/controllers/main/settings/SettingsController.js","app/js/controllers/main/settings/tabs/BackupController.js","app/js/controllers/main/settings/tabs/CPUController.js","app/js/controllers/main/settings/tabs/CurrencyController.js","app/js/controllers/main/settings/tabs/DataController.js","app/js/controllers/main/settings/tabs/KeyController.js","app/js/controllers/main/settings/tabs/LogsController.js","app/js/controllers/main/settings/tabs/LogsSettingsController.js","app/js/controllers/main/settings/tabs/ModulesController.js","app/js/controllers/main/settings/tabs/NetworkController.js","app/js/app.config.js","app/js/application.js","app/js/lib/conf/conf.js","app/js/lib/conf/i18n/en.json","app/js/lib/conf/routes.js","app/js/lib/conf/translate.js","app/js/lib/entity/peer.js","app/js/lib/mobileDetector.js","app/js/services/base58.js","app/js/services/datetime.js","app/js/services/graphs.js","app/js/services/importer.js","app/js/services/pubkeyGenerator.js","app/js/services/ui_utils.js","app/js/services/webmin.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3BA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1DA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1BA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzNA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3MA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApNA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA9JA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjKA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjZA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnDA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzFA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArDA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvKA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArFA;AAAA;CCAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlGA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlBA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlQA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAheA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnHA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxFA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1BA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlPA;AAAA;CCAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7DA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApDA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvPA;AAAA","file":"public/app.js","sourcesContent":["\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, version, UIUtils) {\n\n $scope.version = version;\n\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return UIUtils.translate('help.about_duniter.title');\n\n case 2:\n $scope.$parent.title = _context.sent;\n\n case 3:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $http, $state, Webmin, summary, UIUtils) {\n\n UIUtils.changeTitle(summary.version, summary.parameters.currency, summary.conf.prefix);\n\n $scope.message = 'index.message.loading';\n co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var connected, _summary;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n connected = false;\n _context.prev = 1;\n _context.next = 4;\n return Webmin.summary();\n\n case 4:\n _summary = _context.sent;\n\n if (!_summary.current) {\n _context.next = 7;\n break;\n }\n\n return _context.abrupt('return', $state.go('main.home.overview'));\n\n case 7:\n return _context.abrupt('return', $state.go('configure.choose'));\n\n case 10:\n _context.prev = 10;\n _context.t0 = _context['catch'](1);\n\n console.error(connected, _context.t0);\n\n if (connected) {\n _context.next = 15;\n break;\n }\n\n return _context.abrupt('return', $state.go('error', { err: 'err.connection' }));\n\n case 15:\n return _context.abrupt('return', $state.go('error', { err: _context.t0 }));\n\n case 16:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[1, 10]]);\n }));\n};\n","\"use strict\";\n\nvar conf = require('js/lib/conf/conf');\n\nmodule.exports = function ($scope, $state, PubkeyGenerator) {\n\n setTimeout(function () {\n $('select').material_select();\n }, 500);\n\n $scope.accept = function () {\n var modal = $('#modal1');\n if (modal.css('display') == 'none') {\n $('#modal1').openModal();\n }\n };\n\n PubkeyGenerator($scope);\n\n if (conf.dev_autoconf) {\n $scope.$parent.conf.idty_uid = 'dev_' + ~~(Math.random() * 2147483647);\n $scope.$parent.conf.idty_entropy = ~~(Math.random() * 2147483647) + \"\";\n $scope.$parent.conf.idty_password = ~~(Math.random() * 2147483647) + \"\";\n $state.go('configure.create.network');\n }\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, UIUtils) {\n\n UIUtils.enableInputs();\n};\n","\"use strict\";\n\nvar co = require('co');\nvar conf = require('js/lib/conf/conf');\n\nmodule.exports = function ($scope, $http, $state, Webmin) {\n\n $scope.generated = '';\n $scope.started = false;\n $scope.message = 'configuration.create_root.need_a_try';\n\n $scope.start = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var hosts;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.prev = 0;\n hosts = [];\n\n if ($scope.$parent.conf.remote_ipv4) {\n hosts.push([$scope.$parent.conf.remote_ipv4, $scope.$parent.conf.rport].join(':'));\n }\n if ($scope.$parent.conf.remote_ipv6) {\n hosts.push([\"[\" + $scope.$parent.conf.remote_ipv6 + \"]\", $scope.$parent.conf.rport].join(':'));\n }\n $scope.host_listening = hosts.join('\\n');\n $scope.started = true;\n _context.next = 8;\n return Webmin.server.sendConf({\n conf: $scope.$parent.conf\n });\n\n case 8:\n _context.next = 10;\n return $scope.try();\n\n case 10:\n _context.next = 15;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](0);\n\n $scope.message = _context.t0.message;\n\n case 15:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[0, 12]]);\n }));\n };\n\n $scope.stop = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n $scope.started = false;\n\n case 1:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n };\n\n $scope.try = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.prev = 0;\n _context3.next = 3;\n return Webmin.server.previewNext();\n\n case 3:\n $scope.block = _context3.sent;\n\n $scope.generated = $scope.block.raw;\n $scope.message = '';\n _context3.next = 11;\n break;\n\n case 8:\n _context3.prev = 8;\n _context3.t0 = _context3['catch'](0);\n\n $scope.message = _context3.t0.message;\n\n case 11:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this, [[0, 8]]);\n }));\n };\n\n $scope.accept = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var res;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return Webmin.blockchain.block_add({\n block: $scope.generated\n });\n\n case 2:\n res = _context4.sent;\n\n if (!(res.number == 0)) {\n _context4.next = 6;\n break;\n }\n\n _context4.next = 6;\n return $scope.startServices();\n\n case 6:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n };\n\n $scope.startServices = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n _context5.next = 2;\n return Webmin.server.services.startAll();\n\n case 2:\n $state.go('index');\n\n case 3:\n case 'end':\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n };\n\n $scope.cancelAndReset = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n _context6.next = 2;\n return Webmin.server.services.stopAll();\n\n case 2:\n _context6.next = 4;\n return Webmin.server.resetData();\n\n case 4:\n $state.go('index');\n\n case 5:\n case 'end':\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n };\n\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {\n return regeneratorRuntime.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n _context7.prev = 0;\n _context7.next = 3;\n return $scope.start();\n\n case 3:\n _context7.next = 5;\n return $scope.try();\n\n case 5:\n $scope.started = true;\n _context7.next = 11;\n break;\n\n case 8:\n _context7.prev = 8;\n _context7.t0 = _context7['catch'](0);\n\n $scope.started = false;\n\n case 11:\n case 'end':\n return _context7.stop();\n }\n }\n }, _callee7, this, [[0, 8]]);\n }));\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $http, $state, $timeout, $stateParams, $translate, UIUtils, Webmin) {\n\n var syncWS = Webmin.ws();\n\n UIUtils.enableInputs();\n $scope.sync_mode = 'simplified';\n $scope.simplified_host = '';\n $scope.synchronizing = false;\n $scope.sync_failed = false;\n $scope.host = $stateParams.host || localStorage.getItem('sync_host') || '';\n $scope.port = parseInt($stateParams.port) || parseInt(localStorage.getItem('sync_port')) || 10901;\n $scope.to = parseInt($stateParams.to);\n $scope.wrong_host = false;\n $scope.remote_current = null;\n\n $scope.checkNode = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var current, targetHost;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n $scope.checked_host = '';\n $scope.sync_error = '';\n $scope.sync_message = '';\n if ($scope.sync_mode == 'simplified') {\n $scope.host = $scope.simplified_host.split(':')[0];\n $scope.port = parseInt($scope.simplified_host.split(':')[1]);\n }\n $scope.checking = true;\n _context.prev = 5;\n _context.next = 8;\n return Webmin.server.testSync({\n host: $scope.host,\n port: $scope.port\n });\n\n case 8:\n current = _context.sent;\n targetHost = [$scope.host, $scope.port].join(':');\n\n if (current) {\n $scope.remote_current = current;\n $scope.checked_host = targetHost;\n }\n UIUtils.toast('sync.ready.node.part1');\n $timeout(function () {\n if (!$scope.synchronizing) {\n UIUtils.toast('sync.ready.node.part2');\n }\n }, 6000);\n _context.next = 18;\n break;\n\n case 15:\n _context.prev = 15;\n _context.t0 = _context['catch'](5);\n\n $scope.sync_error = 'sync.error.unreachable.try.another.node';\n\n case 18:\n $scope.checking = false;\n return _context.abrupt('return', $scope.checked_host ? true : false);\n\n case 20:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[5, 15]]);\n }));\n };\n\n $scope.startSync = function () {\n $scope.down_percent = 0;\n $scope.apply_percent = 0;\n $scope.storage_percent = 0;\n $scope.sbx_percent = 0;\n $scope.peers_percent = 0;\n $scope.sync_failed = false;\n $scope.synchronizing = true;\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var sp, translatedErr;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return $translate('sync.started.node');\n\n case 2:\n _context2.t0 = _context2.sent;\n _context2.t1 = _context2.t0 + ' ';\n _context2.t2 = $scope.checked_host;\n $scope.sync_message = _context2.t1 + _context2.t2;\n sp = $scope.checked_host.split(':');\n _context2.next = 9;\n return $translate('err.sync.interrupted');\n\n case 9:\n translatedErr = _context2.sent;\n\n syncWS.on(undefined, function (data) {\n if (data.type == 'sync') {\n $scope.down_percent = 100;\n $scope.apply_percent = 100;\n $scope.storage_percent = 100;\n $scope.sbx_percent = 100;\n $scope.peers_percent = 100;\n $scope.sync_failed = data.value;\n var errorMessage = data.msg && (data.msg.message || data.msg);\n errorMessage = translatedErr + ' « ' + errorMessage + ' »';\n Webmin.server.republishNewSelfPeer().then(function () {\n return console.log('Peer republished');\n });\n if (data.value === true) {\n $state.go('index');\n } else {\n $state.go('error', { err: errorMessage });\n }\n } else {\n var changed = true;\n if (data.type == 'download' && $scope.down_percent != data.value) {\n $scope.down_percent = data.value;\n changed = true;\n }\n if (data.type == 'applied' && $scope.apply_percent != data.value) {\n $scope.apply_percent = data.value;\n changed = true;\n }\n if (data.type == 'saved' && $scope.storage_percent != data.value) {\n $scope.storage_percent = data.value;\n changed = true;\n }\n if (data.type == 'sandbox' && $scope.sbx_percent != data.value) {\n $scope.sbx_percent = data.value;\n changed = true;\n }\n if (data.type == 'peersSync' && $scope.peers_percent != data.value) {\n $scope.peers_percent = data.value;\n changed = true;\n }\n if (changed) {\n $scope.$apply();\n }\n }\n });\n _context2.next = 13;\n return Webmin.server.autoConfNetwork();\n\n case 13:\n localStorage.setItem(\"sync_host\", sp[0]);\n localStorage.setItem(\"sync_port\", sp[1]);\n Webmin.server.startSync({\n host: sp[0],\n port: sp[1],\n to: $scope.to,\n chunkLen: Math.max(500, Math.min(25, $scope.remote_current ? $scope.remote_current.number / 100 : 0))\n });\n\n case 16:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n };\n\n // Autostart\n if ($scope.host && $scope.port && $stateParams.sync) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var nodeOK;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return $scope.checkNode();\n\n case 2:\n nodeOK = _context3.sent;\n\n if (!nodeOK) {\n _context3.next = 5;\n break;\n }\n\n return _context3.abrupt('return', $scope.startSync());\n\n case 5:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n }\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $state, $http, $timeout, $interval, Webmin, uiModules, summary, UIUtils) {\n\n $scope.externalMenus = [];\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n var _loop = function _loop() {\n var moduleName = _step.value;\n\n var module = window.uiModules[moduleName];\n if (module) {\n $scope.externalMenus.push({\n menuOpen: function menuOpen() {\n return module.menuOpen(summary);\n },\n menuIconClass: module.menuIconClass,\n menuLabel: module.menuLabel\n });\n }\n };\n\n for (var _iterator = uiModules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n _loop();\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n $scope.notifications = {\n help: []\n };\n\n Waves.displayEffect();\n\n var isMobile = require('js/lib/mobileDetector');\n if (isMobile()) {\n $(\".button-collapse\").sideNav({\n menuWidth: 280\n });\n }\n\n UIUtils.changeTitle(summary.version, summary.parameters.currency, summary.conf.prefix);\n\n var aboutWin = void 0;\n\n $scope.showAbout = function () {\n if (aboutWin) {\n aboutWin.focus();\n } else {\n openWindow(window.location.origin + '/#/about', {\n position: 'center',\n height: 380,\n width: 510\n }, function (subwin) {\n subwin.window.gui = window.gui;\n subwin.on('closed', function () {\n aboutWin = null;\n mainWindow.focus();\n });\n aboutWin = subwin;\n });\n }\n };\n\n $scope.startServer = function () {\n $scope.server_stopped = false;\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.server.services.startAll();\n\n case 2:\n $scope.server_started = true;\n\n case 3:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n\n $scope.stopServer = function () {\n $scope.server_started = false;\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Webmin.server.services.stopAll();\n\n case 2:\n $scope.server_stopped = true;\n\n case 3:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n };\n\n $scope.restartServer = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return $scope.stopServer();\n\n case 2:\n _context3.next = 4;\n return $scope.startServer();\n\n case 4:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n };\n\n function checkUpdates() {\n var LATEST_RELEASE_URL = 'https://api.github.com/repos/duniter/duniter/releases/latest';\n co( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var latest, local_string_version, m, localVersion, localSuffix, isLocalAPreRelease, remoteVersion, localMajor, localMinor, localFix, remoteMajor, remoteMinor, remoteFix, newMajor, newMinor, newFix;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.prev = 0;\n _context4.next = 3;\n return $http.get(LATEST_RELEASE_URL);\n\n case 3:\n latest = _context4.sent;\n local_string_version = 'v' + summary.version;\n m = local_string_version.match(/^v([\\d.]+)([ab]?\\d*)/);\n localVersion = m && m[1] || \"\";\n localSuffix = m && m[2];\n isLocalAPreRelease = !!localSuffix;\n remoteVersion = latest.data.tag_name.substr(1);\n localMajor = parseInt(localVersion.split('.')[0]);\n localMinor = parseInt(localVersion.split('.')[1]);\n localFix = parseInt(localVersion.split('.')[2]);\n remoteMajor = parseInt(remoteVersion.split('.')[0]);\n remoteMinor = parseInt(remoteVersion.split('.')[1]);\n remoteFix = parseInt(remoteVersion.split('.')[2]);\n newMajor = remoteMajor > localMajor;\n newMinor = !newMajor && remoteMinor > localMinor;\n newFix = !newMinor && remoteFix > localFix;\n\n if (newMajor || newMinor || newFix || localVersion == remoteVersion && isLocalAPreRelease) {\n if ($scope.notifications.help.filter(function (entry) {\n return entry.message == 'help.new_version_available';\n }).length == 0) {\n $scope.notifications.help.push({\n icon: 'play_for_work',\n message: 'help.new_version_available',\n onclick: function onclick() {\n return openExternal('https://github.com/duniter/duniter/releases/latest');\n }\n });\n }\n }\n _context4.next = 25;\n break;\n\n case 22:\n _context4.prev = 22;\n _context4.t0 = _context4['catch'](0);\n\n console.error(_context4.t0);\n\n case 25:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this, [[0, 22]]);\n }));\n }\n\n $interval(checkUpdates, 1000 * 3600);\n $timeout(checkUpdates, 1000);\n};\n","\"use strict\";\n\nvar BLOCKS_COUNT = 40;\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $state, $timeout, Webmin, UIUtils, Graph) {\n\n var data = {};\n\n $scope.loading = true;\n $scope.blocksCount = $scope.blocksCount || BLOCKS_COUNT;\n\n $scope.$watch('withTime', function (newValue) {\n if (newValue) {\n timeGraph();\n }\n });\n\n $scope.$watch('withSpeed', function (newValue) {\n if (newValue) {\n speedGraph();\n }\n });\n\n $scope.$watch('withDifficulty', function (newValue) {\n if (newValue) {\n diffGraph();\n }\n });\n\n $scope.updateGraphs = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var summary, parameters, blocks, speeds, accelerations, medianTimeIncrements, actualDurations, BY_HOUR, i, len, block, acc, previousPos, j, availPreviousBlocks, localAvgSpeed, realDuration, graphs, _i, _len;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.summary();\n\n case 2:\n summary = _context.sent;\n _context.next = 5;\n return Webmin.currency.parameters();\n\n case 5:\n parameters = _context.sent;\n _context.next = 8;\n return Webmin.blockchain.blocks({\n count: $scope.blocksCount,\n from: Math.max(0, summary.current.number - $scope.blocksCount)\n });\n\n case 8:\n blocks = _context.sent;\n speeds = [], accelerations = [], medianTimeIncrements = [], actualDurations = [];\n BY_HOUR = 3600;\n\n for (i = 0, len = blocks.length; i < len; i++) {\n block = blocks[i];\n acc = 0;\n previousPos = Math.max(0, i - parameters.dtDiffEval);\n\n for (j = previousPos; j < i; j++) {\n acc += blocks[j + 1].medianTime - blocks[j].medianTime;\n }\n availPreviousBlocks = i - 1 - previousPos;\n localAvgSpeed = acc / (availPreviousBlocks || 1);\n realDuration = !isNaN(localAvgSpeed) && localAvgSpeed != 0 ? localAvgSpeed : parameters.avgGenTime;\n\n actualDurations.push(parseFloat(realDuration.toFixed(2)));\n speeds.push(parseFloat((BY_HOUR / realDuration).toFixed(2)));\n accelerations.push(block.time - block.medianTime);\n medianTimeIncrements.push(block.medianTime - (i ? blocks[i - 1].medianTime : block.medianTime));\n }\n data.summary = summary;\n data.speeds = speeds;\n data.accelerations = accelerations;\n data.medianTimeIncrements = medianTimeIncrements;\n data.actualDurations = actualDurations;\n data.minSpeeds = speeds.map(function () {\n return parseFloat((BY_HOUR / Math.ceil(parameters.avgGenTime * Math.sqrt(1.066))).toFixed(2));\n });\n data.maxSpeeds = speeds.map(function () {\n return parseFloat((BY_HOUR / Math.floor(parameters.avgGenTime / Math.sqrt(1.066))).toFixed(2));\n });\n data.minDurations = speeds.map(function () {\n return parseFloat((parameters.avgGenTime / 1.066).toFixed(2));\n });\n data.maxDurations = speeds.map(function () {\n return parseFloat((parameters.avgGenTime * 1.066).toFixed(2));\n });\n data.difficulties = blocks.map(function (b) {\n return b.powMin;\n });\n\n graphs = [];\n\n if ($scope.withTime) graphs.push(timeGraph);\n if ($scope.withSpeed) graphs.push(speedGraph);\n if ($scope.withDifficulty) graphs.push(diffGraph);\n for (_i = 0, _len = graphs.length; _i < _len; _i++) {\n graphs[_i]();\n }\n $scope.loading = false;\n\n case 28:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n\n function timeGraph() {\n if ($scope.withTime) {\n Graph.timeGraphs('#timeGraph', Math.max(0, data.summary.current.number - $scope.blocksCount + 1), data.accelerations, data.medianTimeIncrements, data.actualDurations, data.minDurations, data.maxDurations);\n }\n }\n\n function speedGraph() {\n if ($scope.withSpeed) {\n Graph.speedGraph('#speedGraph', Math.max(0, data.summary.current.number - $scope.blocksCount), data.speeds, data.minSpeeds, data.maxSpeeds, function (series) {\n $scope.series = series;\n });\n }\n }\n\n function diffGraph() {\n if ($scope.withDifficulty) {\n Graph.difficultyGraph('#difficultyGraph', Math.max(0, data.summary.current.number - $scope.blocksCount), data.difficulties);\n }\n }\n\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return $scope.updateGraphs();\n\n case 2:\n $scope.withTime = true;\n $scope.withDifficulty = true;\n $scope.$apply();\n\n case 5:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, UIUtils) {\n\n UIUtils.enableTabs();\n\n $scope.$parent.menu = 'graphs';\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, UIUtils) {\n\n UIUtils.enableTabs();\n\n $scope.$parent.menu = 'home';\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, Webmin, heads, info, conf, ws) {\n\n $scope.discriminateNodes = function (info) {\n info.connections.level1.concat(info.connections.level2).forEach(function (c) {\n c.prefered = (conf.preferedNodes || []).indexOf(c.pubkey) !== -1;\n c.privileged = (conf.privilegedNodes || []).indexOf(c.pubkey) !== -1;\n });\n return info;\n };\n\n $scope.info = $scope.discriminateNodes(info);\n $scope.heads = [];\n\n var headsMap = {};\n\n $scope.headsIntoMap = function (heads) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = heads[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var value = _step.value;\n\n var sp = value.message.split(':');\n var api = sp[0];\n var pubkey = sp[3];\n var blockstamp = sp[4];\n var ws2pId = sp[5];\n var software = sp[6];\n var softVersion = sp[7];\n var prefix = sp[8];\n var uid = value.uid;\n var freeRooms = \"\";\n var step = \"\";\n // Gestion des anciens formats\n console.log(value.message);\n if (value.messageV2 && value.messageV2.match(/:2:/)) {\n // HEAD V2\n freeRooms = value.freeRooms;\n step = value.step;\n } else if (value.message.match(/:1:/)) {\n // HEAD v1\n } else {\n // HEAD v0\n pubkey = sp[2];\n blockstamp = sp[3];\n }\n var ws2pFullId = pubkey + \"-\" + ws2pId;\n headsMap[ws2pFullId] = {\n api: api, blockstamp: blockstamp, uid: uid, ws2pId: ws2pId, software: software, softVersion: softVersion, prefix: prefix, freeRooms: freeRooms, step: step\n };\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n $scope.heads = Object.keys(headsMap).map(function (k) {\n return {\n pubkey: k,\n api: headsMap[k].api,\n uid: headsMap[k].uid,\n blockstamp: headsMap[k].blockstamp,\n ws2pId: headsMap[k].ws2pId,\n software: headsMap[k].software,\n softVersion: headsMap[k].softVersion,\n prefix: headsMap[k].prefix,\n freeRooms: headsMap[k].freeRooms,\n step: headsMap[k].step\n };\n });\n };\n\n $scope.headsIntoMap(heads);\n\n ws.on('ws2p', function (obj) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (obj.value.ws2p === 'heads') {\n $scope.headsIntoMap(obj.value.added);\n } else if (obj.value.ws2p === 'connected' || obj.value.ws2p === 'disconnected') {\n co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.t0 = $scope;\n _context.next = 3;\n return Webmin.network.ws2p.info();\n\n case 3:\n _context.t1 = _context.sent;\n $scope.info = _context.t0.discriminateNodes.call(_context.t0, _context.t1);\n\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n }\n $scope.$apply();\n\n case 2:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n });\n\n var co = require('co');\n\n $scope.update = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var delayP;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n $scope.searching = true;\n delayP = Q.delay(500);\n _context3.next = 4;\n return Webmin.network.peers();\n\n case 4:\n $scope.peers = _context3.sent.peers;\n _context3.next = 7;\n return delayP;\n\n case 7:\n $scope.searching = false;\n $scope.$apply();\n\n case 9:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n };\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, Webmin, peers) {\n\n $scope.peers = peers.peers;\n\n var co = require('co');\n\n $scope.update = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var delayP;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n $scope.searching = true;\n delayP = Q.delay(500);\n _context.next = 4;\n return Webmin.network.peers();\n\n case 4:\n $scope.peers = _context.sent.peers;\n _context.next = 7;\n return delayP;\n\n case 7:\n $scope.searching = false;\n $scope.$apply();\n\n case 9:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, $interval, Webmin, UIUtils, summary, ws) {\n\n UIUtils.enableTabs();\n var co = require('co');\n var moment = require('moment');\n\n $scope.$parent.isStarted = false;\n $scope.connected_ws2p_peers = 0;\n\n $scope.updateInfo = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var info, map, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, level1, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, level2;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.network.ws2p.info();\n\n case 2:\n info = _context.sent;\n map = {};\n _iteratorNormalCompletion = true;\n _didIteratorError = false;\n _iteratorError = undefined;\n _context.prev = 7;\n\n for (_iterator = info.connections.level1[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n level1 = _step.value;\n\n map[level1.pubkey] = true;\n }\n _context.next = 15;\n break;\n\n case 11:\n _context.prev = 11;\n _context.t0 = _context['catch'](7);\n _didIteratorError = true;\n _iteratorError = _context.t0;\n\n case 15:\n _context.prev = 15;\n _context.prev = 16;\n\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n\n case 18:\n _context.prev = 18;\n\n if (!_didIteratorError) {\n _context.next = 21;\n break;\n }\n\n throw _iteratorError;\n\n case 21:\n return _context.finish(18);\n\n case 22:\n return _context.finish(15);\n\n case 23:\n _iteratorNormalCompletion2 = true;\n _didIteratorError2 = false;\n _iteratorError2 = undefined;\n _context.prev = 26;\n for (_iterator2 = info.connections.level2[Symbol.iterator](); !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n level2 = _step2.value;\n\n map[level2.pubkey] = true;\n }\n _context.next = 34;\n break;\n\n case 30:\n _context.prev = 30;\n _context.t1 = _context['catch'](26);\n _didIteratorError2 = true;\n _iteratorError2 = _context.t1;\n\n case 34:\n _context.prev = 34;\n _context.prev = 35;\n\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n\n case 37:\n _context.prev = 37;\n\n if (!_didIteratorError2) {\n _context.next = 40;\n break;\n }\n\n throw _iteratorError2;\n\n case 40:\n return _context.finish(37);\n\n case 41:\n return _context.finish(34);\n\n case 42:\n $scope.connected_ws2p_peers = Object.keys(map).length;\n\n case 43:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[7, 11, 15, 23], [16,, 18, 22], [26, 30, 34, 42], [35,, 37, 41]]);\n }));\n };\n\n bindBlockWS(function () {\n $scope.loadPowData();\n });\n var M = summary.current.monetaryMass || 0;\n // const nbUDperYear = Math.ceil(365.25 * 3600 * 24 / summary.parameters.dt);\n // const globalC = Math.round(Math.pow(1 + summary.parameters.c, nbUDperYear) * 100) / 100 - 1;\n var UD = summary.parameters.ud0;\n if (summary.lastUDBlock) {\n var N = summary.current.membersCount;\n UD = parseInt(Math.round(summary.lastUDBlock.dividend * Math.pow(10, summary.lastUDBlock.unitbase)));\n }\n $scope.current = summary.current;\n $scope.current_currency = summary.current.currency;\n $scope.current_number = summary.current.number;\n $scope.current_membersCount = summary.current.membersCount;\n $scope.current_medianTime = summary.current.medianTime;\n $scope.current_powMin = summary.current.powMin;\n $scope.monetaryMass = parseInt(M / UD) || 0;\n $scope.server_started = true;\n $scope.server_stopped = false;\n $scope.phones = [];\n $scope.abc = 'abcdef';\n $scope.newIdentities = 2;\n\n $(\".dropdown-button\").dropdown({ constrainwidth: false });\n\n $scope.lastNearPoW = '';\n $scope.totalPoW = '...';\n $scope.sync_state = 'home.pulling.state.unkown';\n $scope.network_percent = 0;\n $scope.peer_percent = 0;\n $scope.has_pulled = false;\n $scope.is_pulling = false;\n $scope.last_pulling = 0;\n var start_block = 0;\n\n $interval(function () {\n if ($scope.last_pulling) {\n $scope.sync_state = $scope.is_pulling ? 'home.pulling.state.syncing' : 'home.pulling.state.synced';\n $scope.sync_time = moment($scope.last_pulling).fromNow();\n }\n }, 1000);\n\n $scope.loadPowData = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var res;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Webmin.powSummary();\n\n case 2:\n res = _context2.sent;\n\n $scope.pow_total = res.total;\n $scope.pow_mirror = res.mirror;\n $scope.pow_waiting = res.waiting;\n\n case 6:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n };\n\n ws.on(undefined, function (data) {\n if (data.type === 'started') {\n $scope.server_started = true;\n $scope.server_stopped = false;\n bindBlockWS(function () {\n $scope.loadPowData();\n });\n UIUtils.toast('general.server.started');\n $scope.$apply();\n }\n if (data.type === 'already_started') {\n $scope.server_started = true;\n $scope.server_stopped = false;\n bindBlockWS(function () {\n $scope.loadPowData();\n });\n $scope.$apply();\n }\n if (data.type === 'stopped') {\n $scope.server_stopped = true;\n $scope.server_started = false;\n UIUtils.toast('general.server.stopped');\n $scope.$apply();\n }\n if (data.type === 'pulling') {\n $scope.is_pulling = true;\n $scope.has_pulled = true;\n var event = data.value;\n if ($scope.last_pulling && event.type === 'start' || !$scope.last_pulling && event.type !== 'end') {\n $scope.last_pulling = moment();\n }\n if (event.type === 'peer') {\n $scope.network_percent = parseInt((event.data.number + 1) / event.data.length * 100);\n $scope.peer_percent = 100;\n start_block = 0;\n }\n if (event.type === 'applying') {\n if (!start_block) {\n start_block = event.data.number;\n }\n var total = event.data.last - start_block;\n var doneCount = event.data.number - start_block;\n $scope.peer_percent = parseInt(doneCount / total * 100);\n }\n if (event.type === 'end') {\n $scope.is_pulling = false;\n $scope.network_percent = 0;\n $scope.peer_percent = 0;\n start_block = 0;\n }\n }\n if (data.type === 'pow') {\n var pow = data.value;\n if (pow.found) {\n $scope.pow_waiting = true;\n $scope.lastNearPoW = '#' + pow.hash;\n $scope.$apply();\n } else {\n $scope.pow_waiting = false;\n $scope.lastNearPoW = '#' + pow.hash;\n $scope.$apply();\n }\n }\n if (data.type === 'ws2p') {\n if (data.value.ws2p === 'connected' || data.value.ws2p === 'disconnected') {\n co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return $scope.updateInfo();\n\n case 2:\n $scope.$apply();\n\n case 3:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n }\n }\n });\n\n function bindBlockWS(cb) {\n Webmin.wsBlock().on(undefined, function (block) {\n $scope.current_currency = block.currency;\n $scope.current_number = block.number;\n $scope.current_membersCount = block.membersCount;\n $scope.current_medianTime = block.medianTime;\n $scope.current_powMin = block.powMin;\n var M = summary.current.monetaryMass || 0;\n var UD = summary.parameters.ud0;\n if (summary.lastUDBlock) {\n var _N = summary.current.membersCount;\n UD = parseInt(Math.round(summary.lastUDBlock.dividend * Math.pow(10, summary.lastUDBlock.unitbase)));\n }\n $scope.monetaryMass = parseInt(M / UD) || 0;\n $scope.$apply();\n cb && cb();\n });\n }\n\n $scope.reconfigure_network = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var delay, netinferfaces, conf;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n $scope.reconfiguring = true;\n delay = Q.delay(1000);\n _context4.prev = 2;\n _context4.next = 5;\n return Webmin.network.interfaces();\n\n case 5:\n netinferfaces = _context4.sent;\n conf = {};\n\n conf.local_ipv4 = netinferfaces.auto.local.ipv4 || '';\n conf.local_ipv6 = netinferfaces.auto.local.ipv6 || '';\n conf.remote_ipv4 = netinferfaces.auto.remote.ipv4 || '';\n conf.remote_ipv6 = netinferfaces.auto.remote.ipv6 || '';\n conf.lport = netinferfaces.auto.local.port || 9330;\n conf.rport = netinferfaces.auto.remote.port || 9330;\n conf.upnp = netinferfaces.auto.remote.upnp || false;\n conf.dns = netinferfaces.auto.remote.dns || '';\n _context4.next = 17;\n return Webmin.server.netConf({\n conf: conf\n });\n\n case 17:\n _context4.next = 19;\n return delay;\n\n case 19:\n $scope.should_reconfigure = false;\n UIUtils.toast('general.network.reconf_ok');\n $scope.$apply();\n _context4.next = 30;\n break;\n\n case 24:\n _context4.prev = 24;\n _context4.t0 = _context4['catch'](2);\n _context4.next = 28;\n return delay;\n\n case 28:\n $scope.reconfiguring = false;\n $scope.$apply();\n\n case 30:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this, [[2, 24]]);\n }));\n };\n\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n var reachable;\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n _context5.next = 2;\n return $scope.startServer();\n\n case 2:\n _context5.prev = 2;\n\n $scope.updateInfo();\n _context5.next = 6;\n return $scope.loadPowData();\n\n case 6:\n _context5.next = 8;\n return Webmin.isNodePubliclyReachable();\n\n case 8:\n reachable = _context5.sent;\n\n if (!reachable || !reachable.success) {\n $scope.should_reconfigure = true;\n }\n _context5.next = 15;\n break;\n\n case 12:\n _context5.prev = 12;\n _context5.t0 = _context5['catch'](2);\n\n console.log(_context5.t0);\n\n case 15:\n case 'end':\n return _context5.stop();\n }\n }\n }, _callee5, this, [[2, 12]]);\n }));\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $http, $state, $location, Webmin, UIUtils) {\n\n UIUtils.enableTabs();\n\n $scope.$parent.conf = $scope.$parent.conf || {};\n $scope.$parent.menu = 'settings';\n\n $(\".dropdown-button\").dropdown({ constrainwidth: false });\n\n $scope.fullReset = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.server.services.stopAll();\n\n case 2:\n _context.next = 4;\n return Webmin.server.resetData();\n\n case 4:\n $state.go('index');\n\n case 5:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, Importer, Webmin) {\n\n $scope.export_link = Webmin.getExportURL();\n\n Importer($scope);\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $http, $state, $timeout, UIUtils, summary, Webmin) {\n\n $scope.cpuPower = parseInt(summary.conf.cpu * 100);\n\n $scope.updateCPUpower = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n $scope.savingCPU = true;\n _context.next = 3;\n return Webmin.server.cpuConf({\n cpu: parseFloat(($scope.cpuPower / 100).toFixed(2))\n });\n\n case 3:\n UIUtils.toast('settings.cpu.saved');\n $scope.savingCPU = false;\n\n case 5:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, conf, UIUtils) {\n\n $scope.$parent.conf = conf;\n\n UIUtils.enableInputs();\n $('input').attr('disabled', 'disabled');\n};\n","\"use strict\";\n\nvar co = require('co');\nvar Peer = require('js/lib/entity/peer');\n\nmodule.exports = function ($scope, $http, $state, Webmin, peers) {\n\n $scope.peers = peers.map(function (peer) {\n var p = new Peer(peer);\n return {\n name: [p.getURL(), \"(\" + p.pubkey.slice(0, 6) + \")\"].join(' '),\n host_port: [p.getHost(), p.getPort()].join('|')\n };\n });\n\n $scope.resetNode = function () {\n $('#modalReset').openModal();\n };\n\n $scope.resetNodeAndSync = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var sp;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.server.services.stopAll();\n\n case 2:\n _context.next = 4;\n return Webmin.server.resetData();\n\n case 4:\n sp = $scope.remote_host.split('|');\n\n $state.go('sync', {\n host: sp[0],\n port: sp[1],\n sync: true\n });\n\n case 6:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, $state, Webmin, summary, PubkeyGenerator) {\n\n $scope.pubkey = summary.pubkey;\n\n setTimeout(function () {\n $('select').material_select();\n }, 500);\n\n $scope.accept = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.server.keyConf({\n conf: $scope.$parent.conf\n });\n\n case 2:\n $scope.$parent.conf.idty_entropy = '';\n $scope.$parent.conf.idty_password = '';\n $state.reload();\n $scope.restartServer();\n\n case 6:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n\n PubkeyGenerator($scope);\n};\n","\"use strict\";\n\nmodule.exports = function ($scope, ws, UIUtils) {\n\n UIUtils.enableTabs();\n\n var co = require('co');\n var _ = require('underscore');\n\n // Default values\n if (!localStorage.getItem('log_error')) localStorage.setItem('log_error', true);\n if (!localStorage.getItem('log_warn')) localStorage.setItem('log_warn', true);\n if (!localStorage.getItem('log_info')) localStorage.setItem('log_info', true);\n\n $scope.logsSize = parseInt(localStorage.getItem('log_size')) || 100;\n $scope.logs = _.range(0, $scope.logsSize).map(function () {\n return \"\";\n });\n $scope.logsString = \"\";\n $scope.follow = true;\n $scope.levels = {\n error: localStorage.getItem('log_error') == \"true\",\n warn: localStorage.getItem('log_warn') == \"true\",\n info: localStorage.getItem('log_info') == \"true\",\n debug: localStorage.getItem('log_debug') == \"true\",\n trace: localStorage.getItem('log_trace') == \"true\"\n };\n\n _.keys($scope.levels).map(function (level) {\n $scope.$watch('levels.' + level, function (newValue) {\n localStorage.setItem('log_' + level, newValue);\n $scope.logs.splice(0, $scope.logs.length);\n ws.send();\n });\n });\n\n $scope.$watch('logsSize', function (newValue) {\n localStorage.setItem('log_size', newValue);\n addLogs({ value: [] }, true);\n });\n\n ws.on('log', addLogs);\n\n function addLogs(res, autoDigest) {\n\n if (!$scope.pause) {\n var newlogs = _.filter(res.value, function (log) {\n return $scope.levels[log.level];\n });\n // Add at max LOGS_FLOW_SIZE new lines\n newlogs.splice(0, Math.max(0, newlogs.length - $scope.logsSize));\n // Add just enough space for incoming logs\n $scope.logs.splice(0, Math.max(0, $scope.logs.length + newlogs.length - $scope.logsSize));\n for (var i = 0, len = newlogs.length; i < len; i++) {\n var log = newlogs[i];\n $scope.logs.push(log);\n }\n if (!autoDigest) {\n $scope.$apply();\n }\n }\n\n if ($scope.follow) {\n var elem = document.getElementById('logs');\n if (elem) {\n elem.scrollTop = elem.scrollHeight;\n }\n }\n }\n\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return ws.whenOpened();\n\n case 2:\n ws.send();\n\n case 3:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n};\n","\"use strict\";\n\nvar co = require('co');\n\nmodule.exports = function ($scope, Webmin) {\n\n $scope.generating = false;\n $scope.error = '';\n\n $scope.shareLogs = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var res;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if ($scope.generating) {\n _context.next = 14;\n break;\n }\n\n _context.prev = 1;\n\n $scope.error = '';\n $scope.generating = true;\n _context.next = 6;\n return Webmin.logsExport(2000);\n\n case 6:\n res = _context.sent;\n\n $scope.link = res.link;\n _context.next = 13;\n break;\n\n case 10:\n _context.prev = 10;\n _context.t0 = _context['catch'](1);\n\n $scope.error = _context.t0 && _context.t0.message || _context.t0 || 'Unknown error';\n\n case 13:\n $scope.generating = false;\n\n case 14:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[1, 10]]);\n }));\n };\n};\n","\"use strict\";\n\nvar co = require('co');\nvar _ = require('underscore');\n\nmodule.exports = function ($scope, $http, $state, $interval, $timeout, UIUtils, summary, Webmin, allModules, hasAccess) {\n\n var interval = void 0;\n $scope.hasAccess = hasAccess.hasAccess;\n $scope.module_to_install = '';\n $scope.installing = false;\n\n $scope.showWarning = function () {\n return $scope.warningShown = true;\n };\n $scope.hideWarning = function () {\n return $scope.warningShown = false;\n };\n\n $scope.modules = modulesTransform(allModules);\n\n $scope.switchModule = function (mod) {\n $scope.modules.map(function (m) {\n return m.disabled = true;\n });\n mod.installing = !mod.installing;\n Webmin.plugin.removePackage(mod.name);\n $scope.checkModulesInstallation();\n };\n\n $scope.installModule = function () {\n var pkg = $scope.module_to_install;\n if (!(pkg.match(/^.+@(~||\\^)?\\d+\\.\\d+\\.\\d+$/) || pkg.match(/^file:\\/\\//) || pkg.match(/^https?:\\/\\/.+\\.(tar\\.gz|tgz)$/) || pkg.match(/^git(\\+ssh|\\+http|\\+https)?:\\/\\/.+\\.git$/))) {\n UIUtils.toast('settings.modules.wrong_package_source');\n return;\n }\n $scope.modules.map(function (m) {\n return m.disabled = true;\n });\n co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var res;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.plugin.addPackage($scope.module_to_install);\n\n case 2:\n res = _context.sent;\n\n if (res.success) {\n $scope.modules.push({\n fullName: $scope.module_to_install,\n disabled: true,\n installing: true,\n installed: true\n });\n $scope.installing = true;\n $scope.checkModulesInstallation();\n } else {\n $scope.modules = modulesTransform(allModules);\n if (res.error === 1) {\n UIUtils.toast('settings.modules.already_install');\n } else if (res.error === 2) {\n UIUtils.toast('settings.modules.path_does_not_exist');\n } else {\n UIUtils.toast('settings.modules.unknown_error');\n }\n }\n\n case 4:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n\n $scope.checkModulesInstallation = function () {\n interval = $interval(function () {\n Webmin.plugin.allModules().then(function (modules) {\n var initialModulesNames = _.pluck(allModules, 'name');\n var newModulesNames = _.pluck(modules, 'name');\n var added = _.difference(newModulesNames, initialModulesNames);\n var removed = _.difference(initialModulesNames, newModulesNames);\n if (added.length || removed.length) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = added[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var addedName = _step.value;\n\n UIUtils.toastRaw('Installed module \\'' + addedName + '\\'');\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = removed[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var removedName = _step2.value;\n\n UIUtils.toastRaw('Removed module \\'' + removedName + '\\'');\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n allModules = modules;\n $scope.modules = modulesTransform(modules);\n $scope.installing = false;\n $interval.cancel(interval);\n $scope.notifications.help.push({\n icon: 'loop',\n message: 'help.restart_required',\n onclick: function onclick() {\n return UIUtils.toast('help.restart_required.message');\n }\n });\n }\n });\n }, 1500);\n };\n\n function modulesTransform(modules) {\n return modules.map(function (m) {\n return {\n name: m.name,\n fullName: [m.name, m.version].join('@'),\n locked: m.locked,\n disabled: !$scope.hasAccess || m.locked,\n installing: false,\n installed: true\n };\n });\n }\n};\n","\"use strict\";\n\nvar co = require('co');\nvar conf = require('js/lib/conf/conf');\n\nmodule.exports = function ($scope, $http, $state, Webmin, UIUtils, netinterfaces, firstConf) {\n\n var autoconf = netinterfaces.auto;\n\n $scope.autoconfig = function () {\n $scope.$parent.conf.local_ipv4 = autoconf.local.ipv4 || '';\n $scope.$parent.conf.local_ipv6 = autoconf.local.ipv6 || '';\n $scope.$parent.conf.remote_ipv4 = autoconf.remote.ipv4 || '';\n $scope.$parent.conf.remote_ipv6 = autoconf.remote.ipv6 || '';\n $scope.$parent.conf.lport = autoconf.local.port || $scope.$parent.conf.lport;\n $scope.$parent.conf.rport = autoconf.remote.port || $scope.$parent.conf.rport;\n $scope.$parent.conf.upnp = autoconf.remote.upnp || $scope.$parent.conf.upnp;\n $scope.$parent.conf.dns = autoconf.remote.dns || $scope.$parent.conf.dns;\n\n if (conf.dev_autoconf && firstConf) {\n $state.go('configure.create.root');\n }\n };\n\n $scope.local_neti = toArrayOfAddresses(netinterfaces.local);\n $scope.remote_neti = toArrayOfAddresses(netinterfaces.remote);\n\n $scope.$parent.conf = $scope.$parent.conf || {};\n $scope.$parent.conf.ws2p = netinterfaces.conf.ws2p;\n $scope.$parent.conf.proxiesConf = netinterfaces.conf.proxiesConf;\n $scope.$parent.conf.bma = !netinterfaces.conf.nobma;\n $scope.$parent.conf.local_ipv4 = netinterfaces.conf.local.ipv4;\n $scope.$parent.conf.local_ipv6 = netinterfaces.conf.local.ipv6;\n $scope.$parent.conf.remote_ipv4 = netinterfaces.conf.remote.ipv4;\n $scope.$parent.conf.remote_ipv6 = netinterfaces.conf.remote.ipv6;\n $scope.$parent.conf.lport = netinterfaces.conf.local.port;\n $scope.$parent.conf.rport = netinterfaces.conf.remote.port;\n $scope.$parent.conf.upnp = netinterfaces.conf.remote.upnp;\n $scope.$parent.conf.dns = netinterfaces.conf.remote.dns;\n\n UIUtils.enableInputs();\n\n if (firstConf) {\n $scope.$parent.conf.lport = conf.default_port;\n $scope.$parent.conf.rport = conf.default_port;\n // Trigger autoconfig\n $scope.autoconfig();\n }\n\n $scope.saveConf = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n $scope.$parent.conf.remote_ipv6 = $scope.$parent.conf.local_ipv6;\n _context.next = 3;\n return Webmin.server.netConf({\n conf: $scope.$parent.conf\n });\n\n case 3:\n UIUtils.toast('settings.network.saved');\n\n case 4:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n };\n};\n\nfunction toArrayOfAddresses(netiScope) {\n return netiScope.reduce(function (arr, neti) {\n return arr.concat(neti.addresses.map(function (addr) {\n return {\n name: [neti.name, addr.address].join(' '),\n addr: addr.address,\n family: addr.family\n };\n }));\n }, []);\n}\n","'use strict';\n\nmodule.exports = function () {\n\n window.uiModules = {};\n\n require('./services/webmin')(angular);\n\n var duniterApp = angular.module('duniterUIApp', ['ui.router', 'homeControllers', 'pascalprecht.translate']);\n\n duniterApp.config(['$compileProvider', function ($compileProvider) {\n return $compileProvider.aHrefSanitizationWhitelist(/^\\s*(https?|data):/);\n }]);\n\n require('./lib/conf/translate')(duniterApp);\n require('./lib/conf/routes')(duniterApp);\n require('js/services/datetime')(duniterApp);\n require('js/services/ui_utils')(duniterApp);\n require('js/services/graphs')(duniterApp);\n require('js/services/pubkeyGenerator')(duniterApp);\n require('js/services/importer')(duniterApp);\n require('js/services/base58')(duniterApp);\n\n window.duniterChildCallback = function (gui) {\n window.gui = gui;\n };\n\n window.onresize = function () {\n window.onResize && window.onResize(window);\n };\n\n window.openWindow = function openWindow(url, options, callback) {\n if (window.gui) {\n // Duniter Desktop\n window.gui.Window.open(url, options, callback);\n } else {\n // Browser\n var innerHeight = options.height || 375;\n var innerWidth = options.width || 500;\n window.open(url, '_blank ', ['top=' + (window.screenTop + (options.top || 200)), 'left=' + (window.screenLeft + (options.left || 200)), 'height=' + (innerHeight + 8), 'width=' + (innerWidth + 16), 'menubar=no', 'status=no'].join(','));\n }\n };\n\n window.openNewTab = function openWindow(url, options, callback) {\n if (window.gui) {\n // Duniter Desktop\n window.gui.Window.open(url, options, callback);\n } else {\n // Browser\n window.open(url, '_blank ');\n }\n };\n\n window.openModule = function openWindow(path, options, callback) {\n var url = window.location.origin + '/modules' + path;\n if (window.gui) {\n // Duniter Desktop\n window.gui.Window.open(url, options, callback);\n } else {\n // Browser\n window.open(url, '_blank ');\n }\n };\n\n window.openExternal = function openExternal(url) {\n if (window.gui) {\n window.gui.Shell.openExternal(url);\n } else {\n window.open(url, '_blank');\n }\n };\n\n var homeControllers = angular.module('homeControllers', ['duniter.services.webmin', 'ngFileUpload']);\n\n homeControllers.controller('IndexController', require('./controllers/IndexController'));\n homeControllers.controller('AboutController', require('./controllers/AboutController'));\n homeControllers.controller('IdentityController', require('./controllers/init/create/IdentityController'));\n homeControllers.controller('ParametersController', require('./controllers/init/create/ParametersController'));\n homeControllers.controller('RootBlockController', require('./controllers/init/create/RootBlockController'));\n homeControllers.controller('SyncController', require('./controllers/init/sync/SyncController'));\n homeControllers.controller('MainController', require('./controllers/main/MainController'));\n homeControllers.controller('HomeController', require('./controllers/main/home/HomeController'));\n homeControllers.controller('OverviewController', require('./controllers/main/home/tabs/OverviewController'));\n homeControllers.controller('HomeNetworkController', require('./controllers/main/home/tabs/HomeNetworkController'));\n homeControllers.controller('HomeConnectionsController', require('./controllers/main/home/tabs/HomeConnectionsController'));\n homeControllers.controller('LogsController', require('./controllers/main/settings/tabs/LogsController'));\n homeControllers.controller('LogsSettingsController', require('./controllers/main/settings/tabs/LogsSettingsController'));\n homeControllers.controller('NetworkController', require('./controllers/main/settings/tabs/NetworkController'));\n homeControllers.controller('SettingsController', require('./controllers/main/settings/SettingsController'));\n homeControllers.controller('DataController', require('./controllers/main/settings/tabs/DataController'));\n homeControllers.controller('BackupController', require('./controllers/main/settings/tabs/BackupController'));\n homeControllers.controller('CPUController', require('./controllers/main/settings/tabs/CPUController'));\n homeControllers.controller('CurrencyController', require('./controllers/main/settings/tabs/CurrencyController'));\n homeControllers.controller('KeyController', require('./controllers/main/settings/tabs/KeyController'));\n homeControllers.controller('ModulesController', require('./controllers/main/settings/tabs/ModulesController'));\n homeControllers.controller('GraphsController', require('./controllers/main/graphs/GraphsController'));\n homeControllers.controller('GraphsBlockchainController', require('./controllers/main/graphs/GraphsBlockchainController'));\n};\n","\"use strict\";\n\nmodule.exports = {\n\n init: function init() {\n\n // Hack since Node v5\n try {\n window.jade = require('jade' + '/' + 'runtime');\n } catch (e) {}\n\n console.log('Configuring Angular app...');\n\n require('./app.config')();\n\n console.log('App initialized.');\n }\n};\n","\"use strict\";\n\nmodule.exports = {\n server: \"\", // Empty server will use the browser current host\n port: \"\", // Empty port will use the browser current port\n default_port: 9220,\n dev_autoconf: false,\n api_timeout: 10000 // 10 sec timeout\n};\n","module.exports = {\n \"top.menu.overview\": \"Home\",\n \"top.menu.data\": \"Explore\",\n \"top.menu.settings\": \"Settings\",\n \"top.menu.wallet\": \"Wallet\",\n \"general.server.started\": \"Server started\",\n \"general.server.stopped\": \"Server stopped\",\n \"general.choose_option\": \"Choose your option\",\n \"general.network.reconf_ok\": \"Reconfiguration success\",\n \"global.button.validate\": \"Validate\",\n \"global.button.start\": \"Start\",\n \"err.unknown\": \"Unknown error\",\n \"err.connection\": \"Could not connect to node\",\n \"err.back_index\": \"Get back to previous screen\",\n \"err.sync.interrupted\": \"Sync interrupted because the following error occured:\",\n \"index.message.loading\": \"Loading...\",\n \"crypto.secret_key\": \"Secret key\",\n \"index.message.current_block\": \"Current block {{ number }}\",\n \"configuration.init.choose.title\": \"Initialization\",\n \"configuration.init.choose.message\": \"Your software has to be initialized. You may either connect to an existing one or restore a backup file.\",\n \"configuration.init.choose.create\": \"Create a new currency\",\n \"configuration.init.choose.connect\": \"Connect to an existing currency\",\n \"configuration.init.choose.import\": \"Import from a backup file\",\n \"configuration.create_currency.cancel\": \"Cancel & go home\",\n \"configuration.create_uid.title\": \"Your identity\",\n \"configuration.create_uid.message\": \"As a first step, you need to define your personal, unique identity.<br/>The following informations will be <strong>definitive</strong> for this currency: please choose them carefully.\",\n \"configuration.create_uid.uid.tooltip\": \"The name you will be known as.\",\n \"configuration.create_uid.entropy.tooltip\": \"An entropy source to make your key unique: an e-mail, a phone n°, ...\",\n \"configuration.create_uid.password.tooltip\": \"A secret password to protect your key.\",\n \"configuration.create_uid.create_button\": \"Continue\",\n \"configuration.create_uid.preview_button\": \"Preview pubkey\",\n \"configuration.create_uid.nrp_algo_choose\": \"NRP algorithm\",\n \"configuration.create_uid.nrp_algo_choose_1\": \"N = 4096 ; r = 16 ; p = 1\",\n \"configuration.create_uid.modal_title\": \"Identity confirmation\",\n \"configuration.create_uid.modal_message\": \"This identity will be definitive for this currency: you will be known by your User ID and will be able to access your account using your Secret Key and Password values.\",\n \"configuration.create_uid.modal_agree\": \"Agree\",\n \"configuration.create_uid.modal_disagree\": \"Disagree\",\n \"configuration.create_uid.modal_preview_title\": \"Preview of pubkey\",\n \"configuration.create_uid.modal_preview_ok\": \"OK\",\n \"configuration.ws2p.private\": \"Enable WS2P Private access\",\n \"configuration.ws2p.private.desc\": \"<b>Strongly recommanded</b>. <i>No configuration required</i>. Private WS2P access allows your node to connect through P2P to other nodes without exposing itself to the Internet. This is the most secure and efficient way to connect your node to the network.\",\n \"configuration.ws2p.private.connections.title\": \"Connections\",\n \"configuration.ws2p.private.connections.message\": \"You can limit the number of active private connections.\",\n \"configuration.ws2p.private.max\": \"Maximum\",\n \"configuration.proxiesConf.title\": \"Setting up a Proxy\",\n \"configuration.proxiesConf.proxySocksAddress\": \"Classical socks proxy\",\n \"configuration.proxiesConf.torMessage\": \"<b>Warning :</b> If you want to use a socks proxy to redirect all outgoing traffic via <b>Tor</b>, you must use the <i>\\\"Tor socks proxy\\\"</i> field :\",\n \"configuration.proxiesConf.proxyTorAddress\": \"Tor socks proxy\",\n \"configuration.proxiesConf.clear\": \"clear\",\n \"configuration.proxiesConf.tor\": \"tor\",\n \"configuration.proxiesConf.none\": \"none\",\n \"configuration.proxiesConf.reachingClearEp\": \"How do you want to reach the classic nodes ? (clear endpoints)\",\n \"configuration.ws2p.public\": \"Enable WS2P Public access\",\n \"configuration.ws2p.public.desc\": \"<b>Recommanded</b>. Public WS2P access allows your node to be publicly visible to communicate through WS2P. Considering that most of the nodes will communicate through WS2P access, it is important to have a maximum number of nodes with Public WS2P access enabled to have a decentralized network.\",\n \"configuration.ws2p.public.upnp.title\": \"UPnP\",\n \"configuration.ws2p.public.upnp.message\": \"Automated configuration. You need to have a box (router) for this to work. Typically true if you use Duniter at home.\",\n \"configuration.ws2p.public.upnp.value\": \"Enable Public WS2P accss through UPnP\",\n \"configuration.ws2p.public.manual.title\": \"Manual configuration\",\n \"configuration.ws2p.public.manual.message\": \"You can also manually configure your node for Public WS2P access.\",\n \"configuration.ws2p.public.manual.local_ipv4\": \"Private (computer)\",\n \"configuration.ws2p.public.manual.host\": \"Public (remote host)\",\n \"configuration.ws2p.public.manual.lport\": \"Private port\",\n \"configuration.ws2p.public.manual.rport\": \"Public port\",\n \"configuration.ws2p.public.manual.rpath\": \"WebSocket web path\",\n \"configuration.ws2p.public.connections.title\": \"Connections\",\n \"configuration.ws2p.public.connections.message\": \"You can limit the number of active public connections.\",\n \"configuration.ws2p.public.max\": \"Maximum\",\n \"configuration.create_network.desc\": \"<b>Deprecated</b>. BMA is the legacy communication interface for Duniter nodes. It is being deprecated. Yet, you can activate it if you know what you are doing.\",\n \"configuration.create_network.title\": \"Network\",\n \"configuration.create_network.message\": \"Duniter is a P2P software and needs bidirectionnal access to the network. Please chose carefully the following parameters.\",\n \"configuration.create_network.none\": \"None\",\n \"configuration.create_network.ipv4.title\": \"IPv4\",\n \"configuration.create_network.ipv6.title\": \"IPv6\",\n \"configuration.create_network.ipv4.message\": \"For compatibilty reasons, you may prefer to use classic IPv4 interfaces. The configuration is more complicated.\",\n \"configuration.create_network.local_ipv4\": \"Private (computer)\",\n \"configuration.create_network.remote_ipv4\": \"Public (box/router)\",\n \"configuration.create_network.local_ipv6\": \"IPv6\",\n \"configuration.create_network.lport\": \"Local port\",\n \"configuration.create_network.rport\": \"Remote port\",\n \"configuration.create_network.port.title\": \"Ports\",\n \"configuration.create_network.ipv6.message\": \"IPv6 gives your computer a unique, direct address to your node over the Internet. This is the <b>recommended way</b> to connect your node to the network.\",\n \"configuration.create_network.port.message\": \"Wether you use IPv6 or IPv4, Duniter node will use this port number for connection to the network. If you use IPv6, local and remote port should equal each other.\",\n \"configuration.create_network.dns.title\": \"Domain name\",\n \"configuration.create_network.dns\": \"Domain name\",\n \"configuration.create_network.dns.message\": \"IPv6 (AAAA) and IPv4 (A) DNS records will be used.\",\n \"configuration.create_network.upnp\": \"Use UPnP\",\n \"configuration.create_network.bma\": \"Enable BMA access\",\n \"configuration.create_network.button.validate\": \"Continue\",\n \"configuration.create_network.button.autoconf\": \"Automatic configuration\",\n \"configuration.create_parameters.title\": \"Currency\",\n \"configuration.create_parameters.message\": \"Initial parameters of the currency. It should be carefully chosen, as these parameters never change once the currency is started.\",\n \"configuration.create_parameters.currency.title\": \"Money units\",\n \"configuration.create_parameters.currency.message\": \"Give a name to your currency. The 3 following parameters configure the way new money units are created.\",\n \"configuration.create_parameters.currency\": \"Currency name\",\n \"configuration.create_parameters.c\": \"c\",\n \"configuration.create_parameters.dt\": \"UD period\",\n \"configuration.create_parameters.ud0\": \"UD(0)\",\n \"configuration.create_parameters.button.validate\": \"Continue\",\n \"configuration.create_parameters.wot.title\": \"Web of Trust\",\n \"configuration.create_parameters.wot.message\": \"The following parameters deal with identities and their links gathered in the Web of Trust concept.\",\n \"configuration.create_parameters.sigStock\": \"Max cert stock\",\n \"configuration.create_parameters.sigPeriod\": \"Delay between 2 certs\",\n \"configuration.create_parameters.sigValidity\": \"Cert expiry delay\",\n \"configuration.create_parameters.msValidity\": \"Membership expiry delay\",\n \"configuration.create_parameters.sigQty\": \"Min required certs\",\n \"configuration.create_parameters.sigWindow\": \"Cert time window\",\n \"configuration.create_parameters.stepMax\": \"Max distance\",\n \"configuration.create_parameters.xpercent\": \"Percent of distance\",\n \"configuration.create_parameters.blockchain.title\": \"Blockchain\",\n \"configuration.create_parameters.blockchain.message\": \"The technical support of money and identities is the blockchain. It also has some parameters driving its behavior.\",\n \"configuration.create_parameters.medianTimeBlocks\": \"Blocks count\",\n \"configuration.create_parameters.avgGenTime\": \"Block gen. duration\",\n \"configuration.create_parameters.dtDiffEval\": \"Blocks count for diff.\",\n \"configuration.create_parameters.blocksRot\": \"Personal diff. blocks\",\n \"configuration.create_parameters.percentRot\": \"Personal diff. rotation\",\n \"configuration.create_root.title\": \"Root block creation\",\n \"configuration.create_root.message\": \"This is the final step to create the new currency! The root block or <i>genesis</i> will include the first members and define the currency parameters. Once generated and submitted, the blockchain will be started.\",\n \"configuration.create_root.button.start\": \"Start HTTP\",\n \"configuration.create_root.button.stop\": \"Stop HTTP\",\n \"configuration.create_root.button.generate\": \"Give a try\",\n \"configuration.create_root.need_a_try\": \"You need to generate a first block with the « Give a try » button. Start HTTP server to do so.\",\n \"configuration.create_root.button.accept_and_send\": \"Accept this block and start currency\",\n \"configuration.create_root.button.cancel\": \"Cancel creation and go to home screen\",\n \"configuration.create_root.host_listening\": \"Host listening at:\",\n \"configuration.create_uid.pubkey_preview\": \"Public key preview\",\n \"home.ws2p_peers\": \"Connected peers\",\n \"home.current.number\": \"Current block #\",\n \"home.current.membersCount\": \"Members count\",\n \"home.current.medianTime\": \"Median time\",\n \"home.current.powMin\": \"Common difficulty level\",\n \"home.current.mmass\": \"Monetary mass\",\n \"home.pulling.network\": \"Network\",\n \"home.pulling.peer\": \"Peer\",\n \"home.pulling.state.unkown\": \"Next sync in few minutes\",\n \"home.pulling.state.synced\": \"Synced\",\n \"home.pulling.state.syncing\": \"Syncing...\",\n \"home.pow.unit\": \"blocks made by this key\",\n \"home.pow.is_mirror\": \"This node is a mirror\",\n \"home.pow.is_waiting\": \"Waiting for better proof conditions\",\n \"home.tabs.overview\": \"Overview\",\n \"home.tabs.overview.should_reconfigure\": \"Your configuration has changed and your node is no more reachable from the network. You should reconfigure it to have a functional node. If this message appears again, you should manually configure the network settings. Often, selecting only IPv6 interface (disabling IPv4) solves the problem.\",\n \"home.tabs.network\": \"Peers\",\n \"home.tabs.network.button.update\": \"Check peers again\",\n \"home.tabs.connections\": \"Network\",\n \"home.tabs.connections.title.connections\": \"WS2P Connections\",\n \"home.tabs.connections.title.network\": \"Network view\",\n \"home.tabs.connections.legend.title\": \"Legend\",\n \"home.tabs.connections.legend.prefered\": \"Prefered: nodes that you prefer for outcoming connections\",\n \"home.tabs.connections.legend.privileged\": \"Privileged: nodes that you privilege the incoming connections (= invitation)\",\n \"home.tabs.logs\": \"Logs\",\n \"home.tabs.logs.follow.logs\": \"Follow logs\",\n \"home.tabs.logs.pause.logs\": \"Pause logs\",\n \"home.tabs.logs.level.error\": \"Error\",\n \"home.tabs.logs.level.warn\": \"Warning\",\n \"home.tabs.logs.level.info\": \"Info\",\n \"home.tabs.logs.level.debug\": \"Debug\",\n \"home.tabs.logs.level.trace\": \"Trace\",\n \"sync.title\": \"Synchronize\",\n \"sync.message\": \"Your node will be synchronized with an existing currency: just enter technical details about a node to sync with it.\",\n \"sync.host\": \"Host\",\n \"sync.port\": \"Port\",\n \"sync.check\": \"Check node\",\n \"sync.start\": \"Synchronize with this node\",\n \"sync.failed\": \"Synchronization failed.\",\n \"sync.mode.simplified\": \"Simplified mode\",\n \"sync.mode.manual\": \"Manual mode\",\n \"sync.simplified.choose\": \"Node to connect to\",\n \"sync.simplified.default_option\": \"Please select a node to continue\",\n \"sync.simplified.currency\": \"Currency\",\n \"sync.simplified.main_mirror\": \"(main mirror)\",\n \"sync.simplified.other mirror\": \"(other mirror)\",\n \"sync.ready.node.part1\": \"This node is available!\",\n \"sync.ready.node.part2\": \"Click on the green button to proceed.\",\n \"sync.started.node\": \"Synchronization started on node:\",\n \"sync.error.unreachable.try.another.node\": \"This node is not available. Please select another one.\",\n \"home.menu.server.stop\": \"Stop server\",\n \"home.menu.server.start\": \"Start server\",\n \"home.menu.server.restart\": \"Restart server\",\n \"home.state\": \"Server:\",\n \"home.state.started\": \"STARTED\",\n \"home.state.stopped\": \"STOPPED\",\n \"settings.tabs.logs\": \"Logs\",\n \"settings.tabs.data\": \"Data\",\n \"settings.tabs.backup\": \"Backup\",\n \"settings.tabs.identity\": \"Crypto\",\n \"settings.tabs.network\": \"Network\",\n \"settings.tabs.currency\": \"Currency\",\n \"settings.tabs.cpu\": \"CPU\",\n \"settings.tabs.modules\": \"Modules\",\n \"settings.data.reset.title\": \"Reset this node\",\n \"settings.data.reset.message\": \"If you desire to reset this node's data and sync it again with the network, please select a node to sync against and validate.\",\n \"settings.data.reset.warning\": \"This process <strong>will not</strong> reset the node identity and network settings, which will be reused.\",\n \"settings.data.reset.peer.none_option\": \"Select a node\",\n \"settings.data.reset.peer.label\": \"Synchronization peer\",\n \"settings.data.reset.button\": \"Full reset of the node\",\n \"settings.data.reset_sync.button\": \"Reset data and start sync\",\n \"settings.logs.title\": \"Logs\",\n \"settings.logs.consult.message\": \"Your node continually generates information messages in a log file. This information may help you understand what your node <i>is doing</i> or what it <i>has done</i> few times ago.\",\n \"settings.logs.consult.button\": \"View real-time logs\",\n \"settings.logs.share.message\": \"You may want to <b>share your logs</b> with other people, sometimes to get help or to add informations in a bug tracker. Clicking on below button will extract the last 2000 lines of your logs and push it on the web, returning you a link to be shared with whoever you want.\",\n \"settings.logs.share.button\": \"Create a web link to your logs\",\n \"settings.logs.share.generating\": \"Generating your link...\",\n \"settings.logs.share.error\": \"An error occurred during the generation of your link:\",\n \"settings.data.backup.title\": \"Backup\",\n \"settings.data.backup.message\": \"You can create backups of your node's data and restore them using the buttons below.\",\n \"settings.data.backup.warning\": \"<b>Export</b> will only backup your node's data, which <i>excludes your secret key and configuration details</i>.<br><b>Import</b> will reset your node's data by applying the backup. Your secret keys and configuration remains untouched.\",\n \"settings.data.backup.button.export\": \"Create a data backup\",\n \"settings.data.backup.button.import\": \"Import a data backup\",\n \"settings.data.backup.importing\": \"Importing data...\",\n \"settings.data.backup.imported\": \"Import successfull!\",\n \"settings.network.button.validate\": \"Save and apply network settings\",\n \"settings.network.saved\": \"Configuration saved and applied successfully\",\n \"settings.key.title\": \"Public key of this node:\",\n \"settings.key.button.validate\": \"Save and use this key\",\n \"settings.key.button.change\": \"Change keyring\",\n \"settings.key.pubkey.description\": \"This public key is the public part of your keyring, which is composed of a public key and a private key. This public key is shared with all the peers of the network and users of the currency, while your private key is secretely kept and used by this node to process operations on the network.\",\n \"settings.data.modal_title\": \"Confirm full reset\",\n \"settings.data.modal_message\": \"This action will completely reset the data of your node and redirect you to initial configuration screen. Do you confirm?\",\n \"settings.data.modal_disagree\": \"No, cancel this\",\n \"settings.data.modal_agree\": \"Yes, process the reset\",\n \"settings.data.reset.experimental\": \"This functionality is still considered experimental. If you encounters strange behaviors, please stop the software and reset manually your node by removing all the files BUT conf.json under ~/.config/duniter/duniter_default, and restart the software.\",\n \"settings.cpu.title\": \"CPU settings\",\n \"settings.cpu.message\": \"You can adjust the CPU power dedicated to proof-of-work computation. The higher the value, the faster is your node, the higher the chances you have to compute a block early.\",\n \"settings.cpu.warning\": \"<b>Up to 8 cores</b> of your machine are dedicated to proof-of-work computation currently. Also, setting CPU to 100% does not mean Duniter will use 100% of each core, but will use as much as possible each of them, as a core is also shared with other programs.\",\n \"settings.cpu.range\": \"% of CPU power core dedicated to proof-of-work :\",\n \"settings.cpu.power\": \"Core power:\",\n \"settings.cpu.saved\": \"CPU settings saved.\",\n \"settings.modules.title\": \"Modules\",\n \"settings.modules.message\": \"You can install extensions to your Duniter node to provide new features. These extensions are called <b>Duniter modules</b>.\",\n \"settings.modules.no_access\": \"This instance does not have enough system rights to install new modules on disk.\",\n \"settings.modules.install\": \"Install this module\",\n \"settings.modules.already_install\": \"Module already installed\",\n \"settings.modules.path_does_not_exist\": \"Path does not lead to a module\",\n \"settings.modules.wrong_package_source\": \"Package URL has wrong format\",\n \"settings.modules.warning\": \"Please be <b>VERY CAREFUL</b> when installing a module: you should <b>check that it is not a virus</b>, nor wants to steal your informations. <b>A MODULE HAS A LOT OF POWER</b> and can access/modify any part of your system (including your private key), in the limit of the user's access rights.\",\n \"settings.modules.warning_light\": \"WARNING! (click to see more)\",\n \"settings.modules.warning_close\": \"Close this message\",\n \"settings.modules.on\": \"On\",\n \"settings.modules.off\": \"Off\",\n \"settings.modules.installing\": \"Installation...\",\n \"settings.modules.installing_warn\": \"Please <b>do not close Duniter</b> during this process!\",\n \"settings.modules.uninstalling\": \"Removal...\",\n \"graphs.tabs.blockchain\": \"Blockchain\",\n \"graphs.tabs.currency\": \"Currency\",\n \"graphs.blockchain.range\": \"Graphs for the last X blocks: (please choose X value)\",\n \"graphs.blockchain.with.time\": \"Time variations graph\",\n \"graphs.blockchain.with.speed\": \"Writing speed graph\",\n \"graphs.blockchain.with.difficulty\": \"Difficulty graph\",\n \"help.about_duniter\": \"About Duniter\",\n \"help.about_duniter.title\": \"About\",\n \"help.about_duniter.subtitle\": \"Duniter Desktop\",\n \"help.about_duniter.version\": \"Version: \",\n \"help.about_duniter.forum\": \"Forum\",\n \"help.about_duniter.chat\": \"Chat\",\n \"help.new_version_available\": \"New version available\",\n \"help.restart_required\": \"Restart to apply changes\",\n \"help.restart_required.message\": \"Please close Duniter and restart it.\"\n}\n;","'use strict';\n\nvar co = require('co');\nvar _ = require('underscore');\n\nmodule.exports = function (app) {\n\n app.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {\n\n // States\n $stateProvider.state('index', {\n url: '/',\n template: require('views/index'),\n resolve: {\n ws: function ws(Webmin) {\n return Webmin.ws();\n },\n summary: function summary(Webmin) {\n return Webmin.summary();\n }\n },\n controller: 'IndexController'\n }).state('about', {\n url: '/about',\n template: require('views/about'),\n resolve: {\n summary: function summary(Webmin) {\n return Webmin.summary();\n },\n version: function version(summary) {\n return summary && 'v' + summary.version || 'unknown version';\n }\n },\n controller: 'AboutController'\n }).state('configure', {\n abstract: true,\n url: '/configure',\n template: require('views/init/layout'),\n controller: function controller($scope) {\n $scope.conf = {\n currency: 'super_currency',\n c: 0.007376575,\n dt: 30.4375 * 24 * 3600,\n ud0: 100,\n stepMax: 3,\n sigDelay: 3600 * 24 * 365 * 5,\n sigPeriod: 0, // Instant\n sigStock: 40,\n sigWindow: 3600 * 24 * 14, // 2 weeks\n sigValidity: 3600 * 24 * 365,\n msValidity: 3600 * 24 * 365,\n sigQty: 0,\n xpercent: 0.9,\n percentRot: 0.66,\n blocksRot: 20,\n avgGenTime: 16 * 60,\n dtDiffEval: 10,\n medianTimeBlocks: 20\n };\n }\n }).state('configure.choose', {\n url: '/choose',\n template: require('views/init/choose'),\n controller: function controller($scope, Importer) {\n Importer($scope);\n }\n }).state('configure.create', {\n url: '/create',\n template: '<div class=\"ui-scrollable\" ui-view=\"\"></div>'\n }).state('configure.create.uid', {\n url: '/create/uid',\n template: require('views/init/create/create_uid'),\n controller: 'IdentityController'\n }).state('configure.create.network', {\n url: '/create/network',\n template: require('views/init/create/create_network'),\n resolve: {\n netinterfaces: function netinterfaces(Webmin) {\n return resolveNetworkAutoConf(Webmin);\n },\n firstConf: function firstConf() {\n return true;\n }\n },\n controller: 'NetworkController'\n }).state('configure.create.parameters', {\n url: '/create/parameters',\n template: require('views/init/create/create_parameters'),\n controller: 'ParametersController'\n }).state('configure.create.root', {\n url: '/create/root',\n template: require('views/init/create/create_root'),\n controller: 'RootBlockController'\n }).state('sync', {\n url: '/sync?host=&port=&sync=&to=',\n template: require('views/init/sync/sync'),\n controller: 'SyncController'\n }).state('main', {\n abstract: true,\n url: '/main',\n template: require('views/main/main'),\n resolve: {\n ws: function ws(Webmin) {\n return Webmin.ws();\n },\n summary: function summary(Webmin) {\n return Webmin.summary();\n },\n uiModules: function uiModules(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var modules, i, _module, injection, script;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.plugin.uiModules();\n\n case 2:\n modules = _context.sent;\n i = 0;\n\n case 4:\n if (!(i < modules.length)) {\n _context.next = 16;\n break;\n }\n\n _module = modules[i];\n _context.next = 8;\n return Webmin.plugin.uiGetMenuInjection(_module);\n\n case 8:\n injection = _context.sent;\n script = document.createElement(\"script\");\n\n script.type = \"text/javascript\";\n script.text = \";\" + injection.menu;\n document.body.appendChild(script);\n\n case 13:\n i++;\n _context.next = 4;\n break;\n\n case 16:\n return _context.abrupt('return', modules);\n\n case 17:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n }\n },\n controller: 'MainController'\n }).state('main.home', {\n abstract: true,\n url: '/home',\n template: require('views/main/home/home'),\n controller: 'HomeController'\n }).state('main.home.overview', {\n url: '/overview',\n template: require('views/main/home/tabs/overview'),\n resolve: {\n summary: function summary(Webmin) {\n return Webmin.summary();\n }\n },\n controller: 'OverviewController'\n }).state('main.home.network', {\n url: '/network',\n template: require('views/main/home/tabs/network'),\n resolve: {\n peers: function peers(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n return _context2.abrupt('return', Webmin.network.peers());\n\n case 1:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n }\n },\n controller: 'HomeNetworkController'\n }).state('main.home.connections', {\n url: '/connections',\n template: require('views/main/home/tabs/connections'),\n resolve: {\n conf: function conf(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt('return', Webmin.network.ws2p.conf());\n\n case 1:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n },\n info: function info(Webmin, conf) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n return _context4.abrupt('return', Webmin.network.ws2p.info());\n\n case 1:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n },\n heads: function heads(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n return _context5.abrupt('return', Webmin.network.ws2p.heads());\n\n case 1:\n case 'end':\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n }\n },\n controller: 'HomeConnectionsController'\n }).state('main.settings', {\n abstract: true,\n url: '/settings',\n template: require('views/main/settings/settings'),\n resolve: {\n summary: function summary(Webmin) {\n return Webmin.summary();\n }\n },\n controller: 'SettingsController'\n }).state('main.settings.data', {\n url: '/data',\n template: require('views/main/settings/tabs/data'),\n resolve: {\n peers: function peers(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {\n var self, res;\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n _context6.prev = 0;\n _context6.next = 3;\n return Webmin.network.selfPeer();\n\n case 3:\n self = _context6.sent;\n _context6.next = 6;\n return Webmin.network.peers();\n\n case 6:\n res = _context6.sent;\n return _context6.abrupt('return', _.filter(res.peers, function (p) {\n return p.pubkey != self.pubkey && p.status == 'UP';\n }));\n\n case 10:\n _context6.prev = 10;\n _context6.t0 = _context6['catch'](0);\n\n console.error(_context6.t0);\n return _context6.abrupt('return', []);\n\n case 14:\n case 'end':\n return _context6.stop();\n }\n }\n }, _callee6, this, [[0, 10]]);\n }));\n }\n },\n controller: 'DataController'\n }).state('main.settings.logs', {\n url: '/logs',\n template: require('views/main/settings/tabs/logs'),\n controller: 'LogsSettingsController'\n }).state('main.settings.backup', {\n url: '/backup',\n template: require('views/main/settings/tabs/backup'),\n controller: 'BackupController'\n }).state('main.settings.cpu', {\n url: '/cpu',\n template: require('views/main/settings/tabs/cpu'),\n resolve: {\n summary: function summary(Webmin) {\n return Webmin.summary();\n }\n },\n controller: 'CPUController'\n }).state('main.settings.modules', {\n url: '/modules',\n template: require('views/main/settings/tabs/modules'),\n resolve: {\n summary: function summary(Webmin) {\n return Webmin.summary();\n },\n hasAccess: function hasAccess(Webmin) {\n return Webmin.plugin.checkAccess();\n },\n allModules: function allModules(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {\n var modules;\n return regeneratorRuntime.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n _context7.next = 2;\n return Webmin.plugin.allModules();\n\n case 2:\n modules = _context7.sent;\n return _context7.abrupt('return', modules);\n\n case 4:\n case 'end':\n return _context7.stop();\n }\n }\n }, _callee7, this);\n }));\n }\n },\n controller: 'ModulesController'\n }).state('main.settings.crypto', {\n url: '/crypto',\n template: require('views/main/settings/tabs/crypto'),\n controller: 'KeyController'\n }).state('main.settings.network', {\n url: '/network',\n resolve: {\n netinterfaces: function netinterfaces(Webmin) {\n return resolveNetworkAutoConf(Webmin);\n },\n firstConf: function firstConf() {\n return false;\n }\n },\n template: require('views/main/settings/tabs/network'),\n controller: 'NetworkController'\n }).state('main.settings.currency', {\n url: '/currency',\n resolve: {\n conf: function conf(summary) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {\n return regeneratorRuntime.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n return _context8.abrupt('return', summary.parameters);\n\n case 1:\n case 'end':\n return _context8.stop();\n }\n }\n }, _callee8, this);\n }));\n }\n },\n template: require('views/main/settings/tabs/currency'),\n controller: 'CurrencyController'\n }).state('main.graphs', {\n abstract: true,\n url: '/graphs',\n template: require('views/main/graphs/graphs'),\n controller: 'GraphsController'\n }).state('main.graphs.blockchain', {\n url: '/blockchain',\n template: require('views/main/graphs/blockchain'),\n controller: 'GraphsBlockchainController'\n }).\n\n //state('graphs.crypto', {\n // url: '/crypto',\n // template: require('views/graphs/crypto'),\n // controller: 'KeyController'\n //}).\n //\n //state('graphs.network', {\n // url: '/network',\n // resolve: {\n // netinterfaces: (Webmin) => resolveNetworkAutoConf(Webmin),\n // firstConf: () => false\n // },\n // template: require('views/graphs/network'),\n // controller: 'NetworkController'\n //}).\n //\n //state('graphs.currency', {\n // url: '/currency',\n // resolve: {\n // conf: (bmapi) => co(function *() {\n // return bmapi.currency.parameters();\n // })\n // },\n // template: require('views/graphs/currency'),\n // controller: 'CurrencyController'\n //}).\n\n state('logs', {\n url: '/logs',\n template: require('views/logs'),\n resolve: {\n ws: function ws(Webmin) {\n return Webmin.ws();\n }\n },\n controller: 'LogsController'\n }).state('error', {\n url: '/error\\?err',\n template: require('views/error'),\n controller: function controller($scope, $stateParams) {\n return $scope.errorMsg = $stateParams.err || 'err.unknown';\n }\n });\n\n // Default route\n $urlRouterProvider.otherwise('/');\n }]);\n\n app.run(function ($rootScope, $state) {\n $rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, error) {\n console.error(error);\n $state.go('error', { err: error.message });\n });\n });\n\n function resolveNetworkAutoConf(Webmin) {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {\n var netinterfaces;\n return regeneratorRuntime.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n _context9.next = 2;\n return Webmin.network.interfaces();\n\n case 2:\n netinterfaces = _context9.sent;\n return _context9.abrupt('return', netinterfaces || { local: {}, remote: {} });\n\n case 4:\n case 'end':\n return _context9.stop();\n }\n }\n }, _callee9, this);\n }));\n }\n};\n","'use strict';\n\nmodule.exports = function (app) {\n\n app.config(['$translateProvider', function ($translateProvider) {\n\n $translateProvider.translations('en', require('./i18n/en'));\n\n // Default language\n $translateProvider.preferredLanguage('en');\n\n // Other parameters\n $translateProvider.useSanitizeValueStrategy('');\n }]);\n};\n","\"use strict\";\n\nmodule.exports = function Peer(json) {\n\n var that = this;\n\n var BMA_REGEXP = /^BASIC_MERKLED_API( ([a-z_][a-z0-9-_.]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))$/;\n\n Object.keys(json).forEach(function (key) {\n that[key] = json[key];\n });\n\n that.endpoints = that.endpoints || [];\n that.statusTS = that.statusTS || 0;\n\n that.keyID = function () {\n return that.pubkey && that.pubkey.length > 10 ? that.pubkey.substring(0, 10) : \"Unknown\";\n };\n\n that.copyValues = function (to) {\n var obj = that;\n [\"version\", \"currency\", \"pub\", \"endpoints\", \"hash\", \"status\", \"statusTS\", \"block\", \"signature\"].forEach(function (key) {\n to[key] = obj[key];\n });\n };\n\n that.copyValuesFrom = function (from) {\n var obj = that;\n [\"version\", \"currency\", \"pub\", \"endpoints\", \"block\", \"signature\"].forEach(function (key) {\n obj[key] = from[key];\n });\n };\n\n that.json = function () {\n var obj = that;\n var json = {};\n [\"version\", \"currency\", \"endpoints\", \"status\", \"block\", \"signature\"].forEach(function (key) {\n json[key] = obj[key];\n });\n json.raw = that.getRaw();\n json.pubkey = that.pubkey;\n return json;\n };\n\n that.getBMA = function () {\n var bma = null;\n that.endpoints.forEach(function (ep) {\n var matches = !bma && ep.match(BMA_REGEXP);\n if (matches) {\n bma = {\n \"dns\": matches[2] || '',\n \"ipv4\": matches[4] || '',\n \"ipv6\": matches[6] || '',\n \"port\": matches[8] || 9101\n };\n }\n });\n return bma || {};\n };\n\n that.getDns = function () {\n var bma = that.getBMA();\n return bma.dns ? bma.dns : null;\n };\n\n that.getIPv4 = function () {\n var bma = that.getBMA();\n return bma.ipv4 ? bma.ipv4 : null;\n };\n\n that.getIPv6 = function () {\n var bma = that.getBMA();\n return bma.ipv6 ? bma.ipv6 : null;\n };\n\n that.getPort = function () {\n var bma = that.getBMA();\n return bma.port ? bma.port : null;\n };\n\n that.getHost = function () {\n var bma = that.getBMA();\n var host = that.hasValid4(bma) ? bma.ipv4 : bma.dns ? bma.dns : bma.ipv6 ? '[' + bma.ipv6 + ']' : '';\n return host;\n };\n\n that.getURL = function () {\n var bma = that.getBMA();\n var base = '';\n if (bma.dns) {\n base = bma.dns;\n } else if (that.hasValid4(bma)) {\n base = bma.ipv4;\n } else if (bma.ipv6) {\n base = '[' + bma.ipv6 + ']';\n }\n if (bma.port) base += ':' + bma.port;\n return base;\n };\n\n that.hasValid4 = function (bma) {\n return bma.ipv4 && !bma.ipv4.match(/^127.0/) && !bma.ipv4.match(/^192.168/) ? true : false;\n };\n\n that.getNamedURL = function () {\n var bma = that.getBMA();\n var base = that.hasValid4(bma) ? bma.ipv4 : bma.dns ? bma.dns : bma.ipv6 ? '[' + bma.ipv6 + ']' : '';\n if (bma.port) base += ':' + bma.port;\n return base;\n };\n\n that.isReachable = function () {\n return that.getURL() ? true : false;\n };\n};\n","\"use strict\";\n\nmodule.exports = function mobilecheck() {\n var check = false;\n (function (a) {\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) check = true;\n })(navigator.userAgent || navigator.vendor || window.opera);\n return check;\n};\n","'use strict';\n\nmodule.exports = function (app) {\n\n var Base58 = {};\n\n Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';\n Base58.alphabetMap = {};\n\n for (var i = 0; i < Base58.alphabet.length; i++) {\n Base58.alphabetMap[Base58.alphabet.charAt(i)] = i;\n }\n\n Base58.encode = function (buffer) {\n if (buffer.length === 0) return '';\n\n var i = void 0,\n j = void 0,\n digits = [0];\n for (i = 0; i < buffer.length; i++) {\n for (j = 0; j < digits.length; j++) {\n digits[j] <<= 8;\n }digits[digits.length - 1] += buffer[i];\n\n var carry = 0;\n for (j = digits.length - 1; j >= 0; j--) {\n digits[j] += carry;\n carry = digits[j] / 58 | 0;\n digits[j] %= 58;\n }\n\n while (carry) {\n digits.unshift(carry);\n carry = digits[0] / 58 | 0;\n digits[0] %= 58;\n }\n }\n\n // deal with leading zeros\n for (i = 0; i < buffer.length - 1 && buffer[i] == 0; i++) {\n digits.unshift(0);\n }return digits.map(function (digit) {\n return Base58.alphabet[digit];\n }).join('');\n };\n\n Base58.decode = function (string) {\n if (string.length === 0) return new Uint8Array();\n\n var input = string.split('').map(function (c) {\n return Base58.alphabetMap[c];\n });\n\n var i = void 0,\n j = void 0,\n bytes = [0];\n for (i = 0; i < input.length; i++) {\n for (j = 0; j < bytes.length; j++) {\n bytes[j] *= 58;\n }bytes[bytes.length - 1] += input[i];\n\n var carry = 0;\n for (j = bytes.length - 1; j >= 0; j--) {\n bytes[j] += carry;\n carry = bytes[j] >> 8;\n bytes[j] &= 0xff;\n }\n\n while (carry) {\n bytes.unshift(carry);\n carry = bytes[0] >> 8;\n bytes[0] &= 0xff;\n }\n }\n\n // deal with leading zeros\n for (i = 0; i < input.length - 1 && input[i] == 0; i++) {\n bytes.unshift(0);\n }return new Uint8Array(bytes);\n };\n\n app.factory('Base58', function () {\n return {\n encode: Base58.encode,\n decode: Base58.decode\n };\n });\n};\n","'use strict';\n\nvar _ = require('underscore');\nvar conf = require('../lib/conf/conf');\nvar moment = require('moment');\n\nmodule.exports = function (app) {\n\n app.filter('mt_date', function () {\n return function (input) {\n if (input == null) {\n return \"\";\n }\n return moment(input * 1000).format('YYYY MM DD');\n };\n });\n\n app.filter('mt_time', function () {\n return function (input) {\n if (input == null) {\n return \"\";\n }\n return moment(input * 1000).format('HH:mm:ss');\n };\n });\n};\n","'use strict';\n\nmodule.exports = function (app) {\n\n app.factory('Graph', function () {\n return {\n\n speedGraph: function speedGraphs(id, offset, speeds, minSpeeds, maxSpeeds, getSeries) {\n var xValuex = [];\n for (var i = 0, len = speeds.length; i < len; i++) {\n xValuex.push(i + offset);\n }\n $(id).highcharts({\n chart: {\n type: \"area\",\n zoomType: 'x',\n events: {\n load: function load() {\n getSeries(this.series);\n }\n }\n },\n title: {\n text: 'Blocks writing speed'\n },\n subtitle: {\n text: document.ontouchstart === undefined ? 'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'\n },\n xAxis: {\n //categories: xValuex,\n minRange: 3, // 10 blocks,\n labels: {\n formatter: function formatter() {\n return this.value + offset;\n }\n }\n },\n yAxis: {\n //type: 'logarithmic',\n minorTickInterval: 1,\n title: {\n text: 'Blocks per hour (logarithmic scale)'\n },\n floor: 0,\n min: 0\n },\n colors: ['#ff0000', '#7cb5ec', '#000000'],\n legend: {\n enabled: true\n },\n tooltip: {\n shared: true,\n crosshairs: true,\n formatter: blockFormatter(offset)\n },\n plotOptions: {\n area: {\n fillColor: {\n linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },\n stops: [[0, Highcharts.getOptions().colors[0]], [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]]\n },\n marker: {\n radius: 2\n },\n lineWidth: 1,\n states: {\n hover: {\n lineWidth: 1\n }\n },\n threshold: null\n }\n },\n\n series: [{\n type: 'line',\n name: \"Upper limit\",\n data: maxSpeeds\n }, {\n type: 'area',\n name: \"Actual speed\",\n data: speeds\n }, {\n type: 'line',\n name: \"Lower limit\",\n data: minSpeeds\n }]\n });\n },\n\n difficultyGraph: function difficultyGraph(id, offset, difficulties) {\n $(id).highcharts({\n chart: {\n type: \"area\",\n zoomType: 'x'\n },\n title: {\n text: 'Proof-of-Work difficulty by block'\n },\n subtitle: {\n text: document.ontouchstart === undefined ? 'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'\n },\n xAxis: {\n minRange: 10, // 10 blocks,\n labels: {\n formatter: function formatter() {\n return this.value + offset;\n }\n }\n },\n yAxis: {\n title: {\n text: 'Number of zeros'\n },\n floor: 0,\n min: 0\n },\n legend: {\n enabled: true\n },\n tooltip: {\n shared: true,\n crosshairs: true,\n formatter: blockFormatter(offset)\n },\n plotOptions: {\n area: {\n fillColor: {\n linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },\n stops: [[0, Highcharts.getOptions().colors[0]], [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]]\n },\n marker: {\n radius: 2\n },\n lineWidth: 1,\n states: {\n hover: {\n lineWidth: 1\n }\n },\n threshold: null\n }\n },\n\n series: [{\n name: 'PoW difficulty',\n data: difficulties\n }]\n });\n },\n\n timeGraphs: function timeGraphs(id, offset, timeAccelerations, medianTimeIncrements, speeds, minSpeeds, maxSpeeds) {\n var timesInc = [];\n medianTimeIncrements.forEach(function (inc) {\n timesInc.push(inc == 0 ? 1 : inc);\n });\n $(id).highcharts({\n chart: {\n // type: \"area\",\n zoomType: 'x'\n },\n title: {\n text: 'Blockchain time variations'\n },\n subtitle: {\n text: document.ontouchstart === undefined ? 'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'\n },\n xAxis: {\n minRange: 10, // 10 blocks,\n labels: {\n formatter: function formatter() {\n return this.value + offset;\n }\n }\n },\n yAxis: {\n //type: 'logarithmic',\n minorTickInterval: 1,\n title: {\n text: 'Number of seconds (logarithmic scale)'\n }\n },\n legend: {\n enabled: true\n },\n tooltip: {\n shared: true,\n crosshairs: true,\n formatter: blockFormatter(offset)\n },\n plotOptions: {\n area: {\n fillColor: {\n linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },\n stops: [[0, Highcharts.getOptions().colors[0]], [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]]\n },\n marker: {\n radius: 2\n },\n lineWidth: 1,\n states: {\n hover: {\n lineWidth: 1\n }\n },\n threshold: null\n }\n },\n\n series: [{\n name: 'Time acceleration',\n data: timeAccelerations\n }, {\n name: \"Median Time variation\",\n data: timesInc\n }, {\n name: \"Too high duration\",\n data: maxSpeeds\n }, {\n name: \"Actual duration\",\n data: speeds\n }, {\n name: \"Too low duration\",\n data: minSpeeds\n }]\n });\n }\n };\n });\n};\n\nfunction blockFormatter(offset) {\n return function () {\n var html = '<span style=\"font-size: 10px\">' + (this.x + offset) + '</span><br/>';\n for (var i = 0, len = this.points.length; i < len; i++) {\n var point = this.points[i];\n var series = point.series;\n html += '<span style=\"color:' + series.color + '\">\\u25CF</span>' + series.name + ': <b>' + point.y + '</b><br/>';\n }\n return html;\n };\n}\n","'use strict';\n\nmodule.exports = function (app) {\n\n app.factory('Importer', function ($http, $state, $timeout, UIUtils, Upload, Webmin) {\n\n return function ($scope) {\n\n $scope.uploadFiles = function (file, errFiles) {\n $scope.f = file;\n $scope.errFile = errFiles && errFiles[0];\n if (file) {\n UIUtils.toast('settings.data.backup.importing');\n file.upload = Upload.upload({\n url: Webmin.getImportURL(),\n data: { importData: file }\n });\n\n file.upload.then(function (response) {\n $timeout(function () {\n UIUtils.toast('settings.data.backup.imported');\n $state.go('main.home.overview');\n file.result = response.data;\n });\n }, function (response) {\n if (response.status > 0) $scope.errorMsg = response.status + ': ' + response.data;\n }, function (evt) {\n file.progress = Math.min(100, parseInt(100.0 * evt.loaded / evt.total));\n });\n }\n };\n };\n });\n};\n","'use strict';\n\nmodule.exports = function (app) {\n\n app.factory('PubkeyGenerator', function ($timeout, Webmin) {\n\n var co = require('co');\n\n return function ($scope) {\n\n var concat = \"\";\n $scope.pubkey_preview = \"\";\n var timeout = preview();\n\n function preview() {\n return $timeout(function () {\n if ($scope.$parent) {\n var salt = $scope.$parent.conf.idty_entropy;\n var pass = $scope.$parent.conf.idty_password;\n var newConcat = [salt, pass].join('');\n if (salt && pass && newConcat != concat) {\n concat = newConcat;\n $scope.previewPubkey(concat);\n timeout = preview();\n } else {\n timeout = preview();\n }\n }\n }, 100);\n }\n\n $scope.previewPubkey = function () {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var data;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Webmin.key.preview({\n conf: $scope.$parent.conf\n });\n\n case 2:\n data = _context.sent;\n\n $scope.pubkey_preview = data.pubkey;\n\n case 4:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n })).catch(function () {\n return null;\n });\n };\n };\n });\n};\n","'use strict';\n\nmodule.exports = function (app) {\n\n app.factory('UIUtils', function ($q, $translate, $state, $location) {\n return {\n\n translate: function translate(msg) {\n return $q.when($translate(msg));\n },\n\n toastRaw: function toastRaw(msg) {\n return Materialize.toast(msg, 4000);\n },\n\n toast: function toast(msg) {\n return $q.when($translate(msg)).then(function (translated) {\n return Materialize.toast(translated, 4000);\n });\n },\n\n enableInputs: function enableInputs() {\n return $('i.prefix, label[value!=\"\"]').addClass('active');\n },\n\n enableTabs: function enableTabs() {\n var jTabs = $('ul.tabs');\n jTabs.tabs();\n $('ul.tabs a').click(function (e) {\n var href = $(e.currentTarget).attr('href');\n var state = href.slice(1);\n $state.go(state);\n });\n\n var currentID = $location.path().replace(/\\//g, '.').replace(/\\./, '');\n\n jTabs.tabs('select_tab', currentID);\n },\n\n changeTitle: function changeTitle(version, currency, prefix) {\n var printCurrency = \"\";\n if (typeof currency != \"undefined\" && currency != null) {\n printCurrency = currency;\n if (currency == \"g1\" || currency == \"g1-test\") {\n printCurrency = currency = 'ğ' + currency.slice(1);\n }\n }\n return document.title = typeof prefix != \"undefined\" && prefix != 1 ? 'Duniter ' + version + ' : ' + printCurrency + '-' + prefix : 'Duniter ' + version + ' : ' + printCurrency;\n }\n };\n });\n};\n","'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar co = require('co');\nvar _ = require('underscore');\nvar conf = require('../lib/conf/conf');\n\nmodule.exports = function (angular) {\n\n angular.module('duniter.services.webmin', ['ngResource']).factory('Webmin', function ($http, $q) {\n\n function httpProtocol() {\n return window.location.protocol + '//';\n }\n\n function wsProtocol() {\n return window.location.protocol === 'https:' ? 'wss://' : 'ws://';\n }\n\n function Webmin(server) {\n\n function getResource(uri, protocol) {\n return function (params) {\n return $q.when(httpGet(uri, params, protocol));\n };\n }\n\n function httpGet(uri, params, protocol) {\n return Q.Promise(function (resolve, reject) {\n var config = {\n timeout: conf.api_timeout\n },\n suffix = '',\n pkeys = [],\n queryParams = null;\n if ((typeof params === 'undefined' ? 'undefined' : _typeof(params)) == 'object') {\n pkeys = _.keys(params);\n queryParams = {};\n }\n pkeys.forEach(function (pkey) {\n var prevURI = uri;\n uri = uri.replace(new RegExp(':' + pkey), params[pkey]);\n if (prevURI == uri) {\n queryParams[pkey] = params[pkey];\n }\n });\n config.params = queryParams;\n $http.get((protocol || httpProtocol()) + server + uri + suffix, config).success(function (data, status, headers, config) {\n resolve(data);\n }).error(function (data, status, headers, config) {\n console.log(data);\n reject(data);\n });\n });\n }\n\n function postResource(uri) {\n return function (data, params) {\n return $q.when(Q.Promise(function (resolve, reject) {\n var config = {\n timeout: 4000\n },\n suffix = '',\n pkeys = [],\n queryParams = null;\n if ((typeof params === 'undefined' ? 'undefined' : _typeof(params)) == 'object') {\n pkeys = _.keys(params);\n queryParams = {};\n }\n pkeys.forEach(function (pkey) {\n var prevURI = uri;\n uri = uri.replace(new RegExp(':' + pkey), params[pkey]);\n if (prevURI == uri) {\n queryParams[pkey] = params[pkey];\n }\n });\n config.params = queryParams;\n $http.post(httpProtocol() + server + uri + suffix, data, config).success(function (data, status, headers, config) {\n resolve(data);\n }).error(function (data, status, headers, config) {\n reject(data);\n });\n }));\n };\n }\n\n var wsMap = {};\n\n function _ws(uri) {\n var sock = wsMap[uri] || new WebSocket(uri);\n wsMap[uri] = sock;\n sock.onclose = function (e) {\n console.log('close');\n console.log(e);\n };\n sock.onerror = function (e) {\n console.log('onerror');\n console.log(e);\n };\n var opened = false,\n openedCallback = void 0;\n sock.onopen = function () {\n opened = true;\n openedCallback && openedCallback();\n };\n var listener = void 0,\n messageType = void 0;\n sock.onmessage = function (e) {\n var res = JSON.parse(e.data);\n if (res.type == 'log') {\n for (var i = 0, len = res.value.length; i < len; i++) {\n var log = res.value[i];\n // console[log.level](log.msg);\n }\n }\n if (listener && (messageType === undefined || res.type === messageType)) {\n listener(res);\n }\n };\n return {\n on: function on(type, callback) {\n messageType = type;\n listener = callback;\n },\n whenOpened: function whenOpened() {\n return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!opened) {\n _context.next = 4;\n break;\n }\n\n return _context.abrupt('return', true);\n\n case 4:\n _context.next = 6;\n return Q.Promise(function (resolve) {\n openedCallback = resolve;\n });\n\n case 6:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n },\n send: function send(msg) {\n return sock.send(msg);\n }\n };\n }\n\n return {\n getExportURL: function getExportURL() {\n return httpProtocol() + server + '/webmin/data/duniter_export';\n },\n getImportURL: function getImportURL() {\n return httpProtocol() + server + '/webmin/data/duniter_import';\n },\n isNodePubliclyReachable: getResource('/webmin/server/reachable'),\n ws: function ws() {\n return _ws(wsProtocol() + server + '/webmin/ws');\n },\n wsBlock: function wsBlock() {\n return _ws(wsProtocol() + server + '/webmin/ws_block');\n },\n wsPeer: function wsPeer() {\n return _ws(wsProtocol() + server + '/webmin/ws_peer');\n },\n summary: getResource('/webmin/summary'),\n powSummary: getResource('/webmin/summary/pow'),\n logsExport: function logsExport(nbLines) {\n return getResource('/webmin/logs/export/' + nbLines)();\n },\n blockchain: {\n blocks: function blocks(opts) {\n return getResource('/webmin/blockchain/blocks/' + opts.count + '/' + opts.from)();\n },\n block_add: postResource('/webmin/blockchain/add')\n },\n server: {\n http: {\n start: getResource('/webmin/server/http/start'),\n stop: getResource('/webmin/server/http/stop'),\n openUPnP: getResource('/webmin/server/http/upnp/open'),\n regularUPnP: getResource('/webmin/server/http/upnp/regular')\n },\n services: {\n startAll: getResource('/webmin/server/services/start_all'),\n stopAll: getResource('/webmin/server/services/stop_all')\n },\n sendConf: postResource('/webmin/server/send_conf'),\n netConf: postResource('/webmin/server/net_conf'),\n keyConf: postResource('/webmin/server/key_conf'),\n cpuConf: postResource('/webmin/server/cpu_conf'),\n testSync: postResource('/webmin/server/test_sync'),\n startSync: postResource('/webmin/server/start_sync'),\n previewNext: getResource('/webmin/server/preview_next'),\n autoConfNetwork: getResource('/webmin/server/auto_conf_network'),\n resetData: getResource('/webmin/server/reset/data'),\n republishNewSelfPeer: getResource('/webmin/server/republish_selfpeer')\n },\n key: {\n preview: postResource('/webmin/key/preview')\n },\n network: {\n interfaces: getResource('/webmin/network/interfaces'),\n selfPeer: getResource('/webmin/network/self'),\n peers: getResource('/webmin/network/peers'),\n ws2p: {\n info: getResource('/webmin/network/ws2p/info'),\n heads: getResource('/webmin/network/ws2p/heads'),\n conf: getResource('/webmin/network/ws2p/conf')\n }\n },\n currency: {\n parameters: getResource('/webmin/currency/parameters')\n },\n plugin: {\n allModules: getResource('/webmin/plug/modules'),\n uiModules: getResource('/webmin/plug/ui_modules'),\n uiGetMenuInjection: function uiGetMenuInjection(moduleName) {\n return getResource('/webmin/plug/ui_modules/inject/' + moduleName)();\n },\n checkAccess: getResource('/webmin/plug/check_access'),\n addPackage: function addPackage(pkg) {\n return postResource('/webmin/plug/add/')({ pkg: pkg });\n },\n removePackage: function removePackage(pkg) {\n return postResource('/webmin/plug/rem/')({ pkg: pkg });\n }\n }\n };\n }\n var server = window.location.hostname;\n var port = window.location.port;\n var service = Webmin([server, port].join(':'));\n service.instance = Webmin;\n return service;\n });\n};\n"]} \ No newline at end of file diff --git a/public/libraries.js b/public/libraries.js index 894ea7f30f7cc92e88978e34ac430f6dc174dc76..2032845d4757c28a377b3a474f1f19156f5ab709 100644 --- a/public/libraries.js +++ b/public/libraries.js @@ -47191,7 +47191,66 @@ ngFileUpload.service('UploadExif', ['UploadResize', '$q', function (UploadResize }]); -"use strict"; +'use strict'; + +/* jshint ignore:start */ +(function () { + var WebSocket = window.WebSocket || window.MozWebSocket; + var br = window.brunch = window.brunch || {}; + var ar = br['auto-reload'] = br['auto-reload'] || {}; + if (!WebSocket || ar.disabled) return; + + var cacheBuster = function cacheBuster(url) { + var date = Math.round(Date.now() / 1000).toString(); + url = url.replace(/(\&|\\?)cacheBuster=\d*/, ''); + return url + (url.indexOf('?') >= 0 ? '&' : '?') + 'cacheBuster=' + date; + }; + + var browser = navigator.userAgent.toLowerCase(); + var forceRepaint = ar.forceRepaint || browser.indexOf('chrome') > -1; + + var reloaders = { + page: function page() { + window.location.reload(true); + }, + + stylesheet: function stylesheet() { + [].slice.call(document.querySelectorAll('link[rel=stylesheet]')).filter(function (link) { + var val = link.getAttribute('data-autoreload'); + return link.href && val != 'false'; + }).forEach(function (link) { + link.href = cacheBuster(link.href); + }); + + // Hack to force page repaint after 25ms. + if (forceRepaint) setTimeout(function () { + document.body.offsetHeight; + }, 25); + } + }; + var port = ar.port || 9485; + var host = br.server || window.location.hostname || 'localhost'; + + var connect = function connect() { + var connection = new WebSocket('ws://' + host + ':' + port); + connection.onmessage = function (event) { + if (ar.disabled) return; + var message = event.data; + var reloader = reloaders[message] || reloaders.page; + reloader(); + }; + connection.onerror = function () { + if (connection.readyState) connection.close(); + }; + connection.onclose = function () { + window.setTimeout(connect, 1000); + }; + }; + connect(); +})(); +/* jshint ignore:end */ + +;"use strict"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; diff --git a/public/templates.js b/public/templates.js index 757da02e18fc35daca6581c92a82d3e4a89ed015..52e1b500d0ba295feb230a6475f90ed16877da4a 100644 --- a/public/templates.js +++ b/public/templates.js @@ -438,7 +438,7 @@ var buf = []; var jade_mixins = {}; var jade_interp; -buf.push("<main class=\"syncMain\"><div class=\"container\"><div class=\"row\"><div class=\"s12 center\"><div class=\"card\"><div class=\"card-content\"><i class=\"fa fa-cloud-download fa-5x\"></i><h1 translate=\"sync.title\" class=\"card-title\"></h1><p translate=\"sync.message\"></p></div><div class=\"card-action\"><form class=\"row\"><div class=\"input-field col s12 m3\"><p><input type=\"radio\" name=\"groupeMode\" value=\"simplified\" id=\"radio1\" ng-model=\"sync_mode\" ng-disabled=\"synchronizing\"/><label for=\"radio1\">{{ 'sync.mode.simplified' | translate }}</label></p><p><input type=\"radio\" name=\"groupeMode\" value=\"manual\" id=\"radio2\" ng-model=\"sync_mode\" ng-disabled=\"synchronizing\"/><label for=\"radio2\">{{ 'sync.mode.manual' | translate }}</label></p></div><div class=\"input-field col s12 m6\"><div ng-show=\"sync_mode == 'simplified'\" class=\"input-field col s12\"><select ng-model=\"simplified_host\" ng-change=\"checkNode()\" ng-disabled=\"synchronizing\" class=\"browser-default\"><option value=\"\" disabled=\"disabled\" selected=\"selected\">{{ 'sync.simplified.default_option' | translate }}</option><optgroup label=\"{{ 'sync.simplified.currency' | translate }} « Ğune »\"><option value=\"g1.duniter.org:443\">https://g1.duniter.org {{ 'sync.simplified.main_mirror' | translate }}</option><option value=\"g1.duniter.org:80\">http://g1.duniter.org {{ 'sync.simplified.other mirror' | translate }}</option></optgroup><optgroup label=\"{{ 'sync.simplified.currency' | translate }} « Ğune-TEST »\"><option value=\"g1-test.duniter.org:443\">https://g1-test.duniter.org {{ 'sync.simplified.main_mirror' | translate }}</option><option value=\"g1-test.duniter.org:80\">http://g1-test.duniter.org {{ 'sync.simplified.other mirror' | translate }}</option></optgroup></select><label>{{ 'sync.simplified.choose' | translate }}</label></div><div ng-show=\"sync_mode != 'simplified'\" class=\"input-field col s8\"><i class=\"prefix material-icons\">language</i><input id=\"host\" type=\"text\" ng-model=\"host\"/><label for=\"host\">{{ 'sync.host' | translate }}</label></div><div ng-show=\"sync_mode != 'simplified'\" class=\"input-field col s4\"><i class=\"prefix fa fa-plug\"></i><input id=\"port\" type=\"number\" ng-model=\"port\"/><label for=\"port\">{{ 'sync.port' | translate }}</label></div></div><div class=\"col s12 m3\"><div ng-if=\"checking\" class=\"preloader-wrapper active small\"><div class=\"spinner-layer spinner-blue-only\"><div class=\"circle-clipper left\"><div class=\"circle\"></div></div></div></div><div ng-show=\"sync_mode != 'simplified'\" class=\"input-field\"><button ng-show=\"!checking\" ng-disabled=\"synchronizing || (sync_mode != 'simplified' && !(host && port))\" ng-click=\"checkNode()\" class=\"btn-large waves-effect waves-light\"><i class=\"left fa fa-wifi\"></i><span translate=\"sync.check\"></span></button></div></div></form><div class=\"row\"><div class=\"col s12\"><blockquote ng-show=\"sync_error\" class=\"card-panel left-align\">{{ sync_error | translate }}</blockquote><blockquote ng-show=\"sync_message\" class=\"info card-panel left-align\">{{ sync_message }}</blockquote></div></div><div class=\"row\"><button ng-disabled=\"!checked_host || synchronizing\" ng-click=\"startSync()\" class=\"btn-large waves-effect waves-light\"><i class=\"left fa fa-cloud-download\"></i><span translate=\"sync.start\"></span></button></div><div ng-show=\"synchronizing\" class=\"row\"><div class=\"col s8 m9\"><div class=\"progress\"><div style=\"width: {{ down_percent }}%\" class=\"determinate\"></div></div></div><div class=\"col s4 m3 left-align\"><span>Downloading... ({{ down_percent }}%)</span></div><div class=\"col s8 m9\"><div class=\"progress\"><div style=\"width: {{ apply_percent }}%\" class=\"determinate\"></div></div></div><div class=\"col s4 m3 left-align\"><span>Applying... ({{ apply_percent }}%)</span></div></div><blockquote ng-show=\"sync_failed\" class=\"card-panel left-align\">{{ 'sync.failed' | translate }}</blockquote></div></div></div></div></div></main>");;return buf.join(""); +buf.push("<main class=\"syncMain\"><div class=\"container\"><div class=\"row\"><div class=\"s12 center\"><div class=\"card\"><div class=\"card-content\"><i class=\"fa fa-cloud-download fa-5x\"></i><h1 translate=\"sync.title\" class=\"card-title\"></h1><p translate=\"sync.message\"></p></div><div class=\"card-action\"><form class=\"row\"><div class=\"input-field col s12 m3\"><p><input type=\"radio\" name=\"groupeMode\" value=\"simplified\" id=\"radio1\" ng-model=\"sync_mode\" ng-disabled=\"synchronizing\"/><label for=\"radio1\">{{ 'sync.mode.simplified' | translate }}</label></p><p><input type=\"radio\" name=\"groupeMode\" value=\"manual\" id=\"radio2\" ng-model=\"sync_mode\" ng-disabled=\"synchronizing\"/><label for=\"radio2\">{{ 'sync.mode.manual' | translate }}</label></p></div><div class=\"input-field col s12 m6\"><div ng-show=\"sync_mode == 'simplified'\" class=\"input-field col s12\"><select ng-model=\"simplified_host\" ng-change=\"checkNode()\" ng-disabled=\"synchronizing\" class=\"browser-default\"><option value=\"\" disabled=\"disabled\" selected=\"selected\">{{ 'sync.simplified.default_option' | translate }}</option><optgroup label=\"{{ 'sync.simplified.currency' | translate }} « Ğune »\"><option value=\"g1.duniter.org:443\">https://g1.duniter.org {{ 'sync.simplified.main_mirror' | translate }}</option><option value=\"g1.duniter.org:80\">http://g1.duniter.org {{ 'sync.simplified.other mirror' | translate }}</option></optgroup><optgroup label=\"{{ 'sync.simplified.currency' | translate }} « Ğune-TEST »\"><option value=\"g1-test.duniter.org:443\">https://g1-test.duniter.org {{ 'sync.simplified.main_mirror' | translate }}</option><option value=\"g1-test.duniter.org:80\">http://g1-test.duniter.org {{ 'sync.simplified.other mirror' | translate }}</option></optgroup></select><label>{{ 'sync.simplified.choose' | translate }}</label></div><div ng-show=\"sync_mode != 'simplified'\" class=\"input-field col s8\"><i class=\"prefix material-icons\">language</i><input id=\"host\" type=\"text\" ng-model=\"host\"/><label for=\"host\">{{ 'sync.host' | translate }}</label></div><div ng-show=\"sync_mode != 'simplified'\" class=\"input-field col s4\"><i class=\"prefix fa fa-plug\"></i><input id=\"port\" type=\"number\" ng-model=\"port\"/><label for=\"port\">{{ 'sync.port' | translate }}</label></div></div><div class=\"col s12 m3\"><div ng-if=\"checking\" class=\"preloader-wrapper active small\"><div class=\"spinner-layer spinner-blue-only\"><div class=\"circle-clipper left\"><div class=\"circle\"></div></div></div></div><div ng-show=\"sync_mode != 'simplified'\" class=\"input-field\"><button ng-show=\"!checking\" ng-disabled=\"synchronizing || (sync_mode != 'simplified' && !(host && port))\" ng-click=\"checkNode()\" class=\"btn-large waves-effect waves-light\"><i class=\"left fa fa-wifi\"></i><span translate=\"sync.check\"></span></button></div></div></form><div class=\"row\"><div class=\"col s12\"><blockquote ng-show=\"sync_error\" class=\"card-panel left-align\">{{ sync_error | translate }}</blockquote><blockquote ng-show=\"sync_message\" class=\"info card-panel left-align\">{{ sync_message }}</blockquote></div></div><div class=\"row\"><button ng-disabled=\"!checked_host || synchronizing\" ng-click=\"startSync()\" class=\"btn-large waves-effect waves-light\"><i class=\"left fa fa-cloud-download\"></i><span translate=\"sync.start\"></span></button></div><div ng-show=\"synchronizing\" class=\"row\"><div class=\"col s8 m9\"><div class=\"progress\"><div style=\"width: {{ down_percent }}%\" class=\"determinate\"></div></div></div><div class=\"col s4 m3 left-align\"><span>Download... ({{ down_percent }}%)</span></div><div class=\"col s8 m9\"><div class=\"progress\"><div style=\"width: {{ storage_percent }}%\" class=\"determinate\"></div></div></div><div class=\"col s4 m3 left-align\"><span>Storage... ({{ storage_percent }}%)</span></div><div class=\"col s8 m9\"><div class=\"progress\"><div style=\"width: {{ apply_percent }}%\" class=\"determinate\"></div></div></div><div class=\"col s4 m3 left-align\"><span>Apply... ({{ apply_percent }}%)</span></div><div class=\"col s8 m9\"><div class=\"progress\"><div style=\"width: {{ sbx_percent }}%\" class=\"determinate\"></div></div></div><div class=\"col s4 m3 left-align\"><span>Sandbox... ({{ sbx_percent }}%)</span></div><div class=\"col s8 m9\"><div class=\"progress\"><div style=\"width: {{ peers_percent }}%\" class=\"determinate\"></div></div></div><div class=\"col s4 m3 left-align\"><span>Peers... ({{ peers_percent }}%)</span></div></div><blockquote ng-show=\"sync_failed\" class=\"card-panel left-align\">{{ 'sync.failed' | translate }}</blockquote></div></div></div></div></div></main>");;return buf.join(""); }; if (typeof define === 'function' && define.amd) { define([], function() { diff --git a/server/lib/routes.js b/server/lib/routes.js index 242d89a3b4267a52f8dd20b26acf1c8756c46cc2..00acd3c69c890ec76b4ca2968a001dde4448d667 100644 --- a/server/lib/routes.js +++ b/server/lib/routes.js @@ -115,6 +115,24 @@ module.exports = { value: data.applied })); } + if (data.saved !== undefined) { + wssEvents.broadcast(JSON.stringify({ + type: 'saved', + value: data.saved + })); + } + if (data.sandbox !== undefined) { + wssEvents.broadcast(JSON.stringify({ + type: 'sandbox', + value: data.sandbox + })); + } + if (data.peersSync !== undefined) { + wssEvents.broadcast(JSON.stringify({ + type: 'peersSync', + value: data.peersSync + })); + } if (data.sync !== undefined) { wssEvents.broadcast(JSON.stringify({ type: 'sync',