Close Open Privacy Scan
App Privacy Score
High risk · 2501 finding(s)
Dependency score: 72 (Medium risk)
bar_chart Score Breakdown
list Scan Summary
swap_horiz Confirmed data exfiltration in application code
External domains:
${apiHost}:${apiPort}`,api.eu.amplitude.comapi.example.comapi2.amplitude.comapp.amplitude.comapp.eu.amplitude.comapps.stag2.amplitude.comcdn.amplitude.comcloud.dify.aicloud.example.comday.js.orgdiagnostics.prod.eu-central-1.amplitude.comdiagnostics.prod.us-west-2.amplitude.comenv.example.comevilmartians.comexample.dify.aisr-client-cfg.amplitude.comsr-client-cfg.eu.amplitude.comungh.ccwww.docs.developers.amplitude.comwww.w3ctech.com
repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:57repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:76repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:87repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:100repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:117repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:132repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:195repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:211repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:222repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:230repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:247repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:255repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:264repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:334repo/e2e/features/agent-v2/support/agent-drive.ts:170 → repo/e2e/features/agent-v2/support/agent-drive.ts:167repo/e2e/features/agent-v2/support/agent-drive.ts:170 → repo/e2e/features/agent-v2/support/agent-drive.ts:179repo/e2e/features/agent-v2/support/seed.ts:402 → repo/e2e/features/agent-v2/support/seed.ts:399repo/sdks/nodejs-client/src/client/base.ts:142 → repo/sdks/nodejs-client/src/client/base.ts:152repo/web/app/components/workflow/hooks/use-workflow-comment.ts:39 → repo/web/app/components/workflow/hooks/use-workflow-comment.ts:157repo/web/scripts/gen-doc-paths.ts:15 → repo/web/scripts/gen-doc-paths.ts:145repo/web/scripts/gen-doc-paths.ts:15 → repo/web/scripts/gen-doc-paths.ts:404repo/web/service/access-control/use-app-access-config.ts:52 → repo/web/service/access-control/use-app-access-config.ts:52repo/web/service/access-control/use-dataset-access-config.ts:58 → repo/web/service/access-control/use-dataset-access-config.ts:58repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:57repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:76repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:87repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:100repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:117repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:132repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:195repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:211repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:222repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:230repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:247repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:255repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:264repo/cli/scripts/e2e-provision.ts:36 → repo/cli/scripts/e2e-provision.ts:334repo/e2e/features/agent-v2/support/agent-drive.ts:170 → repo/e2e/features/agent-v2/support/agent-drive.ts:167repo/e2e/features/agent-v2/support/agent-drive.ts:170 → repo/e2e/features/agent-v2/support/agent-drive.ts:179repo/e2e/features/agent-v2/support/seed.ts:402 → repo/e2e/features/agent-v2/support/seed.ts:399repo/web/app/components/workflow/hooks/use-workflow-comment.ts:39 → repo/web/app/components/workflow/hooks/use-workflow-comment.ts:157repo/web/scripts/gen-doc-paths.ts:15 → repo/web/scripts/gen-doc-paths.ts:145repo/web/scripts/gen-doc-paths.ts:15 → repo/web/scripts/gen-doc-paths.ts:404repo/web/service/access-control/use-app-access-config.ts:52 → repo/web/service/access-control/use-app-access-config.ts:52repo/web/service/access-control/use-dataset-access-config.ts:58 → repo/web/service/access-control/use-dataset-access-config.ts:58repo/sdks/nodejs-client/src/client/base.ts:142 → repo/sdks/nodejs-client/src/client/base.ts:152</> First-Party Code
first-party (npm)
npm first-party const res = await fetch(`${base}/console/api/login`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email, password: passwordB64, remember_me: false }),
signal: AbortSignal.timeout(15_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const res = await fetch(`${base}/openapi/v1/account/sessions`, {
headers: { Authorization: `Bearer ${token}` },
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const codeRes = await fetch(`${base}/openapi/v1/oauth/device/code`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ client_id: 'difyctl', device_label: label }),
signal: AbortSignal.timeout(15_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
approveRes = await fetch(`${base}/openapi/v1/oauth/device/approve`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Cookie': cookieStr, 'X-CSRFToken': csrf },
body: JSON.stringify({ user_code }),
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const tokenRes = await fetch(`${base}/openapi/v1/oauth/device/token`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ device_code, client_id: 'difyctl' }),
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const res = await fetch(`${base}/console/api/workspaces`, {
headers: { 'Cookie': cookieStr, 'X-CSRF-Token': csrf },
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
await fetch(`${base}/console/api/workspaces/switch`, {
method: 'POST',
headers: { ...mkH(), 'Content-Type': 'application/json' },
body: JSON.stringify({ tenant_id: wsId }),
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const searchRes = await fetch(
`${base}/console/api/apps?name=${encodeURIComponent(appName)}&limit=50&page=1`,
{ headers: mkH(), signal: AbortSignal.timeout(10_000) },
)
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const importRes = await fetch(`${base}/console/api/apps/imports`, {
method: 'POST',
headers: { ...mkH(), 'Content-Type': 'application/json' },
body: JSON.stringify({ mode: 'yaml-content', yaml_content: dsl }),
signal: AbortSignal.timeout(30_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const confirmRes = await fetch(`${base}/console/api/apps/imports/${importData.import_id}/confirm`, {
method: 'POST',
headers: mkH(),
signal: AbortSignal.timeout(15_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
await fetch(`${base}/console/api/apps/${appId}/api-enable`, {
method: 'POST',
headers: { ...mkH(), 'Content-Type': 'application/json' },
body: JSON.stringify({ enable_api: true }),
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
await fetch(`${base}/console/api/enterprise/webapp/app/access-mode`, {
method: 'POST',
headers: { ...mkH(), 'Content-Type': 'application/json' },
body: JSON.stringify({ appId, accessMode: 'public' }),
signal: AbortSignal.timeout(10_000),
}).catch(() => {})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
await fetch(`${base}/console/api/apps/${appId}/workflows/publish`, {
method: 'POST',
headers: { ...mkH(), 'Content-Type': 'application/json' },
body: JSON.stringify({ marked_name: 'e2e-provision', marked_comment: '' }),
signal: AbortSignal.timeout(20_000),
}).catch(() => {})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
await fetch(`${base}/console/api/workspaces/switch`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Cookie': cookieString, 'X-CSRF-Token': csrfToken },
body: JSON.stringify({ tenant_id: primaryWsId }),
signal: AbortSignal.timeout(10_000),
}).catch((err: unknown) => console.warn(`[provision] switch-back to primary failed (non-fatal): ${err}`))
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const uploadResponse = await ctx.post('/console/api/files/upload', {
multipart: {
file: {
buffer: await readFile(filePath),
mimeType: 'text/plain',
name: fileName,
},
},
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const commitResponse = await ctx.post(`/console/api/agent/${agentId}/config/files`, {
data: {
upload_file_id: uploadedFile.id,
},
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const response = await ctx.post('/console/api/files/upload', {
multipart: {
file: {
buffer: await readFile(filePath),
mimeType: 'text/plain',
name: fileName,
},
},
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
return this.http.request({
method: "POST",
path: `/messages/${messageId}/feedbacks`,
data: payload,
});
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const newComment = await consoleClient.apps.byAppId.workflow.comments.post({
params: { app_id: appId },
body: {
position_x: flowPosition.x,
position_y: flowPosition.y,
content,
mentioned_user_ids: mentionedUserIds,
},
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const response = await fetch(url)
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const response = await fetch(DOCS_JSON_URL)
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
mutationFn: (payload: UpdateAppUserAccessSettingsRequest) => appRbacClient.users.byTargetAccountId.accessPolicies.put({
params: {
app_id: appId,
target_account_id: payload.accountId,
},
body: {
access_policy_ids: payload.accessPolicyIds,
},
}),
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
mutationFn: (payload: UpdateDatasetUserAccessSettingsRequest) => datasetRbacClient.users.byTargetAccountId.accessPolicies.put({
params: {
dataset_id: datasetId,
target_account_id: payload.accountId,
},
body: {
access_policy_ids: payload.accessPolicyIds,
},
}),
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
trackEvent('app_published_time', { action_mode: 'app', app_id: appDetail?.id, app_name: appDetail?.name })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('preview_template', {
template_id: app.app_id,
template_name: appBasicInfo.name,
template_mode: appBasicInfo.mode,
template_categories: app.categories,
page: 'studio',
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('in_site_message_show', {
notification_id: notificationId,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('in_site_message_action', {
notification_id: notificationId,
action: item.action_name,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import * as amplitude from '@amplitude/analytics-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { sessionReplayPlugin } from '@amplitude/plugin-session-replay-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import * as amplitude from '@amplitude/analytics-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { sessionReplayPlugin } from '@amplitude/plugin-session-replay-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import * as amplitude from '@amplitude/analytics-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { sessionReplayPlugin } from '@amplitude/plugin-session-replay-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.init(AMPLITUDE_API_KEY, {
defaultTracking: {
sessions: true,
pageViews: true,
formInteractions: true,
fileDownloads: true,
attribution: true,
},
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.add(createPageNameEnrichmentPlugin())
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.add(sessionReplayPlugin({
sampleRate: sessionReplaySampleRate,
}))
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import * as amplitude from '@amplitude/analytics-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
return amplitude.track(eventName, eventProperties)
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
return amplitude.flush()
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.setUserId(userId)
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.identify(identifyEvent)
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.reset()
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('create_datasets_from_scratch', {
dataset_id: id,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('create_datasets_with_pipeline', {
template_name: pipeline.name,
template_id: pipeline.id,
template_type: type,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('create_empty_datasets', {
name: inputValue,
dataset_id: dataset.id,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('create_datasets', {
data_source_type: dataSourceType,
indexing_technique: indexType,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('dataset_document_added', {
data_source_type: datasourceType,
indexing_technique: 'pipeline',
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('create_external_knowledge_base', {
provider: formValue.provider,
name: formValue.name,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('preview_template', {
template_id: app.app_id,
template_name: appBasicInfo.name,
template_mode: appBasicInfo.mode,
template_categories: app.categories,
page: 'explore',
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('explore_banner_click', {
banner_id: banner.id,
title: banner.content.title,
sort,
link: banner.link,
page: 'explore',
language,
account_id: accountId,
event_time: Date.now(),
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('explore_banner_impression', {
banner_id: currentBanner.id,
title: currentBanner.content.title,
sort: selectedIndex + 1,
link: currentBanner.link,
page: 'explore',
language,
account_id: accountId,
event_time: Date.now(),
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('preview_template', {
template_id: item.app_id,
template_name: appBasicInfo.name,
template_mode: appBasicInfo.mode,
template_categories: item.categories,
page: 'explore',
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('plugin_uninstalled', { plugin_id, plugin_name: name })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('pipeline_start_action_time', { action_type: 'document_processing' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_published_time', { action_mode: 'pipeline', app_id: datasetId, app_name: params?.title || '' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('workflow_run_failed', {
workflow_id: flowId,
reason,
node_type: nodeType,
data: {
workflow_status: getWorkflowStatus(workflowData),
workflow_tracing_count: getWorkflowTracingCount(workflowData),
...workflowDataTrackingProperties,
},
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('tool_selected', {
tool_name: payload.name,
plugin_id: provider.plugin_id,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_start_action_time', { action_type: 'user_input' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_start_action_time', { action_type: 'schedule' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_start_action_time', { action_type: 'webhook' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_start_action_time', { action_type: 'plugin' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_start_action_time', { action_type: 'all' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('workflow_run_failed', { workflow_id: flowId, node_id: id, reason: res.error, node_type: data?.type })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('user_login_success', {
method: 'email_code',
is_invite: !!invite_token,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('user_login_success', {
method: 'email_password',
is_invite: isInvite,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
setUserId(userProfile.email)
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
setUserProperties(properties)
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
expand_more 436 low-confidence finding(s)
const baseSha = process.env.BASE_SHA || ''
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const headSha = process.env.HEAD_SHA || ''
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const files = (process.env.CHANGED_FILES || '').split(/\s+/).filter(Boolean)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const outputPath = process.env.I18N_CHANGES_OUTPUT_PATH || '/tmp/i18n-changes.json'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return JSON.parse(fs.readFileSync(filePath, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
outputPath,
JSON.stringify({
baseSha,
headSha,
files,
changes,
})
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const host = process.env.DIFY_E2E_HOST ?? ''
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const email = process.env.DIFY_E2E_EMAIL ?? ''
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const password = process.env.DIFY_E2E_PASSWORD ?? ''
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const edition = ((process.env.DIFY_E2E_EDITION ?? 'ee').toLowerCase()) as 'ee' | 'ce'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const preToken = process.env.DIFY_E2E_TOKEN ?? ''
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const dsl = await readFile(join(fixturesDir, dslFile), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const ghOutput = process.env.GITHUB_OUTPUT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commands, 'auth', 'login', 'index.ts'), 'export default class Login {}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commands, 'auth', 'devices', 'list', 'index.ts'), 'export default class DevicesList {}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commands, '_shared', 'index.ts'), 'export default class Shared {}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commands, 'version', 'index.ts'), 'export default class Version {}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commands, 'foo.ts'), 'export default class Foo {}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = readFileSync(target, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commandsDir, 'tree.generated.ts'), '// stale\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
onDisk = await readFile(target, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(tmp, content, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(dir, 'curl'), FAKE_CURL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
env: { ...process.env, PATH: `${dir}:${process.env.PATH ?? ''}`, DIFYCTL_INSTALL_LIB: '1', DIFY_VERSION: '', DIFYCTL_VERSION: '', FAKE_MODE: mode, FAKE_HDR_LOG: hdrLog, ...env },
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
headers = readFileSync(hdrLog, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
LOCALAPPDATA: process.env.LOCALAPPDATA || '/tmp',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
TEMP: process.env.TEMP || '/tmp',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return JSON.parse(readFileSync(pkgPath, 'utf8')) as PackageManifest
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const pkg = JSON.parse(readFileSync(pkgUrl, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
for (const line of readFileSync(checksumsPath, 'utf8').split('\n')) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
for (const line of readFileSync(path, 'utf8').split('\n')) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = readFileSync(args.current, 'utf8').trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(file, `${lines.join('\n')}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(file, `${'0'.repeat(64)} difyctl-v${VERSION}-linux-x64\n`) // only 1 of 5
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(currentArg, currentContent)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(f, `${existingDirs.join('\n')}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const file = yaml.load(await readFile(path, 'utf8')) as { entries: Record<string, unknown> }
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(
path,
yaml.dump({ entries: {
[`${mock.url}::app-1`]: 'corrupted-string',
[`${mock.url}::sibling`]: validEntry,
} }),
'utf8',
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(filePath, 'hello')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(filePath, 'x')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(filePath, 'data')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = await readFile(filePath)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(appInfoPath(dir), ': : not valid yaml', 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const file = yaml.load(await readFile(appInfoPath(dir), 'utf8')) as { entries: Record<string, unknown> }
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(appInfoPath(dir), yaml.dump(file), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(appInfoPath(dir), yaml.dump({ entries: 'not-an-object' }), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = await readFile(appInfoPath(dir), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prev = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prev
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = await readFile(nudgeStorePath(dir), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, body)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const env = opts.envLookup ?? ((k: string) => process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const hostsRaw = await readFile(join(configDir(), 'hosts.yml'), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await expect(readFile(join(configDir(), 'hosts.yml'), 'utf8')).rejects.toThrow(/ENOENT/)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = await readFile(join(dir(), 'hosts.yml'), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const env = deps.envLookup ?? ((k: string) => process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const env = deps.envLookup ?? ((k: string) => process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(opts.output, yaml, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const env = deps.envLookup ?? ((k: string) => process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(filePath, DSL_YAML, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
yamlContent = fs.readFileSync(opts.fromFile, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const env = deps.envLookup ?? ((k: string) => process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(await readFile(claudeTarget(), 'utf8')).toBe(SKILL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(claudeTarget(), 'stale skill', 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(await readFile(claudeTarget(), 'utf8')).toBe(SKILL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(await readFile(target, 'utf8')).toBe(SKILL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(await readFile(join(home, '.pi', 'agent', 'skills', 'difyctl', 'SKILL.md'), 'utf8')).toBe(SKILL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(tmp, content, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
originals.DIFY_LIMIT = process.env.DIFY_LIMIT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
originals.DIFY_HOST = process.env.DIFY_HOST
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
originals.DIFY_TEST_NONEXISTENT = process.env.DIFY_TEST_NONEXISTENT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.DIFY_LIMIT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.DIFY_HOST
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.DIFY_TEST_NONEXISTENT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[k]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
else process.env[k] = v
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_HOST = 'https://cloud.dify.ai'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_LIMIT = '42'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_HOST = 'https://example.dify.ai'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_LIMIT = '999'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return { key: readFileSync(keyPath), cert: readFileSync(certPath) }
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
saved.set(k, process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[k]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[k]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[k] = v
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.HTTP_PROXY = 'http://127.0.0.1:8888'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.https_proxy = 'http://127.0.0.1:8888'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.HTTPS_PROXY = 'http://127.0.0.1:8888'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.HTTP_PROXY = 'http://127.0.0.1:8888'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return PROXY_ENV_KEYS.some(k => (process.env[k] ?? '') !== '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.DIFY_E2E_NO_KEYRING === '1')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, 'key: value\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, 'key: original\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path, s1.getRawContent() ?? '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
s2.setRawContent(readFileSync(path, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path, s1.getRawContent() ?? '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
s2.setRawContent(readFileSync(path, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path, s1.getRawContent() ?? '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
s2.setRawContent(readFileSync(path, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path, s2.getRawContent() ?? '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
s3.setRawContent(readFileSync(path, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, 'existing: value\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = readFileSync(path, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(readFileSync(path, 'utf8')).toBe('key: value\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, 'key: value\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fsp.writeFile(tmp, this.rawContent, { mode: FILE_PERM })
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.rawContent = await fsp.readFile(this.filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = readFileSync(file, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(file, 'version: 999\ntokens:\n "h":\n "e": "x"\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(file, 'tokens:\n "h":\n "e": "dfoa_legacy"\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(file, 'tokens:\n "h":\n "existing@x": "dfoa_existing"\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(readFileSync(file, 'utf8')).toContain('version: 1')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = readFileSync(file, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return process.env[name]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NO_COLOR !== undefined && process.env.NO_COLOR !== '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.DIFYCTL_NO_COLOR !== undefined && process.env.DIFYCTL_NO_COLOR !== '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
getEnv: k => process.env[k],
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const prevConfig = process.env[ENV_CONFIG_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CONFIG_DIR] = configDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CONFIG_DIR] = configDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CONFIG_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CONFIG_DIR] = prevConfig
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = readFileSync(envFilePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[key] = val
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = process.env.DIFY_E2E_INCLUDE ?? process.env.DIFY_E2E_SINGLE_FILE
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
?? (process.env.DIFY_E2E_MODE === 'local'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
retry: Number(process.env.VITEST_RETRY ?? 0),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const defaultTags = process.env.E2E_CUCUMBER_TAGS
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
buffer: await readFile(filePath),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
content: await readFile(filePath),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
buffer: await readFile(filePath),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const port = process.env.E2E_AGENT_BACKEND_PORT?.trim() || '5050'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitE2EURL = process.env.E2E_SHELLCTL_URL?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitAgentURL = process.env.DIFY_AGENT_SHELLCTL_ENTRYPOINT?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (isTruthyEnv(process.env.E2E_START_AGENT_BACKEND)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const port = process.env.E2E_SHELLCTL_PORT?.trim() || '5004'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitE2EURL = process.env.E2E_AGENT_BACKEND_URL?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitAPIURL = process.env.AGENT_BACKEND_BASE_URL?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (isTruthyEnv(process.env.E2E_START_AGENT_BACKEND))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const value = process.env[envName]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const provider = process.env[stableChatModelProviderEnv]?.trim() || defaultStableChatModelProvider
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const name = process.env[stableChatModelNameEnv]?.trim() || defaultStableChatModelName
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const type = process.env[stableChatModelTypeEnv]?.trim() || defaultStableChatModelType
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const provider = process.env[agentDecisionChatModelProviderEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const name = process.env[agentDecisionChatModelNameEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const type = process.env[agentDecisionChatModelTypeEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const provider = process.env[brokenChatModelProviderEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const name = process.env[brokenChatModelNameEnv]?.trim() || defaultBrokenChatModelName
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const type = process.env[brokenChatModelTypeEnv]?.trim() || defaultStableChatModelType
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
name: process.env.E2E_STABLE_MODEL_NAME?.trim() || 'gpt-5-nano',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
provider: process.env.E2E_STABLE_MODEL_PROVIDER?.trim() || 'openai',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
type: process.env.E2E_STABLE_MODEL_TYPE?.trim() || 'llm',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
name: process.env.E2E_AGENT_DECISION_MODEL_NAME?.trim() || 'gpt-5.5',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
provider: process.env.E2E_AGENT_DECISION_MODEL_PROVIDER?.trim() || 'openai',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
type: process.env.E2E_AGENT_DECISION_MODEL_TYPE?.trim() || 'llm',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = process.env[envName]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
buffer: await readFile(filePath),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const credentialId = process.env[oauthToolCredentialIdEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const providerName = process.env[oauthToolProviderEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const toolName = process.env[oauthToolNameEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const instruction = (await readFile(getAgentBuilderTestMaterialPath('buildInstruction'), 'utf8')).trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(artifactPath, contents)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
email: process.env.E2E_ADMIN_EMAIL || '[email protected]',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
name: process.env.E2E_ADMIN_NAME || 'E2E Admin',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
password: process.env.E2E_ADMIN_PASSWORD || 'E2eAdmin12345',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const initPassword = process.env.E2E_INIT_PASSWORD || 'E2eInit12345'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
configuredBaseURL || process.env.E2E_BASE_URL || defaultBaseURL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = await readFile(authMetadataPath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(authMetadataPath, `${JSON.stringify(metadata, null, 2)}\n`, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fileContent = await readFile(filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(filePath, `${normalizedContent}${line}\n`, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fileContent = await readFile(webEnvLocalFile, 'utf8').catch(() => '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fileContent = await readFile(filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const envFilePath = process.env.E2E_ENV_FILE
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? path.resolve(process.env.E2E_ENV_FILE)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = readFileSync(envFilePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[key] ??= value
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
CUCUMBER_HEADLESS: process.env.CUCUMBER_HEADLESS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_ADMIN_EMAIL: process.env.E2E_ADMIN_EMAIL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_ADMIN_NAME: process.env.E2E_ADMIN_NAME,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_ADMIN_PASSWORD: process.env.E2E_ADMIN_PASSWORD,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_AGENT_BACKEND_PORT: process.env.E2E_AGENT_BACKEND_PORT,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_AGENT_BACKEND_URL: process.env.E2E_AGENT_BACKEND_URL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_API_URL: process.env.E2E_API_URL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_BASE_URL: process.env.E2E_BASE_URL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_BROKEN_MODEL_NAME: process.env.E2E_BROKEN_MODEL_NAME,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_BROKEN_MODEL_PROVIDER: process.env.E2E_BROKEN_MODEL_PROVIDER,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_BROKEN_MODEL_TYPE: process.env.E2E_BROKEN_MODEL_TYPE,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_CUCUMBER_TAGS: process.env.E2E_CUCUMBER_TAGS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_EXTERNAL_RUNTIME_SEED_SPECS: process.env.E2E_EXTERNAL_RUNTIME_SEED_SPECS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_EXTERNAL_RUNTIME_TAGS: process.env.E2E_EXTERNAL_RUNTIME_TAGS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_FORCE_WEB_BUILD: process.env.E2E_FORCE_WEB_BUILD,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_INIT_PASSWORD: process.env.E2E_INIT_PASSWORD,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_MARKETPLACE_API_URL: process.env.E2E_MARKETPLACE_API_URL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_MARKETPLACE_PLUGIN_IDS: process.env.E2E_MARKETPLACE_PLUGIN_IDS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_MARKETPLACE_PLUGIN_UNIQUE_IDENTIFIERS: process.env.E2E_MARKETPLACE_PLUGIN_UNIQUE_IDENTIFIERS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_MODEL_PROVIDER_CREDENTIALS_JSON: process.env.E2E_MODEL_PROVIDER_CREDENTIALS_JSON,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_OAUTH_TOOL_CREDENTIAL_ID: process.env.E2E_OAUTH_TOOL_CREDENTIAL_ID,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_OAUTH_TOOL_NAME: process.env.E2E_OAUTH_TOOL_NAME,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_OAUTH_TOOL_PROVIDER: process.env.E2E_OAUTH_TOOL_PROVIDER,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_REUSE_WEB_SERVER: process.env.E2E_REUSE_WEB_SERVER,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SLOW_MO: process.env.E2E_SLOW_MO,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SHELLCTL_AUTH_TOKEN: process.env.E2E_SHELLCTL_AUTH_TOKEN,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SHELLCTL_CONTAINER_NAME: process.env.E2E_SHELLCTL_CONTAINER_NAME,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SHELLCTL_IMAGE: process.env.E2E_SHELLCTL_IMAGE,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SHELLCTL_PORT: process.env.E2E_SHELLCTL_PORT,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SHELLCTL_URL: process.env.E2E_SHELLCTL_URL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_START_AGENT_BACKEND: process.env.E2E_START_AGENT_BACKEND,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_STABLE_MODEL_NAME: process.env.E2E_STABLE_MODEL_NAME,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_STABLE_MODEL_PROVIDER: process.env.E2E_STABLE_MODEL_PROVIDER,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_STABLE_MODEL_TYPE: process.env.E2E_STABLE_MODEL_TYPE,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.E2E_EXTERNAL_RUNTIME_SEED_SPECS?.trim() || defaultExternalRuntimeSeedSpecs,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (isTruthyEnv(process.env.E2E_START_AGENT_BACKEND))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.E2E_AGENT_BACKEND_URL || process.env.AGENT_BACKEND_BASE_URL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = await readFile(logFilePath, 'utf8').catch(() => '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const shellctlPort = process.env.E2E_SHELLCTL_PORT || '5004'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const agentBackendPort = process.env.E2E_AGENT_BACKEND_PORT || '5050'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const tags = process.env.E2E_EXTERNAL_RUNTIME_TAGS?.trim() || defaultExternalRuntimeTags
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const agentBackendPort = Number(process.env.E2E_AGENT_BACKEND_PORT || 5050)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const shellctlPort = Number(process.env.E2E_SHELLCTL_PORT || 5004)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const shellctlContainerName = process.env.E2E_SHELLCTL_CONTAINER_NAME || 'dify-agent-e2e-shellctl'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const shellctlImage = process.env.E2E_SHELLCTL_IMAGE || 'dify-agent-local-sandbox:e2e'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitApiUrl = process.env.AGENT_BACKEND_BASE_URL?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitE2EUrl = process.env.E2E_AGENT_BACKEND_URL?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.E2E_START_AGENT_BACKEND === '1' || process.env.E2E_START_AGENT_BACKEND === 'true')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const redisPassword = process.env.REDIS_PASSWORD || apiEnv.REDIS_PASSWORD || 'difyai123456'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_INNER_API_KEY
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.INNER_API_KEY_FOR_PLUGIN
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.PLUGIN_DIFY_INNER_API_KEY
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
DIFY_AGENT_INNER_API_URL: process.env.DIFY_AGENT_INNER_API_URL || `http://${apiHost}:${apiPort}`,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_SERVER_SECRET_KEY
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_STUB_API_BASE_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_PLUGIN_DAEMON_API_KEY
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.PLUGIN_DAEMON_KEY
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_PLUGIN_DAEMON_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.PLUGIN_DAEMON_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
DIFY_AGENT_REDIS_PREFIX: process.env.DIFY_AGENT_REDIS_PREFIX || 'dify-agent-e2e',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_REDIS_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_SHELLCTL_AUTH_TOKEN
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.E2E_SHELLCTL_AUTH_TOKEN
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_SHELLCTL_ENTRYPOINT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.E2E_SHELLCTL_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
hash.update(await readFile(path.join(rootDir, file)))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.E2E_FORCE_WEB_BUILD === '1') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(webBuildStampPath, `${buildStamp}\n`, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFile(webBuildStampPath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(webBuildStampPath, `${buildStamp}\n`, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (inspectResult.exitCode === 0 && process.env.E2E_FORCE_SHELLCTL_BUILD !== '1')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
...(process.env.E2E_SHELLCTL_AUTH_TOKEN
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? ['-e', `SHELLCTL_AUTH_TOKEN=${process.env.E2E_SHELLCTL_AUTH_TOKEN}`]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const state = JSON.parse(await readFile(authStatePath, 'utf8')) as StorageState
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[envName]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const url = new URL('/api/v1/plugins/download', process.env.E2E_MARKETPLACE_API_URL || defaultMarketplaceApiUrl)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(
reportPath,
`${JSON.stringify({
generated_at: new Date().toISOString(),
pack,
results,
}, null, 2)}\n`,
'utf8',
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(targetPath, contents)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const baseURL = process.env.E2E_BASE_URL || defaultBaseURL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const apiURL = process.env.E2E_API_URL || defaultApiURL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const cucumberHeadless = process.env.CUCUMBER_HEADLESS !== '0'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const cucumberSlowMo = Number(process.env.E2E_SLOW_MO || 0)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const reuseExistingWebServer = process.env.E2E_REUSE_WEB_SERVER
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? process.env.E2E_REUSE_WEB_SERVER !== '0'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
: !process.env.CI
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const rawSpec = JSON.parse(fs.readFileSync(specPath, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(entryPath, consoleContractEntryContent(segments))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(routerPath, consoleRouterContractContent(segments))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const enterpriseServerDir = process.env.DIFY_ENTERPRISE_SERVER
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? path.resolve(process.env.DIFY_ENTERPRISE_SERVER)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const openApi = yaml.load(fs.readFileSync(enterpriseOpenApiPath, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, 'dev-proxy.config.ts'), `
export default {
routes: [{ paths: '/api', target: 'https://api.example.com' }],
}
`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, '.env.proxy'), `DEV_PROXY_TEST_TARGET=http://127.0.0.1:${firstTarget.port}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, 'dev-proxy.config.ts'), `
export default {
routes: [{ paths: '/api', target: process.env.DEV_PROXY_TEST_TARGET }],
}
`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, '.env.proxy'), `DEV_PROXY_TEST_TARGET=http://127.0.0.1:${secondTarget.port}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.DEV_PROXY_TEST_PORT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.DEV_PROXY_TEST_TARGET
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, 'dev-proxy.config.ts'), `
export default {
server: { host: '127.0.0.1', port: 7777 },
routes: [{ paths: ['/api', '/files'], target: 'https://api.example.com' }],
}
`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, '.env.proxy'), [
'DEV_PROXY_TEST_PORT=7788',
'DEV_PROXY_TEST_TARGET=https://env.example.com',
].join('\n'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, 'dev-proxy.config.ts'), `
export default {
server: { port: Number(process.env.DEV_PROXY_TEST_PORT) },
routes: [{ paths: '/api', target: process.env.DEV_PROXY_TEST_TARGET }],
}
`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
new URL('https://cloud.example.com/console/api/apps?page=1'),
Data is sent to a hardcoded external endpoint; review what leaves the process.
Fix: Verify the destination and that only non-sensitive data is sent; pin and audit the dependency.
const targetUrl = new URL('https://cloud.example.com')
Data is sent to a hardcoded external endpoint; review what leaves the process.
Fix: Verify the destination and that only non-sensitive data is sent; pin and audit the dependency.
const isCI = !!process.env.CI
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await readFile(path.resolve(packageDir, collection, 'icons.json'), 'utf8'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'icons.json'), `${JSON.stringify(collection, null, 2)}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'info.json'), `${JSON.stringify(info, null, 2)}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'metadata.json'), '{}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'chars.json'), '{}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'index.mjs'), `${createIndexMjs()}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'index.js'), `${createIndexJs()}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'index.d.ts'), `${createIndexTypes()}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await readFile(path.resolve(packageDir, 'package.json'), 'utf8'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return fileTexts.get(fileName) ?? ts.sys.readFile(fileName)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const currentText = fileTexts.get(fileName) ?? await fs.readFile(fileName, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(fileName, text)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const currentText = await fs.readFile(fileName, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(fileName, nextText)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NODE_OPTIONS: process.env.NODE_OPTIONS ?? '--max-old-space-size=8192',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return JSON.parse(fs.readFileSync(filePath, 'utf-8')) as AppTranslations
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const originalAgentV2Env = process.env.NEXT_PUBLIC_ENABLE_AGENT_V2
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const originalRbacEnv = process.env.NEXT_PUBLIC_RBAC_ENABLED
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.NEXT_PUBLIC_ENABLE_AGENT_V2
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.NEXT_PUBLIC_RBAC_ENABLED
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.NEXT_PUBLIC_ENABLE_AGENT_V2
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NEXT_PUBLIC_ENABLE_AGENT_V2 = originalAgentV2Env
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.NEXT_PUBLIC_RBAC_ENABLED
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NEXT_PUBLIC_RBAC_ENABLED = originalRbacEnv
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NEXT_PUBLIC_ENABLE_AGENT_V2 = 'true'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NEXT_PUBLIC_RBAC_ENABLED = 'true'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return fs.readFileSync(filePath, 'utf-8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const res = await fetch('https://ungh.cc/repos/langgenius/dify')
Data is sent to a hardcoded external endpoint; review what leaves the process.
Fix: Verify the destination and that only non-sensitive data is sent; pin and audit the dependency.
const themeCss = readFileSync(
resolve(process.cwd(), 'app/components/workflow/note-node/note-editor/theme/theme.css'),
'utf8',
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync('public/embed.min.js', UglifyJS.minify({
'embed.js': readFileSync('public/embed.js', 'utf8'),
}).code, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
'embed.js': readFileSync('public/embed.js', 'utf8'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const IS_DEV = process.env.NODE_ENV === 'development'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const IS_PROD = process.env.NODE_ENV === 'production'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DEV_PROXY_TARGET = process.env.DEV_PROXY_TARGET || DIFY_CLOUD_TARGET
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DEV_PROXY_ENTERPRISE_TARGET = process.env.DEV_PROXY_ENTERPRISE_TARGET || DEV_PROXY_TARGET
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DEV_PROXY_PUBLIC_TARGET = process.env.DEV_PROXY_PUBLIC_TARGET || DEV_PROXY_TARGET
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DEV_PROXY_HOST = process.env.DEV_PROXY_HOST || '127.0.0.1'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DEV_PROXY_PORT = Number(process.env.DEV_PROXY_PORT || 5001)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ALLOW_EMBED: isServer ? process.env.NEXT_PUBLIC_ALLOW_EMBED : getRuntimeEnvFromBody('allowEmbed'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ALLOW_INLINE_STYLES: isServer ? process.env.NEXT_PUBLIC_ALLOW_INLINE_STYLES : getRuntimeEnvFromBody('allowInlineStyles'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ALLOW_UNSAFE_DATA_SCHEME: isServer ? process.env.NEXT_PUBLIC_ALLOW_UNSAFE_DATA_SCHEME : getRuntimeEnvFromBody('allowUnsafeDataScheme'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_AMPLITUDE_API_KEY: isServer ? process.env.NEXT_PUBLIC_AMPLITUDE_API_KEY : getRuntimeEnvFromBody('amplitudeApiKey'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_API_PREFIX: isServer ? process.env.NEXT_PUBLIC_API_PREFIX : getRuntimeEnvFromBody('apiPrefix'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_BASE_PATH: isServer ? process.env.NEXT_PUBLIC_BASE_PATH : getRuntimeEnvFromBody('basePath'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_BATCH_CONCURRENCY: isServer ? process.env.NEXT_PUBLIC_BATCH_CONCURRENCY : getRuntimeEnvFromBody('batchConcurrency'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_COOKIE_DOMAIN: isServer ? process.env.NEXT_PUBLIC_COOKIE_DOMAIN : getRuntimeEnvFromBody('cookieDomain'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_CSP_WHITELIST: isServer ? process.env.NEXT_PUBLIC_CSP_WHITELIST : getRuntimeEnvFromBody('cspWhitelist'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_DEPLOY_ENV: isServer ? process.env.NEXT_PUBLIC_DEPLOY_ENV : getRuntimeEnvFromBody('deployEnv'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_DISABLE_UPLOAD_IMAGE_AS_ICON: isServer ? process.env.NEXT_PUBLIC_DISABLE_UPLOAD_IMAGE_AS_ICON : getRuntimeEnvFromBody('disableUploadImageAsIcon'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_EDITION: isServer ? process.env.NEXT_PUBLIC_EDITION : getRuntimeEnvFromBody('edition'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_AGENT_V2: isServer ? process.env.NEXT_PUBLIC_ENABLE_AGENT_V2 : getRuntimeEnvFromBody('enableAgentV2'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_FEATURE_PREVIEW: isServer ? process.env.NEXT_PUBLIC_ENABLE_FEATURE_PREVIEW : getRuntimeEnvFromBody('enableFeaturePreview'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_MARKETPLACE: isServer ? process.env.NEXT_PUBLIC_ENABLE_MARKETPLACE : getRuntimeEnvFromBody('enableMarketplace'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_EMAIL_CODE_LOGIN: isServer ? process.env.NEXT_PUBLIC_ENABLE_EMAIL_CODE_LOGIN : getRuntimeEnvFromBody('enableEmailCodeLogin'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_EMAIL_PASSWORD_LOGIN: isServer ? process.env.NEXT_PUBLIC_ENABLE_EMAIL_PASSWORD_LOGIN : getRuntimeEnvFromBody('enableEmailPasswordLogin'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_SOCIAL_OAUTH_LOGIN: isServer ? process.env.NEXT_PUBLIC_ENABLE_SOCIAL_OAUTH_LOGIN : getRuntimeEnvFromBody('enableSocialOauthLogin'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_COLLABORATION_MODE: isServer ? process.env.NEXT_PUBLIC_ENABLE_COLLABORATION_MODE : getRuntimeEnvFromBody('enableCollaborationMode'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ALLOW_REGISTER: isServer ? process.env.NEXT_PUBLIC_ALLOW_REGISTER : getRuntimeEnvFromBody('allowRegister'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ALLOW_CREATE_WORKSPACE: isServer ? process.env.NEXT_PUBLIC_ALLOW_CREATE_WORKSPACE : getRuntimeEnvFromBody('allowCreateWorkspace'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_IS_EMAIL_SETUP: isServer ? process.env.NEXT_PUBLIC_IS_EMAIL_SETUP : getRuntimeEnvFromBody('isEmailSetup'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_CHANGE_EMAIL: isServer ? process.env.NEXT_PUBLIC_ENABLE_CHANGE_EMAIL : getRuntimeEnvFromBody('enableChangeEmail'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_CREATORS_PLATFORM_FEATURES_ENABLED: isServer ? process.env.NEXT_PUBLIC_CREATORS_PLATFORM_FEATURES_ENABLED : getRuntimeEnvFromBody('creatorsPlatformFeaturesEnabled'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_TRIAL_APP: isServer ? process.env.NEXT_PUBLIC_ENABLE_TRIAL_APP : getRuntimeEnvFromBody('enableTrialApp'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_EXPLORE_BANNER: isServer ? process.env.NEXT_PUBLIC_ENABLE_EXPLORE_BANNER : getRuntimeEnvFromBody('enableExploreBanner'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_LEARN_APP: isServer ? process.env.NEXT_PUBLIC_ENABLE_LEARN_APP : getRuntimeEnvFromBody('enableLearnApp'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_RBAC_ENABLED: isServer ? process.env.NEXT_PUBLIC_RBAC_ENABLED : getRuntimeEnvFromBody('rbacEnabled'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX: isServer ? process.env.NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX : getRuntimeEnvFromBody('enableSingleDollarLatex'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL: isServer ? process.env.NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL : getRuntimeEnvFromBody('enableWebsiteFirecrawl'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER: isServer ? process.env.NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER : getRuntimeEnvFromBody('enableWebsiteJinareader'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL: isServer ? process.env.NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL : getRuntimeEnvFromBody('enableWebsiteWatercrawl'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: isServer ? process.env.NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH : getRuntimeEnvFromBody('indexingMaxSegmentationTokensLength'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_IS_MARKETPLACE: isServer ? process.env.NEXT_PUBLIC_IS_MARKETPLACE : getRuntimeEnvFromBody('isMarketplace'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_LOOP_NODE_MAX_COUNT: isServer ? process.env.NEXT_PUBLIC_LOOP_NODE_MAX_COUNT : getRuntimeEnvFromBody('loopNodeMaxCount'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MAINTENANCE_NOTICE: isServer ? process.env.NEXT_PUBLIC_MAINTENANCE_NOTICE : getRuntimeEnvFromBody('maintenanceNotice'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MARKETPLACE_API_PREFIX: isServer ? process.env.NEXT_PUBLIC_MARKETPLACE_API_PREFIX : getRuntimeEnvFromBody('marketplaceApiPrefix'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MARKETPLACE_URL_PREFIX: isServer ? process.env.NEXT_PUBLIC_MARKETPLACE_URL_PREFIX : getRuntimeEnvFromBody('marketplaceUrlPrefix'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MAX_ITERATIONS_NUM: isServer ? process.env.NEXT_PUBLIC_MAX_ITERATIONS_NUM : getRuntimeEnvFromBody('maxIterationsNum'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MAX_PARALLEL_LIMIT: isServer ? process.env.NEXT_PUBLIC_MAX_PARALLEL_LIMIT : getRuntimeEnvFromBody('maxParallelLimit'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MAX_TOOLS_NUM: isServer ? process.env.NEXT_PUBLIC_MAX_TOOLS_NUM : getRuntimeEnvFromBody('maxToolsNum'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MAX_TREE_DEPTH: isServer ? process.env.NEXT_PUBLIC_MAX_TREE_DEPTH : getRuntimeEnvFromBody('maxTreeDepth'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_PUBLIC_API_PREFIX: isServer ? process.env.NEXT_PUBLIC_PUBLIC_API_PREFIX : getRuntimeEnvFromBody('publicApiPrefix'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_SENTRY_DSN: isServer ? process.env.NEXT_PUBLIC_SENTRY_DSN : getRuntimeEnvFromBody('sentryDsn'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_SITE_ABOUT: isServer ? process.env.NEXT_PUBLIC_SITE_ABOUT : getRuntimeEnvFromBody('siteAbout'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_SOCKET_URL: isServer ? process.env.NEXT_PUBLIC_SOCKET_URL : getRuntimeEnvFromBody('socketUrl'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_SUPPORT_EMAIL_ADDRESS: isServer ? process.env.NEXT_PUBLIC_SUPPORT_EMAIL_ADDRESS : getRuntimeEnvFromBody('supportEmailAddress'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_SUPPORT_MAIL_LOGIN: isServer ? process.env.NEXT_PUBLIC_SUPPORT_MAIL_LOGIN : getRuntimeEnvFromBody('supportMailLogin'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS: isServer ? process.env.NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS : getRuntimeEnvFromBody('textGenerationTimeoutMs'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_TOP_K_MAX_VALUE: isServer ? process.env.NEXT_PUBLIC_TOP_K_MAX_VALUE : getRuntimeEnvFromBody('topKMaxValue'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_UPLOAD_IMAGE_AS_ICON: isServer ? process.env.NEXT_PUBLIC_UPLOAD_IMAGE_AS_ICON : getRuntimeEnvFromBody('uploadImageAsIcon'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_WEB_PREFIX: isServer ? process.env.NEXT_PUBLIC_WEB_PREFIX : getRuntimeEnvFromBody('webPrefix'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_FIELD_ID_EMAIL: isServer ? process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_EMAIL : getRuntimeEnvFromBody('zendeskFieldIdEmail'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_FIELD_ID_ENVIRONMENT: isServer ? process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_ENVIRONMENT : getRuntimeEnvFromBody('zendeskFieldIdEnvironment'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_FIELD_ID_PLAN: isServer ? process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_PLAN : getRuntimeEnvFromBody('zendeskFieldIdPlan'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_FIELD_ID_VERSION: isServer ? process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_VERSION : getRuntimeEnvFromBody('zendeskFieldIdVersion'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_FIELD_ID_WORKSPACE_ID: isServer ? process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_WORKSPACE_ID : getRuntimeEnvFromBody('zendeskFieldIdWorkspaceId'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_WIDGET_KEY: isServer ? process.env.NEXT_PUBLIC_ZENDESK_WIDGET_KEY : getRuntimeEnvFromBody('zendeskWidgetKey'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const isDev = process.env.NODE_ENV === 'development'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const allowedDevOrigins = process.env.NEXT_ALLOWED_DEV_ORIGINS?.split(',')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const englishText = fs.readFileSync(englishFilePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
englishJson = JSON.parse(fs.readFileSync(englishFilePath, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = fs.readFileSync(runtimeFile, 'utf-8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
content: fs.readFileSync(file, 'utf-8'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const isWhiteListEnabled = !!env.NEXT_PUBLIC_CSP_WHITELIST && process.env.NODE_ENV === 'production'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
//# sourceURL=${i}`,(l?self.eval(l.createScript("",o)):new Function(o)).call(self),s()}).then(void 0,n);return}try{l&&(i=l.createScriptURL(i)),importScripts(i),s()}catch(o){n(o)}}}}class r{constructor(e){this._env=e,this._didInitialize=!1,this._didPatchNodeRequire=!1}_init(e){this._didInitialize||(this._didInitialize=!0,this._fs=e("fs"),this._vm=e("vm"),this._path=e("path"),this._crypto=e("crypto"))}_initNodeRequire(e,i){const{nodeCachedData:s}=i.getConfig().getOptionsLiteral();if(!s||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;const n=this,l=e("module");function d(o){const _=o.constructor;let f=function(v){try{return o.require(v)}finally{}};return f.resolve=function(v,E){return _._resolveFilename(v,o,!1,E)},f.resolve.paths=function(v){return _._resolveLookupPaths(v,o)},f.main=process.mainModule,f.extensions=_._extensions,f.cache=_._cache,f}l.prototype._compile=function(o,_){const f=l.wrap(o.replace(/^#!.*/,"")),g=i.getRecorder(),v=n._getCachedDataPath(s,_),E={filename:_};let I;try{const D=n._fs.readFileSync(v);I=D.slice(0,16),E.cachedData=D.slice(16),g.record(60,v)}catch{g.record(61,v)}const C=new n._vm.Script(f,E),P=C.runInThisContext(E),w=n._path.dirname(_),R=d(this),U=[this.exports,R,this,_,w,process,_commonjsGlobal,Buffer],b=P.apply(this.exports,U);return n._handleCachedData(C,f,v,!E.cachedData,i),n._verifyCachedData(C,f,v,I,i),b}}load(e,i,s,n){const l=e.getConfig().getOptionsLiteral(),d=c(e.getRecorder(),l.nodeRequire||u.global.nodeRequire),o=l.nodeInstrumenter||function(f){return f};this._init(d),this._initNodeRequire(d,e);let _=e.getRecorder();if(/^node\|/.test(i)){let f=i.split("|"),g=null;try{g=d(f[1])}catch(v){n(v);return}e.enqueueDefineAnonymousModule([],()=>g),s()}else{i=u.Utilities.fileUriToFilePath(this._env.isWindows,i);const f=this._path.normalize(i),g=this._getElectronRendererScriptPathOrUri(f),v=!!l.nodeCachedData,E=v?this._getCachedDataPath(l.nodeCachedData,i):void 0;this._readSourceAndCachedData(f,E,_,(I,C,P,w)=>{if(I){n(I);return}let R;C.charCodeAt(0)===r._BOM?R=r._PREFIX+C.substring(1)+r._SUFFIX:R=r._PREFIX+C+r._SUFFIX,R=o(R,f);const U={filename:g,cachedData:P},b=this._createAndEvalScript(e,R,U,s,n);this._handleCachedData(b,R,E,v&&!P,e),this._verifyCachedData(b,R,E,w,e)})}}_createAndEvalScript(e,i,s,n,l){const d=e.getRecorder();d.record(31,s.filename);const o=new this._vm.Script(i,s),_=o.runInThisContext(s),f=e.getGlobalAMDDefineFunc();let g=!1;const v=function(){return g=!0,f.apply(null,arguments)};return v.amd=f.amd,_.call(u.global,e.getGlobalAMDRequireFunc(),v,s.filename,this._path.dirname(s.filename)),d.record(32,s.filename),g?n():l(new Error(`Didn't receive define call in ${s.filename}!`)),o}_getElectronRendererScriptPathOrUri(e){if(!this._env.isElectronRenderer)return e;let i=e.match(/^([a-z])\:(.*)/i);return i?`file:///${(i[1].toUpperCase()+":"+i[2]).replace(/\\/g,"/")}`:`file://${e}`}_getCachedDataPath(e,i){const s=this._crypto.createHash("md5").update(i,"utf8").update(e.seed,"utf8").update(process.arch,"").digest("hex"),n=this._path.basename(i).replace(/\.js$/,"");return this._path.join(e.path,`${n}-${s}.code`)}_handleCachedData(e,i,s,n,l){e.cachedDataRejected?this._fs.unlink(s,d=>{l.getRecorder().record(62,s),this._createAndWriteCachedData(e,i,s,l),d&&l.getConfig().onError(d)}):n&&this._createAndWriteCachedData(e,i,s,l)}_createAndWriteCachedData(e,i,s,n){let l=Math.ceil(n.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),d=-1,o=0,_;const f=()=>{setTimeout(()=>{_||(_=this._crypto.createHash("md5").update(i,"utf8").digest());const g=e.createCachedData();if(!(g.length===0||g.length===d||o>=5)){if(g.length<d){f();return}d=g.length,this._fs.writeFile(s,Buffer.concat([_,g]),v=>{v&&n.getConfig().onError(v),n.getRecorder().record(63,s),f()})}},l*Math.pow(4,o++))};f()}_readSourceAndCachedData(e,i,s,n){if(!i)this._fs.readFile(e,{encoding:"utf8"},n);else{let l,d,o,_=2;const f=g=>{g?n(g):--_===0&&n(void 0,l,d,o)};this._fs.readFile(e,{encoding:"utf8"},(g,v)=>{l=v,f(g)}),this._fs.readFile(i,(g,v)=>{!g&&v&&v.length>0?(o=v.slice(0,16),d=v.slice(16),s.record(60,i)):s.record(61,i),f()})}}_verifyCachedData(e,i,s,n,l){n&&(e.cachedDataRejected||setTimeout(()=>{const d=this._crypto.createHash("md5").update(i,"utf8").digest();n.equals(d)||(l.getConfig().onError(new Error(`FAILED TO VERIFY CACHED DATA, deleting stale '${s}' now, but a RESTART IS REQUIRED`)),this._fs.unlink(s,o=>{o&&l.getConfig().onError(o)}))},Math.ceil(5e3*(1+Math.random()))))}}r._BOM=65279,r._PREFIX="(function (require, define, __filename, __dirname) { ",r._SUFFIX=`
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(
path.join(webRoot, relativePath),
`${JSON.stringify(value, null, 2)}\n`,
'utf8',
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path.join(webRoot, relativePath), content, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const currentContent = JSON.parse(fs.readFileSync(jsonPath, 'utf-8')) as Record<string, TranslationValue>
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(reportPath, JSON.stringify({
summary: {
totalFiles: files.length,
missingKeys: totalMissing,
changedValues: totalChanged,
newKeys: totalNew,
},
namespaceCheck: {
mainNamespaces: nsCheck.mainNamespaces,
currentJsonFiles: nsCheck.currentJsonFiles,
missingJsonFiles: nsCheck.missingJsonFiles,
unexpectedTsFiles: nsCheck.unexpectedTsFiles,
},
details: allResults,
}, null, 2))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = fs.readFileSync(filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = fs.readFileSync(filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(filePath, newContent)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const port = process.env.pnpm_config_port || process.env.PORT || '3000'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const host = process.env.pnpm_config_host || process.env.HOSTNAME || '0.0.0.0'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DOCS_JSON_URL = process.env.DOCS_JSON_URL || DEFAULT_DOCS_JSON_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const OPENAPI_BASE_URL = (process.env.DOCS_OPENAPI_BASE_URL || new URL('.', DOCS_JSON_URL).toString()).replace(/\/?$/, '/')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(OUTPUT_PATH, tsContent, 'utf-8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const svgString = await fileHandle.readFile({ encoding: 'utf8' })
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(currentPath, `${fileName}.json`), `${JSON.stringify(svgData, '', '\t')}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(currentPath, `${fileName}.tsx`), `${componentRender({ svgName: fileName })}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(currentPath, `${fileName}.module.css`), `${componentCSSRender({ assetPath: path.posix.join('~@/app/components/base/icons/assets', ...relativeSegments, entry) })}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(currentPath, `${fileName}.tsx`), `${componentRender({ fileName })}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const sourceText = fs.readFileSync(filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = JSON.parse(fs.readFileSync(path.join(localeDir, file), 'utf8')) as Record<string, unknown>
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = JSON.parse(fs.readFileSync(filePath, 'utf8')) as Record<string, unknown>
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(filePath, `${JSON.stringify(content, null, 2)}\n`, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const isCI = !!process.env.CI
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const isStorybook = process.env.STORYBOOK === 'true'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): web
npm first-party const newComment = await consoleClient.apps.byAppId.workflow.comments.post({
params: { app_id: appId },
body: {
position_x: flowPosition.x,
position_y: flowPosition.y,
content,
mentioned_user_ids: mentionedUserIds,
},
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const response = await fetch(url)
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const response = await fetch(DOCS_JSON_URL)
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
mutationFn: (payload: UpdateAppUserAccessSettingsRequest) => appRbacClient.users.byTargetAccountId.accessPolicies.put({
params: {
app_id: appId,
target_account_id: payload.accountId,
},
body: {
access_policy_ids: payload.accessPolicyIds,
},
}),
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
mutationFn: (payload: UpdateDatasetUserAccessSettingsRequest) => datasetRbacClient.users.byTargetAccountId.accessPolicies.put({
params: {
dataset_id: datasetId,
target_account_id: payload.accountId,
},
body: {
access_policy_ids: payload.accessPolicyIds,
},
}),
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
trackEvent('app_published_time', { action_mode: 'app', app_id: appDetail?.id, app_name: appDetail?.name })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('preview_template', {
template_id: app.app_id,
template_name: appBasicInfo.name,
template_mode: appBasicInfo.mode,
template_categories: app.categories,
page: 'studio',
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('in_site_message_show', {
notification_id: notificationId,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('in_site_message_action', {
notification_id: notificationId,
action: item.action_name,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import * as amplitude from '@amplitude/analytics-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { sessionReplayPlugin } from '@amplitude/plugin-session-replay-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import * as amplitude from '@amplitude/analytics-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { sessionReplayPlugin } from '@amplitude/plugin-session-replay-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import * as amplitude from '@amplitude/analytics-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { sessionReplayPlugin } from '@amplitude/plugin-session-replay-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.init(AMPLITUDE_API_KEY, {
defaultTracking: {
sessions: true,
pageViews: true,
formInteractions: true,
fileDownloads: true,
attribution: true,
},
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.add(createPageNameEnrichmentPlugin())
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.add(sessionReplayPlugin({
sampleRate: sessionReplaySampleRate,
}))
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import * as amplitude from '@amplitude/analytics-browser'
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
return amplitude.track(eventName, eventProperties)
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
return amplitude.flush()
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.setUserId(userId)
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.identify(identifyEvent)
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.reset()
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('create_datasets_from_scratch', {
dataset_id: id,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('create_datasets_with_pipeline', {
template_name: pipeline.name,
template_id: pipeline.id,
template_type: type,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('create_empty_datasets', {
name: inputValue,
dataset_id: dataset.id,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('create_datasets', {
data_source_type: dataSourceType,
indexing_technique: indexType,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('dataset_document_added', {
data_source_type: datasourceType,
indexing_technique: 'pipeline',
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('create_external_knowledge_base', {
provider: formValue.provider,
name: formValue.name,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('preview_template', {
template_id: app.app_id,
template_name: appBasicInfo.name,
template_mode: appBasicInfo.mode,
template_categories: app.categories,
page: 'explore',
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('explore_banner_click', {
banner_id: banner.id,
title: banner.content.title,
sort,
link: banner.link,
page: 'explore',
language,
account_id: accountId,
event_time: Date.now(),
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('explore_banner_impression', {
banner_id: currentBanner.id,
title: currentBanner.content.title,
sort: selectedIndex + 1,
link: currentBanner.link,
page: 'explore',
language,
account_id: accountId,
event_time: Date.now(),
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('preview_template', {
template_id: item.app_id,
template_name: appBasicInfo.name,
template_mode: appBasicInfo.mode,
template_categories: item.categories,
page: 'explore',
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('plugin_uninstalled', { plugin_id, plugin_name: name })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('pipeline_start_action_time', { action_type: 'document_processing' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_published_time', { action_mode: 'pipeline', app_id: datasetId, app_name: params?.title || '' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('workflow_run_failed', {
workflow_id: flowId,
reason,
node_type: nodeType,
data: {
workflow_status: getWorkflowStatus(workflowData),
workflow_tracing_count: getWorkflowTracingCount(workflowData),
...workflowDataTrackingProperties,
},
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('tool_selected', {
tool_name: payload.name,
plugin_id: provider.plugin_id,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_start_action_time', { action_type: 'user_input' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_start_action_time', { action_type: 'schedule' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_start_action_time', { action_type: 'webhook' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_start_action_time', { action_type: 'plugin' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('app_start_action_time', { action_type: 'all' })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('workflow_run_failed', { workflow_id: flowId, node_id: id, reason: res.error, node_type: data?.type })
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('user_login_success', {
method: 'email_code',
is_invite: !!invite_token,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
trackEvent('user_login_success', {
method: 'email_password',
is_invite: isInvite,
})
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
setUserId(userProfile.email)
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
setUserProperties(properties)
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
expand_more 112 low-confidence finding(s)
return JSON.parse(fs.readFileSync(filePath, 'utf-8')) as AppTranslations
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const originalAgentV2Env = process.env.NEXT_PUBLIC_ENABLE_AGENT_V2
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const originalRbacEnv = process.env.NEXT_PUBLIC_RBAC_ENABLED
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.NEXT_PUBLIC_ENABLE_AGENT_V2
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.NEXT_PUBLIC_RBAC_ENABLED
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.NEXT_PUBLIC_ENABLE_AGENT_V2
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NEXT_PUBLIC_ENABLE_AGENT_V2 = originalAgentV2Env
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.NEXT_PUBLIC_RBAC_ENABLED
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NEXT_PUBLIC_RBAC_ENABLED = originalRbacEnv
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NEXT_PUBLIC_ENABLE_AGENT_V2 = 'true'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NEXT_PUBLIC_RBAC_ENABLED = 'true'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return fs.readFileSync(filePath, 'utf-8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const res = await fetch('https://ungh.cc/repos/langgenius/dify')
Data is sent to a hardcoded external endpoint; review what leaves the process.
Fix: Verify the destination and that only non-sensitive data is sent; pin and audit the dependency.
const themeCss = readFileSync(
resolve(process.cwd(), 'app/components/workflow/note-node/note-editor/theme/theme.css'),
'utf8',
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync('public/embed.min.js', UglifyJS.minify({
'embed.js': readFileSync('public/embed.js', 'utf8'),
}).code, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
'embed.js': readFileSync('public/embed.js', 'utf8'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const IS_DEV = process.env.NODE_ENV === 'development'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const IS_PROD = process.env.NODE_ENV === 'production'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DEV_PROXY_TARGET = process.env.DEV_PROXY_TARGET || DIFY_CLOUD_TARGET
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DEV_PROXY_ENTERPRISE_TARGET = process.env.DEV_PROXY_ENTERPRISE_TARGET || DEV_PROXY_TARGET
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DEV_PROXY_PUBLIC_TARGET = process.env.DEV_PROXY_PUBLIC_TARGET || DEV_PROXY_TARGET
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DEV_PROXY_HOST = process.env.DEV_PROXY_HOST || '127.0.0.1'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DEV_PROXY_PORT = Number(process.env.DEV_PROXY_PORT || 5001)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ALLOW_EMBED: isServer ? process.env.NEXT_PUBLIC_ALLOW_EMBED : getRuntimeEnvFromBody('allowEmbed'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ALLOW_INLINE_STYLES: isServer ? process.env.NEXT_PUBLIC_ALLOW_INLINE_STYLES : getRuntimeEnvFromBody('allowInlineStyles'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ALLOW_UNSAFE_DATA_SCHEME: isServer ? process.env.NEXT_PUBLIC_ALLOW_UNSAFE_DATA_SCHEME : getRuntimeEnvFromBody('allowUnsafeDataScheme'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_AMPLITUDE_API_KEY: isServer ? process.env.NEXT_PUBLIC_AMPLITUDE_API_KEY : getRuntimeEnvFromBody('amplitudeApiKey'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_API_PREFIX: isServer ? process.env.NEXT_PUBLIC_API_PREFIX : getRuntimeEnvFromBody('apiPrefix'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_BASE_PATH: isServer ? process.env.NEXT_PUBLIC_BASE_PATH : getRuntimeEnvFromBody('basePath'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_BATCH_CONCURRENCY: isServer ? process.env.NEXT_PUBLIC_BATCH_CONCURRENCY : getRuntimeEnvFromBody('batchConcurrency'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_COOKIE_DOMAIN: isServer ? process.env.NEXT_PUBLIC_COOKIE_DOMAIN : getRuntimeEnvFromBody('cookieDomain'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_CSP_WHITELIST: isServer ? process.env.NEXT_PUBLIC_CSP_WHITELIST : getRuntimeEnvFromBody('cspWhitelist'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_DEPLOY_ENV: isServer ? process.env.NEXT_PUBLIC_DEPLOY_ENV : getRuntimeEnvFromBody('deployEnv'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_DISABLE_UPLOAD_IMAGE_AS_ICON: isServer ? process.env.NEXT_PUBLIC_DISABLE_UPLOAD_IMAGE_AS_ICON : getRuntimeEnvFromBody('disableUploadImageAsIcon'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_EDITION: isServer ? process.env.NEXT_PUBLIC_EDITION : getRuntimeEnvFromBody('edition'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_AGENT_V2: isServer ? process.env.NEXT_PUBLIC_ENABLE_AGENT_V2 : getRuntimeEnvFromBody('enableAgentV2'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_FEATURE_PREVIEW: isServer ? process.env.NEXT_PUBLIC_ENABLE_FEATURE_PREVIEW : getRuntimeEnvFromBody('enableFeaturePreview'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_MARKETPLACE: isServer ? process.env.NEXT_PUBLIC_ENABLE_MARKETPLACE : getRuntimeEnvFromBody('enableMarketplace'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_EMAIL_CODE_LOGIN: isServer ? process.env.NEXT_PUBLIC_ENABLE_EMAIL_CODE_LOGIN : getRuntimeEnvFromBody('enableEmailCodeLogin'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_EMAIL_PASSWORD_LOGIN: isServer ? process.env.NEXT_PUBLIC_ENABLE_EMAIL_PASSWORD_LOGIN : getRuntimeEnvFromBody('enableEmailPasswordLogin'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_SOCIAL_OAUTH_LOGIN: isServer ? process.env.NEXT_PUBLIC_ENABLE_SOCIAL_OAUTH_LOGIN : getRuntimeEnvFromBody('enableSocialOauthLogin'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_COLLABORATION_MODE: isServer ? process.env.NEXT_PUBLIC_ENABLE_COLLABORATION_MODE : getRuntimeEnvFromBody('enableCollaborationMode'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ALLOW_REGISTER: isServer ? process.env.NEXT_PUBLIC_ALLOW_REGISTER : getRuntimeEnvFromBody('allowRegister'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ALLOW_CREATE_WORKSPACE: isServer ? process.env.NEXT_PUBLIC_ALLOW_CREATE_WORKSPACE : getRuntimeEnvFromBody('allowCreateWorkspace'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_IS_EMAIL_SETUP: isServer ? process.env.NEXT_PUBLIC_IS_EMAIL_SETUP : getRuntimeEnvFromBody('isEmailSetup'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_CHANGE_EMAIL: isServer ? process.env.NEXT_PUBLIC_ENABLE_CHANGE_EMAIL : getRuntimeEnvFromBody('enableChangeEmail'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_CREATORS_PLATFORM_FEATURES_ENABLED: isServer ? process.env.NEXT_PUBLIC_CREATORS_PLATFORM_FEATURES_ENABLED : getRuntimeEnvFromBody('creatorsPlatformFeaturesEnabled'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_TRIAL_APP: isServer ? process.env.NEXT_PUBLIC_ENABLE_TRIAL_APP : getRuntimeEnvFromBody('enableTrialApp'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_EXPLORE_BANNER: isServer ? process.env.NEXT_PUBLIC_ENABLE_EXPLORE_BANNER : getRuntimeEnvFromBody('enableExploreBanner'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_LEARN_APP: isServer ? process.env.NEXT_PUBLIC_ENABLE_LEARN_APP : getRuntimeEnvFromBody('enableLearnApp'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_RBAC_ENABLED: isServer ? process.env.NEXT_PUBLIC_RBAC_ENABLED : getRuntimeEnvFromBody('rbacEnabled'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX: isServer ? process.env.NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX : getRuntimeEnvFromBody('enableSingleDollarLatex'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL: isServer ? process.env.NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL : getRuntimeEnvFromBody('enableWebsiteFirecrawl'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER: isServer ? process.env.NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER : getRuntimeEnvFromBody('enableWebsiteJinareader'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL: isServer ? process.env.NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL : getRuntimeEnvFromBody('enableWebsiteWatercrawl'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: isServer ? process.env.NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH : getRuntimeEnvFromBody('indexingMaxSegmentationTokensLength'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_IS_MARKETPLACE: isServer ? process.env.NEXT_PUBLIC_IS_MARKETPLACE : getRuntimeEnvFromBody('isMarketplace'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_LOOP_NODE_MAX_COUNT: isServer ? process.env.NEXT_PUBLIC_LOOP_NODE_MAX_COUNT : getRuntimeEnvFromBody('loopNodeMaxCount'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MAINTENANCE_NOTICE: isServer ? process.env.NEXT_PUBLIC_MAINTENANCE_NOTICE : getRuntimeEnvFromBody('maintenanceNotice'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MARKETPLACE_API_PREFIX: isServer ? process.env.NEXT_PUBLIC_MARKETPLACE_API_PREFIX : getRuntimeEnvFromBody('marketplaceApiPrefix'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MARKETPLACE_URL_PREFIX: isServer ? process.env.NEXT_PUBLIC_MARKETPLACE_URL_PREFIX : getRuntimeEnvFromBody('marketplaceUrlPrefix'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MAX_ITERATIONS_NUM: isServer ? process.env.NEXT_PUBLIC_MAX_ITERATIONS_NUM : getRuntimeEnvFromBody('maxIterationsNum'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MAX_PARALLEL_LIMIT: isServer ? process.env.NEXT_PUBLIC_MAX_PARALLEL_LIMIT : getRuntimeEnvFromBody('maxParallelLimit'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MAX_TOOLS_NUM: isServer ? process.env.NEXT_PUBLIC_MAX_TOOLS_NUM : getRuntimeEnvFromBody('maxToolsNum'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_MAX_TREE_DEPTH: isServer ? process.env.NEXT_PUBLIC_MAX_TREE_DEPTH : getRuntimeEnvFromBody('maxTreeDepth'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_PUBLIC_API_PREFIX: isServer ? process.env.NEXT_PUBLIC_PUBLIC_API_PREFIX : getRuntimeEnvFromBody('publicApiPrefix'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_SENTRY_DSN: isServer ? process.env.NEXT_PUBLIC_SENTRY_DSN : getRuntimeEnvFromBody('sentryDsn'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_SITE_ABOUT: isServer ? process.env.NEXT_PUBLIC_SITE_ABOUT : getRuntimeEnvFromBody('siteAbout'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_SOCKET_URL: isServer ? process.env.NEXT_PUBLIC_SOCKET_URL : getRuntimeEnvFromBody('socketUrl'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_SUPPORT_EMAIL_ADDRESS: isServer ? process.env.NEXT_PUBLIC_SUPPORT_EMAIL_ADDRESS : getRuntimeEnvFromBody('supportEmailAddress'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_SUPPORT_MAIL_LOGIN: isServer ? process.env.NEXT_PUBLIC_SUPPORT_MAIL_LOGIN : getRuntimeEnvFromBody('supportMailLogin'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS: isServer ? process.env.NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS : getRuntimeEnvFromBody('textGenerationTimeoutMs'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_TOP_K_MAX_VALUE: isServer ? process.env.NEXT_PUBLIC_TOP_K_MAX_VALUE : getRuntimeEnvFromBody('topKMaxValue'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_UPLOAD_IMAGE_AS_ICON: isServer ? process.env.NEXT_PUBLIC_UPLOAD_IMAGE_AS_ICON : getRuntimeEnvFromBody('uploadImageAsIcon'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_WEB_PREFIX: isServer ? process.env.NEXT_PUBLIC_WEB_PREFIX : getRuntimeEnvFromBody('webPrefix'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_FIELD_ID_EMAIL: isServer ? process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_EMAIL : getRuntimeEnvFromBody('zendeskFieldIdEmail'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_FIELD_ID_ENVIRONMENT: isServer ? process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_ENVIRONMENT : getRuntimeEnvFromBody('zendeskFieldIdEnvironment'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_FIELD_ID_PLAN: isServer ? process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_PLAN : getRuntimeEnvFromBody('zendeskFieldIdPlan'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_FIELD_ID_VERSION: isServer ? process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_VERSION : getRuntimeEnvFromBody('zendeskFieldIdVersion'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_FIELD_ID_WORKSPACE_ID: isServer ? process.env.NEXT_PUBLIC_ZENDESK_FIELD_ID_WORKSPACE_ID : getRuntimeEnvFromBody('zendeskFieldIdWorkspaceId'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NEXT_PUBLIC_ZENDESK_WIDGET_KEY: isServer ? process.env.NEXT_PUBLIC_ZENDESK_WIDGET_KEY : getRuntimeEnvFromBody('zendeskWidgetKey'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const isDev = process.env.NODE_ENV === 'development'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const allowedDevOrigins = process.env.NEXT_ALLOWED_DEV_ORIGINS?.split(',')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const englishText = fs.readFileSync(englishFilePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
englishJson = JSON.parse(fs.readFileSync(englishFilePath, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = fs.readFileSync(runtimeFile, 'utf-8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
content: fs.readFileSync(file, 'utf-8'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const isWhiteListEnabled = !!env.NEXT_PUBLIC_CSP_WHITELIST && process.env.NODE_ENV === 'production'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
//# sourceURL=${i}`,(l?self.eval(l.createScript("",o)):new Function(o)).call(self),s()}).then(void 0,n);return}try{l&&(i=l.createScriptURL(i)),importScripts(i),s()}catch(o){n(o)}}}}class r{constructor(e){this._env=e,this._didInitialize=!1,this._didPatchNodeRequire=!1}_init(e){this._didInitialize||(this._didInitialize=!0,this._fs=e("fs"),this._vm=e("vm"),this._path=e("path"),this._crypto=e("crypto"))}_initNodeRequire(e,i){const{nodeCachedData:s}=i.getConfig().getOptionsLiteral();if(!s||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;const n=this,l=e("module");function d(o){const _=o.constructor;let f=function(v){try{return o.require(v)}finally{}};return f.resolve=function(v,E){return _._resolveFilename(v,o,!1,E)},f.resolve.paths=function(v){return _._resolveLookupPaths(v,o)},f.main=process.mainModule,f.extensions=_._extensions,f.cache=_._cache,f}l.prototype._compile=function(o,_){const f=l.wrap(o.replace(/^#!.*/,"")),g=i.getRecorder(),v=n._getCachedDataPath(s,_),E={filename:_};let I;try{const D=n._fs.readFileSync(v);I=D.slice(0,16),E.cachedData=D.slice(16),g.record(60,v)}catch{g.record(61,v)}const C=new n._vm.Script(f,E),P=C.runInThisContext(E),w=n._path.dirname(_),R=d(this),U=[this.exports,R,this,_,w,process,_commonjsGlobal,Buffer],b=P.apply(this.exports,U);return n._handleCachedData(C,f,v,!E.cachedData,i),n._verifyCachedData(C,f,v,I,i),b}}load(e,i,s,n){const l=e.getConfig().getOptionsLiteral(),d=c(e.getRecorder(),l.nodeRequire||u.global.nodeRequire),o=l.nodeInstrumenter||function(f){return f};this._init(d),this._initNodeRequire(d,e);let _=e.getRecorder();if(/^node\|/.test(i)){let f=i.split("|"),g=null;try{g=d(f[1])}catch(v){n(v);return}e.enqueueDefineAnonymousModule([],()=>g),s()}else{i=u.Utilities.fileUriToFilePath(this._env.isWindows,i);const f=this._path.normalize(i),g=this._getElectronRendererScriptPathOrUri(f),v=!!l.nodeCachedData,E=v?this._getCachedDataPath(l.nodeCachedData,i):void 0;this._readSourceAndCachedData(f,E,_,(I,C,P,w)=>{if(I){n(I);return}let R;C.charCodeAt(0)===r._BOM?R=r._PREFIX+C.substring(1)+r._SUFFIX:R=r._PREFIX+C+r._SUFFIX,R=o(R,f);const U={filename:g,cachedData:P},b=this._createAndEvalScript(e,R,U,s,n);this._handleCachedData(b,R,E,v&&!P,e),this._verifyCachedData(b,R,E,w,e)})}}_createAndEvalScript(e,i,s,n,l){const d=e.getRecorder();d.record(31,s.filename);const o=new this._vm.Script(i,s),_=o.runInThisContext(s),f=e.getGlobalAMDDefineFunc();let g=!1;const v=function(){return g=!0,f.apply(null,arguments)};return v.amd=f.amd,_.call(u.global,e.getGlobalAMDRequireFunc(),v,s.filename,this._path.dirname(s.filename)),d.record(32,s.filename),g?n():l(new Error(`Didn't receive define call in ${s.filename}!`)),o}_getElectronRendererScriptPathOrUri(e){if(!this._env.isElectronRenderer)return e;let i=e.match(/^([a-z])\:(.*)/i);return i?`file:///${(i[1].toUpperCase()+":"+i[2]).replace(/\\/g,"/")}`:`file://${e}`}_getCachedDataPath(e,i){const s=this._crypto.createHash("md5").update(i,"utf8").update(e.seed,"utf8").update(process.arch,"").digest("hex"),n=this._path.basename(i).replace(/\.js$/,"");return this._path.join(e.path,`${n}-${s}.code`)}_handleCachedData(e,i,s,n,l){e.cachedDataRejected?this._fs.unlink(s,d=>{l.getRecorder().record(62,s),this._createAndWriteCachedData(e,i,s,l),d&&l.getConfig().onError(d)}):n&&this._createAndWriteCachedData(e,i,s,l)}_createAndWriteCachedData(e,i,s,n){let l=Math.ceil(n.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),d=-1,o=0,_;const f=()=>{setTimeout(()=>{_||(_=this._crypto.createHash("md5").update(i,"utf8").digest());const g=e.createCachedData();if(!(g.length===0||g.length===d||o>=5)){if(g.length<d){f();return}d=g.length,this._fs.writeFile(s,Buffer.concat([_,g]),v=>{v&&n.getConfig().onError(v),n.getRecorder().record(63,s),f()})}},l*Math.pow(4,o++))};f()}_readSourceAndCachedData(e,i,s,n){if(!i)this._fs.readFile(e,{encoding:"utf8"},n);else{let l,d,o,_=2;const f=g=>{g?n(g):--_===0&&n(void 0,l,d,o)};this._fs.readFile(e,{encoding:"utf8"},(g,v)=>{l=v,f(g)}),this._fs.readFile(i,(g,v)=>{!g&&v&&v.length>0?(o=v.slice(0,16),d=v.slice(16),s.record(60,i)):s.record(61,i),f()})}}_verifyCachedData(e,i,s,n,l){n&&(e.cachedDataRejected||setTimeout(()=>{const d=this._crypto.createHash("md5").update(i,"utf8").digest();n.equals(d)||(l.getConfig().onError(new Error(`FAILED TO VERIFY CACHED DATA, deleting stale '${s}' now, but a RESTART IS REQUIRED`)),this._fs.unlink(s,o=>{o&&l.getConfig().onError(o)}))},Math.ceil(5e3*(1+Math.random()))))}}r._BOM=65279,r._PREFIX="(function (require, define, __filename, __dirname) { ",r._SUFFIX=`
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(
path.join(webRoot, relativePath),
`${JSON.stringify(value, null, 2)}\n`,
'utf8',
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path.join(webRoot, relativePath), content, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const currentContent = JSON.parse(fs.readFileSync(jsonPath, 'utf-8')) as Record<string, TranslationValue>
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(reportPath, JSON.stringify({
summary: {
totalFiles: files.length,
missingKeys: totalMissing,
changedValues: totalChanged,
newKeys: totalNew,
},
namespaceCheck: {
mainNamespaces: nsCheck.mainNamespaces,
currentJsonFiles: nsCheck.currentJsonFiles,
missingJsonFiles: nsCheck.missingJsonFiles,
unexpectedTsFiles: nsCheck.unexpectedTsFiles,
},
details: allResults,
}, null, 2))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = fs.readFileSync(filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = fs.readFileSync(filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(filePath, newContent)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const port = process.env.pnpm_config_port || process.env.PORT || '3000'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const host = process.env.pnpm_config_host || process.env.HOSTNAME || '0.0.0.0'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const DOCS_JSON_URL = process.env.DOCS_JSON_URL || DEFAULT_DOCS_JSON_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const OPENAPI_BASE_URL = (process.env.DOCS_OPENAPI_BASE_URL || new URL('.', DOCS_JSON_URL).toString()).replace(/\/?$/, '/')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(OUTPUT_PATH, tsContent, 'utf-8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const svgString = await fileHandle.readFile({ encoding: 'utf8' })
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(currentPath, `${fileName}.json`), `${JSON.stringify(svgData, '', '\t')}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(currentPath, `${fileName}.tsx`), `${componentRender({ svgName: fileName })}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(currentPath, `${fileName}.module.css`), `${componentCSSRender({ assetPath: path.posix.join('~@/app/components/base/icons/assets', ...relativeSegments, entry) })}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(currentPath, `${fileName}.tsx`), `${componentRender({ fileName })}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const sourceText = fs.readFileSync(filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = JSON.parse(fs.readFileSync(path.join(localeDir, file), 'utf8')) as Record<string, unknown>
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = JSON.parse(fs.readFileSync(filePath, 'utf8')) as Record<string, unknown>
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(filePath, `${JSON.stringify(content, null, 2)}\n`, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const isCI = !!process.env.CI
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const isStorybook = process.env.STORYBOOK === 'true'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): cli
npm first-party const res = await fetch(`${base}/console/api/login`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email, password: passwordB64, remember_me: false }),
signal: AbortSignal.timeout(15_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const res = await fetch(`${base}/openapi/v1/account/sessions`, {
headers: { Authorization: `Bearer ${token}` },
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const codeRes = await fetch(`${base}/openapi/v1/oauth/device/code`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ client_id: 'difyctl', device_label: label }),
signal: AbortSignal.timeout(15_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
approveRes = await fetch(`${base}/openapi/v1/oauth/device/approve`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Cookie': cookieStr, 'X-CSRFToken': csrf },
body: JSON.stringify({ user_code }),
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const tokenRes = await fetch(`${base}/openapi/v1/oauth/device/token`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ device_code, client_id: 'difyctl' }),
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const res = await fetch(`${base}/console/api/workspaces`, {
headers: { 'Cookie': cookieStr, 'X-CSRF-Token': csrf },
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
await fetch(`${base}/console/api/workspaces/switch`, {
method: 'POST',
headers: { ...mkH(), 'Content-Type': 'application/json' },
body: JSON.stringify({ tenant_id: wsId }),
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const searchRes = await fetch(
`${base}/console/api/apps?name=${encodeURIComponent(appName)}&limit=50&page=1`,
{ headers: mkH(), signal: AbortSignal.timeout(10_000) },
)
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const importRes = await fetch(`${base}/console/api/apps/imports`, {
method: 'POST',
headers: { ...mkH(), 'Content-Type': 'application/json' },
body: JSON.stringify({ mode: 'yaml-content', yaml_content: dsl }),
signal: AbortSignal.timeout(30_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const confirmRes = await fetch(`${base}/console/api/apps/imports/${importData.import_id}/confirm`, {
method: 'POST',
headers: mkH(),
signal: AbortSignal.timeout(15_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
await fetch(`${base}/console/api/apps/${appId}/api-enable`, {
method: 'POST',
headers: { ...mkH(), 'Content-Type': 'application/json' },
body: JSON.stringify({ enable_api: true }),
signal: AbortSignal.timeout(10_000),
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
await fetch(`${base}/console/api/enterprise/webapp/app/access-mode`, {
method: 'POST',
headers: { ...mkH(), 'Content-Type': 'application/json' },
body: JSON.stringify({ appId, accessMode: 'public' }),
signal: AbortSignal.timeout(10_000),
}).catch(() => {})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
await fetch(`${base}/console/api/apps/${appId}/workflows/publish`, {
method: 'POST',
headers: { ...mkH(), 'Content-Type': 'application/json' },
body: JSON.stringify({ marked_name: 'e2e-provision', marked_comment: '' }),
signal: AbortSignal.timeout(20_000),
}).catch(() => {})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
await fetch(`${base}/console/api/workspaces/switch`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Cookie': cookieString, 'X-CSRF-Token': csrfToken },
body: JSON.stringify({ tenant_id: primaryWsId }),
signal: AbortSignal.timeout(10_000),
}).catch((err: unknown) => console.warn(`[provision] switch-back to primary failed (non-fatal): ${err}`))
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
expand_more 150 low-confidence finding(s)
const host = process.env.DIFY_E2E_HOST ?? ''
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const email = process.env.DIFY_E2E_EMAIL ?? ''
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const password = process.env.DIFY_E2E_PASSWORD ?? ''
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const edition = ((process.env.DIFY_E2E_EDITION ?? 'ee').toLowerCase()) as 'ee' | 'ce'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const preToken = process.env.DIFY_E2E_TOKEN ?? ''
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const dsl = await readFile(join(fixturesDir, dslFile), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const ghOutput = process.env.GITHUB_OUTPUT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commands, 'auth', 'login', 'index.ts'), 'export default class Login {}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commands, 'auth', 'devices', 'list', 'index.ts'), 'export default class DevicesList {}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commands, '_shared', 'index.ts'), 'export default class Shared {}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commands, 'version', 'index.ts'), 'export default class Version {}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commands, 'foo.ts'), 'export default class Foo {}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = readFileSync(target, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(commandsDir, 'tree.generated.ts'), '// stale\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
onDisk = await readFile(target, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(tmp, content, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(join(dir, 'curl'), FAKE_CURL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
env: { ...process.env, PATH: `${dir}:${process.env.PATH ?? ''}`, DIFYCTL_INSTALL_LIB: '1', DIFY_VERSION: '', DIFYCTL_VERSION: '', FAKE_MODE: mode, FAKE_HDR_LOG: hdrLog, ...env },
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
headers = readFileSync(hdrLog, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
LOCALAPPDATA: process.env.LOCALAPPDATA || '/tmp',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
TEMP: process.env.TEMP || '/tmp',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return JSON.parse(readFileSync(pkgPath, 'utf8')) as PackageManifest
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const pkg = JSON.parse(readFileSync(pkgUrl, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
for (const line of readFileSync(checksumsPath, 'utf8').split('\n')) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
for (const line of readFileSync(path, 'utf8').split('\n')) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = readFileSync(args.current, 'utf8').trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(file, `${lines.join('\n')}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(file, `${'0'.repeat(64)} difyctl-v${VERSION}-linux-x64\n`) // only 1 of 5
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(currentArg, currentContent)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(f, `${existingDirs.join('\n')}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const file = yaml.load(await readFile(path, 'utf8')) as { entries: Record<string, unknown> }
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(
path,
yaml.dump({ entries: {
[`${mock.url}::app-1`]: 'corrupted-string',
[`${mock.url}::sibling`]: validEntry,
} }),
'utf8',
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(filePath, 'hello')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(filePath, 'x')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(filePath, 'data')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = await readFile(filePath)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(appInfoPath(dir), ': : not valid yaml', 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const file = yaml.load(await readFile(appInfoPath(dir), 'utf8')) as { entries: Record<string, unknown> }
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(appInfoPath(dir), yaml.dump(file), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(appInfoPath(dir), yaml.dump({ entries: 'not-an-object' }), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = await readFile(appInfoPath(dir), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prev = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prev
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = await readFile(nudgeStorePath(dir), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, body)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const env = opts.envLookup ?? ((k: string) => process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const hostsRaw = await readFile(join(configDir(), 'hosts.yml'), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await expect(readFile(join(configDir(), 'hosts.yml'), 'utf8')).rejects.toThrow(/ENOENT/)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = await readFile(join(dir(), 'hosts.yml'), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const env = deps.envLookup ?? ((k: string) => process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const env = deps.envLookup ?? ((k: string) => process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(opts.output, yaml, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const env = deps.envLookup ?? ((k: string) => process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(filePath, DSL_YAML, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
yamlContent = fs.readFileSync(opts.fromFile, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const env = deps.envLookup ?? ((k: string) => process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(await readFile(claudeTarget(), 'utf8')).toBe(SKILL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(claudeTarget(), 'stale skill', 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(await readFile(claudeTarget(), 'utf8')).toBe(SKILL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(await readFile(target, 'utf8')).toBe(SKILL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(await readFile(join(home, '.pi', 'agent', 'skills', 'difyctl', 'SKILL.md'), 'utf8')).toBe(SKILL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(tmp, content, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
originals.DIFY_LIMIT = process.env.DIFY_LIMIT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
originals.DIFY_HOST = process.env.DIFY_HOST
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
originals.DIFY_TEST_NONEXISTENT = process.env.DIFY_TEST_NONEXISTENT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.DIFY_LIMIT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.DIFY_HOST
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.DIFY_TEST_NONEXISTENT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[k]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
else process.env[k] = v
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_HOST = 'https://cloud.dify.ai'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_LIMIT = '42'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_HOST = 'https://example.dify.ai'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_LIMIT = '999'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return { key: readFileSync(keyPath), cert: readFileSync(certPath) }
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
saved.set(k, process.env[k])
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[k]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[k]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[k] = v
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.HTTP_PROXY = 'http://127.0.0.1:8888'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.https_proxy = 'http://127.0.0.1:8888'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.HTTPS_PROXY = 'http://127.0.0.1:8888'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.HTTP_PROXY = 'http://127.0.0.1:8888'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return PROXY_ENV_KEYS.some(k => (process.env[k] ?? '') !== '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.DIFY_E2E_NO_KEYRING === '1')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, 'key: value\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, 'key: original\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path, s1.getRawContent() ?? '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
s2.setRawContent(readFileSync(path, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path, s1.getRawContent() ?? '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
s2.setRawContent(readFileSync(path, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path, s1.getRawContent() ?? '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
s2.setRawContent(readFileSync(path, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path, s2.getRawContent() ?? '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
s3.setRawContent(readFileSync(path, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, 'existing: value\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = readFileSync(path, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(readFileSync(path, 'utf8')).toBe('key: value\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path, 'key: value\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fsp.writeFile(tmp, this.rawContent, { mode: FILE_PERM })
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.rawContent = await fsp.readFile(this.filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = readFileSync(file, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(file, 'version: 999\ntokens:\n "h":\n "e": "x"\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(file, 'tokens:\n "h":\n "e": "dfoa_legacy"\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(file, 'tokens:\n "h":\n "existing@x": "dfoa_existing"\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
expect(readFileSync(file, 'utf8')).toContain('version: 1')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = readFileSync(file, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return process.env[name]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NO_COLOR !== undefined && process.env.NO_COLOR !== '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.DIFYCTL_NO_COLOR !== undefined && process.env.DIFYCTL_NO_COLOR !== '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
getEnv: k => process.env[k],
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
prevCacheDir = process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = dir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CACHE_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CACHE_DIR] = prevCacheDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const prevConfig = process.env[ENV_CONFIG_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CONFIG_DIR] = configDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CONFIG_DIR] = configDir
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env[ENV_CONFIG_DIR]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[ENV_CONFIG_DIR] = prevConfig
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = readFileSync(envFilePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[key] = val
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = process.env.DIFY_E2E_INCLUDE ?? process.env.DIFY_E2E_SINGLE_FILE
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
?? (process.env.DIFY_E2E_MODE === 'local'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
retry: Number(process.env.VITEST_RETRY ?? 0),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): e2e
npm first-party const uploadResponse = await ctx.post('/console/api/files/upload', {
multipart: {
file: {
buffer: await readFile(filePath),
mimeType: 'text/plain',
name: fileName,
},
},
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const commitResponse = await ctx.post(`/console/api/agent/${agentId}/config/files`, {
data: {
upload_file_id: uploadedFile.id,
},
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
const response = await ctx.post('/console/api/files/upload', {
multipart: {
file: {
buffer: await readFile(filePath),
mimeType: 'text/plain',
name: fileName,
},
},
})
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
expand_more 135 low-confidence finding(s)
const defaultTags = process.env.E2E_CUCUMBER_TAGS
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
buffer: await readFile(filePath),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
content: await readFile(filePath),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
buffer: await readFile(filePath),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const port = process.env.E2E_AGENT_BACKEND_PORT?.trim() || '5050'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitE2EURL = process.env.E2E_SHELLCTL_URL?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitAgentURL = process.env.DIFY_AGENT_SHELLCTL_ENTRYPOINT?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (isTruthyEnv(process.env.E2E_START_AGENT_BACKEND)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const port = process.env.E2E_SHELLCTL_PORT?.trim() || '5004'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitE2EURL = process.env.E2E_AGENT_BACKEND_URL?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitAPIURL = process.env.AGENT_BACKEND_BASE_URL?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (isTruthyEnv(process.env.E2E_START_AGENT_BACKEND))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const value = process.env[envName]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const provider = process.env[stableChatModelProviderEnv]?.trim() || defaultStableChatModelProvider
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const name = process.env[stableChatModelNameEnv]?.trim() || defaultStableChatModelName
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const type = process.env[stableChatModelTypeEnv]?.trim() || defaultStableChatModelType
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const provider = process.env[agentDecisionChatModelProviderEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const name = process.env[agentDecisionChatModelNameEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const type = process.env[agentDecisionChatModelTypeEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const provider = process.env[brokenChatModelProviderEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const name = process.env[brokenChatModelNameEnv]?.trim() || defaultBrokenChatModelName
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const type = process.env[brokenChatModelTypeEnv]?.trim() || defaultStableChatModelType
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
name: process.env.E2E_STABLE_MODEL_NAME?.trim() || 'gpt-5-nano',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
provider: process.env.E2E_STABLE_MODEL_PROVIDER?.trim() || 'openai',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
type: process.env.E2E_STABLE_MODEL_TYPE?.trim() || 'llm',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
name: process.env.E2E_AGENT_DECISION_MODEL_NAME?.trim() || 'gpt-5.5',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
provider: process.env.E2E_AGENT_DECISION_MODEL_PROVIDER?.trim() || 'openai',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
type: process.env.E2E_AGENT_DECISION_MODEL_TYPE?.trim() || 'llm',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const raw = process.env[envName]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
buffer: await readFile(filePath),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const credentialId = process.env[oauthToolCredentialIdEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const providerName = process.env[oauthToolProviderEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const toolName = process.env[oauthToolNameEnv]?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const instruction = (await readFile(getAgentBuilderTestMaterialPath('buildInstruction'), 'utf8')).trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(artifactPath, contents)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
email: process.env.E2E_ADMIN_EMAIL || '[email protected]',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
name: process.env.E2E_ADMIN_NAME || 'E2E Admin',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
password: process.env.E2E_ADMIN_PASSWORD || 'E2eAdmin12345',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const initPassword = process.env.E2E_INIT_PASSWORD || 'E2eInit12345'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
configuredBaseURL || process.env.E2E_BASE_URL || defaultBaseURL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = await readFile(authMetadataPath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(authMetadataPath, `${JSON.stringify(metadata, null, 2)}\n`, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fileContent = await readFile(filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(filePath, `${normalizedContent}${line}\n`, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fileContent = await readFile(webEnvLocalFile, 'utf8').catch(() => '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fileContent = await readFile(filePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const envFilePath = process.env.E2E_ENV_FILE
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? path.resolve(process.env.E2E_ENV_FILE)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = readFileSync(envFilePath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[key] ??= value
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
CUCUMBER_HEADLESS: process.env.CUCUMBER_HEADLESS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_ADMIN_EMAIL: process.env.E2E_ADMIN_EMAIL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_ADMIN_NAME: process.env.E2E_ADMIN_NAME,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_ADMIN_PASSWORD: process.env.E2E_ADMIN_PASSWORD,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_AGENT_BACKEND_PORT: process.env.E2E_AGENT_BACKEND_PORT,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_AGENT_BACKEND_URL: process.env.E2E_AGENT_BACKEND_URL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_API_URL: process.env.E2E_API_URL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_BASE_URL: process.env.E2E_BASE_URL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_BROKEN_MODEL_NAME: process.env.E2E_BROKEN_MODEL_NAME,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_BROKEN_MODEL_PROVIDER: process.env.E2E_BROKEN_MODEL_PROVIDER,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_BROKEN_MODEL_TYPE: process.env.E2E_BROKEN_MODEL_TYPE,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_CUCUMBER_TAGS: process.env.E2E_CUCUMBER_TAGS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_EXTERNAL_RUNTIME_SEED_SPECS: process.env.E2E_EXTERNAL_RUNTIME_SEED_SPECS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_EXTERNAL_RUNTIME_TAGS: process.env.E2E_EXTERNAL_RUNTIME_TAGS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_FORCE_WEB_BUILD: process.env.E2E_FORCE_WEB_BUILD,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_INIT_PASSWORD: process.env.E2E_INIT_PASSWORD,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_MARKETPLACE_API_URL: process.env.E2E_MARKETPLACE_API_URL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_MARKETPLACE_PLUGIN_IDS: process.env.E2E_MARKETPLACE_PLUGIN_IDS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_MARKETPLACE_PLUGIN_UNIQUE_IDENTIFIERS: process.env.E2E_MARKETPLACE_PLUGIN_UNIQUE_IDENTIFIERS,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_MODEL_PROVIDER_CREDENTIALS_JSON: process.env.E2E_MODEL_PROVIDER_CREDENTIALS_JSON,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_OAUTH_TOOL_CREDENTIAL_ID: process.env.E2E_OAUTH_TOOL_CREDENTIAL_ID,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_OAUTH_TOOL_NAME: process.env.E2E_OAUTH_TOOL_NAME,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_OAUTH_TOOL_PROVIDER: process.env.E2E_OAUTH_TOOL_PROVIDER,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_REUSE_WEB_SERVER: process.env.E2E_REUSE_WEB_SERVER,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SLOW_MO: process.env.E2E_SLOW_MO,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SHELLCTL_AUTH_TOKEN: process.env.E2E_SHELLCTL_AUTH_TOKEN,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SHELLCTL_CONTAINER_NAME: process.env.E2E_SHELLCTL_CONTAINER_NAME,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SHELLCTL_IMAGE: process.env.E2E_SHELLCTL_IMAGE,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SHELLCTL_PORT: process.env.E2E_SHELLCTL_PORT,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_SHELLCTL_URL: process.env.E2E_SHELLCTL_URL,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_START_AGENT_BACKEND: process.env.E2E_START_AGENT_BACKEND,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_STABLE_MODEL_NAME: process.env.E2E_STABLE_MODEL_NAME,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_STABLE_MODEL_PROVIDER: process.env.E2E_STABLE_MODEL_PROVIDER,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
E2E_STABLE_MODEL_TYPE: process.env.E2E_STABLE_MODEL_TYPE,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.E2E_EXTERNAL_RUNTIME_SEED_SPECS?.trim() || defaultExternalRuntimeSeedSpecs,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (isTruthyEnv(process.env.E2E_START_AGENT_BACKEND))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.E2E_AGENT_BACKEND_URL || process.env.AGENT_BACKEND_BASE_URL)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = await readFile(logFilePath, 'utf8').catch(() => '')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const shellctlPort = process.env.E2E_SHELLCTL_PORT || '5004'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const agentBackendPort = process.env.E2E_AGENT_BACKEND_PORT || '5050'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const tags = process.env.E2E_EXTERNAL_RUNTIME_TAGS?.trim() || defaultExternalRuntimeTags
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const agentBackendPort = Number(process.env.E2E_AGENT_BACKEND_PORT || 5050)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const shellctlPort = Number(process.env.E2E_SHELLCTL_PORT || 5004)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const shellctlContainerName = process.env.E2E_SHELLCTL_CONTAINER_NAME || 'dify-agent-e2e-shellctl'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const shellctlImage = process.env.E2E_SHELLCTL_IMAGE || 'dify-agent-local-sandbox:e2e'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitApiUrl = process.env.AGENT_BACKEND_BASE_URL?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const explicitE2EUrl = process.env.E2E_AGENT_BACKEND_URL?.trim()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.E2E_START_AGENT_BACKEND === '1' || process.env.E2E_START_AGENT_BACKEND === 'true')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const redisPassword = process.env.REDIS_PASSWORD || apiEnv.REDIS_PASSWORD || 'difyai123456'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_INNER_API_KEY
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.INNER_API_KEY_FOR_PLUGIN
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.PLUGIN_DIFY_INNER_API_KEY
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
DIFY_AGENT_INNER_API_URL: process.env.DIFY_AGENT_INNER_API_URL || `http://${apiHost}:${apiPort}`,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_SERVER_SECRET_KEY
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_STUB_API_BASE_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_PLUGIN_DAEMON_API_KEY
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.PLUGIN_DAEMON_KEY
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_PLUGIN_DAEMON_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.PLUGIN_DAEMON_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
DIFY_AGENT_REDIS_PREFIX: process.env.DIFY_AGENT_REDIS_PREFIX || 'dify-agent-e2e',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_REDIS_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_SHELLCTL_AUTH_TOKEN
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.E2E_SHELLCTL_AUTH_TOKEN
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.DIFY_AGENT_SHELLCTL_ENTRYPOINT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
|| process.env.E2E_SHELLCTL_URL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
hash.update(await readFile(path.join(rootDir, file)))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.E2E_FORCE_WEB_BUILD === '1') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(webBuildStampPath, `${buildStamp}\n`, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFile(webBuildStampPath, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(webBuildStampPath, `${buildStamp}\n`, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (inspectResult.exitCode === 0 && process.env.E2E_FORCE_SHELLCTL_BUILD !== '1')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
...(process.env.E2E_SHELLCTL_AUTH_TOKEN
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? ['-e', `SHELLCTL_AUTH_TOKEN=${process.env.E2E_SHELLCTL_AUTH_TOKEN}`]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const state = JSON.parse(await readFile(authStatePath, 'utf8')) as StorageState
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env[envName]
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const url = new URL('/api/v1/plugins/download', process.env.E2E_MARKETPLACE_API_URL || defaultMarketplaceApiUrl)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(
reportPath,
`${JSON.stringify({
generated_at: new Date().toISOString(),
pack,
results,
}, null, 2)}\n`,
'utf8',
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(targetPath, contents)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const baseURL = process.env.E2E_BASE_URL || defaultBaseURL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const apiURL = process.env.E2E_API_URL || defaultApiURL
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const cucumberHeadless = process.env.CUCUMBER_HEADLESS !== '0'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const cucumberSlowMo = Number(process.env.E2E_SLOW_MO || 0)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const reuseExistingWebServer = process.env.E2E_REUSE_WEB_SERVER
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? process.env.E2E_REUSE_WEB_SERVER !== '0'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
: !process.env.CI
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): sdks/nodejs-client
npm first-party return this.http.request({
method: "POST",
path: `/messages/${messageId}/feedbacks`,
data: payload,
});
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
first-party (npm): packages/contracts
npm first-partyexpand_more 6 low-confidence finding(s)
const rawSpec = JSON.parse(fs.readFileSync(specPath, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(entryPath, consoleContractEntryContent(segments))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(routerPath, consoleRouterContractContent(segments))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const enterpriseServerDir = process.env.DIFY_ENTERPRISE_SERVER
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? path.resolve(process.env.DIFY_ENTERPRISE_SERVER)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const openApi = yaml.load(fs.readFileSync(enterpriseOpenApiPath, 'utf8'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/dev-proxy
npm first-partyexpand_more 11 low-confidence finding(s)
await fs.writeFile(path.join(tempDir, 'dev-proxy.config.ts'), `
export default {
routes: [{ paths: '/api', target: 'https://api.example.com' }],
}
`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, '.env.proxy'), `DEV_PROXY_TEST_TARGET=http://127.0.0.1:${firstTarget.port}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, 'dev-proxy.config.ts'), `
export default {
routes: [{ paths: '/api', target: process.env.DEV_PROXY_TEST_TARGET }],
}
`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, '.env.proxy'), `DEV_PROXY_TEST_TARGET=http://127.0.0.1:${secondTarget.port}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.DEV_PROXY_TEST_PORT
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.DEV_PROXY_TEST_TARGET
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, 'dev-proxy.config.ts'), `
export default {
server: { host: '127.0.0.1', port: 7777 },
routes: [{ paths: ['/api', '/files'], target: 'https://api.example.com' }],
}
`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, '.env.proxy'), [
'DEV_PROXY_TEST_PORT=7788',
'DEV_PROXY_TEST_TARGET=https://env.example.com',
].join('\n'))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(path.join(tempDir, 'dev-proxy.config.ts'), `
export default {
server: { port: Number(process.env.DEV_PROXY_TEST_PORT) },
routes: [{ paths: '/api', target: process.env.DEV_PROXY_TEST_TARGET }],
}
`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
new URL('https://cloud.example.com/console/api/apps?page=1'),
Data is sent to a hardcoded external endpoint; review what leaves the process.
Fix: Verify the destination and that only non-sensitive data is sent; pin and audit the dependency.
const targetUrl = new URL('https://cloud.example.com')
Data is sent to a hardcoded external endpoint; review what leaves the process.
Fix: Verify the destination and that only non-sensitive data is sent; pin and audit the dependency.
first-party (npm): packages/dify-ui
npm first-partyexpand_more 1 low-confidence finding(s)
const isCI = !!process.env.CI
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/iconify-collections
npm first-partyexpand_more 9 low-confidence finding(s)
await readFile(path.resolve(packageDir, collection, 'icons.json'), 'utf8'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'icons.json'), `${JSON.stringify(collection, null, 2)}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'info.json'), `${JSON.stringify(info, null, 2)}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'metadata.json'), '{}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'chars.json'), '{}\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'index.mjs'), `${createIndexMjs()}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'index.js'), `${createIndexJs()}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(path.resolve(targetDir, 'index.d.ts'), `${createIndexTypes()}\n`)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await readFile(path.resolve(packageDir, 'package.json'), 'utf8'),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/migrate-no-unchecked-indexed-access
npm first-partyexpand_more 6 low-confidence finding(s)
return fileTexts.get(fileName) ?? ts.sys.readFile(fileName)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const currentText = fileTexts.get(fileName) ?? await fs.readFile(fileName, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(fileName, text)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const currentText = await fs.readFile(fileName, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(fileName, nextText)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
NODE_OPTIONS: process.env.NODE_OPTIONS ?? '--max-old-space-size=8192',
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
</> Dependencies
@amplitude/analytics-browser
npm dependencyimport { ILogger, Campaign, TrackingMethod } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AttributionOptions, TrackingMethod } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserConfig, ILogger, Storage, Campaign } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserClient } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AmplitudeCore, Event, EventOptions, IIdentify, IRevenue, TransportTypeOrOptions, Result, BrowserOptions, BrowserConfig, BrowserClient, AnalyticsClient, AnalyticsIdentity } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var plugin_page_view_tracking_browser_1 = require("@amplitude/plugin-page-view-tracking-browser");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var plugin_autocapture_browser_1 = require("@amplitude/plugin-autocapture-browser");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var plugin_network_capture_browser_1 = require("@amplitude/plugin-network-capture-browser");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var plugin_web_vitals_browser_1 = require("@amplitude/plugin-web-vitals-browser");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var plugin_event_property_attribution_browser_1 = require("@amplitude/plugin-event-property-attribution-browser");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var plugin_page_url_enrichment_browser_1 = require("@amplitude/plugin-page-url-enrichment-browser");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var plugin_custom_enrichment_browser_1 = require("@amplitude/plugin-custom-enrichment-browser");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
void _this.track(event.eventType, cleanEventProperties, eventOptions);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
promises.push(this.track(constants_1.DEFAULT_SESSION_END_EVENT, undefined, {
device_id: this.previousSessionDeviceId,
event_id: ++lastEventId,
session_id: previousSessionId,
time: lastEventTime + 1,
user_id: this.previousSessionUserId,
}).promise);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
promises.push(this.track((0, analytics_core_1.createIdentifyEvent)(this.config.identify)).promise);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
promises.push(this.track(constants_1.DEFAULT_SESSION_START_EVENT, undefined, {
event_id: isCampaignEventTracked ? ++lastEventId : lastEventId,
session_id: this.config.sessionId,
time: this.config.lastEventTime,
}).promise);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
promises.push(this.track(campaignEvent).promise);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
this.track(campaignEvent);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Config, ILogger, LogLevel, Event, Storage, IngestionMetadata, ServerZoneType, OfflineDisabled, Plan, IdentityStorageType, TransportTypeOrOptions, MemoryStorage, CookieStorage, UserSession, BrowserOptions, BrowserConfig as IBrowserConfig, DefaultTrackingOptions, TrackingOptions, AutocaptureOptions, CookieOptions, RemoteConfigOptions, NetworkTrackingOptions, CustomEnrichmentOptions, IIdentify, IDiagnosticsClient, CookieStorageConfig } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AutocaptureOptions, type ElementInteractionsOptions, BrowserConfig, RemoteConfig, NetworkTrackingOptions, NetworkCaptureRule } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { IdentityStorageType, ServerZoneType } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Storage, UserSession } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { PageTrackingOptions, ElementInteractionsOptions, FormInteractionsOptions, BrowserOptions, AutocaptureOptions, AttributionOptions, NetworkTrackingOptions, FrustrationInteractionsOptions, CustomEnrichmentOptions, PerformanceTrackingOptions } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserConfig } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Event, BeforePlugin, BrowserConfig } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { EnrichmentPlugin } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.track(constants_1.DEFAULT_FILE_DOWNLOAD_EVENT, (_a = {},
_a[constants_1.FILE_EXTENSION] = fileExtension,
_a[constants_1.FILE_NAME] = url.pathname,
_a[constants_1.LINK_ID] = a.id,
_a[constants_1.LINK_TEXT] = a.text,
_a[constants_1.LINK_URL] = a.href,
_a));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { EnrichmentPlugin } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.track(constants_1.DEFAULT_FORM_START_EVENT, (_a = {},
_a[constants_1.FORM_ID] = (0, exports.stringOrUndefined)(form.id),
_a[constants_1.FORM_NAME] = (0, exports.stringOrUndefined)(form.name),
_a[constants_1.FORM_DESTINATION] = formDestination,
_a));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.track(constants_1.DEFAULT_FORM_START_EVENT, (_a = {},
_a[constants_1.FORM_ID] = (0, exports.stringOrUndefined)(form.id),
_a[constants_1.FORM_NAME] = (0, exports.stringOrUndefined)(form.name),
_a[constants_1.FORM_DESTINATION] = formDestination,
_a));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.track(constants_1.DEFAULT_FORM_SUBMIT_EVENT, (_b = {},
_b[constants_1.FORM_ID] = (0, exports.stringOrUndefined)(form.id),
_b[constants_1.FORM_NAME] = (0, exports.stringOrUndefined)(form.name),
_b[constants_1.FORM_DESTINATION] = formDestination,
_b));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BeforePlugin } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.flush();
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { ILogger, BrowserStorage } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserStorage } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, Payload, Response, Transport } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, Payload, Response, Transport } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, Payload, Response, Transport } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
export { AmplitudeReturn, BaseEvent, EventOptions, BrowserClient, AttributionOptions, AutocaptureOptions, BrowserOptions, BrowserConfig, IConfig, Event, IdentifyEvent, GroupIdentifyEvent, IdentifyOperation, SpecialEventType, IIdentify, IRevenue, RevenueProperty, ILogger, LogLevel, Plugin, BeforePlugin, EnrichmentPlugin, DestinationPlugin, Result, ServerZoneType, ServerZone, IdentityStorageType, Storage, TransportType, OfflineDisabled, Messenger, ElementInteractionsOptions, ActionType, DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, DEFAULT_ACTION_CLICK_ALLOWLIST, Campaign, ClickIdParameters, ReferrerParameters, UTMParameters, ValidPropertyType, ExcludeInternalReferrersOptions, EXCLUDE_INTERNAL_REFERRERS_CONDITIONS, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Result } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserClient, EmbeddedVideoPlayer, VideoVendor } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
_this.amplitude.track('Video Content Started', tslib_1.__assign(tslib_1.__assign({}, nextState.lastEvent), _this.extraEventProperties));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
_this.amplitude.track('Video Content Stopped', tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, nextState.lastEvent), { watch_duration: nextState.watchTime }), _this.extraEventProperties));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { ILogger, Campaign, TrackingMethod } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { createIdentifyEvent, Identify, BASE_CAMPAIGN, getGlobalScope, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AttributionOptions, TrackingMethod } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserConfig, ILogger, Storage, Campaign } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { getStorageKey, isNewSession, BASE_CAMPAIGN, CampaignParser, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserClient } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { debugWrapper, getClientLogConfig, getClientStates } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AmplitudeCore, Event, EventOptions, IIdentify, IRevenue, TransportTypeOrOptions, Result, BrowserOptions, BrowserConfig, BrowserClient, AnalyticsClient, AnalyticsIdentity } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AmplitudeCore, Destination, Identify, returnWrapper, Revenue, UUID, getAnalyticsConnector, setConnectorDeviceId, setConnectorUserId, isNewSession, IdentityEventSender, getQueryParams, OfflineDisabled, RemoteConfigClient, DiagnosticsClient, createIdentifyEvent, Logger, safeJsonStringify, LogLevel, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { pageViewTrackingPlugin } from '@amplitude/plugin-page-view-tracking-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { autocapturePlugin, frustrationPlugin, performancePlugin } from '@amplitude/plugin-autocapture-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { plugin as networkCapturePlugin } from '@amplitude/plugin-network-capture-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { webVitalsPlugin } from '@amplitude/plugin-web-vitals-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { eventPropertyTrackingPlugin } from '@amplitude/plugin-event-property-attribution-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { pageUrlEnrichmentPlugin } from '@amplitude/plugin-page-url-enrichment-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { customEnrichmentPlugin } from '@amplitude/plugin-custom-enrichment-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
void _this.track(event.eventType, cleanEventProperties, eventOptions);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
promises.push(this.track(DEFAULT_SESSION_END_EVENT, undefined, {
device_id: this.previousSessionDeviceId,
event_id: ++lastEventId,
session_id: previousSessionId,
time: lastEventTime + 1,
user_id: this.previousSessionUserId,
}).promise);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
promises.push(this.track(createIdentifyEvent(this.config.identify)).promise);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
promises.push(this.track(DEFAULT_SESSION_START_EVENT, undefined, {
event_id: isCampaignEventTracked ? ++lastEventId : lastEventId,
session_id: this.config.sessionId,
time: this.config.lastEventTime,
}).promise);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
promises.push(this.track(campaignEvent).promise);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
this.track(campaignEvent);
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Config, ILogger, LogLevel, Event, Storage, IngestionMetadata, ServerZoneType, OfflineDisabled, Plan, IdentityStorageType, TransportTypeOrOptions, MemoryStorage, CookieStorage, UserSession, BrowserOptions, BrowserConfig as IBrowserConfig, DefaultTrackingOptions, TrackingOptions, AutocaptureOptions, CookieOptions, RemoteConfigOptions, NetworkTrackingOptions, CustomEnrichmentOptions, IIdentify, IDiagnosticsClient, CookieStorageConfig } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Config, Logger, LogLevel, MemoryStorage, UUID, CookieStorage, getCookieName, getQueryParams, isDomainEqual, decodeCookieValue, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AutocaptureOptions, type ElementInteractionsOptions, BrowserConfig, RemoteConfig, NetworkTrackingOptions, NetworkCaptureRule } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { SAFE_HEADERS, safeJsonStringify, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { IdentityStorageType, ServerZoneType } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Storage, UserSession } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { getOldCookieName } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { PageTrackingOptions, ElementInteractionsOptions, FormInteractionsOptions, BrowserOptions, AutocaptureOptions, AttributionOptions, NetworkTrackingOptions, FrustrationInteractionsOptions, CustomEnrichmentOptions, PerformanceTrackingOptions } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { isChromeExtension, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserConfig } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { getGlobalScope } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
export { Revenue, Identify } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Event, BeforePlugin, BrowserConfig } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { UUID, getLanguage } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { EnrichmentPlugin } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { getGlobalScope } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.track(DEFAULT_FILE_DOWNLOAD_EVENT, (_a = {},
_a[FILE_EXTENSION] = fileExtension,
_a[FILE_NAME] = url.pathname,
_a[LINK_ID] = a.id,
_a[LINK_TEXT] = a.text,
_a[LINK_URL] = a.href,
_a));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { EnrichmentPlugin } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { getGlobalScope, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.track(DEFAULT_FORM_START_EVENT, (_a = {},
_a[FORM_ID] = stringOrUndefined(form.id),
_a[FORM_NAME] = stringOrUndefined(form.name),
_a[FORM_DESTINATION] = formDestination,
_a));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.track(DEFAULT_FORM_START_EVENT, (_a = {},
_a[FORM_ID] = stringOrUndefined(form.id),
_a[FORM_NAME] = stringOrUndefined(form.name),
_a[FORM_DESTINATION] = formDestination,
_a));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.track(DEFAULT_FORM_SUBMIT_EVENT, (_b = {},
_b[FORM_ID] = stringOrUndefined(form.id),
_b[FORM_NAME] = stringOrUndefined(form.name),
_b[FORM_DESTINATION] = formDestination,
_b));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BeforePlugin } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { getGlobalScope } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
amplitude.flush();
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { getGlobalScope, registerSdkLoaderMetadata } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { ILogger, BrowserStorage } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { getGlobalScope, BrowserStorage } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserStorage } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { getGlobalScope, BrowserStorage } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, Payload, Response, Transport } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, compressToGzipArrayBuffer, isCompressionStreamAvailable, MIN_GZIP_UPLOAD_BODY_SIZE_BYTES, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, Payload, Response, Transport } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, getGlobalScope } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, Payload, Response, Transport } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, compressToGzipArrayBuffer, isCompressionStreamAvailable, MIN_GZIP_UPLOAD_BODY_SIZE_BYTES, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
export { AmplitudeReturn, BaseEvent, EventOptions, BrowserClient, AttributionOptions, AutocaptureOptions, BrowserOptions, BrowserConfig, IConfig, Event, IdentifyEvent, GroupIdentifyEvent, IdentifyOperation, SpecialEventType, IIdentify, IRevenue, RevenueProperty, ILogger, LogLevel, Plugin, BeforePlugin, EnrichmentPlugin, DestinationPlugin, Result, ServerZoneType, ServerZone, IdentityStorageType, Storage, TransportType, OfflineDisabled, Messenger, ElementInteractionsOptions, ActionType, DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, DEFAULT_ACTION_CLICK_ALLOWLIST, Campaign, ClickIdParameters, ReferrerParameters, UTMParameters, ValidPropertyType, ExcludeInternalReferrersOptions, EXCLUDE_INTERNAL_REFERRERS_CONDITIONS, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
export { IdentifyOperation, SpecialEventType, RevenueProperty, LogLevel, ServerZone, OfflineDisabled, DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, DEFAULT_ACTION_CLICK_ALLOWLIST, EXCLUDE_INTERNAL_REFERRERS_CONDITIONS, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Result } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserClient, EmbeddedVideoPlayer, VideoVendor } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { VideoObserver, UUID, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
_this.amplitude.track('Video Content Started', __assign(__assign({}, nextState.lastEvent), _this.extraEventProperties));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
_this.amplitude.track('Video Content Stopped', __assign(__assign(__assign({}, nextState.lastEvent), { watch_duration: nextState.watchTime }), _this.extraEventProperties));
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
!function(){"use strict";function e(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t(e,n)};function n(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function u(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function d(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError,function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(r||(r={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(i||(i={}));var f,v="AMP",p="".concat(v,"_unsent"),h="$default_instance",g="https://api2.amplitude.com/2/httpapi",m="https://api.eu.amplitude.com/2/httpapi",y="https://api2.amplitude.com/batch",b="https://api.eu.amplitude.com/batch",w="dclid",E="fbclid",S="gbraid",k="gclid",T="ko_click_id",P="li_fat_id",x="msclkid",_="rdt_cid",I="ttclid",A="twclid",O="wbraid",C={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},R=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],L=["authorization","cookie","set-cookie"],D=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!N(t,n))return!1}return!0},N=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;if(Array.isArray(s))return!1;if("object"==typeof s)i=i&&D(s);else if(!["number","string"].includes(typeof s))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return D(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},M=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return o({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(f.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(f.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(f.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(f.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(f.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(f.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(f.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(f.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(f.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[f.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[f.CLEAR_ALL]&&(!this._propertySet.has(t)&&(e===f.ADD?"number"==typeof n:e===f.UNSET||e===f.REMOVE||N(t,n)))},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(f||(f={}));var j,U=[f.CLEAR_ALL,f.UNSET,f.SET,f.SET_ONCE,f.ADD,f.APPEND,f.PREPEND,f.PREINSERT,f.POSTINSERT,f.REMOVE];!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(j||(j={}));var q,F=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=j.Unknown),{event:e,code:t,message:n}},B=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},H=d([],l(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),V=function(e){var t,n=B();if(!(null===(t=null==n?void 0:n.crypto)||void 0===t?void 0:t.getRandomValues))return function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,V)}(e);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,d([],l(r.entries()),!1).map(function(e){var t=l(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?"-".concat(H[r]):H[r]}).join("")},z=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[],this.pluginStatus=new Map,this._optOutListeners=[]}return e.prototype.register=function(e,t){var n,r;return s(this,void 0,void 0,function(){var i;return u(this,function(o){switch(o.label){case 0:return void 0===e.name&&(e.name=V(),this.loggerProvider.warn("Plugin name is undefined.\n Generating a random UUID for plugin name: ".concat(e.name,".\n Set a name for the plugin to prevent it from being added multiple times."))),i=e.name,this.pluginStatus.has(i)?(this.loggerProvider.warn("Plugin with name ".concat(i," already exists, skipping registration")),[2]):(e.type=null!==(n=e.type)&&void 0!==n?n:"enrichment",this.pluginStatus.set(i,"locked"),[4,null===(r=e.setup)||void 0===r?void 0:r.call(e,t,this.client)]);case 1:return o.sent(),"locked"!==this.pluginStatus.get(i)?[2]:(this.plugins.push(e),this.pluginStatus.set(i,"installed"),[2])}})})},e.prototype.deregister=function(e,t){var n;return s(this,void 0,void 0,function(){var r,i;return u(this,function(o){switch(o.label){case 0:return this.pluginStatus.delete(e),r=this.plugins.findIndex(function(t){return t.name===e}),-1===r?(t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(i=this.plugins[r],this.plugins.splice(r,1),[4,null===(n=i.teardown)||void 0===n?void 0:n.call(i)]);case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this._clearOptOutListeners(),this.applying=!1,this.plugins.map(function(e){var t;return null===(t=e.teardown)||void 0===t?void 0:t.call(e)}),this.plugins=[],this.pluginStatus.clear(),this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,a,s,d,f,v,p,h,g,m,y,b,w,E,S,k,T;return u(this,function(u){switch(u.label){case 0:if(!e)return[2];t=l(e,1),n=t[0],r=l(e,2),i=r[1],this.loggerProvider.log("Timeline.apply: Initial event",n),a=this.plugins.filter(function(e){return"before"===e.type}),u.label=1;case 1:u.trys.push([1,6,7,8]),s=c(a),d=s.next(),u.label=2;case 2:return d.done?[3,5]:(g=d.value).execute?[4,g.execute(o({},n))]:[3,4];case 3:if(null===(m=u.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),i({event:n,code:0,message:""}),[2];n=m,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),u.label=4;case 4:return d=s.next(),[3,2];case 5:return[3,8];case 6:return f=u.sent(),E={error:f},[3,8];case 7:try{d&&!d.done&&(S=s.return)&&S.call(s)}finally{if(E)throw E.error}return[7];case 8:v=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),u.label=9;case 9:u.trys.push([9,14,15,16]),p=c(v),h=p.next(),u.label=10;case 10:return h.done?[3,13]:(g=h.value).execute?[4,g.execute(o({},n))]:[3,12];case 11:if(null===(m=u.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),i({event:n,code:0,message:""}),[2];n=m,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),u.label=12;case 12:return h=p.next(),[3,10];case 13:return[3,16];case 14:return y=u.sent(),k={error:y},[3,16];case 15:try{h&&!h.done&&(T=p.return)&&T.call(p)}finally{if(k)throw k.error}return[7];case 16:return b=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(n))),w=b.map(function(e){var t=o({},n);return e.execute(t).catch(function(e){return F(t,0,String(e))})}),Promise.all(w).then(function(e){var t=l(e,1)[0]||F(n,100,"Event not tracked, no destination plugins on the instance");i(t)}),[2]}})})},e.prototype.flush=function(){return s(this,void 0,void 0,function(){var e,t,n,r=this;return u(this,function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return r.apply(e)}))];case 1:return i.sent(),t=this.plugins.filter(function(e){return"destination"===e.type}),n=t.map(function(e){return e.flush&&e.flush()}),[4,Promise.all(n)];case 2:return i.sent(),[2]}})})},e.prototype.addOptOutListener=function(e){this._optOutListeners.push(e)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onIdentityChanged)||void 0===n||n.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onSessionIdChanged)||void 0===n||n.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onOptOutChanged)||void 0===n||n.call(t,e)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o,a,s;return u(this,function(u){switch(u.label){case 0:u.trys.push([0,7,8,9]),t=c(this._optOutListeners),n=t.next(),u.label=1;case 1:if(n.done)return[3,6];r=n.value,u.label=2;case 2:return u.trys.push([2,4,,5]),[4,r(e)];case 3:return u.sent(),[3,5];case 4:return i=u.sent(),this.loggerProvider.error("Error calling optOut listener",i),[3,5];case 5:return n=t.next(),[3,1];case 6:return[3,9];case 7:return o=u.sent(),a={error:o},[3,9];case 8:try{n&&!n.done&&(s=t.return)&&s.call(t)}finally{if(a)throw a.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null===(t=e.onReset)||void 0===t||t.call(e)})},e}(),W=function(e,t){return o(o({},t),{event_type:i.IDENTIFY,user_properties:e.getUserProperties()})},$=function(e){return{promise:e||Promise.resolve()}},K=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new z(this),this.name=e}return e.prototype._init=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o,a,s,l;return u(this,function(u){switch(u.label){case 0:t=this[e],this[e]=[],u.label=1;case 1:u.trys.push([1,8,9,10]),n=c(t),r=n.next(),u.label=2;case 2:return r.done?[3,7]:(i=r.value,(o=i())&&"promise"in o?[4,o.promise]:[3,4]);case 3:return u.sent(),[3,6];case 4:return[4,o];case 5:u.sent(),u.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return a=u.sent(),s={error:a},[3,10];case 9:try{r&&!r.done&&(l=n.return)&&l.call(n)}finally{if(s)throw s.error}return[7];case 10:return this[e].length?[4,this.runQueuedFunctions(e)]:[3,12];case 11:u.sent(),u.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=function(e,t,n){return o(o(o({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),$(this.dispatch(r))},e.prototype.identify=function(e,t){var n=W(e,t);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),$(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var a=function(e,t,n,r){var a;return o(o({},r),{event_type:i.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(a={},a[e]=t,a)})}(e,t,n,r);return $(this.dispatch(a))},e.prototype.setGroup=function(e,t,n){var r=function(e,t,n){var r,a=new M;return a.set(e,t),o(o({},n),{event_type:i.IDENTIFY,user_properties:a.getUserProperties(),groups:(r={},r[e]=t,r)})}(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),$(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=function(e,t){return o(o({},t),{event_type:i.REVENUE,event_properties:e.getEventProperties()})}(e,t);return $(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),$())},e.prototype._addPlugin=function(e){return $(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),$())},e.prototype._removePlugin=function(e){return $(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(F(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return s(this,void 0,void 0,function(){var t=this;return u(this,function(n){return this.isReady?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t,n=null!==(t=this.userProperties)&&void 0!==t?t:{},i=o({},n);if(void 0===e)return i;var a={};return Object.keys(e).forEach(function(t){Object.values(r).includes(t)||(a[t]=e[t])}),U.forEach(function(t){if(Object.keys(e).includes(t)){var n=e[t];switch(t){case r.CLEAR_ALL:Object.keys(i).forEach(function(e){delete i[e]});break;case r.UNSET:Object.keys(n).forEach(function(e){delete i[e]});break;case r.SET:Object.assign(i,n)}}}),Object.assign(i,a),i},e.prototype.process=function(e){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.config.optOut?[2,F(e,0,"Event skipped due to optOut config")]:(e.event_type===i.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)]);case 1:return 200===(r=o.sent()).code?this.config.loggerProvider.log(r.message):100===r.code?this.config.loggerProvider.warn(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=o.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=F(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,Boolean(e)))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=Boolean(e),this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return $(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});if(void 0!==t)return t;this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e))},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),G=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){try{var t=JSON.parse(JSON.stringify(e));D(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?o({},this.properties):{};return e[q.REVENUE_PRODUCT_ID]=this.productId,e[q.REVENUE_QUANTITY]=this.quantity,e[q.REVENUE_PRICE]=this.price,e[q.REVENUE_TYPE]=this.revenueType,e[q.REVENUE_CURRENCY]=this.currency,e[q.REVENUE]=this.revenue,e[q.RECEIPT]=this.receipt,e[q.RECEIPT_SIG]=this.receiptSig,e},e}();!function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"}(q||(q={}));var J;!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(J||(J={}));var Y="Amplitude Logger ",X=function(){function e(){this.logLevel=J.None}return e.prototype.disable=function(){this.logLevel=J.None},e.prototype.enable=function(e){void 0===e&&(e=J.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<J.Verbose||console.log("".concat(Y,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<J.Warn||console.warn("".concat(Y,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<J.Error||console.error("".concat(Y,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<J.Debug||console.log("".concat(Y,"[Debug]: ").concat(e.join(" ")))},e}(),Q=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:h,logLevel:J.Warn,loggerProvider:new X,offline:!1,optOut:!1,serverUrl:g,serverZone:"US",useBatch:!1}},Z=function(){function e(e){var t,n,r,i;this._optOut=!1;var o=Q();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(n=e.logLevel)&&void 0!==n?n:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(r=e.optOut)&&void 0!==r?r:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(i=e.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=te(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),ee=function(e,t){return"EU"===e?t?b:m:t?y:g},te=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Q().serverZone),void 0===n&&(n=Q().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=["US","EU"].includes(t)?t:Q().serverZone;return{serverZone:r,serverUrl:ee(r,n)}},ne=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function re(e){return e>=200&&e<300}var ie=function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},oe=function(e){return function(){var t=o({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},ae=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=c(t.split(".")),o=i.next();!o.done;o=i.next()){var a=o.value;if(!(a in e))return;e=e[a]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},se=function(e,t){return function(){var n,r,i={};try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;i[s]=ae(e,s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},ue=function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=n(),u=s.logger,c=s.logLevel;if(c&&c<J.Debug||!c||!u)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:ie(1),time:{start:(new Date).toISOString()},states:{}};r&&l.states&&(l.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=(new Date).toISOString()),u.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=(new Date).toISOString()),u.debug(JSON.stringify(l,null,2))),d}},ce=new Set([g,m,y,b]);function le(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var de=function(){function e(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return s(this,void 0,void 0,function(){var n,r=this;return u(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(p,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return(n=i.sent())&&n.length>0&&Promise.all(n.map(function(e){return r.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=V()),new Promise(function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.queue.push(r),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline)return null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout?(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,void(this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e))):void 0},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),s(this,void 0,void 0,function(){var t,n,r=this;return u(this,function(i){switch(i.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),o=t,a=this.config.flushQueueSize,c=Math.max(a,1),[4,o.reduce(function(e,t,n){var r=Math.floor(n/c);return e[r]||(e[r]=[]),e[r].push(t),e},[]).reduce(function(t,n){return s(r,void 0,void 0,function(){return u(this,function(r){switch(r.label){case 0:return[4,t];case 1:return r.sent(),[4,this.send(n,e)];case 2:return[2,r.sent()]}})})},Promise.resolve())]);case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}var o,a,c})})},e.prototype.send=function(e,t){var n;return void 0===t&&(t=!0),s(this,void 0,void 0,function(){var r,i,o,s,c,l;return u(this,function(u){switch(u.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,a(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:(new Date).toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new ne,u.label=1;case 1:return u.trys.push([1,3,,4]),i=te(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,o=function(e,t){return void 0===t&&(t=!1),!!ce.has(e)||t}(i,this.config.enableRequestBodyCompression),[4,this.config.transportProvider.send(i,r,o)];case 2:return null===(s=u.sent())?(this.fulfillRequest(e,0,"Unexpected error occurred"),[2]):t?(this.handleResponse(s,e),[3,4]):("body"in s?this.fulfillRequest(e,s.statusCode,"".concat(s.status,": ").concat(le(s))):this.fulfillRequest(e,s.statusCode,s.status),[2]);case 3:return c=u.sent(),l=(d=c)instanceof Error?d.message:String(d),this.config.loggerProvider.error(l),null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:l,stack_trace:ie()}),this.handleResponse({status:j.Failed,statusCode:0},e),[3,4];case 4:return[2]}var d})})},e.prototype.handleResponse=function(e,t){var n;re(e.statusCode)||null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:le(e),stack_trace:ie()});var r=e.status;switch(r){case j.Success:this.handleSuccessResponse(e,t);break;case j.Invalid:this.handleInvalidResponse(e,t);break;case j.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case j.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(r,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=d(d(d(d([],l(Object.values(e.body.eventsWithInvalidFields)),!1),l(Object.values(e.body.eventsWithMissingFields)),!1),l(Object.values(e.body.eventsWithInvalidIdLengths)),!1),l(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter(function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)});o.length>0&&this.config.loggerProvider.warn(le(e));var a=this.removeEventsExceedFlushMaxRetries(o);this.scheduleEvents(a)}},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1!==t.length){this.config.loggerProvider.warn(le(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)}else this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,a=new Set(r),s=new Set(i),u=new Set(o),c=t.filter(function(t,r){if(!(t.event.user_id&&a.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)});c.length>0&&this.config.loggerProvider.warn(le(e));var l=this.removeEventsExceedFlushMaxRetries(c);this.scheduleEvents(l)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.fulfillRequest=function(e,t,n){var r,i,o;re(t)?null===(o=this.diagnosticsClient)||void 0===o||o.increment("analytics.events.sent",e.length):(null===(r=this.diagnosticsClient)||void 0===r||r.increment("analytics.events.dropped",e.length),null===(i=this.diagnosticsClient)||void 0===i||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:n,stack_trace:ie()})),this.removeEvents(e),e.forEach(function(e){return e.callback(F(e.event,t,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),fe=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:ve(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),ve=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},pe=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),he=function(){return he=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},he.apply(this,arguments)};function ge(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function me(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}"function"==typeof SuppressedError&&SuppressedError;var ye=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var o=ge(["string","number","boolean","undefined"]),a=o.next();!a.done;a=o.next()){if(a.value===i)return e===t}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var s=Array.isArray(e),u=Array.isArray(t);if(s!==u)return!1;if(!s||!u){var c=Object.keys(e).sort(),l=Object.keys(t).sort();if(!ye(c,l))return!1;var d=!0;return Object.keys(e).forEach(function(n){ye(e[n],t[n])||(d=!1)}),d}for(var f=0;f<e.length;f++)if(!ye(e[f],t[f]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var be=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=he({},this.identity.userProperties),n=he(he({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,a,s,u=n.userProperties||{};try{for(var c=ge(Object.entries(e)),l=c.next();!l.done;l=c.next()){var d=me(l.value,2),f=d[0],v=d[1];switch(f){case"$set":try{for(var p=(i=void 0,ge(Object.entries(v))),h=p.next();!h.done;h=p.next()){var g=me(h.value,2),m=g[0],y=g[1];u[m]=y}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(a=void 0,ge(Object.keys(v))),w=b.next();!w.done;w=b.next()){delete u[m=w.value]}}catch(e){a={error:e}}finally{try{w&&!w.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return n.userProperties=u,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return he({},this.identity)},e.prototype.setIdentity=function(e){var t=he({},this.identity);this.identity=he({},e),ye(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),we="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,Ee=function(){function e(){this.identityStore=new be,this.eventBridge=new pe,this.applicationContextProvider=new fe}return e.getInstance=function(t){return we.analyticsConnectorInstances||(we.analyticsConnectorInstances={}),we.analyticsConnectorInstances[t]||(we.analyticsConnectorInstances[t]=new e),we.analyticsConnectorInstances[t]},e}(),Se=function(e){return void 0===e&&(e=h),Ee.getInstance(e)},ke=function(){function e(){this.name="identity",this.type="before",this.identityStore=Se().identityStore}return e.prototype.execute=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){return e.instanceName&&(this.identityStore=Se(e.instanceName).identityStore),[2]})})},e}(),Te=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},Pe=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[v,t,e.substring(0,n)].filter(Boolean).join("_")},xe=function(){var e,t,n,r;if("undefined"==typeof navigator)return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""},_e=function(){var e,t=B();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var n=t.split("=",2),r=Ie(n[0]),i=Ie(n[1]);return i?(e[r]=i,e):e},{}):{}},Ie=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},Ae=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},Oe=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return n},Ce=function(e,t){var n=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}(e.toString());return 31*Math.abs(n)%1e5/1e5<t},Re=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},Le=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return s(this,void 0,void 0,function(){return u(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),De=function(){function e(e,t){void 0===t&&(t={}),this.options=o({},e),this.config=t}return e.prototype.isEnabled=function(){return s(this,void 0,void 0,function(){var t,n,r,i,a=this;return u(this,function(s){switch(s.label){case 0:return t="AMP_TEST",n=o({},this.options),r=new e(n),i=String(Date.now()),[4,r.transaction(t,function(e){var n,r;try{e.set(i);var o=e.get()===i;return!o&&a.config.diagnosticsClient&&(null===(n=a.config.diagnosticsClient)||void 0===n||n.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:t,testValue:i,sync:!0})),o}catch(e){if(a.config.diagnosticsClient){var s=e instanceof Error?e.message:String(e);null===(r=a.config.diagnosticsClient)||void 0===r||r.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:t,testValue:i,error:s,sync:!0})}return!1}finally{e.set(null)}})];case 1:return[2,s.sent()]}})})},e.prototype.get=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:return t=n.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var n=Ne(t);return void 0===n?void console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t)):JSON.parse(n)}catch(n){return void console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(t))}},e.prototype.getSync=function(e){var t=this.getRawSync(e);return this.decodeCookieValue(e,t)},e.prototype.getRaw=function(e){var t,n;return s(this,void 0,void 0,function(){var r,i,o,a,s,l,d,f,v;return u(this,function(u){switch(u.label){case 0:r=B(),i=r,u.label=1;case 1:return u.trys.push([1,4,,5]),(o=null==i?void 0:i.cookieStore)?[4,o.getAll(e)]:[3,3];case 2:if(a=u.sent()){a.length>1&&(null===(t=this.config.diagnosticsClient)||void 0===t||t.recordEvent("cookies.duplicate",{cookies:a.map(function(e){return e.domain})}),null===(n=this.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.cookieStore"));try{for(s=c(a),l=s.next();!l.done;l=s.next())if(d=l.value,Me(d.domain,this.options.domain))return[2,d.value]}catch(e){f={error:e}}finally{try{l&&!l.done&&(v=s.return)&&v.call(s)}finally{if(f)throw f.error}}}u.label=3;case 3:return[3,5];case 4:return u.sent(),[3,5];case 5:return[2,this.getRawSync(e)]}})})},e.prototype.getRawSync=function(e){var t,n,r=this,i=B(),o=(null!==(n=null===(t=null==i?void 0:i.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==n?n:[]).filter(function(t){return 0===t.indexOf(e+"=")}),a=void 0,s=this.config.duplicateResolverFn;if("function"==typeof s&&o.length>1&&(a=o.find(function(t){var n;try{var i=s(t.substring(e.length+1));return i||null===(n=r.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.document.cookie"),i}catch(e){return!1}})),a||(a=o[0]),a)return a.substring(e.length+1)},e.prototype.set=function(e,t){return s(this,void 0,void 0,function(){return u(this,function(n){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var n;try{var r=B();if(!r||!r.document||"function"!=typeof r.btoa||"function"!=typeof r.encodeURIComponent)return;var i=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=null!==t?i:-1,a=void 0;if(o){var s=new Date;s.setTime(s.getTime()+24*o*60*60*1e3),a=s}var u="".concat(e,"=").concat(r.btoa(r.encodeURIComponent(JSON.stringify(t))));a&&(u+="; expires=".concat(a.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),r.document.cookie=u}catch(t){var c=t instanceof Error?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}},e.prototype.remove=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2]})})},e.isDomainWritable=function(t){return s(this,void 0,void 0,function(){var n,r;return u(this,function(i){switch(i.label){case 0:if(e.cachedTlds[t])return[2,!0];n="AMP_TLDTEST",r=new e({domain:"."+t}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.transaction(n,function(n){if(e.cachedTlds[t])return!0;try{n.set(1);var r=!!n.get();return r&&(e.cachedTlds[t]=!0),r}finally{n.set(null)}})];case 2:return[2,!!i.sent()];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return s(this,void 0,void 0,function(){var n,r,i=this;return u(this,function(o){switch(o.label){case 0:if(n=function(){var e,t=B();return null===(e=null==t?void 0:t.navigator)||void 0===e?void 0:e.locks}(),r=function(){return t({get:function(){return i.getSync(e)},set:function(t){return i.setSync(e,t)}})},!n)return[2,r()];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.request("com.amplitude:cookie-lock:".concat(e),r)];case 2:return[2,o.sent()];case 3:return o.sent(),[2,r()];case 4:return[2]}})})},e.cachedTlds={},e}(),Ne=function(e){var t;return null!==(t=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}}(e))&&void 0!==t?t:function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}}(e)},Me=function(e,t){if(""===e&&""===t)return!0;if(!e||!t)return!1;var n=e.startsWith(".")?e.substring(1):e,r=t.startsWith(".")?t.substring(1):t;return n.toLowerCase()===r.toLowerCase()},je=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[v,t,e.substring(0,n)].filter(Boolean).join("_")},Ue=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return s(this,void 0,void 0,function(){return u(this,function(n){return[2,(null===(t=this.storage)||void 0===t?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var n;return s(this,void 0,void 0,function(){return u(this,function(r){try{null===(n=this.storage)||void 0===n||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return s(this,void 0,void 0,function(){return u(this,function(n){try{null===(t=this.storage)||void 0===t||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return s(this,void 0,void 0,function(){return u(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}(),qe="tags",Fe="counters",Be="histograms",He="events",Ve="internal",ze="last_flush_timestamp",We=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return void 0!==(null===(e=B())||void 0===e?void 0:e.indexedDB)},e.prototype.getDB=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onerror=function(){e.dbPromise=null,n(new Error("Failed to open IndexedDB"))},r.onsuccess=function(){var n=r.result;n.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},n.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),n.close()},t(n)},r.onupgradeneeded=function(t){var n=t.target.result;e.createTables(n)}})},e.prototype.createTables=function(e){(e.objectStoreNames.contains(qe)||e.createObjectStore(qe,{keyPath:"key"}),e.objectStoreNames.contains(Fe)||e.createObjectStore(Fe,{keyPath:"key"}),e.objectStoreNames.contains(Be)||e.createObjectStore(Be,{keyPath:"key"}),e.objectStoreNames.contains(He))||e.createObjectStore(He,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1});e.objectStoreNames.contains(Ve)||e.createObjectStore(Ve,{keyPath:"key"})},e.prototype.setTags=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([qe],"readwrite"),r=n.objectStore(qe),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tags",e),t()},i.forEach(function(e){var t=l(e,2),n=t[0],i=t[1];r.put({key:n,value:i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tag",n,i,e)}})})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",i),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([Fe],"readwrite"),r=n.objectStore(Fe),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to increment counters",e),t()},i.forEach(function(e){var t=l(e,2),n=t[0],i=t[1],a=r.get(n);a.onsuccess=function(){var e=a.result,t=e?e.value:0;r.put({key:n,value:t+i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to update counter",n,e)}},a.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,e)}})})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",i),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([Be],"readwrite"),r=n.objectStore(Be),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),t()},i.forEach(function(e){var t=l(e,2),n=t[0],i=t[1],a=r.get(n);a.onsuccess=function(){var e,t=a.result;e=t?{key:n,count:t.count+i.count,min:Math.min(t.min,i.min),max:Math.max(t.max,i.max),sum:t.sum+i.sum}:{key:n,count:i.count,min:i.min,max:i.max,sum:i.sum},r.put(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,e)}},a.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,e)}})})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",i),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===e.length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([He],"readwrite"),r=n.objectStore(He),[2,new Promise(function(t){n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event records",e),t()};var i=r.count();i.onsuccess=function(){var t=i.result,n=Math.max(0,10-t);n<e.length&&o.logger.debug("DiagnosticsStorage: Only added ".concat(n," of ").concat(e.length," events due to storage limit")),e.slice(0,n).forEach(function(e){r.add(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},i.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",i),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return s(this,void 0,void 0,function(){var n,r,i,o;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([Ve],"readwrite"),i=r.objectStore(Ve),[2,new Promise(function(n,o){r.onabort=function(){return o(new Error("Failed to set internal value"))};var a=i.put({key:e,value:t});a.onsuccess=function(){return n()},a.onerror=function(){return o(new Error("Failed to set internal value"))}})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",o),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return s(this,void 0,void 0,function(){var t,n,r,i;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=o.sent(),n=t.transaction([Ve],"readonly"),r=n.objectStore(Ve),[2,new Promise(function(t,i){n.onabort=function(){return i(new Error("Failed to get internal value"))};var o=r.get(e);o.onsuccess=function(){return t(o.result)},o.onerror=function(){return i(new Error("Failed to get internal value"))}})];case 2:return i=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",i),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return s(this,void 0,void 0,function(){var e,t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getInternal(ze)];case 1:return[2,(e=n.sent())?parseInt(e.value,10):void 0];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.setInternal(ze,e.toString())];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).clear();i.onsuccess=function(){return n()},i.onerror=function(){return r(new Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return s(this,void 0,void 0,function(){var e,t,n,r,i,o,a,s;return u(this,function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=u.sent(),t=e.transaction([qe,Fe,Be,He],"readwrite"),[4,Promise.all([this.getAllFromStore(t,qe),this.getAllFromStore(t,Fe),this.getAllFromStore(t,Be),this.getAllFromStore(t,He)])];case 2:return n=l.apply(void 0,[u.sent(),4]),r=n[0],i=n[1],o=n[2],a=n[3],[4,Promise.all([this.clearTable(t,Fe),this.clearTable(t,Be),this.clearTable(t,He)])];case 3:return u.sent(),[2,{tags:r,counters:i,histogramStats:o,events:a}];case 4:return s=u.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",s),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).getAll();i.onsuccess=function(){return n(i.result)},i.onerror=function(){return r(new Error("Failed to get all from ".concat(t)))}})},e}(),$e=function(e){var t,n,r=function(){var e=B();if(!e)return[];var t=e.__AMPLITUDE_SCRIPT_URL__;return Array.isArray(t)?t:"string"==typeof t?[t]:[]}();if(0!==r.length)try{for(var i=c(r),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.filename&&e.filename.includes(a))return"filename";if(e.stack&&e.stack.includes(a))return"stack"}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},Ke=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},Ge=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}},Je=3e5,Ye=1e4,Xe=function(){function e(e,t,n,r){void 0===n&&(n="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl="US"===n?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(r,null,2)),this.config=o({enabled:!0,sampleRate:0},r),this.startTimestamp=Date.now(),this.shouldTrack=Ce(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,We.isSupported()?this.storage=new We(e,t):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),function(e){var t=B();if(t&&"function"==typeof t.addEventListener){var n=function(t){e.recordEvent("sdk.error.uncaught",o({type:t.type,message:t.message,filename:t.filename,error_name:t.errorName,stack:t.stack},t.metadata))};t.addEventListener("error",function(e){var t=e.error instanceof Error?e.error:void 0,r=null==t?void 0:t.stack,i=$e({filename:e.filename,stack:r});i&&n({type:"error",message:e.message,stack:r,filename:e.filename,errorName:null==t?void 0:t.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:i}})},!0),t.addEventListener("unhandledrejection",function(e){var t,r=e.reason instanceof Error?e.reason:void 0,i=null==r?void 0:r.stack,o=Ke(i),a=$e({filename:o,stack:i});a&&n({type:"unhandledrejection",message:null!==(t=null==r?void 0:r.message)&&void 0!==t?t:Ge(e.reason),stack:i,filename:o,errorName:null==r?void 0:r.name,metadata:{isTrusted:e.isTrusted,matchReason:a}})},!0)}}(this))}return e.prototype.isStorageAndTrackEnabled=function(){return Boolean(this.storage)&&Boolean(this.shouldTrack)},e.prototype.setTag=function(e,t){this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryTags).length>=Ye?this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit"):(this.inMemoryTags[e]=t,this.startTimersIfNeeded()))},e.prototype.increment=function(e,t){void 0===t&&(t=1),this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryCounters).length>=Ye?this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit"):(this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()))},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled())if(Object.keys(this.inMemoryHistograms).length>=Ye)this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");else{var n=this.inMemoryHistograms[e];n?(n.count+=1,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){this.isStorageAndTrackEnabled()&&(this.inMemoryEvents.length>=10?this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit"):(this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()))},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},Je))},e.prototype.saveAllDataToStorage=function(){return s(this,void 0,void 0,function(){var e,t,n,r;return u(this,function(i){switch(i.label){case 0:return this.storage?(e=o({},this.inMemoryTags),t=o({},this.inMemoryCounters),n=o({},this.inMemoryHistograms),r=d([],l(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(t),this.storage.setHistogramStats(n),this.storage.addEventRecords(r)])]):[2];case 1:return i.sent(),[2]}})})},e.prototype._flush=function(){return s(this,void 0,void 0,function(){var e,t,n,r,i,o,a,s,c,l;return u(this,function(u){switch(u.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return u.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return e=u.sent(),t=e.tags,n=e.counters,r=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),a={},n.forEach(function(e){a[e.key]=e.value}),s={},r.forEach(function(e){s[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),c=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(a).length&&0===Object.keys(s).length&&0===c.length?[2]:(l={tags:o,histogram:s,counters:a,events:c},this.fetch(l),[2])}})})},e.prototype.fetch=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),!B())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:return n.sent().ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return t=n.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return s(this,void 0,void 0,function(){var e,t,n;return u(this,function(r){switch(r.label){case 0:return this.storage?(e=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return-1===(t=r.sent()||-1)?(this.storage.setLastFlushTimestamp(e),this._setFlushTimer(Je),[2]):(n=e-t)>=Je?(this._flush(),[2]):(this._setFlushTimer(Je-n),[2])}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=Ce(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),Qe=function(){function e(){}return e.prototype.send=function(e,t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,a,s,u,c,l,d,f,v,p,h,g,m,y,b,w,E,S;if("object"!=typeof e)return null;var k=e.code||0,T=this.buildStatus(k);switch(T){case j.Success:return{status:T,statusCode:k,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case j.Invalid:return{status:T,statusCode:k,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(a=e.events_with_invalid_fields)&&void 0!==a?a:{},eventsWithMissingFields:null!==(s=e.events_with_missing_fields)&&void 0!==s?s:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(l=e.exceeded_daily_quota_devices)&&void 0!==l?l:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(f=e.silenced_events)&&void 0!==f?f:[],throttledDevices:null!==(v=e.throttled_devices)&&void 0!==v?v:{},throttledEvents:null!==(p=e.throttled_events)&&void 0!==p?p:[]}};case j.PayloadTooLarge:return{status:T,statusCode:k,body:{error:null!==(h=e.error)&&void 0!==h?h:""}};case j.RateLimit:return{status:T,statusCode:k,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(y=e.throttled_devices)&&void 0!==y?y:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(E=e.exceeded_daily_quota_users)&&void 0!==E?E:{},throttledEvents:null!==(S=e.throttled_events)&&void 0!==S?S:[]}};case j.Timeout:default:return{status:T,statusCode:k}}},e.prototype.buildStatus=function(e){return re(e)?j.Success:429===e?j.RateLimit:413===e?j.PayloadTooLarge:408===e?j.Timeout:e>=400&&e<500?j.Invalid:e>=500?j.Failed:j.Unknown},e}();function Ze(){return"undefined"!=typeof CompressionStream}function et(e){return s(this,void 0,void 0,function(){var t,n;return u(this,function(r){switch(r.label){case 0:if(void 0===(t=CompressionStream))return[2,void 0];r.label=1;case 1:return r.trys.push([1,3,,4]),n=new Blob([e]).stream().pipeThrough(new t("gzip")),[4,new Response(n).arrayBuffer()];case 2:return[2,r.sent()];case 3:return r.sent(),[2,void 0];case 4:return[2]}})})}var tt=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var n=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(n))),Promise.resolve({remoteConfig:n.remoteConfig,lastFetch:new Date(n.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}();var nt=401,rt=403,it=429,ot=function(){function e(e,t,n,r,i){void 0===n&&(n="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=e,this.serverUrl=r||("US"===n?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new tt(e,t),this.customFetch=i}return e.prototype.subscribe=function(e,t,n){var r=V(),i={id:r,key:e,deliveryMode:t,callback:n};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),r},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return-1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return s(this,void 0,void 0,function(){var e,t=this;return u(this,function(n){switch(n.label){case 0:return this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5?(this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2]):[4,this.getOrCreateFetchPromise()];case 1:return e=n.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(n){t.sendCallback(n,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise?this.fetchPromise:this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null}),this.fetchPromise):(this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null}),this.fetchPromise)},e.prototype.subscribeAll=function(e){return s(this,void 0,void 0,function(){var t,n,r,i=this;return u(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),n=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,n])];case 1:return void 0!==(r=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(r))),null!==r.remoteConfig?this.sendCallback(e,r,"cache"):this.logger.debug("Remote config client skips sending callback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return s(this,void 0,void 0,function(){var n,r;return u(this,function(i){switch(i.label){case 0:n=new Promise(function(e,n){setTimeout(function(){n("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),n])];case 2:return r=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,r,"remote"),this.storage.setConfig(r),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(r=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,r,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,r,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,n){var r;e.lastCallback=new Date,r=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(r,n,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),s(this,void 0,void 0,function(){var n,r,i,o,a,s,c=this;return u(this,function(l){switch(l.label){case 0:n=t/e,r={remoteConfig:null,lastFetch:new Date},i=function(r){var i,a,s,l,d,f,v,p,h;return u(this,function(u){switch(u.label){case 0:i=!0,a=new AbortController,s=setTimeout(function(){return a.abort()},t),u.label=1;case 1:return u.trys.push([1,10,11,12]),l=o.getUrlParams(),d={Accept:"*/*"},o.customFetch?[4,(g=o.customFetch({url:l,method:"GET",headers:d,signal:a.signal}),m=a.signal,new Promise(function(e,t){var n=function(){var e=new Error("Remote config custom fetch aborted by timeout");e.name="AbortError",t(e)};m.addEventListener("abort",n,{once:!0}),g.then(function(t){m.removeEventListener("abort",n),e(t)},function(e){m.removeEventListener("abort",n),t(e)})}))]:[3,3];case 2:return v=u.sent(),[3,5];case 3:return[4,fetch(l,{method:"GET",headers:d,signal:a.signal})];case 4:v=u.sent(),u.label=5;case 5:return(f=v).ok||f.status>=200&&f.status<300?[3,7]:[4,f.text()];case 6:return p=u.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(f.status,": ").concat(p)),f.status===nt||f.status===rt?(o.logger.error("Remote config client fetch failed with ".concat(f.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,i=!1):f.status>=400&&f.status<500&&f.status!==it&&(i=!1),[3,9];case 7:return[4,f.json()];case 8:return[2,{value:{remoteConfig:u.sent(),lastFetch:new Date}}];case 9:return[3,12];case 10:return(h=u.sent())instanceof Error&&"AbortError"===h.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),h),[3,12];case 11:return clearTimeout(s),[7];case 12:return i?r<e-1?[4,new Promise(function(e){return setTimeout(e,c.getJitterDelay(n))})]:[3,14]:[2,"break"];case 13:u.sent(),u.label=14;case 14:return[2]}var g,m})},o=this,a=0,l.label=1;case 1:return a<e?[5,i(a)]:[3,4];case 2:if("object"==typeof(s=l.sent()))return[2,s.value];if("break"===s)return[3,4];l.label=3;case 3:return a++,[3,1];case 4:return[2,r]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e}(),at=B(),st=null==at?void 0:at.console,ut={},ct={},lt=!1;var dt,ft={addListener:function(e,t){var n,r=(n=e,!!st&&"function"==typeof st[n]&&(ct[n]||(ct[n]=st[n],st[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{if(ut[n]&&!lt){lt=!0;var r=ut[n];r&&r.forEach(function(t){try{t(n,e)}catch(e){}})}}catch(e){}return lt=!1,ct[n].apply(st,e)}),!0));if(!r)return new Error("Console override failed");ut[e]?ut[e].push(t):ut[e]=[t]},removeListener:function(e){var t,n;try{for(var r=c(Object.values(ut)),i=r.next();!i.done;i=r.next())for(var o=i.value,a=o.length-1;a>=0;a--)if(o[a]===e){o.splice(a,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},_restoreConsole:function(){var e,t;try{for(var n=c(Object.entries(ct)),r=n.next();!r.done;r=n.next()){var i=l(r.value,2),o=i[0],a=i[1];a&&(st[o]=a)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}ct={},ut={}}};!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(dt||(dt={}));var vt=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],pt="data-amp-track-",ht=["div","span","h1","h2","h3","h4","h5","h6"],gt=d(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],l(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),mt=gt,yt=gt,bt=["*"];function wt(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e}function Et(e,t,n){e&&St({json:e,allowlist:t.map(kt),excludelist:n.map(kt),ancestors:[]})}function St(e){var t,n,r=e.json,i=e.targetObject,o=e.allowlist,a=e.excludelist,s=e.ancestors,u=e.parentObject,f=e.targetKey;i||(i=r);var v=Object.keys(i);try{for(var p=c(v),h=p.next();!h.done;h=p.next()){var g=h.value,m=d(d([],l(s),!1),[g],!1);wt(i[g])?Pt(m,o)&&!Pt(m,a)||delete i[g]:St({json:r,targetObject:i[g],allowlist:o,excludelist:a,ancestors:m,parentObject:i,targetKey:g})}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}0===Object.keys(i).length&&u&&f&&delete u[f]}function kt(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function Tt(e,t,n,r){if(void 0===n&&(n=0),void 0===r&&(r=0),r===t.length)return n===e.length;if(n===e.length){for(;r<t.length&&"**"===t[r];)r++;return r===t.length}var i=t[r];if("**"===i){if(r+1===t.length)return!0;for(var o=n;o<=e.length;o++)if(Tt(e,t,o,r+1))return!0;return!1}return("*"===i||i===e[n])&&Tt(e,t,n+1,r+1)}function Pt(e,t){return t.some(function(t){return Tt(e,t)})}var xt=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,n;void 0===e&&(e=[]);var r=this.request.headers,i={};if(Array.isArray(r))r.forEach(function(e){var t=l(e,2),n=t[0],r=t[1];i[n]=r});else if(r instanceof Headers)r.forEach(function(e,t){i[t]=e});else if("object"==typeof r&&null!==r)try{for(var o=c(Object.entries(r)),a=o.next();!a.done;a=o.next()){var s=l(a.value,2),u=s[0],d=s[1];i[u]=d}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return Dt(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=B();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=It(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){return u(this,function(n){return 0===e.length?[2,null]:[2,Rt(this.body,e,t)]})})},e}(),_t=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),Dt(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return It(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){return u(this,function(n){return 0===e.length?[2,null]:[2,Rt(this.body,e,t)]})})},e}();function It(e,t){var n,r,i,o=B(),a=null==o?void 0:o.TextEncoder;if(a){var s;if("string"==typeof e)s=e,i=(new a).encode(s).length;else if(e instanceof Blob)i=(s=e).size;else if(e instanceof URLSearchParams)s=e,i=(new a).encode(s.toString()).length;else if(ArrayBuffer.isView(e))i=(s=e).byteLength;else if(e instanceof ArrayBuffer)i=(s=e).byteLength;else if(e instanceof FormData){var u=e,d=0,f=0;try{for(var v=c(u.entries()),p=v.next();!p.done;p=v.next()){var h=l(p.value,2),g=h[0],m=h[1];if(d+=g.length,"string"==typeof m)d+=(new a).encode(m).length;else{if(!(m instanceof Blob))return;d+=m.size}if(++f>=t)return}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}i=d}else if(e instanceof ReadableStream)return void(s=e);return i}}var At,Ot=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var n=this.response.headers,r={};return null===(t=null==n?void 0:n.forEach)||void 0===t||t.call(n,function(e,t){r[t]=e}),Dt(r,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var n=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),r=n?parseInt(n,10):void 0;return this._bodySize=r,r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return s(this,void 0,void 0,function(){var e,t;return u(this,function(n){switch(n.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),n.label=1;case 1:return n.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},500)}),[4,Promise.race([e,t])];case 2:return[2,n.sent()];case 3:return n.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return 0===e.length?[2,null]:[4,this.text()];case 1:return[2,Rt(n.sent(),e,t)]}})})},e}(),Ct=function(){function e(e,t,n,r){this.statusCode=e,this.headersString=t,this.size=n,this.getJson=r}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,n;if(void 0===e&&(e=[]),!this.headersString)return{};var r={},i=this.headersString.split("\r\n");try{for(var o=c(i),a=o.next();!a.done;a=o.next()){var s=l(a.value.split(": "),2),u=s[0],d=s[1];u&&d&&(r[u]=d)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return Dt(r,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){var n;return u(this,function(r){return 0===e.length?[2,null]:(n=this.getJson())?(Et(n,e,t),[2,n]):[2,null]})})},e}();function Rt(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return Et(r,t,n),r}catch(e){return null}}!function(e){e.REDACT="redact",e.REMOVE="remove"}(At||(At={}));var Lt="[REDACTED]",Dt=function(e,t){var n,r,i=t.allow,o=void 0===i?[]:i,a=t.strategy,s=void 0===a?At.REMOVE:a,u=d([],l(L),!1),f={},v=function(t){var n=t.toLowerCase();u.find(function(e){return e.toLowerCase()===n})?s===At.REDACT&&(f[t]=Lt):o.find(function(e){return e.toLowerCase()===n})?f[t]=e[t]:s===At.REDACT&&(f[t]=Lt)};try{for(var p=c(Object.keys(e)),h=p.next();!h.done;h=p.next()){v(h.value)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}return f},Nt=function(){function e(e,t,n,r,i,o,a,s,u,c,l){void 0===a&&(a=0),this.type=e,this.method=t,this.timestamp=n,this.startTime=r,this.url=i,this.requestWrapper=o,this.status=a,this.duration=s,this.responseWrapper=u,this.error=c,this.endTime=l}return e.prototype.toSerializable=function(){var e,t,n,r,i={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(e=this.requestWrapper)||void 0===e?void 0:e.headers(d([],l(R),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(n=this.responseWrapper)||void 0===n?void 0:n.headers(d([],l(R),!1)),responseBodySize:null===(r=this.responseWrapper)||void 0===r?void 0:r.bodySize};return Object.fromEntries(Object.entries(i).filter(function(e){var t=l(e,2);return t[0],void 0!==t[1]}))},e}();var Mt=function(e,t){void 0===t&&(t=V()),this.callback=e,this.id=t};function jt(e){try{e()}catch(e){}}var Ut=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=B();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var e=B();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var n,r,i,o,a,s,u,c,l,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null===(i=null===(r=null===(n=this.globalScope)||void 0===n?void 0:n.XMLHttpRequest)||void 0===r?void 0:r.prototype)||void 0===i?void 0:i.open,v=null===(s=null===(a=null===(o=this.globalScope)||void 0===o?void 0:o.XMLHttpRequest)||void 0===a?void 0:a.prototype)||void 0===s?void 0:s.send,p=null===(l=null===(c=null===(u=this.globalScope)||void 0===u?void 0:u.XMLHttpRequest)||void 0===c?void 0:c.prototype)||void 0===l?void 0:l.setRequestHeader;f&&v&&p&&this.observeXhr(f,v,p);var h=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;h&&this.observeFetch(h),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(n){try{n.callback(e)}catch(e){jt(function(){var n;null===(n=t.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,n,r,i,o,a){var s;if(void 0!==o&&void 0!==a){var u,c,l,d="GET";if(!function(e){return"object"==typeof e&&null!==e&&"url"in e&&"method"in e}(t)?u=null===(s=null==t?void 0:t.toString)||void 0===s?void 0:s.call(t):(u=t.url,d=t.method),u)try{var f=new URL(u);u="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==n?void 0:n.method)||d,r&&(c=r.status),i&&(l={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},c=0);var v=Math.floor(performance.now()-a),p=Math.floor(o+v),h=new Nt(e,d,o,o,u,n,c,v,r,l,p);this.triggerEventCallbacks(h)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(n,r){return s(t,void 0,void 0,function(){var t,i,o,a,s=this;return u(this,function(u){switch(u.label){case 0:try{t=this.getTimestamps()}catch(e){jt(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}u.label=1;case 1:return u.trys.push([1,3,,4]),[4,e(n,r)];case 2:return i=u.sent(),[3,4];case 3:return a=u.sent(),o=a,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,r?new xt(r):void 0,i?new Ot(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){jt(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(i)return[2,i];throw o}})})})},e.createXhrJsonParser=function(e,t){return function(){var n;try{if("json"===e.responseType){if(null===(n=t.globalScope)||void 0===n?void 0:n.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(n){return n instanceof Error&&"InvalidStateError"===n.name&&jt(function(){var n;return null===(n=t.logger)||void 0===n?void 0:n.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))}),null}return null}},e.prototype.observeXhr=function(t,n,r){if(this.globalScope&&t&&n){var i=this.globalScope.XMLHttpRequest.prototype,a=this;i.open=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=l(n,2),s=i[0],u=i[1];try{this.$$AmplitudeAnalyticsEvent=o({method:s,url:null===(e=null==u?void 0:u.toString)||void 0===e?void 0:e.call(u),headers:{}},a.getTimestamps())}catch(e){jt(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return t.apply(this,n)},i.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this,o=e.createXhrJsonParser(this,a),s=t[0],u=i.$$AmplitudeAnalyticsEvent;return i.$$AmplitudeAnalyticsEvent&&i.addEventListener("loadend",function(){try{var e=i.getAllResponseHeaders(),t=i.getResponseHeader("content-length"),n=new Ct(i.status,e,t?parseInt(t,10):void 0,o),r=i.$$AmplitudeAnalyticsEvent.headers,c=new _t(s,r);u.status=i.status,a.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},c,n,void 0,u.startTime,u.durationStart)}catch(e){jt(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),n.apply(i,t)},i.setRequestHeader=function(e,t){try{var n=this.$$AmplitudeAnalyticsEvent;n&&(n.headers[e]=t)}catch(e){jt(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}r.apply(this,[e,t])}}},e}(),qt=new Ut,Ft=function(){function e(){}return e.prototype.parse=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2,o(o(o(o({},C),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=_e();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=_e();return(e={})[w]=t[w],e[E]=t[E],e[S]=t[S],e[k]=t[k],e[T]=t[T],e[P]=t[P],e[x]=t[x],e[_]=t[_],e[I]=t[I],e[A]=t[A],e[O]=t[O],e},e}(),Bt="data-amp-mask",Ht="*****",Vt=/\b(?:\d[ -]*?){13,16}\b/,zt=/(\d{3}-?\d{2}-?\d{4})/g,Wt=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,$t=function(e,t){var n,r;if(void 0===t&&(t=[]),"string"!=typeof e)return"";var i=e;i=(i=(i=i.replace(Vt,Ht)).replace(zt,Ht)).replace(Wt,Ht);try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;try{i=i.replace(s,Ht)}catch(e){}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},Kt=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(Bt)?Ht:e?e(document.title):document.title},Gt={};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.Observable=void 0;const Jt=e=>Boolean(Symbol[e]),Yt=e=>Jt(e)?Symbol[e]:"@@"+e,Xt=Yt("iterator"),Qt=Yt("observable"),Zt=Yt("species");function en(e,t){let n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function tn(e){let t=e.constructor;return void 0!==t&&(t=t[Zt],null===t&&(t=void 0)),void 0!==t?t:ln}function nn(e){nn.log?nn.log(e):setTimeout(()=>{throw e})}function rn(e){Promise.resolve().then(()=>{try{e()}catch(e){nn(e)}})}function on(e){let t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{let e=en(t,"unsubscribe");e&&e.call(t)}}catch(e){nn(e)}}function an(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function sn(e,t,n){e._state="running";let r=e._observer;try{let i=en(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(an(e),!i)throw n;i.call(r,n);break;case"complete":an(e),i&&i.call(r)}}catch(e){nn(e)}"closed"===e._state?on(e):"running"===e._state&&(e._state="ready")}function un(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void rn(()=>function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let n=0;n<t.length&&(sn(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e))):void sn(e,t,n);e._queue.push({type:t,value:n})}}class cn{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let n=this,r={get closed(){return"closed"===n._state},next(e){un(n,"next",e)},error(e){un(n,"error",e)},complete(){un(n,"complete")}};try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(an(this),on(this))}}class ln{constructor(e){if(!(this instanceof ln))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new cn(e,this._subscriber)}forEach(e){return new Promise((t,n)=>{if("function"!=typeof e)return void n(new TypeError(e+" is not a function"));function r(){i.unsubscribe(),t()}let i=this.subscribe({next(t){try{e(t,r)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t})})}map(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(tn(this))(t=>this.subscribe({next(n){try{n=e(n)}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(tn(this))(t=>this.subscribe({next(n){try{if(!e(n))return}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=tn(this),n=arguments.length>1,r=!1,i=arguments[1];return new t(t=>this.subscribe({next(o){let a=!r;if(r=!0,!a||n)try{i=e(i,o)}catch(e){return t.error(e)}else i=o},error(e){t.error(e)},complete(){if(!r&&!n)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(i),t.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=tn(this);return new t(n=>{let r,i=0;return function o(a){r=a.subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){i===e.length?(r=void 0,n.complete()):o(t.from(e[i++]))}})}(this),()=>{r&&(r.unsubscribe(),r=void 0)}})}flatMap(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=tn(this);return new t(n=>{let r=[],i=this.subscribe({next(i){if(e)try{i=e(i)}catch(e){return n.error(e)}let a=t.from(i).subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){let e=r.indexOf(a);e>=0&&r.splice(e,1),o()}});r.push(a)},error(e){n.error(e)},complete(){o()}});function o(){i.closed&&0===r.length&&n.complete()}return()=>{r.forEach(e=>e.unsubscribe()),i.unsubscribe()}})}[Qt](){return this}static from(e){let t="function"==typeof this?this:ln;if(null==e)throw new TypeError(e+" is not an object");let n=en(e,Qt);if(n){let r=n.call(e);if(Object(r)!==r)throw new TypeError(r+" is not an object");return function(e){return e instanceof ln}(r)&&r.constructor===t?r:new t(e=>r.subscribe(e))}if(Jt("iterator")&&(n=en(e,Xt),n))return new t(t=>{rn(()=>{if(!t.closed){for(let r of n.call(e))if(t.next(r),t.closed)return;t.complete()}})});if(Array.isArray(e))return new t(t=>{rn(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})});throw new TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:ln)(t=>{rn(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})})}static get[Zt](){return this}}Gt.Observable=ln,Object.defineProperty(ln,Symbol("extensions"),{value:{symbol:Qt,hostReportError:nn},configurable:!0});var dn=Gt.Observable;function fn(e,t){return new dn(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})}function vn(e,t){return new dn(function(n){var r=!1,i=new Set,o=function(){var e,t;r=!0;try{for(var n=c(i),o=n.next();!o.done;o=n.next()){var a=o.value;try{a.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.clear()},a=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),o())},complete:function(){i.delete(t),r||0!==i.size||(n.complete(),o(),r=!0)}});i.add(t)};return a(e),a(t),o})}function pn(e){var t=new Set,n=null;function r(){null==n||n.unsubscribe(),n=null,t.clear()}return new dn(function(i){return t.add(i),null===n&&(n=e.subscribe({next:function(e){var n,r,i;try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;null===(i=s.next)||void 0===i||i.call(s,e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},error:function(e){var n,i,o;try{for(var a=c(t),s=a.next();!s.done;s=a.next()){var u=s.value;null===(o=u.error)||void 0===o||o.call(u,e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}r()},complete:function(){var e,n,i;try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;null===(i=s.complete)||void 0===i||i.call(s)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}r()}})),function(){t.delete(i),0===t.size&&n&&(n.unsubscribe(),n=null)}})}var hn={},gn={get exports(){return hn},set exports(e){hn=e}},mn=Object.prototype.hasOwnProperty;function yn(e){return"[Throws: "+(e?e.message:"?")+"]"}function bn(e){var t=[];return function e(n){if(null===n||"object"!=typeof n)return n;if(-1!==t.indexOf(n))return"[Circular]";if(t.push(n),"function"==typeof n.toJSON)try{var r=e(n.toJSON());return t.pop(),r}catch(e){return yn(e)}if(Array.isArray(n)){var i=n.map(e);return t.pop(),i}var o=Object.keys(n).reduce(function(t,r){return t[r]=e(function(e,t){if(mn.call(e,t))try{return e[t]}catch(e){return yn(e)}return e[t]}(n,r)),t},{});return t.pop(),o}(e)}gn.exports=function(e,t,n){return JSON.stringify(bn(e),t,n)};var wn,En=hn.ensureProperties=bn,Sn=hn||e({__proto__:null,ensureProperties:En,get default(){return hn}},[hn]),kn="https://app.amplitude.com",Tn={US:kn,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"};var Pn="__AMPLITUDE_MESSENGER_INSTANCE__",xn="__AMPLITUDE_MESSENGER__",_n=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?kn:t;this[wn]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(r=window.opener)||void 0===r?void 0:r.postMessage)||void 0===i||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,a){r.requestCallbacks[i]={resolve:t,reject:a},r.notify(o),n.timeout>0&&setTimeout(function(){a(new Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},e.prototype.registerActionHandler=function(e,t){var n,r,i,o;this.actionHandlers.has(e)&&(null===(o=null===(i=this.logger)||void 0===i?void 0:i.warn)||void 0===o||o.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var a=this.pendingMessages.get(e);if(a){this.pendingMessages.delete(e);try{for(var s=c(a),u=s.next();!u.done;u=s.next()){t(u.value)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(e){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];n=function(e){return document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),null===(r=document.head)||void 0===r||r.appendChild(i)}catch(e){n(e)}})}(e).then(function(){}),this.scriptLoadPromises.set(e,n),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n];case 2:return i.sent(),[3,4];case 3:throw r=i.sent(),this.scriptLoadPromises.delete(e),r;case 4:return[2]}})})},e.prototype.setup=function(e){var t,n,r=this,i=void 0===e?{}:e,o=i.logger,a=i.endpoint;o&&(this.logger=o),a&&this.endpoint===kn&&(this.endpoint=a),this.isSetup||(this.isSetup=!0,null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Setting up messenger"),this.messageHandler=function(e){var t,n,i,o,a;if(null===(n=null===(t=r.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message received: ",JSON.stringify(e)),r.endpoint===e.origin){var s=e.data,u=null==s?void 0:s.action;if(u)if("id"in s&&s.id)null===(o=null===(i=r.logger)||void 0===i?void 0:i.debug)||void 0===o||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),r.handleResponse(s);else{if("ping"===u)return void r.notify({action:"pong"});var c=r.actionHandlers.get(u);if(c)c(s.data);else{var l=null!==(a=r.pendingMessages.get(u))&&void 0!==a?a:[];l.push(s.data),r.pendingMessages.set(u,l)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=B();(null==e?void 0:e[xn])===this&&delete e[xn]},e}();function In(e){var t,n=B(),r=null==n?void 0:n[xn];if("object"==typeof(t=r)&&null!==t&&Pn in t&&!0===t[Pn])return r;var i=new _n(e);return n&&(n[xn]=i),i}wn=Pn;var An="__AMPLITUDE_BACKGROUND_CAPTURE__";var On={always:"always",ifEmptyCampaign:"ifEmptyCampaign"};function Cn(e,t){var n=0;if(Number.isFinite(e)&&Number.isFinite(t)&&t>0){var r=e/t*100;n=Math.min(100,Math.max(0,r))}return n}function Rn(e,t){var n=e.currentTime,r=e.duration;return o({duration:r,start_time:n,last_position:n,percent_completed:Cn(n,r)},void 0!==t?{stop_reason:t}:{})}function Ln(e){return{mux_playback_id:e.getAttribute("playback-id"),mux_video_id:e.getAttribute("metadata-video-id"),mux_video_title:e.getAttribute("metadata-video-title")}}function Dn(e,t,n,r){return s(this,void 0,void 0,function(){var i,a,s,c,d;return u(this,function(u){switch(u.label){case 0:return[4,Promise.all([new Promise(function(t){return e.getDuration(t)}),new Promise(function(t){return e.getCurrentTime(t)})])];case 1:if(i=l.apply(void 0,[u.sent(),2]),a=i[0],s=i[1],c={},"mux"===n){d=void 0;try{d=new URL(t.getAttribute("src")),c.mux_video_title=d.searchParams.get("metadata-video-title"),c.mux_video_id=d.searchParams.get("metadata-video-id"),c.mux_playback_id=d.pathname.split("/").pop()}catch(e){}}return[2,o(o({duration:a,start_time:s,last_position:s,percent_completed:Cn(s,a)},void 0!==r?{stop_reason:r}:{}),c)]}})})}function Nn(e,t,n){void 0===n&&(n=null);var r=[],i=function(){var i=e.elem,o=!1,a=function(){Dn(e,i,n).then(function(e){t.onPlay(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'play' handler: ".concat(e))})};e.on("play",a),r.push(function(){return e.off("play",a)});var c=function(){Dn(e,i,n,"paused").then(function(e){t.onPause(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'pause' handler: ".concat(e))})};e.on("pause",c),r.push(function(){return e.off("pause",c)});var l=function(){Dn(e,i,n,"ended").then(function(e){t.onEnded(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'ended' handler: ".concat(e))})};e.on("ended",l),r.push(function(){return e.off("ended",l)});var d=function(){o=!0,Dn(e,i,n,"seeking").then(function(e){t.onSeeking(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'seeking' handler: ".concat(e))})};e.on("seeking",d),r.push(function(){return e.off("seeking",d)});var f=function(){o=!1,Dn(e,i,n).then(function(e){t.onSeeked(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'seeked' handler: ".concat(e))})};e.on("seeked",f),r.push(function(){return e.off("seeked",f)});var v=function(){(function(e){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){return e.getCurrentTime(t)})];case 1:return[2,{currentTime:t.sent()}]}})})})(e).then(function(e){var n={position:e.currentTime,isSeeking:o};t.onTimeUpdate(n)}).catch(function(e){t.onError("Error getting iframe metadata from 'timeupdate' handler: ".concat(e))})};e.on("timeupdate",v),r.push(function(){return e.off("timeupdate",v)})};return e.on("ready",i),function(){e.off("ready",i),r.forEach(function(e){return e()})}}var Mn=function(){function e(e){var t=e.videoEl,n=e.onStateChange,r=e.vendor,i=e.isEmbedded,a=this;this.state={playbackState:"paused"},this.handler={onPlay:function(e){a.updatePlaybackState("playing",e)},onPause:function(e){a.updatePlaybackState("paused",e)},onEnded:function(e){a.updatePlaybackState("ended",e)},onSeeking:function(){var e=o(o({},a.state),{isSeeking:!0});a.updateState(e)},onSeeked:function(e){var t=o(o({},a.state),{isSeeking:!1,position:e.last_position});a.updateState(t)},onError:function(e){a.updateStateWithError(e)},onTimeUpdate:function(e){a.updateTime(e)}},this.onStateChange=n,this.untrack=i?Nn(t,this.handler,r):function(e,t,n){var r=function(){var r=o(o({},Rn(e)),"mux"===n?Ln(e):{});t.onPlay(r)};e.addEventListener("play",r);var i=function(){var r=o(o({},Rn(e,"paused")),"mux"===n?Ln(e):{});t.onPause(r)};e.addEventListener("pause",i);var a=function(){var r=o(o({},Rn(e,"ended")),"mux"===n?Ln(e):{});t.onEnded(r)};e.addEventListener("ended",a);var s=function(){var r=o(o({},Rn(e,"seeking")),"mux"===n?Ln(e):{});t.onSeeking(r)};e.addEventListener("seeking",s);var u=function(){var r=o(o({},Rn(e)),"mux"===n?Ln(e):{});t.onSeeked(r)};e.addEventListener("seeked",u);var c=function(){var n=e,r={position:e.currentTime,isSeeking:!!n.seeking};t.onTimeUpdate(r)};return e.addEventListener("timeupdate",c),function(){e.removeEventListener("play",r),e.removeEventListener("pause",i),e.removeEventListener("ended",a),e.removeEventListener("seeking",s),e.removeEventListener("seeked",u),e.removeEventListener("timeupdate",c)}}(t,this.handler,r)}return e.prototype.stateChangeHandler=function(e,t){try{this.onStateChange(e,t)}catch(e){}},e.prototype.updateStateWithError=function(e){var t=this.state,n=o(o({},t),{playbackState:"error",errorMessage:e});this.updateState(n)},e.prototype.updatePlaybackState=function(e,t){var n=o(o({},this.state),{playbackState:e,lastEvent:t,position:t.last_position});this.updateState(n)},e.prototype.updateTime=function(e){var t,n;if(this.state.lastEvent&&"playing"===this.state.playbackState){var r=e.isSeeking||this.state.isSeeking,i=null!==(t=this.state.position)&&void 0!==t?t:0,a=e.position;if(r)this.state=o(o({},this.state),{position:a});else{var s=a-i,u=o(o({},this.state),{position:a,watchTime:(null!==(n=this.state.watchTime)&&void 0!==n?n:0)+s});this.updateState(u)}}},e.prototype.updateState=function(e){var t=this.state;this.state=e,this.stateChangeHandler(t,e)},e.prototype.destroy=function(){this.untrack()},e}();var jn=function(e,t){return"boolean"==typeof e?e:!1!==(null==e?void 0:e[t])&&(!function(){var e,t,n=B();return"string"==typeof(null===(t=null===(e=null==n?void 0:n.chrome)||void 0===e?void 0:e.runtime)||void 0===t?void 0:t.id)}()||!!(null==e?void 0:e[t]))},Un=function(e){return jn(e,"attribution")},qn=function(e){return jn(e,"formInteractions")},Fn=function(e){return jn(e,"pageViews")},Bn=function(e){return jn(e,"sessions")},Hn=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.networkTracking||"object"==typeof e.networkTracking)},Vn=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},zn=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.frustrationInteractions||"object"==typeof e.frustrationInteractions)},Wn=function(e){if("object"==typeof e.autocapture){var t=e.autocapture.performanceTracking;return!0===t?{mainThreadBlock:!0}:"object"==typeof t&&null!==t?t:void 0}},$n=function(e){if(Vn(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},Kn=function(e){if(zn(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.frustrationInteractions)return e.autocapture.frustrationInteractions},Gn=function(e){var t;if(Hn(e.autocapture)){var n=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.networkTracking?n=e.autocapture.networkTracking:e.networkTrackingOptions&&(n=e.networkTrackingOptions),o(o({},n),{captureRules:null===(t=null==n?void 0:n.captureRules)||void 0===t?void 0:t.map(function(t){var n,r,i;if((null===(n=t.urls)||void 0===n?void 0:n.length)&&(null===(r=t.hosts)||void 0===r?void 0:r.length)){var a=JSON.stringify(t.hosts),s=JSON.stringify(t.urls);return null===(i=e.loggerProvider)||void 0===i||i.warn("Found network capture rule with both urls='".concat(s,"' and hosts='").concat(a,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),o(o({},t),{hosts:void 0})}return t})})}},Jn=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return Fn(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:r,eventType:t,pageCounter:i}},Yn=function(e,t){Xn(e,t)},Xn=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,a=r.resolve,s=e&&e[i];if("function"==typeof s){var u=s.apply(e,o);"function"==typeof a&&a(null==u?void 0:u.promise)}}return e},Qn=function(e){return e&&void 0!==e._q},Zn="2.44.4",er="amplitude-ts",tr=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(er,"/").concat(Zn),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,n;return s(this,void 0,void 0,function(){var r,i,a;return u(this,function(s){return r=(new Date).getTime(),i=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1,a=null!==(n=e.event_id)&&void 0!==n?n:i+1,this.config.lastEventId=a,e.time||(this.config.lastEventTime=r),[2,o(o(o(o(o(o(o(o({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:xe()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:V(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:a,library:this.library,user_agent:this.userAgent})]})})},e}(),nr=1e3,rr=function(e){function t(t){var n,r,i,o=this;try{i=null===(n=B())||void 0===n?void 0:n.localStorage}catch(e){null===(r=null==t?void 0:t.loggerProvider)||void 0===r||r.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return n(t,e),t.prototype.set=function(t,n){var r;return s(this,void 0,void 0,function(){var i;return u(this,function(o){switch(o.label){case 0:return Array.isArray(n)&&n.length>nr?(i=n.length-nr,[4,e.prototype.set.call(this,t,n.slice(0,nr))]):[3,2];case 1:return o.sent(),null===(r=this.loggerProvider)||void 0===r||r.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(nr,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(Ue),ir=function(e){function t(){var t;return e.call(this,null===(t=B())||void 0===t?void 0:t.sessionStorage)||this}return n(t,e),t}(Ue),or=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=t,n}return n(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),s(this,void 0,void 0,function(){var r=this;return u(this,function(i){return[2,new Promise(function(i,a){"undefined"==typeof XMLHttpRequest&&a(new Error("XHRTransport is not supported."));var d=new XMLHttpRequest;d.open("POST",e,!0),d.onreadystatechange=function(){if(d.readyState===r.state.done){var e=d.responseText;try{i(r.buildResponse(JSON.parse(e)))}catch(e){i(r.buildResponse({code:d.status}))}}};var f={"Content-Type":"application/json",Accept:"*/*"},v=JSON.stringify(t),p=n&&v.length>=2048&&Ze(),h=function(e){var t,n;f=o(o({},r.customHeaders),f);try{for(var i=c(Object.entries(f)),a=i.next();!a.done;a=i.next()){var s=l(a.value,2),u=s[0],v=s[1];d.setRequestHeader(u,v)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}d.send(e)};s(r,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return p?[4,et(v)]:[3,2];case 1:return(e=t.sent())?(f["Content-Encoding"]="gzip",h(e)):h(v),[3,3];case 2:h(v),t.label=3;case 3:return[2]}})}).catch(a)})]})})},t}(Qe),ar=function(e){function t(t,n,r){void 0===t&&(t={});var i=e.call(this)||this;return i.customHeaders=t,i.enableKeepalive=!1!==n,i.referrerPolicy=r,i}return n(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),s(this,void 0,void 0,function(){var r,i,a,s,c,l,d,f,v;return u(this,function(u){switch(u.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r=JSON.stringify(t),i=n&&r.length>=2048&&Ze(),a=r,s={"Content-Type":"application/json",Accept:"*/*"},i?[4,et(r)]:[3,2];case 1:(c=u.sent())&&(s["Content-Encoding"]="gzip",a=c),u.label=2;case 2:return s=o(o({},this.customHeaders),s),l="string"==typeof a?a.length:a.byteLength,d={headers:s,body:a,method:"POST",keepalive:this.enableKeepalive&&l<=16384},this.referrerPolicy&&(d.referrerPolicy=this.referrerPolicy),[4,fetch(e,d)];case 3:return[4,(f=u.sent()).text()];case 4:v=u.sent();try{return[2,this.buildResponse(JSON.parse(v))]}catch(e){return[2,this.buildResponse({code:f.status})]}return[2]}})})},t}(Qe),sr=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.send=function(e,t,n){return s(this,void 0,void 0,function(){var n=this;return u(this,function(r){return[2,new Promise(function(r,i){var o=B();if(!(null==o?void 0:o.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var a=JSON.stringify(t);return r(o.navigator.sendBeacon(e,a)?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:a.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(Qe),ur=function(e,t,n){return void 0===n&&(n=!0),s(void 0,void 0,void 0,function(){var r,i,o,a,s,c,d,f,p;return u(this,function(u){switch(u.label){case 0:return r=function(e){return"".concat(v.toLowerCase(),"_").concat(e.substring(0,6))}(e),[4,t.getRaw(r)];case 1:return(i=u.sent())?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:u.sent(),u.label=3;case 3:return o=l(i.split("."),6),a=o[0],s=o[1],c=o[2],d=o[3],f=o[4],p=o[5],[2,{deviceId:a,userId:lr(s),sessionId:cr(d),lastEventId:cr(p),lastEventTime:cr(f),optOut:Boolean(c)}]}})})},cr=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},lr=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},dr="[Amplitude]",fr="".concat(dr," Form Started"),vr="".concat(dr," Form Submitted"),pr="".concat(dr," File Downloaded"),hr="session_start",gr="session_end",mr="".concat(dr," File Extension"),yr="".concat(dr," File Name"),br="".concat(dr," Link ID"),wr="".concat(dr," Link Text"),Er="".concat(dr," Link URL"),Sr="".concat(dr," Form ID"),kr="".concat(dr," Form Name"),Tr="".concat(dr," Form Destination"),Pr="cookie",xr=Object.freeze({__proto__:null,get IdentifyOperation(){return r},get SpecialEventType(){return i},get RevenueProperty(){return q},get LogLevel(){return J},get ServerZone(){return dt},OfflineDisabled:null,DEFAULT_CSS_SELECTOR_ALLOWLIST:vt,DEFAULT_DATA_ATTRIBUTE_PREFIX:pt,DEFAULT_ACTION_CLICK_ALLOWLIST:ht,EXCLUDE_INTERNAL_REFERRERS_CONDITIONS:On}),_r=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},Ir=function(e,t,n,r,i,s){void 0===i&&(i=!0),e.referrer;var u=e.referring_domain,c=a(e,["referrer","referring_domain"]),l=t||{};l.referrer;var d,f=l.referring_domain,v=a(l,["referrer","referring_domain"]),p=n.excludeInternalReferrers;if(p){var h=Or(p,r);if(!(h instanceof TypeError)&&e.referring_domain&&Dr(e.referring_domain,s)){if("always"===h)return Cr(h,e.referring_domain,r),!1;if("ifEmptyCampaign"===h&&(d=o(o({},e),{referring_domain:void 0,referrer:void 0}),Object.values(d).every(function(e){return!e})))return Cr(h,e.referring_domain,r),!1}}if(Ar(n.excludeReferrers,e.referring_domain))return r.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&function(e){return Object.values(e).every(function(e){return!e})}(e)&&t)return r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var g=JSON.stringify(c)!==JSON.stringify(v),m=_r(u||"")!==_r(f||""),y=!t||g||m;return y?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),y},Ar=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},Or=function(e,t){if(!0===e)return On.always;if("object"==typeof e){var n=e.condition;if("string"==typeof n&&Object.keys(On).includes(n))return n;if(void 0===n)return On.always}var r="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(r),new TypeError(r)};function Cr(e,t,n){var r="This is not a new campaign because referring_domain=".concat(t," is on the same domain as the current page and it is configured to exclude internal referrers");"always"===e?n.debug(r):"ifEmptyCampaign"===e&&n.debug("".concat(r," with empty campaign parameters"))}var Rr=["ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.za","appspot.com","asn.au","azurewebsites.net","cloudfront.net","myshopify.com","blogspot.com","co.ca","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.ar","com.au","com.br","com.cn","com.hk","com.in","com.jp","com.kr","com.mx","com.pl","com.sg","com.tr","com.tw","ed.jp","edu.au","edu.br","edu.cn","edu.hk","edu.sg","edu.th","edu.tr","edu.tw","firebaseapp.com","fly.dev","gc.ca","geek.nz","github.io","gitlab.io","go.jp","go.kr","go.th","gob.ar","gob.mx","gov.au","gov.br","gov.cn","gov.hk","gov.in","gov.pl","gov.sg","gov.tr","gov.tw","gov.uk","gov.za","govt.nz","gr.jp","herokuapp.com","id.au","idv.hk","iwi.nz","lg.jp","ltd.uk","maori.nz","me.uk","mil.kr","ne.jp","ne.kr","net.au","net.br","net.cn","net.hk","net.in","net.nz","net.pl","net.sg","net.tr","net.tw","net.za","onrender.com","or.jp","or.kr","or.th","org.ar","org.au","org.br","org.cn","org.hk","org.in","org.mx","org.nz","org.pl","org.sg","org.tw","org.uk","org.za","pages.dev","pe.kr","plc.uk","re.kr","res.in","sch.uk","vercel.app","netlify.app","workers.dev"],Lr=function(e){var t,n,r=e||(null===(n=null===(t=B())||void 0===t?void 0:t.location)||void 0===n?void 0:n.hostname);if(!r)return"";var i=r.split("."),o=i[i.length-1],a=i[i.length-2];return Rr.find(function(e){return r.endsWith(".".concat(e))})&&(o=i[i.length-2]+"."+i[i.length-1],a=i[i.length-3]),a?"".concat(a,".").concat(o):o},Dr=function(e,t){var n=B();if(!n)return!1;var r,i,o,a=(t||"").trim()||Lr(n.location.hostname);return r=e,o=(i=a).startsWith(".")?i:".".concat(i),!!(r.startsWith(".")?r:".".concat(r)).endsWith(o)},Nr=function(e){function t(t,n,r,i,o,a,s,u,c,l,d,f,v,p,h,g,m,y,b,w,E,S,k,T,P,x,_,I,A,O,C,R,L,D,N,M,j,U,q,F,B,H,V,z){void 0===r&&(r=new Le),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===u&&(u=1e3),void 0===c&&(c=5),void 0===l&&(l=30),void 0===d&&(d=Pr),void 0===g&&(g=new X),void 0===m&&(m=J.Warn),void 0===b&&(b=!1),void 0===w&&(w=!1),void 0===k&&(k=""),void 0===T&&(T="US"),void 0===_&&(_=18e5),void 0===I&&(I=new rr({loggerProvider:g})),void 0===A&&(A={ipAddress:!0,language:!0,platform:!0}),void 0===O&&(O="fetch"),void 0===C&&(C=!1),void 0===R&&(R=!0),void 0===U&&(U=!0),void 0===q&&(q=0),void 0===V&&(V=!1);var W,$=this;($=e.call(this,{apiKey:t,storageProvider:I,transportProvider:Ur(O)})||this).apiKey=t,$.appVersion=n,$.cookieOptions=i,$.defaultTracking=o,$.autocapture=a,$.flushIntervalMillis=u,$.flushMaxRetries=c,$.flushQueueSize=l,$.identityStorage=d,$.ingestionMetadata=f,$.instanceName=v,$.loggerProvider=g,$.logLevel=m,$.minIdLength=y,$.offline=b,$.partnerId=E,$.plan=S,$.serverUrl=k,$.serverZone=T,$.sessionTimeout=_,$.storageProvider=I,$.trackingOptions=A,$.transport=O,$.useBatch=C,$.fetchRemoteConfig=R,$.networkTrackingOptions=M,$.identify=j,$.enableDiagnostics=U,$.diagnosticsSampleRate=q,$.diagnosticsClient=F,$.remoteConfig=B,$.topLevelDomain=H,$.enableRequestBodyCompression=V,$.customEnrichment=z,$.version=Zn,$._optOut=!1,$._cookieStorage=r,$.deviceId=s,$.lastEventId=p,$.lastEventTime=h,$.optOut=w,$.deferredSessionId=x,$.sessionId=P,$.pageCounter=D,$.userId=L,$.debugLogsEnabled=N,$.loggerProvider.enable(N?J.Debug:$.logLevel),$.networkTrackingOptions=M,$.identify=j,$.enableDiagnostics=U,$.diagnosticsSampleRate=q,$.diagnosticsClient=F;var K=null!==(W=null==B?void 0:B.fetchRemoteConfig)&&void 0!==W?W:R;return $.remoteConfig=$.remoteConfig||{},$.remoteConfig.fetchRemoteConfig=K,$.fetchRemoteConfig=K,$.topLevelDomain=H||Lr(),$}return n(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,void 0!==e&&void 0!==this._deferredSessionId&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(e){this._deferredSessionId!==e&&e!==this.sessionId&&(this._deferredSessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,deferredSessionId:this._deferredSessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};this.cookieStorage instanceof De&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(Pe(this.apiKey),e)},t}(Z),Mr=function(e,t,n,r,i){return void 0===t&&(t={}),s(void 0,void 0,void 0,function(){var a,s,c,l,d,f,v,p,h,g,m,y,b,w,E,S,k,T,P,x,_,I,A,O,C,R,L,D,N,M,j,U,q,F,B,H,z,W,$,K,G,J,Y,X,Q,Z,ee,te,ne,re,ie;return u(this,function(u){switch(u.label){case 0:return a=t.identityStorage||Pr,s="",a!==Pr||(null===(I=t.cookieOptions)||void 0===I?void 0:I.domain)||""===(null===(A=t.cookieOptions)||void 0===A?void 0:A.domain)?[3,2]:[4,qr(void 0,r)];case 1:s=u.sent(),u.label=2;case 2:return c=o({domain:null!==(C=null===(O=t.cookieOptions)||void 0===O?void 0:O.domain)&&void 0!==C?C:s,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},t.cookieOptions),l={duplicateResolverFn:function(e){var t=Ne(e);if(!t)return!1;var n=JSON.parse(t);return Me(n.cookieDomain,c.domain)},diagnosticsClient:r},d=jr(t.identityStorage,c,l),[4,ur(e,d,null===(L=null===(R=t.cookieOptions)||void 0===R?void 0:R.upgrade)||void 0===L||L)];case 3:return f=u.sent(),[4,d.get(Pe(e))];case 4:return v=u.sent(),p=_e(),h=p.ampTimestamp?Number(p.ampTimestamp):void 0,g=!h||Date.now()<h,m=null!==(U=null!==(j=null!==(M=null!==(D=t.deviceId)&&void 0!==D?D:g?null!==(N=p.ampDeviceId)&&void 0!==N?N:p.deviceId:void 0)&&void 0!==M?M:null==v?void 0:v.deviceId)&&void 0!==j?j:f.deviceId)&&void 0!==U?U:V(),y=null!==(q=null==v?void 0:v.lastEventId)&&void 0!==q?q:f.lastEventId,b=null!==(F=null==v?void 0:v.lastEventTime)&&void 0!==F?F:f.lastEventTime,w=null!==(H=null!==(B=t.optOut)&&void 0!==B?B:null==v?void 0:v.optOut)&&void 0!==H?H:f.optOut,E=null!==(z=null==v?void 0:v.sessionId)&&void 0!==z?z:f.sessionId,S=null==v?void 0:v.deferredSessionId,k=null!==($=null!==(W=t.userId)&&void 0!==W?W:null==v?void 0:v.userId)&&void 0!==$?$:f.userId,n.previousSessionDeviceId=null!==(K=null==v?void 0:v.deviceId)&&void 0!==K?K:f.deviceId,n.previousSessionUserId=null!==(G=null==v?void 0:v.userId)&&void 0!==G?G:f.userId,T={ipAddress:null===(Y=null===(J=t.trackingOptions)||void 0===J?void 0:J.ipAddress)||void 0===Y||Y,language:null===(Q=null===(X=t.trackingOptions)||void 0===X?void 0:X.language)||void 0===Q||Q,platform:null===(ee=null===(Z=t.trackingOptions)||void 0===Z?void 0:Z.platform)||void 0===ee||ee},P=null==v?void 0:v.pageCounter,x=null==v?void 0:v.debugLogsEnabled,void 0!==t.autocapture&&(t.defaultTracking=t.autocapture),[4,(_=new Nr(e,t.appVersion,d,c,t.defaultTracking,t.autocapture,m,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,a,t.ingestionMetadata,t.instanceName,y,b,null!==(te=null==i?void 0:i.loggerProvider)&&void 0!==te?te:t.loggerProvider,t.logLevel,t.minIdLength,t.offline,w,t.partnerId,t.plan,t.serverUrl,null!==(ne=null==i?void 0:i.serverZone)&&void 0!==ne?ne:t.serverZone,E,S,t.sessionTimeout,t.storageProvider,T,t.transport,t.useBatch,t.fetchRemoteConfig,k,P,x,t.networkTrackingOptions,t.identify,null!==(re=null==i?void 0:i.enableDiagnostics)&&void 0!==re?re:t.enableDiagnostics,null!==(ie=null==i?void 0:i.diagnosticsSampleRate)&&void 0!==ie?ie:n._diagnosticsSampleRate,r,t.remoteConfig,s,t.enableRequestBodyCompression,t.customEnrichment)).storageProvider.isEnabled()];case 5:return u.sent()||(_.loggerProvider.warn("Storage provider ".concat(_.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),_.storageProvider=new Le),[2,_]}})})},jr=function(e,t,n){switch(void 0===e&&(e=Pr),void 0===t&&(t={}),e){case"localStorage":return new rr;case"sessionStorage":return new ir;case"none":return new Le;default:return new De(o(o({},t),{expirationDays:t.expiration}),n)}},Ur=function(e){var t="object"==typeof e?e.type:e,n="object"==typeof e?e.headers:void 0,r="object"==typeof e?e.enableKeepalive:void 0,i="object"==typeof e?e.referrerPolicy:void 0;return"xhr"===t?new or(n):"beacon"===t?new sr:new ar(n,r,i)},qr=function(e,t){return s(void 0,void 0,void 0,function(){var n,r,i,o,a,s,c;return u(this,function(u){switch(u.label){case 0:return[4,new De(void 0,{diagnosticsClient:t}).isEnabled()];case 1:if(!u.sent()||!e&&("undefined"==typeof location||!location.hostname))return[2,""];if(n=null!=e?e:location.hostname,1===(r=n.split(".")).length)return[2,""];for(i=[],o=1,Rr.find(function(e){return n.endsWith(".".concat(e))})&&(o=2),a=r.length-o-1;a>=0;--a)i.push(r.slice(a).join("."));a=0,u.label=2;case 2:if(!(a<i.length))return[3,7];s=i[a],u.label=3;case 3:return u.trys.push([3,5,,6]),[4,De.isDomainWritable(s)];case 4:return u.sent()?[2,"."+s]:[3,6];case 5:return c=u.sent(),t&&t.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(s),error:c instanceof Error?c.message:String(c)}),[3,6];case 6:return a++,[3,2];case 7:return t&&t.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(n)}),[2,""]}})})},Fr="AMP_PAGE_VIEW",Br=function(e){var t;void 0===e&&(e={});var n,r,i=B(),a=void 0,c=!1,d=e.trackOn,f=e.trackHistoryChanges,v=e.eventType,p=void 0===v?"[Amplitude] Page Viewed":v,h=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==a||a.error("Malformed URI sequence: ",e)}return t},g=function(e){return s(void 0,void 0,void 0,function(){var t,n,r;return u(this,function(i){switch(i.label){case 0:return t=h("undefined"!=typeof location&&location.href||""),r={event_type:p},n=[{}],[4,Hr()];case 1:return[2,(r.event_properties=o.apply(void 0,[o.apply(void 0,n.concat([i.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":t,"[Amplitude] Page Path":"undefined"!=typeof location&&h(location.pathname)||"","[Amplitude] Page Title":Kt($t),"[Amplitude] Page URL":t.split("?")[0],"[Amplitude] Page View ID":e}]),r)]}})})},m=function(){return void 0===d||"function"==typeof d&&d()},y="undefined"!=typeof location?location.href:null,b=function(){s(void 0,void 0,void 0,function(){var e,n,i,o,s;return u(this,function(u){switch(u.label){case 0:return e=location.href,n=zr(f,e,y||"")&&m(),y=e,n?(i=void 0,r&&(i=V(),r.set(Fr,{pageViewId:i})),null==a||a.log("Tracking page view event"),null!=t?[3,1]:[3,3]):[3,4];case 1:return s=(o=t).track,[4,g(i)];case 2:s.apply(o,[u.sent()]),u.label=3;case 3:u.label=4;case 4:return[2]}})})},w={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,o){return s(void 0,void 0,void 0,function(){var s,d,f;return u(this,function(u){switch(u.label){case 0:if(t=o,n=e,(a=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),c=!0,i){try{r=new Ue(i.sessionStorage)}catch(e){null==a||a.debug("sessionStorage is not available in this environment.")}i.addEventListener("popstate",b),i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),c&&b()}})}return m()?(a.log("Tracking page view event"),s=void 0,r&&(s=V(),r.set(Fr,{pageViewId:s})),f=(d=t).track,[4,g(s)]):[3,2];case 1:f.apply(d,[u.sent()]),u.label=2;case 2:return[2]}})})},execute:function(e){return s(void 0,void 0,void 0,function(){var t,i,s;return u(this,function(u){switch(u.label){case 0:return"attribution"===d&&Vr(e)?(null==a||a.log("Enriching campaign event to page view event with campaign parameters"),t=void 0,r?[4,r.get(Fr)]:[3,2]):[3,4];case 1:i=u.sent(),t=null==i?void 0:i.pageViewId,u.label=2;case 2:return[4,g(t)];case 3:s=u.sent(),e.event_type=s.event_type,e.event_properties=o(o({},e.event_properties),s.event_properties),u.label=4;case 4:return n&&e.event_type===p&&(n.pageCounter=n.pageCounter?n.pageCounter+1:1,e.event_properties=o(o({},e.event_properties),{"[Amplitude] Page Counter":n.pageCounter})),[2,e]}})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){return i&&(i.removeEventListener("popstate",b),c=!1),[2]})})}};return w},Hr=function(){return s(void 0,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return e=Re,[4,(new Ft).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},Vr=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[r.SET]||{},i=t[r.UNSET]||{},o=d(d([],l(Object.keys(n)),!1),l(Object.keys(i)),!1);return Object.keys(C).every(function(e){return o.includes(e)})}return!1},zr=function(e,t,n){if("pathOnly"===e){if(""==n)return!0;var r=new URL(t),i=new URL(n);return r.origin+r.pathname!==i.origin+i.pathname}return t!==n},Wr=function(){var e,t,n=[],r=function(e,t,r){e.addEventListener(t,r),n.push({element:e,type:t,handler:r})};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(n,i){return s(void 0,void 0,void 0,function(){var o,a;return u(this,function(s){return t=function(e){if(qn(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&"object"==typeof e.defaultTracking.formInteractions)return e.defaultTracking.formInteractions}(n),o=function(){if(i){if("undefined"!=typeof document){var o=new WeakSet,a=function(e){if(!o.has(e)){o.add(e);var a=!1;r(e,"change",function(){var t,n=Kr(e);a||i.track(fr,((t={})[Sr]=$r(e.id),t[kr]=$r(e.name),t[Tr]=n,t)),a=!0}),r(e,"submit",function(r){var o,s,u=Kr(e);if(a||i.track(fr,((o={})[Sr]=$r(e.id),o[kr]=$r(e.name),o[Tr]=u,o)),a=!0,void 0!==(null==t?void 0:t.shouldTrackSubmit))if("function"==typeof t.shouldTrackSubmit&&"undefined"!=typeof SubmitEvent&&r instanceof SubmitEvent)try{if(!t.shouldTrackSubmit(r))return}catch(e){n.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else n.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.");i.track(vr,((s={})[Sr]=$r(e.id),s[kr]=$r(e.name),s[Tr]=u,s)),a=!1})}};Array.from(document.getElementsByTagName("form")).forEach(a),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&a(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(a)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.")},"complete"===document.readyState?o():(a=B())?a.addEventListener("load",o):n.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(t){return null==e||e.disconnect(),n.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),n=[],[2]})})}}},$r=function(e){if("string"==typeof e)return e},Kr=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},Gr=function(){var e,t=[];return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(n,r){return s(void 0,void 0,void 0,function(){var i,o;return u(this,function(a){return i=function(){if(r){if("undefined"!=typeof document){var i=function(e){var n;try{n=new URL(e.href,window.location.href)}catch(e){return}var i=o.exec(n.href),a=null==i?void 0:i[1];a&&function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})}(e,"click",function(){var t;a&&r.track(pr,((t={})[mr]=a,t[yr]=n.pathname,t[br]=e.id,t[wr]=e.text,t[Er]=e.href,t))})},o=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;Array.from(document.getElementsByTagName("a")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.")},"complete"===document.readyState?i():(o=B())?o.addEventListener("load",i):n.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(n){return null==e||e.disconnect(),t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[],[2]})})}}},Jr=!1,Yr=function(){var e=B(),t=[],n=function(n,r){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(n,r),t.push({type:n,handler:r}))};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return s(void 0,void 0,void 0,function(){return u(this,function(r){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1,[2]):(e.offline=!navigator.onLine,n("online",function(){!1!==e.offline&&(e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis))}),n("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0}),[2])})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(n){return t.forEach(function(t){var n=t.type,r=t.handler;null==e||e.removeEventListener(n,r)}),t=[],[2]})})}}};function Xr(e){var t,n,r,i,o,a,s,u,f,v,p,h;if("object"==typeof e&&null!==e&&!Array.isArray(e)){var g=Object.keys(e);try{for(var m=c(g),y=m.next();!y.done;y=m.next()){var b=y.value;try{var w=e[b];"boolean"==typeof(null==w?void 0:w.enabled)&&(w.enabled?(delete w.enabled,0===Object.keys(w).length&&(e[b]=!0)):e[b]=!1),Xr(w)}catch(e){}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{if(null===(f=null===(u=null===(s=e.autocapture)||void 0===s?void 0:s.networkTracking)||void 0===u?void 0:u.captureRules)||void 0===f?void 0:f.length)try{for(var E=c(e.autocapture.networkTracking.captureRules),S=E.next();!S.done;S=E.next()){var k=S.value;try{for(var T=(o=void 0,c(["responseHeaders","requestHeaders"])),P=T.next();!P.done;P=T.next()){var x=P.value,_=null!==(v=k[x])&&void 0!==v?v:{},I=_.captureSafeHeaders,A=_.allowlist;(I||A)&&(void 0===A||Array.isArray(A)?k[x]=d(d([],l(I?R:[]),!1),l(null!=A?A:[]),!1):delete k[x])}}catch(e){o={error:e}}finally{try{P&&!P.done&&(a=T.return)&&a.call(T)}finally{if(o)throw o.error}}}}catch(e){r={error:e}}finally{try{S&&!S.done&&(i=E.return)&&i.call(E)}finally{if(r)throw r.error}}}catch(e){}var O=null===(p=e.autocapture)||void 0===p?void 0:p.frustrationInteractions;O&&(O.rageClick&&(O.rageClicks=O.rageClick,delete O.rageClick),O.deadClick&&(O.deadClicks=O.deadClick,delete O.deadClick));try{var C=null===(h=e.autocapture)||void 0===h?void 0:h.elementInteractions;if(C&&"object"==typeof C&&(!0===C.viewportContentUpdated&&(C.viewportContentUpdated={}),!1===C.viewportContentUpdated&&(C.viewportContentUpdated={enabled:!1}),void 0!==C.exposureDuration)){var L=C.viewportContentUpdated;void 0===L?C.viewportContentUpdated={exposureDuration:C.exposureDuration}:"object"==typeof L&&void 0===L.exposureDuration&&!1!==L.enabled&&(L.exposureDuration=C.exposureDuration),delete C.exposureDuration}}catch(e){}}}function Qr(e,t,n){var r,i,o=[];try{for(var a=c(null!=t?t:[]),s=a.next();!s.done;s=a.next()){var u=s.value;try{o.push(new RegExp(u))}catch(e){n.loggerProvider.warn("Invalid regex pattern: ".concat(u),e)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return e.concat(o)}function Zr(e,t){var n,r,i,a,s,u,l;if(e){Xr(e);try{t.loggerProvider.debug("Update browser config with remote configuration:",Sn(e));var d=e;if(d&&"autocapture"in d){if("boolean"==typeof d.autocapture&&(t.autocapture=d.autocapture),"object"==typeof d.autocapture&&null!==d.autocapture){var f=o({},d.autocapture);if(void 0===t.autocapture&&(t.autocapture=d.autocapture),"object"==typeof d.autocapture.elementInteractions&&null!==d.autocapture.elementInteractions&&(null===(i=d.autocapture.elementInteractions.pageUrlAllowlistRegex)||void 0===i?void 0:i.length)){f.elementInteractions=o({},d.autocapture.elementInteractions);var v=f.elementInteractions,p=null!==(a=v.pageUrlAllowlist)&&void 0!==a?a:[],h=d.autocapture.elementInteractions.pageUrlAllowlistRegex;v.pageUrlAllowlist=Qr(p,h,t),delete v.pageUrlAllowlistRegex}if("object"==typeof d.autocapture.networkTracking&&null!==d.autocapture.networkTracking&&(null===(s=d.autocapture.networkTracking.captureRules)||void 0===s?void 0:s.length)){f.networkTracking=o({},d.autocapture.networkTracking);var g=null!==(u=f.networkTracking.captureRules)&&void 0!==u?u:[];try{for(var m=c(g),y=m.next();!y.done;y=m.next()){var b=y.value;b.urls=Qr(null!==(l=b.urls)&&void 0!==l?l:[],b.urlsRegex,t),delete b.urlsRegex}}catch(e){n={error:e}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}}"boolean"==typeof t.autocapture&&(t.autocapture=o({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},f)),"object"==typeof t.autocapture&&(t.autocapture=o(o({},t.autocapture),f))}t.defaultTracking=t.autocapture}"customEnrichment"in d&&null!==d.customEnrichment&&!1!==t.customEnrichment&&(t.customEnrichment=d.customEnrichment),t.loggerProvider.debug("Browser config after remote config update:",Sn(t))}catch(e){t.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}var ei,ti="1.28.2",ni="[Amplitude] Element Clicked",ri="[Amplitude] Element Tag",ii="[Amplitude] Element Text",oi="[Amplitude] Page URL",ai="[Amplitude] Viewport Height",si="[Amplitude] Viewport Width",ui="[Amplitude] Page View ID",ci="data-amp-mask-attributes",li=["input","select","textarea"],di=function(e){var t=e.pageUrlAllowlist,n=e.pageUrlExcludelist;return!(n&&n.length>0&&Ae(window.location.href,n))&&!!Ae(window.location.href,t)},fi=function(e,t){return function(n,r){var i,o,a=e.shouldTrackEventResolver,s=null===(o=null===(i=null==r?void 0:r.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===o?void 0:o.call(i);if(!s)return!1;if(a)return a(n,r);if(!di(e))return!1;var u=String(null==r?void 0:r.getAttribute("type"))||"";if("string"==typeof u)switch(u.toLowerCase()){case"hidden":case"password":return!1}if(t){var c=t.some(function(e){var t;return!!(null===(t=null==r?void 0:r.matches)||void 0===t?void 0:t.call(r,e))});if(!c)return!1}switch(s){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:return"click"===n}}},vi=function(e){return e?e.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[]},pi=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return function(e){return null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length}(r)||(t[n]=r),t},{})},hi=function(){var e;try{var t=B(),n=null===(e=null==t?void 0:t.sessionStorage)||void 0===e?void 0:e.getItem("AMP_PAGE_VIEW");if(!n)return;var r=JSON.parse(n);if("string"==typeof r.pageViewId)return r.pageViewId}catch(e){}},gi=function(e,t){return e?t.some(function(t){var n;return null===(n=null==e?void 0:e.matches)||void 0===n?void 0:n.call(e,t)})?e:gi(null==e?void 0:e.parentElement,t):null},mi=function(e){return!(null===e.event.target||!e.closestTrackedAncestor)};!function(e){e[e.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",e[e.MIDDLE=1]="MIDDLE",e[e.RIGHT=2]="RIGHT"}(ei||(ei={}));var yi="__AMPLITUDE_VISUAL_TAGGING__";var bi=B(),wi=function(){return new dn(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},Ei=function(e){return void 0===e&&(e="click"),new dn(function(t){var n,r=function(e){t.next(e)};return null===(n=B())||void 0===n||n.document.addEventListener(e,r,{capture:!0}),function(){var t;null===(t=B())||void 0===t||t.document.removeEventListener(e,r,{capture:!0})}})},Si=function(){var e=vn(new dn(function(e){var t=function(t){if(t instanceof ErrorEvent){var n={kind:"error"};t.error instanceof Error||t.error instanceof DOMException?n=o(o({},n),{message:t.error.message,stack:t.error.stack,filename:t.filename,lineNumber:t.lineno,columnNumber:t.colno}):"string"==typeof t.error&&(n.message=t.error),e.next(n)}};return bi.addEventListener("error",t),function(){bi.removeEventListener("error",t)}}),new dn(function(e){var t=function(t){var n={kind:"unhandledrejection"};t.reason instanceof Error||t.reason instanceof DOMException?(n.message=t.reason.message,n.stack=t.reason.stack):"string"==typeof t.reason&&(n.message=t.reason),e.next(n)};return bi.addEventListener("unhandledrejection",t),function(){bi.removeEventListener("unhandledrejection",t)}}));return vn(e,new dn(function(e){var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=void 0;Array.isArray(n[0])&&"string"==typeof n[0][0]&&(i=n[0][0]),e.next({kind:"console",message:i})};return ft.addListener("error",t),function(){ft.removeListener(t)}}))},ki=function(e,t,n){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},Ti={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},Pi=function(e){var t,n,r,i,o=Object.values(Ti).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var a=c(e),s=a.next();!s.done;s=a.next()){var u=s.value;try{try{for(var l=(r=void 0,c(u.definition)),d=l.next();!d.done;d=l.next()){var f=d.value,v=Ti[f.event_type];v&&o[v].add(u.id)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==u?void 0:u.id,e)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},xi=function(e){var t,n,r,i,o=new Map;try{for(var a=c(e),s=a.next();!s.done;s=a.next()){var u=s.value;try{for(var l=(r=void 0,c(u.conditions)),d=l.next();!d.done;d=l.next()){var f=d.value;if("LABELED_EVENT"===f.type){var v=f.match.eventId,p=o.get(v);p||(p=[],o.set(v,p)),p.push(u)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},_i=function(e,t){return t.filter(function(t){return t.definition.some(function(t){return Ti[t.event_type]===e.type&&t.filters.every(function(t){return function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){return console.error("Error matching event to filter",e),!1}return!1}(e,t)})})})},Ii=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var i=function(e,t){var n,r,i,o,a=new Set;try{for(var s=c(e),u=s.next();!u.done;u=s.next()){var l=u.value,d=t.get(l.id);if(d)try{for(var f=(i=void 0,c(d)),v=f.next();!v.done;v=f.next()){var p=v.value;a.add(p)}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Array.from(a)}(_i(e,Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]})),this.labeledEventToTriggerMap);try{for(var o=c(i),a=o.next();!a.done;a=o.next()){var s=a.value;ki(s.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}(),Ai=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",ci,Bt]),Oi=["type"],Ci=["svg","path","g"],Ri=["password","hidden"];function Li(e,t){var n,r,i,o,a,s;if(null===e)return null;var u=String(e.tagName).toLowerCase(),l={tag:u},d=Array.from(null!==(o=null===(i=e.parentElement)||void 0===i?void 0:i.children)&&void 0!==o?o:[]);d.length&&(l.index=d.indexOf(e),l.indexOfType=d.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var f=null===(s=null===(a=e.previousElementSibling)||void 0===a?void 0:a.tagName)||void 0===s?void 0:s.toLowerCase();f&&(l.prevSib=String(f));var v=e.getAttribute("id");v&&(l.id=String(v));var p=Array.from(e.classList);p.length&&(l.classes=p);var h={},g=Array.from(e.attributes).filter(function(e){return!Ai.has(e.name)}),m=!function(e){var t,n,r,i=null===(n=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t),o=e instanceof HTMLElement&&"true"===(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase());return!li.includes(i)&&!o}(e);if(!Ri.includes(String(e.getAttribute("type")))&&!Ci.includes(u))try{for(var y=c(g),b=y.next();!b.done;b=y.next()){var w=b.value;m&&!Oi.includes(w.name)||(t.has(w.name)?h[w.name]=Ht:h[w.name]=String(w.value).substring(0,128))}}catch(e){n={error:e}}finally{try{b&&!b.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return Object.keys(h).length&&(l.attrs=h),l}function Di(e,t){var n=e.getAttribute(t.explicitTrackingAttribute);if(null!==n&&""===n)return null;var r=e.getAttribute("id");return null===r||""===r?null:function(e,t){var n,r;if(null==e||""===e)return!1;try{for(var i=c(t),o=i.next();!o.done;o=i.next())if(o.value.test(e))return!1}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}(r,t.autogeneratedIdPatterns)?r:null}function Ni(e,t){return t.map(Mi).join(" > ")}function Mi(e){var t=e.tagName.toLowerCase(),n=e.parentElement;if(null===n)return t;var r=function(e,t){for(var n=0,r=0;r<t.children.length;r++){var i=t.children[r];if(i.tagName===e.tagName&&(n+=1,i===e))return n}return 1}(e,n);return"".concat(t,":nth-of-type(").concat(r,")")}function ji(e){var t=globalThis.CSS;if(t&&"function"==typeof t.escape)return t.escape(e);for(var n=String(e),r=n.length,i="",o=0;o<r;o++){var a=n.charCodeAt(o);0!==a?a>=1&&a<=31||127===a||0===o&&a>=48&&a<=57||1===o&&a>=48&&a<=57&&45===n.charCodeAt(0)?i+="\\".concat(a.toString(16)," "):i+=0!==o||1!==r||45!==a?a>=128||45===a||95===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?n.charAt(o):"\\".concat(n.charAt(o)):"\\-":i+="�"}return i}function Ui(e){return ji(e)}var qi=[{name:"explicitTrackingAttribute",try:function(e,t){var n=t.config.explicitTrackingAttribute,r=e.getAttribute(n);return null===r||""===r?null:"[".concat(n,"=").concat(JSON.stringify(r),"]")}},{name:"stableId",try:function(e,t){var n=Di(e,t.config);return null===n?null:"".concat(e.tagName.toLowerCase(),"#").concat(Ui(n))}}];function Fi(e,t,n){var r,i,o,a,s;void 0===n&&(n={});var u=null!==(o=n.strategies)&&void 0!==o?o:qi,l=null!==(s=null!==(a=n.scope)&&void 0!==a?a:e.ownerDocument)&&void 0!==s?s:document,d={scope:l,config:t},f=function(e,t){var n=[],r=e;for(;null!==r&&(n.push(r),!(void 0!==t&&n.length>t));)r=r.parentElement;return n}(e,t.maxAncestorWalkDepth);try{for(var v=c(u),p=v.next();!p.done;p=v.next())for(var h=p.value,g=0;g<f.length;g++){var m=f[g],y=h.try(m,d);if(null!==y)if(0!==g){var b=Ni(0,f.slice(0,g).reverse()),w="".concat(y," > ").concat(b);if(Bi(l,w,e,h.name,n.logger))return w}else if(Bi(l,y,e,h.name,n.logger))return y}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}return null}function Bi(e,t,n,r,i){var o;try{o=e.querySelectorAll(t)}catch(e){var a=e instanceof Error?e.message:String(e);return null==i||i.debug('@amplitude/element-selector: strategy "'.concat(r,'" emitted a malformed selector "').concat(t,'" (').concat(a,")")),!1}return 1===o.length&&o[0]===n}function Hi(e){var t=e.tagName.toLowerCase(),n=e.parentElement;if(null===n)return t;var r=function(e,t){for(var n=0,r=0;r<t.children.length;r++){var i=t.children[r];if(i.tagName===e.tagName&&(n+=1,i===e))return n}return 1}(e,n);return"".concat(t,":nth-of-type(").concat(r,")")}function Vi(e,t,n){var r;try{r=e.querySelectorAll(t)}catch(e){return!1}return 1===r.length&&r[0]===n}var zi=function(){function e(e,t){this.value=e,this.optimized=t}return e.prototype.toString=function(){return this.value},e}(),Wi=function(e,t,n){var r,i;if(e.nodeType!==Node.ELEMENT_NODE)return null;var o=e.getAttribute("id");if(t){if(o)return new zi(Ki(o),!0);var a=e.tagName.toLowerCase();if("body"===a||"head"===a||"html"===a)return new zi(a,!0)}var s=e.tagName.toLowerCase();if(o)return new zi(s+Ki(o),!0);var u=e.parentNode;if(!u||u.nodeType===Node.DOCUMENT_NODE)return new zi(s,!0);for(var l=$i(e),d=!1,f=!1,v=-1,p=-1,h=u.children,g=0;h&&(-1===v||!f)&&g<h.length;++g){var m=h[g];if(m.nodeType===Node.ELEMENT_NODE)if(p+=1,m!==e){if(!f&&m.tagName.toLowerCase()===s){d=!0;var y=new Set(l);if(y.size)for(var b=$i(m),w=0;w<b.length;++w){var E=b[w];if(y.has(E)&&(y.delete(E),!y.size)){f=!0;break}}else f=!0}}else v=p}var S=s;if(n&&"input"===s.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(S+="[type="+ji(e.getAttribute("type")||"")+"]"),f)S+=":nth-child("+String(v+1)+")";else if(d)try{for(var k=c(l),T=k.next();!T.done;T=k.next()){S+="."+ji(T.value.slice(1))}}catch(e){r={error:e}}finally{try{T&&!T.done&&(i=k.return)&&i.call(k)}finally{if(r)throw r.error}}return new zi(S,!1)},$i=function(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]},Ki=function(e){return"#"+ji(e)};function Gi(e,t){try{return function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var n=[],r=e;r;){var i=Wi(r,Boolean(t),r===e);if(!i)break;if(n.push(i),i.optimized)break;r=r.parentElement}return n.reverse(),n.join(" > ")}(e)}catch(e){var n=e instanceof Error?e.message:String(e);return null==t||t.warn("@amplitude/element-selector: legacyCssPath threw — emitting empty selector: ".concat(n)),""}}var Ji,Yi=Object.freeze({enabled:!1,explicitTrackingAttribute:"data-amp-track-id",autogeneratedIdPatterns:d([],l([/^:r[0-9a-z]+:$/,/^radix-/,/^headlessui-/,/^mui-/,/^[a-f0-9]{16,}$/i,/-\d{8,}$/,/\d{4,}/]),!1),unstableClassPatterns:d([],l([/^(p|m|px|py|mx|my|pt|pb|pl|pr|mt|mb|ml|mr)-\d+$/,/^(w|h|min-w|max-w|min-h|max-h)-/,/^(text|bg|border|ring|fill|stroke)-/,/^(hover|focus|active|disabled|group-hover):/,/^(sm|md|lg|xl|2xl):/,/^z-\d+$/,/^data-\[/,/^\[/,/^css-[a-z0-9]{6,}$/,/^[a-zA-Z]+_[a-zA-Z0-9]{3,}__[a-zA-Z0-9]{5,}$/,/^sc-[a-zA-Z0-9]{6,}$/,/^jsx-\d+$/,/^swiper-slide-(visible|fully-visible|active|prev|next|duplicate)$/,/^is-(active|open|selected|hovered|focused|expanded)$/,/^Mui[A-Z][a-zA-Z]+-(focused|selected|disabled|expanded|focusVisible|active|checked)$/,/^Mui-(selected|focused|disabled|expanded|focusVisible|active|checked)$/,/^data-state-/]),!1),maxAncestorWalkDepth:void 0});function Xi(e,t){if(!e)return Qi();var n,r=Qi();return"boolean"==typeof e.enabled&&(r.enabled=e.enabled),"string"==typeof e.explicitTrackingAttribute&&""!==e.explicitTrackingAttribute&&(r.explicitTrackingAttribute=e.explicitTrackingAttribute),Array.isArray(e.autogeneratedIdPatterns)&&(r.autogeneratedIdPatterns=function(e,t){var n,r,i=[];try{for(var o=c(e),a=o.next();!a.done;a=o.next()){var s=a.value;try{i.push(new RegExp(s))}catch(e){var u=e instanceof Error?e.message:String(e);null==t||t.warn('@amplitude/element-selector: ignoring invalid autogenerated-id pattern "'.concat(s,'" (').concat(u,")"))}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(e.autogeneratedIdPatterns,t)),Array.isArray(e.unstableClassPatterns)&&(r.unstableClassPatterns=function(e,t){var n,r,i=[];try{for(var o=c(e),a=o.next();!a.done;a=o.next()){var s=a.value;try{i.push(new RegExp(s))}catch(e){var u=e instanceof Error?e.message:String(e);null==t||t.warn('@amplitude/element-selector: ignoring invalid unstable-class pattern "'.concat(s,'" (').concat(u,")"))}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(e.unstableClassPatterns,t)),r.maxAncestorWalkDepth="number"!=typeof(n=e.maxAncestorWalkDepth)?void 0:Number.isFinite(n)?n<=0?void 0:Math.floor(n):void 0,r}function Qi(){return{enabled:Yi.enabled,explicitTrackingAttribute:Yi.explicitTrackingAttribute,autogeneratedIdPatterns:d([],l(Yi.autogeneratedIdPatterns),!1),unstableClassPatterns:d([],l(Yi.unstableClassPatterns),!1),maxAncestorWalkDepth:Yi.maxAncestorWalkDepth}}function Zi(e,t){void 0===t&&(t={});var n=e,r=new Set,i=t.logger,o={strategies:t.strategies,scope:t.scope,logger:i};return{generate:function(e){var r,a;if(!n.enabled)return Gi(e,i);try{var s=Fi(e,n,o);return null!==s?s:function(e,t,n){var r,i;void 0===n&&(n={});for(var o=null!==(i=null!==(r=n.scope)&&void 0!==r?r:e.ownerDocument)&&void 0!==i?i:document,a=[],s=e,u=0;null!==s&&!(void 0!==t.maxAncestorWalkDepth&&u>t.maxAncestorWalkDepth);){var c=Di(s,t);if(null!==c){var f=d(["".concat(s.tagName.toLowerCase(),"#").concat(Ui(c))],l(a),!1).join(" > ");if(Vi(o,f,e))return f}a.unshift(Hi(s)),s=s.parentElement,u+=1}return a.join(" > ")}(e,n,{scope:null!==(a=null!==(r=t.scope)&&void 0!==r?r:e.ownerDocument)&&void 0!==a?a:document})}catch(t){var u=t instanceof Error?t.message:String(t);return null==i||i.warn("@amplitude/element-selector: strategy chain threw — falling back to legacy cssPath: ".concat(u)),Gi(e,i)}},getConfig:function(){return n},updateConfig:function(e){var t,o;n=e;try{for(var a=c(r),s=a.next();!s.done;s=a.next()){var u=s.value;try{u(e)}catch(e){var l=e instanceof Error?e.message:String(e);null==i||i.warn("@amplitude/element-selector: onConfigChange subscriber threw — ".concat(l))}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}},onConfigChange:function(e){return r.add(e),function(){r.delete(e)}}}}var eo,to=function(e,t){var n,r,i,o=this;this.replaceSensitiveString=function(e){return $t(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,i,a,s=performance.now();if(!e)return[];for(var u=function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e),f=new Map,v=u.length-1;v>=0;v--){var p=u[v];if(p){var h=vi(p.getAttribute(ci)),g=v===u.length-1?[]:null!==(r=f.get(u[v+1]))&&void 0!==r?r:new Set,m=new Set(d(d([],l(g),!1),l(h),!1));f.set(p,m)}}a=u.map(function(e){var t;return Li(e,null!==(t=f.get(e))&&void 0!==t?t:new Set)});var y=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var n=l(t,2),r=n[0],i=n[1];e.attrs&&(e.attrs[r]=o.replaceSensitiveString(i))})};try{for(var b=c(a),w=b.next();!w.done;w=b.next())y(w.value)}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=b.return)&&n.call(b)}finally{if(t)throw t.error}}var E=performance.now();return null===(i=o.diagnosticsClient)||void 0===i||i.recordHistogram("autocapturePlugin.getHierarchy",E-s),a},this.getNearestLabel=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?o.getText(t):o.getNearestLabel(n)},this.getElementPath=function(e){var t;if(!e)return"";var n=performance.now(),r=o.selectorEngine.generate(e),i=performance.now();return null===(t=o.diagnosticsClient)||void 0===t||t.recordHistogram("autocapturePlugin.getElementPath",i-n),r},this.updateSelectorConfig=function(e,t){o.selectorEngine.updateConfig(Xi(null!=e?e:void 0,t))},this.getEventProperties=function(e,t,n){var r,i,a,s,u,c,d=null===(a=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===a?void 0:a.call(i),f="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},v=o.getHierarchy(t),p=null===(s=v[0])||void 0===s?void 0:s.attrs,h=o.getNearestLabel(t),g=(u=null!=p?p:{},c=n,Object.entries(u).reduce(function(e,t){var n=l(t,2),r=n[0],i=n[1];if(r.startsWith(c)){var o=r.replace(c,"");o&&(e[o]=i||"")}return e},{})),m=((r={})["[Amplitude] Element Hierarchy"]=v,r[ri]=d,r[ii]=o.getText(t),r["[Amplitude] Element Position Left"]=null==f.left?null:Math.round(f.left),r["[Amplitude] Element Position Top"]=null==f.top?null:Math.round(f.top),r["[Amplitude] Element Attributes"]=g,r["[Amplitude] Element Path"]=o.getElementPath(t),r["[Amplitude] Element Parent Label"]=h,r[oi]=Oe(window.location.href.split("?")[0]),r["[Amplitude] Page Title"]=Kt(o.replaceSensitiveString),r[ai]=window.innerHeight,r[si]=window.innerWidth,r),y=hi();if(y&&(m[ui]=y),m["[Amplitude] Element ID"]=t.getAttribute("id")||"",m["[Amplitude] Element Class"]=t.getAttribute("class"),m["[Amplitude] Element Aria Label"]=null==p?void 0:p["aria-label"],"a"===d&&"click"===e&&t instanceof HTMLAnchorElement){var b=t.href.substring(0,128);m["[Amplitude] Element Href"]=o.replaceSensitiveString(b)}return pi(m)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,i){void 0===i&&(i=!1);var a=o.addTypeAndTimestamp(e,t);if(function(e){return"click"===e.type||"change"===e.type}(a)&&null!==a.event.target){if(i){var s=function(e,t){var n,r=null===(n=null===window||void 0===window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,e);return"pointer"===(null==r?void 0:r.getPropertyValue("cursor"))&&"click"===t}(a.event.target,a.type);if(s)return a.closestTrackedAncestor=a.event.target,a.targetElementProperties=o.getEventProperties(a.type,a.closestTrackedAncestor,r),a}var u=gi(a.event.target,n);return u&&(a.closestTrackedAncestor=u,a.targetElementProperties=o.getEventProperties(a.type,u,r)),a}return a},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var n=document.documentElement;return e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector?n.querySelector(e.selector):n}}catch(e){return}}(e,t);if(!n)return;return"TEXT"===e.elementExtractType?o.getText(n):"ATTRIBUTE"===e.elementExtractType&&e.attribute?n.getAttribute(e.attribute):void 0}},this.getTextWithMaskedDescendants=function(e){var t,n,r="[".concat(Bt,"], [contenteditable]");if(!e.querySelector(r))return e.innerText;var i="",a=Array.from(e.childNodes);try{for(var s=c(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.nodeType!==Node.TEXT_NODE?l instanceof Element&&(l.hasAttribute(Bt)||l.hasAttribute("contenteditable")?i+=Ht:i+=o.getTextWithMaskedDescendants(l)):i+=l.textContent||""}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i},this.getText=function(e){if(null!==e.closest("[".concat(Bt,"]")))return Ht;var t="";return t=e.querySelector("[".concat(Bt,"], [contenteditable]"))?o.getTextWithMaskedDescendants(e):e.innerText||"",o.replaceSensitiveString(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){var t,n,r;if(!e)return{};var i=null===(r=null===(n=null==e?void 0:e.tagName)||void 0===n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n),a=((t={})[ri]=i,t[ii]=o.getText(e),t[oi]=window.location.href.split("?")[0],t);return pi(a)},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient,this.selectorEngine=(Ji||(Ji=Zi(Xi())),Ji);var a=null!==(i=e.maskTextRegex)&&void 0!==i?i:[],s=[];try{for(var u=c(a),f=u.next();!f.done;f=u.next()){var v=f.value;if(s.length>=25)break;if(v instanceof RegExp)s.push(v);else if("pattern"in v&&"string"==typeof v.pattern)try{s.push(new RegExp(v.pattern,"i"))}catch(e){}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=s};function no(e,t){var n=e.remoteConfigClient;if(e.fetchRemoteConfig&&n){var r=n.subscribe("configs.analyticsSDK.elementSelector","all",function(n){t.updateSelectorConfig(n,e.loggerProvider)});return function(){n.unsubscribe(r)}}}!function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable",e.ScrollObservable="scrollObservable",e.ExposureObservable="exposureObservable",e.BrowserErrorObservable="browserErrorObservable",e.SelectionObservable="selectionObservable",e.MouseMoveObservable="mouseMoveObservable"}(eo||(eo={}));var ro=function(e,t){var n,r,i,a,f,v,p,h,g,m,y,b;void 0===e&&(e={}),null==t||t.diagnosticsClient.setTag("plugin.autocapture.version",ti);var w=e.dataAttributePrefix,E=void 0===w?pt:w,S=e.visualTaggingOptions,k=void 0===S?{enabled:!0}:S;e.cssSelectorAllowlist=null!==(n=e.cssSelectorAllowlist)&&void 0!==n?n:vt,e.actionClickAllowlist=null!==(r=e.actionClickAllowlist)&&void 0!==r?r:ht,e.debounceTime=null!==(i=e.debounceTime)&&void 0!==i?i:0;var T=!1!==(null===(a=e.viewportContentUpdated)||void 0===a?void 0:a.enabled),P=null!==(p=null!==(v=null===(f=e.viewportContentUpdated)||void 0===f?void 0:f.exposureDuration)&&void 0!==v?v:e.exposureDuration)&&void 0!==p?p:150;e.viewportContentUpdated=o(o({},e.viewportContentUpdated),{exposureDuration:P}),e.pageUrlExcludelist=null===(h=e.pageUrlExcludelist)||void 0===h?void 0:h.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(n){return console.warn("Invalid regex pattern: ".concat(t.pattern),n),e}return e},[]);var x,_="@amplitude/plugin-autocapture-browser",I=[],A=new to(e,t),O=new Set,C=new Set,R=function(){var t,n,r=pn(Ei().map(function(t){return A.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,E)})),i=pn(new dn(function(t){var n,r=function(n){var r=A.addAdditionalEventProperties(n,"change",e.cssSelectorAllowlist,E);t.next(r)};return null===(n=B())||void 0===n||n.document.addEventListener("change",r,{capture:!0}),function(){var e;return null===(e=B())||void 0===e?void 0:e.document.removeEventListener("change",r)}}));window.navigation&&(n=pn(new dn(function(t){var n=function(n){var r=A.addAdditionalEventProperties(n,"navigate",e.cssSelectorAllowlist,E);t.next(r)};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}})));var o=pn(wi().map(function(t){return A.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,E)})),a=new dn(function(e){var t,n=function(t){e.next(t)};return null===(t=B())||void 0===t||t.addEventListener("scroll",n),function(){var e;null===(e=B())||void 0===e||e.removeEventListener("scroll",n)}}),s=function(e,t){return new dn(function(n){var r,i=B();if(!(null==i?void 0:i.IntersectionObserver))return function(){};var o=new IntersectionObserver(function(e){e.forEach(function(e){n.next(e)})},{root:null,rootMargin:"0px",threshold:1}),a=t.join(",");(null!==(r=null==i?void 0:i.document.querySelectorAll(a))&&void 0!==r?r:[]).forEach(function(e){o.observe(e)});var s=e.subscribe(function(e){return e.event.forEach(function(e){return e.addedNodes.forEach(function(e){e instanceof Element&&(e.matches(a)&&o.observe(e),e.querySelectorAll(a).forEach(function(e){o.observe(e)}))})})});return function(){s.unsubscribe(),o.disconnect()}})}(o,e.cssSelectorAllowlist);return(t={})[eo.ChangeObservable]=i,t[eo.ClickObservable]=r,t[eo.MutationObservable]=o,t[eo.NavigateObservable]=n,t[eo.ScrollObservable]=a,t[eo.ExposureObservable]=s,t},L=Pi(Object.values(null!==(m=null===(g=e.pageActions)||void 0===g?void 0:g.labeledEvents)&&void 0!==m?m:{})),D=xi(null!==(b=null===(y=e.pageActions)||void 0===y?void 0:y.triggers)&&void 0!==b?b:[]),N=function(e,t,n,r){return new Ii(e,t,n,r)}(L,D,A,e);return{name:_,type:"enrichment",setup:function(t,n){return s(void 0,void 0,void 0,function(){var r,i,a,s,c,f,v,p,h,g,m,y,b,w,S,M,j,U,q,F,H,V;return u(this,function(u){return"undefined"==typeof document||(r=!1,i={maxX:void 0,maxY:void 0},t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(t){!function(t){var n,r;t&&(e.pageActions=o(o({},e.pageActions),t),L=Pi(Object.values(null!==(n=e.pageActions.labeledEvents)&&void 0!==n?n:{})),D=xi(null!==(r=e.pageActions.triggers)&&void 0!==r?r:[]),N.update(L,D,e))}(t)}):t.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),(a=no(t,A))&&I.push({unsubscribe:a}),s=fi(e,e.cssSelectorAllowlist),c=fi(e,e.actionClickAllowlist),f=R(),v=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackEvent,i=e.evaluateTriggers;return n.clickObservable.filter(mi).filter(function(e){return r("click",e.closestTrackedAncestor)}).map(function(e){return i(e)}).subscribe(function(e){null==t||t.track(ni,e.targetElementProperties)})}({allObservables:f,amplitude:n,shouldTrackEvent:s,evaluateTriggers:N.evaluate.bind(N)}),I.push(v),p=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers;return n.changeObservable.filter(mi).filter(function(e){return i("change",e.closestTrackedAncestor)}).map(function(e){return o(e)}).subscribe(function(e){null==t||t.track("[Amplitude] Element Changed",r("change",e.closestTrackedAncestor))})}({allObservables:f,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A.getEventProperties.apply(A,d(d([],l(e),!1),[E],!1))},amplitude:n,shouldTrackEvent:s,evaluateTriggers:N.evaluate.bind(N)}),I.push(p),h=function(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,a=e.shouldTrackActionClick,s=n.clickObservable,u=n.mutationObservable,c=n.navigateObservable,l=s.filter(function(e){return!o("click",e.closestTrackedAncestor)}).map(function(e){var t=gi(e.event.target,r.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=i(e.type,e.closestTrackedAncestor)),e}).filter(mi).filter(function(e){return a("click",e.closestTrackedAncestor)}),d=c?vn(u,c):u,f=vn(l,d),v=null,p=null;return fn(f,function(e){if(v&&(clearTimeout(v),v=null),"click"===e.type)return p=e,v=setTimeout(function(){v=null,p=null},500),Promise.resolve(null);if(p){var t=p;return p=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==t||t.track(ni,i("click",e.closestTrackedAncestor)))})}({allObservables:f,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A.getEventProperties.apply(A,d(d([],l(e),!1),[E],!1))},amplitude:n,shouldTrackEvent:s,shouldTrackActionClick:c}),h&&I.push(h),g=function(e){e.amplitude;var t=e.allObservables.scrollObservable,n={maxX:0,maxY:0},r=t.subscribe(function(){var e,t,r,i,o=B(),a=Math.floor(null!==(t=null!==(e=null==o?void 0:o.scrollX)&&void 0!==e?e:null==o?void 0:o.pageXOffset)&&void 0!==t?t:0),s=Math.floor(null!==(i=null!==(r=null==o?void 0:o.scrollY)&&void 0!==r?r:null==o?void 0:o.pageYOffset)&&void 0!==i?i:0);n.maxX=Math.max(n.maxX,a),n.maxY=Math.max(n.maxY,s)});return{unsubscribe:function(){r.unsubscribe()},getState:function(){return n},reset:function(){n.maxX=0,n.maxY=0}}}({allObservables:f,amplitude:n}),I.push(g),m={},y=B(),b=function(e){e&&r||(setTimeout(function(){r=!1},100),r=!0,function(e){var t,n,r,i,o,a,s=e.amplitude,u=e.scrollTracker,c=e.currentElementExposed,l=e.elementExposedForPage,d=e.exposureTracker,f=e.isPageEnd,v=e.lastScroll,p=u.getState(),h=B(),g=null!==(n=null==h?void 0:h.innerWidth)&&void 0!==n?n:0,m=null!==(r=null==h?void 0:h.innerHeight)&&void 0!==r?r:0,y=((t={})[oi]=Oe(null!==(a=null===(o=null===(i=null==h?void 0:h.location)||void 0===i?void 0:i.href)||void 0===o?void 0:o.split("?")[0])&&void 0!==a?a:""),t["[Amplitude] Max Page X"]=p.maxX+g,t["[Amplitude] Max Page Y"]=p.maxY+m,t[ai]=m,t[si]=g,t["[Amplitude] Element Exposed"]=Array.from(c),t),b=hi();b&&(y[ui]=b),0!==c.size||p.maxX!==v.maxX||p.maxY!==v.maxY?(null==s||s.track("[Amplitude] Viewport Content Updated",y),v.maxX=p.maxX,v.maxY=p.maxY,c.clear(),f&&(u.reset(),l.clear(),null==d||d.reset())):f&&(u.reset(),l.clear(),null==d||d.reset())}({amplitude:n,scrollTracker:g,currentElementExposed:C,elementExposedForPage:O,exposureTracker:m.exposure,isPageEnd:e,lastScroll:i}))},w=function(e){!function(e,t,n,r){if(!t.has(e)){t.add(e),n.add(e);var i=Array.from(n);JSON.stringify(i).length>=18e3&&r(!1)}}(e,O,C,b)},T&&(m.exposure=function(e){var t=e.allObservables,n=e.onExposure,r=e.dataExtractor,i=e.exposureDuration,o=void 0===i?150:i,a=new Map,s=new Map,u=t.exposureObservable.subscribe(function(e){var t=e,i=t.target;if(t.isIntersecting){if(!a.get(i)){var u=setTimeout(function(){a.set(i,!0);var e=r.getElementPath(i);n(e),s.set(i,null)},o);s.set(i,u)}}else!t.isIntersecting&&t.intersectionRatio<1&&(u=s.get(i))&&(clearTimeout(u),s.set(i,null))});return{unsubscribe:function(){u.unsubscribe()},reset:function(){s.forEach(function(e){e&&clearTimeout(e)}),s.clear(),a.clear()}}}({allObservables:f,onExposure:w,dataExtractor:A,exposureDuration:P}),m.exposure&&I.push(m.exposure),S=function(){b(!0)},null==y||y.addEventListener("beforeunload",S),x=function(){null==y||y.removeEventListener("beforeunload",S)},I.push({unsubscribe:function(){return x()}}),(M=f[eo.NavigateObservable])?I.push(M.subscribe(function(){b(!0)})):y&&(j=function(){b(!0)},y.addEventListener("popstate",j),U=y.history.pushState,y.history&&U&&(y.history.pushState=new Proxy(U,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),b(!0)}})),I.push({unsubscribe:function(){y.removeEventListener("popstate",j),y.history&&U&&(y.history.pushState=U)}}))),null===(V=null==t?void 0:t.loggerProvider)||void 0===V||V.log("".concat(_," has been successfully added.")),window.opener&&k.enabled&&(q=e.cssSelectorAllowlist,F=e.actionClickAllowlist,function(e,t){var n=e;if(!0!==n[yi]){n[yi]=!0;var r=t.dataExtractor,i=t.isElementSelectable,o=t.cssSelectorAllowlist,a=t.actionClickAllowlist,s=null,u=function(t){e.notify({action:"element-selected",data:t})},c=function(t,n){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:n}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:n})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce("https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz").then(function(){var n;s=null===(n=null===window||void 0===window?void 0:window.amplitudeVisualTaggingSelector)||void 0===n?void 0:n.call(window,{getEventTagProps:r.getEventTagProps,isElementSelectable:function(e){return!i||i((null==t?void 0:t.actionType)||"click",e)},onTrack:c,onSelect:u,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:e,cssSelectorAllowlist:o,actionClickAllowlist:a,extractDataFromDataSource:r.extractDataFromDataSource,dataExtractor:r,diagnostics:{autocapture:{version:ti}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null===(e=null==s?void 0:s.close)||void 0===e||e.call(s)})}}(H=In(),{dataExtractor:A,isElementSelectable:fi(e,d(d([],l(q),!1),l(F),!1)),cssSelectorAllowlist:q,actionClickAllowlist:F}),function(e,t){var n,r=e;if(!0!==r[An]){r[An]=!0;var i=null!==(n=null==t?void 0:t.scriptUrl)&&void 0!==n?n:"https://cdn.amplitude.com/libs/background-capture-1.0.1.js.gz",o=null,a=function(t,n){var r,i;"background-capture-complete"===t&&(null===(i=null===(r=e.logger)||void 0===r?void 0:r.debug)||void 0===i||i.call(r,"Background capture complete"),e.notify({action:"background-capture-complete",data:n}))};e.registerActionHandler("initialize-background-capture",function(){var t,n;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Initializing background capture (external script)");var r=new URL(i,e.endpoint).toString();e.loadScriptOnce(r).then(function(){var t,n,r;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Background capture script loaded (external)"),o=null===(r=null===window||void 0===window?void 0:window.amplitudeBackgroundCapture)||void 0===r?void 0:r.call(window,{messenger:e,onBackgroundCapture:a}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null===(e=null==o?void 0:o.close)||void 0===e||e.call(o),o=null})}}(H),H.setup(o({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:Tn[t.serverZone]})))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t,n,r;return u(this,function(i){try{for(e=c(I),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return[2]})})}}},io=["mutation","navigate"];function oo(e,t){var n,r,i,o,a=t.event,s=a.pageX,u=a.pageY;e.yMin=Math.min(null!==(n=e.yMin)&&void 0!==n?n:u,u),e.yMax=Math.max(null!==(r=e.yMax)&&void 0!==r?r:u,u),e.xMin=Math.min(null!==(i=e.xMin)&&void 0!==i?i:s,s),e.xMax=Math.max(null!==(o=e.xMax)&&void 0!==o?o:s,s),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function ao(e){if(0===e.length)return null;var t=e[0],n=e[e.length-1];return{rageClickEvent:o({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(n.timestamp).toISOString(),"[Amplitude] Duration":n.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties),time:t.timestamp}}function so(e){var t=this,n=e.amplitude,r=e.allObservables,i=e.shouldTrackRageClick,o=r.clickObservable,a=r.selectionObservable,c=[],l={},d=null;function f(e){c=[],l={},e&&(oo(l,e),c.push(e))}var v=fn(o.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return s(t,void 0,void 0,function(){var t;return u(this,function(n){return oo(l,e),t=null,0===c.length||function(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}(c,e)||function(e,t){var n=e[Math.max(0,e.length-4+1)];return t.timestamp-n.timestamp>=1e3}(c,e)||l.isOutOfBounds?(d&&(t=ao(c)),f(e)):c.push(e),d&&(clearTimeout(d.timerId),d.resolve(t),d=null),c.length>=4?[2,new Promise(function(e){d={resolve:e,timerId:setTimeout(function(){e(ao(c))},1e3)}})]:[2,null]})})}),p=null==a?void 0:a.subscribe(function(){f()}),h=v.subscribe(function(e){null!==e&&n.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){h.unsubscribe(),null==p||p.unsubscribe()}}}var uo,co;!function(e){e.INCREASING="increasing",e.DECREASING="decreasing"}(uo||(uo={})),function(e){e.X="x",e.Y="y"}(co||(co={}));function lo(e){var t=e.changes,n=e.changesThreshold,r=e.thresholdMs;return!(t.length<n)&&t[t.length-1]-t[0]<r}function fo(e){e.changes=[],e.startTime=void 0}function vo(e){for(var t=e.changes,n=e.thresholdMs,r=0,i=t[t.length-1];r<t.length;r++){if(i-t[r]<n)break}0!==r&&(e.startTime=t[r],e.changes.splice(0,r))}var po=function(e){var t=e.mouseDirectionChangeObservable,n=e.directionChanges,r=void 0===n?20:n,i=e.thresholdMs,o=void 0===i?2e3:i;return new dn(function(e){var n={changes:[],changesThreshold:r,thresholdMs:o},i={changes:[],changesThreshold:r,thresholdMs:o},a=void 0,s=null;function u(){void 0!==a&&(e.next(a),a=void 0,null!==s&&clearTimeout(s),fo(n),fo(i))}return t.subscribe(function(e){null!==s&&clearTimeout(s),function(e){var t=+Date.now();e.startTime=e.startTime||t;var n=e.changes,r=e.changesThreshold;n.push(t),n.length>r&&n.shift()}(e===co.X?n:i);var t=function(e,t){var n=void 0;if(lo(e)&&(n=e.startTime),lo(t)){var r=t.startTime;r&&(!n||r<n)&&(n=r)}return n}(n,i);return t?(a=a||t,s=setTimeout(function(){u(),s=null},o)):u(),vo(n),vo(i),function(){null!==s&&(clearTimeout(s),s=null)}})})},ho=function(e){var t=e.amplitude,n=e.options,r=e.allObservables,i=e.directionChanges,o=void 0===i?20:i,a=e.thresholdMs,s=void 0===a?2e3:a,u=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new dn(function(e){var n=null,r=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};null!==n?(o.x>n.x?(r===uo.DECREASING&&e.next(co.X),r=uo.INCREASING):o.x<n.x&&(r===uo.INCREASING&&e.next(co.X),r=uo.DECREASING),o.y>n.y?(i===uo.DECREASING&&e.next(co.Y),i=uo.INCREASING):o.y<n.y&&(i===uo.INCREASING&&e.next(co.Y),i=uo.DECREASING),n=o):n=o})})}({allWindowObservables:r});return po({mouseDirectionChangeObservable:u,directionChanges:o,thresholdMs:s}).subscribe(function(e){di(n)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})};function go(e,t,n,r){if(!r)return[];var i=e[t];return"object"==typeof i&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n}var mo=4e3,yo=function(e){var t;void 0===e&&(e={});var n="@amplitude/plugin-frustration-browser",r=[],i=!1!==e.errorClicks;e.errorClicks||(i=!1);var a=!1!==e.deadClicks&&null!==e.deadClicks,f=!1!==e.rageClicks&&null!==e.rageClicks,v=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(v=!1);var p=go(e,"rageClicks",bt,f),h=go(e,"deadClicks",mt,a),g=go(e,"errorClicks",yt,i),m=null!==(t=e.dataAttributePrefix)&&void 0!==t?t:pt,y=new to(e),b=d([],l(new Set(d(d(d([],l(p),!1),l(h),!1),l(g),!1))),!1),w=function(){var e,t,n=pn(Ei("pointerdown").map(function(e){return y.addAdditionalEventProperties(e,"click",b,m,!0)})),r=pn(Si().map(function(e){return y.addTypeAndTimestamp(e,"error")})),i=pn(wi().map(function(e){return y.addAdditionalEventProperties(e,"mutation",b,m)}));window.navigation&&(t=pn(new dn(function(e){var t=function(t){e.next(o(o({},t),{type:"navigate"}))};return window.navigation.addEventListener("navigate",t),function(){window.navigation.removeEventListener("navigate",t)}}).map(function(e){return y.addAdditionalEventProperties(e,"navigate",b,m)})));var a=pn(new dn(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){try{if(t.selectionStart===t.selectionEnd)return}catch(e){return}return e.next()}var n=window.getSelection();if(n&&!n.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),s=pn(new dn(function(e){var t=function(t){e.next(t)},n={capture:!0};return bi.document.addEventListener("mousemove",t,n),function(){bi.document.removeEventListener("mousemove",t,n)}}));return(e={})[eo.ClickObservable]=n,e[eo.MutationObservable]=i,e[eo.NavigateObservable]=t,e[eo.BrowserErrorObservable]=r,e[eo.SelectionObservable]=a,e[eo.MouseMoveObservable]=s,e};return{name:n,type:"enrichment",setup:function(t,c){return s(void 0,void 0,void 0,function(){var s,l,d,b,E,S,k,T,P,x,_,I;return u(this,function(u){return"undefined"==typeof document||(s=w(),(l=no(t,y))&&r.push({unsubscribe:l}),f&&(d=fi(e,p),b=so({allObservables:s,amplitude:c,shouldTrackRageClick:d}),r.push(b)),a&&(E=fi(e,h),S=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackDeadClick,a=n.clickObservable,s=n.mutationObservable,u=n.navigateObservable,c=a.filter(function(e){return mi(e)&&i("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ei.LEFT_OR_TOUCH_CONTACT}),l=u?vn(s,u):s,d=vn(c,l),f=null;return fn(d,function(e){return f&&io.includes(e.type)?(clearTimeout(f),f=null,Promise.resolve(null)):"click"===e.type?f?Promise.resolve(null):new Promise(function(t){f=setTimeout(function(){t(e),f=null},3e3)}):Promise.resolve(null)}).subscribe(function(e){if(e){var n={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};t.track("[Amplitude] Dead Click",o(o({},r("click",e.closestTrackedAncestor)),n),{time:e.timestamp})}})}({amplitude:c,allObservables:s,getEventProperties:function(e,t){return y.getEventProperties(e,t,m)},shouldTrackDeadClick:E}),r.push(S)),i&&(k=fi(e,g),T=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackErrorClick,i=n.clickObservable,a=n.browserErrorObservable,s=i.filter(function(e){return mi(e)&&r("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ei.LEFT_OR_TOUCH_CONTACT}),u=null,c=null,l=function(){null!==u&&(clearTimeout(u),u=null),c=null};return vn(s,a).subscribe(function(e){var n;if("click"===e.type)return l(),c=e,void(u=setTimeout(l,2e3));"error"===e.type&&c&&(t.track("[Amplitude] Error Click",o(((n={})["[Amplitude] Kind"]=e.event.kind,n["[Amplitude] Message"]=e.event.message,n["[Amplitude] Stack"]=e.event.stack,n["[Amplitude] Filename"]=e.event.filename,n["[Amplitude] Line Number"]=e.event.lineNumber,n["[Amplitude] Column Number"]=e.event.columnNumber,n),c.targetElementProperties)),l())})}({amplitude:c,allObservables:s,shouldTrackErrorClick:k}),r.push(T)),v&&(P=void 0,x=void 0,"object"==typeof e.thrashedCursor&&(P=e.thrashedCursor.directionChanges,x=e.thrashedCursor.threshold,P&&P<5&&(t.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(P," is below the minimum of ").concat(5,", setting to ").concat(5)),P=5),x&&x>mo&&(t.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(x," is above the maximum of ").concat(mo,", setting to ").concat(mo)),x=mo)),_=ho({amplitude:c,options:e,allObservables:s,directionChanges:P,thresholdMs:x}),r.push(_)),null===(I=null==t?void 0:t.loggerProvider)||void 0===I||I.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t,n,i;return u(this,function(o){try{for(e=c(r),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}return[2]})})}}};function bo(e,t){var n=e.startTime+e.duration;return t.filter(function(t){return t.startTime<n&&t.startTime+t.duration>e.startTime}).map(function(e){return e.name})}function wo(e,t){var n,r=bo(e,t),i=null!==(n=e.scripts)&&void 0!==n?n:[],a=i.map(function(e){return e.sourceURL}).filter(Boolean),s=i.map(function(e){return e.sourceFunctionName}).filter(Boolean),u=i.map(function(e){return e.sourceCharPosition}).filter(function(e){return"number"==typeof e&&e>=0}),c=i.map(function(e){return e.invokerType}).filter(Boolean),l=i.map(function(e){return e.invoker}).filter(Boolean);return o(o(o(o(o(o(o({"[Amplitude] Main Thread Block Source":"long-animation-frame","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.blockingDuration,"[Amplitude] Main Thread Block Start Time":e.startTime},r.length>0&&{"[Amplitude] Main Thread Block Measures":r}),{"[Amplitude] Main Thread Block Render Start":e.renderStart,"[Amplitude] Main Thread Block Style And Layout Start":e.styleAndLayoutStart,"[Amplitude] Main Thread Block Script Count":i.length}),a.length>0&&{"[Amplitude] Main Thread Block Script URLs":a}),s.length>0&&{"[Amplitude] Main Thread Block Script Functions":s}),u.length>0&&{"[Amplitude] Main Thread Block Script Positions":u}),c.length>0&&{"[Amplitude] Main Thread Block Invoker Types":c}),l.length>0&&{"[Amplitude] Main Thread Block Invokers":l})}function Eo(e,t){var n,r=bo(e,t),i=null!==(n=e.attribution)&&void 0!==n?n:[];return o(o({"[Amplitude] Main Thread Block Source":"long-task","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.duration,"[Amplitude] Main Thread Block Start Time":e.startTime},r.length>0&&{"[Amplitude] Main Thread Block Measures":r}),i.length>0&&{"[Amplitude] Main Thread Block Attribution":i.map(function(e){return e.name})})}function So(e){var t=e.amplitude,n=e.options,r=e.durationThreshold,i=void 0===r?100:r,o=function(){if("undefined"==typeof PerformanceObserver)return null;try{var e=PerformanceObserver.supportedEntryTypes;if(e.includes("long-animation-frame"))return"long-animation-frame";if(e.includes("longtask"))return"longtask"}catch(e){}return null}();if(!o)return{unsubscribe:function(){}};var a=[],s=new PerformanceObserver(function(e){var t,n,r=performance.now();try{for(var i=c(e.getEntries()),o=i.next();!o.done;o=i.next()){var s=o.value;a.push(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}for(var u=r-1e4;a.length>0&&a[0].startTime<u;)a.shift()});try{s.observe({entryTypes:["measure"]})}catch(e){}var u=new PerformanceObserver(function(e){var r,s;try{for(var u=c(e.getEntries()),l=u.next();!l.done;l=u.next()){var d=l.value;if(!di(n))return;if(!(d.duration<i)){var f="long-animation-frame"===o?wo(d,a):Eo(d,a);t.track("[Amplitude] Main Thread Block",f)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(r)throw r.error}}});try{u.observe({entryTypes:[o]})}catch(e){return s.disconnect(),{unsubscribe:function(){}}}return{unsubscribe:function(){u.disconnect(),s.disconnect()}}}var ko,To,Po=function(e){void 0===e&&(e={});var t="@amplitude/plugin-performance-browser",n=[],r=!0===e.mainThreadBlock||"object"==typeof e.mainThreadBlock&&null!==e.mainThreadBlock;return{name:t,type:"enrichment",setup:function(i,o){return s(void 0,void 0,void 0,function(){var a,s,c;return u(this,function(u){return"undefined"==typeof document||(r&&(a=100,"object"==typeof e.mainThreadBlock&&void 0!==e.mainThreadBlock.durationThreshold&&(a=e.mainThreadBlock.durationThreshold),s=So({amplitude:o,options:e,durationThreshold:a}),n.push(s)),null===(c=null==i?void 0:i.loggerProvider)||void 0===c||c.log("".concat(t," performance tracking has been successfully added."))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t,r,i;return u(this,function(o){try{for(e=c(n),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}}},xo="[Amplitude] Network Request",_o="500-599";function Io(e,t){var n="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(n).test(e)}function Ao(e,t){var n,r,i=t.split(",");try{for(var o=c(i),a=o.next();!a.done;a=o.next()){var s=l(a.value.split("-").map(Number),2),u=s[0],d=s[1];if(e===u&&void 0===d)return!0;if(e>=u&&e<=d)return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}function Oo(e){var t;if(e)try{var n=null===(t=B())||void 0===t?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),a=r.href,s=r.host;return r.hash="",r.search="",{query:i,fragment:o,href:a,hrefWithoutQueryOrHash:r.href,host:s}}catch(e){return}}function Co(e){if("object"==typeof e&&null!==e){if(0!==e.length)return e}else{if(e)return d([],l(R),!1);if(void 0===e){return}}}function Ro(e){var t,n,r;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(n=null==e?void 0:e.blocklist)||void 0===n?void 0:n.length)&&!(null===(r=null==e?void 0:e.excludelist)||void 0===r?void 0:r.length)}function Lo(e,t){var n;void 0===t&&(t={});var r=Oo(e.url);if(!r)return!1;var i,o=r.host;if(!1!==t.ignoreAmplitudeRequests&&(Io(o,"*.amplitude.com")||Io(o,"amplitude.com")))return!1;if(null===(n=t.ignoreHosts)||void 0===n?void 0:n.find(function(e){return Io(o,e)}))return!1;if(!t.captureRules&&void 0!==e.status&&!Ao(e.status,_o))return!1;if(t.captureRules&&(d([],l(t.captureRules),!1).reverse().find(function(t){if(i=function(e,t,n,r,i){if((!e.hosts||e.hosts.find(function(e){return Io(t,e)}))&&(!r||!e.urls||Ae(r,e.urls))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e})))return!((n||0===n)&&!Ao(n,e.statusCodeRange||_o))}(t,o,e.status,e.url,e.method),i){var n=Co(t.responseHeaders);if(e.responseWrapper&&n){var r=e.responseWrapper.headers(n);r&&(e.responseHeaders=r)}var a=Co(t.requestHeaders);if(e.requestWrapper&&a){var s=e.requestWrapper.headers(a);s&&(e.requestHeaders=s)}if(e.responseWrapper&&t.responseBody&&!Ro(t.responseBody)){var u=t.responseBody.excludelist||t.responseBody.blocklist;e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,u)}if(e.requestWrapper&&t.requestBody&&!Ro(t.requestBody)){u=t.requestBody.excludelist||t.requestBody.blocklist;e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,u)}}return void 0!==i}),!i))return!1;return!e.requestWrapper||!function(e,t){if(e.includes("amplitude.com"))try{var n=t.body;if("string"!=typeof n)return!1;if(JSON.parse(n).events.find(function(e){return e.event_type===xo}))return!0}catch(e){}return!1}(o,e.requestWrapper)}function Do(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider;return t.networkObservable.filter(function(e){return Lo(e.event,n)}).subscribe(function(e){var t,n,o,a=e.event,c=Oo(a.url);if(c){var d=null===(n=a.responseWrapper)||void 0===n?void 0:n.bodySize,f=null===(o=a.requestWrapper)||void 0===o?void 0:o.bodySize;!function(e,t,n,r){s(this,void 0,void 0,function(){var i,o,a;return u(this,function(s){switch(s.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=l.apply(void 0,[s.sent(),2]),o=i[0],a=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==r||r.debug("Failed to stringify request body",e)}if(a)try{e["[Amplitude] Response Body"]=JSON.stringify(a)}catch(e){null==r||r.debug("Failed to stringify response body")}s.label=2;case 2:return null==n||n.track(xo,e),[2]}})})}(((t={})["[Amplitude] URL"]=c.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=c.query,t["[Amplitude] URL Fragment"]=c.fragment,t["[Amplitude] Request Method"]=a.method,t["[Amplitude] Status Code"]=a.status,t["[Amplitude] Start Time"]=a.startTime,t["[Amplitude] Completion Time"]=a.endTime,t["[Amplitude] Duration"]=a.duration,t["[Amplitude] Request Body Size"]=f,t["[Amplitude] Response Body Size"]=d,t["[Amplitude] Request Type"]=a.type,t["[Amplitude] Request Headers"]=a.requestHeaders,t["[Amplitude] Response Headers"]=a.responseHeaders,t),a,r,i)}})}!function(e){e.NetworkObservable="networkObservable"}(ko||(ko={}));var No=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-network-capture-browser",r=function(){var e,n=new dn(function(e){var n=new Mt(function(t){var n=function(e,t){return{event:e,timestamp:Date.now(),type:t}}(t,"network");e.next(n)});return qt.subscribe(n,t),function(){qt.unsubscribe(n)}});return(e={})[ko.NetworkObservable]=n,e};return{name:n,type:"enrichment",setup:function(i,o){return s(void 0,void 0,void 0,function(){var a;return u(this,function(s){return"undefined"==typeof document||(a=r(),t=null==i?void 0:i.loggerProvider,To=Do({allObservables:a,networkTrackingOptions:e,amplitude:o,loggerProvider:t}),null==t||t.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){return To.unsubscribe(),[2]})})}}};let Mo=-1;const jo=e=>{addEventListener("pageshow",t=>{t.persisted&&(Mo=t.timeStamp,e(t))},!0)},Uo=(e,t,n,r)=>{let i,o;return a=>{t.value>=0&&(a||r)&&(o=t.value-(i??0),(o||void 0===i)&&(i=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},qo=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},Fo=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Bo=()=>{const e=Fo();return e?.activationStart??0},Ho=(e,t=-1)=>{const n=Fo();let r="navigate";return Mo>=0?r="back-forward-cache":n&&(document.prerendering||Bo()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Vo=new WeakMap;function zo(e,t){return Vo.get(e)||Vo.set(e,new t),Vo.get(e)}class Wo{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const $o=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Ko=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Go=-1;const Jo=new Set,Yo=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Xo=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of Jo)e();isFinite(Go)||(Go="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Xo,!0))}},Qo=()=>{if(Go<0){const e=Bo(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;Go=t??Yo(),addEventListener("visibilitychange",Xo,!0),addEventListener("prerenderingchange",Xo,!0),jo(()=>{setTimeout(()=>{Go=Yo()})})}return{get firstHiddenTime(){return Go},onHidden(e){Jo.add(e)}}},Zo=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},ea=[1800,3e3],ta=(e,t={})=>{Zo(()=>{const n=Qo();let r,i=Ho("FCP");const o=$o("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-Bo(),0),i.entries.push(t),r(!0)))});o&&(r=Uo(e,i,ea,t.reportAllChanges),jo(n=>{i=Ho("FCP"),r=Uo(e,i,ea,t.reportAllChanges),qo(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},na=[.1,.25];let ra=0,ia=1/0,oa=0;const aa=e=>{for(const t of e)t.interactionId&&(ia=Math.min(ia,t.interactionId),oa=Math.max(oa,t.interactionId),ra=oa?(oa-ia)/7+1:0)};let sa;const ua=()=>sa?ra:performance.interactionCount??0;let ca=0;class la{u=[];l=new Map;m;p;v(){ca=ua(),this.u.length=0,this.l.clear()}L(){const e=Math.min(this.u.length-1,Math.floor((ua()-ca)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.u.at(-1);let n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort((e,t)=>t.P-e.P),this.u.length>10){const e=this.u.splice(10);for(const t of e)this.l.delete(t.id)}this.p?.(n)}}}const da=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=Ko(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},fa=[200,500],va=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=Qo();Zo(()=>{"interactionCount"in performance||sa||(sa=$o("event",aa,{type:"event",buffered:!0,durationThreshold:0}));let r,i=Ho("INP");const o=zo(t,la),a=e=>{da(()=>{for(const t of e)o.h(t);const t=o.L();t&&t.P!==i.value&&(i.value=t.P,i.entries=t.entries,r())})},s=$o("event",a,{durationThreshold:t.durationThreshold??40});r=Uo(e,i,fa,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{a(s.takeRecords()),r(!0)}),jo(()=>{o.v(),i=Ho("INP"),r=Uo(e,i,fa,t.reportAllChanges)}))})};class pa{m;h(e){this.m?.(e)}}const ha=[2500,4e3],ga=[800,1800],ma=e=>{document.prerendering?Zo(()=>ma(e)):"complete"!==document.readyState?addEventListener("load",()=>ma(e),!0):setTimeout(e)};function ya(e){var t,n=(null===(t=e.entries[0])||void 0===t?void 0:t.startTime)||0;return performance.timeOrigin+n}function ba(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(ya(e)),navigationStart:Math.floor(performance.timeOrigin)}}var wa,Ea=function(){var e=null,t=B(),n=null==t?void 0:t.document,r=null==t?void 0:t.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(t,i){return s(void 0,void 0,void 0,function(){var o,a;return u(this,function(s){return void 0===n||(o=Oe((null==r?void 0:r.href)||"",t.loggerProvider),a={"[Amplitude] Page Domain":(null==r?void 0:r.hostname)||"","[Amplitude] Page Location":o,"[Amplitude] Page Path":Oe((null==r?void 0:r.pathname)||"",t.loggerProvider),"[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":Oe(o.split("?")[0],t.loggerProvider)},((e,t={})=>{Zo(()=>{const n=Qo();let r,i=Ho("LCP");const o=zo(t,pa),a=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)o.h(t),t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-Bo(),0),i.entries=[t],r())},s=$o("largest-contentful-paint",a);if(s){r=Uo(e,i,ha,t.reportAllChanges);const n=Ko(()=>{a(s.takeRecords()),s.disconnect(),r(!0)}),o=e=>{e.isTrusted&&(da(n),removeEventListener(e.type,o,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addEventListener(e,o,{capture:!0});jo(n=>{i=Ho("LCP"),r=Uo(e,i,ha,t.reportAllChanges),qo(()=>{i.value=performance.now()-n.timeStamp,r(!0)})})}})})(function(e){a["[Amplitude] LCP"]=ba(e)}),ta(function(e){a["[Amplitude] FCP"]=ba(e)}),va(function(e){a["[Amplitude] INP"]=ba(e)}),((e,t={})=>{const n=Qo();ta(Ko(()=>{let r,i=Ho("CLS",0);const o=zo(t,Wo),a=e=>{for(const t of e)o.h(t);o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},s=$o("layout-shift",a);s&&(r=Uo(e,i,na,t.reportAllChanges),n.onHidden(()=>{a(s.takeRecords()),r(!0)}),jo(()=>{o.i=0,i=Ho("CLS",0),r=Uo(e,i,na,t.reportAllChanges),qo(()=>r())}),setTimeout(r))}))})(function(e){a["[Amplitude] CLS"]=ba(e)}),((e,t={})=>{let n=Ho("TTFB"),r=Uo(e,n,ga,t.reportAllChanges);ma(()=>{const i=Fo();i&&(n.value=Math.max(i.responseStart-Bo(),0),n.entries=[i],r(!0),jo(()=>{n=Ho("TTFB",0),r=Uo(e,n,ga,t.reportAllChanges),r(!0)}))})})(function(e){a["[Amplitude] TTFB"]=ba(e)}),e=function(){"hidden"===n.visibilityState&&e&&(i.track("[Amplitude] Web Vitals",a),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(t){return e&&(null==n||n.removeEventListener("visibilitychange",e)),[2]})})}}},Sa=function(){function e(e,t){var n,r,i;this.shouldTrackNewCampaign=!1,this.options=o({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:(r=(null===(n=t.cookieOptions)||void 0===n?void 0:n.domain)||t.topLevelDomain,i=r,i?(i.startsWith(".")&&(i=i.substring(1)),[new RegExp("".concat(i.replace(".","\\."),"$"))]):[]),optOut:t.optOut},e),this.storage=t.cookieStorage,this.storageKey=je(t.apiKey,"MKTG"),this.webExpStorageKey=je(t.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=C,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,this.topLevelDomain=t.topLevelDomain,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return s(this,void 0,void 0,function(){var e,t;return u(this,function(n){switch(n.label){case 0:return this.options.optOut?[2]:[4,this.fetchCampaign()];case 1:return t=l.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||Te(this.sessionTimeout,this.lastEventTime),Ir(this.currentCampaign,this.previousCampaign,this.options,this.logger,e,this.topLevelDomain)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return s(this,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return(e=t.sent())?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||(new Ft).parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,n,r,i,a=(t=this.currentCampaign,n=this.options,r=o(o({},C),t),i=Object.entries(r).reduce(function(e,t){var r,i=l(t,2),o=i[0],a=i[1];return e.setOnce("initial_".concat(o),null!==(r=null!=a?a:n.initialEmptyValue)&&void 0!==r?r:"EMPTY"),a?e.set(o,a):e.unset(o)},new M),W(i));return e&&(a.event_id=e),a},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),ka=new Set([i.IDENTIFY,i.GROUP_IDENTIFY]),Ta=function(e){var t;void 0===e&&(e={});var n,r,i,a,c,l,d=null!==(t=e.fallbackAttributionEvent)&&void 0!==t&&t,f=B(),v={},p=!1,h=!1,g=function(){return s(void 0,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return[4,(new Ft).parse()];case 1:return e=t.sent(),v=Re(e),d&&(null==r||r.log("Tracking attribution fallback event."),null==n||n.track("[Amplitude] Attribution",v)),[2]}})})},m=function(){g()},y=function(e){return new Proxy(e,{apply:function(e,t,n){Reflect.apply(e,t,n),p&&m()}})};return{name:"@amplitude/plugin-event-property-attribution-browser",type:"enrichment",setup:function(e,t){return s(void 0,void 0,void 0,function(){return u(this,function(o){switch(o.label){case 0:return n=t,r=e.loggerProvider,p=!0,r.log("Installing event property attribution tracking."),[4,g()];case 1:if(o.sent(),!f)return[2];if(f.addEventListener("popstate",m),!h){if(i=Reflect.get(f.history,"pushState"),a=Reflect.get(f.history,"replaceState"),!i||!a)return[2];c=y(i),f.history.pushState=c,l=y(a),f.history.replaceState=l,h=!0}return[2]}})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return ka.has(e.event_type)||(e.event_properties=o(o({},v),e.event_properties)),[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t;return u(this,function(n){return f&&(f.removeEventListener("popstate",m),e=Reflect.get(f.history,"pushState"),t=Reflect.get(f.history,"replaceState"),h&&e===c&&i&&(f.history.pushState=i),h&&t===l&&a&&(f.history.replaceState=a)),p=!1,h=!1,i=void 0,a=void 0,c=void 0,l=void 0,v={},[2]})})}}},Pa="AMP_CURRENT_PAGE",xa="AMP_PREVIOUS_PAGE",_a="AMP_URL_INFO";!function(e){e.Direct="direct",e.Internal="internal",e.External="external"}(wa||(wa={}));var Ia=new Set([i.IDENTIFY,i.GROUP_IDENTIFY,i.REVENUE]),Aa=function(e){var t=(void 0===e?{}:e).internalDomains,n=void 0===t?[]:t,r=B(),i=void 0,a=!1,c=void 0,d=!1,f=!1,v=function(e){var t;try{var n=Oe(e,c);t=new URL(n).hostname}catch(e){null==c||c.error("Could not parse URL: ",e)}return t},p=function(e){var t="undefined"!=typeof location&&location.hostname||"",r=e?v(e):void 0;if(!r)return wa.Direct;var i=n.some(function(e){return-1!==t.indexOf(e)}),o=n.some(function(e){return-1!==r.indexOf(e)});return t===r||o&&i?wa.Internal:wa.External},h=function(){return s(void 0,void 0,void 0,function(){var e,t,n,r,o;return u(this,function(s){switch(s.label){case 0:return i&&a?[4,i.get(_a)]:[3,3];case 1:return e=s.sent(),t=Oe("undefined"!=typeof location&&location.href||""),n=(null==e?void 0:e[Pa])||"",r=void 0,r=t===n?(null==e?void 0:e[xa])||"":n||(document.referrer||""),[4,i.set(_a,(o={},o[Pa]=t,o[xa]=r,o))];case 2:s.sent(),s.label=3;case 3:return[2]}})})},g=function(){h()},m={name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(e,t){return s(void 0,void 0,void 0,function(){var t,n,o,s,p,m,y,b;return u(this,function(u){switch(u.label){case 0:if((c=e.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),f=!0,!r)return[3,7];try{i=new Ue(r.sessionStorage)}catch(e){null==c||c.debug("sessionStorage is not available in this environment.")}return[4,null==i?void 0:i.isEnabled()];case 1:return a=null!==(b=u.sent())&&void 0!==b&&b,i&&a?(t="undefined"!=typeof document&&document.referrer||"",n=t?v(t):void 0,o="undefined"!=typeof location&&location.hostname||"",s=Oe("undefined"!=typeof location&&location.href||""),[4,i.get(_a)]):[3,6];case 2:return p=u.sent(),m=(null==p?void 0:p[Pa])||"",!!n&&n!==o&&m!==s?[4,i.set(_a,(y={},y[Pa]=s,y[xa]=t,y))]:[3,4];case 3:return u.sent(),[3,6];case 4:return[4,h()];case 5:u.sent(),u.label=6;case 6:r.addEventListener("popstate",g),d||(r.history.pushState=new Proxy(r.history.pushState,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),f&&g()}}),r.history.replaceState=new Proxy(r.history.replaceState,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),f&&g()}}),d=!0),u.label=7;case 7:return[2]}})})},execute:function(e){return s(void 0,void 0,void 0,function(){var t,n,r;return u(this,function(s){switch(s.label){case 0:return t=Oe("undefined"!=typeof location&&location.href||""),i&&a?[4,i.get(_a)]:[3,2];case 1:if(n=s.sent(),r=(null==n?void 0:n[xa])||"",Ia.has(e.event_type))return[2,e];e.event_properties=o(o({},e.event_properties||{}),{"[Amplitude] Page Domain":Oa(e,"[Amplitude] Page Domain","undefined"!=typeof location&&location.hostname||""),"[Amplitude] Page Location":Oa(e,"[Amplitude] Page Location",t),"[Amplitude] Page Path":Oa(e,"[Amplitude] Page Path","undefined"!=typeof location&&Oe(location.pathname)||""),"[Amplitude] Page Title":Oa(e,"[Amplitude] Page Title",Kt($t)),"[Amplitude] Page URL":Oa(e,"[Amplitude] Page URL",t.split("?")[0]),"[Amplitude] Previous Page Location":r,"[Amplitude] Previous Page Type":p(r)}),s.label=2;case 2:return[2,e]}})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return r&&(r.removeEventListener("popstate",g),f=!1),i&&a?[4,i.set(_a,{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})}};return m};function Oa(e,t,n){return e.event_properties||(e.event_properties={}),void 0===e.event_properties[t]?n:e.event_properties[t]}var Ca=function(){var e,t,n;function r(t){if(t)try{var n=new Function("return "+t)();if("function"==typeof n)return n;null==e||e.error("Custom enrichment body did not evaluate to a function")}catch(t){null==e||e.error("Could not create custom enrichment function",t)}return function(e){return e}}var i={name:"@amplitude/plugin-custom-enrichment-browser",type:"enrichment",setup:function(i,o){return s(void 0,void 0,void 0,function(){var o,a;return u(this,function(s){return null==(e=i.loggerProvider)||e.log("Installing @amplitude/plugin-custom-enrichment-browser"),(null===(a=i.remoteConfig)||void 0===a?void 0:a.fetchRemoteConfig)&&(i.remoteConfigClient?(o=i.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(e){n=e&&function(e){return"object"==typeof e&&null!==e&&"body"in e&&"string"==typeof e.body}(e)?r(e.body||""):r("")}),t=function(){var e;return null===(e=i.remoteConfigClient)||void 0===e?void 0:e.unsubscribe(o)}):null==e||e.debug("Remote config client is not provided, skipping remote config fetch")),[2]})})},execute:function(t){return s(void 0,void 0,void 0,function(){var r;return u(this,function(i){if(n)try{return[2,null!==(r=n(t))&&void 0!==r?r:null]}catch(n){return null==e||e.error("Could not execute custom enrichment function",n),[2,t]}return[2,t]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){return t&&t(),[2]})})}};return i},Ra="userProperty",La="eventProperty",Da=function(e){return e===Ra||e===La},Na=function(e,t){return function(e){var t=d([],l(new Set((Array.isArray(e)?e:[e]).filter(Da))),!1);return t.length>0?t:[Ra]}(e.trackingMethod).includes(t)},Ma=function(e){return Na(e,Ra)},ja=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return n(t,e),t.prototype.init=function(e,t,n){var r,i;return void 0===e&&(e=""),arguments.length>2?(r=t,i=n):"string"==typeof t?(r=t,i=void 0):(r=null==t?void 0:t.userId,i=t),$(this._init(o(o({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,i,c,l,d,f,v;return s(this,void 0,void 0,function(){var p,h,g,m,y,b,w,E,S,k,T,P,x,_,I,A=this;return u(this,function(O){switch(O.label){case 0:return this.initializing?[2]:(this.initializing=!0,p=function(e){var t,n;return void 0===e&&(e={}),!0===(null===(t=e.remoteConfig)||void 0===t?void 0:t.fetchRemoteConfig)||!1!==(null===(n=e.remoteConfig)||void 0===n?void 0:n.fetchRemoteConfig)&&!1!==e.fetchRemoteConfig}(t),h=null!==(n=t.loggerProvider)&&void 0!==n?n:new X,t.loggerProvider||h.enable(null!==(r=t.logLevel)&&void 0!==r?r:J.Warn),g=null!==(i=t.serverZone)&&void 0!==i?i:"US",y=this._diagnosticsSampleRate,b=null===(c=t.enableDiagnostics)||void 0===c||c,p?(m=new ot(t.apiKey,h,g,null===(l=t.remoteConfig)||void 0===l?void 0:l.serverUrl),[4,new Promise(function(e){null==m||m.subscribe("configs.diagnostics.browserSDK","all",function(t,n,r){if(h.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(y=i);var o=t.enabled;"boolean"==typeof o&&(b=o)}e()})})]):[3,2]);case 1:O.sent(),O.label=2;case 2:return(w=new Xe(t.apiKey,h,g,{enabled:b,sampleRate:y})).setTag("library","".concat(er,"/").concat(Zn)),"undefined"!=typeof navigator&&w.setTag("user_agent",navigator.userAgent),[4,Mr(t.apiKey,t,this,w,{loggerProvider:h,serverZone:g,enableDiagnostics:b,diagnosticsSampleRate:y})];case 3:return E=O.sent(),p&&m?[4,new Promise(function(e){null==m||m.subscribe("configs.analyticsSDK.browserSDK","all",function(t,n,r){E.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t&&Zr(t,E),e()})})]:[3,5];case 4:O.sent(),O.label=5;case 5:return[4,e.prototype._init.call(this,E)];case 6:return O.sent(),this.logBrowserOptions(E),this.config.remoteConfigClient=m,L=this.config,S=Un(L.defaultTracking)&&L.defaultTracking&&"object"==typeof L.defaultTracking&&L.defaultTracking.attribution&&"object"==typeof L.defaultTracking.attribution?o({},L.defaultTracking.attribution):{},Un(this.config.defaultTracking)&&Ma(S)?(this.config.optOut&&this.timeline.addOptOutListener(function(e){return s(A,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return e?[3,2]:(this.webAttribution=new Sa(S,this.config),[4,this.webAttribution.init()]);case 1:t.sent(),t.label=2;case 2:return[2]}})})}),this.webAttribution=new Sa(S,this.config),[4,this.webAttribution.init()]):[3,8];case 7:O.sent(),O.label=8;case 8:return k=_e(),T=k.ampTimestamp?Number(k.ampTimestamp):void 0,P=!T||Date.now()<T,x=P&&!Number.isNaN(Number(k.ampSessionId))?Number(k.ampSessionId):void 0,-1!==(_=this.config.deferredSessionId)||this.config.optOut||(_=Date.now()),this.setSessionId(null!==(v=null!==(f=null!==(d=t.sessionId)&&void 0!==d?d:x)&&void 0!==f?f:_)&&void 0!==v?v:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return s(A,void 0,void 0,function(){return u(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(I=Se(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline?[3,10]:[4,this.add(Yr()).promise];case 9:O.sent(),O.label=10;case 10:return[4,this.add(new de({diagnosticsClient:w})).promise];case 11:return O.sent(),[4,this.add(new tr).promise];case 12:return O.sent(),[4,this.add(new ke).promise];case 13:return O.sent(),function(e){Jr||void 0!==e.defaultTracking||(e.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),Jr=!0)}(this.config),R=this.config.defaultTracking,jn(R,"fileDownloads")?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(Gr()).promise]):[3,15];case 14:O.sent(),O.label=15;case 15:return qn(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(Wr()).promise]):[3,17];case 16:O.sent(),O.label=17;case 17:return Fn(this.config.defaultTracking)?this.config.optOut?[3,19]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Br(Jn(this.config))).promise]):[3,20];case 18:return O.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(e){return s(A,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return e?[2]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Br(Jn(this.config))).promise]);case 1:return t.sent(),[2]}})})}),O.label=20;case 20:return Un(this.config.defaultTracking)&&function(e){return Na(e,La)}(S)?(this.config.loggerProvider.debug("Adding event property attribution plugin"),[4,this.add(Ta(S)).promise]):[3,22];case 21:O.sent(),O.label=22;case 22:return Vn(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(ro($n(this.config),{diagnosticsClient:w})).promise]):[3,24];case 23:O.sent(),O.label=24;case 24:return zn(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(yo(Kn(this.config))).promise]):[3,26];case 25:O.sent(),O.label=26;case 26:return Hn(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(No(Gn(this.config))).promise]):[3,28];case 27:O.sent(),O.label=28;case 28:return function(e){return"boolean"==typeof e?e:"object"==typeof e&&!0===e.webVitals}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(Ea()).promise]):[3,30];case 29:O.sent(),O.label=30;case 30:return function(e){return"object"==typeof e&&(!0===e.performanceTracking||"object"==typeof e.performanceTracking)}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding performance tracking plugin"),[4,this.add(Po(Wn(this.config))).promise]):[3,32];case 31:O.sent(),O.label=32;case 32:return function(e){return jn(e,"pageUrlEnrichment")}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(Aa()).promise]):[3,34];case 33:O.sent(),O.label=34;case 34:return("boolean"==typeof(C=this.config.customEnrichment)?C:"object"==typeof C&&null!==C&&!1!==C.enabled)?(this.config.loggerProvider.debug("Adding custom enrichment plugin"),[4,this.add(Ca()).promise]):[3,36];case 35:O.sent(),O.label=36;case 36:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 37:return O.sent(),I.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},n=t.time,r=a(t,["time"]),i="number"==typeof n?{time:n}:void 0;A.track(e.eventType,r,i)}),[2]}var C,R,L})})},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),e===this.config.userId&&void 0!==e||(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),function(e,t){Se(t).identityStore.editIdentity().setUserId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),function(e,t){Se(t).identityStore.editIdentity().setDeviceId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(V()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var e,t;return{deviceId:null===(e=this.config)||void 0===e?void 0:e.deviceId,userId:null===(t=this.config)||void 0===t?void 0:t.userId,userProperties:this.userProperties}},t.prototype.setIdentity=function(e){var t,n,r;if("userId"in e&&this.setUserId(e.userId),"deviceId"in e&&e.deviceId&&this.setDeviceId(e.deviceId),"userProperties"in e){this.userProperties=e.userProperties;var i=new M,o=null!==(r=e.userProperties)&&void 0!==r?r:{};try{for(var a=c(Object.entries(o)),s=a.next();!s.done;s=a.next()){var u=l(s.value,2),d=u[0],f=u[1];i.set(d,f)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}this.identify(i)}},t.prototype.getOptOut=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.optOut},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),$(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,$(Promise.resolve());if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return $(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId();r!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,o=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,Bn(this.config.defaultTracking)&&(r&&i&&n.push(this.track(gr,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:r,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var a=this.trackCampaignEventIfNeeded(++o,n);return this.config.identify&&n.push(this.track(W(this.config.identify)).promise),Bn(this.config.defaultTracking)&&n.push(this.track(hr,void 0,{event_id:a?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,$(Promise.all(n))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=Ur(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(Qn(t)){var r=t._q;t._q=[],t=Xn(new M,r)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(Qn(r)){var o=r._q;r._q=[],r=Xn(new M,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(Qn(t)){var r=t._q;t._q=[],t=Xn(new G,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign||!Ma(this.webAttribution.options))return!1;var n=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return s(this,void 0,void 0,function(){var n,r,i;return u(this,function(o){return n=Date.now(),r=Te(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===hr||t.event_type===gr||t.session_id&&t.session_id!==this.getSessionId()||(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=o(o({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",Sn(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t.prototype._setDiagnosticsSampleRate=function(e){e>1||e<0||this.config||(this._diagnosticsSampleRate=e)},t}(K),Ua=function(){var e=new ja;return{init:ue(e.init.bind(e),"init",oe(e),se(e,["config"])),add:ue(e.add.bind(e),"add",oe(e),se(e,["config.apiKey","timeline.plugins"])),remove:ue(e.remove.bind(e),"remove",oe(e),se(e,["config.apiKey","timeline.plugins"])),track:ue(e.track.bind(e),"track",oe(e),se(e,["config.apiKey","timeline.queue.length"])),logEvent:ue(e.logEvent.bind(e),"logEvent",oe(e),se(e,["config.apiKey","timeline.queue.length"])),identify:ue(e.identify.bind(e),"identify",oe(e),se(e,["config.apiKey","timeline.queue.length"])),groupIdentify:ue(e.groupIdentify.bind(e),"groupIdentify",oe(e),se(e,["config.apiKey","timeline.queue.length"])),setGroup:ue(e.setGroup.bind(e),"setGroup",oe(e),se(e,["config.apiKey","timeline.queue.length"])),revenue:ue(e.revenue.bind(e),"revenue",oe(e),se(e,["config.apiKey","timeline.queue.length"])),flush:ue(e.flush.bind(e),"flush",oe(e),se(e,["config.apiKey","timeline.queue.length"])),getUserId:ue(e.getUserId.bind(e),"getUserId",oe(e),se(e,["config","config.userId"])),setUserId:ue(e.setUserId.bind(e),"setUserId",oe(e),se(e,["config","config.userId"])),getDeviceId:ue(e.getDeviceId.bind(e),"getDeviceId",oe(e),se(e,["config","config.deviceId"])),setDeviceId:ue(e.setDeviceId.bind(e),"setDeviceId",oe(e),se(e,["config","config.deviceId"])),reset:ue(e.reset.bind(e),"reset",oe(e),se(e,["config","config.userId","config.deviceId"])),getSessionId:ue(e.getSessionId.bind(e),"getSessionId",oe(e),se(e,["config"])),setSessionId:ue(e.setSessionId.bind(e),"setSessionId",oe(e),se(e,["config"])),extendSession:ue(e.extendSession.bind(e),"extendSession",oe(e),se(e,["config"])),setOptOut:ue(e.setOptOut.bind(e),"setOptOut",oe(e),se(e,["config"])),setTransport:ue(e.setTransport.bind(e),"setTransport",oe(e),se(e,["config"])),getIdentity:ue(e.getIdentity.bind(e),"getIdentity",oe(e),se(e,["config"])),setIdentity:ue(e.setIdentity.bind(e),"setIdentity",oe(e),se(e,["config","config.userId","config.deviceId"])),getOptOut:ue(e.getOptOut.bind(e),"getOptOut",oe(e),se(e,["config"])),_setDiagnosticsSampleRate:ue(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",oe(e),se(e,["config"]))}},qa=Ua(),Fa=function(){function e(e){this.amplitude=e,this.videoEl=null,this.embeddedVideoPlayer=null,this.extraEventProperties={},this.listeners=[],this.onRemoveListeners=[]}return e.prototype.withVideoElement=function(e){return this.videoEl=e,this},e.prototype.withEmbeddedPlayer=function(e){return this.embeddedVideoPlayer=e,this},e.prototype.withVendor=function(e){return this.vendor=e,this},e.prototype.withExtraEventProperties=function(e){return this.extraEventProperties=e,this},e.prototype.captureVideoStarted=function(){var e=this;return this.listeners.push(function(t,n){"playing"!==t.playbackState&&"playing"===n.playbackState&&e.amplitude.track("Video Content Started",o(o({},n.lastEvent),e.extraEventProperties))}),this},e.prototype.captureVideoStopped=function(){var e=this;return this.listeners.push(function(t,n){"playing"===t.playbackState&&"playing"!==n.playbackState&&e.amplitude.track("Video Content Stopped",o(o(o({},n.lastEvent),{watch_duration:n.watchTime}),e.extraEventProperties))}),this},e.prototype.start=function(){var e,t=this,n=null!==(e=this.videoEl)&&void 0!==e?e:this.embeddedVideoPlayer;if(!n)throw new Error("Video element not specified. Use withVideoElement() or withEmbeddedPlayer() to specify the video element.");if(this.videoEl&&this.embeddedVideoPlayer)throw new Error("Both video element and embedded video player specified. Use only one of withVideoElement() or withEmbeddedPlayer() to specify the video element.");var r=new Mn({videoEl:n,onStateChange:function(e,n){t.listeners.forEach(function(t){return t(e,n)})},vendor:this.vendor,isEmbedded:!!this.embeddedVideoPlayer});return this.onRemoveListeners.push(function(){r.destroy()}),this},e.prototype.stop=function(){this.onRemoveListeners.forEach(function(e){return e()}),this.onRemoveListeners=[]},e}();var Ba=qa.add,Ha=qa.extendSession,Va=qa.flush,za=qa.getDeviceId,Wa=qa.getIdentity,$a=qa.getOptOut,Ka=qa.getSessionId,Ga=qa.getUserId,Ja=qa.groupIdentify,Ya=qa.identify,Xa=qa.init,Qa=qa.logEvent,Za=qa.remove,es=qa.reset,ts=qa.revenue,ns=qa.setDeviceId,rs=qa.setGroup,is=qa.setIdentity,os=qa.setOptOut,as=qa.setSessionId,ss=qa.setTransport,us=qa.setUserId,cs=qa.track,ls=qa._setDiagnosticsSampleRate,ds=Object.freeze({__proto__:null,add:Ba,extendSession:Ha,flush:Va,getDeviceId:za,getIdentity:Wa,getOptOut:$a,getSessionId:Ka,getUserId:Ga,groupIdentify:Ja,identify:Ya,init:Xa,logEvent:Qa,remove:Za,reset:es,revenue:ts,setDeviceId:ns,setGroup:rs,setIdentity:is,setOptOut:os,setSessionId:as,setTransport:ss,setUserId:us,track:cs,_setDiagnosticsSampleRate:ls,createInstance:Ua,AmplitudeBrowser:ja,runQueuedFunctions:Yn,Revenue:G,Identify:M,trackVideo:function(e,t,n){var r;void 0===n&&(n={});var i=new Fa(e);t instanceof HTMLVideoElement?i.withVideoElement(t):i.withEmbeddedPlayer(t),n.vendor&&i.withVendor(n.vendor);var a=null!==(r=n.extraEventProperties)&&void 0!==r?r:{};try{i.withExtraEventProperties(o({view_session_id:V()},a)).captureVideoStarted().captureVideoStopped().start()}catch(e){return e}return function(){return i.stop()}},Types:xr});!function(){var e=B();if(e){var t=function(e){var t=Ua(),n=B();return n&&n.amplitudeGTM&&n.amplitudeGTM._iq&&e&&(n.amplitudeGTM._iq[e]=t),t};if(e.amplitudeGTM=Object.assign(e.amplitudeGTM||{},ds,{createInstance:t}),e.amplitudeGTM.invoked){var n=e.amplitudeGTM._q;e.amplitudeGTM._q=[],Yn(ds,n);for(var r=Object.keys(e.amplitudeGTM._iq)||[],i=0;i<r.length;i++){var o=r[i],a=Object.assign(e.amplitudeGTM._iq[o],t(o)),s=a._q;a._q=[],Yn(a,s)}}}else console.error("[Amplitude] Error: GlobalScope is not defined")}()}();
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
!function(){"use strict";function e(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t(e,n)};function n(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function u(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function d(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError,function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(r||(r={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(i||(i={}));var f,v="AMP",p="".concat(v,"_unsent"),h="$default_instance",g="https://api2.amplitude.com/2/httpapi",m="https://api.eu.amplitude.com/2/httpapi",y="https://api2.amplitude.com/batch",b="https://api.eu.amplitude.com/batch",w="dclid",E="fbclid",S="gbraid",k="gclid",T="ko_click_id",P="li_fat_id",x="msclkid",_="rdt_cid",I="ttclid",A="twclid",O="wbraid",C={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},R=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],L=["authorization","cookie","set-cookie"],D=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!N(t,n))return!1}return!0},N=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;if(Array.isArray(s))return!1;if("object"==typeof s)i=i&&D(s);else if(!["number","string"].includes(typeof s))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return D(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},M=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return o({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(f.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(f.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(f.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(f.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(f.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(f.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(f.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(f.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(f.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[f.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[f.CLEAR_ALL]&&(!this._propertySet.has(t)&&(e===f.ADD?"number"==typeof n:e===f.UNSET||e===f.REMOVE||N(t,n)))},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(f||(f={}));var j,U=[f.CLEAR_ALL,f.UNSET,f.SET,f.SET_ONCE,f.ADD,f.APPEND,f.PREPEND,f.PREINSERT,f.POSTINSERT,f.REMOVE];!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(j||(j={}));var q,F=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=j.Unknown),{event:e,code:t,message:n}},B=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},H=d([],l(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),V=function(e){var t,n=B();if(!(null===(t=null==n?void 0:n.crypto)||void 0===t?void 0:t.getRandomValues))return function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,V)}(e);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,d([],l(r.entries()),!1).map(function(e){var t=l(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?"-".concat(H[r]):H[r]}).join("")},z=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[],this.pluginStatus=new Map,this._optOutListeners=[]}return e.prototype.register=function(e,t){var n,r;return s(this,void 0,void 0,function(){var i;return u(this,function(o){switch(o.label){case 0:return void 0===e.name&&(e.name=V(),this.loggerProvider.warn("Plugin name is undefined.\n Generating a random UUID for plugin name: ".concat(e.name,".\n Set a name for the plugin to prevent it from being added multiple times."))),i=e.name,this.pluginStatus.has(i)?(this.loggerProvider.warn("Plugin with name ".concat(i," already exists, skipping registration")),[2]):(e.type=null!==(n=e.type)&&void 0!==n?n:"enrichment",this.pluginStatus.set(i,"locked"),[4,null===(r=e.setup)||void 0===r?void 0:r.call(e,t,this.client)]);case 1:return o.sent(),"locked"!==this.pluginStatus.get(i)?[2]:(this.plugins.push(e),this.pluginStatus.set(i,"installed"),[2])}})})},e.prototype.deregister=function(e,t){var n;return s(this,void 0,void 0,function(){var r,i;return u(this,function(o){switch(o.label){case 0:return this.pluginStatus.delete(e),r=this.plugins.findIndex(function(t){return t.name===e}),-1===r?(t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(i=this.plugins[r],this.plugins.splice(r,1),[4,null===(n=i.teardown)||void 0===n?void 0:n.call(i)]);case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this._clearOptOutListeners(),this.applying=!1,this.plugins.map(function(e){var t;return null===(t=e.teardown)||void 0===t?void 0:t.call(e)}),this.plugins=[],this.pluginStatus.clear(),this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,a,s,d,f,v,p,h,g,m,y,b,w,E,S,k,T;return u(this,function(u){switch(u.label){case 0:if(!e)return[2];t=l(e,1),n=t[0],r=l(e,2),i=r[1],this.loggerProvider.log("Timeline.apply: Initial event",n),a=this.plugins.filter(function(e){return"before"===e.type}),u.label=1;case 1:u.trys.push([1,6,7,8]),s=c(a),d=s.next(),u.label=2;case 2:return d.done?[3,5]:(g=d.value).execute?[4,g.execute(o({},n))]:[3,4];case 3:if(null===(m=u.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),i({event:n,code:0,message:""}),[2];n=m,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),u.label=4;case 4:return d=s.next(),[3,2];case 5:return[3,8];case 6:return f=u.sent(),E={error:f},[3,8];case 7:try{d&&!d.done&&(S=s.return)&&S.call(s)}finally{if(E)throw E.error}return[7];case 8:v=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),u.label=9;case 9:u.trys.push([9,14,15,16]),p=c(v),h=p.next(),u.label=10;case 10:return h.done?[3,13]:(g=h.value).execute?[4,g.execute(o({},n))]:[3,12];case 11:if(null===(m=u.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),i({event:n,code:0,message:""}),[2];n=m,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),u.label=12;case 12:return h=p.next(),[3,10];case 13:return[3,16];case 14:return y=u.sent(),k={error:y},[3,16];case 15:try{h&&!h.done&&(T=p.return)&&T.call(p)}finally{if(k)throw k.error}return[7];case 16:return b=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(n))),w=b.map(function(e){var t=o({},n);return e.execute(t).catch(function(e){return F(t,0,String(e))})}),Promise.all(w).then(function(e){var t=l(e,1)[0]||F(n,100,"Event not tracked, no destination plugins on the instance");i(t)}),[2]}})})},e.prototype.flush=function(){return s(this,void 0,void 0,function(){var e,t,n,r=this;return u(this,function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return r.apply(e)}))];case 1:return i.sent(),t=this.plugins.filter(function(e){return"destination"===e.type}),n=t.map(function(e){return e.flush&&e.flush()}),[4,Promise.all(n)];case 2:return i.sent(),[2]}})})},e.prototype.addOptOutListener=function(e){this._optOutListeners.push(e)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onIdentityChanged)||void 0===n||n.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onSessionIdChanged)||void 0===n||n.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onOptOutChanged)||void 0===n||n.call(t,e)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o,a,s;return u(this,function(u){switch(u.label){case 0:u.trys.push([0,7,8,9]),t=c(this._optOutListeners),n=t.next(),u.label=1;case 1:if(n.done)return[3,6];r=n.value,u.label=2;case 2:return u.trys.push([2,4,,5]),[4,r(e)];case 3:return u.sent(),[3,5];case 4:return i=u.sent(),this.loggerProvider.error("Error calling optOut listener",i),[3,5];case 5:return n=t.next(),[3,1];case 6:return[3,9];case 7:return o=u.sent(),a={error:o},[3,9];case 8:try{n&&!n.done&&(s=t.return)&&s.call(t)}finally{if(a)throw a.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null===(t=e.onReset)||void 0===t||t.call(e)})},e}(),W=function(e,t){return o(o({},t),{event_type:i.IDENTIFY,user_properties:e.getUserProperties()})},$=function(e){return{promise:e||Promise.resolve()}},K=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new z(this),this.name=e}return e.prototype._init=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o,a,s,l;return u(this,function(u){switch(u.label){case 0:t=this[e],this[e]=[],u.label=1;case 1:u.trys.push([1,8,9,10]),n=c(t),r=n.next(),u.label=2;case 2:return r.done?[3,7]:(i=r.value,(o=i())&&"promise"in o?[4,o.promise]:[3,4]);case 3:return u.sent(),[3,6];case 4:return[4,o];case 5:u.sent(),u.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return a=u.sent(),s={error:a},[3,10];case 9:try{r&&!r.done&&(l=n.return)&&l.call(n)}finally{if(s)throw s.error}return[7];case 10:return this[e].length?[4,this.runQueuedFunctions(e)]:[3,12];case 11:u.sent(),u.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=function(e,t,n){return o(o(o({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),$(this.dispatch(r))},e.prototype.identify=function(e,t){var n=W(e,t);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),$(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var a=function(e,t,n,r){var a;return o(o({},r),{event_type:i.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(a={},a[e]=t,a)})}(e,t,n,r);return $(this.dispatch(a))},e.prototype.setGroup=function(e,t,n){var r=function(e,t,n){var r,a=new M;return a.set(e,t),o(o({},n),{event_type:i.IDENTIFY,user_properties:a.getUserProperties(),groups:(r={},r[e]=t,r)})}(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),$(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=function(e,t){return o(o({},t),{event_type:i.REVENUE,event_properties:e.getEventProperties()})}(e,t);return $(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),$())},e.prototype._addPlugin=function(e){return $(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),$())},e.prototype._removePlugin=function(e){return $(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(F(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return s(this,void 0,void 0,function(){var t=this;return u(this,function(n){return this.isReady?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t,n=null!==(t=this.userProperties)&&void 0!==t?t:{},i=o({},n);if(void 0===e)return i;var a={};return Object.keys(e).forEach(function(t){Object.values(r).includes(t)||(a[t]=e[t])}),U.forEach(function(t){if(Object.keys(e).includes(t)){var n=e[t];switch(t){case r.CLEAR_ALL:Object.keys(i).forEach(function(e){delete i[e]});break;case r.UNSET:Object.keys(n).forEach(function(e){delete i[e]});break;case r.SET:Object.assign(i,n)}}}),Object.assign(i,a),i},e.prototype.process=function(e){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.config.optOut?[2,F(e,0,"Event skipped due to optOut config")]:(e.event_type===i.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)]);case 1:return 200===(r=o.sent()).code?this.config.loggerProvider.log(r.message):100===r.code?this.config.loggerProvider.warn(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=o.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=F(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,Boolean(e)))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=Boolean(e),this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return $(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});if(void 0!==t)return t;this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e))},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),J=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){try{var t=JSON.parse(JSON.stringify(e));D(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?o({},this.properties):{};return e[q.REVENUE_PRODUCT_ID]=this.productId,e[q.REVENUE_QUANTITY]=this.quantity,e[q.REVENUE_PRICE]=this.price,e[q.REVENUE_TYPE]=this.revenueType,e[q.REVENUE_CURRENCY]=this.currency,e[q.REVENUE]=this.revenue,e[q.RECEIPT]=this.receipt,e[q.RECEIPT_SIG]=this.receiptSig,e},e}();!function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"}(q||(q={}));var G;!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(G||(G={}));var Y="Amplitude Logger ",X=function(){function e(){this.logLevel=G.None}return e.prototype.disable=function(){this.logLevel=G.None},e.prototype.enable=function(e){void 0===e&&(e=G.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<G.Verbose||console.log("".concat(Y,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<G.Warn||console.warn("".concat(Y,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<G.Error||console.error("".concat(Y,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<G.Debug||console.log("".concat(Y,"[Debug]: ").concat(e.join(" ")))},e}(),Q=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:h,logLevel:G.Warn,loggerProvider:new X,offline:!1,optOut:!1,serverUrl:g,serverZone:"US",useBatch:!1}},Z=function(){function e(e){var t,n,r,i;this._optOut=!1;var o=Q();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(n=e.logLevel)&&void 0!==n?n:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(r=e.optOut)&&void 0!==r?r:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(i=e.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=te(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),ee=function(e,t){return"EU"===e?t?b:m:t?y:g},te=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Q().serverZone),void 0===n&&(n=Q().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=["US","EU"].includes(t)?t:Q().serverZone;return{serverZone:r,serverUrl:ee(r,n)}},ne=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function re(e){return e>=200&&e<300}var ie=function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},oe=function(e){return function(){var t=o({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},ae=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=c(t.split(".")),o=i.next();!o.done;o=i.next()){var a=o.value;if(!(a in e))return;e=e[a]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},se=function(e,t){return function(){var n,r,i={};try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;i[s]=ae(e,s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},ue=function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=n(),u=s.logger,c=s.logLevel;if(c&&c<G.Debug||!c||!u)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:ie(1),time:{start:(new Date).toISOString()},states:{}};r&&l.states&&(l.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=(new Date).toISOString()),u.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=(new Date).toISOString()),u.debug(JSON.stringify(l,null,2))),d}},ce=new Set([g,m,y,b]);function le(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var de=function(){function e(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return s(this,void 0,void 0,function(){var n,r=this;return u(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(p,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return(n=i.sent())&&n.length>0&&Promise.all(n.map(function(e){return r.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=V()),new Promise(function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.queue.push(r),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline)return null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout?(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,void(this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e))):void 0},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),s(this,void 0,void 0,function(){var t,n,r=this;return u(this,function(i){switch(i.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),o=t,a=this.config.flushQueueSize,c=Math.max(a,1),[4,o.reduce(function(e,t,n){var r=Math.floor(n/c);return e[r]||(e[r]=[]),e[r].push(t),e},[]).reduce(function(t,n){return s(r,void 0,void 0,function(){return u(this,function(r){switch(r.label){case 0:return[4,t];case 1:return r.sent(),[4,this.send(n,e)];case 2:return[2,r.sent()]}})})},Promise.resolve())]);case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}var o,a,c})})},e.prototype.send=function(e,t){var n;return void 0===t&&(t=!0),s(this,void 0,void 0,function(){var r,i,o,s,c,l;return u(this,function(u){switch(u.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,a(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:(new Date).toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new ne,u.label=1;case 1:return u.trys.push([1,3,,4]),i=te(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,o=function(e,t){return void 0===t&&(t=!1),!!ce.has(e)||t}(i,this.config.enableRequestBodyCompression),[4,this.config.transportProvider.send(i,r,o)];case 2:return null===(s=u.sent())?(this.fulfillRequest(e,0,"Unexpected error occurred"),[2]):t?(this.handleResponse(s,e),[3,4]):("body"in s?this.fulfillRequest(e,s.statusCode,"".concat(s.status,": ").concat(le(s))):this.fulfillRequest(e,s.statusCode,s.status),[2]);case 3:return c=u.sent(),l=(d=c)instanceof Error?d.message:String(d),this.config.loggerProvider.error(l),null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:l,stack_trace:ie()}),this.handleResponse({status:j.Failed,statusCode:0},e),[3,4];case 4:return[2]}var d})})},e.prototype.handleResponse=function(e,t){var n;re(e.statusCode)||null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:le(e),stack_trace:ie()});var r=e.status;switch(r){case j.Success:this.handleSuccessResponse(e,t);break;case j.Invalid:this.handleInvalidResponse(e,t);break;case j.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case j.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(r,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=d(d(d(d([],l(Object.values(e.body.eventsWithInvalidFields)),!1),l(Object.values(e.body.eventsWithMissingFields)),!1),l(Object.values(e.body.eventsWithInvalidIdLengths)),!1),l(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter(function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)});o.length>0&&this.config.loggerProvider.warn(le(e));var a=this.removeEventsExceedFlushMaxRetries(o);this.scheduleEvents(a)}},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1!==t.length){this.config.loggerProvider.warn(le(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)}else this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,a=new Set(r),s=new Set(i),u=new Set(o),c=t.filter(function(t,r){if(!(t.event.user_id&&a.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)});c.length>0&&this.config.loggerProvider.warn(le(e));var l=this.removeEventsExceedFlushMaxRetries(c);this.scheduleEvents(l)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.fulfillRequest=function(e,t,n){var r,i,o;re(t)?null===(o=this.diagnosticsClient)||void 0===o||o.increment("analytics.events.sent",e.length):(null===(r=this.diagnosticsClient)||void 0===r||r.increment("analytics.events.dropped",e.length),null===(i=this.diagnosticsClient)||void 0===i||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:n,stack_trace:ie()})),this.removeEvents(e),e.forEach(function(e){return e.callback(F(e.event,t,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),fe=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:ve(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),ve=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},pe=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),he=function(){return he=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},he.apply(this,arguments)};function ge(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function me(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}"function"==typeof SuppressedError&&SuppressedError;var ye=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var o=ge(["string","number","boolean","undefined"]),a=o.next();!a.done;a=o.next()){if(a.value===i)return e===t}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var s=Array.isArray(e),u=Array.isArray(t);if(s!==u)return!1;if(!s||!u){var c=Object.keys(e).sort(),l=Object.keys(t).sort();if(!ye(c,l))return!1;var d=!0;return Object.keys(e).forEach(function(n){ye(e[n],t[n])||(d=!1)}),d}for(var f=0;f<e.length;f++)if(!ye(e[f],t[f]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var be=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=he({},this.identity.userProperties),n=he(he({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,a,s,u=n.userProperties||{};try{for(var c=ge(Object.entries(e)),l=c.next();!l.done;l=c.next()){var d=me(l.value,2),f=d[0],v=d[1];switch(f){case"$set":try{for(var p=(i=void 0,ge(Object.entries(v))),h=p.next();!h.done;h=p.next()){var g=me(h.value,2),m=g[0],y=g[1];u[m]=y}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(a=void 0,ge(Object.keys(v))),w=b.next();!w.done;w=b.next()){delete u[m=w.value]}}catch(e){a={error:e}}finally{try{w&&!w.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return n.userProperties=u,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return he({},this.identity)},e.prototype.setIdentity=function(e){var t=he({},this.identity);this.identity=he({},e),ye(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),we="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,Ee=function(){function e(){this.identityStore=new be,this.eventBridge=new pe,this.applicationContextProvider=new fe}return e.getInstance=function(t){return we.analyticsConnectorInstances||(we.analyticsConnectorInstances={}),we.analyticsConnectorInstances[t]||(we.analyticsConnectorInstances[t]=new e),we.analyticsConnectorInstances[t]},e}(),Se=function(e){return void 0===e&&(e=h),Ee.getInstance(e)},ke=function(){function e(){this.name="identity",this.type="before",this.identityStore=Se().identityStore}return e.prototype.execute=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){return e.instanceName&&(this.identityStore=Se(e.instanceName).identityStore),[2]})})},e}(),Te=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},Pe=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[v,t,e.substring(0,n)].filter(Boolean).join("_")},xe=function(){var e,t,n,r;if("undefined"==typeof navigator)return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""},_e=function(){var e,t=B();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var n=t.split("=",2),r=Ie(n[0]),i=Ie(n[1]);return i?(e[r]=i,e):e},{}):{}},Ie=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},Ae=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},Oe=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return n},Ce=function(e,t){var n=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}(e.toString());return 31*Math.abs(n)%1e5/1e5<t},Re=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},Le=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return s(this,void 0,void 0,function(){return u(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),De=function(){function e(e,t){void 0===t&&(t={}),this.options=o({},e),this.config=t}return e.prototype.isEnabled=function(){return s(this,void 0,void 0,function(){var t,n,r,i,a=this;return u(this,function(s){switch(s.label){case 0:return t="AMP_TEST",n=o({},this.options),r=new e(n),i=String(Date.now()),[4,r.transaction(t,function(e){var n,r;try{e.set(i);var o=e.get()===i;return!o&&a.config.diagnosticsClient&&(null===(n=a.config.diagnosticsClient)||void 0===n||n.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:t,testValue:i,sync:!0})),o}catch(e){if(a.config.diagnosticsClient){var s=e instanceof Error?e.message:String(e);null===(r=a.config.diagnosticsClient)||void 0===r||r.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:t,testValue:i,error:s,sync:!0})}return!1}finally{e.set(null)}})];case 1:return[2,s.sent()]}})})},e.prototype.get=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:return t=n.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var n=Ne(t);return void 0===n?void console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t)):JSON.parse(n)}catch(n){return void console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(t))}},e.prototype.getSync=function(e){var t=this.getRawSync(e);return this.decodeCookieValue(e,t)},e.prototype.getRaw=function(e){var t,n;return s(this,void 0,void 0,function(){var r,i,o,a,s,l,d,f,v;return u(this,function(u){switch(u.label){case 0:r=B(),i=r,u.label=1;case 1:return u.trys.push([1,4,,5]),(o=null==i?void 0:i.cookieStore)?[4,o.getAll(e)]:[3,3];case 2:if(a=u.sent()){a.length>1&&(null===(t=this.config.diagnosticsClient)||void 0===t||t.recordEvent("cookies.duplicate",{cookies:a.map(function(e){return e.domain})}),null===(n=this.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.cookieStore"));try{for(s=c(a),l=s.next();!l.done;l=s.next())if(d=l.value,Me(d.domain,this.options.domain))return[2,d.value]}catch(e){f={error:e}}finally{try{l&&!l.done&&(v=s.return)&&v.call(s)}finally{if(f)throw f.error}}}u.label=3;case 3:return[3,5];case 4:return u.sent(),[3,5];case 5:return[2,this.getRawSync(e)]}})})},e.prototype.getRawSync=function(e){var t,n,r=this,i=B(),o=(null!==(n=null===(t=null==i?void 0:i.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==n?n:[]).filter(function(t){return 0===t.indexOf(e+"=")}),a=void 0,s=this.config.duplicateResolverFn;if("function"==typeof s&&o.length>1&&(a=o.find(function(t){var n;try{var i=s(t.substring(e.length+1));return i||null===(n=r.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.document.cookie"),i}catch(e){return!1}})),a||(a=o[0]),a)return a.substring(e.length+1)},e.prototype.set=function(e,t){return s(this,void 0,void 0,function(){return u(this,function(n){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var n;try{var r=B();if(!r||!r.document||"function"!=typeof r.btoa||"function"!=typeof r.encodeURIComponent)return;var i=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=null!==t?i:-1,a=void 0;if(o){var s=new Date;s.setTime(s.getTime()+24*o*60*60*1e3),a=s}var u="".concat(e,"=").concat(r.btoa(r.encodeURIComponent(JSON.stringify(t))));a&&(u+="; expires=".concat(a.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),r.document.cookie=u}catch(t){var c=t instanceof Error?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}},e.prototype.remove=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2]})})},e.isDomainWritable=function(t){return s(this,void 0,void 0,function(){var n,r;return u(this,function(i){switch(i.label){case 0:if(e.cachedTlds[t])return[2,!0];n="AMP_TLDTEST",r=new e({domain:"."+t}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.transaction(n,function(n){if(e.cachedTlds[t])return!0;try{n.set(1);var r=!!n.get();return r&&(e.cachedTlds[t]=!0),r}finally{n.set(null)}})];case 2:return[2,!!i.sent()];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return s(this,void 0,void 0,function(){var n,r,i=this;return u(this,function(o){switch(o.label){case 0:if(n=function(){var e,t=B();return null===(e=null==t?void 0:t.navigator)||void 0===e?void 0:e.locks}(),r=function(){return t({get:function(){return i.getSync(e)},set:function(t){return i.setSync(e,t)}})},!n)return[2,r()];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.request("com.amplitude:cookie-lock:".concat(e),r)];case 2:return[2,o.sent()];case 3:return o.sent(),[2,r()];case 4:return[2]}})})},e.cachedTlds={},e}(),Ne=function(e){var t;return null!==(t=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}}(e))&&void 0!==t?t:function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}}(e)},Me=function(e,t){if(""===e&&""===t)return!0;if(!e||!t)return!1;var n=e.startsWith(".")?e.substring(1):e,r=t.startsWith(".")?t.substring(1):t;return n.toLowerCase()===r.toLowerCase()},je=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[v,t,e.substring(0,n)].filter(Boolean).join("_")},Ue=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return s(this,void 0,void 0,function(){return u(this,function(n){return[2,(null===(t=this.storage)||void 0===t?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var n;return s(this,void 0,void 0,function(){return u(this,function(r){try{null===(n=this.storage)||void 0===n||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return s(this,void 0,void 0,function(){return u(this,function(n){try{null===(t=this.storage)||void 0===t||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return s(this,void 0,void 0,function(){return u(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}(),qe="tags",Fe="counters",Be="histograms",He="events",Ve="internal",ze="last_flush_timestamp",We=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return void 0!==(null===(e=B())||void 0===e?void 0:e.indexedDB)},e.prototype.getDB=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onerror=function(){e.dbPromise=null,n(new Error("Failed to open IndexedDB"))},r.onsuccess=function(){var n=r.result;n.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},n.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),n.close()},t(n)},r.onupgradeneeded=function(t){var n=t.target.result;e.createTables(n)}})},e.prototype.createTables=function(e){(e.objectStoreNames.contains(qe)||e.createObjectStore(qe,{keyPath:"key"}),e.objectStoreNames.contains(Fe)||e.createObjectStore(Fe,{keyPath:"key"}),e.objectStoreNames.contains(Be)||e.createObjectStore(Be,{keyPath:"key"}),e.objectStoreNames.contains(He))||e.createObjectStore(He,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1});e.objectStoreNames.contains(Ve)||e.createObjectStore(Ve,{keyPath:"key"})},e.prototype.setTags=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([qe],"readwrite"),r=n.objectStore(qe),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tags",e),t()},i.forEach(function(e){var t=l(e,2),n=t[0],i=t[1];r.put({key:n,value:i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tag",n,i,e)}})})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",i),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([Fe],"readwrite"),r=n.objectStore(Fe),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to increment counters",e),t()},i.forEach(function(e){var t=l(e,2),n=t[0],i=t[1],a=r.get(n);a.onsuccess=function(){var e=a.result,t=e?e.value:0;r.put({key:n,value:t+i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to update counter",n,e)}},a.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,e)}})})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",i),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([Be],"readwrite"),r=n.objectStore(Be),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),t()},i.forEach(function(e){var t=l(e,2),n=t[0],i=t[1],a=r.get(n);a.onsuccess=function(){var e,t=a.result;e=t?{key:n,count:t.count+i.count,min:Math.min(t.min,i.min),max:Math.max(t.max,i.max),sum:t.sum+i.sum}:{key:n,count:i.count,min:i.min,max:i.max,sum:i.sum},r.put(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,e)}},a.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,e)}})})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",i),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===e.length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([He],"readwrite"),r=n.objectStore(He),[2,new Promise(function(t){n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event records",e),t()};var i=r.count();i.onsuccess=function(){var t=i.result,n=Math.max(0,10-t);n<e.length&&o.logger.debug("DiagnosticsStorage: Only added ".concat(n," of ").concat(e.length," events due to storage limit")),e.slice(0,n).forEach(function(e){r.add(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},i.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",i),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return s(this,void 0,void 0,function(){var n,r,i,o;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([Ve],"readwrite"),i=r.objectStore(Ve),[2,new Promise(function(n,o){r.onabort=function(){return o(new Error("Failed to set internal value"))};var a=i.put({key:e,value:t});a.onsuccess=function(){return n()},a.onerror=function(){return o(new Error("Failed to set internal value"))}})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",o),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return s(this,void 0,void 0,function(){var t,n,r,i;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=o.sent(),n=t.transaction([Ve],"readonly"),r=n.objectStore(Ve),[2,new Promise(function(t,i){n.onabort=function(){return i(new Error("Failed to get internal value"))};var o=r.get(e);o.onsuccess=function(){return t(o.result)},o.onerror=function(){return i(new Error("Failed to get internal value"))}})];case 2:return i=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",i),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return s(this,void 0,void 0,function(){var e,t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getInternal(ze)];case 1:return[2,(e=n.sent())?parseInt(e.value,10):void 0];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.setInternal(ze,e.toString())];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).clear();i.onsuccess=function(){return n()},i.onerror=function(){return r(new Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return s(this,void 0,void 0,function(){var e,t,n,r,i,o,a,s;return u(this,function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=u.sent(),t=e.transaction([qe,Fe,Be,He],"readwrite"),[4,Promise.all([this.getAllFromStore(t,qe),this.getAllFromStore(t,Fe),this.getAllFromStore(t,Be),this.getAllFromStore(t,He)])];case 2:return n=l.apply(void 0,[u.sent(),4]),r=n[0],i=n[1],o=n[2],a=n[3],[4,Promise.all([this.clearTable(t,Fe),this.clearTable(t,Be),this.clearTable(t,He)])];case 3:return u.sent(),[2,{tags:r,counters:i,histogramStats:o,events:a}];case 4:return s=u.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",s),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).getAll();i.onsuccess=function(){return n(i.result)},i.onerror=function(){return r(new Error("Failed to get all from ".concat(t)))}})},e}(),$e="__AMPLITUDE_SCRIPT_URL__",Ke=function(){var e=B();if(!e)return[];var t=e[$e];return Array.isArray(t)?t:"string"==typeof t?[t]:[]},Je=function(e){var t,n,r=Ke();if(0!==r.length)try{for(var i=c(r),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.filename&&e.filename.includes(a))return"filename";if(e.stack&&e.stack.includes(a))return"stack"}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},Ge=function(e){var t,n;try{var r=new URL(e,null===(n=null===(t=B())||void 0===t?void 0:t.location)||void 0===n?void 0:n.origin);return r.origin+r.pathname}catch(e){return}},Ye=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},Xe=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}},Qe=3e5,Ze=1e4,et=function(){function e(e,t,n,r){void 0===n&&(n="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl="US"===n?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(r,null,2)),this.config=o({enabled:!0,sampleRate:0},r),this.startTimestamp=Date.now(),this.shouldTrack=Ce(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,We.isSupported()?this.storage=new We(e,t):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),function(e){var t=B();if(t&&"function"==typeof t.addEventListener){var n=function(t){e.recordEvent("sdk.error.uncaught",o({type:t.type,message:t.message,filename:t.filename,error_name:t.errorName,stack:t.stack},t.metadata))};t.addEventListener("error",function(e){var t=e.error instanceof Error?e.error:void 0,r=null==t?void 0:t.stack,i=Je({filename:e.filename,stack:r});i&&n({type:"error",message:e.message,stack:r,filename:e.filename,errorName:null==t?void 0:t.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:i}})},!0),t.addEventListener("unhandledrejection",function(e){var t,r=e.reason instanceof Error?e.reason:void 0,i=null==r?void 0:r.stack,o=Ye(i),a=Je({filename:o,stack:i});a&&n({type:"unhandledrejection",message:null!==(t=null==r?void 0:r.message)&&void 0!==t?t:Xe(e.reason),stack:i,filename:o,errorName:null==r?void 0:r.name,metadata:{isTrusted:e.isTrusted,matchReason:a}})},!0)}}(this))}return e.prototype.isStorageAndTrackEnabled=function(){return Boolean(this.storage)&&Boolean(this.shouldTrack)},e.prototype.setTag=function(e,t){this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryTags).length>=Ze?this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit"):(this.inMemoryTags[e]=t,this.startTimersIfNeeded()))},e.prototype.increment=function(e,t){void 0===t&&(t=1),this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryCounters).length>=Ze?this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit"):(this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()))},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled())if(Object.keys(this.inMemoryHistograms).length>=Ze)this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");else{var n=this.inMemoryHistograms[e];n?(n.count+=1,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){this.isStorageAndTrackEnabled()&&(this.inMemoryEvents.length>=10?this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit"):(this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()))},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},Qe))},e.prototype.saveAllDataToStorage=function(){return s(this,void 0,void 0,function(){var e,t,n,r;return u(this,function(i){switch(i.label){case 0:return this.storage?(e=o({},this.inMemoryTags),t=o({},this.inMemoryCounters),n=o({},this.inMemoryHistograms),r=d([],l(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(t),this.storage.setHistogramStats(n),this.storage.addEventRecords(r)])]):[2];case 1:return i.sent(),[2]}})})},e.prototype._flush=function(){return s(this,void 0,void 0,function(){var e,t,n,r,i,o,a,s,c,l;return u(this,function(u){switch(u.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return u.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return e=u.sent(),t=e.tags,n=e.counters,r=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),a={},n.forEach(function(e){a[e.key]=e.value}),s={},r.forEach(function(e){s[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),c=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(a).length&&0===Object.keys(s).length&&0===c.length?[2]:(l={tags:o,histogram:s,counters:a,events:c},this.fetch(l),[2])}})})},e.prototype.fetch=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),!B())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:return n.sent().ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return t=n.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return s(this,void 0,void 0,function(){var e,t,n;return u(this,function(r){switch(r.label){case 0:return this.storage?(e=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return-1===(t=r.sent()||-1)?(this.storage.setLastFlushTimestamp(e),this._setFlushTimer(Qe),[2]):(n=e-t)>=Qe?(this._flush(),[2]):(this._setFlushTimer(Qe-n),[2])}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=Ce(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),tt=function(){function e(){}return e.prototype.send=function(e,t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,a,s,u,c,l,d,f,v,p,h,g,m,y,b,w,E,S;if("object"!=typeof e)return null;var k=e.code||0,T=this.buildStatus(k);switch(T){case j.Success:return{status:T,statusCode:k,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case j.Invalid:return{status:T,statusCode:k,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(a=e.events_with_invalid_fields)&&void 0!==a?a:{},eventsWithMissingFields:null!==(s=e.events_with_missing_fields)&&void 0!==s?s:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(l=e.exceeded_daily_quota_devices)&&void 0!==l?l:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(f=e.silenced_events)&&void 0!==f?f:[],throttledDevices:null!==(v=e.throttled_devices)&&void 0!==v?v:{},throttledEvents:null!==(p=e.throttled_events)&&void 0!==p?p:[]}};case j.PayloadTooLarge:return{status:T,statusCode:k,body:{error:null!==(h=e.error)&&void 0!==h?h:""}};case j.RateLimit:return{status:T,statusCode:k,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(y=e.throttled_devices)&&void 0!==y?y:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(E=e.exceeded_daily_quota_users)&&void 0!==E?E:{},throttledEvents:null!==(S=e.throttled_events)&&void 0!==S?S:[]}};case j.Timeout:default:return{status:T,statusCode:k}}},e.prototype.buildStatus=function(e){return re(e)?j.Success:429===e?j.RateLimit:413===e?j.PayloadTooLarge:408===e?j.Timeout:e>=400&&e<500?j.Invalid:e>=500?j.Failed:j.Unknown},e}();function nt(){return"undefined"!=typeof CompressionStream}function rt(e){return s(this,void 0,void 0,function(){var t,n;return u(this,function(r){switch(r.label){case 0:if(void 0===(t=CompressionStream))return[2,void 0];r.label=1;case 1:return r.trys.push([1,3,,4]),n=new Blob([e]).stream().pipeThrough(new t("gzip")),[4,new Response(n).arrayBuffer()];case 2:return[2,r.sent()];case 3:return r.sent(),[2,void 0];case 4:return[2]}})})}var it=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var n=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(n))),Promise.resolve({remoteConfig:n.remoteConfig,lastFetch:new Date(n.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}();var ot=401,at=403,st=429,ut=function(){function e(e,t,n,r,i){void 0===n&&(n="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=e,this.serverUrl=r||("US"===n?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new it(e,t),this.customFetch=i}return e.prototype.subscribe=function(e,t,n){var r=V(),i={id:r,key:e,deliveryMode:t,callback:n};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),r},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return-1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return s(this,void 0,void 0,function(){var e,t=this;return u(this,function(n){switch(n.label){case 0:return this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5?(this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2]):[4,this.getOrCreateFetchPromise()];case 1:return e=n.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(n){t.sendCallback(n,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise?this.fetchPromise:this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null}),this.fetchPromise):(this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null}),this.fetchPromise)},e.prototype.subscribeAll=function(e){return s(this,void 0,void 0,function(){var t,n,r,i=this;return u(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),n=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,n])];case 1:return void 0!==(r=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(r))),null!==r.remoteConfig?this.sendCallback(e,r,"cache"):this.logger.debug("Remote config client skips sending callback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return s(this,void 0,void 0,function(){var n,r;return u(this,function(i){switch(i.label){case 0:n=new Promise(function(e,n){setTimeout(function(){n("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),n])];case 2:return r=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,r,"remote"),this.storage.setConfig(r),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(r=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,r,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,r,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,n){var r;e.lastCallback=new Date,r=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(r,n,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),s(this,void 0,void 0,function(){var n,r,i,o,a,s,c=this;return u(this,function(l){switch(l.label){case 0:n=t/e,r={remoteConfig:null,lastFetch:new Date},i=function(r){var i,a,s,l,d,f,v,p,h;return u(this,function(u){switch(u.label){case 0:i=!0,a=new AbortController,s=setTimeout(function(){return a.abort()},t),u.label=1;case 1:return u.trys.push([1,10,11,12]),l=o.getUrlParams(),d={Accept:"*/*"},o.customFetch?[4,(g=o.customFetch({url:l,method:"GET",headers:d,signal:a.signal}),m=a.signal,new Promise(function(e,t){var n=function(){var e=new Error("Remote config custom fetch aborted by timeout");e.name="AbortError",t(e)};m.addEventListener("abort",n,{once:!0}),g.then(function(t){m.removeEventListener("abort",n),e(t)},function(e){m.removeEventListener("abort",n),t(e)})}))]:[3,3];case 2:return v=u.sent(),[3,5];case 3:return[4,fetch(l,{method:"GET",headers:d,signal:a.signal})];case 4:v=u.sent(),u.label=5;case 5:return(f=v).ok||f.status>=200&&f.status<300?[3,7]:[4,f.text()];case 6:return p=u.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(f.status,": ").concat(p)),f.status===ot||f.status===at?(o.logger.error("Remote config client fetch failed with ".concat(f.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,i=!1):f.status>=400&&f.status<500&&f.status!==st&&(i=!1),[3,9];case 7:return[4,f.json()];case 8:return[2,{value:{remoteConfig:u.sent(),lastFetch:new Date}}];case 9:return[3,12];case 10:return(h=u.sent())instanceof Error&&"AbortError"===h.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),h),[3,12];case 11:return clearTimeout(s),[7];case 12:return i?r<e-1?[4,new Promise(function(e){return setTimeout(e,c.getJitterDelay(n))})]:[3,14]:[2,"break"];case 13:u.sent(),u.label=14;case 14:return[2]}var g,m})},o=this,a=0,l.label=1;case 1:return a<e?[5,i(a)]:[3,4];case 2:if("object"==typeof(s=l.sent()))return[2,s.value];if("break"===s)return[3,4];l.label=3;case 3:return a++,[3,1];case 4:return[2,r]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e}(),ct=B(),lt=null==ct?void 0:ct.console,dt={},ft={},vt=!1;var pt,ht={addListener:function(e,t){var n,r=(n=e,!!lt&&"function"==typeof lt[n]&&(ft[n]||(ft[n]=lt[n],lt[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{if(dt[n]&&!vt){vt=!0;var r=dt[n];r&&r.forEach(function(t){try{t(n,e)}catch(e){}})}}catch(e){}return vt=!1,ft[n].apply(lt,e)}),!0));if(!r)return new Error("Console override failed");dt[e]?dt[e].push(t):dt[e]=[t]},removeListener:function(e){var t,n;try{for(var r=c(Object.values(dt)),i=r.next();!i.done;i=r.next())for(var o=i.value,a=o.length-1;a>=0;a--)if(o[a]===e){o.splice(a,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},_restoreConsole:function(){var e,t;try{for(var n=c(Object.entries(ft)),r=n.next();!r.done;r=n.next()){var i=l(r.value,2),o=i[0],a=i[1];a&&(lt[o]=a)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}ft={},dt={}}};!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(pt||(pt={}));var gt=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],mt="data-amp-track-",yt=["div","span","h1","h2","h3","h4","h5","h6"],bt=d(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],l(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),wt=bt,Et=bt,St=["*"];function kt(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e}function Tt(e,t,n){e&&Pt({json:e,allowlist:t.map(xt),excludelist:n.map(xt),ancestors:[]})}function Pt(e){var t,n,r=e.json,i=e.targetObject,o=e.allowlist,a=e.excludelist,s=e.ancestors,u=e.parentObject,f=e.targetKey;i||(i=r);var v=Object.keys(i);try{for(var p=c(v),h=p.next();!h.done;h=p.next()){var g=h.value,m=d(d([],l(s),!1),[g],!1);kt(i[g])?It(m,o)&&!It(m,a)||delete i[g]:Pt({json:r,targetObject:i[g],allowlist:o,excludelist:a,ancestors:m,parentObject:i,targetKey:g})}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}0===Object.keys(i).length&&u&&f&&delete u[f]}function xt(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function _t(e,t,n,r){if(void 0===n&&(n=0),void 0===r&&(r=0),r===t.length)return n===e.length;if(n===e.length){for(;r<t.length&&"**"===t[r];)r++;return r===t.length}var i=t[r];if("**"===i){if(r+1===t.length)return!0;for(var o=n;o<=e.length;o++)if(_t(e,t,o,r+1))return!0;return!1}return("*"===i||i===e[n])&&_t(e,t,n+1,r+1)}function It(e,t){return t.some(function(t){return _t(e,t)})}var At=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,n;void 0===e&&(e=[]);var r=this.request.headers,i={};if(Array.isArray(r))r.forEach(function(e){var t=l(e,2),n=t[0],r=t[1];i[n]=r});else if(r instanceof Headers)r.forEach(function(e,t){i[t]=e});else if("object"==typeof r&&null!==r)try{for(var o=c(Object.entries(r)),a=o.next();!a.done;a=o.next()){var s=l(a.value,2),u=s[0],d=s[1];i[u]=d}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return jt(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=B();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=Ct(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){return u(this,function(n){return 0===e.length?[2,null]:[2,Nt(this.body,e,t)]})})},e}(),Ot=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),jt(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return Ct(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){return u(this,function(n){return 0===e.length?[2,null]:[2,Nt(this.body,e,t)]})})},e}();function Ct(e,t){var n,r,i,o=B(),a=null==o?void 0:o.TextEncoder;if(a){var s;if("string"==typeof e)s=e,i=(new a).encode(s).length;else if(e instanceof Blob)i=(s=e).size;else if(e instanceof URLSearchParams)s=e,i=(new a).encode(s.toString()).length;else if(ArrayBuffer.isView(e))i=(s=e).byteLength;else if(e instanceof ArrayBuffer)i=(s=e).byteLength;else if(e instanceof FormData){var u=e,d=0,f=0;try{for(var v=c(u.entries()),p=v.next();!p.done;p=v.next()){var h=l(p.value,2),g=h[0],m=h[1];if(d+=g.length,"string"==typeof m)d+=(new a).encode(m).length;else{if(!(m instanceof Blob))return;d+=m.size}if(++f>=t)return}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}i=d}else if(e instanceof ReadableStream)return void(s=e);return i}}var Rt,Lt=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var n=this.response.headers,r={};return null===(t=null==n?void 0:n.forEach)||void 0===t||t.call(n,function(e,t){r[t]=e}),jt(r,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var n=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),r=n?parseInt(n,10):void 0;return this._bodySize=r,r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return s(this,void 0,void 0,function(){var e,t;return u(this,function(n){switch(n.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),n.label=1;case 1:return n.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},500)}),[4,Promise.race([e,t])];case 2:return[2,n.sent()];case 3:return n.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return 0===e.length?[2,null]:[4,this.text()];case 1:return[2,Nt(n.sent(),e,t)]}})})},e}(),Dt=function(){function e(e,t,n,r){this.statusCode=e,this.headersString=t,this.size=n,this.getJson=r}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,n;if(void 0===e&&(e=[]),!this.headersString)return{};var r={},i=this.headersString.split("\r\n");try{for(var o=c(i),a=o.next();!a.done;a=o.next()){var s=l(a.value.split(": "),2),u=s[0],d=s[1];u&&d&&(r[u]=d)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return jt(r,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){var n;return u(this,function(r){return 0===e.length?[2,null]:(n=this.getJson())?(Tt(n,e,t),[2,n]):[2,null]})})},e}();function Nt(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return Tt(r,t,n),r}catch(e){return null}}!function(e){e.REDACT="redact",e.REMOVE="remove"}(Rt||(Rt={}));var Mt="[REDACTED]",jt=function(e,t){var n,r,i=t.allow,o=void 0===i?[]:i,a=t.strategy,s=void 0===a?Rt.REMOVE:a,u=d([],l(L),!1),f={},v=function(t){var n=t.toLowerCase();u.find(function(e){return e.toLowerCase()===n})?s===Rt.REDACT&&(f[t]=Mt):o.find(function(e){return e.toLowerCase()===n})?f[t]=e[t]:s===Rt.REDACT&&(f[t]=Mt)};try{for(var p=c(Object.keys(e)),h=p.next();!h.done;h=p.next()){v(h.value)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}return f},Ut=function(){function e(e,t,n,r,i,o,a,s,u,c,l){void 0===a&&(a=0),this.type=e,this.method=t,this.timestamp=n,this.startTime=r,this.url=i,this.requestWrapper=o,this.status=a,this.duration=s,this.responseWrapper=u,this.error=c,this.endTime=l}return e.prototype.toSerializable=function(){var e,t,n,r,i={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(e=this.requestWrapper)||void 0===e?void 0:e.headers(d([],l(R),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(n=this.responseWrapper)||void 0===n?void 0:n.headers(d([],l(R),!1)),responseBodySize:null===(r=this.responseWrapper)||void 0===r?void 0:r.bodySize};return Object.fromEntries(Object.entries(i).filter(function(e){var t=l(e,2);return t[0],void 0!==t[1]}))},e}();var qt=function(e,t){void 0===t&&(t=V()),this.callback=e,this.id=t};function Ft(e){try{e()}catch(e){}}var Bt=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=B();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var e=B();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var n,r,i,o,a,s,u,c,l,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null===(i=null===(r=null===(n=this.globalScope)||void 0===n?void 0:n.XMLHttpRequest)||void 0===r?void 0:r.prototype)||void 0===i?void 0:i.open,v=null===(s=null===(a=null===(o=this.globalScope)||void 0===o?void 0:o.XMLHttpRequest)||void 0===a?void 0:a.prototype)||void 0===s?void 0:s.send,p=null===(l=null===(c=null===(u=this.globalScope)||void 0===u?void 0:u.XMLHttpRequest)||void 0===c?void 0:c.prototype)||void 0===l?void 0:l.setRequestHeader;f&&v&&p&&this.observeXhr(f,v,p);var h=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;h&&this.observeFetch(h),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(n){try{n.callback(e)}catch(e){Ft(function(){var n;null===(n=t.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,n,r,i,o,a){var s;if(void 0!==o&&void 0!==a){var u,c,l,d="GET";if(!function(e){return"object"==typeof e&&null!==e&&"url"in e&&"method"in e}(t)?u=null===(s=null==t?void 0:t.toString)||void 0===s?void 0:s.call(t):(u=t.url,d=t.method),u)try{var f=new URL(u);u="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==n?void 0:n.method)||d,r&&(c=r.status),i&&(l={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},c=0);var v=Math.floor(performance.now()-a),p=Math.floor(o+v),h=new Ut(e,d,o,o,u,n,c,v,r,l,p);this.triggerEventCallbacks(h)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(n,r){return s(t,void 0,void 0,function(){var t,i,o,a,s=this;return u(this,function(u){switch(u.label){case 0:try{t=this.getTimestamps()}catch(e){Ft(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}u.label=1;case 1:return u.trys.push([1,3,,4]),[4,e(n,r)];case 2:return i=u.sent(),[3,4];case 3:return a=u.sent(),o=a,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,r?new At(r):void 0,i?new Lt(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){Ft(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(i)return[2,i];throw o}})})})},e.createXhrJsonParser=function(e,t){return function(){var n;try{if("json"===e.responseType){if(null===(n=t.globalScope)||void 0===n?void 0:n.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(n){return n instanceof Error&&"InvalidStateError"===n.name&&Ft(function(){var n;return null===(n=t.logger)||void 0===n?void 0:n.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))}),null}return null}},e.prototype.observeXhr=function(t,n,r){if(this.globalScope&&t&&n){var i=this.globalScope.XMLHttpRequest.prototype,a=this;i.open=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=l(n,2),s=i[0],u=i[1];try{this.$$AmplitudeAnalyticsEvent=o({method:s,url:null===(e=null==u?void 0:u.toString)||void 0===e?void 0:e.call(u),headers:{}},a.getTimestamps())}catch(e){Ft(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return t.apply(this,n)},i.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this,o=e.createXhrJsonParser(this,a),s=t[0],u=i.$$AmplitudeAnalyticsEvent;return i.$$AmplitudeAnalyticsEvent&&i.addEventListener("loadend",function(){try{var e=i.getAllResponseHeaders(),t=i.getResponseHeader("content-length"),n=new Dt(i.status,e,t?parseInt(t,10):void 0,o),r=i.$$AmplitudeAnalyticsEvent.headers,c=new Ot(s,r);u.status=i.status,a.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},c,n,void 0,u.startTime,u.durationStart)}catch(e){Ft(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),n.apply(i,t)},i.setRequestHeader=function(e,t){try{var n=this.$$AmplitudeAnalyticsEvent;n&&(n.headers[e]=t)}catch(e){Ft(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}r.apply(this,[e,t])}}},e}(),Ht=new Bt,Vt=function(){function e(){}return e.prototype.parse=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2,o(o(o(o({},C),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=_e();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=_e();return(e={})[w]=t[w],e[E]=t[E],e[S]=t[S],e[k]=t[k],e[T]=t[T],e[P]=t[P],e[x]=t[x],e[_]=t[_],e[I]=t[I],e[A]=t[A],e[O]=t[O],e},e}(),zt="data-amp-mask",Wt="*****",$t=/\b(?:\d[ -]*?){13,16}\b/,Kt=/(\d{3}-?\d{2}-?\d{4})/g,Jt=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,Gt=function(e,t){var n,r;if(void 0===t&&(t=[]),"string"!=typeof e)return"";var i=e;i=(i=(i=i.replace($t,Wt)).replace(Kt,Wt)).replace(Jt,Wt);try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;try{i=i.replace(s,Wt)}catch(e){}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},Yt=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(zt)?Wt:e?e(document.title):document.title},Xt={};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.Observable=void 0;const Qt=e=>Boolean(Symbol[e]),Zt=e=>Qt(e)?Symbol[e]:"@@"+e,en=Zt("iterator"),tn=Zt("observable"),nn=Zt("species");function rn(e,t){let n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function on(e){let t=e.constructor;return void 0!==t&&(t=t[nn],null===t&&(t=void 0)),void 0!==t?t:vn}function an(e){an.log?an.log(e):setTimeout(()=>{throw e})}function sn(e){Promise.resolve().then(()=>{try{e()}catch(e){an(e)}})}function un(e){let t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{let e=rn(t,"unsubscribe");e&&e.call(t)}}catch(e){an(e)}}function cn(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function ln(e,t,n){e._state="running";let r=e._observer;try{let i=rn(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(cn(e),!i)throw n;i.call(r,n);break;case"complete":cn(e),i&&i.call(r)}}catch(e){an(e)}"closed"===e._state?un(e):"running"===e._state&&(e._state="ready")}function dn(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void sn(()=>function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let n=0;n<t.length&&(ln(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e))):void ln(e,t,n);e._queue.push({type:t,value:n})}}class fn{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let n=this,r={get closed(){return"closed"===n._state},next(e){dn(n,"next",e)},error(e){dn(n,"error",e)},complete(){dn(n,"complete")}};try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(cn(this),un(this))}}class vn{constructor(e){if(!(this instanceof vn))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new fn(e,this._subscriber)}forEach(e){return new Promise((t,n)=>{if("function"!=typeof e)return void n(new TypeError(e+" is not a function"));function r(){i.unsubscribe(),t()}let i=this.subscribe({next(t){try{e(t,r)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t})})}map(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(on(this))(t=>this.subscribe({next(n){try{n=e(n)}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(on(this))(t=>this.subscribe({next(n){try{if(!e(n))return}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=on(this),n=arguments.length>1,r=!1,i=arguments[1];return new t(t=>this.subscribe({next(o){let a=!r;if(r=!0,!a||n)try{i=e(i,o)}catch(e){return t.error(e)}else i=o},error(e){t.error(e)},complete(){if(!r&&!n)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(i),t.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=on(this);return new t(n=>{let r,i=0;return function o(a){r=a.subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){i===e.length?(r=void 0,n.complete()):o(t.from(e[i++]))}})}(this),()=>{r&&(r.unsubscribe(),r=void 0)}})}flatMap(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=on(this);return new t(n=>{let r=[],i=this.subscribe({next(i){if(e)try{i=e(i)}catch(e){return n.error(e)}let a=t.from(i).subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){let e=r.indexOf(a);e>=0&&r.splice(e,1),o()}});r.push(a)},error(e){n.error(e)},complete(){o()}});function o(){i.closed&&0===r.length&&n.complete()}return()=>{r.forEach(e=>e.unsubscribe()),i.unsubscribe()}})}[tn](){return this}static from(e){let t="function"==typeof this?this:vn;if(null==e)throw new TypeError(e+" is not an object");let n=rn(e,tn);if(n){let r=n.call(e);if(Object(r)!==r)throw new TypeError(r+" is not an object");return function(e){return e instanceof vn}(r)&&r.constructor===t?r:new t(e=>r.subscribe(e))}if(Qt("iterator")&&(n=rn(e,en),n))return new t(t=>{sn(()=>{if(!t.closed){for(let r of n.call(e))if(t.next(r),t.closed)return;t.complete()}})});if(Array.isArray(e))return new t(t=>{sn(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})});throw new TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:vn)(t=>{sn(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})})}static get[nn](){return this}}Xt.Observable=vn,Object.defineProperty(vn,Symbol("extensions"),{value:{symbol:tn,hostReportError:an},configurable:!0});var pn=Xt.Observable;function hn(e,t){return new pn(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})}function gn(e,t){return new pn(function(n){var r=!1,i=new Set,o=function(){var e,t;r=!0;try{for(var n=c(i),o=n.next();!o.done;o=n.next()){var a=o.value;try{a.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.clear()},a=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),o())},complete:function(){i.delete(t),r||0!==i.size||(n.complete(),o(),r=!0)}});i.add(t)};return a(e),a(t),o})}function mn(e){var t=new Set,n=null;function r(){null==n||n.unsubscribe(),n=null,t.clear()}return new pn(function(i){return t.add(i),null===n&&(n=e.subscribe({next:function(e){var n,r,i;try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;null===(i=s.next)||void 0===i||i.call(s,e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},error:function(e){var n,i,o;try{for(var a=c(t),s=a.next();!s.done;s=a.next()){var u=s.value;null===(o=u.error)||void 0===o||o.call(u,e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}r()},complete:function(){var e,n,i;try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;null===(i=s.complete)||void 0===i||i.call(s)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}r()}})),function(){t.delete(i),0===t.size&&n&&(n.unsubscribe(),n=null)}})}var yn={},bn={get exports(){return yn},set exports(e){yn=e}},wn=Object.prototype.hasOwnProperty;function En(e){return"[Throws: "+(e?e.message:"?")+"]"}function Sn(e){var t=[];return function e(n){if(null===n||"object"!=typeof n)return n;if(-1!==t.indexOf(n))return"[Circular]";if(t.push(n),"function"==typeof n.toJSON)try{var r=e(n.toJSON());return t.pop(),r}catch(e){return En(e)}if(Array.isArray(n)){var i=n.map(e);return t.pop(),i}var o=Object.keys(n).reduce(function(t,r){return t[r]=e(function(e,t){if(wn.call(e,t))try{return e[t]}catch(e){return En(e)}return e[t]}(n,r)),t},{});return t.pop(),o}(e)}bn.exports=function(e,t,n){return JSON.stringify(Sn(e),t,n)};var kn,Tn=yn.ensureProperties=Sn,Pn=yn||e({__proto__:null,ensureProperties:Tn,get default(){return yn}},[yn]),xn="https://app.amplitude.com",_n={US:xn,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"};var In="__AMPLITUDE_MESSENGER_INSTANCE__",An="__AMPLITUDE_MESSENGER__",On=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?xn:t;this[kn]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(r=window.opener)||void 0===r?void 0:r.postMessage)||void 0===i||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,a){r.requestCallbacks[i]={resolve:t,reject:a},r.notify(o),n.timeout>0&&setTimeout(function(){a(new Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},e.prototype.registerActionHandler=function(e,t){var n,r,i,o;this.actionHandlers.has(e)&&(null===(o=null===(i=this.logger)||void 0===i?void 0:i.warn)||void 0===o||o.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var a=this.pendingMessages.get(e);if(a){this.pendingMessages.delete(e);try{for(var s=c(a),u=s.next();!u.done;u=s.next()){t(u.value)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(e){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];n=function(e){return document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),null===(r=document.head)||void 0===r||r.appendChild(i)}catch(e){n(e)}})}(e).then(function(){}),this.scriptLoadPromises.set(e,n),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n];case 2:return i.sent(),[3,4];case 3:throw r=i.sent(),this.scriptLoadPromises.delete(e),r;case 4:return[2]}})})},e.prototype.setup=function(e){var t,n,r=this,i=void 0===e?{}:e,o=i.logger,a=i.endpoint;o&&(this.logger=o),a&&this.endpoint===xn&&(this.endpoint=a),this.isSetup||(this.isSetup=!0,null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Setting up messenger"),this.messageHandler=function(e){var t,n,i,o,a;if(null===(n=null===(t=r.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message received: ",JSON.stringify(e)),r.endpoint===e.origin){var s=e.data,u=null==s?void 0:s.action;if(u)if("id"in s&&s.id)null===(o=null===(i=r.logger)||void 0===i?void 0:i.debug)||void 0===o||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),r.handleResponse(s);else{if("ping"===u)return void r.notify({action:"pong"});var c=r.actionHandlers.get(u);if(c)c(s.data);else{var l=null!==(a=r.pendingMessages.get(u))&&void 0!==a?a:[];l.push(s.data),r.pendingMessages.set(u,l)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=B();(null==e?void 0:e[An])===this&&delete e[An]},e}();function Cn(e){var t,n=B(),r=null==n?void 0:n[An];if("object"==typeof(t=r)&&null!==t&&In in t&&!0===t[In])return r;var i=new On(e);return n&&(n[An]=i),i}kn=In;var Rn="__AMPLITUDE_BACKGROUND_CAPTURE__";var Ln={always:"always",ifEmptyCampaign:"ifEmptyCampaign"};function Dn(e,t){var n=0;if(Number.isFinite(e)&&Number.isFinite(t)&&t>0){var r=e/t*100;n=Math.min(100,Math.max(0,r))}return n}function Nn(e,t){var n=e.currentTime,r=e.duration;return o({duration:r,start_time:n,last_position:n,percent_completed:Dn(n,r)},void 0!==t?{stop_reason:t}:{})}function Mn(e){return{mux_playback_id:e.getAttribute("playback-id"),mux_video_id:e.getAttribute("metadata-video-id"),mux_video_title:e.getAttribute("metadata-video-title")}}function jn(e,t,n,r){return s(this,void 0,void 0,function(){var i,a,s,c,d;return u(this,function(u){switch(u.label){case 0:return[4,Promise.all([new Promise(function(t){return e.getDuration(t)}),new Promise(function(t){return e.getCurrentTime(t)})])];case 1:if(i=l.apply(void 0,[u.sent(),2]),a=i[0],s=i[1],c={},"mux"===n){d=void 0;try{d=new URL(t.getAttribute("src")),c.mux_video_title=d.searchParams.get("metadata-video-title"),c.mux_video_id=d.searchParams.get("metadata-video-id"),c.mux_playback_id=d.pathname.split("/").pop()}catch(e){}}return[2,o(o({duration:a,start_time:s,last_position:s,percent_completed:Dn(s,a)},void 0!==r?{stop_reason:r}:{}),c)]}})})}function Un(e,t,n){void 0===n&&(n=null);var r=[],i=function(){var i=e.elem,o=!1,a=function(){jn(e,i,n).then(function(e){t.onPlay(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'play' handler: ".concat(e))})};e.on("play",a),r.push(function(){return e.off("play",a)});var c=function(){jn(e,i,n,"paused").then(function(e){t.onPause(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'pause' handler: ".concat(e))})};e.on("pause",c),r.push(function(){return e.off("pause",c)});var l=function(){jn(e,i,n,"ended").then(function(e){t.onEnded(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'ended' handler: ".concat(e))})};e.on("ended",l),r.push(function(){return e.off("ended",l)});var d=function(){o=!0,jn(e,i,n,"seeking").then(function(e){t.onSeeking(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'seeking' handler: ".concat(e))})};e.on("seeking",d),r.push(function(){return e.off("seeking",d)});var f=function(){o=!1,jn(e,i,n).then(function(e){t.onSeeked(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'seeked' handler: ".concat(e))})};e.on("seeked",f),r.push(function(){return e.off("seeked",f)});var v=function(){(function(e){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){return e.getCurrentTime(t)})];case 1:return[2,{currentTime:t.sent()}]}})})})(e).then(function(e){var n={position:e.currentTime,isSeeking:o};t.onTimeUpdate(n)}).catch(function(e){t.onError("Error getting iframe metadata from 'timeupdate' handler: ".concat(e))})};e.on("timeupdate",v),r.push(function(){return e.off("timeupdate",v)})};return e.on("ready",i),function(){e.off("ready",i),r.forEach(function(e){return e()})}}var qn=function(){function e(e){var t=e.videoEl,n=e.onStateChange,r=e.vendor,i=e.isEmbedded,a=this;this.state={playbackState:"paused"},this.handler={onPlay:function(e){a.updatePlaybackState("playing",e)},onPause:function(e){a.updatePlaybackState("paused",e)},onEnded:function(e){a.updatePlaybackState("ended",e)},onSeeking:function(){var e=o(o({},a.state),{isSeeking:!0});a.updateState(e)},onSeeked:function(e){var t=o(o({},a.state),{isSeeking:!1,position:e.last_position});a.updateState(t)},onError:function(e){a.updateStateWithError(e)},onTimeUpdate:function(e){a.updateTime(e)}},this.onStateChange=n,this.untrack=i?Un(t,this.handler,r):function(e,t,n){var r=function(){var r=o(o({},Nn(e)),"mux"===n?Mn(e):{});t.onPlay(r)};e.addEventListener("play",r);var i=function(){var r=o(o({},Nn(e,"paused")),"mux"===n?Mn(e):{});t.onPause(r)};e.addEventListener("pause",i);var a=function(){var r=o(o({},Nn(e,"ended")),"mux"===n?Mn(e):{});t.onEnded(r)};e.addEventListener("ended",a);var s=function(){var r=o(o({},Nn(e,"seeking")),"mux"===n?Mn(e):{});t.onSeeking(r)};e.addEventListener("seeking",s);var u=function(){var r=o(o({},Nn(e)),"mux"===n?Mn(e):{});t.onSeeked(r)};e.addEventListener("seeked",u);var c=function(){var n=e,r={position:e.currentTime,isSeeking:!!n.seeking};t.onTimeUpdate(r)};return e.addEventListener("timeupdate",c),function(){e.removeEventListener("play",r),e.removeEventListener("pause",i),e.removeEventListener("ended",a),e.removeEventListener("seeking",s),e.removeEventListener("seeked",u),e.removeEventListener("timeupdate",c)}}(t,this.handler,r)}return e.prototype.stateChangeHandler=function(e,t){try{this.onStateChange(e,t)}catch(e){}},e.prototype.updateStateWithError=function(e){var t=this.state,n=o(o({},t),{playbackState:"error",errorMessage:e});this.updateState(n)},e.prototype.updatePlaybackState=function(e,t){var n=o(o({},this.state),{playbackState:e,lastEvent:t,position:t.last_position});this.updateState(n)},e.prototype.updateTime=function(e){var t,n;if(this.state.lastEvent&&"playing"===this.state.playbackState){var r=e.isSeeking||this.state.isSeeking,i=null!==(t=this.state.position)&&void 0!==t?t:0,a=e.position;if(r)this.state=o(o({},this.state),{position:a});else{var s=a-i,u=o(o({},this.state),{position:a,watchTime:(null!==(n=this.state.watchTime)&&void 0!==n?n:0)+s});this.updateState(u)}}},e.prototype.updateState=function(e){var t=this.state;this.state=e,this.stateChangeHandler(t,e)},e.prototype.destroy=function(){this.untrack()},e}();var Fn=function(e,t){return"boolean"==typeof e?e:!1!==(null==e?void 0:e[t])&&(!function(){var e,t,n=B();return"string"==typeof(null===(t=null===(e=null==n?void 0:n.chrome)||void 0===e?void 0:e.runtime)||void 0===t?void 0:t.id)}()||!!(null==e?void 0:e[t]))},Bn=function(e){return Fn(e,"attribution")},Hn=function(e){return Fn(e,"formInteractions")},Vn=function(e){return Fn(e,"pageViews")},zn=function(e){return Fn(e,"sessions")},Wn=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.networkTracking||"object"==typeof e.networkTracking)},$n=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},Kn=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.frustrationInteractions||"object"==typeof e.frustrationInteractions)},Jn=function(e){if("object"==typeof e.autocapture){var t=e.autocapture.performanceTracking;return!0===t?{mainThreadBlock:!0}:"object"==typeof t&&null!==t?t:void 0}},Gn=function(e){if($n(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},Yn=function(e){if(Kn(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.frustrationInteractions)return e.autocapture.frustrationInteractions},Xn=function(e){var t;if(Wn(e.autocapture)){var n=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.networkTracking?n=e.autocapture.networkTracking:e.networkTrackingOptions&&(n=e.networkTrackingOptions),o(o({},n),{captureRules:null===(t=null==n?void 0:n.captureRules)||void 0===t?void 0:t.map(function(t){var n,r,i;if((null===(n=t.urls)||void 0===n?void 0:n.length)&&(null===(r=t.hosts)||void 0===r?void 0:r.length)){var a=JSON.stringify(t.hosts),s=JSON.stringify(t.urls);return null===(i=e.loggerProvider)||void 0===i||i.warn("Found network capture rule with both urls='".concat(s,"' and hosts='").concat(a,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),o(o({},t),{hosts:void 0})}return t})})}},Qn=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return Vn(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:r,eventType:t,pageCounter:i}},Zn=function(e,t){er(e,t)},er=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,a=r.resolve,s=e&&e[i];if("function"==typeof s){var u=s.apply(e,o);"function"==typeof a&&a(null==u?void 0:u.promise)}}return e},tr=function(e){return e&&void 0!==e._q},nr="2.44.4",rr="amplitude-ts-sdk-script",ir=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(rr,"/").concat(nr),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,n;return s(this,void 0,void 0,function(){var r,i,a;return u(this,function(s){return r=(new Date).getTime(),i=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1,a=null!==(n=e.event_id)&&void 0!==n?n:i+1,this.config.lastEventId=a,e.time||(this.config.lastEventTime=r),[2,o(o(o(o(o(o(o(o({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:xe()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:V(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:a,library:this.library,user_agent:this.userAgent})]})})},e}(),or=1e3,ar=function(e){function t(t){var n,r,i,o=this;try{i=null===(n=B())||void 0===n?void 0:n.localStorage}catch(e){null===(r=null==t?void 0:t.loggerProvider)||void 0===r||r.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return n(t,e),t.prototype.set=function(t,n){var r;return s(this,void 0,void 0,function(){var i;return u(this,function(o){switch(o.label){case 0:return Array.isArray(n)&&n.length>or?(i=n.length-or,[4,e.prototype.set.call(this,t,n.slice(0,or))]):[3,2];case 1:return o.sent(),null===(r=this.loggerProvider)||void 0===r||r.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(or,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(Ue),sr=function(e){function t(){var t;return e.call(this,null===(t=B())||void 0===t?void 0:t.sessionStorage)||this}return n(t,e),t}(Ue),ur=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=t,n}return n(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),s(this,void 0,void 0,function(){var r=this;return u(this,function(i){return[2,new Promise(function(i,a){"undefined"==typeof XMLHttpRequest&&a(new Error("XHRTransport is not supported."));var d=new XMLHttpRequest;d.open("POST",e,!0),d.onreadystatechange=function(){if(d.readyState===r.state.done){var e=d.responseText;try{i(r.buildResponse(JSON.parse(e)))}catch(e){i(r.buildResponse({code:d.status}))}}};var f={"Content-Type":"application/json",Accept:"*/*"},v=JSON.stringify(t),p=n&&v.length>=2048&&nt(),h=function(e){var t,n;f=o(o({},r.customHeaders),f);try{for(var i=c(Object.entries(f)),a=i.next();!a.done;a=i.next()){var s=l(a.value,2),u=s[0],v=s[1];d.setRequestHeader(u,v)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}d.send(e)};s(r,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return p?[4,rt(v)]:[3,2];case 1:return(e=t.sent())?(f["Content-Encoding"]="gzip",h(e)):h(v),[3,3];case 2:h(v),t.label=3;case 3:return[2]}})}).catch(a)})]})})},t}(tt),cr=function(e){function t(t,n,r){void 0===t&&(t={});var i=e.call(this)||this;return i.customHeaders=t,i.enableKeepalive=!1!==n,i.referrerPolicy=r,i}return n(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),s(this,void 0,void 0,function(){var r,i,a,s,c,l,d,f,v;return u(this,function(u){switch(u.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r=JSON.stringify(t),i=n&&r.length>=2048&&nt(),a=r,s={"Content-Type":"application/json",Accept:"*/*"},i?[4,rt(r)]:[3,2];case 1:(c=u.sent())&&(s["Content-Encoding"]="gzip",a=c),u.label=2;case 2:return s=o(o({},this.customHeaders),s),l="string"==typeof a?a.length:a.byteLength,d={headers:s,body:a,method:"POST",keepalive:this.enableKeepalive&&l<=16384},this.referrerPolicy&&(d.referrerPolicy=this.referrerPolicy),[4,fetch(e,d)];case 3:return[4,(f=u.sent()).text()];case 4:v=u.sent();try{return[2,this.buildResponse(JSON.parse(v))]}catch(e){return[2,this.buildResponse({code:f.status})]}return[2]}})})},t}(tt),lr=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.send=function(e,t,n){return s(this,void 0,void 0,function(){var n=this;return u(this,function(r){return[2,new Promise(function(r,i){var o=B();if(!(null==o?void 0:o.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var a=JSON.stringify(t);return r(o.navigator.sendBeacon(e,a)?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:a.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(tt),dr=function(e,t,n){return void 0===n&&(n=!0),s(void 0,void 0,void 0,function(){var r,i,o,a,s,c,d,f,p;return u(this,function(u){switch(u.label){case 0:return r=function(e){return"".concat(v.toLowerCase(),"_").concat(e.substring(0,6))}(e),[4,t.getRaw(r)];case 1:return(i=u.sent())?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:u.sent(),u.label=3;case 3:return o=l(i.split("."),6),a=o[0],s=o[1],c=o[2],d=o[3],f=o[4],p=o[5],[2,{deviceId:a,userId:vr(s),sessionId:fr(d),lastEventId:fr(p),lastEventTime:fr(f),optOut:Boolean(c)}]}})})},fr=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},vr=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},pr="[Amplitude]",hr="".concat(pr," Form Started"),gr="".concat(pr," Form Submitted"),mr="".concat(pr," File Downloaded"),yr="session_start",br="session_end",wr="".concat(pr," File Extension"),Er="".concat(pr," File Name"),Sr="".concat(pr," Link ID"),kr="".concat(pr," Link Text"),Tr="".concat(pr," Link URL"),Pr="".concat(pr," Form ID"),xr="".concat(pr," Form Name"),_r="".concat(pr," Form Destination"),Ir="cookie",Ar=Object.freeze({__proto__:null,get IdentifyOperation(){return r},get SpecialEventType(){return i},get RevenueProperty(){return q},get LogLevel(){return G},get ServerZone(){return pt},OfflineDisabled:null,DEFAULT_CSS_SELECTOR_ALLOWLIST:gt,DEFAULT_DATA_ATTRIBUTE_PREFIX:mt,DEFAULT_ACTION_CLICK_ALLOWLIST:yt,EXCLUDE_INTERNAL_REFERRERS_CONDITIONS:Ln}),Or=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},Cr=function(e,t,n,r,i,s){void 0===i&&(i=!0),e.referrer;var u=e.referring_domain,c=a(e,["referrer","referring_domain"]),l=t||{};l.referrer;var d,f=l.referring_domain,v=a(l,["referrer","referring_domain"]),p=n.excludeInternalReferrers;if(p){var h=Lr(p,r);if(!(h instanceof TypeError)&&e.referring_domain&&jr(e.referring_domain,s)){if("always"===h)return Dr(h,e.referring_domain,r),!1;if("ifEmptyCampaign"===h&&(d=o(o({},e),{referring_domain:void 0,referrer:void 0}),Object.values(d).every(function(e){return!e})))return Dr(h,e.referring_domain,r),!1}}if(Rr(n.excludeReferrers,e.referring_domain))return r.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&function(e){return Object.values(e).every(function(e){return!e})}(e)&&t)return r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var g=JSON.stringify(c)!==JSON.stringify(v),m=Or(u||"")!==Or(f||""),y=!t||g||m;return y?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),y},Rr=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},Lr=function(e,t){if(!0===e)return Ln.always;if("object"==typeof e){var n=e.condition;if("string"==typeof n&&Object.keys(Ln).includes(n))return n;if(void 0===n)return Ln.always}var r="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(r),new TypeError(r)};function Dr(e,t,n){var r="This is not a new campaign because referring_domain=".concat(t," is on the same domain as the current page and it is configured to exclude internal referrers");"always"===e?n.debug(r):"ifEmptyCampaign"===e&&n.debug("".concat(r," with empty campaign parameters"))}var Nr=["ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.za","appspot.com","asn.au","azurewebsites.net","cloudfront.net","myshopify.com","blogspot.com","co.ca","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.ar","com.au","com.br","com.cn","com.hk","com.in","com.jp","com.kr","com.mx","com.pl","com.sg","com.tr","com.tw","ed.jp","edu.au","edu.br","edu.cn","edu.hk","edu.sg","edu.th","edu.tr","edu.tw","firebaseapp.com","fly.dev","gc.ca","geek.nz","github.io","gitlab.io","go.jp","go.kr","go.th","gob.ar","gob.mx","gov.au","gov.br","gov.cn","gov.hk","gov.in","gov.pl","gov.sg","gov.tr","gov.tw","gov.uk","gov.za","govt.nz","gr.jp","herokuapp.com","id.au","idv.hk","iwi.nz","lg.jp","ltd.uk","maori.nz","me.uk","mil.kr","ne.jp","ne.kr","net.au","net.br","net.cn","net.hk","net.in","net.nz","net.pl","net.sg","net.tr","net.tw","net.za","onrender.com","or.jp","or.kr","or.th","org.ar","org.au","org.br","org.cn","org.hk","org.in","org.mx","org.nz","org.pl","org.sg","org.tw","org.uk","org.za","pages.dev","pe.kr","plc.uk","re.kr","res.in","sch.uk","vercel.app","netlify.app","workers.dev"],Mr=function(e){var t,n,r=e||(null===(n=null===(t=B())||void 0===t?void 0:t.location)||void 0===n?void 0:n.hostname);if(!r)return"";var i=r.split("."),o=i[i.length-1],a=i[i.length-2];return Nr.find(function(e){return r.endsWith(".".concat(e))})&&(o=i[i.length-2]+"."+i[i.length-1],a=i[i.length-3]),a?"".concat(a,".").concat(o):o},jr=function(e,t){var n=B();if(!n)return!1;var r,i,o,a=(t||"").trim()||Mr(n.location.hostname);return r=e,o=(i=a).startsWith(".")?i:".".concat(i),!!(r.startsWith(".")?r:".".concat(r)).endsWith(o)},Ur=function(e){function t(t,n,r,i,o,a,s,u,c,l,d,f,v,p,h,g,m,y,b,w,E,S,k,T,P,x,_,I,A,O,C,R,L,D,N,M,j,U,q,F,B,H,V,z){void 0===r&&(r=new Le),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===u&&(u=1e3),void 0===c&&(c=5),void 0===l&&(l=30),void 0===d&&(d=Ir),void 0===g&&(g=new X),void 0===m&&(m=G.Warn),void 0===b&&(b=!1),void 0===w&&(w=!1),void 0===k&&(k=""),void 0===T&&(T="US"),void 0===_&&(_=18e5),void 0===I&&(I=new ar({loggerProvider:g})),void 0===A&&(A={ipAddress:!0,language:!0,platform:!0}),void 0===O&&(O="fetch"),void 0===C&&(C=!1),void 0===R&&(R=!0),void 0===U&&(U=!0),void 0===q&&(q=0),void 0===V&&(V=!1);var W,$=this;($=e.call(this,{apiKey:t,storageProvider:I,transportProvider:Br(O)})||this).apiKey=t,$.appVersion=n,$.cookieOptions=i,$.defaultTracking=o,$.autocapture=a,$.flushIntervalMillis=u,$.flushMaxRetries=c,$.flushQueueSize=l,$.identityStorage=d,$.ingestionMetadata=f,$.instanceName=v,$.loggerProvider=g,$.logLevel=m,$.minIdLength=y,$.offline=b,$.partnerId=E,$.plan=S,$.serverUrl=k,$.serverZone=T,$.sessionTimeout=_,$.storageProvider=I,$.trackingOptions=A,$.transport=O,$.useBatch=C,$.fetchRemoteConfig=R,$.networkTrackingOptions=M,$.identify=j,$.enableDiagnostics=U,$.diagnosticsSampleRate=q,$.diagnosticsClient=F,$.remoteConfig=B,$.topLevelDomain=H,$.enableRequestBodyCompression=V,$.customEnrichment=z,$.version=nr,$._optOut=!1,$._cookieStorage=r,$.deviceId=s,$.lastEventId=p,$.lastEventTime=h,$.optOut=w,$.deferredSessionId=x,$.sessionId=P,$.pageCounter=D,$.userId=L,$.debugLogsEnabled=N,$.loggerProvider.enable(N?G.Debug:$.logLevel),$.networkTrackingOptions=M,$.identify=j,$.enableDiagnostics=U,$.diagnosticsSampleRate=q,$.diagnosticsClient=F;var K=null!==(W=null==B?void 0:B.fetchRemoteConfig)&&void 0!==W?W:R;return $.remoteConfig=$.remoteConfig||{},$.remoteConfig.fetchRemoteConfig=K,$.fetchRemoteConfig=K,$.topLevelDomain=H||Mr(),$}return n(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,void 0!==e&&void 0!==this._deferredSessionId&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(e){this._deferredSessionId!==e&&e!==this.sessionId&&(this._deferredSessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,deferredSessionId:this._deferredSessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};this.cookieStorage instanceof De&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(Pe(this.apiKey),e)},t}(Z),qr=function(e,t,n,r,i){return void 0===t&&(t={}),s(void 0,void 0,void 0,function(){var a,s,c,l,d,f,v,p,h,g,m,y,b,w,E,S,k,T,P,x,_,I,A,O,C,R,L,D,N,M,j,U,q,F,B,H,z,W,$,K,J,G,Y,X,Q,Z,ee,te,ne,re,ie;return u(this,function(u){switch(u.label){case 0:return a=t.identityStorage||Ir,s="",a!==Ir||(null===(I=t.cookieOptions)||void 0===I?void 0:I.domain)||""===(null===(A=t.cookieOptions)||void 0===A?void 0:A.domain)?[3,2]:[4,Hr(void 0,r)];case 1:s=u.sent(),u.label=2;case 2:return c=o({domain:null!==(C=null===(O=t.cookieOptions)||void 0===O?void 0:O.domain)&&void 0!==C?C:s,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},t.cookieOptions),l={duplicateResolverFn:function(e){var t=Ne(e);if(!t)return!1;var n=JSON.parse(t);return Me(n.cookieDomain,c.domain)},diagnosticsClient:r},d=Fr(t.identityStorage,c,l),[4,dr(e,d,null===(L=null===(R=t.cookieOptions)||void 0===R?void 0:R.upgrade)||void 0===L||L)];case 3:return f=u.sent(),[4,d.get(Pe(e))];case 4:return v=u.sent(),p=_e(),h=p.ampTimestamp?Number(p.ampTimestamp):void 0,g=!h||Date.now()<h,m=null!==(U=null!==(j=null!==(M=null!==(D=t.deviceId)&&void 0!==D?D:g?null!==(N=p.ampDeviceId)&&void 0!==N?N:p.deviceId:void 0)&&void 0!==M?M:null==v?void 0:v.deviceId)&&void 0!==j?j:f.deviceId)&&void 0!==U?U:V(),y=null!==(q=null==v?void 0:v.lastEventId)&&void 0!==q?q:f.lastEventId,b=null!==(F=null==v?void 0:v.lastEventTime)&&void 0!==F?F:f.lastEventTime,w=null!==(H=null!==(B=t.optOut)&&void 0!==B?B:null==v?void 0:v.optOut)&&void 0!==H?H:f.optOut,E=null!==(z=null==v?void 0:v.sessionId)&&void 0!==z?z:f.sessionId,S=null==v?void 0:v.deferredSessionId,k=null!==($=null!==(W=t.userId)&&void 0!==W?W:null==v?void 0:v.userId)&&void 0!==$?$:f.userId,n.previousSessionDeviceId=null!==(K=null==v?void 0:v.deviceId)&&void 0!==K?K:f.deviceId,n.previousSessionUserId=null!==(J=null==v?void 0:v.userId)&&void 0!==J?J:f.userId,T={ipAddress:null===(Y=null===(G=t.trackingOptions)||void 0===G?void 0:G.ipAddress)||void 0===Y||Y,language:null===(Q=null===(X=t.trackingOptions)||void 0===X?void 0:X.language)||void 0===Q||Q,platform:null===(ee=null===(Z=t.trackingOptions)||void 0===Z?void 0:Z.platform)||void 0===ee||ee},P=null==v?void 0:v.pageCounter,x=null==v?void 0:v.debugLogsEnabled,void 0!==t.autocapture&&(t.defaultTracking=t.autocapture),[4,(_=new Ur(e,t.appVersion,d,c,t.defaultTracking,t.autocapture,m,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,a,t.ingestionMetadata,t.instanceName,y,b,null!==(te=null==i?void 0:i.loggerProvider)&&void 0!==te?te:t.loggerProvider,t.logLevel,t.minIdLength,t.offline,w,t.partnerId,t.plan,t.serverUrl,null!==(ne=null==i?void 0:i.serverZone)&&void 0!==ne?ne:t.serverZone,E,S,t.sessionTimeout,t.storageProvider,T,t.transport,t.useBatch,t.fetchRemoteConfig,k,P,x,t.networkTrackingOptions,t.identify,null!==(re=null==i?void 0:i.enableDiagnostics)&&void 0!==re?re:t.enableDiagnostics,null!==(ie=null==i?void 0:i.diagnosticsSampleRate)&&void 0!==ie?ie:n._diagnosticsSampleRate,r,t.remoteConfig,s,t.enableRequestBodyCompression,t.customEnrichment)).storageProvider.isEnabled()];case 5:return u.sent()||(_.loggerProvider.warn("Storage provider ".concat(_.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),_.storageProvider=new Le),[2,_]}})})},Fr=function(e,t,n){switch(void 0===e&&(e=Ir),void 0===t&&(t={}),e){case"localStorage":return new ar;case"sessionStorage":return new sr;case"none":return new Le;default:return new De(o(o({},t),{expirationDays:t.expiration}),n)}},Br=function(e){var t="object"==typeof e?e.type:e,n="object"==typeof e?e.headers:void 0,r="object"==typeof e?e.enableKeepalive:void 0,i="object"==typeof e?e.referrerPolicy:void 0;return"xhr"===t?new ur(n):"beacon"===t?new lr:new cr(n,r,i)},Hr=function(e,t){return s(void 0,void 0,void 0,function(){var n,r,i,o,a,s,c;return u(this,function(u){switch(u.label){case 0:return[4,new De(void 0,{diagnosticsClient:t}).isEnabled()];case 1:if(!u.sent()||!e&&("undefined"==typeof location||!location.hostname))return[2,""];if(n=null!=e?e:location.hostname,1===(r=n.split(".")).length)return[2,""];for(i=[],o=1,Nr.find(function(e){return n.endsWith(".".concat(e))})&&(o=2),a=r.length-o-1;a>=0;--a)i.push(r.slice(a).join("."));a=0,u.label=2;case 2:if(!(a<i.length))return[3,7];s=i[a],u.label=3;case 3:return u.trys.push([3,5,,6]),[4,De.isDomainWritable(s)];case 4:return u.sent()?[2,"."+s]:[3,6];case 5:return c=u.sent(),t&&t.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(s),error:c instanceof Error?c.message:String(c)}),[3,6];case 6:return a++,[3,2];case 7:return t&&t.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(n)}),[2,""]}})})},Vr="AMP_PAGE_VIEW",zr=function(e){var t;void 0===e&&(e={});var n,r,i=B(),a=void 0,c=!1,d=e.trackOn,f=e.trackHistoryChanges,v=e.eventType,p=void 0===v?"[Amplitude] Page Viewed":v,h=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==a||a.error("Malformed URI sequence: ",e)}return t},g=function(e){return s(void 0,void 0,void 0,function(){var t,n,r;return u(this,function(i){switch(i.label){case 0:return t=h("undefined"!=typeof location&&location.href||""),r={event_type:p},n=[{}],[4,Wr()];case 1:return[2,(r.event_properties=o.apply(void 0,[o.apply(void 0,n.concat([i.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":t,"[Amplitude] Page Path":"undefined"!=typeof location&&h(location.pathname)||"","[Amplitude] Page Title":Yt(Gt),"[Amplitude] Page URL":t.split("?")[0],"[Amplitude] Page View ID":e}]),r)]}})})},m=function(){return void 0===d||"function"==typeof d&&d()},y="undefined"!=typeof location?location.href:null,b=function(){s(void 0,void 0,void 0,function(){var e,n,i,o,s;return u(this,function(u){switch(u.label){case 0:return e=location.href,n=Kr(f,e,y||"")&&m(),y=e,n?(i=void 0,r&&(i=V(),r.set(Vr,{pageViewId:i})),null==a||a.log("Tracking page view event"),null!=t?[3,1]:[3,3]):[3,4];case 1:return s=(o=t).track,[4,g(i)];case 2:s.apply(o,[u.sent()]),u.label=3;case 3:u.label=4;case 4:return[2]}})})},w={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,o){return s(void 0,void 0,void 0,function(){var s,d,f;return u(this,function(u){switch(u.label){case 0:if(t=o,n=e,(a=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),c=!0,i){try{r=new Ue(i.sessionStorage)}catch(e){null==a||a.debug("sessionStorage is not available in this environment.")}i.addEventListener("popstate",b),i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),c&&b()}})}return m()?(a.log("Tracking page view event"),s=void 0,r&&(s=V(),r.set(Vr,{pageViewId:s})),f=(d=t).track,[4,g(s)]):[3,2];case 1:f.apply(d,[u.sent()]),u.label=2;case 2:return[2]}})})},execute:function(e){return s(void 0,void 0,void 0,function(){var t,i,s;return u(this,function(u){switch(u.label){case 0:return"attribution"===d&&$r(e)?(null==a||a.log("Enriching campaign event to page view event with campaign parameters"),t=void 0,r?[4,r.get(Vr)]:[3,2]):[3,4];case 1:i=u.sent(),t=null==i?void 0:i.pageViewId,u.label=2;case 2:return[4,g(t)];case 3:s=u.sent(),e.event_type=s.event_type,e.event_properties=o(o({},e.event_properties),s.event_properties),u.label=4;case 4:return n&&e.event_type===p&&(n.pageCounter=n.pageCounter?n.pageCounter+1:1,e.event_properties=o(o({},e.event_properties),{"[Amplitude] Page Counter":n.pageCounter})),[2,e]}})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){return i&&(i.removeEventListener("popstate",b),c=!1),[2]})})}};return w},Wr=function(){return s(void 0,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return e=Re,[4,(new Vt).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},$r=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[r.SET]||{},i=t[r.UNSET]||{},o=d(d([],l(Object.keys(n)),!1),l(Object.keys(i)),!1);return Object.keys(C).every(function(e){return o.includes(e)})}return!1},Kr=function(e,t,n){if("pathOnly"===e){if(""==n)return!0;var r=new URL(t),i=new URL(n);return r.origin+r.pathname!==i.origin+i.pathname}return t!==n},Jr=function(){var e,t,n=[],r=function(e,t,r){e.addEventListener(t,r),n.push({element:e,type:t,handler:r})};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(n,i){return s(void 0,void 0,void 0,function(){var o,a;return u(this,function(s){return t=function(e){if(Hn(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&"object"==typeof e.defaultTracking.formInteractions)return e.defaultTracking.formInteractions}(n),o=function(){if(i){if("undefined"!=typeof document){var o=new WeakSet,a=function(e){if(!o.has(e)){o.add(e);var a=!1;r(e,"change",function(){var t,n=Yr(e);a||i.track(hr,((t={})[Pr]=Gr(e.id),t[xr]=Gr(e.name),t[_r]=n,t)),a=!0}),r(e,"submit",function(r){var o,s,u=Yr(e);if(a||i.track(hr,((o={})[Pr]=Gr(e.id),o[xr]=Gr(e.name),o[_r]=u,o)),a=!0,void 0!==(null==t?void 0:t.shouldTrackSubmit))if("function"==typeof t.shouldTrackSubmit&&"undefined"!=typeof SubmitEvent&&r instanceof SubmitEvent)try{if(!t.shouldTrackSubmit(r))return}catch(e){n.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else n.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.");i.track(gr,((s={})[Pr]=Gr(e.id),s[xr]=Gr(e.name),s[_r]=u,s)),a=!1})}};Array.from(document.getElementsByTagName("form")).forEach(a),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&a(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(a)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.")},"complete"===document.readyState?o():(a=B())?a.addEventListener("load",o):n.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(t){return null==e||e.disconnect(),n.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),n=[],[2]})})}}},Gr=function(e){if("string"==typeof e)return e},Yr=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},Xr=function(){var e,t=[];return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(n,r){return s(void 0,void 0,void 0,function(){var i,o;return u(this,function(a){return i=function(){if(r){if("undefined"!=typeof document){var i=function(e){var n;try{n=new URL(e.href,window.location.href)}catch(e){return}var i=o.exec(n.href),a=null==i?void 0:i[1];a&&function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})}(e,"click",function(){var t;a&&r.track(mr,((t={})[wr]=a,t[Er]=n.pathname,t[Sr]=e.id,t[kr]=e.text,t[Tr]=e.href,t))})},o=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;Array.from(document.getElementsByTagName("a")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.")},"complete"===document.readyState?i():(o=B())?o.addEventListener("load",i):n.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(n){return null==e||e.disconnect(),t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[],[2]})})}}},Qr=!1,Zr=function(){var e=B(),t=[],n=function(n,r){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(n,r),t.push({type:n,handler:r}))};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return s(void 0,void 0,void 0,function(){return u(this,function(r){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1,[2]):(e.offline=!navigator.onLine,n("online",function(){!1!==e.offline&&(e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis))}),n("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0}),[2])})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(n){return t.forEach(function(t){var n=t.type,r=t.handler;null==e||e.removeEventListener(n,r)}),t=[],[2]})})}}};function ei(e){var t,n,r,i,o,a,s,u,f,v,p,h;if("object"==typeof e&&null!==e&&!Array.isArray(e)){var g=Object.keys(e);try{for(var m=c(g),y=m.next();!y.done;y=m.next()){var b=y.value;try{var w=e[b];"boolean"==typeof(null==w?void 0:w.enabled)&&(w.enabled?(delete w.enabled,0===Object.keys(w).length&&(e[b]=!0)):e[b]=!1),ei(w)}catch(e){}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{if(null===(f=null===(u=null===(s=e.autocapture)||void 0===s?void 0:s.networkTracking)||void 0===u?void 0:u.captureRules)||void 0===f?void 0:f.length)try{for(var E=c(e.autocapture.networkTracking.captureRules),S=E.next();!S.done;S=E.next()){var k=S.value;try{for(var T=(o=void 0,c(["responseHeaders","requestHeaders"])),P=T.next();!P.done;P=T.next()){var x=P.value,_=null!==(v=k[x])&&void 0!==v?v:{},I=_.captureSafeHeaders,A=_.allowlist;(I||A)&&(void 0===A||Array.isArray(A)?k[x]=d(d([],l(I?R:[]),!1),l(null!=A?A:[]),!1):delete k[x])}}catch(e){o={error:e}}finally{try{P&&!P.done&&(a=T.return)&&a.call(T)}finally{if(o)throw o.error}}}}catch(e){r={error:e}}finally{try{S&&!S.done&&(i=E.return)&&i.call(E)}finally{if(r)throw r.error}}}catch(e){}var O=null===(p=e.autocapture)||void 0===p?void 0:p.frustrationInteractions;O&&(O.rageClick&&(O.rageClicks=O.rageClick,delete O.rageClick),O.deadClick&&(O.deadClicks=O.deadClick,delete O.deadClick));try{var C=null===(h=e.autocapture)||void 0===h?void 0:h.elementInteractions;if(C&&"object"==typeof C&&(!0===C.viewportContentUpdated&&(C.viewportContentUpdated={}),!1===C.viewportContentUpdated&&(C.viewportContentUpdated={enabled:!1}),void 0!==C.exposureDuration)){var L=C.viewportContentUpdated;void 0===L?C.viewportContentUpdated={exposureDuration:C.exposureDuration}:"object"==typeof L&&void 0===L.exposureDuration&&!1!==L.enabled&&(L.exposureDuration=C.exposureDuration),delete C.exposureDuration}}catch(e){}}}function ti(e,t,n){var r,i,o=[];try{for(var a=c(null!=t?t:[]),s=a.next();!s.done;s=a.next()){var u=s.value;try{o.push(new RegExp(u))}catch(e){n.loggerProvider.warn("Invalid regex pattern: ".concat(u),e)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return e.concat(o)}function ni(e,t){var n,r,i,a,s,u,l;if(e){ei(e);try{t.loggerProvider.debug("Update browser config with remote configuration:",Pn(e));var d=e;if(d&&"autocapture"in d){if("boolean"==typeof d.autocapture&&(t.autocapture=d.autocapture),"object"==typeof d.autocapture&&null!==d.autocapture){var f=o({},d.autocapture);if(void 0===t.autocapture&&(t.autocapture=d.autocapture),"object"==typeof d.autocapture.elementInteractions&&null!==d.autocapture.elementInteractions&&(null===(i=d.autocapture.elementInteractions.pageUrlAllowlistRegex)||void 0===i?void 0:i.length)){f.elementInteractions=o({},d.autocapture.elementInteractions);var v=f.elementInteractions,p=null!==(a=v.pageUrlAllowlist)&&void 0!==a?a:[],h=d.autocapture.elementInteractions.pageUrlAllowlistRegex;v.pageUrlAllowlist=ti(p,h,t),delete v.pageUrlAllowlistRegex}if("object"==typeof d.autocapture.networkTracking&&null!==d.autocapture.networkTracking&&(null===(s=d.autocapture.networkTracking.captureRules)||void 0===s?void 0:s.length)){f.networkTracking=o({},d.autocapture.networkTracking);var g=null!==(u=f.networkTracking.captureRules)&&void 0!==u?u:[];try{for(var m=c(g),y=m.next();!y.done;y=m.next()){var b=y.value;b.urls=ti(null!==(l=b.urls)&&void 0!==l?l:[],b.urlsRegex,t),delete b.urlsRegex}}catch(e){n={error:e}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}}"boolean"==typeof t.autocapture&&(t.autocapture=o({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},f)),"object"==typeof t.autocapture&&(t.autocapture=o(o({},t.autocapture),f))}t.defaultTracking=t.autocapture}"customEnrichment"in d&&null!==d.customEnrichment&&!1!==t.customEnrichment&&(t.customEnrichment=d.customEnrichment),t.loggerProvider.debug("Browser config after remote config update:",Pn(t))}catch(e){t.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}var ri,ii="1.28.2",oi="[Amplitude] Element Clicked",ai="[Amplitude] Element Tag",si="[Amplitude] Element Text",ui="[Amplitude] Page URL",ci="[Amplitude] Viewport Height",li="[Amplitude] Viewport Width",di="[Amplitude] Page View ID",fi="data-amp-mask-attributes",vi=["input","select","textarea"],pi=function(e){var t=e.pageUrlAllowlist,n=e.pageUrlExcludelist;return!(n&&n.length>0&&Ae(window.location.href,n))&&!!Ae(window.location.href,t)},hi=function(e,t){return function(n,r){var i,o,a=e.shouldTrackEventResolver,s=null===(o=null===(i=null==r?void 0:r.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===o?void 0:o.call(i);if(!s)return!1;if(a)return a(n,r);if(!pi(e))return!1;var u=String(null==r?void 0:r.getAttribute("type"))||"";if("string"==typeof u)switch(u.toLowerCase()){case"hidden":case"password":return!1}if(t){var c=t.some(function(e){var t;return!!(null===(t=null==r?void 0:r.matches)||void 0===t?void 0:t.call(r,e))});if(!c)return!1}switch(s){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:return"click"===n}}},gi=function(e){return e?e.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[]},mi=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return function(e){return null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length}(r)||(t[n]=r),t},{})},yi=function(){var e;try{var t=B(),n=null===(e=null==t?void 0:t.sessionStorage)||void 0===e?void 0:e.getItem("AMP_PAGE_VIEW");if(!n)return;var r=JSON.parse(n);if("string"==typeof r.pageViewId)return r.pageViewId}catch(e){}},bi=function(e,t){return e?t.some(function(t){var n;return null===(n=null==e?void 0:e.matches)||void 0===n?void 0:n.call(e,t)})?e:bi(null==e?void 0:e.parentElement,t):null},wi=function(e){return!(null===e.event.target||!e.closestTrackedAncestor)};!function(e){e[e.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",e[e.MIDDLE=1]="MIDDLE",e[e.RIGHT=2]="RIGHT"}(ri||(ri={}));var Ei="__AMPLITUDE_VISUAL_TAGGING__";var Si=B(),ki=function(){return new pn(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},Ti=function(e){return void 0===e&&(e="click"),new pn(function(t){var n,r=function(e){t.next(e)};return null===(n=B())||void 0===n||n.document.addEventListener(e,r,{capture:!0}),function(){var t;null===(t=B())||void 0===t||t.document.removeEventListener(e,r,{capture:!0})}})},Pi=function(){var e=gn(new pn(function(e){var t=function(t){if(t instanceof ErrorEvent){var n={kind:"error"};t.error instanceof Error||t.error instanceof DOMException?n=o(o({},n),{message:t.error.message,stack:t.error.stack,filename:t.filename,lineNumber:t.lineno,columnNumber:t.colno}):"string"==typeof t.error&&(n.message=t.error),e.next(n)}};return Si.addEventListener("error",t),function(){Si.removeEventListener("error",t)}}),new pn(function(e){var t=function(t){var n={kind:"unhandledrejection"};t.reason instanceof Error||t.reason instanceof DOMException?(n.message=t.reason.message,n.stack=t.reason.stack):"string"==typeof t.reason&&(n.message=t.reason),e.next(n)};return Si.addEventListener("unhandledrejection",t),function(){Si.removeEventListener("unhandledrejection",t)}}));return gn(e,new pn(function(e){var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=void 0;Array.isArray(n[0])&&"string"==typeof n[0][0]&&(i=n[0][0]),e.next({kind:"console",message:i})};return ht.addListener("error",t),function(){ht.removeListener(t)}}))},xi=function(e,t,n){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},_i={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},Ii=function(e){var t,n,r,i,o=Object.values(_i).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var a=c(e),s=a.next();!s.done;s=a.next()){var u=s.value;try{try{for(var l=(r=void 0,c(u.definition)),d=l.next();!d.done;d=l.next()){var f=d.value,v=_i[f.event_type];v&&o[v].add(u.id)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==u?void 0:u.id,e)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},Ai=function(e){var t,n,r,i,o=new Map;try{for(var a=c(e),s=a.next();!s.done;s=a.next()){var u=s.value;try{for(var l=(r=void 0,c(u.conditions)),d=l.next();!d.done;d=l.next()){var f=d.value;if("LABELED_EVENT"===f.type){var v=f.match.eventId,p=o.get(v);p||(p=[],o.set(v,p)),p.push(u)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},Oi=function(e,t){return t.filter(function(t){return t.definition.some(function(t){return _i[t.event_type]===e.type&&t.filters.every(function(t){return function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){return console.error("Error matching event to filter",e),!1}return!1}(e,t)})})})},Ci=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var i=function(e,t){var n,r,i,o,a=new Set;try{for(var s=c(e),u=s.next();!u.done;u=s.next()){var l=u.value,d=t.get(l.id);if(d)try{for(var f=(i=void 0,c(d)),v=f.next();!v.done;v=f.next()){var p=v.value;a.add(p)}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Array.from(a)}(Oi(e,Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]})),this.labeledEventToTriggerMap);try{for(var o=c(i),a=o.next();!a.done;a=o.next()){var s=a.value;xi(s.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}(),Ri=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",fi,zt]),Li=["type"],Di=["svg","path","g"],Ni=["password","hidden"];function Mi(e,t){var n,r,i,o,a,s;if(null===e)return null;var u=String(e.tagName).toLowerCase(),l={tag:u},d=Array.from(null!==(o=null===(i=e.parentElement)||void 0===i?void 0:i.children)&&void 0!==o?o:[]);d.length&&(l.index=d.indexOf(e),l.indexOfType=d.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var f=null===(s=null===(a=e.previousElementSibling)||void 0===a?void 0:a.tagName)||void 0===s?void 0:s.toLowerCase();f&&(l.prevSib=String(f));var v=e.getAttribute("id");v&&(l.id=String(v));var p=Array.from(e.classList);p.length&&(l.classes=p);var h={},g=Array.from(e.attributes).filter(function(e){return!Ri.has(e.name)}),m=!function(e){var t,n,r,i=null===(n=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t),o=e instanceof HTMLElement&&"true"===(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase());return!vi.includes(i)&&!o}(e);if(!Ni.includes(String(e.getAttribute("type")))&&!Di.includes(u))try{for(var y=c(g),b=y.next();!b.done;b=y.next()){var w=b.value;m&&!Li.includes(w.name)||(t.has(w.name)?h[w.name]=Wt:h[w.name]=String(w.value).substring(0,128))}}catch(e){n={error:e}}finally{try{b&&!b.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return Object.keys(h).length&&(l.attrs=h),l}function ji(e,t){var n=e.getAttribute(t.explicitTrackingAttribute);if(null!==n&&""===n)return null;var r=e.getAttribute("id");return null===r||""===r?null:function(e,t){var n,r;if(null==e||""===e)return!1;try{for(var i=c(t),o=i.next();!o.done;o=i.next())if(o.value.test(e))return!1}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}(r,t.autogeneratedIdPatterns)?r:null}function Ui(e,t){return t.map(qi).join(" > ")}function qi(e){var t=e.tagName.toLowerCase(),n=e.parentElement;if(null===n)return t;var r=function(e,t){for(var n=0,r=0;r<t.children.length;r++){var i=t.children[r];if(i.tagName===e.tagName&&(n+=1,i===e))return n}return 1}(e,n);return"".concat(t,":nth-of-type(").concat(r,")")}function Fi(e){var t=globalThis.CSS;if(t&&"function"==typeof t.escape)return t.escape(e);for(var n=String(e),r=n.length,i="",o=0;o<r;o++){var a=n.charCodeAt(o);0!==a?a>=1&&a<=31||127===a||0===o&&a>=48&&a<=57||1===o&&a>=48&&a<=57&&45===n.charCodeAt(0)?i+="\\".concat(a.toString(16)," "):i+=0!==o||1!==r||45!==a?a>=128||45===a||95===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?n.charAt(o):"\\".concat(n.charAt(o)):"\\-":i+="�"}return i}function Bi(e){return Fi(e)}var Hi=[{name:"explicitTrackingAttribute",try:function(e,t){var n=t.config.explicitTrackingAttribute,r=e.getAttribute(n);return null===r||""===r?null:"[".concat(n,"=").concat(JSON.stringify(r),"]")}},{name:"stableId",try:function(e,t){var n=ji(e,t.config);return null===n?null:"".concat(e.tagName.toLowerCase(),"#").concat(Bi(n))}}];function Vi(e,t,n){var r,i,o,a,s;void 0===n&&(n={});var u=null!==(o=n.strategies)&&void 0!==o?o:Hi,l=null!==(s=null!==(a=n.scope)&&void 0!==a?a:e.ownerDocument)&&void 0!==s?s:document,d={scope:l,config:t},f=function(e,t){var n=[],r=e;for(;null!==r&&(n.push(r),!(void 0!==t&&n.length>t));)r=r.parentElement;return n}(e,t.maxAncestorWalkDepth);try{for(var v=c(u),p=v.next();!p.done;p=v.next())for(var h=p.value,g=0;g<f.length;g++){var m=f[g],y=h.try(m,d);if(null!==y)if(0!==g){var b=Ui(0,f.slice(0,g).reverse()),w="".concat(y," > ").concat(b);if(zi(l,w,e,h.name,n.logger))return w}else if(zi(l,y,e,h.name,n.logger))return y}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}return null}function zi(e,t,n,r,i){var o;try{o=e.querySelectorAll(t)}catch(e){var a=e instanceof Error?e.message:String(e);return null==i||i.debug('@amplitude/element-selector: strategy "'.concat(r,'" emitted a malformed selector "').concat(t,'" (').concat(a,")")),!1}return 1===o.length&&o[0]===n}function Wi(e){var t=e.tagName.toLowerCase(),n=e.parentElement;if(null===n)return t;var r=function(e,t){for(var n=0,r=0;r<t.children.length;r++){var i=t.children[r];if(i.tagName===e.tagName&&(n+=1,i===e))return n}return 1}(e,n);return"".concat(t,":nth-of-type(").concat(r,")")}function $i(e,t,n){var r;try{r=e.querySelectorAll(t)}catch(e){return!1}return 1===r.length&&r[0]===n}var Ki=function(){function e(e,t){this.value=e,this.optimized=t}return e.prototype.toString=function(){return this.value},e}(),Ji=function(e,t,n){var r,i;if(e.nodeType!==Node.ELEMENT_NODE)return null;var o=e.getAttribute("id");if(t){if(o)return new Ki(Yi(o),!0);var a=e.tagName.toLowerCase();if("body"===a||"head"===a||"html"===a)return new Ki(a,!0)}var s=e.tagName.toLowerCase();if(o)return new Ki(s+Yi(o),!0);var u=e.parentNode;if(!u||u.nodeType===Node.DOCUMENT_NODE)return new Ki(s,!0);for(var l=Gi(e),d=!1,f=!1,v=-1,p=-1,h=u.children,g=0;h&&(-1===v||!f)&&g<h.length;++g){var m=h[g];if(m.nodeType===Node.ELEMENT_NODE)if(p+=1,m!==e){if(!f&&m.tagName.toLowerCase()===s){d=!0;var y=new Set(l);if(y.size)for(var b=Gi(m),w=0;w<b.length;++w){var E=b[w];if(y.has(E)&&(y.delete(E),!y.size)){f=!0;break}}else f=!0}}else v=p}var S=s;if(n&&"input"===s.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(S+="[type="+Fi(e.getAttribute("type")||"")+"]"),f)S+=":nth-child("+String(v+1)+")";else if(d)try{for(var k=c(l),T=k.next();!T.done;T=k.next()){S+="."+Fi(T.value.slice(1))}}catch(e){r={error:e}}finally{try{T&&!T.done&&(i=k.return)&&i.call(k)}finally{if(r)throw r.error}}return new Ki(S,!1)},Gi=function(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]},Yi=function(e){return"#"+Fi(e)};function Xi(e,t){try{return function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var n=[],r=e;r;){var i=Ji(r,Boolean(t),r===e);if(!i)break;if(n.push(i),i.optimized)break;r=r.parentElement}return n.reverse(),n.join(" > ")}(e)}catch(e){var n=e instanceof Error?e.message:String(e);return null==t||t.warn("@amplitude/element-selector: legacyCssPath threw — emitting empty selector: ".concat(n)),""}}var Qi,Zi=Object.freeze({enabled:!1,explicitTrackingAttribute:"data-amp-track-id",autogeneratedIdPatterns:d([],l([/^:r[0-9a-z]+:$/,/^radix-/,/^headlessui-/,/^mui-/,/^[a-f0-9]{16,}$/i,/-\d{8,}$/,/\d{4,}/]),!1),unstableClassPatterns:d([],l([/^(p|m|px|py|mx|my|pt|pb|pl|pr|mt|mb|ml|mr)-\d+$/,/^(w|h|min-w|max-w|min-h|max-h)-/,/^(text|bg|border|ring|fill|stroke)-/,/^(hover|focus|active|disabled|group-hover):/,/^(sm|md|lg|xl|2xl):/,/^z-\d+$/,/^data-\[/,/^\[/,/^css-[a-z0-9]{6,}$/,/^[a-zA-Z]+_[a-zA-Z0-9]{3,}__[a-zA-Z0-9]{5,}$/,/^sc-[a-zA-Z0-9]{6,}$/,/^jsx-\d+$/,/^swiper-slide-(visible|fully-visible|active|prev|next|duplicate)$/,/^is-(active|open|selected|hovered|focused|expanded)$/,/^Mui[A-Z][a-zA-Z]+-(focused|selected|disabled|expanded|focusVisible|active|checked)$/,/^Mui-(selected|focused|disabled|expanded|focusVisible|active|checked)$/,/^data-state-/]),!1),maxAncestorWalkDepth:void 0});function eo(e,t){if(!e)return to();var n,r=to();return"boolean"==typeof e.enabled&&(r.enabled=e.enabled),"string"==typeof e.explicitTrackingAttribute&&""!==e.explicitTrackingAttribute&&(r.explicitTrackingAttribute=e.explicitTrackingAttribute),Array.isArray(e.autogeneratedIdPatterns)&&(r.autogeneratedIdPatterns=function(e,t){var n,r,i=[];try{for(var o=c(e),a=o.next();!a.done;a=o.next()){var s=a.value;try{i.push(new RegExp(s))}catch(e){var u=e instanceof Error?e.message:String(e);null==t||t.warn('@amplitude/element-selector: ignoring invalid autogenerated-id pattern "'.concat(s,'" (').concat(u,")"))}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(e.autogeneratedIdPatterns,t)),Array.isArray(e.unstableClassPatterns)&&(r.unstableClassPatterns=function(e,t){var n,r,i=[];try{for(var o=c(e),a=o.next();!a.done;a=o.next()){var s=a.value;try{i.push(new RegExp(s))}catch(e){var u=e instanceof Error?e.message:String(e);null==t||t.warn('@amplitude/element-selector: ignoring invalid unstable-class pattern "'.concat(s,'" (').concat(u,")"))}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(e.unstableClassPatterns,t)),r.maxAncestorWalkDepth="number"!=typeof(n=e.maxAncestorWalkDepth)?void 0:Number.isFinite(n)?n<=0?void 0:Math.floor(n):void 0,r}function to(){return{enabled:Zi.enabled,explicitTrackingAttribute:Zi.explicitTrackingAttribute,autogeneratedIdPatterns:d([],l(Zi.autogeneratedIdPatterns),!1),unstableClassPatterns:d([],l(Zi.unstableClassPatterns),!1),maxAncestorWalkDepth:Zi.maxAncestorWalkDepth}}function no(e,t){void 0===t&&(t={});var n=e,r=new Set,i=t.logger,o={strategies:t.strategies,scope:t.scope,logger:i};return{generate:function(e){var r,a;if(!n.enabled)return Xi(e,i);try{var s=Vi(e,n,o);return null!==s?s:function(e,t,n){var r,i;void 0===n&&(n={});for(var o=null!==(i=null!==(r=n.scope)&&void 0!==r?r:e.ownerDocument)&&void 0!==i?i:document,a=[],s=e,u=0;null!==s&&!(void 0!==t.maxAncestorWalkDepth&&u>t.maxAncestorWalkDepth);){var c=ji(s,t);if(null!==c){var f=d(["".concat(s.tagName.toLowerCase(),"#").concat(Bi(c))],l(a),!1).join(" > ");if($i(o,f,e))return f}a.unshift(Wi(s)),s=s.parentElement,u+=1}return a.join(" > ")}(e,n,{scope:null!==(a=null!==(r=t.scope)&&void 0!==r?r:e.ownerDocument)&&void 0!==a?a:document})}catch(t){var u=t instanceof Error?t.message:String(t);return null==i||i.warn("@amplitude/element-selector: strategy chain threw — falling back to legacy cssPath: ".concat(u)),Xi(e,i)}},getConfig:function(){return n},updateConfig:function(e){var t,o;n=e;try{for(var a=c(r),s=a.next();!s.done;s=a.next()){var u=s.value;try{u(e)}catch(e){var l=e instanceof Error?e.message:String(e);null==i||i.warn("@amplitude/element-selector: onConfigChange subscriber threw — ".concat(l))}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}},onConfigChange:function(e){return r.add(e),function(){r.delete(e)}}}}var ro,io=function(e,t){var n,r,i,o=this;this.replaceSensitiveString=function(e){return Gt(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,i,a,s=performance.now();if(!e)return[];for(var u=function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e),f=new Map,v=u.length-1;v>=0;v--){var p=u[v];if(p){var h=gi(p.getAttribute(fi)),g=v===u.length-1?[]:null!==(r=f.get(u[v+1]))&&void 0!==r?r:new Set,m=new Set(d(d([],l(g),!1),l(h),!1));f.set(p,m)}}a=u.map(function(e){var t;return Mi(e,null!==(t=f.get(e))&&void 0!==t?t:new Set)});var y=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var n=l(t,2),r=n[0],i=n[1];e.attrs&&(e.attrs[r]=o.replaceSensitiveString(i))})};try{for(var b=c(a),w=b.next();!w.done;w=b.next())y(w.value)}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=b.return)&&n.call(b)}finally{if(t)throw t.error}}var E=performance.now();return null===(i=o.diagnosticsClient)||void 0===i||i.recordHistogram("autocapturePlugin.getHierarchy",E-s),a},this.getNearestLabel=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?o.getText(t):o.getNearestLabel(n)},this.getElementPath=function(e){var t;if(!e)return"";var n=performance.now(),r=o.selectorEngine.generate(e),i=performance.now();return null===(t=o.diagnosticsClient)||void 0===t||t.recordHistogram("autocapturePlugin.getElementPath",i-n),r},this.updateSelectorConfig=function(e,t){o.selectorEngine.updateConfig(eo(null!=e?e:void 0,t))},this.getEventProperties=function(e,t,n){var r,i,a,s,u,c,d=null===(a=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===a?void 0:a.call(i),f="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},v=o.getHierarchy(t),p=null===(s=v[0])||void 0===s?void 0:s.attrs,h=o.getNearestLabel(t),g=(u=null!=p?p:{},c=n,Object.entries(u).reduce(function(e,t){var n=l(t,2),r=n[0],i=n[1];if(r.startsWith(c)){var o=r.replace(c,"");o&&(e[o]=i||"")}return e},{})),m=((r={})["[Amplitude] Element Hierarchy"]=v,r[ai]=d,r[si]=o.getText(t),r["[Amplitude] Element Position Left"]=null==f.left?null:Math.round(f.left),r["[Amplitude] Element Position Top"]=null==f.top?null:Math.round(f.top),r["[Amplitude] Element Attributes"]=g,r["[Amplitude] Element Path"]=o.getElementPath(t),r["[Amplitude] Element Parent Label"]=h,r[ui]=Oe(window.location.href.split("?")[0]),r["[Amplitude] Page Title"]=Yt(o.replaceSensitiveString),r[ci]=window.innerHeight,r[li]=window.innerWidth,r),y=yi();if(y&&(m[di]=y),m["[Amplitude] Element ID"]=t.getAttribute("id")||"",m["[Amplitude] Element Class"]=t.getAttribute("class"),m["[Amplitude] Element Aria Label"]=null==p?void 0:p["aria-label"],"a"===d&&"click"===e&&t instanceof HTMLAnchorElement){var b=t.href.substring(0,128);m["[Amplitude] Element Href"]=o.replaceSensitiveString(b)}return mi(m)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,i){void 0===i&&(i=!1);var a=o.addTypeAndTimestamp(e,t);if(function(e){return"click"===e.type||"change"===e.type}(a)&&null!==a.event.target){if(i){var s=function(e,t){var n,r=null===(n=null===window||void 0===window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,e);return"pointer"===(null==r?void 0:r.getPropertyValue("cursor"))&&"click"===t}(a.event.target,a.type);if(s)return a.closestTrackedAncestor=a.event.target,a.targetElementProperties=o.getEventProperties(a.type,a.closestTrackedAncestor,r),a}var u=bi(a.event.target,n);return u&&(a.closestTrackedAncestor=u,a.targetElementProperties=o.getEventProperties(a.type,u,r)),a}return a},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var n=document.documentElement;return e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector?n.querySelector(e.selector):n}}catch(e){return}}(e,t);if(!n)return;return"TEXT"===e.elementExtractType?o.getText(n):"ATTRIBUTE"===e.elementExtractType&&e.attribute?n.getAttribute(e.attribute):void 0}},this.getTextWithMaskedDescendants=function(e){var t,n,r="[".concat(zt,"], [contenteditable]");if(!e.querySelector(r))return e.innerText;var i="",a=Array.from(e.childNodes);try{for(var s=c(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.nodeType!==Node.TEXT_NODE?l instanceof Element&&(l.hasAttribute(zt)||l.hasAttribute("contenteditable")?i+=Wt:i+=o.getTextWithMaskedDescendants(l)):i+=l.textContent||""}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i},this.getText=function(e){if(null!==e.closest("[".concat(zt,"]")))return Wt;var t="";return t=e.querySelector("[".concat(zt,"], [contenteditable]"))?o.getTextWithMaskedDescendants(e):e.innerText||"",o.replaceSensitiveString(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){var t,n,r;if(!e)return{};var i=null===(r=null===(n=null==e?void 0:e.tagName)||void 0===n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n),a=((t={})[ai]=i,t[si]=o.getText(e),t[ui]=window.location.href.split("?")[0],t);return mi(a)},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient,this.selectorEngine=(Qi||(Qi=no(eo())),Qi);var a=null!==(i=e.maskTextRegex)&&void 0!==i?i:[],s=[];try{for(var u=c(a),f=u.next();!f.done;f=u.next()){var v=f.value;if(s.length>=25)break;if(v instanceof RegExp)s.push(v);else if("pattern"in v&&"string"==typeof v.pattern)try{s.push(new RegExp(v.pattern,"i"))}catch(e){}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=s};function oo(e,t){var n=e.remoteConfigClient;if(e.fetchRemoteConfig&&n){var r=n.subscribe("configs.analyticsSDK.elementSelector","all",function(n){t.updateSelectorConfig(n,e.loggerProvider)});return function(){n.unsubscribe(r)}}}!function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable",e.ScrollObservable="scrollObservable",e.ExposureObservable="exposureObservable",e.BrowserErrorObservable="browserErrorObservable",e.SelectionObservable="selectionObservable",e.MouseMoveObservable="mouseMoveObservable"}(ro||(ro={}));var ao=function(e,t){var n,r,i,a,f,v,p,h,g,m,y,b;void 0===e&&(e={}),null==t||t.diagnosticsClient.setTag("plugin.autocapture.version",ii);var w=e.dataAttributePrefix,E=void 0===w?mt:w,S=e.visualTaggingOptions,k=void 0===S?{enabled:!0}:S;e.cssSelectorAllowlist=null!==(n=e.cssSelectorAllowlist)&&void 0!==n?n:gt,e.actionClickAllowlist=null!==(r=e.actionClickAllowlist)&&void 0!==r?r:yt,e.debounceTime=null!==(i=e.debounceTime)&&void 0!==i?i:0;var T=!1!==(null===(a=e.viewportContentUpdated)||void 0===a?void 0:a.enabled),P=null!==(p=null!==(v=null===(f=e.viewportContentUpdated)||void 0===f?void 0:f.exposureDuration)&&void 0!==v?v:e.exposureDuration)&&void 0!==p?p:150;e.viewportContentUpdated=o(o({},e.viewportContentUpdated),{exposureDuration:P}),e.pageUrlExcludelist=null===(h=e.pageUrlExcludelist)||void 0===h?void 0:h.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(n){return console.warn("Invalid regex pattern: ".concat(t.pattern),n),e}return e},[]);var x,_="@amplitude/plugin-autocapture-browser",I=[],A=new io(e,t),O=new Set,C=new Set,R=function(){var t,n,r=mn(Ti().map(function(t){return A.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,E)})),i=mn(new pn(function(t){var n,r=function(n){var r=A.addAdditionalEventProperties(n,"change",e.cssSelectorAllowlist,E);t.next(r)};return null===(n=B())||void 0===n||n.document.addEventListener("change",r,{capture:!0}),function(){var e;return null===(e=B())||void 0===e?void 0:e.document.removeEventListener("change",r)}}));window.navigation&&(n=mn(new pn(function(t){var n=function(n){var r=A.addAdditionalEventProperties(n,"navigate",e.cssSelectorAllowlist,E);t.next(r)};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}})));var o=mn(ki().map(function(t){return A.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,E)})),a=new pn(function(e){var t,n=function(t){e.next(t)};return null===(t=B())||void 0===t||t.addEventListener("scroll",n),function(){var e;null===(e=B())||void 0===e||e.removeEventListener("scroll",n)}}),s=function(e,t){return new pn(function(n){var r,i=B();if(!(null==i?void 0:i.IntersectionObserver))return function(){};var o=new IntersectionObserver(function(e){e.forEach(function(e){n.next(e)})},{root:null,rootMargin:"0px",threshold:1}),a=t.join(",");(null!==(r=null==i?void 0:i.document.querySelectorAll(a))&&void 0!==r?r:[]).forEach(function(e){o.observe(e)});var s=e.subscribe(function(e){return e.event.forEach(function(e){return e.addedNodes.forEach(function(e){e instanceof Element&&(e.matches(a)&&o.observe(e),e.querySelectorAll(a).forEach(function(e){o.observe(e)}))})})});return function(){s.unsubscribe(),o.disconnect()}})}(o,e.cssSelectorAllowlist);return(t={})[ro.ChangeObservable]=i,t[ro.ClickObservable]=r,t[ro.MutationObservable]=o,t[ro.NavigateObservable]=n,t[ro.ScrollObservable]=a,t[ro.ExposureObservable]=s,t},L=Ii(Object.values(null!==(m=null===(g=e.pageActions)||void 0===g?void 0:g.labeledEvents)&&void 0!==m?m:{})),D=Ai(null!==(b=null===(y=e.pageActions)||void 0===y?void 0:y.triggers)&&void 0!==b?b:[]),N=function(e,t,n,r){return new Ci(e,t,n,r)}(L,D,A,e);return{name:_,type:"enrichment",setup:function(t,n){return s(void 0,void 0,void 0,function(){var r,i,a,s,c,f,v,p,h,g,m,y,b,w,S,M,j,U,q,F,H,V;return u(this,function(u){return"undefined"==typeof document||(r=!1,i={maxX:void 0,maxY:void 0},t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(t){!function(t){var n,r;t&&(e.pageActions=o(o({},e.pageActions),t),L=Ii(Object.values(null!==(n=e.pageActions.labeledEvents)&&void 0!==n?n:{})),D=Ai(null!==(r=e.pageActions.triggers)&&void 0!==r?r:[]),N.update(L,D,e))}(t)}):t.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),(a=oo(t,A))&&I.push({unsubscribe:a}),s=hi(e,e.cssSelectorAllowlist),c=hi(e,e.actionClickAllowlist),f=R(),v=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackEvent,i=e.evaluateTriggers;return n.clickObservable.filter(wi).filter(function(e){return r("click",e.closestTrackedAncestor)}).map(function(e){return i(e)}).subscribe(function(e){null==t||t.track(oi,e.targetElementProperties)})}({allObservables:f,amplitude:n,shouldTrackEvent:s,evaluateTriggers:N.evaluate.bind(N)}),I.push(v),p=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers;return n.changeObservable.filter(wi).filter(function(e){return i("change",e.closestTrackedAncestor)}).map(function(e){return o(e)}).subscribe(function(e){null==t||t.track("[Amplitude] Element Changed",r("change",e.closestTrackedAncestor))})}({allObservables:f,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A.getEventProperties.apply(A,d(d([],l(e),!1),[E],!1))},amplitude:n,shouldTrackEvent:s,evaluateTriggers:N.evaluate.bind(N)}),I.push(p),h=function(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,a=e.shouldTrackActionClick,s=n.clickObservable,u=n.mutationObservable,c=n.navigateObservable,l=s.filter(function(e){return!o("click",e.closestTrackedAncestor)}).map(function(e){var t=bi(e.event.target,r.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=i(e.type,e.closestTrackedAncestor)),e}).filter(wi).filter(function(e){return a("click",e.closestTrackedAncestor)}),d=c?gn(u,c):u,f=gn(l,d),v=null,p=null;return hn(f,function(e){if(v&&(clearTimeout(v),v=null),"click"===e.type)return p=e,v=setTimeout(function(){v=null,p=null},500),Promise.resolve(null);if(p){var t=p;return p=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==t||t.track(oi,i("click",e.closestTrackedAncestor)))})}({allObservables:f,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A.getEventProperties.apply(A,d(d([],l(e),!1),[E],!1))},amplitude:n,shouldTrackEvent:s,shouldTrackActionClick:c}),h&&I.push(h),g=function(e){e.amplitude;var t=e.allObservables.scrollObservable,n={maxX:0,maxY:0},r=t.subscribe(function(){var e,t,r,i,o=B(),a=Math.floor(null!==(t=null!==(e=null==o?void 0:o.scrollX)&&void 0!==e?e:null==o?void 0:o.pageXOffset)&&void 0!==t?t:0),s=Math.floor(null!==(i=null!==(r=null==o?void 0:o.scrollY)&&void 0!==r?r:null==o?void 0:o.pageYOffset)&&void 0!==i?i:0);n.maxX=Math.max(n.maxX,a),n.maxY=Math.max(n.maxY,s)});return{unsubscribe:function(){r.unsubscribe()},getState:function(){return n},reset:function(){n.maxX=0,n.maxY=0}}}({allObservables:f,amplitude:n}),I.push(g),m={},y=B(),b=function(e){e&&r||(setTimeout(function(){r=!1},100),r=!0,function(e){var t,n,r,i,o,a,s=e.amplitude,u=e.scrollTracker,c=e.currentElementExposed,l=e.elementExposedForPage,d=e.exposureTracker,f=e.isPageEnd,v=e.lastScroll,p=u.getState(),h=B(),g=null!==(n=null==h?void 0:h.innerWidth)&&void 0!==n?n:0,m=null!==(r=null==h?void 0:h.innerHeight)&&void 0!==r?r:0,y=((t={})[ui]=Oe(null!==(a=null===(o=null===(i=null==h?void 0:h.location)||void 0===i?void 0:i.href)||void 0===o?void 0:o.split("?")[0])&&void 0!==a?a:""),t["[Amplitude] Max Page X"]=p.maxX+g,t["[Amplitude] Max Page Y"]=p.maxY+m,t[ci]=m,t[li]=g,t["[Amplitude] Element Exposed"]=Array.from(c),t),b=yi();b&&(y[di]=b),0!==c.size||p.maxX!==v.maxX||p.maxY!==v.maxY?(null==s||s.track("[Amplitude] Viewport Content Updated",y),v.maxX=p.maxX,v.maxY=p.maxY,c.clear(),f&&(u.reset(),l.clear(),null==d||d.reset())):f&&(u.reset(),l.clear(),null==d||d.reset())}({amplitude:n,scrollTracker:g,currentElementExposed:C,elementExposedForPage:O,exposureTracker:m.exposure,isPageEnd:e,lastScroll:i}))},w=function(e){!function(e,t,n,r){if(!t.has(e)){t.add(e),n.add(e);var i=Array.from(n);JSON.stringify(i).length>=18e3&&r(!1)}}(e,O,C,b)},T&&(m.exposure=function(e){var t=e.allObservables,n=e.onExposure,r=e.dataExtractor,i=e.exposureDuration,o=void 0===i?150:i,a=new Map,s=new Map,u=t.exposureObservable.subscribe(function(e){var t=e,i=t.target;if(t.isIntersecting){if(!a.get(i)){var u=setTimeout(function(){a.set(i,!0);var e=r.getElementPath(i);n(e),s.set(i,null)},o);s.set(i,u)}}else!t.isIntersecting&&t.intersectionRatio<1&&(u=s.get(i))&&(clearTimeout(u),s.set(i,null))});return{unsubscribe:function(){u.unsubscribe()},reset:function(){s.forEach(function(e){e&&clearTimeout(e)}),s.clear(),a.clear()}}}({allObservables:f,onExposure:w,dataExtractor:A,exposureDuration:P}),m.exposure&&I.push(m.exposure),S=function(){b(!0)},null==y||y.addEventListener("beforeunload",S),x=function(){null==y||y.removeEventListener("beforeunload",S)},I.push({unsubscribe:function(){return x()}}),(M=f[ro.NavigateObservable])?I.push(M.subscribe(function(){b(!0)})):y&&(j=function(){b(!0)},y.addEventListener("popstate",j),U=y.history.pushState,y.history&&U&&(y.history.pushState=new Proxy(U,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),b(!0)}})),I.push({unsubscribe:function(){y.removeEventListener("popstate",j),y.history&&U&&(y.history.pushState=U)}}))),null===(V=null==t?void 0:t.loggerProvider)||void 0===V||V.log("".concat(_," has been successfully added.")),window.opener&&k.enabled&&(q=e.cssSelectorAllowlist,F=e.actionClickAllowlist,function(e,t){var n=e;if(!0!==n[Ei]){n[Ei]=!0;var r=t.dataExtractor,i=t.isElementSelectable,o=t.cssSelectorAllowlist,a=t.actionClickAllowlist,s=null,u=function(t){e.notify({action:"element-selected",data:t})},c=function(t,n){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:n}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:n})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce("https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz").then(function(){var n;s=null===(n=null===window||void 0===window?void 0:window.amplitudeVisualTaggingSelector)||void 0===n?void 0:n.call(window,{getEventTagProps:r.getEventTagProps,isElementSelectable:function(e){return!i||i((null==t?void 0:t.actionType)||"click",e)},onTrack:c,onSelect:u,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:e,cssSelectorAllowlist:o,actionClickAllowlist:a,extractDataFromDataSource:r.extractDataFromDataSource,dataExtractor:r,diagnostics:{autocapture:{version:ii}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null===(e=null==s?void 0:s.close)||void 0===e||e.call(s)})}}(H=Cn(),{dataExtractor:A,isElementSelectable:hi(e,d(d([],l(q),!1),l(F),!1)),cssSelectorAllowlist:q,actionClickAllowlist:F}),function(e,t){var n,r=e;if(!0!==r[Rn]){r[Rn]=!0;var i=null!==(n=null==t?void 0:t.scriptUrl)&&void 0!==n?n:"https://cdn.amplitude.com/libs/background-capture-1.0.1.js.gz",o=null,a=function(t,n){var r,i;"background-capture-complete"===t&&(null===(i=null===(r=e.logger)||void 0===r?void 0:r.debug)||void 0===i||i.call(r,"Background capture complete"),e.notify({action:"background-capture-complete",data:n}))};e.registerActionHandler("initialize-background-capture",function(){var t,n;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Initializing background capture (external script)");var r=new URL(i,e.endpoint).toString();e.loadScriptOnce(r).then(function(){var t,n,r;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Background capture script loaded (external)"),o=null===(r=null===window||void 0===window?void 0:window.amplitudeBackgroundCapture)||void 0===r?void 0:r.call(window,{messenger:e,onBackgroundCapture:a}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null===(e=null==o?void 0:o.close)||void 0===e||e.call(o),o=null})}}(H),H.setup(o({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:_n[t.serverZone]})))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t,n,r;return u(this,function(i){try{for(e=c(I),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return[2]})})}}},so=["mutation","navigate"];function uo(e,t){var n,r,i,o,a=t.event,s=a.pageX,u=a.pageY;e.yMin=Math.min(null!==(n=e.yMin)&&void 0!==n?n:u,u),e.yMax=Math.max(null!==(r=e.yMax)&&void 0!==r?r:u,u),e.xMin=Math.min(null!==(i=e.xMin)&&void 0!==i?i:s,s),e.xMax=Math.max(null!==(o=e.xMax)&&void 0!==o?o:s,s),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function co(e){if(0===e.length)return null;var t=e[0],n=e[e.length-1];return{rageClickEvent:o({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(n.timestamp).toISOString(),"[Amplitude] Duration":n.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties),time:t.timestamp}}function lo(e){var t=this,n=e.amplitude,r=e.allObservables,i=e.shouldTrackRageClick,o=r.clickObservable,a=r.selectionObservable,c=[],l={},d=null;function f(e){c=[],l={},e&&(uo(l,e),c.push(e))}var v=hn(o.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return s(t,void 0,void 0,function(){var t;return u(this,function(n){return uo(l,e),t=null,0===c.length||function(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}(c,e)||function(e,t){var n=e[Math.max(0,e.length-4+1)];return t.timestamp-n.timestamp>=1e3}(c,e)||l.isOutOfBounds?(d&&(t=co(c)),f(e)):c.push(e),d&&(clearTimeout(d.timerId),d.resolve(t),d=null),c.length>=4?[2,new Promise(function(e){d={resolve:e,timerId:setTimeout(function(){e(co(c))},1e3)}})]:[2,null]})})}),p=null==a?void 0:a.subscribe(function(){f()}),h=v.subscribe(function(e){null!==e&&n.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){h.unsubscribe(),null==p||p.unsubscribe()}}}var fo,vo;!function(e){e.INCREASING="increasing",e.DECREASING="decreasing"}(fo||(fo={})),function(e){e.X="x",e.Y="y"}(vo||(vo={}));function po(e){var t=e.changes,n=e.changesThreshold,r=e.thresholdMs;return!(t.length<n)&&t[t.length-1]-t[0]<r}function ho(e){e.changes=[],e.startTime=void 0}function go(e){for(var t=e.changes,n=e.thresholdMs,r=0,i=t[t.length-1];r<t.length;r++){if(i-t[r]<n)break}0!==r&&(e.startTime=t[r],e.changes.splice(0,r))}var mo=function(e){var t=e.mouseDirectionChangeObservable,n=e.directionChanges,r=void 0===n?20:n,i=e.thresholdMs,o=void 0===i?2e3:i;return new pn(function(e){var n={changes:[],changesThreshold:r,thresholdMs:o},i={changes:[],changesThreshold:r,thresholdMs:o},a=void 0,s=null;function u(){void 0!==a&&(e.next(a),a=void 0,null!==s&&clearTimeout(s),ho(n),ho(i))}return t.subscribe(function(e){null!==s&&clearTimeout(s),function(e){var t=+Date.now();e.startTime=e.startTime||t;var n=e.changes,r=e.changesThreshold;n.push(t),n.length>r&&n.shift()}(e===vo.X?n:i);var t=function(e,t){var n=void 0;if(po(e)&&(n=e.startTime),po(t)){var r=t.startTime;r&&(!n||r<n)&&(n=r)}return n}(n,i);return t?(a=a||t,s=setTimeout(function(){u(),s=null},o)):u(),go(n),go(i),function(){null!==s&&(clearTimeout(s),s=null)}})})},yo=function(e){var t=e.amplitude,n=e.options,r=e.allObservables,i=e.directionChanges,o=void 0===i?20:i,a=e.thresholdMs,s=void 0===a?2e3:a,u=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new pn(function(e){var n=null,r=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};null!==n?(o.x>n.x?(r===fo.DECREASING&&e.next(vo.X),r=fo.INCREASING):o.x<n.x&&(r===fo.INCREASING&&e.next(vo.X),r=fo.DECREASING),o.y>n.y?(i===fo.DECREASING&&e.next(vo.Y),i=fo.INCREASING):o.y<n.y&&(i===fo.INCREASING&&e.next(vo.Y),i=fo.DECREASING),n=o):n=o})})}({allWindowObservables:r});return mo({mouseDirectionChangeObservable:u,directionChanges:o,thresholdMs:s}).subscribe(function(e){pi(n)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})};function bo(e,t,n,r){if(!r)return[];var i=e[t];return"object"==typeof i&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n}var wo=4e3,Eo=function(e){var t;void 0===e&&(e={});var n="@amplitude/plugin-frustration-browser",r=[],i=!1!==e.errorClicks;e.errorClicks||(i=!1);var a=!1!==e.deadClicks&&null!==e.deadClicks,f=!1!==e.rageClicks&&null!==e.rageClicks,v=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(v=!1);var p=bo(e,"rageClicks",St,f),h=bo(e,"deadClicks",wt,a),g=bo(e,"errorClicks",Et,i),m=null!==(t=e.dataAttributePrefix)&&void 0!==t?t:mt,y=new io(e),b=d([],l(new Set(d(d(d([],l(p),!1),l(h),!1),l(g),!1))),!1),w=function(){var e,t,n=mn(Ti("pointerdown").map(function(e){return y.addAdditionalEventProperties(e,"click",b,m,!0)})),r=mn(Pi().map(function(e){return y.addTypeAndTimestamp(e,"error")})),i=mn(ki().map(function(e){return y.addAdditionalEventProperties(e,"mutation",b,m)}));window.navigation&&(t=mn(new pn(function(e){var t=function(t){e.next(o(o({},t),{type:"navigate"}))};return window.navigation.addEventListener("navigate",t),function(){window.navigation.removeEventListener("navigate",t)}}).map(function(e){return y.addAdditionalEventProperties(e,"navigate",b,m)})));var a=mn(new pn(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){try{if(t.selectionStart===t.selectionEnd)return}catch(e){return}return e.next()}var n=window.getSelection();if(n&&!n.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),s=mn(new pn(function(e){var t=function(t){e.next(t)},n={capture:!0};return Si.document.addEventListener("mousemove",t,n),function(){Si.document.removeEventListener("mousemove",t,n)}}));return(e={})[ro.ClickObservable]=n,e[ro.MutationObservable]=i,e[ro.NavigateObservable]=t,e[ro.BrowserErrorObservable]=r,e[ro.SelectionObservable]=a,e[ro.MouseMoveObservable]=s,e};return{name:n,type:"enrichment",setup:function(t,c){return s(void 0,void 0,void 0,function(){var s,l,d,b,E,S,k,T,P,x,_,I;return u(this,function(u){return"undefined"==typeof document||(s=w(),(l=oo(t,y))&&r.push({unsubscribe:l}),f&&(d=hi(e,p),b=lo({allObservables:s,amplitude:c,shouldTrackRageClick:d}),r.push(b)),a&&(E=hi(e,h),S=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackDeadClick,a=n.clickObservable,s=n.mutationObservable,u=n.navigateObservable,c=a.filter(function(e){return wi(e)&&i("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ri.LEFT_OR_TOUCH_CONTACT}),l=u?gn(s,u):s,d=gn(c,l),f=null;return hn(d,function(e){return f&&so.includes(e.type)?(clearTimeout(f),f=null,Promise.resolve(null)):"click"===e.type?f?Promise.resolve(null):new Promise(function(t){f=setTimeout(function(){t(e),f=null},3e3)}):Promise.resolve(null)}).subscribe(function(e){if(e){var n={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};t.track("[Amplitude] Dead Click",o(o({},r("click",e.closestTrackedAncestor)),n),{time:e.timestamp})}})}({amplitude:c,allObservables:s,getEventProperties:function(e,t){return y.getEventProperties(e,t,m)},shouldTrackDeadClick:E}),r.push(S)),i&&(k=hi(e,g),T=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackErrorClick,i=n.clickObservable,a=n.browserErrorObservable,s=i.filter(function(e){return wi(e)&&r("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ri.LEFT_OR_TOUCH_CONTACT}),u=null,c=null,l=function(){null!==u&&(clearTimeout(u),u=null),c=null};return gn(s,a).subscribe(function(e){var n;if("click"===e.type)return l(),c=e,void(u=setTimeout(l,2e3));"error"===e.type&&c&&(t.track("[Amplitude] Error Click",o(((n={})["[Amplitude] Kind"]=e.event.kind,n["[Amplitude] Message"]=e.event.message,n["[Amplitude] Stack"]=e.event.stack,n["[Amplitude] Filename"]=e.event.filename,n["[Amplitude] Line Number"]=e.event.lineNumber,n["[Amplitude] Column Number"]=e.event.columnNumber,n),c.targetElementProperties)),l())})}({amplitude:c,allObservables:s,shouldTrackErrorClick:k}),r.push(T)),v&&(P=void 0,x=void 0,"object"==typeof e.thrashedCursor&&(P=e.thrashedCursor.directionChanges,x=e.thrashedCursor.threshold,P&&P<5&&(t.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(P," is below the minimum of ").concat(5,", setting to ").concat(5)),P=5),x&&x>wo&&(t.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(x," is above the maximum of ").concat(wo,", setting to ").concat(wo)),x=wo)),_=yo({amplitude:c,options:e,allObservables:s,directionChanges:P,thresholdMs:x}),r.push(_)),null===(I=null==t?void 0:t.loggerProvider)||void 0===I||I.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t,n,i;return u(this,function(o){try{for(e=c(r),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}return[2]})})}}};function So(e,t){var n=e.startTime+e.duration;return t.filter(function(t){return t.startTime<n&&t.startTime+t.duration>e.startTime}).map(function(e){return e.name})}function ko(e,t){var n,r=So(e,t),i=null!==(n=e.scripts)&&void 0!==n?n:[],a=i.map(function(e){return e.sourceURL}).filter(Boolean),s=i.map(function(e){return e.sourceFunctionName}).filter(Boolean),u=i.map(function(e){return e.sourceCharPosition}).filter(function(e){return"number"==typeof e&&e>=0}),c=i.map(function(e){return e.invokerType}).filter(Boolean),l=i.map(function(e){return e.invoker}).filter(Boolean);return o(o(o(o(o(o(o({"[Amplitude] Main Thread Block Source":"long-animation-frame","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.blockingDuration,"[Amplitude] Main Thread Block Start Time":e.startTime},r.length>0&&{"[Amplitude] Main Thread Block Measures":r}),{"[Amplitude] Main Thread Block Render Start":e.renderStart,"[Amplitude] Main Thread Block Style And Layout Start":e.styleAndLayoutStart,"[Amplitude] Main Thread Block Script Count":i.length}),a.length>0&&{"[Amplitude] Main Thread Block Script URLs":a}),s.length>0&&{"[Amplitude] Main Thread Block Script Functions":s}),u.length>0&&{"[Amplitude] Main Thread Block Script Positions":u}),c.length>0&&{"[Amplitude] Main Thread Block Invoker Types":c}),l.length>0&&{"[Amplitude] Main Thread Block Invokers":l})}function To(e,t){var n,r=So(e,t),i=null!==(n=e.attribution)&&void 0!==n?n:[];return o(o({"[Amplitude] Main Thread Block Source":"long-task","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.duration,"[Amplitude] Main Thread Block Start Time":e.startTime},r.length>0&&{"[Amplitude] Main Thread Block Measures":r}),i.length>0&&{"[Amplitude] Main Thread Block Attribution":i.map(function(e){return e.name})})}function Po(e){var t=e.amplitude,n=e.options,r=e.durationThreshold,i=void 0===r?100:r,o=function(){if("undefined"==typeof PerformanceObserver)return null;try{var e=PerformanceObserver.supportedEntryTypes;if(e.includes("long-animation-frame"))return"long-animation-frame";if(e.includes("longtask"))return"longtask"}catch(e){}return null}();if(!o)return{unsubscribe:function(){}};var a=[],s=new PerformanceObserver(function(e){var t,n,r=performance.now();try{for(var i=c(e.getEntries()),o=i.next();!o.done;o=i.next()){var s=o.value;a.push(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}for(var u=r-1e4;a.length>0&&a[0].startTime<u;)a.shift()});try{s.observe({entryTypes:["measure"]})}catch(e){}var u=new PerformanceObserver(function(e){var r,s;try{for(var u=c(e.getEntries()),l=u.next();!l.done;l=u.next()){var d=l.value;if(!pi(n))return;if(!(d.duration<i)){var f="long-animation-frame"===o?ko(d,a):To(d,a);t.track("[Amplitude] Main Thread Block",f)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(r)throw r.error}}});try{u.observe({entryTypes:[o]})}catch(e){return s.disconnect(),{unsubscribe:function(){}}}return{unsubscribe:function(){u.disconnect(),s.disconnect()}}}var xo,_o,Io=function(e){void 0===e&&(e={});var t="@amplitude/plugin-performance-browser",n=[],r=!0===e.mainThreadBlock||"object"==typeof e.mainThreadBlock&&null!==e.mainThreadBlock;return{name:t,type:"enrichment",setup:function(i,o){return s(void 0,void 0,void 0,function(){var a,s,c;return u(this,function(u){return"undefined"==typeof document||(r&&(a=100,"object"==typeof e.mainThreadBlock&&void 0!==e.mainThreadBlock.durationThreshold&&(a=e.mainThreadBlock.durationThreshold),s=Po({amplitude:o,options:e,durationThreshold:a}),n.push(s)),null===(c=null==i?void 0:i.loggerProvider)||void 0===c||c.log("".concat(t," performance tracking has been successfully added."))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t,r,i;return u(this,function(o){try{for(e=c(n),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}}},Ao="[Amplitude] Network Request",Oo="500-599";function Co(e,t){var n="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(n).test(e)}function Ro(e,t){var n,r,i=t.split(",");try{for(var o=c(i),a=o.next();!a.done;a=o.next()){var s=l(a.value.split("-").map(Number),2),u=s[0],d=s[1];if(e===u&&void 0===d)return!0;if(e>=u&&e<=d)return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}function Lo(e){var t;if(e)try{var n=null===(t=B())||void 0===t?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),a=r.href,s=r.host;return r.hash="",r.search="",{query:i,fragment:o,href:a,hrefWithoutQueryOrHash:r.href,host:s}}catch(e){return}}function Do(e){if("object"==typeof e&&null!==e){if(0!==e.length)return e}else{if(e)return d([],l(R),!1);if(void 0===e){return}}}function No(e){var t,n,r;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(n=null==e?void 0:e.blocklist)||void 0===n?void 0:n.length)&&!(null===(r=null==e?void 0:e.excludelist)||void 0===r?void 0:r.length)}function Mo(e,t){var n;void 0===t&&(t={});var r=Lo(e.url);if(!r)return!1;var i,o=r.host;if(!1!==t.ignoreAmplitudeRequests&&(Co(o,"*.amplitude.com")||Co(o,"amplitude.com")))return!1;if(null===(n=t.ignoreHosts)||void 0===n?void 0:n.find(function(e){return Co(o,e)}))return!1;if(!t.captureRules&&void 0!==e.status&&!Ro(e.status,Oo))return!1;if(t.captureRules&&(d([],l(t.captureRules),!1).reverse().find(function(t){if(i=function(e,t,n,r,i){if((!e.hosts||e.hosts.find(function(e){return Co(t,e)}))&&(!r||!e.urls||Ae(r,e.urls))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e})))return!((n||0===n)&&!Ro(n,e.statusCodeRange||Oo))}(t,o,e.status,e.url,e.method),i){var n=Do(t.responseHeaders);if(e.responseWrapper&&n){var r=e.responseWrapper.headers(n);r&&(e.responseHeaders=r)}var a=Do(t.requestHeaders);if(e.requestWrapper&&a){var s=e.requestWrapper.headers(a);s&&(e.requestHeaders=s)}if(e.responseWrapper&&t.responseBody&&!No(t.responseBody)){var u=t.responseBody.excludelist||t.responseBody.blocklist;e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,u)}if(e.requestWrapper&&t.requestBody&&!No(t.requestBody)){u=t.requestBody.excludelist||t.requestBody.blocklist;e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,u)}}return void 0!==i}),!i))return!1;return!e.requestWrapper||!function(e,t){if(e.includes("amplitude.com"))try{var n=t.body;if("string"!=typeof n)return!1;if(JSON.parse(n).events.find(function(e){return e.event_type===Ao}))return!0}catch(e){}return!1}(o,e.requestWrapper)}function jo(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider;return t.networkObservable.filter(function(e){return Mo(e.event,n)}).subscribe(function(e){var t,n,o,a=e.event,c=Lo(a.url);if(c){var d=null===(n=a.responseWrapper)||void 0===n?void 0:n.bodySize,f=null===(o=a.requestWrapper)||void 0===o?void 0:o.bodySize;!function(e,t,n,r){s(this,void 0,void 0,function(){var i,o,a;return u(this,function(s){switch(s.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=l.apply(void 0,[s.sent(),2]),o=i[0],a=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==r||r.debug("Failed to stringify request body",e)}if(a)try{e["[Amplitude] Response Body"]=JSON.stringify(a)}catch(e){null==r||r.debug("Failed to stringify response body")}s.label=2;case 2:return null==n||n.track(Ao,e),[2]}})})}(((t={})["[Amplitude] URL"]=c.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=c.query,t["[Amplitude] URL Fragment"]=c.fragment,t["[Amplitude] Request Method"]=a.method,t["[Amplitude] Status Code"]=a.status,t["[Amplitude] Start Time"]=a.startTime,t["[Amplitude] Completion Time"]=a.endTime,t["[Amplitude] Duration"]=a.duration,t["[Amplitude] Request Body Size"]=f,t["[Amplitude] Response Body Size"]=d,t["[Amplitude] Request Type"]=a.type,t["[Amplitude] Request Headers"]=a.requestHeaders,t["[Amplitude] Response Headers"]=a.responseHeaders,t),a,r,i)}})}!function(e){e.NetworkObservable="networkObservable"}(xo||(xo={}));var Uo=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-network-capture-browser",r=function(){var e,n=new pn(function(e){var n=new qt(function(t){var n=function(e,t){return{event:e,timestamp:Date.now(),type:t}}(t,"network");e.next(n)});return Ht.subscribe(n,t),function(){Ht.unsubscribe(n)}});return(e={})[xo.NetworkObservable]=n,e};return{name:n,type:"enrichment",setup:function(i,o){return s(void 0,void 0,void 0,function(){var a;return u(this,function(s){return"undefined"==typeof document||(a=r(),t=null==i?void 0:i.loggerProvider,_o=jo({allObservables:a,networkTrackingOptions:e,amplitude:o,loggerProvider:t}),null==t||t.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){return _o.unsubscribe(),[2]})})}}};let qo=-1;const Fo=e=>{addEventListener("pageshow",t=>{t.persisted&&(qo=t.timeStamp,e(t))},!0)},Bo=(e,t,n,r)=>{let i,o;return a=>{t.value>=0&&(a||r)&&(o=t.value-(i??0),(o||void 0===i)&&(i=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Ho=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},Vo=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},zo=()=>{const e=Vo();return e?.activationStart??0},Wo=(e,t=-1)=>{const n=Vo();let r="navigate";return qo>=0?r="back-forward-cache":n&&(document.prerendering||zo()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},$o=new WeakMap;function Ko(e,t){return $o.get(e)||$o.set(e,new t),$o.get(e)}class Jo{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const Go=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Yo=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Xo=-1;const Qo=new Set,Zo=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,ea=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of Qo)e();isFinite(Xo)||(Xo="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",ea,!0))}},ta=()=>{if(Xo<0){const e=zo(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;Xo=t??Zo(),addEventListener("visibilitychange",ea,!0),addEventListener("prerenderingchange",ea,!0),Fo(()=>{setTimeout(()=>{Xo=Zo()})})}return{get firstHiddenTime(){return Xo},onHidden(e){Qo.add(e)}}},na=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},ra=[1800,3e3],ia=(e,t={})=>{na(()=>{const n=ta();let r,i=Wo("FCP");const o=Go("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-zo(),0),i.entries.push(t),r(!0)))});o&&(r=Bo(e,i,ra,t.reportAllChanges),Fo(n=>{i=Wo("FCP"),r=Bo(e,i,ra,t.reportAllChanges),Ho(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},oa=[.1,.25];let aa=0,sa=1/0,ua=0;const ca=e=>{for(const t of e)t.interactionId&&(sa=Math.min(sa,t.interactionId),ua=Math.max(ua,t.interactionId),aa=ua?(ua-sa)/7+1:0)};let la;const da=()=>la?aa:performance.interactionCount??0;let fa=0;class va{u=[];l=new Map;m;p;v(){fa=da(),this.u.length=0,this.l.clear()}L(){const e=Math.min(this.u.length-1,Math.floor((da()-fa)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.u.at(-1);let n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort((e,t)=>t.P-e.P),this.u.length>10){const e=this.u.splice(10);for(const t of e)this.l.delete(t.id)}this.p?.(n)}}}const pa=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=Yo(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},ha=[200,500],ga=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=ta();na(()=>{"interactionCount"in performance||la||(la=Go("event",ca,{type:"event",buffered:!0,durationThreshold:0}));let r,i=Wo("INP");const o=Ko(t,va),a=e=>{pa(()=>{for(const t of e)o.h(t);const t=o.L();t&&t.P!==i.value&&(i.value=t.P,i.entries=t.entries,r())})},s=Go("event",a,{durationThreshold:t.durationThreshold??40});r=Bo(e,i,ha,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{a(s.takeRecords()),r(!0)}),Fo(()=>{o.v(),i=Wo("INP"),r=Bo(e,i,ha,t.reportAllChanges)}))})};class ma{m;h(e){this.m?.(e)}}const ya=[2500,4e3],ba=[800,1800],wa=e=>{document.prerendering?na(()=>wa(e)):"complete"!==document.readyState?addEventListener("load",()=>wa(e),!0):setTimeout(e)};function Ea(e){var t,n=(null===(t=e.entries[0])||void 0===t?void 0:t.startTime)||0;return performance.timeOrigin+n}function Sa(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(Ea(e)),navigationStart:Math.floor(performance.timeOrigin)}}var ka,Ta=function(){var e=null,t=B(),n=null==t?void 0:t.document,r=null==t?void 0:t.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(t,i){return s(void 0,void 0,void 0,function(){var o,a;return u(this,function(s){return void 0===n||(o=Oe((null==r?void 0:r.href)||"",t.loggerProvider),a={"[Amplitude] Page Domain":(null==r?void 0:r.hostname)||"","[Amplitude] Page Location":o,"[Amplitude] Page Path":Oe((null==r?void 0:r.pathname)||"",t.loggerProvider),"[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":Oe(o.split("?")[0],t.loggerProvider)},((e,t={})=>{na(()=>{const n=ta();let r,i=Wo("LCP");const o=Ko(t,ma),a=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)o.h(t),t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-zo(),0),i.entries=[t],r())},s=Go("largest-contentful-paint",a);if(s){r=Bo(e,i,ya,t.reportAllChanges);const n=Yo(()=>{a(s.takeRecords()),s.disconnect(),r(!0)}),o=e=>{e.isTrusted&&(pa(n),removeEventListener(e.type,o,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addEventListener(e,o,{capture:!0});Fo(n=>{i=Wo("LCP"),r=Bo(e,i,ya,t.reportAllChanges),Ho(()=>{i.value=performance.now()-n.timeStamp,r(!0)})})}})})(function(e){a["[Amplitude] LCP"]=Sa(e)}),ia(function(e){a["[Amplitude] FCP"]=Sa(e)}),ga(function(e){a["[Amplitude] INP"]=Sa(e)}),((e,t={})=>{const n=ta();ia(Yo(()=>{let r,i=Wo("CLS",0);const o=Ko(t,Jo),a=e=>{for(const t of e)o.h(t);o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},s=Go("layout-shift",a);s&&(r=Bo(e,i,oa,t.reportAllChanges),n.onHidden(()=>{a(s.takeRecords()),r(!0)}),Fo(()=>{o.i=0,i=Wo("CLS",0),r=Bo(e,i,oa,t.reportAllChanges),Ho(()=>r())}),setTimeout(r))}))})(function(e){a["[Amplitude] CLS"]=Sa(e)}),((e,t={})=>{let n=Wo("TTFB"),r=Bo(e,n,ba,t.reportAllChanges);wa(()=>{const i=Vo();i&&(n.value=Math.max(i.responseStart-zo(),0),n.entries=[i],r(!0),Fo(()=>{n=Wo("TTFB",0),r=Bo(e,n,ba,t.reportAllChanges),r(!0)}))})})(function(e){a["[Amplitude] TTFB"]=Sa(e)}),e=function(){"hidden"===n.visibilityState&&e&&(i.track("[Amplitude] Web Vitals",a),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(t){return e&&(null==n||n.removeEventListener("visibilitychange",e)),[2]})})}}},Pa=function(){function e(e,t){var n,r,i;this.shouldTrackNewCampaign=!1,this.options=o({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:(r=(null===(n=t.cookieOptions)||void 0===n?void 0:n.domain)||t.topLevelDomain,i=r,i?(i.startsWith(".")&&(i=i.substring(1)),[new RegExp("".concat(i.replace(".","\\."),"$"))]):[]),optOut:t.optOut},e),this.storage=t.cookieStorage,this.storageKey=je(t.apiKey,"MKTG"),this.webExpStorageKey=je(t.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=C,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,this.topLevelDomain=t.topLevelDomain,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return s(this,void 0,void 0,function(){var e,t;return u(this,function(n){switch(n.label){case 0:return this.options.optOut?[2]:[4,this.fetchCampaign()];case 1:return t=l.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||Te(this.sessionTimeout,this.lastEventTime),Cr(this.currentCampaign,this.previousCampaign,this.options,this.logger,e,this.topLevelDomain)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return s(this,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return(e=t.sent())?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||(new Vt).parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,n,r,i,a=(t=this.currentCampaign,n=this.options,r=o(o({},C),t),i=Object.entries(r).reduce(function(e,t){var r,i=l(t,2),o=i[0],a=i[1];return e.setOnce("initial_".concat(o),null!==(r=null!=a?a:n.initialEmptyValue)&&void 0!==r?r:"EMPTY"),a?e.set(o,a):e.unset(o)},new M),W(i));return e&&(a.event_id=e),a},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),xa=new Set([i.IDENTIFY,i.GROUP_IDENTIFY]),_a=function(e){var t;void 0===e&&(e={});var n,r,i,a,c,l,d=null!==(t=e.fallbackAttributionEvent)&&void 0!==t&&t,f=B(),v={},p=!1,h=!1,g=function(){return s(void 0,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return[4,(new Vt).parse()];case 1:return e=t.sent(),v=Re(e),d&&(null==r||r.log("Tracking attribution fallback event."),null==n||n.track("[Amplitude] Attribution",v)),[2]}})})},m=function(){g()},y=function(e){return new Proxy(e,{apply:function(e,t,n){Reflect.apply(e,t,n),p&&m()}})};return{name:"@amplitude/plugin-event-property-attribution-browser",type:"enrichment",setup:function(e,t){return s(void 0,void 0,void 0,function(){return u(this,function(o){switch(o.label){case 0:return n=t,r=e.loggerProvider,p=!0,r.log("Installing event property attribution tracking."),[4,g()];case 1:if(o.sent(),!f)return[2];if(f.addEventListener("popstate",m),!h){if(i=Reflect.get(f.history,"pushState"),a=Reflect.get(f.history,"replaceState"),!i||!a)return[2];c=y(i),f.history.pushState=c,l=y(a),f.history.replaceState=l,h=!0}return[2]}})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return xa.has(e.event_type)||(e.event_properties=o(o({},v),e.event_properties)),[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t;return u(this,function(n){return f&&(f.removeEventListener("popstate",m),e=Reflect.get(f.history,"pushState"),t=Reflect.get(f.history,"replaceState"),h&&e===c&&i&&(f.history.pushState=i),h&&t===l&&a&&(f.history.replaceState=a)),p=!1,h=!1,i=void 0,a=void 0,c=void 0,l=void 0,v={},[2]})})}}},Ia="AMP_CURRENT_PAGE",Aa="AMP_PREVIOUS_PAGE",Oa="AMP_URL_INFO";!function(e){e.Direct="direct",e.Internal="internal",e.External="external"}(ka||(ka={}));var Ca=new Set([i.IDENTIFY,i.GROUP_IDENTIFY,i.REVENUE]),Ra=function(e){var t=(void 0===e?{}:e).internalDomains,n=void 0===t?[]:t,r=B(),i=void 0,a=!1,c=void 0,d=!1,f=!1,v=function(e){var t;try{var n=Oe(e,c);t=new URL(n).hostname}catch(e){null==c||c.error("Could not parse URL: ",e)}return t},p=function(e){var t="undefined"!=typeof location&&location.hostname||"",r=e?v(e):void 0;if(!r)return ka.Direct;var i=n.some(function(e){return-1!==t.indexOf(e)}),o=n.some(function(e){return-1!==r.indexOf(e)});return t===r||o&&i?ka.Internal:ka.External},h=function(){return s(void 0,void 0,void 0,function(){var e,t,n,r,o;return u(this,function(s){switch(s.label){case 0:return i&&a?[4,i.get(Oa)]:[3,3];case 1:return e=s.sent(),t=Oe("undefined"!=typeof location&&location.href||""),n=(null==e?void 0:e[Ia])||"",r=void 0,r=t===n?(null==e?void 0:e[Aa])||"":n||(document.referrer||""),[4,i.set(Oa,(o={},o[Ia]=t,o[Aa]=r,o))];case 2:s.sent(),s.label=3;case 3:return[2]}})})},g=function(){h()},m={name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(e,t){return s(void 0,void 0,void 0,function(){var t,n,o,s,p,m,y,b;return u(this,function(u){switch(u.label){case 0:if((c=e.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),f=!0,!r)return[3,7];try{i=new Ue(r.sessionStorage)}catch(e){null==c||c.debug("sessionStorage is not available in this environment.")}return[4,null==i?void 0:i.isEnabled()];case 1:return a=null!==(b=u.sent())&&void 0!==b&&b,i&&a?(t="undefined"!=typeof document&&document.referrer||"",n=t?v(t):void 0,o="undefined"!=typeof location&&location.hostname||"",s=Oe("undefined"!=typeof location&&location.href||""),[4,i.get(Oa)]):[3,6];case 2:return p=u.sent(),m=(null==p?void 0:p[Ia])||"",!!n&&n!==o&&m!==s?[4,i.set(Oa,(y={},y[Ia]=s,y[Aa]=t,y))]:[3,4];case 3:return u.sent(),[3,6];case 4:return[4,h()];case 5:u.sent(),u.label=6;case 6:r.addEventListener("popstate",g),d||(r.history.pushState=new Proxy(r.history.pushState,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),f&&g()}}),r.history.replaceState=new Proxy(r.history.replaceState,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),f&&g()}}),d=!0),u.label=7;case 7:return[2]}})})},execute:function(e){return s(void 0,void 0,void 0,function(){var t,n,r;return u(this,function(s){switch(s.label){case 0:return t=Oe("undefined"!=typeof location&&location.href||""),i&&a?[4,i.get(Oa)]:[3,2];case 1:if(n=s.sent(),r=(null==n?void 0:n[Aa])||"",Ca.has(e.event_type))return[2,e];e.event_properties=o(o({},e.event_properties||{}),{"[Amplitude] Page Domain":La(e,"[Amplitude] Page Domain","undefined"!=typeof location&&location.hostname||""),"[Amplitude] Page Location":La(e,"[Amplitude] Page Location",t),"[Amplitude] Page Path":La(e,"[Amplitude] Page Path","undefined"!=typeof location&&Oe(location.pathname)||""),"[Amplitude] Page Title":La(e,"[Amplitude] Page Title",Yt(Gt)),"[Amplitude] Page URL":La(e,"[Amplitude] Page URL",t.split("?")[0]),"[Amplitude] Previous Page Location":r,"[Amplitude] Previous Page Type":p(r)}),s.label=2;case 2:return[2,e]}})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return r&&(r.removeEventListener("popstate",g),f=!1),i&&a?[4,i.set(Oa,{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})}};return m};function La(e,t,n){return e.event_properties||(e.event_properties={}),void 0===e.event_properties[t]?n:e.event_properties[t]}var Da=function(){var e,t,n;function r(t){if(t)try{var n=new Function("return "+t)();if("function"==typeof n)return n;null==e||e.error("Custom enrichment body did not evaluate to a function")}catch(t){null==e||e.error("Could not create custom enrichment function",t)}return function(e){return e}}var i={name:"@amplitude/plugin-custom-enrichment-browser",type:"enrichment",setup:function(i,o){return s(void 0,void 0,void 0,function(){var o,a;return u(this,function(s){return null==(e=i.loggerProvider)||e.log("Installing @amplitude/plugin-custom-enrichment-browser"),(null===(a=i.remoteConfig)||void 0===a?void 0:a.fetchRemoteConfig)&&(i.remoteConfigClient?(o=i.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(e){n=e&&function(e){return"object"==typeof e&&null!==e&&"body"in e&&"string"==typeof e.body}(e)?r(e.body||""):r("")}),t=function(){var e;return null===(e=i.remoteConfigClient)||void 0===e?void 0:e.unsubscribe(o)}):null==e||e.debug("Remote config client is not provided, skipping remote config fetch")),[2]})})},execute:function(t){return s(void 0,void 0,void 0,function(){var r;return u(this,function(i){if(n)try{return[2,null!==(r=n(t))&&void 0!==r?r:null]}catch(n){return null==e||e.error("Could not execute custom enrichment function",n),[2,t]}return[2,t]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){return t&&t(),[2]})})}};return i},Na="userProperty",Ma="eventProperty",ja=function(e){return e===Na||e===Ma},Ua=function(e,t){return function(e){var t=d([],l(new Set((Array.isArray(e)?e:[e]).filter(ja))),!1);return t.length>0?t:[Na]}(e.trackingMethod).includes(t)},qa=function(e){return Ua(e,Na)},Fa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return n(t,e),t.prototype.init=function(e,t,n){var r,i;return void 0===e&&(e=""),arguments.length>2?(r=t,i=n):"string"==typeof t?(r=t,i=void 0):(r=null==t?void 0:t.userId,i=t),$(this._init(o(o({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,i,c,l,d,f,v;return s(this,void 0,void 0,function(){var p,h,g,m,y,b,w,E,S,k,T,P,x,_,I,A=this;return u(this,function(O){switch(O.label){case 0:return this.initializing?[2]:(this.initializing=!0,p=function(e){var t,n;return void 0===e&&(e={}),!0===(null===(t=e.remoteConfig)||void 0===t?void 0:t.fetchRemoteConfig)||!1!==(null===(n=e.remoteConfig)||void 0===n?void 0:n.fetchRemoteConfig)&&!1!==e.fetchRemoteConfig}(t),h=null!==(n=t.loggerProvider)&&void 0!==n?n:new X,t.loggerProvider||h.enable(null!==(r=t.logLevel)&&void 0!==r?r:G.Warn),g=null!==(i=t.serverZone)&&void 0!==i?i:"US",y=this._diagnosticsSampleRate,b=null===(c=t.enableDiagnostics)||void 0===c||c,p?(m=new ut(t.apiKey,h,g,null===(l=t.remoteConfig)||void 0===l?void 0:l.serverUrl),[4,new Promise(function(e){null==m||m.subscribe("configs.diagnostics.browserSDK","all",function(t,n,r){if(h.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(y=i);var o=t.enabled;"boolean"==typeof o&&(b=o)}e()})})]):[3,2]);case 1:O.sent(),O.label=2;case 2:return(w=new et(t.apiKey,h,g,{enabled:b,sampleRate:y})).setTag("library","".concat(rr,"/").concat(nr)),"undefined"!=typeof navigator&&w.setTag("user_agent",navigator.userAgent),[4,qr(t.apiKey,t,this,w,{loggerProvider:h,serverZone:g,enableDiagnostics:b,diagnosticsSampleRate:y})];case 3:return E=O.sent(),p&&m?[4,new Promise(function(e){null==m||m.subscribe("configs.analyticsSDK.browserSDK","all",function(t,n,r){E.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t&&ni(t,E),e()})})]:[3,5];case 4:O.sent(),O.label=5;case 5:return[4,e.prototype._init.call(this,E)];case 6:return O.sent(),this.logBrowserOptions(E),this.config.remoteConfigClient=m,L=this.config,S=Bn(L.defaultTracking)&&L.defaultTracking&&"object"==typeof L.defaultTracking&&L.defaultTracking.attribution&&"object"==typeof L.defaultTracking.attribution?o({},L.defaultTracking.attribution):{},Bn(this.config.defaultTracking)&&qa(S)?(this.config.optOut&&this.timeline.addOptOutListener(function(e){return s(A,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return e?[3,2]:(this.webAttribution=new Pa(S,this.config),[4,this.webAttribution.init()]);case 1:t.sent(),t.label=2;case 2:return[2]}})})}),this.webAttribution=new Pa(S,this.config),[4,this.webAttribution.init()]):[3,8];case 7:O.sent(),O.label=8;case 8:return k=_e(),T=k.ampTimestamp?Number(k.ampTimestamp):void 0,P=!T||Date.now()<T,x=P&&!Number.isNaN(Number(k.ampSessionId))?Number(k.ampSessionId):void 0,-1!==(_=this.config.deferredSessionId)||this.config.optOut||(_=Date.now()),this.setSessionId(null!==(v=null!==(f=null!==(d=t.sessionId)&&void 0!==d?d:x)&&void 0!==f?f:_)&&void 0!==v?v:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return s(A,void 0,void 0,function(){return u(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(I=Se(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline?[3,10]:[4,this.add(Zr()).promise];case 9:O.sent(),O.label=10;case 10:return[4,this.add(new de({diagnosticsClient:w})).promise];case 11:return O.sent(),[4,this.add(new ir).promise];case 12:return O.sent(),[4,this.add(new ke).promise];case 13:return O.sent(),function(e){Qr||void 0!==e.defaultTracking||(e.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),Qr=!0)}(this.config),R=this.config.defaultTracking,Fn(R,"fileDownloads")?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(Xr()).promise]):[3,15];case 14:O.sent(),O.label=15;case 15:return Hn(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(Jr()).promise]):[3,17];case 16:O.sent(),O.label=17;case 17:return Vn(this.config.defaultTracking)?this.config.optOut?[3,19]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(zr(Qn(this.config))).promise]):[3,20];case 18:return O.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(e){return s(A,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return e?[2]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(zr(Qn(this.config))).promise]);case 1:return t.sent(),[2]}})})}),O.label=20;case 20:return Bn(this.config.defaultTracking)&&function(e){return Ua(e,Ma)}(S)?(this.config.loggerProvider.debug("Adding event property attribution plugin"),[4,this.add(_a(S)).promise]):[3,22];case 21:O.sent(),O.label=22;case 22:return $n(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(ao(Gn(this.config),{diagnosticsClient:w})).promise]):[3,24];case 23:O.sent(),O.label=24;case 24:return Kn(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(Eo(Yn(this.config))).promise]):[3,26];case 25:O.sent(),O.label=26;case 26:return Wn(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(Uo(Xn(this.config))).promise]):[3,28];case 27:O.sent(),O.label=28;case 28:return function(e){return"boolean"==typeof e?e:"object"==typeof e&&!0===e.webVitals}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(Ta()).promise]):[3,30];case 29:O.sent(),O.label=30;case 30:return function(e){return"object"==typeof e&&(!0===e.performanceTracking||"object"==typeof e.performanceTracking)}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding performance tracking plugin"),[4,this.add(Io(Jn(this.config))).promise]):[3,32];case 31:O.sent(),O.label=32;case 32:return function(e){return Fn(e,"pageUrlEnrichment")}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(Ra()).promise]):[3,34];case 33:O.sent(),O.label=34;case 34:return("boolean"==typeof(C=this.config.customEnrichment)?C:"object"==typeof C&&null!==C&&!1!==C.enabled)?(this.config.loggerProvider.debug("Adding custom enrichment plugin"),[4,this.add(Da()).promise]):[3,36];case 35:O.sent(),O.label=36;case 36:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 37:return O.sent(),I.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},n=t.time,r=a(t,["time"]),i="number"==typeof n?{time:n}:void 0;A.track(e.eventType,r,i)}),[2]}var C,R,L})})},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),e===this.config.userId&&void 0!==e||(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),function(e,t){Se(t).identityStore.editIdentity().setUserId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),function(e,t){Se(t).identityStore.editIdentity().setDeviceId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(V()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var e,t;return{deviceId:null===(e=this.config)||void 0===e?void 0:e.deviceId,userId:null===(t=this.config)||void 0===t?void 0:t.userId,userProperties:this.userProperties}},t.prototype.setIdentity=function(e){var t,n,r;if("userId"in e&&this.setUserId(e.userId),"deviceId"in e&&e.deviceId&&this.setDeviceId(e.deviceId),"userProperties"in e){this.userProperties=e.userProperties;var i=new M,o=null!==(r=e.userProperties)&&void 0!==r?r:{};try{for(var a=c(Object.entries(o)),s=a.next();!s.done;s=a.next()){var u=l(s.value,2),d=u[0],f=u[1];i.set(d,f)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}this.identify(i)}},t.prototype.getOptOut=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.optOut},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),$(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,$(Promise.resolve());if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return $(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId();r!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,o=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,zn(this.config.defaultTracking)&&(r&&i&&n.push(this.track(br,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:r,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var a=this.trackCampaignEventIfNeeded(++o,n);return this.config.identify&&n.push(this.track(W(this.config.identify)).promise),zn(this.config.defaultTracking)&&n.push(this.track(yr,void 0,{event_id:a?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,$(Promise.all(n))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=Br(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(tr(t)){var r=t._q;t._q=[],t=er(new M,r)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(tr(r)){var o=r._q;r._q=[],r=er(new M,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(tr(t)){var r=t._q;t._q=[],t=er(new J,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign||!qa(this.webAttribution.options))return!1;var n=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return s(this,void 0,void 0,function(){var n,r,i;return u(this,function(o){return n=Date.now(),r=Te(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===yr||t.event_type===br||t.session_id&&t.session_id!==this.getSessionId()||(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=o(o({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",Pn(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t.prototype._setDiagnosticsSampleRate=function(e){e>1||e<0||this.config||(this._diagnosticsSampleRate=e)},t}(K),Ba=function(){var e=new Fa;return{init:ue(e.init.bind(e),"init",oe(e),se(e,["config"])),add:ue(e.add.bind(e),"add",oe(e),se(e,["config.apiKey","timeline.plugins"])),remove:ue(e.remove.bind(e),"remove",oe(e),se(e,["config.apiKey","timeline.plugins"])),track:ue(e.track.bind(e),"track",oe(e),se(e,["config.apiKey","timeline.queue.length"])),logEvent:ue(e.logEvent.bind(e),"logEvent",oe(e),se(e,["config.apiKey","timeline.queue.length"])),identify:ue(e.identify.bind(e),"identify",oe(e),se(e,["config.apiKey","timeline.queue.length"])),groupIdentify:ue(e.groupIdentify.bind(e),"groupIdentify",oe(e),se(e,["config.apiKey","timeline.queue.length"])),setGroup:ue(e.setGroup.bind(e),"setGroup",oe(e),se(e,["config.apiKey","timeline.queue.length"])),revenue:ue(e.revenue.bind(e),"revenue",oe(e),se(e,["config.apiKey","timeline.queue.length"])),flush:ue(e.flush.bind(e),"flush",oe(e),se(e,["config.apiKey","timeline.queue.length"])),getUserId:ue(e.getUserId.bind(e),"getUserId",oe(e),se(e,["config","config.userId"])),setUserId:ue(e.setUserId.bind(e),"setUserId",oe(e),se(e,["config","config.userId"])),getDeviceId:ue(e.getDeviceId.bind(e),"getDeviceId",oe(e),se(e,["config","config.deviceId"])),setDeviceId:ue(e.setDeviceId.bind(e),"setDeviceId",oe(e),se(e,["config","config.deviceId"])),reset:ue(e.reset.bind(e),"reset",oe(e),se(e,["config","config.userId","config.deviceId"])),getSessionId:ue(e.getSessionId.bind(e),"getSessionId",oe(e),se(e,["config"])),setSessionId:ue(e.setSessionId.bind(e),"setSessionId",oe(e),se(e,["config"])),extendSession:ue(e.extendSession.bind(e),"extendSession",oe(e),se(e,["config"])),setOptOut:ue(e.setOptOut.bind(e),"setOptOut",oe(e),se(e,["config"])),setTransport:ue(e.setTransport.bind(e),"setTransport",oe(e),se(e,["config"])),getIdentity:ue(e.getIdentity.bind(e),"getIdentity",oe(e),se(e,["config"])),setIdentity:ue(e.setIdentity.bind(e),"setIdentity",oe(e),se(e,["config","config.userId","config.deviceId"])),getOptOut:ue(e.getOptOut.bind(e),"getOptOut",oe(e),se(e,["config"])),_setDiagnosticsSampleRate:ue(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",oe(e),se(e,["config"]))}},Ha=Ba(),Va=function(){function e(e){this.amplitude=e,this.videoEl=null,this.embeddedVideoPlayer=null,this.extraEventProperties={},this.listeners=[],this.onRemoveListeners=[]}return e.prototype.withVideoElement=function(e){return this.videoEl=e,this},e.prototype.withEmbeddedPlayer=function(e){return this.embeddedVideoPlayer=e,this},e.prototype.withVendor=function(e){return this.vendor=e,this},e.prototype.withExtraEventProperties=function(e){return this.extraEventProperties=e,this},e.prototype.captureVideoStarted=function(){var e=this;return this.listeners.push(function(t,n){"playing"!==t.playbackState&&"playing"===n.playbackState&&e.amplitude.track("Video Content Started",o(o({},n.lastEvent),e.extraEventProperties))}),this},e.prototype.captureVideoStopped=function(){var e=this;return this.listeners.push(function(t,n){"playing"===t.playbackState&&"playing"!==n.playbackState&&e.amplitude.track("Video Content Stopped",o(o(o({},n.lastEvent),{watch_duration:n.watchTime}),e.extraEventProperties))}),this},e.prototype.start=function(){var e,t=this,n=null!==(e=this.videoEl)&&void 0!==e?e:this.embeddedVideoPlayer;if(!n)throw new Error("Video element not specified. Use withVideoElement() or withEmbeddedPlayer() to specify the video element.");if(this.videoEl&&this.embeddedVideoPlayer)throw new Error("Both video element and embedded video player specified. Use only one of withVideoElement() or withEmbeddedPlayer() to specify the video element.");var r=new qn({videoEl:n,onStateChange:function(e,n){t.listeners.forEach(function(t){return t(e,n)})},vendor:this.vendor,isEmbedded:!!this.embeddedVideoPlayer});return this.onRemoveListeners.push(function(){r.destroy()}),this},e.prototype.stop=function(){this.onRemoveListeners.forEach(function(e){return e()}),this.onRemoveListeners=[]},e}();var za=Ha.add,Wa=Ha.extendSession,$a=Ha.flush,Ka=Ha.getDeviceId,Ja=Ha.getIdentity,Ga=Ha.getOptOut,Ya=Ha.getSessionId,Xa=Ha.getUserId,Qa=Ha.groupIdentify,Za=Ha.identify,es=Ha.init,ts=Ha.logEvent,ns=Ha.remove,rs=Ha.reset,is=Ha.revenue,os=Ha.setDeviceId,as=Ha.setGroup,ss=Ha.setIdentity,us=Ha.setOptOut,cs=Ha.setSessionId,ls=Ha.setTransport,ds=Ha.setUserId,fs=Ha.track,vs=Ha._setDiagnosticsSampleRate,ps=Object.freeze({__proto__:null,add:za,extendSession:Wa,flush:$a,getDeviceId:Ka,getIdentity:Ja,getOptOut:Ga,getSessionId:Ya,getUserId:Xa,groupIdentify:Qa,identify:Za,init:es,logEvent:ts,remove:ns,reset:rs,revenue:is,setDeviceId:os,setGroup:as,setIdentity:ss,setOptOut:us,setSessionId:cs,setTransport:ls,setUserId:ds,track:fs,_setDiagnosticsSampleRate:vs,createInstance:Ba,AmplitudeBrowser:Fa,runQueuedFunctions:Zn,Revenue:J,Identify:M,trackVideo:function(e,t,n){var r;void 0===n&&(n={});var i=new Va(e);t instanceof HTMLVideoElement?i.withVideoElement(t):i.withEmbeddedPlayer(t),n.vendor&&i.withVendor(n.vendor);var a=null!==(r=n.extraEventProperties)&&void 0!==r?r:{};try{i.withExtraEventProperties(o({view_session_id:V()},a)).captureVideoStarted().captureVideoStopped().start()}catch(e){return e}return function(){return i.stop()}},Types:Ar});!function(e){if(e.scriptUrl){var t=Ge(e.scriptUrl);t&&function(e){var t=B();if(t){var n=Ke();n.includes(e)||(n.push(e),t[$e]=n)}}(t)}}({scriptUrl:function(){if("undefined"==typeof document)return;var e=document.currentScript;if(null==e?void 0:e.src)return e.src;return}()}),function(){var e=B();if(e){var t=function(e){var t=Ba(),n=B();return n&&n.amplitude&&n.amplitude._iq&&e&&(n.amplitude._iq[e]=t),t};if(e.amplitude=Object.assign(e.amplitude||{},ps,{createInstance:t}),e.amplitude.invoked){var n=e.amplitude._q;e.amplitude._q=[],Zn(ps,n);for(var r=Object.keys(e.amplitude._iq)||[],i=0;i<r.length;i++){var o=r[i],a=Object.assign(e.amplitude._iq[o],t(o)),s=a._q;a._q=[],Zn(a,s)}}}else console.error("[Amplitude] Error: GlobalScope is not defined")}()}();
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amplitude={})}(this,function(e){"use strict";function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i,o,s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function u(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})}function c(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function l(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function f(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError,function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(i||(i={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(o||(o={}));var v,p="AMP",h="".concat(p,"_unsent"),g="$default_instance",m="https://api2.amplitude.com/2/httpapi",y="https://api.eu.amplitude.com/2/httpapi",b="https://api2.amplitude.com/batch",w="https://api.eu.amplitude.com/batch",E="dclid",S="fbclid",k="gbraid",T="gclid",P="ko_click_id",x="li_fat_id",I="msclkid",A="rdt_cid",_="ttclid",O="twclid",C="wbraid",R={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},L=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],D=["authorization","cookie","set-cookie"],N=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!M(t,n))return!1}return!0},M=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=l(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"==typeof a)i=i&&N(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return N(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},j=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return s({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(v.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(v.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(v.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(v.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(v.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(v.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(v.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(v.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(v.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[v.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[v.CLEAR_ALL]&&(!this._propertySet.has(t)&&(e===v.ADD?"number"==typeof n:e===v.UNSET||e===v.REMOVE||M(t,n)))},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(v||(v={}));var U,F=[v.CLEAR_ALL,v.UNSET,v.SET,v.SET_ONCE,v.ADD,v.APPEND,v.PREPEND,v.PREINSERT,v.POSTINSERT,v.REMOVE];!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(U||(U={}));var q,B=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=U.Unknown),{event:e,code:t,message:n}},H=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},V=f([],d(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),z=function(e){var t,n=H();if(!(null===(t=null==n?void 0:n.crypto)||void 0===t?void 0:t.getRandomValues))return function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,z)}(e);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,f([],d(r.entries()),!1).map(function(e){var t=d(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?"-".concat(V[r]):V[r]}).join("")},W=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[],this.pluginStatus=new Map,this._optOutListeners=[]}return e.prototype.register=function(e,t){var n,r;return u(this,void 0,void 0,function(){var i;return c(this,function(o){switch(o.label){case 0:return void 0===e.name&&(e.name=z(),this.loggerProvider.warn("Plugin name is undefined.\n Generating a random UUID for plugin name: ".concat(e.name,".\n Set a name for the plugin to prevent it from being added multiple times."))),i=e.name,this.pluginStatus.has(i)?(this.loggerProvider.warn("Plugin with name ".concat(i," already exists, skipping registration")),[2]):(e.type=null!==(n=e.type)&&void 0!==n?n:"enrichment",this.pluginStatus.set(i,"locked"),[4,null===(r=e.setup)||void 0===r?void 0:r.call(e,t,this.client)]);case 1:return o.sent(),"locked"!==this.pluginStatus.get(i)?[2]:(this.plugins.push(e),this.pluginStatus.set(i,"installed"),[2])}})})},e.prototype.deregister=function(e,t){var n;return u(this,void 0,void 0,function(){var r,i;return c(this,function(o){switch(o.label){case 0:return this.pluginStatus.delete(e),r=this.plugins.findIndex(function(t){return t.name===e}),-1===r?(t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(i=this.plugins[r],this.plugins.splice(r,1),[4,null===(n=i.teardown)||void 0===n?void 0:n.call(i)]);case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this._clearOptOutListeners(),this.applying=!1,this.plugins.map(function(e){var t;return null===(t=e.teardown)||void 0===t?void 0:t.call(e)}),this.plugins=[],this.pluginStatus.clear(),this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return u(this,void 0,void 0,function(){var t,n,r,i,o,a,u,f,v,p,h,g,m,y,b,w,E,S,k,T;return c(this,function(c){switch(c.label){case 0:if(!e)return[2];t=d(e,1),n=t[0],r=d(e,2),i=r[1],this.loggerProvider.log("Timeline.apply: Initial event",n),o=this.plugins.filter(function(e){return"before"===e.type}),c.label=1;case 1:c.trys.push([1,6,7,8]),a=l(o),u=a.next(),c.label=2;case 2:return u.done?[3,5]:(g=u.value).execute?[4,g.execute(s({},n))]:[3,4];case 3:if(null===(m=c.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),i({event:n,code:0,message:""}),[2];n=m,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),c.label=4;case 4:return u=a.next(),[3,2];case 5:return[3,8];case 6:return f=c.sent(),E={error:f},[3,8];case 7:try{u&&!u.done&&(S=a.return)&&S.call(a)}finally{if(E)throw E.error}return[7];case 8:v=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),c.label=9;case 9:c.trys.push([9,14,15,16]),p=l(v),h=p.next(),c.label=10;case 10:return h.done?[3,13]:(g=h.value).execute?[4,g.execute(s({},n))]:[3,12];case 11:if(null===(m=c.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),i({event:n,code:0,message:""}),[2];n=m,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),c.label=12;case 12:return h=p.next(),[3,10];case 13:return[3,16];case 14:return y=c.sent(),k={error:y},[3,16];case 15:try{h&&!h.done&&(T=p.return)&&T.call(p)}finally{if(k)throw k.error}return[7];case 16:return b=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(n))),w=b.map(function(e){var t=s({},n);return e.execute(t).catch(function(e){return B(t,0,String(e))})}),Promise.all(w).then(function(e){var t=d(e,1)[0]||B(n,100,"Event not tracked, no destination plugins on the instance");i(t)}),[2]}})})},e.prototype.flush=function(){return u(this,void 0,void 0,function(){var e,t,n,r=this;return c(this,function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return r.apply(e)}))];case 1:return i.sent(),t=this.plugins.filter(function(e){return"destination"===e.type}),n=t.map(function(e){return e.flush&&e.flush()}),[4,Promise.all(n)];case 2:return i.sent(),[2]}})})},e.prototype.addOptOutListener=function(e){this._optOutListeners.push(e)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onIdentityChanged)||void 0===n||n.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onSessionIdChanged)||void 0===n||n.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onOptOutChanged)||void 0===n||n.call(t,e)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return u(this,void 0,void 0,function(){var t,n,r,i,o,s,a;return c(this,function(u){switch(u.label){case 0:u.trys.push([0,7,8,9]),t=l(this._optOutListeners),n=t.next(),u.label=1;case 1:if(n.done)return[3,6];r=n.value,u.label=2;case 2:return u.trys.push([2,4,,5]),[4,r(e)];case 3:return u.sent(),[3,5];case 4:return i=u.sent(),this.loggerProvider.error("Error calling optOut listener",i),[3,5];case 5:return n=t.next(),[3,1];case 6:return[3,9];case 7:return o=u.sent(),s={error:o},[3,9];case 8:try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(s)throw s.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null===(t=e.onReset)||void 0===t||t.call(e)})},e}(),$=function(e,t){return s(s({},t),{event_type:o.IDENTIFY,user_properties:e.getUserProperties()})},K=function(e){return{promise:e||Promise.resolve()}},J=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new W(this),this.name=e}return e.prototype._init=function(e){return u(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return u(this,void 0,void 0,function(){var t,n,r,i,o,s,a,u;return c(this,function(c){switch(c.label){case 0:t=this[e],this[e]=[],c.label=1;case 1:c.trys.push([1,8,9,10]),n=l(t),r=n.next(),c.label=2;case 2:return r.done?[3,7]:(i=r.value,(o=i())&&"promise"in o?[4,o.promise]:[3,4]);case 3:return c.sent(),[3,6];case 4:return[4,o];case 5:c.sent(),c.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return s=c.sent(),a={error:s},[3,10];case 9:try{r&&!r.done&&(u=n.return)&&u.call(n)}finally{if(a)throw a.error}return[7];case 10:return this[e].length?[4,this.runQueuedFunctions(e)]:[3,12];case 11:c.sent(),c.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=function(e,t,n){return s(s(s({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),K(this.dispatch(r))},e.prototype.identify=function(e,t){var n=$(e,t);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),K(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=function(e,t,n,r){var i;return s(s({},r),{event_type:o.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)})}(e,t,n,r);return K(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=function(e,t,n){var r,i=new j;return i.set(e,t),s(s({},n),{event_type:o.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)})}(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),K(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=function(e,t){return s(s({},t),{event_type:o.REVENUE,event_properties:e.getEventProperties()})}(e,t);return K(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),K())},e.prototype._addPlugin=function(e){return K(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),K())},e.prototype._removePlugin=function(e){return K(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(B(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return u(this,void 0,void 0,function(){var t=this;return c(this,function(n){return this.isReady?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t,n=null!==(t=this.userProperties)&&void 0!==t?t:{},r=s({},n);if(void 0===e)return r;var o={};return Object.keys(e).forEach(function(t){Object.values(i).includes(t)||(o[t]=e[t])}),F.forEach(function(t){if(Object.keys(e).includes(t)){var n=e[t];switch(t){case i.CLEAR_ALL:Object.keys(r).forEach(function(e){delete r[e]});break;case i.UNSET:Object.keys(n).forEach(function(e){delete r[e]});break;case i.SET:Object.assign(r,n)}}}),Object.assign(r,o),r},e.prototype.process=function(e){return u(this,void 0,void 0,function(){var t,n,r;return c(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.config.optOut?[2,B(e,0,"Event skipped due to optOut config")]:(e.event_type===o.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)]);case 1:return 200===(r=i.sent()).code?this.config.loggerProvider.log(r.message):100===r.code?this.config.loggerProvider.warn(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=i.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=B(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,Boolean(e)))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=Boolean(e),this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return K(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});if(void 0!==t)return t;this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e))},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),G=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){try{var t=JSON.parse(JSON.stringify(e));N(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?s({},this.properties):{};return e[q.REVENUE_PRODUCT_ID]=this.productId,e[q.REVENUE_QUANTITY]=this.quantity,e[q.REVENUE_PRICE]=this.price,e[q.REVENUE_TYPE]=this.revenueType,e[q.REVENUE_CURRENCY]=this.currency,e[q.REVENUE]=this.revenue,e[q.RECEIPT]=this.receipt,e[q.RECEIPT_SIG]=this.receiptSig,e},e}();!function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"}(q||(q={}));var Y;!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(Y||(Y={}));var X="Amplitude Logger ",Q=function(){function e(){this.logLevel=Y.None}return e.prototype.disable=function(){this.logLevel=Y.None},e.prototype.enable=function(e){void 0===e&&(e=Y.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<Y.Verbose||console.log("".concat(X,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<Y.Warn||console.warn("".concat(X,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<Y.Error||console.error("".concat(X,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<Y.Debug||console.log("".concat(X,"[Debug]: ").concat(e.join(" ")))},e}(),Z=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:g,logLevel:Y.Warn,loggerProvider:new Q,offline:!1,optOut:!1,serverUrl:m,serverZone:"US",useBatch:!1}},ee=function(){function e(e){var t,n,r,i;this._optOut=!1;var o=Z();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(n=e.logLevel)&&void 0!==n?n:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(r=e.optOut)&&void 0!==r?r:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(i=e.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var s=ne(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=s.serverZone,this.serverUrl=s.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),te=function(e,t){return"EU"===e?t?w:y:t?b:m},ne=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Z().serverZone),void 0===n&&(n=Z().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=["US","EU"].includes(t)?t:Z().serverZone;return{serverZone:r,serverUrl:te(r,n)}},re=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function ie(e){return e>=200&&e<300}var oe=function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},se=function(e){return function(){var t=s({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},ae=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=l(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},ue=function(e,t){return function(){var n,r,i={};try{for(var o=l(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=ae(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},ce=function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),u=a.logger,c=a.logLevel;if(c&&c<Y.Debug||!c||!u)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:oe(1),time:{start:(new Date).toISOString()},states:{}};r&&l.states&&(l.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=(new Date).toISOString()),u.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=(new Date).toISOString()),u.debug(JSON.stringify(l,null,2))),d}},le=new Set([m,y,b,w]);function de(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var fe=function(){function e(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return u(this,void 0,void 0,function(){var n,r=this;return c(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(h,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return(n=i.sent())&&n.length>0&&Promise.all(n.map(function(e){return r.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=z()),new Promise(function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.queue.push(r),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline)return null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout?(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,void(this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e))):void 0},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),u(this,void 0,void 0,function(){var t,n,r=this;return c(this,function(i){switch(i.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),o=t,s=this.config.flushQueueSize,a=Math.max(s,1),[4,o.reduce(function(e,t,n){var r=Math.floor(n/a);return e[r]||(e[r]=[]),e[r].push(t),e},[]).reduce(function(t,n){return u(r,void 0,void 0,function(){return c(this,function(r){switch(r.label){case 0:return[4,t];case 1:return r.sent(),[4,this.send(n,e)];case 2:return[2,r.sent()]}})})},Promise.resolve())]);case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}var o,s,a})})},e.prototype.send=function(e,t){var n;return void 0===t&&(t=!0),u(this,void 0,void 0,function(){var r,i,o,s,u,l;return c(this,function(c){switch(c.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,a(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:(new Date).toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new re,c.label=1;case 1:return c.trys.push([1,3,,4]),i=ne(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,o=function(e,t){return void 0===t&&(t=!1),!!le.has(e)||t}(i,this.config.enableRequestBodyCompression),[4,this.config.transportProvider.send(i,r,o)];case 2:return null===(s=c.sent())?(this.fulfillRequest(e,0,"Unexpected error occurred"),[2]):t?(this.handleResponse(s,e),[3,4]):("body"in s?this.fulfillRequest(e,s.statusCode,"".concat(s.status,": ").concat(de(s))):this.fulfillRequest(e,s.statusCode,s.status),[2]);case 3:return u=c.sent(),l=(d=u)instanceof Error?d.message:String(d),this.config.loggerProvider.error(l),null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:l,stack_trace:oe()}),this.handleResponse({status:U.Failed,statusCode:0},e),[3,4];case 4:return[2]}var d})})},e.prototype.handleResponse=function(e,t){var n;ie(e.statusCode)||null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:de(e),stack_trace:oe()});var r=e.status;switch(r){case U.Success:this.handleSuccessResponse(e,t);break;case U.Invalid:this.handleInvalidResponse(e,t);break;case U.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case U.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(r,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=f(f(f(f([],d(Object.values(e.body.eventsWithInvalidFields)),!1),d(Object.values(e.body.eventsWithMissingFields)),!1),d(Object.values(e.body.eventsWithInvalidIdLengths)),!1),d(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter(function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)});o.length>0&&this.config.loggerProvider.warn(de(e));var s=this.removeEventsExceedFlushMaxRetries(o);this.scheduleEvents(s)}},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1!==t.length){this.config.loggerProvider.warn(de(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)}else this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),u=new Set(o),c=t.filter(function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)});c.length>0&&this.config.loggerProvider.warn(de(e));var l=this.removeEventsExceedFlushMaxRetries(c);this.scheduleEvents(l)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.fulfillRequest=function(e,t,n){var r,i,o;ie(t)?null===(o=this.diagnosticsClient)||void 0===o||o.increment("analytics.events.sent",e.length):(null===(r=this.diagnosticsClient)||void 0===r||r.increment("analytics.events.dropped",e.length),null===(i=this.diagnosticsClient)||void 0===i||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:n,stack_trace:oe()})),this.removeEvents(e),e.forEach(function(e){return e.callback(B(e.event,t,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),ve=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:pe(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),pe=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},he=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),ge=function(){return ge=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ge.apply(this,arguments)};function me(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ye(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}"function"==typeof SuppressedError&&SuppressedError;var be=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var o=me(["string","number","boolean","undefined"]),s=o.next();!s.done;s=o.next()){if(s.value===i)return e===t}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var a=Array.isArray(e),u=Array.isArray(t);if(a!==u)return!1;if(!a||!u){var c=Object.keys(e).sort(),l=Object.keys(t).sort();if(!be(c,l))return!1;var d=!0;return Object.keys(e).forEach(function(n){be(e[n],t[n])||(d=!1)}),d}for(var f=0;f<e.length;f++)if(!be(e[f],t[f]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var we=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=ge({},this.identity.userProperties),n=ge(ge({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,s,a,u=n.userProperties||{};try{for(var c=me(Object.entries(e)),l=c.next();!l.done;l=c.next()){var d=ye(l.value,2),f=d[0],v=d[1];switch(f){case"$set":try{for(var p=(i=void 0,me(Object.entries(v))),h=p.next();!h.done;h=p.next()){var g=ye(h.value,2),m=g[0],y=g[1];u[m]=y}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(s=void 0,me(Object.keys(v))),w=b.next();!w.done;w=b.next()){delete u[m=w.value]}}catch(e){s={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return n.userProperties=u,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return ge({},this.identity)},e.prototype.setIdentity=function(e){var t=ge({},this.identity);this.identity=ge({},e),be(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),Ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,Se=function(){function e(){this.identityStore=new we,this.eventBridge=new he,this.applicationContextProvider=new ve}return e.getInstance=function(t){return Ee.analyticsConnectorInstances||(Ee.analyticsConnectorInstances={}),Ee.analyticsConnectorInstances[t]||(Ee.analyticsConnectorInstances[t]=new e),Ee.analyticsConnectorInstances[t]},e}(),ke=function(e){return void 0===e&&(e=g),Se.getInstance(e)},Te=function(){function e(){this.name="identity",this.type="before",this.identityStore=ke().identityStore}return e.prototype.execute=function(e){return u(this,void 0,void 0,function(){var t;return c(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return u(this,void 0,void 0,function(){return c(this,function(t){return e.instanceName&&(this.identityStore=ke(e.instanceName).identityStore),[2]})})},e}(),Pe=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},xe=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[p,t,e.substring(0,n)].filter(Boolean).join("_")},Ie=function(){var e,t,n,r;if("undefined"==typeof navigator)return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""},Ae=function(){var e,t=H();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var n=t.split("=",2),r=_e(n[0]),i=_e(n[1]);return i?(e[r]=i,e):e},{}):{}},_e=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},Oe=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},Ce=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return n},Re=function(e,t){var n=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}(e.toString());return 31*Math.abs(n)%1e5/1e5<t},Le=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},De=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return u(this,void 0,void 0,function(){return c(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return u(this,void 0,void 0,function(){return c(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return u(this,void 0,void 0,function(){var t;return c(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return u(this,void 0,void 0,function(){return c(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return u(this,void 0,void 0,function(){return c(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return u(this,void 0,void 0,function(){return c(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),Ne=function(){function e(e,t){void 0===t&&(t={}),this.options=s({},e),this.config=t}return e.prototype.isEnabled=function(){return u(this,void 0,void 0,function(){var t,n,r,i,o=this;return c(this,function(a){switch(a.label){case 0:return t="AMP_TEST",n=s({},this.options),r=new e(n),i=String(Date.now()),[4,r.transaction(t,function(e){var n,r;try{e.set(i);var s=e.get()===i;return!s&&o.config.diagnosticsClient&&(null===(n=o.config.diagnosticsClient)||void 0===n||n.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:t,testValue:i,sync:!0})),s}catch(e){if(o.config.diagnosticsClient){var a=e instanceof Error?e.message:String(e);null===(r=o.config.diagnosticsClient)||void 0===r||r.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:t,testValue:i,error:a,sync:!0})}return!1}finally{e.set(null)}})];case 1:return[2,a.sent()]}})})},e.prototype.get=function(e){return u(this,void 0,void 0,function(){var t;return c(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:return t=n.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var n=Me(t);return void 0===n?void console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t)):JSON.parse(n)}catch(n){return void console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(t))}},e.prototype.getSync=function(e){var t=this.getRawSync(e);return this.decodeCookieValue(e,t)},e.prototype.getRaw=function(e){var t,n;return u(this,void 0,void 0,function(){var r,i,o,s,a,u,d,f,v;return c(this,function(c){switch(c.label){case 0:r=H(),i=r,c.label=1;case 1:return c.trys.push([1,4,,5]),(o=null==i?void 0:i.cookieStore)?[4,o.getAll(e)]:[3,3];case 2:if(s=c.sent()){s.length>1&&(null===(t=this.config.diagnosticsClient)||void 0===t||t.recordEvent("cookies.duplicate",{cookies:s.map(function(e){return e.domain})}),null===(n=this.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.cookieStore"));try{for(a=l(s),u=a.next();!u.done;u=a.next())if(d=u.value,je(d.domain,this.options.domain))return[2,d.value]}catch(e){f={error:e}}finally{try{u&&!u.done&&(v=a.return)&&v.call(a)}finally{if(f)throw f.error}}}c.label=3;case 3:return[3,5];case 4:return c.sent(),[3,5];case 5:return[2,this.getRawSync(e)]}})})},e.prototype.getRawSync=function(e){var t,n,r=this,i=H(),o=(null!==(n=null===(t=null==i?void 0:i.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==n?n:[]).filter(function(t){return 0===t.indexOf(e+"=")}),s=void 0,a=this.config.duplicateResolverFn;if("function"==typeof a&&o.length>1&&(s=o.find(function(t){var n;try{var i=a(t.substring(e.length+1));return i||null===(n=r.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.document.cookie"),i}catch(e){return!1}})),s||(s=o[0]),s)return s.substring(e.length+1)},e.prototype.set=function(e,t){return u(this,void 0,void 0,function(){return c(this,function(n){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var n;try{var r=H();if(!r||!r.document||"function"!=typeof r.btoa||"function"!=typeof r.encodeURIComponent)return;var i=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=null!==t?i:-1,s=void 0;if(o){var a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3),s=a}var u="".concat(e,"=").concat(r.btoa(r.encodeURIComponent(JSON.stringify(t))));s&&(u+="; expires=".concat(s.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),r.document.cookie=u}catch(t){var c=t instanceof Error?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}},e.prototype.remove=function(e){return u(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return u(this,void 0,void 0,function(){return c(this,function(e){return[2]})})},e.isDomainWritable=function(t){return u(this,void 0,void 0,function(){var n,r;return c(this,function(i){switch(i.label){case 0:if(e.cachedTlds[t])return[2,!0];n="AMP_TLDTEST",r=new e({domain:"."+t}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.transaction(n,function(n){if(e.cachedTlds[t])return!0;try{n.set(1);var r=!!n.get();return r&&(e.cachedTlds[t]=!0),r}finally{n.set(null)}})];case 2:return[2,!!i.sent()];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return u(this,void 0,void 0,function(){var n,r,i=this;return c(this,function(o){switch(o.label){case 0:if(n=function(){var e,t=H();return null===(e=null==t?void 0:t.navigator)||void 0===e?void 0:e.locks}(),r=function(){return t({get:function(){return i.getSync(e)},set:function(t){return i.setSync(e,t)}})},!n)return[2,r()];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.request("com.amplitude:cookie-lock:".concat(e),r)];case 2:return[2,o.sent()];case 3:return o.sent(),[2,r()];case 4:return[2]}})})},e.cachedTlds={},e}(),Me=function(e){var t;return null!==(t=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}}(e))&&void 0!==t?t:function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}}(e)},je=function(e,t){if(""===e&&""===t)return!0;if(!e||!t)return!1;var n=e.startsWith(".")?e.substring(1):e,r=t.startsWith(".")?t.substring(1):t;return n.toLowerCase()===r.toLowerCase()},Ue=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[p,t,e.substring(0,n)].filter(Boolean).join("_")},Fe=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return u(this,void 0,void 0,function(){var t,n,r;return c(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return u(this,void 0,void 0,function(){var t;return c(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return u(this,void 0,void 0,function(){return c(this,function(n){return[2,(null===(t=this.storage)||void 0===t?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var n;return u(this,void 0,void 0,function(){return c(this,function(r){try{null===(n=this.storage)||void 0===n||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return u(this,void 0,void 0,function(){return c(this,function(n){try{null===(t=this.storage)||void 0===t||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return u(this,void 0,void 0,function(){return c(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}(),qe="tags",Be="counters",He="histograms",Ve="events",ze="internal",We="last_flush_timestamp",$e=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return void 0!==(null===(e=H())||void 0===e?void 0:e.indexedDB)},e.prototype.getDB=function(){return u(this,void 0,void 0,function(){return c(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onerror=function(){e.dbPromise=null,n(new Error("Failed to open IndexedDB"))},r.onsuccess=function(){var n=r.result;n.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},n.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),n.close()},t(n)},r.onupgradeneeded=function(t){var n=t.target.result;e.createTables(n)}})},e.prototype.createTables=function(e){(e.objectStoreNames.contains(qe)||e.createObjectStore(qe,{keyPath:"key"}),e.objectStoreNames.contains(Be)||e.createObjectStore(Be,{keyPath:"key"}),e.objectStoreNames.contains(He)||e.createObjectStore(He,{keyPath:"key"}),e.objectStoreNames.contains(Ve))||e.createObjectStore(Ve,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1});e.objectStoreNames.contains(ze)||e.createObjectStore(ze,{keyPath:"key"})},e.prototype.setTags=function(e){return u(this,void 0,void 0,function(){var t,n,r,i,o=this;return c(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([qe],"readwrite"),r=n.objectStore(qe),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tags",e),t()},i.forEach(function(e){var t=d(e,2),n=t[0],i=t[1];r.put({key:n,value:i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tag",n,i,e)}})})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",i),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return u(this,void 0,void 0,function(){var t,n,r,i,o=this;return c(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([Be],"readwrite"),r=n.objectStore(Be),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to increment counters",e),t()},i.forEach(function(e){var t=d(e,2),n=t[0],i=t[1],s=r.get(n);s.onsuccess=function(){var e=s.result,t=e?e.value:0;r.put({key:n,value:t+i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to update counter",n,e)}},s.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,e)}})})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",i),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return u(this,void 0,void 0,function(){var t,n,r,i,o=this;return c(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([He],"readwrite"),r=n.objectStore(He),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),t()},i.forEach(function(e){var t=d(e,2),n=t[0],i=t[1],s=r.get(n);s.onsuccess=function(){var e,t=s.result;e=t?{key:n,count:t.count+i.count,min:Math.min(t.min,i.min),max:Math.max(t.max,i.max),sum:t.sum+i.sum}:{key:n,count:i.count,min:i.min,max:i.max,sum:i.sum},r.put(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,e)}},s.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,e)}})})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",i),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return u(this,void 0,void 0,function(){var t,n,r,i,o=this;return c(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===e.length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([Ve],"readwrite"),r=n.objectStore(Ve),[2,new Promise(function(t){n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event records",e),t()};var i=r.count();i.onsuccess=function(){var t=i.result,n=Math.max(0,10-t);n<e.length&&o.logger.debug("DiagnosticsStorage: Only added ".concat(n," of ").concat(e.length," events due to storage limit")),e.slice(0,n).forEach(function(e){r.add(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},i.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",i),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return u(this,void 0,void 0,function(){var n,r,i,o;return c(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=s.sent(),r=n.transaction([ze],"readwrite"),i=r.objectStore(ze),[2,new Promise(function(n,o){r.onabort=function(){return o(new Error("Failed to set internal value"))};var s=i.put({key:e,value:t});s.onsuccess=function(){return n()},s.onerror=function(){return o(new Error("Failed to set internal value"))}})];case 2:return o=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",o),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return u(this,void 0,void 0,function(){var t,n,r,i;return c(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=o.sent(),n=t.transaction([ze],"readonly"),r=n.objectStore(ze),[2,new Promise(function(t,i){n.onabort=function(){return i(new Error("Failed to get internal value"))};var o=r.get(e);o.onsuccess=function(){return t(o.result)},o.onerror=function(){return i(new Error("Failed to get internal value"))}})];case 2:return i=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",i),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return u(this,void 0,void 0,function(){var e,t;return c(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getInternal(We)];case 1:return[2,(e=n.sent())?parseInt(e.value,10):void 0];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return u(this,void 0,void 0,function(){var t;return c(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.setInternal(We,e.toString())];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).clear();i.onsuccess=function(){return n()},i.onerror=function(){return r(new Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return u(this,void 0,void 0,function(){var e,t,n,r,i,o,s,a;return c(this,function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=u.sent(),t=e.transaction([qe,Be,He,Ve],"readwrite"),[4,Promise.all([this.getAllFromStore(t,qe),this.getAllFromStore(t,Be),this.getAllFromStore(t,He),this.getAllFromStore(t,Ve)])];case 2:return n=d.apply(void 0,[u.sent(),4]),r=n[0],i=n[1],o=n[2],s=n[3],[4,Promise.all([this.clearTable(t,Be),this.clearTable(t,He),this.clearTable(t,Ve)])];case 3:return u.sent(),[2,{tags:r,counters:i,histogramStats:o,events:s}];case 4:return a=u.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",a),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).getAll();i.onsuccess=function(){return n(i.result)},i.onerror=function(){return r(new Error("Failed to get all from ".concat(t)))}})},e}(),Ke=function(e){var t,n,r=function(){var e=H();if(!e)return[];var t=e.__AMPLITUDE_SCRIPT_URL__;return Array.isArray(t)?t:"string"==typeof t?[t]:[]}();if(0!==r.length)try{for(var i=l(r),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.filename&&e.filename.includes(s))return"filename";if(e.stack&&e.stack.includes(s))return"stack"}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},Je=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},Ge=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}},Ye=3e5,Xe=1e4,Qe=function(){function e(e,t,n,r){void 0===n&&(n="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl="US"===n?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(r,null,2)),this.config=s({enabled:!0,sampleRate:0},r),this.startTimestamp=Date.now(),this.shouldTrack=Re(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,$e.isSupported()?this.storage=new $e(e,t):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),function(e){var t=H();if(t&&"function"==typeof t.addEventListener){var n=function(t){e.recordEvent("sdk.error.uncaught",s({type:t.type,message:t.message,filename:t.filename,error_name:t.errorName,stack:t.stack},t.metadata))};t.addEventListener("error",function(e){var t=e.error instanceof Error?e.error:void 0,r=null==t?void 0:t.stack,i=Ke({filename:e.filename,stack:r});i&&n({type:"error",message:e.message,stack:r,filename:e.filename,errorName:null==t?void 0:t.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:i}})},!0),t.addEventListener("unhandledrejection",function(e){var t,r=e.reason instanceof Error?e.reason:void 0,i=null==r?void 0:r.stack,o=Je(i),s=Ke({filename:o,stack:i});s&&n({type:"unhandledrejection",message:null!==(t=null==r?void 0:r.message)&&void 0!==t?t:Ge(e.reason),stack:i,filename:o,errorName:null==r?void 0:r.name,metadata:{isTrusted:e.isTrusted,matchReason:s}})},!0)}}(this))}return e.prototype.isStorageAndTrackEnabled=function(){return Boolean(this.storage)&&Boolean(this.shouldTrack)},e.prototype.setTag=function(e,t){this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryTags).length>=Xe?this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit"):(this.inMemoryTags[e]=t,this.startTimersIfNeeded()))},e.prototype.increment=function(e,t){void 0===t&&(t=1),this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryCounters).length>=Xe?this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit"):(this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()))},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled())if(Object.keys(this.inMemoryHistograms).length>=Xe)this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");else{var n=this.inMemoryHistograms[e];n?(n.count+=1,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){this.isStorageAndTrackEnabled()&&(this.inMemoryEvents.length>=10?this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit"):(this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()))},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},Ye))},e.prototype.saveAllDataToStorage=function(){return u(this,void 0,void 0,function(){var e,t,n,r;return c(this,function(i){switch(i.label){case 0:return this.storage?(e=s({},this.inMemoryTags),t=s({},this.inMemoryCounters),n=s({},this.inMemoryHistograms),r=f([],d(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(t),this.storage.setHistogramStats(n),this.storage.addEventRecords(r)])]):[2];case 1:return i.sent(),[2]}})})},e.prototype._flush=function(){return u(this,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u,l;return c(this,function(c){switch(c.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return c.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return e=c.sent(),t=e.tags,n=e.counters,r=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),s={},n.forEach(function(e){s[e.key]=e.value}),a={},r.forEach(function(e){a[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),u=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(s).length&&0===Object.keys(a).length&&0===u.length?[2]:(l={tags:o,histogram:a,counters:s,events:u},this.fetch(l),[2])}})})},e.prototype.fetch=function(e){return u(this,void 0,void 0,function(){var t;return c(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),!H())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:return n.sent().ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return t=n.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return u(this,void 0,void 0,function(){var e,t,n;return c(this,function(r){switch(r.label){case 0:return this.storage?(e=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return-1===(t=r.sent()||-1)?(this.storage.setLastFlushTimestamp(e),this._setFlushTimer(Ye),[2]):(n=e-t)>=Ye?(this._flush(),[2]):(this._setFlushTimer(Ye-n),[2])}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=Re(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),Ze=function(){function e(){}return e.prototype.send=function(e,t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,s,a,u,c,l,d,f,v,p,h,g,m,y,b,w,E,S;if("object"!=typeof e)return null;var k=e.code||0,T=this.buildStatus(k);switch(T){case U.Success:return{status:T,statusCode:k,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case U.Invalid:return{status:T,statusCode:k,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(l=e.exceeded_daily_quota_devices)&&void 0!==l?l:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(f=e.silenced_events)&&void 0!==f?f:[],throttledDevices:null!==(v=e.throttled_devices)&&void 0!==v?v:{},throttledEvents:null!==(p=e.throttled_events)&&void 0!==p?p:[]}};case U.PayloadTooLarge:return{status:T,statusCode:k,body:{error:null!==(h=e.error)&&void 0!==h?h:""}};case U.RateLimit:return{status:T,statusCode:k,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(y=e.throttled_devices)&&void 0!==y?y:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(E=e.exceeded_daily_quota_users)&&void 0!==E?E:{},throttledEvents:null!==(S=e.throttled_events)&&void 0!==S?S:[]}};case U.Timeout:default:return{status:T,statusCode:k}}},e.prototype.buildStatus=function(e){return ie(e)?U.Success:429===e?U.RateLimit:413===e?U.PayloadTooLarge:408===e?U.Timeout:e>=400&&e<500?U.Invalid:e>=500?U.Failed:U.Unknown},e}();function et(){return"undefined"!=typeof CompressionStream}function tt(e){return u(this,void 0,void 0,function(){var t,n;return c(this,function(r){switch(r.label){case 0:if(void 0===(t=CompressionStream))return[2,void 0];r.label=1;case 1:return r.trys.push([1,3,,4]),n=new Blob([e]).stream().pipeThrough(new t("gzip")),[4,new Response(n).arrayBuffer()];case 2:return[2,r.sent()];case 3:return r.sent(),[2,void 0];case 4:return[2]}})})}var nt=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var n=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(n))),Promise.resolve({remoteConfig:n.remoteConfig,lastFetch:new Date(n.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}();var rt=401,it=403,ot=429,st=function(){function e(e,t,n,r,i){void 0===n&&(n="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=e,this.serverUrl=r||("US"===n?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new nt(e,t),this.customFetch=i}return e.prototype.subscribe=function(e,t,n){var r=z(),i={id:r,key:e,deliveryMode:t,callback:n};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),r},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return-1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return u(this,void 0,void 0,function(){var e,t=this;return c(this,function(n){switch(n.label){case 0:return this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5?(this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2]):[4,this.getOrCreateFetchPromise()];case 1:return e=n.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(n){t.sendCallback(n,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise?this.fetchPromise:this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null}),this.fetchPromise):(this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null}),this.fetchPromise)},e.prototype.subscribeAll=function(e){return u(this,void 0,void 0,function(){var t,n,r,i=this;return c(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),n=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,n])];case 1:return void 0!==(r=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(r))),null!==r.remoteConfig?this.sendCallback(e,r,"cache"):this.logger.debug("Remote config client skips sending callback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return u(this,void 0,void 0,function(){var n,r;return c(this,function(i){switch(i.label){case 0:n=new Promise(function(e,n){setTimeout(function(){n("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),n])];case 2:return r=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,r,"remote"),this.storage.setConfig(r),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(r=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,r,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,r,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,n){var r;e.lastCallback=new Date,r=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(r,n,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),u(this,void 0,void 0,function(){var n,r,i,o,s,a,u=this;return c(this,function(l){switch(l.label){case 0:n=t/e,r={remoteConfig:null,lastFetch:new Date},i=function(r){var i,s,a,l,d,f,v,p,h;return c(this,function(c){switch(c.label){case 0:i=!0,s=new AbortController,a=setTimeout(function(){return s.abort()},t),c.label=1;case 1:return c.trys.push([1,10,11,12]),l=o.getUrlParams(),d={Accept:"*/*"},o.customFetch?[4,(g=o.customFetch({url:l,method:"GET",headers:d,signal:s.signal}),m=s.signal,new Promise(function(e,t){var n=function(){var e=new Error("Remote config custom fetch aborted by timeout");e.name="AbortError",t(e)};m.addEventListener("abort",n,{once:!0}),g.then(function(t){m.removeEventListener("abort",n),e(t)},function(e){m.removeEventListener("abort",n),t(e)})}))]:[3,3];case 2:return v=c.sent(),[3,5];case 3:return[4,fetch(l,{method:"GET",headers:d,signal:s.signal})];case 4:v=c.sent(),c.label=5;case 5:return(f=v).ok||f.status>=200&&f.status<300?[3,7]:[4,f.text()];case 6:return p=c.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(f.status,": ").concat(p)),f.status===rt||f.status===it?(o.logger.error("Remote config client fetch failed with ".concat(f.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,i=!1):f.status>=400&&f.status<500&&f.status!==ot&&(i=!1),[3,9];case 7:return[4,f.json()];case 8:return[2,{value:{remoteConfig:c.sent(),lastFetch:new Date}}];case 9:return[3,12];case 10:return(h=c.sent())instanceof Error&&"AbortError"===h.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),h),[3,12];case 11:return clearTimeout(a),[7];case 12:return i?r<e-1?[4,new Promise(function(e){return setTimeout(e,u.getJitterDelay(n))})]:[3,14]:[2,"break"];case 13:c.sent(),c.label=14;case 14:return[2]}var g,m})},o=this,s=0,l.label=1;case 1:return s<e?[5,i(s)]:[3,4];case 2:if("object"==typeof(a=l.sent()))return[2,a.value];if("break"===a)return[3,4];l.label=3;case 3:return s++,[3,1];case 4:return[2,r]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e}(),at=H(),ut=null==at?void 0:at.console,ct={},lt={},dt=!1;var ft,vt={addListener:function(e,t){var n,r=(n=e,!!ut&&"function"==typeof ut[n]&&(lt[n]||(lt[n]=ut[n],ut[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{if(ct[n]&&!dt){dt=!0;var r=ct[n];r&&r.forEach(function(t){try{t(n,e)}catch(e){}})}}catch(e){}return dt=!1,lt[n].apply(ut,e)}),!0));if(!r)return new Error("Console override failed");ct[e]?ct[e].push(t):ct[e]=[t]},removeListener:function(e){var t,n;try{for(var r=l(Object.values(ct)),i=r.next();!i.done;i=r.next())for(var o=i.value,s=o.length-1;s>=0;s--)if(o[s]===e){o.splice(s,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},_restoreConsole:function(){var e,t;try{for(var n=l(Object.entries(lt)),r=n.next();!r.done;r=n.next()){var i=d(r.value,2),o=i[0],s=i[1];s&&(ut[o]=s)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}lt={},ct={}}};!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(ft||(ft={}));var pt=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],ht="data-amp-track-",gt=["div","span","h1","h2","h3","h4","h5","h6"],mt=f(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],d(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),yt=mt,bt=mt,wt=["*"];function Et(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e}function St(e,t,n){e&&kt({json:e,allowlist:t.map(Tt),excludelist:n.map(Tt),ancestors:[]})}function kt(e){var t,n,r=e.json,i=e.targetObject,o=e.allowlist,s=e.excludelist,a=e.ancestors,u=e.parentObject,c=e.targetKey;i||(i=r);var v=Object.keys(i);try{for(var p=l(v),h=p.next();!h.done;h=p.next()){var g=h.value,m=f(f([],d(a),!1),[g],!1);Et(i[g])?xt(m,o)&&!xt(m,s)||delete i[g]:kt({json:r,targetObject:i[g],allowlist:o,excludelist:s,ancestors:m,parentObject:i,targetKey:g})}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}0===Object.keys(i).length&&u&&c&&delete u[c]}function Tt(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function Pt(e,t,n,r){if(void 0===n&&(n=0),void 0===r&&(r=0),r===t.length)return n===e.length;if(n===e.length){for(;r<t.length&&"**"===t[r];)r++;return r===t.length}var i=t[r];if("**"===i){if(r+1===t.length)return!0;for(var o=n;o<=e.length;o++)if(Pt(e,t,o,r+1))return!0;return!1}return("*"===i||i===e[n])&&Pt(e,t,n+1,r+1)}function xt(e,t){return t.some(function(t){return Pt(e,t)})}var It=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,n;void 0===e&&(e=[]);var r=this.request.headers,i={};if(Array.isArray(r))r.forEach(function(e){var t=d(e,2),n=t[0],r=t[1];i[n]=r});else if(r instanceof Headers)r.forEach(function(e,t){i[t]=e});else if("object"==typeof r&&null!==r)try{for(var o=l(Object.entries(r)),s=o.next();!s.done;s=o.next()){var a=d(s.value,2),u=a[0],c=a[1];i[u]=c}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return Nt(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=H();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=_t(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),u(this,void 0,void 0,function(){return c(this,function(n){return 0===e.length?[2,null]:[2,Lt(this.body,e,t)]})})},e}(),At=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),Nt(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return _t(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),u(this,void 0,void 0,function(){return c(this,function(n){return 0===e.length?[2,null]:[2,Lt(this.body,e,t)]})})},e}();function _t(e,t){var n,r,i,o=H(),s=null==o?void 0:o.TextEncoder;if(s){var a;if("string"==typeof e)a=e,i=(new s).encode(a).length;else if(e instanceof Blob)i=(a=e).size;else if(e instanceof URLSearchParams)a=e,i=(new s).encode(a.toString()).length;else if(ArrayBuffer.isView(e))i=(a=e).byteLength;else if(e instanceof ArrayBuffer)i=(a=e).byteLength;else if(e instanceof FormData){var u=e,c=0,f=0;try{for(var v=l(u.entries()),p=v.next();!p.done;p=v.next()){var h=d(p.value,2),g=h[0],m=h[1];if(c+=g.length,"string"==typeof m)c+=(new s).encode(m).length;else{if(!(m instanceof Blob))return;c+=m.size}if(++f>=t)return}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}i=c}else if(e instanceof ReadableStream)return void(a=e);return i}}var Ot,Ct=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var n=this.response.headers,r={};return null===(t=null==n?void 0:n.forEach)||void 0===t||t.call(n,function(e,t){r[t]=e}),Nt(r,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var n=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),r=n?parseInt(n,10):void 0;return this._bodySize=r,r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return u(this,void 0,void 0,function(){var e,t;return c(this,function(n){switch(n.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),n.label=1;case 1:return n.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},500)}),[4,Promise.race([e,t])];case 2:return[2,n.sent()];case 3:return n.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),u(this,void 0,void 0,function(){return c(this,function(n){switch(n.label){case 0:return 0===e.length?[2,null]:[4,this.text()];case 1:return[2,Lt(n.sent(),e,t)]}})})},e}(),Rt=function(){function e(e,t,n,r){this.statusCode=e,this.headersString=t,this.size=n,this.getJson=r}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,n;if(void 0===e&&(e=[]),!this.headersString)return{};var r={},i=this.headersString.split("\r\n");try{for(var o=l(i),s=o.next();!s.done;s=o.next()){var a=d(s.value.split(": "),2),u=a[0],c=a[1];u&&c&&(r[u]=c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return Nt(r,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),u(this,void 0,void 0,function(){var n;return c(this,function(r){return 0===e.length?[2,null]:(n=this.getJson())?(St(n,e,t),[2,n]):[2,null]})})},e}();function Lt(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return St(r,t,n),r}catch(e){return null}}!function(e){e.REDACT="redact",e.REMOVE="remove"}(Ot||(Ot={}));var Dt="[REDACTED]",Nt=function(e,t){var n,r,i=t.allow,o=void 0===i?[]:i,s=t.strategy,a=void 0===s?Ot.REMOVE:s,u=f([],d(D),!1),c={},v=function(t){var n=t.toLowerCase();u.find(function(e){return e.toLowerCase()===n})?a===Ot.REDACT&&(c[t]=Dt):o.find(function(e){return e.toLowerCase()===n})?c[t]=e[t]:a===Ot.REDACT&&(c[t]=Dt)};try{for(var p=l(Object.keys(e)),h=p.next();!h.done;h=p.next()){v(h.value)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}return c},Mt=function(){function e(e,t,n,r,i,o,s,a,u,c,l){void 0===s&&(s=0),this.type=e,this.method=t,this.timestamp=n,this.startTime=r,this.url=i,this.requestWrapper=o,this.status=s,this.duration=a,this.responseWrapper=u,this.error=c,this.endTime=l}return e.prototype.toSerializable=function(){var e,t,n,r,i={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(e=this.requestWrapper)||void 0===e?void 0:e.headers(f([],d(L),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(n=this.responseWrapper)||void 0===n?void 0:n.headers(f([],d(L),!1)),responseBodySize:null===(r=this.responseWrapper)||void 0===r?void 0:r.bodySize};return Object.fromEntries(Object.entries(i).filter(function(e){var t=d(e,2);return t[0],void 0!==t[1]}))},e}();var jt=function(e,t){void 0===t&&(t=z()),this.callback=e,this.id=t};function Ut(e){try{e()}catch(e){}}var Ft=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=H();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var e=H();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var n,r,i,o,s,a,u,c,l,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null===(i=null===(r=null===(n=this.globalScope)||void 0===n?void 0:n.XMLHttpRequest)||void 0===r?void 0:r.prototype)||void 0===i?void 0:i.open,v=null===(a=null===(s=null===(o=this.globalScope)||void 0===o?void 0:o.XMLHttpRequest)||void 0===s?void 0:s.prototype)||void 0===a?void 0:a.send,p=null===(l=null===(c=null===(u=this.globalScope)||void 0===u?void 0:u.XMLHttpRequest)||void 0===c?void 0:c.prototype)||void 0===l?void 0:l.setRequestHeader;f&&v&&p&&this.observeXhr(f,v,p);var h=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;h&&this.observeFetch(h),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(n){try{n.callback(e)}catch(e){Ut(function(){var n;null===(n=t.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,n,r,i,o,s){var a;if(void 0!==o&&void 0!==s){var u,c,l,d="GET";if(!function(e){return"object"==typeof e&&null!==e&&"url"in e&&"method"in e}(t)?u=null===(a=null==t?void 0:t.toString)||void 0===a?void 0:a.call(t):(u=t.url,d=t.method),u)try{var f=new URL(u);u="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==n?void 0:n.method)||d,r&&(c=r.status),i&&(l={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},c=0);var v=Math.floor(performance.now()-s),p=Math.floor(o+v),h=new Mt(e,d,o,o,u,n,c,v,r,l,p);this.triggerEventCallbacks(h)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(n,r){return u(t,void 0,void 0,function(){var t,i,o,s,a=this;return c(this,function(u){switch(u.label){case 0:try{t=this.getTimestamps()}catch(e){Ut(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}u.label=1;case 1:return u.trys.push([1,3,,4]),[4,e(n,r)];case 2:return i=u.sent(),[3,4];case 3:return s=u.sent(),o=s,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,r?new It(r):void 0,i?new Ct(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){Ut(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(i)return[2,i];throw o}})})})},e.createXhrJsonParser=function(e,t){return function(){var n;try{if("json"===e.responseType){if(null===(n=t.globalScope)||void 0===n?void 0:n.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(n){return n instanceof Error&&"InvalidStateError"===n.name&&Ut(function(){var n;return null===(n=t.logger)||void 0===n?void 0:n.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))}),null}return null}},e.prototype.observeXhr=function(t,n,r){if(this.globalScope&&t&&n){var i=this.globalScope.XMLHttpRequest.prototype,o=this;i.open=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=d(n,2),a=i[0],u=i[1];try{this.$$AmplitudeAnalyticsEvent=s({method:a,url:null===(e=null==u?void 0:u.toString)||void 0===e?void 0:e.call(u),headers:{}},o.getTimestamps())}catch(e){Ut(function(){var t;return null===(t=o.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return t.apply(this,n)},i.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this,s=e.createXhrJsonParser(this,o),a=t[0],u=i.$$AmplitudeAnalyticsEvent;return i.$$AmplitudeAnalyticsEvent&&i.addEventListener("loadend",function(){try{var e=i.getAllResponseHeaders(),t=i.getResponseHeader("content-length"),n=new Rt(i.status,e,t?parseInt(t,10):void 0,s),r=i.$$AmplitudeAnalyticsEvent.headers,c=new At(a,r);u.status=i.status,o.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},c,n,void 0,u.startTime,u.durationStart)}catch(e){Ut(function(){var t;return null===(t=o.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),n.apply(i,t)},i.setRequestHeader=function(e,t){try{var n=this.$$AmplitudeAnalyticsEvent;n&&(n.headers[e]=t)}catch(e){Ut(function(){var t;return null===(t=o.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}r.apply(this,[e,t])}}},e}(),qt=new Ft,Bt=function(){function e(){}return e.prototype.parse=function(){return u(this,void 0,void 0,function(){return c(this,function(e){return[2,s(s(s(s({},R),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=Ae();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=Ae();return(e={})[E]=t[E],e[S]=t[S],e[k]=t[k],e[T]=t[T],e[P]=t[P],e[x]=t[x],e[I]=t[I],e[A]=t[A],e[_]=t[_],e[O]=t[O],e[C]=t[C],e},e}(),Ht="data-amp-mask",Vt="*****",zt=/\b(?:\d[ -]*?){13,16}\b/,Wt=/(\d{3}-?\d{2}-?\d{4})/g,$t=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,Kt=function(e,t){var n,r;if(void 0===t&&(t=[]),"string"!=typeof e)return"";var i=e;i=(i=(i=i.replace(zt,Vt)).replace(Wt,Vt)).replace($t,Vt);try{for(var o=l(t),s=o.next();!s.done;s=o.next()){var a=s.value;try{i=i.replace(a,Vt)}catch(e){}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},Jt=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(Ht)?Vt:e?e(document.title):document.title},Gt={};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.Observable=void 0;const Yt=e=>Boolean(Symbol[e]),Xt=e=>Yt(e)?Symbol[e]:"@@"+e,Qt=Xt("iterator"),Zt=Xt("observable"),en=Xt("species");function tn(e,t){let n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function nn(e){let t=e.constructor;return void 0!==t&&(t=t[en],null===t&&(t=void 0)),void 0!==t?t:dn}function rn(e){rn.log?rn.log(e):setTimeout(()=>{throw e})}function on(e){Promise.resolve().then(()=>{try{e()}catch(e){rn(e)}})}function sn(e){let t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{let e=tn(t,"unsubscribe");e&&e.call(t)}}catch(e){rn(e)}}function an(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function un(e,t,n){e._state="running";let r=e._observer;try{let i=tn(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(an(e),!i)throw n;i.call(r,n);break;case"complete":an(e),i&&i.call(r)}}catch(e){rn(e)}"closed"===e._state?sn(e):"running"===e._state&&(e._state="ready")}function cn(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void on(()=>function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let n=0;n<t.length&&(un(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e))):void un(e,t,n);e._queue.push({type:t,value:n})}}class ln{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let n=this,r={get closed(){return"closed"===n._state},next(e){cn(n,"next",e)},error(e){cn(n,"error",e)},complete(){cn(n,"complete")}};try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(an(this),sn(this))}}class dn{constructor(e){if(!(this instanceof dn))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new ln(e,this._subscriber)}forEach(e){return new Promise((t,n)=>{if("function"!=typeof e)return void n(new TypeError(e+" is not a function"));function r(){i.unsubscribe(),t()}let i=this.subscribe({next(t){try{e(t,r)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t})})}map(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(nn(this))(t=>this.subscribe({next(n){try{n=e(n)}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(nn(this))(t=>this.subscribe({next(n){try{if(!e(n))return}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=nn(this),n=arguments.length>1,r=!1,i=arguments[1];return new t(t=>this.subscribe({next(o){let s=!r;if(r=!0,!s||n)try{i=e(i,o)}catch(e){return t.error(e)}else i=o},error(e){t.error(e)},complete(){if(!r&&!n)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(i),t.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=nn(this);return new t(n=>{let r,i=0;return function o(s){r=s.subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){i===e.length?(r=void 0,n.complete()):o(t.from(e[i++]))}})}(this),()=>{r&&(r.unsubscribe(),r=void 0)}})}flatMap(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=nn(this);return new t(n=>{let r=[],i=this.subscribe({next(i){if(e)try{i=e(i)}catch(e){return n.error(e)}let s=t.from(i).subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){let e=r.indexOf(s);e>=0&&r.splice(e,1),o()}});r.push(s)},error(e){n.error(e)},complete(){o()}});function o(){i.closed&&0===r.length&&n.complete()}return()=>{r.forEach(e=>e.unsubscribe()),i.unsubscribe()}})}[Zt](){return this}static from(e){let t="function"==typeof this?this:dn;if(null==e)throw new TypeError(e+" is not an object");let n=tn(e,Zt);if(n){let r=n.call(e);if(Object(r)!==r)throw new TypeError(r+" is not an object");return function(e){return e instanceof dn}(r)&&r.constructor===t?r:new t(e=>r.subscribe(e))}if(Yt("iterator")&&(n=tn(e,Qt),n))return new t(t=>{on(()=>{if(!t.closed){for(let r of n.call(e))if(t.next(r),t.closed)return;t.complete()}})});if(Array.isArray(e))return new t(t=>{on(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})});throw new TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:dn)(t=>{on(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})})}static get[en](){return this}}Gt.Observable=dn,Object.defineProperty(dn,Symbol("extensions"),{value:{symbol:Zt,hostReportError:rn},configurable:!0});var fn=Gt.Observable;function vn(e,t){return new fn(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})}function pn(e,t){return new fn(function(n){var r=!1,i=new Set,o=function(){var e,t;r=!0;try{for(var n=l(i),o=n.next();!o.done;o=n.next()){var s=o.value;try{s.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.clear()},s=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),o())},complete:function(){i.delete(t),r||0!==i.size||(n.complete(),o(),r=!0)}});i.add(t)};return s(e),s(t),o})}function hn(e){var t=new Set,n=null;function r(){null==n||n.unsubscribe(),n=null,t.clear()}return new fn(function(i){return t.add(i),null===n&&(n=e.subscribe({next:function(e){var n,r,i;try{for(var o=l(t),s=o.next();!s.done;s=o.next()){var a=s.value;null===(i=a.next)||void 0===i||i.call(a,e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},error:function(e){var n,i,o;try{for(var s=l(t),a=s.next();!a.done;a=s.next()){var u=a.value;null===(o=u.error)||void 0===o||o.call(u,e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}r()},complete:function(){var e,n,i;try{for(var o=l(t),s=o.next();!s.done;s=o.next()){var a=s.value;null===(i=a.complete)||void 0===i||i.call(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}r()}})),function(){t.delete(i),0===t.size&&n&&(n.unsubscribe(),n=null)}})}var gn={},mn={get exports(){return gn},set exports(e){gn=e}},yn=Object.prototype.hasOwnProperty;function bn(e){return"[Throws: "+(e?e.message:"?")+"]"}function wn(e){var t=[];return function e(n){if(null===n||"object"!=typeof n)return n;if(-1!==t.indexOf(n))return"[Circular]";if(t.push(n),"function"==typeof n.toJSON)try{var r=e(n.toJSON());return t.pop(),r}catch(e){return bn(e)}if(Array.isArray(n)){var i=n.map(e);return t.pop(),i}var o=Object.keys(n).reduce(function(t,r){return t[r]=e(function(e,t){if(yn.call(e,t))try{return e[t]}catch(e){return bn(e)}return e[t]}(n,r)),t},{});return t.pop(),o}(e)}mn.exports=function(e,t,n){return JSON.stringify(wn(e),t,n)};var En,Sn=gn.ensureProperties=wn,kn=gn||t({__proto__:null,ensureProperties:Sn,get default(){return gn}},[gn]),Tn="https://app.amplitude.com",Pn={US:Tn,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"};var xn="__AMPLITUDE_MESSENGER_INSTANCE__",In="__AMPLITUDE_MESSENGER__",An=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?Tn:t;this[En]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(r=window.opener)||void 0===r?void 0:r.postMessage)||void 0===i||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,s){r.requestCallbacks[i]={resolve:t,reject:s},r.notify(o),n.timeout>0&&setTimeout(function(){s(new Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},e.prototype.registerActionHandler=function(e,t){var n,r,i,o;this.actionHandlers.has(e)&&(null===(o=null===(i=this.logger)||void 0===i?void 0:i.warn)||void 0===o||o.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var s=this.pendingMessages.get(e);if(s){this.pendingMessages.delete(e);try{for(var a=l(s),u=a.next();!u.done;u=a.next()){t(u.value)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(e){return u(this,void 0,void 0,function(){var t,n,r;return c(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];n=function(e){return document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),null===(r=document.head)||void 0===r||r.appendChild(i)}catch(e){n(e)}})}(e).then(function(){}),this.scriptLoadPromises.set(e,n),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n];case 2:return i.sent(),[3,4];case 3:throw r=i.sent(),this.scriptLoadPromises.delete(e),r;case 4:return[2]}})})},e.prototype.setup=function(e){var t,n,r=this,i=void 0===e?{}:e,o=i.logger,s=i.endpoint;o&&(this.logger=o),s&&this.endpoint===Tn&&(this.endpoint=s),this.isSetup||(this.isSetup=!0,null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Setting up messenger"),this.messageHandler=function(e){var t,n,i,o,s;if(null===(n=null===(t=r.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message received: ",JSON.stringify(e)),r.endpoint===e.origin){var a=e.data,u=null==a?void 0:a.action;if(u)if("id"in a&&a.id)null===(o=null===(i=r.logger)||void 0===i?void 0:i.debug)||void 0===o||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),r.handleResponse(a);else{if("ping"===u)return void r.notify({action:"pong"});var c=r.actionHandlers.get(u);if(c)c(a.data);else{var l=null!==(s=r.pendingMessages.get(u))&&void 0!==s?s:[];l.push(a.data),r.pendingMessages.set(u,l)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=H();(null==e?void 0:e[In])===this&&delete e[In]},e}();function _n(e){var t,n=H(),r=null==n?void 0:n[In];if("object"==typeof(t=r)&&null!==t&&xn in t&&!0===t[xn])return r;var i=new An(e);return n&&(n[In]=i),i}En=xn;var On="__AMPLITUDE_BACKGROUND_CAPTURE__";var Cn={always:"always",ifEmptyCampaign:"ifEmptyCampaign"};function Rn(e,t){var n=0;if(Number.isFinite(e)&&Number.isFinite(t)&&t>0){var r=e/t*100;n=Math.min(100,Math.max(0,r))}return n}function Ln(e,t){var n=e.currentTime,r=e.duration;return s({duration:r,start_time:n,last_position:n,percent_completed:Rn(n,r)},void 0!==t?{stop_reason:t}:{})}function Dn(e){return{mux_playback_id:e.getAttribute("playback-id"),mux_video_id:e.getAttribute("metadata-video-id"),mux_video_title:e.getAttribute("metadata-video-title")}}function Nn(e,t,n,r){return u(this,void 0,void 0,function(){var i,o,a,u,l;return c(this,function(c){switch(c.label){case 0:return[4,Promise.all([new Promise(function(t){return e.getDuration(t)}),new Promise(function(t){return e.getCurrentTime(t)})])];case 1:if(i=d.apply(void 0,[c.sent(),2]),o=i[0],a=i[1],u={},"mux"===n){l=void 0;try{l=new URL(t.getAttribute("src")),u.mux_video_title=l.searchParams.get("metadata-video-title"),u.mux_video_id=l.searchParams.get("metadata-video-id"),u.mux_playback_id=l.pathname.split("/").pop()}catch(e){}}return[2,s(s({duration:o,start_time:a,last_position:a,percent_completed:Rn(a,o)},void 0!==r?{stop_reason:r}:{}),u)]}})})}function Mn(e,t,n){void 0===n&&(n=null);var r=[],i=function(){var i=e.elem,o=!1,s=function(){Nn(e,i,n).then(function(e){t.onPlay(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'play' handler: ".concat(e))})};e.on("play",s),r.push(function(){return e.off("play",s)});var a=function(){Nn(e,i,n,"paused").then(function(e){t.onPause(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'pause' handler: ".concat(e))})};e.on("pause",a),r.push(function(){return e.off("pause",a)});var l=function(){Nn(e,i,n,"ended").then(function(e){t.onEnded(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'ended' handler: ".concat(e))})};e.on("ended",l),r.push(function(){return e.off("ended",l)});var d=function(){o=!0,Nn(e,i,n,"seeking").then(function(e){t.onSeeking(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'seeking' handler: ".concat(e))})};e.on("seeking",d),r.push(function(){return e.off("seeking",d)});var f=function(){o=!1,Nn(e,i,n).then(function(e){t.onSeeked(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'seeked' handler: ".concat(e))})};e.on("seeked",f),r.push(function(){return e.off("seeked",f)});var v=function(){(function(e){return u(this,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){return e.getCurrentTime(t)})];case 1:return[2,{currentTime:t.sent()}]}})})})(e).then(function(e){var n={position:e.currentTime,isSeeking:o};t.onTimeUpdate(n)}).catch(function(e){t.onError("Error getting iframe metadata from 'timeupdate' handler: ".concat(e))})};e.on("timeupdate",v),r.push(function(){return e.off("timeupdate",v)})};return e.on("ready",i),function(){e.off("ready",i),r.forEach(function(e){return e()})}}var jn=function(){function e(e){var t=e.videoEl,n=e.onStateChange,r=e.vendor,i=e.isEmbedded,o=this;this.state={playbackState:"paused"},this.handler={onPlay:function(e){o.updatePlaybackState("playing",e)},onPause:function(e){o.updatePlaybackState("paused",e)},onEnded:function(e){o.updatePlaybackState("ended",e)},onSeeking:function(){var e=s(s({},o.state),{isSeeking:!0});o.updateState(e)},onSeeked:function(e){var t=s(s({},o.state),{isSeeking:!1,position:e.last_position});o.updateState(t)},onError:function(e){o.updateStateWithError(e)},onTimeUpdate:function(e){o.updateTime(e)}},this.onStateChange=n,this.untrack=i?Mn(t,this.handler,r):function(e,t,n){var r=function(){var r=s(s({},Ln(e)),"mux"===n?Dn(e):{});t.onPlay(r)};e.addEventListener("play",r);var i=function(){var r=s(s({},Ln(e,"paused")),"mux"===n?Dn(e):{});t.onPause(r)};e.addEventListener("pause",i);var o=function(){var r=s(s({},Ln(e,"ended")),"mux"===n?Dn(e):{});t.onEnded(r)};e.addEventListener("ended",o);var a=function(){var r=s(s({},Ln(e,"seeking")),"mux"===n?Dn(e):{});t.onSeeking(r)};e.addEventListener("seeking",a);var u=function(){var r=s(s({},Ln(e)),"mux"===n?Dn(e):{});t.onSeeked(r)};e.addEventListener("seeked",u);var c=function(){var n=e,r={position:e.currentTime,isSeeking:!!n.seeking};t.onTimeUpdate(r)};return e.addEventListener("timeupdate",c),function(){e.removeEventListener("play",r),e.removeEventListener("pause",i),e.removeEventListener("ended",o),e.removeEventListener("seeking",a),e.removeEventListener("seeked",u),e.removeEventListener("timeupdate",c)}}(t,this.handler,r)}return e.prototype.stateChangeHandler=function(e,t){try{this.onStateChange(e,t)}catch(e){}},e.prototype.updateStateWithError=function(e){var t=this.state,n=s(s({},t),{playbackState:"error",errorMessage:e});this.updateState(n)},e.prototype.updatePlaybackState=function(e,t){var n=s(s({},this.state),{playbackState:e,lastEvent:t,position:t.last_position});this.updateState(n)},e.prototype.updateTime=function(e){var t,n;if(this.state.lastEvent&&"playing"===this.state.playbackState){var r=e.isSeeking||this.state.isSeeking,i=null!==(t=this.state.position)&&void 0!==t?t:0,o=e.position;if(r)this.state=s(s({},this.state),{position:o});else{var a=o-i,u=s(s({},this.state),{position:o,watchTime:(null!==(n=this.state.watchTime)&&void 0!==n?n:0)+a});this.updateState(u)}}},e.prototype.updateState=function(e){var t=this.state;this.state=e,this.stateChangeHandler(t,e)},e.prototype.destroy=function(){this.untrack()},e}();var Un=function(e,t){return"boolean"==typeof e?e:!1!==(null==e?void 0:e[t])&&(!function(){var e,t,n=H();return"string"==typeof(null===(t=null===(e=null==n?void 0:n.chrome)||void 0===e?void 0:e.runtime)||void 0===t?void 0:t.id)}()||!!(null==e?void 0:e[t]))},Fn=function(e){return Un(e,"attribution")},qn=function(e){return Un(e,"formInteractions")},Bn=function(e){return Un(e,"pageViews")},Hn=function(e){return Un(e,"sessions")},Vn=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.networkTracking||"object"==typeof e.networkTracking)},zn=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},Wn=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.frustrationInteractions||"object"==typeof e.frustrationInteractions)},$n=function(e){if("object"==typeof e.autocapture){var t=e.autocapture.performanceTracking;return!0===t?{mainThreadBlock:!0}:"object"==typeof t&&null!==t?t:void 0}},Kn=function(e){if(zn(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},Jn=function(e){if(Wn(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.frustrationInteractions)return e.autocapture.frustrationInteractions},Gn=function(e){var t;if(Vn(e.autocapture)){var n=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.networkTracking?n=e.autocapture.networkTracking:e.networkTrackingOptions&&(n=e.networkTrackingOptions),s(s({},n),{captureRules:null===(t=null==n?void 0:n.captureRules)||void 0===t?void 0:t.map(function(t){var n,r,i;if((null===(n=t.urls)||void 0===n?void 0:n.length)&&(null===(r=t.hosts)||void 0===r?void 0:r.length)){var o=JSON.stringify(t.hosts),a=JSON.stringify(t.urls);return null===(i=e.loggerProvider)||void 0===i||i.warn("Found network capture rule with both urls='".concat(a,"' and hosts='").concat(o,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),s(s({},t),{hosts:void 0})}return t})})}},Yn=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return Bn(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:r,eventType:t,pageCounter:i}},Xn=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var u=a.apply(e,o);"function"==typeof s&&s(null==u?void 0:u.promise)}}return e},Qn=function(e){return e&&void 0!==e._q},Zn="2.44.4",er="amplitude-ts",tr=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(er,"/").concat(Zn),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,n;return u(this,void 0,void 0,function(){var r,i,o;return c(this,function(a){return r=(new Date).getTime(),i=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1,o=null!==(n=e.event_id)&&void 0!==n?n:i+1,this.config.lastEventId=o,e.time||(this.config.lastEventTime=r),[2,s(s(s(s(s(s(s(s({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:Ie()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:z(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:o,library:this.library,user_agent:this.userAgent})]})})},e}(),nr=1e3,rr=function(e){function t(t){var n,r,i,o=this;try{i=null===(n=H())||void 0===n?void 0:n.localStorage}catch(e){null===(r=null==t?void 0:t.loggerProvider)||void 0===r||r.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return r(t,e),t.prototype.set=function(t,n){var r;return u(this,void 0,void 0,function(){var i;return c(this,function(o){switch(o.label){case 0:return Array.isArray(n)&&n.length>nr?(i=n.length-nr,[4,e.prototype.set.call(this,t,n.slice(0,nr))]):[3,2];case 1:return o.sent(),null===(r=this.loggerProvider)||void 0===r||r.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(nr,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(Fe),ir=function(e){function t(){var t;return e.call(this,null===(t=H())||void 0===t?void 0:t.sessionStorage)||this}return r(t,e),t}(Fe),or=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=t,n}return r(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),u(this,void 0,void 0,function(){var r=this;return c(this,function(i){return[2,new Promise(function(i,o){"undefined"==typeof XMLHttpRequest&&o(new Error("XHRTransport is not supported."));var a=new XMLHttpRequest;a.open("POST",e,!0),a.onreadystatechange=function(){if(a.readyState===r.state.done){var e=a.responseText;try{i(r.buildResponse(JSON.parse(e)))}catch(e){i(r.buildResponse({code:a.status}))}}};var f={"Content-Type":"application/json",Accept:"*/*"},v=JSON.stringify(t),p=n&&v.length>=2048&&et(),h=function(e){var t,n;f=s(s({},r.customHeaders),f);try{for(var i=l(Object.entries(f)),o=i.next();!o.done;o=i.next()){var u=d(o.value,2),c=u[0],v=u[1];a.setRequestHeader(c,v)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}a.send(e)};u(r,void 0,void 0,function(){var e;return c(this,function(t){switch(t.label){case 0:return p?[4,tt(v)]:[3,2];case 1:return(e=t.sent())?(f["Content-Encoding"]="gzip",h(e)):h(v),[3,3];case 2:h(v),t.label=3;case 3:return[2]}})}).catch(o)})]})})},t}(Ze),sr=function(e){function t(t,n,r){void 0===t&&(t={});var i=e.call(this)||this;return i.customHeaders=t,i.enableKeepalive=!1!==n,i.referrerPolicy=r,i}return r(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),u(this,void 0,void 0,function(){var r,i,o,a,u,l,d,f,v;return c(this,function(c){switch(c.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r=JSON.stringify(t),i=n&&r.length>=2048&&et(),o=r,a={"Content-Type":"application/json",Accept:"*/*"},i?[4,tt(r)]:[3,2];case 1:(u=c.sent())&&(a["Content-Encoding"]="gzip",o=u),c.label=2;case 2:return a=s(s({},this.customHeaders),a),l="string"==typeof o?o.length:o.byteLength,d={headers:a,body:o,method:"POST",keepalive:this.enableKeepalive&&l<=16384},this.referrerPolicy&&(d.referrerPolicy=this.referrerPolicy),[4,fetch(e,d)];case 3:return[4,(f=c.sent()).text()];case 4:v=c.sent();try{return[2,this.buildResponse(JSON.parse(v))]}catch(e){return[2,this.buildResponse({code:f.status})]}return[2]}})})},t}(Ze),ar=function(e){function t(){return e.call(this)||this}return r(t,e),t.prototype.send=function(e,t,n){return u(this,void 0,void 0,function(){var n=this;return c(this,function(r){return[2,new Promise(function(r,i){var o=H();if(!(null==o?void 0:o.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);return r(o.navigator.sendBeacon(e,s)?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(Ze),ur=function(e,t,n){return void 0===n&&(n=!0),u(void 0,void 0,void 0,function(){var r,i,o,s,a,u,l,f,v;return c(this,function(c){switch(c.label){case 0:return r=function(e){return"".concat(p.toLowerCase(),"_").concat(e.substring(0,6))}(e),[4,t.getRaw(r)];case 1:return(i=c.sent())?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:c.sent(),c.label=3;case 3:return o=d(i.split("."),6),s=o[0],a=o[1],u=o[2],l=o[3],f=o[4],v=o[5],[2,{deviceId:s,userId:lr(a),sessionId:cr(l),lastEventId:cr(v),lastEventTime:cr(f),optOut:Boolean(u)}]}})})},cr=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},lr=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},dr="[Amplitude]",fr="".concat(dr," Form Started"),vr="".concat(dr," Form Submitted"),pr="".concat(dr," File Downloaded"),hr="session_start",gr="session_end",mr="".concat(dr," File Extension"),yr="".concat(dr," File Name"),br="".concat(dr," Link ID"),wr="".concat(dr," Link Text"),Er="".concat(dr," Link URL"),Sr="".concat(dr," Form ID"),kr="".concat(dr," Form Name"),Tr="".concat(dr," Form Destination"),Pr="cookie",xr=Object.freeze({__proto__:null,get IdentifyOperation(){return i},get SpecialEventType(){return o},get RevenueProperty(){return q},get LogLevel(){return Y},get ServerZone(){return ft},OfflineDisabled:null,DEFAULT_CSS_SELECTOR_ALLOWLIST:pt,DEFAULT_DATA_ATTRIBUTE_PREFIX:ht,DEFAULT_ACTION_CLICK_ALLOWLIST:gt,EXCLUDE_INTERNAL_REFERRERS_CONDITIONS:Cn}),Ir=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},Ar=function(e,t,n,r,i,o){void 0===i&&(i=!0),e.referrer;var u=e.referring_domain,c=a(e,["referrer","referring_domain"]),l=t||{};l.referrer;var d,f=l.referring_domain,v=a(l,["referrer","referring_domain"]),p=n.excludeInternalReferrers;if(p){var h=Or(p,r);if(!(h instanceof TypeError)&&e.referring_domain&&Dr(e.referring_domain,o)){if("always"===h)return Cr(h,e.referring_domain,r),!1;if("ifEmptyCampaign"===h&&(d=s(s({},e),{referring_domain:void 0,referrer:void 0}),Object.values(d).every(function(e){return!e})))return Cr(h,e.referring_domain,r),!1}}if(_r(n.excludeReferrers,e.referring_domain))return r.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&function(e){return Object.values(e).every(function(e){return!e})}(e)&&t)return r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var g=JSON.stringify(c)!==JSON.stringify(v),m=Ir(u||"")!==Ir(f||""),y=!t||g||m;return y?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),y},_r=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},Or=function(e,t){if(!0===e)return Cn.always;if("object"==typeof e){var n=e.condition;if("string"==typeof n&&Object.keys(Cn).includes(n))return n;if(void 0===n)return Cn.always}var r="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(r),new TypeError(r)};function Cr(e,t,n){var r="This is not a new campaign because referring_domain=".concat(t," is on the same domain as the current page and it is configured to exclude internal referrers");"always"===e?n.debug(r):"ifEmptyCampaign"===e&&n.debug("".concat(r," with empty campaign parameters"))}var Rr=["ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.za","appspot.com","asn.au","azurewebsites.net","cloudfront.net","myshopify.com","blogspot.com","co.ca","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.ar","com.au","com.br","com.cn","com.hk","com.in","com.jp","com.kr","com.mx","com.pl","com.sg","com.tr","com.tw","ed.jp","edu.au","edu.br","edu.cn","edu.hk","edu.sg","edu.th","edu.tr","edu.tw","firebaseapp.com","fly.dev","gc.ca","geek.nz","github.io","gitlab.io","go.jp","go.kr","go.th","gob.ar","gob.mx","gov.au","gov.br","gov.cn","gov.hk","gov.in","gov.pl","gov.sg","gov.tr","gov.tw","gov.uk","gov.za","govt.nz","gr.jp","herokuapp.com","id.au","idv.hk","iwi.nz","lg.jp","ltd.uk","maori.nz","me.uk","mil.kr","ne.jp","ne.kr","net.au","net.br","net.cn","net.hk","net.in","net.nz","net.pl","net.sg","net.tr","net.tw","net.za","onrender.com","or.jp","or.kr","or.th","org.ar","org.au","org.br","org.cn","org.hk","org.in","org.mx","org.nz","org.pl","org.sg","org.tw","org.uk","org.za","pages.dev","pe.kr","plc.uk","re.kr","res.in","sch.uk","vercel.app","netlify.app","workers.dev"],Lr=function(e){var t,n,r=e||(null===(n=null===(t=H())||void 0===t?void 0:t.location)||void 0===n?void 0:n.hostname);if(!r)return"";var i=r.split("."),o=i[i.length-1],s=i[i.length-2];return Rr.find(function(e){return r.endsWith(".".concat(e))})&&(o=i[i.length-2]+"."+i[i.length-1],s=i[i.length-3]),s?"".concat(s,".").concat(o):o},Dr=function(e,t){var n=H();if(!n)return!1;var r,i,o,s=(t||"").trim()||Lr(n.location.hostname);return r=e,o=(i=s).startsWith(".")?i:".".concat(i),!!(r.startsWith(".")?r:".".concat(r)).endsWith(o)},Nr=function(e){function t(t,n,r,i,o,s,a,u,c,l,d,f,v,p,h,g,m,y,b,w,E,S,k,T,P,x,I,A,_,O,C,R,L,D,N,M,j,U,F,q,B,H,V,z){void 0===r&&(r=new De),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===u&&(u=1e3),void 0===c&&(c=5),void 0===l&&(l=30),void 0===d&&(d=Pr),void 0===g&&(g=new Q),void 0===m&&(m=Y.Warn),void 0===b&&(b=!1),void 0===w&&(w=!1),void 0===k&&(k=""),void 0===T&&(T="US"),void 0===I&&(I=18e5),void 0===A&&(A=new rr({loggerProvider:g})),void 0===_&&(_={ipAddress:!0,language:!0,platform:!0}),void 0===O&&(O="fetch"),void 0===C&&(C=!1),void 0===R&&(R=!0),void 0===U&&(U=!0),void 0===F&&(F=0),void 0===V&&(V=!1);var W,$=this;($=e.call(this,{apiKey:t,storageProvider:A,transportProvider:Ur(O)})||this).apiKey=t,$.appVersion=n,$.cookieOptions=i,$.defaultTracking=o,$.autocapture=s,$.flushIntervalMillis=u,$.flushMaxRetries=c,$.flushQueueSize=l,$.identityStorage=d,$.ingestionMetadata=f,$.instanceName=v,$.loggerProvider=g,$.logLevel=m,$.minIdLength=y,$.offline=b,$.partnerId=E,$.plan=S,$.serverUrl=k,$.serverZone=T,$.sessionTimeout=I,$.storageProvider=A,$.trackingOptions=_,$.transport=O,$.useBatch=C,$.fetchRemoteConfig=R,$.networkTrackingOptions=M,$.identify=j,$.enableDiagnostics=U,$.diagnosticsSampleRate=F,$.diagnosticsClient=q,$.remoteConfig=B,$.topLevelDomain=H,$.enableRequestBodyCompression=V,$.customEnrichment=z,$.version=Zn,$._optOut=!1,$._cookieStorage=r,$.deviceId=a,$.lastEventId=p,$.lastEventTime=h,$.optOut=w,$.deferredSessionId=x,$.sessionId=P,$.pageCounter=D,$.userId=L,$.debugLogsEnabled=N,$.loggerProvider.enable(N?Y.Debug:$.logLevel),$.networkTrackingOptions=M,$.identify=j,$.enableDiagnostics=U,$.diagnosticsSampleRate=F,$.diagnosticsClient=q;var K=null!==(W=null==B?void 0:B.fetchRemoteConfig)&&void 0!==W?W:R;return $.remoteConfig=$.remoteConfig||{},$.remoteConfig.fetchRemoteConfig=K,$.fetchRemoteConfig=K,$.topLevelDomain=H||Lr(),$}return r(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,void 0!==e&&void 0!==this._deferredSessionId&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(e){this._deferredSessionId!==e&&e!==this.sessionId&&(this._deferredSessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,deferredSessionId:this._deferredSessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};this.cookieStorage instanceof Ne&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(xe(this.apiKey),e)},t}(ee),Mr=function(e,t,n,r,i){return void 0===t&&(t={}),u(void 0,void 0,void 0,function(){var o,a,u,l,d,f,v,p,h,g,m,y,b,w,E,S,k,T,P,x,I,A,_,O,C,R,L,D,N,M,j,U,F,q,B,H,V,W,$,K,J,G,Y,X,Q,Z,ee,te,ne,re,ie;return c(this,function(c){switch(c.label){case 0:return o=t.identityStorage||Pr,a="",o!==Pr||(null===(A=t.cookieOptions)||void 0===A?void 0:A.domain)||""===(null===(_=t.cookieOptions)||void 0===_?void 0:_.domain)?[3,2]:[4,Fr(void 0,r)];case 1:a=c.sent(),c.label=2;case 2:return u=s({domain:null!==(C=null===(O=t.cookieOptions)||void 0===O?void 0:O.domain)&&void 0!==C?C:a,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},t.cookieOptions),l={duplicateResolverFn:function(e){var t=Me(e);if(!t)return!1;var n=JSON.parse(t);return je(n.cookieDomain,u.domain)},diagnosticsClient:r},d=jr(t.identityStorage,u,l),[4,ur(e,d,null===(L=null===(R=t.cookieOptions)||void 0===R?void 0:R.upgrade)||void 0===L||L)];case 3:return f=c.sent(),[4,d.get(xe(e))];case 4:return v=c.sent(),p=Ae(),h=p.ampTimestamp?Number(p.ampTimestamp):void 0,g=!h||Date.now()<h,m=null!==(U=null!==(j=null!==(M=null!==(D=t.deviceId)&&void 0!==D?D:g?null!==(N=p.ampDeviceId)&&void 0!==N?N:p.deviceId:void 0)&&void 0!==M?M:null==v?void 0:v.deviceId)&&void 0!==j?j:f.deviceId)&&void 0!==U?U:z(),y=null!==(F=null==v?void 0:v.lastEventId)&&void 0!==F?F:f.lastEventId,b=null!==(q=null==v?void 0:v.lastEventTime)&&void 0!==q?q:f.lastEventTime,w=null!==(H=null!==(B=t.optOut)&&void 0!==B?B:null==v?void 0:v.optOut)&&void 0!==H?H:f.optOut,E=null!==(V=null==v?void 0:v.sessionId)&&void 0!==V?V:f.sessionId,S=null==v?void 0:v.deferredSessionId,k=null!==($=null!==(W=t.userId)&&void 0!==W?W:null==v?void 0:v.userId)&&void 0!==$?$:f.userId,n.previousSessionDeviceId=null!==(K=null==v?void 0:v.deviceId)&&void 0!==K?K:f.deviceId,n.previousSessionUserId=null!==(J=null==v?void 0:v.userId)&&void 0!==J?J:f.userId,T={ipAddress:null===(Y=null===(G=t.trackingOptions)||void 0===G?void 0:G.ipAddress)||void 0===Y||Y,language:null===(Q=null===(X=t.trackingOptions)||void 0===X?void 0:X.language)||void 0===Q||Q,platform:null===(ee=null===(Z=t.trackingOptions)||void 0===Z?void 0:Z.platform)||void 0===ee||ee},P=null==v?void 0:v.pageCounter,x=null==v?void 0:v.debugLogsEnabled,void 0!==t.autocapture&&(t.defaultTracking=t.autocapture),[4,(I=new Nr(e,t.appVersion,d,u,t.defaultTracking,t.autocapture,m,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,o,t.ingestionMetadata,t.instanceName,y,b,null!==(te=null==i?void 0:i.loggerProvider)&&void 0!==te?te:t.loggerProvider,t.logLevel,t.minIdLength,t.offline,w,t.partnerId,t.plan,t.serverUrl,null!==(ne=null==i?void 0:i.serverZone)&&void 0!==ne?ne:t.serverZone,E,S,t.sessionTimeout,t.storageProvider,T,t.transport,t.useBatch,t.fetchRemoteConfig,k,P,x,t.networkTrackingOptions,t.identify,null!==(re=null==i?void 0:i.enableDiagnostics)&&void 0!==re?re:t.enableDiagnostics,null!==(ie=null==i?void 0:i.diagnosticsSampleRate)&&void 0!==ie?ie:n._diagnosticsSampleRate,r,t.remoteConfig,a,t.enableRequestBodyCompression,t.customEnrichment)).storageProvider.isEnabled()];case 5:return c.sent()||(I.loggerProvider.warn("Storage provider ".concat(I.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),I.storageProvider=new De),[2,I]}})})},jr=function(e,t,n){switch(void 0===e&&(e=Pr),void 0===t&&(t={}),e){case"localStorage":return new rr;case"sessionStorage":return new ir;case"none":return new De;default:return new Ne(s(s({},t),{expirationDays:t.expiration}),n)}},Ur=function(e){var t="object"==typeof e?e.type:e,n="object"==typeof e?e.headers:void 0,r="object"==typeof e?e.enableKeepalive:void 0,i="object"==typeof e?e.referrerPolicy:void 0;return"xhr"===t?new or(n):"beacon"===t?new ar:new sr(n,r,i)},Fr=function(e,t){return u(void 0,void 0,void 0,function(){var n,r,i,o,s,a,u;return c(this,function(c){switch(c.label){case 0:return[4,new Ne(void 0,{diagnosticsClient:t}).isEnabled()];case 1:if(!c.sent()||!e&&("undefined"==typeof location||!location.hostname))return[2,""];if(n=null!=e?e:location.hostname,1===(r=n.split(".")).length)return[2,""];for(i=[],o=1,Rr.find(function(e){return n.endsWith(".".concat(e))})&&(o=2),s=r.length-o-1;s>=0;--s)i.push(r.slice(s).join("."));s=0,c.label=2;case 2:if(!(s<i.length))return[3,7];a=i[s],c.label=3;case 3:return c.trys.push([3,5,,6]),[4,Ne.isDomainWritable(a)];case 4:return c.sent()?[2,"."+a]:[3,6];case 5:return u=c.sent(),t&&t.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(a),error:u instanceof Error?u.message:String(u)}),[3,6];case 6:return s++,[3,2];case 7:return t&&t.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(n)}),[2,""]}})})},qr="AMP_PAGE_VIEW",Br=function(e){var t;void 0===e&&(e={});var n,r,i=H(),o=void 0,a=!1,l=e.trackOn,f=e.trackHistoryChanges,v=e.eventType,p=void 0===v?"[Amplitude] Page Viewed":v,h=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==o||o.error("Malformed URI sequence: ",e)}return t},g=function(e){return u(void 0,void 0,void 0,function(){var t,n,r;return c(this,function(i){switch(i.label){case 0:return t=h("undefined"!=typeof location&&location.href||""),r={event_type:p},n=[{}],[4,Hr()];case 1:return[2,(r.event_properties=s.apply(void 0,[s.apply(void 0,n.concat([i.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":t,"[Amplitude] Page Path":"undefined"!=typeof location&&h(location.pathname)||"","[Amplitude] Page Title":Jt(Kt),"[Amplitude] Page URL":t.split("?")[0],"[Amplitude] Page View ID":e}]),r)]}})})},m=function(){return void 0===l||"function"==typeof l&&l()},y="undefined"!=typeof location?location.href:null,b=function(){u(void 0,void 0,void 0,function(){var e,n,i,s,a;return c(this,function(u){switch(u.label){case 0:return e=location.href,n=zr(f,e,y||"")&&m(),y=e,n?(i=void 0,r&&(i=z(),r.set(qr,{pageViewId:i})),null==o||o.log("Tracking page view event"),null!=t?[3,1]:[3,3]):[3,4];case 1:return a=(s=t).track,[4,g(i)];case 2:a.apply(s,[u.sent()]),u.label=3;case 3:u.label=4;case 4:return[2]}})})},w={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,s){return u(void 0,void 0,void 0,function(){var u,l,f;return c(this,function(c){switch(c.label){case 0:if(t=s,n=e,(o=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),a=!0,i){try{r=new Fe(i.sessionStorage)}catch(e){null==o||o.debug("sessionStorage is not available in this environment.")}i.addEventListener("popstate",b),i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=d(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),a&&b()}})}return m()?(o.log("Tracking page view event"),u=void 0,r&&(u=z(),r.set(qr,{pageViewId:u})),f=(l=t).track,[4,g(u)]):[3,2];case 1:f.apply(l,[c.sent()]),c.label=2;case 2:return[2]}})})},execute:function(e){return u(void 0,void 0,void 0,function(){var t,i,a;return c(this,function(u){switch(u.label){case 0:return"attribution"===l&&Vr(e)?(null==o||o.log("Enriching campaign event to page view event with campaign parameters"),t=void 0,r?[4,r.get(qr)]:[3,2]):[3,4];case 1:i=u.sent(),t=null==i?void 0:i.pageViewId,u.label=2;case 2:return[4,g(t)];case 3:a=u.sent(),e.event_type=a.event_type,e.event_properties=s(s({},e.event_properties),a.event_properties),u.label=4;case 4:return n&&e.event_type===p&&(n.pageCounter=n.pageCounter?n.pageCounter+1:1,e.event_properties=s(s({},e.event_properties),{"[Amplitude] Page Counter":n.pageCounter})),[2,e]}})})},teardown:function(){return u(void 0,void 0,void 0,function(){return c(this,function(e){return i&&(i.removeEventListener("popstate",b),a=!1),[2]})})}};return w},Hr=function(){return u(void 0,void 0,void 0,function(){var e;return c(this,function(t){switch(t.label){case 0:return e=Le,[4,(new Bt).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},Vr=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[i.SET]||{},r=t[i.UNSET]||{},o=f(f([],d(Object.keys(n)),!1),d(Object.keys(r)),!1);return Object.keys(R).every(function(e){return o.includes(e)})}return!1},zr=function(e,t,n){if("pathOnly"===e){if(""==n)return!0;var r=new URL(t),i=new URL(n);return r.origin+r.pathname!==i.origin+i.pathname}return t!==n},Wr=function(){var e,t,n=[],r=function(e,t,r){e.addEventListener(t,r),n.push({element:e,type:t,handler:r})};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(n,i){return u(void 0,void 0,void 0,function(){var o,s;return c(this,function(a){return t=function(e){if(qn(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&"object"==typeof e.defaultTracking.formInteractions)return e.defaultTracking.formInteractions}(n),o=function(){if(i){if("undefined"!=typeof document){var o=new WeakSet,s=function(e){if(!o.has(e)){o.add(e);var s=!1;r(e,"change",function(){var t,n=Kr(e);s||i.track(fr,((t={})[Sr]=$r(e.id),t[kr]=$r(e.name),t[Tr]=n,t)),s=!0}),r(e,"submit",function(r){var o,a,u=Kr(e);if(s||i.track(fr,((o={})[Sr]=$r(e.id),o[kr]=$r(e.name),o[Tr]=u,o)),s=!0,void 0!==(null==t?void 0:t.shouldTrackSubmit))if("function"==typeof t.shouldTrackSubmit&&"undefined"!=typeof SubmitEvent&&r instanceof SubmitEvent)try{if(!t.shouldTrackSubmit(r))return}catch(e){n.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else n.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.");i.track(vr,((a={})[Sr]=$r(e.id),a[kr]=$r(e.name),a[Tr]=u,a)),s=!1})}};Array.from(document.getElementsByTagName("form")).forEach(s),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&s(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(s)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.")},"complete"===document.readyState?o():(s=H())?s.addEventListener("load",o):n.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return u(void 0,void 0,void 0,function(){return c(this,function(t){return[2,e]})})},teardown:function(){return u(void 0,void 0,void 0,function(){return c(this,function(t){return null==e||e.disconnect(),n.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),n=[],[2]})})}}},$r=function(e){if("string"==typeof e)return e},Kr=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},Jr=function(){var e,t=[];return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(n,r){return u(void 0,void 0,void 0,function(){var i,o;return c(this,function(s){return i=function(){if(r){if("undefined"!=typeof document){var i=function(e){var n;try{n=new URL(e.href,window.location.href)}catch(e){return}var i=o.exec(n.href),s=null==i?void 0:i[1];s&&function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})}(e,"click",function(){var t;s&&r.track(pr,((t={})[mr]=s,t[yr]=n.pathname,t[br]=e.id,t[wr]=e.text,t[Er]=e.href,t))})},o=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;Array.from(document.getElementsByTagName("a")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.")},"complete"===document.readyState?i():(o=H())?o.addEventListener("load",i):n.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return u(void 0,void 0,void 0,function(){return c(this,function(t){return[2,e]})})},teardown:function(){return u(void 0,void 0,void 0,function(){return c(this,function(n){return null==e||e.disconnect(),t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[],[2]})})}}},Gr=!1,Yr=function(){var e=H(),t=[],n=function(n,r){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(n,r),t.push({type:n,handler:r}))};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return u(void 0,void 0,void 0,function(){return c(this,function(r){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1,[2]):(e.offline=!navigator.onLine,n("online",function(){!1!==e.offline&&(e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis))}),n("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0}),[2])})})},teardown:function(){return u(void 0,void 0,void 0,function(){return c(this,function(n){return t.forEach(function(t){var n=t.type,r=t.handler;null==e||e.removeEventListener(n,r)}),t=[],[2]})})}}};function Xr(e){var t,n,r,i,o,s,a,u,c,v,p,h;if("object"==typeof e&&null!==e&&!Array.isArray(e)){var g=Object.keys(e);try{for(var m=l(g),y=m.next();!y.done;y=m.next()){var b=y.value;try{var w=e[b];"boolean"==typeof(null==w?void 0:w.enabled)&&(w.enabled?(delete w.enabled,0===Object.keys(w).length&&(e[b]=!0)):e[b]=!1),Xr(w)}catch(e){}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{if(null===(c=null===(u=null===(a=e.autocapture)||void 0===a?void 0:a.networkTracking)||void 0===u?void 0:u.captureRules)||void 0===c?void 0:c.length)try{for(var E=l(e.autocapture.networkTracking.captureRules),S=E.next();!S.done;S=E.next()){var k=S.value;try{for(var T=(o=void 0,l(["responseHeaders","requestHeaders"])),P=T.next();!P.done;P=T.next()){var x=P.value,I=null!==(v=k[x])&&void 0!==v?v:{},A=I.captureSafeHeaders,_=I.allowlist;(A||_)&&(void 0===_||Array.isArray(_)?k[x]=f(f([],d(A?L:[]),!1),d(null!=_?_:[]),!1):delete k[x])}}catch(e){o={error:e}}finally{try{P&&!P.done&&(s=T.return)&&s.call(T)}finally{if(o)throw o.error}}}}catch(e){r={error:e}}finally{try{S&&!S.done&&(i=E.return)&&i.call(E)}finally{if(r)throw r.error}}}catch(e){}var O=null===(p=e.autocapture)||void 0===p?void 0:p.frustrationInteractions;O&&(O.rageClick&&(O.rageClicks=O.rageClick,delete O.rageClick),O.deadClick&&(O.deadClicks=O.deadClick,delete O.deadClick));try{var C=null===(h=e.autocapture)||void 0===h?void 0:h.elementInteractions;if(C&&"object"==typeof C&&(!0===C.viewportContentUpdated&&(C.viewportContentUpdated={}),!1===C.viewportContentUpdated&&(C.viewportContentUpdated={enabled:!1}),void 0!==C.exposureDuration)){var R=C.viewportContentUpdated;void 0===R?C.viewportContentUpdated={exposureDuration:C.exposureDuration}:"object"==typeof R&&void 0===R.exposureDuration&&!1!==R.enabled&&(R.exposureDuration=C.exposureDuration),delete C.exposureDuration}}catch(e){}}}function Qr(e,t,n){var r,i,o=[];try{for(var s=l(null!=t?t:[]),a=s.next();!a.done;a=s.next()){var u=a.value;try{o.push(new RegExp(u))}catch(e){n.loggerProvider.warn("Invalid regex pattern: ".concat(u),e)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return e.concat(o)}function Zr(e,t){var n,r,i,o,a,u,c;if(e){Xr(e);try{t.loggerProvider.debug("Update browser config with remote configuration:",kn(e));var d=e;if(d&&"autocapture"in d){if("boolean"==typeof d.autocapture&&(t.autocapture=d.autocapture),"object"==typeof d.autocapture&&null!==d.autocapture){var f=s({},d.autocapture);if(void 0===t.autocapture&&(t.autocapture=d.autocapture),"object"==typeof d.autocapture.elementInteractions&&null!==d.autocapture.elementInteractions&&(null===(i=d.autocapture.elementInteractions.pageUrlAllowlistRegex)||void 0===i?void 0:i.length)){f.elementInteractions=s({},d.autocapture.elementInteractions);var v=f.elementInteractions,p=null!==(o=v.pageUrlAllowlist)&&void 0!==o?o:[],h=d.autocapture.elementInteractions.pageUrlAllowlistRegex;v.pageUrlAllowlist=Qr(p,h,t),delete v.pageUrlAllowlistRegex}if("object"==typeof d.autocapture.networkTracking&&null!==d.autocapture.networkTracking&&(null===(a=d.autocapture.networkTracking.captureRules)||void 0===a?void 0:a.length)){f.networkTracking=s({},d.autocapture.networkTracking);var g=null!==(u=f.networkTracking.captureRules)&&void 0!==u?u:[];try{for(var m=l(g),y=m.next();!y.done;y=m.next()){var b=y.value;b.urls=Qr(null!==(c=b.urls)&&void 0!==c?c:[],b.urlsRegex,t),delete b.urlsRegex}}catch(e){n={error:e}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}}"boolean"==typeof t.autocapture&&(t.autocapture=s({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},f)),"object"==typeof t.autocapture&&(t.autocapture=s(s({},t.autocapture),f))}t.defaultTracking=t.autocapture}"customEnrichment"in d&&null!==d.customEnrichment&&!1!==t.customEnrichment&&(t.customEnrichment=d.customEnrichment),t.loggerProvider.debug("Browser config after remote config update:",kn(t))}catch(e){t.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}var ei,ti="1.28.2",ni="[Amplitude] Element Clicked",ri="[Amplitude] Element Tag",ii="[Amplitude] Element Text",oi="[Amplitude] Page URL",si="[Amplitude] Viewport Height",ai="[Amplitude] Viewport Width",ui="[Amplitude] Page View ID",ci="data-amp-mask-attributes",li=["input","select","textarea"],di=function(e){var t=e.pageUrlAllowlist,n=e.pageUrlExcludelist;return!(n&&n.length>0&&Oe(window.location.href,n))&&!!Oe(window.location.href,t)},fi=function(e,t){return function(n,r){var i,o,s=e.shouldTrackEventResolver,a=null===(o=null===(i=null==r?void 0:r.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===o?void 0:o.call(i);if(!a)return!1;if(s)return s(n,r);if(!di(e))return!1;var u=String(null==r?void 0:r.getAttribute("type"))||"";if("string"==typeof u)switch(u.toLowerCase()){case"hidden":case"password":return!1}if(t){var c=t.some(function(e){var t;return!!(null===(t=null==r?void 0:r.matches)||void 0===t?void 0:t.call(r,e))});if(!c)return!1}switch(a){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:return"click"===n}}},vi=function(e){return e?e.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[]},pi=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return function(e){return null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length}(r)||(t[n]=r),t},{})},hi=function(){var e;try{var t=H(),n=null===(e=null==t?void 0:t.sessionStorage)||void 0===e?void 0:e.getItem("AMP_PAGE_VIEW");if(!n)return;var r=JSON.parse(n);if("string"==typeof r.pageViewId)return r.pageViewId}catch(e){}},gi=function(e,t){return e?t.some(function(t){var n;return null===(n=null==e?void 0:e.matches)||void 0===n?void 0:n.call(e,t)})?e:gi(null==e?void 0:e.parentElement,t):null},mi=function(e){return!(null===e.event.target||!e.closestTrackedAncestor)};!function(e){e[e.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",e[e.MIDDLE=1]="MIDDLE",e[e.RIGHT=2]="RIGHT"}(ei||(ei={}));var yi="__AMPLITUDE_VISUAL_TAGGING__";var bi=H(),wi=function(){return new fn(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},Ei=function(e){return void 0===e&&(e="click"),new fn(function(t){var n,r=function(e){t.next(e)};return null===(n=H())||void 0===n||n.document.addEventListener(e,r,{capture:!0}),function(){var t;null===(t=H())||void 0===t||t.document.removeEventListener(e,r,{capture:!0})}})},Si=function(){var e=pn(new fn(function(e){var t=function(t){if(t instanceof ErrorEvent){var n={kind:"error"};t.error instanceof Error||t.error instanceof DOMException?n=s(s({},n),{message:t.error.message,stack:t.error.stack,filename:t.filename,lineNumber:t.lineno,columnNumber:t.colno}):"string"==typeof t.error&&(n.message=t.error),e.next(n)}};return bi.addEventListener("error",t),function(){bi.removeEventListener("error",t)}}),new fn(function(e){var t=function(t){var n={kind:"unhandledrejection"};t.reason instanceof Error||t.reason instanceof DOMException?(n.message=t.reason.message,n.stack=t.reason.stack):"string"==typeof t.reason&&(n.message=t.reason),e.next(n)};return bi.addEventListener("unhandledrejection",t),function(){bi.removeEventListener("unhandledrejection",t)}}));return pn(e,new fn(function(e){var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=void 0;Array.isArray(n[0])&&"string"==typeof n[0][0]&&(i=n[0][0]),e.next({kind:"console",message:i})};return vt.addListener("error",t),function(){vt.removeListener(t)}}))},ki=function(e,t,n){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},Ti={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},Pi=function(e){var t,n,r,i,o=Object.values(Ti).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var s=l(e),a=s.next();!a.done;a=s.next()){var u=a.value;try{try{for(var c=(r=void 0,l(u.definition)),d=c.next();!d.done;d=c.next()){var f=d.value,v=Ti[f.event_type];v&&o[v].add(u.id)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==u?void 0:u.id,e)}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},xi=function(e){var t,n,r,i,o=new Map;try{for(var s=l(e),a=s.next();!a.done;a=s.next()){var u=a.value;try{for(var c=(r=void 0,l(u.conditions)),d=c.next();!d.done;d=c.next()){var f=d.value;if("LABELED_EVENT"===f.type){var v=f.match.eventId,p=o.get(v);p||(p=[],o.set(v,p)),p.push(u)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},Ii=function(e,t){return t.filter(function(t){return t.definition.some(function(t){return Ti[t.event_type]===e.type&&t.filters.every(function(t){return function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){return console.error("Error matching event to filter",e),!1}return!1}(e,t)})})})},Ai=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var i=function(e,t){var n,r,i,o,s=new Set;try{for(var a=l(e),u=a.next();!u.done;u=a.next()){var c=u.value,d=t.get(c.id);if(d)try{for(var f=(i=void 0,l(d)),v=f.next();!v.done;v=f.next()){var p=v.value;s.add(p)}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return Array.from(s)}(Ii(e,Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]})),this.labeledEventToTriggerMap);try{for(var o=l(i),s=o.next();!s.done;s=o.next()){var a=s.value;ki(a.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}(),_i=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",ci,Ht]),Oi=["type"],Ci=["svg","path","g"],Ri=["password","hidden"];function Li(e,t){var n,r,i,o,s,a;if(null===e)return null;var u=String(e.tagName).toLowerCase(),c={tag:u},d=Array.from(null!==(o=null===(i=e.parentElement)||void 0===i?void 0:i.children)&&void 0!==o?o:[]);d.length&&(c.index=d.indexOf(e),c.indexOfType=d.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var f=null===(a=null===(s=e.previousElementSibling)||void 0===s?void 0:s.tagName)||void 0===a?void 0:a.toLowerCase();f&&(c.prevSib=String(f));var v=e.getAttribute("id");v&&(c.id=String(v));var p=Array.from(e.classList);p.length&&(c.classes=p);var h={},g=Array.from(e.attributes).filter(function(e){return!_i.has(e.name)}),m=!function(e){var t,n,r,i=null===(n=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t),o=e instanceof HTMLElement&&"true"===(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase());return!li.includes(i)&&!o}(e);if(!Ri.includes(String(e.getAttribute("type")))&&!Ci.includes(u))try{for(var y=l(g),b=y.next();!b.done;b=y.next()){var w=b.value;m&&!Oi.includes(w.name)||(t.has(w.name)?h[w.name]=Vt:h[w.name]=String(w.value).substring(0,128))}}catch(e){n={error:e}}finally{try{b&&!b.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return Object.keys(h).length&&(c.attrs=h),c}function Di(e,t){var n=e.getAttribute(t.explicitTrackingAttribute);if(null!==n&&""===n)return null;var r=e.getAttribute("id");return null===r||""===r?null:function(e,t){var n,r;if(null==e||""===e)return!1;try{for(var i=l(t),o=i.next();!o.done;o=i.next())if(o.value.test(e))return!1}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}(r,t.autogeneratedIdPatterns)?r:null}function Ni(e,t){return t.map(Mi).join(" > ")}function Mi(e){var t=e.tagName.toLowerCase(),n=e.parentElement;if(null===n)return t;var r=function(e,t){for(var n=0,r=0;r<t.children.length;r++){var i=t.children[r];if(i.tagName===e.tagName&&(n+=1,i===e))return n}return 1}(e,n);return"".concat(t,":nth-of-type(").concat(r,")")}function ji(e){var t=globalThis.CSS;if(t&&"function"==typeof t.escape)return t.escape(e);for(var n=String(e),r=n.length,i="",o=0;o<r;o++){var s=n.charCodeAt(o);0!==s?s>=1&&s<=31||127===s||0===o&&s>=48&&s<=57||1===o&&s>=48&&s<=57&&45===n.charCodeAt(0)?i+="\\".concat(s.toString(16)," "):i+=0!==o||1!==r||45!==s?s>=128||45===s||95===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?n.charAt(o):"\\".concat(n.charAt(o)):"\\-":i+="�"}return i}function Ui(e){return ji(e)}var Fi=[{name:"explicitTrackingAttribute",try:function(e,t){var n=t.config.explicitTrackingAttribute,r=e.getAttribute(n);return null===r||""===r?null:"[".concat(n,"=").concat(JSON.stringify(r),"]")}},{name:"stableId",try:function(e,t){var n=Di(e,t.config);return null===n?null:"".concat(e.tagName.toLowerCase(),"#").concat(Ui(n))}}];function qi(e,t,n){var r,i,o,s,a;void 0===n&&(n={});var u=null!==(o=n.strategies)&&void 0!==o?o:Fi,c=null!==(a=null!==(s=n.scope)&&void 0!==s?s:e.ownerDocument)&&void 0!==a?a:document,d={scope:c,config:t},f=function(e,t){var n=[],r=e;for(;null!==r&&(n.push(r),!(void 0!==t&&n.length>t));)r=r.parentElement;return n}(e,t.maxAncestorWalkDepth);try{for(var v=l(u),p=v.next();!p.done;p=v.next())for(var h=p.value,g=0;g<f.length;g++){var m=f[g],y=h.try(m,d);if(null!==y)if(0!==g){var b=Ni(0,f.slice(0,g).reverse()),w="".concat(y," > ").concat(b);if(Bi(c,w,e,h.name,n.logger))return w}else if(Bi(c,y,e,h.name,n.logger))return y}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}return null}function Bi(e,t,n,r,i){var o;try{o=e.querySelectorAll(t)}catch(e){var s=e instanceof Error?e.message:String(e);return null==i||i.debug('@amplitude/element-selector: strategy "'.concat(r,'" emitted a malformed selector "').concat(t,'" (').concat(s,")")),!1}return 1===o.length&&o[0]===n}function Hi(e){var t=e.tagName.toLowerCase(),n=e.parentElement;if(null===n)return t;var r=function(e,t){for(var n=0,r=0;r<t.children.length;r++){var i=t.children[r];if(i.tagName===e.tagName&&(n+=1,i===e))return n}return 1}(e,n);return"".concat(t,":nth-of-type(").concat(r,")")}function Vi(e,t,n){var r;try{r=e.querySelectorAll(t)}catch(e){return!1}return 1===r.length&&r[0]===n}var zi=function(){function e(e,t){this.value=e,this.optimized=t}return e.prototype.toString=function(){return this.value},e}(),Wi=function(e,t,n){var r,i;if(e.nodeType!==Node.ELEMENT_NODE)return null;var o=e.getAttribute("id");if(t){if(o)return new zi(Ki(o),!0);var s=e.tagName.toLowerCase();if("body"===s||"head"===s||"html"===s)return new zi(s,!0)}var a=e.tagName.toLowerCase();if(o)return new zi(a+Ki(o),!0);var u=e.parentNode;if(!u||u.nodeType===Node.DOCUMENT_NODE)return new zi(a,!0);for(var c=$i(e),d=!1,f=!1,v=-1,p=-1,h=u.children,g=0;h&&(-1===v||!f)&&g<h.length;++g){var m=h[g];if(m.nodeType===Node.ELEMENT_NODE)if(p+=1,m!==e){if(!f&&m.tagName.toLowerCase()===a){d=!0;var y=new Set(c);if(y.size)for(var b=$i(m),w=0;w<b.length;++w){var E=b[w];if(y.has(E)&&(y.delete(E),!y.size)){f=!0;break}}else f=!0}}else v=p}var S=a;if(n&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(S+="[type="+ji(e.getAttribute("type")||"")+"]"),f)S+=":nth-child("+String(v+1)+")";else if(d)try{for(var k=l(c),T=k.next();!T.done;T=k.next()){S+="."+ji(T.value.slice(1))}}catch(e){r={error:e}}finally{try{T&&!T.done&&(i=k.return)&&i.call(k)}finally{if(r)throw r.error}}return new zi(S,!1)},$i=function(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]},Ki=function(e){return"#"+ji(e)};function Ji(e,t){try{return function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var n=[],r=e;r;){var i=Wi(r,Boolean(t),r===e);if(!i)break;if(n.push(i),i.optimized)break;r=r.parentElement}return n.reverse(),n.join(" > ")}(e)}catch(e){var n=e instanceof Error?e.message:String(e);return null==t||t.warn("@amplitude/element-selector: legacyCssPath threw — emitting empty selector: ".concat(n)),""}}var Gi,Yi=Object.freeze({enabled:!1,explicitTrackingAttribute:"data-amp-track-id",autogeneratedIdPatterns:f([],d([/^:r[0-9a-z]+:$/,/^radix-/,/^headlessui-/,/^mui-/,/^[a-f0-9]{16,}$/i,/-\d{8,}$/,/\d{4,}/]),!1),unstableClassPatterns:f([],d([/^(p|m|px|py|mx|my|pt|pb|pl|pr|mt|mb|ml|mr)-\d+$/,/^(w|h|min-w|max-w|min-h|max-h)-/,/^(text|bg|border|ring|fill|stroke)-/,/^(hover|focus|active|disabled|group-hover):/,/^(sm|md|lg|xl|2xl):/,/^z-\d+$/,/^data-\[/,/^\[/,/^css-[a-z0-9]{6,}$/,/^[a-zA-Z]+_[a-zA-Z0-9]{3,}__[a-zA-Z0-9]{5,}$/,/^sc-[a-zA-Z0-9]{6,}$/,/^jsx-\d+$/,/^swiper-slide-(visible|fully-visible|active|prev|next|duplicate)$/,/^is-(active|open|selected|hovered|focused|expanded)$/,/^Mui[A-Z][a-zA-Z]+-(focused|selected|disabled|expanded|focusVisible|active|checked)$/,/^Mui-(selected|focused|disabled|expanded|focusVisible|active|checked)$/,/^data-state-/]),!1),maxAncestorWalkDepth:void 0});function Xi(e,t){if(!e)return Qi();var n,r=Qi();return"boolean"==typeof e.enabled&&(r.enabled=e.enabled),"string"==typeof e.explicitTrackingAttribute&&""!==e.explicitTrackingAttribute&&(r.explicitTrackingAttribute=e.explicitTrackingAttribute),Array.isArray(e.autogeneratedIdPatterns)&&(r.autogeneratedIdPatterns=function(e,t){var n,r,i=[];try{for(var o=l(e),s=o.next();!s.done;s=o.next()){var a=s.value;try{i.push(new RegExp(a))}catch(e){var u=e instanceof Error?e.message:String(e);null==t||t.warn('@amplitude/element-selector: ignoring invalid autogenerated-id pattern "'.concat(a,'" (').concat(u,")"))}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(e.autogeneratedIdPatterns,t)),Array.isArray(e.unstableClassPatterns)&&(r.unstableClassPatterns=function(e,t){var n,r,i=[];try{for(var o=l(e),s=o.next();!s.done;s=o.next()){var a=s.value;try{i.push(new RegExp(a))}catch(e){var u=e instanceof Error?e.message:String(e);null==t||t.warn('@amplitude/element-selector: ignoring invalid unstable-class pattern "'.concat(a,'" (').concat(u,")"))}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(e.unstableClassPatterns,t)),r.maxAncestorWalkDepth="number"!=typeof(n=e.maxAncestorWalkDepth)?void 0:Number.isFinite(n)?n<=0?void 0:Math.floor(n):void 0,r}function Qi(){return{enabled:Yi.enabled,explicitTrackingAttribute:Yi.explicitTrackingAttribute,autogeneratedIdPatterns:f([],d(Yi.autogeneratedIdPatterns),!1),unstableClassPatterns:f([],d(Yi.unstableClassPatterns),!1),maxAncestorWalkDepth:Yi.maxAncestorWalkDepth}}function Zi(e,t){void 0===t&&(t={});var n=e,r=new Set,i=t.logger,o={strategies:t.strategies,scope:t.scope,logger:i};return{generate:function(e){var r,s;if(!n.enabled)return Ji(e,i);try{var a=qi(e,n,o);return null!==a?a:function(e,t,n){var r,i;void 0===n&&(n={});for(var o=null!==(i=null!==(r=n.scope)&&void 0!==r?r:e.ownerDocument)&&void 0!==i?i:document,s=[],a=e,u=0;null!==a&&!(void 0!==t.maxAncestorWalkDepth&&u>t.maxAncestorWalkDepth);){var c=Di(a,t);if(null!==c){var l=f(["".concat(a.tagName.toLowerCase(),"#").concat(Ui(c))],d(s),!1).join(" > ");if(Vi(o,l,e))return l}s.unshift(Hi(a)),a=a.parentElement,u+=1}return s.join(" > ")}(e,n,{scope:null!==(s=null!==(r=t.scope)&&void 0!==r?r:e.ownerDocument)&&void 0!==s?s:document})}catch(t){var u=t instanceof Error?t.message:String(t);return null==i||i.warn("@amplitude/element-selector: strategy chain threw — falling back to legacy cssPath: ".concat(u)),Ji(e,i)}},getConfig:function(){return n},updateConfig:function(e){var t,o;n=e;try{for(var s=l(r),a=s.next();!a.done;a=s.next()){var u=a.value;try{u(e)}catch(e){var c=e instanceof Error?e.message:String(e);null==i||i.warn("@amplitude/element-selector: onConfigChange subscriber threw — ".concat(c))}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}},onConfigChange:function(e){return r.add(e),function(){r.delete(e)}}}}var eo,to=function(e,t){var n,r,i,o=this;this.replaceSensitiveString=function(e){return Kt(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,i,s,a=performance.now();if(!e)return[];for(var u=function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e),c=new Map,v=u.length-1;v>=0;v--){var p=u[v];if(p){var h=vi(p.getAttribute(ci)),g=v===u.length-1?[]:null!==(r=c.get(u[v+1]))&&void 0!==r?r:new Set,m=new Set(f(f([],d(g),!1),d(h),!1));c.set(p,m)}}s=u.map(function(e){var t;return Li(e,null!==(t=c.get(e))&&void 0!==t?t:new Set)});var y=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var n=d(t,2),r=n[0],i=n[1];e.attrs&&(e.attrs[r]=o.replaceSensitiveString(i))})};try{for(var b=l(s),w=b.next();!w.done;w=b.next())y(w.value)}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=b.return)&&n.call(b)}finally{if(t)throw t.error}}var E=performance.now();return null===(i=o.diagnosticsClient)||void 0===i||i.recordHistogram("autocapturePlugin.getHierarchy",E-a),s},this.getNearestLabel=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?o.getText(t):o.getNearestLabel(n)},this.getElementPath=function(e){var t;if(!e)return"";var n=performance.now(),r=o.selectorEngine.generate(e),i=performance.now();return null===(t=o.diagnosticsClient)||void 0===t||t.recordHistogram("autocapturePlugin.getElementPath",i-n),r},this.updateSelectorConfig=function(e,t){o.selectorEngine.updateConfig(Xi(null!=e?e:void 0,t))},this.getEventProperties=function(e,t,n){var r,i,s,a,u,c,l=null===(s=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===s?void 0:s.call(i),f="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},v=o.getHierarchy(t),p=null===(a=v[0])||void 0===a?void 0:a.attrs,h=o.getNearestLabel(t),g=(u=null!=p?p:{},c=n,Object.entries(u).reduce(function(e,t){var n=d(t,2),r=n[0],i=n[1];if(r.startsWith(c)){var o=r.replace(c,"");o&&(e[o]=i||"")}return e},{})),m=((r={})["[Amplitude] Element Hierarchy"]=v,r[ri]=l,r[ii]=o.getText(t),r["[Amplitude] Element Position Left"]=null==f.left?null:Math.round(f.left),r["[Amplitude] Element Position Top"]=null==f.top?null:Math.round(f.top),r["[Amplitude] Element Attributes"]=g,r["[Amplitude] Element Path"]=o.getElementPath(t),r["[Amplitude] Element Parent Label"]=h,r[oi]=Ce(window.location.href.split("?")[0]),r["[Amplitude] Page Title"]=Jt(o.replaceSensitiveString),r[si]=window.innerHeight,r[ai]=window.innerWidth,r),y=hi();if(y&&(m[ui]=y),m["[Amplitude] Element ID"]=t.getAttribute("id")||"",m["[Amplitude] Element Class"]=t.getAttribute("class"),m["[Amplitude] Element Aria Label"]=null==p?void 0:p["aria-label"],"a"===l&&"click"===e&&t instanceof HTMLAnchorElement){var b=t.href.substring(0,128);m["[Amplitude] Element Href"]=o.replaceSensitiveString(b)}return pi(m)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,i){void 0===i&&(i=!1);var s=o.addTypeAndTimestamp(e,t);if(function(e){return"click"===e.type||"change"===e.type}(s)&&null!==s.event.target){if(i){var a=function(e,t){var n,r=null===(n=null===window||void 0===window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,e);return"pointer"===(null==r?void 0:r.getPropertyValue("cursor"))&&"click"===t}(s.event.target,s.type);if(a)return s.closestTrackedAncestor=s.event.target,s.targetElementProperties=o.getEventProperties(s.type,s.closestTrackedAncestor,r),s}var u=gi(s.event.target,n);return u&&(s.closestTrackedAncestor=u,s.targetElementProperties=o.getEventProperties(s.type,u,r)),s}return s},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var n=document.documentElement;return e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector?n.querySelector(e.selector):n}}catch(e){return}}(e,t);if(!n)return;return"TEXT"===e.elementExtractType?o.getText(n):"ATTRIBUTE"===e.elementExtractType&&e.attribute?n.getAttribute(e.attribute):void 0}},this.getTextWithMaskedDescendants=function(e){var t,n,r="[".concat(Ht,"], [contenteditable]");if(!e.querySelector(r))return e.innerText;var i="",s=Array.from(e.childNodes);try{for(var a=l(s),u=a.next();!u.done;u=a.next()){var c=u.value;c.nodeType!==Node.TEXT_NODE?c instanceof Element&&(c.hasAttribute(Ht)||c.hasAttribute("contenteditable")?i+=Vt:i+=o.getTextWithMaskedDescendants(c)):i+=c.textContent||""}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},this.getText=function(e){if(null!==e.closest("[".concat(Ht,"]")))return Vt;var t="";return t=e.querySelector("[".concat(Ht,"], [contenteditable]"))?o.getTextWithMaskedDescendants(e):e.innerText||"",o.replaceSensitiveString(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){var t,n,r;if(!e)return{};var i=null===(r=null===(n=null==e?void 0:e.tagName)||void 0===n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n),s=((t={})[ri]=i,t[ii]=o.getText(e),t[oi]=window.location.href.split("?")[0],t);return pi(s)},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient,this.selectorEngine=(Gi||(Gi=Zi(Xi())),Gi);var s=null!==(i=e.maskTextRegex)&&void 0!==i?i:[],a=[];try{for(var u=l(s),c=u.next();!c.done;c=u.next()){var v=c.value;if(a.length>=25)break;if(v instanceof RegExp)a.push(v);else if("pattern"in v&&"string"==typeof v.pattern)try{a.push(new RegExp(v.pattern,"i"))}catch(e){}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=a};function no(e,t){var n=e.remoteConfigClient;if(e.fetchRemoteConfig&&n){var r=n.subscribe("configs.analyticsSDK.elementSelector","all",function(n){t.updateSelectorConfig(n,e.loggerProvider)});return function(){n.unsubscribe(r)}}}!function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable",e.ScrollObservable="scrollObservable",e.ExposureObservable="exposureObservable",e.BrowserErrorObservable="browserErrorObservable",e.SelectionObservable="selectionObservable",e.MouseMoveObservable="mouseMoveObservable"}(eo||(eo={}));var ro=function(e,t){var n,r,i,o,a,v,p,h,g,m,y,b;void 0===e&&(e={}),null==t||t.diagnosticsClient.setTag("plugin.autocapture.version",ti);var w=e.dataAttributePrefix,E=void 0===w?ht:w,S=e.visualTaggingOptions,k=void 0===S?{enabled:!0}:S;e.cssSelectorAllowlist=null!==(n=e.cssSelectorAllowlist)&&void 0!==n?n:pt,e.actionClickAllowlist=null!==(r=e.actionClickAllowlist)&&void 0!==r?r:gt,e.debounceTime=null!==(i=e.debounceTime)&&void 0!==i?i:0;var T=!1!==(null===(o=e.viewportContentUpdated)||void 0===o?void 0:o.enabled),P=null!==(p=null!==(v=null===(a=e.viewportContentUpdated)||void 0===a?void 0:a.exposureDuration)&&void 0!==v?v:e.exposureDuration)&&void 0!==p?p:150;e.viewportContentUpdated=s(s({},e.viewportContentUpdated),{exposureDuration:P}),e.pageUrlExcludelist=null===(h=e.pageUrlExcludelist)||void 0===h?void 0:h.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(n){return console.warn("Invalid regex pattern: ".concat(t.pattern),n),e}return e},[]);var x,I="@amplitude/plugin-autocapture-browser",A=[],_=new to(e,t),O=new Set,C=new Set,R=function(){var t,n,r=hn(Ei().map(function(t){return _.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,E)})),i=hn(new fn(function(t){var n,r=function(n){var r=_.addAdditionalEventProperties(n,"change",e.cssSelectorAllowlist,E);t.next(r)};return null===(n=H())||void 0===n||n.document.addEventListener("change",r,{capture:!0}),function(){var e;return null===(e=H())||void 0===e?void 0:e.document.removeEventListener("change",r)}}));window.navigation&&(n=hn(new fn(function(t){var n=function(n){var r=_.addAdditionalEventProperties(n,"navigate",e.cssSelectorAllowlist,E);t.next(r)};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}})));var o=hn(wi().map(function(t){return _.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,E)})),s=new fn(function(e){var t,n=function(t){e.next(t)};return null===(t=H())||void 0===t||t.addEventListener("scroll",n),function(){var e;null===(e=H())||void 0===e||e.removeEventListener("scroll",n)}}),a=function(e,t){return new fn(function(n){var r,i=H();if(!(null==i?void 0:i.IntersectionObserver))return function(){};var o=new IntersectionObserver(function(e){e.forEach(function(e){n.next(e)})},{root:null,rootMargin:"0px",threshold:1}),s=t.join(",");(null!==(r=null==i?void 0:i.document.querySelectorAll(s))&&void 0!==r?r:[]).forEach(function(e){o.observe(e)});var a=e.subscribe(function(e){return e.event.forEach(function(e){return e.addedNodes.forEach(function(e){e instanceof Element&&(e.matches(s)&&o.observe(e),e.querySelectorAll(s).forEach(function(e){o.observe(e)}))})})});return function(){a.unsubscribe(),o.disconnect()}})}(o,e.cssSelectorAllowlist);return(t={})[eo.ChangeObservable]=i,t[eo.ClickObservable]=r,t[eo.MutationObservable]=o,t[eo.NavigateObservable]=n,t[eo.ScrollObservable]=s,t[eo.ExposureObservable]=a,t},L=Pi(Object.values(null!==(m=null===(g=e.pageActions)||void 0===g?void 0:g.labeledEvents)&&void 0!==m?m:{})),D=xi(null!==(b=null===(y=e.pageActions)||void 0===y?void 0:y.triggers)&&void 0!==b?b:[]),N=function(e,t,n,r){return new Ai(e,t,n,r)}(L,D,_,e);return{name:I,type:"enrichment",setup:function(t,n){return u(void 0,void 0,void 0,function(){var r,i,o,a,u,l,v,p,h,g,m,y,b,w,S,M,j,U,F,q,B,V;return c(this,function(c){return"undefined"==typeof document||(r=!1,i={maxX:void 0,maxY:void 0},t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(t){!function(t){var n,r;t&&(e.pageActions=s(s({},e.pageActions),t),L=Pi(Object.values(null!==(n=e.pageActions.labeledEvents)&&void 0!==n?n:{})),D=xi(null!==(r=e.pageActions.triggers)&&void 0!==r?r:[]),N.update(L,D,e))}(t)}):t.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),(o=no(t,_))&&A.push({unsubscribe:o}),a=fi(e,e.cssSelectorAllowlist),u=fi(e,e.actionClickAllowlist),l=R(),v=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackEvent,i=e.evaluateTriggers;return n.clickObservable.filter(mi).filter(function(e){return r("click",e.closestTrackedAncestor)}).map(function(e){return i(e)}).subscribe(function(e){null==t||t.track(ni,e.targetElementProperties)})}({allObservables:l,amplitude:n,shouldTrackEvent:a,evaluateTriggers:N.evaluate.bind(N)}),A.push(v),p=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers;return n.changeObservable.filter(mi).filter(function(e){return i("change",e.closestTrackedAncestor)}).map(function(e){return o(e)}).subscribe(function(e){null==t||t.track("[Amplitude] Element Changed",r("change",e.closestTrackedAncestor))})}({allObservables:l,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _.getEventProperties.apply(_,f(f([],d(e),!1),[E],!1))},amplitude:n,shouldTrackEvent:a,evaluateTriggers:N.evaluate.bind(N)}),A.push(p),h=function(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,s=e.shouldTrackActionClick,a=n.clickObservable,u=n.mutationObservable,c=n.navigateObservable,l=a.filter(function(e){return!o("click",e.closestTrackedAncestor)}).map(function(e){var t=gi(e.event.target,r.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=i(e.type,e.closestTrackedAncestor)),e}).filter(mi).filter(function(e){return s("click",e.closestTrackedAncestor)}),d=c?pn(u,c):u,f=pn(l,d),v=null,p=null;return vn(f,function(e){if(v&&(clearTimeout(v),v=null),"click"===e.type)return p=e,v=setTimeout(function(){v=null,p=null},500),Promise.resolve(null);if(p){var t=p;return p=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==t||t.track(ni,i("click",e.closestTrackedAncestor)))})}({allObservables:l,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _.getEventProperties.apply(_,f(f([],d(e),!1),[E],!1))},amplitude:n,shouldTrackEvent:a,shouldTrackActionClick:u}),h&&A.push(h),g=function(e){e.amplitude;var t=e.allObservables.scrollObservable,n={maxX:0,maxY:0},r=t.subscribe(function(){var e,t,r,i,o=H(),s=Math.floor(null!==(t=null!==(e=null==o?void 0:o.scrollX)&&void 0!==e?e:null==o?void 0:o.pageXOffset)&&void 0!==t?t:0),a=Math.floor(null!==(i=null!==(r=null==o?void 0:o.scrollY)&&void 0!==r?r:null==o?void 0:o.pageYOffset)&&void 0!==i?i:0);n.maxX=Math.max(n.maxX,s),n.maxY=Math.max(n.maxY,a)});return{unsubscribe:function(){r.unsubscribe()},getState:function(){return n},reset:function(){n.maxX=0,n.maxY=0}}}({allObservables:l,amplitude:n}),A.push(g),m={},y=H(),b=function(e){e&&r||(setTimeout(function(){r=!1},100),r=!0,function(e){var t,n,r,i,o,s,a=e.amplitude,u=e.scrollTracker,c=e.currentElementExposed,l=e.elementExposedForPage,d=e.exposureTracker,f=e.isPageEnd,v=e.lastScroll,p=u.getState(),h=H(),g=null!==(n=null==h?void 0:h.innerWidth)&&void 0!==n?n:0,m=null!==(r=null==h?void 0:h.innerHeight)&&void 0!==r?r:0,y=((t={})[oi]=Ce(null!==(s=null===(o=null===(i=null==h?void 0:h.location)||void 0===i?void 0:i.href)||void 0===o?void 0:o.split("?")[0])&&void 0!==s?s:""),t["[Amplitude] Max Page X"]=p.maxX+g,t["[Amplitude] Max Page Y"]=p.maxY+m,t[si]=m,t[ai]=g,t["[Amplitude] Element Exposed"]=Array.from(c),t),b=hi();b&&(y[ui]=b),0!==c.size||p.maxX!==v.maxX||p.maxY!==v.maxY?(null==a||a.track("[Amplitude] Viewport Content Updated",y),v.maxX=p.maxX,v.maxY=p.maxY,c.clear(),f&&(u.reset(),l.clear(),null==d||d.reset())):f&&(u.reset(),l.clear(),null==d||d.reset())}({amplitude:n,scrollTracker:g,currentElementExposed:C,elementExposedForPage:O,exposureTracker:m.exposure,isPageEnd:e,lastScroll:i}))},w=function(e){!function(e,t,n,r){if(!t.has(e)){t.add(e),n.add(e);var i=Array.from(n);JSON.stringify(i).length>=18e3&&r(!1)}}(e,O,C,b)},T&&(m.exposure=function(e){var t=e.allObservables,n=e.onExposure,r=e.dataExtractor,i=e.exposureDuration,o=void 0===i?150:i,s=new Map,a=new Map,u=t.exposureObservable.subscribe(function(e){var t=e,i=t.target;if(t.isIntersecting){if(!s.get(i)){var u=setTimeout(function(){s.set(i,!0);var e=r.getElementPath(i);n(e),a.set(i,null)},o);a.set(i,u)}}else!t.isIntersecting&&t.intersectionRatio<1&&(u=a.get(i))&&(clearTimeout(u),a.set(i,null))});return{unsubscribe:function(){u.unsubscribe()},reset:function(){a.forEach(function(e){e&&clearTimeout(e)}),a.clear(),s.clear()}}}({allObservables:l,onExposure:w,dataExtractor:_,exposureDuration:P}),m.exposure&&A.push(m.exposure),S=function(){b(!0)},null==y||y.addEventListener("beforeunload",S),x=function(){null==y||y.removeEventListener("beforeunload",S)},A.push({unsubscribe:function(){return x()}}),(M=l[eo.NavigateObservable])?A.push(M.subscribe(function(){b(!0)})):y&&(j=function(){b(!0)},y.addEventListener("popstate",j),U=y.history.pushState,y.history&&U&&(y.history.pushState=new Proxy(U,{apply:function(e,t,n){var r=d(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),b(!0)}})),A.push({unsubscribe:function(){y.removeEventListener("popstate",j),y.history&&U&&(y.history.pushState=U)}}))),null===(V=null==t?void 0:t.loggerProvider)||void 0===V||V.log("".concat(I," has been successfully added.")),window.opener&&k.enabled&&(F=e.cssSelectorAllowlist,q=e.actionClickAllowlist,function(e,t){var n=e;if(!0!==n[yi]){n[yi]=!0;var r=t.dataExtractor,i=t.isElementSelectable,o=t.cssSelectorAllowlist,s=t.actionClickAllowlist,a=null,u=function(t){e.notify({action:"element-selected",data:t})},c=function(t,n){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:n}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:n})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce("https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz").then(function(){var n;a=null===(n=null===window||void 0===window?void 0:window.amplitudeVisualTaggingSelector)||void 0===n?void 0:n.call(window,{getEventTagProps:r.getEventTagProps,isElementSelectable:function(e){return!i||i((null==t?void 0:t.actionType)||"click",e)},onTrack:c,onSelect:u,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:e,cssSelectorAllowlist:o,actionClickAllowlist:s,extractDataFromDataSource:r.extractDataFromDataSource,dataExtractor:r,diagnostics:{autocapture:{version:ti}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null===(e=null==a?void 0:a.close)||void 0===e||e.call(a)})}}(B=_n(),{dataExtractor:_,isElementSelectable:fi(e,f(f([],d(F),!1),d(q),!1)),cssSelectorAllowlist:F,actionClickAllowlist:q}),function(e,t){var n,r=e;if(!0!==r[On]){r[On]=!0;var i=null!==(n=null==t?void 0:t.scriptUrl)&&void 0!==n?n:"https://cdn.amplitude.com/libs/background-capture-1.0.1.js.gz",o=null,s=function(t,n){var r,i;"background-capture-complete"===t&&(null===(i=null===(r=e.logger)||void 0===r?void 0:r.debug)||void 0===i||i.call(r,"Background capture complete"),e.notify({action:"background-capture-complete",data:n}))};e.registerActionHandler("initialize-background-capture",function(){var t,n;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Initializing background capture (external script)");var r=new URL(i,e.endpoint).toString();e.loadScriptOnce(r).then(function(){var t,n,r;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Background capture script loaded (external)"),o=null===(r=null===window||void 0===window?void 0:window.amplitudeBackgroundCapture)||void 0===r?void 0:r.call(window,{messenger:e,onBackgroundCapture:s}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null===(e=null==o?void 0:o.close)||void 0===e||e.call(o),o=null})}}(B),B.setup(s({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:Pn[t.serverZone]})))),[2]})})},execute:function(e){return u(void 0,void 0,void 0,function(){return c(this,function(t){return[2,e]})})},teardown:function(){return u(void 0,void 0,void 0,function(){var e,t,n,r;return c(this,function(i){try{for(e=l(A),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return[2]})})}}},io=["mutation","navigate"];function oo(e,t){var n,r,i,o,s=t.event,a=s.pageX,u=s.pageY;e.yMin=Math.min(null!==(n=e.yMin)&&void 0!==n?n:u,u),e.yMax=Math.max(null!==(r=e.yMax)&&void 0!==r?r:u,u),e.xMin=Math.min(null!==(i=e.xMin)&&void 0!==i?i:a,a),e.xMax=Math.max(null!==(o=e.xMax)&&void 0!==o?o:a,a),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function so(e){if(0===e.length)return null;var t=e[0],n=e[e.length-1];return{rageClickEvent:s({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(n.timestamp).toISOString(),"[Amplitude] Duration":n.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties),time:t.timestamp}}function ao(e){var t=this,n=e.amplitude,r=e.allObservables,i=e.shouldTrackRageClick,o=r.clickObservable,s=r.selectionObservable,a=[],l={},d=null;function f(e){a=[],l={},e&&(oo(l,e),a.push(e))}var v=vn(o.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return u(t,void 0,void 0,function(){var t;return c(this,function(n){return oo(l,e),t=null,0===a.length||function(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}(a,e)||function(e,t){var n=e[Math.max(0,e.length-4+1)];return t.timestamp-n.timestamp>=1e3}(a,e)||l.isOutOfBounds?(d&&(t=so(a)),f(e)):a.push(e),d&&(clearTimeout(d.timerId),d.resolve(t),d=null),a.length>=4?[2,new Promise(function(e){d={resolve:e,timerId:setTimeout(function(){e(so(a))},1e3)}})]:[2,null]})})}),p=null==s?void 0:s.subscribe(function(){f()}),h=v.subscribe(function(e){null!==e&&n.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){h.unsubscribe(),null==p||p.unsubscribe()}}}var uo,co;!function(e){e.INCREASING="increasing",e.DECREASING="decreasing"}(uo||(uo={})),function(e){e.X="x",e.Y="y"}(co||(co={}));function lo(e){var t=e.changes,n=e.changesThreshold,r=e.thresholdMs;return!(t.length<n)&&t[t.length-1]-t[0]<r}function fo(e){e.changes=[],e.startTime=void 0}function vo(e){for(var t=e.changes,n=e.thresholdMs,r=0,i=t[t.length-1];r<t.length;r++){if(i-t[r]<n)break}0!==r&&(e.startTime=t[r],e.changes.splice(0,r))}var po=function(e){var t=e.mouseDirectionChangeObservable,n=e.directionChanges,r=void 0===n?20:n,i=e.thresholdMs,o=void 0===i?2e3:i;return new fn(function(e){var n={changes:[],changesThreshold:r,thresholdMs:o},i={changes:[],changesThreshold:r,thresholdMs:o},s=void 0,a=null;function u(){void 0!==s&&(e.next(s),s=void 0,null!==a&&clearTimeout(a),fo(n),fo(i))}return t.subscribe(function(e){null!==a&&clearTimeout(a),function(e){var t=+Date.now();e.startTime=e.startTime||t;var n=e.changes,r=e.changesThreshold;n.push(t),n.length>r&&n.shift()}(e===co.X?n:i);var t=function(e,t){var n=void 0;if(lo(e)&&(n=e.startTime),lo(t)){var r=t.startTime;r&&(!n||r<n)&&(n=r)}return n}(n,i);return t?(s=s||t,a=setTimeout(function(){u(),a=null},o)):u(),vo(n),vo(i),function(){null!==a&&(clearTimeout(a),a=null)}})})},ho=function(e){var t=e.amplitude,n=e.options,r=e.allObservables,i=e.directionChanges,o=void 0===i?20:i,s=e.thresholdMs,a=void 0===s?2e3:s,u=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new fn(function(e){var n=null,r=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};null!==n?(o.x>n.x?(r===uo.DECREASING&&e.next(co.X),r=uo.INCREASING):o.x<n.x&&(r===uo.INCREASING&&e.next(co.X),r=uo.DECREASING),o.y>n.y?(i===uo.DECREASING&&e.next(co.Y),i=uo.INCREASING):o.y<n.y&&(i===uo.INCREASING&&e.next(co.Y),i=uo.DECREASING),n=o):n=o})})}({allWindowObservables:r});return po({mouseDirectionChangeObservable:u,directionChanges:o,thresholdMs:a}).subscribe(function(e){di(n)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})};function go(e,t,n,r){if(!r)return[];var i=e[t];return"object"==typeof i&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n}var mo=4e3,yo=function(e){var t;void 0===e&&(e={});var n="@amplitude/plugin-frustration-browser",r=[],i=!1!==e.errorClicks;e.errorClicks||(i=!1);var o=!1!==e.deadClicks&&null!==e.deadClicks,a=!1!==e.rageClicks&&null!==e.rageClicks,v=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(v=!1);var p=go(e,"rageClicks",wt,a),h=go(e,"deadClicks",yt,o),g=go(e,"errorClicks",bt,i),m=null!==(t=e.dataAttributePrefix)&&void 0!==t?t:ht,y=new to(e),b=f([],d(new Set(f(f(f([],d(p),!1),d(h),!1),d(g),!1))),!1),w=function(){var e,t,n=hn(Ei("pointerdown").map(function(e){return y.addAdditionalEventProperties(e,"click",b,m,!0)})),r=hn(Si().map(function(e){return y.addTypeAndTimestamp(e,"error")})),i=hn(wi().map(function(e){return y.addAdditionalEventProperties(e,"mutation",b,m)}));window.navigation&&(t=hn(new fn(function(e){var t=function(t){e.next(s(s({},t),{type:"navigate"}))};return window.navigation.addEventListener("navigate",t),function(){window.navigation.removeEventListener("navigate",t)}}).map(function(e){return y.addAdditionalEventProperties(e,"navigate",b,m)})));var o=hn(new fn(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){try{if(t.selectionStart===t.selectionEnd)return}catch(e){return}return e.next()}var n=window.getSelection();if(n&&!n.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),a=hn(new fn(function(e){var t=function(t){e.next(t)},n={capture:!0};return bi.document.addEventListener("mousemove",t,n),function(){bi.document.removeEventListener("mousemove",t,n)}}));return(e={})[eo.ClickObservable]=n,e[eo.MutationObservable]=i,e[eo.NavigateObservable]=t,e[eo.BrowserErrorObservable]=r,e[eo.SelectionObservable]=o,e[eo.MouseMoveObservable]=a,e};return{name:n,type:"enrichment",setup:function(t,l){return u(void 0,void 0,void 0,function(){var u,d,f,b,E,S,k,T,P,x,I,A;return c(this,function(c){return"undefined"==typeof document||(u=w(),(d=no(t,y))&&r.push({unsubscribe:d}),a&&(f=fi(e,p),b=ao({allObservables:u,amplitude:l,shouldTrackRageClick:f}),r.push(b)),o&&(E=fi(e,h),S=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackDeadClick,o=n.clickObservable,a=n.mutationObservable,u=n.navigateObservable,c=o.filter(function(e){return mi(e)&&i("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ei.LEFT_OR_TOUCH_CONTACT}),l=u?pn(a,u):a,d=pn(c,l),f=null;return vn(d,function(e){return f&&io.includes(e.type)?(clearTimeout(f),f=null,Promise.resolve(null)):"click"===e.type?f?Promise.resolve(null):new Promise(function(t){f=setTimeout(function(){t(e),f=null},3e3)}):Promise.resolve(null)}).subscribe(function(e){if(e){var n={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};t.track("[Amplitude] Dead Click",s(s({},r("click",e.closestTrackedAncestor)),n),{time:e.timestamp})}})}({amplitude:l,allObservables:u,getEventProperties:function(e,t){return y.getEventProperties(e,t,m)},shouldTrackDeadClick:E}),r.push(S)),i&&(k=fi(e,g),T=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackErrorClick,i=n.clickObservable,o=n.browserErrorObservable,a=i.filter(function(e){return mi(e)&&r("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ei.LEFT_OR_TOUCH_CONTACT}),u=null,c=null,l=function(){null!==u&&(clearTimeout(u),u=null),c=null};return pn(a,o).subscribe(function(e){var n;if("click"===e.type)return l(),c=e,void(u=setTimeout(l,2e3));"error"===e.type&&c&&(t.track("[Amplitude] Error Click",s(((n={})["[Amplitude] Kind"]=e.event.kind,n["[Amplitude] Message"]=e.event.message,n["[Amplitude] Stack"]=e.event.stack,n["[Amplitude] Filename"]=e.event.filename,n["[Amplitude] Line Number"]=e.event.lineNumber,n["[Amplitude] Column Number"]=e.event.columnNumber,n),c.targetElementProperties)),l())})}({amplitude:l,allObservables:u,shouldTrackErrorClick:k}),r.push(T)),v&&(P=void 0,x=void 0,"object"==typeof e.thrashedCursor&&(P=e.thrashedCursor.directionChanges,x=e.thrashedCursor.threshold,P&&P<5&&(t.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(P," is below the minimum of ").concat(5,", setting to ").concat(5)),P=5),x&&x>mo&&(t.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(x," is above the maximum of ").concat(mo,", setting to ").concat(mo)),x=mo)),I=ho({amplitude:l,options:e,allObservables:u,directionChanges:P,thresholdMs:x}),r.push(I)),null===(A=null==t?void 0:t.loggerProvider)||void 0===A||A.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return u(void 0,void 0,void 0,function(){return c(this,function(t){return[2,e]})})},teardown:function(){return u(void 0,void 0,void 0,function(){var e,t,n,i;return c(this,function(o){try{for(e=l(r),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}return[2]})})}}};function bo(e,t){var n=e.startTime+e.duration;return t.filter(function(t){return t.startTime<n&&t.startTime+t.duration>e.startTime}).map(function(e){return e.name})}function wo(e,t){var n,r=bo(e,t),i=null!==(n=e.scripts)&&void 0!==n?n:[],o=i.map(function(e){return e.sourceURL}).filter(Boolean),a=i.map(function(e){return e.sourceFunctionName}).filter(Boolean),u=i.map(function(e){return e.sourceCharPosition}).filter(function(e){return"number"==typeof e&&e>=0}),c=i.map(function(e){return e.invokerType}).filter(Boolean),l=i.map(function(e){return e.invoker}).filter(Boolean);return s(s(s(s(s(s(s({"[Amplitude] Main Thread Block Source":"long-animation-frame","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.blockingDuration,"[Amplitude] Main Thread Block Start Time":e.startTime},r.length>0&&{"[Amplitude] Main Thread Block Measures":r}),{"[Amplitude] Main Thread Block Render Start":e.renderStart,"[Amplitude] Main Thread Block Style And Layout Start":e.styleAndLayoutStart,"[Amplitude] Main Thread Block Script Count":i.length}),o.length>0&&{"[Amplitude] Main Thread Block Script URLs":o}),a.length>0&&{"[Amplitude] Main Thread Block Script Functions":a}),u.length>0&&{"[Amplitude] Main Thread Block Script Positions":u}),c.length>0&&{"[Amplitude] Main Thread Block Invoker Types":c}),l.length>0&&{"[Amplitude] Main Thread Block Invokers":l})}function Eo(e,t){var n,r=bo(e,t),i=null!==(n=e.attribution)&&void 0!==n?n:[];return s(s({"[Amplitude] Main Thread Block Source":"long-task","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.duration,"[Amplitude] Main Thread Block Start Time":e.startTime},r.length>0&&{"[Amplitude] Main Thread Block Measures":r}),i.length>0&&{"[Amplitude] Main Thread Block Attribution":i.map(function(e){return e.name})})}function So(e){var t=e.amplitude,n=e.options,r=e.durationThreshold,i=void 0===r?100:r,o=function(){if("undefined"==typeof PerformanceObserver)return null;try{var e=PerformanceObserver.supportedEntryTypes;if(e.includes("long-animation-frame"))return"long-animation-frame";if(e.includes("longtask"))return"longtask"}catch(e){}return null}();if(!o)return{unsubscribe:function(){}};var s=[],a=new PerformanceObserver(function(e){var t,n,r=performance.now();try{for(var i=l(e.getEntries()),o=i.next();!o.done;o=i.next()){var a=o.value;s.push(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}for(var u=r-1e4;s.length>0&&s[0].startTime<u;)s.shift()});try{a.observe({entryTypes:["measure"]})}catch(e){}var u=new PerformanceObserver(function(e){var r,a;try{for(var u=l(e.getEntries()),c=u.next();!c.done;c=u.next()){var d=c.value;if(!di(n))return;if(!(d.duration<i)){var f="long-animation-frame"===o?wo(d,s):Eo(d,s);t.track("[Amplitude] Main Thread Block",f)}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(r)throw r.error}}});try{u.observe({entryTypes:[o]})}catch(e){return a.disconnect(),{unsubscribe:function(){}}}return{unsubscribe:function(){u.disconnect(),a.disconnect()}}}var ko,To,Po=function(e){void 0===e&&(e={});var t="@amplitude/plugin-performance-browser",n=[],r=!0===e.mainThreadBlock||"object"==typeof e.mainThreadBlock&&null!==e.mainThreadBlock;return{name:t,type:"enrichment",setup:function(i,o){return u(void 0,void 0,void 0,function(){var s,a,u;return c(this,function(c){return"undefined"==typeof document||(r&&(s=100,"object"==typeof e.mainThreadBlock&&void 0!==e.mainThreadBlock.durationThreshold&&(s=e.mainThreadBlock.durationThreshold),a=So({amplitude:o,options:e,durationThreshold:s}),n.push(a)),null===(u=null==i?void 0:i.loggerProvider)||void 0===u||u.log("".concat(t," performance tracking has been successfully added."))),[2]})})},execute:function(e){return u(void 0,void 0,void 0,function(){return c(this,function(t){return[2,e]})})},teardown:function(){return u(void 0,void 0,void 0,function(){var e,t,r,i;return c(this,function(o){try{for(e=l(n),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}}},xo="[Amplitude] Network Request",Io="500-599";function Ao(e,t){var n="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(n).test(e)}function _o(e,t){var n,r,i=t.split(",");try{for(var o=l(i),s=o.next();!s.done;s=o.next()){var a=d(s.value.split("-").map(Number),2),u=a[0],c=a[1];if(e===u&&void 0===c)return!0;if(e>=u&&e<=c)return!0}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}function Oo(e){var t;if(e)try{var n=null===(t=H())||void 0===t?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),s=r.href,a=r.host;return r.hash="",r.search="",{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:r.href,host:a}}catch(e){return}}function Co(e){if("object"==typeof e&&null!==e){if(0!==e.length)return e}else{if(e)return f([],d(L),!1);if(void 0===e){return}}}function Ro(e){var t,n,r;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(n=null==e?void 0:e.blocklist)||void 0===n?void 0:n.length)&&!(null===(r=null==e?void 0:e.excludelist)||void 0===r?void 0:r.length)}function Lo(e,t){var n;void 0===t&&(t={});var r=Oo(e.url);if(!r)return!1;var i,o=r.host;if(!1!==t.ignoreAmplitudeRequests&&(Ao(o,"*.amplitude.com")||Ao(o,"amplitude.com")))return!1;if(null===(n=t.ignoreHosts)||void 0===n?void 0:n.find(function(e){return Ao(o,e)}))return!1;if(!t.captureRules&&void 0!==e.status&&!_o(e.status,Io))return!1;if(t.captureRules&&(f([],d(t.captureRules),!1).reverse().find(function(t){if(i=function(e,t,n,r,i){if((!e.hosts||e.hosts.find(function(e){return Ao(t,e)}))&&(!r||!e.urls||Oe(r,e.urls))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e})))return!((n||0===n)&&!_o(n,e.statusCodeRange||Io))}(t,o,e.status,e.url,e.method),i){var n=Co(t.responseHeaders);if(e.responseWrapper&&n){var r=e.responseWrapper.headers(n);r&&(e.responseHeaders=r)}var s=Co(t.requestHeaders);if(e.requestWrapper&&s){var a=e.requestWrapper.headers(s);a&&(e.requestHeaders=a)}if(e.responseWrapper&&t.responseBody&&!Ro(t.responseBody)){var u=t.responseBody.excludelist||t.responseBody.blocklist;e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,u)}if(e.requestWrapper&&t.requestBody&&!Ro(t.requestBody)){u=t.requestBody.excludelist||t.requestBody.blocklist;e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,u)}}return void 0!==i}),!i))return!1;return!e.requestWrapper||!function(e,t){if(e.includes("amplitude.com"))try{var n=t.body;if("string"!=typeof n)return!1;if(JSON.parse(n).events.find(function(e){return e.event_type===xo}))return!0}catch(e){}return!1}(o,e.requestWrapper)}function Do(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider;return t.networkObservable.filter(function(e){return Lo(e.event,n)}).subscribe(function(e){var t,n,o,s=e.event,a=Oo(s.url);if(a){var l=null===(n=s.responseWrapper)||void 0===n?void 0:n.bodySize,f=null===(o=s.requestWrapper)||void 0===o?void 0:o.bodySize;!function(e,t,n,r){u(this,void 0,void 0,function(){var i,o,s;return c(this,function(a){switch(a.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=d.apply(void 0,[a.sent(),2]),o=i[0],s=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==r||r.debug("Failed to stringify request body",e)}if(s)try{e["[Amplitude] Response Body"]=JSON.stringify(s)}catch(e){null==r||r.debug("Failed to stringify response body")}a.label=2;case 2:return null==n||n.track(xo,e),[2]}})})}(((t={})["[Amplitude] URL"]=a.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=a.query,t["[Amplitude] URL Fragment"]=a.fragment,t["[Amplitude] Request Method"]=s.method,t["[Amplitude] Status Code"]=s.status,t["[Amplitude] Start Time"]=s.startTime,t["[Amplitude] Completion Time"]=s.endTime,t["[Amplitude] Duration"]=s.duration,t["[Amplitude] Request Body Size"]=f,t["[Amplitude] Response Body Size"]=l,t["[Amplitude] Request Type"]=s.type,t["[Amplitude] Request Headers"]=s.requestHeaders,t["[Amplitude] Response Headers"]=s.responseHeaders,t),s,r,i)}})}!function(e){e.NetworkObservable="networkObservable"}(ko||(ko={}));var No=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-network-capture-browser",r=function(){var e,n=new fn(function(e){var n=new jt(function(t){var n=function(e,t){return{event:e,timestamp:Date.now(),type:t}}(t,"network");e.next(n)});return qt.subscribe(n,t),function(){qt.unsubscribe(n)}});return(e={})[ko.NetworkObservable]=n,e};return{name:n,type:"enrichment",setup:function(i,o){return u(void 0,void 0,void 0,function(){var s;return c(this,function(a){return"undefined"==typeof document||(s=r(),t=null==i?void 0:i.loggerProvider,To=Do({allObservables:s,networkTrackingOptions:e,amplitude:o,loggerProvider:t}),null==t||t.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return u(void 0,void 0,void 0,function(){return c(this,function(t){return[2,e]})})},teardown:function(){return u(void 0,void 0,void 0,function(){return c(this,function(e){return To.unsubscribe(),[2]})})}}};let Mo=-1;const jo=e=>{addEventListener("pageshow",t=>{t.persisted&&(Mo=t.timeStamp,e(t))},!0)},Uo=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||void 0===i)&&(i=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Fo=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},qo=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Bo=()=>{const e=qo();return e?.activationStart??0},Ho=(e,t=-1)=>{const n=qo();let r="navigate";return Mo>=0?r="back-forward-cache":n&&(document.prerendering||Bo()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Vo=new WeakMap;function zo(e,t){return Vo.get(e)||Vo.set(e,new t),Vo.get(e)}class Wo{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const $o=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Ko=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Jo=-1;const Go=new Set,Yo=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Xo=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of Go)e();isFinite(Jo)||(Jo="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Xo,!0))}},Qo=()=>{if(Jo<0){const e=Bo(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;Jo=t??Yo(),addEventListener("visibilitychange",Xo,!0),addEventListener("prerenderingchange",Xo,!0),jo(()=>{setTimeout(()=>{Jo=Yo()})})}return{get firstHiddenTime(){return Jo},onHidden(e){Go.add(e)}}},Zo=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},es=[1800,3e3],ts=(e,t={})=>{Zo(()=>{const n=Qo();let r,i=Ho("FCP");const o=$o("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-Bo(),0),i.entries.push(t),r(!0)))});o&&(r=Uo(e,i,es,t.reportAllChanges),jo(n=>{i=Ho("FCP"),r=Uo(e,i,es,t.reportAllChanges),Fo(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},ns=[.1,.25];let rs=0,is=1/0,os=0;const ss=e=>{for(const t of e)t.interactionId&&(is=Math.min(is,t.interactionId),os=Math.max(os,t.interactionId),rs=os?(os-is)/7+1:0)};let as;const us=()=>as?rs:performance.interactionCount??0;let cs=0;class ls{u=[];l=new Map;m;p;v(){cs=us(),this.u.length=0,this.l.clear()}L(){const e=Math.min(this.u.length-1,Math.floor((us()-cs)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.u.at(-1);let n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort((e,t)=>t.P-e.P),this.u.length>10){const e=this.u.splice(10);for(const t of e)this.l.delete(t.id)}this.p?.(n)}}}const ds=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=Ko(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},fs=[200,500],vs=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=Qo();Zo(()=>{"interactionCount"in performance||as||(as=$o("event",ss,{type:"event",buffered:!0,durationThreshold:0}));let r,i=Ho("INP");const o=zo(t,ls),s=e=>{ds(()=>{for(const t of e)o.h(t);const t=o.L();t&&t.P!==i.value&&(i.value=t.P,i.entries=t.entries,r())})},a=$o("event",s,{durationThreshold:t.durationThreshold??40});r=Uo(e,i,fs,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(a.takeRecords()),r(!0)}),jo(()=>{o.v(),i=Ho("INP"),r=Uo(e,i,fs,t.reportAllChanges)}))})};class ps{m;h(e){this.m?.(e)}}const hs=[2500,4e3],gs=[800,1800],ms=e=>{document.prerendering?Zo(()=>ms(e)):"complete"!==document.readyState?addEventListener("load",()=>ms(e),!0):setTimeout(e)};function ys(e){var t,n=(null===(t=e.entries[0])||void 0===t?void 0:t.startTime)||0;return performance.timeOrigin+n}function bs(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(ys(e)),navigationStart:Math.floor(performance.timeOrigin)}}var ws,Es=function(){var e=null,t=H(),n=null==t?void 0:t.document,r=null==t?void 0:t.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(t,i){return u(void 0,void 0,void 0,function(){var o,s;return c(this,function(a){return void 0===n||(o=Ce((null==r?void 0:r.href)||"",t.loggerProvider),s={"[Amplitude] Page Domain":(null==r?void 0:r.hostname)||"","[Amplitude] Page Location":o,"[Amplitude] Page Path":Ce((null==r?void 0:r.pathname)||"",t.loggerProvider),"[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":Ce(o.split("?")[0],t.loggerProvider)},((e,t={})=>{Zo(()=>{const n=Qo();let r,i=Ho("LCP");const o=zo(t,ps),s=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)o.h(t),t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-Bo(),0),i.entries=[t],r())},a=$o("largest-contentful-paint",s);if(a){r=Uo(e,i,hs,t.reportAllChanges);const n=Ko(()=>{s(a.takeRecords()),a.disconnect(),r(!0)}),o=e=>{e.isTrusted&&(ds(n),removeEventListener(e.type,o,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addEventListener(e,o,{capture:!0});jo(n=>{i=Ho("LCP"),r=Uo(e,i,hs,t.reportAllChanges),Fo(()=>{i.value=performance.now()-n.timeStamp,r(!0)})})}})})(function(e){s["[Amplitude] LCP"]=bs(e)}),ts(function(e){s["[Amplitude] FCP"]=bs(e)}),vs(function(e){s["[Amplitude] INP"]=bs(e)}),((e,t={})=>{const n=Qo();ts(Ko(()=>{let r,i=Ho("CLS",0);const o=zo(t,Wo),s=e=>{for(const t of e)o.h(t);o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},a=$o("layout-shift",s);a&&(r=Uo(e,i,ns,t.reportAllChanges),n.onHidden(()=>{s(a.takeRecords()),r(!0)}),jo(()=>{o.i=0,i=Ho("CLS",0),r=Uo(e,i,ns,t.reportAllChanges),Fo(()=>r())}),setTimeout(r))}))})(function(e){s["[Amplitude] CLS"]=bs(e)}),((e,t={})=>{let n=Ho("TTFB"),r=Uo(e,n,gs,t.reportAllChanges);ms(()=>{const i=qo();i&&(n.value=Math.max(i.responseStart-Bo(),0),n.entries=[i],r(!0),jo(()=>{n=Ho("TTFB",0),r=Uo(e,n,gs,t.reportAllChanges),r(!0)}))})})(function(e){s["[Amplitude] TTFB"]=bs(e)}),e=function(){"hidden"===n.visibilityState&&e&&(i.track("[Amplitude] Web Vitals",s),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return u(void 0,void 0,void 0,function(){return c(this,function(t){return[2,e]})})},teardown:function(){return u(void 0,void 0,void 0,function(){return c(this,function(t){return e&&(null==n||n.removeEventListener("visibilitychange",e)),[2]})})}}},Ss=function(){function e(e,t){var n,r,i;this.shouldTrackNewCampaign=!1,this.options=s({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:(r=(null===(n=t.cookieOptions)||void 0===n?void 0:n.domain)||t.topLevelDomain,i=r,i?(i.startsWith(".")&&(i=i.substring(1)),[new RegExp("".concat(i.replace(".","\\."),"$"))]):[]),optOut:t.optOut},e),this.storage=t.cookieStorage,this.storageKey=Ue(t.apiKey,"MKTG"),this.webExpStorageKey=Ue(t.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=R,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,this.topLevelDomain=t.topLevelDomain,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return u(this,void 0,void 0,function(){var e,t;return c(this,function(n){switch(n.label){case 0:return this.options.optOut?[2]:[4,this.fetchCampaign()];case 1:return t=d.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||Pe(this.sessionTimeout,this.lastEventTime),Ar(this.currentCampaign,this.previousCampaign,this.options,this.logger,e,this.topLevelDomain)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return u(this,void 0,void 0,function(){var e;return c(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return(e=t.sent())?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||(new Bt).parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,n,r,i,o=(t=this.currentCampaign,n=this.options,r=s(s({},R),t),i=Object.entries(r).reduce(function(e,t){var r,i=d(t,2),o=i[0],s=i[1];return e.setOnce("initial_".concat(o),null!==(r=null!=s?s:n.initialEmptyValue)&&void 0!==r?r:"EMPTY"),s?e.set(o,s):e.unset(o)},new j),$(i));return e&&(o.event_id=e),o},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),ks=new Set([o.IDENTIFY,o.GROUP_IDENTIFY]),Ts=function(e){var t;void 0===e&&(e={});var n,r,i,o,a,l,d=null!==(t=e.fallbackAttributionEvent)&&void 0!==t&&t,f=H(),v={},p=!1,h=!1,g=function(){return u(void 0,void 0,void 0,function(){var e;return c(this,function(t){switch(t.label){case 0:return[4,(new Bt).parse()];case 1:return e=t.sent(),v=Le(e),d&&(null==r||r.log("Tracking attribution fallback event."),null==n||n.track("[Amplitude] Attribution",v)),[2]}})})},m=function(){g()},y=function(e){return new Proxy(e,{apply:function(e,t,n){Reflect.apply(e,t,n),p&&m()}})};return{name:"@amplitude/plugin-event-property-attribution-browser",type:"enrichment",setup:function(e,t){return u(void 0,void 0,void 0,function(){return c(this,function(s){switch(s.label){case 0:return n=t,r=e.loggerProvider,p=!0,r.log("Installing event property attribution tracking."),[4,g()];case 1:if(s.sent(),!f)return[2];if(f.addEventListener("popstate",m),!h){if(i=Reflect.get(f.history,"pushState"),o=Reflect.get(f.history,"replaceState"),!i||!o)return[2];a=y(i),f.history.pushState=a,l=y(o),f.history.replaceState=l,h=!0}return[2]}})})},execute:function(e){return u(void 0,void 0,void 0,function(){return c(this,function(t){return ks.has(e.event_type)||(e.event_properties=s(s({},v),e.event_properties)),[2,e]})})},teardown:function(){return u(void 0,void 0,void 0,function(){var e,t;return c(this,function(n){return f&&(f.removeEventListener("popstate",m),e=Reflect.get(f.history,"pushState"),t=Reflect.get(f.history,"replaceState"),h&&e===a&&i&&(f.history.pushState=i),h&&t===l&&o&&(f.history.replaceState=o)),p=!1,h=!1,i=void 0,o=void 0,a=void 0,l=void 0,v={},[2]})})}}},Ps="AMP_CURRENT_PAGE",xs="AMP_PREVIOUS_PAGE",Is="AMP_URL_INFO";!function(e){e.Direct="direct",e.Internal="internal",e.External="external"}(ws||(ws={}));var As=new Set([o.IDENTIFY,o.GROUP_IDENTIFY,o.REVENUE]),_s=function(e){var t=(void 0===e?{}:e).internalDomains,n=void 0===t?[]:t,r=H(),i=void 0,o=!1,a=void 0,l=!1,f=!1,v=function(e){var t;try{var n=Ce(e,a);t=new URL(n).hostname}catch(e){null==a||a.error("Could not parse URL: ",e)}return t},p=function(e){var t="undefined"!=typeof location&&location.hostname||"",r=e?v(e):void 0;if(!r)return ws.Direct;var i=n.some(function(e){return-1!==t.indexOf(e)}),o=n.some(function(e){return-1!==r.indexOf(e)});return t===r||o&&i?ws.Internal:ws.External},h=function(){return u(void 0,void 0,void 0,function(){var e,t,n,r,s;return c(this,function(a){switch(a.label){case 0:return i&&o?[4,i.get(Is)]:[3,3];case 1:return e=a.sent(),t=Ce("undefined"!=typeof location&&location.href||""),n=(null==e?void 0:e[Ps])||"",r=void 0,r=t===n?(null==e?void 0:e[xs])||"":n||(document.referrer||""),[4,i.set(Is,(s={},s[Ps]=t,s[xs]=r,s))];case 2:a.sent(),a.label=3;case 3:return[2]}})})},g=function(){h()},m={name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(e,t){return u(void 0,void 0,void 0,function(){var t,n,s,u,p,m,y,b;return c(this,function(c){switch(c.label){case 0:if((a=e.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),f=!0,!r)return[3,7];try{i=new Fe(r.sessionStorage)}catch(e){null==a||a.debug("sessionStorage is not available in this environment.")}return[4,null==i?void 0:i.isEnabled()];case 1:return o=null!==(b=c.sent())&&void 0!==b&&b,i&&o?(t="undefined"!=typeof document&&document.referrer||"",n=t?v(t):void 0,s="undefined"!=typeof location&&location.hostname||"",u=Ce("undefined"!=typeof location&&location.href||""),[4,i.get(Is)]):[3,6];case 2:return p=c.sent(),m=(null==p?void 0:p[Ps])||"",!!n&&n!==s&&m!==u?[4,i.set(Is,(y={},y[Ps]=u,y[xs]=t,y))]:[3,4];case 3:return c.sent(),[3,6];case 4:return[4,h()];case 5:c.sent(),c.label=6;case 6:r.addEventListener("popstate",g),l||(r.history.pushState=new Proxy(r.history.pushState,{apply:function(e,t,n){var r=d(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),f&&g()}}),r.history.replaceState=new Proxy(r.history.replaceState,{apply:function(e,t,n){var r=d(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),f&&g()}}),l=!0),c.label=7;case 7:return[2]}})})},execute:function(e){return u(void 0,void 0,void 0,function(){var t,n,r;return c(this,function(a){switch(a.label){case 0:return t=Ce("undefined"!=typeof location&&location.href||""),i&&o?[4,i.get(Is)]:[3,2];case 1:if(n=a.sent(),r=(null==n?void 0:n[xs])||"",As.has(e.event_type))return[2,e];e.event_properties=s(s({},e.event_properties||{}),{"[Amplitude] Page Domain":Os(e,"[Amplitude] Page Domain","undefined"!=typeof location&&location.hostname||""),"[Amplitude] Page Location":Os(e,"[Amplitude] Page Location",t),"[Amplitude] Page Path":Os(e,"[Amplitude] Page Path","undefined"!=typeof location&&Ce(location.pathname)||""),"[Amplitude] Page Title":Os(e,"[Amplitude] Page Title",Jt(Kt)),"[Amplitude] Page URL":Os(e,"[Amplitude] Page URL",t.split("?")[0]),"[Amplitude] Previous Page Location":r,"[Amplitude] Previous Page Type":p(r)}),a.label=2;case 2:return[2,e]}})})},teardown:function(){return u(void 0,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:return r&&(r.removeEventListener("popstate",g),f=!1),i&&o?[4,i.set(Is,{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})}};return m};function Os(e,t,n){return e.event_properties||(e.event_properties={}),void 0===e.event_properties[t]?n:e.event_properties[t]}var Cs=function(){var e,t,n;function r(t){if(t)try{var n=new Function("return "+t)();if("function"==typeof n)return n;null==e||e.error("Custom enrichment body did not evaluate to a function")}catch(t){null==e||e.error("Could not create custom enrichment function",t)}return function(e){return e}}var i={name:"@amplitude/plugin-custom-enrichment-browser",type:"enrichment",setup:function(i,o){return u(void 0,void 0,void 0,function(){var o,s;return c(this,function(a){return null==(e=i.loggerProvider)||e.log("Installing @amplitude/plugin-custom-enrichment-browser"),(null===(s=i.remoteConfig)||void 0===s?void 0:s.fetchRemoteConfig)&&(i.remoteConfigClient?(o=i.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(e){n=e&&function(e){return"object"==typeof e&&null!==e&&"body"in e&&"string"==typeof e.body}(e)?r(e.body||""):r("")}),t=function(){var e;return null===(e=i.remoteConfigClient)||void 0===e?void 0:e.unsubscribe(o)}):null==e||e.debug("Remote config client is not provided, skipping remote config fetch")),[2]})})},execute:function(t){return u(void 0,void 0,void 0,function(){var r;return c(this,function(i){if(n)try{return[2,null!==(r=n(t))&&void 0!==r?r:null]}catch(n){return null==e||e.error("Could not execute custom enrichment function",n),[2,t]}return[2,t]})})},teardown:function(){return u(void 0,void 0,void 0,function(){return c(this,function(e){return t&&t(),[2]})})}};return i},Rs="userProperty",Ls="eventProperty",Ds=function(e){return e===Rs||e===Ls},Ns=function(e,t){return function(e){var t=f([],d(new Set((Array.isArray(e)?e:[e]).filter(Ds))),!1);return t.length>0?t:[Rs]}(e.trackingMethod).includes(t)},Ms=function(e){return Ns(e,Rs)},js=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return r(t,e),t.prototype.init=function(e,t,n){var r,i;return void 0===e&&(e=""),arguments.length>2?(r=t,i=n):"string"==typeof t?(r=t,i=void 0):(r=null==t?void 0:t.userId,i=t),K(this._init(s(s({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,i,o,l,d,f,v;return u(this,void 0,void 0,function(){var p,h,g,m,y,b,w,E,S,k,T,P,x,I,A,_=this;return c(this,function(O){switch(O.label){case 0:return this.initializing?[2]:(this.initializing=!0,p=function(e){var t,n;return void 0===e&&(e={}),!0===(null===(t=e.remoteConfig)||void 0===t?void 0:t.fetchRemoteConfig)||!1!==(null===(n=e.remoteConfig)||void 0===n?void 0:n.fetchRemoteConfig)&&!1!==e.fetchRemoteConfig}(t),h=null!==(n=t.loggerProvider)&&void 0!==n?n:new Q,t.loggerProvider||h.enable(null!==(r=t.logLevel)&&void 0!==r?r:Y.Warn),g=null!==(i=t.serverZone)&&void 0!==i?i:"US",y=this._diagnosticsSampleRate,b=null===(o=t.enableDiagnostics)||void 0===o||o,p?(m=new st(t.apiKey,h,g,null===(l=t.remoteConfig)||void 0===l?void 0:l.serverUrl),[4,new Promise(function(e){null==m||m.subscribe("configs.diagnostics.browserSDK","all",function(t,n,r){if(h.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(y=i);var o=t.enabled;"boolean"==typeof o&&(b=o)}e()})})]):[3,2]);case 1:O.sent(),O.label=2;case 2:return(w=new Qe(t.apiKey,h,g,{enabled:b,sampleRate:y})).setTag("library","".concat(er,"/").concat(Zn)),"undefined"!=typeof navigator&&w.setTag("user_agent",navigator.userAgent),[4,Mr(t.apiKey,t,this,w,{loggerProvider:h,serverZone:g,enableDiagnostics:b,diagnosticsSampleRate:y})];case 3:return E=O.sent(),p&&m?[4,new Promise(function(e){null==m||m.subscribe("configs.analyticsSDK.browserSDK","all",function(t,n,r){E.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t&&Zr(t,E),e()})})]:[3,5];case 4:O.sent(),O.label=5;case 5:return[4,e.prototype._init.call(this,E)];case 6:return O.sent(),this.logBrowserOptions(E),this.config.remoteConfigClient=m,L=this.config,S=Fn(L.defaultTracking)&&L.defaultTracking&&"object"==typeof L.defaultTracking&&L.defaultTracking.attribution&&"object"==typeof L.defaultTracking.attribution?s({},L.defaultTracking.attribution):{},Fn(this.config.defaultTracking)&&Ms(S)?(this.config.optOut&&this.timeline.addOptOutListener(function(e){return u(_,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return e?[3,2]:(this.webAttribution=new Ss(S,this.config),[4,this.webAttribution.init()]);case 1:t.sent(),t.label=2;case 2:return[2]}})})}),this.webAttribution=new Ss(S,this.config),[4,this.webAttribution.init()]):[3,8];case 7:O.sent(),O.label=8;case 8:return k=Ae(),T=k.ampTimestamp?Number(k.ampTimestamp):void 0,P=!T||Date.now()<T,x=P&&!Number.isNaN(Number(k.ampSessionId))?Number(k.ampSessionId):void 0,-1!==(I=this.config.deferredSessionId)||this.config.optOut||(I=Date.now()),this.setSessionId(null!==(v=null!==(f=null!==(d=t.sessionId)&&void 0!==d?d:x)&&void 0!==f?f:I)&&void 0!==v?v:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return u(_,void 0,void 0,function(){return c(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(A=ke(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline?[3,10]:[4,this.add(Yr()).promise];case 9:O.sent(),O.label=10;case 10:return[4,this.add(new fe({diagnosticsClient:w})).promise];case 11:return O.sent(),[4,this.add(new tr).promise];case 12:return O.sent(),[4,this.add(new Te).promise];case 13:return O.sent(),function(e){Gr||void 0!==e.defaultTracking||(e.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),Gr=!0)}(this.config),R=this.config.defaultTracking,Un(R,"fileDownloads")?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(Jr()).promise]):[3,15];case 14:O.sent(),O.label=15;case 15:return qn(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(Wr()).promise]):[3,17];case 16:O.sent(),O.label=17;case 17:return Bn(this.config.defaultTracking)?this.config.optOut?[3,19]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Br(Yn(this.config))).promise]):[3,20];case 18:return O.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(e){return u(_,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:return e?[2]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Br(Yn(this.config))).promise]);case 1:return t.sent(),[2]}})})}),O.label=20;case 20:return Fn(this.config.defaultTracking)&&function(e){return Ns(e,Ls)}(S)?(this.config.loggerProvider.debug("Adding event property attribution plugin"),[4,this.add(Ts(S)).promise]):[3,22];case 21:O.sent(),O.label=22;case 22:return zn(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(ro(Kn(this.config),{diagnosticsClient:w})).promise]):[3,24];case 23:O.sent(),O.label=24;case 24:return Wn(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(yo(Jn(this.config))).promise]):[3,26];case 25:O.sent(),O.label=26;case 26:return Vn(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(No(Gn(this.config))).promise]):[3,28];case 27:O.sent(),O.label=28;case 28:return function(e){return"boolean"==typeof e?e:"object"==typeof e&&!0===e.webVitals}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(Es()).promise]):[3,30];case 29:O.sent(),O.label=30;case 30:return function(e){return"object"==typeof e&&(!0===e.performanceTracking||"object"==typeof e.performanceTracking)}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding performance tracking plugin"),[4,this.add(Po($n(this.config))).promise]):[3,32];case 31:O.sent(),O.label=32;case 32:return function(e){return Un(e,"pageUrlEnrichment")}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(_s()).promise]):[3,34];case 33:O.sent(),O.label=34;case 34:return("boolean"==typeof(C=this.config.customEnrichment)?C:"object"==typeof C&&null!==C&&!1!==C.enabled)?(this.config.loggerProvider.debug("Adding custom enrichment plugin"),[4,this.add(Cs()).promise]):[3,36];case 35:O.sent(),O.label=36;case 36:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 37:return O.sent(),A.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},n=t.time,r=a(t,["time"]),i="number"==typeof n?{time:n}:void 0;_.track(e.eventType,r,i)}),[2]}var C,R,L})})},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),e===this.config.userId&&void 0!==e||(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),function(e,t){ke(t).identityStore.editIdentity().setUserId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),function(e,t){ke(t).identityStore.editIdentity().setDeviceId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(z()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var e,t;return{deviceId:null===(e=this.config)||void 0===e?void 0:e.deviceId,userId:null===(t=this.config)||void 0===t?void 0:t.userId,userProperties:this.userProperties}},t.prototype.setIdentity=function(e){var t,n,r;if("userId"in e&&this.setUserId(e.userId),"deviceId"in e&&e.deviceId&&this.setDeviceId(e.deviceId),"userProperties"in e){this.userProperties=e.userProperties;var i=new j,o=null!==(r=e.userProperties)&&void 0!==r?r:{};try{for(var s=l(Object.entries(o)),a=s.next();!a.done;a=s.next()){var u=d(a.value,2),c=u[0],f=u[1];i.set(c,f)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}this.identify(i)}},t.prototype.getOptOut=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.optOut},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),K(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,K(Promise.resolve());if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return K(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId();r!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,o=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,Hn(this.config.defaultTracking)&&(r&&i&&n.push(this.track(gr,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:r,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var s=this.trackCampaignEventIfNeeded(++o,n);return this.config.identify&&n.push(this.track($(this.config.identify)).promise),Hn(this.config.defaultTracking)&&n.push(this.track(hr,void 0,{event_id:s?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,K(Promise.all(n))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=Ur(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(Qn(t)){var r=t._q;t._q=[],t=Xn(new j,r)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(Qn(r)){var o=r._q;r._q=[],r=Xn(new j,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(Qn(t)){var r=t._q;t._q=[],t=Xn(new G,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign||!Ms(this.webAttribution.options))return!1;var n=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return u(this,void 0,void 0,function(){var n,r,i;return c(this,function(o){return n=Date.now(),r=Pe(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===hr||t.event_type===gr||t.session_id&&t.session_id!==this.getSessionId()||(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=s(s({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",kn(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t.prototype._setDiagnosticsSampleRate=function(e){e>1||e<0||this.config||(this._diagnosticsSampleRate=e)},t}(J),Us=function(){var e=new js;return{init:ce(e.init.bind(e),"init",se(e),ue(e,["config"])),add:ce(e.add.bind(e),"add",se(e),ue(e,["config.apiKey","timeline.plugins"])),remove:ce(e.remove.bind(e),"remove",se(e),ue(e,["config.apiKey","timeline.plugins"])),track:ce(e.track.bind(e),"track",se(e),ue(e,["config.apiKey","timeline.queue.length"])),logEvent:ce(e.logEvent.bind(e),"logEvent",se(e),ue(e,["config.apiKey","timeline.queue.length"])),identify:ce(e.identify.bind(e),"identify",se(e),ue(e,["config.apiKey","timeline.queue.length"])),groupIdentify:ce(e.groupIdentify.bind(e),"groupIdentify",se(e),ue(e,["config.apiKey","timeline.queue.length"])),setGroup:ce(e.setGroup.bind(e),"setGroup",se(e),ue(e,["config.apiKey","timeline.queue.length"])),revenue:ce(e.revenue.bind(e),"revenue",se(e),ue(e,["config.apiKey","timeline.queue.length"])),flush:ce(e.flush.bind(e),"flush",se(e),ue(e,["config.apiKey","timeline.queue.length"])),getUserId:ce(e.getUserId.bind(e),"getUserId",se(e),ue(e,["config","config.userId"])),setUserId:ce(e.setUserId.bind(e),"setUserId",se(e),ue(e,["config","config.userId"])),getDeviceId:ce(e.getDeviceId.bind(e),"getDeviceId",se(e),ue(e,["config","config.deviceId"])),setDeviceId:ce(e.setDeviceId.bind(e),"setDeviceId",se(e),ue(e,["config","config.deviceId"])),reset:ce(e.reset.bind(e),"reset",se(e),ue(e,["config","config.userId","config.deviceId"])),getSessionId:ce(e.getSessionId.bind(e),"getSessionId",se(e),ue(e,["config"])),setSessionId:ce(e.setSessionId.bind(e),"setSessionId",se(e),ue(e,["config"])),extendSession:ce(e.extendSession.bind(e),"extendSession",se(e),ue(e,["config"])),setOptOut:ce(e.setOptOut.bind(e),"setOptOut",se(e),ue(e,["config"])),setTransport:ce(e.setTransport.bind(e),"setTransport",se(e),ue(e,["config"])),getIdentity:ce(e.getIdentity.bind(e),"getIdentity",se(e),ue(e,["config"])),setIdentity:ce(e.setIdentity.bind(e),"setIdentity",se(e),ue(e,["config","config.userId","config.deviceId"])),getOptOut:ce(e.getOptOut.bind(e),"getOptOut",se(e),ue(e,["config"])),_setDiagnosticsSampleRate:ce(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",se(e),ue(e,["config"]))}},Fs=Us(),qs=function(){function e(e){this.amplitude=e,this.videoEl=null,this.embeddedVideoPlayer=null,this.extraEventProperties={},this.listeners=[],this.onRemoveListeners=[]}return e.prototype.withVideoElement=function(e){return this.videoEl=e,this},e.prototype.withEmbeddedPlayer=function(e){return this.embeddedVideoPlayer=e,this},e.prototype.withVendor=function(e){return this.vendor=e,this},e.prototype.withExtraEventProperties=function(e){return this.extraEventProperties=e,this},e.prototype.captureVideoStarted=function(){var e=this;return this.listeners.push(function(t,n){"playing"!==t.playbackState&&"playing"===n.playbackState&&e.amplitude.track("Video Content Started",s(s({},n.lastEvent),e.extraEventProperties))}),this},e.prototype.captureVideoStopped=function(){var e=this;return this.listeners.push(function(t,n){"playing"===t.playbackState&&"playing"!==n.playbackState&&e.amplitude.track("Video Content Stopped",s(s(s({},n.lastEvent),{watch_duration:n.watchTime}),e.extraEventProperties))}),this},e.prototype.start=function(){var e,t=this,n=null!==(e=this.videoEl)&&void 0!==e?e:this.embeddedVideoPlayer;if(!n)throw new Error("Video element not specified. Use withVideoElement() or withEmbeddedPlayer() to specify the video element.");if(this.videoEl&&this.embeddedVideoPlayer)throw new Error("Both video element and embedded video player specified. Use only one of withVideoElement() or withEmbeddedPlayer() to specify the video element.");var r=new jn({videoEl:n,onStateChange:function(e,n){t.listeners.forEach(function(t){return t(e,n)})},vendor:this.vendor,isEmbedded:!!this.embeddedVideoPlayer});return this.onRemoveListeners.push(function(){r.destroy()}),this},e.prototype.stop=function(){this.onRemoveListeners.forEach(function(e){return e()}),this.onRemoveListeners=[]},e}();var Bs=Fs.add,Hs=Fs.extendSession,Vs=Fs.flush,zs=Fs.getDeviceId,Ws=Fs.getIdentity,$s=Fs.getOptOut,Ks=Fs.getSessionId,Js=Fs.getUserId,Gs=Fs.groupIdentify,Ys=Fs.identify,Xs=Fs.init,Qs=Fs.logEvent,Zs=Fs.remove,ea=Fs.reset,ta=Fs.revenue,na=Fs.setDeviceId,ra=Fs.setGroup,ia=Fs.setIdentity,oa=Fs.setOptOut,sa=Fs.setSessionId,aa=Fs.setTransport,ua=Fs.setUserId,ca=Fs.track,la=Fs._setDiagnosticsSampleRate;e.AmplitudeBrowser=js,e.Identify=j,e.Revenue=G,e.Types=xr,e._setDiagnosticsSampleRate=la,e.add=Bs,e.createInstance=Us,e.extendSession=Hs,e.flush=Vs,e.getDeviceId=zs,e.getIdentity=Ws,e.getOptOut=$s,e.getSessionId=Ks,e.getUserId=Js,e.groupIdentify=Gs,e.identify=Ys,e.init=Xs,e.logEvent=Qs,e.remove=Zs,e.reset=ea,e.revenue=ta,e.runQueuedFunctions=function(e,t){Xn(e,t)},e.setDeviceId=na,e.setGroup=ra,e.setIdentity=ia,e.setOptOut=oa,e.setSessionId=sa,e.setTransport=aa,e.setUserId=ua,e.track=ca,e.trackVideo=function(e,t,n){var r;void 0===n&&(n={});var i=new qs(e);t instanceof HTMLVideoElement?i.withVideoElement(t):i.withEmbeddedPlayer(t),n.vendor&&i.withVendor(n.vendor);var o=null!==(r=n.extraEventProperties)&&void 0!==r?r:{};try{i.withExtraEventProperties(s({view_session_id:z()},o)).captureVideoStarted().captureVideoStopped().start()}catch(e){return e}return function(){return i.stop()}},Object.defineProperty(e,"__esModule",{value:!0})});
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { ILogger, Campaign, TrackingMethod } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AttributionOptions, TrackingMethod } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserConfig, ILogger, Storage, Campaign } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserClient } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AmplitudeCore, Event, EventOptions, IIdentify, IRevenue, TransportTypeOrOptions, Result, BrowserOptions, BrowserConfig, BrowserClient, AnalyticsClient, AnalyticsIdentity } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Config, ILogger, LogLevel, Event, Storage, IngestionMetadata, ServerZoneType, OfflineDisabled, Plan, IdentityStorageType, TransportTypeOrOptions, MemoryStorage, CookieStorage, UserSession, BrowserOptions, BrowserConfig as IBrowserConfig, DefaultTrackingOptions, TrackingOptions, AutocaptureOptions, CookieOptions, RemoteConfigOptions, NetworkTrackingOptions, CustomEnrichmentOptions, IIdentify, IDiagnosticsClient, CookieStorageConfig } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AutocaptureOptions, type ElementInteractionsOptions, BrowserConfig, RemoteConfig, NetworkTrackingOptions, NetworkCaptureRule } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { IdentityStorageType, ServerZoneType } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Storage, UserSession } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { PageTrackingOptions, ElementInteractionsOptions, FormInteractionsOptions, BrowserOptions, AutocaptureOptions, AttributionOptions, NetworkTrackingOptions, FrustrationInteractionsOptions, CustomEnrichmentOptions, PerformanceTrackingOptions } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserConfig } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Event, BeforePlugin, BrowserConfig } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { EnrichmentPlugin } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { EnrichmentPlugin } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BeforePlugin } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { ILogger, BrowserStorage } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserStorage } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, Payload, Response, Transport } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, Payload, Response, Transport } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BaseTransport, Payload, Response, Transport } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
export { AmplitudeReturn, BaseEvent, EventOptions, BrowserClient, AttributionOptions, AutocaptureOptions, BrowserOptions, BrowserConfig, IConfig, Event, IdentifyEvent, GroupIdentifyEvent, IdentifyOperation, SpecialEventType, IIdentify, IRevenue, RevenueProperty, ILogger, LogLevel, Plugin, BeforePlugin, EnrichmentPlugin, DestinationPlugin, Result, ServerZoneType, ServerZone, IdentityStorageType, Storage, TransportType, OfflineDisabled, Messenger, ElementInteractionsOptions, ActionType, DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, DEFAULT_ACTION_CLICK_ALLOWLIST, Campaign, ClickIdParameters, ReferrerParameters, UTMParameters, ValidPropertyType, ExcludeInternalReferrersOptions, EXCLUDE_INTERNAL_REFERRERS_CONDITIONS, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Result } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserClient, EmbeddedVideoPlayer, VideoVendor } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
@amplitude/plugin-session-replay-browser
npm dependencyimport { IdentifyOperation } from '@amplitude/analytics-types';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_types_1 = require("@amplitude/analytics-types");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Event } from '@amplitude/analytics-types';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
export { AmplitudeSessionReplay, SessionReplayOptions } from '@amplitude/session-replay-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserClient, BrowserConfig, EnrichmentPlugin, Event } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AmplitudeSessionReplay, SessionReplayOptions as SessionReplayBrowserOptions } from '@amplitude/session-replay-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_core_1 = require("@amplitude/analytics-core");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var session_replay_browser_1 = require("@amplitude/session-replay-browser");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
var analytics_client_common_1 = require("@amplitude/analytics-client-common");
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Event } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { StoreType, type SessionReplaySendEventsHandler, type SessionReplayFetchConfigHandler, type SessionReplayOptions as StandaloneSessionReplayOptions } from '@amplitude/session-replay-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { IdentifyOperation } from '@amplitude/analytics-types';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { IdentifyOperation } from '@amplitude/analytics-types';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Event } from '@amplitude/analytics-types';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
export { AmplitudeSessionReplay, SessionReplayOptions } from '@amplitude/session-replay-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { BrowserClient, BrowserConfig, EnrichmentPlugin, Event } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { AmplitudeSessionReplay, SessionReplayOptions as SessionReplayBrowserOptions } from '@amplitude/session-replay-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { SpecialEventType, getGlobalScope, } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { init, setSessionId, getSessionId, getSessionReplayProperties, flush, shutdown, evaluateTargetingAndCapture, } from '@amplitude/session-replay-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { getAnalyticsConnector } from '@amplitude/analytics-client-common';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { Event } from '@amplitude/analytics-core';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
import { StoreType, type SessionReplaySendEventsHandler, type SessionReplayFetchConfigHandler, type SessionReplayOptions as StandaloneSessionReplayOptions } from '@amplitude/session-replay-browser';
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
expand_more 2 low-confidence finding(s)
var e,t=Object.defineProperty,r=(e,r,s)=>((e,r,s)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s)(e,"symbol"!=typeof r?r+"":r,s),s=Object.defineProperty,n=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),i=Object.defineProperty,o=(e,t,r)=>((e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const l={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},a={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},u={};function h(e){if(u[e])return u[e];const t=function(e){var t,r;const s=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return s&&globalThis[s]?globalThis[s]:void 0}(e)||globalThis[e],r=t.prototype,s=e in l?l[e]:void 0,n=Boolean(s&&s.every(e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),i=e in a?a[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o)return u[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(s),i?u[e]=i:r}catch{return r}}const c={};function p(e,t,r){var s;const n=`${e}.${String(r)}`;if(c[n])return c[n].call(t);const i=h(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(c[n]=o,o.call(t)):t[r]}const f={};function d(e,t,r){const s=`${e}.${String(r)}`;if(f[s])return f[s].bind(t);const n=h(e)[r];return"function"!=typeof n?t[r]:(f[s]=n,n.bind(t))}const m={childNodes:function(e){return p("Node",e,"childNodes")},parentNode:function(e){return p("Node",e,"parentNode")},parentElement:function(e){return p("Node",e,"parentElement")},textContent:function(e){return p("Node",e,"textContent")},contains:function(e,t){return d("Node",e,"contains")(t)},getRootNode:function(e){return d("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?p("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?p("Element",e,"shadowRoot"):null},querySelector:function(e,t){return p("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return p("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return h("MutationObserver").constructor}};class g{constructor(){o(this,"idNodeMap",new Map),o(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function w(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&w(m.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&w(m.parentNode(e),t,r)}function y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function b(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var v,x={exports:{}};function S(){if(v)return x.exports;v=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return x.exports=t(),x.exports.createColors=t,x.exports}const O=b(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var C,k;function E(){if(k)return C;k=1;let e=S(),t=O;class r extends Error{constructor(e,t,s,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==t&&void 0!==s&&("number"==typeof t?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let s=this.source;null==r&&(r=e.isColorSupported),t&&r&&(s=t(s));let n,i,o=s.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),u=String(a).length;if(r){let{bold:t,gray:r,red:s}=e.createColors(!0);n=e=>t(s(e)),i=e=>r(e)}else n=i=e=>e;return o.slice(l,a).map((e,t)=>{let r=l+1+t,s=" "+(" "+r).slice(-u)+" | ";if(r===this.line){let t=i(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(s)+e+"\n "+t+n("^")}return" "+i(s)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return C=r,r.default=r,C}var R,M,A,P,N,I,L,j,U,B,D,_,F,T,z,$,W,V,J,q,G,Y,H,Z,K,X,Q,ee,te,re,se,ne,ie,oe,le,ae,ue,he,ce,pe,fe,de,me,ge,we,ye,be,ve,xe,Se,Oe,Ce,ke,Ee={};function Re(){return R||(R=1,Ee.isClean=Symbol("isClean"),Ee.my=Symbol("my")),Ee}function Me(){if(A)return M;A=1;const e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(t,r,s){let n;if(s||(s=r),r&&(n=t.raws[r],void 0!==n))return n;let i=t.parent;if("before"===s){if(!i||"root"===i.type&&i.first===t)return"";if(i&&"document"===i.type)return""}if(!i)return e[s];let o=t.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[s])return o.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(t,s);{let e="raw"+((l=s)[0].toUpperCase()+l.slice(1));this[e]?n=this[e](o,t):o.walk(e=>{if(n=e.raws[r],void 0!==n)return!1})}var l;return void 0===n&&(n=e[s]),o.rawCache[s]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return M=t,t.default=t,M}function Ae(){if(N)return P;N=1;let e=Me();function t(t,r){new e(r).stringify(t)}return P=t,t.default=t,P}function Pe(){if(L)return I;L=1;let{isClean:e,my:t}=Re(),r=E(),s=Me(),n=Ae();function i(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>i(e,r)):("object"===o&&null!==n&&(n=i(n)),r[s]=n)}return r}class o{constructor(r={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in r)if("nodes"===e){this.nodes=[];for(let t of r[e])"function"==typeof t.clone?this.append(t.clone()):this.append(t)}else this[e]=r[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=i(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new s).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let i=t.get(s.input);null==i&&(i=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:i,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=n){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}}return I=o,o.default=o,I}function Ne(){if(U)return j;U=1;let e=Pe();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return j=t,t.default=t,j}function Ie(){if(D)return B;D=1;return B={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}}}function Le(){if(F)return _;F=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=O,{existsSync:r,readFileSync:s}=O,{dirname:n,join:i}=O;class o{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=n(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=n(e),r(e))return this.mapFile=e,s(e,"utf-8").toString().trim()}loadMap(r,s){if(!1===s)return!1;if(s){if("string"==typeof s)return s;if("function"!=typeof s){if(s instanceof e)return t.fromSourceMap(s).toString();if(s instanceof t)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}{let e=s(r);if(e){let t=this.loadFile(e);if(!t)throw new Error("Unable to load previous source map: "+e.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return r&&(e=i(n(r),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return _=o,o.default=o,_}function je(){if(z)return T;z=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=O,{fileURLToPath:r,pathToFileURL:s}=O,{isAbsolute:n,resolve:i}=O,{nanoid:o}=Ie(),l=O,a=E(),u=Le(),h=Symbol("fromOffsetCache"),c=Boolean(e&&t),p=Boolean(i&&n);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!p||/^\w+:\/\//.test(t.from)||n(t.from)?this.file=t.from:this.file=i(t.from)),p&&c){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let i,o,l;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,l=e.col}else o=s.line,l=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let u=this.origin(t,r,o,l);return i=u?new a(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,n.plugin):new a(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:l,line:o},this.css,this.file,n.plugin),i.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(s&&(i.input.url=s(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[h])r=this[h];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[h]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,o){if(!this.map)return!1;let l,a,u=this.map.consumer(),h=u.originalPositionFor({column:t,line:e});if(!h.source)return!1;"number"==typeof i&&(l=u.originalPositionFor({column:o,line:i})),a=n(h.source)?s(h.source):new URL(h.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let c={column:h.column,endColumn:l&&l.column,endLine:l&&l.line,line:h.line,url:a.toString()};if("file:"===a.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");c.file=r(a)}let p=u.sourceContentFor(h.source);return p&&(c.source=p),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return T=f,f.default=f,l&&l.registerInput&&l.registerInput(f),T}function Ue(){if(W)return $;W=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=O,{dirname:r,relative:s,resolve:n,sep:i}=O,{pathToFileURL:o}=O,l=je(),a=Boolean(e&&t),u=Boolean(r&&n&&s&&i);return $=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let s,n=this.toUrl(this.path(t.file)),i=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(s=new e(t.text),s.sourcesContent&&(s.sourcesContent=null)):s=t.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&a&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e,r,s=1,n=1,i="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,l,a)=>{if(this.css+=t,l&&"end"!==a&&(o.generated.line=s,o.generated.column=n-1,l.source&&l.source.start?(o.source=this.sourcePath(l),o.original.line=l.source.start.line,o.original.column=l.source.start.column-1,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=t.match(/\n/g),e?(s+=e.length,r=t.lastIndexOf("\n"),n=t.length-r):n+=t.length,l&&"start"!==a){let e=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===e.last&&!e.raws.semicolon||(l.source&&l.source.end?(o.source=this.sourcePath(l),o.original.line=l.source.end.line,o.original.column=l.source.end.column-1,o.generated.line=s,o.generated.column=n-2,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=n-1,this.map.addMapping(o)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=r(n(i,this.mapOpts.annotation)));let o=s(i,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new l(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function Be(){if(J)return V;J=1;let e=Pe();class t extends e{constructor(e){super(e),this.type="comment"}}return V=t,t.default=t,V}function De(){if(G)return q;G=1;let e,t,r,s,{isClean:n,my:i}=Re(),o=Ne(),l=Be(),a=Pe();function u(e){return e.map(e=>(e.nodes&&(e.nodes=u(e.nodes)),delete e.source,e))}function h(e){if(e[n]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class c extends a{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",i=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of i)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(s,a){if("string"==typeof s)s=u(e(s).nodes);else if(void 0===s)s=[];else if(Array.isArray(s)){s=s.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===s.type&&"document"!==this.type){s=s.nodes.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if(s.type)s=[s];else if(s.prop){if(void 0===s.value)throw new Error("Value field is missed in node creation");"string"!=typeof s.value&&(s.value=String(s.value)),s=[new o(s)]}else if(s.selector)s=[new t(s)];else if(s.name)s=[new r(s)];else{if(!s.text)throw new Error("Unknown node type in node creation");s=[new l(s)]}return s.map(e=>(e[i]||c.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[n]&&h(e),void 0===e.raws.before&&a&&void 0!==a.raws.before&&(e.raws.before=a.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=t=>{e=t},c.registerRule=e=>{t=e},c.registerAtRule=e=>{r=e},c.registerRoot=e=>{s=e},q=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,o.prototype):"comment"===e.type?Object.setPrototypeOf(e,l.prototype):"root"===e.type&&Object.setPrototypeOf(e,s.prototype),e[i]=!0,e.nodes&&e.nodes.forEach(e=>{c.rebuild(e)})},q}function _e(){if(H)return Y;H=1;let e,t,r=De();class s extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},Y=s,s.default=s,Y}function Fe(){if(K)return Z;K=1;let e={};return Z=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function Te(){if(Q)return X;Q=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return X=e,e.default=e,X}function ze(){if(te)return ee;te=1;let e=Te();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let s=new e(t,r);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return ee=t,t.default=t,ee}function $e(){if(ie)return ne;ie=1;let e=De();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return ne=t,t.default=t,e.registerAtRule(t),ne}function We(){if(le)return oe;le=1;let e,t,r=De();class s extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},oe=s,s.default=s,r.registerRoot(s),oe}function Ve(){if(ue)return ae;ue=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,l=!1,a="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:l?r===a&&(l=!1):'"'===r||"'"===r?(l=!0,a=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==n&&s.push(n.trim()),n="",i=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};return ae=e,e.default=e,ae}function Je(){if(ce)return he;ce=1;let e=De(),t=Ve();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return he=r,r.default=r,e.registerRule(r),he}function qe(){if(fe)return pe;fe=1;let e=Ne(),t=function(){if(se)return re;se=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),r="\\".charCodeAt(0),s="/".charCodeAt(0),n="\n".charCodeAt(0),i=" ".charCodeAt(0),o="\f".charCodeAt(0),l="\t".charCodeAt(0),a="\r".charCodeAt(0),u="[".charCodeAt(0),h="]".charCodeAt(0),c="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),d="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),w=":".charCodeAt(0),y="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,v=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return re=function(O,C={}){let k,E,R,M,A,P,N,I,L,j,U=O.css.valueOf(),B=C.ignoreErrors,D=U.length,_=0,F=[],T=[];function z(e){throw O.error("Unclosed "+e,_)}return{back:function(e){T.push(e)},endOfFile:function(){return 0===T.length&&_>=D},nextToken:function(O){if(T.length)return T.pop();if(_>=D)return;let C=!!O&&O.ignoreUnclosed;switch(k=U.charCodeAt(_),k){case n:case i:case l:case a:case o:E=_;do{E+=1,k=U.charCodeAt(E)}while(k===i||k===n||k===l||k===a||k===o);j=["space",U.slice(_,E)],_=E-1;break;case u:case h:case f:case d:case w:case m:case p:{let e=String.fromCharCode(k);j=[e,e,_];break}case c:if(I=F.length?F.pop()[1]:"",L=U.charCodeAt(_+1),"url"===I&&L!==e&&L!==t&&L!==i&&L!==n&&L!==l&&L!==o&&L!==a){E=_;do{if(P=!1,E=U.indexOf(")",E+1),-1===E){if(B||C){E=_;break}z("bracket")}for(N=E;U.charCodeAt(N-1)===r;)N-=1,P=!P}while(P);j=["brackets",U.slice(_,E+1),_,E],_=E}else E=U.indexOf(")",_+1),M=U.slice(_,E+1),-1===E||x.test(M)?j=["(","(",_]:(j=["brackets",M,_,E],_=E);break;case e:case t:R=k===e?"'":'"',E=_;do{if(P=!1,E=U.indexOf(R,E+1),-1===E){if(B||C){E=_+1;break}z("string")}for(N=E;U.charCodeAt(N-1)===r;)N-=1,P=!P}while(P);j=["string",U.slice(_,E+1),_,E],_=E;break;case y:b.lastIndex=_+1,b.test(U),E=0===b.lastIndex?U.length-1:b.lastIndex-2,j=["at-word",U.slice(_,E+1),_,E],_=E;break;case r:for(E=_,A=!0;U.charCodeAt(E+1)===r;)E+=1,A=!A;if(k=U.charCodeAt(E+1),A&&k!==s&&k!==i&&k!==n&&k!==l&&k!==a&&k!==o&&(E+=1,S.test(U.charAt(E)))){for(;S.test(U.charAt(E+1));)E+=1;U.charCodeAt(E+1)===i&&(E+=1)}j=["word",U.slice(_,E+1),_,E],_=E;break;default:k===s&&U.charCodeAt(_+1)===g?(E=U.indexOf("*/",_+2)+1,0===E&&(B||C?E=U.length:z("comment")),j=["comment",U.slice(_,E+1),_,E],_=E):(v.lastIndex=_+1,v.test(U),E=0===v.lastIndex?U.length-1:v.lastIndex-2,j=["word",U.slice(_,E+1),_,E],F.push(j),_=E)}return _++,j},position:function(){return _}}}}(),r=Be(),s=$e(),n=We(),i=Je();const o={empty:!0,space:!0};return pe=class{constructor(e){this.input=e,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,i=new s;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?u.push("("===t?")":"]"):"{"===t&&u.length>0?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){l=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),l&&(i.nodes=[],this.current=i)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(t)}s=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let s=new e;this.init(s,t[0][2]);let n,i=t[t.length-1];for(";"===i[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;s.prop+=t.shift()[1]}for(s.raws.between="";t.length;){if(n=t.shift(),":"===n[0]){s.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o,l=[];for(;t.length&&(o=t[0][0],"space"===o||"comment"===o);)l.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(n=t[e],"!important"===n[1].toLowerCase()){s.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(s.raws.important=r);break}if("important"===n[1].toLowerCase()){let r=t.slice(0),n="";for(let t=e;t>0;t--){let e=r[t][0];if(0===n.trim().indexOf("!")&&"space"!==e)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(s.important=!0,s.raws.important=n,t=r)}if("space"!==n[0]&&"comment"!==n[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=l.map(e=>e[1]).join(""),l=[]),this.raw(s,"value",l.concat(t),r),s.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new i;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,i=[],o=e[1].startsWith("--"),l=[],a=e;for(;a;){if(r=a[0],l.push(a),"("===r||"["===r)n||(n=a),i.push("("===r?")":"]");else if(o&&s&&"{"===r)n||(n=a),i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(l,o);break}if("{"===r)return void this.rule(l);if("}"===r){this.tokenizer.back(l.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&s){if(!o)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,o)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,i,l,a,u=r.length,h="",c=!0;for(let e=0;e<u;e+=1)n=r[e],i=n[0],"space"!==i||e!==u-1||s?"comment"===i?(a=r[e-1]?r[e-1][0]:"empty",l=r[e+1]?r[e+1][0]:"empty",o[a]||o[l]||","===h.slice(-1)?c=!1:h+=n[1]):h+=n[1]:c=!1;if(!c){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:h}}e[t]=h}rule(e){e.pop();let t=new i;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}}function Ge(){if(me)return de;me=1;let e=De(),t=qe(),r=je();function s(e,s){let n=new r(e,s),i=new t(n);try{i.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&s&&s.from&&(/\.scss$/i.test(s.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(s.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(s.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return i.root}return de=s,s.default=s,e.registerParse(s),de}function Ye(){if(we)return ge;we=1;let{isClean:e,my:t}=Re(),r=Ue(),s=Ae(),n=De(),i=_e(),o=Fe(),l=ze(),a=Ge(),u=We();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},p={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return"object"==typeof e&&"function"==typeof e.then}function d(e){let t=!1,r=h[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:d(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let w={};class y{constructor(e,r,s){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof y||r instanceof l)i=g(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=a;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{i=e(r,s)}catch(e){this.processed=!0,this.error=e}i&&!i[t]&&n.rebuild(i)}else i=g(r);this.result=new l(e,i,s),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),i=s.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!c[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(f(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[m(t)];for(;r.length>0;){let e=this.visitTick(r);if(f(e))try{await e}catch(e){let t=r[r.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=s;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(f(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||o("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:s,visitors:n}=r;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void t.pop();if(n.length>0&&r.visitorIndex<n.length){let[e,t]=n[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===n.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==r.iterator){let n,i=r.iterator;for(;n=s.nodes[s.indexes[i]];)if(s.indexes[i]+=1,!n[e])return n[e]=!0,void t.push(m(n));r.iterator=0,delete s.indexes[i]}let i=r.events;for(;r.eventIndex<i.length;){let t=i[r.eventIndex];if(r.eventIndex+=1,0===t)return void(s.nodes&&s.nodes.length&&(s[e]=!0,r.iterator=s.getIterator()));if(this.listeners[t])return void(r.visitors=this.listeners[t])}t.pop()}walkSync(t){t[e]=!0;let r=d(t);for(let s of r)if(0===s)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[s];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return y.registerPostcss=e=>{w=e},ge=y,y.default=y,u.registerLazyResult(y),i.registerLazyResult(y),ge}function He(){if(xe)return ve;xe=1;let e=function(){if(be)return ye;be=1;let e=Ue(),t=Ae(),r=Fe(),s=Ge();const n=ze();class i{constructor(r,s,i){let o;s=s.toString(),this.stringified=!1,this._processor=r,this._css=s,this._opts=i,this._map=void 0;let l=t;this.result=new n(this._processor,o,this._opts),this.result.css=s;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let u=new e(l,o,this._opts,s);if(u.isMap()){let[e,t]=u.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=s;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}return ye=i,i.default=i,ye}(),t=Ye(),r=_e(),s=We();class n{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(r,s={}){return this.plugins.length||s.parser||s.stringifier||s.syntax?new t(this,r,s):new e(this,r,s)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return ve=n,n.default=n,s.registerProcessor(n),r.registerProcessor(n),ve}const Ze=y(function(){if(ke)return Ce;ke=1;let e=E(),t=Ne(),r=Ye(),s=De(),n=He(),i=Ae(),o=function(){if(Oe)return Se;Oe=1;let e=Ne(),t=Le(),r=Be(),s=$e(),n=je(),i=We(),o=Je();function l(a,u){if(Array.isArray(a))return a.map(e=>l(e));let{inputs:h,...c}=a;if(h){u=[];for(let e of h){let r={...e,__proto__:n.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),u.push(r)}}if(c.nodes&&(c.nodes=a.nodes.map(e=>l(e,u))),c.source){let{inputId:e,...t}=c.source;c.source=t,null!=e&&(c.source.input=u[e])}if("root"===c.type)return new i(c);if("decl"===c.type)return new e(c);if("rule"===c.type)return new o(c);if("comment"===c.type)return new r(c);if("atrule"===c.type)return new s(c);throw new Error("Unknown node type: "+a.type)}return Se=l,l.default=l,Se}(),l=_e(),a=Te(),u=Be(),h=$e(),c=ze(),p=je(),f=Ge(),d=Ve(),m=Je(),g=We(),w=Pe();function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new n(e)}return y.plugin=function(e,t){let r,s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=(new n).version,i}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return y([i(r)]).process(e,t)},i},y.stringify=i,y.parse=f,y.fromJSON=o,y.list=d,y.comment=e=>new u(e),y.atRule=e=>new h(e),y.decl=e=>new t(e),y.rule=e=>new m(e),y.root=e=>new g(e),y.document=e=>new l(e),y.CssSyntaxError=e,y.Declaration=t,y.Container=s,y.Processor=n,y.Document=l,y.Comment=u,y.Warning=a,y.AtRule=h,y.Result=c,y.Input=p,y.Rule=m,y.Root=g,y.Node=w,r.registerPostcss(y),Ce=y,y.default=y,Ce}());Ze.stringify,Ze.fromJSON,Ze.plugin,Ze.parse,Ze.list,Ze.document,Ze.comment,Ze.atRule,Ze.rule,Ze.decl,Ze.root,Ze.CssSyntaxError,Ze.Declaration,Ze.Container,Ze.Processor,Ze.Document,Ze.Comment,Ze.Warning,Ze.AtRule,Ze.Result,Ze.Input,Ze.Rule,Ze.Root,Ze.Node;var Ke=Object.defineProperty,Xe=(e,t,r)=>((e,t,r)=>t in e?Ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function et(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var tt,rt={exports:{}};function st(){if(tt)return rt.exports;tt=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return rt.exports=t(),rt.exports.createColors=t,rt.exports}const nt=et(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var it,ot;function lt(){if(ot)return it;ot=1;let e=st(),t=nt;class r extends Error{constructor(e,t,s,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==t&&void 0!==s&&("number"==typeof t?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let s=this.source;null==r&&(r=e.isColorSupported),t&&r&&(s=t(s));let n,i,o=s.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),u=String(a).length;if(r){let{bold:t,gray:r,red:s}=e.createColors(!0);n=e=>t(s(e)),i=e=>r(e)}else n=i=e=>e;return o.slice(l,a).map((e,t)=>{let r=l+1+t,s=" "+(" "+r).slice(-u)+" | ";if(r===this.line){let t=i(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(s)+e+"\n "+t+n("^")}return" "+i(s)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return it=r,r.default=r,it}var at,ut,ht,ct,pt,ft,dt,mt,gt,wt,yt,bt,vt,xt,St,Ot,Ct,kt,Et,Rt,Mt,At,Pt,Nt,It,Lt,jt,Ut,Bt,Dt,_t,Ft,Tt,zt,$t,Wt,Vt,Jt,qt,Gt,Yt,Ht,Zt,Kt,Xt,Qt,er,tr,rr,sr,nr,ir,or,lr={};function ar(){return at||(at=1,lr.isClean=Symbol("isClean"),lr.my=Symbol("my")),lr}function ur(){if(ht)return ut;ht=1;const e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(t,r,s){let n;if(s||(s=r),r&&(n=t.raws[r],void 0!==n))return n;let i=t.parent;if("before"===s){if(!i||"root"===i.type&&i.first===t)return"";if(i&&"document"===i.type)return""}if(!i)return e[s];let o=t.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[s])return o.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(t,s);{let e="raw"+((l=s)[0].toUpperCase()+l.slice(1));this[e]?n=this[e](o,t):o.walk(e=>{if(n=e.raws[r],void 0!==n)return!1})}var l;return void 0===n&&(n=e[s]),o.rawCache[s]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return ut=t,t.default=t,ut}function hr(){if(pt)return ct;pt=1;let e=ur();function t(t,r){new e(r).stringify(t)}return ct=t,t.default=t,ct}function cr(){if(dt)return ft;dt=1;let{isClean:e,my:t}=ar(),r=lt(),s=ur(),n=hr();function i(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>i(e,r)):("object"===o&&null!==n&&(n=i(n)),r[s]=n)}return r}class o{constructor(r={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in r)if("nodes"===e){this.nodes=[];for(let t of r[e])"function"==typeof t.clone?this.append(t.clone()):this.append(t)}else this[e]=r[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=i(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new s).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let i=t.get(s.input);null==i&&(i=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:i,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=n){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}}return ft=o,o.default=o,ft}function pr(){if(gt)return mt;gt=1;let e=cr();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return mt=t,t.default=t,mt}function fr(){if(yt)return wt;yt=1;return wt={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}}}function dr(){if(vt)return bt;vt=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=nt,{existsSync:r,readFileSync:s}=nt,{dirname:n,join:i}=nt;class o{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=n(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=n(e),r(e))return this.mapFile=e,s(e,"utf-8").toString().trim()}loadMap(r,s){if(!1===s)return!1;if(s){if("string"==typeof s)return s;if("function"!=typeof s){if(s instanceof e)return t.fromSourceMap(s).toString();if(s instanceof t)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}{let e=s(r);if(e){let t=this.loadFile(e);if(!t)throw new Error("Unable to load previous source map: "+e.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return r&&(e=i(n(r),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return bt=o,o.default=o,bt}function mr(){if(St)return xt;St=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=nt,{fileURLToPath:r,pathToFileURL:s}=nt,{isAbsolute:n,resolve:i}=nt,{nanoid:o}=fr(),l=nt,a=lt(),u=dr(),h=Symbol("fromOffsetCache"),c=Boolean(e&&t),p=Boolean(i&&n);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!p||/^\w+:\/\//.test(t.from)||n(t.from)?this.file=t.from:this.file=i(t.from)),p&&c){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let i,o,l;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,l=e.col}else o=s.line,l=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let u=this.origin(t,r,o,l);return i=u?new a(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,n.plugin):new a(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:l,line:o},this.css,this.file,n.plugin),i.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(s&&(i.input.url=s(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[h])r=this[h];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[h]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,o){if(!this.map)return!1;let l,a,u=this.map.consumer(),h=u.originalPositionFor({column:t,line:e});if(!h.source)return!1;"number"==typeof i&&(l=u.originalPositionFor({column:o,line:i})),a=n(h.source)?s(h.source):new URL(h.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let c={column:h.column,endColumn:l&&l.column,endLine:l&&l.line,line:h.line,url:a.toString()};if("file:"===a.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");c.file=r(a)}let p=u.sourceContentFor(h.source);return p&&(c.source=p),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return xt=f,f.default=f,l&&l.registerInput&&l.registerInput(f),xt}function gr(){if(Ct)return Ot;Ct=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=nt,{dirname:r,relative:s,resolve:n,sep:i}=nt,{pathToFileURL:o}=nt,l=mr(),a=Boolean(e&&t),u=Boolean(r&&n&&s&&i);return Ot=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let s,n=this.toUrl(this.path(t.file)),i=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(s=new e(t.text),s.sourcesContent&&(s.sourcesContent=null)):s=t.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&a&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e,r,s=1,n=1,i="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,l,a)=>{if(this.css+=t,l&&"end"!==a&&(o.generated.line=s,o.generated.column=n-1,l.source&&l.source.start?(o.source=this.sourcePath(l),o.original.line=l.source.start.line,o.original.column=l.source.start.column-1,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=t.match(/\n/g),e?(s+=e.length,r=t.lastIndexOf("\n"),n=t.length-r):n+=t.length,l&&"start"!==a){let e=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===e.last&&!e.raws.semicolon||(l.source&&l.source.end?(o.source=this.sourcePath(l),o.original.line=l.source.end.line,o.original.column=l.source.end.column-1,o.generated.line=s,o.generated.column=n-2,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=n-1,this.map.addMapping(o)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=r(n(i,this.mapOpts.annotation)));let o=s(i,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new l(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function wr(){if(Et)return kt;Et=1;let e=cr();class t extends e{constructor(e){super(e),this.type="comment"}}return kt=t,t.default=t,kt}function yr(){if(Mt)return Rt;Mt=1;let e,t,r,s,{isClean:n,my:i}=ar(),o=pr(),l=wr(),a=cr();function u(e){return e.map(e=>(e.nodes&&(e.nodes=u(e.nodes)),delete e.source,e))}function h(e){if(e[n]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class c extends a{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",i=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of i)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(s,a){if("string"==typeof s)s=u(e(s).nodes);else if(void 0===s)s=[];else if(Array.isArray(s)){s=s.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===s.type&&"document"!==this.type){s=s.nodes.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if(s.type)s=[s];else if(s.prop){if(void 0===s.value)throw new Error("Value field is missed in node creation");"string"!=typeof s.value&&(s.value=String(s.value)),s=[new o(s)]}else if(s.selector)s=[new t(s)];else if(s.name)s=[new r(s)];else{if(!s.text)throw new Error("Unknown node type in node creation");s=[new l(s)]}return s.map(e=>(e[i]||c.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[n]&&h(e),void 0===e.raws.before&&a&&void 0!==a.raws.before&&(e.raws.before=a.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=t=>{e=t},c.registerRule=e=>{t=e},c.registerAtRule=e=>{r=e},c.registerRoot=e=>{s=e},Rt=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,o.prototype):"comment"===e.type?Object.setPrototypeOf(e,l.prototype):"root"===e.type&&Object.setPrototypeOf(e,s.prototype),e[i]=!0,e.nodes&&e.nodes.forEach(e=>{c.rebuild(e)})},Rt}function br(){if(Pt)return At;Pt=1;let e,t,r=yr();class s extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},At=s,s.default=s,At}function vr(){if(It)return Nt;It=1;let e={};return Nt=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function xr(){if(jt)return Lt;jt=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Lt=e,e.default=e,Lt}function Sr(){if(Bt)return Ut;Bt=1;let e=xr();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let s=new e(t,r);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return Ut=t,t.default=t,Ut}function Or(){if(Tt)return Ft;Tt=1;let e=yr();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Ft=t,t.default=t,e.registerAtRule(t),Ft}function Cr(){if($t)return zt;$t=1;let e,t,r=yr();class s extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},zt=s,s.default=s,r.registerRoot(s),zt}function kr(){if(Vt)return Wt;Vt=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,l=!1,a="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:l?r===a&&(l=!1):'"'===r||"'"===r?(l=!0,a=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==n&&s.push(n.trim()),n="",i=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};return Wt=e,e.default=e,Wt}function Er(){if(qt)return Jt;qt=1;let e=yr(),t=kr();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return Jt=r,r.default=r,e.registerRule(r),Jt}function Rr(){if(Yt)return Gt;Yt=1;let e=pr(),t=function(){if(_t)return Dt;_t=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),r="\\".charCodeAt(0),s="/".charCodeAt(0),n="\n".charCodeAt(0),i=" ".charCodeAt(0),o="\f".charCodeAt(0),l="\t".charCodeAt(0),a="\r".charCodeAt(0),u="[".charCodeAt(0),h="]".charCodeAt(0),c="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),d="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),w=":".charCodeAt(0),y="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,v=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Dt=function(O,C={}){let k,E,R,M,A,P,N,I,L,j,U=O.css.valueOf(),B=C.ignoreErrors,D=U.length,_=0,F=[],T=[];function z(e){throw O.error("Unclosed "+e,_)}return{back:function(e){T.push(e)},endOfFile:function(){return 0===T.length&&_>=D},nextToken:function(O){if(T.length)return T.pop();if(_>=D)return;let C=!!O&&O.ignoreUnclosed;switch(k=U.charCodeAt(_),k){case n:case i:case l:case a:case o:E=_;do{E+=1,k=U.charCodeAt(E)}while(k===i||k===n||k===l||k===a||k===o);j=["space",U.slice(_,E)],_=E-1;break;case u:case h:case f:case d:case w:case m:case p:{let e=String.fromCharCode(k);j=[e,e,_];break}case c:if(I=F.length?F.pop()[1]:"",L=U.charCodeAt(_+1),"url"===I&&L!==e&&L!==t&&L!==i&&L!==n&&L!==l&&L!==o&&L!==a){E=_;do{if(P=!1,E=U.indexOf(")",E+1),-1===E){if(B||C){E=_;break}z("bracket")}for(N=E;U.charCodeAt(N-1)===r;)N-=1,P=!P}while(P);j=["brackets",U.slice(_,E+1),_,E],_=E}else E=U.indexOf(")",_+1),M=U.slice(_,E+1),-1===E||x.test(M)?j=["(","(",_]:(j=["brackets",M,_,E],_=E);break;case e:case t:R=k===e?"'":'"',E=_;do{if(P=!1,E=U.indexOf(R,E+1),-1===E){if(B||C){E=_+1;break}z("string")}for(N=E;U.charCodeAt(N-1)===r;)N-=1,P=!P}while(P);j=["string",U.slice(_,E+1),_,E],_=E;break;case y:b.lastIndex=_+1,b.test(U),E=0===b.lastIndex?U.length-1:b.lastIndex-2,j=["at-word",U.slice(_,E+1),_,E],_=E;break;case r:for(E=_,A=!0;U.charCodeAt(E+1)===r;)E+=1,A=!A;if(k=U.charCodeAt(E+1),A&&k!==s&&k!==i&&k!==n&&k!==l&&k!==a&&k!==o&&(E+=1,S.test(U.charAt(E)))){for(;S.test(U.charAt(E+1));)E+=1;U.charCodeAt(E+1)===i&&(E+=1)}j=["word",U.slice(_,E+1),_,E],_=E;break;default:k===s&&U.charCodeAt(_+1)===g?(E=U.indexOf("*/",_+2)+1,0===E&&(B||C?E=U.length:z("comment")),j=["comment",U.slice(_,E+1),_,E],_=E):(v.lastIndex=_+1,v.test(U),E=0===v.lastIndex?U.length-1:v.lastIndex-2,j=["word",U.slice(_,E+1),_,E],F.push(j),_=E)}return _++,j},position:function(){return _}}}}(),r=wr(),s=Or(),n=Cr(),i=Er();const o={empty:!0,space:!0};return Gt=class{constructor(e){this.input=e,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,i=new s;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?u.push("("===t?")":"]"):"{"===t&&u.length>0?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){l=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),l&&(i.nodes=[],this.current=i)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(t)}s=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let s=new e;this.init(s,t[0][2]);let n,i=t[t.length-1];for(";"===i[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;s.prop+=t.shift()[1]}for(s.raws.between="";t.length;){if(n=t.shift(),":"===n[0]){s.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o,l=[];for(;t.length&&(o=t[0][0],"space"===o||"comment"===o);)l.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(n=t[e],"!important"===n[1].toLowerCase()){s.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(s.raws.important=r);break}if("important"===n[1].toLowerCase()){let r=t.slice(0),n="";for(let t=e;t>0;t--){let e=r[t][0];if(0===n.trim().indexOf("!")&&"space"!==e)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(s.important=!0,s.raws.important=n,t=r)}if("space"!==n[0]&&"comment"!==n[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=l.map(e=>e[1]).join(""),l=[]),this.raw(s,"value",l.concat(t),r),s.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new i;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,i=[],o=e[1].startsWith("--"),l=[],a=e;for(;a;){if(r=a[0],l.push(a),"("===r||"["===r)n||(n=a),i.push("("===r?")":"]");else if(o&&s&&"{"===r)n||(n=a),i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(l,o);break}if("{"===r)return void this.rule(l);if("}"===r){this.tokenizer.back(l.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&s){if(!o)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,o)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,i,l,a,u=r.length,h="",c=!0;for(let e=0;e<u;e+=1)n=r[e],i=n[0],"space"!==i||e!==u-1||s?"comment"===i?(a=r[e-1]?r[e-1][0]:"empty",l=r[e+1]?r[e+1][0]:"empty",o[a]||o[l]||","===h.slice(-1)?c=!1:h+=n[1]):h+=n[1]:c=!1;if(!c){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:h}}e[t]=h}rule(e){e.pop();let t=new i;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}}function Mr(){if(Zt)return Ht;Zt=1;let e=yr(),t=Rr(),r=mr();function s(e,s){let n=new r(e,s),i=new t(n);try{i.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&s&&s.from&&(/\.scss$/i.test(s.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(s.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(s.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return i.root}return Ht=s,s.default=s,e.registerParse(s),Ht}function Ar(){if(Xt)return Kt;Xt=1;let{isClean:e,my:t}=ar(),r=gr(),s=hr(),n=yr(),i=br(),o=vr(),l=Sr(),a=Mr(),u=Cr();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},p={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return"object"==typeof e&&"function"==typeof e.then}function d(e){let t=!1,r=h[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:d(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let w={};class y{constructor(e,r,s){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof y||r instanceof l)i=g(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=a;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{i=e(r,s)}catch(e){this.processed=!0,this.error=e}i&&!i[t]&&n.rebuild(i)}else i=g(r);this.result=new l(e,i,s),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),i=s.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!c[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(f(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[m(t)];for(;r.length>0;){let e=this.visitTick(r);if(f(e))try{await e}catch(e){let t=r[r.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=s;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(f(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||o("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:s,visitors:n}=r;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void t.pop();if(n.length>0&&r.visitorIndex<n.length){let[e,t]=n[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===n.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==r.iterator){let n,i=r.iterator;for(;n=s.nodes[s.indexes[i]];)if(s.indexes[i]+=1,!n[e])return n[e]=!0,void t.push(m(n));r.iterator=0,delete s.indexes[i]}let i=r.events;for(;r.eventIndex<i.length;){let t=i[r.eventIndex];if(r.eventIndex+=1,0===t)return void(s.nodes&&s.nodes.length&&(s[e]=!0,r.iterator=s.getIterator()));if(this.listeners[t])return void(r.visitors=this.listeners[t])}t.pop()}walkSync(t){t[e]=!0;let r=d(t);for(let s of r)if(0===s)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[s];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return y.registerPostcss=e=>{w=e},Kt=y,y.default=y,u.registerLazyResult(y),i.registerLazyResult(y),Kt}function Pr(){if(rr)return tr;rr=1;let e=function(){if(er)return Qt;er=1;let e=gr(),t=hr(),r=vr(),s=Mr();const n=Sr();class i{constructor(r,s,i){let o;s=s.toString(),this.stringified=!1,this._processor=r,this._css=s,this._opts=i,this._map=void 0;let l=t;this.result=new n(this._processor,o,this._opts),this.result.css=s;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let u=new e(l,o,this._opts,s);if(u.isMap()){let[e,t]=u.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=s;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}return Qt=i,i.default=i,Qt}(),t=Ar(),r=br(),s=Cr();class n{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(r,s={}){return this.plugins.length||s.parser||s.stringifier||s.syntax?new t(this,r,s):new e(this,r,s)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return tr=n,n.default=n,s.registerProcessor(n),r.registerProcessor(n),tr}const Nr=Qe(function(){if(or)return ir;or=1;let e=lt(),t=pr(),r=Ar(),s=yr(),n=Pr(),i=hr(),o=function(){if(nr)return sr;nr=1;let e=pr(),t=dr(),r=wr(),s=Or(),n=mr(),i=Cr(),o=Er();function l(a,u){if(Array.isArray(a))return a.map(e=>l(e));let{inputs:h,...c}=a;if(h){u=[];for(let e of h){let r={...e,__proto__:n.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),u.push(r)}}if(c.nodes&&(c.nodes=a.nodes.map(e=>l(e,u))),c.source){let{inputId:e,...t}=c.source;c.source=t,null!=e&&(c.source.input=u[e])}if("root"===c.type)return new i(c);if("decl"===c.type)return new e(c);if("rule"===c.type)return new o(c);if("comment"===c.type)return new r(c);if("atrule"===c.type)return new s(c);throw new Error("Unknown node type: "+a.type)}return sr=l,l.default=l,sr}(),l=br(),a=xr(),u=wr(),h=Or(),c=Sr(),p=mr(),f=Mr(),d=kr(),m=Er(),g=Cr(),w=cr();function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new n(e)}return y.plugin=function(e,t){let r,s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=(new n).version,i}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return y([i(r)]).process(e,t)},i},y.stringify=i,y.parse=f,y.fromJSON=o,y.list=d,y.comment=e=>new u(e),y.atRule=e=>new h(e),y.decl=e=>new t(e),y.rule=e=>new m(e),y.root=e=>new g(e),y.document=e=>new l(e),y.CssSyntaxError=e,y.Declaration=t,y.Container=s,y.Processor=n,y.Document=l,y.Comment=u,y.Warning=a,y.AtRule=h,y.Result=c,y.Input=p,y.Rule=m,y.Root=g,y.Node=w,r.registerPostcss(y),ir=y,y.default=y,ir}());Nr.stringify,Nr.fromJSON,Nr.plugin,Nr.parse,Nr.list,Nr.document,Nr.comment,Nr.atRule,Nr.rule,Nr.decl,Nr.root,Nr.CssSyntaxError,Nr.Declaration,Nr.Container,Nr.Processor,Nr.Document,Nr.Comment,Nr.Warning,Nr.AtRule,Nr.Result,Nr.Input,Nr.Rule,Nr.Root,Nr.Node;class Ir{constructor(...e){Xe(this,"parentElement",null),Xe(this,"parentNode",null),Xe(this,"ownerDocument"),Xe(this,"firstChild",null),Xe(this,"lastChild",null),Xe(this,"previousSibling",null),Xe(this,"nextSibling",null),Xe(this,"ELEMENT_NODE",1),Xe(this,"TEXT_NODE",3),Xe(this,"nodeType"),Xe(this,"nodeName"),Xe(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof Ir))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Lr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},jr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ur={};function Br(e){if(Ur[e])return Ur[e];const t=function(e){var t,r;const s=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return s&&globalThis[s]?globalThis[s]:void 0}(e)||globalThis[e],r=t.prototype,s=e in Lr?Lr[e]:void 0,n=Boolean(s&&s.every(e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),i=e in jr?jr[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o)return Ur[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(s),i?Ur[e]=i:r}catch{return r}}const Dr={};function _r(e,t,r){var s;const n=`${e}.${String(r)}`;if(Dr[n])return Dr[n].call(t);const i=Br(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(Dr[n]=o,o.call(t)):t[r]}const Fr={};function Tr(e,t,r){const s=`${e}.${String(r)}`;if(Fr[s])return Fr[s].bind(t);const n=Br(e)[r];return"function"!=typeof n?t[r]:(Fr[s]=n,n.bind(t))}const zr={childNodes:function(e){return _r("Node",e,"childNodes")},parentNode:function(e){return _r("Node",e,"parentNode")},parentElement:function(e){return _r("Node",e,"parentElement")},textContent:function(e){return _r("Node",e,"textContent")},contains:function(e,t){return Tr("Node",e,"contains")(t)},getRootNode:function(e){return Tr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?_r("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?_r("Element",e,"shadowRoot"):null},querySelector:function(e,t){return _r("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return _r("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Br("MutationObserver").constructor}};const $r="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Wr={map:{},getId:()=>(console.error($r),-1),getNode:()=>(console.error($r),null),removeNodeFromMap(){console.error($r)},has:()=>(console.error($r),!1),reset(){console.error($r)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Wr=new Proxy(Wr,{get:(e,t,r)=>("map"===t&&console.error($r),Reflect.get(e,t,r))}));let Vr=Date.now;function Jr(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:zr.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(Vr=()=>(new Date).getTime());function qr(e){var t;let r=null;return"getRootNode"in e&&(null==(t=zr.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&zr.host(zr.getRootNode(e))&&(r=zr.host(zr.getRootNode(e))),r}function Gr(e){let t,r=e;for(;t=qr(r);)r=t;return r}function Yr(e){const t=e.ownerDocument;if(!t)return!1;const r=Gr(e);return zr.contains(t,r)}const Hr=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){n(this,"id",1),n(this,"styleIDMap",new WeakMap),n(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return Wr},closestElementOfNode:Jr,getBaseDimension:function e(t,r){var s,n;const i=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!i||i===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),l=e(i,r),a=o.height/i.clientHeight;return{x:o.x*l.relativeScale+l.x,y:o.y*l.relativeScale+l.y,relativeScale:a,absoluteScale:l.absoluteScale*a}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:Gr,getShadowHost:qr,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,s,n;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=zr.parentElement(i.body))?void 0:t.scrollLeft)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(s=zr.parentElement(i.body))?void 0:s.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof Ir&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(zr.shadowRoot(e)))},hookSetter:function e(t,r,s,n,i=window){const o=i.Object.getOwnPropertyDescriptor(t,r);return i.Object.defineProperty(t,r,n?s:{set(e){setTimeout(()=>{s.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,r,o||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(zr.contains(t,e)||Yr(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&m.host(e)||null;return Boolean(t&&"shadowRoot"in t&&m.shadowRoot(t)===e)}(t))return!1;const s=r.getId(t);if(!r.has(s))return!0;const n=zr.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,r))},isBlocked:function(e,t,r,s){if(!e)return!1;const n=Jr(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(w(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return Vr},on:function(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)},patch:function(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}},polyfill:function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)},queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:i}=n;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,r(n,i.parent))}else{const e=s.indexOf(i);s.splice(e,0,r(n,null))}continue}if(i in t){const e=t[i];e.children.push(r(n,e));continue}s.push(r(n,null))}return s},shadowHostInDom:Yr,throttle:function(e,t,r={}){let s=null,n=0;return function(...i){const o=Date.now();n||!1!==r.leading||(n=o);const l=t-(o-n),a=this;l<=0||l>t?(s&&(clearTimeout(s),s=null),n=o,e.apply(a,i)):s||!1===r.trailing||(s=setTimeout(()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(a,i)},l))}},uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));for(var Zr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Xr=0;Xr<64;Xr++)Kr[Zr.charCodeAt(Xr)]=Xr;"undefined"!=typeof self&&self.Blob&&new Blob(['(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n'],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null==(e=t.contentWindow)?void 0:e.Array.from)||Array.from,document.body.removeChild(t)}}catch(e){console.debug("Unable to override Array.from",e)}var Qr,es;new g,(es=Qr||(Qr={}))[es.NotStarted=0]="NotStarted",es[es.Running=1]="Running",es[es.Stopped=2]="Stopped";class ts{constructor(e){r(this,"fileName"),r(this,"functionName"),r(this,"lineNumber"),r(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const rs=/(^|@)\S+:\d+/,ss=/^\s*at .*(\S+:\d+|\(native\))/m,ns=/^(eval@)?(\[native code])?$/,is={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(ss)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(ss)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const r=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=r?t.replace(r[0],""):t;const s=t.split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:s.pop()),i=s.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new ts({functionName:i,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(ns)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new ts({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),s=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new ts({functionName:s,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),s=[];for(let e=2,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new ts({fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),s=[];for(let e=0,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new ts({functionName:n[3]||void 0,fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(rs)&&!e.match(/^Error created at/)},this).map(function(e){const t=e.split("@"),r=this.extractLocation(t.pop()),s=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new ts({functionName:s,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})},this)}};function os(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();const s=e.parentElement,n=[];if(s.children&&s.children.length>0)for(let e=0;e<s.children.length;e++){const t=s.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===r&&n.push(t)}n.length>1&&(r+=`:eq(${n.indexOf(e)})`),t=r+(t?">"+t:""),e=s}return t}function ls(e){return"[object Object]"===Object.prototype.toString.call(e)}function as(e,t){if(0===t)return!0;const r=Object.keys(e);for(const s of r)if(ls(e[s])&&as(e[s],t-1))return!0;return!1}function us(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const s=[],n=[];return JSON.stringify(e,function(e,t){if(s.length>0){const r=s.indexOf(this);~r?s.splice(r+1):s.push(this),~r?n.splice(r,1/0,e):n.push(e),~s.indexOf(t)&&(t=s[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,s.indexOf(t)).join(".")+"]")}else s.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(ls(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(ls(e)&&as(e,r.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=`${t.slice(0,r.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const r in t){const s=t[r];Array.isArray(s)?e[r]=os(s.length?s[0]:null):e[r]=s}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}const hs={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function cs(e,t,r){const s=r?Object.assign({},hs,r):hs,n=s.logger;if(!n)return()=>{};let i;i="string"==typeof n?t[n]:n;let o=0,l=!1;const a=[];if(s.level.includes("error")){const r=t=>{const r=t.message,n=t.error,i=is.parse(n).map(e=>e.toString()),o=[us(r,s.stringifyOptions)];e({level:"error",trace:i,payload:o})};t.addEventListener("error",r),a.push(()=>{t.removeEventListener("error",r)});const n=t=>{let r,n;t.reason instanceof Error?(r=t.reason,n=[us(`Uncaught (in promise) ${r.name}: ${r.message}`,s.stringifyOptions)]):(r=new Error,n=[us("Uncaught (in promise)",s.stringifyOptions),us(t.reason,s.stringifyOptions)]);const i=is.parse(r).map(e=>e.toString());e({level:"error",trace:i,payload:n})};t.addEventListener("unhandledrejection",n),a.push(()=>{t.removeEventListener("unhandledrejection",n)})}for(const e of s.level)a.push(u(i,e));return()=>{a.forEach(e=>e())};function u(t,r){return t[r]?Hr.patch(t,r,t=>(...n)=>{if(t.apply(this,n),!("assert"===r&&n[0]||l)){l=!0;try{const t=is.parse(new Error).map(e=>e.toString()).splice(1),i=("assert"===r?n.slice(1):n).map(e=>us(e,s.stringifyOptions));o++,o<s.lengthThreshold?e({level:r,trace:t,payload:i}):o===s.lengthThreshold&&e({level:"warn",trace:[],payload:[us("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...n)}finally{l=!1}}}):()=>{}}}const ps="rrweb/console@1",fs=e=>({name:ps,observer:cs,options:e});export{ps as PLUGIN_NAME,fs as getRecordConsolePlugin};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var e,t=Object.defineProperty,r=(e,r,s)=>((e,r,s)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s)(e,"symbol"!=typeof r?r+"":r,s),s=Object.defineProperty,n=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),o=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(o||{});const i={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},a={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},l={};function c(e){if(l[e])return l[e];const t=function(e){var t,r;const s=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return s&&globalThis[s]?globalThis[s]:void 0}(e)||globalThis[e],r=t.prototype,s=e in i?i[e]:void 0,n=Boolean(s&&s.every(e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),o=e in a?a[e]:void 0,c=Boolean(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&c)return l[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?l[e]=o:r}catch{return r}}const u={};function h(e,t,r){var s;const n=`${e}.${String(r)}`;if(u[n])return u[n].call(t);const o=c(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(u[n]=i,i.call(t)):t[r]}const p={};function d(e,t,r){const s=`${e}.${String(r)}`;if(p[s])return p[s].bind(t);const n=c(e)[r];return"function"!=typeof n?t[r]:(p[s]=n,n.bind(t))}const f={childNodes:function(e){return h("Node",e,"childNodes")},parentNode:function(e){return h("Node",e,"parentNode")},parentElement:function(e){return h("Node",e,"parentElement")},textContent:function(e){return h("Node",e,"textContent")},contains:function(e,t){return d("Node",e,"contains")(t)},getRootNode:function(e){return d("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?h("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?h("Element",e,"shadowRoot"):null},querySelector:function(e,t){return h("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return h("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return c("MutationObserver").constructor}};function m(e){return e.nodeType===e.ELEMENT_NODE}function g(e){const t=e&&"host"in e&&"mode"in e&&f.host(e)||null;return Boolean(t&&"shadowRoot"in t&&f.shadowRoot(t)===e)}function y(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function w(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);const n=Array.from(r,e=>b(e,s)).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function b(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=w(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?A(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(r)),t?A(r,t):r}}class S{constructor(){n(this,"idNodeMap",new Map),n(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function v({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let i=n||"";const a=s&&C(s);return(t[r.toLowerCase()]||a&&t[a])&&(i=o?o(i,e):"*".repeat(i.length)),i}function C(e){return e.toLowerCase()}const k="__rrweb_original__";function x(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?C(t):null}function O(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}const s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const M=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,I=/^(?:[a-z+]+:)?\/\//i,E=/^www\..*/i,R=/^(data:)([^,]*),(.*)/i;function A(e,t){return(e||"").replace(M,(e,r,s,n,o,i)=>{const a=s||o||i,l=r||n||"";if(!a)return e;if(I.test(a)||E.test(a))return`url(${l}${a}${l})`;if(R.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),u=a.split("/");c.pop();for(const e of u)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`})}function T(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function N(e,t){return function(e,t,r=!1){const s=Array.from(t.childNodes),n=[];let o=0;if(s.length>1&&e&&"string"==typeof e){let t=T(e,r);const i=t.length/e.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&"string"==typeof s[a].textContent){const l=T(s[a].textContent,r),c=100;let u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,u),1));u++);for(;u<l.length;u++){let h=l.substring(0,u),p=t.split(h),d=-1;if(2===p.length)d=p[0].length;else if(p.length>2&&""===p[0]&&""!==s[a-1].textContent)d=t.indexOf(h,1);else if(1===p.length){if(h=h.substring(0,h.length-1),p=t.split(h),p.length<=1)return n.push(e),n;u=c+1}else u===l.length-1&&(d=t.indexOf(h));if(p.length>=2&&u>c){const e=s[a-1].textContent;if(e&&"string"==typeof e){const r=T(e).length;d=t.indexOf(h,r)}-1===d&&(d=p[0].length)}if(-1!==d){let a=Math.floor(d/i);for(;a>0&&a<e.length;){if(o+=1,o>50*s.length)return n.push(e),n;const l=T(e.substring(0,a),r);if(l.length===d){n.push(e.substring(0,a)),e=e.substring(a),t=t.substring(d);break}l.length<d?a+=Math.max(1,Math.floor((d-l.length)/i)):a-=Math.max(1,Math.floor((l.length-d)*i))}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}const L="lightgrey";let P=1;const D=new RegExp("[^a-z0-9-_:]");function F(){return P++}let _,U;const B=/^[^ \t\n\r\u000c]+/,j=/^[, \t\n\r\u000c]+/;const z=new WeakMap;function W(e,t){return t&&""!==t.trim()?V(e,t):t}function $(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function V(e,t){let r=z.get(e);if(r||(r=e.createElement("a"),z.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function G(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?W(e,s):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s;const n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}const n=[];for(;s(j),!(r>=t.length);){let o=s(B);if(","===o.slice(-1))o=W(e,o.substring(0,o.length-1)),n.push(o);else{let s="";o=W(e,o);let i=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((o+s).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){r+=1,n.push((o+s).trim());break}"("===e&&(i=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?A(s,V(e)):"object"===t&&"data"===r?W(e,s):s:W(e,s):s}function H(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function q(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&q(f.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&q(f.parentNode(e),t,r)}function J(e,t,r,s){let n;if(m(e)){if(n=e,!f.childNodes(n).length)return!1}else{if(null===f.parentElement(e))return!1;n=f.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(q(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function Y(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:a,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:u,maskInputFn:h,maskAttributeFn:p,dataURLOptions:d={},inlineImages:m,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:b=!1,cssCaptured:S=!1,applyBackgroundColorToBlockedElements:O=!1}=t,M=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:o.Document,childNodes:[],compatMode:e.compatMode}:{type:o.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:o.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:M};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:i,maskInputOptions:a={},maskInputFn:l,maskAttributeFn:c,dataURLOptions:u={},inlineImages:h,recordCanvas:p,keepIframeSrcFn:d,newlyAddedElement:f=!1,rootId:m,applyBackgroundColorToBlockedElements:g=!1}=t,y=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,s,n),b=function(e){if(e instanceof HTMLFormElement)return"form";const t=C(e.tagName);return D.test(t)?"div":t}(e);let S={};const O=e.attributes.length;for(let t=0;t<O;t++){const s=e.attributes[t];if(!H(b,s.name,s.value)){const t=G(r,b,C(s.name),s.value);if(c&&null!==t){const r=c(s.name,t,e);null!==r&&(S[s.name]=r)}else S[s.name]=t}}if("link"===b&&i){const t=Array.from(r.styleSheets).find(t=>t.href===e.href);let s=null;t&&(s=w(t)),s&&(delete S.rel,delete S.href,S._cssText=s)}if("style"===b&&e.sheet){let t=w(e.sheet);t&&(e.childNodes.length>1&&(t=N(t,e)),S._cssText=t)}if("input"===b||"textarea"===b||"select"===b){const t=e.value,r=e.checked;"radio"!==S.type&&"checkbox"!==S.type&&"submit"!==S.type&&"button"!==S.type&&t?S.value=v({element:e,type:x(e),tagName:b,value:t,maskInputOptions:a,maskInputFn:l}):r&&(S.checked=r)}"option"===b&&(e.selected&&!a.select?S.selected=!0:delete S.selected);"dialog"===b&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===b&&p)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let s=0;s<e.height;s+=50){const n=t.getImageData,o=k in n?n[k]:n;if(new Uint32Array(o.call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(S.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(u.type,u.quality)&&(S.rr_dataURL=t)}if("img"===b&&h){_||(_=r.createElement("canvas"),U=_.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{_.width=t.naturalWidth,_.height=t.naturalHeight,U.drawImage(t,0,0),S.rr_dataURL=_.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${s}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(n?S.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"===b||"video"===b){const t=S;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}f||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop));if(y){const{width:t,height:r}=e.getBoundingClientRect();S={class:S.class,rr_width:`${t}px`,rr_height:`${r}px`,...g?{rr_background_color:L}:{}}}"iframe"!==b||d(S.src)||(e.contentDocument||(S.rr_src=S.src),delete S.src);let M;try{customElements.get(b)&&(M=!0)}catch(e){}return{type:o.Element,tagName:b,attributes:S,childNodes:[],isSVG:$(e)||void 0,needBlock:y,rootId:m,isCustom:M}}(e,{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:l,maskInputOptions:c,maskInputFn:h,maskAttributeFn:p,dataURLOptions:d,inlineImages:m,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:b,rootId:M,applyBackgroundColorToBlockedElements:O});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:i}=t,a=f.parentNode(e),l=a&&a.tagName;let c="";const u="STYLE"===l||void 0,h="SCRIPT"===l||void 0;h?c="SCRIPT_PLACEHOLDER":i||(c=f.textContent(e),u&&c&&(c=A(c,V(t.doc))));!u&&!h&&c&&r&&(c=s?s(c,f.parentElement(e)):c.replace(/[\S]/g,"*"));return{type:o.Text,textContent:c||"",rootId:n}}(e,{doc:r,needsMask:a,maskTextFn:u,rootId:M,cssCaptured:S});case e.CDATA_SECTION_NODE:return{type:o.CDATA,textContent:"",rootId:M};case e.COMMENT_NODE:return{type:o.Comment,textContent:f.textContent(e)||"",rootId:M};default:return!1}}function X(e){return null==e?"":e.toLowerCase()}function Z(e,t,r){return Array.from(e).map(e=>{const s=t(e);let n=[];if(!r.has(s)){r.add(s);try{n=Array.from(e.cssRules,(t,r)=>({rule:b(t,e.href),index:r}))}catch(e){if(!(e instanceof DOMException&&"SecurityError"===e.name))throw e}}return{styleId:s,rules:n}})}function K(e,t){var r,s;const{doc:n,mirror:i,blockClass:a,blockSelector:l,maskTextClass:c,maskTextSelector:u,skipChild:h=!1,inlineStylesheet:p=!0,maskInputOptions:d={},maskTextFn:w,maskInputFn:b,maskAttributeFn:S,slimDOMOptions:v,dataURLOptions:C={},inlineImages:k=!1,recordCanvas:x=!1,onSerialize:M,onAdoptedStyleSheet:I,onIframeLoad:E,iframeLoadTimeout:R=5e3,onStylesheetLoad:A,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:L=!1,cssCaptured:P=!1,applyBackgroundColorToBlockedElements:D=!1}=t,_=t._emittedStyleIds??new Set;let{needsMask:U}=t,{preserveWhiteSpace:B=!0}=t;if(!U){U=J(e,c,u,void 0===U)}const j=Y(e,{doc:n,mirror:i,blockClass:a,blockSelector:l,needsMask:U,inlineStylesheet:p,maskInputOptions:d,maskTextFn:w,maskInputFn:b,maskAttributeFn:S,dataURLOptions:C,inlineImages:k,recordCanvas:x,keepIframeSrcFn:N,newlyAddedElement:L,cssCaptured:P,applyBackgroundColorToBlockedElements:D});if(!j)return console.warn(e,"not serialized"),null;let z;z=i.hasNode(e)?i.getId(e):function(e,t){if(t.comment&&e.type===o.Comment)return!0;if(e.type===o.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===O(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(X(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===X(e.attributes.name)||"icon"===X(e.attributes.rel)||"apple-touch-icon"===X(e.attributes.rel)||"shortcut icon"===X(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&X(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(X(e.attributes.property).match(/^(og|twitter|fb):/)||X(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===X(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===X(e.attributes.name)||"googlebot"===X(e.attributes.name)||"bingbot"===X(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===X(e.attributes.name)||"generator"===X(e.attributes.name)||"framework"===X(e.attributes.name)||"publisher"===X(e.attributes.name)||"progid"===X(e.attributes.name)||X(e.attributes.property).match(/^article:/)||X(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===X(e.attributes.name)||"yandex-verification"===X(e.attributes.name)||"csrf-token"===X(e.attributes.name)||"p:domain_verify"===X(e.attributes.name)||"verify-v1"===X(e.attributes.name)||"verification"===X(e.attributes.name)||"shopify-checkout-api-token"===X(e.attributes.name)))return!0}}return!1}(j,v)||!B&&j.type===o.Text&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?-2:F();const W=Object.assign(j,{id:z});if(i.add(e,W),-2===z)return null;M&&M(e);let $=!h;if(W.type===o.Element){$=$&&!W.needBlock,delete W.needBlock;const t=f.shadowRoot(e);t&&y(t)&&(W.isShadowHost=!0,I&&(null==(r=t.adoptedStyleSheets)?void 0:r.length)&&(W.adoptedStyleSheets=Z(t.adoptedStyleSheets,I,_)))}if(W.type===o.Document&&I){const t=e;(null==(s=t.adoptedStyleSheets)?void 0:s.length)&&(W.adoptedStyleSheets=Z(t.adoptedStyleSheets,I,_))}if((W.type===o.Document||W.type===o.Element)&&$){v.headWhitespace&&W.type===o.Element&&"head"===W.tagName&&(B=!1);const t={doc:n,mirror:i,blockClass:a,blockSelector:l,needsMask:U,maskTextClass:c,maskTextSelector:u,skipChild:h,inlineStylesheet:p,maskInputOptions:d,maskTextFn:w,maskInputFn:b,maskAttributeFn:S,slimDOMOptions:v,dataURLOptions:C,inlineImages:k,recordCanvas:x,preserveWhiteSpace:B,onSerialize:M,onAdoptedStyleSheet:I,_emittedStyleIds:_,onIframeLoad:E,iframeLoadTimeout:R,onStylesheetLoad:A,stylesheetLoadTimeout:T,keepIframeSrcFn:N,cssCaptured:!1,applyBackgroundColorToBlockedElements:D};if(W.type===o.Element&&"textarea"===W.tagName&&void 0!==W.attributes.value);else{W.type===o.Element&&void 0!==W.attributes._cssText&&"string"==typeof W.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(f.childNodes(e))){const e=K(r,t);e&&W.childNodes.push(e)}}let r=null;if(m(e)&&(r=f.shadowRoot(e)))for(const e of Array.from(f.childNodes(r))){const s=K(e,t);s&&(y(r)&&(s.isShadow=!0),W.childNodes.push(s))}}const V=f.parentNode(e);return V&&g(V)&&y(V)&&(W.isShadow=!0),W.type===o.Element&&"iframe"===W.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,o=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout(()=>{o||(t(),o=!0)},r);return void e.addEventListener("load",()=>{clearTimeout(s),o=!0,t()})}const i="about:blank";if(s.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&E){const r=K(t,{doc:t,mirror:i,blockClass:a,blockSelector:l,needsMask:U,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:d,maskTextFn:w,maskInputFn:b,maskAttributeFn:S,slimDOMOptions:v,dataURLOptions:C,inlineImages:k,recordCanvas:x,preserveWhiteSpace:B,onSerialize:M,onAdoptedStyleSheet:I,onIframeLoad:E,iframeLoadTimeout:R,onStylesheetLoad:A,stylesheetLoadTimeout:T,keepIframeSrcFn:N});r&&E(e,r)}},R),W.type===o.Element&&"link"===W.tagName&&"string"==typeof W.attributes.rel&&("stylesheet"===W.attributes.rel||"preload"===W.attributes.rel&&"string"==typeof W.attributes.href&&"css"===O(W.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const o=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),n=!0,t()})}(e,()=>{if(A){const t=K(e,{doc:n,mirror:i,blockClass:a,blockSelector:l,needsMask:U,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:d,maskTextFn:w,maskInputFn:b,maskAttributeFn:S,slimDOMOptions:v,dataURLOptions:C,inlineImages:k,recordCanvas:x,preserveWhiteSpace:B,onSerialize:M,onIframeLoad:E,iframeLoadTimeout:R,onStylesheetLoad:A,stylesheetLoadTimeout:T,keepIframeSrcFn:N});t&&A(e,t)}},T),W}function Q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ee(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var te,re={exports:{}};function se(){if(te)return re.exports;te=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return re.exports=t(),re.exports.createColors=t,re.exports}const ne=ee(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var oe,ie;function ae(){if(ie)return oe;ie=1;let e=se(),t=ne;class r extends Error{constructor(e,t,s,n,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==t&&void 0!==s&&("number"==typeof t?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let s=this.source;null==r&&(r=e.isColorSupported),t&&r&&(s=t(s));let n,o,i=s.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,i.length),c=String(l).length;if(r){let{bold:t,gray:r,red:s}=e.createColors(!0);n=e=>t(s(e)),o=e=>r(e)}else n=o=e=>e;return i.slice(a,l).map((e,t)=>{let r=a+1+t,s=" "+(" "+r).slice(-c)+" | ";if(r===this.line){let t=o(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+o(s)+e+"\n "+t+n("^")}return" "+o(s)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return oe=r,r.default=r,oe}var le,ce,ue,he,pe,de,fe,me,ge,ye,we,be,Se,ve,Ce,ke,xe,Oe,Me,Ie,Ee,Re,Ae,Te,Ne,Le,Pe,De,Fe,_e,Ue,Be,je,ze,We,$e,Ve,Ge,He,qe,Je,Ye,Xe,Ze,Ke,Qe,et,tt,rt,st,nt,ot,it,at={};function lt(){return le||(le=1,at.isClean=Symbol("isClean"),at.my=Symbol("my")),at}function ct(){if(ue)return ce;ue=1;const e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(t,r,s){let n;if(s||(s=r),r&&(n=t.raws[r],void 0!==n))return n;let o=t.parent;if("before"===s){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[s];let i=t.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(t,s);{let e="raw"+((a=s)[0].toUpperCase()+a.slice(1));this[e]?n=this[e](i,t):i.walk(e=>{if(n=e.raws[r],void 0!==n)return!1})}var a;return void 0===n&&(n=e[s]),i.rawCache[s]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return ce=t,t.default=t,ce}function ut(){if(pe)return he;pe=1;let e=ct();function t(t,r){new e(r).stringify(t)}return he=t,t.default=t,he}function ht(){if(fe)return de;fe=1;let{isClean:e,my:t}=lt(),r=ae(),s=ct(),n=ut();function o(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],i=typeof n;"parent"===s&&"object"===i?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>o(e,r)):("object"===i&&null!==n&&(n=o(n)),r[s]=n)}return r}class i{constructor(r={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in r)if("nodes"===e){this.nodes=[];for(let t of r[e])"function"==typeof t.clone?this.append(t.clone()):this.append(t)}else this[e]=r[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=o(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new s).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=n){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}}return de=i,i.default=i,de}function pt(){if(ge)return me;ge=1;let e=ht();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return me=t,t.default=t,me}function dt(){if(we)return ye;we=1;return ye={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}}}function ft(){if(Se)return be;Se=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ne,{existsSync:r,readFileSync:s}=ne,{dirname:n,join:o}=ne;class i{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=n(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=n(e),r(e))return this.mapFile=e,s(e,"utf-8").toString().trim()}loadMap(r,s){if(!1===s)return!1;if(s){if("string"==typeof s)return s;if("function"!=typeof s){if(s instanceof e)return t.fromSourceMap(s).toString();if(s instanceof t)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}{let e=s(r);if(e){let t=this.loadFile(e);if(!t)throw new Error("Unable to load previous source map: "+e.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return r&&(e=o(n(r),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return be=i,i.default=i,be}function mt(){if(Ce)return ve;Ce=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ne,{fileURLToPath:r,pathToFileURL:s}=ne,{isAbsolute:n,resolve:o}=ne,{nanoid:i}=dt(),a=ne,l=ae(),c=ft(),u=Symbol("fromOffsetCache"),h=Boolean(e&&t),p=Boolean(o&&n);class d{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!p||/^\w+:\/\//.test(t.from)||n(t.from)?this.file=t.from:this.file=o(t.from)),p&&h){let e=new c(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let o,i,a;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);i=e.line,a=e.col}else i=s.line,a=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let c=this.origin(t,r,i,a);return o=c?new l(e,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):new l(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:a,line:i},this.css,this.file,n.plugin),o.input={column:r,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(s&&(o.input.url=s(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[u])r=this[u];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[u]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,o,i){if(!this.map)return!1;let a,l,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof o&&(a=c.originalPositionFor({column:i,line:o})),l=n(u.source)?s(u.source):new URL(u.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let h={column:u.column,endColumn:a&&a.column,endLine:a&&a.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");h.file=r(l)}let p=c.sourceContentFor(u.source);return p&&(h.source=p),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return ve=d,d.default=d,a&&a.registerInput&&a.registerInput(d),ve}function gt(){if(xe)return ke;xe=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ne,{dirname:r,relative:s,resolve:n,sep:o}=ne,{pathToFileURL:i}=ne,a=mt(),l=Boolean(e&&t),c=Boolean(r&&n&&s&&o);return ke=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let s,n=this.toUrl(this.path(t.file)),o=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(s=new e(t.text),s.sourcesContent&&(s.sourcesContent=null)):s=t.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e,r,s=1,n=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(i.generated.line=s,i.generated.column=n-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=t.match(/\n/g),e?(s+=e.length,r=t.lastIndexOf("\n"),n=t.length-r):n+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=n-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let o=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=r(n(o,this.mapOpts.annotation)));let i=s(o,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(i){let t=i(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function yt(){if(Me)return Oe;Me=1;let e=ht();class t extends e{constructor(e){super(e),this.type="comment"}}return Oe=t,t.default=t,Oe}function wt(){if(Ee)return Ie;Ee=1;let e,t,r,s,{isClean:n,my:o}=lt(),i=pt(),a=yt(),l=ht();function c(e){return e.map(e=>(e.nodes&&(e.nodes=c(e.nodes)),delete e.source,e))}function u(e){if(e[n]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)u(t)}class h extends l{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(s,l){if("string"==typeof s)s=c(e(s).nodes);else if(void 0===s)s=[];else if(Array.isArray(s)){s=s.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===s.type&&"document"!==this.type){s=s.nodes.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if(s.type)s=[s];else if(s.prop){if(void 0===s.value)throw new Error("Value field is missed in node creation");"string"!=typeof s.value&&(s.value=String(s.value)),s=[new i(s)]}else if(s.selector)s=[new t(s)];else if(s.name)s=[new r(s)];else{if(!s.text)throw new Error("Unknown node type in node creation");s=[new a(s)]}return s.map(e=>(e[o]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[n]&&u(e),void 0===e.raws.before&&l&&void 0!==l.raws.before&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=t=>{e=t},h.registerRule=e=>{t=e},h.registerAtRule=e=>{r=e},h.registerRoot=e=>{s=e},Ie=h,h.default=h,h.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,i.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,s.prototype),e[o]=!0,e.nodes&&e.nodes.forEach(e=>{h.rebuild(e)})},Ie}function bt(){if(Ae)return Re;Ae=1;let e,t,r=wt();class s extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},Re=s,s.default=s,Re}function St(){if(Ne)return Te;Ne=1;let e={};return Te=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function vt(){if(Pe)return Le;Pe=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Le=e,e.default=e,Le}function Ct(){if(Fe)return De;Fe=1;let e=vt();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let s=new e(t,r);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return De=t,t.default=t,De}function kt(){if(je)return Be;je=1;let e=wt();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Be=t,t.default=t,e.registerAtRule(t),Be}function xt(){if(We)return ze;We=1;let e,t,r=wt();class s extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},ze=s,s.default=s,r.registerRoot(s),ze}function Ot(){if(Ve)return $e;Ve=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};return $e=e,e.default=e,$e}function Mt(){if(He)return Ge;He=1;let e=wt(),t=Ot();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return Ge=r,r.default=r,e.registerRule(r),Ge}function It(){if(Je)return qe;Je=1;let e=pt(),t=function(){if(Ue)return _e;Ue=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),r="\\".charCodeAt(0),s="/".charCodeAt(0),n="\n".charCodeAt(0),o=" ".charCodeAt(0),i="\f".charCodeAt(0),a="\t".charCodeAt(0),l="\r".charCodeAt(0),c="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),p=")".charCodeAt(0),d="{".charCodeAt(0),f="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),w="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,S=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return _e=function(k,x={}){let O,M,I,E,R,A,T,N,L,P,D=k.css.valueOf(),F=x.ignoreErrors,_=D.length,U=0,B=[],j=[];function z(e){throw k.error("Unclosed "+e,U)}return{back:function(e){j.push(e)},endOfFile:function(){return 0===j.length&&U>=_},nextToken:function(k){if(j.length)return j.pop();if(U>=_)return;let x=!!k&&k.ignoreUnclosed;switch(O=D.charCodeAt(U),O){case n:case o:case a:case l:case i:M=U;do{M+=1,O=D.charCodeAt(M)}while(O===o||O===n||O===a||O===l||O===i);P=["space",D.slice(U,M)],U=M-1;break;case c:case u:case d:case f:case y:case m:case p:{let e=String.fromCharCode(O);P=[e,e,U];break}case h:if(N=B.length?B.pop()[1]:"",L=D.charCodeAt(U+1),"url"===N&&L!==e&&L!==t&&L!==o&&L!==n&&L!==a&&L!==i&&L!==l){M=U;do{if(A=!1,M=D.indexOf(")",M+1),-1===M){if(F||x){M=U;break}z("bracket")}for(T=M;D.charCodeAt(T-1)===r;)T-=1,A=!A}while(A);P=["brackets",D.slice(U,M+1),U,M],U=M}else M=D.indexOf(")",U+1),E=D.slice(U,M+1),-1===M||v.test(E)?P=["(","(",U]:(P=["brackets",E,U,M],U=M);break;case e:case t:I=O===e?"'":'"',M=U;do{if(A=!1,M=D.indexOf(I,M+1),-1===M){if(F||x){M=U+1;break}z("string")}for(T=M;D.charCodeAt(T-1)===r;)T-=1,A=!A}while(A);P=["string",D.slice(U,M+1),U,M],U=M;break;case w:b.lastIndex=U+1,b.test(D),M=0===b.lastIndex?D.length-1:b.lastIndex-2,P=["at-word",D.slice(U,M+1),U,M],U=M;break;case r:for(M=U,R=!0;D.charCodeAt(M+1)===r;)M+=1,R=!R;if(O=D.charCodeAt(M+1),R&&O!==s&&O!==o&&O!==n&&O!==a&&O!==l&&O!==i&&(M+=1,C.test(D.charAt(M)))){for(;C.test(D.charAt(M+1));)M+=1;D.charCodeAt(M+1)===o&&(M+=1)}P=["word",D.slice(U,M+1),U,M],U=M;break;default:O===s&&D.charCodeAt(U+1)===g?(M=D.indexOf("*/",U+2)+1,0===M&&(F||x?M=D.length:z("comment")),P=["comment",D.slice(U,M+1),U,M],U=M):(S.lastIndex=U+1,S.test(D),M=0===S.lastIndex?D.length-1:S.lastIndex-2,P=["word",D.slice(U,M+1),U,M],B.push(P),U=M)}return U++,P},position:function(){return U}}}}(),r=yt(),s=kt(),n=xt(),o=Mt();const i={empty:!0,space:!0};return qe=class{constructor(e){this.input=e,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,o=new s;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(n=l.length-1,r=l[n];r&&"space"===r[0];)r=l[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let s=new e;this.init(s,t[0][2]);let n,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;s.prop+=t.shift()[1]}for(s.raws.between="";t.length;){if(n=t.shift(),":"===n[0]){s.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,a=[];for(;t.length&&(i=t[0][0],"space"===i||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(n=t[e],"!important"===n[1].toLowerCase()){s.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(s.raws.important=r);break}if("important"===n[1].toLowerCase()){let r=t.slice(0),n="";for(let t=e;t>0;t--){let e=r[t][0];if(0===n.trim().indexOf("!")&&"space"!==e)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(s.important=!0,s.raws.important=n,t=r)}if("space"!==n[0]&&"comment"!==n[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),r),s.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,a,l,c=r.length,u="",h=!0;for(let e=0;e<c;e+=1)n=r[e],o=n[0],"space"!==o||e!==c-1||s?"comment"===o?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",i[l]||i[a]||","===u.slice(-1)?h=!1:u+=n[1]):u+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:u}}e[t]=u}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}}function Et(){if(Xe)return Ye;Xe=1;let e=wt(),t=It(),r=mt();function s(e,s){let n=new r(e,s),o=new t(n);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&s&&s.from&&(/\.scss$/i.test(s.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(s.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(s.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Ye=s,s.default=s,e.registerParse(s),Ye}function Rt(){if(Ke)return Ze;Ke=1;let{isClean:e,my:t}=lt(),r=gt(),s=ut(),n=wt(),o=bt(),i=St(),a=Ct(),l=Et(),c=xt();const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},p={Once:!0,postcssPlugin:!0,prepare:!0};function d(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let y={};class w{constructor(e,r,s){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof w||r instanceof a)o=g(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=l;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{o=e(r,s)}catch(e){this.processed=!0,this.error=e}o&&!o[t]&&n.rebuild(o)}else o=g(r);this.result=new a(e,o,s),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!h[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(d(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[m(t)];for(;r.length>0;){let e=this.visitTick(r);if(d(e))try{await e}catch(e){let t=r[r.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return d(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=s;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(d(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(d(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:s,visitors:n}=r;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void t.pop();if(n.length>0&&r.visitorIndex<n.length){let[e,t]=n[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===n.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==r.iterator){let n,o=r.iterator;for(;n=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!n[e])return n[e]=!0,void t.push(m(n));r.iterator=0,delete s.indexes[o]}let o=r.events;for(;r.eventIndex<o.length;){let t=o[r.eventIndex];if(r.eventIndex+=1,0===t)return void(s.nodes&&s.nodes.length&&(s[e]=!0,r.iterator=s.getIterator()));if(this.listeners[t])return void(r.visitors=this.listeners[t])}t.pop()}walkSync(t){t[e]=!0;let r=f(t);for(let s of r)if(0===s)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[s];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=e=>{y=e},Ze=w,w.default=w,c.registerLazyResult(w),o.registerLazyResult(w),Ze}function At(){if(rt)return tt;rt=1;let e=function(){if(et)return Qe;et=1;let e=gt(),t=ut(),r=St(),s=Et();const n=Ct();class o{constructor(r,s,o){let i;s=s.toString(),this.stringified=!1,this._processor=r,this._css=s,this._opts=o,this._map=void 0;let a=t;this.result=new n(this._processor,i,this._opts),this.result.css=s;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new e(a,i,this._opts,s);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=s;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}return Qe=o,o.default=o,Qe}(),t=Rt(),r=bt(),s=xt();class n{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(r,s={}){return this.plugins.length||s.parser||s.stringifier||s.syntax?new t(this,r,s):new e(this,r,s)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return tt=n,n.default=n,s.registerProcessor(n),r.registerProcessor(n),tt}const Tt=Q(function(){if(it)return ot;it=1;let e=ae(),t=pt(),r=Rt(),s=wt(),n=At(),o=ut(),i=function(){if(nt)return st;nt=1;let e=pt(),t=ft(),r=yt(),s=kt(),n=mt(),o=xt(),i=Mt();function a(l,c){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:u,...h}=l;if(u){c=[];for(let e of u){let r={...e,__proto__:n.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),c.push(r)}}if(h.nodes&&(h.nodes=l.nodes.map(e=>a(e,c))),h.source){let{inputId:e,...t}=h.source;h.source=t,null!=e&&(h.source.input=c[e])}if("root"===h.type)return new o(h);if("decl"===h.type)return new e(h);if("rule"===h.type)return new i(h);if("comment"===h.type)return new r(h);if("atrule"===h.type)return new s(h);throw new Error("Unknown node type: "+l.type)}return st=a,a.default=a,st}(),a=bt(),l=vt(),c=yt(),u=kt(),h=Ct(),p=mt(),d=Et(),f=Ot(),m=Mt(),g=xt(),y=ht();function w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new n(e)}return w.plugin=function(e,t){let r,s=!1;function o(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...r);return o.postcssPlugin=e,o.postcssVersion=(new n).version,o}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return w([o(r)]).process(e,t)},o},w.stringify=o,w.parse=d,w.fromJSON=i,w.list=f,w.comment=e=>new c(e),w.atRule=e=>new u(e),w.decl=e=>new t(e),w.rule=e=>new m(e),w.root=e=>new g(e),w.document=e=>new a(e),w.CssSyntaxError=e,w.Declaration=t,w.Container=s,w.Processor=n,w.Document=a,w.Comment=c,w.Warning=l,w.AtRule=u,w.Result=h,w.Input=p,w.Rule=m,w.Root=g,w.Node=y,r.registerPostcss(w),ot=w,w.default=w,ot}());Tt.stringify,Tt.fromJSON,Tt.plugin,Tt.parse,Tt.list,Tt.document,Tt.comment,Tt.atRule,Tt.rule,Tt.decl,Tt.root,Tt.CssSyntaxError,Tt.Declaration,Tt.Container,Tt.Processor,Tt.Document,Tt.Comment,Tt.Warning,Tt.AtRule,Tt.Result,Tt.Input,Tt.Rule,Tt.Root,Tt.Node;var Nt=Object.defineProperty,Lt=(e,t,r)=>((e,t,r)=>t in e?Nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Pt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Dt(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var Ft,_t={exports:{}};function Ut(){if(Ft)return _t.exports;Ft=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return _t.exports=t(),_t.exports.createColors=t,_t.exports}const Bt=Dt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var jt,zt;function Wt(){if(zt)return jt;zt=1;let e=Ut(),t=Bt;class r extends Error{constructor(e,t,s,n,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==t&&void 0!==s&&("number"==typeof t?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let s=this.source;null==r&&(r=e.isColorSupported),t&&r&&(s=t(s));let n,o,i=s.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,i.length),c=String(l).length;if(r){let{bold:t,gray:r,red:s}=e.createColors(!0);n=e=>t(s(e)),o=e=>r(e)}else n=o=e=>e;return i.slice(a,l).map((e,t)=>{let r=a+1+t,s=" "+(" "+r).slice(-c)+" | ";if(r===this.line){let t=o(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+o(s)+e+"\n "+t+n("^")}return" "+o(s)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return jt=r,r.default=r,jt}var $t,Vt,Gt,Ht,qt,Jt,Yt,Xt,Zt,Kt,Qt,er,tr,rr,sr,nr,or,ir,ar,lr,cr,ur,hr,pr,dr,fr,mr,gr,yr,wr,br,Sr,vr,Cr,kr,xr,Or,Mr,Ir,Er,Rr,Ar,Tr,Nr,Lr,Pr,Dr,Fr,_r,Ur,Br,jr,zr,Wr={};function $r(){return $t||($t=1,Wr.isClean=Symbol("isClean"),Wr.my=Symbol("my")),Wr}function Vr(){if(Gt)return Vt;Gt=1;const e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(t,r,s){let n;if(s||(s=r),r&&(n=t.raws[r],void 0!==n))return n;let o=t.parent;if("before"===s){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[s];let i=t.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(t,s);{let e="raw"+((a=s)[0].toUpperCase()+a.slice(1));this[e]?n=this[e](i,t):i.walk(e=>{if(n=e.raws[r],void 0!==n)return!1})}var a;return void 0===n&&(n=e[s]),i.rawCache[s]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return Vt=t,t.default=t,Vt}function Gr(){if(qt)return Ht;qt=1;let e=Vr();function t(t,r){new e(r).stringify(t)}return Ht=t,t.default=t,Ht}function Hr(){if(Yt)return Jt;Yt=1;let{isClean:e,my:t}=$r(),r=Wt(),s=Vr(),n=Gr();function o(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],i=typeof n;"parent"===s&&"object"===i?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>o(e,r)):("object"===i&&null!==n&&(n=o(n)),r[s]=n)}return r}class i{constructor(r={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in r)if("nodes"===e){this.nodes=[];for(let t of r[e])"function"==typeof t.clone?this.append(t.clone()):this.append(t)}else this[e]=r[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=o(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new s).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=n){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}}return Jt=i,i.default=i,Jt}function qr(){if(Zt)return Xt;Zt=1;let e=Hr();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return Xt=t,t.default=t,Xt}function Jr(){if(Qt)return Kt;Qt=1;return Kt={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}}}function Yr(){if(tr)return er;tr=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Bt,{existsSync:r,readFileSync:s}=Bt,{dirname:n,join:o}=Bt;class i{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=n(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=n(e),r(e))return this.mapFile=e,s(e,"utf-8").toString().trim()}loadMap(r,s){if(!1===s)return!1;if(s){if("string"==typeof s)return s;if("function"!=typeof s){if(s instanceof e)return t.fromSourceMap(s).toString();if(s instanceof t)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}{let e=s(r);if(e){let t=this.loadFile(e);if(!t)throw new Error("Unable to load previous source map: "+e.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return r&&(e=o(n(r),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return er=i,i.default=i,er}function Xr(){if(sr)return rr;sr=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Bt,{fileURLToPath:r,pathToFileURL:s}=Bt,{isAbsolute:n,resolve:o}=Bt,{nanoid:i}=Jr(),a=Bt,l=Wt(),c=Yr(),u=Symbol("fromOffsetCache"),h=Boolean(e&&t),p=Boolean(o&&n);class d{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!p||/^\w+:\/\//.test(t.from)||n(t.from)?this.file=t.from:this.file=o(t.from)),p&&h){let e=new c(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let o,i,a;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);i=e.line,a=e.col}else i=s.line,a=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let c=this.origin(t,r,i,a);return o=c?new l(e,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):new l(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:a,line:i},this.css,this.file,n.plugin),o.input={column:r,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(s&&(o.input.url=s(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[u])r=this[u];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[u]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,o,i){if(!this.map)return!1;let a,l,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof o&&(a=c.originalPositionFor({column:i,line:o})),l=n(u.source)?s(u.source):new URL(u.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let h={column:u.column,endColumn:a&&a.column,endLine:a&&a.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");h.file=r(l)}let p=c.sourceContentFor(u.source);return p&&(h.source=p),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return rr=d,d.default=d,a&&a.registerInput&&a.registerInput(d),rr}function Zr(){if(or)return nr;or=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Bt,{dirname:r,relative:s,resolve:n,sep:o}=Bt,{pathToFileURL:i}=Bt,a=Xr(),l=Boolean(e&&t),c=Boolean(r&&n&&s&&o);return nr=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let s,n=this.toUrl(this.path(t.file)),o=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(s=new e(t.text),s.sourcesContent&&(s.sourcesContent=null)):s=t.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e,r,s=1,n=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(i.generated.line=s,i.generated.column=n-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=t.match(/\n/g),e?(s+=e.length,r=t.lastIndexOf("\n"),n=t.length-r):n+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=n-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let o=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=r(n(o,this.mapOpts.annotation)));let i=s(o,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(i){let t=i(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function Kr(){if(ar)return ir;ar=1;let e=Hr();class t extends e{constructor(e){super(e),this.type="comment"}}return ir=t,t.default=t,ir}function Qr(){if(cr)return lr;cr=1;let e,t,r,s,{isClean:n,my:o}=$r(),i=qr(),a=Kr(),l=Hr();function c(e){return e.map(e=>(e.nodes&&(e.nodes=c(e.nodes)),delete e.source,e))}function u(e){if(e[n]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)u(t)}class h extends l{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(s,l){if("string"==typeof s)s=c(e(s).nodes);else if(void 0===s)s=[];else if(Array.isArray(s)){s=s.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===s.type&&"document"!==this.type){s=s.nodes.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if(s.type)s=[s];else if(s.prop){if(void 0===s.value)throw new Error("Value field is missed in node creation");"string"!=typeof s.value&&(s.value=String(s.value)),s=[new i(s)]}else if(s.selector)s=[new t(s)];else if(s.name)s=[new r(s)];else{if(!s.text)throw new Error("Unknown node type in node creation");s=[new a(s)]}return s.map(e=>(e[o]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[n]&&u(e),void 0===e.raws.before&&l&&void 0!==l.raws.before&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=t=>{e=t},h.registerRule=e=>{t=e},h.registerAtRule=e=>{r=e},h.registerRoot=e=>{s=e},lr=h,h.default=h,h.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,i.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,s.prototype),e[o]=!0,e.nodes&&e.nodes.forEach(e=>{h.rebuild(e)})},lr}function es(){if(hr)return ur;hr=1;let e,t,r=Qr();class s extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},ur=s,s.default=s,ur}function ts(){if(dr)return pr;dr=1;let e={};return pr=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function rs(){if(mr)return fr;mr=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return fr=e,e.default=e,fr}function ss(){if(yr)return gr;yr=1;let e=rs();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let s=new e(t,r);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return gr=t,t.default=t,gr}function ns(){if(vr)return Sr;vr=1;let e=Qr();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Sr=t,t.default=t,e.registerAtRule(t),Sr}function os(){if(kr)return Cr;kr=1;let e,t,r=Qr();class s extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},Cr=s,s.default=s,r.registerRoot(s),Cr}function is(){if(Or)return xr;Or=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};return xr=e,e.default=e,xr}function as(){if(Ir)return Mr;Ir=1;let e=Qr(),t=is();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return Mr=r,r.default=r,e.registerRule(r),Mr}function ls(){if(Rr)return Er;Rr=1;let e=qr(),t=function(){if(br)return wr;br=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),r="\\".charCodeAt(0),s="/".charCodeAt(0),n="\n".charCodeAt(0),o=" ".charCodeAt(0),i="\f".charCodeAt(0),a="\t".charCodeAt(0),l="\r".charCodeAt(0),c="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),p=")".charCodeAt(0),d="{".charCodeAt(0),f="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),w="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,S=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return wr=function(k,x={}){let O,M,I,E,R,A,T,N,L,P,D=k.css.valueOf(),F=x.ignoreErrors,_=D.length,U=0,B=[],j=[];function z(e){throw k.error("Unclosed "+e,U)}return{back:function(e){j.push(e)},endOfFile:function(){return 0===j.length&&U>=_},nextToken:function(k){if(j.length)return j.pop();if(U>=_)return;let x=!!k&&k.ignoreUnclosed;switch(O=D.charCodeAt(U),O){case n:case o:case a:case l:case i:M=U;do{M+=1,O=D.charCodeAt(M)}while(O===o||O===n||O===a||O===l||O===i);P=["space",D.slice(U,M)],U=M-1;break;case c:case u:case d:case f:case y:case m:case p:{let e=String.fromCharCode(O);P=[e,e,U];break}case h:if(N=B.length?B.pop()[1]:"",L=D.charCodeAt(U+1),"url"===N&&L!==e&&L!==t&&L!==o&&L!==n&&L!==a&&L!==i&&L!==l){M=U;do{if(A=!1,M=D.indexOf(")",M+1),-1===M){if(F||x){M=U;break}z("bracket")}for(T=M;D.charCodeAt(T-1)===r;)T-=1,A=!A}while(A);P=["brackets",D.slice(U,M+1),U,M],U=M}else M=D.indexOf(")",U+1),E=D.slice(U,M+1),-1===M||v.test(E)?P=["(","(",U]:(P=["brackets",E,U,M],U=M);break;case e:case t:I=O===e?"'":'"',M=U;do{if(A=!1,M=D.indexOf(I,M+1),-1===M){if(F||x){M=U+1;break}z("string")}for(T=M;D.charCodeAt(T-1)===r;)T-=1,A=!A}while(A);P=["string",D.slice(U,M+1),U,M],U=M;break;case w:b.lastIndex=U+1,b.test(D),M=0===b.lastIndex?D.length-1:b.lastIndex-2,P=["at-word",D.slice(U,M+1),U,M],U=M;break;case r:for(M=U,R=!0;D.charCodeAt(M+1)===r;)M+=1,R=!R;if(O=D.charCodeAt(M+1),R&&O!==s&&O!==o&&O!==n&&O!==a&&O!==l&&O!==i&&(M+=1,C.test(D.charAt(M)))){for(;C.test(D.charAt(M+1));)M+=1;D.charCodeAt(M+1)===o&&(M+=1)}P=["word",D.slice(U,M+1),U,M],U=M;break;default:O===s&&D.charCodeAt(U+1)===g?(M=D.indexOf("*/",U+2)+1,0===M&&(F||x?M=D.length:z("comment")),P=["comment",D.slice(U,M+1),U,M],U=M):(S.lastIndex=U+1,S.test(D),M=0===S.lastIndex?D.length-1:S.lastIndex-2,P=["word",D.slice(U,M+1),U,M],B.push(P),U=M)}return U++,P},position:function(){return U}}}}(),r=Kr(),s=ns(),n=os(),o=as();const i={empty:!0,space:!0};return Er=class{constructor(e){this.input=e,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,o=new s;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(n=l.length-1,r=l[n];r&&"space"===r[0];)r=l[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let s=new e;this.init(s,t[0][2]);let n,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;s.prop+=t.shift()[1]}for(s.raws.between="";t.length;){if(n=t.shift(),":"===n[0]){s.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,a=[];for(;t.length&&(i=t[0][0],"space"===i||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(n=t[e],"!important"===n[1].toLowerCase()){s.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(s.raws.important=r);break}if("important"===n[1].toLowerCase()){let r=t.slice(0),n="";for(let t=e;t>0;t--){let e=r[t][0];if(0===n.trim().indexOf("!")&&"space"!==e)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(s.important=!0,s.raws.important=n,t=r)}if("space"!==n[0]&&"comment"!==n[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),r),s.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,a,l,c=r.length,u="",h=!0;for(let e=0;e<c;e+=1)n=r[e],o=n[0],"space"!==o||e!==c-1||s?"comment"===o?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",i[l]||i[a]||","===u.slice(-1)?h=!1:u+=n[1]):u+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:u}}e[t]=u}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}}function cs(){if(Tr)return Ar;Tr=1;let e=Qr(),t=ls(),r=Xr();function s(e,s){let n=new r(e,s),o=new t(n);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&s&&s.from&&(/\.scss$/i.test(s.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(s.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(s.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Ar=s,s.default=s,e.registerParse(s),Ar}function us(){if(Lr)return Nr;Lr=1;let{isClean:e,my:t}=$r(),r=Zr(),s=Gr(),n=Qr(),o=es(),i=ts(),a=ss(),l=cs(),c=os();const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},p={Once:!0,postcssPlugin:!0,prepare:!0};function d(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let y={};class w{constructor(e,r,s){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof w||r instanceof a)o=g(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=l;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{o=e(r,s)}catch(e){this.processed=!0,this.error=e}o&&!o[t]&&n.rebuild(o)}else o=g(r);this.result=new a(e,o,s),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!h[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(d(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[m(t)];for(;r.length>0;){let e=this.visitTick(r);if(d(e))try{await e}catch(e){let t=r[r.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return d(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=s;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(d(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(d(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:s,visitors:n}=r;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void t.pop();if(n.length>0&&r.visitorIndex<n.length){let[e,t]=n[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===n.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==r.iterator){let n,o=r.iterator;for(;n=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!n[e])return n[e]=!0,void t.push(m(n));r.iterator=0,delete s.indexes[o]}let o=r.events;for(;r.eventIndex<o.length;){let t=o[r.eventIndex];if(r.eventIndex+=1,0===t)return void(s.nodes&&s.nodes.length&&(s[e]=!0,r.iterator=s.getIterator()));if(this.listeners[t])return void(r.visitors=this.listeners[t])}t.pop()}walkSync(t){t[e]=!0;let r=f(t);for(let s of r)if(0===s)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[s];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=e=>{y=e},Nr=w,w.default=w,c.registerLazyResult(w),o.registerLazyResult(w),Nr}function hs(){if(_r)return Fr;_r=1;let e=function(){if(Dr)return Pr;Dr=1;let e=Zr(),t=Gr(),r=ts(),s=cs();const n=ss();class o{constructor(r,s,o){let i;s=s.toString(),this.stringified=!1,this._processor=r,this._css=s,this._opts=o,this._map=void 0;let a=t;this.result=new n(this._processor,i,this._opts),this.result.css=s;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new e(a,i,this._opts,s);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=s;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}return Pr=o,o.default=o,Pr}(),t=us(),r=es(),s=os();class n{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(r,s={}){return this.plugins.length||s.parser||s.stringifier||s.syntax?new t(this,r,s):new e(this,r,s)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return Fr=n,n.default=n,s.registerProcessor(n),r.registerProcessor(n),Fr}const ps=Pt(function(){if(zr)return jr;zr=1;let e=Wt(),t=qr(),r=us(),s=Qr(),n=hs(),o=Gr(),i=function(){if(Br)return Ur;Br=1;let e=qr(),t=Yr(),r=Kr(),s=ns(),n=Xr(),o=os(),i=as();function a(l,c){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:u,...h}=l;if(u){c=[];for(let e of u){let r={...e,__proto__:n.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),c.push(r)}}if(h.nodes&&(h.nodes=l.nodes.map(e=>a(e,c))),h.source){let{inputId:e,...t}=h.source;h.source=t,null!=e&&(h.source.input=c[e])}if("root"===h.type)return new o(h);if("decl"===h.type)return new e(h);if("rule"===h.type)return new i(h);if("comment"===h.type)return new r(h);if("atrule"===h.type)return new s(h);throw new Error("Unknown node type: "+l.type)}return Ur=a,a.default=a,Ur}(),a=es(),l=rs(),c=Kr(),u=ns(),h=ss(),p=Xr(),d=cs(),f=is(),m=as(),g=os(),y=Hr();function w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new n(e)}return w.plugin=function(e,t){let r,s=!1;function o(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...r);return o.postcssPlugin=e,o.postcssVersion=(new n).version,o}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return w([o(r)]).process(e,t)},o},w.stringify=o,w.parse=d,w.fromJSON=i,w.list=f,w.comment=e=>new c(e),w.atRule=e=>new u(e),w.decl=e=>new t(e),w.rule=e=>new m(e),w.root=e=>new g(e),w.document=e=>new a(e),w.CssSyntaxError=e,w.Declaration=t,w.Container=s,w.Processor=n,w.Document=a,w.Comment=c,w.Warning=l,w.AtRule=u,w.Result=h,w.Input=p,w.Rule=m,w.Root=g,w.Node=y,r.registerPostcss(w),jr=w,w.default=w,jr}());ps.stringify,ps.fromJSON,ps.plugin,ps.parse,ps.list,ps.document,ps.comment,ps.atRule,ps.rule,ps.decl,ps.root,ps.CssSyntaxError,ps.Declaration,ps.Container,ps.Processor,ps.Document,ps.Comment,ps.Warning,ps.AtRule,ps.Result,ps.Input,ps.Rule,ps.Root,ps.Node;class ds{constructor(...e){Lt(this,"parentElement",null),Lt(this,"parentNode",null),Lt(this,"ownerDocument"),Lt(this,"firstChild",null),Lt(this,"lastChild",null),Lt(this,"previousSibling",null),Lt(this,"nextSibling",null),Lt(this,"ELEMENT_NODE",1),Lt(this,"TEXT_NODE",3),Lt(this,"nodeType"),Lt(this,"nodeName"),Lt(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof ds))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const fs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ms={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},gs={};function ys(e){if(gs[e])return gs[e];const t=function(e){var t,r;const s=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return s&&globalThis[s]?globalThis[s]:void 0}(e)||globalThis[e],r=t.prototype,s=e in fs?fs[e]:void 0,n=Boolean(s&&s.every(e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),o=e in ms?ms[e]:void 0,i=Boolean(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&i)return gs[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?gs[e]=o:r}catch{return r}}const ws={};function bs(e,t,r){var s;const n=`${e}.${String(r)}`;if(ws[n])return ws[n].call(t);const o=ys(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(ws[n]=i,i.call(t)):t[r]}const Ss={};function vs(e,t,r){const s=`${e}.${String(r)}`;if(Ss[s])return Ss[s].bind(t);const n=ys(e)[r];return"function"!=typeof n?t[r]:(Ss[s]=n,n.bind(t))}function Cs(){return ys("MutationObserver").constructor}const ks={childNodes:function(e){return bs("Node",e,"childNodes")},parentNode:function(e){return bs("Node",e,"parentNode")},parentElement:function(e){return bs("Node",e,"parentElement")},textContent:function(e){return bs("Node",e,"textContent")},contains:function(e,t){return vs("Node",e,"contains")(t)},getRootNode:function(e){return vs("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?bs("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?bs("Element",e,"shadowRoot"):null},querySelector:function(e,t){return bs("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return bs("Element",e,"querySelectorAll")(t)},mutationObserver:Cs};function xs(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Os="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Ms={map:{},getId:()=>(console.error(Os),-1),getNode:()=>(console.error(Os),null),removeNodeFromMap(){console.error(Os)},has:()=>(console.error(Os),!1),reset(){console.error(Os)}};function Is(e,t,r={}){let s=null,n=0;return function(...o){const i=Date.now();n||!1!==r.leading||(n=i);const a=t-(i-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=i,e.apply(l,o)):s||!1===r.trailing||(s=setTimeout(()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,o)},a))}}function Es(e,t,r,s,n=window){const o=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>Es(e,t,o||{},!0)}function Rs(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ms=new Proxy(Ms,{get:(e,t,r)=>("map"===t&&console.error(Os),Reflect.get(e,t,r))}));let As=Date.now;function Ts(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=ks.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=ks.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}}function Ns(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ls(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ps(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:ks.parentElement(e)}function Ds(e,t,r,s){if(!e)return!1;const n=Ps(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(q(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1}function Fs(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function _s(e,t){if(g(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=ks.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||_s(s,t))}function Us(e){return Boolean(e.changedTouches)}function Bs(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function js(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function zs(e){return!!e&&(e instanceof ds&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(ks.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(As=()=>(new Date).getTime());class Ws{constructor(){r(this,"id",1),r(this,"styleIDMap",new WeakMap),r(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function $s(e){var t;let r=null;return"getRootNode"in e&&(null==(t=ks.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ks.host(ks.getRootNode(e))&&(r=ks.host(ks.getRootNode(e))),r}function Vs(e){const t=e.ownerDocument;if(!t)return!1;const r=function(e){let t,r=e;for(;t=$s(r);)r=t;return r}(e);return ks.contains(t,r)}function Gs(e){const t=e.ownerDocument;return!!t&&(ks.contains(t,e)||Vs(e))}var Hs=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Hs||{}),qs=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(qs||{}),Js=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Js||{}),Ys=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ys||{}),Xs=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Xs||{}),Zs=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Zs||{}),Ks=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Ks||{});function Qs(e){return"__ln"in e}class en{constructor(){r(this,"length",0),r(this,"head",null),r(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Qs(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Qs(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const tn=(e,t)=>`${e}@${t}`;class rn{constructor(){r(this,"frozen",!1),r(this,"locked",!1),r(this,"texts",[]),r(this,"attributes",[]),r(this,"attributeMap",new WeakMap),r(this,"removes",[]),r(this,"mapRemoves",[]),r(this,"movedMap",{}),r(this,"addedSet",new Set),r(this,"movedSet",new Set),r(this,"droppedSet",new Set),r(this,"removesSubTreeCache",new Set),r(this,"mutationCb"),r(this,"blockClass"),r(this,"blockSelector"),r(this,"maskTextClass"),r(this,"maskTextSelector"),r(this,"inlineStylesheet"),r(this,"maskInputOptions"),r(this,"maskTextFn"),r(this,"maskInputFn"),r(this,"maskAttributeFn"),r(this,"keepIframeSrcFn"),r(this,"recordCanvas"),r(this,"inlineImages"),r(this,"slimDOMOptions"),r(this,"dataURLOptions"),r(this,"doc"),r(this,"mirror"),r(this,"iframeManager"),r(this,"stylesheetManager"),r(this,"shadowDomManager"),r(this,"canvasManager"),r(this,"processedNodeManager"),r(this,"unattachedDoc"),r(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),r(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new en,s=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{const o=ks.parentNode(n);if(!o||!Gs(n))return;let i=!1;if(n.nodeType===Node.TEXT_NODE){const e=o.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(o)&&(i=!0)}const a=g(o)?this.mirror.getId($s(n)):this.mirror.getId(o),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=K(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Bs(e,this.mirror)&&this.iframeManager.addIframe(e),js(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),zs(n)&&this.shadowDomManager.addShadowRoot(ks.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:i});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)nn(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(ks.parentNode(e))||n(e);for(const e of this.addedSet)on(this.droppedSet,e)||nn(this.removesSubTreeCache,e,this.mirror)?on(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let o=null;for(;r.length;){let e=null;if(o){const t=this.mirror.getId(ks.parentNode(o.value)),r=s(o.value);-1!==t&&-1!==r&&(e=o)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(ks.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=ks.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=ks.host(s);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}o=e.previous,r.removeNode(e.value),n(e.value)}const i={texts:this.texts.map(e=>{const t=e.node,r=ks.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+s).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(i))}),r(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(ks.childNodes(e),e=>ks.textContent(e)||"").join("");t.attributes.value=v({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:x(e),value:r,maskInputFn:this.maskInputFn})}),r(this,"processMutation",e=>{if(!Fs(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=ks.textContent(e.target);Ds(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:J(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ps(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){const e=x(t);s=v({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(Ds(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!H(t.tagName,r)){if(n.attributes[r]=G(this.doc,C(t.tagName),C(r),s),this.maskAttributeFn&&"string"==typeof n.attributes[r]){const e=this.maskAttributeFn(r,n.attributes[r],t);null!==e?n.attributes[r]=e:delete n.attributes[r]}if("style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const s=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===o?s:[s,o]:n._unchangedStyles[e]=[s,o]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal")}break}case"childList":if(Ds(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),s=g(e.target)?this.mirror.getId(ks.host(e.target)):this.mirror.getId(e.target);Ds(e.target,this.blockClass,this.blockSelector,!1)||Fs(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(sn(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||_s(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[tn(r,s)]?sn(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!g(e.target)||!y(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),ks.childNodes(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),r(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Fs(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[tn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ds(e,this.blockClass,this.blockSelector,!1)||(ks.childNodes(e).forEach(e=>this.genAdds(e)),zs(e)&&ks.childNodes(ks.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAttributeFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function sn(e,t){e.delete(t),ks.childNodes(t).forEach(t=>sn(e,t))}function nn(e,t,r){return 0!==e.size&&function(e,t){const r=ks.parentNode(t);return!!r&&e.has(r)}(e,t)}function on(e,t){return 0!==e.size&&an(e,t)}function an(e,t){const r=ks.parentNode(t);return!!r&&(!!e.has(r)||an(e,r))}let ln;const cn=e=>{if(!ln)return e;return(...t)=>{try{return e(...t)}catch(e){if(ln&&!0===ln(e))return;throw e}}};function un(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch{}throw e}}}const hn=[];function pn(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function dn(e,t){const r=new rn;hn.push(r),r.init(e);const s=new(Cs())(cn(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function fn({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let l=null;return Object.keys(Js).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e]).forEach(o=>{let i=C(o);const c=(t=>o=>{const i=pn(o);if(Ds(i,s,n,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=Ys.Mouse;break;case"touch":a=Ys.Touch;break;case"pen":a=Ys.Pen}a===Ys.Touch?Js[t]===Js.MouseDown?c="TouchStart":Js[t]===Js.MouseUp&&(c="TouchEnd"):Ys.Pen}else Us(o)&&(a=Ys.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Ys.Touch||c.startsWith("Mouse")&&a===Ys.Mouse)&&(a=null)):Js[t]===Js.Click&&(a=l,l=null);const u=Us(o)?o.changedTouches[0]:o;if(!u)return;const h=r.getId(i),{clientX:p,clientY:d}=u;cn(e)({type:Js[c],id:h,x:p,y:d,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(Js[o]){case Js.MouseDown:case Js.MouseUp:i=i.replace("mouse","pointer");break;case Js.TouchStart:case Js.TouchEnd:return}a.push(xs(i,c,t))}),cn(()=>{a.forEach(e=>e())})}function mn({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){return xs("scroll",cn(Is(cn(o=>{const i=pn(o);if(!i||Ds(i,s,n,!0))return;const a=r.getId(i);if(i===t&&t.defaultView){const r=Ts(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})}),o.scroll||100)),t)}const gn=["INPUT","TEXTAREA","SELECT"],yn=new WeakMap;function wn(e){return function(e,t){if(Cn("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Cn("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Cn("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Cn("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function bn(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function Sn({mirror:e,stylesheetManager:t},r){var s,n,o;let i=null;i="#document"===r.nodeName?e.getId(r):e.getId(ks.host(r));const a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(o=null==(n=r.ownerDocument)?void 0:n.defaultView)?void 0:o.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const s=null==(r=l.set)?void 0:r.call(this,e);if(null!==i&&-1!==i)try{t.adoptStyleSheets(e,i)}catch(e){}return s}}),cn(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function vn(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let s;!function(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:i,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),o(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),i(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),h(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),d(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=dn(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const l=Is(cn(t=>{const r=Date.now()-i;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],i=null}),o),c=cn(Is(cn(e=>{const t=pn(e),{clientX:r,clientY:n}=Us(e)?e.changedTouches[0]:e;i||(i=As()),a.push({x:r,y:n,id:s.getId(t),timeOffset:As()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?qs.Drag:e instanceof MouseEvent?qs.MouseMove:qs.TouchMove)}),n,{trailing:!1})),u=[xs("mousemove",c,r),xs("touchmove",c,r),xs("drag",c,r)];return cn(()=>{u.forEach(e=>e())})}(e),o=fn(e),i=mn(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return xs("resize",cn(Is(cn(()=>{const t=Ns(),n=Ls();r===t&&s===n||(e({width:Number(n),height:Number(t)}),r=t,s=n)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,ignoreClass:o,ignoreSelector:i,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:u}){function h(e){let r=pn(e);const c=e.isTrusted,h=r&&r.tagName;if(r&&"OPTION"===h&&(r=ks.parentElement(r)),!r||!h||gn.indexOf(h)<0||Ds(r,s,n,!0))return;if(r.classList.contains(o)||i&&r.matches(i))return;let d=r.value,f=!1;const m=x(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[h.toLowerCase()]||a[m])&&(d=v({element:r,maskInputOptions:a,tagName:h,type:m,value:d,maskInputFn:l})),p(r,u?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=r.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==r){const t=e.value;p(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,s){const n=yn.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){yn.set(t,s);const n=r.getId(t);cn(e)({...s,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map(e=>xs(e,cn(h),t)),f=t.defaultView;if(!f)return()=>{d.forEach(e=>e())};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...g.map(e=>Es(e[0],e[1],{set(){cn(h)({target:this,isTrusted:!1})}},!1,f))),cn(()=>{d.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:o}){const i=cn(o=>Is(cn(n=>{const i=pn(n);if(!i||Ds(i,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u,loop:h}=i;e({type:o,id:s.getId(i),currentTime:a,volume:l,muted:c,playbackRate:u,loop:h})}),n.media||500)),a=[xs("play",i(Zs.Play),o),xs("pause",i(Zs.Pause),o),xs("seeked",i(Zs.Seeked),o),xs("volumechange",i(Zs.VolumeChange),o),xs("ratechange",i(Zs.RateChange),o)];return cn(()=>{a.forEach(e=>e())})}(e);let u=()=>{},h=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:cn((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=bn(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:a}]}),un(()=>s.apply(n,o))()})}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const n=`${e} { ${t} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};const o=s.CSSStyleSheet.prototype.deleteRule;let i,a;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:cn((s,n,o)=>{const[i]=o,{id:a,styleId:l}=bn(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:i}]}),un(()=>s.apply(n,o))()})}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:cn((s,n,o)=>{const[i]=o,{id:a,styleId:l}=bn(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:i}),s.apply(n,o)})})),s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:cn((s,n,o)=>{const[i]=o,{id:a,styleId:l}=bn(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:i}),s.apply(n,o)})}));const l={};kn("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(kn("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),kn("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),kn("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(l).forEach(([s,n])=>{c[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[s].insertRule,{apply:cn((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=bn(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:[...wn(n),a||0]}]}),s.apply(n,o)})}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:cn((s,n,o)=>{const[i]=o,{id:a,styleId:l}=bn(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...wn(n),i]}]}),s.apply(n,o)})})}),cn(()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=o,i&&(s.CSSStyleSheet.prototype.replace=i),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:r}),h=Sn(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){const o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:cn((n,i,a)=>{var l;const[c,u,h]=a;if(r.has(c))return o.apply(i,[c,u,h]);const{id:p,styleId:d}=bn(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:u,priority:h},index:wn(i.parentRule)}),n.apply(i,a)})});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:cn((n,o,a)=>{var l;const[c]=a;if(r.has(c))return i.apply(o,[c]);const{id:u,styleId:h}=bn(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(u&&-1!==u||h&&-1!==h)&&e({id:u,styleId:h,remove:{property:c},index:wn(o.parentRule)}),n.apply(o,a)})}),cn(()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:r}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,r){const s=new o(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const i=Rs(t.fonts,"add",function(t){return function(r){return setTimeout(cn(()=>{const t=n.get(r);t&&(e(t),n.delete(r))}),0),t.apply(this,[r])}});return s.push(()=>{r.FontFace=o}),s.push(i),cn(()=>{s.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:o}=e;let i=!0;const a=cn(()=>{const e=t.getSelection();if(!e||i&&(null==e?void 0:e.isCollapsed))return;i=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const o=e.getRangeAt(t),{startContainer:i,startOffset:l,endContainer:c,endOffset:u}=o;Ds(i,s,n,!0)||Ds(c,s,n,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:u})}o({ranges:a})});return a(),xs("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?Rs(r.customElements,"define",function(e){return function(r,s,n){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,s,n])}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return cn(()=>{hn.forEach(e=>e.reset()),null==s||s.disconnect(),n(),o(),i(),a(),l(),c(),u(),h(),p(),d(),f(),m(),g.forEach(e=>e())})}function Cn(e){return void 0!==window[e]}function kn(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class xn{constructor(e){r(this,"iframeIdToRemoteIdMap",new WeakMap),r(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const n=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let i=n.get(t);return i||(i=this.generateIdFn(),n.set(t,i),o.set(i,t)),i}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,s))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=s.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class On{constructor(e){r(this,"iframes",new WeakMap),r(this,"crossOriginIframeMap",new WeakMap),r(this,"crossOriginIframeMirror",new xn(F)),r(this,"crossOriginIframeStyleMirror"),r(this,"crossOriginIframeRootIdMap",new WeakMap),r(this,"mirror"),r(this,"mutationCb"),r(this,"wrappedEmit"),r(this,"loadListener"),r(this,"stylesheetManager"),r(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new xn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const s=this.transformCrossOriginEvent(r,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case Hs.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:Hs.IncrementalSnapshot,data:{source:qs.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Hs.Meta:case Hs.Load:case Hs.DomContentLoaded:return!1;case Hs.Plugin:return t;case Hs.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Hs.IncrementalSnapshot:switch(t.data.source){case qs.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case qs.Drag:case qs.TouchMove:case qs.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case qs.ViewportResize:return!1;case qs.MediaInteraction:case qs.MouseInteraction:case qs.Scroll:case qs.CanvasMutation:case qs.Input:return this.replaceIds(t.data,e,["id"]),t;case qs.StyleSheetRule:case qs.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case qs.Font:return t;case qs.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case qs.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(const n of s)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===Ks.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Mn{constructor(e){r(this,"shadowDoms",new WeakSet),r(this,"mutationCb"),r(this,"scrollCb"),r(this,"bypassOptions"),r(this,"mirror"),r(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!y(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=dn({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(mn({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(ks.host(e))),this.restoreHandlers.push(Sn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Rs(e.prototype,"attachShadow",function(e){return function(s){const n=e.call(this,s),o=ks.shadowRoot(this);return o&&Gs(this)&&r.addShadowRoot(o,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var In="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",En="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Rn=0;Rn<64;Rn++)En[In.charCodeAt(Rn)]=Rn;const An=new Map;const Tn=(e,t,r)=>{if(!e||!Pn(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=An.get(e);return r||(r=new Map,An.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let n=s.indexOf(e);return-1===n&&(n=s.length,s.push(e)),n};function Nn(e,t,r){if(e instanceof Array)return e.map(e=>Nn(e,t,r));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),s=r.length,n="";for(t=0;t<s;t+=3)n+=In[r[t]>>2],n+=In[(3&r[t])<<4|r[t+1]>>4],n+=In[(15&r[t+1])<<2|r[t+2]>>6],n+=In[63&r[t+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Nn(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Nn(e.data,t,r),e.width,e.height]}}if(Pn(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Tn(e,t,r)}}return e}const Ln=(e,t,r)=>e.map(e=>Nn(e,t,r)),Pn=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(r.find(r=>e instanceof t[r]))};function Dn(e,t,r,s){const n=[];try{const o=Rs(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...o){if(!Ds(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(o[0]&&"object"==typeof o[0]){const e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...o])}});n.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function Fn(e,t,r,s,n,o){const i=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=Rs(e,l,function(e){return function(...i){const a=e.apply(this,i);if(Tn(a,o,this),"tagName"in this.canvas&&!Ds(this.canvas,s,n,!0)){const e=Ln(i,o,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}});i.push(a)}catch{const s=Es(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});i.push(s)}return i}const _n='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',Un="undefined"!=typeof self&&self.Blob&&new Blob([_n],{type:"text/javascript;charset=utf-8"});function Bn(e){let t;try{if(t=Un&&(self.URL||self.webkitURL).createObjectURL(Un),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(_n),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class jn{constructor(e){r(this,"pendingCanvasMutations",new Map),r(this,"rafStamps",{latestId:0,invokeId:null}),r(this,"mirror"),r(this,"mutationCb"),r(this,"resetObservers"),r(this,"frozen",!1),r(this,"locked",!1),r(this,"processMutation",(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:s,blockClass:n,blockSelector:o,recordCanvas:i,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(s,n,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,s,n,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,n){const o=Dn(t,r,s,!0),i=new Map,a=new Bn;a.onmessage=e=>{const{id:t}=e.data;if(i.set(t,!1),!("base64"in e.data))return;const{base64:r,type:s,width:n,height:o}=e.data;this.mutationCb({id:t,type:Xs["2D"],commands:[{property:"clearRect",args:[0,0,n,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0]}]})};const l=1e3/e;let c,u=0;const h=e=>{u&&e-u<l||(u=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{Ds(t,r,s,!0)||e.push(t)}),e})().forEach(async e=>{var t;const r=this.mirror.getId(e);if(i.get(r))return;if(0===e.width||0===e.height)return;if(i.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const s=await createImageBitmap(e);a.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[s])})),c=requestAnimationFrame(h)};c=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Dn(e,t,r,!1),n=function(e,t,r,s){const n=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const i of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;const o=Rs(t.CanvasRenderingContext2D.prototype,i,function(n){return function(...o){return Ds(this.canvas,r,s,!0)||setTimeout(()=>{const r=Ln(o,t,this);e(this.canvas,{type:Xs["2D"],property:i,args:r})},0),n.apply(this,o)}});n.push(o)}catch{const r=Es(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:Xs["2D"],property:i,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,s){const n=[];return n.push(...Fn(t.WebGLRenderingContext.prototype,Xs.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Fn(t.WebGL2RenderingContext.prototype,Xs.WebGL2,e,r,s,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const s=r.map(e=>{const{type:t,...r}=e;return r}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}}class zn{constructor(e){r(this,"trackedLinkElements",new WeakSet),r(this,"mutationCb"),r(this,"adoptedStyleSheetCb"),r(this,"styleMirror",new Ws),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const r={id:t,styleIds:[]},s=[];for(const t of e){let e;if(this.styleMirror.has(t))e=this.styleMirror.getId(t);else{e=this.styleMirror.add(t);let r=[];try{r=Array.from(t.cssRules,(e,r)=>({rule:b(e,t.href),index:r}))}catch(e){if(!(e instanceof DOMException&&"SecurityError"===e.name))throw e}s.push({styleId:e,rules:r})}r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Wn{constructor(){r(this,"nodeMap",new WeakMap),r(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let $n,Vn,Gn,Hn=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null==(e=t.contentWindow)?void 0:e.Array.from)||Array.from,document.body.removeChild(t)}}catch(e){console.debug("Unable to override Array.from",e)}const qn=new S;function Jn(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:i="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,maskAttributeFn:g,hooks:y,packFn:w,sampling:b={},dataURLOptions:v={},mousemoveWait:C,recordDOM:k=!0,recordCanvas:x=!1,recordCrossOriginIframes:O=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:I=!1,collectFonts:E=!1,inlineImages:R=!1,captureAdoptedStyleSheets:A=!0,plugins:T,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:L=new Set([]),errorHandler:P,applyBackgroundColorToBlockedElements:D=!1}=e;ln=P;const F=!O||window.parent===window;let _=!1;if(!F)try{window.parent.document&&(_=!1)}catch(e){_=!0}if(F&&!t)throw new Error("emit function is required");if(!F&&!_)return()=>{};void 0!==C&&void 0===b.mousemove&&(b.mousemove=C),qn.reset();const U=!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==p?p:{password:!0},B=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let j;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let z=0;const W=e=>{for(const t of T||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!_&&(e=w(e)),e};$n=(e,n)=>{var o;const i=e;if(i.timestamp=As(),!(null==(o=hn[0])?void 0:o.isFrozen())||i.type===Hs.FullSnapshot||i.type===Hs.IncrementalSnapshot&&i.data.source===qs.Mutation||hn.forEach(e=>e.unfreeze()),F)null==t||t(W(i),n);else if(_){const e={type:"rrweb",event:W(i),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(i.type===Hs.FullSnapshot)j=i,z=0;else if(i.type===Hs.IncrementalSnapshot){if(i.data.source===qs.Mutation&&i.data.isAttachIframe)return;z++;const e=s&&z>=s,t=r&&i.timestamp-j.timestamp>r;(e||t)&&Vn(!0)}};const $=e=>{$n({type:Hs.IncrementalSnapshot,data:{source:qs.Mutation,...e}})},V=e=>$n({type:Hs.IncrementalSnapshot,data:{source:qs.Scroll,...e}}),G=e=>$n({type:Hs.IncrementalSnapshot,data:{source:qs.CanvasMutation,...e}}),H=new zn({mutationCb:$,adoptedStyleSheetCb:e=>$n({type:Hs.IncrementalSnapshot,data:{source:qs.AdoptedStyleSheet,...e}})}),q=new On({mirror:qn,mutationCb:$,stylesheetManager:H,recordCrossOriginIframes:O,wrappedEmit:$n});for(const e of T||[])e.getMirror&&e.getMirror({nodeMirror:qn,crossOriginIframeMirror:q.crossOriginIframeMirror,crossOriginIframeStyleMirror:q.crossOriginIframeStyleMirror});const J=new Wn;Gn=new jn({recordCanvas:x,mutationCb:G,win:window,blockClass:n,blockSelector:o,mirror:qn,sampling:b.canvas,dataURLOptions:v});const Y=new Mn({mutationCb:$,scrollCb:V,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:U,dataURLOptions:v,maskTextFn:m,maskInputFn:f,maskAttributeFn:g,recordCanvas:x,inlineImages:R,sampling:b,slimDOMOptions:B,iframeManager:q,stylesheetManager:H,canvasManager:Gn,keepIframeSrcFn:N,processedNodeManager:J},mirror:qn});Vn=(e=!1)=>{if(!k)return;$n({type:Hs.Meta,data:{href:window.location.href,width:Ls(),height:Ns()}},e),H.reset(),Y.init(),hn.forEach(e=>e.lock());const t=function(e,t){const{mirror:r=new S,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:i=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:p,maskAttributeFn:d,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:g,onSerialize:y,onAdoptedStyleSheet:w,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:x=()=>!1,applyBackgroundColorToBlockedElements:O=!1}=t||{};return K(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:i,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===u?{password:!0}:u,maskTextFn:h,maskInputFn:p,maskAttributeFn:d,slimDOMOptions:!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===f,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===f?{}:f,dataURLOptions:m,inlineImages:l,recordCanvas:c,preserveWhiteSpace:g,onSerialize:y,onAdoptedStyleSheet:w,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:x,newlyAddedElement:!1,applyBackgroundColorToBlockedElements:O})}(document,{mirror:qn,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:U,maskTextFn:m,maskInputFn:f,maskAttributeFn:g,slimDOM:B,dataURLOptions:v,recordCanvas:x,inlineImages:R,applyBackgroundColorToBlockedElements:D,onSerialize:e=>{Bs(e,qn)&&q.addIframe(e),js(e,qn)&&H.trackLinkElement(e),zs(e)&&Y.addShadowRoot(ks.shadowRoot(e),document)},onAdoptedStyleSheet:A?e=>H.styleMirror.add(e):void 0,onIframeLoad:(e,t)=>{q.attachIframe(e,t),Y.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{H.attachLinkElement(e,t)},keepIframeSrcFn:N});if(!t)return console.warn("Failed to snapshot the document");$n({type:Hs.FullSnapshot,data:{node:t,initialOffset:Ts(window)}},e),hn.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&H.adoptStyleSheets(document.adoptedStyleSheets,qn.getId(document))};try{const e=[],t=e=>{var t;return cn(vn)({mutationCb:$,mousemoveCb:(e,t)=>$n({type:Hs.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>$n({type:Hs.IncrementalSnapshot,data:{source:qs.MouseInteraction,...e}}),scrollCb:V,viewportResizeCb:e=>$n({type:Hs.IncrementalSnapshot,data:{source:qs.ViewportResize,...e}}),inputCb:e=>$n({type:Hs.IncrementalSnapshot,data:{source:qs.Input,...e}}),mediaInteractionCb:e=>$n({type:Hs.IncrementalSnapshot,data:{source:qs.MediaInteraction,...e}}),styleSheetRuleCb:e=>$n({type:Hs.IncrementalSnapshot,data:{source:qs.StyleSheetRule,...e}}),styleDeclarationCb:e=>$n({type:Hs.IncrementalSnapshot,data:{source:qs.StyleDeclaration,...e}}),canvasMutationCb:G,fontCb:e=>$n({type:Hs.IncrementalSnapshot,data:{source:qs.Font,...e}}),selectionCb:e=>{$n({type:Hs.IncrementalSnapshot,data:{source:qs.Selection,...e}})},customElementCb:e=>{$n({type:Hs.IncrementalSnapshot,data:{source:qs.CustomElement,...e}})},blockClass:n,ignoreClass:i,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:U,inlineStylesheet:u,sampling:b,recordDOM:k,recordCanvas:x,inlineImages:R,userTriggeredOnInput:I,collectFonts:E,doc:e,maskInputFn:f,maskTextFn:m,maskAttributeFn:g,keepIframeSrcFn:N,blockSelector:o,slimDOMOptions:B,dataURLOptions:v,mirror:qn,iframeManager:q,stylesheetManager:H,shadowDomManager:Y,processedNodeManager:J,canvasManager:Gn,ignoreCSSAttributes:L,plugins:(null==(t=null==T?void 0:T.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>$n({type:Hs.Plugin,data:{plugin:e.name,payload:t}})})))||[]},y)};q.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});const r=()=>{Vn(),e.push(t(document)),Hn=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(xs("DOMContentLoaded",()=>{$n({type:Hs.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&r()})),e.push(xs("load",()=>{$n({type:Hs.Load,data:{}}),"load"===M&&r()},window))),()=>{e.forEach(e=>e()),J.destroy(),Hn=!1,ln=void 0}}catch(e){console.warn(e)}}var Yn,Xn;Jn.addCustomEvent=(e,t)=>{if(!Hn)throw new Error("please add custom event after start recording");$n({type:Hs.Custom,data:{tag:e,payload:t}})},Jn.freezePage=()=>{hn.forEach(e=>e.freeze())},Jn.takeFullSnapshot=e=>{if(!Hn)throw new Error("please take full snapshot after start recording");Vn(e)},Jn.mirror=qn,(Xn=Yn||(Yn={}))[Xn.NotStarted=0]="NotStarted",Xn[Xn.Running=1]="Running",Xn[Xn.Stopped=2]="Stopped";export{Jn as record};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
@svgdotjs/svg.js
npm dependency const track = this.track()
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
const track = this.track()
A telemetry/analytics SDK is used; event data is sent to a third-party collector.
Fix: Ensure user consent and a lawful basis; strip PII from event payloads.
expand_more 1 low-confidence finding(s)
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
@base-ui/react
npm dependencyexpand_more 820 low-confidence finding(s)
if (process.env.NODE_ENV !== "production") AccordionHeader.displayName = "AccordionHeader";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionHeader.displayName = "AccordionHeader";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionItem.displayName = "AccordionItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionItem.displayName = "AccordionItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionItemContext.displayName = "AccordionItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: AccordionItemContext is missing. Accordion parts must be placed within <Accordion.Item>.' : (0, _formatErrorMessage2.default)(9));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionItemContext.displayName = "AccordionItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: AccordionItemContext is missing. Accordion parts must be placed within <Accordion.Item>.' : _formatErrorMessage(9));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionPanel.displayName = "AccordionPanel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionPanel.displayName = "AccordionPanel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionRoot.displayName = "AccordionRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionRoot.displayName = "AccordionRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionRootContext.displayName = "AccordionRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>.' : (0, _formatErrorMessage2.default)(10));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionRootContext.displayName = "AccordionRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>.' : _formatErrorMessage(10));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionTrigger.displayName = "AccordionTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AccordionTrigger.displayName = "AccordionTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AvatarFallback.displayName = "AvatarFallback";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AvatarFallback.displayName = "AvatarFallback";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AvatarImage.displayName = "AvatarImage";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AvatarImage.displayName = "AvatarImage";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AvatarRoot.displayName = "AvatarRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AvatarRoot.displayName = "AvatarRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AvatarRootContext.displayName = "AvatarRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: AvatarRootContext is missing. Avatar parts must be placed within <Avatar.Root>.' : (0, _formatErrorMessage2.default)(13));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") AvatarRootContext.displayName = "AvatarRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: AvatarRootContext is missing. Avatar parts must be placed within <Avatar.Root>.' : _formatErrorMessage(13));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Button.displayName = "Button";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Button.displayName = "Button";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CheckboxGroup.displayName = "CheckboxGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CheckboxGroup.displayName = "CheckboxGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CheckboxGroupContext.displayName = "CheckboxGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>.' : (0, _formatErrorMessage2.default)(3));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CheckboxGroupContext.displayName = "CheckboxGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>.' : _formatErrorMessage(3));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CheckboxIndicator.displayName = "CheckboxIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CheckboxIndicator.displayName = "CheckboxIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CheckboxRoot.displayName = "CheckboxRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CheckboxRoot.displayName = "CheckboxRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CheckboxRootContext.displayName = "CheckboxRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.' : (0, _formatErrorMessage2.default)(14));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CheckboxRootContext.displayName = "CheckboxRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.' : _formatErrorMessage(14));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CollapsiblePanel.displayName = "CollapsiblePanel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CollapsiblePanel.displayName = "CollapsiblePanel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CollapsibleRoot.displayName = "CollapsibleRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CollapsibleRoot.displayName = "CollapsibleRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CollapsibleRootContext.displayName = "CollapsibleRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.' : (0, _formatErrorMessage2.default)(15));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CollapsibleRootContext.displayName = "CollapsibleRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.' : _formatErrorMessage(15));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CollapsibleTrigger.displayName = "CollapsibleTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CollapsibleTrigger.displayName = "CollapsibleTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxArrow.displayName = "ComboboxArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxArrow.displayName = "ComboboxArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxBackdrop.displayName = "ComboboxBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxBackdrop.displayName = "ComboboxBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxChipRemove.displayName = "ComboboxChipRemove";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxChipRemove.displayName = "ComboboxChipRemove";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxChip.displayName = "ComboboxChip";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxChip.displayName = "ComboboxChip";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxChipContext.displayName = "ComboboxChipContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxChipContext is missing. ComboboxChip parts must be placed within <Combobox.Chip>.' : (0, _formatErrorMessage2.default)(17));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxChipContext.displayName = "ComboboxChipContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxChipContext is missing. ComboboxChip parts must be placed within <Combobox.Chip>.' : _formatErrorMessage(17));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxChips.displayName = "ComboboxChips";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxChips.displayName = "ComboboxChips";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxChipsContext.displayName = "ComboboxChipsContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxChipsContext.displayName = "ComboboxChipsContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxClear.displayName = "ComboboxClear";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxClear.displayName = "ComboboxClear";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") GroupCollectionContext.displayName = "GroupCollectionContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") GroupCollectionContext.displayName = "GroupCollectionContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxEmpty.displayName = "ComboboxEmpty";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxEmpty.displayName = "ComboboxEmpty";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxGroupLabel.displayName = "ComboboxGroupLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxGroupLabel.displayName = "ComboboxGroupLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxGroup.displayName = "ComboboxGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxGroup.displayName = "ComboboxGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxGroupContext.displayName = "ComboboxGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.' : (0, _formatErrorMessage2.default)(18));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxGroupContext.displayName = "ComboboxGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.' : _formatErrorMessage(18));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxIcon.displayName = "ComboboxIcon";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxIcon.displayName = "ComboboxIcon";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxInputGroup.displayName = "ComboboxInputGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxInputGroup.displayName = "ComboboxInputGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxInput.displayName = "ComboboxInput";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxInput.displayName = "ComboboxInput";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxItemIndicator.displayName = "ComboboxItemIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Inner.displayName = "Inner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxItemIndicator.displayName = "ComboboxItemIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Inner.displayName = "Inner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxItem.displayName = "ComboboxItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxItem.displayName = "ComboboxItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxItemContext.displayName = "ComboboxItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.' : (0, _formatErrorMessage2.default)(19));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxItemContext.displayName = "ComboboxItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.' : _formatErrorMessage(19));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxLabel.displayName = "ComboboxLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxLabel.displayName = "ComboboxLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxList.displayName = "ComboboxList";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxList.displayName = "ComboboxList";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxPopup.displayName = "ComboboxPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxPopup.displayName = "ComboboxPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxPortal.displayName = "ComboboxPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxPortal.displayName = "ComboboxPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxPortalContext.displayName = "ComboboxPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Combobox.Portal> is missing.' : (0, _formatErrorMessage2.default)(20));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxPortalContext.displayName = "ComboboxPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Combobox.Portal> is missing.' : _formatErrorMessage(20));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxPositioner.displayName = "ComboboxPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxPositioner.displayName = "ComboboxPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxPositionerContext.displayName = "ComboboxPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component' : (0, _formatErrorMessage2.default)(21));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxPositionerContext.displayName = "ComboboxPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component' : _formatErrorMessage(21));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxRootContext.displayName = "ComboboxRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxFloatingContext.displayName = "ComboboxFloatingContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxDerivedItemsContext.displayName = "ComboboxDerivedItemsContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxHasItemsContext.displayName = "ComboboxHasItemsContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxInputValueContext.displayName = "ComboboxInputValueContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.' : (0, _formatErrorMessage2.default)(22));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.' : (0, _formatErrorMessage2.default)(23));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.' : (0, _formatErrorMessage2.default)(24));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxRootContext.displayName = "ComboboxRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxFloatingContext.displayName = "ComboboxFloatingContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxDerivedItemsContext.displayName = "ComboboxDerivedItemsContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxHasItemsContext.displayName = "ComboboxHasItemsContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxInputValueContext.displayName = "ComboboxInputValueContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.' : _formatErrorMessage(22));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.' : _formatErrorMessage(23));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.' : _formatErrorMessage(24));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxRow.displayName = "ComboboxRow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxRow.displayName = "ComboboxRow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxRowContext.displayName = "ComboboxRowContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxRowContext.displayName = "ComboboxRowContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxStatus.displayName = "ComboboxStatus";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxStatus.displayName = "ComboboxStatus";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxTrigger.displayName = "ComboboxTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxTrigger.displayName = "ComboboxTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxInternalDismissButton.displayName = "ComboboxInternalDismissButton";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ComboboxInternalDismissButton.displayName = "ComboboxInternalDismissButton";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ContextMenuRootContext.displayName = "ContextMenuRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.' : (0, _formatErrorMessage2.default)(25));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ContextMenuRootContext.displayName = "ContextMenuRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.' : _formatErrorMessage(25));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ContextMenuTrigger.displayName = "ContextMenuTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ContextMenuTrigger.displayName = "ContextMenuTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogBackdrop.displayName = "DialogBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogBackdrop.displayName = "DialogBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogClose.displayName = "DialogClose";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogClose.displayName = "DialogClose";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogDescription.displayName = "DialogDescription";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogDescription.displayName = "DialogDescription";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogPopup.displayName = "DialogPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogPopup.displayName = "DialogPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogPortal.displayName = "DialogPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogPortal.displayName = "DialogPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogPortalContext.displayName = "DialogPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Dialog.Portal> is missing.' : (0, _formatErrorMessage2.default)(26));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogPortalContext.displayName = "DialogPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Dialog.Portal> is missing.' : _formatErrorMessage(26));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") IsDrawerContext.displayName = "IsDrawerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogRootContext.displayName = "DialogRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.' : (0, _formatErrorMessage2.default)(27));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") IsDrawerContext.displayName = "IsDrawerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogRootContext.displayName = "DialogRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.' : _formatErrorMessage(27));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogTitle.displayName = "DialogTitle";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogTitle.displayName = "DialogTitle";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.' : (0, _formatErrorMessage2.default)(79));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogTrigger.displayName = "DialogTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.' : _formatErrorMessage(79));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogTrigger.displayName = "DialogTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogViewport.displayName = "DialogViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DialogViewport.displayName = "DialogViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DirectionProvider.displayName = "DirectionProvider";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DirectionProvider.displayName = "DirectionProvider";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerBackdrop.displayName = "DrawerBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerBackdrop.displayName = "DrawerBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerContent.displayName = "DrawerContent";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerContent.displayName = "DrawerContent";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerIndentBackground.displayName = "DrawerIndentBackground";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerIndentBackground.displayName = "DrawerIndentBackground";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerIndent.displayName = "DrawerIndent";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerIndent.displayName = "DrawerIndent";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerPopup.displayName = "DrawerPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerPopup.displayName = "DrawerPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerProviderContext.displayName = "DrawerProviderContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: DrawerProviderContext is missing. Use <Drawer.Provider>.' : (0, _formatErrorMessage2.default)(91));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerProviderContext.displayName = "DrawerProviderContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: DrawerProviderContext is missing. Use <Drawer.Provider>.' : _formatErrorMessage(91));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerRootContext.displayName = "DrawerRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: DrawerRootContext is missing. Drawer parts must be placed within <Drawer.Root>.' : (0, _formatErrorMessage2.default)(90));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerRootContext.displayName = "DrawerRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: DrawerRootContext is missing. Drawer parts must be placed within <Drawer.Root>.' : _formatErrorMessage(90));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerSwipeArea.displayName = "DrawerSwipeArea";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerSwipeArea.displayName = "DrawerSwipeArea";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerViewport.displayName = "DrawerViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerViewport.displayName = "DrawerViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerViewportContext.displayName = "DrawerViewportContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: DrawerViewportContext is missing. Drawer parts must be placed within <Drawer.Viewport>.' : (0, _formatErrorMessage2.default)(92));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerViewportContext.displayName = "DrawerViewportContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: DrawerViewportContext is missing. Drawer parts must be placed within <Drawer.Viewport>.' : _formatErrorMessage(92));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerVirtualKeyboardContext.displayName = "DrawerVirtualKeyboardContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DrawerVirtualKeyboardContext.displayName = "DrawerVirtualKeyboardContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldControl.displayName = "FieldControl";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldControl.displayName = "FieldControl";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldDescription.displayName = "FieldDescription";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldDescription.displayName = "FieldDescription";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldError.displayName = "FieldError";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldError.displayName = "FieldError";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldItem.displayName = "FieldItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldItem.displayName = "FieldItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldItemContext.displayName = "FieldItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldItemContext.displayName = "FieldItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldLabel.displayName = "FieldLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldLabel.displayName = "FieldLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldRootInner.displayName = "FieldRootInner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldRoot.displayName = "FieldRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldRootInner.displayName = "FieldRootInner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldRoot.displayName = "FieldRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldValidity.displayName = "FieldValidity";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldValidity.displayName = "FieldValidity";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldsetLegend.displayName = "FieldsetLegend";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldsetLegend.displayName = "FieldsetLegend";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldsetRoot.displayName = "FieldsetRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldsetRoot.displayName = "FieldsetRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldsetRootContext.displayName = "FieldsetRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.' : (0, _formatErrorMessage2.default)(86));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldsetRootContext.displayName = "FieldsetRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.' : _formatErrorMessage(86));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PortalContext.displayName = "PortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FloatingPortal.displayName = "FloatingPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PortalContext.displayName = "PortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FloatingPortal.displayName = "FloatingPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FloatingNodeContext.displayName = "FloatingNodeContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FloatingTreeContext.displayName = "FloatingTreeContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FloatingNodeContext.displayName = "FloatingNodeContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FloatingTreeContext.displayName = "FloatingTreeContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Form.displayName = "Form";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Form.displayName = "Form";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Input.displayName = "Input";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Input.displayName = "Input";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CompositeListContext.displayName = "CompositeListContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CompositeListContext.displayName = "CompositeListContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CompositeRootContext.displayName = "CompositeRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.' : (0, _formatErrorMessage2.default)(16));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CompositeRootContext.displayName = "CompositeRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.' : _formatErrorMessage(16));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CSPContext.displayName = "CSPContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") CSPContext.displayName = "CSPContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DirectionContext.displayName = "DirectionContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") DirectionContext.displayName = "DirectionContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldRootContext.displayName = "FieldRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.' : (0, _formatErrorMessage2.default)(28));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FieldRootContext.displayName = "FieldRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.' : _formatErrorMessage(28));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FormContext.displayName = "FormContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FormContext.displayName = "FormContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") LabelableContext.displayName = "LabelableContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") LabelableContext.displayName = "LabelableContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") LabelableProvider.displayName = "LabelableProvider";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") LabelableProvider.displayName = "LabelableProvider";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: Render element or function are not defined.' : (0, _formatErrorMessage2.default)(8));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: Render element or function are not defined.' : _formatErrorMessage(8));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuArrow.displayName = "MenuArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuArrow.displayName = "MenuArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuBackdrop.displayName = "MenuBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuBackdrop.displayName = "MenuBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuCheckboxItemIndicator.displayName = "MenuCheckboxItemIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuCheckboxItemIndicator.displayName = "MenuCheckboxItemIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuCheckboxItem.displayName = "MenuCheckboxItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuCheckboxItem.displayName = "MenuCheckboxItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuCheckboxItemContext.displayName = "MenuCheckboxItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.' : (0, _formatErrorMessage2.default)(30));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuCheckboxItemContext.displayName = "MenuCheckboxItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.' : _formatErrorMessage(30));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuGroupLabel.displayName = "MenuGroupLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuGroupLabel.displayName = "MenuGroupLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuGroup.displayName = "MenuGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuGroup.displayName = "MenuGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuGroupContext.displayName = "MenuGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuGroupContext is missing. Menu group parts must be used within <Menu.Group> or <Menu.RadioGroup>.' : (0, _formatErrorMessage2.default)(31));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuGroupContext.displayName = "MenuGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuGroupContext is missing. Menu group parts must be used within <Menu.Group> or <Menu.RadioGroup>.' : _formatErrorMessage(31));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuItem.displayName = "MenuItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuItem.displayName = "MenuItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuLinkItem.displayName = "MenuLinkItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuLinkItem.displayName = "MenuLinkItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuPopup.displayName = "MenuPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuPopup.displayName = "MenuPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuPortal.displayName = "MenuPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuPortal.displayName = "MenuPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuPortalContext.displayName = "MenuPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Menu.Portal> is missing.' : (0, _formatErrorMessage2.default)(32));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuPortalContext.displayName = "MenuPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Menu.Portal> is missing.' : _formatErrorMessage(32));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuPositioner.displayName = "MenuPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuPositioner.displayName = "MenuPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuPositionerContext.displayName = "MenuPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.' : (0, _formatErrorMessage2.default)(33));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuPositionerContext.displayName = "MenuPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.' : _formatErrorMessage(33));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRadioGroup.displayName = "MenuRadioGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRadioGroup.displayName = "MenuRadioGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRadioGroupContext.displayName = "MenuRadioGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.' : (0, _formatErrorMessage2.default)(34));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRadioGroupContext.displayName = "MenuRadioGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.' : _formatErrorMessage(34));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRadioItemIndicator.displayName = "MenuRadioItemIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRadioItemIndicator.displayName = "MenuRadioItemIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRadioItem.displayName = "MenuRadioItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRadioItem.displayName = "MenuRadioItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRadioItemContext.displayName = "MenuRadioItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.' : (0, _formatErrorMessage2.default)(35));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRadioItemContext.displayName = "MenuRadioItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.' : _formatErrorMessage(35));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRoot.displayName = "MenuRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRoot.displayName = "MenuRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRootContext.displayName = "MenuRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.' : (0, _formatErrorMessage2.default)(36));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuRootContext.displayName = "MenuRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.' : _formatErrorMessage(36));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? `Base UI: MenuHandle.open: No trigger found with id "${triggerId}".` : (0, _formatErrorMessage2.default)(83, triggerId));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? `Base UI: MenuHandle.open: No trigger found with id "${triggerId}".` : _formatErrorMessage(83, triggerId));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuSubmenuRootContext.displayName = "MenuSubmenuRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuSubmenuRootContext.displayName = "MenuSubmenuRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.' : (0, _formatErrorMessage2.default)(37));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuSubmenuTrigger.displayName = "MenuSubmenuTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.' : _formatErrorMessage(37));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuSubmenuTrigger.displayName = "MenuSubmenuTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.' : (0, _formatErrorMessage2.default)(85));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuTrigger.displayName = "MenuTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.' : _formatErrorMessage(85));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuTrigger.displayName = "MenuTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuViewport.displayName = "MenuViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenuViewport.displayName = "MenuViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Menubar.displayName = "Menubar";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Menubar.displayName = "Menubar";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenubarContext.displayName = "MenubarContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.' : (0, _formatErrorMessage2.default)(5));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MenubarContext.displayName = "MenubarContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.' : _formatErrorMessage(5));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterIndicator.displayName = "MeterIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterIndicator.displayName = "MeterIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterLabel.displayName = "MeterLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterLabel.displayName = "MeterLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterRoot.displayName = "MeterRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterRoot.displayName = "MeterRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterRootContext.displayName = "MeterRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MeterRootContext is missing. Meter parts must be placed within <Meter.Root>.' : (0, _formatErrorMessage2.default)(38));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterRootContext.displayName = "MeterRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: MeterRootContext is missing. Meter parts must be placed within <Meter.Root>.' : _formatErrorMessage(38));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterTrack.displayName = "MeterTrack";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterTrack.displayName = "MeterTrack";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterValue.displayName = "MeterValue";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") MeterValue.displayName = "MeterValue";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuArrow.displayName = "NavigationMenuArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuArrow.displayName = "NavigationMenuArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuBackdrop.displayName = "NavigationMenuBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuBackdrop.displayName = "NavigationMenuBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuContent.displayName = "NavigationMenuContent";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuContent.displayName = "NavigationMenuContent";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuIcon.displayName = "NavigationMenuIcon";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuIcon.displayName = "NavigationMenuIcon";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuItem.displayName = "NavigationMenuItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuItem.displayName = "NavigationMenuItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuItemContext.displayName = "NavigationMenuItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: NavigationMenuItem parts must be used within a <NavigationMenu.Item>.' : (0, _formatErrorMessage2.default)(39));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuItemContext.displayName = "NavigationMenuItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: NavigationMenuItem parts must be used within a <NavigationMenu.Item>.' : _formatErrorMessage(39));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuLink.displayName = "NavigationMenuLink";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuLink.displayName = "NavigationMenuLink";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuDismissContext.displayName = "NavigationMenuDismissContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuDismissContext.displayName = "NavigationMenuDismissContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuList.displayName = "NavigationMenuList";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuList.displayName = "NavigationMenuList";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuPopup.displayName = "NavigationMenuPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuPopup.displayName = "NavigationMenuPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuPortal.displayName = "NavigationMenuPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuPortal.displayName = "NavigationMenuPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuPortalContext.displayName = "NavigationMenuPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <NavigationMenu.Portal> is missing.' : (0, _formatErrorMessage2.default)(40));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuPortalContext.displayName = "NavigationMenuPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <NavigationMenu.Portal> is missing.' : _formatErrorMessage(40));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuPositioner.displayName = "NavigationMenuPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuPositioner.displayName = "NavigationMenuPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuPositionerContext.displayName = "NavigationMenuPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: NavigationMenuPositionerContext is missing. NavigationMenuPositioner parts must be placed within <NavigationMenu.Positioner>.' : (0, _formatErrorMessage2.default)(42));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuPositionerContext.displayName = "NavigationMenuPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: NavigationMenuPositionerContext is missing. NavigationMenuPositioner parts must be placed within <NavigationMenu.Positioner>.' : _formatErrorMessage(42));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuRoot.displayName = "NavigationMenuRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuRoot.displayName = "NavigationMenuRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuRootContext.displayName = "NavigationMenuRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: NavigationMenuRootContext is missing. Navigation Menu parts must be placed within <NavigationMenu.Root>.' : (0, _formatErrorMessage2.default)(41));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuTreeContext.displayName = "NavigationMenuTreeContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuRootContext.displayName = "NavigationMenuRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: NavigationMenuRootContext is missing. Navigation Menu parts must be placed within <NavigationMenu.Root>.' : _formatErrorMessage(41));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuTreeContext.displayName = "NavigationMenuTreeContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuViewport.displayName = "NavigationMenuViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NavigationMenuViewport.displayName = "NavigationMenuViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldDecrement.displayName = "NumberFieldDecrement";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldDecrement.displayName = "NumberFieldDecrement";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldGroup.displayName = "NumberFieldGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldGroup.displayName = "NumberFieldGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldIncrement.displayName = "NumberFieldIncrement";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldIncrement.displayName = "NumberFieldIncrement";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldInput.displayName = "NumberFieldInput";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldInput.displayName = "NumberFieldInput";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldRoot.displayName = "NumberFieldRoot"; // `none` is kept for consistency with other components even though the number field never
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldRoot.displayName = "NumberFieldRoot"; // `none` is kept for consistency with other components even though the number field never
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldRootContext.displayName = "NumberFieldRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.' : (0, _formatErrorMessage2.default)(43));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldRootContext.displayName = "NumberFieldRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.' : _formatErrorMessage(43));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldScrubAreaCursor.displayName = "NumberFieldScrubAreaCursor";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldScrubAreaCursor.displayName = "NumberFieldScrubAreaCursor";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldScrubArea.displayName = "NumberFieldScrubArea";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldScrubArea.displayName = "NumberFieldScrubArea";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldScrubAreaContext.displayName = "NumberFieldScrubAreaContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: NumberFieldScrubAreaContext is missing. NumberFieldScrubArea parts must be placed within <NumberField.ScrubArea>.' : (0, _formatErrorMessage2.default)(44));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") NumberFieldScrubAreaContext.displayName = "NumberFieldScrubAreaContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: NumberFieldScrubAreaContext is missing. NumberFieldScrubArea parts must be placed within <NumberField.ScrubArea>.' : _formatErrorMessage(44));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") OTPFieldInput.displayName = "OTPFieldInput";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") OTPFieldInput.displayName = "OTPFieldInput";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") OTPFieldRoot.displayName = "OTPFieldRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") OTPFieldRoot.displayName = "OTPFieldRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") OTPFieldRootContext.displayName = "OTPFieldRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: OTPFieldRootContext is missing. OTPField parts must be placed within <OTPField.Root>.' : (0, _formatErrorMessage2.default)(98));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") OTPFieldRootContext.displayName = "OTPFieldRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: OTPFieldRootContext is missing. OTPField parts must be placed within <OTPField.Root>.' : _formatErrorMessage(98));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverArrow.displayName = "PopoverArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverArrow.displayName = "PopoverArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverBackdrop.displayName = "PopoverBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverBackdrop.displayName = "PopoverBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverClose.displayName = "PopoverClose";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverClose.displayName = "PopoverClose";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverDescription.displayName = "PopoverDescription";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverDescription.displayName = "PopoverDescription";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverPopup.displayName = "PopoverPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverPopup.displayName = "PopoverPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverPortal.displayName = "PopoverPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverPortal.displayName = "PopoverPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverPortalContext.displayName = "PopoverPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Popover.Portal> is missing.' : (0, _formatErrorMessage2.default)(45));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverPortalContext.displayName = "PopoverPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Popover.Portal> is missing.' : _formatErrorMessage(45));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverPositioner.displayName = "PopoverPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverPositioner.displayName = "PopoverPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverPositionerContext.displayName = "PopoverPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.' : (0, _formatErrorMessage2.default)(46));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverPositionerContext.displayName = "PopoverPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.' : _formatErrorMessage(46));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverRootContext.displayName = "PopoverRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.' : (0, _formatErrorMessage2.default)(47));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverRootContext.displayName = "PopoverRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.' : _formatErrorMessage(47));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? `Base UI: PopoverHandle.open: No trigger found with id "${triggerId}".` : (0, _formatErrorMessage2.default)(80, triggerId));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? `Base UI: PopoverHandle.open: No trigger found with id "${triggerId}".` : _formatErrorMessage(80, triggerId));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverTitle.displayName = "PopoverTitle";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverTitle.displayName = "PopoverTitle";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.' : (0, _formatErrorMessage2.default)(74));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverTrigger.displayName = "PopoverTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.' : _formatErrorMessage(74));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverTrigger.displayName = "PopoverTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverViewport.displayName = "PopoverViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PopoverViewport.displayName = "PopoverViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardArrow.displayName = "PreviewCardArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardArrow.displayName = "PreviewCardArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardBackdrop.displayName = "PreviewCardBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardBackdrop.displayName = "PreviewCardBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardPopup.displayName = "PreviewCardPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardPopup.displayName = "PreviewCardPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardPortal.displayName = "PreviewCardPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardPortal.displayName = "PreviewCardPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardPortalContext.displayName = "PreviewCardPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <PreviewCard.Portal> is missing.' : (0, _formatErrorMessage2.default)(48));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardPortalContext.displayName = "PreviewCardPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <PreviewCard.Portal> is missing.' : _formatErrorMessage(48));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardPositioner.displayName = "PreviewCardPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardPositioner.displayName = "PreviewCardPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardPositionerContext.displayName = "PreviewCardPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <PreviewCard.Popup> and <PreviewCard.Arrow> must be used within the <PreviewCard.Positioner> component' : (0, _formatErrorMessage2.default)(49));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardPositionerContext.displayName = "PreviewCardPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <PreviewCard.Popup> and <PreviewCard.Arrow> must be used within the <PreviewCard.Positioner> component' : _formatErrorMessage(49));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardRootContext.displayName = "PreviewCardRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: PreviewCardRootContext is missing. PreviewCard parts must be placed within <PreviewCard.Root>.' : (0, _formatErrorMessage2.default)(50));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardRootContext.displayName = "PreviewCardRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: PreviewCardRootContext is missing. PreviewCard parts must be placed within <PreviewCard.Root>.' : _formatErrorMessage(50));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardRoot.displayName = "PreviewCardRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardRoot.displayName = "PreviewCardRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? `Base UI: PreviewCardHandle.open: No trigger found with id "${triggerId}".` : (0, _formatErrorMessage2.default)(88, triggerId));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? `Base UI: PreviewCardHandle.open: No trigger found with id "${triggerId}".` : _formatErrorMessage(88, triggerId));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <PreviewCard.Trigger> must be either used within a <PreviewCard.Root> component or provided with a handle.' : (0, _formatErrorMessage2.default)(89));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardTrigger.displayName = "PreviewCardTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <PreviewCard.Trigger> must be either used within a <PreviewCard.Root> component or provided with a handle.' : _formatErrorMessage(89));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardTrigger.displayName = "PreviewCardTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardViewport.displayName = "PreviewCardViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") PreviewCardViewport.displayName = "PreviewCardViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressIndicator.displayName = "ProgressIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressIndicator.displayName = "ProgressIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressLabel.displayName = "ProgressLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressLabel.displayName = "ProgressLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressRoot.displayName = "ProgressRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressRoot.displayName = "ProgressRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressRootContext.displayName = "ProgressRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.' : (0, _formatErrorMessage2.default)(51));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressRootContext.displayName = "ProgressRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.' : _formatErrorMessage(51));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressTrack.displayName = "ProgressTrack";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressTrack.displayName = "ProgressTrack";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressValue.displayName = "ProgressValue";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ProgressValue.displayName = "ProgressValue";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") RadioGroup.displayName = "RadioGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") RadioGroup.displayName = "RadioGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") RadioGroupContext.displayName = "RadioGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") RadioGroupContext.displayName = "RadioGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") RadioIndicator.displayName = "RadioIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") RadioIndicator.displayName = "RadioIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") RadioRoot.displayName = "RadioRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") RadioRoot.displayName = "RadioRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") RadioRootContext.displayName = "RadioRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: RadioRootContext is missing. Radio parts must be placed within <Radio.Root>.' : (0, _formatErrorMessage2.default)(52));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") RadioRootContext.displayName = "RadioRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: RadioRootContext is missing. Radio parts must be placed within <Radio.Root>.' : _formatErrorMessage(52));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaContent.displayName = "ScrollAreaContent";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaContent.displayName = "ScrollAreaContent";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaCorner.displayName = "ScrollAreaCorner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaCorner.displayName = "ScrollAreaCorner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaRoot.displayName = "ScrollAreaRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaRoot.displayName = "ScrollAreaRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaRootContext.displayName = "ScrollAreaRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.' : (0, _formatErrorMessage2.default)(53));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaRootContext.displayName = "ScrollAreaRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.' : _formatErrorMessage(53));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaScrollbar.displayName = "ScrollAreaScrollbar";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaScrollbar.displayName = "ScrollAreaScrollbar";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaScrollbarContext.displayName = "ScrollAreaScrollbarContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.' : (0, _formatErrorMessage2.default)(54));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaScrollbarContext.displayName = "ScrollAreaScrollbarContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.' : _formatErrorMessage(54));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaThumb.displayName = "ScrollAreaThumb";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaThumb.displayName = "ScrollAreaThumb";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaViewport.displayName = "ScrollAreaViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaViewport.displayName = "ScrollAreaViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaViewportContext.displayName = "ScrollAreaViewportContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ScrollAreaViewportContext missing. ScrollAreaViewport parts must be placed within <ScrollArea.Viewport>.' : (0, _formatErrorMessage2.default)(55));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ScrollAreaViewportContext.displayName = "ScrollAreaViewportContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ScrollAreaViewportContext missing. ScrollAreaViewport parts must be placed within <ScrollArea.Viewport>.' : _formatErrorMessage(55));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectArrow.displayName = "SelectArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectArrow.displayName = "SelectArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectBackdrop.displayName = "SelectBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectBackdrop.displayName = "SelectBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectGroupLabel.displayName = "SelectGroupLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectGroupLabel.displayName = "SelectGroupLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectGroup.displayName = "SelectGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectGroup.displayName = "SelectGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectGroupContext.displayName = "SelectGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.' : (0, _formatErrorMessage2.default)(56));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectGroupContext.displayName = "SelectGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.' : _formatErrorMessage(56));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectIcon.displayName = "SelectIcon";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectIcon.displayName = "SelectIcon";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectItemIndicator.displayName = "SelectItemIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Inner.displayName = "Inner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectItemIndicator.displayName = "SelectItemIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Inner.displayName = "Inner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectItemText.displayName = "SelectItemText";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectItemText.displayName = "SelectItemText";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectItem.displayName = "SelectItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectItem.displayName = "SelectItem";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectItemContext.displayName = "SelectItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.' : (0, _formatErrorMessage2.default)(57));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectItemContext.displayName = "SelectItemContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.' : _formatErrorMessage(57));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectLabel.displayName = "SelectLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectLabel.displayName = "SelectLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectList.displayName = "SelectList";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectList.displayName = "SelectList";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectPopup.displayName = "SelectPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectPopup.displayName = "SelectPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectPortal.displayName = "SelectPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectPortal.displayName = "SelectPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectPortalContext.displayName = "SelectPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Select.Portal> is missing.' : (0, _formatErrorMessage2.default)(58));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectPortalContext.displayName = "SelectPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Select.Portal> is missing.' : _formatErrorMessage(58));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectPositioner.displayName = "SelectPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectPositioner.displayName = "SelectPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectPositionerContext.displayName = "SelectPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.' : (0, _formatErrorMessage2.default)(59));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectPositionerContext.displayName = "SelectPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.' : _formatErrorMessage(59));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectRootContext.displayName = "SelectRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectFloatingContext.displayName = "SelectFloatingContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.' : (0, _formatErrorMessage2.default)(60));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.' : (0, _formatErrorMessage2.default)(61));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectRootContext.displayName = "SelectRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectFloatingContext.displayName = "SelectFloatingContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(60));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(61));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectScrollArrow.displayName = "SelectScrollArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectScrollArrow.displayName = "SelectScrollArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectScrollDownArrow.displayName = "SelectScrollDownArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectScrollDownArrow.displayName = "SelectScrollDownArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectScrollUpArrow.displayName = "SelectScrollUpArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectScrollUpArrow.displayName = "SelectScrollUpArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectTrigger.displayName = "SelectTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectTrigger.displayName = "SelectTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectValue.displayName = "SelectValue";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SelectValue.displayName = "SelectValue";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Separator.displayName = "Separator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Separator.displayName = "Separator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderControl.displayName = "SliderControl";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderControl.displayName = "SliderControl";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderIndicator.displayName = "SliderIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderIndicator.displayName = "SliderIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderLabel.displayName = "SliderLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderLabel.displayName = "SliderLabel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderRoot.displayName = "SliderRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderRoot.displayName = "SliderRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderRootContext.displayName = "SliderRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.' : (0, _formatErrorMessage2.default)(62));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderRootContext.displayName = "SliderRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.' : _formatErrorMessage(62));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderThumb.displayName = "SliderThumb";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderThumb.displayName = "SliderThumb";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderTrack.displayName = "SliderTrack";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderTrack.displayName = "SliderTrack";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderValue.displayName = "SliderValue";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SliderValue.displayName = "SliderValue";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SwitchRoot.displayName = "SwitchRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SwitchRoot.displayName = "SwitchRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SwitchRootContext.displayName = "SwitchRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.' : (0, _formatErrorMessage2.default)(63));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SwitchRootContext.displayName = "SwitchRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.' : _formatErrorMessage(63));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SwitchThumb.displayName = "SwitchThumb";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") SwitchThumb.displayName = "SwitchThumb";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsIndicator.displayName = "TabsIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsIndicator.displayName = "TabsIndicator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsList.displayName = "TabsList";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsList.displayName = "TabsList";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsListContext.displayName = "TabsListContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.' : (0, _formatErrorMessage2.default)(65));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsListContext.displayName = "TabsListContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.' : _formatErrorMessage(65));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsPanel.displayName = "TabsPanel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsPanel.displayName = "TabsPanel";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsRoot.displayName = "TabsRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsRoot.displayName = "TabsRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsRootContext.displayName = "TabsRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.' : (0, _formatErrorMessage2.default)(64));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsRootContext.displayName = "TabsRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.' : _formatErrorMessage(64));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsTab.displayName = "TabsTab";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TabsTab.displayName = "TabsTab";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastAction.displayName = "ToastAction";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastAction.displayName = "ToastAction";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastArrow.displayName = "ToastArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastArrow.displayName = "ToastArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastClose.displayName = "ToastClose";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastClose.displayName = "ToastClose";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastContent.displayName = "ToastContent";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastContent.displayName = "ToastContent";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastDescription.displayName = "ToastDescription";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastDescription.displayName = "ToastDescription";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastPositioner.displayName = "ToastPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastPositioner.displayName = "ToastPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastPositionerContext.displayName = "ToastPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToastPositionerContext is missing. ToastPositioner parts must be placed within <Toast.Positioner>.' : (0, _formatErrorMessage2.default)(84));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastPositionerContext.displayName = "ToastPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToastPositionerContext is missing. ToastPositioner parts must be placed within <Toast.Positioner>.' : _formatErrorMessage(84));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastProvider.displayName = "ToastProvider";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastProvider.displayName = "ToastProvider";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastContext.displayName = "ToastContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: useToastManager must be used within <Toast.Provider>.' : (0, _formatErrorMessage2.default)(73));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastContext.displayName = "ToastContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: useToastManager must be used within <Toast.Provider>.' : _formatErrorMessage(73));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastRoot.displayName = "ToastRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastRoot.displayName = "ToastRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastRootContext.displayName = "ToastRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.' : (0, _formatErrorMessage2.default)(66));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastRootContext.displayName = "ToastRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.' : _formatErrorMessage(66));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastTitle.displayName = "ToastTitle";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastTitle.displayName = "ToastTitle";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: useToastManager must be used within <Toast.Provider>.' : (0, _formatErrorMessage2.default)(73));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: useToastManager must be used within <Toast.Provider>.' : _formatErrorMessage(73));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastViewport.displayName = "ToastViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToastViewport.displayName = "ToastViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToggleGroup.displayName = "ToggleGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToggleGroup.displayName = "ToggleGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToggleGroupContext.displayName = "ToggleGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToggleGroupContext is missing. ToggleGroup parts must be placed within <ToggleGroup>.' : (0, _formatErrorMessage2.default)(7));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToggleGroupContext.displayName = "ToggleGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToggleGroupContext is missing. ToggleGroup parts must be placed within <ToggleGroup>.' : _formatErrorMessage(7));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Toggle.displayName = "Toggle";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") Toggle.displayName = "Toggle";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarButton.displayName = "ToolbarButton";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarButton.displayName = "ToolbarButton";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarGroup.displayName = "ToolbarGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarGroup.displayName = "ToolbarGroup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarGroupContext.displayName = "ToolbarGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToolbarGroupContext is missing. ToolbarGroup parts must be placed within <Toolbar.Group>.' : (0, _formatErrorMessage2.default)(68));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarGroupContext.displayName = "ToolbarGroupContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToolbarGroupContext is missing. ToolbarGroup parts must be placed within <Toolbar.Group>.' : _formatErrorMessage(68));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarInput.displayName = "ToolbarInput";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarInput.displayName = "ToolbarInput";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarLink.displayName = "ToolbarLink";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarLink.displayName = "ToolbarLink";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarRoot.displayName = "ToolbarRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarRoot.displayName = "ToolbarRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarRootContext.displayName = "ToolbarRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.' : (0, _formatErrorMessage2.default)(69));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarRootContext.displayName = "ToolbarRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.' : _formatErrorMessage(69));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarSeparator.displayName = "ToolbarSeparator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ToolbarSeparator.displayName = "ToolbarSeparator";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipArrow.displayName = "TooltipArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipArrow.displayName = "TooltipArrow";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipPopup.displayName = "TooltipPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipPopup.displayName = "TooltipPopup";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipPortal.displayName = "TooltipPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipPortal.displayName = "TooltipPortal";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipPortalContext.displayName = "TooltipPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Tooltip.Portal> is missing.' : (0, _formatErrorMessage2.default)(70));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipPortalContext.displayName = "TooltipPortalContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Tooltip.Portal> is missing.' : _formatErrorMessage(70));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipPositioner.displayName = "TooltipPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipPositioner.displayName = "TooltipPositioner";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipPositionerContext.displayName = "TooltipPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.' : (0, _formatErrorMessage2.default)(71));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipPositionerContext.displayName = "TooltipPositionerContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.' : _formatErrorMessage(71));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipProvider.displayName = "TooltipProvider";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipProvider.displayName = "TooltipProvider";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipProviderContext.displayName = "TooltipProviderContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipProviderContext.displayName = "TooltipProviderContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipRoot.displayName = "TooltipRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipRoot.displayName = "TooltipRoot";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipRootContext.displayName = "TooltipRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.' : (0, _formatErrorMessage2.default)(72));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipRootContext.displayName = "TooltipRootContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.' : _formatErrorMessage(72));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? `Base UI: TooltipHandle.open: No trigger found with id "${triggerId}".` : (0, _formatErrorMessage2.default)(81, triggerId));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? `Base UI: TooltipHandle.open: No trigger found with id "${triggerId}".` : _formatErrorMessage(81, triggerId));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.' : (0, _formatErrorMessage2.default)(82));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipTrigger.displayName = "TooltipTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throw new Error(process.env.NODE_ENV !== "production" ? 'Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.' : _formatErrorMessage(82));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipTrigger.displayName = "TooltipTrigger";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipViewport.displayName = "TooltipViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") TooltipViewport.displayName = "TooltipViewport";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FloatingPortalLite.displayName = "FloatingPortalLite";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FloatingPortalLite.displayName = "FloatingPortalLite";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FocusGuard.displayName = "FocusGuard";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") FocusGuard.displayName = "FocusGuard";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") InternalBackdrop.displayName = "InternalBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") InternalBackdrop.displayName = "InternalBackdrop";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ClosePartContext.displayName = "ClosePartContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") ClosePartContext.displayName = "ClosePartContext";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") styleDisableScrollbar.getElement.displayName = "styleDisableScrollbar.getElement";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") styleDisableScrollbar.getElement.displayName = "styleDisableScrollbar.getElement";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
@floating-ui/react
npm dependencyexpand_more 2 low-confidence finding(s)
if (process.env.NODE_ENV !== "production") {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
@lexical/utils
npm dependencyexpand_more 1 low-confidence finding(s)
const __DEV__ = process.env.NODE_ENV !== 'production';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
@tanstack/query-core
npm dependencyexpand_more 10 low-confidence finding(s)
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
@tanstack/react-query
npm dependencyexpand_more 5 low-confidence finding(s)
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
ahooks
npm dependencyexpand_more 4 low-confidence finding(s)
var isDev = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var Wrapper = process.env.REACT_MODE === 'strict' ? StrictMode : undefined;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var isDev = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var Wrapper = process.env.REACT_MODE === 'strict' ? _react.StrictMode : undefined;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
dayjs
npm dependencyexpand_more 2 low-confidence finding(s)
if (!process || process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_devHelper=t()}(this,(function(){"use strict";return function(e,t,s){if(!process||"production"!==process.env.NODE_ENV){var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date;return"string"==typeof t&&13===t.length&&console.warn("To parse a Unix timestamp like "+t+", you should pass it as a Number. https://day.js.org/docs/en/parse/unix-timestamp-milliseconds"),"number"==typeof t&&4===String(t).length&&console.warn("Guessing you may want to parse the Year "+t+", you should pass it as a String "+t+", not a Number. Otherwise, "+t+" will be treated as a Unix timestamp"),e.args.length>=2&&!s.p.customParseFormat&&console.warn("To parse a date-time string like "+t+" using the given format, you should enable customParseFormat plugin first. https://day.js.org/docs/en/parse/string-format"),n.bind(this)(e)};var a=s.locale;s.locale=function(e,t,o){return void 0===t&&"string"==typeof e&&(s.Ls[e]||console.warn("Guessing you may want to use locale "+e+", you have to load it before using it. https://day.js.org/docs/en/i18n/loading-into-nodejs")),a(e,t,o)};var i=o.diff;o.diff=function(e,t,o){return(!e||!s(e).isValid())&&console.warn("Invalid usage: diff() requires a valid comparison date as the first argument. https://day.js.org/docs/en/display/difference"),i.call(this,e,t,o)}}}}));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
echarts
npm dependencyexpand_more 348 low-confidence finding(s)
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
} else if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
} else if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
} else if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
throwError(process.env.NODE_ENV !== 'production' ? 'Passing DOM nodes as content is not supported in richText tooltip!' : '');
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && projection) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && connectionEventRevertMap[nonRefinedEventType]) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && !isHighDownDispatcher(dispatchers[i])) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && !isHighDownDispatcher(dispatcher)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && !isHighDownDispatcher(dispatcher)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!color && process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
echarts-for-react
npm dependencyexpand_more 4 low-confidence finding(s)
let history: History = process.env.__IS_SERVER ? null : createBrowserHistory(options);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
isServer: process.env.__IS_SERVER,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
let history: History = process.env.__IS_SERVER ? null : createBrowserHistory(options);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
isServer: process.env.__IS_SERVER,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
foxact
npm dependencyexpand_more 10 low-confidence finding(s)
"use strict";var e=require("react/jsx-runtime");require("client-only");var r=require("react"),t=require("../magic-portal/index.cjs");exports.createBreadcrumbs=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"(Anonymous)";const o=r.createContext([]),[u,c,i]=t.createMagicPortal(n);function s(t){let{title:n,href:u,meta:c,children:i}=t;const s=r.useContext(o),a=r.useMemo(()=>[...s,{title:n,href:u,meta:c}],[s,n,u,c]);return e.jsx(o.Provider,{value:a,children:i})}function a(t){const{title:n,meta:u}=t,c=r.useContext(o),s=r.useMemo(()=>[...c,{title:n,meta:u}],[c,n,u]),{children:a}=t,l=r.isValidElement(a)?a:a(s);return e.jsx(o.Provider,{value:s,children:e.jsx(i,{children:l})})}return"production"!==process.env.NODE_ENV&&(s.displayName=n+".BreadcrumbSegment"),"production"!==process.env.NODE_ENV&&(a.displayName=n+".BreadcrumbCurrent"),[u,c,s,a,function(){return r.useContext(o)}]};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
import{jsx as r}from"react/jsx-runtime";import"client-only";import{useContext as e,useMemo as n,isValidElement as t,createContext as o}from"react";import{createMagicPortal as c}from"../magic-portal/index.mjs";function i(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"(Anonymous)";const u=o([]),[m,a,d]=c(i);function l(t){let{title:o,href:c,meta:i,children:m}=t;const a=e(u),d=n(()=>[...a,{title:o,href:c,meta:i}],[a,o,c,i]);return r(u.Provider,{value:d,children:m})}function s(o){const{title:c,meta:i}=o,m=e(u),a=n(()=>[...m,{title:c,meta:i}],[m,c,i]),{children:l}=o,s=t(l)?l:l(a);return r(u.Provider,{value:a,children:r(d,{children:s})})}return"production"!==process.env.NODE_ENV&&(l.displayName=i+".BreadcrumbSegment"),"production"!==process.env.NODE_ENV&&(s.displayName=i+".BreadcrumbCurrent"),[m,a,l,s,function(){return e(u)}]}export{i as createBreadcrumbs};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"use strict";const e=new Map;function t(e){const t=Array.from(Array(e).keys());return"development"===process.env.NODE_ENV&&Object.freeze(t),t}function r(r){if(e.has(r))return e.get(r);const n=t(r);return e.set(r,n),n}const n=new Map;function o(e){let r,o;return n.has(e)&&(o=(r=n.get(e)).deref()),o||(r=new WeakRef(o=t(e)),n.set(e,r)),o}const s="function"==typeof WeakRef?o:r;exports.createFixedArray=s,exports.createFixedArrayWithGC=o,exports.createFixedArrayWithoutGC=r;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const e=new Map;function t(e){const t=Array.from(Array(e).keys());return"development"===process.env.NODE_ENV&&Object.freeze(t),t}function r(r){if(e.has(r))return e.get(r);const n=t(r);return e.set(r,n),n}const n=new Map;function o(e){let r,o;return n.has(e)&&(o=(r=n.get(e)).deref()),o||(r=new WeakRef(o=t(e)),n.set(e,r)),o}const a="function"==typeof WeakRef?o:r;export{a as createFixedArray,o as createFixedArrayWithGC,r as createFixedArrayWithoutGC};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"use strict";var e=require("react/jsx-runtime");require("client-only");var t=require("react-dom"),r=require("../context-state/index.cjs"),n=require("../no-ssr/index.cjs"),o=require("react");exports.createMagicPortal=function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"(Anoymous)";const[l,a,i]=r.createContextState(null);function s(t){let{as:r,ssrFallback:o=null,...l}=t;null!=o&&n.noSSR();const a=i();return e.jsx(r||"div",{...c?{"data-foxact-magic-portal-target":c}:{},ref:a,...l})}function u(t){const{ssrFallback:r=null}=t;return null!=r?e.jsx(o.Suspense,{fallback:r,children:e.jsx(s,{...t})}):e.jsx(s,{...t})}function d(e){let{children:r}=e;const n=a();return"u"<typeof window||!n?null:t.createPortal(r,n)}function p(t){let{children:r}=t;return e.jsx(l,{children:r})}return"production"!==process.env.NODE_ENV&&(u.displayName=c+".PortalTarget"),"production"!==process.env.NODE_ENV&&(d.displayName=c+".PortalContent"),"production"!==process.env.NODE_ENV&&(p.displayName=c+".PortalProvider"),[p,u,d]};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
import{jsx as t}from"react/jsx-runtime";import"client-only";import{createPortal as o}from"react-dom";import{createContextState as r}from"../context-state/index.mjs";import{noSSR as n}from"../no-ssr/index.mjs";import{Suspense as e}from"react";function l(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"(Anoymous)";const[i,c,a]=r(null);function u(o){let{as:r,ssrFallback:e=null,...i}=o;null!=e&&n();const c=a();return t(r||"div",{...l?{"data-foxact-magic-portal-target":l}:{},ref:c,...i})}function m(o){const{ssrFallback:r=null}=o;return null!=r?t(e,{fallback:r,children:t(u,{...o})}):t(u,{...o})}function s(t){let{children:r}=t;const n=c();return"u"<typeof window||!n?null:o(r,n)}function p(o){let{children:r}=o;return t(i,{children:r})}return"production"!==process.env.NODE_ENV&&(m.displayName=l+".PortalTarget"),"production"!==process.env.NODE_ENV&&(s.displayName=l+".PortalContent"),"production"!==process.env.NODE_ENV&&(p.displayName=l+".PortalProvider"),[p,m,s]}export{l as createMagicPortal};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"use strict";var e=require("react"),t=require("../use-media-query/index.cjs");exports.useFastClick=function(n){const o=e.useCallback(e=>{("mousedown"!==e.type||0===e.button)&&("development"!==process.env.NODE_ENV||e.currentTarget instanceof HTMLDivElement||e.currentTarget instanceof HTMLButtonElement||console.warn('[foxact/use-fast-click] You should only use "useFastClick" on <div /> or <button /> elements'),n(e))},[n]);return t.useMediaQuery("(pointer: coarse)",!1)?{onClick:o}:{onMouseDown:o}};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
import{useCallback as e}from"react";import{useMediaQuery as o}from"../use-media-query/index.mjs";function t(t){const n=e(e=>{("mousedown"!==e.type||0===e.button)&&("development"!==process.env.NODE_ENV||e.currentTarget instanceof HTMLDivElement||e.currentTarget instanceof HTMLButtonElement||console.warn('[foxact/use-fast-click] You should only use "useFastClick" on <div /> or <button /> elements'),t(e))},[t]);return o("(pointer: coarse)",!1)?{onClick:n}:{onMouseDown:n}}export{t as useFastClick};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"use strict";var t=require("react"),e=require("../use-isomorphic-layout-effect/index.cjs");function s(t,e){Object.defineProperty(t.t,e,{get:()=>(t.d[e]=!0,t.s[e]),enumerable:!0})}function c(t){return{state:t.s,tracked:t.d}}const n=Object.prototype.hasOwnProperty;exports.useStateWithDeps=function(r){const[{inst:u},o]=t.useState(()=>{const t={s:r,d:{},t:{},u:!1};for(const e in r)n.call(r,e)&&s(t,e);return{inst:t}}),i=t.useCallback(t=>{const e="function"==typeof t?t(u.s):t;let c=!1;for(const t in e)n.call(e,t)&&(n.call(u.t,t)||s(u,t),!Object.is(u.s[t],e[t])&&(u.s[t]=e[t],u.d[t]&&(c=!0)));c&&!u.u&&o({inst:u})},[u]);return e.useLayoutEffect(()=>(u.u=!1,()=>{u.u=!0})),"production"!==process.env.NODE_ENV&&t.useDebugValue(u,c),[u.t,i]};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
import{useState as t,useCallback as e,useDebugValue as o}from"react";import{useLayoutEffect as n}from"../use-isomorphic-layout-effect/index.mjs";function r(t,e){Object.defineProperty(t.t,e,{get:()=>(t.d[e]=!0,t.s[e]),enumerable:!0})}function s(t){return{state:t.s,tracked:t.d}}const c=Object.prototype.hasOwnProperty;function i(i){const[{inst:u},f]=t(()=>{const t={s:i,d:{},t:{},u:!1};for(const e in i)c.call(i,e)&&r(t,e);return{inst:t}}),p=e(t=>{const e="function"==typeof t?t(u.s):t;let o=!1;for(const t in e)c.call(e,t)&&(c.call(u.t,t)||r(u,t),!Object.is(u.s[t],e[t])&&(u.s[t]=e[t],u.d[t]&&(o=!0)));o&&!u.u&&f({inst:u})},[u]);return n(()=>(u.u=!1,()=>{u.u=!0})),"production"!==process.env.NODE_ENV&&o(u,s),[u.t,p]}export{i as useStateWithDeps};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
i18next-resources-to-backend
npm dependencyexpand_more 2 low-confidence finding(s)
import { readFileSync } from 'fs'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const pkg = JSON.parse(readFileSync(new URL('package.json', import.meta.url)))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
immer
npm dependencyexpand_more 5 low-confidence finding(s)
if (process.env.NODE_ENV !== "production" && isNaN(parseInt(prop as any)))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NODE_ENV !== "production" &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NODE_ENV !== "production"
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== "production") {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
jotai
npm dependencyexpand_more 27 low-confidence finding(s)
if (process.env.NODE_ENV !== 'production' && !('write' in atom)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return process.env.NODE_ENV !== 'production' && this.debugLabel ? key + ':' + this.debugLabel : key;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && !('v' in atomState)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
} else if (process.env.NODE_ENV !== 'production' && invalidatedAtoms.has(a)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && !isActuallyWritableAtom(atom)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && isSync) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && storeMutationSet.has(store)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && !buildingBlocks) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var RESET = Symbol(process.env.NODE_ENV !== 'production' ? 'RESET' : '');
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && !didWarnDeprecation$1) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production' && !didWarnDeprecation) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
} else if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
jotai-effect
npm dependencyexpand_more 1 low-confidence finding(s)
process.env.NODE_ENV !== 'production'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
jotai-tanstack-query
npm dependencyexpand_more 14 low-confidence finding(s)
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
js-yaml
npm dependencyexpand_more 2 low-confidence finding(s)
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url)))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
input = readFileSync(options.file === '-' ? 0 : options.file, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
katex
npm dependencyexpand_more 4 low-confidence finding(s)
const fs = require("fs");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFile(options.macroFile, "utf-8", function(err, data) {
if (err) {throw err;}
splitMacros(data.toString().split('\n'));
});
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFile(options.input, "utf-8", function(err, data) {
if (err) {throw err;}
input = data.toString();
writeOutput(input);
});
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFile(outputFile, output, function(err) {
if (err) {
return console.log(err);
}
});
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
lamejs
npm dependencyexpand_more 4 low-confidence finding(s)
var fs = require("fs");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var r = fs.readFileSync(path.join("testdata", "Left44100.wav"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var r1 = fs.readFileSync(path.join("testdata", "Left44100.wav"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var r2 = fs.readFileSync(path.join("testdata", "Right44100.wav"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
lexical
npm dependencyexpand_more 6 low-confidence finding(s)
const __DEV__ = process.env.NODE_ENV !== 'production';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const __DEV__ = process.env.NODE_ENV !== 'production';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const __DEV__ = process.env.NODE_ENV !== 'production';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const __DEV__ = process.env.NODE_ENV !== 'production';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const __DEV__ = process.env.NODE_ENV !== 'production';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const __DEV__ = process.env.NODE_ENV !== 'production';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
loro-crdt
npm dependencyexpand_more 1 low-confidence finding(s)
const bytes = require('fs').readFileSync(path);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
mime
npm dependencyexpand_more 1 low-confidence finding(s)
const json = await fs.readFile(
path.join(__dirname, '../../package.json'),
'utf-8',
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
react
npm dependencyexpand_more 14 low-confidence finding(s)
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
react-dom
npm dependencyexpand_more 23 low-confidence finding(s)
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV !== 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
scheduler
npm dependencyexpand_more 8 low-confidence finding(s)
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
"production" !== process.env.NODE_ENV &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.NODE_ENV === 'production') {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
Skipped dependencies
Production
- @orpc/client prod — dist-only: no readable source
- @orpc/contract prod — dist-only: no readable source
- @orpc/openapi-client prod — dist-only: no readable source
- @orpc/tanstack-query prod — dist-only: no readable source
- @streamdown/math prod — dist-only: no readable source
- @t3-oss/env-nextjs prod — dist-only: no readable source
- class-variance-authority prod — dist-only: no readable source
- cmdk prod — dist-only: no readable source
- copy-to-clipboard prod — dist-only: no readable source
- cron-parser prod — dist-only: no readable source
- emoji-mart prod — dist-only: no readable source
- fuse.js prod — dist-only: no readable source
- jotai-scope prod — dist-only: no readable source
- jotai-tanstack-form prod — registry 404
- mermaid prod — dist-only: no readable source
- motion prod — dist-only: no readable source
- next prod — tarball exceeds byte cap
- next-themes prod — dist-only: no readable source
- react-papaparse prod — dist-only: no readable source
- react-pdf-highlighter prod — dist-only: no readable source
- react-sortablejs prod — dist-only: no readable source
- react-textarea-autosize prod — dist-only: no readable source
- reactflow prod — dist-only: no readable source
- sharp prod — scan budget exceeded
- shiki prod — scan budget exceeded
- socket.io-client prod — scan budget exceeded
- sortablejs prod — scan budget exceeded
- std-semver prod — scan budget exceeded
- streamdown prod — scan budget exceeded
- string-ts prod — scan budget exceeded
- tldts prod — scan budget exceeded
- unist-util-visit prod — scan budget exceeded
- use-context-selector prod — scan budget exceeded
- uuid prod — scan budget exceeded
- zod prod — scan budget exceeded
- zundo prod — scan budget exceeded
- zustand prod — scan budget exceeded
- @hono/node-server prod — scan budget exceeded
- c12 prod — scan budget exceeded
- chokidar prod — scan budget exceeded
- hono prod — scan budget exceeded
- clsx prod — scan budget exceeded
- tailwind-merge prod — scan budget exceeded
- @napi-rs/keyring prod — scan budget exceeded
- cli-table3 prod — scan budget exceeded
- eventsource-parser prod — scan budget exceeded
- lockfile prod — scan budget exceeded
- open prod — scan budget exceeded
- ora prod — scan budget exceeded
- picocolors prod — scan budget exceeded
- undici prod — scan budget exceeded