@evomap/evolver 1.89.17 → 1.89.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja-JP.md +1 -1
- package/README.ko-KR.md +1 -1
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/index.js +272 -18
- package/package.json +7 -2
- package/src/adapters/claudeCode.js +16 -18
- package/src/adapters/hookAdapter.js +92 -5
- package/src/adapters/scripts/evolver-session-start.js +98 -0
- package/src/atp/atpExecute.js +3 -1
- package/src/atp/hubClient.js +5 -3
- package/src/atp/serviceHelper.js +3 -2
- package/src/evolve/guards.js +1 -1
- package/src/evolve/pipeline/collect.js +1 -1
- package/src/evolve/pipeline/dispatch.js +1 -1
- package/src/evolve/pipeline/enrich.js +1 -1
- package/src/evolve/pipeline/hub.js +1 -1
- package/src/evolve/pipeline/select.js +1 -1
- package/src/evolve/pipeline/signals.js +1 -1
- package/src/evolve/utils.js +1 -1
- package/src/evolve.js +1 -1
- package/src/gep/a2aProtocol.js +1 -1
- package/src/gep/antiAbuseTelemetry.js +1 -1
- package/src/gep/autoDistillConv.js +1 -1
- package/src/gep/autoDistillLlm.js +1 -1
- package/src/gep/candidateEval.js +1 -1
- package/src/gep/candidates.js +1 -1
- package/src/gep/cliContracts.js +37 -1
- package/src/gep/contentHash.js +1 -1
- package/src/gep/conversationDistiller.js +1 -1
- package/src/gep/conversationSniffer.js +1 -1
- package/src/gep/crypto.js +1 -1
- package/src/gep/curriculum.js +1 -1
- package/src/gep/deviceId.js +1 -1
- package/src/gep/directoryClient.js +7 -3
- package/src/gep/envFingerprint.js +1 -1
- package/src/gep/epigenetics.js +1 -1
- package/src/gep/execBridge.js +1 -1
- package/src/gep/explore.js +1 -1
- package/src/gep/hash.js +1 -1
- package/src/gep/hubFetch.js +1 -1
- package/src/gep/hubReview.js +1 -1
- package/src/gep/hubSearch.js +1 -1
- package/src/gep/hubVerify.js +1 -1
- package/src/gep/learningSignals.js +1 -1
- package/src/gep/memoryGraph.js +1 -1
- package/src/gep/memoryGraphAdapter.js +1 -1
- package/src/gep/mutation.js +1 -1
- package/src/gep/narrativeMemory.js +1 -1
- package/src/gep/oauthLogin.js +3 -5
- package/src/gep/openPRRegistry.js +1 -1
- package/src/gep/personality.js +1 -1
- package/src/gep/policyCheck.js +1 -1
- package/src/gep/privacyClient.js +28 -10
- package/src/gep/prompt.js +1 -1
- package/src/gep/recallInject.js +1 -1
- package/src/gep/recallVerifier.js +1 -1
- package/src/gep/reflection.js +1 -1
- package/src/gep/savingsCore.js +1 -1
- package/src/gep/selector.js +1 -1
- package/src/gep/skill2gep.js +329 -43
- package/src/gep/skill2gepAudit.js +303 -0
- package/src/gep/skillDistiller.js +1 -1
- package/src/gep/skillPublisher.js +8 -3
- package/src/gep/solidify.js +1 -1
- package/src/gep/strategy.js +1 -1
- package/src/gep/taskReceiver.js +3 -2
- package/src/gep/tokenSavings.js +1 -1
- package/src/gep/trajectoryExport.js +1 -0
- package/src/gep/validator/index.js +7 -2
- package/src/gep/validator/reporter.js +7 -2
- package/src/gep/validator/stakeBootstrap.js +7 -2
- package/src/gep/workspaceKeychain.js +1 -1
- package/src/proxy/clientSettings.js +405 -0
- package/src/proxy/extensions/traceControl.js +1 -1
- package/src/proxy/index.js +13 -5
- package/src/proxy/inject.js +1 -1
- package/src/proxy/lifecycle/manager.js +82 -16
- package/src/proxy/mailbox/state.js +207 -0
- package/src/proxy/mailbox/store.js +164 -64
- package/src/proxy/router/messages_route.js +56 -4
- package/src/proxy/server/http.js +40 -6
- package/src/proxy/sync/inbound.js +31 -12
- package/src/proxy/sync/outbound.js +164 -24
- package/src/proxy/trace/extractor.js +1 -1
- package/src/proxy/trace/usage.js +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// or cannot sandbox-execute will simply skip and try again next cycle.
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
-
const { getNodeId, buildHubHeaders } = require('../a2aProtocol');
|
|
12
|
+
const { getNodeId, buildHubHeaders, buildNodeScopedHubHeaders } = require('../a2aProtocol');
|
|
13
13
|
const { hubFetch } = require('../hubFetch');
|
|
14
14
|
const { runInSandbox, runPreflight } = require('./sandboxExecutor');
|
|
15
15
|
const { buildReportPayload, submitReport } = require('./reporter');
|
|
@@ -20,6 +20,11 @@ const { resolveHubUrl: resolveDefaultHubUrl } = require('../../config');
|
|
|
20
20
|
const FETCH_TIMEOUT_MS = Number(process.env.EVOLVER_VALIDATOR_FETCH_TIMEOUT_MS) || 8_000;
|
|
21
21
|
const MAX_TASKS_PER_CYCLE = Math.max(1, Number(process.env.EVOLVER_VALIDATOR_MAX_TASKS_PER_CYCLE) || 2);
|
|
22
22
|
|
|
23
|
+
function buildValidatorHubHeaders() {
|
|
24
|
+
const buildHeaders = buildNodeScopedHubHeaders || buildHubHeaders;
|
|
25
|
+
return buildHeaders();
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
// Three-tier resolution:
|
|
24
29
|
// 1. Local env (highest priority - user escape hatch). Both ON and OFF are honored.
|
|
25
30
|
// 2. Persisted feature flag from disk (set by hub mailbox).
|
|
@@ -80,7 +85,7 @@ async function fetchValidationTasks() {
|
|
|
80
85
|
try {
|
|
81
86
|
const res = await hubFetch(url, {
|
|
82
87
|
method: 'POST',
|
|
83
|
-
headers:
|
|
88
|
+
headers: buildValidatorHubHeaders(),
|
|
84
89
|
body: JSON.stringify(msg),
|
|
85
90
|
signal: controller.signal,
|
|
86
91
|
});
|
|
@@ -6,13 +6,18 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const crypto = require('crypto');
|
|
9
|
-
const { buildHubHeaders, getHubUrl, getNodeId } = require('../a2aProtocol');
|
|
9
|
+
const { buildHubHeaders, buildNodeScopedHubHeaders, getHubUrl, getNodeId } = require('../a2aProtocol');
|
|
10
10
|
const { hubFetch } = require('../hubFetch');
|
|
11
11
|
const { captureEnvFingerprint } = require('../envFingerprint');
|
|
12
12
|
const { resolveHubUrl: resolveDefaultHubUrl } = require('../../config');
|
|
13
13
|
|
|
14
14
|
const REPORT_TIMEOUT_MS = Number(process.env.EVOLVER_VALIDATOR_REPORT_TIMEOUT_MS) || 10_000;
|
|
15
15
|
|
|
16
|
+
function buildValidatorReportHeaders() {
|
|
17
|
+
const buildHeaders = buildNodeScopedHubHeaders || buildHubHeaders;
|
|
18
|
+
return buildHeaders();
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
// Per-command stderr/stdout tail bundled into the report. Bounded so a noisy
|
|
17
22
|
// validator cannot blow up the Hub's a2a/report payload size.
|
|
18
23
|
const REPORT_CMD_TAIL_CHARS = 240;
|
|
@@ -175,7 +180,7 @@ async function submitReport(payload) {
|
|
|
175
180
|
try {
|
|
176
181
|
const res = await hubFetch(url, {
|
|
177
182
|
method: 'POST',
|
|
178
|
-
headers:
|
|
183
|
+
headers: buildValidatorReportHeaders(),
|
|
179
184
|
body: JSON.stringify(msg),
|
|
180
185
|
signal: controller.signal,
|
|
181
186
|
});
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
const crypto = require('crypto');
|
|
28
28
|
const fs = require('fs');
|
|
29
29
|
const path = require('path');
|
|
30
|
-
const { buildHubHeaders, getHubUrl, getNodeId } = require('../a2aProtocol');
|
|
30
|
+
const { buildHubHeaders, buildNodeScopedHubHeaders, getHubUrl, getNodeId } = require('../a2aProtocol');
|
|
31
31
|
const { hubFetch } = require('../hubFetch');
|
|
32
32
|
const { getEvomapPath } = require('../paths');
|
|
33
33
|
const { resolveHubUrl: resolveDefaultHubUrl } = require('../../config');
|
|
@@ -72,6 +72,11 @@ function logStakeEvent(event, data) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
function buildStakeHubHeaders() {
|
|
76
|
+
const buildHeaders = buildNodeScopedHubHeaders || buildHubHeaders;
|
|
77
|
+
return buildHeaders();
|
|
78
|
+
}
|
|
79
|
+
|
|
75
80
|
// Retry state machine: remembers last outcome classification so we can pick
|
|
76
81
|
// the right backoff bucket.
|
|
77
82
|
//
|
|
@@ -241,7 +246,7 @@ async function ensureValidatorStake(opts) {
|
|
|
241
246
|
try {
|
|
242
247
|
res = await hubFetch(url, {
|
|
243
248
|
method: 'POST',
|
|
244
|
-
headers:
|
|
249
|
+
headers: buildStakeHubHeaders(),
|
|
245
250
|
body: JSON.stringify(body),
|
|
246
251
|
signal: controller.signal,
|
|
247
252
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2c4d26=_0x2e4e;function _0x4269(){const _0x283ea9=['\x57\x35\x34\x6f\x73\x64\x78\x64\x4b\x71','\x57\x50\x43\x75\x6d\x77\x52\x64\x49\x78\x38\x6e','\x57\x36\x78\x64\x52\x53\x6b\x44\x57\x51\x4b\x5a\x57\x37\x31\x54\x68\x71','\x57\x37\x6e\x47\x6e\x61','\x6d\x76\x70\x63\x55\x6d\x6f\x47\x70\x63\x4f','\x77\x43\x6f\x59\x57\x50\x66\x64\x57\x37\x61','\x6a\x78\x52\x64\x48\x66\x6a\x34\x57\x4f\x46\x63\x56\x4d\x78\x63\x51\x76\x76\x53\x44\x59\x34','\x63\x43\x6f\x5a\x62\x38\x6b\x4e\x57\x52\x30\x37\x75\x57','\x6d\x53\x6b\x2b\x57\x37\x33\x64\x53\x43\x6b\x6c\x57\x52\x2f\x64\x52\x32\x64\x64\x53\x73\x6a\x4a\x57\x4f\x37\x64\x4f\x61','\x57\x51\x66\x57\x57\x51\x44\x54\x57\x50\x65','\x57\x4f\x2f\x63\x53\x74\x46\x63\x48\x67\x54\x62\x57\x50\x70\x64\x56\x61','\x46\x43\x6f\x73\x71\x68\x78\x64\x4c\x57','\x6f\x33\x66\x37\x57\x51\x69\x6c','\x57\x4f\x4e\x64\x4d\x38\x6b\x67\x6b\x53\x6f\x42','\x57\x35\x52\x63\x4d\x53\x6f\x78\x66\x49\x30\x51\x57\x52\x4a\x63\x54\x6d\x6b\x33\x6a\x6d\x6f\x73\x57\x35\x79\x6e','\x57\x36\x42\x64\x4d\x4a\x4f','\x57\x37\x69\x57\x73\x4e\x69','\x69\x38\x6b\x30\x57\x34\x54\x79\x57\x50\x34','\x57\x36\x5a\x64\x52\x71\x39\x73\x57\x36\x7a\x34\x79\x4d\x6d','\x57\x52\x6e\x4c\x64\x64\x6c\x64\x49\x53\x6b\x66\x6a\x61\x78\x64\x47\x72\x37\x63\x48\x59\x53\x50','\x57\x36\x4f\x74\x74\x53\x6f\x48\x66\x38\x6f\x33\x6c\x65\x6d','\x57\x50\x74\x64\x49\x6d\x6b\x6f','\x76\x38\x6f\x70\x57\x50\x43\x37\x57\x36\x61\x41\x68\x65\x66\x67\x76\x6d\x6f\x6f\x57\x51\x71','\x65\x68\x47\x49\x57\x34\x38\x58\x43\x53\x6f\x59\x41\x67\x70\x64\x4e\x6d\x6f\x57\x57\x50\x34','\x57\x4f\x37\x63\x4c\x61\x48\x6a','\x74\x53\x6f\x7a\x57\x36\x38\x6e','\x57\x37\x31\x48\x6e\x71','\x73\x6d\x6b\x7a\x57\x50\x42\x64\x49\x6d\x6f\x43\x57\x50\x50\x43\x57\x4f\x37\x64\x55\x4c\x43','\x6d\x53\x6f\x54\x57\x37\x56\x63\x56\x43\x6f\x4e\x57\x50\x44\x71\x57\x4f\x4b','\x78\x43\x6b\x71\x57\x36\x5a\x64\x4e\x47','\x57\x51\x68\x63\x51\x74\x6e\x53\x57\x51\x53','\x63\x38\x6f\x51\x57\x35\x6c\x63\x4a\x43\x6f\x65','\x57\x51\x68\x63\x47\x4e\x66\x51\x57\x34\x47\x4d\x57\x4f\x42\x64\x52\x4d\x65\x47\x68\x6d\x6b\x59\x57\x51\x57','\x73\x6d\x6f\x73\x57\x34\x6d\x73\x57\x37\x6d\x54\x6e\x47','\x78\x6d\x6f\x4f\x57\x51\x39\x45\x57\x37\x61','\x68\x6d\x6f\x71\x57\x35\x6c\x63\x4b\x43\x6f\x44\x57\x51\x6a\x51','\x57\x35\x4b\x45\x72\x5a\x69','\x57\x36\x42\x64\x4b\x64\x53\x4d','\x72\x53\x6f\x35\x57\x51\x6a\x54\x57\x37\x53\x64\x61\x4b\x47','\x6e\x6d\x6b\x69\x6a\x73\x42\x63\x47\x53\x6b\x50\x6e\x4e\x6c\x64\x51\x43\x6b\x5a\x57\x37\x71','\x57\x34\x52\x64\x4d\x43\x6f\x53\x57\x50\x70\x64\x52\x61','\x6c\x66\x58\x7a\x6b\x71','\x72\x38\x6b\x6c\x57\x34\x70\x64\x50\x58\x61','\x57\x52\x34\x5a\x57\x52\x6d\x74\x57\x36\x6c\x64\x4c\x38\x6b\x34\x43\x61','\x64\x66\x38\x41\x57\x51\x5a\x63\x53\x43\x6b\x79\x72\x53\x6f\x47','\x57\x50\x71\x35\x72\x53\x6f\x47\x78\x6d\x6b\x49\x79\x43\x6b\x32\x57\x51\x79','\x73\x43\x6f\x6f\x57\x36\x43\x73\x57\x36\x69\x51','\x68\x38\x6f\x31\x61\x43\x6f\x37\x57\x52\x62\x4a\x62\x77\x47','\x57\x36\x4a\x64\x4f\x47\x31\x74\x57\x36\x54\x57\x42\x47','\x57\x35\x39\x72\x57\x37\x66\x6e\x57\x50\x65','\x57\x4f\x58\x37\x57\x4f\x54\x6a\x57\x51\x71','\x65\x43\x6b\x74\x57\x35\x58\x4b\x57\x50\x75','\x57\x50\x56\x63\x4a\x49\x39\x73\x57\x51\x65\x37\x6b\x30\x53','\x57\x37\x70\x64\x48\x74\x47\x2b\x57\x4f\x75','\x57\x34\x65\x7a\x6a\x43\x6b\x4a\x7a\x53\x6b\x6e\x57\x50\x75\x46','\x57\x52\x78\x63\x4e\x6d\x6f\x6e\x57\x35\x39\x73','\x67\x67\x46\x63\x4a\x38\x6f\x64\x69\x6d\x6f\x6e\x57\x34\x6d\x6c','\x61\x53\x6b\x53\x57\x37\x72\x5a\x57\x51\x71','\x57\x37\x5a\x64\x4d\x38\x6f\x33\x57\x4f\x4e\x64\x56\x57','\x74\x43\x6b\x36\x57\x4f\x6d\x56\x70\x58\x43\x61\x57\x50\x6c\x63\x4d\x6d\x6b\x6a','\x57\x34\x39\x4d\x57\x34\x52\x64\x48\x53\x6f\x68\x6e\x33\x30\x39','\x74\x4a\x4e\x63\x49\x48\x57\x77','\x74\x63\x6c\x64\x4d\x43\x6f\x70\x6b\x53\x6f\x37\x57\x34\x79\x52\x71\x61','\x57\x34\x6e\x36\x68\x43\x6f\x4f\x42\x53\x6b\x45\x45\x6d\x6b\x4f','\x57\x36\x75\x62\x6d\x6d\x6b\x34\x43\x57','\x45\x43\x6f\x53\x57\x34\x61\x56\x57\x37\x4b','\x7a\x74\x4e\x63\x4a\x57\x6d\x49\x57\x35\x65','\x57\x34\x44\x54\x74\x6d\x6b\x6a\x57\x50\x4f','\x78\x38\x6f\x53\x64\x38\x6f\x58\x57\x52\x6a\x52\x63\x67\x4f','\x63\x53\x6f\x68\x57\x34\x2f\x63\x4d\x57','\x77\x43\x6b\x7a\x57\x4f\x53\x50\x57\x52\x30','\x69\x38\x6f\x49\x57\x34\x72\x78\x69\x58\x34\x52\x57\x51\x38','\x6a\x33\x54\x37\x70\x38\x6b\x4e','\x70\x4b\x58\x6d\x6e\x6d\x6b\x31\x57\x37\x69','\x57\x4f\x4b\x75\x6e\x4b\x4e\x64\x49\x77\x53\x42\x57\x51\x4b','\x57\x52\x58\x65\x41\x6d\x6f\x41\x65\x38\x6f\x63\x63\x65\x6d','\x63\x43\x6f\x5a\x62\x38\x6b\x36\x57\x52\x6d\x53\x72\x74\x6d','\x76\x43\x6f\x45\x45\x68\x46\x64\x50\x61','\x45\x6d\x6f\x51\x57\x52\x64\x63\x4e\x43\x6b\x4e','\x7a\x6d\x6f\x54\x57\x52\x64\x63\x4c\x38\x6f\x42\x57\x37\x33\x63\x51\x65\x65','\x57\x35\x7a\x6d\x7a\x53\x6b\x64\x57\x50\x54\x74\x63\x33\x30','\x57\x52\x37\x63\x53\x53\x6f\x68\x57\x36\x35\x32\x57\x52\x6d','\x57\x34\x57\x41\x74\x5a\x42\x64\x55\x6d\x6b\x47\x57\x36\x5a\x63\x48\x57','\x6d\x53\x6b\x62\x69\x63\x64\x63\x48\x38\x6f\x45\x76\x75\x74\x64\x47\x53\x6b\x6d\x57\x36\x30\x53\x57\x51\x43','\x68\x53\x6f\x4c\x42\x57','\x57\x51\x68\x63\x48\x62\x44\x6d\x57\x50\x43','\x62\x72\x75\x34\x57\x50\x46\x63\x4c\x43\x6b\x31\x41\x57','\x57\x52\x4e\x63\x4e\x67\x6e\x32','\x44\x43\x6b\x4d\x70\x43\x6b\x2f\x57\x37\x34\x41\x57\x34\x46\x63\x49\x71','\x6c\x73\x64\x63\x55\x38\x6b\x51\x67\x48\x74\x64\x52\x53\x6f\x56\x57\x34\x79','\x63\x6d\x6f\x35\x57\x35\x35\x30','\x73\x6d\x6b\x75\x57\x36\x74\x64\x4d\x53\x6b\x6e\x57\x35\x4e\x63\x4b\x49\x57','\x6c\x4e\x44\x63\x57\x50\x30\x42\x57\x36\x62\x2b\x57\x36\x47','\x42\x43\x6f\x4a\x71\x32\x33\x64\x48\x57','\x57\x50\x44\x55\x57\x52\x39\x62\x57\x51\x4b\x6c\x57\x34\x37\x63\x53\x61','\x68\x6d\x6f\x5a\x65\x53\x6b\x6f\x57\x50\x71\x54\x77\x73\x4b','\x57\x35\x4b\x6a\x78\x73\x53','\x57\x4f\x6e\x35\x57\x34\x38','\x44\x4e\x74\x64\x49\x6d\x6b\x73\x6e\x61','\x57\x4f\x69\x6a\x6d\x6d\x6b\x70\x57\x50\x66\x4c\x64\x4c\x31\x56','\x70\x6d\x6f\x67\x57\x35\x42\x63\x4a\x6d\x6f\x77','\x64\x65\x4e\x63\x49\x38\x6f\x64\x62\x47','\x57\x37\x2f\x64\x54\x53\x6f\x4a\x57\x37\x6e\x48\x57\x50\x57\x74\x45\x71','\x43\x68\x4e\x64\x52\x38\x6b\x4c\x68\x73\x78\x64\x56\x6d\x6f\x57','\x63\x43\x6f\x67\x57\x35\x48\x75\x57\x36\x37\x63\x4c\x67\x50\x39\x65\x4d\x44\x5a\x57\x50\x4a\x64\x49\x71','\x63\x6d\x6b\x42\x57\x35\x61\x75\x57\x37\x47\x6b\x65\x78\x61','\x57\x52\x65\x75\x6f\x33\x52\x64\x47\x68\x4b\x62\x57\x52\x61','\x57\x36\x64\x64\x4d\x38\x6f\x71\x57\x52\x42\x64\x4e\x61','\x57\x34\x34\x64\x71\x63\x5a\x64\x4f\x6d\x6b\x5a\x57\x37\x56\x63\x49\x61','\x57\x35\x64\x63\x4b\x38\x6f\x62\x67\x61','\x62\x38\x6b\x61\x57\x34\x72\x52\x57\x52\x48\x6a\x6a\x68\x34','\x57\x50\x31\x33\x61\x38\x6f\x42\x77\x38\x6b\x43\x42\x71','\x57\x50\x35\x76\x68\x4d\x33\x63\x4f\x6d\x6b\x65\x57\x35\x4e\x63\x50\x38\x6f\x6e\x6c\x43\x6b\x69','\x68\x38\x6f\x31\x64\x47','\x71\x38\x6f\x34\x57\x52\x46\x63\x4e\x38\x6b\x6b','\x57\x51\x4c\x6c\x57\x50\x54\x36\x57\x50\x6d\x4a\x57\x36\x2f\x63\x4d\x71'];_0x4269=function(){return _0x283ea9;};return _0x4269();}(function(_0x5888b9,_0x252615){const _0x5b5b7f=_0x2e4e,_0x179307=_0x5888b9();while(!![]){try{const _0x24ce84=parseInt(_0x5b5b7f(0x220,'\x52\x65\x76\x74'))/(-0x2543+0xb95+0x19af)*(-parseInt(_0x5b5b7f(0x1fd,'\x4b\x4e\x4c\x40'))/(-0x26a3+-0x2655+0x3b*0x14e))+parseInt(_0x5b5b7f(0x1f0,'\x62\x51\x57\x41'))/(-0x2544+-0xb87+0x30ce*0x1)+-parseInt(_0x5b5b7f(0x209,'\x34\x47\x23\x4b'))/(0x2*-0x29+0x12*0x66+0x23*-0x32)*(parseInt(_0x5b5b7f(0x20f,'\x47\x79\x4a\x6f'))/(-0x9d0+0xa4*-0x29+0x2419*0x1))+-parseInt(_0x5b5b7f(0x20e,'\x44\x61\x42\x46'))/(0x1b2+0x559+-0x705)*(parseInt(_0x5b5b7f(0x1ea,'\x25\x75\x64\x41'))/(0x1*-0x1330+0x1*0x105d+0x2da))+parseInt(_0x5b5b7f(0x1c4,'\x44\x61\x42\x46'))/(0x28*0x3e+0x962+-0x130a)*(-parseInt(_0x5b5b7f(0x1f8,'\x66\x34\x38\x54'))/(0x11e2+-0x317*-0x1+-0x14f0))+parseInt(_0x5b5b7f(0x1d7,'\x6b\x45\x64\x5e'))/(0x1e78+-0x1*-0x16c3+0x9*-0x5e9)*(parseInt(_0x5b5b7f(0x202,'\x41\x48\x42\x5d'))/(-0x18bb+0x87b+0x1*0x104b))+parseInt(_0x5b5b7f(0x1c1,'\x34\x47\x23\x4b'))/(-0x1497+-0x1*-0x544+-0x1*-0xf5f);if(_0x24ce84===_0x252615)break;else _0x179307['push'](_0x179307['shift']());}catch(_0xa3151c){_0x179307['push'](_0x179307['shift']());}}}(_0x4269,-0x14d25+-0x1481*-0x2b+0x37c93));const _0x44256b=(function(){let _0x260bac=!![];return function(_0xb3ebb8,_0x26e9fc){const _0x53a886=_0x260bac?function(){const _0x12aa18=_0x2e4e;if(_0x26e9fc){const _0x1e58d8=_0x26e9fc[_0x12aa18(0x217,'\x41\x48\x42\x5d')](_0xb3ebb8,arguments);return _0x26e9fc=null,_0x1e58d8;}}:function(){};return _0x260bac=![],_0x53a886;};}()),_0x2db974=_0x44256b(this,function(){const _0x7c5542=_0x2e4e,_0x2fffbb={};_0x2fffbb[_0x7c5542(0x22a,'\x31\x59\x53\x47')]=_0x7c5542(0x1e4,'\x6e\x6e\x73\x59')+_0x7c5542(0x1db,'\x31\x51\x35\x64');const _0xcd8892=_0x2fffbb;return _0x2db974[_0x7c5542(0x216,'\x53\x43\x66\x2a')]()[_0x7c5542(0x22b,'\x31\x59\x53\x47')](_0xcd8892[_0x7c5542(0x1cb,'\x34\x47\x23\x4b')])[_0x7c5542(0x1ca,'\x47\x33\x4a\x6f')]()[_0x7c5542(0x1da,'\x49\x57\x68\x53')+_0x7c5542(0x1f1,'\x41\x48\x42\x5d')](_0x2db974)[_0x7c5542(0x210,'\x6b\x45\x64\x5e')](_0x7c5542(0x20d,'\x72\x2a\x35\x38')+_0x7c5542(0x1c5,'\x41\x48\x42\x5d'));});_0x2db974();const _0x1f32ca='\x65\x76\x6f\x6d\x61\x70\x2e\x65'+'\x76\x6f\x6c\x76\x65\x72\x2e\x77'+_0x2c4d26(0x211,'\x5b\x77\x58\x38')+_0x2c4d26(0x1cf,'\x77\x66\x26\x44'),_0x3c8c6e=/^[a-f0-9]{32,}$/i;let _0x18c44e=undefined;function _0x2e4e(_0x4ae2af,_0xd145b0){_0x4ae2af=_0x4ae2af-(0x175b+0x1*-0x1e3b+-0x1*-0x89d);const _0x2b5591=_0x4269();let _0x4fed36=_0x2b5591[_0x4ae2af];if(_0x2e4e['\x4b\x68\x74\x42\x79\x51']===undefined){var _0x343bc5=function(_0x5e47b7){const _0x17fcc3='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x582a4a='',_0x2f5102='',_0x4eebc7=_0x582a4a+_0x343bc5,_0x338088=(''+function(){return-0x1*0x11b9+-0x9a3+0x2*0xdae;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')!==-(0x1fd*-0xb+-0x13b5+0x2995);for(let _0x3b707c=0x1e0f+-0x6*0x46b+-0x38d,_0x39b1e1,_0x4a9d9b,_0x2b4213=0x50b*-0x5+-0xb*-0x2a5+-0x3e0;_0x4a9d9b=_0x5e47b7['\x63\x68\x61\x72\x41\x74'](_0x2b4213++);~_0x4a9d9b&&(_0x39b1e1=_0x3b707c%(-0xb2c+0x141*0x1+-0x9ef*-0x1)?_0x39b1e1*(0x1*0x11e7+-0x1*0x6c5+-0x18e*0x7)+_0x4a9d9b:_0x4a9d9b,_0x3b707c++%(-0x18a+0xd0b+-0x11*0xad))?_0x582a4a+=_0x338088||_0x4eebc7['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2b4213+(0x4+-0x1d48+0x1d4e))-(0x1*-0x617+0x4*-0x679+0x2005*0x1)!==0xbdd+-0x1f41+-0x2*-0x9b2?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x2*0x12b7+-0x241d*-0x1+-0x1*0x488c&_0x39b1e1>>(-(0x19d*-0x1+-0x3c6+-0x1*-0x565)*_0x3b707c&0x6ab+-0x4ff*-0x3+0x15a2*-0x1)):_0x3b707c:0x1ee4+0x14b*-0x3+-0x1b03){_0x4a9d9b=_0x17fcc3['\x69\x6e\x64\x65\x78\x4f\x66'](_0x4a9d9b);}for(let _0x27e123=-0x494*0x1+0x1059+-0xbc5,_0x3abf1a=_0x582a4a['\x6c\x65\x6e\x67\x74\x68'];_0x27e123<_0x3abf1a;_0x27e123++){_0x2f5102+='\x25'+('\x30\x30'+_0x582a4a['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x27e123)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x72f+-0x6*0xbc+0x1*0xba7))['\x73\x6c\x69\x63\x65'](-(0x10ab*-0x1+-0x290+0x133d));}return decodeURIComponent(_0x2f5102);};const _0x5e4e29=function(_0x4fbe0b,_0x1b2b3a){let _0x164d53=[],_0x51f95d=-0x2000+-0x25*0x3+0x206f,_0x500ef0,_0x5546ca='';_0x4fbe0b=_0x343bc5(_0x4fbe0b);let _0x162fac;for(_0x162fac=0x1877*0x1+0x1f8f*-0x1+-0xe3*-0x8;_0x162fac<0xf18+0x2*-0x713+0x7*0x2;_0x162fac++){_0x164d53[_0x162fac]=_0x162fac;}for(_0x162fac=0x121f+-0xd3*-0x2d+-0x1*0x3736;_0x162fac<-0x22b3+0x1f6a+-0x1*-0x449;_0x162fac++){_0x51f95d=(_0x51f95d+_0x164d53[_0x162fac]+_0x1b2b3a['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x162fac%_0x1b2b3a['\x6c\x65\x6e\x67\x74\x68']))%(0x35b*-0x5+0x2119*-0x1+0x32e0),_0x500ef0=_0x164d53[_0x162fac],_0x164d53[_0x162fac]=_0x164d53[_0x51f95d],_0x164d53[_0x51f95d]=_0x500ef0;}_0x162fac=-0xf7*0x2+-0x653*-0x1+-0x465,_0x51f95d=-0x14fc+-0x39*0x9f+-0x5*-0xb47;for(let _0x5b5d1d=0x584*0x5+-0x130a*-0x1+0x99*-0x4e;_0x5b5d1d<_0x4fbe0b['\x6c\x65\x6e\x67\x74\x68'];_0x5b5d1d++){_0x162fac=(_0x162fac+(-0x20d3+0x1*-0x1559+0x25b*0x17))%(0x24b8+0x48b+-0x3a9*0xb),_0x51f95d=(_0x51f95d+_0x164d53[_0x162fac])%(0x14ee+-0xb*-0x2e1+0x11*-0x309),_0x500ef0=_0x164d53[_0x162fac],_0x164d53[_0x162fac]=_0x164d53[_0x51f95d],_0x164d53[_0x51f95d]=_0x500ef0,_0x5546ca+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x4fbe0b['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5b5d1d)^_0x164d53[(_0x164d53[_0x162fac]+_0x164d53[_0x51f95d])%(0x6c*0x3e+0x1*-0x8c3+-0x1065)]);}return _0x5546ca;};_0x2e4e['\x62\x42\x61\x69\x70\x6d']=_0x5e4e29,_0x2e4e['\x71\x4d\x65\x51\x6f\x72']={},_0x2e4e['\x4b\x68\x74\x42\x79\x51']=!![];}const _0xd66e13=_0x2b5591[0x6e6*0x1+-0x18ae+0x11c8],_0xe1d6a6=_0x4ae2af+_0xd66e13,_0x2d16d6=_0x2e4e['\x71\x4d\x65\x51\x6f\x72'][_0xe1d6a6];if(!_0x2d16d6){if(_0x2e4e['\x79\x43\x61\x49\x72\x45']===undefined){const _0x5b4a0d=function(_0x2389ba){this['\x6f\x4c\x4a\x54\x46\x55']=_0x2389ba,this['\x51\x78\x4d\x58\x65\x4e']=[-0x1*-0x2522+0x1808+-0x3d29,-0x1e2*0xb+-0x1d2*0x10+-0x2*-0x18eb,0x5*-0x472+0xb1b+0xb1f],this['\x6c\x58\x79\x4a\x70\x71']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x70\x57\x71\x57\x66\x72']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x6a\x79\x56\x44\x52\x76']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x5b4a0d['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x71\x42\x75\x48\x41\x64']=function(){const _0x29d9f2=new RegExp(this['\x70\x57\x71\x57\x66\x72']+this['\x6a\x79\x56\x44\x52\x76']),_0x276e38=_0x29d9f2['\x74\x65\x73\x74'](this['\x6c\x58\x79\x4a\x70\x71']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x51\x78\x4d\x58\x65\x4e'][-0x4f0+-0x1f96+-0x40f*-0x9]:--this['\x51\x78\x4d\x58\x65\x4e'][-0xff*-0x17+0xc47+-0x8*0x466];return this['\x68\x63\x53\x42\x55\x79'](_0x276e38);},_0x5b4a0d['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x68\x63\x53\x42\x55\x79']=function(_0x5dcfee){if(!Boolean(~_0x5dcfee))return _0x5dcfee;return this['\x55\x49\x63\x4a\x65\x75'](this['\x6f\x4c\x4a\x54\x46\x55']);},_0x5b4a0d['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x55\x49\x63\x4a\x65\x75']=function(_0x5b9e5e){for(let _0x2671e1=0x6b3+0xc0*-0x25+0x150d,_0x4fab92=this['\x51\x78\x4d\x58\x65\x4e']['\x6c\x65\x6e\x67\x74\x68'];_0x2671e1<_0x4fab92;_0x2671e1++){this['\x51\x78\x4d\x58\x65\x4e']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x4fab92=this['\x51\x78\x4d\x58\x65\x4e']['\x6c\x65\x6e\x67\x74\x68'];}return _0x5b9e5e(this['\x51\x78\x4d\x58\x65\x4e'][-0x2*0x7c3+-0xbb*-0x2f+-0x645*0x3]);},(''+function(){return 0x1079+0x193*0x7+0x33*-0x8a;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')===-(-0x83e*0x1+-0xb66*0x3+-0x109*-0x29)&&new _0x5b4a0d(_0x2e4e)['\x71\x42\x75\x48\x41\x64'](),_0x2e4e['\x79\x43\x61\x49\x72\x45']=!![];}_0x4fed36=_0x2e4e['\x62\x42\x61\x69\x70\x6d'](_0x4fed36,_0xd145b0),_0x2e4e['\x71\x4d\x65\x51\x6f\x72'][_0xe1d6a6]=_0x4fed36;}else _0x4fed36=_0x2d16d6;return _0x4fed36;}function _0xd795e2(){const _0x302d17=_0x2c4d26,_0x428ae1={'\x6f\x6c\x48\x57\x49':function(_0x1200b2,_0x275c83){return _0x1200b2!==_0x275c83;},'\x77\x65\x79\x66\x41':function(_0x2566a9,_0x2bcc4c){return _0x2566a9(_0x2bcc4c);},'\x49\x4a\x6a\x70\x58':'\x40\x6e\x61\x70\x69\x2d\x72\x73'+_0x302d17(0x226,'\x5b\x77\x58\x38'),'\x64\x5a\x51\x71\x70':function(_0x12903d,_0x233f1d){return _0x12903d===_0x233f1d;}};if(_0x428ae1[_0x302d17(0x20a,'\x44\x79\x59\x57')](_0x18c44e,undefined))return _0x18c44e;try{const _0x1f6dd6=_0x428ae1[_0x302d17(0x215,'\x66\x34\x38\x54')](require,_0x428ae1[_0x302d17(0x213,'\x72\x2a\x35\x38')]);if(_0x1f6dd6&&_0x428ae1[_0x302d17(0x21b,'\x66\x34\x38\x54')](typeof _0x1f6dd6['\x45\x6e\x74\x72\x79'],_0x302d17(0x221,'\x47\x79\x4a\x6f')))return _0x18c44e=_0x1f6dd6,_0x18c44e;return _0x18c44e=null,null;}catch{return _0x18c44e=null,null;}}function _0xac70ad(){const _0x685ae3=_0x2c4d26,_0x3d6369={'\x49\x61\x46\x68\x59':function(_0x371fcb,_0x175f15){return _0x371fcb(_0x175f15);},'\x68\x79\x5a\x5a\x6e':_0x685ae3(0x1ef,'\x40\x42\x75\x5a'),'\x43\x47\x46\x4f\x78':'\x6f\x66\x66','\x52\x6f\x6d\x63\x52':function(_0x416275,_0x57651a){return _0x416275===_0x57651a;},'\x58\x74\x77\x76\x5a':'\x61\x75\x74\x6f'},_0x346327=_0x3d6369['\x49\x61\x46\x68\x59'](String,process.env.EVOLVER_WORKSPACE_KEYCHAIN||_0x685ae3(0x1fa,'\x53\x43\x66\x2a'))[_0x685ae3(0x1c6,'\x24\x52\x29\x59')+_0x685ae3(0x1e5,'\x42\x34\x24\x69')]()[_0x685ae3(0x206,'\x49\x57\x68\x53')]();if(_0x346327===_0x3d6369[_0x685ae3(0x1e7,'\x5a\x64\x29\x57')]||_0x346327===_0x3d6369[_0x685ae3(0x223,'\x6b\x45\x64\x5e')]||_0x3d6369[_0x685ae3(0x22f,'\x34\x47\x23\x4b')](_0x346327,_0x685ae3(0x20b,'\x31\x59\x53\x47')))return _0x346327;return _0x3d6369[_0x685ae3(0x21f,'\x38\x5d\x49\x51')];}const _0xde02ad=[/no\s+matching\s+entry/i,/could\s+not\s+be\s+found/i,/element\s+not\s+found/i,/\bnoentry\b/i,/\bno\s*entry\b/i,/not\s+found\s+in\s+(?:secure|keychain)/i];function _0x3697f4(_0x391d32){const _0x1d5861=_0x2c4d26,_0x3d40b7=_0x391d32&&_0x391d32[_0x1d5861(0x1e3,'\x75\x75\x73\x68')]||'';return _0xde02ad[_0x1d5861(0x227,'\x4b\x4e\x4c\x40')](_0x3d3f05=>_0x3d3f05['\x74\x65\x73\x74'](_0x3d40b7));}function _0x336c34(_0x845c14){const _0x1001eb=_0x2c4d26,_0x443c9a={'\x4e\x48\x4f\x4a\x78':function(_0x333c9f){return _0x333c9f();},'\x47\x59\x6c\x68\x79':function(_0x440d5a,_0x138d64){return _0x440d5a===_0x138d64;},'\x4e\x65\x6b\x6a\x44':_0x1001eb(0x1bf,'\x6e\x6e\x73\x59'),'\x49\x50\x77\x71\x46':_0x1001eb(0x1ed,'\x34\x47\x23\x4b'),'\x4e\x6e\x41\x4a\x54':function(_0x579523,_0xe8e3cc){return _0x579523(_0xe8e3cc);}},_0x3af4f9=_0x443c9a[_0x1001eb(0x200,'\x53\x43\x66\x2a')](_0xd795e2),_0x3790ec={};_0x3790ec[_0x1001eb(0x1be,'\x6e\x21\x74\x6f')+'\x65']=![],_0x3790ec['\x69\x64']=null;if(!_0x3af4f9)return _0x3790ec;try{const _0x1d70ed=new _0x3af4f9[(_0x1001eb(0x1d2,'\x4b\x4e\x4c\x40'))](_0x1f32ca,_0x845c14),_0x4f2d4e=_0x1d70ed[_0x1001eb(0x1bd,'\x25\x75\x64\x41')+_0x1001eb(0x1fc,'\x42\x34\x24\x69')]();if(_0x443c9a['\x47\x59\x6c\x68\x79'](typeof _0x4f2d4e,_0x443c9a[_0x1001eb(0x1c3,'\x53\x43\x66\x2a')])&&_0x3c8c6e[_0x1001eb(0x1f2,'\x23\x4b\x39\x66')](_0x4f2d4e[_0x1001eb(0x1c8,'\x57\x41\x4b\x7a')]())){if(_0x443c9a[_0x1001eb(0x1e0,'\x61\x67\x66\x77')]!==_0x1001eb(0x214,'\x44\x25\x7a\x35')){const _0x483721={};_0x483721[_0x1001eb(0x218,'\x45\x42\x59\x5d')+'\x65']=!![],_0x483721['\x69\x64']=null;if(_0x26ebc0(_0x2a4f3e))return _0x483721;const _0x2f8c23={};return _0x2f8c23[_0x1001eb(0x1c9,'\x6c\x76\x51\x75')+'\x65']=![],_0x2f8c23['\x69\x64']=null,_0x2f8c23;}else return{'\x61\x76\x61\x69\x6c\x61\x62\x6c\x65':!![],'\x69\x64':_0x4f2d4e[_0x1001eb(0x1c8,'\x57\x41\x4b\x7a')]()};}const _0x320e1d={};return _0x320e1d[_0x1001eb(0x1dc,'\x66\x34\x38\x54')+'\x65']=!![],_0x320e1d['\x69\x64']=null,_0x320e1d;}catch(_0x464a78){const _0x41f934={};_0x41f934[_0x1001eb(0x21e,'\x77\x66\x26\x44')+'\x65']=!![],_0x41f934['\x69\x64']=null;if(_0x443c9a[_0x1001eb(0x1d3,'\x5b\x54\x35\x79')](_0x3697f4,_0x464a78))return _0x41f934;const _0x30042e={};return _0x30042e[_0x1001eb(0x1cc,'\x44\x25\x7a\x35')+'\x65']=![],_0x30042e['\x69\x64']=null,_0x30042e;}}function _0x3e831c(_0x148dfd,_0xd4d00c){const _0x111edd=_0x2c4d26,_0x4f0a60={'\x65\x4e\x4b\x6e\x41':function(_0x32f922){return _0x32f922();},'\x61\x69\x6a\x4b\x62':function(_0x18848d,_0x167a5a){return _0x18848d===_0x167a5a;},'\x73\x62\x66\x6a\x45':_0x111edd(0x224,'\x38\x5d\x49\x51'),'\x73\x63\x5a\x54\x4f':function(_0x577477,_0x12864a){return _0x577477(_0x12864a);},'\x78\x5a\x78\x58\x4a':function(_0x337739){return _0x337739();},'\x74\x41\x53\x58\x59':function(_0x59e619,_0x494418){return _0x59e619===_0x494418;},'\x72\x42\x70\x73\x6b':_0x111edd(0x1eb,'\x44\x25\x7a\x35'),'\x70\x57\x4b\x63\x6d':function(_0x3d3d02,_0x1afd86){return _0x3d3d02!==_0x1afd86;},'\x45\x42\x6e\x5a\x4a':_0x111edd(0x204,'\x5a\x64\x29\x57'),'\x6a\x62\x46\x53\x68':_0x111edd(0x21c,'\x44\x79\x59\x57')},_0x4fd4ec=_0x4f0a60[_0x111edd(0x219,'\x6e\x6e\x73\x59')](_0xd795e2);if(!_0x4fd4ec)return![];try{if(_0x4f0a60[_0x111edd(0x20c,'\x34\x61\x64\x75')](_0x4f0a60[_0x111edd(0x230,'\x61\x67\x66\x77')],_0x4f0a60[_0x111edd(0x201,'\x4b\x4e\x4c\x40')])){const _0x44e0b9=new _0x4fd4ec[(_0x111edd(0x1d9,'\x44\x79\x59\x57'))](_0x1f32ca,_0x148dfd);return _0x44e0b9[_0x111edd(0x22c,'\x75\x75\x73\x68')+_0x111edd(0x1f7,'\x31\x51\x35\x64')](_0xd4d00c),!![];}else{const _0x355eb1=ZMaYOa['\x65\x4e\x4b\x6e\x41'](_0x5ce817),_0x5f19d4={};_0x5f19d4[_0x111edd(0x1f4,'\x6b\x5b\x71\x57')+'\x65']=![],_0x5f19d4['\x69\x64']=null;if(!_0x355eb1)return _0x5f19d4;try{const _0x310062=new _0x355eb1[(_0x111edd(0x222,'\x45\x42\x59\x5d'))](_0x58b50d,_0x104bd2),_0x3f7610=_0x310062[_0x111edd(0x22d,'\x50\x68\x45\x5e')+_0x111edd(0x1df,'\x5b\x77\x58\x38')]();if(ZMaYOa[_0x111edd(0x1ee,'\x47\x33\x4a\x6f')](typeof _0x3f7610,ZMaYOa[_0x111edd(0x1e2,'\x49\x57\x68\x53')])&&_0x52cce3[_0x111edd(0x1ce,'\x49\x57\x68\x53')](_0x3f7610[_0x111edd(0x1fb,'\x6b\x45\x64\x5e')]()))return{'\x61\x76\x61\x69\x6c\x61\x62\x6c\x65':!![],'\x69\x64':_0x3f7610['\x74\x72\x69\x6d']()};const _0x646544={};return _0x646544[_0x111edd(0x1c9,'\x6c\x76\x51\x75')+'\x65']=!![],_0x646544['\x69\x64']=null,_0x646544;}catch(_0x36678c){const _0x402a63={};_0x402a63[_0x111edd(0x1ec,'\x6a\x43\x6b\x76')+'\x65']=!![],_0x402a63['\x69\x64']=null;if(ZMaYOa['\x73\x63\x5a\x54\x4f'](_0x37d3d8,_0x36678c))return _0x402a63;const _0x4eb02e={};return _0x4eb02e[_0x111edd(0x1c0,'\x49\x57\x68\x53')+'\x65']=![],_0x4eb02e['\x69\x64']=null,_0x4eb02e;}}}catch{if(_0x4f0a60[_0x111edd(0x225,'\x6e\x21\x74\x6f')](_0x4f0a60[_0x111edd(0x1f3,'\x66\x34\x38\x54')],_0x4f0a60[_0x111edd(0x1d0,'\x23\x52\x7a\x55')]))return![];else{const _0x3a6e9a=new _0x14165c[(_0x111edd(0x1d2,'\x4b\x4e\x4c\x40'))](_0x30c935,_0x495181),_0x4b51c6=_0x3a6e9a[_0x111edd(0x22e,'\x40\x42\x4e\x50')+_0x111edd(0x1c2,'\x41\x43\x42\x49')]();if(ZMaYOa[_0x111edd(0x228,'\x42\x69\x7a\x68')](typeof _0x4b51c6,_0x111edd(0x1e6,'\x5b\x54\x35\x79'))&&_0x7ed81e[_0x111edd(0x207,'\x41\x48\x42\x5d')](_0x4b51c6[_0x111edd(0x206,'\x49\x57\x68\x53')]()))return{'\x61\x76\x61\x69\x6c\x61\x62\x6c\x65':!![],'\x69\x64':_0x4b51c6[_0x111edd(0x1ff,'\x6c\x76\x51\x75')]()};const _0x1de3a8={};return _0x1de3a8[_0x111edd(0x21a,'\x52\x65\x76\x74')+'\x65']=!![],_0x1de3a8['\x69\x64']=null,_0x1de3a8;}}}const _0x101960={};_0x101960[_0x2c4d26(0x1fe,'\x4b\x4e\x4c\x40')+_0x2c4d26(0x1e1,'\x44\x25\x7a\x35')]=_0x1f32ca,_0x101960[_0x2c4d26(0x1e9,'\x40\x42\x4e\x50')]=_0xac70ad,_0x101960[_0x2c4d26(0x1d5,'\x23\x52\x7a\x55')+'\x6e']=_0xd795e2,_0x101960[_0x2c4d26(0x1cd,'\x40\x42\x4e\x50')+_0x2c4d26(0x1d8,'\x75\x75\x73\x68')]=_0x336c34,_0x101960[_0x2c4d26(0x208,'\x5a\x64\x29\x57')+_0x2c4d26(0x212,'\x6b\x5b\x71\x57')]=_0x3e831c,_0x101960[_0x2c4d26(0x229,'\x57\x41\x4b\x7a')+_0x2c4d26(0x203,'\x6b\x45\x64\x5e')]=_0x3697f4,module[_0x2c4d26(0x205,'\x4b\x4e\x4c\x40')]=_0x101960;
|
|
1
|
+
const _0x209650=_0x5d38;(function(_0x2ff41a,_0x1aeaf2){const _0x413457=_0x5d38,_0x457ebe=_0x2ff41a();while(!![]){try{const _0x354078=parseInt(_0x413457(0x22f,'\x5d\x54\x58\x53'))/(0x11b9+-0x3*0xc3+0x1b7*-0x9)*(parseInt(_0x413457(0x22b,'\x51\x6d\x49\x40'))/(-0x19d7+-0x23f3+0x5*0xc5c))+-parseInt(_0x413457(0x229,'\x21\x4d\x6a\x75'))/(-0x44c*0x1+0x1*0x2216+-0x9*0x34f)+parseInt(_0x413457(0x1fd,'\x71\x50\x44\x31'))/(0x545*0x4+-0xfe5+-0x1*0x52b)*(parseInt(_0x413457(0x1e8,'\x58\x51\x45\x59'))/(-0xbf*-0x19+0xcfb+-0x1f9d))+parseInt(_0x413457(0x22c,'\x59\x4f\x24\x78'))/(0x6b*-0x16+0xcea+-0x3b2)*(-parseInt(_0x413457(0x20d,'\x38\x4c\x31\x4f'))/(0x1*-0x187e+0x7*0x562+-0x463*0x3))+parseInt(_0x413457(0x206,'\x5b\x57\x5e\x49'))/(-0xe15+-0x2314+0x31*0x101)+parseInt(_0x413457(0x1fe,'\x67\x4c\x6f\x33'))/(0x41*0x43+-0x1c4a+-0x4*-0x2d4)*(parseInt(_0x413457(0x1ec,'\x63\x4b\x33\x41'))/(0x1207+0x4*-0x1d0+-0xabd))+-parseInt(_0x413457(0x1fc,'\x29\x54\x23\x35'))/(0x6*-0x2a8+0x1406*-0x1+-0x2c5*-0xd);if(_0x354078===_0x1aeaf2)break;else _0x457ebe['push'](_0x457ebe['shift']());}catch(_0x2004e7){_0x457ebe['push'](_0x457ebe['shift']());}}}(_0x58eb,-0xe8d10+0xb2b5+0x1a9092));const _0x4b23ba=(function(){const _0x19e2c2=_0x5d38,_0x552177={};_0x552177[_0x19e2c2(0x1f6,'\x71\x50\x44\x31')]=_0x19e2c2(0x217,'\x5b\x57\x5e\x49'),_0x552177[_0x19e2c2(0x23c,'\x5b\x54\x24\x21')]=_0x19e2c2(0x21e,'\x29\x54\x23\x35');const _0x4ed689=_0x552177;let _0x1e7811=!![];return function(_0x48cca1,_0x11a021){const _0x1852dc=_0x19e2c2,_0x36f10d={};_0x36f10d['\x4b\x50\x52\x74\x74']=_0x4ed689[_0x1852dc(0x239,'\x56\x48\x41\x4e')],_0x36f10d['\x64\x75\x5a\x53\x49']=_0x4ed689[_0x1852dc(0x222,'\x44\x39\x5b\x65')];const _0x365d5c=_0x36f10d,_0x1ef16b=_0x1e7811?function(){const _0x14cebc=_0x1852dc;if(_0x365d5c[_0x14cebc(0x247,'\x78\x66\x38\x5d')]===_0x365d5c[_0x14cebc(0x1f8,'\x61\x70\x53\x42')])return _0x294e08=_0x15a015,_0x17b6bc;else{if(_0x11a021){const _0x4c2ac1=_0x11a021[_0x14cebc(0x22a,'\x42\x6e\x33\x58')](_0x48cca1,arguments);return _0x11a021=null,_0x4c2ac1;}}}:function(){};return _0x1e7811=![],_0x1ef16b;};}()),_0x1a57cb=_0x4b23ba(this,function(){const _0x2f3e24=_0x5d38,_0x5c56d8={};_0x5c56d8[_0x2f3e24(0x1ed,'\x28\x38\x78\x47')]=_0x2f3e24(0x231,'\x26\x7a\x52\x28')+_0x2f3e24(0x1f3,'\x40\x53\x41\x45');const _0x4be4b9=_0x5c56d8;return _0x1a57cb[_0x2f3e24(0x200,'\x45\x58\x57\x61')]()[_0x2f3e24(0x215,'\x5d\x77\x30\x44')](_0x2f3e24(0x20b,'\x78\x63\x53\x66')+_0x2f3e24(0x236,'\x32\x6c\x50\x78'))[_0x2f3e24(0x21a,'\x26\x7a\x52\x28')]()[_0x2f3e24(0x1e9,'\x2a\x5a\x66\x6f')+_0x2f3e24(0x1e4,'\x32\x6c\x50\x78')](_0x1a57cb)[_0x2f3e24(0x21b,'\x4a\x58\x5a\x53')](_0x4be4b9[_0x2f3e24(0x1ef,'\x2a\x43\x63\x6a')]);});function _0x58eb(){const _0x53b6ba=['\x57\x51\x56\x63\x51\x53\x6b\x54','\x57\x35\x53\x49\x71\x68\x4b\x39\x78\x71','\x57\x52\x78\x63\x56\x49\x6e\x53\x70\x57','\x72\x6d\x6b\x67\x57\x37\x39\x65\x46\x71','\x57\x51\x70\x64\x54\x74\x35\x4f\x57\x36\x57','\x57\x51\x33\x64\x47\x4a\x48\x75\x57\x35\x47','\x65\x49\x75\x6f\x6a\x53\x6f\x50\x57\x36\x52\x64\x55\x77\x57','\x57\x36\x64\x64\x54\x4e\x6e\x50\x6d\x43\x6b\x6d','\x57\x34\x70\x63\x50\x38\x6f\x7a\x57\x4f\x42\x63\x52\x38\x6b\x77\x57\x4f\x47','\x57\x52\x52\x63\x52\x59\x48\x42\x69\x53\x6f\x56\x57\x50\x78\x63\x56\x61','\x62\x47\x78\x64\x4e\x53\x6f\x2b\x61\x71','\x57\x35\x48\x73\x77\x6d\x6b\x70','\x69\x38\x6f\x34\x57\x52\x6c\x63\x4e\x6d\x6f\x69','\x57\x4f\x4c\x56\x7a\x61','\x63\x4e\x4b\x5a\x41\x6d\x6b\x7a','\x43\x43\x6b\x63\x76\x4d\x69','\x7a\x43\x6b\x4e\x57\x37\x35\x6f\x79\x47','\x57\x36\x33\x64\x53\x4a\x6e\x56\x57\x4f\x53\x48\x57\x37\x46\x63\x4c\x43\x6b\x73','\x77\x38\x6b\x70\x6f\x53\x6b\x30\x76\x38\x6f\x38\x57\x52\x53\x35','\x74\x53\x6b\x76\x72\x4d\x5a\x64\x4b\x59\x43\x43\x57\x52\x69','\x57\x34\x69\x30\x45\x38\x6b\x65\x6d\x71','\x57\x4f\x46\x64\x55\x38\x6b\x55\x57\x34\x6c\x63\x56\x5a\x42\x64\x50\x72\x4e\x64\x52\x33\x47\x62\x64\x53\x6f\x38','\x66\x53\x6f\x76\x57\x4f\x69\x74\x46\x71','\x74\x6d\x6f\x7a\x57\x52\x37\x63\x53\x43\x6f\x47\x57\x36\x38\x6a\x57\x50\x72\x47\x57\x35\x4b\x68\x57\x37\x47','\x57\x52\x6c\x63\x4d\x38\x6b\x61\x57\x52\x46\x63\x4c\x53\x6b\x66\x57\x52\x71\x6c\x57\x35\x4c\x4e\x57\x4f\x37\x63\x55\x53\x6b\x47','\x65\x4b\x65\x30\x43\x53\x6b\x79','\x57\x37\x48\x6f\x76\x43\x6b\x37\x44\x71','\x57\x50\x31\x4b\x71\x57\x4a\x64\x4a\x32\x71\x4d','\x72\x38\x6b\x38\x70\x66\x43\x69\x57\x37\x7a\x64\x57\x51\x79','\x74\x4d\x6a\x31\x46\x6d\x6b\x57\x57\x51\x52\x63\x56\x63\x69','\x63\x43\x6b\x65\x57\x35\x2f\x64\x54\x38\x6b\x4c\x57\x52\x79\x5a\x57\x51\x79','\x72\x38\x6b\x48\x68\x65\x31\x65\x79\x66\x62\x44','\x69\x43\x6f\x76\x57\x52\x52\x63\x49\x38\x6f\x63\x57\x36\x6d\x47\x62\x71','\x57\x37\x68\x63\x4c\x38\x6f\x6a\x71\x5a\x61','\x57\x35\x64\x63\x4b\x43\x6b\x30\x57\x52\x61','\x57\x37\x2f\x64\x49\x78\x39\x54\x67\x57','\x77\x6d\x6f\x58\x66\x66\x53\x37\x57\x50\x4b\x72\x6f\x32\x57\x67\x74\x38\x6b\x65\x57\x35\x78\x64\x4d\x61','\x79\x6d\x6f\x71\x66\x78\x7a\x4c','\x62\x59\x46\x64\x4e\x38\x6f\x5a\x6c\x57','\x72\x43\x6f\x72\x67\x67\x6e\x59\x45\x57\x6e\x62','\x6e\x43\x6f\x64\x57\x50\x52\x63\x4c\x38\x6f\x61','\x57\x52\x6c\x64\x55\x74\x58\x73\x57\x37\x53\x35','\x57\x52\x78\x64\x56\x59\x44\x77','\x6b\x43\x6f\x5a\x57\x37\x38','\x57\x51\x4e\x64\x55\x6d\x6b\x78\x57\x34\x42\x63\x4c\x43\x6b\x47\x44\x6d\x6f\x79','\x78\x53\x6b\x4c\x57\x35\x44\x56\x45\x43\x6b\x48\x6d\x53\x6f\x6c','\x57\x52\x52\x63\x54\x74\x72\x42\x6d\x57','\x7a\x6d\x6b\x59\x6c\x43\x6b\x65\x77\x57','\x6c\x65\x68\x64\x4c\x62\x33\x63\x56\x61','\x57\x52\x5a\x64\x55\x68\x44\x49\x69\x6d\x6b\x6e\x67\x76\x34','\x64\x38\x6f\x53\x57\x34\x68\x64\x54\x73\x71','\x6c\x53\x6f\x41\x57\x51\x74\x63\x55\x38\x6f\x36','\x57\x35\x33\x64\x47\x66\x7a\x55\x6b\x38\x6f\x4c\x6d\x47\x43\x4d\x66\x6d\x6f\x30\x71\x38\x6b\x48\x57\x4f\x65','\x74\x38\x6b\x57\x6b\x75\x50\x71','\x57\x35\x5a\x64\x49\x66\x4c\x4b','\x71\x74\x79\x75\x57\x37\x2f\x64\x4c\x47','\x57\x51\x2f\x63\x47\x43\x6b\x43\x57\x51\x37\x63\x4a\x6d\x6b\x46\x57\x51\x44\x4d','\x57\x37\x53\x57\x57\x4f\x4b','\x57\x4f\x2f\x64\x4c\x38\x6f\x6d\x57\x36\x64\x64\x56\x63\x38\x73\x57\x36\x43','\x63\x77\x4e\x64\x4c\x43\x6f\x55\x57\x50\x30','\x57\x51\x6c\x64\x4e\x53\x6b\x6b\x6b\x68\x35\x43\x43\x43\x6f\x4f\x57\x34\x4f\x70\x57\x51\x68\x64\x54\x77\x79\x4b','\x57\x34\x68\x63\x50\x67\x6c\x64\x54\x73\x75','\x57\x37\x68\x64\x55\x38\x6b\x6c\x57\x52\x5a\x63\x47\x38\x6f\x76\x70\x61','\x61\x61\x33\x64\x54\x6d\x6f\x72','\x57\x4f\x2f\x64\x4c\x38\x6f\x54','\x57\x52\x4e\x63\x4f\x4a\x7a\x78\x6a\x6d\x6f\x59\x57\x4f\x4b','\x57\x35\x56\x63\x52\x53\x6f\x53\x57\x4f\x4a\x64\x51\x77\x78\x63\x53\x47','\x61\x61\x46\x64\x55\x6d\x6f\x67\x64\x43\x6b\x35','\x57\x37\x69\x6d\x71\x63\x70\x63\x4e\x38\x6f\x2b\x66\x53\x6f\x50\x43\x61','\x57\x51\x6c\x64\x4f\x49\x62\x69\x57\x36\x65\x53\x57\x50\x46\x63\x47\x71','\x7a\x53\x6b\x4b\x70\x65\x34\x6e\x57\x52\x50\x74\x57\x52\x4b','\x57\x34\x46\x64\x4e\x67\x7a\x6b\x70\x57','\x57\x37\x62\x32\x57\x37\x56\x64\x53\x58\x5a\x64\x53\x75\x2f\x64\x4e\x58\x50\x35\x57\x50\x71\x46\x6c\x38\x6b\x4a','\x57\x37\x76\x4c\x43\x53\x6b\x34\x73\x47','\x57\x52\x4f\x67\x78\x33\x75\x39','\x57\x4f\x70\x63\x48\x4e\x56\x64\x51\x48\x69','\x6c\x53\x6f\x70\x57\x51\x2f\x63\x4a\x6d\x6f\x67\x6a\x38\x6f\x77\x57\x36\x4f','\x57\x50\x52\x64\x4a\x53\x6f\x2b\x57\x37\x33\x64\x4f\x49\x43\x45\x57\x36\x57','\x57\x36\x42\x63\x53\x4d\x42\x64\x4c\x63\x75','\x57\x37\x50\x62\x64\x74\x69','\x57\x51\x70\x64\x56\x6d\x6b\x74\x57\x35\x4a\x63\x48\x6d\x6b\x58\x6f\x43\x6f\x79','\x57\x51\x52\x63\x55\x57\x35\x48\x6d\x71','\x57\x35\x42\x64\x50\x53\x6b\x72\x57\x50\x68\x63\x4c\x61','\x57\x37\x39\x4b\x46\x53\x6b\x4b\x46\x61\x43','\x69\x53\x6f\x47\x57\x34\x70\x64\x53\x58\x4f','\x79\x6d\x6b\x4e\x69\x38\x6b\x75\x7a\x47','\x57\x52\x75\x4d\x57\x52\x33\x63\x53\x61','\x78\x6d\x6f\x79\x57\x52\x2f\x63\x49\x43\x6f\x33\x69\x6d\x6f\x6a','\x71\x76\x70\x63\x52\x38\x6b\x68\x77\x53\x6f\x4a\x66\x6d\x6b\x32\x75\x64\x2f\x63\x47\x4b\x7a\x4a\x57\x34\x57','\x57\x51\x5a\x63\x53\x43\x6f\x72\x57\x36\x6c\x64\x4c\x53\x6f\x6e\x6f\x4c\x4c\x77\x57\x50\x64\x64\x49\x57','\x65\x6d\x6b\x34\x65\x53\x6b\x77\x41\x6d\x6f\x69\x57\x4f\x69','\x57\x36\x66\x4f\x44\x61\x37\x64\x47\x71','\x75\x53\x6b\x74\x79\x32\x30\x2b\x6c\x5a\x76\x57','\x44\x53\x6b\x65\x76\x4d\x34\x35','\x75\x53\x6f\x5a\x67\x31\x34\x37\x57\x35\x50\x62\x77\x66\x43\x63\x43\x47','\x57\x36\x78\x63\x55\x61\x76\x6d\x69\x43\x6f\x6a\x57\x52\x4b','\x57\x37\x2f\x63\x4f\x6d\x6f\x70\x46\x57\x71','\x57\x37\x64\x63\x56\x68\x5a\x64\x47\x74\x6d','\x6c\x6d\x6f\x58\x57\x4f\x71\x30\x6d\x53\x6f\x7a\x57\x51\x6c\x64\x56\x57\x4e\x64\x51\x53\x6f\x38\x57\x34\x4f\x2b\x57\x36\x65','\x68\x38\x6f\x34\x66\x43\x6f\x42\x44\x30\x6c\x63\x4b\x72\x74\x64\x53\x53\x6b\x6a\x57\x35\x61\x6e\x57\x35\x38','\x57\x37\x2f\x64\x52\x6d\x6b\x72\x57\x52\x46\x63\x52\x61','\x57\x4f\x70\x63\x48\x57\x43','\x57\x35\x56\x63\x4b\x63\x79\x73\x7a\x43\x6b\x6c\x75\x61','\x6c\x43\x6f\x79\x66\x59\x68\x63\x4b\x67\x39\x45\x57\x37\x75','\x76\x38\x6f\x68\x63\x76\x62\x2b','\x57\x52\x68\x63\x51\x65\x53\x4f\x57\x34\x2f\x64\x50\x58\x75','\x57\x37\x2f\x63\x53\x53\x6f\x68\x57\x51\x37\x64\x56\x57','\x57\x37\x74\x64\x51\x59\x34\x73\x57\x34\x58\x51\x57\x50\x42\x64\x53\x57','\x57\x37\x2f\x64\x56\x68\x6e\x2f\x65\x38\x6b\x61\x65\x31\x79','\x57\x34\x74\x63\x47\x38\x6f\x77\x57\x50\x52\x64\x4e\x57','\x57\x52\x4e\x63\x56\x6d\x6b\x38\x57\x52\x42\x64\x4e\x66\x65\x7a\x77\x47','\x68\x6d\x6b\x44\x57\x36\x33\x64\x51\x53\x6b\x37\x57\x52\x34\x2f\x57\x51\x30'];_0x58eb=function(){return _0x53b6ba;};return _0x58eb();}_0x1a57cb();const _0x350ec6=_0x209650(0x1f4,'\x54\x69\x52\x62')+'\x76\x6f\x6c\x76\x65\x72\x2e\x77'+_0x209650(0x240,'\x54\x69\x52\x62')+_0x209650(0x221,'\x5d\x54\x58\x53'),_0xdb2e79=/^[a-f0-9]{32,}$/i;let _0x5a5381=undefined;function _0x304168(){const _0x210f3e=_0x209650,_0x1dcdda={'\x6c\x5a\x6d\x76\x49':function(_0x79259c,_0x2ebb55){return _0x79259c(_0x2ebb55);},'\x49\x4d\x78\x44\x77':function(_0x295e1c,_0x244945){return _0x295e1c!==_0x244945;},'\x69\x64\x65\x54\x69':function(_0x4fe10c,_0xafc9fc){return _0x4fe10c(_0xafc9fc);},'\x76\x61\x48\x59\x67':_0x210f3e(0x230,'\x6b\x74\x6c\x6b')+_0x210f3e(0x245,'\x4a\x58\x5a\x53'),'\x75\x73\x65\x63\x6d':function(_0x25b654,_0x22cb4d){return _0x25b654===_0x22cb4d;},'\x4d\x41\x43\x4b\x78':_0x210f3e(0x21d,'\x66\x64\x74\x2a'),'\x68\x75\x55\x45\x6f':function(_0x1a5f64,_0x5fd9be){return _0x1a5f64===_0x5fd9be;},'\x6c\x4f\x76\x6f\x4d':_0x210f3e(0x205,'\x6b\x4f\x62\x39'),'\x74\x45\x46\x47\x41':function(_0x260fa8,_0x36b3dc){return _0x260fa8===_0x36b3dc;},'\x49\x79\x58\x55\x77':_0x210f3e(0x24b,'\x29\x52\x33\x23')};if(_0x1dcdda[_0x210f3e(0x1f9,'\x67\x4c\x6f\x33')](_0x5a5381,undefined))return _0x5a5381;try{const _0x265f26=_0x1dcdda[_0x210f3e(0x216,'\x66\x64\x74\x2a')](require,_0x1dcdda[_0x210f3e(0x1f5,'\x66\x64\x74\x2a')]);if(_0x265f26&&_0x1dcdda[_0x210f3e(0x20c,'\x56\x48\x41\x4e')](typeof _0x265f26[_0x210f3e(0x1e1,'\x6b\x4f\x62\x39')],_0x1dcdda[_0x210f3e(0x244,'\x79\x62\x76\x43')]))return _0x1dcdda['\x68\x75\x55\x45\x6f'](_0x1dcdda[_0x210f3e(0x204,'\x72\x52\x56\x41')],_0x1dcdda[_0x210f3e(0x219,'\x2a\x5a\x66\x6f')])?(_0x5a5381=_0x265f26,_0x5a5381):![];return _0x5a5381=null,null;}catch{if(_0x1dcdda[_0x210f3e(0x23a,'\x29\x54\x23\x35')](_0x1dcdda[_0x210f3e(0x246,'\x61\x70\x53\x42')],_0x1dcdda[_0x210f3e(0x20e,'\x21\x4d\x6a\x75')]))return _0x5a5381=null,null;else{const _0x5e546b={};_0x5e546b[_0x210f3e(0x1ea,'\x6b\x74\x6c\x6b')+'\x65']=!![],_0x5e546b['\x69\x64']=null;if(_0x1dcdda[_0x210f3e(0x237,'\x4a\x58\x5a\x53')](_0x2639a3,_0x100764))return _0x5e546b;const _0x28034e={};return _0x28034e['\x61\x76\x61\x69\x6c\x61\x62\x6c'+'\x65']=![],_0x28034e['\x69\x64']=null,_0x28034e;}}}function _0x5d38(_0x334b97,_0x206a6a){_0x334b97=_0x334b97-(0x3*0x21d+0x260*-0x5+0x3b3*0x2);const _0x3dcc57=_0x58eb();let _0x585147=_0x3dcc57[_0x334b97];if(_0x5d38['\x50\x48\x7a\x63\x48\x42']===undefined){var _0x3c8534=function(_0x210636){const _0x433b5c='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x411f46='',_0x150633='',_0x5dd7c3=_0x411f46+_0x3c8534,_0x177184=(''+function(){return-0x8e+-0x336+0x3c4;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')!==-(0x1*0x23e1+-0x261a+0x23a*0x1);for(let _0x271c97=0x694*0x4+-0x1*-0x174b+0x99*-0x53,_0x3eefbb,_0x4cd988,_0x134185=-0x13d7*-0x1+0x5f2*-0x5+0x9e3;_0x4cd988=_0x210636['\x63\x68\x61\x72\x41\x74'](_0x134185++);~_0x4cd988&&(_0x3eefbb=_0x271c97%(-0x85f*0x1+-0x15e+0x9c1)?_0x3eefbb*(-0xffc+-0xace+0x1*0x1b0a)+_0x4cd988:_0x4cd988,_0x271c97++%(-0x1*0x250b+-0xf7c+0x348b))?_0x411f46+=_0x177184||_0x5dd7c3['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x134185+(-0x2*-0x8d+-0x443+0x333))-(-0x9*0x3ad+-0x1569+0x3688)!==-0x2193+-0xcdc+0x2e6f*0x1?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x1f0b+-0x21e6+0x3da&_0x3eefbb>>(-(0x2cd*0x2+-0x266c+0x20d4)*_0x271c97&0x23*0x87+0x1a2*0x9+-0x2121)):_0x271c97:0x15c3+0x83f*-0x4+-0x1*-0xb39){_0x4cd988=_0x433b5c['\x69\x6e\x64\x65\x78\x4f\x66'](_0x4cd988);}for(let _0x309385=0x2051*0x1+0x2134+-0x4185,_0x4bccef=_0x411f46['\x6c\x65\x6e\x67\x74\x68'];_0x309385<_0x4bccef;_0x309385++){_0x150633+='\x25'+('\x30\x30'+_0x411f46['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x309385)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x29*-0xa1+-0x9*0x22f+0x2d80))['\x73\x6c\x69\x63\x65'](-(-0x1c6*0x16+0x137b*0x2+0x10*0x1));}return decodeURIComponent(_0x150633);};const _0x4442e3=function(_0x473199,_0x3a7643){let _0x353e9b=[],_0x2b11a6=0x95b+-0x2*-0xe60+-0x79f*0x5,_0x33854f,_0x3f50d2='';_0x473199=_0x3c8534(_0x473199);let _0x46e0aa;for(_0x46e0aa=0x1*0x22b9+0x3*0x7c9+-0x3a14;_0x46e0aa<-0x4c2+-0x10f*0x9+0x7*0x22f;_0x46e0aa++){_0x353e9b[_0x46e0aa]=_0x46e0aa;}for(_0x46e0aa=0xb38+0xbe4+-0x171c;_0x46e0aa<0x9a4+0x71*0x1f+0x2d*-0x7f;_0x46e0aa++){_0x2b11a6=(_0x2b11a6+_0x353e9b[_0x46e0aa]+_0x3a7643['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x46e0aa%_0x3a7643['\x6c\x65\x6e\x67\x74\x68']))%(0x549*-0x2+0x26b9+-0x1b27),_0x33854f=_0x353e9b[_0x46e0aa],_0x353e9b[_0x46e0aa]=_0x353e9b[_0x2b11a6],_0x353e9b[_0x2b11a6]=_0x33854f;}_0x46e0aa=-0x1812+-0x2*-0x472+0x3a*0x43,_0x2b11a6=0x1*0x8f3+0x1*0x15a7+-0xf4d*0x2;for(let _0x2bef30=-0x152*0x1b+0x5f2+0x1db4*0x1;_0x2bef30<_0x473199['\x6c\x65\x6e\x67\x74\x68'];_0x2bef30++){_0x46e0aa=(_0x46e0aa+(0x1*-0x3e9+-0x1d41+0x212b*0x1))%(0x122e+-0x1f83*0x1+-0x3*-0x4c7),_0x2b11a6=(_0x2b11a6+_0x353e9b[_0x46e0aa])%(0x577*0x5+0x1b*-0x161+0xae8),_0x33854f=_0x353e9b[_0x46e0aa],_0x353e9b[_0x46e0aa]=_0x353e9b[_0x2b11a6],_0x353e9b[_0x2b11a6]=_0x33854f,_0x3f50d2+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x473199['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2bef30)^_0x353e9b[(_0x353e9b[_0x46e0aa]+_0x353e9b[_0x2b11a6])%(-0x2189+0x20a1+0x3d*0x8)]);}return _0x3f50d2;};_0x5d38['\x48\x4b\x53\x66\x51\x51']=_0x4442e3,_0x5d38['\x6f\x72\x68\x6a\x4b\x72']={},_0x5d38['\x50\x48\x7a\x63\x48\x42']=!![];}const _0x2bf345=_0x3dcc57[0x1a8e+-0x9ca+-0x862*0x2],_0x91fcbc=_0x334b97+_0x2bf345,_0x2f7111=_0x5d38['\x6f\x72\x68\x6a\x4b\x72'][_0x91fcbc];if(!_0x2f7111){if(_0x5d38['\x78\x51\x4b\x7a\x79\x6f']===undefined){const _0x3670b2=function(_0x2a0b4c){this['\x69\x58\x41\x64\x4c\x5a']=_0x2a0b4c,this['\x73\x70\x69\x74\x6b\x53']=[0x5*-0x1be+-0x23*-0x118+-0x1d91,-0xc0b*0x2+-0x254a+-0xf58*-0x4,-0x12e*0xc+-0x1e73*0x1+0x2c9b],this['\x5a\x6e\x57\x57\x68\x4b']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x66\x54\x78\x4f\x6d\x71']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x6e\x72\x48\x6e\x51\x71']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x3670b2['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x66\x6b\x70\x6b\x55\x79']=function(){const _0x2c2096=new RegExp(this['\x66\x54\x78\x4f\x6d\x71']+this['\x6e\x72\x48\x6e\x51\x71']),_0x406b45=_0x2c2096['\x74\x65\x73\x74'](this['\x5a\x6e\x57\x57\x68\x4b']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x73\x70\x69\x74\x6b\x53'][0x3*0x207+-0x690+0x7c]:--this['\x73\x70\x69\x74\x6b\x53'][0x147d+-0x11ee+-0x28f];return this['\x6a\x46\x4d\x76\x54\x49'](_0x406b45);},_0x3670b2['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x6a\x46\x4d\x76\x54\x49']=function(_0x10506a){if(!Boolean(~_0x10506a))return _0x10506a;return this['\x53\x56\x65\x79\x6f\x7a'](this['\x69\x58\x41\x64\x4c\x5a']);},_0x3670b2['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x53\x56\x65\x79\x6f\x7a']=function(_0x635966){for(let _0x8133fb=0x2f*-0xd3+-0x1721+0x3dde,_0x52cef6=this['\x73\x70\x69\x74\x6b\x53']['\x6c\x65\x6e\x67\x74\x68'];_0x8133fb<_0x52cef6;_0x8133fb++){this['\x73\x70\x69\x74\x6b\x53']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x52cef6=this['\x73\x70\x69\x74\x6b\x53']['\x6c\x65\x6e\x67\x74\x68'];}return _0x635966(this['\x73\x70\x69\x74\x6b\x53'][-0x3*-0x2f6+-0x22*-0xf7+0x74*-0x5c]);},(''+function(){return-0xd11+-0xabf+0x17d0;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')===-(0x73*-0x2b+-0x1f0f*-0x1+-0xbbd*0x1)&&new _0x3670b2(_0x5d38)['\x66\x6b\x70\x6b\x55\x79'](),_0x5d38['\x78\x51\x4b\x7a\x79\x6f']=!![];}_0x585147=_0x5d38['\x48\x4b\x53\x66\x51\x51'](_0x585147,_0x206a6a),_0x5d38['\x6f\x72\x68\x6a\x4b\x72'][_0x91fcbc]=_0x585147;}else _0x585147=_0x2f7111;return _0x585147;}function _0x497162(){const _0x113220=_0x209650,_0x56025d={'\x50\x78\x66\x77\x75':function(_0x18eb7c,_0x1baa2b){return _0x18eb7c(_0x1baa2b);},'\x62\x78\x70\x53\x79':_0x113220(0x21f,'\x39\x23\x6a\x69'),'\x57\x61\x74\x41\x6b':function(_0x5baef9,_0x25c91c){return _0x5baef9===_0x25c91c;},'\x54\x4f\x74\x51\x6d':_0x113220(0x242,'\x66\x64\x74\x2a'),'\x46\x72\x44\x53\x46':function(_0x1741cb,_0x780d51){return _0x1741cb===_0x780d51;},'\x72\x48\x49\x61\x57':_0x113220(0x23f,'\x61\x70\x53\x42'),'\x57\x42\x70\x55\x42':function(_0x10823f,_0x4163f6){return _0x10823f===_0x4163f6;}},_0x311572=_0x56025d[_0x113220(0x201,'\x45\x58\x57\x61')](String,process.env.EVOLVER_WORKSPACE_KEYCHAIN||_0x56025d[_0x113220(0x218,'\x2a\x5a\x66\x6f')])[_0x113220(0x241,'\x74\x6f\x4e\x48')+_0x113220(0x214,'\x30\x2a\x49\x62')]()['\x74\x72\x69\x6d']();if(_0x56025d['\x57\x61\x74\x41\x6b'](_0x311572,_0x56025d[_0x113220(0x1eb,'\x4a\x58\x5a\x53')])||_0x56025d[_0x113220(0x220,'\x78\x66\x38\x5d')](_0x311572,_0x56025d[_0x113220(0x211,'\x21\x4d\x6a\x75')])||_0x56025d[_0x113220(0x249,'\x56\x47\x50\x74')](_0x311572,_0x56025d[_0x113220(0x235,'\x72\x52\x56\x41')]))return _0x311572;return _0x56025d[_0x113220(0x1f2,'\x6b\x4f\x62\x39')];}const _0x1d9164=[/no\s+matching\s+entry/i,/could\s+not\s+be\s+found/i,/element\s+not\s+found/i,/\bnoentry\b/i,/\bno\s*entry\b/i,/not\s+found\s+in\s+(?:secure|keychain)/i];function _0x4945b3(_0x5672d1){const _0xa2bcce=_0x209650,_0x21c5ae=_0x5672d1&&_0x5672d1[_0xa2bcce(0x1e6,'\x21\x4d\x6a\x75')]||'';return _0x1d9164[_0xa2bcce(0x1e3,'\x29\x54\x23\x35')](_0x36bac2=>_0x36bac2[_0xa2bcce(0x1fa,'\x63\x4b\x33\x41')](_0x21c5ae));}function _0x41e796(_0x2666f4){const _0x4fb681=_0x209650,_0xdec308={'\x70\x53\x6f\x4d\x75':_0x4fb681(0x24c,'\x59\x4f\x24\x78')+'\x2b\x29\x2b\x24','\x6f\x41\x49\x75\x77':function(_0x890068){return _0x890068();},'\x6b\x6e\x79\x63\x4e':function(_0x402374,_0x8c44a6){return _0x402374===_0x8c44a6;},'\x74\x4f\x4a\x6d\x6a':_0x4fb681(0x23d,'\x2a\x5a\x66\x6f'),'\x4b\x74\x45\x51\x69':_0x4fb681(0x224,'\x5b\x57\x5e\x49'),'\x47\x58\x51\x4e\x70':function(_0x1171ef,_0x8c6742){return _0x1171ef(_0x8c6742);}},_0xa0f54e=_0xdec308[_0x4fb681(0x22d,'\x44\x39\x5b\x65')](_0x304168),_0x34b5b5={};_0x34b5b5[_0x4fb681(0x213,'\x51\x6d\x49\x40')+'\x65']=![],_0x34b5b5['\x69\x64']=null;if(!_0xa0f54e)return _0x34b5b5;try{const _0x30b962=new _0xa0f54e[(_0x4fb681(0x1e1,'\x6b\x4f\x62\x39'))](_0x350ec6,_0x2666f4),_0x33181d=_0x30b962[_0x4fb681(0x23b,'\x56\x48\x41\x4e')+_0x4fb681(0x209,'\x5e\x49\x23\x49')]();if(_0xdec308[_0x4fb681(0x1ee,'\x40\x53\x41\x45')](typeof _0x33181d,_0xdec308[_0x4fb681(0x22e,'\x28\x38\x78\x47')])&&_0xdb2e79[_0x4fb681(0x24a,'\x37\x47\x4a\x58')](_0x33181d[_0x4fb681(0x223,'\x78\x63\x53\x66')]()))return{'\x61\x76\x61\x69\x6c\x61\x62\x6c\x65':!![],'\x69\x64':_0x33181d[_0x4fb681(0x23e,'\x2a\x5a\x66\x6f')]()};const _0x336c32={};return _0x336c32[_0x4fb681(0x1f1,'\x32\x6c\x50\x78')+'\x65']=!![],_0x336c32['\x69\x64']=null,_0x336c32;}catch(_0x10fdf7){if(_0xdec308[_0x4fb681(0x208,'\x71\x50\x44\x31')]('\x78\x67\x49\x42\x67',_0xdec308[_0x4fb681(0x228,'\x32\x28\x6f\x75')])){const _0x1156d2={};_0x1156d2['\x61\x76\x61\x69\x6c\x61\x62\x6c'+'\x65']=!![],_0x1156d2['\x69\x64']=null;if(_0xdec308[_0x4fb681(0x1df,'\x69\x41\x4f\x63')](_0x4945b3,_0x10fdf7))return _0x1156d2;const _0x1f7cd3={};return _0x1f7cd3['\x61\x76\x61\x69\x6c\x61\x62\x6c'+'\x65']=![],_0x1f7cd3['\x69\x64']=null,_0x1f7cd3;}else return _0x3c5f09[_0x4fb681(0x1de,'\x32\x6c\x50\x78')]()[_0x4fb681(0x1e7,'\x29\x54\x23\x35')](_0x4fb681(0x20f,'\x29\x26\x26\x4b')+_0x4fb681(0x1f3,'\x40\x53\x41\x45'))[_0x4fb681(0x232,'\x51\x6d\x49\x40')]()[_0x4fb681(0x234,'\x5b\x54\x24\x21')+_0x4fb681(0x1dd,'\x68\x53\x6d\x78')](_0x3306da)[_0x4fb681(0x1f7,'\x28\x38\x78\x47')](IhEulV['\x70\x53\x6f\x4d\x75']);}}function _0x30865c(_0xf5c7ec,_0x595eb7){const _0x4a2d8c=_0x209650,_0x24a777={'\x4d\x58\x76\x54\x4a':function(_0x53d54a){return _0x53d54a();}},_0x2d0f0d=_0x24a777[_0x4a2d8c(0x243,'\x67\x4c\x6f\x33')](_0x304168);if(!_0x2d0f0d)return![];try{const _0x27bc06=new _0x2d0f0d[(_0x4a2d8c(0x1ff,'\x5d\x54\x58\x53'))](_0x350ec6,_0xf5c7ec);return _0x27bc06[_0x4a2d8c(0x212,'\x30\x2a\x49\x62')+_0x4a2d8c(0x209,'\x5e\x49\x23\x49')](_0x595eb7),!![];}catch{return![];}}const _0x58b6c2={};_0x58b6c2[_0x209650(0x1f0,'\x78\x66\x38\x5d')+_0x209650(0x233,'\x56\x47\x50\x74')]=_0x350ec6,_0x58b6c2[_0x209650(0x21c,'\x50\x36\x53\x77')]=_0x497162,_0x58b6c2[_0x209650(0x210,'\x4a\x58\x5a\x53')+'\x6e']=_0x304168,_0x58b6c2[_0x209650(0x226,'\x67\x4c\x6f\x33')+_0x209650(0x227,'\x78\x63\x53\x66')]=_0x41e796,_0x58b6c2['\x77\x72\x69\x74\x65\x54\x6f\x4b'+_0x209650(0x1e2,'\x71\x50\x44\x31')]=_0x30865c,_0x58b6c2['\x5f\x69\x73\x4e\x6f\x45\x6e\x74'+'\x72\x79\x45\x72\x72\x6f\x72']=_0x4945b3,module[_0x209650(0x1e5,'\x66\x64\x74\x2a')]=_0x58b6c2;
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const os = require('os');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
const MANAGED_BY = 'evomap-proxy';
|
|
8
|
+
const REUSABLE_PROXY_TOKEN_RE = /^[a-f0-9]{64}$/i;
|
|
9
|
+
|
|
10
|
+
function getHomeDir(env = process.env) {
|
|
11
|
+
const home = String(env.HOME || os.homedir() || '').trim();
|
|
12
|
+
return home || null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function normalizeSettingsPath(value, home) {
|
|
16
|
+
const raw = String(value || '').trim();
|
|
17
|
+
if (!raw) return null;
|
|
18
|
+
if (home && raw === '~') return path.resolve(home);
|
|
19
|
+
if (home && raw.startsWith('~/')) return path.resolve(home, raw.slice(2));
|
|
20
|
+
return path.resolve(raw);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function samePath(a, b) {
|
|
24
|
+
if (!a || !b) return false;
|
|
25
|
+
const left = path.resolve(a);
|
|
26
|
+
const right = path.resolve(b);
|
|
27
|
+
return process.platform === 'win32'
|
|
28
|
+
? left.toLowerCase() === right.toLowerCase()
|
|
29
|
+
: left === right;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function getEnvClaudeSettingsFile(env = process.env) {
|
|
33
|
+
return String(env.CLAUDE_SETTINGS_FILE || env.EVOMAP_CLAUDE_SETTINGS_FILE || '').trim();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function isValidReusableProxyToken(value) {
|
|
37
|
+
return typeof value === 'string' && REUSABLE_PROXY_TOKEN_RE.test(value.trim());
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function normalizeUrl(value) {
|
|
41
|
+
return String(value || '').trim().replace(/\/+$/, '');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function parseUrl(value) {
|
|
45
|
+
const raw = normalizeUrl(value);
|
|
46
|
+
if (!raw) return null;
|
|
47
|
+
try {
|
|
48
|
+
return new URL(raw);
|
|
49
|
+
} catch {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function isLoopbackProxyUrl(value) {
|
|
55
|
+
const parsed = parseUrl(value);
|
|
56
|
+
if (!parsed || parsed.protocol !== 'http:') return false;
|
|
57
|
+
const host = parsed.hostname.toLowerCase();
|
|
58
|
+
return host === '127.0.0.1' || host === 'localhost' || host === '[::1]' || host === '::1';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function safeUpstreamBaseUrl(value, opts = {}) {
|
|
62
|
+
const baseUrl = normalizeUrl(value);
|
|
63
|
+
if (!baseUrl) return '';
|
|
64
|
+
if (baseUrl === normalizeUrl(opts.url)) return '';
|
|
65
|
+
return baseUrl;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function safeUpstreamToken(value, proxyToken) {
|
|
69
|
+
const token = typeof value === 'string' ? value.trim() : '';
|
|
70
|
+
if (!token || token === proxyToken) return '';
|
|
71
|
+
return token;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function getClaudeSettingsFile(env = process.env) {
|
|
75
|
+
const home = getHomeDir(env);
|
|
76
|
+
if (!home) return null;
|
|
77
|
+
return path.join(home, '.claude', 'settings.json');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function resolveClaudeSettingsFile(opts = {}, env = process.env) {
|
|
81
|
+
if (opts.file) {
|
|
82
|
+
return { file: opts.file, source: 'opts' };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const defaultFile = getClaudeSettingsFile(env);
|
|
86
|
+
if (!defaultFile) {
|
|
87
|
+
return { file: null, reason: 'missing_settings_path' };
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const envFile = getEnvClaudeSettingsFile(env);
|
|
91
|
+
if (!envFile) {
|
|
92
|
+
return { file: defaultFile, source: 'default' };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const home = getHomeDir(env);
|
|
96
|
+
const envResolved = normalizeSettingsPath(envFile, home);
|
|
97
|
+
const defaultResolved = normalizeSettingsPath(defaultFile, home);
|
|
98
|
+
if (samePath(envResolved, defaultResolved)) {
|
|
99
|
+
return { file: defaultFile, source: 'env_default' };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return { file: null, reason: 'unsafe_settings_path' };
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function readJsonFile(file) {
|
|
106
|
+
const result = readJsonFileResult(file);
|
|
107
|
+
return result.ok ? result.value : null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function readJsonFileResult(file) {
|
|
111
|
+
try {
|
|
112
|
+
if (!file || !fs.existsSync(file)) {
|
|
113
|
+
return { exists: false, ok: true, value: null };
|
|
114
|
+
}
|
|
115
|
+
return { exists: true, ok: true, value: JSON.parse(fs.readFileSync(file, 'utf8')) };
|
|
116
|
+
} catch (err) {
|
|
117
|
+
return { exists: Boolean(file), ok: false, value: null, error: err };
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function writePrivateJsonFile(file, data) {
|
|
122
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
123
|
+
fs.writeFileSync(file, JSON.stringify(data, null, 2) + '\n', { encoding: 'utf8', mode: 0o600 });
|
|
124
|
+
try { fs.chmodSync(file, 0o600); } catch { /* best-effort on Windows */ }
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function isDisabled(env = process.env) {
|
|
128
|
+
const raw = String(env.EVOMAP_PROXY_AUTO_INJECT || '').trim().toLowerCase();
|
|
129
|
+
return raw === '0' || raw === 'false' || raw === 'off' || raw === 'none' || raw === 'no';
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function hasManagedProxyMarker(settings) {
|
|
133
|
+
return settings && settings._evomap_proxy_client_env?.managed_by === MANAGED_BY;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function isManagedProxyBaseUrl(settings, cfg, value, opts = {}) {
|
|
137
|
+
const baseUrl = normalizeUrl(value);
|
|
138
|
+
if (!isLoopbackProxyUrl(baseUrl)) return false;
|
|
139
|
+
if (baseUrl === normalizeUrl(opts.url)) return true;
|
|
140
|
+
if (hasManagedProxyMarker(settings)) return true;
|
|
141
|
+
if (String(cfg && cfg.EVOMAP_PROXY_AUTO_INJECTED || '') === '1') return true;
|
|
142
|
+
|
|
143
|
+
const proxyUrl = normalizeUrl(cfg && cfg.EVOMAP_PROXY_URL);
|
|
144
|
+
return Boolean(proxyUrl && isLoopbackProxyUrl(proxyUrl) && proxyUrl === baseUrl);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function isManagedProxyClientSettings(settings, cfg, opts = {}) {
|
|
148
|
+
return isManagedProxyBaseUrl(settings, cfg, cfg && cfg.ANTHROPIC_BASE_URL, opts);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function isManagedProxyUpstreamResidual(settings, cfg, baseValue, tokenValue, apiKeyValue) {
|
|
152
|
+
const baseUrl = normalizeUrl(baseValue);
|
|
153
|
+
const token = typeof tokenValue === 'string' ? tokenValue.trim() : '';
|
|
154
|
+
const apiKey = typeof apiKeyValue === 'string' ? apiKeyValue.trim() : '';
|
|
155
|
+
if (!isLoopbackProxyUrl(baseUrl)
|
|
156
|
+
|| (!isValidReusableProxyToken(token) && !isValidReusableProxyToken(apiKey))) {
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
return hasManagedProxyMarker(settings) || String(cfg && cfg.EVOMAP_PROXY_AUTO_INJECTED || '') === '1';
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function safeStoredUpstreamBaseUrl(settings, cfg, value, opts = {}) {
|
|
163
|
+
const baseUrl = normalizeUrl(value);
|
|
164
|
+
if (!baseUrl) return '';
|
|
165
|
+
if (baseUrl === normalizeUrl(opts.url)) return '';
|
|
166
|
+
const proxyUrl = normalizeUrl(cfg && cfg.EVOMAP_PROXY_URL);
|
|
167
|
+
if (proxyUrl && baseUrl === proxyUrl) return '';
|
|
168
|
+
if (baseUrl === normalizeUrl(cfg && cfg.ANTHROPIC_BASE_URL)
|
|
169
|
+
&& isManagedProxyBaseUrl(settings, cfg, cfg && cfg.ANTHROPIC_BASE_URL, opts)) {
|
|
170
|
+
return '';
|
|
171
|
+
}
|
|
172
|
+
return safeUpstreamBaseUrl(value, opts);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function readReusableClientProxyToken(opts = {}) {
|
|
176
|
+
const env = opts.env || process.env;
|
|
177
|
+
if (isDisabled(env)) return null;
|
|
178
|
+
|
|
179
|
+
const resolved = resolveClaudeSettingsFile(opts, env);
|
|
180
|
+
const file = resolved.file;
|
|
181
|
+
if (!file) return null;
|
|
182
|
+
const settings = readJsonFile(file);
|
|
183
|
+
const cfg = settings && settings.env;
|
|
184
|
+
if (!cfg || typeof cfg !== 'object') return null;
|
|
185
|
+
|
|
186
|
+
const baseUrl = normalizeUrl(cfg.ANTHROPIC_BASE_URL);
|
|
187
|
+
const token = typeof cfg.ANTHROPIC_AUTH_TOKEN === 'string'
|
|
188
|
+
? cfg.ANTHROPIC_AUTH_TOKEN.trim()
|
|
189
|
+
: '';
|
|
190
|
+
if (!isValidReusableProxyToken(token)
|
|
191
|
+
|| !isManagedProxyClientSettings(settings, cfg, opts)
|
|
192
|
+
|| !isLoopbackProxyUrl(baseUrl)) {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
return token;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function backupExistingFile(file) {
|
|
199
|
+
try {
|
|
200
|
+
if (!file || !fs.existsSync(file)) return null;
|
|
201
|
+
const stamp = new Date().toISOString().replace(/[-:]/g, '').replace(/\.\d{3}Z$/, 'Z');
|
|
202
|
+
const backupDir = path.join(path.dirname(file), 'backups');
|
|
203
|
+
fs.mkdirSync(backupDir, { recursive: true });
|
|
204
|
+
for (let i = 0; i < 10; i++) {
|
|
205
|
+
const suffix = i === 0 ? '' : `-${i}`;
|
|
206
|
+
const backupFile = path.join(backupDir, `settings.json.pre-evomap-proxy-sync-${stamp}${suffix}`);
|
|
207
|
+
try {
|
|
208
|
+
fs.copyFileSync(file, backupFile, fs.constants.COPYFILE_EXCL);
|
|
209
|
+
try { fs.chmodSync(backupFile, 0o600); } catch { /* best-effort */ }
|
|
210
|
+
return backupFile;
|
|
211
|
+
} catch (err) {
|
|
212
|
+
if (!err || err.code !== 'EEXIST') return null;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return null;
|
|
216
|
+
} catch {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function syncClaudeProxySettings(info = {}) {
|
|
222
|
+
const env = info.env || process.env;
|
|
223
|
+
if (isDisabled(env)) {
|
|
224
|
+
return { synced: false, reason: 'disabled' };
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const url = normalizeUrl(info.url);
|
|
228
|
+
const token = typeof info.token === 'string' ? info.token.trim() : '';
|
|
229
|
+
if (!url || !isValidReusableProxyToken(token)) {
|
|
230
|
+
return { synced: false, reason: 'missing_proxy_settings' };
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const resolved = resolveClaudeSettingsFile(info, env);
|
|
234
|
+
const file = resolved.file;
|
|
235
|
+
if (!file) {
|
|
236
|
+
return { synced: false, changed: false, reason: resolved.reason || 'missing_settings_path' };
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const currentResult = readJsonFileResult(file);
|
|
240
|
+
if (currentResult.exists && !currentResult.ok) {
|
|
241
|
+
const backupFile = info.backup === false ? null : backupExistingFile(file);
|
|
242
|
+
return {
|
|
243
|
+
synced: false,
|
|
244
|
+
changed: false,
|
|
245
|
+
reason: 'invalid_settings_json',
|
|
246
|
+
file,
|
|
247
|
+
backupFile,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
const current = currentResult.value;
|
|
251
|
+
const settings = current && typeof current === 'object' && !Array.isArray(current)
|
|
252
|
+
? current
|
|
253
|
+
: {};
|
|
254
|
+
const cfg = settings.env && typeof settings.env === 'object' && !Array.isArray(settings.env)
|
|
255
|
+
? { ...settings.env }
|
|
256
|
+
: {};
|
|
257
|
+
|
|
258
|
+
const existingBase = normalizeUrl(cfg.ANTHROPIC_BASE_URL);
|
|
259
|
+
const existingToken = typeof cfg.ANTHROPIC_AUTH_TOKEN === 'string'
|
|
260
|
+
? cfg.ANTHROPIC_AUTH_TOKEN.trim()
|
|
261
|
+
: '';
|
|
262
|
+
const existingApiKey = typeof cfg.ANTHROPIC_API_KEY === 'string'
|
|
263
|
+
? cfg.ANTHROPIC_API_KEY.trim()
|
|
264
|
+
: '';
|
|
265
|
+
const existingStoredUpstreamBase = normalizeUrl(cfg.EVOMAP_ANTHROPIC_BASE_URL);
|
|
266
|
+
const existingStoredUpstreamAuthToken = typeof cfg.EVOMAP_ANTHROPIC_AUTH_TOKEN === 'string'
|
|
267
|
+
? cfg.EVOMAP_ANTHROPIC_AUTH_TOKEN.trim()
|
|
268
|
+
: '';
|
|
269
|
+
const existingUpstreamApiKey = typeof cfg.EVOMAP_ANTHROPIC_API_KEY === 'string'
|
|
270
|
+
? cfg.EVOMAP_ANTHROPIC_API_KEY.trim()
|
|
271
|
+
: '';
|
|
272
|
+
const existingBaseIsProxy = isManagedProxyBaseUrl(settings, cfg, existingBase, info);
|
|
273
|
+
const runtimeEnv = info.runtimeEnv && typeof info.runtimeEnv === 'object'
|
|
274
|
+
? info.runtimeEnv
|
|
275
|
+
: null;
|
|
276
|
+
|
|
277
|
+
let changed = false;
|
|
278
|
+
let runtimeChanged = false;
|
|
279
|
+
let runtimeUpstreamChanged = false;
|
|
280
|
+
const setIfChanged = (key, value) => {
|
|
281
|
+
if (cfg[key] === value) return;
|
|
282
|
+
cfg[key] = value;
|
|
283
|
+
changed = true;
|
|
284
|
+
};
|
|
285
|
+
const deleteIfPresent = (key) => {
|
|
286
|
+
if (!Object.prototype.hasOwnProperty.call(cfg, key)) return;
|
|
287
|
+
delete cfg[key];
|
|
288
|
+
changed = true;
|
|
289
|
+
};
|
|
290
|
+
const setRuntimeIfMissing = (key, value) => {
|
|
291
|
+
if (!runtimeEnv || !value) return false;
|
|
292
|
+
if (String(runtimeEnv[key] || '').trim()) return false;
|
|
293
|
+
runtimeEnv[key] = value;
|
|
294
|
+
runtimeChanged = true;
|
|
295
|
+
runtimeUpstreamChanged = true;
|
|
296
|
+
return true;
|
|
297
|
+
};
|
|
298
|
+
const setRuntimeAutoInjected = () => {
|
|
299
|
+
if (!runtimeEnv || !runtimeUpstreamChanged || runtimeEnv.EVOMAP_PROXY_AUTO_INJECTED === '1') return;
|
|
300
|
+
runtimeEnv.EVOMAP_PROXY_AUTO_INJECTED = '1';
|
|
301
|
+
runtimeChanged = true;
|
|
302
|
+
};
|
|
303
|
+
const setRuntimeUpstreamApiKey = (value) => {
|
|
304
|
+
const upstreamApiKey = safeUpstreamToken(value, token);
|
|
305
|
+
if (!upstreamApiKey || upstreamApiKey === existingToken) return;
|
|
306
|
+
setRuntimeIfMissing('EVOMAP_ANTHROPIC_API_KEY', upstreamApiKey);
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
if (isManagedProxyUpstreamResidual(
|
|
310
|
+
settings,
|
|
311
|
+
cfg,
|
|
312
|
+
existingStoredUpstreamBase,
|
|
313
|
+
existingStoredUpstreamAuthToken,
|
|
314
|
+
existingUpstreamApiKey
|
|
315
|
+
)) {
|
|
316
|
+
deleteIfPresent('EVOMAP_ANTHROPIC_BASE_URL');
|
|
317
|
+
deleteIfPresent('EVOMAP_ANTHROPIC_AUTH_TOKEN');
|
|
318
|
+
deleteIfPresent('EVOMAP_ANTHROPIC_API_KEY');
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
const migratedBaseUrl = existingBaseIsProxy ? '' : safeUpstreamBaseUrl(existingBase, info);
|
|
322
|
+
if (migratedBaseUrl && !existingBaseIsProxy && !cfg.EVOMAP_ANTHROPIC_BASE_URL) {
|
|
323
|
+
setIfChanged('EVOMAP_ANTHROPIC_BASE_URL', migratedBaseUrl);
|
|
324
|
+
}
|
|
325
|
+
const migratedAuthToken = existingBaseIsProxy ? '' : safeUpstreamToken(existingToken, token);
|
|
326
|
+
if (migratedAuthToken && !cfg.EVOMAP_ANTHROPIC_AUTH_TOKEN) {
|
|
327
|
+
setIfChanged('EVOMAP_ANTHROPIC_AUTH_TOKEN', migratedAuthToken);
|
|
328
|
+
}
|
|
329
|
+
if (existingApiKey && existingApiKey !== token && existingApiKey !== existingToken && !cfg.EVOMAP_ANTHROPIC_API_KEY) {
|
|
330
|
+
setIfChanged('EVOMAP_ANTHROPIC_API_KEY', existingApiKey);
|
|
331
|
+
}
|
|
332
|
+
const runtimeHadUpstreamBase = Boolean(runtimeEnv && String(runtimeEnv.EVOMAP_ANTHROPIC_BASE_URL || '').trim());
|
|
333
|
+
const runtimeBaseSyncedFromSettings = setRuntimeIfMissing(
|
|
334
|
+
'EVOMAP_ANTHROPIC_BASE_URL',
|
|
335
|
+
safeStoredUpstreamBaseUrl(settings, cfg, cfg.EVOMAP_ANTHROPIC_BASE_URL, info)
|
|
336
|
+
);
|
|
337
|
+
const canSyncSettingsCredentialToRuntime = !runtimeHadUpstreamBase || runtimeBaseSyncedFromSettings;
|
|
338
|
+
if (canSyncSettingsCredentialToRuntime) {
|
|
339
|
+
const upstreamAuthToken = safeUpstreamToken(cfg.EVOMAP_ANTHROPIC_AUTH_TOKEN, token);
|
|
340
|
+
if (!(existingBaseIsProxy && upstreamAuthToken === existingToken)) {
|
|
341
|
+
setRuntimeIfMissing('EVOMAP_ANTHROPIC_AUTH_TOKEN', upstreamAuthToken);
|
|
342
|
+
}
|
|
343
|
+
setRuntimeUpstreamApiKey(cfg.EVOMAP_ANTHROPIC_API_KEY);
|
|
344
|
+
}
|
|
345
|
+
setRuntimeAutoInjected();
|
|
346
|
+
|
|
347
|
+
setIfChanged('ANTHROPIC_BASE_URL', url);
|
|
348
|
+
setIfChanged('ANTHROPIC_AUTH_TOKEN', token);
|
|
349
|
+
deleteIfPresent('ANTHROPIC_API_KEY');
|
|
350
|
+
setIfChanged('CUSTOM_API_KEY', token);
|
|
351
|
+
setIfChanged('EVOMAP_PROXY_URL', url);
|
|
352
|
+
setIfChanged('EVOMAP_PROXY_AUTO_INJECTED', '1');
|
|
353
|
+
|
|
354
|
+
const marker = settings._evomap_proxy_client_env || {};
|
|
355
|
+
if (marker.managed_by !== MANAGED_BY) {
|
|
356
|
+
settings._evomap_proxy_client_env = { managed_by: MANAGED_BY };
|
|
357
|
+
changed = true;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if (!changed) {
|
|
361
|
+
return {
|
|
362
|
+
synced: true,
|
|
363
|
+
changed: false,
|
|
364
|
+
runtimeChanged,
|
|
365
|
+
file,
|
|
366
|
+
vars: [
|
|
367
|
+
'ANTHROPIC_BASE_URL',
|
|
368
|
+
'ANTHROPIC_AUTH_TOKEN',
|
|
369
|
+
'CUSTOM_API_KEY',
|
|
370
|
+
'EVOMAP_PROXY_URL',
|
|
371
|
+
],
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
settings.env = cfg;
|
|
376
|
+
settings._evomap_proxy_client_env = {
|
|
377
|
+
managed_by: MANAGED_BY,
|
|
378
|
+
updated_at: new Date().toISOString(),
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
const backupFile = info.backup === false ? null : backupExistingFile(file);
|
|
382
|
+
writePrivateJsonFile(file, settings);
|
|
383
|
+
|
|
384
|
+
return {
|
|
385
|
+
synced: true,
|
|
386
|
+
changed: true,
|
|
387
|
+
runtimeChanged,
|
|
388
|
+
file,
|
|
389
|
+
backupFile,
|
|
390
|
+
vars: [
|
|
391
|
+
'ANTHROPIC_BASE_URL',
|
|
392
|
+
'ANTHROPIC_AUTH_TOKEN',
|
|
393
|
+
'CUSTOM_API_KEY',
|
|
394
|
+
'EVOMAP_PROXY_URL',
|
|
395
|
+
],
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
module.exports = {
|
|
400
|
+
getClaudeSettingsFile,
|
|
401
|
+
isLoopbackProxyUrl,
|
|
402
|
+
isValidReusableProxyToken,
|
|
403
|
+
readReusableClientProxyToken,
|
|
404
|
+
syncClaudeProxySettings,
|
|
405
|
+
};
|