@evomap/evolver-proxy 2.0.2 → 2.0.12
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/dist/bin/evolver-proxy.d.ts +12 -0
- package/dist/bin/evolver-proxy.js +192 -59
- package/dist/daemon/proxyDaemon.js +10 -0
- package/dist/daemon/systemdNotifier.d.ts +2 -0
- package/dist/daemon/systemdNotifier.js +11 -1
- package/dist/lifecycle/claimNudge.js +1 -1
- package/dist/lifecycle/deployGuard.js +1 -1
- package/dist/lifecycle/legacyNodeId.js +1 -1
- package/dist/lifecycle/manager.js +1 -1
- package/dist/llm/bodyCapture.js +1 -1
- package/dist/llm/index.js +1 -1
- package/dist/llm/server.js +1 -1
- package/dist/llm/traceBackfill.js +1 -1
- package/dist/llm/traceConfig.js +1 -1
- package/dist/llm/traceControl.js +1 -1
- package/dist/llm/traceEnvelope.js +1 -1
- package/dist/llm/traceSink.js +1 -1
- package/dist/llm/traceUploadPayload.js +1 -1
- package/dist/llm/upstream.js +1 -1
- package/dist/router/cachePassthrough.js +1 -1
- package/dist/router/features.js +1 -1
- package/dist/router/index.js +1 -1
- package/dist/router/messagesRoute.js +1 -1
- package/dist/router/modelRouter.js +1 -1
- package/dist/router/providerRoutes.js +1 -1
- package/dist/router/sseScan.js +1 -1
- package/dist/selfUpdate/bootstrap.d.ts +106 -13
- package/dist/selfUpdate/bootstrap.js +3418 -176
- package/dist/selfUpdate/bootstrapReadiness.d.ts +9 -0
- package/dist/selfUpdate/bootstrapReadiness.js +153 -0
- package/dist/selfUpdate/controllerLifecycleAuthority.d.ts +45 -0
- package/dist/selfUpdate/controllerLifecycleAuthority.js +61 -0
- package/dist/selfUpdate/executor.d.ts +17 -6
- package/dist/selfUpdate/executor.js +158 -58
- package/dist/selfUpdate/index.d.ts +2 -1
- package/dist/selfUpdate/index.js +2 -1
- package/dist/selfUpdate/migration.d.ts +80 -15
- package/dist/selfUpdate/migration.js +2513 -156
- package/dist/selfUpdate/policy.js +2 -8
- package/dist/selfUpdate/recoveryChildStartGate.d.ts +29 -0
- package/dist/selfUpdate/recoveryChildStartGate.js +319 -0
- package/dist/selfUpdate/releaseBinary.d.ts +3 -0
- package/dist/selfUpdate/releaseBinary.js +46 -3
- package/dist/selfUpdate/transaction.d.ts +8 -0
- package/dist/selfUpdate/transaction.js +166 -18
- package/dist/selfUpdate/unixController.d.ts +8 -0
- package/dist/selfUpdate/unixController.js +364 -38
- package/dist/selfUpdate/windowsController.d.ts +14 -2
- package/dist/selfUpdate/windowsController.js +482 -103
- package/dist/selfUpdate/windowsUpdater.d.ts +25 -0
- package/dist/selfUpdate/windowsUpdater.js +174 -7
- package/dist/sync/engine.js +1 -1
- package/package.json +3 -3
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
import { mailbox } from '@evomap/evolver-core';
|
|
3
3
|
import { PrivateNodeCredentialStore } from '../private/nodeCredentialStore.js';
|
|
4
4
|
import { loadEnvFileFromEnv } from './envFile.js';
|
|
5
|
+
import { type DegradedStartupBootstrapResult } from '../selfUpdate/bootstrap.js';
|
|
5
6
|
import { type SelfUpdatePolicy } from '../selfUpdate/policy.js';
|
|
6
7
|
import { type ReleaseBinaryOptions } from '../selfUpdate/releaseBinary.js';
|
|
7
8
|
import { rollbackDurableSelfUpdate, type SelfUpdateRecoveryOptions, type SelfUpdateRecoveryResult, type StagedBinaryProbe } from '../selfUpdate/transaction.js';
|
|
8
9
|
import { maybeRunWindowsUpdaterWorkerFromArgv } from '../selfUpdate/windowsUpdater.js';
|
|
9
10
|
import { maybeRunUnixRecoveryController } from '../selfUpdate/unixController.js';
|
|
10
11
|
import { maybeRunWindowsRecoveryController } from '../selfUpdate/windowsController.js';
|
|
12
|
+
import { consumeRecoveryChildStartGate } from '../selfUpdate/recoveryChildStartGate.js';
|
|
11
13
|
import type { AtpProxyClient, ProxyDaemonDeps, ProxyTickReport } from '../daemon/proxyDaemon.js';
|
|
12
14
|
import type { HelloLifecycleMode, HelloResult, HeartbeatOptions, HeartbeatResult } from '../lifecycle/manager.js';
|
|
13
15
|
import type { InboundResult } from '../sync/engine.js';
|
|
@@ -15,7 +17,16 @@ import type { InboundResult } from '../sync/engine.js';
|
|
|
15
17
|
export interface RunProxyMainOptions {
|
|
16
18
|
environmentPrepared?: boolean;
|
|
17
19
|
recoveryPrepared?: SelfUpdateRecoveryResult;
|
|
20
|
+
requireLifecycleBootstrapState?: boolean;
|
|
21
|
+
/** Test-only transport seam. Production always resolves the configured hub runtime. */
|
|
22
|
+
connectRuntime?: typeof connectHubRuntime;
|
|
23
|
+
/** Test-only bounded loop seam. Production always runs the managed proxy loop. */
|
|
24
|
+
runLoop?: Parameters<typeof runManagedProxyLoop>[0]['runLoop'];
|
|
18
25
|
}
|
|
26
|
+
export declare function writeBootstrapStartupResult(result: DegradedStartupBootstrapResult, writers?: {
|
|
27
|
+
stdout?: (text: string) => void;
|
|
28
|
+
stderr?: (text: string) => void;
|
|
29
|
+
}): 0 | 1 | undefined;
|
|
19
30
|
export declare function runProxyMain(options?: RunProxyMainOptions): Promise<void>;
|
|
20
31
|
export declare function recoverBoundDurableSelfUpdate(options: Omit<SelfUpdateRecoveryOptions, 'beforeJournalMutation'>): Promise<SelfUpdateRecoveryResult>;
|
|
21
32
|
export declare function loadProxyEnvFile(env: NodeJS.ProcessEnv): ReturnType<typeof loadEnvFileFromEnv>;
|
|
@@ -52,6 +63,7 @@ export interface RunProxyCliOptions {
|
|
|
52
63
|
runUnixRecoveryController?: typeof maybeRunUnixRecoveryController;
|
|
53
64
|
runWindowsRecoveryController?: typeof maybeRunWindowsRecoveryController;
|
|
54
65
|
runWindowsUpdaterWorker?: typeof maybeRunWindowsUpdaterWorkerFromArgv;
|
|
66
|
+
consumeChildStartGate?: typeof consumeRecoveryChildStartGate;
|
|
55
67
|
}
|
|
56
68
|
export interface ProxyCliPathOptions {
|
|
57
69
|
home?: string;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { createHash, randomBytes } from 'node:crypto';
|
|
3
3
|
import { readFileSync, realpathSync, rmSync } from 'node:fs';
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
|
-
import { join, resolve
|
|
5
|
+
import { join, resolve } from 'node:path';
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
|
-
import { daemon, hub as hubNs, mailbox } from '@evomap/evolver-core';
|
|
7
|
+
import { bootstrap as coreBootstrap, daemon, hub as hubNs, mailbox, util } from '@evomap/evolver-core';
|
|
8
8
|
import { AtpHubClient, connectPublicHub, globalFetchLike, isNodeSecret, parseNodeSecretVersion } from '@evomap/evolver-adapter-public';
|
|
9
9
|
import { ProxyDaemon } from '../daemon/proxyDaemon.js';
|
|
10
10
|
import { resolveHubMode, resolveHubUrl } from '../daemon/selectHub.js';
|
|
@@ -19,27 +19,47 @@ import { publishProxySettings } from './proxySettings.js';
|
|
|
19
19
|
import { expandHomePath, loadEnvFileFromEnv } from './envFile.js';
|
|
20
20
|
import { readLegacyNodeId, resolveProxyNodeId } from '../lifecycle/legacyNodeId.js';
|
|
21
21
|
import { createClaimNudge, wrapHelloWithClaimNudge } from '../lifecycle/claimNudge.js';
|
|
22
|
-
import { bootstrapDegradedSelfUpdateStartup } from '../selfUpdate/bootstrap.js';
|
|
22
|
+
import { acquireLifecycleBootstrapOwnerLease, assertSupervisedLifecycleBootstrapState, bootstrapDegradedSelfUpdateStartup, clearRecoveryControllerLifecycleOwnerCapability, lifecycleBootstrapStatePresent, publishRecoveryControllerLifecycleStartupAttestation, RECOVERY_CONTROLLER_LIFECYCLE_OWNER_CAPABILITY_ENV, } from '../selfUpdate/bootstrap.js';
|
|
23
23
|
import { getCurrentVersion } from '../selfUpdate/version.js';
|
|
24
24
|
import { resolveEffectiveSelfUpdatePolicy, selfUpdateSupervisorAttested, } from '../selfUpdate/policy.js';
|
|
25
25
|
import { resolveSelfUpdatePublicKey } from '../selfUpdate/builtinKey.js';
|
|
26
|
-
import { atomicReplaceExecutable, downloadGithubReleaseArtifact, resolveGithubReleaseManifest,
|
|
26
|
+
import { atomicReplaceExecutable, assertSelfUpdateProcessTargetBound as assertReleaseSelfUpdateProcessTargetBound, downloadGithubReleaseArtifact, resolveGithubReleaseManifest, } from '../selfUpdate/releaseBinary.js';
|
|
27
27
|
import { beginDurableSelfUpdate, confirmDurableSelfUpdate, recoverDurableSelfUpdate, rollbackDurableSelfUpdate, } from '../selfUpdate/transaction.js';
|
|
28
|
-
import { SELF_UPDATE_FAILURE_CODES } from '../selfUpdate/failureCodes.js';
|
|
29
|
-
import { maybeRunWindowsUpdaterWorkerFromArgv } from '../selfUpdate/windowsUpdater.js';
|
|
28
|
+
import { SELF_UPDATE_FAILURE_CODES, selfUpdateFailure } from '../selfUpdate/failureCodes.js';
|
|
29
|
+
import { maybeRunWindowsUpdaterWorkerFromArgv, WINDOWS_UPDATER_WORKER_ARG, } from '../selfUpdate/windowsUpdater.js';
|
|
30
30
|
import { maybeRunUnixRecoveryController } from '../selfUpdate/unixController.js';
|
|
31
31
|
import { maybeRunWindowsRecoveryController } from '../selfUpdate/windowsController.js';
|
|
32
|
+
import { consumeRecoveryChildStartGate, RECOVERY_CHILD_START_GATE_ENV, } from '../selfUpdate/recoveryChildStartGate.js';
|
|
33
|
+
import { publishLifecycleBootstrapReadiness } from '../selfUpdate/bootstrapReadiness.js';
|
|
32
34
|
import { finalizeSelfUpdateRecoveryLastUpdate } from '../selfUpdate/lastUpdate.js';
|
|
35
|
+
export function writeBootstrapStartupResult(result, writers = {}) {
|
|
36
|
+
const line = `${result.message}\n`;
|
|
37
|
+
if (result.disposition === 'handoff') {
|
|
38
|
+
(writers.stdout ?? ((text) => { process.stdout.write(text); }))(line);
|
|
39
|
+
return result.exitCode;
|
|
40
|
+
}
|
|
41
|
+
(writers.stderr ?? ((text) => { process.stderr.write(text); }))(line);
|
|
42
|
+
return result.disposition === 'fail_closed' ? result.exitCode : undefined;
|
|
43
|
+
}
|
|
33
44
|
export async function runProxyMain(options = {}) {
|
|
45
|
+
if (process.env[RECOVERY_CHILD_START_GATE_ENV] !== undefined) {
|
|
46
|
+
throw new Error('self_update_recovery_child_start_gate_unconsumed');
|
|
47
|
+
}
|
|
34
48
|
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
35
49
|
process.stdout.write(proxyUsage());
|
|
36
50
|
return;
|
|
37
51
|
}
|
|
38
52
|
// Recovery must run before any hub/store/runtime initialization. In particular,
|
|
39
53
|
// a broken store or env-file pointer must not prevent a pending-health update from restoring the old binary.
|
|
54
|
+
const requireLifecycleBootstrapState = options.requireLifecycleBootstrapState
|
|
55
|
+
?? unpinnedLegacySupervisorRequiresLifecycleState(process.env);
|
|
56
|
+
const recoveryEnvironment = proxyRecoveryEnvironment(process.env);
|
|
57
|
+
assertSupervisedLifecycleBootstrapState(recoveryEnvironment, {
|
|
58
|
+
requireLifecycleState: requireLifecycleBootstrapState,
|
|
59
|
+
});
|
|
40
60
|
const recovery = options.recoveryPrepared
|
|
41
61
|
?? await recoverBoundDurableSelfUpdate({
|
|
42
|
-
env:
|
|
62
|
+
env: recoveryEnvironment,
|
|
43
63
|
processExecPath: process.execPath,
|
|
44
64
|
});
|
|
45
65
|
if (recovery.outcome === 'blocked') {
|
|
@@ -52,6 +72,15 @@ export async function runProxyMain(options = {}) {
|
|
|
52
72
|
if (envFile.error)
|
|
53
73
|
throw new Error(`failed to load EVOLVER_ENV_FILE: ${safeLoopMessage(envFile.error)}`);
|
|
54
74
|
}
|
|
75
|
+
assertSupervisedLifecycleBootstrapState(process.env, {
|
|
76
|
+
requireLifecycleState: requireLifecycleBootstrapState,
|
|
77
|
+
});
|
|
78
|
+
try {
|
|
79
|
+
publishRecoveryControllerLifecycleStartupAttestation(process.env);
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
clearRecoveryControllerLifecycleOwnerCapability(process.env);
|
|
83
|
+
}
|
|
55
84
|
let storePath;
|
|
56
85
|
let store;
|
|
57
86
|
let proxyDaemon;
|
|
@@ -89,18 +118,13 @@ export async function runProxyMain(options = {}) {
|
|
|
89
118
|
// unsupervised foreground runs keep starting; explicit 'auto' stays fail-closed at assembly below.
|
|
90
119
|
const effectiveSelfUpdate = resolveEffectiveSelfUpdatePolicy(process.env);
|
|
91
120
|
selfUpdatePolicy = effectiveSelfUpdate.policy;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
// 'off' startup; success hands restart ownership to the service manager.
|
|
121
|
+
const recoverLifecycleBootstrap = !selfUpdateSupervisorAttested(process.env)
|
|
122
|
+
&& lifecycleBootstrapStatePresent(process.env);
|
|
123
|
+
if (effectiveSelfUpdate.degraded || recoverLifecycleBootstrap) {
|
|
96
124
|
const bootstrap = await bootstrapDegradedSelfUpdateStartup(process.env, process.platform);
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
process.stdout.write(`${bootstrap.message}\n`);
|
|
101
|
-
process.exit(0);
|
|
102
|
-
}
|
|
103
|
-
process.stderr.write(`${bootstrap.message}\n`);
|
|
125
|
+
const bootstrapExitCode = writeBootstrapStartupResult(bootstrap);
|
|
126
|
+
if (bootstrapExitCode !== undefined)
|
|
127
|
+
process.exit(bootstrapExitCode);
|
|
104
128
|
}
|
|
105
129
|
const proxyStartedAt = new Date().toISOString();
|
|
106
130
|
publishLocalProxySettings = () => {
|
|
@@ -120,7 +144,7 @@ export async function runProxyMain(options = {}) {
|
|
|
120
144
|
const privateNodeCredentialStore = mode === 'private'
|
|
121
145
|
? new PrivateNodeCredentialStore(storePath)
|
|
122
146
|
: undefined;
|
|
123
|
-
const runtime = await connectHubRuntime({
|
|
147
|
+
const runtime = await (options.connectRuntime ?? connectHubRuntime)({
|
|
124
148
|
mode,
|
|
125
149
|
hubUrl,
|
|
126
150
|
senderId,
|
|
@@ -152,6 +176,11 @@ export async function runProxyMain(options = {}) {
|
|
|
152
176
|
throw new Error(`self_update_confirmation_failed:${confirmation.outcome}`);
|
|
153
177
|
}
|
|
154
178
|
}
|
|
179
|
+
publishLifecycleBootstrapReadiness({
|
|
180
|
+
env: process.env,
|
|
181
|
+
startedAt: proxyStartedAt,
|
|
182
|
+
ipcUrl: `http://127.0.0.1:${port}`,
|
|
183
|
+
});
|
|
155
184
|
}
|
|
156
185
|
catch (error) {
|
|
157
186
|
if (recovery.outcome === 'pending_health') {
|
|
@@ -182,6 +211,7 @@ export async function runProxyMain(options = {}) {
|
|
|
182
211
|
store: store,
|
|
183
212
|
notifier: systemdNotifier,
|
|
184
213
|
logger: process.stderr,
|
|
214
|
+
...(options.runLoop ? { runLoop: options.runLoop } : {}),
|
|
185
215
|
});
|
|
186
216
|
}
|
|
187
217
|
export async function recoverBoundDurableSelfUpdate(options) {
|
|
@@ -197,6 +227,9 @@ export function loadProxyEnvFile(env) {
|
|
|
197
227
|
const lifecycleStateDir = env['EVOLVER_LIFECYCLE_STATE_DIR'];
|
|
198
228
|
const stateDir = env['EVOLVER_SELF_UPDATE_STATE_DIR'];
|
|
199
229
|
const targetPath = env['EVOLVER_SELF_UPDATE_TARGET_PATH'];
|
|
230
|
+
const bootstrapTransactionId = env[coreBootstrap.LIFECYCLE_BOOTSTRAP_TRANSACTION_ENV];
|
|
231
|
+
const recoveryControllerOwnerCapability = env[RECOVERY_CONTROLLER_LIFECYCLE_OWNER_CAPABILITY_ENV];
|
|
232
|
+
const recoveryChildStartGate = env[RECOVERY_CHILD_START_GATE_ENV];
|
|
200
233
|
const systemRootBindings = Object.entries(env)
|
|
201
234
|
.filter(([key]) => key.toLowerCase() === 'systemroot');
|
|
202
235
|
const result = loadEnvFileFromEnv(env);
|
|
@@ -208,8 +241,22 @@ export function loadProxyEnvFile(env) {
|
|
|
208
241
|
if (value !== undefined)
|
|
209
242
|
env[key] = value;
|
|
210
243
|
}
|
|
244
|
+
if (recoveryControllerOwnerCapability === undefined) {
|
|
245
|
+
delete env[RECOVERY_CONTROLLER_LIFECYCLE_OWNER_CAPABILITY_ENV];
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
env[RECOVERY_CONTROLLER_LIFECYCLE_OWNER_CAPABILITY_ENV] =
|
|
249
|
+
recoveryControllerOwnerCapability;
|
|
250
|
+
}
|
|
251
|
+
if (recoveryChildStartGate === undefined) {
|
|
252
|
+
delete env[RECOVERY_CHILD_START_GATE_ENV];
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
env[RECOVERY_CHILD_START_GATE_ENV] = recoveryChildStartGate;
|
|
256
|
+
}
|
|
211
257
|
if (supervisor === undefined) {
|
|
212
258
|
delete env['EVOLVER_SELF_UPDATE_SUPERVISOR'];
|
|
259
|
+
delete env[coreBootstrap.LIFECYCLE_BOOTSTRAP_TRANSACTION_ENV];
|
|
213
260
|
}
|
|
214
261
|
else {
|
|
215
262
|
env['EVOLVER_SELF_UPDATE_SUPERVISOR'] = supervisor;
|
|
@@ -219,6 +266,12 @@ export function loadProxyEnvFile(env) {
|
|
|
219
266
|
env['EVOLVER_SELF_UPDATE_STATE_DIR'] = stateDir;
|
|
220
267
|
if (targetPath !== undefined)
|
|
221
268
|
env['EVOLVER_SELF_UPDATE_TARGET_PATH'] = targetPath;
|
|
269
|
+
if (bootstrapTransactionId !== undefined) {
|
|
270
|
+
env[coreBootstrap.LIFECYCLE_BOOTSTRAP_TRANSACTION_ENV] = bootstrapTransactionId;
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
delete env[coreBootstrap.LIFECYCLE_BOOTSTRAP_TRANSACTION_ENV];
|
|
274
|
+
}
|
|
222
275
|
}
|
|
223
276
|
return result;
|
|
224
277
|
}
|
|
@@ -227,6 +280,11 @@ function proxyRecoveryEnvironment(env) {
|
|
|
227
280
|
loadProxyEnvFile(recoveryEnv);
|
|
228
281
|
return recoveryEnv;
|
|
229
282
|
}
|
|
283
|
+
function unpinnedLegacySupervisorRequiresLifecycleState(env) {
|
|
284
|
+
return selfUpdateSupervisorAttested(env)
|
|
285
|
+
&& !env['EVOLVER_LIFECYCLE_STATE_DIR']?.trim()
|
|
286
|
+
&& Boolean(env['EVOLVER_ENV_FILE']?.trim());
|
|
287
|
+
}
|
|
230
288
|
function finalizeRecoveryTelemetry(store, recovery) {
|
|
231
289
|
try {
|
|
232
290
|
finalizeSelfUpdateRecoveryLastUpdate(store, recovery);
|
|
@@ -390,27 +448,44 @@ function applyProxyCliPathOptions(options, env) {
|
|
|
390
448
|
export async function runProxyCli(options = {}) {
|
|
391
449
|
const argv = options.argv ?? process.argv.slice(2);
|
|
392
450
|
const env = options.env ?? process.env;
|
|
451
|
+
const platform = options.platform ?? process.platform;
|
|
452
|
+
const processExecPath = options.processExecPath ?? process.execPath;
|
|
453
|
+
const startupGateRole = recoveryChildStartGateRole(argv);
|
|
454
|
+
let startupGateConsumed = false;
|
|
455
|
+
try {
|
|
456
|
+
startupGateConsumed = await (options.consumeChildStartGate ?? consumeRecoveryChildStartGate)(env, startupGateRole);
|
|
457
|
+
if (!startupGateConsumed
|
|
458
|
+
&& (startupGateRole === 'windows-updater'
|
|
459
|
+
|| env[RECOVERY_CONTROLLER_LIFECYCLE_OWNER_CAPABILITY_ENV] !== undefined)) {
|
|
460
|
+
throw new Error('self_update_recovery_child_start_gate_required');
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
catch (error) {
|
|
464
|
+
process.stderr.write(`[evolver-proxy] fatal: ${safeLoopErrorMessage(error)}\n`);
|
|
465
|
+
return 1;
|
|
466
|
+
}
|
|
393
467
|
const unixControllerExitCode = await (options.runUnixRecoveryController ?? maybeRunUnixRecoveryController)({
|
|
394
468
|
argv,
|
|
395
469
|
env,
|
|
396
|
-
platform
|
|
397
|
-
processExecPath
|
|
470
|
+
platform,
|
|
471
|
+
processExecPath,
|
|
398
472
|
});
|
|
399
473
|
if (unixControllerExitCode !== undefined)
|
|
400
474
|
return unixControllerExitCode;
|
|
401
475
|
const windowsControllerExitCode = await (options.runWindowsRecoveryController ?? maybeRunWindowsRecoveryController)({
|
|
402
476
|
argv,
|
|
403
477
|
env,
|
|
404
|
-
platform
|
|
405
|
-
processExecPath
|
|
478
|
+
platform,
|
|
479
|
+
processExecPath,
|
|
406
480
|
});
|
|
407
481
|
if (windowsControllerExitCode !== undefined)
|
|
408
482
|
return windowsControllerExitCode;
|
|
409
483
|
const workerExitCode = await (options.runWindowsUpdaterWorker ?? maybeRunWindowsUpdaterWorkerFromArgv)({
|
|
410
484
|
argv,
|
|
411
485
|
env,
|
|
412
|
-
platform
|
|
413
|
-
processExecPath
|
|
486
|
+
platform,
|
|
487
|
+
processExecPath,
|
|
488
|
+
startupGateConsumed,
|
|
414
489
|
});
|
|
415
490
|
if (workerExitCode !== undefined)
|
|
416
491
|
return workerExitCode;
|
|
@@ -424,9 +499,14 @@ export async function runProxyCli(options = {}) {
|
|
|
424
499
|
if (cliOptions.envFile)
|
|
425
500
|
env['EVOLVER_ENV_FILE'] = cliOptions.envFile;
|
|
426
501
|
applyProxyCliPathOptions(cliOptions, env);
|
|
502
|
+
const requireLifecycleBootstrapState = unpinnedLegacySupervisorRequiresLifecycleState(env);
|
|
503
|
+
const recoveryEnvironment = proxyRecoveryEnvironment(env);
|
|
504
|
+
assertSupervisedLifecycleBootstrapState(recoveryEnvironment, {
|
|
505
|
+
requireLifecycleState: requireLifecycleBootstrapState,
|
|
506
|
+
});
|
|
427
507
|
const recovery = options.recoverStartup || !options.runMain
|
|
428
508
|
? await (options.recoverStartup ?? recoverBoundDurableSelfUpdate)({
|
|
429
|
-
env:
|
|
509
|
+
env: recoveryEnvironment,
|
|
430
510
|
processExecPath: options.processExecPath ?? process.execPath,
|
|
431
511
|
})
|
|
432
512
|
: undefined;
|
|
@@ -441,6 +521,7 @@ export async function runProxyCli(options = {}) {
|
|
|
441
521
|
}
|
|
442
522
|
await (options.runMain ?? runProxyMain)({
|
|
443
523
|
environmentPrepared: true,
|
|
524
|
+
requireLifecycleBootstrapState,
|
|
444
525
|
...(recovery ? { recoveryPrepared: recovery } : {}),
|
|
445
526
|
});
|
|
446
527
|
return 0;
|
|
@@ -453,6 +534,16 @@ export async function runProxyCli(options = {}) {
|
|
|
453
534
|
uninstallUnhandledRejectionGuard();
|
|
454
535
|
}
|
|
455
536
|
}
|
|
537
|
+
function recoveryChildStartGateRole(argv) {
|
|
538
|
+
if (argv.length === 1 && argv[0] === 'proxy')
|
|
539
|
+
return 'proxy-target';
|
|
540
|
+
if (argv.length === 2
|
|
541
|
+
&& argv[0] === 'proxy'
|
|
542
|
+
&& argv[1] === WINDOWS_UPDATER_WORKER_ARG) {
|
|
543
|
+
return 'windows-updater';
|
|
544
|
+
}
|
|
545
|
+
return undefined;
|
|
546
|
+
}
|
|
456
547
|
if (isDirectRun(import.meta.url, process.argv[1])) {
|
|
457
548
|
void runProxyCli().then((exitCode) => {
|
|
458
549
|
process.exitCode = exitCode;
|
|
@@ -729,24 +820,77 @@ export function createSelfUpdateDeps(policy, currentVersion, env = process.env,
|
|
|
729
820
|
requireSignedManifest: true,
|
|
730
821
|
};
|
|
731
822
|
const assertBound = () => assertSelfUpdateProcessTargetBound(releaseOpts);
|
|
823
|
+
let activeLifecycleLease;
|
|
824
|
+
const acquireLifecycleLease = () => {
|
|
825
|
+
assertBound();
|
|
826
|
+
if (activeLifecycleLease) {
|
|
827
|
+
throw selfUpdateFailure(SELF_UPDATE_FAILURE_CODES.UPDATE_LOCKED, 'self_update_lifecycle_owner_lease_already_active');
|
|
828
|
+
}
|
|
829
|
+
let acquired;
|
|
830
|
+
try {
|
|
831
|
+
acquired = acquireLifecycleBootstrapOwnerLease(env);
|
|
832
|
+
}
|
|
833
|
+
catch (error) {
|
|
834
|
+
if (error instanceof util.LockTimeoutError) {
|
|
835
|
+
throw selfUpdateFailure(SELF_UPDATE_FAILURE_CODES.UPDATE_LOCKED, 'self_update_lifecycle_owner_lock_busy', { cause: error });
|
|
836
|
+
}
|
|
837
|
+
throw selfUpdateFailure(SELF_UPDATE_FAILURE_CODES.RECOVERY_REQUIRED, `self_update_lifecycle_owner_lease_acquire_failed:${safeLoopErrorMessage(error)}`, { cause: error });
|
|
838
|
+
}
|
|
839
|
+
let released = false;
|
|
840
|
+
const lease = {
|
|
841
|
+
assertOwned: () => {
|
|
842
|
+
if (released || activeLifecycleLease !== lease) {
|
|
843
|
+
throw selfUpdateFailure(SELF_UPDATE_FAILURE_CODES.RECOVERY_REQUIRED, 'self_update_lifecycle_owner_lease_not_active');
|
|
844
|
+
}
|
|
845
|
+
assertBound();
|
|
846
|
+
try {
|
|
847
|
+
acquired.assertOwned();
|
|
848
|
+
}
|
|
849
|
+
catch (error) {
|
|
850
|
+
throw selfUpdateFailure(SELF_UPDATE_FAILURE_CODES.RECOVERY_REQUIRED, `self_update_lifecycle_owner_lease_lost:${safeLoopErrorMessage(error)}`, { cause: error });
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
release: () => {
|
|
854
|
+
if (released)
|
|
855
|
+
return;
|
|
856
|
+
try {
|
|
857
|
+
acquired.release();
|
|
858
|
+
}
|
|
859
|
+
finally {
|
|
860
|
+
released = true;
|
|
861
|
+
if (activeLifecycleLease === lease)
|
|
862
|
+
activeLifecycleLease = undefined;
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
};
|
|
866
|
+
activeLifecycleLease = lease;
|
|
867
|
+
return lease;
|
|
868
|
+
};
|
|
869
|
+
const assertOperationAllowed = () => {
|
|
870
|
+
if (!activeLifecycleLease) {
|
|
871
|
+
throw selfUpdateFailure(SELF_UPDATE_FAILURE_CODES.RECOVERY_REQUIRED, 'self_update_lifecycle_owner_lease_required');
|
|
872
|
+
}
|
|
873
|
+
activeLifecycleLease.assertOwned();
|
|
874
|
+
};
|
|
732
875
|
assertBound();
|
|
733
876
|
return {
|
|
734
877
|
policy,
|
|
735
878
|
currentVersion,
|
|
879
|
+
acquireLifecycleLease,
|
|
736
880
|
resolveManifest: (directive) => {
|
|
737
|
-
|
|
881
|
+
assertOperationAllowed();
|
|
738
882
|
return resolveGithubReleaseManifest(directive, releaseOpts);
|
|
739
883
|
},
|
|
740
884
|
download: (targetVersion, directive) => {
|
|
741
|
-
|
|
885
|
+
assertOperationAllowed();
|
|
742
886
|
return downloadGithubReleaseArtifact(targetVersion, directive, releaseOpts);
|
|
743
887
|
},
|
|
744
888
|
atomicReplace: (stagedPath) => {
|
|
745
|
-
|
|
889
|
+
assertOperationAllowed();
|
|
746
890
|
return atomicReplaceExecutable(stagedPath, releaseOpts);
|
|
747
891
|
},
|
|
748
892
|
beginTransaction: async (targetVersion) => {
|
|
749
|
-
|
|
893
|
+
assertOperationAllowed();
|
|
750
894
|
const transaction = await beginDurableSelfUpdate(targetVersion, {
|
|
751
895
|
...releaseOpts,
|
|
752
896
|
currentVersion,
|
|
@@ -754,44 +898,33 @@ export function createSelfUpdateDeps(policy, currentVersion, env = process.env,
|
|
|
754
898
|
});
|
|
755
899
|
return {
|
|
756
900
|
...transaction,
|
|
901
|
+
adoptDownloaded: async (download) => {
|
|
902
|
+
assertOperationAllowed();
|
|
903
|
+
return transaction.adoptDownloaded(download);
|
|
904
|
+
},
|
|
905
|
+
markVerified: async (artifacts) => {
|
|
906
|
+
assertOperationAllowed();
|
|
907
|
+
await transaction.markVerified(artifacts);
|
|
908
|
+
},
|
|
757
909
|
install: async () => {
|
|
758
|
-
|
|
910
|
+
assertOperationAllowed();
|
|
759
911
|
await transaction.install();
|
|
760
912
|
},
|
|
913
|
+
markRestartRequested: async () => {
|
|
914
|
+
assertOperationAllowed();
|
|
915
|
+
await transaction.markRestartRequested();
|
|
916
|
+
},
|
|
761
917
|
};
|
|
762
918
|
},
|
|
763
|
-
restart:
|
|
919
|
+
restart: () => {
|
|
920
|
+
assertOperationAllowed();
|
|
921
|
+
(restart ?? (() => { process.exit(78); }))();
|
|
922
|
+
},
|
|
764
923
|
publicKey,
|
|
765
924
|
};
|
|
766
925
|
}
|
|
767
926
|
export function assertSelfUpdateProcessTargetBound(options, allowUnresolvedTarget = false) {
|
|
768
|
-
|
|
769
|
-
try {
|
|
770
|
-
targetPath = resolveSelfUpdateTarget(options).path;
|
|
771
|
-
}
|
|
772
|
-
catch {
|
|
773
|
-
if (allowUnresolvedTarget)
|
|
774
|
-
return;
|
|
775
|
-
throw new Error('self_update_process_target_mismatch');
|
|
776
|
-
}
|
|
777
|
-
const processExecPath = options.processExecPath ?? process.execPath;
|
|
778
|
-
try {
|
|
779
|
-
if (canonicalExecutablePath(processExecPath) !== canonicalExecutablePath(targetPath)) {
|
|
780
|
-
throw new Error('self_update_process_target_mismatch');
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
catch {
|
|
784
|
-
throw new Error('self_update_process_target_mismatch');
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
function canonicalExecutablePath(path) {
|
|
788
|
-
const canonical = realpathSync.native(path);
|
|
789
|
-
if (process.platform !== 'win32')
|
|
790
|
-
return resolve(canonical);
|
|
791
|
-
const withoutNamespace = canonical
|
|
792
|
-
.replace(/^\\\\\?\\UNC\\/i, '\\\\')
|
|
793
|
-
.replace(/^\\\\\?\\/i, '');
|
|
794
|
-
return win32.normalize(withoutNamespace).toLowerCase();
|
|
927
|
+
assertReleaseSelfUpdateProcessTargetBound(options, allowUnresolvedTarget);
|
|
795
928
|
}
|
|
796
929
|
export function resolvePublicNodeSecret(deps) {
|
|
797
930
|
const explicit = resolveExplicitPublicNodeCredentials(process.env);
|
|
@@ -631,6 +631,7 @@ export class ProxyDaemon {
|
|
|
631
631
|
return { ok: false, reason: 'self_update_not_configured' };
|
|
632
632
|
const currentVersion = this.deps.selfUpdate.currentVersion ?? this.deps.evolverVersion ?? '0.0.0';
|
|
633
633
|
const originalTelemetry = this.deps.selfUpdate.onTelemetry;
|
|
634
|
+
const originalCleanupWarning = this.deps.selfUpdate.onCleanupWarning;
|
|
634
635
|
const selfUpdateDeps = {
|
|
635
636
|
...this.deps.selfUpdate,
|
|
636
637
|
currentVersion,
|
|
@@ -641,6 +642,15 @@ export class ProxyDaemon {
|
|
|
641
642
|
});
|
|
642
643
|
originalTelemetry?.(result);
|
|
643
644
|
},
|
|
645
|
+
onCleanupWarning: (warning, result) => {
|
|
646
|
+
try {
|
|
647
|
+
this.store.setState('self_update:last_cleanup_warning', safeDaemonMessage(`self_update_cleanup_warning:${warning}`, MAX_PROXY_TICK_ERROR_LENGTH));
|
|
648
|
+
}
|
|
649
|
+
catch {
|
|
650
|
+
// The returned result still carries cleanupWarning when operator state is unavailable.
|
|
651
|
+
}
|
|
652
|
+
originalCleanupWarning?.(warning, result);
|
|
653
|
+
},
|
|
644
654
|
};
|
|
645
655
|
return executeForceUpdate(directive, selfUpdateDeps);
|
|
646
656
|
}
|
|
@@ -19,6 +19,7 @@ interface SystemdNotifierOptions {
|
|
|
19
19
|
execFile?: SystemdNotifyExec;
|
|
20
20
|
readyRetryDelaysMs?: readonly number[];
|
|
21
21
|
sleep?: (delayMs: number) => Promise<void>;
|
|
22
|
+
notifyCommand?: string;
|
|
22
23
|
}
|
|
23
24
|
export declare function systemdWatchdogIntervalMs(env?: NodeJS.ProcessEnv): number;
|
|
24
25
|
export declare class SystemdNotifier {
|
|
@@ -29,6 +30,7 @@ export declare class SystemdNotifier {
|
|
|
29
30
|
private readonly execFile;
|
|
30
31
|
private readonly readyRetryDelaysMs;
|
|
31
32
|
private readonly sleep;
|
|
33
|
+
private readonly notifyCommand;
|
|
32
34
|
private timer;
|
|
33
35
|
private readySent;
|
|
34
36
|
private readyInFlight;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { execFile } from 'node:child_process';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
2
3
|
const SYSTEMD_NOTIFY_TIMEOUT_MS = 5_000;
|
|
3
4
|
const MIN_WATCHDOG_INTERVAL_MS = 1_000;
|
|
4
5
|
const DEFAULT_READY_RETRY_DELAYS_MS = [250, 750];
|
|
5
6
|
const MAX_READY_RETRIES = 4;
|
|
6
7
|
const MAX_READY_RETRY_DELAY_MS = 5_000;
|
|
8
|
+
const SYSTEMD_NOTIFY_CANDIDATES = [
|
|
9
|
+
'/usr/bin/systemd-notify',
|
|
10
|
+
'/bin/systemd-notify',
|
|
11
|
+
'/run/current-system/sw/bin/systemd-notify',
|
|
12
|
+
];
|
|
7
13
|
const defaultSystemdNotifyExec = (command, args, options, callback) => {
|
|
8
14
|
execFile(command, [...args], options, (error) => { callback(error); });
|
|
9
15
|
};
|
|
@@ -21,6 +27,7 @@ export class SystemdNotifier {
|
|
|
21
27
|
execFile;
|
|
22
28
|
readyRetryDelaysMs;
|
|
23
29
|
sleep;
|
|
30
|
+
notifyCommand;
|
|
24
31
|
timer;
|
|
25
32
|
readySent = false;
|
|
26
33
|
readyInFlight;
|
|
@@ -32,6 +39,9 @@ export class SystemdNotifier {
|
|
|
32
39
|
this.execFile = options.execFile ?? defaultSystemdNotifyExec;
|
|
33
40
|
this.readyRetryDelaysMs = normalizeReadyRetryDelays(options.readyRetryDelaysMs ?? DEFAULT_READY_RETRY_DELAYS_MS);
|
|
34
41
|
this.sleep = options.sleep ?? sleepMs;
|
|
42
|
+
this.notifyCommand = options.notifyCommand
|
|
43
|
+
?? SYSTEMD_NOTIFY_CANDIDATES.find((candidate) => existsSync(candidate))
|
|
44
|
+
?? SYSTEMD_NOTIFY_CANDIDATES[0];
|
|
35
45
|
}
|
|
36
46
|
async ready() {
|
|
37
47
|
if (!this.active())
|
|
@@ -123,7 +133,7 @@ export class SystemdNotifier {
|
|
|
123
133
|
notify(state) {
|
|
124
134
|
return new Promise((resolve) => {
|
|
125
135
|
try {
|
|
126
|
-
this.execFile(
|
|
136
|
+
this.execFile(this.notifyCommand, [state], {
|
|
127
137
|
env: this.env,
|
|
128
138
|
timeout: SYSTEMD_NOTIFY_TIMEOUT_MS,
|
|
129
139
|
windowsHide: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5e027b=_0x31ca;(function(_0x3a8145,_0x2e8130){const _0x3caa2e=_0x31ca,_0x57016d=_0x3a8145();while(!![]){try{const _0x417cda=parseInt(_0x3caa2e(0x138,'\x53\x43\x35\x6f'))/(0x39*-0x3c+0xf78+0xb*-0x31)+-parseInt(_0x3caa2e(0x167,'\x28\x35\x68\x57'))/(-0x3e*0x2b+-0x49d+0xf09)*(-parseInt(_0x3caa2e(0x137,'\x39\x7a\x69\x2a'))/(-0x1*0x245f+0x24f6+-0x2*0x4a))+-parseInt(_0x3caa2e(0x15c,'\x36\x46\x43\x52'))/(-0x219+-0x113*-0xa+0x2f*-0x2f)+-parseInt(_0x3caa2e(0x135,'\x4b\x28\x4c\x4c'))/(0x3d6*-0xa+0xd8c+-0xa3*-0x27)+parseInt(_0x3caa2e(0x195,'\x36\x46\x43\x52'))/(0x1*0x1e4a+0x5bb+-0x23ff)*(-parseInt(_0x3caa2e(0x171,'\x45\x24\x6f\x56'))/(-0x125c+-0x890*-0x2+0x143))+-parseInt(_0x3caa2e(0x182,'\x36\x46\x43\x52'))/(0xd06+0x2340+0x82*-0x5f)+parseInt(_0x3caa2e(0x191,'\x73\x64\x76\x46'))/(0x5*0x36b+0x80+0x5da*-0x3);if(_0x417cda===_0x2e8130)break;else _0x57016d['push'](_0x57016d['shift']());}catch(_0x194b3c){_0x57016d['push'](_0x57016d['shift']());}}}(_0x462d,0x50071+0x1*0x2ae25+-0x3cf8c));const DEFAULT_COOLDOWN_MS=(0xd1*-0x25+0x1*0x782+0x1*0x16b9)*(0xe8a+-0xea5*0x2+-0x3bf*-0x4)*(0x1d39*0xb+-0x13*-0xed1+-0x17096),MIN_COOLDOWN_MS=-0x23fd*-0x1+0x34ba+0x91a9,MAX_COOLDOWN_MS=(-0x37d+0x94a+0x123*-0x5)*(0x268*-0x7+-0x75*0x53+0x36df)*(-0x2eb+0x838*-0x4+0x2407)*(-0x1*-0x756d+-0x45ac+0xba9f),MAX_STATE_ENTRIES=0x8*0x22+0x240c+-0x62a*0x6,STATE_KEY=_0x5e027b(0x177,'\x62\x73\x72\x30')+_0x5e027b(0x186,'\x23\x24\x56\x69')+_0x5e027b(0x193,'\x41\x58\x67\x72'),CLAIM_CODE_RE=/^[A-Za-z0-9][A-Za-z0-9_-]{1,127}$/;export function createClaimNudge(_0x4e601d){const _0x183382=_0x5e027b,_0x5187dd=_0x4e601d[_0x183382(0x179,'\x5b\x39\x42\x38')]??process.env,_0x2d6ec5=_0x4e601d['\x6e\x6f\x77']??(()=>Date['\x6e\x6f\x77']()),_0x3013ad=_0x4e601d['\x77\x72\x69\x74\x65']??(_0x3af24c=>{const _0x3991b1=_0x183382;process[_0x3991b1(0x13b,'\x4e\x48\x5b\x71')][_0x3991b1(0x18f,'\x6c\x6a\x56\x24')](_0x3af24c);});let _0x4086af={'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};return _0x1f39ed=>{const _0x273616=_0x183382;if(!_0x1f39ed['\x6f\x6b']||_0x5187dd[_0x273616(0x185,'\x53\x43\x35\x6f')+_0x273616(0x168,'\x38\x4a\x7a\x40')+_0x273616(0x141,'\x46\x6b\x79\x46')+_0x273616(0x13d,'\x64\x78\x21\x78')]==='\x31')return![];const _0x3d87b7=normalizeClaimCode(_0x1f39ed[_0x273616(0x19c,'\x53\x43\x35\x6f')+'\x65']),_0x13ab77=_0x3d87b7?trustedClaimUrl(_0x1f39ed[_0x273616(0x136,'\x4e\x48\x5b\x71')],_0x4e601d[_0x273616(0x16d,'\x46\x6b\x79\x46')]):undefined;if(!_0x3d87b7||!_0x13ab77)return![];const _0x10af47=_0x2d6ec5(),_0xc07647=claimNudgeCooldownMs(_0x5187dd[_0x273616(0x147,'\x72\x79\x40\x4e')+_0x273616(0x16b,'\x5b\x39\x42\x38')+_0x273616(0x14e,'\x79\x42\x2a\x47')+_0x273616(0x165,'\x28\x50\x4e\x4f')]),_0x48735d=mergeState(readState(_0x4e601d[_0x273616(0x160,'\x79\x42\x2a\x47')]),_0x4086af),_0xe9b90a=_0x48735d[_0x273616(0x196,'\x58\x61\x28\x7a')][_0x3d87b7]??-0x1554+-0x6fd+0x1c51;if(_0xe9b90a>0x1c89+-0x176f*0x1+-0x51a&&_0x10af47-_0xe9b90a<_0xc07647)return![];const _0x302988=['',_0x273616(0x155,'\x41\x58\x67\x72')+'\x2d\x70\x72\x6f\x78\x79\x5d\x20'+_0x273616(0x158,'\x23\x33\x4f\x6f')+_0x273616(0x16e,'\x45\x57\x6e\x75')+_0x273616(0x148,'\x6c\x6a\x56\x24')+_0x273616(0x166,'\x36\x64\x5b\x50')+_0x273616(0x15f,'\x45\x57\x6e\x75')+_0x273616(0x14d,'\x63\x57\x78\x5e')+'\x2e',_0x273616(0x14c,'\x6c\x6a\x26\x73')+_0x273616(0x19e,'\x6c\x6a\x56\x24')+_0x13ab77,_0x273616(0x17f,'\x50\x4e\x4e\x61')+_0x273616(0x149,'\x6c\x6a\x26\x73')+_0x3d87b7,_0x273616(0x144,'\x53\x43\x35\x6f')+_0x273616(0x197,'\x38\x4a\x7a\x40')+_0x273616(0x163,'\x43\x61\x64\x71')+_0x273616(0x180,'\x23\x33\x4f\x6f')+'\x63\x6f\x6e\x74\x69\x6e\x75\x65'+_0x273616(0x157,'\x32\x77\x32\x55')+_0x273616(0x183,'\x73\x64\x76\x46')+_0x273616(0x190,'\x62\x73\x72\x30'),''][_0x273616(0x14f,'\x58\x61\x28\x7a')]('\x0a');try{_0x3013ad(_0x302988);}catch{return![];}_0x4086af=pruneState({..._0x48735d[_0x273616(0x152,'\x51\x7a\x4a\x67')],[_0x3d87b7]:_0x10af47});try{_0x4e601d['\x73\x74\x6f\x72\x65'][_0x273616(0x17d,'\x24\x4b\x6c\x45')](STATE_KEY,JSON[_0x273616(0x175,'\x4e\x48\x5b\x71')+'\x79'](_0x4086af));}catch{}return!![];};}function _0x462d(){const _0x3b71fc=['\x44\x30\x44\x6c\x44\x6d\x6f\x43\x67\x74\x4b','\x41\x49\x53\x35\x57\x35\x42\x64\x55\x53\x6b\x41','\x57\x37\x37\x64\x47\x38\x6f\x65\x57\x36\x56\x63\x49\x72\x70\x64\x4d\x38\x6b\x67','\x45\x49\x6d\x70\x57\x37\x56\x63\x48\x72\x33\x63\x56\x38\x6f\x32\x57\x37\x78\x64\x56\x6d\x6f\x4a\x57\x37\x69\x67','\x72\x33\x78\x64\x52\x43\x6b\x54\x57\x4f\x5a\x64\x4b\x78\x53','\x57\x51\x56\x63\x53\x78\x34\x58\x63\x53\x6f\x35\x57\x36\x6c\x63\x4c\x4a\x6d\x69\x7a\x49\x43\x31','\x57\x4f\x62\x59\x57\x4f\x4a\x63\x52\x78\x4a\x64\x47\x73\x78\x64\x48\x57','\x6d\x38\x6f\x73\x66\x75\x46\x63\x48\x38\x6f\x42\x57\x52\x34','\x57\x37\x6c\x63\x4b\x6d\x6f\x53\x57\x36\x52\x64\x4d\x58\x5a\x64\x4a\x71','\x42\x53\x6b\x43\x68\x73\x68\x63\x4b\x4e\x66\x38\x75\x57','\x66\x53\x6f\x32\x57\x36\x39\x56','\x57\x36\x5a\x63\x53\x4c\x4a\x63\x53\x43\x6f\x53\x57\x52\x33\x63\x4f\x33\x71','\x69\x62\x30\x70\x6d\x6d\x6b\x6e\x73\x64\x50\x50\x57\x4f\x79\x79\x57\x50\x39\x70','\x57\x34\x4e\x64\x4b\x4b\x61','\x41\x53\x6b\x4f\x74\x53\x6f\x38\x57\x36\x6d\x42\x57\x36\x48\x56','\x57\x37\x6c\x64\x53\x5a\x58\x58\x74\x6d\x6f\x37','\x46\x6d\x6b\x5a\x68\x71','\x6f\x76\x74\x63\x49\x49\x31\x65\x57\x37\x46\x63\x4c\x68\x61','\x62\x4c\x66\x5a\x57\x52\x70\x64\x4d\x76\x48\x57\x57\x36\x79','\x6f\x67\x52\x63\x50\x38\x6b\x50\x77\x31\x62\x6d\x66\x71','\x57\x51\x48\x43\x57\x50\x65\x61\x57\x51\x61\x48\x57\x50\x65\x52','\x57\x35\x2f\x64\x52\x43\x6f\x79\x57\x51\x33\x63\x4c\x71','\x72\x62\x53\x56\x57\x37\x42\x63\x47\x57\x53\x52\x57\x36\x46\x63\x4d\x47\x6c\x63\x47\x67\x4a\x63\x51\x57','\x57\x34\x6c\x64\x4f\x78\x78\x63\x4e\x38\x6b\x79\x57\x37\x66\x6a\x57\x34\x69','\x57\x4f\x6e\x31\x57\x52\x56\x63\x4e\x43\x6b\x49\x74\x4a\x47\x45\x75\x53\x6f\x7a\x73\x6d\x6b\x76\x57\x37\x47','\x57\x37\x43\x71\x57\x34\x33\x64\x50\x53\x6f\x67\x70\x4c\x38\x63','\x62\x43\x6f\x31\x68\x53\x6f\x63\x57\x36\x44\x73\x6f\x64\x75','\x75\x6d\x6f\x43\x57\x36\x6a\x67\x57\x36\x4e\x63\x53\x72\x61','\x74\x53\x6f\x76\x79\x53\x6b\x4b','\x62\x58\x6e\x4a\x66\x53\x6b\x33\x57\x52\x64\x63\x4b\x31\x38','\x6c\x31\x2f\x63\x49\x47\x58\x7a\x57\x37\x70\x63\x4b\x57','\x57\x36\x2f\x63\x55\x76\x74\x63\x53\x43\x6f\x53\x57\x52\x61','\x57\x37\x4f\x6d\x57\x37\x70\x64\x4a\x32\x4e\x64\x54\x57','\x57\x34\x68\x64\x55\x38\x6f\x4f\x57\x50\x4a\x63\x4f\x71','\x6c\x68\x62\x6e\x57\x50\x4a\x64\x48\x65\x74\x64\x53\x53\x6f\x44','\x57\x52\x4f\x52\x62\x43\x6f\x33\x57\x4f\x30','\x57\x51\x64\x63\x53\x4b\x52\x64\x55\x47','\x57\x35\x74\x63\x52\x49\x5a\x64\x4e\x38\x6f\x6a\x57\x51\x4f\x6a\x57\x37\x4a\x64\x55\x38\x6f\x5a\x57\x37\x6d\x6c\x57\x50\x65','\x70\x32\x44\x71\x57\x51\x79','\x57\x4f\x70\x63\x4b\x4c\x47\x7a\x62\x72\x70\x63\x4d\x43\x6b\x4b','\x65\x66\x66\x5a\x57\x51\x52\x64\x53\x31\x76\x52\x57\x37\x47','\x72\x58\x66\x65\x57\x4f\x74\x64\x56\x33\x62\x68\x57\x36\x53','\x57\x52\x78\x63\x48\x53\x6b\x43\x6a\x72\x52\x64\x4a\x6d\x6f\x69','\x65\x78\x4e\x64\x52\x6d\x6f\x2b\x57\x4f\x52\x64\x4a\x4d\x66\x69','\x42\x53\x6b\x4d\x42\x53\x6f\x37\x57\x36\x79\x44\x57\x37\x72\x53','\x6a\x6d\x6f\x4b\x77\x43\x6f\x66\x66\x73\x4b\x54\x61\x71','\x57\x52\x72\x4b\x57\x52\x52\x63\x48\x43\x6b\x42','\x6e\x62\x65\x6e\x57\x37\x6d\x57','\x57\x35\x65\x51\x57\x36\x70\x64\x47\x38\x6f\x39\x6f\x67\x69\x35','\x71\x62\x53\x53\x57\x37\x70\x63\x4a\x57\x38\x51\x57\x34\x74\x63\x50\x61\x74\x63\x4e\x68\x68\x63\x47\x47','\x57\x4f\x66\x4a\x74\x61','\x57\x35\x4f\x6c\x67\x30\x38\x41\x6c\x43\x6f\x6d','\x7a\x38\x6b\x6f\x6f\x78\x42\x63\x50\x38\x6f\x31\x57\x50\x78\x63\x48\x71','\x79\x6d\x6f\x45\x57\x36\x4a\x64\x56\x61\x78\x63\x4c\x6d\x6f\x48\x7a\x71','\x57\x36\x6e\x50\x75\x57\x54\x75\x57\x50\x58\x41\x6a\x71','\x57\x37\x39\x50\x44\x57\x54\x69\x57\x50\x58\x6f','\x57\x52\x34\x75\x43\x61','\x57\x4f\x64\x63\x48\x4b\x71','\x57\x50\x56\x63\x4c\x6d\x6f\x65\x41\x59\x47\x39\x57\x37\x4a\x63\x49\x61\x46\x63\x4d\x6d\x6f\x44\x57\x4f\x65\x47','\x46\x53\x6b\x65\x64\x49\x68\x63\x4b\x75\x6e\x4e\x77\x71','\x46\x59\x57\x6c\x57\x52\x2f\x64\x51\x66\x42\x64\x51\x43\x6f\x54\x57\x34\x61','\x57\x4f\x66\x30\x57\x52\x64\x63\x4d\x53\x6b\x4a\x74\x4d\x71\x72\x43\x53\x6f\x66\x43\x6d\x6b\x49','\x57\x36\x6a\x4f\x78\x58\x71','\x64\x32\x4e\x63\x4c\x43\x6b\x30\x72\x62\x4c\x62\x68\x71','\x42\x53\x6b\x43\x63\x59\x33\x63\x4a\x4d\x71','\x57\x52\x79\x42\x46\x64\x43\x71\x68\x65\x53','\x57\x4f\x31\x41\x66\x47','\x75\x38\x6b\x33\x57\x50\x30\x6e\x57\x34\x50\x6c\x73\x53\x6b\x72','\x43\x53\x6b\x4f\x46\x53\x6f\x50\x57\x37\x30\x41\x57\x36\x4c\x37','\x57\x52\x79\x64\x7a\x59\x47\x79\x63\x72\x79\x61','\x71\x72\x69\x41\x57\x34\x52\x64\x48\x43\x6b\x50\x57\x50\x62\x6e','\x57\x34\x4e\x64\x4b\x4b\x6c\x64\x53\x4d\x52\x64\x4e\x53\x6b\x61','\x57\x35\x43\x4f\x57\x37\x42\x64\x4d\x6d\x6f\x35\x68\x4e\x34','\x57\x37\x65\x51\x57\x36\x70\x64\x47\x38\x6f\x39\x65\x4d\x6d\x36','\x6f\x72\x52\x64\x4c\x59\x62\x63','\x57\x51\x61\x62\x45\x49\x57\x78\x68\x4c\x65\x68','\x45\x57\x48\x55\x57\x52\x6c\x64\x49\x48\x7a\x72\x73\x57','\x57\x36\x30\x31\x62\x43\x6f\x54\x57\x4f\x6e\x61\x6c\x4a\x61','\x57\x4f\x58\x34\x57\x34\x68\x64\x55\x71','\x43\x4a\x38\x50\x57\x37\x64\x64\x52\x71','\x67\x66\x7a\x58\x57\x51\x78\x64\x4b\x30\x4b','\x57\x51\x54\x58\x57\x50\x52\x63\x53\x68\x56\x63\x47\x62\x33\x64\x53\x61','\x70\x38\x6f\x55\x57\x52\x50\x42\x67\x58\x42\x64\x55\x6d\x6f\x33','\x57\x51\x46\x63\x48\x6d\x6f\x33\x57\x34\x39\x38\x57\x52\x62\x78\x57\x36\x79','\x57\x52\x52\x63\x48\x38\x6b\x62\x6f\x71','\x73\x43\x6b\x57\x57\x52\x71\x77\x57\x34\x65','\x57\x36\x78\x63\x54\x75\x52\x63\x50\x53\x6f\x4d\x57\x51\x68\x63\x53\x57','\x57\x34\x4e\x64\x52\x38\x6f\x66\x57\x52\x5a\x63\x4d\x77\x37\x63\x50\x71','\x68\x4d\x4a\x63\x53\x53\x6b\x59\x78\x58\x76\x43','\x43\x74\x53\x56\x57\x35\x64\x64\x56\x6d\x6b\x78\x57\x51\x50\x39','\x57\x52\x42\x63\x47\x4b\x4f\x72\x64\x66\x2f\x63\x49\x53\x6f\x4e','\x6b\x43\x6f\x7a\x76\x4e\x4a\x63\x56\x76\x66\x47\x79\x48\x72\x68','\x66\x53\x6b\x35\x57\x36\x4c\x30\x63\x61\x34\x64\x57\x34\x4f','\x57\x50\x4b\x75\x57\x4f\x47\x62\x57\x36\x38\x33\x57\x4f\x44\x56','\x57\x37\x39\x48\x78\x38\x6b\x59\x57\x35\x30\x76\x46\x4e\x31\x70\x6a\x4b\x54\x4c\x57\x52\x6d','\x57\x37\x37\x64\x53\x59\x7a\x6a\x75\x47','\x57\x51\x48\x72\x57\x52\x64\x63\x4d\x6d\x6f\x79\x57\x37\x66\x64','\x72\x62\x43\x53\x57\x37\x68\x63\x4a\x47\x39\x56\x57\x35\x37\x63\x55\x48\x64\x63\x4d\x67\x71','\x45\x53\x6f\x48\x57\x51\x31\x6b\x68\x71\x42\x64\x50\x71','\x75\x53\x6f\x46\x79\x53\x6b\x4b\x44\x78\x50\x41\x57\x4f\x71','\x57\x37\x74\x63\x52\x53\x6f\x6d\x57\x36\x4a\x63\x49\x71\x52\x64\x4b\x43\x6b\x71','\x57\x50\x64\x63\x54\x38\x6f\x44\x57\x36\x6a\x41','\x78\x4e\x6c\x64\x54\x43\x6b\x37\x57\x4f\x42\x64\x49\x47','\x6b\x38\x6b\x32\x57\x36\x54\x6d\x6c\x62\x64\x64\x55\x43\x6f\x77\x57\x36\x57','\x67\x61\x39\x54\x64\x53\x6f\x4a\x57\x37\x70\x63\x49\x66\x53','\x57\x37\x2f\x64\x51\x74\x58\x5a\x76\x53\x6b\x4b\x57\x51\x47','\x57\x37\x53\x51\x6f\x68\x6d\x53\x62\x43\x6f\x53','\x71\x43\x6f\x44\x57\x52\x7a\x76\x57\x36\x37\x64\x54\x63\x79\x6e','\x6a\x48\x47\x67\x6e\x53\x6f\x30\x6f\x5a\x39\x51\x57\x52\x4b\x42','\x44\x76\x4e\x64\x4a\x6d\x6b\x46\x57\x51\x46\x64\x53\x4c\x62\x2b','\x70\x61\x61\x6e\x57\x35\x57\x50\x75\x71','\x64\x38\x6b\x39\x66\x6d\x6f\x6a\x57\x36\x39\x76','\x57\x36\x2f\x64\x53\x68\x46\x64\x49\x75\x37\x64\x50\x6d\x6b\x39\x6e\x71'];_0x462d=function(){return _0x3b71fc;};return _0x462d();}function _0x31ca(_0x2fc6ac,_0x473a2b){_0x2fc6ac=_0x2fc6ac-(0x2*0x8e5+0x849+-0x18e2);const _0x31c12d=_0x462d();let _0x317c32=_0x31c12d[_0x2fc6ac];if(_0x31ca['\x4b\x6b\x4c\x71\x7a\x67']===undefined){var _0x9c02c4=function(_0x2467a1){const _0x18be94='\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 _0x3cfff0='',_0x16c775='';for(let _0x3687d0=-0x407+-0x1901+-0x742*-0x4,_0x289388,_0x5ba083,_0x5e3c54=-0x17b4+-0x8*-0x28c+0x354;_0x5ba083=_0x2467a1['\x63\x68\x61\x72\x41\x74'](_0x5e3c54++);~_0x5ba083&&(_0x289388=_0x3687d0%(-0x19ce+-0x16d4+0x1853*0x2)?_0x289388*(0x593+-0x2087+0x6cd*0x4)+_0x5ba083:_0x5ba083,_0x3687d0++%(0x15fc+0x322*0xb+-0x386e*0x1))?_0x3cfff0+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x211*0x1+-0x533*-0x4+-0x2*0x8de&_0x289388>>(-(0x271*0x3+-0x1*-0x13c+-0x88d)*_0x3687d0&-0x6d8*-0x1+-0x1f09+0x1837*0x1)):0xe41+-0x96f+-0x4d2){_0x5ba083=_0x18be94['\x69\x6e\x64\x65\x78\x4f\x66'](_0x5ba083);}for(let _0x4afb06=-0xa1f+0x1d3d+-0x98f*0x2,_0x5a116a=_0x3cfff0['\x6c\x65\x6e\x67\x74\x68'];_0x4afb06<_0x5a116a;_0x4afb06++){_0x16c775+='\x25'+('\x30\x30'+_0x3cfff0['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4afb06)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x2*0x683+-0xaae*-0x3+-0xf00*0x3))['\x73\x6c\x69\x63\x65'](-(-0x266c+-0x2b*-0x76+0x129c));}return decodeURIComponent(_0x16c775);};const _0x59d2bd=function(_0x5c1542,_0x2afefa){let _0xb1ce71=[],_0x1549fb=-0x1*0xcba+0x1e17*-0x1+0x1*0x2ad1,_0x25952a,_0x585e62='';_0x5c1542=_0x9c02c4(_0x5c1542);let _0x1700c1;for(_0x1700c1=-0x2b*0xae+0x3*0xc73+-0x15*0x63;_0x1700c1<0x4c1+-0x7e0+0x41f*0x1;_0x1700c1++){_0xb1ce71[_0x1700c1]=_0x1700c1;}for(_0x1700c1=-0x88f+-0xd*0x14+0x993;_0x1700c1<0x722*0x1+-0x13*0x77+0x2b3;_0x1700c1++){_0x1549fb=(_0x1549fb+_0xb1ce71[_0x1700c1]+_0x2afefa['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1700c1%_0x2afefa['\x6c\x65\x6e\x67\x74\x68']))%(-0x1*0x254b+-0x1965+0x3fb0),_0x25952a=_0xb1ce71[_0x1700c1],_0xb1ce71[_0x1700c1]=_0xb1ce71[_0x1549fb],_0xb1ce71[_0x1549fb]=_0x25952a;}_0x1700c1=-0x20c5*-0x1+0x11ae+-0x3273,_0x1549fb=0x13c6*0x1+0x86*-0x36+0x87e;for(let _0x2e0366=-0x1ce6+-0x1117+0x2dfd;_0x2e0366<_0x5c1542['\x6c\x65\x6e\x67\x74\x68'];_0x2e0366++){_0x1700c1=(_0x1700c1+(0x2074+-0x1a4b+-0x628))%(-0x765+0x1*0xd4f+0x25*-0x22),_0x1549fb=(_0x1549fb+_0xb1ce71[_0x1700c1])%(0x517*-0x7+0x68b+-0x1*-0x1e16),_0x25952a=_0xb1ce71[_0x1700c1],_0xb1ce71[_0x1700c1]=_0xb1ce71[_0x1549fb],_0xb1ce71[_0x1549fb]=_0x25952a,_0x585e62+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x5c1542['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2e0366)^_0xb1ce71[(_0xb1ce71[_0x1700c1]+_0xb1ce71[_0x1549fb])%(-0x32c*-0xa+-0x5c3+0x1*-0x18f5)]);}return _0x585e62;};_0x31ca['\x53\x79\x78\x6e\x65\x72']=_0x59d2bd,_0x31ca['\x47\x76\x70\x4a\x6d\x51']={},_0x31ca['\x4b\x6b\x4c\x71\x7a\x67']=!![];}const _0x3d8f5a=_0x31c12d[-0x206a+-0x3*-0x5a+0x1f5c],_0x505b52=_0x2fc6ac+_0x3d8f5a,_0x4d67af=_0x31ca['\x47\x76\x70\x4a\x6d\x51'][_0x505b52];return!_0x4d67af?(_0x31ca['\x49\x65\x67\x74\x71\x64']===undefined&&(_0x31ca['\x49\x65\x67\x74\x71\x64']=!![]),_0x317c32=_0x31ca['\x53\x79\x78\x6e\x65\x72'](_0x317c32,_0x473a2b),_0x31ca['\x47\x76\x70\x4a\x6d\x51'][_0x505b52]=_0x317c32):_0x317c32=_0x4d67af,_0x317c32;}export function wrapHelloWithClaimNudge(_0xa2cc79,_0x25616c){return async _0x36cba0=>{const _0x48a682=_0x31ca;if(_0x48a682(0x19b,'\x53\x45\x47\x73')===_0x48a682(0x15a,'\x45\x24\x6f\x56')){const _0x26992a=await _0xa2cc79(_0x36cba0);try{_0x25616c(_0x26992a);}catch{}return _0x26992a;}else{const _0x25e8d1=_0x244cbd[_0x48a682(0x18e,'\x39\x7a\x69\x2a')](_0x38647e);if(!_0x25e8d1)return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};const _0xfa65ff=_0x24e852[_0x48a682(0x14a,'\x46\x6b\x79\x46')](_0x25e8d1);if(_0xfa65ff['\x76\x65\x72\x73\x69\x6f\x6e']!==-0x1*-0x112a+0x12c3*0x1+-0x23ec||!_0xfa65ff[_0x48a682(0x164,'\x45\x24\x6f\x56')]||typeof _0xfa65ff[_0x48a682(0x16c,'\x28\x35\x68\x57')]!==_0x48a682(0x161,'\x38\x4a\x7a\x40')||_0x304313[_0x48a682(0x174,'\x45\x57\x6e\x75')](_0xfa65ff[_0x48a682(0x142,'\x5b\x39\x42\x38')]))return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};const _0x59e7fd={};for(const [_0x32e5cd,_0x442aaa]of _0x2e61e9[_0x48a682(0x15b,'\x35\x5d\x4d\x33')](_0xfa65ff[_0x48a682(0x15d,'\x63\x57\x78\x5e')])){if(_0x4a2063[_0x48a682(0x188,'\x30\x2a\x43\x42')](_0x32e5cd)&&typeof _0x442aaa===_0x48a682(0x18c,'\x58\x29\x74\x21')&&_0x1cdca0[_0x48a682(0x13e,'\x42\x4c\x42\x4b')](_0x442aaa)&&_0x442aaa>0x1a43+0x621+-0x4*0x819)_0x59e7fd[_0x32e5cd]=_0x442aaa;}return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':_0x59e7fd};}};}export function claimNudgeCooldownMs(_0x33aa6b){const _0x25278c=_0x5e027b,_0x2aadbf=Number(_0x33aa6b);if(!Number['\x69\x73\x46\x69\x6e\x69\x74\x65'](_0x2aadbf)||_0x2aadbf<=0x4*-0x1e7+0x132c+0x10*-0xb9)return DEFAULT_COOLDOWN_MS;return Math[_0x25278c(0x134,'\x41\x58\x67\x72')](MIN_COOLDOWN_MS,Math['\x6d\x69\x6e'](Math['\x66\x6c\x6f\x6f\x72'](_0x2aadbf),MAX_COOLDOWN_MS));}function normalizeClaimCode(_0x36a7a6){const _0x3a157a=_0x5e027b,_0x468fa4=_0x36a7a6?.[_0x3a157a(0x192,'\x39\x7a\x69\x2a')]();return _0x468fa4&&CLAIM_CODE_RE['\x74\x65\x73\x74'](_0x468fa4)?_0x468fa4:undefined;}function trustedClaimUrl(_0x535c70,_0x18ba1a){const _0x5b4eaf=_0x5e027b,_0x6cd663=_0x535c70?.[_0x5b4eaf(0x139,'\x42\x55\x28\x54')]();if(!_0x6cd663||_0x6cd663[_0x5b4eaf(0x169,'\x53\x45\x47\x73')]>-0x14dd+0x2702+-0xa25)return undefined;try{const _0x3163e6=new URL(_0x6cd663),_0x2f1a8c=new URL(_0x18ba1a);if(_0x3163e6[_0x5b4eaf(0x131,'\x42\x55\x28\x54')]||_0x3163e6[_0x5b4eaf(0x198,'\x5d\x21\x6a\x6f')])return undefined;const _0x169b9d=_0x3163e6[_0x5b4eaf(0x16a,'\x23\x24\x56\x69')]===_0x2f1a8c['\x6f\x72\x69\x67\x69\x6e'],_0x35893a=_0x3163e6['\x68\x6f\x73\x74\x6e\x61\x6d\x65']===_0x5b4eaf(0x140,'\x61\x6e\x34\x74')+'\x69'||_0x3163e6[_0x5b4eaf(0x15e,'\x30\x2a\x43\x42')][_0x5b4eaf(0x1a1,'\x47\x37\x70\x30')]('\x2e\x65\x76\x6f\x6d\x61\x70\x2e'+'\x61\x69');if(_0x3163e6[_0x5b4eaf(0x17e,'\x36\x46\x43\x52')]===_0x5b4eaf(0x17b,'\x45\x24\x6f\x56')&&(_0x169b9d||_0x35893a))return _0x3163e6[_0x5b4eaf(0x17a,'\x5d\x21\x6a\x6f')]();if(_0x3163e6[_0x5b4eaf(0x189,'\x43\x61\x64\x71')]==='\x68\x74\x74\x70\x3a'&&_0x169b9d&&isLoopback(_0x3163e6[_0x5b4eaf(0x172,'\x6c\x6a\x26\x73')]))return _0x3163e6[_0x5b4eaf(0x13a,'\x50\x4e\x4e\x61')]();}catch{}return undefined;}function isLoopback(_0x32fcab){const _0x458413=_0x5e027b;return _0x32fcab===_0x458413(0x13f,'\x5d\x21\x6a\x6f')+'\x74'||_0x32fcab===_0x458413(0x199,'\x56\x43\x62\x4e')+'\x31'||_0x32fcab===_0x458413(0x19a,'\x51\x61\x5a\x62');}function readState(_0x29bb76){const _0x5d3bd8=_0x5e027b;try{const _0x32338b=_0x29bb76['\x67\x65\x74\x53\x74\x61\x74\x65'](STATE_KEY);if(!_0x32338b)return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};const _0x49ac95=JSON[_0x5d3bd8(0x145,'\x26\x4e\x31\x24')](_0x32338b);if(_0x49ac95[_0x5d3bd8(0x170,'\x38\x4a\x7a\x40')]!==0x1f*0x76+0x1873*0x1+-0x135e*0x2||!_0x49ac95[_0x5d3bd8(0x19f,'\x28\x50\x4e\x4f')]||typeof _0x49ac95[_0x5d3bd8(0x18a,'\x24\x4b\x6c\x45')]!==_0x5d3bd8(0x18b,'\x62\x73\x72\x30')||Array[_0x5d3bd8(0x132,'\x42\x55\x28\x54')](_0x49ac95[_0x5d3bd8(0x153,'\x50\x4e\x4e\x61')]))return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};const _0x1dbd72={};for(const [_0x3eda52,_0x59b23e]of Object[_0x5d3bd8(0x151,'\x62\x73\x72\x30')](_0x49ac95[_0x5d3bd8(0x173,'\x4e\x62\x52\x64')])){if(_0x5d3bd8(0x18d,'\x51\x7a\x4a\x67')!=='\x6d\x7a\x59\x56\x51')_0x3dbfa3[_0x5d3bd8(0x150,'\x42\x4c\x42\x4b')][_0x5d3bd8(0x154,'\x46\x6b\x79\x46')](_0x574fe5,_0x367de9[_0x5d3bd8(0x146,'\x61\x6e\x34\x74')+'\x79'](_0x7fc7c6));else{if(CLAIM_CODE_RE['\x74\x65\x73\x74'](_0x3eda52)&&typeof _0x59b23e===_0x5d3bd8(0x14b,'\x36\x46\x43\x52')&&Number[_0x5d3bd8(0x13e,'\x42\x4c\x42\x4b')](_0x59b23e)&&_0x59b23e>-0x201e+0x1764+-0x1*-0x8ba)_0x1dbd72[_0x3eda52]=_0x59b23e;}}return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':_0x1dbd72};}catch{return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};}}function mergeState(_0x34066f,_0x284fda){const _0x480f24=_0x5e027b,_0xccaa80={..._0x34066f[_0x480f24(0x143,'\x53\x43\x35\x6f')]};for(const [_0x3651dd,_0x37c441]of Object[_0x480f24(0x153,'\x50\x4e\x4e\x61')](_0x284fda[_0x480f24(0x13c,'\x61\x6e\x34\x74')]))_0xccaa80[_0x3651dd]=Math[_0x480f24(0x133,'\x61\x6e\x34\x74')](_0xccaa80[_0x3651dd]??-0x12a4*-0x2+0x62*0x5e+0x4944*-0x1,_0x37c441);return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':_0xccaa80};}function pruneState(_0x5ae6f2){const _0xb846d2=_0x5e027b;return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':Object[_0xb846d2(0x194,'\x36\x46\x43\x52')+_0xb846d2(0x17c,'\x56\x43\x62\x4e')](Object[_0xb846d2(0x187,'\x36\x64\x5b\x50')](_0x5ae6f2)[_0xb846d2(0x176,'\x32\x77\x32\x55')]((_0x3ea255,_0x36503a)=>_0x36503a[0x1*-0x205+0x353*-0x5+0x12a5]-_0x3ea255[-0x1e7+-0x1*0xe37+0x101f])[_0xb846d2(0x181,'\x51\x7a\x4a\x67')](-0x68d*-0x5+-0x241d+-0xd7*-0x4,MAX_STATE_ENTRIES))};}
|
|
1
|
+
const _0x110351=_0x1e72;(function(_0x1a38fa,_0x51f8f2){const _0x42b710=_0x1e72,_0x279a64=_0x1a38fa();while(!![]){try{const _0x263f64=parseInt(_0x42b710(0xc9,'\x4b\x5e\x48\x31'))/(-0xc0d+-0x5*-0x3a5+-0x62b)+parseInt(_0x42b710(0xcb,'\x52\x6c\x41\x23'))/(-0x115*0x19+0xc0c+0xf03)*(parseInt(_0x42b710(0x111,'\x4e\x34\x4d\x78'))/(0x2*0x1066+0x17f*-0xf+0x8*-0x14b))+parseInt(_0x42b710(0xd0,'\x77\x70\x4a\x26'))/(0x171d+-0x1*0x419+-0x1300)+parseInt(_0x42b710(0xc8,'\x52\x6c\x41\x23'))/(-0x1*-0x229d+-0x7a0+-0x1af8)+parseInt(_0x42b710(0xd4,'\x7a\x5a\x6b\x56'))/(0x1*-0x287+0x10d4*0x1+0xd7*-0x11)*(parseInt(_0x42b710(0xb2,'\x50\x21\x37\x54'))/(0x1df2+0x49d*-0x3+-0x1014))+-parseInt(_0x42b710(0xb6,'\x75\x63\x70\x5a'))/(0x1*0x1f75+-0x1*0x2205+0x298*0x1)+-parseInt(_0x42b710(0xf6,'\x6a\x58\x37\x77'))/(0x267+0x43e*0x5+-0x1794)*(parseInt(_0x42b710(0xfa,'\x7a\x5a\x6b\x56'))/(-0x1987+-0x11cc+0x2b5d));if(_0x263f64===_0x51f8f2)break;else _0x279a64['push'](_0x279a64['shift']());}catch(_0x54fb6f){_0x279a64['push'](_0x279a64['shift']());}}}(_0x1d5e,-0x11a655+-0xc66bb+-0x3c415*-0xb));const DEFAULT_COOLDOWN_MS=(0x199+-0x9c*-0x38+0x23b3*-0x1)*(0x8d*-0xd+0x1f0+0x575)*(0xfe9b+-0x512c+0x1*0x3cf1),MIN_COOLDOWN_MS=0x1*0xfb4f+-0x3bd7+0x2ae8,MAX_COOLDOWN_MS=(0x1a34+0x10+0xd13*-0x2)*(-0x2*-0x12e5+-0x18fe+-0x21e*0x6)*(-0x1c7c+0x25*0x20+0x1818)*(-0xd1c4+0x353b*-0x6+-0x9*-0x54d6),MAX_STATE_ENTRIES=-0x12b3*0x1+0x6f*0x19+0x7fc,STATE_KEY='\x6c\x69\x66\x65\x63\x79\x63\x6c'+'\x65\x3a\x63\x6c\x61\x69\x6d\x5f'+_0x110351(0xe9,'\x58\x36\x74\x26'),CLAIM_CODE_RE=/^[A-Za-z0-9][A-Za-z0-9_-]{1,127}$/;export function createClaimNudge(_0x32f555){const _0x1b0f7f=_0x110351,_0xaab295=_0x32f555['\x65\x6e\x76']??process.env,_0x38c9d9=_0x32f555[_0x1b0f7f(0xb5,'\x6c\x6e\x62\x23')]??(()=>Date[_0x1b0f7f(0xdc,'\x58\x36\x74\x26')]()),_0x2546f1=_0x32f555[_0x1b0f7f(0xb0,'\x30\x46\x24\x6d')]??(_0x4cb38d=>{const _0x122008=_0x1b0f7f;process[_0x122008(0xb1,'\x52\x6c\x41\x23')][_0x122008(0xe7,'\x26\x46\x38\x37')](_0x4cb38d);});let _0xb30c71={'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};return _0x3bce2c=>{const _0x4525a0=_0x1b0f7f;if(!_0x3bce2c['\x6f\x6b']||_0xaab295['\x45\x56\x4f\x4c\x56\x45\x52\x5f'+_0x4525a0(0xb4,'\x5e\x31\x4d\x59')+_0x4525a0(0xe2,'\x31\x63\x34\x4c')+_0x4525a0(0xb3,'\x4b\x5e\x48\x31')]==='\x31')return![];const _0x425135=normalizeClaimCode(_0x3bce2c[_0x4525a0(0xbb,'\x6c\x6e\x62\x23')+'\x65']),_0x202757=_0x425135?trustedClaimUrl(_0x3bce2c[_0x4525a0(0x101,'\x77\x70\x4a\x26')],_0x32f555[_0x4525a0(0xe6,'\x57\x4e\x47\x6b')]):undefined;if(!_0x425135||!_0x202757)return![];const _0x213fa9=_0x38c9d9(),_0x779e2f=claimNudgeCooldownMs(_0xaab295[_0x4525a0(0xfe,'\x54\x4b\x75\x53')+_0x4525a0(0xad,'\x26\x46\x38\x37')+_0x4525a0(0xd7,'\x53\x67\x4d\x4f')+_0x4525a0(0xea,'\x23\x5a\x47\x68')]),_0x5a4dbc=mergeState(readState(_0x32f555[_0x4525a0(0xd1,'\x63\x5d\x37\x40')]),_0xb30c71),_0x39f397=_0x5a4dbc[_0x4525a0(0xf4,'\x5e\x31\x4d\x59')][_0x425135]??0x5*-0x45+-0x21b+0x374;if(_0x39f397>0x1041*0x1+-0xc94+-0x1*0x3ad&&_0x213fa9-_0x39f397<_0x779e2f)return![];const _0x208399=['',_0x4525a0(0x109,'\x28\x78\x6a\x51')+_0x4525a0(0xd2,'\x7a\x5a\x6b\x56')+'\x54\x68\x69\x73\x20\x6e\x6f\x64'+_0x4525a0(0xac,'\x48\x21\x38\x51')+_0x4525a0(0xc1,'\x57\x30\x6d\x49')+_0x4525a0(0xdf,'\x48\x47\x66\x79')+_0x4525a0(0xc2,'\x48\x47\x66\x79')+_0x4525a0(0xd8,'\x4b\x5e\x48\x31')+'\x2e',_0x4525a0(0xe8,'\x54\x4b\x75\x53')+_0x4525a0(0xf0,'\x48\x47\x66\x79')+_0x202757,_0x4525a0(0xfd,'\x74\x78\x57\x5a')+_0x4525a0(0xef,'\x4c\x4a\x39\x29')+_0x425135,_0x4525a0(0xbf,'\x7a\x5a\x6b\x56')+_0x4525a0(0xcf,'\x23\x5a\x47\x68')+_0x4525a0(0xc6,'\x38\x6d\x75\x79')+'\x65\x20\x70\x72\x6f\x78\x79\x20'+_0x4525a0(0xdd,'\x77\x70\x4a\x26')+_0x4525a0(0xf3,'\x34\x50\x37\x69')+_0x4525a0(0x10c,'\x4b\x79\x59\x53')+_0x4525a0(0x102,'\x4d\x61\x40\x64'),''][_0x4525a0(0xae,'\x50\x21\x37\x54')]('\x0a');try{if('\x55\x6c\x50\x45\x77'==='\x59\x4f\x71\x4d\x6a')return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};else _0x2546f1(_0x208399);}catch{return![];}_0xb30c71=pruneState({..._0x5a4dbc[_0x4525a0(0xc0,'\x32\x4b\x47\x69')],[_0x425135]:_0x213fa9});try{_0x32f555[_0x4525a0(0xe5,'\x4d\x61\x40\x64')][_0x4525a0(0x103,'\x42\x47\x48\x77')](STATE_KEY,JSON[_0x4525a0(0x118,'\x42\x47\x48\x77')+'\x79'](_0xb30c71));}catch{}return!![];};}function _0x1d5e(){const _0x420102=['\x57\x37\x78\x63\x47\x43\x6f\x67\x57\x51\x54\x6a\x73\x43\x6f\x6e\x57\x36\x71','\x72\x53\x6b\x51\x78\x43\x6b\x6c\x57\x50\x4c\x63\x57\x37\x39\x2f','\x69\x58\x58\x61\x57\x4f\x58\x52\x57\x37\x46\x63\x51\x47\x4f','\x57\x36\x6d\x76\x57\x50\x4e\x63\x51\x57\x56\x63\x51\x63\x56\x63\x49\x57','\x57\x4f\x2f\x64\x49\x61\x4a\x63\x4b\x43\x6b\x39\x6f\x32\x79\x31','\x57\x51\x66\x46\x57\x50\x34\x64\x42\x59\x5a\x64\x4c\x38\x6b\x6c','\x57\x36\x31\x30\x62\x76\x30','\x77\x53\x6b\x70\x6e\x6d\x6b\x6c\x57\x34\x66\x36\x57\x50\x68\x64\x4f\x71','\x57\x51\x34\x52\x57\x52\x37\x64\x4e\x53\x6b\x41\x57\x50\x53','\x57\x51\x4b\x66\x79\x43\x6f\x65\x70\x43\x6b\x4d\x45\x63\x53','\x57\x34\x66\x36\x57\x35\x35\x5a\x66\x65\x48\x68','\x57\x4f\x62\x43\x57\x52\x68\x63\x4e\x43\x6f\x6a\x68\x43\x6b\x32\x6e\x61','\x74\x65\x56\x63\x50\x53\x6b\x33\x6d\x53\x6f\x4d\x64\x61','\x43\x4b\x64\x63\x50\x6d\x6b\x51\x6e\x38\x6f\x31\x67\x49\x47','\x57\x35\x46\x63\x49\x78\x4e\x64\x4c\x53\x6f\x4a\x46\x63\x6a\x2b','\x57\x50\x52\x63\x53\x4a\x50\x4f\x57\x51\x38\x63\x78\x53\x6f\x77','\x42\x6d\x6b\x38\x57\x51\x56\x63\x54\x61\x56\x63\x53\x6d\x6f\x33\x57\x52\x47','\x63\x64\x39\x49\x57\x51\x6a\x79\x57\x34\x61','\x63\x43\x6b\x63\x67\x53\x6f\x34\x57\x50\x43\x54\x6a\x31\x43','\x57\x36\x78\x64\x47\x76\x4a\x64\x54\x6d\x6f\x61\x57\x52\x2f\x63\x4c\x61','\x57\x37\x65\x5a\x57\x51\x6a\x41\x57\x51\x31\x64\x6e\x61','\x57\x36\x62\x6e\x57\x51\x34\x53\x57\x37\x62\x2b\x57\x36\x57','\x57\x34\x42\x64\x4a\x71\x66\x62\x6b\x47','\x57\x35\x6a\x52\x57\x34\x37\x64\x47\x4e\x46\x63\x52\x58\x43\x34','\x57\x52\x69\x4b\x7a\x66\x33\x64\x51\x61\x62\x2f','\x65\x58\x57\x4f','\x44\x43\x6b\x30\x75\x38\x6b\x77\x57\x50\x53\x62\x57\x37\x6e\x38','\x57\x34\x70\x63\x4f\x78\x4f','\x77\x53\x6b\x45\x6d\x53\x6b\x58\x57\x35\x54\x38\x57\x4f\x5a\x64\x4f\x47','\x57\x34\x65\x30\x57\x34\x6e\x59\x78\x75\x6e\x42\x57\x4f\x4b','\x57\x52\x61\x65\x57\x4f\x58\x38\x6e\x38\x6b\x62\x57\x50\x70\x63\x53\x71','\x57\x37\x34\x59\x57\x52\x39\x67','\x57\x34\x57\x74\x75\x38\x6f\x51\x43\x43\x6f\x73\x72\x4e\x70\x63\x4d\x43\x6f\x65\x69\x6d\x6f\x4b\x57\x50\x71','\x6f\x67\x66\x4c\x68\x74\x4b','\x63\x71\x30\x2f\x57\x35\x53\x44\x74\x47','\x57\x51\x6a\x56\x57\x36\x65\x45\x57\x37\x7a\x4e\x68\x31\x6c\x64\x4d\x53\x6b\x4f\x57\x35\x61','\x76\x73\x68\x63\x49\x61','\x57\x4f\x47\x36\x78\x43\x6f\x4f\x68\x53\x6b\x41\x65\x58\x75','\x57\x52\x6e\x4b\x46\x47','\x46\x61\x37\x63\x53\x78\x6e\x77\x42\x38\x6b\x79\x57\x52\x35\x59\x57\x52\x37\x64\x51\x72\x71\x30','\x76\x38\x6f\x6a\x57\x34\x46\x64\x56\x61\x47\x6a\x74\x61','\x57\x4f\x79\x58\x6d\x38\x6f\x70\x57\x36\x61','\x7a\x43\x6b\x55\x57\x37\x5a\x64\x56\x62\x33\x64\x55\x6d\x6f\x6e\x57\x37\x43','\x57\x36\x65\x47\x57\x37\x75\x56\x57\x36\x7a\x78\x57\x34\x2f\x63\x47\x43\x6b\x6e','\x57\x52\x35\x4e\x41\x6d\x6b\x78\x57\x35\x64\x63\x56\x43\x6f\x4a\x69\x61','\x57\x36\x5a\x63\x47\x6d\x6f\x56\x57\x52\x7a\x69\x71\x38\x6f\x77\x57\x36\x30','\x57\x52\x4e\x64\x4e\x48\x56\x64\x54\x4d\x74\x64\x48\x43\x6f\x4f','\x70\x33\x6a\x2b\x67\x4a\x4b','\x76\x53\x6b\x57\x57\x37\x6c\x64\x4f\x72\x2f\x64\x53\x53\x6f\x6d\x57\x37\x57','\x6d\x6d\x6b\x73\x7a\x63\x38\x7a\x57\x4f\x64\x63\x52\x71','\x71\x33\x48\x61\x75\x31\x69\x6e\x57\x36\x6c\x63\x47\x71','\x57\x50\x62\x59\x44\x4a\x74\x64\x47\x53\x6f\x31\x72\x5a\x30','\x57\x51\x6c\x64\x56\x4d\x58\x49\x57\x35\x70\x63\x4b\x77\x37\x64\x4c\x71','\x57\x37\x64\x63\x4e\x43\x6f\x4a\x57\x51\x6e\x6c\x73\x6d\x6f\x77\x57\x37\x69','\x57\x51\x2f\x64\x4a\x38\x6f\x77\x41\x6d\x6f\x30\x6d\x31\x31\x39','\x57\x37\x5a\x64\x49\x4b\x56\x64\x51\x38\x6b\x73\x57\x37\x64\x63\x4a\x53\x6b\x52','\x6a\x4c\x78\x64\x56\x38\x6b\x77\x57\x51\x6c\x63\x4c\x57\x4f\x6c\x57\x34\x65','\x74\x4b\x62\x55\x57\x4f\x7a\x45\x63\x38\x6f\x44\x57\x35\x4a\x63\x4c\x53\x6b\x74\x62\x53\x6f\x36\x65\x57','\x69\x66\x6c\x64\x56\x6d\x6f\x48\x57\x36\x4e\x64\x4d\x66\x57\x6a\x57\x35\x4a\x64\x52\x6d\x6b\x58\x57\x36\x48\x34','\x6c\x74\x6c\x64\x4e\x76\x48\x63\x57\x50\x5a\x63\x49\x71','\x73\x30\x66\x49\x57\x4f\x31\x42\x63\x6d\x6b\x4e\x57\x35\x70\x63\x49\x53\x6b\x32\x69\x38\x6f\x78','\x44\x64\x6c\x63\x50\x43\x6f\x35','\x57\x37\x57\x59\x57\x51\x76\x43\x57\x51\x50\x68\x6b\x4c\x69','\x46\x38\x6b\x74\x57\x51\x4e\x63\x51\x63\x5a\x63\x4c\x43\x6f\x76','\x57\x37\x58\x73\x62\x38\x6f\x61\x6b\x6d\x6b\x4b\x57\x52\x31\x36','\x57\x37\x79\x6b\x57\x34\x31\x45\x6d\x65\x33\x63\x4c\x43\x6b\x67\x65\x6d\x6f\x43\x64\x58\x37\x64\x51\x57','\x65\x43\x6f\x31\x77\x43\x6b\x63\x57\x52\x43','\x6f\x6d\x6b\x53\x57\x36\x68\x64\x50\x57\x52\x64\x4f\x53\x6f\x2f\x57\x52\x53','\x57\x52\x54\x35\x7a\x53\x6b\x74\x57\x37\x4a\x63\x4b\x6d\x6f\x34\x6e\x47','\x69\x53\x6f\x56\x57\x51\x68\x64\x4a\x71\x4a\x64\x4f\x53\x6f\x65\x57\x34\x57\x34','\x57\x51\x4c\x34\x57\x51\x38\x56\x75\x43\x6f\x69\x61\x38\x6f\x55','\x44\x47\x70\x63\x55\x43\x6b\x61\x57\x51\x5a\x63\x4a\x58\x47\x35','\x77\x6d\x6f\x30\x57\x50\x4b\x61\x67\x6d\x6b\x66\x75\x30\x38','\x6d\x71\x46\x63\x52\x53\x6b\x57\x57\x52\x46\x63\x4d\x57\x69\x4f','\x57\x34\x54\x32\x57\x34\x62\x4b\x68\x4c\x4b','\x65\x48\x79\x4f\x57\x34\x4f\x62\x78\x43\x6b\x66\x57\x36\x38','\x57\x51\x44\x57\x57\x52\x79\x57','\x57\x4f\x2f\x63\x4a\x62\x4f','\x57\x51\x66\x43\x57\x50\x65\x45\x41\x58\x46\x64\x4b\x6d\x6b\x63','\x57\x50\x57\x36\x57\x51\x72\x73\x65\x38\x6b\x57','\x57\x4f\x54\x71\x6e\x59\x78\x63\x4a\x6d\x6b\x49\x7a\x59\x4b','\x69\x67\x66\x4c\x64\x4a\x78\x64\x48\x71','\x57\x51\x71\x68\x45\x53\x6f\x7a\x7a\x47','\x57\x52\x54\x4d\x69\x6d\x6b\x78\x64\x53\x6b\x35\x6f\x65\x43','\x57\x50\x76\x6c\x67\x71','\x57\x37\x58\x64\x57\x35\x33\x64\x53\x66\x37\x64\x55\x77\x6c\x64\x49\x43\x6b\x61\x57\x36\x31\x74\x65\x53\x6b\x49','\x57\x52\x35\x50\x68\x47\x65\x4e','\x57\x34\x42\x63\x56\x78\x42\x63\x54\x53\x6f\x72\x62\x47','\x57\x4f\x71\x36\x57\x51\x72\x62\x68\x57','\x6a\x73\x7a\x55\x57\x51\x4c\x71\x57\x50\x6c\x63\x52\x71\x43','\x57\x4f\x2f\x63\x4c\x47\x4e\x64\x53\x6d\x6b\x6d\x64\x43\x6b\x4c\x7a\x57','\x57\x50\x48\x30\x69\x38\x6b\x55\x67\x6d\x6b\x7a\x57\x50\x4f','\x57\x50\x79\x4d\x57\x52\x4c\x68\x65\x38\x6b\x37\x57\x51\x34','\x57\x34\x56\x63\x50\x4d\x64\x63\x4b\x43\x6f\x6b\x64\x38\x6b\x34','\x57\x52\x34\x43\x57\x4f\x42\x63\x50\x57\x6d','\x57\x37\x70\x63\x47\x6d\x6f\x50\x57\x51\x76\x6f\x74\x47','\x57\x52\x37\x64\x4d\x43\x6b\x6a\x6f\x47','\x57\x52\x6d\x66\x6e\x57','\x57\x50\x66\x44\x57\x4f\x42\x63\x4d\x53\x6f\x53\x68\x43\x6b\x53\x6f\x57','\x78\x38\x6f\x33\x57\x35\x2f\x64\x49\x64\x47','\x6f\x33\x5a\x64\x4e\x75\x75\x6c\x57\x4f\x56\x63\x4a\x38\x6f\x30','\x57\x51\x4b\x44\x45\x53\x6f\x42\x6e\x43\x6b\x5a\x6a\x71','\x69\x43\x6b\x6f\x45\x74\x61','\x57\x50\x52\x63\x4f\x6d\x6b\x74\x57\x35\x70\x63\x52\x74\x48\x32\x46\x53\x6b\x57\x66\x53\x6f\x7a\x64\x4e\x4b','\x57\x50\x58\x68\x57\x50\x42\x63\x4d\x43\x6f\x69\x74\x47','\x57\x51\x4e\x64\x4b\x38\x6f\x62\x42\x47','\x7a\x6d\x6f\x69\x69\x77\x39\x62\x57\x35\x70\x64\x52\x4a\x48\x34\x57\x35\x43\x6e\x57\x52\x38\x33','\x6a\x38\x6f\x50\x57\x51\x70\x64\x4f\x59\x56\x64\x55\x6d\x6f\x77\x57\x36\x38\x68','\x57\x52\x4e\x64\x47\x32\x4a\x64\x4f\x4a\x47\x44'];_0x1d5e=function(){return _0x420102;};return _0x1d5e();}export function wrapHelloWithClaimNudge(_0x2c7d16,_0x4b0589){return async _0x2c1777=>{const _0x122e23=await _0x2c7d16(_0x2c1777);try{_0x4b0589(_0x122e23);}catch{}return _0x122e23;};}export function claimNudgeCooldownMs(_0x30efa4){const _0x1cc96d=_0x110351,_0x20a0a0=Number(_0x30efa4);if(!Number[_0x1cc96d(0x100,'\x40\x34\x33\x58')](_0x20a0a0)||_0x20a0a0<=0x184c+0x1777+-0x2fc3)return DEFAULT_COOLDOWN_MS;return Math[_0x1cc96d(0xe3,'\x31\x63\x34\x4c')](MIN_COOLDOWN_MS,Math[_0x1cc96d(0x117,'\x57\x4e\x47\x6b')](Math['\x66\x6c\x6f\x6f\x72'](_0x20a0a0),MAX_COOLDOWN_MS));}function normalizeClaimCode(_0x8e6469){const _0x573104=_0x110351,_0x41c076=_0x8e6469?.['\x74\x72\x69\x6d']();return _0x41c076&&CLAIM_CODE_RE[_0x573104(0xdb,'\x4e\x34\x4d\x78')](_0x41c076)?_0x41c076:undefined;}function trustedClaimUrl(_0x2c4b0e,_0x2c32b0){const _0x2b5a2f=_0x110351,_0x10cdfd=_0x2c4b0e?.[_0x2b5a2f(0xf5,'\x32\x4b\x47\x69')]();if(!_0x10cdfd||_0x10cdfd['\x6c\x65\x6e\x67\x74\x68']>0x4fe+-0x1cf9*0x1+0x1*0x1ffb)return undefined;try{const _0xc6519a=new URL(_0x10cdfd),_0x21a789=new URL(_0x2c32b0);if(_0xc6519a[_0x2b5a2f(0xc5,'\x4c\x4a\x39\x29')]||_0xc6519a['\x70\x61\x73\x73\x77\x6f\x72\x64'])return undefined;const _0x42dbf5=_0xc6519a[_0x2b5a2f(0xe0,'\x30\x46\x24\x6d')]===_0x21a789[_0x2b5a2f(0xfb,'\x73\x69\x63\x69')],_0x53a66c=_0xc6519a[_0x2b5a2f(0xcd,'\x50\x21\x37\x54')]===_0x2b5a2f(0xd5,'\x6e\x4d\x6c\x78')+'\x69'||_0xc6519a['\x68\x6f\x73\x74\x6e\x61\x6d\x65'][_0x2b5a2f(0xf1,'\x6a\x4a\x59\x65')](_0x2b5a2f(0x113,'\x5e\x45\x35\x6d')+'\x61\x69');if(_0xc6519a[_0x2b5a2f(0xb9,'\x7a\x5a\x6b\x56')]===_0x2b5a2f(0xf7,'\x6a\x4a\x59\x65')&&(_0x42dbf5||_0x53a66c))return _0xc6519a[_0x2b5a2f(0x107,'\x6a\x4a\x59\x65')]();if(_0xc6519a[_0x2b5a2f(0xbc,'\x52\x5a\x25\x35')]==='\x68\x74\x74\x70\x3a'&&_0x42dbf5&&isLoopback(_0xc6519a[_0x2b5a2f(0x10b,'\x7a\x49\x6d\x59')]))return _0xc6519a['\x74\x6f\x53\x74\x72\x69\x6e\x67']();}catch{}return undefined;}function isLoopback(_0x4fe130){const _0xd54a80=_0x110351;return _0x4fe130===_0xd54a80(0xc4,'\x52\x5a\x25\x35')+'\x74'||_0x4fe130===_0xd54a80(0x10a,'\x40\x34\x33\x58')+'\x31'||_0x4fe130===_0xd54a80(0xb8,'\x6c\x6e\x62\x23');}function readState(_0x269047){const _0x473700=_0x110351;try{const _0x4d62ef=_0x269047[_0x473700(0xd6,'\x4b\x5e\x48\x31')](STATE_KEY);if(!_0x4d62ef)return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};const _0x35a1a6=JSON[_0x473700(0xbe,'\x30\x46\x24\x6d')](_0x4d62ef);if(_0x35a1a6[_0x473700(0x10f,'\x38\x6d\x75\x79')]!==0x2368+0xd2c+-0x3093||!_0x35a1a6[_0x473700(0xca,'\x34\x50\x37\x69')]||typeof _0x35a1a6[_0x473700(0x114,'\x4c\x33\x56\x4a')]!==_0x473700(0xd9,'\x48\x21\x38\x51')||Array[_0x473700(0xb7,'\x44\x68\x76\x56')](_0x35a1a6[_0x473700(0x106,'\x48\x21\x38\x51')])){if(_0x473700(0xf2,'\x44\x68\x76\x56')===_0x473700(0x112,'\x58\x75\x59\x5e')){const _0x270ab5=new _0x117f62(_0x868dd5),_0x2fdb6b=new _0xf08f2b(_0x5353ed);if(_0x270ab5[_0x473700(0xc5,'\x4c\x4a\x39\x29')]||_0x270ab5['\x70\x61\x73\x73\x77\x6f\x72\x64'])return _0x112c53;const _0x4838fc=_0x270ab5[_0x473700(0xde,'\x26\x46\x38\x37')]===_0x2fdb6b[_0x473700(0xee,'\x52\x5a\x25\x35')],_0x21e175=_0x270ab5[_0x473700(0xda,'\x52\x6c\x41\x23')]===_0x473700(0x105,'\x5e\x31\x4d\x59')+'\x69'||_0x270ab5['\x68\x6f\x73\x74\x6e\x61\x6d\x65'][_0x473700(0x10e,'\x63\x4c\x74\x52')](_0x473700(0xff,'\x71\x4c\x47\x6f')+'\x61\x69');if(_0x270ab5[_0x473700(0x116,'\x74\x78\x57\x5a')]===_0x473700(0x104,'\x59\x34\x50\x21')&&(_0x4838fc||_0x21e175))return _0x270ab5[_0x473700(0xc3,'\x46\x56\x51\x49')]();if(_0x270ab5['\x70\x72\x6f\x74\x6f\x63\x6f\x6c']===_0x473700(0xe1,'\x5e\x31\x4d\x59')&&_0x4838fc&&_0x548ba7(_0x270ab5['\x68\x6f\x73\x74\x6e\x61\x6d\x65']))return _0x270ab5['\x74\x6f\x53\x74\x72\x69\x6e\x67']();}else return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};}const _0xcb254a={};for(const [_0x36c1c5,_0x56bdfc]of Object[_0x473700(0x110,'\x50\x21\x37\x54')](_0x35a1a6[_0x473700(0xeb,'\x26\x46\x38\x37')])){if(CLAIM_CODE_RE[_0x473700(0xcc,'\x30\x6e\x62\x46')](_0x36c1c5)&&typeof _0x56bdfc===_0x473700(0x10d,'\x54\x4b\x75\x53')&&Number[_0x473700(0xfc,'\x52\x5a\x25\x35')](_0x56bdfc)&&_0x56bdfc>-0x20da+-0x9c7+0x2aa1)_0xcb254a[_0x36c1c5]=_0x56bdfc;}return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':_0xcb254a};}catch{return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};}}function mergeState(_0x50fd47,_0x43b5e8){const _0x4e91ba=_0x110351,_0xf0c0b3={..._0x50fd47[_0x4e91ba(0x108,'\x28\x78\x6a\x51')]};for(const [_0x3fbc85,_0x79225c]of Object[_0x4e91ba(0xbd,'\x4a\x59\x49\x45')](_0x43b5e8[_0x4e91ba(0xeb,'\x26\x46\x38\x37')]))_0xf0c0b3[_0x3fbc85]=Math['\x6d\x61\x78'](_0xf0c0b3[_0x3fbc85]??0x2*0x4c0+0x98*-0x2+0x8*-0x10a,_0x79225c);return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':_0xf0c0b3};}function _0x1e72(_0x5478b8,_0x14d072){_0x5478b8=_0x5478b8-(0x731+0x1f4e+-0x25d3);const _0x4b47a6=_0x1d5e();let _0x379f1f=_0x4b47a6[_0x5478b8];if(_0x1e72['\x56\x7a\x6e\x78\x71\x6b']===undefined){var _0x29178d=function(_0x11e250){const _0x288f16='\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 _0x3b84d6='',_0x4cb90c='';for(let _0x396797=-0x37f+0x3a1*-0x5+0x454*0x5,_0xafd353,_0x2c4a14,_0x28d83d=0x1*0x1f99+-0x53*-0x26+-0x2beb;_0x2c4a14=_0x11e250['\x63\x68\x61\x72\x41\x74'](_0x28d83d++);~_0x2c4a14&&(_0xafd353=_0x396797%(0x181d*0x1+0x157d*-0x1+0xa7*-0x4)?_0xafd353*(0x1dd6+-0x85d*-0x3+-0x36ad)+_0x2c4a14:_0x2c4a14,_0x396797++%(-0x1*0x2678+-0x10*0x25a+0x1*0x4c1c))?_0x3b84d6+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x409+0x13e+-0x448&_0xafd353>>(-(0x1f21+0x2650+0x4f*-0xe1)*_0x396797&-0x1535*-0x1+-0xdf3*0x1+-0x2*0x39e)):-0x263d+-0x3*-0xf7+0x2358){_0x2c4a14=_0x288f16['\x69\x6e\x64\x65\x78\x4f\x66'](_0x2c4a14);}for(let _0x58d39c=-0x2447+0x1*-0x1f58+0x439f*0x1,_0x396a72=_0x3b84d6['\x6c\x65\x6e\x67\x74\x68'];_0x58d39c<_0x396a72;_0x58d39c++){_0x4cb90c+='\x25'+('\x30\x30'+_0x3b84d6['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x58d39c)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x2502+-0x35*0x1a+-0x1f90))['\x73\x6c\x69\x63\x65'](-(0x1b*0x3d+0xcd6+-0x1343));}return decodeURIComponent(_0x4cb90c);};const _0x4712f7=function(_0x3118d5,_0x39cd33){let _0x346d25=[],_0x4a9ea2=-0x1f25+-0x10f9+0x301e,_0x1a479f,_0x1d8171='';_0x3118d5=_0x29178d(_0x3118d5);let _0x13ed31;for(_0x13ed31=-0x1ac1+-0x12b*-0x19+-0x2*0x139;_0x13ed31<0x1367*0x2+0xa77*0x3+-0x4533;_0x13ed31++){_0x346d25[_0x13ed31]=_0x13ed31;}for(_0x13ed31=0x73*0x4f+-0x8d9+-0xd52*0x2;_0x13ed31<-0xae3*-0x1+0x1e89*0x1+-0x286c;_0x13ed31++){_0x4a9ea2=(_0x4a9ea2+_0x346d25[_0x13ed31]+_0x39cd33['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x13ed31%_0x39cd33['\x6c\x65\x6e\x67\x74\x68']))%(0x3a6*-0x7+0x1*-0x210a+0x3b94),_0x1a479f=_0x346d25[_0x13ed31],_0x346d25[_0x13ed31]=_0x346d25[_0x4a9ea2],_0x346d25[_0x4a9ea2]=_0x1a479f;}_0x13ed31=0x1dc3*-0x1+0x301*0x9+-0x15d*-0x2,_0x4a9ea2=-0x5e*-0x69+0x21e9+-0x4877;for(let _0x392b0a=0x54+-0x25b5+0x2561;_0x392b0a<_0x3118d5['\x6c\x65\x6e\x67\x74\x68'];_0x392b0a++){_0x13ed31=(_0x13ed31+(-0x18a5+-0x19f3+-0x1*-0x3299))%(-0x452+0x214c+-0x1bfa),_0x4a9ea2=(_0x4a9ea2+_0x346d25[_0x13ed31])%(-0x2*0x6e6+-0x10d0*0x2+0x306c),_0x1a479f=_0x346d25[_0x13ed31],_0x346d25[_0x13ed31]=_0x346d25[_0x4a9ea2],_0x346d25[_0x4a9ea2]=_0x1a479f,_0x1d8171+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x3118d5['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x392b0a)^_0x346d25[(_0x346d25[_0x13ed31]+_0x346d25[_0x4a9ea2])%(0x37e*0x1+0x136a+-0x15e8)]);}return _0x1d8171;};_0x1e72['\x45\x4a\x47\x65\x6c\x73']=_0x4712f7,_0x1e72['\x4b\x54\x66\x48\x54\x76']={},_0x1e72['\x56\x7a\x6e\x78\x71\x6b']=!![];}const _0x5cbd28=_0x4b47a6[-0x2*-0x2de+0x224*0xa+-0x1b24],_0x4a33c1=_0x5478b8+_0x5cbd28,_0x1dd0ae=_0x1e72['\x4b\x54\x66\x48\x54\x76'][_0x4a33c1];return!_0x1dd0ae?(_0x1e72['\x4e\x42\x50\x58\x76\x70']===undefined&&(_0x1e72['\x4e\x42\x50\x58\x76\x70']=!![]),_0x379f1f=_0x1e72['\x45\x4a\x47\x65\x6c\x73'](_0x379f1f,_0x14d072),_0x1e72['\x4b\x54\x66\x48\x54\x76'][_0x4a33c1]=_0x379f1f):_0x379f1f=_0x1dd0ae,_0x379f1f;}function pruneState(_0x1e66c8){const _0x12866d=_0x110351;return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':Object[_0x12866d(0xd3,'\x6c\x6e\x62\x23')+_0x12866d(0x115,'\x52\x6c\x41\x23')](Object[_0x12866d(0xec,'\x57\x4e\x47\x6b')](_0x1e66c8)[_0x12866d(0xf8,'\x4c\x4a\x39\x29')]((_0x2fa1fc,_0xf24606)=>_0xf24606[0x1f92+-0x13db+0xbb6*-0x1]-_0x2fa1fc[0x1188+0x2408+0x1*-0x358f])[_0x12866d(0xed,'\x71\x4c\x47\x6f')](-0x35*-0x9e+0x21*-0x11b+0x3c5,MAX_STATE_ENTRIES))};}
|