@lmnr-ai/lmnr 0.8.55 → 0.8.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { r as __require } from "./rolldown-runtime-DYf_mQCB.mjs";
2
- import { A as PARENT_SPAN_PATH, B as SPAN_RELEASE, C as ASSOCIATION_PROPERTIES_OVERRIDES, D as HUMAN_EVALUATOR_OPTIONS, E as GEN_AI_TOOL_DEFINITIONS, F as SPAN_INSTRUMENTATION_SCOPE_VERSION, G as USER_ID, H as SPAN_TYPE, I as SPAN_INSTRUMENTATION_SOURCE, J as DEBUG_SESSION_DIR, K as version, L as SPAN_LANGUAGE_VERSION, M as SPAN_IDS_PATH, N as SPAN_INPUT, O as LaminarAttributes, P as SPAN_INSTRUMENTATION_SCOPE_NAME, Q as hasOwn, R as SPAN_OUTPUT, S as ASSOCIATION_PROPERTIES, T as GEN_AI_OUTPUT_MESSAGES, U as TRACE_HAS_BROWSER_SESSION, V as SPAN_SDK_VERSION, W as TRACE_TYPE, X as TracingLevel, Y as DEBUG_SESSION_FILE, Z as errorMessage, _ as toJson, a as getFrontendUrl, b as tryToOtelSpanContext, c as loadEnv, d as normalizeOtelSpanId, f as normalizeOtelTraceId, g as parseOtelHeaders, h as parseJson, j as SESSION_ID$1, k as PARENT_SPAN_IDS_PATH, l as metadataToAttributes, m as otelTraceIdToUUID, n as Semaphore, o as getOtelEnvVar, p as otelSpanIdToUUID, q as LaminarClient, r as deserializeLaminarSpanContext, s as initializeLogger, t as NIL_UUID, u as newUUID, v as toJsonOrString, w as GEN_AI_INPUT_MESSAGES, x as validateTracingConfig, y as truncateSpanPayload, z as SPAN_PATH } from "./utils-B7IKRw5F.mjs";
2
+ import { A as PARENT_SPAN_PATH, B as SPAN_RELEASE, C as ASSOCIATION_PROPERTIES_OVERRIDES, D as HUMAN_EVALUATOR_OPTIONS, E as GEN_AI_TOOL_DEFINITIONS, F as SPAN_INSTRUMENTATION_SCOPE_VERSION, G as USER_ID, H as SPAN_TYPE, I as SPAN_INSTRUMENTATION_SOURCE, J as DEBUG_SESSION_DIR, K as version, L as SPAN_LANGUAGE_VERSION, M as SPAN_IDS_PATH, N as SPAN_INPUT, O as LaminarAttributes, P as SPAN_INSTRUMENTATION_SCOPE_NAME, Q as hasOwn, R as SPAN_OUTPUT, S as ASSOCIATION_PROPERTIES, T as GEN_AI_OUTPUT_MESSAGES, U as TRACE_HAS_BROWSER_SESSION, V as SPAN_SDK_VERSION, W as TRACE_TYPE, X as TracingLevel, Y as DEBUG_SESSION_FILE, Z as errorMessage, _ as toJson, a as getFrontendUrl, b as tryToOtelSpanContext, c as loadEnv, d as normalizeOtelSpanId, f as normalizeOtelTraceId, g as parseOtelHeaders, h as parseJson, j as SESSION_ID$1, k as PARENT_SPAN_IDS_PATH, l as metadataToAttributes, m as otelTraceIdToUUID, n as Semaphore, o as getOtelEnvVar, p as otelSpanIdToUUID, q as LaminarClient, r as deserializeLaminarSpanContext, s as initializeLogger, t as NIL_UUID, u as newUUID, v as toJsonOrString, w as GEN_AI_INPUT_MESSAGES, x as validateTracingConfig, y as truncateSpanPayload, z as SPAN_PATH } from "./utils-DCGUR332.mjs";
3
3
  import { n as TRACEPARENT_HEADER, t as LAMINAR_SPAN_CONTEXT_HEADER } from "./consts-r67THnT9.mjs";
4
4
  import { createRequire } from "node:module";
5
5
  import * as path$1 from "path";
@@ -24,6 +24,7 @@ import * as fs from "fs";
24
24
  import * as net from "net";
25
25
  import * as os from "os";
26
26
  import { AsyncLocalStorage } from "async_hooks";
27
+ import { z } from "zod";
27
28
  import { zodToJsonSchema } from "zod-to-json-schema";
28
29
  import { hrTime, isTracingSuppressed, otperformance, suppressTracing, unsuppressTracing } from "@opentelemetry/core";
29
30
  import { AsyncLocalStorage as AsyncLocalStorage$1 } from "node:async_hooks";
@@ -199,7 +200,7 @@ var LaminarDataset = class extends EvaluationDataset {
199
200
  */
200
201
  async push(paths, recursive = false) {
201
202
  if (!this.client) throw new Error("Client not set");
202
- const { loadFromPaths } = await import("./file-utils-qSiXXrPa.mjs").then((n) => n.t);
203
+ const { loadFromPaths } = await import("./file-utils-CiR_YsZk.mjs").then((n) => n.t);
203
204
  const data = await loadFromPaths(Array.isArray(paths) ? paths : [paths], recursive);
204
205
  if (data.length === 0) {
205
206
  console.warn("No data to push. Skipping");
@@ -214,7 +215,7 @@ var LaminarDataset = class extends EvaluationDataset {
214
215
  }
215
216
  };
216
217
  // src/opentelemetry-lib/tracing/compat.ts
217
- const logger$31 = initializeLogger();
218
+ const logger$32 = initializeLogger();
218
219
  const makeSpanOtelV2Compatible = (span) => {
219
220
  const spanAny = span;
220
221
  if (spanAny.instrumentationScope && !spanAny.instrumentationLibrary) Object.assign(span, { instrumentationLibrary: spanAny.instrumentationScope });
@@ -260,7 +261,7 @@ const createResource = (attributes) => {
260
261
  if (resources.Resource) return new resources.Resource(attributes);
261
262
  throw new Error("Unable to create Resource: neither v1 nor v2 API found");
262
263
  } catch {
263
- logger$31.debug("Laminar failed to @opentelemetry/resources, continuing without it");
264
+ logger$32.debug("Laminar failed to @opentelemetry/resources, continuing without it");
264
265
  return;
265
266
  }
266
267
  };
@@ -460,7 +461,7 @@ const consumeResponse = async (response) => {
460
461
  };
461
462
  };
462
463
  // src/opentelemetry-lib/tracing/stream-utils.ts
463
- const logger$30 = initializeLogger();
464
+ const logger$31 = initializeLogger();
464
465
  const pendingStreamProcessing = /* @__PURE__ */ new Set();
465
466
  /**
466
467
  * Wait for all pending stream processing to complete with a timeout
@@ -468,7 +469,7 @@ const pendingStreamProcessing = /* @__PURE__ */ new Set();
468
469
  */
469
470
  const waitForPendingStreams = async (timeoutMs = 5e3) => {
470
471
  if (pendingStreamProcessing.size === 0) return;
471
- logger$30.debug(`Waiting for ${pendingStreamProcessing.size} pending stream(s)`);
472
+ logger$31.debug(`Waiting for ${pendingStreamProcessing.size} pending stream(s)`);
472
473
  const initialCount = pendingStreamProcessing.size;
473
474
  const pendingPromises = Array.from(pendingStreamProcessing);
474
475
  let timedOut = false;
@@ -479,7 +480,7 @@ const waitForPendingStreams = async (timeoutMs = 5e3) => {
479
480
  }, timeoutMs);
480
481
  });
481
482
  await Promise.race([Promise.allSettled(pendingPromises), timeoutPromise]);
482
- if (timedOut && pendingStreamProcessing.size > 0) logger$30.warn(`Timeout waiting for ${pendingStreamProcessing.size} pending stream(s) after ${timeoutMs}ms (started with ${initialCount})`);
483
+ if (timedOut && pendingStreamProcessing.size > 0) logger$31.warn(`Timeout waiting for ${pendingStreamProcessing.size} pending stream(s) after ${timeoutMs}ms (started with ${initialCount})`);
483
484
  };
484
485
  /**
485
486
  * Track a background promise and ensure cleanup
@@ -495,34 +496,34 @@ const trackStreamProcessing = (task) => {
495
496
  * while passing through the original result to the caller
496
497
  */
497
498
  const handleStreamResult = (originalResult, streamInfo, span, ignoreOutput, serialize) => {
498
- logger$30.debug(`Handling stream result of type: ${streamInfo.type}`);
499
+ logger$31.debug(`Handling stream result of type: ${streamInfo.type}`);
499
500
  if (streamInfo.type === "aisdk-result") {
500
501
  trackStreamProcessing(async () => {
501
- logger$30.debug("Starting background processing for AI SDK result");
502
+ logger$31.debug("Starting background processing for AI SDK result");
502
503
  let partialOutput = {};
503
504
  try {
504
505
  partialOutput = await consumeAISDKResult(streamInfo.result);
505
506
  if (shouldSendTraces() && !ignoreOutput) try {
506
507
  span.setAttribute(SPAN_OUTPUT, serialize(partialOutput));
507
508
  } catch (error) {
508
- logger$30.warn("Failed to serialize AI SDK stream output: " + errorMessage(error));
509
+ logger$31.warn("Failed to serialize AI SDK stream output: " + errorMessage(error));
509
510
  }
510
511
  } catch (error) {
511
512
  if (Object.keys(partialOutput).length > 0 && shouldSendTraces() && !ignoreOutput) try {
512
513
  span.setAttribute(SPAN_OUTPUT, serialize(partialOutput));
513
514
  } catch (serError) {
514
- logger$30.warn("Failed to serialize partial AI SDK output: " + errorMessage(serError));
515
+ logger$31.warn("Failed to serialize partial AI SDK output: " + errorMessage(serError));
515
516
  }
516
517
  span.recordException(error);
517
518
  } finally {
518
- logger$30.debug("Ending span for AI SDK result");
519
+ logger$31.debug("Ending span for AI SDK result");
519
520
  span.end();
520
521
  }
521
522
  });
522
523
  return originalResult;
523
524
  }
524
525
  if (streamInfo.type === "readable-stream") {
525
- logger$30.debug("Setting up background processing for ReadableStream");
526
+ logger$31.debug("Setting up background processing for ReadableStream");
526
527
  const { stream, dataPromise } = consumeAndTeeReadableStream(streamInfo.stream);
527
528
  trackStreamProcessing(async () => {
528
529
  try {
@@ -534,18 +535,18 @@ const handleStreamResult = (originalResult, streamInfo, span, ignoreOutput, seri
534
535
  };
535
536
  span.setAttribute(SPAN_OUTPUT, serialize(output));
536
537
  } catch (serError) {
537
- logger$30.warn("Failed to serialize stream output: " + errorMessage(serError));
538
+ logger$31.warn("Failed to serialize stream output: " + errorMessage(serError));
538
539
  }
539
540
  if (error) span.recordException(error);
540
541
  } finally {
541
- logger$30.debug("Ending span for ReadableStream");
542
+ logger$31.debug("Ending span for ReadableStream");
542
543
  span.end();
543
544
  }
544
545
  });
545
546
  return stream;
546
547
  }
547
548
  if (streamInfo.type === "async-iterable") {
548
- logger$30.debug("Setting up background processing for AsyncIterable");
549
+ logger$31.debug("Setting up background processing for AsyncIterable");
549
550
  const { iterable, dataPromise } = consumeAndTeeAsyncIterable(streamInfo.iterable);
550
551
  trackStreamProcessing(async () => {
551
552
  try {
@@ -557,18 +558,18 @@ const handleStreamResult = (originalResult, streamInfo, span, ignoreOutput, seri
557
558
  };
558
559
  span.setAttribute(SPAN_OUTPUT, serialize(output));
559
560
  } catch (serError) {
560
- logger$30.warn("Failed to serialize async iterable output: " + errorMessage(serError));
561
+ logger$31.warn("Failed to serialize async iterable output: " + errorMessage(serError));
561
562
  }
562
563
  if (error) span.recordException(error);
563
564
  } finally {
564
- logger$30.debug("Ending span for AsyncIterable");
565
+ logger$31.debug("Ending span for AsyncIterable");
565
566
  span.end();
566
567
  }
567
568
  });
568
569
  return iterable;
569
570
  }
570
571
  if (streamInfo.type === "response") {
571
- logger$30.debug("Setting up background processing for Response");
572
+ logger$31.debug("Setting up background processing for Response");
572
573
  const originalResponse = streamInfo.response;
573
574
  if (!originalResponse.body) {
574
575
  span.end();
@@ -591,19 +592,19 @@ const handleStreamResult = (originalResult, streamInfo, span, ignoreOutput, seri
591
592
  };
592
593
  span.setAttribute(SPAN_OUTPUT, serialize(output));
593
594
  } catch (serError) {
594
- logger$30.warn("Failed to serialize response output: " + errorMessage(serError));
595
+ logger$31.warn("Failed to serialize response output: " + errorMessage(serError));
595
596
  }
596
597
  if (error) span.recordException(error);
597
598
  } catch (err) {
598
599
  span.recordException(err);
599
600
  } finally {
600
- logger$30.debug("Ending span for Response");
601
+ logger$31.debug("Ending span for Response");
601
602
  span.end();
602
603
  }
603
604
  });
604
605
  return newResponse;
605
606
  }
606
- logger$30.warn("Stream type not handled, ending span immediately");
607
+ logger$31.warn("Stream type not handled, ending span immediately");
607
608
  span.end();
608
609
  return originalResult;
609
610
  };
@@ -679,7 +680,7 @@ const writeDebugSessionFile = (file, dir = process.cwd()) => {
679
680
  * contract. This file is part of the cross-language parity surface — keep its
680
681
  * logic line-comparable with the Python `config.py`.
681
682
  */
682
- const logger$29 = initializeLogger();
683
+ const logger$30 = initializeLogger();
683
684
  const TRUTHY = /* @__PURE__ */ new Set([
684
685
  "true",
685
686
  "1",
@@ -715,7 +716,7 @@ const parseCacheUntil = (value) => {
715
716
  if (value === void 0 || value === "") return null;
716
717
  const spanId = normalizeSpanId(value);
717
718
  if (spanId !== null) return spanId;
718
- logger$29.warn(`LMNR_DEBUG_CACHE_UNTIL=${JSON.stringify(value)} is not a span id; ignoring`);
719
+ logger$30.warn(`LMNR_DEBUG_CACHE_UNTIL=${JSON.stringify(value)} is not a span id; ignoring`);
719
720
  return null;
720
721
  };
721
722
  /**
@@ -1295,7 +1296,7 @@ var LaminarInstrumentation = class extends InstrumentationBase {
1295
1296
  * recording errors without breaking the user's call, and tracing SDK calls
1296
1297
  * and streams while keeping the objects the SDK returns.
1297
1298
  */
1298
- const logger$28 = initializeLogger();
1299
+ const logger$29 = initializeLogger();
1299
1300
  /**
1300
1301
  * Set an attribute unless the value is `null`, `undefined`, an empty string
1301
1302
  * or an empty array.
@@ -1349,7 +1350,7 @@ const safely = (fn) => {
1349
1350
  try {
1350
1351
  return fn();
1351
1352
  } catch (error) {
1352
- logger$28.debug(`Instrumentation code failed: ${errorMessage(error)}`);
1353
+ logger$29.debug(`Instrumentation code failed: ${errorMessage(error)}`);
1353
1354
  return;
1354
1355
  }
1355
1356
  };
@@ -1425,7 +1426,7 @@ const traceCall = (span, call, onSuccess) => {
1425
1426
  try {
1426
1427
  return onSuccess(data);
1427
1428
  } catch (error) {
1428
- logger$28.debug(`Instrumentation code failed: ${errorMessage(error)}`);
1429
+ logger$29.debug(`Instrumentation code failed: ${errorMessage(error)}`);
1429
1430
  span.end();
1430
1431
  return data;
1431
1432
  }
@@ -1489,7 +1490,7 @@ const instrumentStream = (stream, { onEvent, onDone }) => {
1489
1490
  stream[Symbol.asyncIterator] = wrap(stream[Symbol.asyncIterator].bind(stream));
1490
1491
  };
1491
1492
  // src/opentelemetry-lib/tracing/span.ts
1492
- const logger$27 = initializeLogger();
1493
+ const logger$28 = initializeLogger();
1493
1494
  /**
1494
1495
  * Build the debug block to propagate, or undefined when debug mode is off.
1495
1496
  *
@@ -1640,7 +1641,7 @@ var LaminarSpan = class LaminarSpan {
1640
1641
  } catch {}
1641
1642
  metadata[key.replace(`${ASSOCIATION_PROPERTIES}.metadata.`, "")] = value;
1642
1643
  }
1643
- } else logger$27.warn("Attributes object is not available. Most likely the span is not a LaminarSpan and not an OpenTelemetry default SDK Span. Span path and ids path will be empty.");
1644
+ } else logger$28.warn("Attributes object is not available. Most likely the span is not a LaminarSpan and not an OpenTelemetry default SDK Span. Span path and ids path will be empty.");
1644
1645
  return {
1645
1646
  spanId: otelSpanIdToUUID(this._span.spanContext().spanId),
1646
1647
  traceId: otelTraceIdToUUID(this._span.spanContext().traceId),
@@ -1667,14 +1668,14 @@ var LaminarSpan = class LaminarSpan {
1667
1668
  }
1668
1669
  get tags() {
1669
1670
  if (!this._span.attributes) {
1670
- logger$27.warn("[LaminarSpan.tags] WARNING. Current span does not have attributes object. Possibly, the span was created with a custom OTel SDK. Returning an empty list. Help: OpenTelemetry API does not guarantee reading attributes from a span, but OTel SDK allows it by default. Laminar SDK allows to read attributes too.");
1671
+ logger$28.warn("[LaminarSpan.tags] WARNING. Current span does not have attributes object. Possibly, the span was created with a custom OTel SDK. Returning an empty list. Help: OpenTelemetry API does not guarantee reading attributes from a span, but OTel SDK allows it by default. Laminar SDK allows to read attributes too.");
1671
1672
  return [];
1672
1673
  }
1673
1674
  return this._span.attributes[`lmnr.association.properties.tags`] ?? [];
1674
1675
  }
1675
1676
  get laminarAssociationProperties() {
1676
1677
  if (!this._span.attributes) {
1677
- logger$27.warn("[LaminarSpan.laminarAssociationProperties] WARNING. Current span does not have attributes object. Possibly, the span was created with a custom OTel SDK. Returning an empty object. Help: OpenTelemetry API does not guarantee reading attributes from a span, but OTel SDK allows it by default. Laminar SDK allows to read attributes too.");
1678
+ logger$28.warn("[LaminarSpan.laminarAssociationProperties] WARNING. Current span does not have attributes object. Possibly, the span was created with a custom OTel SDK. Returning an empty object. Help: OpenTelemetry API does not guarantee reading attributes from a span, but OTel SDK allows it by default. Laminar SDK allows to read attributes too.");
1678
1679
  return {};
1679
1680
  }
1680
1681
  try {
@@ -1868,7 +1869,7 @@ var LaminarContextManager = class {
1868
1869
  }
1869
1870
  };
1870
1871
  // src/opentelemetry-lib/instrumentation/claude-agent-sdk/proxy.ts
1871
- const logger$26 = initializeLogger();
1872
+ const logger$27 = initializeLogger();
1872
1873
  const DEFAULT_ANTHROPIC_BASE_URL = "https://api.anthropic.com";
1873
1874
  const DEFAULT_CC_PROXY_PORT = 45667;
1874
1875
  const CC_PROXY_PORT_ATTEMPTS = 50;
@@ -2122,7 +2123,7 @@ const resolveTargetUrlFromEnv = (envDict, fallback = DEFAULT_ANTHROPIC_BASE_URL,
2122
2123
  if (foundryBaseUrl) return foundryBaseUrl.replace(/\/$/, "");
2123
2124
  const foundryResource = getEnvValue(FOUNDRY_RESOURCE_ENV);
2124
2125
  if (foundryResource) return `https://${foundryResource}.services.ai.azure.com/anthropic`;
2125
- logger$26.error(`${FOUNDRY_USE_ENV} is set but neither ${FOUNDRY_BASE_URL_ENV} nor ${FOUNDRY_RESOURCE_ENV} is configured. Microsoft Foundry requires one of these values.`);
2126
+ logger$27.error(`${FOUNDRY_USE_ENV} is set but neither ${FOUNDRY_BASE_URL_ENV} nor ${FOUNDRY_RESOURCE_ENV} is configured. Microsoft Foundry requires one of these values.`);
2126
2127
  return null;
2127
2128
  }
2128
2129
  if (isTruthyEnv(getEnvValue(BEDROCK_USE_ENV))) {
@@ -2134,7 +2135,7 @@ const resolveTargetUrlFromEnv = (envDict, fallback = DEFAULT_ANTHROPIC_BASE_URL,
2134
2135
  region = getRegionFromAwsConfig(awsProfile) ?? void 0;
2135
2136
  }
2136
2137
  if (region) return `https://bedrock-runtime.${region}.amazonaws.com`;
2137
- logger$26.error(`${BEDROCK_USE_ENV} is set but could not determine AWS region. Set ${BEDROCK_AWS_REGION_ENV} or configure a region in ~/.aws/config for the active profile.`);
2138
+ logger$27.error(`${BEDROCK_USE_ENV} is set but could not determine AWS region. Set ${BEDROCK_AWS_REGION_ENV} or configure a region in ~/.aws/config for the active profile.`);
2138
2139
  return null;
2139
2140
  }
2140
2141
  if (isTruthyEnv(getEnvValue(VERTEX_USE_ENV))) {
@@ -2217,11 +2218,11 @@ const waitForPort = (port, timeoutMs = 5e3) => new Promise((resolve) => {
2217
2218
  const registerGlobalProxyShutdown = () => {
2218
2219
  if (!globalShutdownRegistered) {
2219
2220
  process.on("exit", () => {
2220
- logger$26.debug("process.on(\"exit\") called - stopping all active proxies");
2221
+ logger$27.debug("process.on(\"exit\") called - stopping all active proxies");
2221
2222
  for (const proxyServer of activeProxyServers) try {
2222
2223
  proxyServer.stopServer();
2223
2224
  } catch (e) {
2224
- logger$26.debug(`Failed to stop proxy: ${errorMessage(e)}`);
2225
+ logger$27.debug(`Failed to stop proxy: ${errorMessage(e)}`);
2225
2226
  }
2226
2227
  activeProxyServers.clear();
2227
2228
  });
@@ -2236,28 +2237,28 @@ const createProxyInstance = async ({ env, cwd, settingSources, settings, targetU
2236
2237
  try {
2237
2238
  const port = await findAvailablePort(DEFAULT_CC_PROXY_PORT, CC_PROXY_PORT_ATTEMPTS);
2238
2239
  if (port === null) {
2239
- logger$26.warn("Unable to allocate port for cc-proxy.");
2240
+ logger$27.warn("Unable to allocate port for cc-proxy.");
2240
2241
  return null;
2241
2242
  }
2242
2243
  const targetUrl = resolvedTargetUrl ?? resolveTargetUrlFromEnv(env, void 0, cwd, settingSources, settings);
2243
2244
  if (!targetUrl) {
2244
- logger$26.warn("Unable to resolve target URL for cc-proxy (provider misconfigured).");
2245
+ logger$27.warn("Unable to resolve target URL for cc-proxy (provider misconfigured).");
2245
2246
  return null;
2246
2247
  }
2247
- logger$26.debug(`Creating proxy instance on port ${port} targeting: ${targetUrl}`);
2248
+ logger$27.debug(`Creating proxy instance on port ${port} targeting: ${targetUrl}`);
2248
2249
  try {
2249
2250
  const { ProxyServer } = __require("@lmnr-ai/claude-code-proxy");
2250
2251
  const proxyServer = new ProxyServer(port);
2251
2252
  proxyServer.runServer(targetUrl);
2252
2253
  if (!await waitForPort(port)) {
2253
- logger$26.warn(`cc-proxy failed to start on port ${port}`);
2254
+ logger$27.warn(`cc-proxy failed to start on port ${port}`);
2254
2255
  proxyServer.stopServer();
2255
2256
  return null;
2256
2257
  }
2257
2258
  const proxyBaseUrl = `http://127.0.0.1:${port}`;
2258
2259
  activeProxyServers.add(proxyServer);
2259
2260
  registerGlobalProxyShutdown();
2260
- logger$26.info(`Started claude proxy server on: ${proxyBaseUrl}`);
2261
+ logger$27.info(`Started claude proxy server on: ${proxyBaseUrl}`);
2261
2262
  return {
2262
2263
  server: proxyServer,
2263
2264
  baseUrl: proxyBaseUrl,
@@ -2265,11 +2266,11 @@ const createProxyInstance = async ({ env, cwd, settingSources, settings, targetU
2265
2266
  targetUrl
2266
2267
  };
2267
2268
  } catch (e) {
2268
- logger$26.warn(`Unable to start cc-proxy: ${errorMessage(e)}`);
2269
+ logger$27.warn(`Unable to start cc-proxy: ${errorMessage(e)}`);
2269
2270
  return null;
2270
2271
  }
2271
2272
  } catch (e) {
2272
- logger$26.warn(`Failed to create proxy instance: ${errorMessage(e)}`);
2273
+ logger$27.warn(`Failed to create proxy instance: ${errorMessage(e)}`);
2273
2274
  return null;
2274
2275
  }
2275
2276
  };
@@ -2279,11 +2280,11 @@ const createProxyInstance = async ({ env, cwd, settingSources, settings, targetU
2279
2280
  const stopProxyInstance = (instance) => {
2280
2281
  if (!instance) return;
2281
2282
  try {
2282
- logger$26.debug(`Stopping proxy instance on port ${instance.port}`);
2283
+ logger$27.debug(`Stopping proxy instance on port ${instance.port}`);
2283
2284
  instance.server.stopServer();
2284
2285
  activeProxyServers.delete(instance.server);
2285
2286
  } catch (e) {
2286
- logger$26.debug(`Failed to stop proxy instance: ${errorMessage(e)}`);
2287
+ logger$27.debug(`Failed to stop proxy instance: ${errorMessage(e)}`);
2287
2288
  }
2288
2289
  };
2289
2290
  /**
@@ -2291,11 +2292,11 @@ const stopProxyInstance = (instance) => {
2291
2292
  * Used during shutdown to ensure cleanup
2292
2293
  */
2293
2294
  const forceReleaseProxy = () => {
2294
- logger$26.debug(`Force stopping all ${activeProxyServers.size} active proxy servers`);
2295
+ logger$27.debug(`Force stopping all ${activeProxyServers.size} active proxy servers`);
2295
2296
  for (const proxyServer of activeProxyServers) try {
2296
2297
  proxyServer.stopServer();
2297
2298
  } catch (e) {
2298
- logger$26.debug(`Failed to stop proxy: ${errorMessage(e)}`);
2299
+ logger$27.debug(`Failed to stop proxy: ${errorMessage(e)}`);
2299
2300
  }
2300
2301
  activeProxyServers.clear();
2301
2302
  };
@@ -2345,13 +2346,13 @@ const setTraceToProxyInstance = async (instance) => {
2345
2346
  spanPath: payload.span_path,
2346
2347
  laminarUrl: payload.laminar_url
2347
2348
  });
2348
- logger$26.debug(`Set trace context to proxy on port ${instance.port}`);
2349
+ logger$27.debug(`Set trace context to proxy on port ${instance.port}`);
2349
2350
  } catch (e) {
2350
- logger$26.debug(`Unable to set trace context to proxy on port ${instance.port}: ` + errorMessage(e));
2351
+ logger$27.debug(`Unable to set trace context to proxy on port ${instance.port}: ` + errorMessage(e));
2351
2352
  }
2352
2353
  };
2353
2354
  // src/opentelemetry-lib/instrumentation/claude-agent-sdk/index.ts
2354
- const logger$25 = initializeLogger();
2355
+ const logger$26 = initializeLogger();
2355
2356
  const CLAUDE_AGENT_SDK = "@anthropic-ai/claude-agent-sdk";
2356
2357
  /**
2357
2358
  * Create an instrumented version of the claude-agent-sdk query function.
@@ -2389,9 +2390,9 @@ function instrumentClaudeAgentQuery(originalQuery) {
2389
2390
  targetUrl
2390
2391
  });
2391
2392
  if (proxyInstance && targetUrl) {
2392
- logger$25.debug(`Using proxy on port ${proxyInstance.port}`);
2393
+ logger$26.debug(`Using proxy on port ${proxyInstance.port}`);
2393
2394
  await Laminar.withSpan(span, async () => {
2394
- logger$25.debug("Setting trace to proxy instance...");
2395
+ logger$26.debug("Setting trace to proxy instance...");
2395
2396
  await setTraceToProxyInstance(proxyInstance);
2396
2397
  });
2397
2398
  const varsToRemove = getEnvVarsToRemove(mergedEnv, sessionCwd, settingSources);
@@ -2406,13 +2407,13 @@ function instrumentClaudeAgentQuery(originalQuery) {
2406
2407
  if (isProviderEnabledInEnv(subprocessEnv, "CLAUDE_CODE_USE_BEDROCK")) subprocessEnv.ANTHROPIC_BEDROCK_BASE_URL = proxyInstance.baseUrl;
2407
2408
  if (isProviderEnabledInEnv(subprocessEnv, "CLAUDE_CODE_USE_VERTEX")) subprocessEnv.ANTHROPIC_VERTEX_BASE_URL = proxyInstance.baseUrl;
2408
2409
  const flagSettings = buildProxyFlagSettings(callerSettings, proxyInstance.baseUrl, sessionCwd, settingSources);
2409
- if (flagSettings === null) logger$25.warn(`Could not read options.settings ${JSON.stringify(callerSettings)}; Claude Code settings that define a base URL will bypass the Laminar proxy and produce no LLM spans.`);
2410
+ if (flagSettings === null) logger$26.warn(`Could not read options.settings ${JSON.stringify(callerSettings)}; Claude Code settings that define a base URL will bypass the Laminar proxy and produce no LLM spans.`);
2410
2411
  else {
2411
2412
  params.options.settings = flagSettings;
2412
2413
  const conflicting = Object.entries(readClaudeSettingsEnv(sessionCwd, settingSources)).filter(([key, value]) => PROXY_BASE_URL_ENV_KEYS.includes(key) && value !== "" && value !== proxyInstance?.baseUrl).map(([key]) => key);
2413
- if (conflicting.length > 0) logger$25.info(`Claude Code settings define ${conflicting.sort().join(", ")}, which outranks the subprocess environment. Injected settings so the Laminar proxy at ${proxyInstance.baseUrl} still intercepts API traffic; your settings files were not modified.`);
2414
+ if (conflicting.length > 0) logger$26.info(`Claude Code settings define ${conflicting.sort().join(", ")}, which outranks the subprocess environment. Injected settings so the Laminar proxy at ${proxyInstance.baseUrl} still intercepts API traffic; your settings files were not modified.`);
2414
2415
  }
2415
- } else logger$25.debug("No claude proxy server available. Proceeding without proxy.");
2416
+ } else logger$26.debug("No claude proxy server available. Proceeding without proxy.");
2416
2417
  const originalGenerator = originalQuery(params);
2417
2418
  for await (const message of originalGenerator) {
2418
2419
  collected.push(message);
@@ -2458,7 +2459,7 @@ var ClaudeAgentSDKInstrumentation = class extends LaminarInstrumentation {
2458
2459
  const LLM_CALL_KEY = createContextKey("lmnr.langchain.llm_call");
2459
2460
  // src/laminar.ts
2460
2461
  loadEnv();
2461
- const logger$24 = initializeLogger();
2462
+ const logger$25 = initializeLogger();
2462
2463
  var Laminar = class Laminar {
2463
2464
  static {
2464
2465
  this.isInitialized = false;
@@ -2568,14 +2569,14 @@ var Laminar = class Laminar {
2568
2569
  */
2569
2570
  static initialize({ projectApiKey, baseUrl, baseHttpUrl, httpPort, grpcPort, instrumentModules, disableBatch, traceExportTimeoutMillis, logLevel, maxExportBatchSize, maxExportBatchSizeBytes, flushBySize, forceHttp, sessionRecordingOptions, metadata, inheritGlobalContext, spanProcessor, release, writeTrajectory = true } = {}) {
2570
2571
  if (this.isInitialized) {
2571
- logger$24.warn("Laminar has already been initialized. Skipping initialization.");
2572
+ logger$25.warn("Laminar has already been initialized. Skipping initialization.");
2572
2573
  return;
2573
2574
  }
2574
2575
  const key = projectApiKey ?? process?.env?.LMNR_PROJECT_API_KEY;
2575
2576
  const trajectoryPath = writeTrajectory ? process?.env?.LMNR_TRAJECTORY_PATH || void 0 : void 0;
2576
2577
  const exportSpans = trajectoryPath === void 0 || isTruthy(process?.env?.LMNR_TRAJECTORY_FORCE_EXPORT);
2577
2578
  if (exportSpans) validateTracingConfig(key);
2578
- if (trajectoryPath !== void 0) logger$24.info(`Writing the trajectory to ${trajectoryPath}` + (exportSpans ? "; spans are also exported to Laminar." : "; spans are not exported to Laminar (set LMNR_TRAJECTORY_FORCE_EXPORT=true to export them too)."));
2579
+ if (trajectoryPath !== void 0) logger$25.info(`Writing the trajectory to ${trajectoryPath}` + (exportSpans ? "; spans are also exported to Laminar." : "; spans are not exported to Laminar (set LMNR_TRAJECTORY_FORCE_EXPORT=true to export them too)."));
2579
2580
  this.projectApiKey = key ?? "";
2580
2581
  let url = baseUrl ?? process?.env?.LMNR_BASE_URL;
2581
2582
  if (key && !url) url = "https://api.lmnr.ai";
@@ -2595,7 +2596,7 @@ var Laminar = class Laminar {
2595
2596
  ...metadata ?? {}
2596
2597
  };
2597
2598
  if (inheritGlobalContext) LaminarContextManager.inheritGlobalContext = true;
2598
- if (spanProcessor && !(spanProcessor instanceof LaminarSpanProcessor)) logger$24.warn("Span processor is not a LaminarSpanProcessor. Some functionality may be impaired.");
2599
+ if (spanProcessor && !(spanProcessor instanceof LaminarSpanProcessor)) logger$25.warn("Span processor is not a LaminarSpanProcessor. Some functionality may be impaired.");
2599
2600
  this.isInitialized = true;
2600
2601
  const urlWithoutSlash = url?.replace(/\/$/, "").replace(/:\d{1,5}$/g, "");
2601
2602
  const httpUrlWithoutSlash = httpUrl?.replace(/\/$/, "").replace(/:\d{1,5}$/g, "");
@@ -2645,11 +2646,11 @@ var Laminar = class Laminar {
2645
2646
  try {
2646
2647
  getRuntime()?.recordTraceId(otelTraceIdToUUID(otelSpanContext.traceId));
2647
2648
  } catch (e) {
2648
- logger$24.debug("Failed to record debug trace id from env: " + errorMessage(e));
2649
+ logger$25.debug("Failed to record debug trace id from env: " + errorMessage(e));
2649
2650
  }
2650
- logger$24.debug("Initialized Laminar parent context from LMNR_SPAN_CONTEXT.");
2651
+ logger$25.debug("Initialized Laminar parent context from LMNR_SPAN_CONTEXT.");
2651
2652
  } catch (e) {
2652
- logger$24.warn("LMNR_SPAN_CONTEXT is set but could not be used: " + errorMessage(e));
2653
+ logger$25.warn("LMNR_SPAN_CONTEXT is set but could not be used: " + errorMessage(e));
2653
2654
  }
2654
2655
  }
2655
2656
  /**
@@ -2693,7 +2694,7 @@ var Laminar = class Laminar {
2693
2694
  if (projectId) {
2694
2695
  runtime.recordProjectId(projectId);
2695
2696
  const sessionUrl = runtime.debuggerSessionUrl();
2696
- logger$24.info(`Laminar debugger session: ${sessionUrl}`);
2697
+ logger$25.info(`Laminar debugger session: ${sessionUrl}`);
2697
2698
  if (runtime.shouldOpenBrowser) {
2698
2699
  const opener = process.platform === "win32" ? "start" : process.platform === "darwin" ? "open" : "xdg-open";
2699
2700
  spawn(opener, [sessionUrl], {
@@ -2703,7 +2704,7 @@ var Laminar = class Laminar {
2703
2704
  }
2704
2705
  }
2705
2706
  }).catch((e) => {
2706
- logger$24.warn("Failed to register debug session: " + errorMessage(e));
2707
+ logger$25.warn("Failed to register debug session: " + errorMessage(e));
2707
2708
  });
2708
2709
  this.globalMetadata = {
2709
2710
  ...this.globalMetadata,
@@ -2713,7 +2714,7 @@ var Laminar = class Laminar {
2713
2714
  this.debugExitHook = () => runtime.emitPointer();
2714
2715
  process.once("exit", this.debugExitHook);
2715
2716
  } catch (e) {
2716
- logger$24.warn("Failed to initialize debug runtime: " + errorMessage(e));
2717
+ logger$25.warn("Failed to initialize debug runtime: " + errorMessage(e));
2717
2718
  }
2718
2719
  }
2719
2720
  /**
@@ -2760,7 +2761,7 @@ var Laminar = class Laminar {
2760
2761
  runtime.rolloutSessions.register({ sessionId: runtime.sessionId }).then((projectId) => {
2761
2762
  if (projectId) runtime.recordProjectId(projectId);
2762
2763
  }).catch((e) => {
2763
- logger$24.debug("Failed to register downstream debug session: " + errorMessage(e));
2764
+ logger$25.debug("Failed to register downstream debug session: " + errorMessage(e));
2764
2765
  });
2765
2766
  this.globalMetadata = {
2766
2767
  ...this.globalMetadata,
@@ -2769,7 +2770,7 @@ var Laminar = class Laminar {
2769
2770
  LaminarContextManager.setGlobalMetadata(this.globalMetadata);
2770
2771
  }
2771
2772
  } catch (e) {
2772
- logger$24.debug("Failed to arm debug runtime from context: " + errorMessage(e));
2773
+ logger$25.debug("Failed to arm debug runtime from context: " + errorMessage(e));
2773
2774
  }
2774
2775
  }
2775
2776
  /**
@@ -2784,7 +2785,7 @@ var Laminar = class Laminar {
2784
2785
  */
2785
2786
  static patch(modules) {
2786
2787
  if (!this.isInitialized) {
2787
- logger$24.warn("Laminar must be initialized before patching modules. Skipping patch.");
2788
+ logger$25.warn("Laminar must be initialized before patching modules. Skipping patch.");
2788
2789
  return;
2789
2790
  }
2790
2791
  if (!modules || Object.keys(modules).length === 0) throw new Error("Pass at least one module to patch");
@@ -3044,7 +3045,7 @@ var Laminar = class Laminar {
3044
3045
  const spanContext = tryToOtelSpanContext(laminarContext);
3045
3046
  entityContext = trace.setSpan(entityContext, trace.wrapSpanContext(spanContext));
3046
3047
  } catch (e) {
3047
- logger$24.warn("Failed to parse parent span context: " + errorMessage(e));
3048
+ logger$25.warn("Failed to parse parent span context: " + errorMessage(e));
3048
3049
  }
3049
3050
  const tagProperties = tags ? { [`${ASSOCIATION_PROPERTIES}.tags`]: Array.from(new Set(tags)) } : {};
3050
3051
  const ctxAssociationProperties = LaminarContextManager.getAssociationProperties();
@@ -3152,13 +3153,13 @@ var Laminar = class Laminar {
3152
3153
  }
3153
3154
  static async flush() {
3154
3155
  if (this.isInitialized) {
3155
- logger$24.debug("Flushing spans");
3156
+ logger$25.debug("Flushing spans");
3156
3157
  await forceFlush();
3157
3158
  }
3158
3159
  }
3159
3160
  static async shutdown() {
3160
3161
  if (this.isInitialized) {
3161
- logger$24.debug("Shutting down Laminar");
3162
+ logger$25.debug("Shutting down Laminar");
3162
3163
  getRuntime()?.emitPointer();
3163
3164
  await forceFlush();
3164
3165
  shutdownTrajectory();
@@ -3294,7 +3295,7 @@ return module.exports;
3294
3295
  const LMNR_SEND_EVENTS_FUNCTION_NAME = "lmnrSendEvents";
3295
3296
  /** Instrumentation scope of the spans the Stagehand instrumentations produce. */
3296
3297
  const STAGEHAND_PACKAGE = "@browserbasehq/stagehand";
3297
- const logger$23 = initializeLogger();
3298
+ const logger$24 = initializeLogger();
3298
3299
  /**
3299
3300
  * If the first argument is a string, return an object with the name of the method
3300
3301
  * and the argument as the value.
@@ -3317,7 +3318,7 @@ const takeFullSnapshot = async (page) => await page.evaluate(() => {
3317
3318
  window.lmnrRrweb.record.takeFullSnapshot();
3318
3319
  return true;
3319
3320
  } catch (error) {
3320
- logger$23.error("Error taking full snapshot: " + errorMessage(error));
3321
+ logger$24.error("Error taking full snapshot: " + errorMessage(error));
3321
3322
  return false;
3322
3323
  }
3323
3324
  return false;
@@ -3328,7 +3329,7 @@ const injectSessionRecorder = async (page, sessionRecordingOptions) => {
3328
3329
  try {
3329
3330
  return await script();
3330
3331
  } catch (error) {
3331
- logger$23.error("Operation " + script.name + " failed: " + errorMessage(error));
3332
+ logger$24.error("Operation " + script.name + " failed: " + errorMessage(error));
3332
3333
  }
3333
3334
  await new Promise((resolve) => setTimeout(resolve, 500));
3334
3335
  }
@@ -3338,69 +3339,74 @@ const injectSessionRecorder = async (page, sessionRecordingOptions) => {
3338
3339
  try {
3339
3340
  isRrwebPresent = await castedPage.evaluate(() => typeof window.lmnrRrweb !== "undefined");
3340
3341
  } catch (error) {
3341
- logger$23.debug("Failed to check if session recorder is loaded: " + errorMessage(error));
3342
+ logger$24.debug("Failed to check if session recorder is loaded: " + errorMessage(error));
3342
3343
  }
3343
3344
  if (!isRrwebPresent) {
3344
3345
  if (!await tryRunScript(async function injectSessionRecorder() {
3345
3346
  await castedPage.evaluate("(function (g, f) {\n if (\"object\" == typeof exports && \"object\" == typeof module) {\n module.exports = f();\n } else if (\"function\" == typeof define && define.amd) {\n define(\"lmnrRrweb\", [], f);\n } else if (\"object\" == typeof exports) {\n exports[\"lmnrRrweb\"] = f();\n } else {\n g[\"lmnrRrweb\"] = f();\n }\n }(this, () => {\nvar exports = {};\nvar module = { exports };\n\"use strict\";var Fo=Object.defineProperty,Uo=Object.defineProperties;var Bo=Object.getOwnPropertyDescriptors;var ft=Object.getOwnPropertySymbols;var zs=Object.prototype.hasOwnProperty,Ws=Object.prototype.propertyIsEnumerable;var Bs=(s,e,t)=>e in s?Fo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,x=(s,e)=>{for(var t in e||(e={}))zs.call(e,t)&&Bs(s,t,e[t]);if(ft)for(var t of ft(e))Ws.call(e,t)&&Bs(s,t,e[t]);return s},ee=(s,e)=>Uo(s,Bo(e));var xe=(s,e)=>{var t={};for(var r in s)zs.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&ft)for(var r of ft(s))e.indexOf(r)<0&&Ws.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:\"Module\"});var zo=Object.defineProperty,Wo=(s,e,t)=>e in s?zo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>Wo(s,typeof e!=\"symbol\"?e+\"\":e,t),Gs,Go=Object.defineProperty,Vo=(s,e,t)=>e in s?Go(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Vs=(s,e,t)=>Vo(s,typeof e!=\"symbol\"?e+\"\":e,t),j=(s=>(s[s.Document=0]=\"Document\",s[s.DocumentType=1]=\"DocumentType\",s[s.Element=2]=\"Element\",s[s.Text=3]=\"Text\",s[s.CDATA=4]=\"CDATA\",s[s.Comment=5]=\"Comment\",s))(j||{});const js={Node:[\"childNodes\",\"parentNode\",\"parentElement\",\"textContent\"],ShadowRoot:[\"host\",\"styleSheets\"],Element:[\"shadowRoot\",\"querySelector\",\"querySelectorAll\"],MutationObserver:[]},Hs={Node:[\"contains\",\"getRootNode\"],ShadowRoot:[\"getSelection\"],Element:[],MutationObserver:[\"constructor\"]},pt={},jo=()=>!!globalThis.Zone;function cs(s){if(pt[s])return pt[s];const e=globalThis[s],t=e.prototype,r=s in js?js[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes(\"[native code]\"))})),n=s in Hs?Hs[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]==\"function\"&&((a=t[l])==null?void 0:a.toString().includes(\"[native code]\"))}));if(i&&o&&!jo())return pt[s]=e.prototype,e.prototype;try{const l=document.createElement(\"iframe\");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?pt[s]=u:t}catch(l){return t}}const mr={};function me(s,e,t){var r;const i=`${s}.${String(t)}`;if(mr[i])return mr[i].call(e);const n=cs(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(mr[i]=o,o.call(e)):e[t]}const gr={};function Wi(s,e,t){const r=`${s}.${String(t)}`;if(gr[r])return gr[r].bind(e);const n=cs(s)[t];return typeof n!=\"function\"?e[t]:(gr[r]=n,n.bind(e))}function Ho(s){return me(\"Node\",s,\"childNodes\")}function Yo(s){return me(\"Node\",s,\"parentNode\")}function Zo(s){return me(\"Node\",s,\"parentElement\")}function Jo(s){return me(\"Node\",s,\"textContent\")}function Xo(s,e){return Wi(\"Node\",s,\"contains\")(e)}function Ko(s){return Wi(\"Node\",s,\"getRootNode\")()}function Qo(s){return!s||!(\"host\"in s)?null:me(\"ShadowRoot\",s,\"host\")}function qo(s){return s.styleSheets}function ea(s){return!s||!(\"shadowRoot\"in s)?null:me(\"Element\",s,\"shadowRoot\")}function ta(s,e){return me(\"Element\",s,\"querySelector\")(e)}function ra(s,e){return me(\"Element\",s,\"querySelectorAll\")(e)}function sa(){return cs(\"MutationObserver\").constructor}const Z={childNodes:Ho,parentNode:Yo,parentElement:Zo,textContent:Jo,contains:Xo,getRootNode:Ko,host:Qo,styleSheets:qo,shadowRoot:ea,querySelector:ta,querySelectorAll:ra,mutationObserver:sa};function Gi(s){return s.nodeType===s.ELEMENT_NODE}function je(s){const e=s&&\"host\"in s&&\"mode\"in s&&Z.host(s)||null;return!!(e&&\"shadowRoot\"in e&&Z.shadowRoot(e)===s)}function He(s){return Object.prototype.toString.call(s)===\"[object ShadowRoot]\"}function ia(s){return s.includes(\" background-clip: text;\")&&!s.includes(\" -webkit-background-clip: text;\")&&(s=s.replace(/\\sbackground-clip:\\s*text;/g,\" -webkit-background-clip: text; background-clip: text;\")),s}function na(s){const{cssText:e}=s;if(e.split('\"').length<3)return e;const t=[\"@import\",`url(${JSON.stringify(s.href)})`];return s.layerName===\"\"?t.push(\"layer\"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(\" \")+\";\"}function $r(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Vi(i,t)).join(\"\");return ia(r)}catch(e){return null}}function Vi(s,e){if(aa(s)){let t;try{t=$r(s.styleSheet)||na(s)}catch(r){t=s.cssText}return s.styleSheet.href?Wt(t,s.styleSheet.href):t}else{let t=s.cssText;return la(s)&&s.selectorText.includes(\":\")&&(t=oa(t)),e?Wt(t,e):t}}function oa(s){const e=/(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;return s.replace(e,\"$1\\\\$2\")}function aa(s){return\"styleSheet\"in s}function la(s){return\"selectorText\"in s}class ji{constructor(){Vs(this,\"idNodeMap\",new Map),Vs(this,\"nodeMetaMap\",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-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(r=>this.removeNodeFromMap(r))}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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ua(){return new ji}function hs({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||\"\";const l=r&&Ce(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o=\"*\".repeat(o.length)),o}function Ce(s){return s.toLowerCase()}const Ys=\"__rrweb_original__\";function ca(s){const e=s.getContext(\"2d\");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=Ys in n?n[Ys]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function fs(s){const e=s.type;return s.hasAttribute(\"data-rr-is-password\")?\"password\":e?Ce(e):null}function Hi(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function ha(s){let e=\"\";return s.indexOf(\"//\")>-1?e=s.split(\"/\").slice(0,3).join(\"/\"):e=s.split(\"/\")[0],e=e.split(\"?\")[0],e}const fa=/url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm,pa=/^(?:[a-z+]+:)?\\/\\//i,da=/^www\\..*/i,ma=/^(data:)([^,]*),(.*)/i;function Wt(s,e){return(s||\"\").replace(fa,(t,r,i,n,o,l)=>{const a=i||o||l,u=r||n||\"\";if(!a)return t;if(pa.test(a)||da.test(a))return`url(${u}${a}${u})`;if(ma.test(a))return`url(${u}${a}${u})`;if(a[0]===\"/\")return`url(${u}${ha(e)+a}${u})`;const c=e.split(\"/\"),h=a.split(\"/\");c.pop();for(const d of h)d!==\".\"&&(d===\"..\"?c.pop():c.push(d));return`url(${u}${c.join(\"/\")}${u})`})}function yr(s){return s.replace(/(\\/\\*[^*]*\\*\\/)|[\\s;]/g,\"\")}function ga(s,e){const t=Array.from(e.childNodes),r=[];if(t.length>1&&s&&typeof s==\"string\"){const i=yr(s);for(let n=1;n<t.length;n++)if(t[n].textContent&&typeof t[n].textContent==\"string\"){const o=yr(t[n].textContent);for(let l=3;l<o.length;l++){const a=o.substring(0,l);if(i.split(a).length===2){const u=i.indexOf(a);for(let c=u;c<s.length;c++)if(yr(s.substring(0,c)).length===u){r.push(s.substring(0,c)),s=s.substring(c);break}break}}}}return r.push(s),r}function ya(s,e){return ga(s,e).join(\"/* rr_split */\")}let wa=1;const Sa=new RegExp(\"[^a-z0-9-_:]\"),Ze=-2;function Yi(){return wa++}function ba(s){if(s instanceof HTMLFormElement)return\"form\";const e=Ce(s.tagName);return Sa.test(e)?\"div\":e}let Oe,Zs;const Ca=/^[^ \\t\\n\\r\\u000c]+/,va=/^[, \\t\\n\\r\\u000c]+/;function Ia(s,e){if(e.trim()===\"\")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):\"\"}const i=[];for(;r(va),!(t>=e.length);){let n=r(Ca);if(n.slice(-1)===\",\")n=Me(s,n.substring(0,n.length-1)),i.push(n);else{let o=\"\";n=Me(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===\"\"){i.push((n+o).trim());break}else if(l)a===\")\"&&(l=!1);else if(a===\",\"){t+=1,i.push((n+o).trim());break}else a===\"(\"&&(l=!0);o+=a,t+=1}}}return i.join(\", \")}const Js=new WeakMap;function Me(s,e){return!e||e.trim()===\"\"?e:ps(s,e)}function xa(s){return!!(s.tagName===\"svg\"||s.ownerSVGElement)}function ps(s,e){let t=Js.get(s);if(t||(t=s.createElement(\"a\"),Js.set(s,t)),!e)e=\"\";else if(e.startsWith(\"blob:\")||e.startsWith(\"data:\"))return e;return t.setAttribute(\"href\",e),t.href}function Zi(s,e,t,r){return r&&(t===\"src\"||t===\"href\"&&!(e===\"use\"&&r[0]===\"#\")||t===\"xlink:href\"&&r[0]!==\"#\"||t===\"background\"&&(e===\"table\"||e===\"td\"||e===\"th\")?Me(s,r):t===\"srcset\"?Ia(s,r):t===\"style\"?Wt(r,ps(s)):e===\"object\"&&t===\"data\"?Me(s,r):r)}function Ji(s,e,t){return(s===\"video\"||s===\"audio\")&&e===\"autoplay\"}function Oa(s,e,t){try{if(typeof e==\"string\"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function Gt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Gt(Z.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?Gt(Z.parentNode(s),e,t):!1}function Xi(s,e,t,r){let i;if(Gi(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.parentElement(s)}try{if(typeof e==\"string\"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Gt(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Ra(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!==\"complete\"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener(\"load\",()=>{clearTimeout(l),i=!0,e()});return}const o=\"about:blank\";if(r.location.href!==o||s.src===o||s.src===\"\")return setTimeout(e,0),s.addEventListener(\"load\",e);s.addEventListener(\"load\",e)}function Aa(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener(\"load\",()=>{clearTimeout(n),r=!0,e()})}function Ma(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:p=!1,cssCaptured:f=!1}=e,S=Ea(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!==\"CSS1Compat\"?{type:j.Document,childNodes:[],compatMode:s.compatMode}:{type:j.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:j.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:S};case s.ELEMENT_NODE:return Na(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:p,rootId:S});case s.TEXT_NODE:return $a(s,{doc:t,needsMask:o,maskTextFn:u,rootId:S,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:j.CDATA,textContent:\"\",rootId:S};case s.COMMENT_NODE:return{type:j.Comment,textContent:Z.textContent(s)||\"\",rootId:S};default:return!1}}function Ea(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function $a(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=Z.parentNode(s),l=o&&o.tagName;let a=\"\";const u=l===\"STYLE\"?!0:void 0,c=l===\"SCRIPT\"?!0:void 0;return c?a=\"SCRIPT_PLACEHOLDER\":n||(a=Z.textContent(s),u&&a&&(a=Wt(a,ps(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,Z.parentElement(s)):a.replace(/[\\S]/g,\"*\")),{type:j.Text,textContent:a||\"\",rootId:i}}function Na(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:d=!1,rootId:m}=e,g=Oa(s,r,i),p=ba(s);let f={};const S=s.attributes.length;for(let y=0;y<S;y++){const C=s.attributes[y];Ji(p,C.name,C.value)||(f[C.name]=Zi(t,p,Ce(C.name),C.value))}if(p===\"link\"&&n){const y=Array.from(t.styleSheets).find(N=>N.href===s.href);let C=null;y&&(C=$r(y)),C&&(delete f.rel,delete f.href,f._cssText=C)}if(p===\"style\"&&s.sheet){let y=$r(s.sheet);y&&(s.childNodes.length>1&&(y=ya(y,s)),f._cssText=y)}if(p===\"input\"||p===\"textarea\"||p===\"select\"){const y=s.value,C=s.checked;f.type!==\"radio\"&&f.type!==\"checkbox\"&&f.type!==\"submit\"&&f.type!==\"button\"&&y?f.value=hs({element:s,type:fs(s),tagName:p,value:y,maskInputOptions:o,maskInputFn:l}):C&&(f.checked=C)}if(p===\"option\"&&(s.selected&&!o.select?f.selected=!0:delete f.selected),p===\"dialog\"&&s.open&&(f.rr_open_mode=s.matches(\"dialog:modal\")?\"modal\":\"non-modal\"),p===\"canvas\"&&c){if(s.__context===\"2d\")ca(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!(\"__context\"in s)){const y=s.toDataURL(a.type,a.quality),C=t.createElement(\"canvas\");C.width=s.width,C.height=s.height;const N=C.toDataURL(a.type,a.quality);y!==N&&(f.rr_dataURL=y)}}if(p===\"img\"&&u){Oe||(Oe=t.createElement(\"canvas\"),Zs=Oe.getContext(\"2d\"));const y=s,C=y.currentSrc||y.getAttribute(\"src\")||\"<unknown-src>\",N=y.crossOrigin,D=()=>{y.removeEventListener(\"load\",D);try{Oe.width=y.naturalWidth,Oe.height=y.naturalHeight,Zs.drawImage(y,0,0),f.rr_dataURL=Oe.toDataURL(a.type,a.quality)}catch(H){if(y.crossOrigin!==\"anonymous\"){y.crossOrigin=\"anonymous\",y.complete&&y.naturalWidth!==0?D():y.addEventListener(\"load\",D);return}else console.warn(`Cannot inline img src=${C}! Error: ${H}`)}y.crossOrigin===\"anonymous\"&&(N?f.crossOrigin=N:y.removeAttribute(\"crossorigin\"))};y.complete&&y.naturalWidth!==0?D():y.addEventListener(\"load\",D)}if(p===\"audio\"||p===\"video\"){const y=f;y.rr_mediaState=s.paused?\"paused\":\"played\",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(d||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}p===\"iframe\"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let b;try{customElements.get(p)&&(b=!0)}catch(y){}return{type:j.Element,tagName:p,attributes:f,childNodes:[],isSVG:xa(s)||void 0,needBlock:g,rootId:m,isCustom:b}}function P(s){return s==null?\"\":s.toLowerCase()}function ka(s,e){if(e.comment&&s.type===j.Comment)return!0;if(s.type===j.Element){if(e.script&&(s.tagName===\"script\"||s.tagName===\"link\"&&(s.attributes.rel===\"preload\"||s.attributes.rel===\"modulepreload\")&&s.attributes.as===\"script\"||s.tagName===\"link\"&&s.attributes.rel===\"prefetch\"&&typeof s.attributes.href==\"string\"&&Hi(s.attributes.href)===\"js\"))return!0;if(e.headFavicon&&(s.tagName===\"link\"&&s.attributes.rel===\"shortcut icon\"||s.tagName===\"meta\"&&(P(s.attributes.name).match(/^msapplication-tile(image|color)$/)||P(s.attributes.name)===\"application-name\"||P(s.attributes.rel)===\"icon\"||P(s.attributes.rel)===\"apple-touch-icon\"||P(s.attributes.rel)===\"shortcut icon\")))return!0;if(s.tagName===\"meta\"){if(e.headMetaDescKeywords&&P(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(P(s.attributes.property).match(/^(og|twitter|fb):/)||P(s.attributes.name).match(/^(og|twitter):/)||P(s.attributes.name)===\"pinterest\"))return!0;if(e.headMetaRobots&&(P(s.attributes.name)===\"robots\"||P(s.attributes.name)===\"googlebot\"||P(s.attributes.name)===\"bingbot\"))return!0;if(e.headMetaHttpEquiv&&s.attributes[\"http-equiv\"]!==void 0)return!0;if(e.headMetaAuthorship&&(P(s.attributes.name)===\"author\"||P(s.attributes.name)===\"generator\"||P(s.attributes.name)===\"framework\"||P(s.attributes.name)===\"publisher\"||P(s.attributes.name)===\"progid\"||P(s.attributes.property).match(/^article:/)||P(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(P(s.attributes.name)===\"google-site-verification\"||P(s.attributes.name)===\"yandex-verification\"||P(s.attributes.name)===\"csrf-token\"||P(s.attributes.name)===\"p:domain_verify\"||P(s.attributes.name)===\"verify-v1\"||P(s.attributes.name)===\"verification\"||P(s.attributes.name)===\"shopify-checkout-api-token\"))return!0}}return!1}function Ee(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g={},inlineImages:p=!1,recordCanvas:f=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:N=5e3,keepIframeSrcFn:D=()=>!1,newlyAddedElement:H=!1,cssCaptured:_=!1}=e;let{needsMask:G}=e,{preserveWhiteSpace:Y=!0}=e;G||(G=Xi(s,o,l,G===void 0));const Q=Ma(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:G,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,keepIframeSrcFn:D,newlyAddedElement:H,cssCaptured:_});if(!Q)return console.warn(s,\"not serialized\"),null;let oe;r.hasNode(s)?oe=r.getId(s):ka(Q,m)||!Y&&Q.type===j.Text&&!Q.textContent.replace(/^\\s+|\\s+$/gm,\"\").length?oe=Ze:oe=Yi();const A=Object.assign(Q,{id:oe});if(r.add(s,A),oe===Ze)return null;S&&S(s);let Ue=!a;if(A.type===j.Element){Ue=Ue&&!A.needBlock,delete A.needBlock;const V=Z.shadowRoot(s);V&&He(V)&&(A.isShadowHost=!0)}if((A.type===j.Document||A.type===j.Element)&&Ue){m.headWhitespace&&A.type===j.Element&&A.tagName===\"head\"&&(Y=!1);const V={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:G,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:N,keepIframeSrcFn:D,cssCaptured:!1};if(!(A.type===j.Element&&A.tagName===\"textarea\"&&A.attributes.value!==void 0)){A.type===j.Element&&A.attributes._cssText!==void 0&&typeof A.attributes._cssText==\"string\"&&(V.cssCaptured=!0);for(const ye of Array.from(Z.childNodes(s))){const ae=Ee(ye,V);ae&&A.childNodes.push(ae)}}let q=null;if(Gi(s)&&(q=Z.shadowRoot(s)))for(const ye of Array.from(Z.childNodes(q))){const ae=Ee(ye,V);ae&&(He(q)&&(ae.isShadow=!0),A.childNodes.push(ae))}}const Be=Z.parentNode(s);return Be&&je(Be)&&He(Be)&&(A.isShadow=!0),A.type===j.Element&&A.tagName===\"iframe\"&&Ra(s,()=>{const V=s.contentDocument;if(V&&b){const q=Ee(V,{doc:V,mirror:r,blockClass:i,blockSelector:n,needsMask:G,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:N,keepIframeSrcFn:D});q&&b(s,q)}},y),A.type===j.Element&&A.tagName===\"link\"&&typeof A.attributes.rel==\"string\"&&(A.attributes.rel===\"stylesheet\"||A.attributes.rel===\"preload\"&&typeof A.attributes.href==\"string\"&&Hi(A.attributes.href)===\"css\")&&Aa(s,()=>{if(C){const V=Ee(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:G,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:N,keepIframeSrcFn:D});V&&C(s,V)}},N),A}function Pa(s,e){const{mirror:t=new ji,blockClass:r=\"rr-block\",blockSelector:i=null,maskTextClass:n=\"rr-mask\",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:d,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:N=()=>!1}=e||{};return Ee(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c===!0?{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}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:m===!0||m===\"all\"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m===\"all\",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:N,newlyAddedElement:!1})}function Da(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,\"default\")?s.default:s}function La(s){if(s.__esModule)return s;var e=s.default;if(typeof e==\"function\"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,\"__esModule\",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var ds={exports:{}},L=String,Ki=function(){return{isColorSupported:!1,reset:L,bold:L,dim:L,italic:L,underline:L,inverse:L,hidden:L,strikethrough:L,black:L,red:L,green:L,yellow:L,blue:L,magenta:L,cyan:L,white:L,gray:L,bgBlack:L,bgRed:L,bgGreen:L,bgYellow:L,bgBlue:L,bgMagenta:L,bgCyan:L,bgWhite:L}};ds.exports=Ki();ds.exports.createColors=Ki;var Ta=ds.exports;const _a={},Fa=Object.freeze(Object.defineProperty({__proto__:null,default:_a},Symbol.toStringTag,{value:\"Module\"})),ie=La(Fa);let Xs=Ta,Ks=ie,Nr=class Qi extends Error{constructor(e,t,r,i,n,o){super(e),this.name=\"CssSyntaxError\",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!=\"undefined\"&&typeof r!=\"undefined\"&&(typeof t==\"number\"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Qi)}setMessage(){this.message=this.plugin?this.plugin+\": \":\"\",this.message+=this.file?this.file:\"<css input>\",typeof this.line!=\"undefined\"&&(this.message+=\":\"+this.line+\":\"+this.column),this.message+=\": \"+this.reason}showSourceCode(e){if(!this.source)return\"\";let t=this.source;e==null&&(e=Xs.isColorSupported),Ks&&e&&(t=Ks(t));let r=t.split(/\\r?\\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=Xs.createColors(!0);l=d=>u(h(d)),a=d=>c(d)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,d=\" \"+(\" \"+h).slice(-o)+\" | \";if(h===this.line){let m=a(d.replace(/\\d/g,\" \"))+u.slice(0,this.column-1).replace(/[^\\t]/g,\" \");return l(\">\")+a(d)+u+`\n `+m+l(\"^\")}return\" \"+a(d)+u}).join(`\n`)}toString(){let e=this.showSourceCode();return e&&(e=`\n\n`+e+`\n`),this.name+\": \"+this.message+e}};var ms=Nr;Nr.default=Nr;var it={};it.isClean=Symbol(\"isClean\");it.my=Symbol(\"my\");const Qs={after:`\n`,beforeClose:`\n`,beforeComment:`\n`,beforeDecl:`\n`,beforeOpen:\" \",beforeRule:`\n`,colon:\": \",commentLeft:\" \",commentRight:\" \",emptyBody:\"\",indent:\" \",semicolon:!1};function Ua(s){return s[0].toUpperCase()+s.slice(1)}let kr=class{constructor(e){this.builder=e}atrule(e,t){let r=\"@\"+e.name,i=e.params?this.rawValue(e,\"params\"):\"\";if(typeof e.raws.afterName!=\"undefined\"?r+=e.raws.afterName:i&&(r+=\" \"),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||\"\")+(t?\";\":\"\");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type===\"decl\"?r=this.raw(e,null,\"beforeDecl\"):e.type===\"comment\"?r=this.raw(e,null,\"beforeComment\"):t===\"before\"?r=this.raw(e,null,\"beforeRule\"):r=this.raw(e,null,\"beforeClose\");let i=e.parent,n=0;for(;i&&i.type!==\"root\";)n+=1,i=i.parent;if(r.includes(`\n`)){let o=this.raw(e,null,\"indent\");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,\"between\",\"beforeOpen\");this.builder(t+r+\"{\",e,\"start\");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,\"after\")):i=this.raw(e,\"after\",\"emptyBody\"),i&&this.builder(i),this.builder(\"}\",e,\"end\")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type===\"comment\";)t-=1;let r=this.raw(e,\"semicolon\");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,\"before\");o&&this.builder(o),this.stringify(n,t!==i||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\"),i=e.prop+r+this.rawValue(e,\"value\");e.important&&(i+=e.raws.important||\" !important\"),t&&(i+=\";\"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!=\"undefined\"))return i;let n=e.parent;if(r===\"before\"&&(!n||n.type===\"root\"&&n.first===e||n&&n.type===\"document\"))return\"\";if(!n)return Qs[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!=\"undefined\")return o.rawCache[r];if(r===\"before\"||r===\"after\")return this.beforeAfter(e,r);{let l=\"raw\"+Ua(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i!=\"undefined\")return!1})}return typeof i==\"undefined\"&&(i=Qs[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!=\"undefined\")return t=r.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(i=>{if(typeof i.raws.before!=\"undefined\")return r=i.raws.before,r.includes(`\n`)&&(r=r.replace(/[^\\n]+$/,\"\")),!1}),typeof r==\"undefined\"?r=this.raw(t,null,\"beforeDecl\"):r&&(r=r.replace(/\\S/g,\"\")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!=\"undefined\")return r=i.raws.before,r.includes(`\n`)&&(r=r.replace(/[^\\n]+$/,\"\")),!1}),typeof r==\"undefined\"?r=this.raw(t,null,\"beforeRule\"):r&&(r=r.replace(/\\S/g,\"\")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!==\"decl\"&&(t=r.raws.between,typeof t!=\"undefined\"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!=\"undefined\")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(r=>{if(typeof r.raws.between!=\"undefined\")return t=r.raws.between.replace(/[^\\s:]/g,\"\"),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!=\"undefined\"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!=\"undefined\"){let n=r.raws.before.split(`\n`);return t=n[n.length-1],t=t.replace(/\\S/g,\"\"),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type===\"decl\"&&(t=r.raws.semicolon,typeof t!=\"undefined\"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.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)}};var qi=kr;kr.default=kr;let Ba=qi;function Pr(s,e){new Ba(e).stringify(s)}var tr=Pr;Pr.default=Pr;let{isClean:dt,my:za}=it,Wa=ms,Ga=qi,Va=tr;function Dr(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r===\"proxyCache\")continue;let i=s[r],n=typeof i;r===\"parent\"&&n===\"object\"?e&&(t[r]=e):r===\"source\"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Dr(o,t)):(n===\"object\"&&i!==null&&(i=Dr(i)),t[r]=i)}return t}let Lr=class{constructor(e={}){this.raws={},this[dt]=!1,this[za]=!0;for(let t in e)if(t===\"nodes\"){this.nodes=[];for(let r of e[t])typeof r.clone==\"function\"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=Dr(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:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Wa(e)}getProxyProcessor(){return{get(e,t){return t===\"proxyOf\"?e:t===\"root\"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t===\"prop\"||t===\"value\"||t===\"name\"||t===\"params\"||t===\"important\"||t===\"text\")&&e.markDirty()),!0}}}markDirty(){if(this[dt]){this[dt]=!1;let e=this;for(;e=e.parent;)e[dt]=!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){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`\n`?(i=1,n+=1):i+=1;return{column:i,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 i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}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}:typeof e.endIndex==\"number\"?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 Ga().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 i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==\"document\";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o===\"parent\"||o===\"proxyCache\")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a==\"object\"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l==\"object\"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o===\"source\"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Va){e.stringify&&(e=e.stringify);let t=\"\";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var rr=Lr;Lr.default=Lr;let ja=rr,Tr=class extends ja{constructor(e){e&&typeof e.value!=\"undefined\"&&typeof e.value!=\"string\"&&(e=ee(x({},e),{value:String(e.value)})),super(e),this.type=\"decl\"}get variable(){return this.prop.startsWith(\"--\")||this.prop[0]===\"$\"}};var sr=Tr;Tr.default=Tr;let Ha=\"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\",Ya=(s,e=21)=>(t=e)=>{let r=\"\",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Za=(s=21)=>{let e=\"\",t=s;for(;t--;)e+=Ha[Math.random()*64|0];return e};var Ja={nanoid:Za,customAlphabet:Ya};let{SourceMapConsumer:qs,SourceMapGenerator:ei}=ie,{existsSync:Xa,readFileSync:Ka}=ie,{dirname:wr,join:Qa}=ie;function qa(s){return Buffer?Buffer.from(s,\"base64\").toString():window.atob(s)}let _r=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,\"data:\");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=wr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new qs(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\\/json;charset=utf-?8;base64,/,r=/^data:application\\/json;base64,/,i=/^data:application\\/json;charset=utf-?8,/,n=/^data:application\\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return qa(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\\/json;([^,]+),/)[1];throw new Error(\"Unsupported source map encoding \"+o)}getAnnotationURL(e){return e.replace(/^\\/\\*\\s*# sourceMappingURL=/,\"\").trim()}isMap(e){return typeof e!=\"object\"?!1:typeof e.mappings==\"string\"||typeof e._mappings==\"string\"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\\/\\*\\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf(\"*/\",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=wr(e),Xa(e))return this.mapFile=e,Ka(e,\"utf-8\").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t==\"string\")return t;if(typeof t==\"function\"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error(\"Unable to load previous source map: \"+r.toString());return i}}else{if(t instanceof qs)return ei.fromSourceMap(t).toString();if(t instanceof ei)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error(\"Unsupported previous source map format: \"+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Qa(wr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var en=_r;_r.default=_r;let{SourceMapConsumer:el,SourceMapGenerator:tl}=ie,{fileURLToPath:ti,pathToFileURL:mt}=ie,{isAbsolute:Fr,resolve:Ur}=ie,{nanoid:rl}=Ja,Sr=ie,ri=ms,sl=en,br=Symbol(\"fromOffsetCache\"),il=!!(el&&tl),si=!!(Ur&&Fr),Vt=class{constructor(e,t={}){if(e===null||typeof e==\"undefined\"||typeof e==\"object\"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===\"\\uFEFF\"||this.css[0]===\"\\uFFFE\"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!si||/^\\w+:\\/\\//.test(t.from)||Fr(t.from)?this.file=t.from:this.file=Ur(t.from)),si&&il){let r=new sl(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id=\"<input css \"+rl(6)+\">\"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t==\"object\"){let u=t,c=r;if(typeof u.offset==\"number\"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset==\"number\"){let h=this.fromOffset(c.offset);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new ri(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):n=new ri(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(mt&&(n.input.url=mt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[br])r=this[br];else{let n=this.css.split(`\n`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[br]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\\w+:\\/\\//.test(e)?e:Ur(this.map.consumer().sourceRoot||this.map.root||\".\",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r==\"number\"&&(l=n.originalPositionFor({column:i,line:r}));let a;Fr(o.source)?a=mt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||mt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol===\"file:\")if(ti)u.file=ti(a);else throw new Error(\"file: protocol is not available in this PostCSS build\");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of[\"hasBOM\",\"css\",\"file\",\"id\"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=x({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var ir=Vt;Vt.default=Vt;Sr&&Sr.registerInput&&Sr.registerInput(Vt);let{SourceMapConsumer:tn,SourceMapGenerator:Tt}=ie,{dirname:_t,relative:rn,resolve:sn,sep:nn}=ie,{pathToFileURL:ii}=ie,nl=ir,ol=!!(tn&&Tt),al=!!(_t&&sn&&rn&&nn),ll=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e=\"data:application/json;base64,\"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==\"string\"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation==\"function\"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+\".map\";let t=`\n`;this.css.includes(`\\r\n`)&&(t=`\\r\n`),this.css+=t+\"/*# sourceMappingURL=\"+e+\" */\"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||_t(e.file),i;this.mapOpts.sourcesContent===!1?(i=new tn(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===\"comment\"&&e.text.indexOf(\"# sourceMappingURL=\")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\\n*?\\/\\*#[\\S\\s]*?\\*\\/$/gm,\"\"))}generate(){if(this.clearAnnotation(),al&&ol&&this.isMap())return this.generateMap();{let e=\"\";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Tt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Tt({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 Tt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r=\"<no source>\",i={generated:{column:0,line:0},original:{column:0,line:0},source:\"\"},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!==\"end\"&&(i.generated.line=e,i.generated.column=t-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=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\\n/g),n?(e+=n.length,o=l.lastIndexOf(`\n`),t=l.length-o):t+=l.length,a&&u!==\"start\"){let c=a.parent||{raws:{}};(!(a.type===\"decl\"||a.type===\"atrule\"&&!a.nodes)||a!==c.last||c.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=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!=\"undefined\"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!=\"undefined\")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!=\"undefined\"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!=\"undefined\"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!=\"undefined\"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}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||e.charCodeAt(0)===60||/^\\w+:\\/\\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?_t(this.opts.to):\".\";typeof this.mapOpts.annotation==\"string\"&&(r=_t(sn(r,this.mapOpts.annotation)));let i=rn(r,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 nl(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 i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):\"<no source>\";this.map.setSourceContent(t,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(ii){let r=ii(e).toString();return this.memoizedFileURLs.set(e,r),r}else 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;nn===\"\\\\\"&&(e=e.replace(/\\\\/g,\"/\"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var on=ll;let ul=rr,Br=class extends ul{constructor(e){super(e),this.type=\"comment\"}};var nr=Br;Br.default=Br;let{isClean:an,my:ln}=it,un=sr,cn=nr,cl=rr,hn,gs,ys,fn;function pn(s){return s.map(e=>(e.nodes&&(e.nodes=pn(e.nodes)),delete e.source,e))}function dn(s){if(s[an]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)dn(e)}let fe=class mn extends cl{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}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=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}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){return t===\"proxyOf\"?e:e[t]?t===\"each\"||typeof t==\"string\"&&t.startsWith(\"walk\")?(...r)=>e[t](...r.map(i=>typeof i==\"function\"?(n,o)=>i(n.toProxy(),o):i)):t===\"every\"||t===\"some\"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t===\"root\"?()=>e.root().toProxy():t===\"nodes\"?e.nodes.map(r=>r.toProxy()):t===\"first\"||t===\"last\"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t===\"name\"||t===\"params\"||t===\"selector\")&&e.markDirty()),!0}}}index(e){return typeof e==\"number\"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?\"prepend\":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e==\"string\")e=pn(hn(e).nodes);else if(typeof e==\"undefined\")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,\"ignore\")}else if(e.type===\"root\"&&this.type!==\"document\"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,\"ignore\")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value==\"undefined\")throw new Error(\"Value field is missed in node creation\");typeof e.value!=\"string\"&&(e.value=String(e.value)),e=[new un(e)]}else if(e.selector)e=[new gs(e)];else if(e.name)e=[new ys(e)];else if(e.text)e=[new cn(e)];else throw new Error(\"Unknown node type in node creation\");return e.map(i=>(i[ln]||mn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[an]&&dn(i),typeof i.raws.before==\"undefined\"&&t&&typeof t.raws.before!=\"undefined\"&&(i.raws.before=t.raws.before.replace(/\\S/g,\"\")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,\"prepend\").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.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){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;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(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type===\"atrule\"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type===\"atrule\"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type===\"atrule\")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type===\"comment\")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type===\"decl\"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type===\"decl\"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type===\"decl\")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type===\"rule\"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type===\"rule\"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type===\"rule\")return t(r,i)}))}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]}};fe.registerParse=s=>{hn=s};fe.registerRule=s=>{gs=s};fe.registerAtRule=s=>{ys=s};fe.registerRoot=s=>{fn=s};var ve=fe;fe.default=fe;fe.rebuild=s=>{s.type===\"atrule\"?Object.setPrototypeOf(s,ys.prototype):s.type===\"rule\"?Object.setPrototypeOf(s,gs.prototype):s.type===\"decl\"?Object.setPrototypeOf(s,un.prototype):s.type===\"comment\"?Object.setPrototypeOf(s,cn.prototype):s.type===\"root\"&&Object.setPrototypeOf(s,fn.prototype),s[ln]=!0,s.nodes&&s.nodes.forEach(e=>{fe.rebuild(e)})};let hl=ve,gn,yn,Je=class extends hl{constructor(e){super(x({type:\"document\"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new gn(new yn,this,e).stringify()}};Je.registerLazyResult=s=>{gn=s};Je.registerProcessor=s=>{yn=s};var ws=Je;Je.default=Je;let zr=class{constructor(e,t={}){if(this.type=\"warning\",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}};var wn=zr;zr.default=zr;let fl=wn,Wr=class{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(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new fl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===\"warning\")}get content(){return this.css}};var Ss=Wr;Wr.default=Wr;const Cr=39,ni=34,gt=92,oi=47,yt=10,ze=32,wt=12,St=9,bt=13,pl=91,dl=93,ml=40,gl=41,yl=123,wl=125,Sl=59,bl=42,Cl=58,vl=64,Ct=/[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g,vt=/[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g,Il=/.[\\r\\n\"'(/\\\\]/,ai=/[\\da-f]/i;var xl=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,d,m,g,p=r.length,f=0,S=[],b=[];function y(){return f}function C(_){throw e.error(\"Unclosed \"+_,f)}function N(){return b.length===0&&f>=p}function D(_){if(b.length)return b.pop();if(f>=p)return;let G=_?_.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case yt:case ze:case St:case bt:case wt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===ze||n===yt||n===St||n===bt||n===wt);g=[\"space\",r.slice(f,o)],f=o-1;break}case pl:case dl:case yl:case wl:case Cl:case Sl:case gl:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case ml:{if(d=S.length?S.pop()[1]:\"\",m=r.charCodeAt(f+1),d===\"url\"&&m!==Cr&&m!==ni&&m!==ze&&m!==yt&&m!==St&&m!==wt&&m!==bt){o=f;do{if(c=!1,o=r.indexOf(\")\",o+1),o===-1)if(i||G){o=f;break}else C(\"bracket\");for(h=o;r.charCodeAt(h-1)===gt;)h-=1,c=!c}while(c);g=[\"brackets\",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(\")\",f+1),a=r.slice(f,o+1),o===-1||Il.test(a)?g=[\"(\",\"(\",f]:(g=[\"brackets\",a,f,o],f=o);break}case Cr:case ni:{l=n===Cr?\"'\":'\"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||G){o=f+1;break}else C(\"string\");for(h=o;r.charCodeAt(h-1)===gt;)h-=1,c=!c}while(c);g=[\"string\",r.slice(f,o+1),f,o],f=o;break}case vl:{Ct.lastIndex=f+1,Ct.test(r),Ct.lastIndex===0?o=r.length-1:o=Ct.lastIndex-2,g=[\"at-word\",r.slice(f,o+1),f,o],f=o;break}case gt:{for(o=f,u=!0;r.charCodeAt(o+1)===gt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==oi&&n!==ze&&n!==yt&&n!==St&&n!==bt&&n!==wt&&(o+=1,ai.test(r.charAt(o)))){for(;ai.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===ze&&(o+=1)}g=[\"word\",r.slice(f,o+1),f,o],f=o;break}default:{n===oi&&r.charCodeAt(f+1)===bl?(o=r.indexOf(\"*/\",f+2)+1,o===0&&(i||G?o=r.length:C(\"comment\")),g=[\"comment\",r.slice(f,o+1),f,o],f=o):(vt.lastIndex=f+1,vt.test(r),vt.lastIndex===0?o=r.length-1:o=vt.lastIndex-2,g=[\"word\",r.slice(f,o+1),f,o],S.push(g),f=o);break}}return f++,g}function H(_){b.push(_)}return{back:H,endOfFile:N,nextToken:D,position:y}};let Sn=ve,jt=class extends Sn{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)}};var bs=jt;jt.default=jt;Sn.registerAtRule(jt);let bn=ve,Cn,vn,Ne=class extends bn{constructor(e){super(e),this.type=\"root\",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r===\"prepend\")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Cn(new vn,this,e).stringify()}};Ne.registerLazyResult=s=>{Cn=s};Ne.registerProcessor=s=>{vn=s};var nt=Ne;Ne.default=Ne;bn.registerRoot(Ne);let Xe={comma(s){return Xe.split(s,[\",\"],!0)},space(s){let e=[\" \",`\n`,\" \"];return Xe.split(s,e)},split(s,e,t){let r=[],i=\"\",n=!1,o=0,l=!1,a=\"\",u=!1;for(let c of s)u?u=!1:c===\"\\\\\"?u=!0:l?c===a&&(l=!1):c==='\"'||c===\"'\"?(l=!0,a=c):c===\"(\"?o+=1:c===\")\"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==\"\"&&r.push(i.trim()),i=\"\",n=!1):i+=c;return(t||i!==\"\")&&r.push(i.trim()),r}};var In=Xe;Xe.default=Xe;let xn=ve,Ol=In,Ht=class extends xn{constructor(e){super(e),this.type=\"rule\",this.nodes||(this.nodes=[])}get selectors(){return Ol.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)}};var Cs=Ht;Ht.default=Ht;xn.registerRule(Ht);let Rl=sr,Al=xl,Ml=nr,El=bs,$l=nt,li=Cs;const ui={empty:!0,space:!0};function Nl(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let kl=class{constructor(e){this.input=e,this.root=new $l,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=new El;t.name=e[1].slice(1),t.name===\"\"&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r===\"(\"||r===\"[\"?u.push(r===\"(\"?\")\":\"]\"):r===\"{\"&&u.length>0?u.push(\"}\"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===\";\"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r===\"{\"){l=!0;break}else if(r===\"}\"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]===\"space\";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,\"params\",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=\"\")):(t.raws.afterName=\"\",t.params=\"\"),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!==\"space\"&&(r+=1,r===2)));n--);throw this.input.error(\"Missed semicolon\",i[0]===\"word\"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i===\"(\"&&(t+=1),i===\")\"&&(t-=1),t===0&&i===\":\")if(!n)this.doubleColon(r);else{if(n[0]===\"word\"&&n[1]===\"progid\")continue;return o}n=r}return!1}comment(e){let t=new Ml;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\\s*$/.test(r))t.text=\"\",t.raws.left=r,t.raws.right=\"\";else{let i=r.match(/^(\\s*)([^]*\\S)(\\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Al(this.input)}decl(e,t){let r=new Rl;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===\";\"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Nl(e)),r.source.end.offset++;e[0][0]!==\"word\";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop=\"\";e.length;){let u=e[0][0];if(u===\":\"||u===\"space\"||u===\"comment\")break;r.prop+=e.shift()[1]}r.raws.between=\"\";let n;for(;e.length;)if(n=e.shift(),n[0]===\":\"){r.raws.between+=n[1];break}else n[0]===\"word\"&&/\\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]===\"_\"||r.prop[0]===\"*\")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!==\"space\"&&l!==\"comment\"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()===\"!important\"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==\" !important\"&&(r.raws.important=c);break}else if(n[1].toLowerCase()===\"important\"){let c=e.slice(0),h=\"\";for(let d=u;d>0;d--){let m=c[d][0];if(h.trim().indexOf(\"!\")===0&&m!==\"space\")break;h=c.pop()[1]+h}h.trim().indexOf(\"!\")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!==\"space\"&&n[0]!==\"comment\")break}e.some(u=>u[0]!==\"space\"&&u[0]!==\"comment\")&&(r.raws.between+=o.map(u=>u[1]).join(\"\"),o=[]),this.raw(r,\"value\",o.concat(e),t),r.value.includes(\":\")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error(\"Double colon\",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new li;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 t=this.current.nodes[this.current.nodes.length-1];t&&t.type===\"rule\"&&!t.raws.ownSemicolon&&(t.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=\"\",e.type!==\"comment\"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith(\"--\"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r===\"(\"||r===\"[\")n||(n=u),o.push(r===\"(\"?\")\":\"]\");else if(l&&i&&r===\"{\")n||(n=u),o.push(\"}\");else if(o.length===0)if(r===\";\")if(i){this.decl(a,l);return}else break;else if(r===\"{\"){this.rule(a);return}else if(r===\"}\"){this.tokenizer.back(a.pop()),t=!0;break}else r===\":\"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!==\"space\"&&u!==\"comment\"));)this.tokenizer.back(a.pop());this.decl(a,l)}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);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a=\"\",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],o=n[0],o===\"space\"&&d===l-1&&!i?u=!1:o===\"comment\"?(h=r[d-1]?r[d-1][0]:\"empty\",c=r[d+1]?r[d+1][0]:\"empty\",!ui[h]&&!ui[c]?a.slice(-1)===\",\"?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let d=r.reduce((m,g)=>m+g[1],\"\");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new li;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],!(t!==\"space\"&&t!==\"comment\"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r=\"\";for(;e.length&&(t=e[0][0],!(t!==\"space\"&&t!==\"comment\"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r=\"\";for(;e.length&&(t=e[e.length-1][0],t===\"space\");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r=\"\";for(let i=t;i<e.length;i++)r+=e[i][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})}};var Pl=kl;let Dl=ve,Ll=Pl,Tl=ir;function Yt(s,e){let t=new Tl(s,e),r=new Ll(t);try{r.parse()}catch(i){throw i}return r.root}var vs=Yt;Yt.default=Yt;Dl.registerParse(Yt);let{isClean:ue,my:_l}=it,Fl=on,Ul=tr,Bl=ve,zl=ws;let ci=Ss,Wl=vs,Gl=nt;const Vl={atrule:\"AtRule\",comment:\"Comment\",decl:\"Declaration\",document:\"Document\",root:\"Root\",rule:\"Rule\"},jl={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},Hl={Once:!0,postcssPlugin:!0,prepare:!0},ke=0;function We(s){return typeof s==\"object\"&&typeof s.then==\"function\"}function On(s){let e=!1,t=Vl[s.type];return s.type===\"decl\"?e=s.prop.toLowerCase():s.type===\"atrule\"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+\"-\"+e,ke,t+\"Exit\",t+\"Exit-\"+e]:e?[t,t+\"-\"+e,t+\"Exit\",t+\"Exit-\"+e]:s.append?[t,ke,t+\"Exit\"]:[t,t+\"Exit\"]}function hi(s){let e;return s.type===\"document\"?e=[\"Document\",ke,\"DocumentExit\"]:s.type===\"root\"?e=[\"Root\",ke,\"RootExit\"]:e=On(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Gr(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>Gr(e)),s}let Vr={},Pe=class Rn{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t==\"object\"&&t!==null&&(t.type===\"root\"||t.type===\"document\"))i=Gr(t);else if(t instanceof Rn||t instanceof ci)i=Gr(t.root),t.map&&(typeof r.map==\"undefined\"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Wl;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[_l]&&Bl.rebuild(i)}this.result=new ci(e,i,r),this.helpers=ee(x({},Vr),{postcss:Vr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n==\"object\"&&n.prepare?x(x({},n),n.prepare(this.result)):n)}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{t&&t.addToError(e),this.error=e,e.name===\"CssSyntaxError\"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t==\"object\")for(let r in t){if(!jl[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Hl[r])if(typeof t[r]==\"object\")for(let i in t[r])i===\"*\"?e(t,r,t[r][i]):e(t,r+\"-\"+i.toLowerCase(),t[r][i]);else typeof t[r]==\"function\"&&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(We(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[hi(e)];for(;t.length>0;){let r=this.visitTick(t);if(We(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type===\"document\"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==\"object\"&&e.Once){if(this.result.root.type===\"document\"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return We(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e==\"function\")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Ul;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Fl(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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){let t=this.runOnRoot(e);if(We(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type===\"document\")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!==\"root\"&&t.type!==\"document\"&&!t.parent)return!0;if(We(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!==\"root\"&&r.type!==\"document\"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ue]){l[ue]=!0,e.push(hi(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===ke){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ue]=!0;let t=On(e);for(let r of t)if(r===ke)e.nodes&&e.each(i=>{i[ue]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.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\"}};Pe.registerPostcss=s=>{Vr=s};var An=Pe;Pe.default=Pe;Gl.registerLazyResult(Pe);zl.registerLazyResult(Pe);let Yl=on,Zl=tr;let Jl=vs;const Xl=Ss;let jr=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Zl;this.result=new Xl(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,\"root\",{get(){return o.root}});let l=new Yl(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.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 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=Jl;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return\"NoWorkResult\"}};var Kl=jr;jr.default=jr;let Ql=Kl,ql=An,eu=ws,tu=nt,Ke=class{constructor(e=[]){this.version=\"8.4.38\",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r==\"object\"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r==\"object\"&&r.postcssPlugin)t.push(r);else if(typeof r==\"function\")t.push(r);else if(!(typeof r==\"object\"&&(r.parse||r.stringify)))throw new Error(r+\" is not a PostCSS plugin\");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Ql(this,e,t):new ql(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ru=Ke;Ke.default=Ke;tu.registerProcessor(Ke);eu.registerProcessor(Ke);let su=sr,iu=en,nu=nr,ou=bs,au=ir,lu=nt,uu=Cs;function Qe(s,e){if(Array.isArray(s))return s.map(o=>Qe(o));let i=s,{inputs:t}=i,r=xe(i,[\"inputs\"]);if(t){e=[];for(let o of t){let l=ee(x({},o),{__proto__:au.prototype});l.map&&(l.map=ee(x({},l.map),{__proto__:iu.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>Qe(o,e))),r.source){let n=r.source,{inputId:o}=n,l=xe(n,[\"inputId\"]);r.source=l,o!=null&&(r.source.input=e[o])}if(r.type===\"root\")return new lu(r);if(r.type===\"decl\")return new su(r);if(r.type===\"rule\")return new uu(r);if(r.type===\"comment\")return new nu(r);if(r.type===\"atrule\")return new ou(r);throw new Error(\"Unknown node type: \"+s.type)}var cu=Qe;Qe.default=Qe;let hu=ms,Mn=sr,fu=An,pu=ve,Is=ru,du=tr,mu=cu,En=ws,gu=wn,$n=nr,Nn=bs,yu=Ss,wu=ir,Su=vs,bu=In,kn=Cs,Pn=nt,Cu=rr;function E(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Is(s)}E.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!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+`: \\u91CC\\u9762 postcss.plugin \\u88AB\\u5F03\\u7528. \\u8FC1\\u79FB\\u6307\\u5357:\nhttps://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Is().version,l}let n;return Object.defineProperty(i,\"postcss\",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return E([i(a)]).process(o,l)},i};E.stringify=du;E.parse=Su;E.fromJSON=mu;E.list=bu;E.comment=s=>new $n(s);E.atRule=s=>new Nn(s);E.decl=s=>new Mn(s);E.rule=s=>new kn(s);E.root=s=>new Pn(s);E.document=s=>new En(s);E.CssSyntaxError=hu;E.Declaration=Mn;E.Container=pu;E.Processor=Is;E.Document=En;E.Comment=$n;E.Warning=gu;E.AtRule=Nn;E.Result=yu;E.Input=wu;E.Rule=kn;E.Root=Pn;E.Node=Cu;fu.registerPostcss(E);var vu=E;E.default=E;const F=Da(vu);F.stringify;F.fromJSON;F.plugin;F.parse;F.list;F.document;F.comment;F.atRule;F.rule;F.decl;F.root;F.CssSyntaxError;F.Declaration;F.Container;F.Processor;F.Document;F.Comment;F.Warning;F.AtRule;F.Result;F.Input;F.Rule;F.Root;F.Node;var Iu=Object.defineProperty,xu=(s,e,t)=>e in s?Iu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,te=(s,e,t)=>xu(s,typeof e!=\"symbol\"?e+\"\":e,t);function Ou(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,\"default\")?s.default:s}function Ru(s){if(s.__esModule)return s;var e=s.default;if(typeof e==\"function\"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,\"__esModule\",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var xs={exports:{}},T=String,Dn=function(){return{isColorSupported:!1,reset:T,bold:T,dim:T,italic:T,underline:T,inverse:T,hidden:T,strikethrough:T,black:T,red:T,green:T,yellow:T,blue:T,magenta:T,cyan:T,white:T,gray:T,bgBlack:T,bgRed:T,bgGreen:T,bgYellow:T,bgBlue:T,bgMagenta:T,bgCyan:T,bgWhite:T}};xs.exports=Dn();xs.exports.createColors=Dn;var Au=xs.exports;const Mu={},Eu=Object.freeze(Object.defineProperty({__proto__:null,default:Mu},Symbol.toStringTag,{value:\"Module\"})),ne=Ru(Eu);let fi=Au,pi=ne,Hr=class Ln extends Error{constructor(e,t,r,i,n,o){super(e),this.name=\"CssSyntaxError\",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!=\"undefined\"&&typeof r!=\"undefined\"&&(typeof t==\"number\"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ln)}setMessage(){this.message=this.plugin?this.plugin+\": \":\"\",this.message+=this.file?this.file:\"<css input>\",typeof this.line!=\"undefined\"&&(this.message+=\":\"+this.line+\":\"+this.column),this.message+=\": \"+this.reason}showSourceCode(e){if(!this.source)return\"\";let t=this.source;e==null&&(e=fi.isColorSupported),pi&&e&&(t=pi(t));let r=t.split(/\\r?\\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=fi.createColors(!0);l=d=>u(h(d)),a=d=>c(d)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,d=\" \"+(\" \"+h).slice(-o)+\" | \";if(h===this.line){let m=a(d.replace(/\\d/g,\" \"))+u.slice(0,this.column-1).replace(/[^\\t]/g,\" \");return l(\">\")+a(d)+u+`\n `+m+l(\"^\")}return\" \"+a(d)+u}).join(`\n`)}toString(){let e=this.showSourceCode();return e&&(e=`\n\n`+e+`\n`),this.name+\": \"+this.message+e}};var Os=Hr;Hr.default=Hr;var ot={};ot.isClean=Symbol(\"isClean\");ot.my=Symbol(\"my\");const di={after:`\n`,beforeClose:`\n`,beforeComment:`\n`,beforeDecl:`\n`,beforeOpen:\" \",beforeRule:`\n`,colon:\": \",commentLeft:\" \",commentRight:\" \",emptyBody:\"\",indent:\" \",semicolon:!1};function $u(s){return s[0].toUpperCase()+s.slice(1)}let Yr=class{constructor(e){this.builder=e}atrule(e,t){let r=\"@\"+e.name,i=e.params?this.rawValue(e,\"params\"):\"\";if(typeof e.raws.afterName!=\"undefined\"?r+=e.raws.afterName:i&&(r+=\" \"),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||\"\")+(t?\";\":\"\");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type===\"decl\"?r=this.raw(e,null,\"beforeDecl\"):e.type===\"comment\"?r=this.raw(e,null,\"beforeComment\"):t===\"before\"?r=this.raw(e,null,\"beforeRule\"):r=this.raw(e,null,\"beforeClose\");let i=e.parent,n=0;for(;i&&i.type!==\"root\";)n+=1,i=i.parent;if(r.includes(`\n`)){let o=this.raw(e,null,\"indent\");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,\"between\",\"beforeOpen\");this.builder(t+r+\"{\",e,\"start\");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,\"after\")):i=this.raw(e,\"after\",\"emptyBody\"),i&&this.builder(i),this.builder(\"}\",e,\"end\")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type===\"comment\";)t-=1;let r=this.raw(e,\"semicolon\");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,\"before\");o&&this.builder(o),this.stringify(n,t!==i||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\"),i=e.prop+r+this.rawValue(e,\"value\");e.important&&(i+=e.raws.important||\" !important\"),t&&(i+=\";\"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!=\"undefined\"))return i;let n=e.parent;if(r===\"before\"&&(!n||n.type===\"root\"&&n.first===e||n&&n.type===\"document\"))return\"\";if(!n)return di[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!=\"undefined\")return o.rawCache[r];if(r===\"before\"||r===\"after\")return this.beforeAfter(e,r);{let l=\"raw\"+$u(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i!=\"undefined\")return!1})}return typeof i==\"undefined\"&&(i=di[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!=\"undefined\")return t=r.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(i=>{if(typeof i.raws.before!=\"undefined\")return r=i.raws.before,r.includes(`\n`)&&(r=r.replace(/[^\\n]+$/,\"\")),!1}),typeof r==\"undefined\"?r=this.raw(t,null,\"beforeDecl\"):r&&(r=r.replace(/\\S/g,\"\")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!=\"undefined\")return r=i.raws.before,r.includes(`\n`)&&(r=r.replace(/[^\\n]+$/,\"\")),!1}),typeof r==\"undefined\"?r=this.raw(t,null,\"beforeRule\"):r&&(r=r.replace(/\\S/g,\"\")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!==\"decl\"&&(t=r.raws.between,typeof t!=\"undefined\"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!=\"undefined\")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(r=>{if(typeof r.raws.between!=\"undefined\")return t=r.raws.between.replace(/[^\\s:]/g,\"\"),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!=\"undefined\"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!=\"undefined\"){let n=r.raws.before.split(`\n`);return t=n[n.length-1],t=t.replace(/\\S/g,\"\"),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type===\"decl\"&&(t=r.raws.semicolon,typeof t!=\"undefined\"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.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)}};var Tn=Yr;Yr.default=Yr;let Nu=Tn;function Zr(s,e){new Nu(e).stringify(s)}var or=Zr;Zr.default=Zr;let{isClean:It,my:ku}=ot,Pu=Os,Du=Tn,Lu=or;function Jr(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r===\"proxyCache\")continue;let i=s[r],n=typeof i;r===\"parent\"&&n===\"object\"?e&&(t[r]=e):r===\"source\"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Jr(o,t)):(n===\"object\"&&i!==null&&(i=Jr(i)),t[r]=i)}return t}let Xr=class{constructor(e={}){this.raws={},this[It]=!1,this[ku]=!0;for(let t in e)if(t===\"nodes\"){this.nodes=[];for(let r of e[t])typeof r.clone==\"function\"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}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=Jr(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:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Pu(e)}getProxyProcessor(){return{get(e,t){return t===\"proxyOf\"?e:t===\"root\"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t===\"prop\"||t===\"value\"||t===\"name\"||t===\"params\"||t===\"important\"||t===\"text\")&&e.markDirty()),!0}}}markDirty(){if(this[It]){this[It]=!1;let e=this;for(;e=e.parent;)e[It]=!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){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`\n`?(i=1,n+=1):i+=1;return{column:i,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 i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}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}:typeof e.endIndex==\"number\"?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 Du().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 i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==\"document\";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o===\"parent\"||o===\"proxyCache\")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a==\"object\"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l==\"object\"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o===\"source\"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Lu){e.stringify&&(e=e.stringify);let t=\"\";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var ar=Xr;Xr.default=Xr;let Tu=ar,Kr=class extends Tu{constructor(e){e&&typeof e.value!=\"undefined\"&&typeof e.value!=\"string\"&&(e=ee(x({},e),{value:String(e.value)})),super(e),this.type=\"decl\"}get variable(){return this.prop.startsWith(\"--\")||this.prop[0]===\"$\"}};var lr=Kr;Kr.default=Kr;let _u=\"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\",Fu=(s,e=21)=>(t=e)=>{let r=\"\",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Uu=(s=21)=>{let e=\"\",t=s;for(;t--;)e+=_u[Math.random()*64|0];return e};var Bu={nanoid:Uu,customAlphabet:Fu};let{SourceMapConsumer:mi,SourceMapGenerator:gi}=ne,{existsSync:zu,readFileSync:Wu}=ne,{dirname:vr,join:Gu}=ne;function Vu(s){return Buffer?Buffer.from(s,\"base64\").toString():window.atob(s)}let Qr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,\"data:\");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=vr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new mi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\\/json;charset=utf-?8;base64,/,r=/^data:application\\/json;base64,/,i=/^data:application\\/json;charset=utf-?8,/,n=/^data:application\\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Vu(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\\/json;([^,]+),/)[1];throw new Error(\"Unsupported source map encoding \"+o)}getAnnotationURL(e){return e.replace(/^\\/\\*\\s*# sourceMappingURL=/,\"\").trim()}isMap(e){return typeof e!=\"object\"?!1:typeof e.mappings==\"string\"||typeof e._mappings==\"string\"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\\/\\*\\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf(\"*/\",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=vr(e),zu(e))return this.mapFile=e,Wu(e,\"utf-8\").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t==\"string\")return t;if(typeof t==\"function\"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error(\"Unable to load previous source map: \"+r.toString());return i}}else{if(t instanceof mi)return gi.fromSourceMap(t).toString();if(t instanceof gi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error(\"Unsupported previous source map format: \"+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Gu(vr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var _n=Qr;Qr.default=Qr;let{SourceMapConsumer:ju,SourceMapGenerator:Hu}=ne,{fileURLToPath:yi,pathToFileURL:xt}=ne,{isAbsolute:qr,resolve:es}=ne,{nanoid:Yu}=Bu,Ir=ne,wi=Os,Zu=_n,xr=Symbol(\"fromOffsetCache\"),Ju=!!(ju&&Hu),Si=!!(es&&qr),Zt=class{constructor(e,t={}){if(e===null||typeof e==\"undefined\"||typeof e==\"object\"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===\"\\uFEFF\"||this.css[0]===\"\\uFFFE\"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Si||/^\\w+:\\/\\//.test(t.from)||qr(t.from)?this.file=t.from:this.file=es(t.from)),Si&&Ju){let r=new Zu(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id=\"<input css \"+Yu(6)+\">\"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t==\"object\"){let u=t,c=r;if(typeof u.offset==\"number\"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset==\"number\"){let h=this.fromOffset(c.offset);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new wi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):n=new wi(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(xt&&(n.input.url=xt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[xr])r=this[xr];else{let n=this.css.split(`\n`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[xr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\\w+:\\/\\//.test(e)?e:es(this.map.consumer().sourceRoot||this.map.root||\".\",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r==\"number\"&&(l=n.originalPositionFor({column:i,line:r}));let a;qr(o.source)?a=xt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||xt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol===\"file:\")if(yi)u.file=yi(a);else throw new Error(\"file: protocol is not available in this PostCSS build\");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of[\"hasBOM\",\"css\",\"file\",\"id\"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=x({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var ur=Zt;Zt.default=Zt;Ir&&Ir.registerInput&&Ir.registerInput(Zt);let{SourceMapConsumer:Fn,SourceMapGenerator:Ft}=ne,{dirname:Ut,relative:Un,resolve:Bn,sep:zn}=ne,{pathToFileURL:bi}=ne,Xu=ur,Ku=!!(Fn&&Ft),Qu=!!(Ut&&Bn&&Un&&zn),qu=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e=\"data:application/json;base64,\"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==\"string\"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation==\"function\"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+\".map\";let t=`\n`;this.css.includes(`\\r\n`)&&(t=`\\r\n`),this.css+=t+\"/*# sourceMappingURL=\"+e+\" */\"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Ut(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Fn(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===\"comment\"&&e.text.indexOf(\"# sourceMappingURL=\")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\\n*?\\/\\*#[\\S\\s]*?\\*\\/$/gm,\"\"))}generate(){if(this.clearAnnotation(),Qu&&Ku&&this.isMap())return this.generateMap();{let e=\"\";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ft.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ft({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 Ft({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r=\"<no source>\",i={generated:{column:0,line:0},original:{column:0,line:0},source:\"\"},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!==\"end\"&&(i.generated.line=e,i.generated.column=t-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=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\\n/g),n?(e+=n.length,o=l.lastIndexOf(`\n`),t=l.length-o):t+=l.length,a&&u!==\"start\"){let c=a.parent||{raws:{}};(!(a.type===\"decl\"||a.type===\"atrule\"&&!a.nodes)||a!==c.last||c.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=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!=\"undefined\"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!=\"undefined\")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!=\"undefined\"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!=\"undefined\"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!=\"undefined\"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}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||e.charCodeAt(0)===60||/^\\w+:\\/\\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Ut(this.opts.to):\".\";typeof this.mapOpts.annotation==\"string\"&&(r=Ut(Bn(r,this.mapOpts.annotation)));let i=Un(r,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 Xu(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 i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):\"<no source>\";this.map.setSourceContent(t,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(bi){let r=bi(e).toString();return this.memoizedFileURLs.set(e,r),r}else 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;zn===\"\\\\\"&&(e=e.replace(/\\\\/g,\"/\"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Wn=qu;let ec=ar,ts=class extends ec{constructor(e){super(e),this.type=\"comment\"}};var cr=ts;ts.default=ts;let{isClean:Gn,my:Vn}=ot,jn=lr,Hn=cr,tc=ar,Yn,Rs,As,Zn;function Jn(s){return s.map(e=>(e.nodes&&(e.nodes=Jn(e.nodes)),delete e.source,e))}function Xn(s){if(s[Gn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Xn(e)}let pe=class Kn extends tc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}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=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}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){return t===\"proxyOf\"?e:e[t]?t===\"each\"||typeof t==\"string\"&&t.startsWith(\"walk\")?(...r)=>e[t](...r.map(i=>typeof i==\"function\"?(n,o)=>i(n.toProxy(),o):i)):t===\"every\"||t===\"some\"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t===\"root\"?()=>e.root().toProxy():t===\"nodes\"?e.nodes.map(r=>r.toProxy()):t===\"first\"||t===\"last\"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t===\"name\"||t===\"params\"||t===\"selector\")&&e.markDirty()),!0}}}index(e){return typeof e==\"number\"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?\"prepend\":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e==\"string\")e=Jn(Yn(e).nodes);else if(typeof e==\"undefined\")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,\"ignore\")}else if(e.type===\"root\"&&this.type!==\"document\"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,\"ignore\")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value==\"undefined\")throw new Error(\"Value field is missed in node creation\");typeof e.value!=\"string\"&&(e.value=String(e.value)),e=[new jn(e)]}else if(e.selector)e=[new Rs(e)];else if(e.name)e=[new As(e)];else if(e.text)e=[new Hn(e)];else throw new Error(\"Unknown node type in node creation\");return e.map(i=>(i[Vn]||Kn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Gn]&&Xn(i),typeof i.raws.before==\"undefined\"&&t&&typeof t.raws.before!=\"undefined\"&&(i.raws.before=t.raws.before.replace(/\\S/g,\"\")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,\"prepend\").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.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){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;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(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type===\"atrule\"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type===\"atrule\"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type===\"atrule\")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type===\"comment\")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type===\"decl\"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type===\"decl\"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type===\"decl\")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type===\"rule\"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type===\"rule\"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type===\"rule\")return t(r,i)}))}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]}};pe.registerParse=s=>{Yn=s};pe.registerRule=s=>{Rs=s};pe.registerAtRule=s=>{As=s};pe.registerRoot=s=>{Zn=s};var Ie=pe;pe.default=pe;pe.rebuild=s=>{s.type===\"atrule\"?Object.setPrototypeOf(s,As.prototype):s.type===\"rule\"?Object.setPrototypeOf(s,Rs.prototype):s.type===\"decl\"?Object.setPrototypeOf(s,jn.prototype):s.type===\"comment\"?Object.setPrototypeOf(s,Hn.prototype):s.type===\"root\"&&Object.setPrototypeOf(s,Zn.prototype),s[Vn]=!0,s.nodes&&s.nodes.forEach(e=>{pe.rebuild(e)})};let rc=Ie,Qn,qn,qe=class extends rc{constructor(e){super(x({type:\"document\"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Qn(new qn,this,e).stringify()}};qe.registerLazyResult=s=>{Qn=s};qe.registerProcessor=s=>{qn=s};var Ms=qe;qe.default=qe;let rs=class{constructor(e,t={}){if(this.type=\"warning\",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}};var eo=rs;rs.default=rs;let sc=eo,ss=class{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(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new sc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===\"warning\")}get content(){return this.css}};var Es=ss;ss.default=ss;const Or=39,Ci=34,Ot=92,vi=47,Rt=10,Ge=32,At=12,Mt=9,Et=13,ic=91,nc=93,oc=40,ac=41,lc=123,uc=125,cc=59,hc=42,fc=58,pc=64,$t=/[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g,Nt=/[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g,dc=/.[\\r\\n\"'(/\\\\]/,Ii=/[\\da-f]/i;var mc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,d,m,g,p=r.length,f=0,S=[],b=[];function y(){return f}function C(_){throw e.error(\"Unclosed \"+_,f)}function N(){return b.length===0&&f>=p}function D(_){if(b.length)return b.pop();if(f>=p)return;let G=_?_.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Rt:case Ge:case Mt:case Et:case At:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ge||n===Rt||n===Mt||n===Et||n===At);g=[\"space\",r.slice(f,o)],f=o-1;break}case ic:case nc:case lc:case uc:case fc:case cc:case ac:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case oc:{if(d=S.length?S.pop()[1]:\"\",m=r.charCodeAt(f+1),d===\"url\"&&m!==Or&&m!==Ci&&m!==Ge&&m!==Rt&&m!==Mt&&m!==At&&m!==Et){o=f;do{if(c=!1,o=r.indexOf(\")\",o+1),o===-1)if(i||G){o=f;break}else C(\"bracket\");for(h=o;r.charCodeAt(h-1)===Ot;)h-=1,c=!c}while(c);g=[\"brackets\",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(\")\",f+1),a=r.slice(f,o+1),o===-1||dc.test(a)?g=[\"(\",\"(\",f]:(g=[\"brackets\",a,f,o],f=o);break}case Or:case Ci:{l=n===Or?\"'\":'\"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||G){o=f+1;break}else C(\"string\");for(h=o;r.charCodeAt(h-1)===Ot;)h-=1,c=!c}while(c);g=[\"string\",r.slice(f,o+1),f,o],f=o;break}case pc:{$t.lastIndex=f+1,$t.test(r),$t.lastIndex===0?o=r.length-1:o=$t.lastIndex-2,g=[\"at-word\",r.slice(f,o+1),f,o],f=o;break}case Ot:{for(o=f,u=!0;r.charCodeAt(o+1)===Ot;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==vi&&n!==Ge&&n!==Rt&&n!==Mt&&n!==Et&&n!==At&&(o+=1,Ii.test(r.charAt(o)))){for(;Ii.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ge&&(o+=1)}g=[\"word\",r.slice(f,o+1),f,o],f=o;break}default:{n===vi&&r.charCodeAt(f+1)===hc?(o=r.indexOf(\"*/\",f+2)+1,o===0&&(i||G?o=r.length:C(\"comment\")),g=[\"comment\",r.slice(f,o+1),f,o],f=o):(Nt.lastIndex=f+1,Nt.test(r),Nt.lastIndex===0?o=r.length-1:o=Nt.lastIndex-2,g=[\"word\",r.slice(f,o+1),f,o],S.push(g),f=o);break}}return f++,g}function H(_){b.push(_)}return{back:H,endOfFile:N,nextToken:D,position:y}};let to=Ie,Jt=class extends to{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)}};var $s=Jt;Jt.default=Jt;to.registerAtRule(Jt);let ro=Ie,so,io,De=class extends ro{constructor(e){super(e),this.type=\"root\",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r===\"prepend\")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new so(new io,this,e).stringify()}};De.registerLazyResult=s=>{so=s};De.registerProcessor=s=>{io=s};var at=De;De.default=De;ro.registerRoot(De);let et={comma(s){return et.split(s,[\",\"],!0)},space(s){let e=[\" \",`\n`,\" \"];return et.split(s,e)},split(s,e,t){let r=[],i=\"\",n=!1,o=0,l=!1,a=\"\",u=!1;for(let c of s)u?u=!1:c===\"\\\\\"?u=!0:l?c===a&&(l=!1):c==='\"'||c===\"'\"?(l=!0,a=c):c===\"(\"?o+=1:c===\")\"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==\"\"&&r.push(i.trim()),i=\"\",n=!1):i+=c;return(t||i!==\"\")&&r.push(i.trim()),r}};var no=et;et.default=et;let oo=Ie,gc=no,Xt=class extends oo{constructor(e){super(e),this.type=\"rule\",this.nodes||(this.nodes=[])}get selectors(){return gc.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)}};var Ns=Xt;Xt.default=Xt;oo.registerRule(Xt);let yc=lr,wc=mc,Sc=cr,bc=$s,Cc=at,xi=Ns;const Oi={empty:!0,space:!0};function vc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Ic=class{constructor(e){this.input=e,this.root=new Cc,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=new bc;t.name=e[1].slice(1),t.name===\"\"&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r===\"(\"||r===\"[\"?u.push(r===\"(\"?\")\":\"]\"):r===\"{\"&&u.length>0?u.push(\"}\"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===\";\"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r===\"{\"){l=!0;break}else if(r===\"}\"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]===\"space\";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,\"params\",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=\"\")):(t.raws.afterName=\"\",t.params=\"\"),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!==\"space\"&&(r+=1,r===2)));n--);throw this.input.error(\"Missed semicolon\",i[0]===\"word\"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i===\"(\"&&(t+=1),i===\")\"&&(t-=1),t===0&&i===\":\")if(!n)this.doubleColon(r);else{if(n[0]===\"word\"&&n[1]===\"progid\")continue;return o}n=r}return!1}comment(e){let t=new Sc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\\s*$/.test(r))t.text=\"\",t.raws.left=r,t.raws.right=\"\";else{let i=r.match(/^(\\s*)([^]*\\S)(\\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=wc(this.input)}decl(e,t){let r=new yc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===\";\"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||vc(e)),r.source.end.offset++;e[0][0]!==\"word\";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop=\"\";e.length;){let u=e[0][0];if(u===\":\"||u===\"space\"||u===\"comment\")break;r.prop+=e.shift()[1]}r.raws.between=\"\";let n;for(;e.length;)if(n=e.shift(),n[0]===\":\"){r.raws.between+=n[1];break}else n[0]===\"word\"&&/\\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]===\"_\"||r.prop[0]===\"*\")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!==\"space\"&&l!==\"comment\"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()===\"!important\"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==\" !important\"&&(r.raws.important=c);break}else if(n[1].toLowerCase()===\"important\"){let c=e.slice(0),h=\"\";for(let d=u;d>0;d--){let m=c[d][0];if(h.trim().indexOf(\"!\")===0&&m!==\"space\")break;h=c.pop()[1]+h}h.trim().indexOf(\"!\")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!==\"space\"&&n[0]!==\"comment\")break}e.some(u=>u[0]!==\"space\"&&u[0]!==\"comment\")&&(r.raws.between+=o.map(u=>u[1]).join(\"\"),o=[]),this.raw(r,\"value\",o.concat(e),t),r.value.includes(\":\")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error(\"Double colon\",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new xi;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 t=this.current.nodes[this.current.nodes.length-1];t&&t.type===\"rule\"&&!t.raws.ownSemicolon&&(t.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=\"\",e.type!==\"comment\"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith(\"--\"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r===\"(\"||r===\"[\")n||(n=u),o.push(r===\"(\"?\")\":\"]\");else if(l&&i&&r===\"{\")n||(n=u),o.push(\"}\");else if(o.length===0)if(r===\";\")if(i){this.decl(a,l);return}else break;else if(r===\"{\"){this.rule(a);return}else if(r===\"}\"){this.tokenizer.back(a.pop()),t=!0;break}else r===\":\"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!==\"space\"&&u!==\"comment\"));)this.tokenizer.back(a.pop());this.decl(a,l)}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);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a=\"\",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],o=n[0],o===\"space\"&&d===l-1&&!i?u=!1:o===\"comment\"?(h=r[d-1]?r[d-1][0]:\"empty\",c=r[d+1]?r[d+1][0]:\"empty\",!Oi[h]&&!Oi[c]?a.slice(-1)===\",\"?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let d=r.reduce((m,g)=>m+g[1],\"\");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new xi;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],!(t!==\"space\"&&t!==\"comment\"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r=\"\";for(;e.length&&(t=e[0][0],!(t!==\"space\"&&t!==\"comment\"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r=\"\";for(;e.length&&(t=e[e.length-1][0],t===\"space\");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r=\"\";for(let i=t;i<e.length;i++)r+=e[i][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})}};var xc=Ic;let Oc=Ie,Rc=xc,Ac=ur;function Kt(s,e){let t=new Ac(s,e),r=new Rc(t);try{r.parse()}catch(i){throw i}return r.root}var ks=Kt;Kt.default=Kt;Oc.registerParse(Kt);let{isClean:ce,my:Mc}=ot,Ec=Wn,$c=or,Nc=Ie,kc=Ms;let Ri=Es,Pc=ks,Dc=at;const Lc={atrule:\"AtRule\",comment:\"Comment\",decl:\"Declaration\",document:\"Document\",root:\"Root\",rule:\"Rule\"},Tc={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},_c={Once:!0,postcssPlugin:!0,prepare:!0},Le=0;function Ve(s){return typeof s==\"object\"&&typeof s.then==\"function\"}function ao(s){let e=!1,t=Lc[s.type];return s.type===\"decl\"?e=s.prop.toLowerCase():s.type===\"atrule\"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+\"-\"+e,Le,t+\"Exit\",t+\"Exit-\"+e]:e?[t,t+\"-\"+e,t+\"Exit\",t+\"Exit-\"+e]:s.append?[t,Le,t+\"Exit\"]:[t,t+\"Exit\"]}function Ai(s){let e;return s.type===\"document\"?e=[\"Document\",Le,\"DocumentExit\"]:s.type===\"root\"?e=[\"Root\",Le,\"RootExit\"]:e=ao(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function is(s){return s[ce]=!1,s.nodes&&s.nodes.forEach(e=>is(e)),s}let ns={},Te=class lo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t==\"object\"&&t!==null&&(t.type===\"root\"||t.type===\"document\"))i=is(t);else if(t instanceof lo||t instanceof Ri)i=is(t.root),t.map&&(typeof r.map==\"undefined\"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Pc;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Mc]&&Nc.rebuild(i)}this.result=new Ri(e,i,r),this.helpers=ee(x({},ns),{postcss:ns,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n==\"object\"&&n.prepare?x(x({},n),n.prepare(this.result)):n)}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{t&&t.addToError(e),this.error=e,e.name===\"CssSyntaxError\"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t==\"object\")for(let r in t){if(!Tc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!_c[r])if(typeof t[r]==\"object\")for(let i in t[r])i===\"*\"?e(t,r,t[r][i]):e(t,r+\"-\"+i.toLowerCase(),t[r][i]);else typeof t[r]==\"function\"&&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(Ve(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];){e[ce]=!0;let t=[Ai(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ve(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type===\"document\"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==\"object\"&&e.Once){if(this.result.root.type===\"document\"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ve(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e==\"function\")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=$c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Ec(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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){let t=this.runOnRoot(e);if(Ve(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];)e[ce]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type===\"document\")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!==\"root\"&&t.type!==\"document\"&&!t.parent)return!0;if(Ve(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!==\"root\"&&r.type!==\"document\"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ce]){l[ce]=!0,e.push(Ai(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Le){r.nodes&&r.nodes.length&&(r[ce]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ce]=!0;let t=ao(e);for(let r of t)if(r===Le)e.nodes&&e.each(i=>{i[ce]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.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\"}};Te.registerPostcss=s=>{ns=s};var uo=Te;Te.default=Te;Dc.registerLazyResult(Te);kc.registerLazyResult(Te);let Fc=Wn,Uc=or;let Bc=ks;const zc=Es;let os=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Uc;this.result=new zc(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,\"root\",{get(){return o.root}});let l=new Fc(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.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 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=Bc;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return\"NoWorkResult\"}};var Wc=os;os.default=os;let Gc=Wc,Vc=uo,jc=Ms,Hc=at,tt=class{constructor(e=[]){this.version=\"8.4.38\",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r==\"object\"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r==\"object\"&&r.postcssPlugin)t.push(r);else if(typeof r==\"function\")t.push(r);else if(!(typeof r==\"object\"&&(r.parse||r.stringify)))throw new Error(r+\" is not a PostCSS plugin\");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Gc(this,e,t):new Vc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Yc=tt;tt.default=tt;Hc.registerProcessor(tt);jc.registerProcessor(tt);let Zc=lr,Jc=_n,Xc=cr,Kc=$s,Qc=ur,qc=at,eh=Ns;function rt(s,e){if(Array.isArray(s))return s.map(o=>rt(o));let i=s,{inputs:t}=i,r=xe(i,[\"inputs\"]);if(t){e=[];for(let o of t){let l=ee(x({},o),{__proto__:Qc.prototype});l.map&&(l.map=ee(x({},l.map),{__proto__:Jc.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>rt(o,e))),r.source){let n=r.source,{inputId:o}=n,l=xe(n,[\"inputId\"]);r.source=l,o!=null&&(r.source.input=e[o])}if(r.type===\"root\")return new qc(r);if(r.type===\"decl\")return new Zc(r);if(r.type===\"rule\")return new eh(r);if(r.type===\"comment\")return new Xc(r);if(r.type===\"atrule\")return new Kc(r);throw new Error(\"Unknown node type: \"+s.type)}var th=rt;rt.default=rt;let rh=Os,co=lr,sh=uo,ih=Ie,Ps=Yc,nh=or,oh=th,ho=Ms,ah=eo,fo=cr,po=$s,lh=Es,uh=ur,ch=ks,hh=no,mo=Ns,go=at,fh=ar;function $(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ps(s)}$.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!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+`: \\u91CC\\u9762 postcss.plugin \\u88AB\\u5F03\\u7528. \\u8FC1\\u79FB\\u6307\\u5357:\nhttps://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Ps().version,l}let n;return Object.defineProperty(i,\"postcss\",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return $([i(a)]).process(o,l)},i};$.stringify=nh;$.parse=ch;$.fromJSON=oh;$.list=hh;$.comment=s=>new fo(s);$.atRule=s=>new po(s);$.decl=s=>new co(s);$.rule=s=>new mo(s);$.root=s=>new go(s);$.document=s=>new ho(s);$.CssSyntaxError=rh;$.Declaration=co;$.Container=ih;$.Processor=Ps;$.Document=ho;$.Comment=fo;$.Warning=ah;$.AtRule=po;$.Result=lh;$.Input=uh;$.Rule=mo;$.Root=go;$.Node=fh;sh.registerPostcss($);var ph=$;$.default=$;const U=Ou(ph);U.stringify;U.fromJSON;U.plugin;U.parse;U.list;U.document;U.comment;U.atRule;U.rule;U.decl;U.root;U.CssSyntaxError;U.Declaration;U.Container;U.Processor;U.Document;U.Comment;U.Warning;U.AtRule;U.Result;U.Input;U.Rule;U.Root;U.Node;class Ds{constructor(...e){te(this,\"parentElement\",null),te(this,\"parentNode\",null),te(this,\"ownerDocument\"),te(this,\"firstChild\",null),te(this,\"lastChild\",null),te(this,\"previousSibling\",null),te(this,\"nextSibling\",null),te(this,\"ELEMENT_NODE\",1),te(this,\"TEXT_NODE\",3),te(this,\"nodeType\"),te(this,\"nodeName\"),te(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){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;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 Mi={Node:[\"childNodes\",\"parentNode\",\"parentElement\",\"textContent\"],ShadowRoot:[\"host\",\"styleSheets\"],Element:[\"shadowRoot\",\"querySelector\",\"querySelectorAll\"],MutationObserver:[]},Ei={Node:[\"contains\",\"getRootNode\"],ShadowRoot:[\"getSelection\"],Element:[],MutationObserver:[\"constructor\"]},kt={},dh=()=>!!globalThis.Zone;function Ls(s){if(kt[s])return kt[s];const e=globalThis[s],t=e.prototype,r=s in Mi?Mi[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes(\"[native code]\"))})),n=s in Ei?Ei[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]==\"function\"&&((a=t[l])==null?void 0:a.toString().includes(\"[native code]\"))}));if(i&&o&&!dh())return kt[s]=e.prototype,e.prototype;try{const l=document.createElement(\"iframe\");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?kt[s]=u:t}catch(l){return t}}const Rr={};function ge(s,e,t){var r;const i=`${s}.${String(t)}`;if(Rr[i])return Rr[i].call(e);const n=Ls(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Rr[i]=o,o.call(e)):e[t]}const Ar={};function yo(s,e,t){const r=`${s}.${String(t)}`;if(Ar[r])return Ar[r].bind(e);const n=Ls(s)[t];return typeof n!=\"function\"?e[t]:(Ar[r]=n,n.bind(e))}function mh(s){return ge(\"Node\",s,\"childNodes\")}function gh(s){return ge(\"Node\",s,\"parentNode\")}function yh(s){return ge(\"Node\",s,\"parentElement\")}function wh(s){return ge(\"Node\",s,\"textContent\")}function Sh(s,e){return yo(\"Node\",s,\"contains\")(e)}function bh(s){return yo(\"Node\",s,\"getRootNode\")()}function Ch(s){return!s||!(\"host\"in s)?null:ge(\"ShadowRoot\",s,\"host\")}function vh(s){return s.styleSheets}function Ih(s){return!s||!(\"shadowRoot\"in s)?null:ge(\"Element\",s,\"shadowRoot\")}function xh(s,e){return ge(\"Element\",s,\"querySelector\")(e)}function Oh(s,e){return ge(\"Element\",s,\"querySelectorAll\")(e)}function wo(){return Ls(\"MutationObserver\").constructor}const v={childNodes:mh,parentNode:gh,parentElement:yh,textContent:wh,contains:Sh,getRootNode:bh,host:Ch,styleSheets:vh,shadowRoot:Ih,querySelector:xh,querySelectorAll:Oh,mutationObserver:wo};function J(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Re=`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 $i={map:{},getId(){return console.error(Re),-1},getNode(){return console.error(Re),null},removeNodeFromMap(){console.error(Re)},has(){return console.error(Re),!1},reset(){console.error(Re)}};typeof window!=\"undefined\"&&window.Proxy&&window.Reflect&&($i=new Proxy($i,{get(s,e,t){return e===\"map\"&&console.error(Re),Reflect.get(s,e,t)}}));function st(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function hr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>hr(s,e,n||{},!0)}function Fe(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i==\"function\"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}let Qt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Qt=()=>new Date().getTime());function So(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=v.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=v.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function bo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Co(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function vo(s){return s?s.nodeType===s.ELEMENT_NODE?s:v.parentElement(s):null}function X(s,e,t,r){if(!s)return!1;const i=vo(s);if(!i)return!1;try{if(typeof e==\"string\"){if(i.classList.contains(e)||r&&i.closest(\".\"+e)!==null)return!0}else if(Gt(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Rh(s,e){return e.getId(s)!==-1}function Mr(s,e,t){return s.tagName===\"TITLE\"&&t.headTitleMutations?!0:e.getId(s)===Ze}function Io(s,e){if(je(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=v.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Io(r,e):!0}function as(s){return!!s.changedTouches}function Ah(s=window){\"NodeList\"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),\"DOMTokenList\"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function xo(s,e){return!!(s.nodeName===\"IFRAME\"&&e.getMeta(s))}function Oo(s,e){return!!(s.nodeName===\"LINK\"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute(\"rel\")===\"stylesheet\"&&e.getMeta(s))}function ls(s){return s?s instanceof Ds&&\"shadowRoot\"in s?!!s.shadowRoot:!!v.shadowRoot(s):!1}class Mh{constructor(){w(this,\"id\",1),w(this,\"styleIDMap\",new WeakMap),w(this,\"idStyleMap\",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=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 Ro(s){var e;let t=null;return\"getRootNode\"in s&&((e=v.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&v.host(v.getRootNode(s))&&(t=v.host(v.getRootNode(s))),t}function Eh(s){let e=s,t;for(;t=Ro(e);)e=t;return e}function $h(s){const e=s.ownerDocument;if(!e)return!1;const t=Eh(s);return v.contains(e,t)}function Ao(s){const e=s.ownerDocument;return e?v.contains(e,s)||$h(s):!1}var R=(s=>(s[s.DomContentLoaded=0]=\"DomContentLoaded\",s[s.Load=1]=\"Load\",s[s.FullSnapshot=2]=\"FullSnapshot\",s[s.IncrementalSnapshot=3]=\"IncrementalSnapshot\",s[s.Meta=4]=\"Meta\",s[s.Custom=5]=\"Custom\",s[s.Plugin=6]=\"Plugin\",s))(R||{}),I=(s=>(s[s.Mutation=0]=\"Mutation\",s[s.MouseMove=1]=\"MouseMove\",s[s.MouseInteraction=2]=\"MouseInteraction\",s[s.Scroll=3]=\"Scroll\",s[s.ViewportResize=4]=\"ViewportResize\",s[s.Input=5]=\"Input\",s[s.TouchMove=6]=\"TouchMove\",s[s.MediaInteraction=7]=\"MediaInteraction\",s[s.StyleSheetRule=8]=\"StyleSheetRule\",s[s.CanvasMutation=9]=\"CanvasMutation\",s[s.Font=10]=\"Font\",s[s.Log=11]=\"Log\",s[s.Drag=12]=\"Drag\",s[s.StyleDeclaration=13]=\"StyleDeclaration\",s[s.Selection=14]=\"Selection\",s[s.AdoptedStyleSheet=15]=\"AdoptedStyleSheet\",s[s.CustomElement=16]=\"CustomElement\",s))(I||{}),K=(s=>(s[s.MouseUp=0]=\"MouseUp\",s[s.MouseDown=1]=\"MouseDown\",s[s.Click=2]=\"Click\",s[s.ContextMenu=3]=\"ContextMenu\",s[s.DblClick=4]=\"DblClick\",s[s.Focus=5]=\"Focus\",s[s.Blur=6]=\"Blur\",s[s.TouchStart=7]=\"TouchStart\",s[s.TouchMove_Departed=8]=\"TouchMove_Departed\",s[s.TouchEnd=9]=\"TouchEnd\",s[s.TouchCancel=10]=\"TouchCancel\",s))(K||{}),he=(s=>(s[s.Mouse=0]=\"Mouse\",s[s.Pen=1]=\"Pen\",s[s.Touch=2]=\"Touch\",s))(he||{}),_e=(s=>(s[s[\"2D\"]=0]=\"2D\",s[s.WebGL=1]=\"WebGL\",s[s.WebGL2=2]=\"WebGL2\",s))(_e||{}),Ae=(s=>(s[s.Play=0]=\"Play\",s[s.Pause=1]=\"Pause\",s[s.Seeked=2]=\"Seeked\",s[s.VolumeChange=3]=\"VolumeChange\",s[s.RateChange=4]=\"RateChange\",s))(Ae||{}),Mo=(s=>(s[s.Document=0]=\"Document\",s[s.DocumentType=1]=\"DocumentType\",s[s.Element=2]=\"Element\",s[s.Text=3]=\"Text\",s[s.CDATA=4]=\"CDATA\",s[s.Comment=5]=\"Comment\",s))(Mo||{});function Ni(s){return\"__ln\"in s}class Nh{constructor(){w(this,\"length\",0),w(this,\"head\",null),w(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=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ni(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&&Ni(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;t.next===null&&(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 ki=(s,e)=>`${s}@${e}`;class kh{constructor(){w(this,\"frozen\",!1),w(this,\"locked\",!1),w(this,\"texts\",[]),w(this,\"attributes\",[]),w(this,\"attributeMap\",new WeakMap),w(this,\"removes\",[]),w(this,\"mapRemoves\",[]),w(this,\"movedMap\",{}),w(this,\"addedSet\",new Set),w(this,\"movedSet\",new Set),w(this,\"droppedSet\",new Set),w(this,\"removesSubTreeCache\",new Set),w(this,\"mutationCb\"),w(this,\"blockClass\"),w(this,\"blockSelector\"),w(this,\"maskTextClass\"),w(this,\"maskTextSelector\"),w(this,\"inlineStylesheet\"),w(this,\"maskInputOptions\"),w(this,\"maskTextFn\"),w(this,\"maskInputFn\"),w(this,\"keepIframeSrcFn\"),w(this,\"recordCanvas\"),w(this,\"inlineImages\"),w(this,\"slimDOMOptions\"),w(this,\"dataURLOptions\"),w(this,\"doc\"),w(this,\"mirror\"),w(this,\"iframeManager\"),w(this,\"stylesheetManager\"),w(this,\"shadowDomManager\"),w(this,\"canvasManager\"),w(this,\"processedNodeManager\"),w(this,\"unattachedDoc\"),w(this,\"processMutations\",e=>{e.forEach(this.processMutation),this.emit()}),w(this,\"emit\",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Nh,i=a=>{let u=a,c=Ze;for(;c===Ze;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{const u=v.parentNode(a);if(!u||!Ao(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){const g=u.tagName;if(g===\"TEXTAREA\")return;g===\"STYLE\"&&this.addedSet.has(u)&&(c=!0)}const h=je(u)?this.mirror.getId(Ro(a)):this.mirror.getId(u),d=i(a);if(h===-1||d===-1)return r.addNode(a);const m=Ee(a,{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:g=>{xo(g,this.mirror)&&this.iframeManager.addIframe(g),Oo(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),ls(a)&&this.shadowDomManager.addShadowRoot(v.shadowRoot(a),this.doc)},onIframeLoad:(g,p)=>{this.iframeManager.attachIframe(g,p),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,p)=>{this.stylesheetManager.attachLinkElement(g,p)},cssCaptured:c});m&&(e.push({parentId:h,nextId:d,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Pi(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(v.parentNode(a))||n(a);for(const a of this.addedSet)!Di(this.droppedSet,a)&&!Pi(this.removesSubTreeCache,a,this.mirror)||Di(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const u=this.mirror.getId(v.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(v.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){a=c;break}else{const m=c.value,g=v.parentNode(m);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=v.host(g);if(this.mirror.getId(p)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const u=a.node,c=v.parentNode(u);return c&&c.tagName===\"TEXTAREA\"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style==\"string\"){const c=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+h).split(\"var(\").length===u.style.split(\"var(\").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.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(l))}),w(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)),t.attributes.value=Array.from(v.childNodes(e),r=>v.textContent(r)||\"\").join(\"\")}),w(this,\"processMutation\",e=>{if(!Mr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case\"characterData\":{const t=v.textContent(e.target);!X(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Xi(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,vo(e.target)):t.replace(/[\\S]/g,\"*\"):t,node:e.target});break}case\"attributes\":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r===\"value\"){const o=fs(t);i=hs({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(X(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName===\"IFRAME\"&&r===\"src\"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r=\"rr_src\";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r===\"type\"&&t.tagName===\"INPUT\"&&(e.oldValue||\"\").toLowerCase()===\"password\"&&t.setAttribute(\"data-rr-is-password\",\"true\"),!Ji(t.tagName,r))if(n.attributes[r]=Zi(this.doc,Ce(t.tagName),Ce(r),i),r===\"style\"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement(\"span\");e.oldValue&&o.setAttribute(\"style\",e.oldValue);for(const l of Array.from(t.style)){const a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===\"\"?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(const l of Array.from(o.style))t.style.getPropertyValue(l)===\"\"&&(n.styleDiff[l]=!1)}else r===\"open\"&&t.tagName===\"DIALOG\"&&(t.matches(\"dialog:modal\")?n.attributes.rr_open_mode=\"modal\":n.attributes.rr_open_mode=\"non-modal\");break}case\"childList\":{if(X(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName===\"TEXTAREA\"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=je(e.target)?this.mirror.getId(v.host(e.target)):this.mirror.getId(e.target);X(e.target,this.blockClass,this.blockSelector,!1)||Mr(t,this.mirror,this.slimDOMOptions)||!Rh(t,this.mirror)||(this.addedSet.has(t)?(us(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Io(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ki(r,i)]?us(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:je(e.target)&&He(e.target)?!0:void 0}),Ph(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,\"genAdds\",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Mr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[ki(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);X(e,this.blockClass,this.blockSelector,!1)||(v.childNodes(e).forEach(r=>this.genAdds(r)),ls(e)&&v.childNodes(v.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){[\"mutationCb\",\"blockClass\",\"blockSelector\",\"maskTextClass\",\"maskTextSelector\",\"inlineStylesheet\",\"maskInputOptions\",\"maskTextFn\",\"maskInputFn\",\"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 us(s,e){s.delete(e),v.childNodes(e).forEach(t=>us(s,t))}function Ph(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),v.childNodes(r).forEach(i=>t.push(i)))}}function Pi(s,e,t){return s.size===0?!1:Dh(s,e)}function Dh(s,e,t){const r=v.parentNode(e);return r?s.has(r):!1}function Di(s,e){return s.size===0?!1:Eo(s,e)}function Eo(s,e){const t=v.parentNode(e);return t?s.has(t)?!0:Eo(s,t):!1}let Ye;function Lh(s){Ye=s}function Th(){Ye=void 0}const O=s=>Ye?(...t)=>{try{return s(...t)}catch(r){if(Ye&&Ye(r)===!0)return;throw r}}:s,be=[];function lt(s){try{if(\"composedPath\"in s){const e=s.composedPath();if(e.length)return e[0]}else if(\"path\"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function $o(s,e){const t=new kh;be.push(t),t.init(s);const r=new(wo())(O(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function _h({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove==\"number\"?e.mousemove:50,n=typeof e.mousemoveCallback==\"number\"?e.mousemoveCallback:500;let o=[],l;const a=st(O(h=>{const d=Date.now()-l;s(o.map(m=>(m.timeOffset-=d,m)),h),o=[],l=null}),n),u=O(st(O(h=>{const d=lt(h),{clientX:m,clientY:g}=as(h)?h.changedTouches[0]:h;l||(l=Qt()),o.push({x:m,y:g,id:r.getId(d),timeOffset:Qt()-l}),a(typeof DragEvent!=\"undefined\"&&h instanceof DragEvent?I.Drag:h instanceof MouseEvent?I.MouseMove:I.TouchMove)}),i,{trailing:!1})),c=[J(\"mousemove\",u,t),J(\"touchmove\",u,t),J(\"drag\",u,t)];return O(()=>{c.forEach(h=>h())})}function Fh({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const u=c=>h=>{const d=lt(h);if(X(d,r,i,!0))return;let m=null,g=c;if(\"pointerType\"in h){switch(h.pointerType){case\"mouse\":m=he.Mouse;break;case\"touch\":m=he.Touch;break;case\"pen\":m=he.Pen;break}m===he.Touch?K[c]===K.MouseDown?g=\"TouchStart\":K[c]===K.MouseUp&&(g=\"TouchEnd\"):he.Pen}else as(h)&&(m=he.Touch);m!==null?(a=m,(g.startsWith(\"Touch\")&&m===he.Touch||g.startsWith(\"Mouse\")&&m===he.Mouse)&&(m=null)):K[c]===K.Click&&(m=a,a=null);const p=as(h)?h.changedTouches[0]:h;if(!p)return;const f=t.getId(d),{clientX:S,clientY:b}=p;O(s)(x({type:K[g],id:f,x:S,y:b},m!==null&&{pointerType:m}))};return Object.keys(K).filter(c=>Number.isNaN(Number(c))&&!c.endsWith(\"_Departed\")&&o[c]!==!1).forEach(c=>{let h=Ce(c);const d=u(c);if(window.PointerEvent)switch(K[c]){case K.MouseDown:case K.MouseUp:h=h.replace(\"mouse\",\"pointer\");break;case K.TouchStart:case K.TouchEnd:return}l.push(J(h,d,e))}),O(()=>{l.forEach(c=>c())})}function No({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=O(st(O(l=>{const a=lt(l);if(!a||X(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const c=So(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return J(\"scroll\",o,e)}function Uh({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=O(st(O(()=>{const n=bo(),o=Co();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return J(\"resize\",i,e)}const Bh=[\"INPUT\",\"TEXTAREA\",\"SELECT\"],Li=new WeakMap;function zh({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function h(b){let y=lt(b);const C=b.isTrusted,N=y&&y.tagName;if(y&&N===\"OPTION\"&&(y=v.parentElement(y)),!y||!N||Bh.indexOf(N)<0||X(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let D=y.value,H=!1;const _=fs(y)||\"\";_===\"radio\"||_===\"checkbox\"?H=y.checked:(l[N.toLowerCase()]||l[_])&&(D=hs({element:y,maskInputOptions:l,tagName:N,type:_,value:D,maskInputFn:a})),d(y,c?{text:D,isChecked:H,userTriggered:C}:{text:D,isChecked:H});const G=y.name;_===\"radio\"&&G&&H&&e.querySelectorAll(`input[type=\"radio\"][name=\"${G}\"]`).forEach(Y=>{if(Y!==y){const Q=Y.value;d(Y,c?{text:Q,isChecked:!H,userTriggered:!1}:{text:Q,isChecked:!H})}})}function d(b,y){const C=Li.get(b);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Li.set(b,y);const N=t.getId(b);O(s)(ee(x({},y),{id:N}))}}const g=(u.input===\"last\"?[\"change\"]:[\"input\",\"change\"]).map(b=>J(b,O(h),e)),p=e.defaultView;if(!p)return()=>{g.forEach(b=>b())};const f=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,\"value\"),S=[[p.HTMLInputElement.prototype,\"value\"],[p.HTMLInputElement.prototype,\"checked\"],[p.HTMLSelectElement.prototype,\"value\"],[p.HTMLTextAreaElement.prototype,\"value\"],[p.HTMLSelectElement.prototype,\"selectedIndex\"],[p.HTMLOptionElement.prototype,\"selected\"]];return f&&f.set&&g.push(...S.map(b=>hr(b[0],b[1],{set(){O(h)({target:this,isTrusted:!1})}},!1,p))),O(()=>{g.forEach(b=>b())})}function qt(s){const e=[];function t(r,i){if(Pt(\"CSSGroupingRule\")&&r.parentRule instanceof CSSGroupingRule||Pt(\"CSSMediaRule\")&&r.parentRule instanceof CSSMediaRule||Pt(\"CSSSupportsRule\")&&r.parentRule instanceof CSSSupportsRule||Pt(\"CSSConditionRule\")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function de(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Wh({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:O((c,h,d)=>{const[m,g]=d,{id:p,styleId:f}=de(h,e,t.styleMirror);return(p&&p!==-1||f&&f!==-1)&&s({id:p,styleId:f,adds:[{rule:m,index:g}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,d=this.cssRules.length){const m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,d])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:O((c,h,d)=>{const[m]=d,{id:g,styleId:p}=de(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,removes:[{index:m}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:O((c,h,d)=>{const[m]=d,{id:g,styleId:p}=de(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,replace:m}),c.apply(h,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:O((c,h,d)=>{const[m]=d,{id:g,styleId:p}=de(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,replaceSync:m}),c.apply(h,d)})}));const a={};Dt(\"CSSGroupingRule\")?a.CSSGroupingRule=r.CSSGroupingRule:(Dt(\"CSSMediaRule\")&&(a.CSSMediaRule=r.CSSMediaRule),Dt(\"CSSConditionRule\")&&(a.CSSConditionRule=r.CSSConditionRule),Dt(\"CSSSupportsRule\")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:O((d,m,g)=>{const[p,f]=g,{id:S,styleId:b}=de(m.parentStyleSheet,e,t.styleMirror);return(S&&S!==-1||b&&b!==-1)&&s({id:S,styleId:b,adds:[{rule:p,index:[...qt(m),f||0]}]}),d.apply(m,g)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:O((d,m,g)=>{const[p]=g,{id:f,styleId:S}=de(m.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||S&&S!==-1)&&s({id:f,styleId:S,removes:[{index:[...qt(m),p]}]}),d.apply(m,g)})})}),O(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function ko({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName===\"#document\"?o=s.getId(t):o=s.getId(v.host(t));const l=t.nodeName===\"#document\"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,\"adoptedStyleSheets\"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,\"adoptedStyleSheets\",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch(d){}return h}}),O(()=>{Object.defineProperty(t,\"adoptedStyleSheets\",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Gh({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:O((l,a,u)=>{var c;const[h,d,m]=u;if(t.has(h))return n.apply(a,[h,d,m]);const{id:g,styleId:p}=de((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,set:{property:h,value:d,priority:m},index:qt(a.parentRule)}),l.apply(a,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:O((l,a,u)=>{var c;const[h]=u;if(t.has(h))return o.apply(a,[h]);const{id:d,styleId:m}=de((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,remove:{property:h},index:qt(a.parentRule)}),l.apply(a,u)})}),O(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Vh({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=O(a=>st(O(u=>{const c=lt(u);if(!c||X(c,e,t,!0))return;const{currentTime:h,volume:d,muted:m,playbackRate:g,loop:p}=c;s({type:a,id:r.getId(c),currentTime:h,volume:d,muted:m,playbackRate:g,loop:p})}),i.media||500)),l=[J(\"play\",o(Ae.Play),n),J(\"pause\",o(Ae.Pause),n),J(\"seeked\",o(Ae.Seeked),n),J(\"volumechange\",o(Ae.VolumeChange),n),J(\"ratechange\",o(Ae.RateChange),n)];return O(()=>{l.forEach(a=>a())})}function jh({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){const h=new n(a,u,c);return i.set(h,{family:a,buffer:typeof u!=\"string\",descriptors:c,fontSource:typeof u==\"string\"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const o=Fe(e.fonts,\"add\",function(l){return function(a){return setTimeout(O(()=>{const u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),O(()=>{r.forEach(l=>l())})}function Hh(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=O(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){const d=a.getRangeAt(h),{startContainer:m,startOffset:g,endContainer:p,endOffset:f}=d;X(m,r,i,!0)||X(p,r,i,!0)||u.push({start:t.getId(m),startOffset:g,end:t.getId(p),endOffset:f})}n({ranges:u})});return l(),J(\"selectionchange\",l)}function Yh({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Fe(t.customElements,\"define\",function(i){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Zh(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:d,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},s.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},s.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},s.inputCb=(...p)=>{e.input&&e.input(...p),l(...p)},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),a(...p)},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),c(...p)},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},s.fontCb=(...p)=>{e.font&&e.font(...p),d(...p)},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),m(...p)},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),g(...p)}}function Jh(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Zh(s,e);let r;s.recordDOM&&(r=$o(s,s.doc));const i=_h(s),n=Fh(s),o=No(s),l=Uh(s,{win:t}),a=zh(s),u=Vh(s);let c=()=>{},h=()=>{},d=()=>{},m=()=>{};s.recordDOM&&(c=Wh(s,{win:t}),h=ko(s,s.doc),d=Gh(s,{win:t}),s.collectFonts&&(m=jh(s)));const g=Hh(s),p=Yh(s),f=[];for(const S of s.plugins)f.push(S.observer(S.callback,t,S.options));return O(()=>{be.forEach(S=>S.reset()),r==null||r.disconnect(),i(),n(),o(),l(),a(),u(),c(),h(),d(),m(),g(),p(),f.forEach(S=>S())})}function Pt(s){return typeof window[s]!=\"undefined\"}function Dt(s){return!!(typeof window[s]!=\"undefined\"&&window[s].prototype&&\"insertRule\"in window[s].prototype&&\"deleteRule\"in window[s].prototype)}class Ti{constructor(e){w(this,\"iframeIdToRemoteIdMap\",new WeakMap),w(this,\"iframeRemoteIdToIdMap\",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!=\"number\")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}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 Xh{constructor(e){w(this,\"iframes\",new WeakMap),w(this,\"crossOriginIframeMap\",new WeakMap),w(this,\"crossOriginIframeMirror\",new Ti(Yi)),w(this,\"crossOriginIframeStyleMirror\"),w(this,\"crossOriginIframeRootIdMap\",new WeakMap),w(this,\"mirror\"),w(this,\"mutationCb\"),w(this,\"wrappedEmit\"),w(this,\"loadListener\"),w(this,\"stylesheetManager\"),w(this,\"recordCrossOriginIframes\"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ti(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,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener(\"message\",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.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(t.data.type!==\"rrweb\"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:I.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,[\"id\",\"parentId\",\"previousId\",\"nextId\"]),t;case R.IncrementalSnapshot:switch(t.data.source){case I.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,[\"parentId\",\"nextId\",\"previousId\"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,[\"parentId\",\"id\"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,[\"id\"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,[\"id\"])}),t;case I.Drag:case I.TouchMove:case I.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,[\"id\"])}),t;case I.ViewportResize:return!1;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(t.data,e,[\"id\"]),t;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(t.data,e,[\"id\"]),this.replaceStyleIds(t.data,e,[\"styleId\"]),t;case I.Font:return t;case I.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,[\"start\",\"end\"])}),t;case I.AdoptedStyleSheet:return this.replaceIds(t.data,e,[\"id\"]),this.replaceStyleIds(t.data,e,[\"styleIds\"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,[\"styleId\"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!=\"number\"||(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(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Mo.Document&&!e.rootId&&(e.rootId=t),\"childNodes\"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Kh{constructor(e){w(this,\"shadowDoms\",new WeakSet),w(this,\"mutationCb\"),w(this,\"scrollCb\"),w(this,\"bypassOptions\"),w(this,\"mirror\"),w(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(!He(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=$o(ee(x({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(No(ee(x({},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(v.host(e))),this.restoreHandlers.push(ko({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(Fe(e.prototype,\"attachShadow\",function(i){return function(n){const o=i.call(this,n),l=v.shadowRoot(this);return l&&Ao(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var $e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",Qh=typeof Uint8Array==\"undefined\"?[]:new Uint8Array(256);for(var Lt=0;Lt<$e.length;Lt++)Qh[$e.charCodeAt(Lt)]=Lt;var qh=function(s){var e=new Uint8Array(s),t,r=e.length,i=\"\";for(t=0;t<r;t+=3)i+=$e[e[t]>>2],i+=$e[(e[t]&3)<<4|e[t+1]>>4],i+=$e[(e[t+1]&15)<<2|e[t+2]>>6],i+=$e[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+\"=\":r%3===1&&(i=i.substring(0,i.length-2)+\"==\"),i};const _i=new Map;function ef(s,e){let t=_i.get(s);return t||(t=new Map,_i.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Po=(s,e,t)=>{if(!s||!(Lo(s,e)||typeof s==\"object\"))return;const r=s.constructor.name,i=ef(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Bt(s,e,t){if(s instanceof Array)return s.map(r=>Bt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=qh(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Bt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r=\"HTMLImageElement\",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Bt(s.data,e,t),s.width,s.height]};if(Lo(s,e)||typeof s==\"object\"){const r=s.constructor.name,i=Po(s,e,t);return{rr_type:r,index:i}}}}return s}const Do=(s,e,t)=>s.map(r=>Bt(r,e,t)),Lo=(s,e)=>!![\"WebGLActiveInfo\",\"WebGLBuffer\",\"WebGLFramebuffer\",\"WebGLProgram\",\"WebGLRenderbuffer\",\"WebGLShader\",\"WebGLShaderPrecisionFormat\",\"WebGLTexture\",\"WebGLUniformLocation\",\"WebGLVertexArrayObject\",\"WebGLVertexArrayObjectOES\"].filter(i=>typeof e[i]==\"function\").find(i=>s instanceof e[i]);function tf(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!=\"function\")continue;const l=Fe(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return X(this.canvas,t,r,!0)||setTimeout(()=>{const c=Do(u,e,this);s(this.canvas,{type:_e[\"2D\"],property:o,args:c})},0),a.apply(this,u)}});i.push(l)}catch(l){const a=hr(e.CanvasRenderingContext2D.prototype,o,{set(u){s(this.canvas,{type:_e[\"2D\"],property:o,args:[u],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function rf(s){return s===\"experimental-webgl\"?\"webgl\":s}function Fi(s,e,t,r){const i=[];try{const n=Fe(s.HTMLCanvasElement.prototype,\"getContext\",function(o){return function(l,...a){if(!X(this,e,t,!0)){const u=rf(l);if(\"__context\"in this||(this.__context=u),r&&[\"webgl\",\"webgl2\"].includes(u))if(a[0]&&typeof a[0]==\"object\"){const c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch(n){console.error(\"failed to patch HTMLCanvasElement.prototype.getContext\")}return()=>{i.forEach(n=>n())}}function Ui(s,e,t,r,i,n){const o=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(![\"isContextLost\",\"canvas\",\"drawingBufferWidth\",\"drawingBufferHeight\"].includes(a))try{if(typeof s[a]!=\"function\")continue;const u=Fe(s,a,function(c){return function(...h){const d=c.apply(this,h);if(Po(d,n,this),\"tagName\"in this.canvas&&!X(this.canvas,r,i,!0)){const m=Do(h,n,this),g={type:e,property:a,args:m};t(this.canvas,g)}return d}});o.push(u)}catch(u){const c=hr(s,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(c)}return o}function sf(s,e,t,r){const i=[];return i.push(...Ui(e.WebGLRenderingContext.prototype,_e.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!=\"undefined\"&&i.push(...Ui(e.WebGL2RenderingContext.prototype,_e.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const To=\"KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=\",nf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Bi=typeof window!=\"undefined\"&&window.Blob&&new Blob([nf(To)],{type:\"text/javascript;charset=utf-8\"});function of(s){let e;try{if(e=Bi&&(window.URL||window.webkitURL).createObjectURL(Bi),!e)throw\"\";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener(\"error\",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker(\"data:text/javascript;base64,\"+To,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class af{constructor(e){w(this,\"pendingCanvasMutations\",new Map),w(this,\"rafStamps\",{latestId:0,invokeId:null}),w(this,\"mirror\"),w(this,\"mutationCb\"),w(this,\"resetObservers\"),w(this,\"frozen\",!1),w(this,\"locked\",!1),w(this,\"processMutation\",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});const{sampling:t=\"all\",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t===\"all\"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t==\"number\"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}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,i,n){const o=Fi(t,r,i,!0),l=new Map,a=new of;a.onmessage=g=>{const{id:p}=g.data;if(l.set(p,!1),!(\"base64\"in g.data))return;const{base64:f,type:S,width:b,height:y}=g.data;this.mutationCb({id:p,type:_e[\"2D\"],commands:[{property:\"clearRect\",args:[0,0,b,y]},{property:\"drawImage\",args:[{rr_type:\"ImageBitmap\",args:[{rr_type:\"Blob\",data:[{rr_type:\"ArrayBuffer\",base64:f}],type:S}]},0,0]}]})};const u=1e3/e;let c=0,h;const d=()=>{const g=[];return t.document.querySelectorAll(\"canvas\").forEach(p=>{X(p,r,i,!0)||g.push(p)}),g},m=g=>{if(c&&g-c<u){h=requestAnimationFrame(m);return}c=g,d().forEach(async p=>{var f;const S=this.mirror.getId(p);if(l.get(S)||p.width===0||p.height===0)return;if(l.set(S,!0),[\"webgl\",\"webgl2\"].includes(p.__context)){const y=p.getContext(p.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=await createImageBitmap(p);a.postMessage({id:S,bitmap:b,width:p.width,height:p.height,dataURLOptions:n.dataURLOptions},[b])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Fi(e,t,r,!1),n=tf(this.processMutation.bind(this),e,t,r),o=sf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),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||t===-1)return;const i=r.map(o=>{const u=o,{type:l}=u;return xe(u,[\"type\"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class lf{constructor(e){w(this,\"trackedLinkElements\",new WeakSet),w(this,\"mutationCb\"),w(this,\"adoptedStyleSheetCb\"),w(this,\"styleMirror\",new Mh),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(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Vi(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class uf{constructor(){w(this,\"nodeMap\",new WeakMap),w(this,\"active\",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==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 W,zt,Er,er=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement(\"iframe\");document.body.appendChild(s),Array.from=((Gs=s.contentWindow)==null?void 0:Gs.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug(\"Unable to override Array.from\",s)}const se=ua();function ut(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i=\"rr-block\",blockSelector:n=null,ignoreClass:o=\"rr-ignore\",ignoreSelector:l=null,maskTextClass:a=\"rr-mask\",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:d,slimDOMOptions:m,maskInputFn:g,maskTextFn:p,hooks:f,packFn:S,sampling:b={},dataURLOptions:y={},mousemoveWait:C,recordDOM:N=!0,recordCanvas:D=!1,recordCrossOriginIframes:H=!1,recordAfter:_=s.recordAfter===\"DOMContentLoaded\"?s.recordAfter:\"load\",userTriggeredOnInput:G=!1,collectFonts:Y=!1,inlineImages:Q=!1,plugins:oe,keepIframeSrcFn:A=()=>!1,ignoreCSSAttributes:Ue=new Set([]),errorHandler:Be}=s;Lh(Be);const V=H?window.parent===window:!0;let q=!1;if(!V)try{window.parent.document&&(q=!1)}catch(M){q=!0}if(V&&!e)throw new Error(\"emit function is required\");if(!V&&!q)return()=>{};C!==void 0&&b.mousemove===void 0&&(b.mousemove=C),se.reset();const ye=h===!0?{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}:d!==void 0?d:{password:!0},ae=m===!0||m===\"all\"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m===\"all\",headMetaDescKeywords:m===\"all\",headTitleMutations:m===\"all\"}:m||{};Ah();let Ts,fr=0;const _s=M=>{for(const re of oe||[])re.eventProcessor&&(M=re.eventProcessor(M));return S&&!q&&(M=S(M)),M};W=(M,re)=>{var B;const z=M;if(z.timestamp=Qt(),(B=be[0])!=null&&B.isFrozen()&&z.type!==R.FullSnapshot&&!(z.type===R.IncrementalSnapshot&&z.data.source===I.Mutation)&&be.forEach(le=>le.unfreeze()),V)e==null||e(_s(z),re);else if(q){const le={type:\"rrweb\",event:_s(z),origin:window.location.origin,isCheckout:re};window.parent.postMessage(le,\"*\")}if(z.type===R.FullSnapshot)Ts=z,fr=0;else if(z.type===R.IncrementalSnapshot){if(z.data.source===I.Mutation&&z.data.isAttachIframe)return;fr++;const le=r&&fr>=r,k=t&&z.timestamp-Ts.timestamp>t;(le||k)&&zt(!0)}};const ct=M=>{W({type:R.IncrementalSnapshot,data:x({source:I.Mutation},M)})},Fs=M=>W({type:R.IncrementalSnapshot,data:x({source:I.Scroll},M)}),Us=M=>W({type:R.IncrementalSnapshot,data:x({source:I.CanvasMutation},M)}),_o=M=>W({type:R.IncrementalSnapshot,data:x({source:I.AdoptedStyleSheet},M)}),we=new lf({mutationCb:ct,adoptedStyleSheetCb:_o}),Se=new Xh({mirror:se,mutationCb:ct,stylesheetManager:we,recordCrossOriginIframes:H,wrappedEmit:W});for(const M of oe||[])M.getMirror&&M.getMirror({nodeMirror:se,crossOriginIframeMirror:Se.crossOriginIframeMirror,crossOriginIframeStyleMirror:Se.crossOriginIframeStyleMirror});const pr=new uf;Er=new af({recordCanvas:D,mutationCb:Us,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:b.canvas,dataURLOptions:y});const ht=new Kh({mutationCb:ct,scrollCb:Fs,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:ye,dataURLOptions:y,maskTextFn:p,maskInputFn:g,recordCanvas:D,inlineImages:Q,sampling:b,slimDOMOptions:ae,iframeManager:Se,stylesheetManager:we,canvasManager:Er,keepIframeSrcFn:A,processedNodeManager:pr},mirror:se});zt=(M=!1)=>{if(!N)return;W({type:R.Meta,data:{href:window.location.href,width:Co(),height:bo()}},M),we.reset(),ht.init(),be.forEach(B=>B.lock());const re=Pa(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:ye,maskTextFn:p,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:D,inlineImages:Q,onSerialize:B=>{xo(B,se)&&Se.addIframe(B),Oo(B,se)&&we.trackLinkElement(B),ls(B)&&ht.addShadowRoot(v.shadowRoot(B),document)},onIframeLoad:(B,z)=>{Se.attachIframe(B,z),ht.observeAttachShadow(B)},onStylesheetLoad:(B,z)=>{we.attachLinkElement(B,z)},keepIframeSrcFn:A});if(!re)return console.warn(\"Failed to snapshot the document\");W({type:R.FullSnapshot,data:{node:re,initialOffset:So(window)}},M),be.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&we.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))};try{const M=[],re=z=>{var le;return O(Jh)({mutationCb:ct,mousemoveCb:(k,dr)=>W({type:R.IncrementalSnapshot,data:{source:dr,positions:k}}),mouseInteractionCb:k=>W({type:R.IncrementalSnapshot,data:x({source:I.MouseInteraction},k)}),scrollCb:Fs,viewportResizeCb:k=>W({type:R.IncrementalSnapshot,data:x({source:I.ViewportResize},k)}),inputCb:k=>W({type:R.IncrementalSnapshot,data:x({source:I.Input},k)}),mediaInteractionCb:k=>W({type:R.IncrementalSnapshot,data:x({source:I.MediaInteraction},k)}),styleSheetRuleCb:k=>W({type:R.IncrementalSnapshot,data:x({source:I.StyleSheetRule},k)}),styleDeclarationCb:k=>W({type:R.IncrementalSnapshot,data:x({source:I.StyleDeclaration},k)}),canvasMutationCb:Us,fontCb:k=>W({type:R.IncrementalSnapshot,data:x({source:I.Font},k)}),selectionCb:k=>{W({type:R.IncrementalSnapshot,data:x({source:I.Selection},k)})},customElementCb:k=>{W({type:R.IncrementalSnapshot,data:x({source:I.CustomElement},k)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:ye,inlineStylesheet:c,sampling:b,recordDOM:N,recordCanvas:D,inlineImages:Q,userTriggeredOnInput:G,collectFonts:Y,doc:z,maskInputFn:g,maskTextFn:p,keepIframeSrcFn:A,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:se,iframeManager:Se,stylesheetManager:we,shadowDomManager:ht,processedNodeManager:pr,canvasManager:Er,ignoreCSSAttributes:Ue,plugins:((le=oe==null?void 0:oe.filter(k=>k.observer))==null?void 0:le.map(k=>({observer:k.observer,options:k.options,callback:dr=>W({type:R.Plugin,data:{plugin:k.name,payload:dr}})})))||[]},f)};Se.addLoadListener(z=>{try{M.push(re(z.contentDocument))}catch(le){console.warn(le)}});const B=()=>{zt(),M.push(re(document)),er=!0};return document.readyState===\"interactive\"||document.readyState===\"complete\"?B():(M.push(J(\"DOMContentLoaded\",()=>{W({type:R.DomContentLoaded,data:{}}),_===\"DOMContentLoaded\"&&B()})),M.push(J(\"load\",()=>{W({type:R.Load,data:{}}),_===\"load\"&&B()},window))),()=>{M.forEach(z=>z()),pr.destroy(),er=!1,Th()}}catch(M){console.warn(M)}}ut.addCustomEvent=(s,e)=>{if(!er)throw new Error(\"please add custom event after start recording\");W({type:R.Custom,data:{tag:s,payload:e}})};ut.freezePage=()=>{be.forEach(s=>s.freeze())};ut.takeFullSnapshot=s=>{if(!er)throw new Error(\"please take full snapshot after start recording\");zt(s)};ut.mirror=se;var zi;(function(s){s[s.NotStarted=0]=\"NotStarted\",s[s.Running=1]=\"Running\",s[s.Stopped=2]=\"Stopped\"})(zi||(zi={}));exports.record=ut;\nif (typeof module.exports == \"object\" && typeof exports == \"object\") {\n var __cp = (to, from, except, desc) => {\n if ((from && typeof from === \"object\") || typeof from === \"function\") {\n for (let key of Object.getOwnPropertyNames(from)) {\n if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except)\n Object.defineProperty(to, key, {\n get: () => from[key],\n enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable,\n });\n }\n }\n return to;\n };\n module.exports = __cp(module.exports, exports);\n}\nreturn module.exports;\n}))\n//# sourceMappingURL=record.umd.min.cjs.map");
3346
3347
  return true;
3347
3348
  })) {
3348
- logger$23.error("Failed to load session recorder");
3349
+ logger$24.error("Failed to load session recorder");
3349
3350
  return;
3350
3351
  }
3351
3352
  try {
3352
3353
  await castedPage.evaluate(injectScript, sessionRecordingOptions);
3353
3354
  } catch (error) {
3354
- logger$23.debug("Failed to inject session recorder: " + errorMessage(error));
3355
+ logger$24.debug("Failed to inject session recorder: " + errorMessage(error));
3355
3356
  }
3356
3357
  }
3357
3358
  };
3358
3359
  const cleanStagehandLLMClient = (llmClient) => Object.fromEntries(Object.entries(llmClient).filter(([key]) => key !== "client").map(([key, value]) => key === "clientOptions" ? [key, Object.fromEntries(Object.entries(value).filter(([key]) => key !== "apiKey"))] : [key, value]));
3359
- const prettyPrintZodSchema = (schema, indent = 2) => {
3360
+ const zodKind = (schema) => {
3360
3361
  const def = schema?._def;
3361
- if (!def || def.typeName !== "ZodObject") throw new Error("Not a Zod object schema");
3362
+ if (typeof def?.typeName === "string") return def.typeName.replace(/^Zod/, "").toLowerCase();
3363
+ return typeof def?.type === "string" ? def.type : void 0;
3364
+ };
3365
+ const zodToJsonSchemaCompat = (schema) => schema?._zod ? z.toJSONSchema(schema, { unrepresentable: "any" }) : zodToJsonSchema(schema);
3366
+ const prettyPrintZodSchema = (schema, indent = 2) => {
3367
+ if (zodKind(schema) !== "object") throw new Error("Not a Zod object schema");
3362
3368
  const indentString = " ".repeat(indent);
3363
3369
  const shape = schema.shape;
3364
3370
  return `z.object({\n${Object.entries(shape).map(([key, value]) => {
3365
3371
  const getBaseType = (val) => {
3366
3372
  const valDef = val?._def;
3367
3373
  if (!valDef) return "z.unknown()";
3368
- const typeName = valDef.typeName;
3369
- if (typeName === "ZodString") return "z.string()";
3370
- if (typeName === "ZodNumber") return "z.number()";
3371
- if (typeName === "ZodBoolean") return "z.boolean()";
3372
- if (typeName === "ZodArray") {
3373
- const elementType = valDef.type;
3374
- if (elementType?._def?.typeName === "ZodObject") return `z.array(${prettyPrintZodSchema(elementType)})`;
3374
+ const typeName = zodKind(val);
3375
+ if (typeName === "string") return "z.string()";
3376
+ if (typeName === "number") return "z.number()";
3377
+ if (typeName === "boolean") return "z.boolean()";
3378
+ if (typeName === "array") {
3379
+ const elementType = valDef.element ?? valDef.type;
3380
+ if (zodKind(elementType) === "object") return `z.array(${prettyPrintZodSchema(elementType)})`;
3375
3381
  else return `z.array(${getBaseType(elementType)})`;
3376
3382
  }
3377
- if (typeName === "ZodObject") return prettyPrintZodSchema(val);
3378
- if (typeName === "ZodEnum") {
3379
- const enumValues = valDef.values;
3383
+ if (typeName === "object") return prettyPrintZodSchema(val);
3384
+ if (typeName === "enum") {
3385
+ const enumValues = valDef.entries ? Object.values(valDef.entries) : valDef.values;
3380
3386
  if (Array.isArray(enumValues)) return `z.enum([${enumValues.map((v) => `'${v}'`).join(", ")}])`;
3381
3387
  return "z.enum([...])";
3382
3388
  }
3383
- if (typeName === "ZodLiteral") {
3384
- const literalValue = valDef.value;
3389
+ if (typeName === "literal") {
3390
+ const literalValue = Array.isArray(valDef.values) ? valDef.values[0] : valDef.value;
3385
3391
  if (typeof literalValue === "string") return `z.literal('${literalValue}')`;
3386
3392
  return `z.literal(${literalValue})`;
3387
3393
  }
3388
- if (typeName === "ZodUnion") {
3394
+ if (typeName === "union") {
3389
3395
  const options = valDef.options;
3390
3396
  if (Array.isArray(options)) return `z.union([${options.map(getBaseType).join(", ")}])`;
3391
3397
  return "z.union([...])";
3392
3398
  }
3393
- if (typeName === "ZodDate") return "z.date()";
3394
- if (typeName === "ZodRecord") {
3399
+ if (typeName === "date") return "z.date()";
3400
+ if (typeName === "record") {
3395
3401
  const keyType = valDef.keyType;
3396
3402
  const valueType = valDef.valueType;
3397
3403
  let keyTypeStr = "z.string()";
3398
- if (keyType && keyType._def?.typeName !== "ZodString") keyTypeStr = getBaseType(keyType);
3404
+ if (keyType && zodKind(keyType) !== "string") keyTypeStr = getBaseType(keyType);
3399
3405
  let valueTypeStr = "z.any()";
3400
3406
  if (valueType) valueTypeStr = getBaseType(valueType);
3401
3407
  return `z.record(${keyTypeStr}, ${valueTypeStr})`;
3402
3408
  }
3403
- if (typeName === "ZodMap") {
3409
+ if (typeName === "map") {
3404
3410
  const keyType = valDef.keyType;
3405
3411
  const valueType = valDef.valueType;
3406
3412
  let keyTypeStr = "z.any()";
@@ -3409,26 +3415,26 @@ const prettyPrintZodSchema = (schema, indent = 2) => {
3409
3415
  if (valueType) valueTypeStr = getBaseType(valueType);
3410
3416
  return `z.map(${keyTypeStr}, ${valueTypeStr})`;
3411
3417
  }
3412
- if (typeName === "ZodTuple") {
3418
+ if (typeName === "tuple") {
3413
3419
  const items = valDef.items;
3414
3420
  if (Array.isArray(items)) return `z.tuple([${items.map((item) => getBaseType(item)).join(", ")}])`;
3415
3421
  return "z.tuple([])";
3416
3422
  }
3417
- if (typeName === "ZodNullable") return `${getBaseType(valDef.innerType)}.nullable()`;
3418
- if (typeName === "ZodOptional") return `${getBaseType(valDef.innerType)}.optional()`;
3423
+ if (typeName === "nullable") return `${getBaseType(valDef.innerType)}.nullable()`;
3424
+ if (typeName === "optional") return `${getBaseType(valDef.innerType)}.optional()`;
3419
3425
  return "z.any()";
3420
3426
  };
3421
3427
  const applyModifiers = (val, baseType) => {
3422
3428
  let result = baseType;
3423
3429
  let currentVal = val;
3424
- if (currentVal?._def?.typeName === "ZodNullable") {
3430
+ if (zodKind(currentVal) === "nullable") {
3425
3431
  result = `${getBaseType(currentVal._def.innerType)}.nullable()`;
3426
3432
  currentVal = currentVal._def.innerType;
3427
3433
  }
3428
- if (currentVal?._def?.typeName === "ZodOptional") {
3434
+ if (zodKind(currentVal) === "optional") {
3429
3435
  if (!result.endsWith(".nullable()")) result = `${getBaseType(currentVal._def.innerType)}.optional()`;
3430
3436
  }
3431
- const description = val?._def?.description;
3437
+ const description = val?.description;
3432
3438
  if (typeof description === "string") result += `.describe('${description.replace(/'/g, "\\'")}')`;
3433
3439
  return result;
3434
3440
  };
@@ -3617,7 +3623,7 @@ async function sendEvents(chunk, client, chunkBuffers, sessionId, traceId) {
3617
3623
  try {
3618
3624
  const { batchId, chunkIndex, totalChunks, data } = chunk;
3619
3625
  if (!sessionId || !traceId) {
3620
- logger$23.debug("Missing sessionId or traceId in chunk");
3626
+ logger$24.debug("Missing sessionId or traceId in chunk");
3621
3627
  return;
3622
3628
  }
3623
3629
  if (!chunkBuffers.has(batchId)) chunkBuffers.set(batchId, {
@@ -3636,7 +3642,7 @@ async function sendEvents(chunk, client, chunkBuffers, sessionId, traceId) {
3636
3642
  traceId,
3637
3643
  events
3638
3644
  }).catch((error) => {
3639
- logger$23.debug("Failed to send events: " + errorMessage(error));
3645
+ logger$24.debug("Failed to send events: " + errorMessage(error));
3640
3646
  });
3641
3647
  chunkBuffers.delete(batchId);
3642
3648
  }
@@ -3644,15 +3650,15 @@ async function sendEvents(chunk, client, chunkBuffers, sessionId, traceId) {
3644
3650
  const toDelete = [];
3645
3651
  for (const [bid, buffer] of chunkBuffers.entries()) if (currentTime - buffer.timestamp > OLD_BUFFER_TIMEOUT) toDelete.push(bid);
3646
3652
  for (const bid of toDelete) {
3647
- logger$23.debug(`Cleaning up incomplete chunk buffer: ${bid}`);
3653
+ logger$24.debug(`Cleaning up incomplete chunk buffer: ${bid}`);
3648
3654
  chunkBuffers.delete(bid);
3649
3655
  }
3650
3656
  } catch (error) {
3651
- logger$23.debug("Could not send events: " + errorMessage(error));
3657
+ logger$24.debug("Could not send events: " + errorMessage(error));
3652
3658
  }
3653
3659
  }
3654
3660
  // src/browser/playwright.ts
3655
- const logger$22 = initializeLogger();
3661
+ const logger$23 = initializeLogger();
3656
3662
  const PLAYWRIGHT = "playwright";
3657
3663
  const observe$3 = instrumentedObserve(PLAYWRIGHT);
3658
3664
  var PlaywrightInstrumentation = class extends InstrumentationBase {
@@ -3763,7 +3769,7 @@ var PlaywrightInstrumentation = class extends InstrumentationBase {
3763
3769
  try {
3764
3770
  await injectSessionRecorder(page, this._sessionRecordingOptions);
3765
3771
  } catch (error) {
3766
- logger$22.error("Error in onLoad handler: " + errorMessage(error));
3772
+ logger$23.error("Error in onLoad handler: " + errorMessage(error));
3767
3773
  }
3768
3774
  });
3769
3775
  const chunkBuffers = /* @__PURE__ */ new Map();
@@ -3773,12 +3779,13 @@ var PlaywrightInstrumentation = class extends InstrumentationBase {
3773
3779
  await sendEvents(chunk, this._client, chunkBuffers, sessionId, traceId);
3774
3780
  });
3775
3781
  } catch (error) {
3776
- logger$22.debug("Could not expose function lmnrSendEvents: " + errorMessage(error));
3782
+ logger$23.debug("Could not expose function lmnrSendEvents: " + errorMessage(error));
3777
3783
  }
3778
3784
  }
3779
3785
  };
3780
3786
  // src/browser/stagehand/shared-llm-wrapper.ts
3781
3787
  const laminarObserve$2 = instrumentedObserve(STAGEHAND_PACKAGE);
3788
+ const logger$22 = initializeLogger();
3782
3789
  /**
3783
3790
  * Creates a wrapper function for LLM client's createChatCompletion method
3784
3791
  * that adds OpenTelemetry tracing with detailed span attributes.
@@ -3824,9 +3831,11 @@ const createLLMClientCreateChatCompletionWrapper = (globalLLMClientOptions) => (
3824
3831
  [`llm.request.functions.${index}.parameters`]: JSON.stringify(tool.parameters)
3825
3832
  });
3826
3833
  });
3827
- if (innerOptions.response_model?.schema) {
3828
- const schema = zodToJsonSchema(innerOptions.response_model.schema);
3834
+ if (innerOptions.response_model?.schema) try {
3835
+ const schema = zodToJsonSchemaCompat(innerOptions.response_model.schema);
3829
3836
  if (schema) span.setAttributes({ [`gen_ai.request.structured_output_schema`]: JSON.stringify(schema) });
3837
+ } catch (e) {
3838
+ logger$22.debug(`Failed to convert response JSON schema to span attribute: ${errorMessage(e)}`);
3830
3839
  }
3831
3840
  const result = await original.bind(this).apply(this, args);
3832
3841
  span.setAttributes({
@@ -6870,6 +6879,17 @@ const sanitizeMetadata = (metadata) => {
6870
6879
  if (!isRecord(metadata)) return {};
6871
6880
  return Object.fromEntries(Object.entries(metadata).map(([key, value]) => [key, metadataValue(value)]).filter(([, value]) => value !== void 0));
6872
6881
  };
6882
+ /**
6883
+ * Drops a chain payload's `messages` key. LangGraph passes the whole graph
6884
+ * state, conversation included, as every node's input and output. The
6885
+ * messages are already on the LLM spans, so repeating them on each chain span
6886
+ * only bloats the trace.
6887
+ */
6888
+ const withoutMessages = (payload) => {
6889
+ if (!isRecord(payload) || !("messages" in payload)) return payload;
6890
+ const { messages: _messages, ...rest } = payload;
6891
+ return rest;
6892
+ };
6873
6893
  const retrieverOutput = (documents) => {
6874
6894
  if (!Array.isArray(documents)) return [];
6875
6895
  return documents.map((document) => {
@@ -7014,13 +7034,13 @@ var LaminarCallbackHandler = class {
7014
7034
  tags,
7015
7035
  metadata
7016
7036
  });
7017
- if (span && this.traceContent) span.setInput(toJson(inputs));
7037
+ if (span && this.traceContent) span.setInput(toJson(withoutMessages(inputs)));
7018
7038
  });
7019
7039
  }
7020
7040
  handleChainEnd(outputs, runId) {
7021
7041
  dontThrow(() => {
7022
7042
  try {
7023
- this.setOutput(runId, outputs);
7043
+ this.setOutput(runId, withoutMessages(outputs));
7024
7044
  } finally {
7025
7045
  this.endRun(runId);
7026
7046
  }