🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
bumo rrweb (#932)
Goldflag560cee8eeed6
diff --git a/client/package-lock.json b/client/package-lock.jsonindex 90aecde21..c0616f4ff 100644--- a/client/package-lock.json+++ b/client/package-lock.json@@ -78,7 +78,7 @@"react-hot-toast": "^2.6.0","react-select": "5.10.2","react-syntax-highlighter": "^16.1.0",- "rrweb-player": "^2.0.0-alpha.11",+ "rrweb-player": "^2.0.0-alpha.20","tailwind-merge": "2.6.0","tailwindcss-animate": "1.0.7","unique-names-generator": "^4.7.1",@@ -144,7 +144,7 @@"version": "7.28.5","resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz","integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==",- "devOptional": true,+ "dev": true,"license": "MIT","engines": {"node": ">=6.9.0"@@ -154,7 +154,7 @@"version": "7.28.5","resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz","integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"@babel/code-frame": "^7.27.1",@@ -201,7 +201,7 @@"version": "7.27.2","resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz","integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"@babel/compat-data": "^7.27.2",@@ -240,7 +240,7 @@"version": "7.28.3","resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz","integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"@babel/helper-module-imports": "^7.27.1",@@ -276,7 +276,7 @@"version": "7.27.1","resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz","integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",- "devOptional": true,+ "dev": true,"license": "MIT","engines": {"node": ">=6.9.0"@@ -286,7 +286,7 @@"version": "7.28.4","resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz","integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"@babel/template": "^7.27.2",@@ -1683,30 +1683,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/annotations/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/annotations/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/axes": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/axes/-/axes-0.96.0.tgz",@@ -1787,30 +1763,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/axes/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/axes/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/bar": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/bar/-/bar-0.96.0.tgz",@@ -1898,30 +1850,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/bar/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/bar/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/calendar": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/calendar/-/calendar-0.96.0.tgz",@@ -2064,30 +1992,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/core/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/core/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/legends": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/legends/-/legends-0.96.0.tgz",@@ -2188,30 +2092,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/line/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/line/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/scales": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/scales/-/scales-0.96.0.tgz",@@ -2309,30 +2189,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/text/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/text/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/theming": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/theming/-/theming-0.96.0.tgz",@@ -2419,30 +2275,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/tooltip/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/tooltip/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/voronoi": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/voronoi/-/voronoi-0.96.0.tgz",@@ -4774,35 +4606,35 @@"license": "MIT"},"node_modules/@rrweb/packer": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/@rrweb/packer/-/packer-2.0.0-alpha.18.tgz",- "integrity": "sha512-rEXltE/gnflEv/NatVNPIp4/6EtVlPLSwzIbd4WPSMtQGvwZe5OfAAk/Y88HkbAwb1nHfdA3PtFGn2Epik4inQ==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/@rrweb/packer/-/packer-2.0.0-alpha.20.tgz",+ "integrity": "sha512-GsByg2olGZ2n3To6keFG604QAboipuXZvjYxO2wITSwARBf/sZdy6cbUEjF0RS+QnuTM5GaVXeQapNMLmpKbrA==","license": "MIT","dependencies": {- "@rrweb/types": "^2.0.0-alpha.18",+ "@rrweb/types": "^2.0.0-alpha.20","fflate": "^0.4.4"}},"node_modules/@rrweb/replay": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/@rrweb/replay/-/replay-2.0.0-alpha.18.tgz",- "integrity": "sha512-EGCdydiQHCEbh1j+EF7OupwRHD1/EnAYYF4ENBz4CReoH+jGsLKu0LT2962CWPnQttMvpxwzhmD5gFGf63Gm0g==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/@rrweb/replay/-/replay-2.0.0-alpha.20.tgz",+ "integrity": "sha512-VodsLb+C2bYNNVbb0U14tKLa9ctzUxYIlt9VnxPATWvfyXHLTku8BhRWptuW/iIjVjmG49LBoR1ilxw/HMiJ1w==","license": "MIT","dependencies": {- "@rrweb/types": "^2.0.0-alpha.18",- "rrweb": "^2.0.0-alpha.18"+ "@rrweb/types": "^2.0.0-alpha.20",+ "rrweb": "^2.0.0-alpha.20"}},"node_modules/@rrweb/types": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/@rrweb/types/-/types-2.0.0-alpha.18.tgz",- "integrity": "sha512-iMH3amHthJZ9x3gGmBPmdfim7wLGygC2GciIkw2A6SO8giSn8PHYtRT8OKNH4V+k3SZ6RSnYHcTQxBA7pSWZ3Q==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/@rrweb/types/-/types-2.0.0-alpha.20.tgz",+ "integrity": "sha512-RbnDgKxA/odwB1R4gF7eUUj+rdSrq6ROQJsnMw7MIsGzlbSYvJeZN8YY4XqU0G6sKJvXI6bSzk7w/G94jNwzhw==","license": "MIT"},"node_modules/@rrweb/utils": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/@rrweb/utils/-/utils-2.0.0-alpha.18.tgz",- "integrity": "sha512-qV8azQYo9RuwW4NGRtOiQfTBdHNL1B0Q//uRLMbCSjbaKqJYd88Js17Bdskj65a0Vgp2dwTLPIZ0gK47dfjfaA==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/@rrweb/utils/-/utils-2.0.0-alpha.20.tgz",+ "integrity": "sha512-MTQOmhPRe39C0fYaCnnVYOufQsyGzwNXpUStKiyFSfGLUJrzuwhbRoUAKR5w6W2j5XuA0bIz3ZDIBztkquOhLw==","license": "MIT"},"node_modules/@rtsao/scc": {@@ -5833,6 +5665,7 @@"version": "19.2.7","resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz","integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==",+ "dev": true,"license": "MIT","dependencies": {"csstype": "^3.2.2"@@ -5842,7 +5675,7 @@"version": "19.2.3","resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz","integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",- "devOptional": true,+ "dev": true,"license": "MIT","peerDependencies": {"@types/react": "^19.2.0"@@ -6974,7 +6807,7 @@"version": "4.28.1","resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz","integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",- "devOptional": true,+ "dev": true,"funding": [{"type": "opencollective",@@ -7240,7 +7073,7 @@"version": "2.0.0","resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz","integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/core-util-is": {@@ -7974,7 +7807,7 @@"version": "1.5.267","resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz","integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==",- "devOptional": true,+ "dev": true,"license": "ISC"},"node_modules/embla-carousel": {@@ -8211,7 +8044,7 @@"version": "3.2.0","resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz","integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",- "devOptional": true,+ "dev": true,"license": "MIT","engines": {"node": ">=6"@@ -9017,7 +8850,7 @@"version": "1.0.0-beta.2","resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz","integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",- "devOptional": true,+ "dev": true,"license": "MIT","engines": {"node": ">=6.9.0"@@ -10106,7 +9939,7 @@"version": "2.2.3","resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz","integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",- "devOptional": true,+ "dev": true,"license": "MIT","bin": {"json5": "lib/cli.js"@@ -10632,7 +10465,7 @@"version": "5.1.1","resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz","integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",- "devOptional": true,+ "dev": true,"license": "ISC","dependencies": {"yallist": "^3.0.2"@@ -11051,17 +10884,6 @@}}},- "node_modules/next-intl/node_modules/@swc/helpers": {- "version": "0.5.19",- "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.19.tgz",- "integrity": "sha512-QamiFeIK3txNjgUTNppE6MiG3p7TdninpZu0E0PbqVh1a9FNLT2FRhisaa4NcaX52XVhA5l7Pk58Ft7Sqi/2sA==",- "license": "Apache-2.0",- "optional": true,- "peer": true,- "dependencies": {- "tslib": "^2.8.0"- }- },"node_modules/next-themes": {"version": "0.4.6","resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.4.6.tgz",@@ -11110,7 +10932,7 @@"version": "2.0.27","resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz","integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/number-flow": {@@ -12072,45 +11894,45 @@"license": "MIT"},"node_modules/rrdom": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/rrdom/-/rrdom-2.0.0-alpha.18.tgz",- "integrity": "sha512-fSFzFFxbqAViITyYVA4Z0o5G6p1nEqEr/N8vdgSKie9Rn0FJxDSNJgjV0yiCIzcDs0QR+hpvgFhpbdZ6JIr5Nw==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/rrdom/-/rrdom-2.0.0-alpha.20.tgz",+ "integrity": "sha512-hoqjS4662LtBp82qEz9GrqU36UpEmCvTA2Hns3qdF7cklLFFy3G+0Th8hLytJENleHHWxsB5nWJ3eXz5mSRxdQ==","license": "MIT","dependencies": {- "rrweb-snapshot": "^2.0.0-alpha.18"+ "rrweb-snapshot": "^2.0.0-alpha.20"}},"node_modules/rrweb": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/rrweb/-/rrweb-2.0.0-alpha.18.tgz",- "integrity": "sha512-1mjZcB+LVoGSx1+i9E2ZdAP90fS3MghYVix2wvGlZvrgRuLCbTCCOZMztFCkKpgp7/EeCdYM4nIHJkKX5J1Nmg==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/rrweb/-/rrweb-2.0.0-alpha.20.tgz",+ "integrity": "sha512-CZKDlm+j1VA50Ko3gnMbpvguCAleljsTNXPnVk9aeNP8o6T6kolRbISHyDZpqZ4G+bdDLlQOignPP3jEsXs8Gg==","license": "MIT","dependencies": {- "@rrweb/types": "^2.0.0-alpha.18",- "@rrweb/utils": "^2.0.0-alpha.18",+ "@rrweb/types": "^2.0.0-alpha.20",+ "@rrweb/utils": "^2.0.0-alpha.20","@types/css-font-loading-module": "0.0.7","@xstate/fsm": "^1.4.0","base64-arraybuffer": "^1.0.1","mitt": "^3.0.0",- "rrdom": "^2.0.0-alpha.18",- "rrweb-snapshot": "^2.0.0-alpha.18"+ "rrdom": "^2.0.0-alpha.20",+ "rrweb-snapshot": "^2.0.0-alpha.20"}},"node_modules/rrweb-player": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/rrweb-player/-/rrweb-player-2.0.0-alpha.18.tgz",- "integrity": "sha512-v31QgtjR9Ei3JnyvaN/2THj6a/i+dG49LzHiUtHcfTIFi7ecVExmMq+QDctVxUsuwdPPTtEcslpQh2tbVbi/ow==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/rrweb-player/-/rrweb-player-2.0.0-alpha.20.tgz",+ "integrity": "sha512-3ZCv1ksUxuIOn3Vn/eWrwWs9Xy+4KVjISD+q26ZLfisZ3hZ0CPgYG3iC22pmmycIeMS2svOfvf7gPh7jExwpUA==","license": "MIT","dependencies": {- "@rrweb/packer": "^2.0.0-alpha.18",- "@rrweb/replay": "^2.0.0-alpha.18",+ "@rrweb/packer": "^2.0.0-alpha.20",+ "@rrweb/replay": "^2.0.0-alpha.20","@tsconfig/svelte": "^1.0.0"}},"node_modules/rrweb-snapshot": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/rrweb-snapshot/-/rrweb-snapshot-2.0.0-alpha.18.tgz",- "integrity": "sha512-hBHZL/NfgQX6wO1D9mpwqFu1NJPpim+moIcKhFEjVTZVRUfCln+LOugRc4teVTCISYHN8Cw5e2iNTWCSm+SkoA==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/rrweb-snapshot/-/rrweb-snapshot-2.0.0-alpha.20.tgz",+ "integrity": "sha512-YTNf9YVeaGRo/jxY3FKBge2c/Ojd/KTHmuWloUSB+oyPXuY73ZeeG873qMMmhIpqEn7hn7aBF1eWEQmP7wjf8A==","license": "MIT","dependencies": {"postcss": "^8.4.38"@@ -12237,7 +12059,7 @@"version": "6.3.1","resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz","integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",- "devOptional": true,+ "dev": true,"license": "ISC","bin": {"semver": "bin/semver.js"@@ -12961,7 +12783,7 @@"version": "5.9.3","resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz","integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",- "devOptional": true,+ "dev": true,"license": "Apache-2.0","bin": {"tsc": "bin/tsc",@@ -13068,7 +12890,7 @@"version": "1.2.2","resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.2.tgz","integrity": "sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA==",- "devOptional": true,+ "dev": true,"funding": [{"type": "opencollective",@@ -13350,7 +13172,7 @@"version": "3.1.1","resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz","integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",- "devOptional": true,+ "dev": true,"license": "ISC"},"node_modules/yaml": {diff --git a/client/package.json b/client/package.jsonindex f8d2dfeb5..1b6e296dc 100644--- a/client/package.json+++ b/client/package.json@@ -83,7 +83,7 @@"react-hot-toast": "^2.6.0","react-select": "5.10.2","react-syntax-highlighter": "^16.1.0",- "rrweb-player": "^2.0.0-alpha.11",+ "rrweb-player": "^2.0.0-alpha.20","tailwind-merge": "2.6.0","tailwindcss-animate": "1.0.7","unique-names-generator": "^4.7.1",diff --git a/server/package-lock.json b/server/package-lock.jsonindex 20c6cb6ad..694db14f0 100644--- a/server/package-lock.json+++ b/server/package-lock.json@@ -40,7 +40,7 @@"react": "19.2.1","react-dom": "19.2.1","resend": "^4.5.1",- "rrweb": "^2.0.0-alpha.11",+ "rrweb": "^2.0.0-alpha.20","sqlstring": "2.3.3","stripe": "18.1.0","twilio": "^5.8.0",@@ -82,7 +82,7 @@"version": "3.2.0","resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-3.2.0.tgz","integrity": "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"@csstools/css-calc": "^2.1.3",@@ -1064,7 +1064,7 @@"version": "5.1.0","resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz","integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==",- "devOptional": true,+ "dev": true,"funding": [{"type": "github",@@ -1084,7 +1084,7 @@"version": "2.1.4","resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz","integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==",- "devOptional": true,+ "dev": true,"funding": [{"type": "github",@@ -1108,7 +1108,7 @@"version": "3.1.0","resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz","integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==",- "devOptional": true,+ "dev": true,"funding": [{"type": "github",@@ -1136,7 +1136,7 @@"version": "3.0.5","resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz","integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==",- "devOptional": true,+ "dev": true,"funding": [{"type": "github",@@ -1159,7 +1159,7 @@"version": "3.0.4","resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz","integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==",- "devOptional": true,+ "dev": true,"funding": [{"type": "github",@@ -1235,6 +1235,7 @@"cpu": ["arm"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1251,6 +1252,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1267,6 +1269,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1283,6 +1286,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1299,6 +1303,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1315,6 +1320,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1331,6 +1337,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1347,6 +1354,7 @@"cpu": ["arm"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1363,6 +1371,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1379,6 +1388,7 @@"cpu": ["ia32"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1395,6 +1405,7 @@"cpu": ["loong64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1411,6 +1422,7 @@"cpu": ["mips64el"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1427,6 +1439,7 @@"cpu": ["ppc64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1443,6 +1456,7 @@"cpu": ["riscv64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1459,6 +1473,7 @@"cpu": ["s390x"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1475,6 +1490,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1491,6 +1507,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1507,6 +1524,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1523,6 +1541,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1539,6 +1558,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1555,6 +1575,7 @@"cpu": ["ia32"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1571,6 +1592,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1637,6 +1659,7 @@"cpu": ["ppc64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1653,6 +1676,7 @@"cpu": ["arm"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1669,6 +1693,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1685,6 +1710,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1701,6 +1727,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1717,6 +1744,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1733,6 +1761,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1749,6 +1778,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1765,6 +1795,7 @@"cpu": ["arm"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1781,6 +1812,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1797,6 +1829,7 @@"cpu": ["ia32"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1813,6 +1846,7 @@"cpu": ["loong64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1829,6 +1863,7 @@"cpu": ["mips64el"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1845,6 +1880,7 @@"cpu": ["ppc64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1861,6 +1897,7 @@"cpu": ["riscv64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1877,6 +1914,7 @@"cpu": ["s390x"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1893,6 +1931,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1909,6 +1948,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1925,6 +1965,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1941,6 +1982,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1957,6 +1999,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1973,6 +2016,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -1989,6 +2033,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -2005,6 +2050,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -2021,6 +2067,7 @@"cpu": ["ia32"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -2037,6 +2084,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -2328,7 +2376,7 @@"version": "0.3.13","resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz","integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"@jridgewell/sourcemap-codec": "^1.5.0",@@ -2339,7 +2387,7 @@"version": "3.1.2","resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz","integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",- "devOptional": true,+ "dev": true,"license": "MIT","engines": {"node": ">=6.0.0"@@ -2349,7 +2397,7 @@"version": "0.3.11","resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz","integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"@jridgewell/gen-mapping": "^0.3.5",@@ -2367,7 +2415,7 @@"version": "0.3.31","resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz","integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"@jridgewell/resolve-uri": "^3.1.0",@@ -3244,6 +3292,7 @@"cpu": ["arm"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3257,6 +3306,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3270,6 +3320,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3283,6 +3334,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3296,6 +3348,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3309,6 +3362,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3322,6 +3376,7 @@"cpu": ["arm"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3335,6 +3390,7 @@"cpu": ["arm"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3348,6 +3404,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3361,6 +3418,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3374,6 +3432,7 @@"cpu": ["loong64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3387,6 +3446,7 @@"cpu": ["ppc64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3400,6 +3460,7 @@"cpu": ["riscv64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3413,6 +3474,7 @@"cpu": ["riscv64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3426,6 +3488,7 @@"cpu": ["s390x"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3439,6 +3502,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3452,6 +3516,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3465,6 +3530,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3478,6 +3544,7 @@"cpu": ["arm64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3491,6 +3558,7 @@"cpu": ["ia32"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3504,6 +3572,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3517,6 +3586,7 @@"cpu": ["x64"],+ "dev": true,"license": "MIT","optional": true,"os": [@@ -3524,15 +3594,15 @@]},"node_modules/@rrweb/types": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/@rrweb/types/-/types-2.0.0-alpha.18.tgz",- "integrity": "sha512-iMH3amHthJZ9x3gGmBPmdfim7wLGygC2GciIkw2A6SO8giSn8PHYtRT8OKNH4V+k3SZ6RSnYHcTQxBA7pSWZ3Q==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/@rrweb/types/-/types-2.0.0-alpha.20.tgz",+ "integrity": "sha512-RbnDgKxA/odwB1R4gF7eUUj+rdSrq6ROQJsnMw7MIsGzlbSYvJeZN8YY4XqU0G6sKJvXI6bSzk7w/G94jNwzhw==","license": "MIT"},"node_modules/@rrweb/utils": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/@rrweb/utils/-/utils-2.0.0-alpha.18.tgz",- "integrity": "sha512-qV8azQYo9RuwW4NGRtOiQfTBdHNL1B0Q//uRLMbCSjbaKqJYd88Js17Bdskj65a0Vgp2dwTLPIZ0gK47dfjfaA==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/@rrweb/utils/-/utils-2.0.0-alpha.20.tgz",+ "integrity": "sha512-MTQOmhPRe39C0fYaCnnVYOufQsyGzwNXpUStKiyFSfGLUJrzuwhbRoUAKR5w6W2j5XuA0bIz3ZDIBztkquOhLw==","license": "MIT"},"node_modules/@rybbit/shared": {@@ -4582,7 +4652,7 @@"version": "8.15.0","resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz","integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",- "devOptional": true,+ "dev": true,"license": "MIT","bin": {"acorn": "bin/acorn"@@ -5390,7 +5460,7 @@"version": "2.20.3","resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz","integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/content-disposition": {@@ -5474,7 +5544,7 @@"version": "4.6.0","resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.6.0.tgz","integrity": "sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"@asamuzakjp/css-color": "^3.2.0",@@ -5504,7 +5574,7 @@"version": "5.0.0","resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz","integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"whatwg-mimetype": "^4.0.0",@@ -5550,7 +5620,7 @@"version": "10.6.0","resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz","integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/decompress-response": {@@ -5961,7 +6031,7 @@"version": "6.0.1","resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz","integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==",- "devOptional": true,+ "dev": true,"license": "BSD-2-Clause","engines": {"node": ">=0.12"@@ -6574,6 +6644,7 @@"version": "2.3.3","resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz","integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",+ "dev": true,"hasInstallScript": true,"license": "MIT","optional": true,@@ -6784,7 +6855,7 @@"version": "4.0.0","resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz","integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"whatwg-encoding": "^3.1.1"@@ -6902,7 +6973,7 @@"version": "0.6.3","resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz","integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"safer-buffer": ">= 2.1.2 < 3.0.0"@@ -7053,7 +7124,7 @@"version": "1.0.1","resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz","integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/is-standalone-pwa": {@@ -7110,7 +7181,7 @@"version": "2.6.1","resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz","integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==",- "devOptional": true,+ "dev": true,"license": "MIT","bin": {"jiti": "lib/jiti-cli.mjs"@@ -7157,7 +7228,7 @@"version": "26.1.0","resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz","integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"cssstyle": "^4.2.1",@@ -7445,7 +7516,7 @@"version": "10.4.3","resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz","integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",- "devOptional": true,+ "dev": true,"license": "ISC"},"node_modules/luxon": {@@ -7830,7 +7901,7 @@"version": "2.2.23","resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.23.tgz","integrity": "sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/object-inspect": {@@ -7967,7 +8038,7 @@"version": "7.3.0","resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz","integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"entities": "^6.0.0"@@ -8800,41 +8871,41 @@"license": "MIT"},"node_modules/rrdom": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/rrdom/-/rrdom-2.0.0-alpha.18.tgz",- "integrity": "sha512-fSFzFFxbqAViITyYVA4Z0o5G6p1nEqEr/N8vdgSKie9Rn0FJxDSNJgjV0yiCIzcDs0QR+hpvgFhpbdZ6JIr5Nw==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/rrdom/-/rrdom-2.0.0-alpha.20.tgz",+ "integrity": "sha512-hoqjS4662LtBp82qEz9GrqU36UpEmCvTA2Hns3qdF7cklLFFy3G+0Th8hLytJENleHHWxsB5nWJ3eXz5mSRxdQ==","license": "MIT","dependencies": {- "rrweb-snapshot": "^2.0.0-alpha.18"+ "rrweb-snapshot": "^2.0.0-alpha.20"}},"node_modules/rrweb": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/rrweb/-/rrweb-2.0.0-alpha.18.tgz",- "integrity": "sha512-1mjZcB+LVoGSx1+i9E2ZdAP90fS3MghYVix2wvGlZvrgRuLCbTCCOZMztFCkKpgp7/EeCdYM4nIHJkKX5J1Nmg==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/rrweb/-/rrweb-2.0.0-alpha.20.tgz",+ "integrity": "sha512-CZKDlm+j1VA50Ko3gnMbpvguCAleljsTNXPnVk9aeNP8o6T6kolRbISHyDZpqZ4G+bdDLlQOignPP3jEsXs8Gg==","license": "MIT","dependencies": {- "@rrweb/types": "^2.0.0-alpha.18",- "@rrweb/utils": "^2.0.0-alpha.18",+ "@rrweb/types": "^2.0.0-alpha.20",+ "@rrweb/utils": "^2.0.0-alpha.20","@types/css-font-loading-module": "0.0.7","@xstate/fsm": "^1.4.0","base64-arraybuffer": "^1.0.1","mitt": "^3.0.0",- "rrdom": "^2.0.0-alpha.18",- "rrweb-snapshot": "^2.0.0-alpha.18"+ "rrdom": "^2.0.0-alpha.20",+ "rrweb-snapshot": "^2.0.0-alpha.20"}},"node_modules/rrweb-cssom": {"version": "0.8.0","resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz","integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/rrweb-snapshot": {- "version": "2.0.0-alpha.18",- "resolved": "https://registry.npmjs.org/rrweb-snapshot/-/rrweb-snapshot-2.0.0-alpha.18.tgz",- "integrity": "sha512-hBHZL/NfgQX6wO1D9mpwqFu1NJPpim+moIcKhFEjVTZVRUfCln+LOugRc4teVTCISYHN8Cw5e2iNTWCSm+SkoA==",+ "version": "2.0.0-alpha.20",+ "resolved": "https://registry.npmjs.org/rrweb-snapshot/-/rrweb-snapshot-2.0.0-alpha.20.tgz",+ "integrity": "sha512-YTNf9YVeaGRo/jxY3FKBge2c/Ojd/KTHmuWloUSB+oyPXuY73ZeeG873qMMmhIpqEn7hn7aBF1eWEQmP7wjf8A==","license": "MIT","dependencies": {"postcss": "^8.4.38"@@ -8916,14 +8987,14 @@"version": "2.1.2","resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz","integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/saxes": {"version": "6.0.0","resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz","integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",- "devOptional": true,+ "dev": true,"license": "ISC","dependencies": {"xmlchars": "^2.2.0"@@ -9467,7 +9538,7 @@"version": "3.2.4","resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz","integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/tailwindcss": {@@ -9522,7 +9593,7 @@"version": "5.44.1","resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz","integrity": "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==",- "devOptional": true,+ "dev": true,"license": "BSD-2-Clause","dependencies": {"@jridgewell/source-map": "^0.3.3",@@ -9629,7 +9700,7 @@"version": "6.1.86","resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz","integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"tldts-core": "^6.1.86"@@ -9642,7 +9713,7 @@"version": "6.1.86","resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz","integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/to-regex-range": {@@ -9680,7 +9751,7 @@"version": "5.1.2","resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz","integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==",- "devOptional": true,+ "dev": true,"license": "BSD-3-Clause","dependencies": {"tldts": "^6.1.32"@@ -9693,7 +9764,7 @@"version": "5.1.1","resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz","integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"punycode": "^2.3.1"@@ -10045,7 +10116,7 @@"version": "5.0.0","resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz","integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"xml-name-validator": "^5.0.0"@@ -10080,7 +10151,7 @@"version": "7.0.0","resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz","integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",- "devOptional": true,+ "dev": true,"license": "BSD-2-Clause","engines": {"node": ">=12"@@ -10090,7 +10161,7 @@"version": "3.1.1","resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz","integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"iconv-lite": "0.6.3"@@ -10103,7 +10174,7 @@"version": "4.0.0","resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz","integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==",- "devOptional": true,+ "dev": true,"license": "MIT","engines": {"node": ">=18"@@ -10113,7 +10184,7 @@"version": "14.2.0","resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz","integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==",- "devOptional": true,+ "dev": true,"license": "MIT","dependencies": {"tr46": "^5.1.0",@@ -10277,7 +10348,7 @@"version": "5.0.0","resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz","integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==",- "devOptional": true,+ "dev": true,"license": "Apache-2.0","engines": {"node": ">=18"@@ -10296,7 +10367,7 @@"version": "2.2.0","resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz","integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/xtend": {diff --git a/server/package.json b/server/package.jsonindex e44c9c1ce..d0701389e 100644--- a/server/package.json+++ b/server/package.json@@ -55,7 +55,7 @@"react": "19.2.1","react-dom": "19.2.1","resend": "^4.5.1",- "rrweb": "^2.0.0-alpha.11",+ "rrweb": "^2.0.0-alpha.20","sqlstring": "2.3.3","stripe": "18.1.0","twilio": "^5.8.0",diff --git a/server/public/rrweb.min.js b/server/public/rrweb.min.jsindex 3b5cf25f9..4660d5f60 100644--- a/server/public/rrweb.min.js+++ b/server/public/rrweb.min.js@@ -1,19 +1,98 @@-var rrweb=function(re){"use strict";var N;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(N||(N={}));function Bt(t){return t.nodeType===t.ELEMENT_NODE}function Pe(t){var e=t?.host;return Boolean(e?.shadowRoot===t)}function We(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function mn(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t}function fn(t){var e=t.cssText;if(e.split('"').length<3)return e;var r=["@import","url(".concat(JSON.stringify(t.href),")")];return t.layerName===""?r.push("layer"):t.layerName&&r.push("layer(".concat(t.layerName,")")),t.supportsText&&r.push("supports(".concat(t.supportsText,")")),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function Ye(t){try{var e=t.rules||t.cssRules;return e?mn(Array.from(e).map(Gt).join("")):null}catch{return null}}function Gt(t){var e;if(gn(t))try{e=Ye(t.styleSheet)||fn(t)}catch{}return yn(e||t.cssText)}function yn(t){if(t.includes(":")){var e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}return t}function gn(t){return"styleSheet"in t}var dt=function(){function t(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return t.prototype.getId=function(e){var r;if(!e)return-1;var n=(r=this.getMeta(e))===null||r===void 0?void 0:r.id;return n??-1},t.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},t.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},t.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.prototype.removeNodeFromMap=function(e){var r=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(o){return r.removeNodeFromMap(o)})},t.prototype.has=function(e){return this.idNodeMap.has(e)},t.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},t.prototype.add=function(e,r){var n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)},t.prototype.replace=function(e,r){var n=this.getNode(e);if(n){var o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(r,o)}this.idNodeMap.set(e,r)},t.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function jt(){return new dt}function ht(t){var e=t.element,r=t.maskInputOptions,n=t.tagName,o=t.type,a=t.value,i=t.maskInputFn,l=a||"",s=o&&ge(o);return(r[n.toLowerCase()]||s&&r[s])&&(i?l=i(l,e):l="*".repeat(l.length)),l}function ge(t){return t.toLowerCase()}var zt="__rrweb_original__";function vn(t){var e=t.getContext("2d");if(!e)return!0;for(var r=50,n=0;n<t.width;n+=r)for(var o=0;o<t.height;o+=r){var a=e.getImageData,i=zt in a?a[zt]:a,l=new Uint32Array(i.call(e,n,o,Math.min(r,t.width-n),Math.min(r,t.height-o)).data.buffer);if(l.some(function(s){return s!==0}))return!1}return!0}function Sn(t,e){return!t||!e||t.type!==e.type?!1:t.type===N.Document?t.compatMode===e.compatMode:t.type===N.DocumentType?t.name===e.name&&t.publicId===e.publicId&&t.systemId===e.systemId:t.type===N.Comment||t.type===N.Text||t.type===N.CDATA?t.textContent===e.textContent:t.type===N.Element?t.tagName===e.tagName&&JSON.stringify(t.attributes)===JSON.stringify(e.attributes)&&t.isSVG===e.isSVG&&t.needBlock===e.needBlock:!1}function pt(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?ge(e):null}var bn=1,wn=new RegExp("[^a-z0-9-_:]"),$e=-2;function Ht(){return bn++}function Cn(t){if(t instanceof HTMLFormElement)return"form";var e=ge(t.tagName);return wn.test(e)?"div":e}function En(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var Te,Yt,Tn=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Nn=/^(?:[a-z+]+:)?\/\//i,Mn=/^www\..*/i,In=/^(data:)([^,]*),(.*)/i;function Xe(t,e){return(t||"").replace(Tn,function(r,n,o,a,i,l){var s=o||i||l,c=n||a||"";if(!s)return r;if(Nn.test(s)||Mn.test(s)||In.test(s))return"url(".concat(c).concat(s).concat(c,")");if(s[0]==="/")return"url(".concat(c).concat(En(e)+s).concat(c,")");var u=e.split("/"),d=s.split("/");u.pop();for(var h=0,m=d;h<m.length;h++){var p=m[h];p!=="."&&(p===".."?u.pop():u.push(p))}return"url(".concat(c).concat(u.join("/")).concat(c,")")})}var Dn=/^[^ \t\n\r\u000c]+/,kn=/^[, \t\n\r\u000c]+/;function Rn(t,e){if(e.trim()==="")return e;var r=0;function n(c){var u,d=c.exec(e.substring(r));return d?(u=d[0],r+=u.length,u):""}for(var o=[];n(kn),!(r>=e.length);){var a=n(Dn);if(a.slice(-1)===",")a=Ze(t,a.substring(0,a.length-1)),o.push(a);else{var i="";a=Ze(t,a);for(var l=!1;;){var s=e.charAt(r);if(s===""){o.push((a+i).trim());break}else if(l)s===")"&&(l=!1);else if(s===","){r+=1,o.push((a+i).trim());break}else s==="("&&(l=!0);i+=s,r+=1}}}return o.join(", ")}function Ze(t,e){if(!e||e.trim()==="")return e;var r=t.createElement("a");return r.href=e,r.href}function xn(t){return Boolean(t.tagName==="svg"||t.ownerSVGElement)}function mt(){var t=document.createElement("a");return t.href="",t.href}function Xt(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(e==="table"||e==="td"||e==="th")?Ze(t,n):r==="srcset"?Rn(t,n):r==="style"?Xe(n,mt()):e==="object"&&r==="data"?Ze(t,n):n)}function Zt(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function On(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var n=t.classList.length;n--;){var o=t.classList[n];if(e.test(o))return!0}if(r)return t.matches(r)}catch{}return!1}function Ke(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?Ke(t.parentNode,e,r):!1;for(var n=t.classList.length;n--;){var o=t.classList[n];if(e.test(o))return!0}return r?Ke(t.parentNode,e,r):!1}function Kt(t,e,r){try{var n=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(n===null)return!1;if(typeof e=="string"){if(n.classList.contains(e)||n.closest(".".concat(e)))return!0}else if(Ke(n,e,!0))return!0;if(r&&(n.matches(r)||n.closest(r)))return!0}catch{}return!1}function Ln(t,e,r){var n=t.contentWindow;if(n){var o=!1,a;try{a=n.document.readyState}catch{return}if(a!=="complete"){var i=setTimeout(function(){o||(e(),o=!0)},r);t.addEventListener("load",function(){clearTimeout(i),o=!0,e()});return}var l="about:blank";if(n.location.href!==l||t.src===l||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}}function An(t,e,r){var n=!1,o;try{o=t.sheet}catch{return}if(!o){var a=setTimeout(function(){n||(e(),n=!0)},r);t.addEventListener("load",function(){clearTimeout(a),n=!0,e()})}}function _n(t,e){var r=e.doc,n=e.mirror,o=e.blockClass,a=e.blockSelector,i=e.maskTextClass,l=e.maskTextSelector,s=e.inlineStylesheet,c=e.maskInputOptions,u=c===void 0?{}:c,d=e.maskTextFn,h=e.maskInputFn,m=e.dataURLOptions,p=m===void 0?{}:m,v=e.inlineImages,b=e.recordCanvas,f=e.keepIframeSrcFn,y=e.newlyAddedElement,g=y===void 0?!1:y,C=Fn(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:t.compatMode}:{type:N.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:C};case t.ELEMENT_NODE:return Wn(t,{doc:r,blockClass:o,blockSelector:a,inlineStylesheet:s,maskInputOptions:u,maskInputFn:h,dataURLOptions:p,inlineImages:v,recordCanvas:b,keepIframeSrcFn:f,newlyAddedElement:g,rootId:C});case t.TEXT_NODE:return Pn(t,{maskTextClass:i,maskTextSelector:l,maskTextFn:d,rootId:C});case t.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:C};case t.COMMENT_NODE:return{type:N.Comment,textContent:t.textContent||"",rootId:C};default:return!1}}function Fn(t,e){if(e.hasNode(t)){var r=e.getId(t);return r===1?void 0:r}}function Pn(t,e){var r,n=e.maskTextClass,o=e.maskTextSelector,a=e.maskTextFn,i=e.rootId,l=t.parentNode&&t.parentNode.tagName,s=t.textContent,c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;if(c&&s){try{t.nextSibling||t.previousSibling||!((r=t.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(s=Ye(t.parentNode.sheet))}catch(d){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(d),t)}s=Xe(s,mt())}return u&&(s="SCRIPT_PLACEHOLDER"),!c&&!u&&s&&Kt(t,n,o)&&(s=a?a(s):s.replace(/[\S]/g,"*")),{type:N.Text,textContent:s||"",isStyle:c,rootId:i}}function Wn(t,e){for(var r=e.doc,n=e.blockClass,o=e.blockSelector,a=e.inlineStylesheet,i=e.maskInputOptions,l=i===void 0?{}:i,s=e.maskInputFn,c=e.dataURLOptions,u=c===void 0?{}:c,d=e.inlineImages,h=e.recordCanvas,m=e.keepIframeSrcFn,p=e.newlyAddedElement,v=p===void 0?!1:p,b=e.rootId,f=On(t,n,o),y=Cn(t),g={},C=t.attributes.length,M=0;M<C;M++){var R=t.attributes[M];Zt(y,R.name,R.value)||(g[R.name]=Xt(r,y,ge(R.name),R.value))}if(y==="link"&&a){var _=Array.from(r.styleSheets).find(function(D){return D.href===t.href}),P=null;_&&(P=Ye(_)),P&&(delete g.rel,delete g.href,g._cssText=Xe(P,_.href))}if(y==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){var P=Ye(t.sheet);P&&(g._cssText=Xe(P,mt()))}if(y==="input"||y==="textarea"||y==="select"){var Z=t.value,K=t.checked;if(g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&Z){var Y=pt(t);g.value=ht({element:t,type:Y,tagName:y,value:Z,maskInputOptions:l,maskInputFn:s})}else K&&(g.checked=K)}if(y==="option"&&(t.selected&&!l.select?g.selected=!0:delete g.selected),y==="canvas"&&h){if(t.__context==="2d")vn(t)||(g.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){var J=t.toDataURL(u.type,u.quality),Q=document.createElement("canvas");Q.width=t.width,Q.height=t.height;var ie=Q.toDataURL(u.type,u.quality);J!==ie&&(g.rr_dataURL=J)}}if(y==="img"&&d){Te||(Te=r.createElement("canvas"),Yt=Te.getContext("2d"));var U=t,j=U.crossOrigin;U.crossOrigin="anonymous";var F=function(){U.removeEventListener("load",F);try{Te.width=U.naturalWidth,Te.height=U.naturalHeight,Yt.drawImage(U,0,0),g.rr_dataURL=Te.toDataURL(u.type,u.quality)}catch(D){console.warn("Cannot inline img src=".concat(U.currentSrc,"! Error: ").concat(D))}j?g.crossOrigin=j:U.removeAttribute("crossorigin")};U.complete&&U.naturalWidth!==0?F():U.addEventListener("load",F)}if((y==="audio"||y==="video")&&(g.rr_mediaState=t.paused?"paused":"played",g.rr_mediaCurrentTime=t.currentTime),v||(t.scrollLeft&&(g.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(g.rr_scrollTop=t.scrollTop)),f){var q=t.getBoundingClientRect(),w=q.width,S=q.height;g={class:g.class,rr_width:"".concat(w,"px"),rr_height:"".concat(S,"px")}}return y==="iframe"&&!m(g.src)&&(t.contentDocument||(g.rr_src=g.src),delete g.src),{type:N.Element,tagName:y,attributes:g,childNodes:[],isSVG:xn(t)||void 0,needBlock:f,rootId:b}}function $(t){return t==null?"":t.toLowerCase()}function $n(t,e){return!!(e.comment&&t.type===N.Comment||t.type===N.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js"))||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&($(t.attributes.name).match(/^msapplication-tile(image|color)$/)||$(t.attributes.name)==="application-name"||$(t.attributes.rel)==="icon"||$(t.attributes.rel)==="apple-touch-icon"||$(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&$(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&($(t.attributes.property).match(/^(og|twitter|fb):/)||$(t.attributes.name).match(/^(og|twitter):/)||$(t.attributes.name)==="pinterest")||e.headMetaRobots&&($(t.attributes.name)==="robots"||$(t.attributes.name)==="googlebot"||$(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&($(t.attributes.name)==="author"||$(t.attributes.name)==="generator"||$(t.attributes.name)==="framework"||$(t.attributes.name)==="publisher"||$(t.attributes.name)==="progid"||$(t.attributes.property).match(/^article:/)||$(t.attributes.property).match(/^product:/))||e.headMetaVerification&&($(t.attributes.name)==="google-site-verification"||$(t.attributes.name)==="yandex-verification"||$(t.attributes.name)==="csrf-token"||$(t.attributes.name)==="p:domain_verify"||$(t.attributes.name)==="verify-v1"||$(t.attributes.name)==="verification"||$(t.attributes.name)==="shopify-checkout-api-token"))))}function Ne(t,e){var r=e.doc,n=e.mirror,o=e.blockClass,a=e.blockSelector,i=e.maskTextClass,l=e.maskTextSelector,s=e.skipChild,c=s===void 0?!1:s,u=e.inlineStylesheet,d=u===void 0?!0:u,h=e.maskInputOptions,m=h===void 0?{}:h,p=e.maskTextFn,v=e.maskInputFn,b=e.slimDOMOptions,f=e.dataURLOptions,y=f===void 0?{}:f,g=e.inlineImages,C=g===void 0?!1:g,M=e.recordCanvas,R=M===void 0?!1:M,_=e.onSerialize,P=e.onIframeLoad,Z=e.iframeLoadTimeout,K=Z===void 0?5e3:Z,Y=e.onStylesheetLoad,J=e.stylesheetLoadTimeout,Q=J===void 0?5e3:J,ie=e.keepIframeSrcFn,U=ie===void 0?function(){return!1}:ie,j=e.newlyAddedElement,F=j===void 0?!1:j,q=e.preserveWhiteSpace,w=q===void 0?!0:q,S=_n(t,{doc:r,mirror:n,blockClass:o,blockSelector:a,maskTextClass:i,maskTextSelector:l,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:v,dataURLOptions:y,inlineImages:C,recordCanvas:R,keepIframeSrcFn:U,newlyAddedElement:F});if(!S)return console.warn(t,"not serialized"),null;var D;n.hasNode(t)?D=n.getId(t):$n(S,b)||!w&&S.type===N.Text&&!S.isStyle&&!S.textContent.replace(/^\s+|\s+$/gm,"").length?D=$e:D=Ht();var I=Object.assign(S,{id:D});if(n.add(t,I),D===$e)return null;_&&_(t);var H=!c;if(I.type===N.Element){H=H&&!I.needBlock,delete I.needBlock;var de=t.shadowRoot;de&&We(de)&&(I.isShadowHost=!0)}if((I.type===N.Document||I.type===N.Element)&&H){b.headWhitespace&&I.type===N.Element&&I.tagName==="head"&&(w=!1);for(var ut={doc:r,mirror:n,blockClass:o,blockSelector:a,maskTextClass:i,maskTextSelector:l,skipChild:c,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:v,slimDOMOptions:b,dataURLOptions:y,inlineImages:C,recordCanvas:R,preserveWhiteSpace:w,onSerialize:_,onIframeLoad:P,iframeLoadTimeout:K,onStylesheetLoad:Y,stylesheetLoadTimeout:Q,keepIframeSrcFn:U},le=0,he=Array.from(t.childNodes);le<he.length;le++){var Ee=he[le],ce=Ne(Ee,ut);ce&&I.childNodes.push(ce)}if(Bt(t)&&t.shadowRoot)for(var k=0,ne=Array.from(t.shadowRoot.childNodes);k<ne.length;k++){var Ee=ne[k],ce=Ne(Ee,ut);ce&&(We(t.shadowRoot)&&(ce.isShadow=!0),I.childNodes.push(ce))}}return t.parentNode&&Pe(t.parentNode)&&We(t.parentNode)&&(I.isShadow=!0),I.type===N.Element&&I.tagName==="iframe"&&Ln(t,function(){var W=t.contentDocument;if(W&&P){var X=Ne(W,{doc:W,mirror:n,blockClass:o,blockSelector:a,maskTextClass:i,maskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:v,slimDOMOptions:b,dataURLOptions:y,inlineImages:C,recordCanvas:R,preserveWhiteSpace:w,onSerialize:_,onIframeLoad:P,iframeLoadTimeout:K,onStylesheetLoad:Y,stylesheetLoadTimeout:Q,keepIframeSrcFn:U});X&&P(t,X)}},K),I.type===N.Element&&I.tagName==="link"&&I.attributes.rel==="stylesheet"&&An(t,function(){if(Y){var W=Ne(t,{doc:r,mirror:n,blockClass:o,blockSelector:a,maskTextClass:i,maskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:v,slimDOMOptions:b,dataURLOptions:y,inlineImages:C,recordCanvas:R,preserveWhiteSpace:w,onSerialize:_,onIframeLoad:P,iframeLoadTimeout:K,onStylesheetLoad:Y,stylesheetLoadTimeout:Q,keepIframeSrcFn:U});W&&Y(t,W)}},Q),I}function Un(t,e){var r=e||{},n=r.mirror,o=n===void 0?new dt:n,a=r.blockClass,i=a===void 0?"rr-block":a,l=r.blockSelector,s=l===void 0?null:l,c=r.maskTextClass,u=c===void 0?"rr-mask":c,d=r.maskTextSelector,h=d===void 0?null:d,m=r.inlineStylesheet,p=m===void 0?!0:m,v=r.inlineImages,b=v===void 0?!1:v,f=r.recordCanvas,y=f===void 0?!1:f,g=r.maskAllInputs,C=g===void 0?!1:g,M=r.maskTextFn,R=r.maskInputFn,_=r.slimDOM,P=_===void 0?!1:_,Z=r.dataURLOptions,K=r.preserveWhiteSpace,Y=r.onSerialize,J=r.onIframeLoad,Q=r.iframeLoadTimeout,ie=r.onStylesheetLoad,U=r.stylesheetLoadTimeout,j=r.keepIframeSrcFn,F=j===void 0?function(){return!1}:j,q=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,w=P===!0||P==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:P==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:P===!1?{}:P;return Ne(t,{doc:t,mirror:o,blockClass:i,blockSelector:s,maskTextClass:u,maskTextSelector:h,skipChild:!1,inlineStylesheet:p,maskInputOptions:q,maskTextFn:M,maskInputFn:R,slimDOMOptions:w,dataURLOptions:Z,inlineImages:b,recordCanvas:y,preserveWhiteSpace:K,onSerialize:Y,onIframeLoad:J,iframeLoadTimeout:Q,onStylesheetLoad:ie,stylesheetLoadTimeout:U,keepIframeSrcFn:F,newlyAddedElement:!1})}var Jt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Vn(t,e){e===void 0&&(e={});var r=1,n=1;function o(w){var S=w.match(/\n/g);S&&(r+=S.length);var D=w.lastIndexOf(`-`);n=D===-1?n+w.length:w.length-D}function a(){var w={line:r,column:n};return function(S){return S.position=new i(w),p(),S}}var i=function(){function w(S){this.start=S,this.end={line:r,column:n},this.source=e.source}return w}();i.prototype.content=t;var l=[];function s(w){var S=new Error("".concat(e.source||"",":").concat(r,":").concat(n,": ").concat(w));if(S.reason=w,S.filename=e.source,S.line=r,S.column=n,S.source=t,e.silent)l.push(S);else throw S}function c(){var w=h();return{type:"stylesheet",stylesheet:{source:e.source,rules:w,parsingErrors:l}}}function u(){return m(/^{\s*/)}function d(){return m(/^}/)}function h(){var w,S=[];for(p(),v(S);t.length&&t.charAt(0)!=="}"&&(w=F()||q());)w&&(S.push(w),v(S));return S}function m(w){var S=w.exec(t);if(S){var D=S[0];return o(D),t=t.slice(D.length),S}}function p(){m(/^\s*/)}function v(w){w===void 0&&(w=[]);for(var S;S=b();)S&&w.push(S),S=b();return w}function b(){var w=a();if(!(t.charAt(0)!=="/"||t.charAt(1)!=="*")){for(var S=2;t.charAt(S)!==""&&(t.charAt(S)!=="*"||t.charAt(S+1)!=="/");)++S;if(S+=2,t.charAt(S-1)==="")return s("End of comment missing");var D=t.slice(2,S-2);return n+=2,o(D),t=t.slice(S),n+=2,w({type:"comment",comment:D})}}function f(){var w=m(/^([^{]+)/);if(w)return pe(w[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(S){return S.replace(/,/g,"\u200C")}).split(/\s*(?![^(]*\)),\s*/).map(function(S){return S.replace(/\u200C/g,",")})}function y(){var w=a(),S=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(S){var D=pe(S[0]);if(!m(/^:\s*/))return s("property missing ':'");var I=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),H=w({type:"declaration",property:D.replace(Jt,""),value:I?pe(I[0]).replace(Jt,""):""});return m(/^[;\s]*/),H}}function g(){var w=[];if(!u())return s("missing '{'");v(w);for(var S;S=y();)S!==!1&&(w.push(S),v(w)),S=y();return d()?w:s("missing '}'")}function C(){for(var w,S=[],D=a();w=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)S.push(w[1]),m(/^,\s*/);if(S.length)return D({type:"keyframe",values:S,declarations:g()})}function M(){var w=a(),S=m(/^@([-\w]+)?keyframes\s*/);if(S){var D=S[1];if(S=m(/^([-\w]+)\s*/),!S)return s("@keyframes missing name");var I=S[1];if(!u())return s("@keyframes missing '{'");for(var H,de=v();H=C();)de.push(H),de=de.concat(v());return d()?w({type:"keyframes",name:I,vendor:D,keyframes:de}):s("@keyframes missing '}'")}}function R(){var w=a(),S=m(/^@supports *([^{]+)/);if(S){var D=pe(S[1]);if(!u())return s("@supports missing '{'");var I=v().concat(h());return d()?w({type:"supports",supports:D,rules:I}):s("@supports missing '}'")}}function _(){var w=a(),S=m(/^@host\s*/);if(S){if(!u())return s("@host missing '{'");var D=v().concat(h());return d()?w({type:"host",rules:D}):s("@host missing '}'")}}function P(){var w=a(),S=m(/^@media *([^{]+)/);if(S){var D=pe(S[1]);if(!u())return s("@media missing '{'");var I=v().concat(h());return d()?w({type:"media",media:D,rules:I}):s("@media missing '}'")}}function Z(){var w=a(),S=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(S)return w({type:"custom-media",name:pe(S[1]),media:pe(S[2])})}function K(){var w=a(),S=m(/^@page */);if(S){var D=f()||[];if(!u())return s("@page missing '{'");for(var I=v(),H;H=y();)I.push(H),I=I.concat(v());return d()?w({type:"page",selectors:D,declarations:I}):s("@page missing '}'")}}function Y(){var w=a(),S=m(/^@([-\w]+)?document *([^{]+)/);if(S){var D=pe(S[1]),I=pe(S[2]);if(!u())return s("@document missing '{'");var H=v().concat(h());return d()?w({type:"document",document:I,vendor:D,rules:H}):s("@document missing '}'")}}function J(){var w=a(),S=m(/^@font-face\s*/);if(S){if(!u())return s("@font-face missing '{'");for(var D=v(),I;I=y();)D.push(I),D=D.concat(v());return d()?w({type:"font-face",declarations:D}):s("@font-face missing '}'")}}var Q=j("import"),ie=j("charset"),U=j("namespace");function j(w){var S=new RegExp("^@"+w+"\\s*([^;]+);");return function(){var D=a(),I=m(S);if(I){var H={type:w};return H[w]=I[1].trim(),D(H)}}}function F(){if(t[0]==="@")return M()||P()||Z()||R()||Q()||ie()||U()||Y()||K()||_()||J()}function q(){var w=a(),S=f();return S?(v(),w({type:"rule",selectors:S,declarations:g()})):s("selector missing")}return ft(c())}function pe(t){return t?t.replace(/^\s+|\s+$/g,""):""}function ft(t,e){for(var r=t&&typeof t.type=="string",n=r?t:e,o=0,a=Object.keys(t);o<a.length;o++){var i=a[o],l=t[i];Array.isArray(l)?l.forEach(function(s){ft(s,n)}):l&&typeof l=="object"&&ft(l,n)}return r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:e||null}),t}var Qt={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Bn(t){var e=Qt[t.tagName]?Qt[t.tagName]:t.tagName;return e==="link"&&t.attributes._cssText&&(e="style"),e}function Gn(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var qt=/([^\\]):hover/,jn=new RegExp(qt.source,"g");function er(t,e){var r=e?.stylesWithHoverClass.get(t);if(r)return r;var n=Vn(t,{silent:!0});if(!n.stylesheet)return t;var o=[];if(n.stylesheet.rules.forEach(function(l){"selectors"in l&&(l.selectors||[]).forEach(function(s){qt.test(s)&&o.push(s)})}),o.length===0)return t;var a=new RegExp(o.filter(function(l,s){return o.indexOf(l)===s}).sort(function(l,s){return s.length-l.length}).map(function(l){return Gn(l)}).join("|"),"g"),i=t.replace(a,function(l){var s=l.replace(jn,"$1.\\:hover");return"".concat(l,", ").concat(s)});return e?.stylesWithHoverClass.set(t,i),i}function tr(){var t=new Map;return{stylesWithHoverClass:t}}function zn(t,e){var r=e.doc,n=e.hackCss,o=e.cache;switch(t.type){case N.Document:return r.implementation.createDocument(null,"",null);case N.DocumentType:return r.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case N.Element:{var a=Bn(t),i;t.isSVG?i=r.createElementNS("http://www.w3.org/2000/svg",a):i=r.createElement(a);var l={};for(var s in t.attributes)if(Object.prototype.hasOwnProperty.call(t.attributes,s)){var c=t.attributes[s];if(!(a==="option"&&s==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),s.startsWith("rr_")){l[s]=c;continue}var u=a==="textarea"&&s==="value",d=a==="style"&&s==="_cssText";if(d&&n&&typeof c=="string"&&(c=er(c,o)),(u||d)&&typeof c=="string"){for(var h=r.createTextNode(c),m=0,p=Array.from(i.childNodes);m<p.length;m++){var v=p[m];v.nodeType===i.TEXT_NODE&&i.removeChild(v)}i.appendChild(h);continue}try{if(t.isSVG&&s==="xlink:href")i.setAttributeNS("http://www.w3.org/1999/xlink",s,c.toString());else if(s==="onload"||s==="onclick"||s.substring(0,7)==="onmouse")i.setAttribute("_"+s,c.toString());else if(a==="meta"&&t.attributes["http-equiv"]==="Content-Security-Policy"&&s==="content"){i.setAttribute("csp-content",c.toString());continue}else a==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||a==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js")||(a==="img"&&t.attributes.srcset&&t.attributes.rr_dataURL?i.setAttribute("rrweb-original-srcset",t.attributes.srcset):i.setAttribute(s,c.toString()))}catch{}}}var b=function(y){var g=l[y];if(a==="canvas"&&y==="rr_dataURL"){var C=document.createElement("img");C.onload=function(){var R=i.getContext("2d");R&&R.drawImage(C,0,0,C.width,C.height)},C.src=g.toString(),i.RRNodeType&&(i.rr_dataURL=g.toString())}else if(a==="img"&&y==="rr_dataURL"){var M=i;M.currentSrc.startsWith("data:")||(M.setAttribute("rrweb-original-src",t.attributes.src),M.src=g.toString())}if(y==="rr_width")i.style.width=g.toString();else if(y==="rr_height")i.style.height=g.toString();else if(y==="rr_mediaCurrentTime"&&typeof g=="number")i.currentTime=g;else if(y==="rr_mediaState")switch(g){case"played":i.play().catch(function(R){return console.warn("media playback error",R)});break;case"paused":i.pause();break}};for(var f in l)b(f);if(t.isShadowHost)if(!i.shadowRoot)i.attachShadow({mode:"open"});else for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);return i}case N.Text:return r.createTextNode(t.isStyle&&n?er(t.textContent,o):t.textContent);case N.CDATA:return r.createCDATASection(t.textContent);case N.Comment:return r.createComment(t.textContent);default:return null}}function Ue(t,e){var r=e.doc,n=e.mirror,o=e.skipChild,a=o===void 0?!1:o,i=e.hackCss,l=i===void 0?!0:i,s=e.afterAppend,c=e.cache;if(n.has(t.id)){var u=n.getNode(t.id),d=n.getMeta(u);if(Sn(d,t))return n.getNode(t.id)}var h=zn(t,{doc:r,hackCss:l,cache:c});if(!h)return null;if(t.rootId&&n.getNode(t.rootId)!==r&&n.replace(t.rootId,r),t.type===N.Document&&(r.close(),r.open(),t.compatMode==="BackCompat"&&t.childNodes&&t.childNodes[0].type!==N.DocumentType&&(t.childNodes[0].type===N.Element&&"xmlns"in t.childNodes[0].attributes&&t.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),h=r),n.add(h,t),(t.type===N.Document||t.type===N.Element)&&!a)for(var m=function(f){var y=Ue(f,{doc:r,mirror:n,skipChild:!1,hackCss:l,afterAppend:s,cache:c});if(!y)return console.warn("Failed to rebuild",f),"continue";if(f.isShadow&&Bt(h)&&h.shadowRoot)h.shadowRoot.appendChild(y);else if(t.type===N.Document&&f.type==N.Element){var g=y,C=null;g.childNodes.forEach(function(M){M.nodeName==="BODY"&&(C=M)}),C?(g.removeChild(C),h.appendChild(y),g.appendChild(C)):h.appendChild(y)}else h.appendChild(y);s&&s(y,f.id)},p=0,v=t.childNodes;p<v.length;p++){var b=v[p];m(b)}return h}function Hn(t,e){function r(i){e(i)}for(var n=0,o=t.getIds();n<o.length;n++){var a=o[n];t.has(a)&&r(t.getNode(a))}}function Yn(t,e){var r=e.getMeta(t);if(r?.type===N.Element){var n=t;for(var o in r.attributes)if(Object.prototype.hasOwnProperty.call(r.attributes,o)&&o.startsWith("rr_")){var a=r.attributes[o];o==="rr_scrollLeft"&&(n.scrollLeft=a),o==="rr_scrollTop"&&(n.scrollTop=a)}}}function Xn(t,e){var r=e.doc,n=e.onVisit,o=e.hackCss,a=o===void 0?!0:o,i=e.afterAppend,l=e.cache,s=e.mirror,c=s===void 0?new dt:s,u=Ue(t,{doc:r,mirror:c,skipChild:!1,hackCss:a,afterAppend:i,cache:l});return Hn(c,function(d){n&&n(d),Yn(d,c)}),u}function ee(t,e,r=document){const n={capture:!0,passive:!0};return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}const Me=`Please stop import mirror directly. Instead of that,\r+(function (g, f) {+ if ("object" == typeof exports && "object" == typeof module) {+ module.exports = f();+ } else if ("function" == typeof define && define.amd) {+ define("rrweb", [], f);+ } else if ("object" == typeof exports) {+ exports["rrweb"] = f();+ } else {+ g["rrweb"] = f();+ }+ }(this, () => {+var exports = {};+var module = { exports };+"use strict";var Ja=Object.defineProperty,Ka=Object.defineProperties;var Qa=Object.getOwnPropertyDescriptors;var Dt=Object.getOwnPropertySymbols;var Ti=Object.prototype.hasOwnProperty,_i=Object.prototype.propertyIsEnumerable;var Di=(s,e,t)=>e in s?Ja(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e)=>{for(var t in e||(e={}))Ti.call(e,t)&&Di(s,t,e[t]);if(Dt)for(var t of Dt(e))_i.call(e,t)&&Di(s,t,e[t]);return s},q=(s,e)=>Ka(s,Qa(e));var Fe=(s,e)=>{var t={};for(var r in s)Ti.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Dt)for(var r of Dt(s))e.indexOf(r)<0&&_i.call(s,r)&&(t[r]=s[r]);return t};var qa=Object.defineProperty,el=(s,e,t)=>e in s?qa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>el(s,typeof e!="symbol"?e+"":e,t),ki;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var tl=Object.defineProperty,rl=(s,e,t)=>e in s?tl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,$i=(s,e,t)=>rl(s,typeof e!="symbol"?e+"":e,t),R=(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))(R||{});const Pi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Li={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Tt={},sl=()=>!!globalThis.Zone;function Ws(s){if(Tt[s])return Tt[s];const e=globalThis[s],t=e.prototype,r=s in Pi?Pi[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Li?Li[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!sl())return Tt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?Tt[s]=u:t}catch(a){return t}}const Gr={};function Ce(s,e,t){var r;const i=`${s}.${String(t)}`;if(Gr[i])return Gr[i].call(e);const o=Ws(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Gr[i]=n,n.call(e)):e[t]}const jr={};function Yn(s,e,t){const r=`${s}.${String(t)}`;if(jr[r])return jr[r].bind(e);const o=Ws(s)[t];return typeof o!="function"?e[t]:(jr[r]=o,o.bind(e))}function il(s){return Ce("Node",s,"ownerDocument")}function nl(s){return Ce("Node",s,"childNodes")}function ol(s){return Ce("Node",s,"parentNode")}function al(s){return Ce("Node",s,"parentElement")}function ll(s){return Ce("Node",s,"textContent")}function ul(s,e){return Yn("Node",s,"contains")(e)}function cl(s){return Yn("Node",s,"getRootNode")()}function hl(s){return!s||!("host"in s)?null:Ce("ShadowRoot",s,"host")}function fl(s){return s.styleSheets}function dl(s){return!s||!("shadowRoot"in s)?null:Ce("Element",s,"shadowRoot")}function pl(s,e){return Ce("Element",s,"querySelector")(e)}function ml(s,e){return Ce("Element",s,"querySelectorAll")(e)}function gl(){return Ws("MutationObserver").constructor}function yl(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()=>{}}}const ee={ownerDocument:il,childNodes:nl,parentNode:ol,parentElement:al,textContent:ll,contains:ul,getRootNode:cl,host:hl,styleSheets:fl,shadowRoot:dl,querySelector:pl,querySelectorAll:ml,mutationObserver:gl,patch:yl};function zs(s){return s.nodeType===s.ELEMENT_NODE}function ut(s){const e=s&&"host"in s&&"mode"in s&&ee.host(s)||null;return!!(e&&"shadowRoot"in e&&ee.shadowRoot(e)===s)}function ct(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function wl(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 bl(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 ns(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);const r=Array.from(e,i=>Hn(i,t)).join("");return wl(r)}catch(e){return null}}function Hn(s,e){if(vl(s)){let t;try{t=ns(s.styleSheet)||bl(s)}catch(r){t=s.cssText}return s.styleSheet.href?fr(t,s.styleSheet.href):t}else{let t=s.cssText;return Cl(s)&&s.selectorText.includes(":")&&(t=Sl(t)),e?fr(t,e):t}}function Sl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function vl(s){return"styleSheet"in s}function Cl(s){return"selectorText"in s}class Vs{constructor(){$i(this,"idNodeMap",new Map),$i(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 Zn(){return new Vs}function cr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&Ne(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Ne(s){return s.toLowerCase()}const Fi="__rrweb_original__";function El(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 o=e.getImageData,n=Fi in o?o[Fi]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function Il(s,e){return!s||!e||s.type!==e.type?!1:s.type===R.Document?s.compatMode===e.compatMode:s.type===R.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===R.Comment||s.type===R.Text||s.type===R.CDATA?s.textContent===e.textContent:s.type===R.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function hr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ne(e):null}function Gs(s,e){var o;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(o=i==null?void 0:i[1])!=null?o:null}function xl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Ml=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Rl=/^(?:[a-z+]+:)?\/\//i,Nl=/^www\..*/i,Al=/^(data:)([^,]*),(.*)/i;function fr(s,e){return(s||"").replace(Ml,(t,r,i,o,n,a)=>{const l=i||n||a,u=r||o||"";if(!l)return t;if(Rl.test(l)||Nl.test(l))return`url(${u}${l}${u})`;if(Al.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${xl(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function _t(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ol(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let o=0;if(r.length>1&&s&&typeof s=="string"){let n=_t(s,t);const a=n.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){const u=_t(r[l].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),g=n.split(f),p=-1;if(g.length===2)p=g[0].length;else if(g.length>2&&g[0]===""&&r[l-1].textContent!=="")p=n.indexOf(f,1);else if(g.length===1){if(f=f.substring(0,f.length-1),g=n.split(f),g.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(p=n.indexOf(f));if(g.length>=2&&h>c){const m=r[l-1].textContent;if(m&&typeof m=="string"){const d=_t(m).length;p=n.indexOf(f,d)}p===-1&&(p=g[0].length)}if(p!==-1){let m=Math.floor(p/a);for(;m>0&&m<s.length;){if(o+=1,o>50*r.length)return i.push(s),i;const d=_t(s.substring(0,m),t);if(d.length===p){i.push(s.substring(0,m)),s=s.substring(m),n=n.substring(p);break}else d.length<p?m+=Math.max(1,Math.floor((p-d.length)/a)):m-=Math.max(1,Math.floor((d.length-p)*a))}break}}}}return i.push(s),i}function Dl(s,e){return Ol(s,e).join("/* rr_split */")}let Tl=1;const _l=new RegExp("[^a-z0-9-_:]"),dt=-2;function Xn(){return Tl++}function kl(s){if(s instanceof HTMLFormElement)return"form";const e=Ne(s.tagName);return _l.test(e)?"div":e}let Be,Bi;const $l=/^[^ \t\n\r\u000c]+/,Pl=/^[, \t\n\r\u000c]+/;function Ll(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const i=[];for(;r(Pl),!(t>=e.length);){let o=r($l);if(o.slice(-1)===",")o=Ve(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=Ve(s,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return i.join(", ")}const Ui=new WeakMap;function Ve(s,e){return!e||e.trim()===""?e:js(s,e)}function Fl(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function js(s,e){let t=Ui.get(s);if(t||(t=s.createElement("a"),Ui.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Jn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?Ve(s,r):t==="srcset"?Ll(s,r):t==="style"?fr(r,js(s)):e==="object"&&t==="data"?Ve(s,r):r)}function Kn(s,e,t){return["video","audio"].includes(s)&&e==="autoplay"}function Bl(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 dr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?dr(ee.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?dr(ee.parentNode(s),e,t):!1}function Qn(s,e,t,r){let i;if(zs(s)){if(i=s,!ee.childNodes(i).length)return!1}else{if(ee.parentElement(s)===null)return!1;i=ee.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(dr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(o){}return!1}function Ul(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const n="about:blank";if(r.location.href!==n||s.src===n||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Wl(s,e,t){let r=!1,i;try{i=s.sheet}catch(n){return}if(i)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function zl(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:n,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m=!1,cssCaptured:d=!1}=e,y=Vl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:R.Document,childNodes:[],compatMode:s.compatMode}:{type:R.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:R.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return jl(s,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case s.TEXT_NODE:return Gl(s,{doc:t,needsMask:n,maskTextFn:u,rootId:y,cssCaptured:d});case s.CDATA_SECTION_NODE:return{type:R.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return{type:R.Comment,textContent:ee.textContent(s)||"",rootId:y};default:return!1}}function Vl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Gl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=ee.parentNode(s),a=n&&n.tagName;let l="";const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":o||(l=ee.textContent(s),u&&l&&(l=fr(l,js(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,ee.parentElement(s)):l.replace(/[\S]/g,"*")),{type:R.Text,textContent:l||"",rootId:i}}function jl(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:n={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:g}=e,p=Bl(s,r,i),m=kl(s);let d={};const y=s.attributes.length;for(let w=0;w<y;w++){const v=s.attributes[w];Kn(m,v.name,v.value)||(d[v.name]=Jn(t,m,Ne(v.name),v.value))}if(m==="link"&&o){const w=Array.from(t.styleSheets).find(x=>x.href===s.href);let v=null;w&&(v=ns(w)),v&&(delete d.rel,delete d.href,d._cssText=v)}if(m==="style"&&s.sheet){let w=ns(s.sheet);w&&(s.childNodes.length>1&&(w=Dl(w,s)),d._cssText=w)}if(["input","textarea","select"].includes(m)){const w=s.value,v=s.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&w?d.value=cr({element:s,type:hr(s),tagName:m,value:w,maskInputOptions:n,maskInputFn:a}):v&&(d.checked=v)}if(m==="option"&&(s.selected&&!n.select?d.selected=!0:delete d.selected),m==="dialog"&&s.open&&(d.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&c){if(s.__context==="2d")El(s)||(d.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){const w=s.toDataURL(l.type,l.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;const x=v.toDataURL(l.type,l.quality);w!==x&&(d.rr_dataURL=w)}}if(m==="img"&&u){Be||(Be=t.createElement("canvas"),Bi=Be.getContext("2d"));const w=s,v=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,N=()=>{w.removeEventListener("load",N);try{Be.width=w.naturalWidth,Be.height=w.naturalHeight,Bi.drawImage(w,0,0),d.rr_dataURL=Be.toDataURL(l.type,l.quality)}catch(W){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?N():w.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${v}! Error: ${W}`)}w.crossOrigin==="anonymous"&&(x?d.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?N():w.addEventListener("load",N)}if(["audio","video"].includes(m)){const w=d;w.rr_mediaState=s.paused?"paused":"played",w.rr_mediaCurrentTime=s.currentTime,w.rr_mediaPlaybackRate=s.playbackRate,w.rr_mediaMuted=s.muted,w.rr_mediaLoop=s.loop,w.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(d.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(d.rr_scrollTop=s.scrollTop)),p){const{width:w,height:v}=s.getBoundingClientRect();d={class:d.class,rr_width:`${w}px`,rr_height:`${v}px`}}m==="iframe"&&!h(d.src)&&(s.contentDocument||(d.rr_src=d.src),delete d.src);let S;try{customElements.get(m)&&(S=!0)}catch(w){}return{type:R.Element,tagName:m,attributes:d,childNodes:[],isSVG:Fl(s)||void 0,needBlock:p,rootId:g,isCustom:S}}function z(s){return s==null?"":s.toLowerCase()}function qn(s){return s===!0||s==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function Yl(s,e){if(e.comment&&s.type===R.Comment)return!0;if(s.type===R.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Gs(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(z(s.attributes.name).match(/^msapplication-tile(image|color)$/)||z(s.attributes.name)==="application-name"||z(s.attributes.rel)==="icon"||z(s.attributes.rel)==="apple-touch-icon"||z(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&z(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(z(s.attributes.property).match(/^(og|twitter|fb):/)||z(s.attributes.name).match(/^(og|twitter):/)||z(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(z(s.attributes.name)==="robots"||z(s.attributes.name)==="googlebot"||z(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(z(s.attributes.name)==="author"||z(s.attributes.name)==="generator"||z(s.attributes.name)==="framework"||z(s.attributes.name)==="publisher"||z(s.attributes.name)==="progid"||z(s.attributes.property).match(/^article:/)||z(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(z(s.attributes.name)==="google-site-verification"||z(s.attributes.name)==="yandex-verification"||z(s.attributes.name)==="csrf-token"||z(s.attributes.name)==="p:domain_verify"||z(s.attributes.name)==="verify-v1"||z(s.attributes.name)==="verification"||z(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ge(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:d=!1,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:W=!1,cssCaptured:B=!1}=e;let{needsMask:H}=e,{preserveWhiteSpace:Q=!0}=e;H||(H=Qn(s,n,a,H===void 0));const se=zl(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:d,keepIframeSrcFn:N,newlyAddedElement:W,cssCaptured:B});if(!se)return console.warn(s,"not serialized"),null;let ie;r.hasNode(s)?ie=r.getId(s):Yl(se,g)||!Q&&se.type===R.Text&&!se.textContent.replace(/^\s+|\s+$/gm,"").length?ie=dt:ie=Xn();const O=Object.assign(se,{id:ie});if(r.add(s,O),ie===dt)return null;y&&y(s);let Oe=!l;if(O.type===R.Element){Oe=Oe&&!O.needBlock,delete O.needBlock;const Z=ee.shadowRoot(s);Z&&ct(Z)&&(O.isShadowHost=!0)}if((O.type===R.Document||O.type===R.Element)&&Oe){g.headWhitespace&&O.type===R.Element&&O.tagName==="head"&&(Q=!1);const Z={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:Q,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N,cssCaptured:!1};if(!(O.type===R.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===R.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(Z.cssCaptured=!0);for(const le of Array.from(ee.childNodes(s))){const ne=Ge(le,Z);ne&&O.childNodes.push(ne)}}let P=null;if(zs(s)&&(P=ee.shadowRoot(s)))for(const le of Array.from(ee.childNodes(P))){const ne=Ge(le,Z);ne&&(ct(P)&&(ne.isShadow=!0),O.childNodes.push(ne))}}const De=ee.parentNode(s);return De&&ut(De)&&ct(De)&&(O.isShadow=!0),O.type===R.Element&&O.tagName==="iframe"&&Ul(s,()=>{const Z=s.contentDocument;if(Z&&S){const P=Ge(Z,{doc:Z,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:Q,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N});P&&S(s,P)}},w),O.type===R.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&Gs(O.attributes.href)==="css")&&Wl(s,()=>{if(v){const Z=Ge(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:Q,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N});Z&&v(s,Z)}},x),O}function Hl(s,e){const{mirror:t=new Vs,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:g=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x=()=>!1}=e||{},N=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,W=qn(g);return Ge(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,skipChild:!1,inlineStylesheet:a,maskInputOptions:N,maskTextFn:h,maskInputFn:f,slimDOMOptions:W,dataURLOptions:p,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x,newlyAddedElement:!1})}const Zl=/(max|min)-device-(width|height)/,Wi=new RegExp(Zl.source,"g"),Xl={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(Wi)&&(s.params=s.params.replace(Wi,"$1-$2"))}}}},Jl={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,+`+t.replace(/:hover/g,".\\:hover"))}))}}}};function Kl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Ql(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 Ys={exports:{}},V=String,eo=function(){return{isColorSupported:!1,reset:V,bold:V,dim:V,italic:V,underline:V,inverse:V,hidden:V,strikethrough:V,black:V,red:V,green:V,yellow:V,blue:V,magenta:V,cyan:V,white:V,gray:V,bgBlack:V,bgRed:V,bgGreen:V,bgYellow:V,bgBlue:V,bgMagenta:V,bgCyan:V,bgWhite:V}};Ys.exports=eo();Ys.exports.createColors=eo;var ql=Ys.exports;const eu={},tu=Object.freeze(Object.defineProperty({__proto__:null,default:eu},Symbol.toStringTag,{value:"Module"})),he=Ql(tu);let zi=ql,Vi=he,os=class to extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),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,to)}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=zi.isColorSupported),Vi&&e&&(t=Vi(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=zi.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`+ `+g+a("^")}return" "+l(f)+u}).join(`+`)}toString(){let e=this.showSourceCode();return e&&(e=`++`+e+`+`),this.name+": "+this.message+e}};var Hs=os;os.default=os;var Et={};Et.isClean=Symbol("isClean");Et.my=Symbol("my");const Gi={after:`+`,beforeClose:`+`,beforeComment:`+`,beforeDecl:`+`,beforeOpen:" ",beforeRule:`+`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function ru(s){return s[0].toUpperCase()+s.slice(1)}let as=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 o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,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,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`+`)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}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 o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,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 o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Gi[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+ru(r);this[a]?i=this[a](n,e):n.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Gi[r]),n.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(`+`)&&(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(`+`)&&(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(`+`)&&(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(`+`)&&(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 o=r.raws.before.split(`+`);return t=o[o.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 ro=as;as.default=as;let su=ro;function ls(s,e){new su(e).stringify(s)}var Nr=ls;ls.default=ls;let{isClean:kt,my:iu}=Et,nu=Hs,ou=ro,au=Nr;function us(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],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>us(n,t)):(o==="object"&&i!==null&&(i=us(i)),t[r]=i)}return t}let cs=class{constructor(e={}){this.raws={},this[kt]=!1,this[iu]=!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=us(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 nu(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[kt]){this[kt]=!1;let e=this;for(;e=e.parent;)e[kt]=!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,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`+`?(i=1,o+=1):i+=1;return{column:i,line:o}}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(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+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 ou().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 o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=au){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}};var Ar=cs;cs.default=cs;let lu=Ar,hs=class extends lu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=q(M({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Or=hs;hs.default=hs;let uu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",cu=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},hu=(s=21)=>{let e="",t=s;for(;t--;)e+=uu[Math.random()*64|0];return e};var fu={nanoid:hu,customAlphabet:cu};let{SourceMapConsumer:ji,SourceMapGenerator:Yi}=he,{existsSync:du,readFileSync:pu}=he,{dirname:Yr,join:mu}=he;function gu(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let fs=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=Yr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ji(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,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return gu(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}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=Yr(e),du(e))return this.mapFile=e,pu(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 ji)return Yi.fromSourceMap(t).toString();if(t instanceof Yi)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=mu(Yr(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 so=fs;fs.default=fs;let{SourceMapConsumer:yu,SourceMapGenerator:wu}=he,{fileURLToPath:Hi,pathToFileURL:$t}=he,{isAbsolute:ds,resolve:ps}=he,{nanoid:bu}=fu,Hr=he,Zi=Hs,Su=so,Zr=Symbol("fromOffsetCache"),vu=!!(yu&&wu),Xi=!!(ps&&ds),pr=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&&(!Xi||/^\w+:\/\//.test(t.from)||ds(t.from)?this.file=t.from:this.file=ps(t.from)),Xi&&vu){let r=new Su(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 "+bu(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,a;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);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new Zi(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):o=new Zi(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&($t&&(o.input.url=$t(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Zr])r=this[Zr];else{let o=this.css.split(`+`);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[Zr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ps(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:i,line:r}));let l;ds(n.source)?l=$t(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||$t(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(Hi)u.file=Hi(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.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=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Dr=pr;pr.default=pr;Hr&&Hr.registerInput&&Hr.registerInput(pr);let{SourceMapConsumer:io,SourceMapGenerator:sr}=he,{dirname:ir,relative:no,resolve:oo,sep:ao}=he,{pathToFileURL:Ji}=he,Cu=Dr,Eu=!!(io&&sr),Iu=!!(ir&&oo&&no&&ao),xu=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=`+`;this.css.includes(`\r+`)&&(t=`\r+`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||ir(e.file),i;this.mapOpts.sourcesContent===!1?(i=new io(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(),Iu&&Eu&&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=sr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new sr({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 sr({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:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`+`),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.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?ir(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ir(oo(r,this.mapOpts.annotation)));let i=no(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 Cu(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(Ji){let r=Ji(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;ao==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var lo=xu;let Mu=Ar,ms=class extends Mu{constructor(e){super(e),this.type="comment"}};var Tr=ms;ms.default=ms;let{isClean:uo,my:co}=Et,ho=Or,fo=Tr,Ru=Ar,po,Zs,Xs,mo;function go(s){return s.map(e=>(e.nodes&&(e.nodes=go(e.nodes)),delete e.source,e))}function yo(s){if(s[uo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)yo(e)}let be=class wo extends Ru{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"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):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 n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=go(po(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 ho(e)]}else if(e.selector)e=[new Zs(e)];else if(e.name)e=[new Xs(e)];else if(e.text)e=[new fo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[co]||wo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[uo]&&yo(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(o){throw t.addToError(o)}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]}};be.registerParse=s=>{po=s};be.registerRule=s=>{Zs=s};be.registerAtRule=s=>{Xs=s};be.registerRoot=s=>{mo=s};var $e=be;be.default=be;be.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Xs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Zs.prototype):s.type==="decl"?Object.setPrototypeOf(s,ho.prototype):s.type==="comment"?Object.setPrototypeOf(s,fo.prototype):s.type==="root"&&Object.setPrototypeOf(s,mo.prototype),s[co]=!0,s.nodes&&s.nodes.forEach(e=>{be.rebuild(e)})};let Nu=$e,bo,So,pt=class extends Nu{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new bo(new So,this,e).stringify()}};pt.registerLazyResult=s=>{bo=s};pt.registerProcessor=s=>{So=s};var Js=pt;pt.default=pt;let gs=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 vo=gs;gs.default=gs;let Au=vo,ys=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 Au(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ks=ys;ys.default=ys;const Xr=39,Ki=34,Pt=92,Qi=47,Lt=10,it=32,Ft=12,Bt=9,Ut=13,Ou=91,Du=93,Tu=40,_u=41,ku=123,$u=125,Pu=59,Lu=42,Fu=58,Bu=64,Wt=/[\t\n\f\r "#'()/;[\\\]{}]/g,zt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Uu=/.[\r\n"'(/\\]/,qi=/[\da-f]/i;var Wu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,g,p,m=r.length,d=0,y=[],S=[];function w(){return d}function v(B){throw e.error("Unclosed "+B,d)}function x(){return S.length===0&&d>=m}function N(B){if(S.length)return S.pop();if(d>=m)return;let H=B?B.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case Lt:case it:case Bt:case Ut:case Ft:{n=d;do n+=1,o=r.charCodeAt(n);while(o===it||o===Lt||o===Bt||o===Ut||o===Ft);p=["space",r.slice(d,n)],d=n-1;break}case Ou:case Du:case ku:case $u:case Fu:case Pu:case _u:{let Q=String.fromCharCode(o);p=[Q,Q,d];break}case Tu:{if(f=y.length?y.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==Xr&&g!==Ki&&g!==it&&g!==Lt&&g!==Bt&&g!==Ft&&g!==Ut){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||H){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===Pt;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||Uu.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case Xr:case Ki:{a=o===Xr?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||H){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===Pt;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case Bu:{Wt.lastIndex=d+1,Wt.test(r),Wt.lastIndex===0?n=r.length-1:n=Wt.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case Pt:{for(n=d,u=!0;r.charCodeAt(n+1)===Pt;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Qi&&o!==it&&o!==Lt&&o!==Bt&&o!==Ut&&o!==Ft&&(n+=1,qi.test(r.charAt(n)))){for(;qi.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===it&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===Qi&&r.charCodeAt(d+1)===Lu?(n=r.indexOf("*/",d+2)+1,n===0&&(i||H?n=r.length:v("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(zt.lastIndex=d+1,zt.test(r),zt.lastIndex===0?n=r.length-1:n=zt.lastIndex-2,p=["word",r.slice(d,n+1),d,n],y.push(p),d=n);break}}return d++,p}function W(B){S.push(B)}return{back:W,endOfFile:x,nextToken:N,position:w}};let Co=$e,mr=class extends Co{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 Qs=mr;mr.default=mr;Co.registerAtRule(mr);let Eo=$e,Io,xo,Xe=class extends Eo{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 o of i)o.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 Io(new xo,this,e).stringify()}};Xe.registerLazyResult=s=>{Io=s};Xe.registerProcessor=s=>{xo=s};var It=Xe;Xe.default=Xe;Eo.registerRoot(Xe);let mt={comma(s){return mt.split(s,[","],!0)},space(s){let e=[" ",`+`," "];return mt.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var Mo=mt;mt.default=mt;let Ro=$e,zu=Mo,gr=class extends Ro{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return zu.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 qs=gr;gr.default=gr;Ro.registerRule(gr);let Vu=Or,Gu=Wu,ju=Tr,Yu=Qs,Hu=It,en=qs;const tn={empty:!0,space:!0};function Zu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Xu=class{constructor(e){this.input=e,this.root=new Hu,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 Yu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,a=!1,l=[],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==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new ju;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=Gu(this.input)}decl(e,t){let r=new Vu;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]||Zu(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 o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[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(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.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 en;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,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!tn[h]&&!tn[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((g,p)=>g+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new en;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 Ju=Xu;let Ku=$e,Qu=Ju,qu=Dr;function yr(s,e){let t=new qu(s,e),r=new Qu(t);try{r.parse()}catch(i){throw i}return r.root}var ei=yr;yr.default=yr;Ku.registerParse(yr);let{isClean:pe,my:ec}=Et,tc=lo,rc=Nr,sc=$e,ic=Js;let rn=Ks,nc=ei,oc=It;const ac={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},lc={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},uc={Once:!0,postcssPlugin:!0,prepare:!0},Je=0;function nt(s){return typeof s=="object"&&typeof s.then=="function"}function No(s){let e=!1,t=ac[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Je,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Je,t+"Exit"]:[t,t+"Exit"]}function sn(s){let e;return s.type==="document"?e=["Document",Je,"DocumentExit"]:s.type==="root"?e=["Root",Je,"RootExit"]:e=No(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ws(s){return s[pe]=!1,s.nodes&&s.nodes.forEach(e=>ws(e)),s}let bs={},Ke=class Ao{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=ws(t);else if(t instanceof Ao||t instanceof rn)i=ws(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=nc;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[ec]&&sc.rebuild(i)}this.result=new rn(e,i,r),this.helpers=q(M({},bs),{postcss:bs,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?M(M({},o),o.prepare(this.result)):o)}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(!lc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!uc[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(nt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pe];){e[pe]=!0;let t=[sn(e)];for(;t.length>0;){let r=this.visitTick(t);if(nt(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}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(o=>r(o,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 nt(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=rc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new tc(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(nt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pe];)e[pe]=!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 o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(nt(o))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[n,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[pe]){a[pe]=!0,e.push(sn(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===Je){r.nodes&&r.nodes.length&&(r[pe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[pe]=!0;let t=No(e);for(let r of t)if(r===Je)e.nodes&&e.each(i=>{i[pe]||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"}};Ke.registerPostcss=s=>{bs=s};var Oo=Ke;Ke.default=Ke;oc.registerLazyResult(Ke);ic.registerLazyResult(Ke);let cc=lo,hc=Nr;let fc=ei;const dc=Ks;let Ss=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,o=hc;this.result=new dc(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new cc(o,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.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=fc;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 pc=Ss;Ss.default=Ss;let mc=pc,gc=Oo,yc=Js,wc=It,gt=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 mc(this,e,t):new gc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var bc=gt;gt.default=gt;wc.registerProcessor(gt);yc.registerProcessor(gt);let Sc=Or,vc=so,Cc=Tr,Ec=Qs,Ic=Dr,xc=It,Mc=qs;function yt(s,e){if(Array.isArray(s))return s.map(n=>yt(n));let i=s,{inputs:t}=i,r=Fe(i,["inputs"]);if(t){e=[];for(let n of t){let a=q(M({},n),{__proto__:Ic.prototype});a.map&&(a.map=q(M({},a.map),{__proto__:vc.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>yt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Fe(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new xc(r);if(r.type==="decl")return new Sc(r);if(r.type==="rule")return new Mc(r);if(r.type==="comment")return new Cc(r);if(r.type==="atrule")return new Ec(r);throw new Error("Unknown node type: "+s.type)}var Rc=yt;yt.default=yt;let Nc=Hs,Do=Or,Ac=Oo,Oc=$e,ti=bc,Dc=Nr,Tc=Rc,To=Js,_c=vo,_o=Tr,ko=Qs,kc=Ks,$c=Dr,Pc=ei,Lc=Mo,$o=qs,Po=It,Fc=Ar;function L(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ti(s)}L.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:+https://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:+https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new ti().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return L([i(l)]).process(n,a)},i};L.stringify=Dc;L.parse=Pc;L.fromJSON=Tc;L.list=Lc;L.comment=s=>new _o(s);L.atRule=s=>new ko(s);L.decl=s=>new Do(s);L.rule=s=>new $o(s);L.root=s=>new Po(s);L.document=s=>new To(s);L.CssSyntaxError=Nc;L.Declaration=Do;L.Container=Oc;L.Processor=ti;L.Document=To;L.Comment=_o;L.Warning=_c;L.AtRule=ko;L.Result=kc;L.Input=$c;L.Rule=$o;L.Root=Po;L.Node=Fc;Ac.registerPostcss(L);var Bc=L;L.default=L;const j=Kl(Bc);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;const nn={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Uc(s){let e=nn[s.tagName]?nn[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function _r(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=j([Xl,Jl]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function on(){return{stylesWithHoverClass:new Map}}function Wc(s,e,t,r){const i=[];for(const l of s.childNodes)l.type===R.Text&&i.push(l);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));let n="";t&&(n=_r(o.join(""),r));let a=0;for(let l=0;l<i.length&&l!==o.length;l++){const u=i[l];if(!t)u.textContent=o[l];else if(l<o.length-1){let c=a,h=o[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const g=o[l+1].substring(0,h),p=n.substring(a).indexOf(g);if(f=p!==-1,f){c+=p;break}}f||(c+=o[l].length),u.textContent=n.substring(a,c),a=c}else u.textContent=n.substring(a)}}function zc(s,e,t,r){const{doc:i,hackCss:o,cache:n}=r;s.childNodes.length?Wc(s,t,o,n):(o&&(t=_r(t,n)),e.appendChild(i.createTextNode(t)))}function Vc(s,e){var t;const{doc:r,hackCss:i,cache:o}=e;switch(s.type){case R.Document:return r.implementation.createDocument(null,"",null);case R.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case R.Element:{const n=Uc(s);let a;s.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",n):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(n));const l={};for(const u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(n==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(n==="style"&&u==="_cssText"){zc(s,a,c,e);continue}else if(n==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(n==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else n==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||n==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Gs(s.attributes.href)==="js"||(n==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(n==="canvas"&&u==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(n==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case R.Text:return s.isStyle&&i?r.createTextNode(_r(s.textContent,o)):r.createTextNode(s.textContent);case R.CDATA:return r.createCDATASection(s.textContent);case R.Comment:return r.createComment(s.textContent);default:return null}}function ht(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(s.id)){const u=r.getNode(s.id),c=r.getMeta(u);if(Il(c,s))return r.getNode(s.id)}let l=Vc(s,{doc:t,hackCss:o,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===R.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==R.DocumentType&&(s.childNodes[0].type===R.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),r.add(l,s),(s.type===R.Document||s.type===R.Element)&&!i)for(const u of s.childNodes){const c=ht(u,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&zs(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===R.Document&&u.type==R.Element){const h=c;let f=null;h.childNodes.forEach(g=>{g.nodeName==="BODY"&&(f=g)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);n&&n(c,u.id)}return l}function Gc(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function jc(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==R.Element)return;const r=s;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const o=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=o),i==="rr_scrollTop"&&(r.scrollTop=o)}}function Yc(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:n,mirror:a=new Vs}=e,l=ht(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:o,cache:n});return Gc(a,u=>{r&&r(u),jc(u,a)}),l}var Hc=Object.defineProperty,Zc=(s,e,t)=>e in s?Hc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,C=(s,e,t)=>Zc(s,typeof e!="symbol"?e+"":e,t),Xc=Object.defineProperty,Jc=(s,e,t)=>e in s?Xc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,an=(s,e,t)=>Jc(s,typeof e!="symbol"?e+"":e,t);let Kc=class{constructor(){an(this,"idNodeMap",new Map),an(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 Qc(){return new Kc}function qc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function eh(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 ri={exports:{}},G=String,Lo=function(){return{isColorSupported:!1,reset:G,bold:G,dim:G,italic:G,underline:G,inverse:G,hidden:G,strikethrough:G,black:G,red:G,green:G,yellow:G,blue:G,magenta:G,cyan:G,white:G,gray:G,bgBlack:G,bgRed:G,bgGreen:G,bgYellow:G,bgBlue:G,bgMagenta:G,bgCyan:G,bgWhite:G}};ri.exports=Lo();ri.exports.createColors=Lo;var th=ri.exports;const rh={},sh=Object.freeze(Object.defineProperty({__proto__:null,default:rh},Symbol.toStringTag,{value:"Module"})),fe=eh(sh);let ln=th,un=fe,vs=class Fo extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),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,Fo)}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=ln.isColorSupported),un&&e&&(t=un(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=ln.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`+ `+g+a("^")}return" "+l(f)+u}).join(`+`)}toString(){let e=this.showSourceCode();return e&&(e=`++`+e+`+`),this.name+": "+this.message+e}};var si=vs;vs.default=vs;var xt={};xt.isClean=Symbol("isClean");xt.my=Symbol("my");const cn={after:`+`,beforeClose:`+`,beforeComment:`+`,beforeDecl:`+`,beforeOpen:" ",beforeRule:`+`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function ih(s){return s[0].toUpperCase()+s.slice(1)}let Cs=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 o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,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,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`+`)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}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 o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,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 o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return cn[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+ih(r);this[a]?i=this[a](n,e):n.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=cn[r]),n.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(`+`)&&(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(`+`)&&(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(`+`)&&(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(`+`)&&(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 o=r.raws.before.split(`+`);return t=o[o.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 Bo=Cs;Cs.default=Cs;let nh=Bo;function Es(s,e){new nh(e).stringify(s)}var kr=Es;Es.default=Es;let{isClean:Vt,my:oh}=xt,ah=si,lh=Bo,uh=kr;function Is(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],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>Is(n,t)):(o==="object"&&i!==null&&(i=Is(i)),t[r]=i)}return t}let xs=class{constructor(e={}){this.raws={},this[Vt]=!1,this[oh]=!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=Is(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 ah(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[Vt]){this[Vt]=!1;let e=this;for(;e=e.parent;)e[Vt]=!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,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`+`?(i=1,o+=1):i+=1;return{column:i,line:o}}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(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+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 lh().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 o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=uh){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}};var $r=xs;xs.default=xs;let ch=$r,Ms=class extends ch{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=q(M({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Pr=Ms;Ms.default=Ms;let hh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",fh=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},dh=(s=21)=>{let e="",t=s;for(;t--;)e+=hh[Math.random()*64|0];return e};var ph={nanoid:dh,customAlphabet:fh};let{SourceMapConsumer:hn,SourceMapGenerator:fn}=fe,{existsSync:mh,readFileSync:gh}=fe,{dirname:Jr,join:yh}=fe;function wh(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Rs=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=Jr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new hn(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,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return wh(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}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=Jr(e),mh(e))return this.mapFile=e,gh(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 hn)return fn.fromSourceMap(t).toString();if(t instanceof fn)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=yh(Jr(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 Uo=Rs;Rs.default=Rs;let{SourceMapConsumer:bh,SourceMapGenerator:Sh}=fe,{fileURLToPath:dn,pathToFileURL:Gt}=fe,{isAbsolute:Ns,resolve:As}=fe,{nanoid:vh}=ph,Kr=fe,pn=si,Ch=Uo,Qr=Symbol("fromOffsetCache"),Eh=!!(bh&&Sh),mn=!!(As&&Ns),wr=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&&(!mn||/^\w+:\/\//.test(t.from)||Ns(t.from)?this.file=t.from:this.file=As(t.from)),mn&&Eh){let r=new Ch(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 "+vh(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,a;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);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new pn(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):o=new pn(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(Gt&&(o.input.url=Gt(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Qr])r=this[Qr];else{let o=this.css.split(`+`);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[Qr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:As(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:i,line:r}));let l;Ns(n.source)?l=Gt(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||Gt(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(dn)u.file=dn(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.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=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Lr=wr;wr.default=wr;Kr&&Kr.registerInput&&Kr.registerInput(wr);let{SourceMapConsumer:Wo,SourceMapGenerator:nr}=fe,{dirname:or,relative:zo,resolve:Vo,sep:Go}=fe,{pathToFileURL:gn}=fe,Ih=Lr,xh=!!(Wo&&nr),Mh=!!(or&&Vo&&zo&&Go),Rh=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=`+`;this.css.includes(`\r+`)&&(t=`\r+`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||or(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Wo(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(),Mh&&xh&&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=nr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new nr({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 nr({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:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`+`),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.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?or(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=or(Vo(r,this.mapOpts.annotation)));let i=zo(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 Ih(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(gn){let r=gn(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;Go==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var jo=Rh;let Nh=$r,Os=class extends Nh{constructor(e){super(e),this.type="comment"}};var Fr=Os;Os.default=Os;let{isClean:Yo,my:Ho}=xt,Zo=Pr,Xo=Fr,Ah=$r,Jo,ii,ni,Ko;function Qo(s){return s.map(e=>(e.nodes&&(e.nodes=Qo(e.nodes)),delete e.source,e))}function qo(s){if(s[Yo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)qo(e)}let Se=class ea extends Ah{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"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):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 n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Qo(Jo(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 Zo(e)]}else if(e.selector)e=[new ii(e)];else if(e.name)e=[new ni(e)];else if(e.text)e=[new Xo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Ho]||ea.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Yo]&&qo(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(o){throw t.addToError(o)}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]}};Se.registerParse=s=>{Jo=s};Se.registerRule=s=>{ii=s};Se.registerAtRule=s=>{ni=s};Se.registerRoot=s=>{Ko=s};var Pe=Se;Se.default=Se;Se.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ni.prototype):s.type==="rule"?Object.setPrototypeOf(s,ii.prototype):s.type==="decl"?Object.setPrototypeOf(s,Zo.prototype):s.type==="comment"?Object.setPrototypeOf(s,Xo.prototype):s.type==="root"&&Object.setPrototypeOf(s,Ko.prototype),s[Ho]=!0,s.nodes&&s.nodes.forEach(e=>{Se.rebuild(e)})};let Oh=Pe,ta,ra,wt=class extends Oh{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ta(new ra,this,e).stringify()}};wt.registerLazyResult=s=>{ta=s};wt.registerProcessor=s=>{ra=s};var oi=wt;wt.default=wt;let Ds=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 sa=Ds;Ds.default=Ds;let Dh=sa,Ts=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 Dh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ai=Ts;Ts.default=Ts;const qr=39,yn=34,jt=92,wn=47,Yt=10,ot=32,Ht=12,Zt=9,Xt=13,Th=91,_h=93,kh=40,$h=41,Ph=123,Lh=125,Fh=59,Bh=42,Uh=58,Wh=64,Jt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Kt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,zh=/.[\r\n"'(/\\]/,bn=/[\da-f]/i;var Vh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,g,p,m=r.length,d=0,y=[],S=[];function w(){return d}function v(B){throw e.error("Unclosed "+B,d)}function x(){return S.length===0&&d>=m}function N(B){if(S.length)return S.pop();if(d>=m)return;let H=B?B.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case Yt:case ot:case Zt:case Xt:case Ht:{n=d;do n+=1,o=r.charCodeAt(n);while(o===ot||o===Yt||o===Zt||o===Xt||o===Ht);p=["space",r.slice(d,n)],d=n-1;break}case Th:case _h:case Ph:case Lh:case Uh:case Fh:case $h:{let Q=String.fromCharCode(o);p=[Q,Q,d];break}case kh:{if(f=y.length?y.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==qr&&g!==yn&&g!==ot&&g!==Yt&&g!==Zt&&g!==Ht&&g!==Xt){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||H){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===jt;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||zh.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case qr:case yn:{a=o===qr?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||H){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===jt;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case Wh:{Jt.lastIndex=d+1,Jt.test(r),Jt.lastIndex===0?n=r.length-1:n=Jt.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case jt:{for(n=d,u=!0;r.charCodeAt(n+1)===jt;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==wn&&o!==ot&&o!==Yt&&o!==Zt&&o!==Xt&&o!==Ht&&(n+=1,bn.test(r.charAt(n)))){for(;bn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===ot&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===wn&&r.charCodeAt(d+1)===Bh?(n=r.indexOf("*/",d+2)+1,n===0&&(i||H?n=r.length:v("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(Kt.lastIndex=d+1,Kt.test(r),Kt.lastIndex===0?n=r.length-1:n=Kt.lastIndex-2,p=["word",r.slice(d,n+1),d,n],y.push(p),d=n);break}}return d++,p}function W(B){S.push(B)}return{back:W,endOfFile:x,nextToken:N,position:w}};let ia=Pe,br=class extends ia{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 li=br;br.default=br;ia.registerAtRule(br);let na=Pe,oa,aa,Qe=class extends na{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 o of i)o.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 oa(new aa,this,e).stringify()}};Qe.registerLazyResult=s=>{oa=s};Qe.registerProcessor=s=>{aa=s};var Mt=Qe;Qe.default=Qe;na.registerRoot(Qe);let bt={comma(s){return bt.split(s,[","],!0)},space(s){let e=[" ",`+`," "];return bt.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var la=bt;bt.default=bt;let ua=Pe,Gh=la,Sr=class extends ua{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Gh.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 ui=Sr;Sr.default=Sr;ua.registerRule(Sr);let jh=Pr,Yh=Vh,Hh=Fr,Zh=li,Xh=Mt,Sn=ui;const vn={empty:!0,space:!0};function Jh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Kh=class{constructor(e){this.input=e,this.root=new Xh,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 Zh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,a=!1,l=[],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==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new Hh;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=Yh(this.input)}decl(e,t){let r=new jh;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]||Jh(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 o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[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(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.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 Sn;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,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!vn[h]&&!vn[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((g,p)=>g+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Sn;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 Qh=Kh;let qh=Pe,ef=Qh,tf=Lr;function vr(s,e){let t=new tf(s,e),r=new ef(t);try{r.parse()}catch(i){throw i}return r.root}var ci=vr;vr.default=vr;qh.registerParse(vr);let{isClean:me,my:rf}=xt,sf=jo,nf=kr,of=Pe,af=oi;let Cn=ai,lf=ci,uf=Mt;const cf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},hf={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},ff={Once:!0,postcssPlugin:!0,prepare:!0},qe=0;function at(s){return typeof s=="object"&&typeof s.then=="function"}function ca(s){let e=!1,t=cf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,qe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,qe,t+"Exit"]:[t,t+"Exit"]}function En(s){let e;return s.type==="document"?e=["Document",qe,"DocumentExit"]:s.type==="root"?e=["Root",qe,"RootExit"]:e=ca(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function _s(s){return s[me]=!1,s.nodes&&s.nodes.forEach(e=>_s(e)),s}let ks={},et=class ha{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=_s(t);else if(t instanceof ha||t instanceof Cn)i=_s(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=lf;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[rf]&&of.rebuild(i)}this.result=new Cn(e,i,r),this.helpers=q(M({},ks),{postcss:ks,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?M(M({},o),o.prepare(this.result)):o)}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(!hf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ff[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(at(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];){e[me]=!0;let t=[En(e)];for(;t.length>0;){let r=this.visitTick(t);if(at(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}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(o=>r(o,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 at(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=nf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new sf(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(at(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];)e[me]=!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 o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(at(o))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[n,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[me]){a[me]=!0,e.push(En(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===qe){r.nodes&&r.nodes.length&&(r[me]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[me]=!0;let t=ca(e);for(let r of t)if(r===qe)e.nodes&&e.each(i=>{i[me]||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"}};et.registerPostcss=s=>{ks=s};var fa=et;et.default=et;uf.registerLazyResult(et);af.registerLazyResult(et);let df=jo,pf=kr;let mf=ci;const gf=ai;let $s=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,o=pf;this.result=new gf(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new df(o,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.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=mf;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 yf=$s;$s.default=$s;let wf=yf,bf=fa,Sf=oi,vf=Mt,St=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 wf(this,e,t):new bf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Cf=St;St.default=St;vf.registerProcessor(St);Sf.registerProcessor(St);let Ef=Pr,If=Uo,xf=Fr,Mf=li,Rf=Lr,Nf=Mt,Af=ui;function vt(s,e){if(Array.isArray(s))return s.map(n=>vt(n));let i=s,{inputs:t}=i,r=Fe(i,["inputs"]);if(t){e=[];for(let n of t){let a=q(M({},n),{__proto__:Rf.prototype});a.map&&(a.map=q(M({},a.map),{__proto__:If.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>vt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Fe(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Nf(r);if(r.type==="decl")return new Ef(r);if(r.type==="rule")return new Af(r);if(r.type==="comment")return new xf(r);if(r.type==="atrule")return new Mf(r);throw new Error("Unknown node type: "+s.type)}var Of=vt;vt.default=vt;let Df=si,da=Pr,Tf=fa,_f=Pe,hi=Cf,kf=kr,$f=Of,pa=oi,Pf=sa,ma=Fr,ga=li,Lf=ai,Ff=Lr,Bf=ci,Uf=la,ya=ui,wa=Mt,Wf=$r;function F(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new hi(s)}F.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:+https://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:+https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new hi().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return F([i(l)]).process(n,a)},i};F.stringify=kf;F.parse=Bf;F.fromJSON=$f;F.list=Uf;F.comment=s=>new ma(s);F.atRule=s=>new ga(s);F.decl=s=>new da(s);F.rule=s=>new ya(s);F.root=s=>new wa(s);F.document=s=>new pa(s);F.CssSyntaxError=Df;F.Declaration=da;F.Container=_f;F.Processor=hi;F.Document=pa;F.Comment=ma;F.Warning=Pf;F.AtRule=ga;F.Result=Lf;F.Input=Ff;F.Rule=ya;F.Root=wa;F.Node=Wf;Tf.registerPostcss(F);var zf=F;F.default=F;const Y=qc(zf);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;var D=(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))(D||{});function Vf(s){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(o){if(o){const n=o.split(r);n.length>1&&(e[Ps(n[0].trim())]=n[1].trim())}}),e}function In(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=Hf(t);e.push(`${i}: ${r};`)}return e.join(" ")}const Gf=/-([a-z])/g,jf=/^--[a-zA-Z0-9-]+$/,Ps=s=>jf.test(s)?s:s.replace(Gf,(e,t)=>t?t.toUpperCase():""),Yf=/\B([A-Z])/g,Hf=s=>s.replace(Yf,"-$1").toLowerCase();class de{constructor(...e){C(this,"parentElement",null),C(this,"parentNode",null),C(this,"ownerDocument"),C(this,"firstChild",null),C(this,"lastChild",null),C(this,"previousSibling",null),C(this,"nextSibling",null),C(this,"ELEMENT_NODE",1),C(this,"TEXT_NODE",3),C(this,"nodeType"),C(this,"nodeName"),C(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 de){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"}}class fi extends de{constructor(...e){super(e),C(this,"nodeType",9),C(this,"nodeName","#document"),C(this,"compatMode","CSS1Compat"),C(this,"RRNodeType",D.Document),C(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===D.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===D.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===D.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===D.Element||t===D.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===D.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=di(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===D.Element||r===D.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===D.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Ea(this,e,t);return i.parentElement=null,i}removeChild(e){return Ia(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new fi}createDocumentType(e,t,r){const i=new ba(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new Br(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Sa(e);return t.ownerDocument=this,t}createComment(e){const t=new va(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Ca(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class ba extends de{constructor(e,t,r){super(),C(this,"nodeType",10),C(this,"RRNodeType",D.DocumentType),C(this,"name"),C(this,"publicId"),C(this,"systemId"),C(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Br extends de{constructor(e){super(),C(this,"nodeType",1),C(this,"RRNodeType",D.Element),C(this,"tagName"),C(this,"attributes",{}),C(this,"shadowRoot",null),C(this,"scrollLeft"),C(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new Jf(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Vf(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;const n=Ps(r);i?e[n]=i:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=In(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=Ps(r),o=e[i]||"";return delete e[i],this.attributes.style=In(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return di(this,e)}insertBefore(e,t){return Ea(this,e,t)}removeChild(e){return Ia(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class Zf extends Br{constructor(){super(...arguments),C(this,"currentTime"),C(this,"volume"),C(this,"paused"),C(this,"muted"),C(this,"playbackRate"),C(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Xf extends Br{constructor(){super(...arguments),C(this,"tagName","DIALOG"),C(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class Sa extends de{constructor(e){super(),C(this,"nodeType",3),C(this,"nodeName","#text"),C(this,"RRNodeType",D.Text),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class va extends de{constructor(e){super(),C(this,"nodeType",8),C(this,"nodeName","#comment"),C(this,"RRNodeType",D.Comment),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Ca extends de{constructor(e){super(),C(this,"nodeName","#cdata-section"),C(this,"nodeType",4),C(this,"RRNodeType",D.CDATA),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Jf{constructor(e,t){if(C(this,"onChange"),C(this,"classes",[]),C(this,"add",(...r)=>{for(const i of r){const o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),C(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function di(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function Ea(s,e,t){if(!t)return di(s,e);if(t.parentNode!==s)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function Ia(s,e){if(e.parentNode!==s)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var ae=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(ae||{});const Ls={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Kf={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let ge=null;function Cr(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=Qf(s,e,t,r),xa(s,e,t,r),qf(s,e,t)}function Qf(s,e,t,r){var i;if(t.afterAppend&&!ge&&(ge=new WeakSet,setTimeout(()=>{ge=null},0)),!pi(s,e)){const o=Er(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(o,s),s=o}switch(e.RRNodeType){case D.Document:{if(!Ue(s,e,t.mirror,r)){const o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,o),ge==null||ge.add(s))}break}case D.Element:{const o=s,n=e;switch(n.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;Cr(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),xa(o.shadowRoot,n.shadowRoot,t,r)),ed(o,n,r);break}}return s}function qf(s,e,t){var r;switch(e.RRNodeType){case D.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case D.Element:{const i=s,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const n=s,a=o;a.paused!==void 0&&(a.paused?n.pause():n.play()),a.muted!==void 0&&(n.muted=a.muted),a.volume!==void 0&&(n.volume=a.volume),a.currentTime!==void 0&&(n.currentTime=a.currentTime),a.playbackRate!==void 0&&(n.playbackRate=a.playbackRate),a.loop!==void 0&&(n.loop=a.loop);break}case"CANVAS":{const n=e;if(n.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=n.rr_dataURL}n.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{const n=i.sheet;n&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,n));break}case"DIALOG":{const n=i,a=o,l=n.open,u=n.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,g=l!==c;if((f||l&&g)&&n.close(),c&&(g||f))try{h?n.showModal():n.show()}catch(p){console.warn(p)}break}}break}case D.Text:case D.Comment:case D.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}ge!=null&&ge.has(s)&&(ge.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function ed(s,e,t){const r=s.attributes,i=e.attributes;for(const o in i){const n=i[o],a=t.getMeta(e);if(a!=null&&a.isSVG&&Ls[o])s.setAttributeNS(Ls[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{s.setAttribute(o,n)}catch(l){console.warn(l)}}}for(const{name:o}of Array.from(r))o in i||s.removeAttribute(o);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function xa(s,e,t,r){const i=Array.from(s.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let n=0,a=i.length-1,l=0,u=o.length-1,c=i[n],h=i[a],f=o[l],g=o[u],p,m;for(;n<=a&&l<=u;)if(c===void 0)c=i[++n];else if(h===void 0)h=i[--a];else if(Ue(c,f,t.mirror,r))c=i[++n],f=o[++l];else if(Ue(h,g,t.mirror,r))h=i[--a],g=o[--u];else if(Ue(c,g,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(S){console.warn(S)}c=i[++n],g=o[--u]}else if(Ue(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(S){console.warn(S)}h=i[--a],f=o[++l]}else{if(!p){p={};for(let w=n;w<=a;w++){const v=i[w];v&&t.mirror.hasNode(v)&&(p[t.mirror.getId(v)]=w)}}m=p[r.getId(f)];const S=i[m];if(m!==void 0&&S&&Ue(S,f,t.mirror,r)){try{s.insertBefore(S,c)}catch(w){console.warn(w)}i[m]=void 0}else{const w=Er(f,t.mirror,r);s.nodeName==="#document"&&c&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++n]);try{s.insertBefore(w,c||null)}catch(v){console.warn(v)}}f=o[++l]}if(n>a){const S=o[u+1];let w=null;for(S&&(w=t.mirror.getNode(r.getId(S)));l<=u;++l){const v=Er(o[l],t.mirror,r);try{s.insertBefore(v,w)}catch(x){console.warn(x)}}}else if(l>u)for(;n<=a;n++){const S=i[n];if(!(!S||S.parentNode!==s))try{s.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(w){console.warn(w)}}let d=s.firstChild,y=e.firstChild;for(;d!==null&&y!==null;)Cr(d,y,t,r),d=d.nextSibling,y=y.nextSibling}function Er(s,e,t){const r=t.getId(s),i=t.getMeta(s);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&pi(o,s))return o;switch(s.RRNodeType){case D.Document:o=new Document;break;case D.DocumentType:o=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case D.Element:{let n=s.tagName.toLowerCase();n=Kf[n]||n,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(Ls.svg,n):o=document.createElement(s.tagName);break}case D.Text:o=document.createTextNode(s.data);break;case D.Comment:o=document.createComment(s.data);break;case D.CDATA:o=document.createCDATASection(s.data);break}i&&e.add(o,M({},i));try{ge==null||ge.add(o)}catch(n){}return o}function pi(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function Ue(s,e,t,r){const i=t.getId(s),o=r.getId(e);return i===-1||i!==o?!1:pi(s,e)}class rt extends fi{constructor(e){super(),C(this,"UNSERIALIZED_STARTING_ID",-2),C(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),C(this,"mirror",fd()),C(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new rt}createDocumentType(e,t,r){const i=new td(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new rd(t);break;case"IFRAME":r=new od(t,this.mirror);break;case"CANVAS":r=new id(t);break;case"STYLE":r=new nd(t);break;case"DIALOG":r=new sd(t);break;default:r=new Ur(t);break}return r.ownerDocument=this,r}createComment(e){const t=new ld(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new ud(e);return t.ownerDocument=this,t}createTextNode(e){const t=new ad(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const td=ba;class Ur extends Br{constructor(){super(...arguments),C(this,"inputData",null),C(this,"scrollData",null)}}class rd extends Zf{}class sd extends Xf{}class id extends Ur{constructor(){super(...arguments),C(this,"rr_dataURL",null),C(this,"canvasMutations",[])}getContext(){return null}}class nd extends Ur{constructor(){super(...arguments),C(this,"rules",[])}}class od extends Ur{constructor(e,t){super(e),C(this,"contentDocument",new rt),this.contentDocument.mirror=t}}const ad=Sa,ld=va,ud=Ca;function cd(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function Ma(s,e,t,r){let i;switch(s.nodeType){case ae.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case ae.DOCUMENT_TYPE_NODE:{const n=s;i=e.createDocumentType(n.name,n.publicId,n.systemId);break}case ae.ELEMENT_NODE:{const n=s,a=cd(n);i=e.createElement(a);const l=i;for(const{name:u,value:c}of Array.from(n.attributes))l.attributes[u]=c;n.scrollLeft&&(l.scrollLeft=n.scrollLeft),n.scrollTop&&(l.scrollTop=n.scrollTop);break}case ae.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case ae.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case ae.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case ae.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(s);return e instanceof rt&&(o||(o=Ra(i,e.unserializedId),t.add(s,o)),e.mirror.add(i,M({},o))),i}function hd(s,e=Qc(),t=new rt){function r(i,o){const n=Ma(i,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==ae.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(n),n.parentNode=o,n.parentElement=o),i.nodeName==="IFRAME"){const a=i.contentDocument;a&&r(a,n)}else(i.nodeType===ae.DOCUMENT_NODE||i.nodeType===ae.ELEMENT_NODE||i.nodeType===ae.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ae.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,n),i.childNodes.forEach(a=>r(a,n)))}return r(s,null),t}function fd(){return new dd}class dd{constructor(){C(this,"idNodeMap",new Map),C(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 Ra(s,e){switch(s.RRNodeType){case D.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case D.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case D.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case D.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case D.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case D.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const xn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Mn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Qt={},pd=()=>!!globalThis.Zone;function mi(s){if(Qt[s])return Qt[s];const e=globalThis[s],t=e.prototype,r=s in xn?xn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Mn?Mn[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!pd())return Qt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?Qt[s]=u:t}catch(a){return t}}const es={};function Ee(s,e,t){var r;const i=`${s}.${String(t)}`;if(es[i])return es[i].call(e);const o=mi(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(es[i]=n,n.call(e)):e[t]}const ts={};function Na(s,e,t){const r=`${s}.${String(t)}`;if(ts[r])return ts[r].bind(e);const o=mi(s)[t];return typeof o!="function"?e[t]:(ts[r]=o,o.bind(e))}function md(s){return Ee("Node",s,"ownerDocument")}function gd(s){return Ee("Node",s,"childNodes")}function yd(s){return Ee("Node",s,"parentNode")}function wd(s){return Ee("Node",s,"parentElement")}function bd(s){return Ee("Node",s,"textContent")}function Sd(s,e){return Na("Node",s,"contains")(e)}function vd(s){return Na("Node",s,"getRootNode")()}function Cd(s){return!s||!("host"in s)?null:Ee("ShadowRoot",s,"host")}function Ed(s){return s.styleSheets}function Id(s){return!s||!("shadowRoot"in s)?null:Ee("Element",s,"shadowRoot")}function xd(s,e){return Ee("Element",s,"querySelector")(e)}function Md(s,e){return Ee("Element",s,"querySelectorAll")(e)}function Aa(){return mi("MutationObserver").constructor}function Le(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()=>{}}}const A={ownerDocument:md,childNodes:gd,parentNode:yd,parentElement:wd,textContent:bd,contains:Sd,getRootNode:vd,host:Cd,styleSheets:Ed,shadowRoot:Id,querySelector:xd,querySelectorAll:Md,mutationObserver:Aa,patch:Le};function te(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const We=`Please stop import mirror directly. Instead of that,\rnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r-or you can use record.mirror to access the mirror instance during recording.`;re.mirror={map:{},getId(){return console.error(Me),-1},getNode(){return console.error(Me),null},removeNodeFromMap(){console.error(Me)},has(){return console.error(Me),!1},reset(){console.error(Me)}},typeof window<"u"&&window.Proxy&&window.Reflect&&(re.mirror=new Proxy(re.mirror,{get(t,e,r){return e==="map"&&console.error(Me),Reflect.get(t,e,r)}}));function Ie(t,e,r={}){let n=null,o=0;return function(...a){const i=Date.now();!o&&r.leading===!1&&(o=i);const l=e-(i-o),s=this;l<=0||l>e?(n&&(clearTimeout(n),n=null),o=i,t.apply(s,a)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{o=r.leading===!1?0:Date.now(),n=null,t.apply(s,a)},l))}}function Ve(t,e,r,n,o=window){const a=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,n?r:{set(i){setTimeout(()=>{r.set.call(this,i)},0),a&&a.set&&a.set.call(this,i)}}),()=>Ve(t,e,a||{},!0)}function De(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=o,()=>{t[e]=n}}catch{return()=>{}}}let Be=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Be=()=>new Date().getTime());function yt(t){var e,r,n,o,a,i;const l=t.document;return{left:l.scrollingElement?l.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:l?.documentElement.scrollLeft||((r=(e=l?.body)==null?void 0:e.parentElement)==null?void 0:r.scrollLeft)||((n=l?.body)==null?void 0:n.scrollLeft)||0,top:l.scrollingElement?l.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:l?.documentElement.scrollTop||((a=(o=l?.body)==null?void 0:o.parentElement)==null?void 0:a.scrollTop)||((i=l?.body)==null?void 0:i.scrollTop)||0}}function gt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function vt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function te(t,e,r,n){if(!t)return!1;const o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(!o)return!1;try{if(typeof e=="string"){if(o.classList.contains(e)||n&&o.closest("."+e)!==null)return!0}else if(Ke(o,e,n))return!0}catch{}return!!(r&&(o.matches(r)||n&&o.closest(r)!==null))}function rr(t,e){return e.getId(t)!==-1}function Je(t,e){return e.getId(t)===$e}function St(t,e){if(Pe(t))return!1;const r=e.getId(t);return e.has(r)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?St(t.parentNode,e):!0:!0}function Qe(t){return Boolean(t.changedTouches)}function bt(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let r=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function nr(t){const e={},r=(o,a)=>{const i={value:o,parent:a,children:[]};return e[o.node.id]=i,i},n=[];for(const o of t){const{nextId:a,parentId:i}=o;if(a&&a in e){const l=e[a];if(l.parent){const s=l.parent.children.indexOf(l);l.parent.children.splice(s,0,r(o,l.parent))}else{const s=n.indexOf(l);n.splice(s,0,r(o,null))}continue}if(i in e){const l=e[i];l.children.push(r(o,l));continue}n.push(r(o,null))}return n}function wt(t,e){e(t.value);for(let r=t.children.length-1;r>=0;r--)wt(t.children[r],e)}function ke(t,e){return Boolean(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ct(t,e){return Boolean(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Et(t,e){var r,n;const o=(n=(r=t.ownerDocument)==null?void 0:r.defaultView)==null?void 0:n.frameElement;if(!o||o===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const a=o.getBoundingClientRect(),i=Et(o,e),l=a.height/o.clientHeight;return{x:a.x*i.relativeScale+i.x,y:a.y*i.relativeScale+i.y,relativeScale:l,absoluteScale:i.absoluteScale*l}}function ve(t){return Boolean(t?.shadowRoot)}function Re(t,e){const r=t[e[0]];return e.length===1?r:Re(r.cssRules[e[1]].cssRules,e.slice(2))}function Tt(t){const e=[...t],r=e.pop();return{positions:e,index:r}}function or(t){const e=new Set,r=[];for(let n=t.length;n--;){const o=t[n];e.has(o.id)||(r.push(o),e.add(o.id))}return r}class Nt{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var r;return(r=this.styleIDMap.get(e))!=null?r:-1}has(e){return this.styleIDMap.has(e)}add(e,r){if(this.has(e))return this.getId(e);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}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 Mt(t){var e,r;let n=null;return((r=(e=t.getRootNode)==null?void 0:e.call(t))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(n=t.getRootNode().host),n}function sr(t){let e=t,r;for(;r=Mt(e);)e=r;return e}function ir(t){const e=t.ownerDocument;if(!e)return!1;const r=sr(t);return e.contains(r)}function It(t){const e=t.ownerDocument;return e?e.contains(t)||ir(t):!1}var Zn=Object.freeze({__proto__:null,on:ee,get _mirror(){return re.mirror},throttle:Ie,hookSetter:Ve,patch:De,get nowTimestamp(){return Be},getWindowScroll:yt,getWindowHeight:gt,getWindowWidth:vt,isBlocked:te,isSerialized:rr,isIgnored:Je,isAncestorRemoved:St,legacy_isTouchEvent:Qe,polyfill:bt,queueToResolveTrees:nr,iterateResolveTree:wt,isSerializedIframe:ke,isSerializedStylesheet:Ct,getBaseDimension:Et,hasShadowRoot:ve,getNestedRule:Re,getPositionsAndIndex:Tt,uniqueTextMutations:or,StyleSheetMirror:Nt,getShadowHost:Mt,getRootShadowHost:sr,shadowHostInDom:ir,inDom:It}),T=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(T||{}),E=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t))(E||{}),L=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(L||{}),me=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(me||{}),fe=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(fe||{}),ye=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(ye||{}),A=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t))(A||{});function ar(t){return"__ln"in t}class Kn{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<e;n++)r=r?.next||null;return r}addNode(e){const r={value:e,previous:null,next:null};if(e.__ln=r,e.previousSibling&&ar(e.previousSibling)){const n=e.previousSibling.__ln.next;r.next=n,r.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(e.nextSibling&&ar(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;r.previous=n,r.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(e){const r=e.__ln;!this.head||(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const lr=(t,e)=>`${t}@${e}`;class Jn{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],r=new Set,n=new Kn,o=s=>{let c=s,u=$e;for(;u===$e;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},a=s=>{if(!s.parentNode||!It(s))return;const c=Pe(s.parentNode)?this.mirror.getId(Mt(s)):this.mirror.getId(s.parentNode),u=o(s);if(c===-1||u===-1)return n.addNode(s);const d=Ne(s,{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:h=>{ke(h,this.mirror)&&this.iframeManager.addIframe(h),Ct(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),ve(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(h,m)=>{this.iframeManager.attachIframe(h,m),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,m)=>{this.stylesheetManager.attachLinkElement(h,m)}});d&&(e.push({parentId:c,nextId:u,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const s of this.movedSet)cr(this.removes,s,this.mirror)&&!this.movedSet.has(s.parentNode)||a(s);for(const s of this.addedSet)!dr(this.droppedSet,s)&&!cr(this.removes,s,this.mirror)||dr(this.movedSet,s)?a(s):this.droppedSet.add(s);let i=null;for(;n.length;){let s=null;if(i){const c=this.mirror.getId(i.value.parentNode),u=o(i.value);c!==-1&&u!==-1&&(s=i)}if(!s){let c=n.tail;for(;c;){const u=c;if(c=c.previous,u){const d=this.mirror.getId(u.value.parentNode);if(o(u.value)===-1)continue;if(d!==-1){s=u;break}else{const h=u.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=h.parentNode.host;if(this.mirror.getId(m)!==-1){s=u;break}}}}}}if(!s){for(;n.head;)n.removeNode(n.head.value);break}i=s.previous,n.removeNode(s.value),a(s.value)}const l={texts:this.texts.map(s=>({id:this.mirror.getId(s.node),value:s.value})).filter(s=>!r.has(s.id)).filter(s=>this.mirror.has(s.id)),attributes:this.attributes.map(s=>{const{attributes:c}=s;if(typeof c.style=="string"){const u=JSON.stringify(s.styleDiff),d=JSON.stringify(s._unchangedStyles);u.length<c.style.length&&(u+d).split("var(").length===c.style.split("var(").length&&(c.style=s.styleDiff)}return{id:this.mirror.getId(s.node),attributes:c}}).filter(s=>!r.has(s.id)).filter(s=>this.mirror.has(s.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.processMutation=e=>{if(Je(e.target,this.mirror))return;let r;try{r=document.implementation.createHTMLDocument()}catch{r=this.doc}switch(e.type){case"characterData":{const n=e.target.textContent;!te(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:Kt(e.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let o=e.attributeName,a=e.target.getAttribute(o);if(o==="value"){const l=pt(n);a=ht({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:l,value:a,maskInputFn:this.maskInputFn})}if(te(e.target,this.blockClass,this.blockSelector,!1)||a===e.oldValue)return;let i=this.attributes.find(l=>l.node===e.target);if(n.tagName==="IFRAME"&&o==="src"&&!this.keepIframeSrcFn(a))if(!n.contentDocument)o="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i)),o==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Zt(n.tagName,o)&&(i.attributes[o]=Xt(this.doc,ge(n.tagName),ge(o),a),o==="style")){const l=r.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(const s of Array.from(n.style)){const c=n.style.getPropertyValue(s),u=n.style.getPropertyPriority(s);c!==l.style.getPropertyValue(s)||u!==l.style.getPropertyPriority(s)?u===""?i.styleDiff[s]=c:i.styleDiff[s]=[c,u]:i._unchangedStyles[s]=[c,u]}for(const s of Array.from(l.style))n.style.getPropertyValue(s)===""&&(i.styleDiff[s]=!1)}break}case"childList":{if(te(e.target,this.blockClass,this.blockSelector,!0))return;e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const o=this.mirror.getId(n),a=Pe(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);te(e.target,this.blockClass,this.blockSelector,!1)||Je(n,this.mirror)||!rr(n,this.mirror)||(this.addedSet.has(n)?(Dt(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&o===-1||St(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[lr(o,a)]?Dt(this.movedSet,n):this.removes.push({parentId:a,id:o,isShadow:Pe(e.target)&&We(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,r)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Je(e,this.mirror))return;this.movedSet.add(e);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[lr(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);te(e,this.blockClass,this.blockSelector,!1)||(e.childNodes.forEach(n=>this.genAdds(n)),ve(e)&&e.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,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(r=>{this[r]=e[r]})}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 Dt(t,e){t.delete(e),e.childNodes.forEach(r=>Dt(t,r))}function cr(t,e,r){return t.length===0?!1:ur(t,e,r)}function ur(t,e,r){const{parentNode:n}=e;if(!n)return!1;const o=r.getId(n);return t.some(a=>a.id===o)?!0:ur(t,n,r)}function dr(t,e){return t.size===0?!1:hr(t,e)}function hr(t,e){const{parentNode:r}=e;return r?t.has(r)?!0:hr(t,r):!1}let Ge;function Qn(t){Ge=t}function qn(){Ge=void 0}const x=t=>Ge?(...e)=>{try{return t(...e)}catch(r){if(Ge&&Ge(r)===!0)return;throw r}}:t;var eo=Object.defineProperty,to=Object.defineProperties,ro=Object.getOwnPropertyDescriptors,pr=Object.getOwnPropertySymbols,no=Object.prototype.hasOwnProperty,oo=Object.prototype.propertyIsEnumerable,mr=(t,e,r)=>e in t?eo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,kt=(t,e)=>{for(var r in e||(e={}))no.call(e,r)&&mr(t,r,e[r]);if(pr)for(var r of pr(e))oo.call(e,r)&&mr(t,r,e[r]);return t},so=(t,e)=>to(t,ro(e));const we=[];function je(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function fr(t,e){var r,n;const o=new Jn;we.push(o),o.init(t);let a=window.MutationObserver||window.__rrMutationObserver;const i=(n=(r=window?.Zone)==null?void 0:r.__symbol__)==null?void 0:n.call(r,"MutationObserver");i&&window[i]&&(a=window[i]);const l=new a(x(o.processMutations.bind(o)));return l.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l}function io({mousemoveCb:t,sampling:e,doc:r,mirror:n}){if(e.mousemove===!1)return()=>{};const o=typeof e.mousemove=="number"?e.mousemove:50,a=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let i=[],l;const s=Ie(x(d=>{const h=Date.now()-l;t(i.map(m=>(m.timeOffset-=h,m)),d),i=[],l=null}),a),c=x(Ie(x(d=>{const h=je(d),{clientX:m,clientY:p}=Qe(d)?d.changedTouches[0]:d;l||(l=Be()),i.push({x:m,y:p,id:n.getId(h),timeOffset:Be()-l}),s(typeof DragEvent<"u"&&d instanceof DragEvent?E.Drag:d instanceof MouseEvent?E.MouseMove:E.TouchMove)}),o,{trailing:!1})),u=[ee("mousemove",c,r),ee("touchmove",c,r),ee("drag",c,r)];return x(()=>{u.forEach(d=>d())})}function ao({mouseInteractionCb:t,doc:e,mirror:r,blockClass:n,blockSelector:o,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const i=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,l=[];let s=null;const c=u=>d=>{const h=je(d);if(te(h,n,o,!0))return;let m=null,p=u;if("pointerType"in d){switch(d.pointerType){case"mouse":m=me.Mouse;break;case"touch":m=me.Touch;break;case"pen":m=me.Pen;break}m===me.Touch?L[u]===L.MouseDown?p="TouchStart":L[u]===L.MouseUp&&(p="TouchEnd"):me.Pen}else Qe(d)&&(m=me.Touch);m!==null?(s=m,(p.startsWith("Touch")&&m===me.Touch||p.startsWith("Mouse")&&m===me.Mouse)&&(m=null)):L[u]===L.Click&&(m=s,s=null);const v=Qe(d)?d.changedTouches[0]:d;if(!v)return;const b=r.getId(h),{clientX:f,clientY:y}=v;x(t)(kt({type:L[p],id:b,x:f,y},m!==null&&{pointerType:m}))};return Object.keys(L).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&i[u]!==!1).forEach(u=>{let d=ge(u);const h=c(u);if(window.PointerEvent)switch(L[u]){case L.MouseDown:case L.MouseUp:d=d.replace("mouse","pointer");break;case L.TouchStart:case L.TouchEnd:return}l.push(ee(d,h,e))}),x(()=>{l.forEach(u=>u())})}function yr({scrollCb:t,doc:e,mirror:r,blockClass:n,blockSelector:o,sampling:a}){const i=x(Ie(x(l=>{const s=je(l);if(!s||te(s,n,o,!0))return;const c=r.getId(s);if(s===e&&e.defaultView){const u=yt(e.defaultView);t({id:c,x:u.left,y:u.top})}else t({id:c,x:s.scrollLeft,y:s.scrollTop})}),a.scroll||100));return ee("scroll",i,e)}function lo({viewportResizeCb:t},{win:e}){let r=-1,n=-1;const o=x(Ie(x(()=>{const a=gt(),i=vt();(r!==a||n!==i)&&(t({width:Number(i),height:Number(a)}),r=a,n=i)}),200));return ee("resize",o,e)}function gr(t,e){const r=kt({},t);return e||delete r.userTriggered,r}const co=["INPUT","TEXTAREA","SELECT"],vr=new WeakMap;function uo({inputCb:t,doc:e,mirror:r,blockClass:n,blockSelector:o,ignoreClass:a,ignoreSelector:i,maskInputOptions:l,maskInputFn:s,sampling:c,userTriggeredOnInput:u}){function d(f){let y=je(f);const g=f.isTrusted,C=y&&y.tagName;if(y&&C==="OPTION"&&(y=y.parentElement),!y||!C||co.indexOf(C)<0||te(y,n,o,!0)||y.classList.contains(a)||i&&y.matches(i))return;let M=y.value,R=!1;const _=pt(y)||"";_==="radio"||_==="checkbox"?R=y.checked:(l[C.toLowerCase()]||l[_])&&(M=ht({element:y,maskInputOptions:l,tagName:C,type:_,value:M,maskInputFn:s})),h(y,x(gr)({text:M,isChecked:R,userTriggered:g},u));const P=y.name;_==="radio"&&P&&R&&e.querySelectorAll(`input[type="radio"][name="${P}"]`).forEach(Z=>{Z!==y&&h(Z,x(gr)({text:Z.value,isChecked:!R,userTriggered:!1},u))})}function h(f,y){const g=vr.get(f);if(!g||g.text!==y.text||g.isChecked!==y.isChecked){vr.set(f,y);const C=r.getId(f);x(t)(so(kt({},y),{id:C}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(f=>ee(f,x(d),e)),p=e.defaultView;if(!p)return()=>{m.forEach(f=>f())};const v=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),b=[[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 v&&v.set&&m.push(...b.map(f=>Ve(f[0],f[1],{set(){x(d)({target:this,isTrusted:!1})}},!1,p))),x(()=>{m.forEach(f=>f())})}function qe(t){const e=[];function r(n,o){if(et("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||et("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||et("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||et("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const a=Array.from(n.parentRule.cssRules).indexOf(n);o.unshift(a)}else if(n.parentStyleSheet){const a=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(a)}return o}return r(t,e)}function Se(t,e,r){let n,o;return t?(t.ownerNode?n=e.getId(t.ownerNode):o=r.getId(t),{styleId:o,id:n}):{}}function ho({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:x((u,d,h)=>{const[m,p]=h,{id:v,styleId:b}=Se(d,e,r.styleMirror);return(v&&v!==-1||b&&b!==-1)&&t({id:v,styleId:b,adds:[{rule:m,index:p}]}),u.apply(d,h)})});const a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:x((u,d,h)=>{const[m]=h,{id:p,styleId:v}=Se(d,e,r.styleMirror);return(p&&p!==-1||v&&v!==-1)&&t({id:p,styleId:v,removes:[{index:m}]}),u.apply(d,h)})});let i;n.CSSStyleSheet.prototype.replace&&(i=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:x((u,d,h)=>{const[m]=h,{id:p,styleId:v}=Se(d,e,r.styleMirror);return(p&&p!==-1||v&&v!==-1)&&t({id:p,styleId:v,replace:m}),u.apply(d,h)})}));let l;n.CSSStyleSheet.prototype.replaceSync&&(l=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:x((u,d,h)=>{const[m]=h,{id:p,styleId:v}=Se(d,e,r.styleMirror);return(p&&p!==-1||v&&v!==-1)&&t({id:p,styleId:v,replaceSync:m}),u.apply(d,h)})}));const s={};tt("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(tt("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),tt("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),tt("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(s).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[u].insertRule,{apply:x((h,m,p)=>{const[v,b]=p,{id:f,styleId:y}=Se(m.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||y&&y!==-1)&&t({id:f,styleId:y,adds:[{rule:v,index:[...qe(m),b||0]}]}),h.apply(m,p)})}),d.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:x((h,m,p)=>{const[v]=p,{id:b,styleId:f}=Se(m.parentStyleSheet,e,r.styleMirror);return(b&&b!==-1||f&&f!==-1)&&t({id:b,styleId:f,removes:[{index:[...qe(m),v]}]}),h.apply(m,p)})})}),x(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=a,i&&(n.CSSStyleSheet.prototype.replace=i),l&&(n.CSSStyleSheet.prototype.replaceSync=l),Object.entries(s).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})})}function Sr({mirror:t,stylesheetManager:e},r){var n,o,a;let i=null;r.nodeName==="#document"?i=t.getId(r):i=t.getId(r.host);const l=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(a=(o=r.ownerDocument)==null?void 0:o.defaultView)==null?void 0:a.ShadowRoot,s=Object.getOwnPropertyDescriptor(l?.prototype,"adoptedStyleSheets");return i===null||i===-1||!l||!s?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var c;return(c=s.get)==null?void 0:c.call(this)},set(c){var u;const d=(u=s.set)==null?void 0:u.call(this,c);if(i!==null&&i!==-1)try{e.adoptStyleSheets(c,i)}catch{}return d}}),x(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function po({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){const a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:x((l,s,c)=>{var u;const[d,h,m]=c;if(r.has(d))return a.apply(s,[d,h,m]);const{id:p,styleId:v}=Se((u=s.parentRule)==null?void 0:u.parentStyleSheet,e,n.styleMirror);return(p&&p!==-1||v&&v!==-1)&&t({id:p,styleId:v,set:{property:d,value:h,priority:m},index:qe(s.parentRule)}),l.apply(s,c)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:x((l,s,c)=>{var u;const[d]=c;if(r.has(d))return i.apply(s,[d]);const{id:h,styleId:m}=Se((u=s.parentRule)==null?void 0:u.parentStyleSheet,e,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,remove:{property:d},index:qe(s.parentRule)}),l.apply(s,c)})}),x(()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=i})}function mo({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:n,sampling:o,doc:a}){const i=x(s=>Ie(x(c=>{const u=je(c);if(!u||te(u,e,r,!0))return;const{currentTime:d,volume:h,muted:m,playbackRate:p}=u;t({type:s,id:n.getId(u),currentTime:d,volume:h,muted:m,playbackRate:p})}),o.media||500)),l=[ee("play",i(ye.Play),a),ee("pause",i(ye.Pause),a),ee("seeked",i(ye.Seeked),a),ee("volumechange",i(ye.VolumeChange),a),ee("ratechange",i(ye.RateChange),a)];return x(()=>{l.forEach(s=>s())})}function fo({fontCb:t,doc:e}){const r=e.defaultView;if(!r)return()=>{};const n=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(l,s,c){const u=new a(l,s,c);return o.set(u,{family:l,buffer:typeof s!="string",descriptors:c,fontSource:typeof s=="string"?s:JSON.stringify(Array.from(new Uint8Array(s)))}),u};const i=De(e.fonts,"add",function(l){return function(s){return setTimeout(x(()=>{const c=o.get(s);c&&(t(c),o.delete(s))}),0),l.apply(this,[s])}});return n.push(()=>{r.FontFace=a}),n.push(i),x(()=>{n.forEach(l=>l())})}function yo(t){const{doc:e,mirror:r,blockClass:n,blockSelector:o,selectionCb:a}=t;let i=!0;const l=x(()=>{const s=e.getSelection();if(!s||i&&s?.isCollapsed)return;i=s.isCollapsed||!1;const c=[],u=s.rangeCount||0;for(let d=0;d<u;d++){const h=s.getRangeAt(d),{startContainer:m,startOffset:p,endContainer:v,endOffset:b}=h;te(m,n,o,!0)||te(v,n,o,!0)||c.push({start:r.getId(m),startOffset:p,end:r.getId(v),endOffset:b})}a({ranges:c})});return l(),ee("selectionchange",l)}function go(t,e){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:a,viewportResizeCb:i,inputCb:l,mediaInteractionCb:s,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h,selectionCb:m}=t;t.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),r(...p)},t.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),n(...p)},t.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),o(...p)},t.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),a(...p)},t.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),i(...p)},t.inputCb=(...p)=>{e.input&&e.input(...p),l(...p)},t.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),s(...p)},t.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),c(...p)},t.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),u(...p)},t.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),d(...p)},t.fontCb=(...p)=>{e.font&&e.font(...p),h(...p)},t.selectionCb=(...p)=>{e.selection&&e.selection(...p),m(...p)}}function vo(t,e={}){const r=t.doc.defaultView;if(!r)return()=>{};go(t,e);const n=fr(t,t.doc),o=io(t),a=ao(t),i=yr(t),l=lo(t,{win:r}),s=uo(t),c=mo(t),u=ho(t,{win:r}),d=Sr(t,t.doc),h=po(t,{win:r}),m=t.collectFonts?fo(t):()=>{},p=yo(t),v=[];for(const b of t.plugins)v.push(b.observer(b.callback,r,b.options));return x(()=>{we.forEach(b=>b.reset()),n.disconnect(),o(),a(),i(),l(),s(),c(),u(),d(),h(),m(),p(),v.forEach(b=>b())})}function et(t){return typeof window[t]<"u"}function tt(t){return Boolean(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class br{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,r,n,o){const a=n||this.getIdToRemoteIdMap(e),i=o||this.getRemoteIdToIdMap(e);let l=a.get(r);return l||(l=this.generateIdFn(),a.set(r,l),i.set(l,r)),l}getIds(e,r){const n=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return r.map(a=>this.getId(e,a,n,o))}getRemoteId(e,r,n){const o=n||this.getRemoteIdToIdMap(e);return typeof r!="number"?r:o.get(r)||-1}getRemoteIds(e,r){const n=this.getRemoteIdToIdMap(e);return r.map(o=>this.getRemoteId(e,o,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let r=this.iframeIdToRemoteIdMap.get(e);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(e,r)),r}getRemoteIdToIdMap(e){let r=this.iframeRemoteIdToIdMap.get(e);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(e,r)),r}}class So{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new br(Ht),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new br(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,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(n=this.loadListener)==null||n.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 r=e;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const o=this.transformCrossOriginEvent(n,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(e,r){var n;switch(r.type){case T.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e);const o=r.data.node.id;return this.crossOriginIframeRootIdMap.set(e,o),this.patchRootIdOnNode(r.data.node,o),{timestamp:r.timestamp,type:T.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case T.Meta:case T.Load:case T.DomContentLoaded:return!1;case T.Plugin:return r;case T.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case T.IncrementalSnapshot:switch(r.data.source){case E.Mutation:return r.data.adds.forEach(o=>{this.replaceIds(o,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,e);const a=this.crossOriginIframeRootIdMap.get(e);a&&this.patchRootIdOnNode(o.node,a)}),r.data.removes.forEach(o=>{this.replaceIds(o,e,["parentId","id"])}),r.data.attributes.forEach(o=>{this.replaceIds(o,e,["id"])}),r.data.texts.forEach(o=>{this.replaceIds(o,e,["id"])}),r;case E.Drag:case E.TouchMove:case E.MouseMove:return r.data.positions.forEach(o=>{this.replaceIds(o,e,["id"])}),r;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(r.data,e,["id"]),r;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case E.Font:return r;case E.Selection:return r.data.ranges.forEach(o=>{this.replaceIds(o,e,["start","end"])}),r;case E.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(n=r.data.styles)==null||n.forEach(o=>{this.replaceStyleIds(o,e,["styleId"])}),r}}}replace(e,r,n,o){for(const a of o)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=e.getIds(n,r[a]):r[a]=e.getId(n,r[a]));return r}replaceIds(e,r,n){return this.replace(this.crossOriginIframeMirror,e,r,n)}replaceStyleIds(e,r,n){return this.replace(this.crossOriginIframeStyleMirror,e,r,n)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(e,r){e.type!==N.Document&&!e.rootId&&(e.rootId=r),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}var bo=Object.defineProperty,wo=Object.defineProperties,Co=Object.getOwnPropertyDescriptors,wr=Object.getOwnPropertySymbols,Eo=Object.prototype.hasOwnProperty,To=Object.prototype.propertyIsEnumerable,Cr=(t,e,r)=>e in t?bo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Er=(t,e)=>{for(var r in e||(e={}))Eo.call(e,r)&&Cr(t,r,e[r]);if(wr)for(var r of wr(e))To.call(e,r)&&Cr(t,r,e[r]);return t},Tr=(t,e)=>wo(t,Co(e));class No{constructor(e){this.shadowDoms=new WeakSet,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,r){if(!We(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=fr(Tr(Er({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(yr(Tr(Er({},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(e.host)),this.restoreHandlers.push(Sr({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,r){const n=this;this.restoreHandlers.push(De(e.prototype,"attachShadow",function(o){return function(a){const i=o.call(this,a);return this.shadowRoot&&It(this)&&n.addShadowRoot(this.shadowRoot,r),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ze=typeof Uint8Array>"u"?[]:new Uint8Array(256),rt=0;rt<xe.length;rt++)ze[xe.charCodeAt(rt)]=rt;var Mo=function(t){var e=new Uint8Array(t),r,n=e.length,o="";for(r=0;r<n;r+=3)o+=xe[e[r]>>2],o+=xe[(e[r]&3)<<4|e[r+1]>>4],o+=xe[(e[r+1]&15)<<2|e[r+2]>>6],o+=xe[e[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o},Io=function(t){var e=t.length*.75,r=t.length,n,o=0,a,i,l,s;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var c=new ArrayBuffer(e),u=new Uint8Array(c);for(n=0;n<r;n+=4)a=ze[t.charCodeAt(n)],i=ze[t.charCodeAt(n+1)],l=ze[t.charCodeAt(n+2)],s=ze[t.charCodeAt(n+3)],u[o++]=a<<2|i>>4,u[o++]=(i&15)<<4|l>>2,u[o++]=(l&3)<<6|s&63;return c};const Nr=new Map;function Do(t,e){let r=Nr.get(t);return r||(r=new Map,Nr.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}const Mr=(t,e,r)=>{if(!t||!(Dr(t,e)||typeof t=="object"))return;const n=t.constructor.name,o=Do(r,n);let a=o.indexOf(t);return a===-1&&(a=o.length,o.push(t)),a};function nt(t,e,r){if(t instanceof Array)return t.map(n=>nt(n,e,r));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const n=t.constructor.name,o=Mo(t);return{rr_type:n,base64:o}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[nt(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const n=t.constructor.name,{src:o}=t;return{rr_type:n,src:o}}else if(t instanceof HTMLCanvasElement){const n="HTMLImageElement",o=t.toDataURL();return{rr_type:n,src:o}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[nt(t.data,e,r),t.width,t.height]};if(Dr(t,e)||typeof t=="object"){const n=t.constructor.name,o=Mr(t,e,r);return{rr_type:n,index:o}}}}return t}const Ir=(t,e,r)=>[...t].map(n=>nt(n,e,r)),Dr=(t,e)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function");return Boolean(r.find(n=>t instanceof e[n]))};function ko(t,e,r,n){const o=[],a=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const i of a)try{if(typeof e.CanvasRenderingContext2D.prototype[i]!="function")continue;const l=De(e.CanvasRenderingContext2D.prototype,i,function(s){return function(...c){return te(this.canvas,r,n,!0)||setTimeout(()=>{const u=Ir([...c],e,this);t(this.canvas,{type:fe["2D"],property:i,args:u})},0),s.apply(this,c)}});o.push(l)}catch{const s=Ve(e.CanvasRenderingContext2D.prototype,i,{set(c){t(this.canvas,{type:fe["2D"],property:i,args:[c],setter:!0})}});o.push(s)}return()=>{o.forEach(i=>i())}}function Ro(t){return t==="experimental-webgl"?"webgl":t}function kr(t,e,r,n){const o=[];try{const a=De(t.HTMLCanvasElement.prototype,"getContext",function(i){return function(l,...s){if(!te(this,e,r,!0)){const c=Ro(l);if("__context"in this||(this.__context=c),n&&["webgl","webgl2"].includes(c))if(s[0]&&typeof s[0]=="object"){const u=s[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}return i.apply(this,[l,...s])}});o.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(a=>a())}}function Rr(t,e,r,n,o,a,i){const l=[],s=Object.getOwnPropertyNames(t);for(const c of s)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;const u=De(t,c,function(d){return function(...h){const m=d.apply(this,h);if(Mr(m,i,this),"tagName"in this.canvas&&!te(this.canvas,n,o,!0)){const p=Ir([...h],i,this),v={type:e,property:c,args:p};r(this.canvas,v)}return m}});l.push(u)}catch{const d=Ve(t,c,{set(h){r(this.canvas,{type:e,property:c,args:[h],setter:!0})}});l.push(d)}return l}function xo(t,e,r,n,o){const a=[];return a.push(...Rr(e.WebGLRenderingContext.prototype,fe.WebGL,t,r,n,o,e)),typeof e.WebGL2RenderingContext<"u"&&a.push(...Rr(e.WebGL2RenderingContext.prototype,fe.WebGL2,t,r,n,o,e)),()=>{a.forEach(i=>i())}}function Oo(t,e){var r=atob(t);if(e){for(var n=new Uint8Array(r.length),o=0,a=r.length;o<a;++o)n[o]=r.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(n.buffer))}return r}function Lo(t,e,r){var n=e===void 0?null:e,o=r===void 0?!1:r,a=Oo(t,o),i=a.indexOf(`-`,10)+1,l=a.substring(i)+(n?"//# sourceMappingURL="+n:""),s=new Blob([l],{type:"application/javascript"});return URL.createObjectURL(s)}function Ao(t,e,r){var n;return function(a){return n=n||Lo(t,e,r),new Worker(n,a)}}var _o=Ao("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixwPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylwW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgdT1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCxsPW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gdihzLGUsbil7Y29uc3QgYT1gJHtzfS0ke2V9YDtpZigiT2Zmc2NyZWVuQ2FudmFzImluIGdsb2JhbFRoaXMpe2lmKGwuaGFzKGEpKXJldHVybiBsLmdldChhKTtjb25zdCB0PW5ldyBPZmZzY3JlZW5DYW52YXMocyxlKTt0LmdldENvbnRleHQoIjJkIik7Y29uc3QgZz1hd2FpdChhd2FpdCB0LmNvbnZlcnRUb0Jsb2IobikpLmFycmF5QnVmZmVyKCksZD11KGcpO3JldHVybiBsLnNldChhLGQpLGR9ZWxzZSByZXR1cm4iIn1jb25zdCBpPXNlbGY7aS5vbm1lc3NhZ2U9YXN5bmMgZnVuY3Rpb24ocyl7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtjb25zdHtpZDplLGJpdG1hcDpuLHdpZHRoOmEsaGVpZ2h0OnQsZGF0YVVSTE9wdGlvbnM6Z309cy5kYXRhLGQ9dihhLHQsZyksaD1uZXcgT2Zmc2NyZWVuQ2FudmFzKGEsdCk7aC5nZXRDb250ZXh0KCIyZCIpLmRyYXdJbWFnZShuLDAsMCksbi5jbG9zZSgpO2NvbnN0IHc9YXdhaXQgaC5jb252ZXJ0VG9CbG9iKGcpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89dShiKTtpZighYy5oYXMoZSkmJmF3YWl0IGQ9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX1lbHNlIHJldHVybiBpLnBvc3RNZXNzYWdlKHtpZDpzLmRhdGEuaWR9KX19KSgpOwoK",null,!1),xr=Object.getOwnPropertySymbols,Fo=Object.prototype.hasOwnProperty,Po=Object.prototype.propertyIsEnumerable,Wo=(t,e)=>{var r={};for(var n in t)Fo.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&xr)for(var n of xr(t))e.indexOf(n)<0&&Po.call(t,n)&&(r[n]=t[n]);return r},$o=(t,e,r)=>new Promise((n,o)=>{var a=s=>{try{l(r.next(s))}catch(c){o(c)}},i=s=>{try{l(r.throw(s))}catch(c){o(c)}},l=s=>s.done?n(s.value):Promise.resolve(s.value).then(a,i);l((r=r.apply(t,e)).next())});class Uo{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(s,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(s)||this.pendingCanvasMutations.set(s,[]),this.pendingCanvasMutations.get(s).push(c)};const{sampling:r="all",win:n,blockClass:o,blockSelector:a,recordCanvas:i,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&r==="all"&&this.initCanvasMutationObserver(n,o,a),i&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,o,a,{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,r,n,o,a){const i=kr(r,n,o,!0),l=new Map,s=new _o;s.onmessage=p=>{const{id:v}=p.data;if(l.set(v,!1),!("base64"in p.data))return;const{base64:b,type:f,width:y,height:g}=p.data;this.mutationCb({id:v,type:fe["2D"],commands:[{property:"clearRect",args:[0,0,y,g]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:b}],type:f}]},0,0]}]})};const c=1e3/e;let u=0,d;const h=()=>{const p=[];return r.document.querySelectorAll("canvas").forEach(v=>{te(v,n,o,!0)||p.push(v)}),p},m=p=>{if(u&&p-u<c){d=requestAnimationFrame(m);return}u=p,h().forEach(v=>$o(this,null,function*(){var b;const f=this.mirror.getId(v);if(l.get(f))return;if(l.set(f,!0),["webgl","webgl2"].includes(v.__context)){const g=v.getContext(v.__context);((b=g?.getContextAttributes())==null?void 0:b.preserveDrawingBuffer)===!1&&g.clear(g.COLOR_BUFFER_BIT)}const y=yield createImageBitmap(v);s.postMessage({id:f,bitmap:y,width:v.width,height:v.height,dataURLOptions:a.dataURLOptions},[y])})),d=requestAnimationFrame(m)};d=requestAnimationFrame(m),this.resetObservers=()=>{i(),cancelAnimationFrame(d)}}initCanvasMutationObserver(e,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=kr(e,r,n,!1),a=ko(this.processMutation.bind(this),e,r,n),i=xo(this.processMutation.bind(this),e,r,n,this.mirror);this.resetObservers=()=>{o(),a(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||r===-1)return;const o=n.map(i=>Wo(i,["type"])),{type:a}=n[0];this.mutationCb({id:r,type:a,commands:o}),this.pendingCanvasMutations.delete(e)}}class Vo{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Nt,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,r){if(e.length===0)return;const n={id:r,styleIds:[]},o=[];for(const a of e){let i;if(this.styleMirror.has(a))i=this.styleMirror.getId(a);else{i=this.styleMirror.add(a);const l=Array.from(a.rules||CSSRule);o.push({styleId:i,rules:l.map((s,c)=>({rule:Gt(s),index:c}))})}n.styleIds.push(i)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Bo{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,r){const n=this.nodeMap.get(e);return n&&Array.from(n).some(o=>o!==r)}add(e,r){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(r))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}var Go=Object.defineProperty,jo=Object.defineProperties,zo=Object.getOwnPropertyDescriptors,Or=Object.getOwnPropertySymbols,Ho=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable,Lr=(t,e,r)=>e in t?Go(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,oe=(t,e)=>{for(var r in e||(e={}))Ho.call(e,r)&&Lr(t,r,e[r]);if(Or)for(var r of Or(e))Yo.call(e,r)&&Lr(t,r,e[r]);return t},Xo=(t,e)=>jo(t,zo(e));function z(t){return Xo(oe({},t),{timestamp:Be()})}let G,ot,Rt,st=!1;const ae=jt();function Ce(t={}){const{emit:e,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:a=null,ignoreClass:i="rr-ignore",ignoreSelector:l=null,maskTextClass:s="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:h,slimDOMOptions:m,maskInputFn:p,maskTextFn:v,hooks:b,packFn:f,sampling:y={},dataURLOptions:g={},mousemoveWait:C,recordCanvas:M=!1,recordCrossOriginIframes:R=!1,recordAfter:_=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:P=!1,collectFonts:Z=!1,inlineImages:K=!1,plugins:Y,keepIframeSrcFn:J=()=>!1,ignoreCSSAttributes:Q=new Set([]),errorHandler:ie}=t;Qn(ie);const U=R?window.parent===window:!0;let j=!1;if(!U)try{window.parent.document&&(j=!1)}catch{j=!0}if(U&&!e)throw new Error("emit function is required");C!==void 0&&y.mousemove===void 0&&(y.mousemove=C),ae.reset();const F=d===!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}:h!==void 0?h:{password:!0},q=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"}:m||{};bt();let w,S=0;const D=k=>{for(const ne of Y||[])ne.eventProcessor&&(k=ne.eventProcessor(k));return f&&!j&&(k=f(k)),k};G=(k,ne)=>{var W;if(((W=we[0])==null?void 0:W.isFrozen())&&k.type!==T.FullSnapshot&&!(k.type===T.IncrementalSnapshot&&k.data.source===E.Mutation)&&we.forEach(X=>X.unfreeze()),U)e?.(D(k),ne);else if(j){const X={type:"rrweb",event:D(k),origin:window.location.origin,isCheckout:ne};window.parent.postMessage(X,"*")}if(k.type===T.FullSnapshot)w=k,S=0;else if(k.type===T.IncrementalSnapshot){if(k.data.source===E.Mutation&&k.data.isAttachIframe)return;S++;const X=n&&S>=n,Fe=r&&k.timestamp-w.timestamp>r;(X||Fe)&&ot(!0)}};const I=k=>{G(z({type:T.IncrementalSnapshot,data:oe({source:E.Mutation},k)}))},H=k=>G(z({type:T.IncrementalSnapshot,data:oe({source:E.Scroll},k)})),de=k=>G(z({type:T.IncrementalSnapshot,data:oe({source:E.CanvasMutation},k)})),ut=k=>G(z({type:T.IncrementalSnapshot,data:oe({source:E.AdoptedStyleSheet},k)})),le=new Vo({mutationCb:I,adoptedStyleSheetCb:ut}),he=new So({mirror:ae,mutationCb:I,stylesheetManager:le,recordCrossOriginIframes:R,wrappedEmit:G});for(const k of Y||[])k.getMirror&&k.getMirror({nodeMirror:ae,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});const Ee=new Bo;Rt=new Uo({recordCanvas:M,mutationCb:de,win:window,blockClass:o,blockSelector:a,mirror:ae,sampling:y.canvas,dataURLOptions:g});const ce=new No({mutationCb:I,scrollCb:H,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:s,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:F,dataURLOptions:g,maskTextFn:v,maskInputFn:p,recordCanvas:M,inlineImages:K,sampling:y,slimDOMOptions:q,iframeManager:he,stylesheetManager:le,canvasManager:Rt,keepIframeSrcFn:J,processedNodeManager:Ee},mirror:ae});ot=(k=!1)=>{G(z({type:T.Meta,data:{href:window.location.href,width:vt(),height:gt()}}),k),le.reset(),ce.init(),we.forEach(W=>W.lock());const ne=Un(document,{mirror:ae,blockClass:o,blockSelector:a,maskTextClass:s,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:F,maskTextFn:v,slimDOM:q,dataURLOptions:g,recordCanvas:M,inlineImages:K,onSerialize:W=>{ke(W,ae)&&he.addIframe(W),Ct(W,ae)&&le.trackLinkElement(W),ve(W)&&ce.addShadowRoot(W.shadowRoot,document)},onIframeLoad:(W,X)=>{he.attachIframe(W,X),ce.observeAttachShadow(W)},onStylesheetLoad:(W,X)=>{le.attachLinkElement(W,X)},keepIframeSrcFn:J});if(!ne)return console.warn("Failed to snapshot the document");G(z({type:T.FullSnapshot,data:{node:ne,initialOffset:yt(window)}}),k),we.forEach(W=>W.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,ae.getId(document))};try{const k=[],ne=X=>{var Fe;return x(vo)({mutationCb:I,mousemoveCb:(V,Vt)=>G(z({type:T.IncrementalSnapshot,data:{source:Vt,positions:V}})),mouseInteractionCb:V=>G(z({type:T.IncrementalSnapshot,data:oe({source:E.MouseInteraction},V)})),scrollCb:H,viewportResizeCb:V=>G(z({type:T.IncrementalSnapshot,data:oe({source:E.ViewportResize},V)})),inputCb:V=>G(z({type:T.IncrementalSnapshot,data:oe({source:E.Input},V)})),mediaInteractionCb:V=>G(z({type:T.IncrementalSnapshot,data:oe({source:E.MediaInteraction},V)})),styleSheetRuleCb:V=>G(z({type:T.IncrementalSnapshot,data:oe({source:E.StyleSheetRule},V)})),styleDeclarationCb:V=>G(z({type:T.IncrementalSnapshot,data:oe({source:E.StyleDeclaration},V)})),canvasMutationCb:de,fontCb:V=>G(z({type:T.IncrementalSnapshot,data:oe({source:E.Font},V)})),selectionCb:V=>{G(z({type:T.IncrementalSnapshot,data:oe({source:E.Selection},V)}))},blockClass:o,ignoreClass:i,ignoreSelector:l,maskTextClass:s,maskTextSelector:c,maskInputOptions:F,inlineStylesheet:u,sampling:y,recordCanvas:M,inlineImages:K,userTriggeredOnInput:P,collectFonts:Z,doc:X,maskInputFn:p,maskTextFn:v,keepIframeSrcFn:J,blockSelector:a,slimDOMOptions:q,dataURLOptions:g,mirror:ae,iframeManager:he,stylesheetManager:le,shadowDomManager:ce,processedNodeManager:Ee,canvasManager:Rt,ignoreCSSAttributes:Q,plugins:((Fe=Y?.filter(V=>V.observer))==null?void 0:Fe.map(V=>({observer:V.observer,options:V.options,callback:Vt=>G(z({type:T.Plugin,data:{plugin:V.name,payload:Vt}}))})))||[]},b)};he.addLoadListener(X=>{try{k.push(ne(X.contentDocument))}catch(Fe){console.warn(Fe)}});const W=()=>{ot(),k.push(ne(document)),st=!0};return document.readyState==="interactive"||document.readyState==="complete"?W():(k.push(ee("DOMContentLoaded",()=>{G(z({type:T.DomContentLoaded,data:{}})),_==="DOMContentLoaded"&&W()})),k.push(ee("load",()=>{G(z({type:T.Load,data:{}})),_==="load"&&W()},window))),()=>{k.forEach(X=>X()),Ee.destroy(),st=!1,qn()}}catch(k){console.warn(k)}}Ce.addCustomEvent=(t,e)=>{if(!st)throw new Error("please add custom event after start recording");G(z({type:T.Custom,data:{tag:t,payload:e}}))},Ce.freezePage=()=>{we.forEach(t=>t.freeze())},Ce.takeFullSnapshot=t=>{if(!st)throw new Error("please take full snapshot after start recording");ot(t)},Ce.mirror=ae;var O;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(O||(O={}));var Zo=function(){function t(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return t.prototype.getId=function(e){var r;if(!e)return-1;var n=(r=this.getMeta(e))===null||r===void 0?void 0:r.id;return n??-1},t.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},t.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},t.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.prototype.removeNodeFromMap=function(e){var r=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(o){return r.removeNodeFromMap(o)})},t.prototype.has=function(e){return this.idNodeMap.has(e)},t.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},t.prototype.add=function(e,r){var n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)},t.prototype.replace=function(e,r){var n=this.getNode(e);if(n){var o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(r,o)}this.idNodeMap.set(e,r)},t.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function Ko(){return new Zo}function Jo(t){const e={},r=/;(?![^(]*\))/g,n=/:(.+)/,o=/\/\*.*?\*\//g;return t.replace(o,"").split(r).forEach(function(a){if(a){const i=a.split(n);i.length>1&&(e[xt(i[0].trim())]=i[1].trim())}}),e}function Ar(t){const e=[];for(const r in t){const n=t[r];if(typeof n!="string")continue;const o=ts(r);e.push(`${o}: ${n};`)}return e.join(" ")}const Qo=/-([a-z])/g,qo=/^--[a-zA-Z0-9-]+$/,xt=t=>qo.test(t)?t:t.replace(Qo,(e,r)=>r?r.toUpperCase():""),es=/\B([A-Z])/g,ts=t=>t.replace(es,"-$1").toLowerCase();class se{constructor(...e){this.parentElement=null,this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.ELEMENT_NODE=B.ELEMENT_NODE,this.TEXT_NODE=B.TEXT_NODE}get childNodes(){const e=[];let r=this.firstChild;for(;r;)e.push(r),r=r.nextSibling;return e}contains(e){if(e instanceof se){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,r){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"}}function rs(t){return class pn extends t{constructor(...r){super(r),this.nodeType=B.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=O.Document,this.textContent=null,this.ownerDocument=this}get documentElement(){return this.childNodes.find(r=>r.RRNodeType===O.Element&&r.tagName==="HTML")||null}get body(){var r;return((r=this.documentElement)===null||r===void 0?void 0:r.childNodes.find(n=>n.RRNodeType===O.Element&&n.tagName==="BODY"))||null}get head(){var r;return((r=this.documentElement)===null||r===void 0?void 0:r.childNodes.find(n=>n.RRNodeType===O.Element&&n.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(r){const n=r.RRNodeType;if((n===O.Element||n===O.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===n))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${n===O.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const o=Ot(this,r);return o.parentElement=null,o}insertBefore(r,n){const o=r.RRNodeType;if((o===O.Element||o===O.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===o))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${o===O.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const a=Ur(this,r,n);return a.parentElement=null,a}removeChild(r){return Vr(this,r)}open(){this.firstChild=null,this.lastChild=null}close(){}write(r){let n;if(r==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?n="-//W3C//DTD XHTML 1.0 Transitional//EN":r==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(n="-//W3C//DTD HTML 4.0 Transitional//EN"),n){const o=this.createDocumentType("html",n,"");this.open(),this.appendChild(o)}}createDocument(r,n,o){return new pn}createDocumentType(r,n,o){const a=new(_r(se))(r,n,o);return a.ownerDocument=this,a}createElement(r){const n=new(Fr(se))(r);return n.ownerDocument=this,n}createElementNS(r,n){return this.createElement(n)}createTextNode(r){const n=new(Pr(se))(r);return n.ownerDocument=this,n}createComment(r){const n=new(Wr(se))(r);return n.ownerDocument=this,n}createCDATASection(r){const n=new($r(se))(r);return n.ownerDocument=this,n}toString(){return"RRDocument"}}}function _r(t){return class extends t{constructor(e,r,n){super(),this.nodeType=B.DOCUMENT_TYPE_NODE,this.RRNodeType=O.DocumentType,this.name=e,this.publicId=r,this.systemId=n,this.nodeName=e,this.textContent=null}toString(){return"RRDocumentType"}}}function Fr(t){return class extends t{constructor(e){super(),this.nodeType=B.ELEMENT_NODE,this.RRNodeType=O.Element,this.attributes={},this.shadowRoot=null,this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(r=>e+=r.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new os(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Jo(this.attributes.style):{},r=/\B([A-Z])/g;return e.setProperty=(n,o,a)=>{if(r.test(n))return;const i=xt(n);o?e[i]=o:delete e[i],a==="important"&&(e[i]+=" !important"),this.attributes.style=Ar(e)},e.removeProperty=n=>{if(r.test(n))return"";const o=xt(n),a=e[o]||"";return delete e[o],this.attributes.style=Ar(e),a},e}getAttribute(e){return this.attributes[e]||null}setAttribute(e,r){this.attributes[e]=r}setAttributeNS(e,r,n){this.setAttribute(r,n)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Ot(this,e)}insertBefore(e,r){return Ur(this,e,r)}removeChild(e){return Vr(this,e)}attachShadow(e){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(e){return!0}toString(){let e="";for(const r in this.attributes)e+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${e}`}}}function ns(t){return class extends t{attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function Pr(t){return class extends t{constructor(e){super(),this.nodeType=B.TEXT_NODE,this.nodeName="#text",this.RRNodeType=O.Text,this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function Wr(t){return class extends t{constructor(e){super(),this.nodeType=B.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=O.Comment,this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function $r(t){return class extends t{constructor(e){super(),this.nodeName="#cdata-section",this.nodeType=B.CDATA_SECTION_NODE,this.RRNodeType=O.CDATA,this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class os{constructor(e,r){if(this.classes=[],this.add=(...n)=>{for(const o of n){const a=String(o);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...n)=>{this.classes=this.classes.filter(o=>n.indexOf(o)===-1),this.onChange&&this.onChange(this.classes.join(" "))},e){const n=e.trim().split(/\s+/);this.classes.push(...n)}this.onChange=r}}function Ot(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function Ur(t,e,r){if(!r)return Ot(t,e);if(r.parentNode!==t)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function Vr(t,e){if(e.parentNode!==t)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var B;(function(t){t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(B||(B={}));const Lt={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},ss={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let ue=null;function it(t,e,r,n=e.mirror||e.ownerDocument.mirror){t=is(t,e,r,n),Br(t,e,r,n),as(t,e,r,n)}function is(t,e,r,n){var o;if(r.afterAppend&&!ue&&(ue=new WeakSet,setTimeout(()=>{ue=null},0)),!At(t,e)){const a=at(e,r.mirror,n);(o=t.parentNode)===null||o===void 0||o.replaceChild(a,t),t=a}switch(e.RRNodeType){case O.Document:{if(!Oe(t,e,r.mirror,n)){const a=n.getMeta(e);a&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,a),ue?.add(t))}break}case O.Element:{const a=t,i=e;switch(i.tagName){case"IFRAME":{const l=t.contentDocument;if(!l)break;it(l,e.contentDocument,r,n);break}}i.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),Br(a.shadowRoot,i.shadowRoot,r,n));break}}return t}function as(t,e,r,n){var o;switch(e.RRNodeType){case O.Document:{const a=e.scrollData;a&&r.applyScroll(a,!0);break}case O.Element:{const a=t,i=e;switch(ls(a,i,n),i.scrollData&&r.applyScroll(i.scrollData,!0),i.inputData&&r.applyInput(i.inputData),i.tagName){case"AUDIO":case"VIDEO":{const l=t,s=i;s.paused!==void 0&&(s.paused?l.pause():l.play()),s.muted!==void 0&&(l.muted=s.muted),s.volume!==void 0&&(l.volume=s.volume),s.currentTime!==void 0&&(l.currentTime=s.currentTime),s.playbackRate!==void 0&&(l.playbackRate=s.playbackRate);break}case"CANVAS":{const l=e;if(l.rr_dataURL!==null){const s=document.createElement("img");s.onload=()=>{const c=a.getContext("2d");c&&c.drawImage(s,0,0,s.width,s.height)},s.src=l.rr_dataURL}l.canvasMutations.forEach(s=>r.applyCanvas(s.event,s.mutation,t));break}case"STYLE":{const l=a.sheet;l&&e.rules.forEach(s=>r.applyStyleSheetMutation(s,l));break}}break}case O.Text:case O.Comment:case O.CDATA:{t.textContent!==e.data&&(t.textContent=e.data);break}}ue!=null&&ue.has(t)&&(ue.delete(t),(o=r.afterAppend)===null||o===void 0||o.call(r,t,r.mirror.getId(t)))}function ls(t,e,r){const n=t.attributes,o=e.attributes;for(const a in o){const i=o[a],l=r.getMeta(e);if(l?.isSVG&&Lt[a])t.setAttributeNS(Lt[a],a,i);else if(e.tagName==="CANVAS"&&a==="rr_dataURL"){const s=document.createElement("img");s.src=i,s.onload=()=>{const c=t.getContext("2d");c&&c.drawImage(s,0,0,s.width,s.height)}}else{if(e.tagName==="IFRAME"&&a==="srcdoc")continue;t.setAttribute(a,i)}}for(const{name:a}of Array.from(n))a in o||t.removeAttribute(a);e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}function Br(t,e,r,n){const o=Array.from(t.childNodes),a=e.childNodes;if(o.length===0&&a.length===0)return;let i=0,l=o.length-1,s=0,c=a.length-1,u=o[i],d=o[l],h=a[s],m=a[c],p,v;for(;i<=l&&s<=c;)if(u===void 0)u=o[++i];else if(d===void 0)d=o[--l];else if(Oe(u,h,r.mirror,n))u=o[++i],h=a[++s];else if(Oe(d,m,r.mirror,n))d=o[--l],m=a[--c];else if(Oe(u,m,r.mirror,n)){try{t.insertBefore(u,d.nextSibling)}catch(y){console.warn(y)}u=o[++i],m=a[--c]}else if(Oe(d,h,r.mirror,n)){try{t.insertBefore(d,u)}catch(y){console.warn(y)}d=o[--l],h=a[++s]}else{if(!p){p={};for(let g=i;g<=l;g++){const C=o[g];C&&r.mirror.hasNode(C)&&(p[r.mirror.getId(C)]=g)}}v=p[n.getId(h)];const y=o[v];if(v!==void 0&&y&&Oe(y,h,r.mirror,n)){try{t.insertBefore(y,u)}catch(g){console.warn(g)}o[v]=void 0}else{const g=at(h,r.mirror,n);t.nodeName==="#document"&&u&&(g.nodeType===g.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||g.nodeType===g.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(t.removeChild(u),r.mirror.removeNodeFromMap(u),u=o[++i]);try{t.insertBefore(g,u||null)}catch(C){console.warn(C)}}h=a[++s]}if(i>l){const y=a[c+1];let g=null;for(y&&(g=r.mirror.getNode(n.getId(y)));s<=c;++s){const C=at(a[s],r.mirror,n);try{t.insertBefore(C,g)}catch(M){console.warn(M)}}}else if(s>c)for(;i<=l;i++){const y=o[i];if(!(!y||y.parentNode!==t))try{t.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(g){console.warn(g)}}let b=t.firstChild,f=e.firstChild;for(;b!==null&&f!==null;)it(b,f,r,n),b=b.nextSibling,f=f.nextSibling}function at(t,e,r){const n=r.getId(t),o=r.getMeta(t);let a=null;if(n>-1&&(a=e.getNode(n)),a!==null&&At(a,t))return a;switch(t.RRNodeType){case O.Document:a=new Document;break;case O.DocumentType:a=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case O.Element:{let i=t.tagName.toLowerCase();i=ss[i]||i,o&&"isSVG"in o&&o?.isSVG?a=document.createElementNS(Lt.svg,i):a=document.createElement(t.tagName);break}case O.Text:a=document.createTextNode(t.data);break;case O.Comment:a=document.createComment(t.data);break;case O.CDATA:a=document.createCDATASection(t.data);break}o&&e.add(a,Object.assign({},o));try{ue?.add(a)}catch{}return a}function At(t,e){return t.nodeType!==e.nodeType?!1:t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName}function Oe(t,e,r,n){const o=r.getId(t),a=n.getId(e);return o===-1||o!==a?!1:At(t,e)}class Le extends rs(se){get unserializedId(){return this._unserializedId--}constructor(e){super(),this.UNSERIALIZED_STARTING_ID=-2,this._unserializedId=this.UNSERIALIZED_STARTING_ID,this.mirror=Ss(),this.scrollData=null,e&&(this.mirror=e)}createDocument(e,r,n){return new Le}createDocumentType(e,r,n){const o=new cs(e,r,n);return o.ownerDocument=this,o}createElement(e){const r=e.toUpperCase();let n;switch(r){case"AUDIO":case"VIDEO":n=new us(r);break;case"IFRAME":n=new ps(r,this.mirror);break;case"CANVAS":n=new ds(r);break;case"STYLE":n=new hs(r);break;default:n=new He(r);break}return n.ownerDocument=this,n}createComment(e){const r=new fs(e);return r.ownerDocument=this,r}createCDATASection(e){const r=new ys(e);return r.ownerDocument=this,r}createTextNode(e){const r=new ms(e);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const cs=_r(se);class He extends Fr(se){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class us extends ns(He){}class ds extends He{constructor(){super(...arguments),this.rr_dataURL=null,this.canvasMutations=[]}getContext(){return null}}class hs extends He{constructor(){super(...arguments),this.rules=[]}}class ps extends He{constructor(e,r){super(e),this.contentDocument=new Le,this.contentDocument.mirror=r}}const ms=Pr(se),fs=Wr(se),ys=$r(se);function gs(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function Gr(t,e,r,n){let o;switch(t.nodeType){case B.DOCUMENT_NODE:n&&n.nodeName==="IFRAME"?o=n.contentDocument:(o=e,o.compatMode=t.compatMode);break;case B.DOCUMENT_TYPE_NODE:{const i=t;o=e.createDocumentType(i.name,i.publicId,i.systemId);break}case B.ELEMENT_NODE:{const i=t,l=gs(i);o=e.createElement(l);const s=o;for(const{name:c,value:u}of Array.from(i.attributes))s.attributes[c]=u;i.scrollLeft&&(s.scrollLeft=i.scrollLeft),i.scrollTop&&(s.scrollTop=i.scrollTop);break}case B.TEXT_NODE:o=e.createTextNode(t.textContent||"");break;case B.CDATA_SECTION_NODE:o=e.createCDATASection(t.data);break;case B.COMMENT_NODE:o=e.createComment(t.textContent||"");break;case B.DOCUMENT_FRAGMENT_NODE:o=n.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(t);return e instanceof Le&&(a||(a=jr(o,e.unserializedId),r.add(t,a)),e.mirror.add(o,Object.assign({},a))),o}function vs(t,e=Ko(),r=new Le){function n(o,a){const i=Gr(o,r,e,a);if(i!==null)if(a?.nodeName!=="IFRAME"&&o.nodeType!==B.DOCUMENT_FRAGMENT_NODE&&(a?.appendChild(i),i.parentNode=a,i.parentElement=a),o.nodeName==="IFRAME"){const l=o.contentDocument;l&&n(l,i)}else(o.nodeType===B.DOCUMENT_NODE||o.nodeType===B.ELEMENT_NODE||o.nodeType===B.DOCUMENT_FRAGMENT_NODE)&&(o.nodeType===B.ELEMENT_NODE&&o.shadowRoot&&n(o.shadowRoot,i),o.childNodes.forEach(l=>n(l,i)))}return n(t,null),r}function Ss(){return new bs}class bs{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var r;if(!e)return-1;const n=(r=this.getMeta(e))===null||r===void 0?void 0:r.id;return n??-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 r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){const n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)}replace(e,r){const n=this.getNode(e);if(n){const o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(r,o)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function jr(t,e){switch(t.RRNodeType){case O.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case O.DocumentType:{const r=t;return{id:e,type:t.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case O.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case O.Text:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case O.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case O.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function zr(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}var ws=Object.freeze({__proto__:null,default:zr});function Cs(t=window,e=document){if("scrollBehavior"in e.documentElement.style&&t.__forceSmoothScrollPolyfill__!==!0)return;const r=t.HTMLElement||t.Element,n=468,o={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},a=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now;function i(f){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(f)}const l=i(t.navigator.userAgent)?1:0;function s(f,y){this.scrollLeft=f,this.scrollTop=y}function c(f){return .5*(1-Math.cos(Math.PI*f))}function u(f){if(f===null||typeof f!="object"||f.behavior===void 0||f.behavior==="auto"||f.behavior==="instant")return!0;if(typeof f=="object"&&f.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+f.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(f,y){if(y==="Y")return f.clientHeight+l<f.scrollHeight;if(y==="X")return f.clientWidth+l<f.scrollWidth}function h(f,y){const g=t.getComputedStyle(f,null)["overflow"+y];return g==="auto"||g==="scroll"}function m(f){const y=d(f,"Y")&&h(f,"Y"),g=d(f,"X")&&h(f,"X");return y||g}function p(f){for(;f!==e.body&&m(f)===!1;)f=f.parentNode||f.host;return f}function v(f){const y=a();let g,C,M,R=(y-f.startTime)/n;R=R>1?1:R,g=c(R),C=f.startX+(f.x-f.startX)*g,M=f.startY+(f.y-f.startY)*g,f.method.call(f.scrollable,C,M),(C!==f.x||M!==f.y)&&t.requestAnimationFrame(v.bind(t,f))}function b(f,y,g){let C,M,R,_;const P=a();f===e.body?(C=t,M=t.scrollX||t.pageXOffset,R=t.scrollY||t.pageYOffset,_=o.scroll):(C=f,M=f.scrollLeft,R=f.scrollTop,_=s),v({scrollable:C,method:_,startTime:P,startX:M,startY:R,x:y,y:g})}t.scroll=t.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.scroll.call(t,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:t.scrollX||t.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:t.scrollY||t.pageYOffset);return}b.call(t,e.body,arguments[0].left!==void 0?~~arguments[0].left:t.scrollX||t.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:t.scrollY||t.pageYOffset)}},t.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){o.scrollBy.call(t,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}b.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const f=arguments[0].left,y=arguments[0].top;b.call(this,this,typeof f>"u"?this.scrollLeft:~~f,typeof y>"u"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){o.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const f=p(this),y=f.getBoundingClientRect(),g=this.getBoundingClientRect();f!==e.body?(b.call(this,f,f.scrollLeft+g.left-y.left,f.scrollTop+g.top-y.top),t.getComputedStyle(f).position!=="fixed"&&t.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):t.scrollBy({left:g.left,top:g.top,behavior:"smooth"})}}class Es{constructor(e=[],r){this.timeOffset=0,this.raf=null,this.actions=e,this.speed=r.speed}addAction(e){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const n=this.findActionIndex(e);this.actions.splice(n,0,e)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let r=0,n=this.actions.length-1;for(;r<=n;){const o=Math.floor((r+n)/2);if(this.actions[o].delay<e.delay)r=o+1;else if(this.actions[o].delay>e.delay)n=o-1;else return o+1}return r}}function Hr(t,e){if(t.type===T.IncrementalSnapshot&&t.data.source===E.MouseMove&&t.data.positions&&t.data.positions.length){const r=t.data.positions[0].timeOffset,n=t.timestamp+r;return t.delay=n-e,n-e}return t.delay=t.timestamp-e,t.delay}/*! *****************************************************************************- Copyright (c) Microsoft Corporation.+or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We)},has(){return console.error(We),!1},reset(){console.error(We)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(We),Reflect.get(s,e,t)}}));function tt(s,e,t={}){let r=null,i=0;return function(...o){const n=Date.now();!i&&t.leading===!1&&(i=n);const a=e-(n-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=n,s.apply(l,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,o)},a))}}function Rt(s,e,t,r,i=window){const o=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>Rt(s,e,o||{},!0)}let Ct=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ct=()=>new Date().getTime());function gi(s){var e,t,r,i;const o=s.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=A.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o==null?void 0:o.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=A.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function yi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function wi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function bi(s){return s?s.nodeType===s.ELEMENT_NODE?s:A.parentElement(s):null}function re(s,e,t,r){if(!s)return!1;const i=bi(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(dr(i,e,r))return!0}catch(o){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Oa(s,e){return e.getId(s)!==-1}function ar(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===dt}function Si(s,e){if(ut(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=A.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Si(r,e):!0}function Ir(s){return!!s.changedTouches}function vi(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 Da(s){const e={},t=(i,o)=>{const n={value:i,parent:o,children:[]};return e[i.node.id]=n,n},r=[];for(const i of s){const{nextId:o,parentId:n}=i;if(o&&o in e){const a=e[o];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{const l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(n in e){const a=e[n];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function Ci(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)Ci(s.children[t],e)}function Ze(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Ei(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Ii(s,e){var t,r;const i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),n=Ii(i,e),a=o.height/i.clientHeight;return{x:o.x*n.relativeScale+n.x,y:o.y*n.relativeScale+n.y,relativeScale:a,absoluteScale:n.absoluteScale*a}}function Me(s){return s?s instanceof de&&"shadowRoot"in s?!!s.shadowRoot:!!A.shadowRoot(s):!1}function je(s,e){const t=s[e[0]];return e.length===1?t:je(t.cssRules[e[1]].cssRules,e.slice(2))}function Fs(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function Ta(s){const e=new Set,t=[];for(let r=s.length;r--;){const i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class xi{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(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 Mi(s){var e;let t=null;return"getRootNode"in s&&((e=A.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&A.host(A.getRootNode(s))&&(t=A.host(A.getRootNode(s))),t}function _a(s){let e=s,t;for(;t=Mi(e);)e=t;return e}function ka(s){const e=A.ownerDocument(s);if(!e)return!1;const t=_a(s);return A.contains(e,t)}function Ri(s){const e=A.ownerDocument(s);return e?A.contains(e,s)||ka(s):!1}const Rd=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:xi,get _mirror(){return exports.mirror},closestElementOfNode:bi,getBaseDimension:Ii,getNestedRule:je,getPositionsAndIndex:Fs,getRootShadowHost:_a,getShadowHost:Mi,getWindowHeight:yi,getWindowScroll:gi,getWindowWidth:wi,hasShadowRoot:Me,hookSetter:Rt,inDom:Ri,isAncestorRemoved:Si,isBlocked:re,isIgnored:ar,isSerialized:Oa,isSerializedIframe:Ze,isSerializedStylesheet:Ei,iterateResolveTree:Ci,legacy_isTouchEvent:Ir,get nowTimestamp(){return Ct},on:te,polyfill:vi,queueToResolveTrees:Da,shadowHostInDom:ka,throttle:tt,uniqueTextMutations:Ta},Symbol.toStringTag,{value:"Module"}));var I=(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))(I||{}),E=(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))(E||{}),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||{}),ye=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(ye||{}),ve=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(ve||{}),xe=(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))(xe||{}),_=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(_||{}),we=(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))(we||{});function Rn(s){return"__ln"in s}class Nd{constructor(){b(this,"length",0),b(this,"head",null),b(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&&Rn(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&&Rn(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 Nn=(s,e)=>`${s}@${e}`;class Ad{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Nd,i=l=>{let u=l,c=dt;for(;c===dt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=l=>{const u=A.parentNode(l);if(!u||!Ri(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=ut(u)?this.mirror.getId(Mi(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);const g=Ge(l,{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:p=>{Ze(p,this.mirror)&&this.iframeManager.addIframe(p),Ei(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Me(l)&&this.shadowDomManager.addShadowRoot(A.shadowRoot(l),this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)},cssCaptured:c});g&&(e.push({parentId:h,nextId:f,node:g}),t.add(g.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)An(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(A.parentNode(l))||o(l);for(const l of this.addedSet)!On(this.droppedSet,l)&&!An(this.removesSubTreeCache,l,this.mirror)||On(this.movedSet,l)?o(l):this.droppedSet.add(l);let n=null;for(;r.length;){let l=null;if(n){const u=this.mirror.getId(A.parentNode(n.value)),c=i(n.value);u!==-1&&c!==-1&&(l=n)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(A.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{const g=c.value,p=A.parentNode(g);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=A.host(p);if(this.mirror.getId(m)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}n=l.previous,r.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{const u=l.node,c=A.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),b(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(A.childNodes(e),i=>A.textContent(i)||"").join("");t.attributes.value=cr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:hr(e),value:r,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!ar(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=A.textContent(e.target);!re(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Qn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,bi(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 n=hr(t);i=cr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:n,value:i,maskInputFn:this.maskInputFn})}if(re(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Kn(t.tagName,r))if(o.attributes[r]=Jn(this.doc,Ne(t.tagName),Ne(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const a of Array.from(t.style)){const l=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);l!==n.style.getPropertyValue(a)||u!==n.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=l:o.styleDiff[a]=[l,u]:o._unchangedStyles[a]=[l,u]}for(const a of Array.from(n.style))t.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(re(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=ut(e.target)?this.mirror.getId(A.host(e.target)):this.mirror.getId(e.target);re(e.target,this.blockClass,this.blockSelector,!1)||ar(t,this.mirror,this.slimDOMOptions)||!Oa(t,this.mirror)||(this.addedSet.has(t)?(Bs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Si(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Nn(r,i)]?Bs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:ut(e.target)&&ct(e.target)?!0:void 0}),Od(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(ar(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[Nn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);re(e,this.blockClass,this.blockSelector,!1)||(A.childNodes(e).forEach(r=>this.genAdds(r)),Me(e)&&A.childNodes(A.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 Bs(s,e){s.delete(e),A.childNodes(e).forEach(t=>Bs(s,t))}function Od(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),A.childNodes(r).forEach(i=>t.push(i)))}}function An(s,e,t){return s.size===0?!1:Dd(s,e)}function Dd(s,e,t){const r=A.parentNode(e);return r?s.has(r):!1}function On(s,e){return s.size===0?!1:$a(s,e)}function $a(s,e){const t=A.parentNode(e);return t?s.has(t)?!0:$a(s,t):!1}let ft;function Td(s){ft=s}function _d(){ft=void 0}const T=s=>ft?(...t)=>{try{return s(...t)}catch(r){if(ft&&ft(r)===!0)return;throw r}}:s,ke=[];function Nt(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 Pa(s,e){const t=new Ad;ke.push(t),t.init(s);const r=new(Aa())(T(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function kd({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let n=[],a;const l=tt(T(h=>{const f=Date.now()-a;s(n.map(g=>(g.timeOffset-=f,g)),h),n=[],a=null}),o),u=T(tt(T(h=>{const f=Nt(h),{clientX:g,clientY:p}=Ir(h)?h.changedTouches[0]:h;a||(a=Ct()),n.push({x:g,y:p,id:r.getId(f),timeOffset:Ct()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),i,{trailing:!1})),c=[te("mousemove",u,t),te("touchmove",u,t),te("drag",u,t)];return T(()=>{c.forEach(h=>h())})}function $d({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let l=null;const u=c=>h=>{const f=Nt(h);if(re(f,r,i,!0))return;let g=null,p=c;if("pointerType"in h){switch(h.pointerType){case"mouse":g=ye.Mouse;break;case"touch":g=ye.Touch;break;case"pen":g=ye.Pen;break}g===ye.Touch?k[c]===k.MouseDown?p="TouchStart":k[c]===k.MouseUp&&(p="TouchEnd"):ye.Pen}else Ir(h)&&(g=ye.Touch);g!==null?(l=g,(p.startsWith("Touch")&&g===ye.Touch||p.startsWith("Mouse")&&g===ye.Mouse)&&(g=null)):k[c]===k.Click&&(g=l,l=null);const m=Ir(h)?h.changedTouches[0]:h;if(!m)return;const d=t.getId(f),{clientX:y,clientY:S}=m;T(s)(M({type:k[p],id:d,x:y,y:S},g!==null&&{pointerType:g}))};return Object.keys(k).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let h=Ne(c);const f=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}a.push(te(h,f,e))}),T(()=>{a.forEach(c=>c())})}function La({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){const n=T(tt(T(a=>{const l=Nt(a);if(!l||re(l,r,i,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=gi(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return te("scroll",n,e)}function Pd({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=T(tt(T(()=>{const o=yi(),n=wi();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return te("resize",i,e)}const Ld=["INPUT","TEXTAREA","SELECT"],Dn=new WeakMap;function Fd({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(S){let w=Nt(S);const v=S.isTrusted,x=w&&w.tagName;if(w&&x==="OPTION"&&(w=A.parentElement(w)),!w||!x||Ld.indexOf(x)<0||re(w,r,i,!0)||w.classList.contains(o)||n&&w.matches(n))return;let N=w.value,W=!1;const B=hr(w)||"";B==="radio"||B==="checkbox"?W=w.checked:(a[x.toLowerCase()]||a[B])&&(N=cr({element:w,maskInputOptions:a,tagName:x,type:B,value:N,maskInputFn:l})),f(w,c?{text:N,isChecked:W,userTriggered:v}:{text:N,isChecked:W});const H=w.name;B==="radio"&&H&&W&&e.querySelectorAll(`input[type="radio"][name="${H}"]`).forEach(Q=>{if(Q!==w){const se=Q.value;f(Q,c?{text:se,isChecked:!W,userTriggered:!1}:{text:se,isChecked:!W})}})}function f(S,w){const v=Dn.get(S);if(!v||v.text!==w.text||v.isChecked!==w.isChecked){Dn.set(S,w);const x=t.getId(S);T(s)(q(M({},w),{id:x}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(S=>te(S,T(h),e)),m=e.defaultView;if(!m)return()=>{p.forEach(S=>S())};const d=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&p.push(...y.map(S=>Rt(S[0],S[1],{set(){T(h)({target:this,isTrusted:!1})}},!1,m))),T(()=>{p.forEach(S=>S())})}function xr(s){const e=[];function t(r,i){if(qt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||qt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||qt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||qt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const n=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(n)}else if(r.parentStyleSheet){const n=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(n)}return i}return t(s,e)}function Ie(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Bd({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:T((c,h,f)=>{const[g,p]=f,{id:m,styleId:d}=Ie(h,e,t.styleMirror);return(m&&m!==-1||d&&d!==-1)&&s({id:m,styleId:d,adds:[{rule:g,index:p}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const g=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,f])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:T((c,h,f)=>{const[g]=f,{id:p,styleId:m}=Ie(h,e,t.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,removes:[{index:g}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let n;r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:T((c,h,f)=>{const[g]=f,{id:p,styleId:m}=Ie(h,e,t.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,replace:g}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:T((c,h,f)=>{const[g]=f,{id:p,styleId:m}=Ie(h,e,t.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,replaceSync:g}),c.apply(h,f)})}));const l={};er("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(er("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),er("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),er("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:T((f,g,p)=>{const[m,d]=p,{id:y,styleId:S}=Ie(g.parentStyleSheet,e,t.styleMirror);return(y&&y!==-1||S&&S!==-1)&&s({id:y,styleId:S,adds:[{rule:m,index:[...xr(g),d||0]}]}),f.apply(g,p)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:T((f,g,p)=>{const[m]=p,{id:d,styleId:y}=Ie(g.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||y&&y!==-1)&&s({id:d,styleId:y,removes:[{index:[...xr(g),m]}]}),f.apply(g,p)})})}),T(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Fa({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(A.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=l.set)==null?void 0:c.call(this,u);if(n!==null&&n!==-1)try{e.adoptStyleSheets(u,n)}catch(f){}return h}}),T(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function Ud({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:T((a,l,u)=>{var c;const[h,f,g]=u;if(t.has(h))return o.apply(l,[h,f,g]);const{id:p,styleId:m}=Ie((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,set:{property:h,value:f,priority:g},index:xr(l.parentRule)}),a.apply(l,u)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:T((a,l,u)=>{var c;const[h]=u;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:g}=Ie((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||g&&g!==-1)&&s({id:f,styleId:g,remove:{property:h},index:xr(l.parentRule)}),a.apply(l,u)})}),T(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function Wd({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){const n=T(l=>tt(T(u=>{const c=Nt(u);if(!c||re(c,e,t,!0))return;const{currentTime:h,volume:f,muted:g,playbackRate:p,loop:m}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:g,playbackRate:p,loop:m})}),i.media||500)),a=[te("play",n(xe.Play),o),te("pause",n(xe.Pause),o),te("seeked",n(xe.Seeked),o),te("volumechange",n(xe.VolumeChange),o),te("ratechange",n(xe.RateChange),o)];return T(()=>{a.forEach(l=>l())})}function zd({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(l,u,c){const h=new o(l,u,c);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const n=Le(e.fonts,"add",function(a){return function(l){return setTimeout(T(()=>{const u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=o}),r.push(n),T(()=>{r.forEach(a=>a())})}function Vd(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s;let n=!0;const a=T(()=>{const l=e.getSelection();if(!l||n&&(l!=null&&l.isCollapsed))return;n=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){const f=l.getRangeAt(h),{startContainer:g,startOffset:p,endContainer:m,endOffset:d}=f;re(g,r,i,!0)||re(m,r,i,!0)||u.push({start:t.getId(g),startOffset:p,end:t.getId(m),endOffset:d})}o({ranges:u})});return a(),te("selectionchange",a)}function Gd({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Le(t.customElements,"define",function(i){return function(o,n,a){try{e({define:{name:o}})}catch(l){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,n,a])}})}function jd(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:n,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:f,selectionCb:g,customElementCb:p}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),o(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),n(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),a(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),l(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),u(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),c(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),f(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),g(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),p(...m)}}function Yd(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};jd(s,e);let r;s.recordDOM&&(r=Pa(s,s.doc));const i=kd(s),o=$d(s),n=La(s),a=Pd(s,{win:t}),l=Fd(s),u=Wd(s);let c=()=>{},h=()=>{},f=()=>{},g=()=>{};s.recordDOM&&(c=Bd(s,{win:t}),h=Fa(s,s.doc),f=Ud(s,{win:t}),s.collectFonts&&(g=zd(s)));const p=Vd(s),m=Gd(s),d=[];for(const y of s.plugins)d.push(y.observer(y.callback,t,y.options));return T(()=>{ke.forEach(y=>y.reset()),r==null||r.disconnect(),i(),o(),n(),a(),l(),u(),c(),h(),f(),g(),p(),m(),d.forEach(y=>y())})}function qt(s){return typeof window[s]!="undefined"}function er(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Tn{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const o=r||this.getIdToRemoteIdMap(e),n=i||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),n.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=i.get(t);return o||-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 Hd{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Tn(Xn)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Tn(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 o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case I.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:I.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),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 E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case E.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 o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));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!==we.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Zd{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(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(!ct(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Pa(q(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(La(q(M({},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(A.host(e))),this.restoreHandlers.push(Fa({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(Le(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),a=A.shadowRoot(this);return a&&Ri(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var tr=0;tr<Ye.length;tr++)lt[Ye.charCodeAt(tr)]=tr;var Xd=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ye[e[t]>>2],i+=Ye[(e[t]&3)<<4|e[t+1]>>4],i+=Ye[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ye[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},Jd=function(s){var e=s.length*.75,t=s.length,r,i=0,o,n,a,l;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)o=lt[s.charCodeAt(r)],n=lt[s.charCodeAt(r+1)],a=lt[s.charCodeAt(r+2)],l=lt[s.charCodeAt(r+3)],c[i++]=o<<2|n>>4,c[i++]=(n&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u};const _n=new Map;function Kd(s,e){let t=_n.get(s);return t||(t=new Map,_n.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Ba=(s,e,t)=>{if(!s||!(Wa(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Kd(t,r);let o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};function lr(s,e,t){if(s instanceof Array)return s.map(r=>lr(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=Xd(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[lr(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:[lr(s.data,e,t),s.width,s.height]};if(Wa(s,e)||typeof s=="object"){const r=s.constructor.name,i=Ba(s,e,t);return{rr_type:r,index:i}}}}return s}const Ua=(s,e,t)=>s.map(r=>lr(r,e,t)),Wa=(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 Qd(s,e,t,r){const i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;const a=Le(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...u){return re(this.canvas,t,r,!0)||setTimeout(()=>{const c=Ua(u,e,this);s(this.canvas,{type:ve["2D"],property:n,args:c})},0),l.apply(this,u)}});i.push(a)}catch(a){const l=Rt(e.CanvasRenderingContext2D.prototype,n,{set(u){s(this.canvas,{type:ve["2D"],property:n,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(n=>n())}}function qd(s){return s==="experimental-webgl"?"webgl":s}function kn(s,e,t,r){const i=[];try{const o=Le(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!re(this,e,t,!0)){const u=qd(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){const c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[a,...l])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function $n(s,e,t,r,i,o){const n=[],a=Object.getOwnPropertyNames(s);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;const u=Le(s,l,function(c){return function(...h){const f=c.apply(this,h);if(Ba(f,o,this),"tagName"in this.canvas&&!re(this.canvas,r,i,!0)){const g=Ua(h,o,this),p={type:e,property:l,args:g};t(this.canvas,p)}return f}});n.push(u)}catch(u){const c=Rt(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(c)}return n}function ep(s,e,t,r){const i=[];return i.push(...$n(e.WebGLRenderingContext.prototype,ve.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...$n(e.WebGL2RenderingContext.prototype,ve.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}const za="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",tp=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Pn=typeof window!="undefined"&&window.Blob&&new Blob([tp(za)],{type:"text/javascript;charset=utf-8"});function rp(s){let e;try{if(e=Pn&&(window.URL||window.webkitURL).createObjectURL(Pn),!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,"+za,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class sp{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:n,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(r,i,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,o){const n=kn(t,r,i,!0),a=new Map,l=new rp;l.onmessage=p=>{const{id:m}=p.data;if(a.set(m,!1),!("base64"in p.data))return;const{base64:d,type:y,width:S,height:w}=p.data;this.mutationCb({id:m,type:ve["2D"],commands:[{property:"clearRect",args:[0,0,S,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:y}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(m=>{re(m,r,i,!0)||p.push(m)}),p},g=p=>{if(c&&p-c<u){h=requestAnimationFrame(g);return}c=p,f().forEach(async m=>{var d;const y=this.mirror.getId(m);if(a.get(y)||m.width===0||m.height===0)return;if(a.set(y,!0),["webgl","webgl2"].includes(m.__context)){const w=m.getContext(m.__context);((d=w==null?void 0:w.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&w.clear(w.COLOR_BUFFER_BIT)}const S=await createImageBitmap(m);l.postMessage({id:y,bitmap:S,width:m.width,height:m.height,dataURLOptions:o.dataURLOptions},[S])}),h=requestAnimationFrame(g)};h=requestAnimationFrame(g),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=kn(e,t,r,!1),o=Qd(this.processMutation.bind(this),e,t,r),n=ep(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),n()}}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(n=>{const u=n,{type:a}=u;return Fe(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class ip{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new xi),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 o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),i.push({styleId:n,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:Hn(a,o.href),index:l}))})),r.styleIds.push(n)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class np{constructor(){b(this,"nodeMap",new WeakMap),b(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 K,ur,rs,Mr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((ki=s.contentWindow)==null?void 0:ki.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const ce=Zn();function Ae(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:n="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:g,maskInputFn:p,maskTextFn:m,hooks:d,packFn:y,sampling:S={},dataURLOptions:w={},mousemoveWait:v,recordDOM:x=!0,recordCanvas:N=!1,recordCrossOriginIframes:W=!1,recordAfter:B=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:H=!1,collectFonts:Q=!1,inlineImages:se=!1,plugins:ie,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:Oe=new Set([]),errorHandler:De}=s;Td(De);const Z=W?window.parent===window:!0;let P=!1;if(!Z)try{window.parent.document&&(P=!1)}catch($){P=!0}if(Z&&!e)throw new Error("emit function is required");if(!Z&&!P)return()=>{};v!==void 0&&S.mousemove===void 0&&(S.mousemove=v),ce.reset();const le=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}:f!==void 0?f:{password:!0},ne=qn(g);vi();let st,Wr=0;const Ni=$=>{for(const ue of ie||[])ue.eventProcessor&&($=ue.eventProcessor($));return y&&!P&&($=y($)),$};K=($,ue)=>{var X;const J=$;if(J.timestamp=Ct(),(X=ke[0])!=null&&X.isFrozen()&&J.type!==I.FullSnapshot&&!(J.type===I.IncrementalSnapshot&&J.data.source===E.Mutation)&&ke.forEach(oe=>oe.unfreeze()),Z)e==null||e(Ni(J),ue);else if(P){const oe={type:"rrweb",event:Ni(J),origin:window.location.origin,isCheckout:ue};window.parent.postMessage(oe,"*")}if(J.type===I.FullSnapshot)st=J,Wr=0;else if(J.type===I.IncrementalSnapshot){if(J.data.source===E.Mutation&&J.data.isAttachIframe)return;Wr++;const oe=r&&Wr>=r,U=t&&J.timestamp-st.timestamp>t;(oe||U)&&ur(!0)}};const At=$=>{K({type:I.IncrementalSnapshot,data:M({source:E.Mutation},$)})},Ai=$=>K({type:I.IncrementalSnapshot,data:M({source:E.Scroll},$)}),Oi=$=>K({type:I.IncrementalSnapshot,data:M({source:E.CanvasMutation},$)}),Xa=$=>K({type:I.IncrementalSnapshot,data:M({source:E.AdoptedStyleSheet},$)}),Te=new ip({mutationCb:At,adoptedStyleSheetCb:Xa}),_e=new Hd({mirror:ce,mutationCb:At,stylesheetManager:Te,recordCrossOriginIframes:W,wrappedEmit:K});for(const $ of ie||[])$.getMirror&&$.getMirror({nodeMirror:ce,crossOriginIframeMirror:_e.crossOriginIframeMirror,crossOriginIframeStyleMirror:_e.crossOriginIframeStyleMirror});const zr=new np;rs=new sp({recordCanvas:N,mutationCb:Oi,win:window,blockClass:i,blockSelector:o,mirror:ce,sampling:S.canvas,dataURLOptions:w});const Ot=new Zd({mutationCb:At,scrollCb:Ai,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:le,dataURLOptions:w,maskTextFn:m,maskInputFn:p,recordCanvas:N,inlineImages:se,sampling:S,slimDOMOptions:ne,iframeManager:_e,stylesheetManager:Te,canvasManager:rs,keepIframeSrcFn:O,processedNodeManager:zr},mirror:ce});ur=($=!1)=>{if(!x)return;K({type:I.Meta,data:{href:window.location.href,width:wi(),height:yi()}},$),Te.reset(),Ot.init(),ke.forEach(X=>X.lock());const ue=Hl(document,{mirror:ce,blockClass:i,blockSelector:o,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:le,maskTextFn:m,maskInputFn:p,slimDOM:ne,dataURLOptions:w,recordCanvas:N,inlineImages:se,onSerialize:X=>{Ze(X,ce)&&_e.addIframe(X),Ei(X,ce)&&Te.trackLinkElement(X),Me(X)&&Ot.addShadowRoot(A.shadowRoot(X),document)},onIframeLoad:(X,J)=>{_e.attachIframe(X,J),Ot.observeAttachShadow(X)},onStylesheetLoad:(X,J)=>{Te.attachLinkElement(X,J)},keepIframeSrcFn:O});if(!ue)return console.warn("Failed to snapshot the document");K({type:I.FullSnapshot,data:{node:ue,initialOffset:gi(window)}},$),ke.forEach(X=>X.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Te.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{const $=[],ue=J=>{var oe;return T(Yd)({mutationCb:At,mousemoveCb:(U,Vr)=>K({type:I.IncrementalSnapshot,data:{source:Vr,positions:U}}),mouseInteractionCb:U=>K({type:I.IncrementalSnapshot,data:M({source:E.MouseInteraction},U)}),scrollCb:Ai,viewportResizeCb:U=>K({type:I.IncrementalSnapshot,data:M({source:E.ViewportResize},U)}),inputCb:U=>K({type:I.IncrementalSnapshot,data:M({source:E.Input},U)}),mediaInteractionCb:U=>K({type:I.IncrementalSnapshot,data:M({source:E.MediaInteraction},U)}),styleSheetRuleCb:U=>K({type:I.IncrementalSnapshot,data:M({source:E.StyleSheetRule},U)}),styleDeclarationCb:U=>K({type:I.IncrementalSnapshot,data:M({source:E.StyleDeclaration},U)}),canvasMutationCb:Oi,fontCb:U=>K({type:I.IncrementalSnapshot,data:M({source:E.Font},U)}),selectionCb:U=>{K({type:I.IncrementalSnapshot,data:M({source:E.Selection},U)})},customElementCb:U=>{K({type:I.IncrementalSnapshot,data:M({source:E.CustomElement},U)})},blockClass:i,ignoreClass:n,ignoreSelector:a,maskTextClass:l,maskTextSelector:u,maskInputOptions:le,inlineStylesheet:c,sampling:S,recordDOM:x,recordCanvas:N,inlineImages:se,userTriggeredOnInput:H,collectFonts:Q,doc:J,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:O,blockSelector:o,slimDOMOptions:ne,dataURLOptions:w,mirror:ce,iframeManager:_e,stylesheetManager:Te,shadowDomManager:Ot,processedNodeManager:zr,canvasManager:rs,ignoreCSSAttributes:Oe,plugins:((oe=ie==null?void 0:ie.filter(U=>U.observer))==null?void 0:oe.map(U=>({observer:U.observer,options:U.options,callback:Vr=>K({type:I.Plugin,data:{plugin:U.name,payload:Vr}})})))||[]},d)};_e.addLoadListener(J=>{try{$.push(ue(J.contentDocument))}catch(oe){console.warn(oe)}});const X=()=>{ur(),$.push(ue(document)),Mr=!0};return["interactive","complete"].includes(document.readyState)?X():($.push(te("DOMContentLoaded",()=>{K({type:I.DomContentLoaded,data:{}}),B==="DOMContentLoaded"&&X()})),$.push(te("load",()=>{K({type:I.Load,data:{}}),B==="load"&&X()},window))),()=>{$.forEach(J=>{try{J()}catch(oe){String(oe).toLowerCase().includes("cross-origin")||console.warn(oe)}}),zr.destroy(),Mr=!1,_d()}}catch($){console.warn($)}}Ae.addCustomEvent=(s,e)=>{if(!Mr)throw new Error("please add custom event after start recording");K({type:I.Custom,data:{tag:s,payload:e}})};Ae.freezePage=()=>{ke.forEach(s=>s.freeze())};Ae.takeFullSnapshot=s=>{if(!Mr)throw new Error("please take full snapshot after start recording");ur(s)};Ae.mirror=ce;function Va(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}const op=Object.freeze(Object.defineProperty({__proto__:null,default:Va},Symbol.toStringTag,{value:"Module"}));function ap(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;const t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},o=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function n(y){const S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(y)}const a=n(s.navigator.userAgent)?1:0;function l(y,S){this.scrollLeft=y,this.scrollTop=S}function u(y){return .5*(1-Math.cos(Math.PI*y))}function c(y){if(y===null||typeof y!="object"||y.behavior===void 0||y.behavior==="auto"||y.behavior==="instant")return!0;if(typeof y=="object"&&y.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+y.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(y,S){if(S==="Y")return y.clientHeight+a<y.scrollHeight;if(S==="X")return y.clientWidth+a<y.scrollWidth}function f(y,S){const w=s.getComputedStyle(y,null)["overflow"+S];return w==="auto"||w==="scroll"}function g(y){const S=h(y,"Y")&&f(y,"Y"),w=h(y,"X")&&f(y,"X");return S||w}function p(y){for(;y!==e.body&&g(y)===!1;)y=y.parentNode||y.host;return y}function m(y){const S=o();let w,v,x,N=(S-y.startTime)/r;N=N>1?1:N,w=u(N),v=y.startX+(y.x-y.startX)*w,x=y.startY+(y.y-y.startY)*w,y.method.call(y.scrollable,v,x),(v!==y.x||x!==y.y)&&s.requestAnimationFrame(m.bind(s,y))}function d(y,S,w){let v,x,N,W;const B=o();y===e.body?(v=s,x=s.scrollX||s.pageXOffset,N=s.scrollY||s.pageYOffset,W=i.scroll):(v=y,x=y.scrollLeft,N=y.scrollTop,W=l),m({scrollable:v,method:W,startTime:B,startX:x,startY:N,x:S,y:w})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}d.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){i.scrollBy.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}d.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const y=arguments[0].left,S=arguments[0].top;d.call(this,this,typeof y=="undefined"?this.scrollLeft:~~y,typeof S=="undefined"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const y=p(this),S=y.getBoundingClientRect(),w=this.getBoundingClientRect();y!==e.body?(d.call(this,y,y.scrollLeft+w.left-S.left,y.scrollTop+w.top-S.top),s.getComputedStyle(y).position!=="fixed"&&s.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}class lp{constructor(e=[],t){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){const i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}}function Ln(s,e){if(s.type===I.IncrementalSnapshot&&s.data.source===E.MouseMove&&s.data.positions&&s.data.positions.length){const t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}/*! *****************************************************************************+Copyright (c) Microsoft Corporation.- Permission to use, copy, modify, and/or distribute this software for any- purpose with or without fee is hereby granted.+Permission to use, copy, modify, and/or distribute this software for any+purpose with or without fee is hereby granted.- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR- PERFORMANCE OF THIS SOFTWARE.- ***************************************************************************** */function Yr(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n,o,a=r.call(t),i=[];try{for(;(e===void 0||e-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(l){o={error:l}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}var Ae;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Ae||(Ae={}));var Xr={type:"xstate.init"};function _t(t){return t===void 0?[]:[].concat(t)}function _e(t){return{type:"xstate.assign",assignment:t}}function Zr(t,e){return typeof(t=typeof t=="string"&&e&&e[t]?e[t]:t)=="string"?{type:t}:typeof t=="function"?{type:t.name,exec:t}:t}function lt(t){return function(e){return t===e}}function Kr(t){return typeof t=="string"?{type:t}:t}function Jr(t,e){return{value:t,context:e,actions:[],changed:!1,matches:lt(t)}}function Qr(t,e,r){var n=e,o=!1;return[t.filter(function(a){if(a.type==="xstate.assign"){o=!0;var i=Object.assign({},n);return typeof a.assignment=="function"?i=a.assignment(n,r):Object.keys(a.assignment).forEach(function(l){i[l]=typeof a.assignment[l]=="function"?a.assignment[l](n,r):a.assignment[l]}),n=i,!1}return!0}),n,o]}function qr(t,e){e===void 0&&(e={});var r=Yr(Qr(_t(t.states[t.initial].entry).map(function(i){return Zr(i,e.actions)}),t.context,Xr),2),n=r[0],o=r[1],a={config:t,_options:e,initialState:{value:t.initial,actions:n,context:o,matches:lt(t.initial)},transition:function(i,l){var s,c,u=typeof i=="string"?{value:i,context:t.context}:i,d=u.value,h=u.context,m=Kr(l),p=t.states[d];if(p.on){var v=_t(p.on[m.type]);try{for(var b=function(F){var q=typeof Symbol=="function"&&Symbol.iterator,w=q&&F[q],S=0;if(w)return w.call(F);if(F&&typeof F.length=="number")return{next:function(){return F&&S>=F.length&&(F=void 0),{value:F&&F[S++],done:!F}}};throw new TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")}(v),f=b.next();!f.done;f=b.next()){var y=f.value;if(y===void 0)return Jr(d,h);var g=typeof y=="string"?{target:y}:y,C=g.target,M=g.actions,R=M===void 0?[]:M,_=g.cond,P=_===void 0?function(){return!0}:_,Z=C===void 0,K=C??d,Y=t.states[K];if(P(h,m)){var J=Yr(Qr((Z?_t(R):[].concat(p.exit,R,Y.entry).filter(function(F){return F})).map(function(F){return Zr(F,a._options.actions)}),h,m),3),Q=J[0],ie=J[1],U=J[2],j=C??d;return{value:j,context:ie,actions:Q,changed:C!==d||Q.length>0||U,matches:lt(j)}}}}catch(F){s={error:F}}finally{try{f&&!f.done&&(c=b.return)&&c.call(b)}finally{if(s)throw s.error}}}return Jr(d,h)}};return a}var en=function(t,e){return t.actions.forEach(function(r){var n=r.exec;return n&&n(t.context,e)})};function tn(t){var e=t.initialState,r=Ae.NotStarted,n=new Set,o={_machine:t,send:function(a){r===Ae.Running&&(e=t.transition(e,a),en(e,Kr(a)),n.forEach(function(i){return i(e)}))},subscribe:function(a){return n.add(a),a(e),{unsubscribe:function(){return n.delete(a)}}},start:function(a){if(a){var i=typeof a=="object"?a:{context:t.config.context,value:a};e={value:i.value,actions:[],context:i.context,matches:lt(i.value)}}return r=Ae.Running,en(e,Xr),o},stop:function(){return r=Ae.Stopped,n.clear(),o},get state(){return e},get status(){return r}};return o}var Ts=Object.defineProperty,Ns=Object.defineProperties,Ms=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertySymbols,Is=Object.prototype.hasOwnProperty,Ds=Object.prototype.propertyIsEnumerable,nn=(t,e,r)=>e in t?Ts(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ft=(t,e)=>{for(var r in e||(e={}))Is.call(e,r)&&nn(t,r,e[r]);if(rn)for(var r of rn(e))Ds.call(e,r)&&nn(t,r,e[r]);return t},Pt=(t,e)=>Ns(t,Ms(e));function ks(t,e){for(let r=t.length-1;r>=0;r--){const n=t[r];if(n.type===T.Meta&&n.timestamp<=e)return t.slice(r)}return t}function Rs(t,{getCastFn:e,applyEventsSynchronously:r,emitter:n}){const o=qr({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:_e({lastPlayedEvent:(a,i)=>i.type==="CAST_EVENT"?i.payload.event:a.lastPlayedEvent}),recordTimeOffset:_e((a,i)=>{let l=a.timeOffset;return"payload"in i&&"timeOffset"in i.payload&&(l=i.payload.timeOffset),Pt(Ft({},a),{timeOffset:l,baselineTime:a.events[0].timestamp+l})}),play(a){var i;const{timer:l,events:s,baselineTime:c,lastPlayedEvent:u}=a;l.clear();for(const p of s)Hr(p,c);const d=ks(s,c);let h=u?.timestamp;u?.type===T.IncrementalSnapshot&&u.data.source===E.MouseMove&&(h=u.timestamp+((i=u.data.positions[0])==null?void 0:i.timeOffset)),c<(h||0)&&n.emit(A.PlayBack);const m=new Array;for(const p of d)if(!(h&&h<c&&(p.timestamp<=h||p===u)))if(p.timestamp<c)m.push(p);else{const v=e(p,!1);l.addAction({doAction:()=>{v()},delay:p.delay})}r(m),n.emit(A.Flush),l.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:_e(a=>Pt(Ft({},a),{lastPlayedEvent:null})),startLive:_e({baselineTime:(a,i)=>(a.timer.start(),i.type==="TO_LIVE"&&i.payload.baselineTime?i.payload.baselineTime:Date.now())}),addEvent:_e((a,i)=>{const{baselineTime:l,timer:s,events:c}=a;if(i.type==="ADD_EVENT"){const{event:u}=i.payload;Hr(u,l);let d=c.length-1;if(!c[d]||c[d].timestamp<=u.timestamp)c.push(u);else{let p=-1,v=0;for(;v<=d;){const b=Math.floor((v+d)/2);c[b].timestamp<=u.timestamp?v=b+1:d=b-1}p===-1&&(p=v),c.splice(p,0,u)}const h=u.timestamp<l,m=e(u,h);h?m():s.isActive()&&s.addAction({doAction:()=>{m()},delay:u.delay})}return Pt(Ft({},a),{events:c})})}});return tn(o)}function xs(t){const e=qr({id:"speed",context:t,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,n)=>{"payload"in n&&r.timer.setSpeed(n.payload.speed)},recordSpeed:_e({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return tn(e)}const Os=t=>[`.${t} { background: currentColor }`,"noscript { display: none !important; }"];var Ls=(t,e,r)=>new Promise((n,o)=>{var a=s=>{try{l(r.next(s))}catch(c){o(c)}},i=s=>{try{l(r.throw(s))}catch(c){o(c)}},l=s=>s.done?n(s.value):Promise.resolve(s.value).then(a,i);l((r=r.apply(t,e)).next())});const on=new Map;function sn(t,e){let r=on.get(t);return r||(r=new Map,on.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}function be(t,e,r){return n=>Ls(this,null,function*(){if(n&&typeof n=="object"&&"rr_type"in n)if(r&&(r.isUnchanged=!1),n.rr_type==="ImageBitmap"&&"args"in n){const o=yield be(t,e,r)(n.args);return yield createImageBitmap.apply(null,o)}else if("index"in n){if(r||e===null)return n;const{rr_type:o,index:a}=n;return sn(e,o)[a]}else if("args"in n){const{rr_type:o,args:a}=n,i=window[o];return new i(...yield Promise.all(a.map(be(t,e,r))))}else{if("base64"in n)return Io(n.base64);if("src"in n){const o=t.get(n.src);if(o)return o;{const a=new Image;return a.src=n.src,t.set(n.src,a),a}}else if("data"in n&&n.rr_type==="Blob"){const o=yield Promise.all(n.data.map(be(t,e,r)));return new Blob(o,{type:n.type})}}else if(Array.isArray(n))return yield Promise.all(n.map(be(t,e,r)));return n})}var As=(t,e,r)=>new Promise((n,o)=>{var a=s=>{try{l(r.next(s))}catch(c){o(c)}},i=s=>{try{l(r.throw(s))}catch(c){o(c)}},l=s=>s.done?n(s.value):Promise.resolve(s.value).then(a,i);l((r=r.apply(t,e)).next())});function _s(t,e){try{return e===fe.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch{return null}}const Fs=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ps(t,e){if(!(e!=null&&e.constructor))return;const{name:r}=e.constructor;if(!Fs.includes(r))return;const n=sn(t,r);n.includes(e)||n.push(e)}function Ws(t){return As(this,arguments,function*({mutation:e,target:r,type:n,imageMap:o,errorHandler:a}){try{const i=_s(r,n);if(!i)return;if(e.setter){i[e.property]=e.args[0];return}const l=i[e.property],s=yield Promise.all(e.args.map(be(o,i))),c=l.apply(i,s);Ps(i,c)}catch(i){a(e,i)}})}var an=(t,e,r)=>new Promise((n,o)=>{var a=s=>{try{l(r.next(s))}catch(c){o(c)}},i=s=>{try{l(r.throw(s))}catch(c){o(c)}},l=s=>s.done?n(s.value):Promise.resolve(s.value).then(a,i);l((r=r.apply(t,e)).next())});function $s(t){return an(this,arguments,function*({event:e,mutations:r,target:n,imageMap:o,errorHandler:a}){const i=n.getContext("2d");if(!i){a(r[0],new Error("Canvas context is null"));return}const l=r.map(s=>an(this,null,function*(){return Promise.all(s.args.map(be(o,i)))}));(yield Promise.all(l)).forEach((s,c)=>{const u=r[c];try{if(u.setter){i[u.property]=u.args[0];return}const d=i[u.property];u.property==="drawImage"&&typeof u.args[0]=="string"?(o.get(e),d.apply(i,u.args)):d.apply(i,s)}catch(d){a(u,d)}})})}var Us=(t,e,r)=>new Promise((n,o)=>{var a=s=>{try{l(r.next(s))}catch(c){o(c)}},i=s=>{try{l(r.throw(s))}catch(c){o(c)}},l=s=>s.done?n(s.value):Promise.resolve(s.value).then(a,i);l((r=r.apply(t,e)).next())});function ln(t){return Us(this,arguments,function*({event:e,mutation:r,target:n,imageMap:o,canvasEventMap:a,errorHandler:i}){try{const l=a.get(e)||r,s="commands"in l?l.commands:[l];if([fe.WebGL,fe.WebGL2].includes(r.type)){for(let c=0;c<s.length;c++){const u=s[c];yield Ws({mutation:u,type:r.type,target:n,imageMap:o,errorHandler:i})}return}yield $s({event:e,mutations:s,target:n,imageMap:o,errorHandler:i})}catch(l){i(r,l)}})}var Vs=Object.defineProperty,Bs=Object.defineProperties,Gs=Object.getOwnPropertyDescriptors,cn=Object.getOwnPropertySymbols,js=Object.prototype.hasOwnProperty,zs=Object.prototype.propertyIsEnumerable,un=(t,e,r)=>e in t?Vs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ct=(t,e)=>{for(var r in e||(e={}))js.call(e,r)&&un(t,r,e[r]);if(cn)for(var r of cn(e))zs.call(e,r)&&un(t,r,e[r]);return t},Wt=(t,e)=>Bs(t,Gs(e)),$t=(t,e,r)=>new Promise((n,o)=>{var a=s=>{try{l(r.next(s))}catch(c){o(c)}},i=s=>{try{l(r.throw(s))}catch(c){o(c)}},l=s=>s.done?n(s.value):Promise.resolve(s.value).then(a,i);l((r=r.apply(t,e)).next())});const Hs=10*1e3,Ys=5*1e3,Xs=zr||ws,dn="[replayer]",Ut={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function hn(t){return t.type==T.IncrementalSnapshot&&(t.data.source==E.TouchMove||t.data.source==E.MouseInteraction&&t.data.type==L.TouchStart)}class Zs{constructor(e,r){if(this.usingVirtualDom=!1,this.virtualDom=new Le,this.mouseTail=null,this.tailPositions=[],this.emitter=Xs(),this.legacy_missingNodeRetryMap={},this.cache=tr(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=jt(),this.styleMirror=new Nt,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=l=>{this.iframe.style.display="inherit";for(const s of[this.mouseTail,this.iframe])!s||(s.setAttribute("width",String(l.width)),s.setAttribute("height",String(l.height)))},this.applyEventsSynchronously=l=>{for(const s of l){switch(s.type){case T.DomContentLoaded:case T.Load:case T.Custom:continue;case T.FullSnapshot:case T.Meta:case T.Plugin:case T.IncrementalSnapshot:break}this.getCastFn(s,!0)()}},this.getCastFn=(l,s=!1)=>{let c;switch(l.type){case T.DomContentLoaded:case T.Load:break;case T.Custom:c=()=>{this.emitter.emit(A.CustomEvent,l)};break;case T.Meta:c=()=>this.emitter.emit(A.Resize,{width:l.data.width,height:l.data.height});break;case T.FullSnapshot:c=()=>{var u;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.rebuildFullSnapshot(l,s),(u=this.iframe.contentWindow)==null||u.scrollTo(l.data.initialOffset),this.styleMirror.reset()};break;case T.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,s),!s&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const u of this.service.state.context.events)if(!(u.timestamp<=l.timestamp)&&this.isUserInteraction(u)){u.delay-l.delay>Hs*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=u);break}if(this.nextUserInteractionEvent){const u=this.nextUserInteractionEvent.delay-l.delay,d={speed:Math.min(Math.round(u/Ys),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(A.SkipStart,d)}}};break}return()=>{c&&c();for(const d of this.config.plugins||[])d.handler&&d.handler(l,s,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const u=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[u]){const d=()=>{u<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(A.Finish))};let h=50;l.type===T.IncrementalSnapshot&&l.data.source===E.MouseMove&&l.data.positions.length&&(h+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,h)}this.emitter.emit(A.EventCast,l)}},!(r!=null&&r.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const n={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Ut,useVirtualDom:!0,logger:console};this.config=Object.assign({},n,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(A.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(A.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(s,c,u)=>{ln({event:s,mutation:c,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(s,c)=>{s.source===E.StyleSheetRule?this.applyStyleSheetRule(s,c):s.source===E.StyleDeclaration&&this.applyStyleDeclaration(s,c)},afterAppend:(s,c)=>{for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(s,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{it(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(s){console.warn(s)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const s in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[s],u=at(c.node,this.mirror,this.virtualDom.mirror);it(u,c.node,l,this.virtualDom.mirror),c.node=u}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(s=>{this.applyStyleSheetMutation(s)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(s=>{this.applyAdoptedStyleSheet(s)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,s]=this.lastMouseDownEvent;l.dispatchEvent(s)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(A.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset()});const o=new Es([],{speed:this.config.speed});this.service=Rs({events:e.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,s)=>l.timestamp-s.timestamp),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(A.StateChange,{player:l})}),this.speedService=xs({normalSpeed:-1,timer:o}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(A.StateChange,{speed:l})});const a=this.service.state.context.events.find(l=>l.type===T.Meta),i=this.service.state.context.events.find(l=>l.type===T.FullSnapshot);if(a){const{width:l,height:s}=a.data;setTimeout(()=>{this.emitter.emit(A.Resize,{width:l,height:s})},0)}i&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=i,this.rebuildFullSnapshot(i),(l=this.iframe.contentWindow)==null||l.scrollTo(i.data.initialOffset))},1),this.service.state.context.events.find(hn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,r){return this.emitter.on(e,r),this}off(e,r){return this.emitter.off(e,r),this}setConfig(e){Object.keys(e).forEach(r=>{e[r],this.config[r]=e[r]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:r.timestamp,totalTime:r.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:r}=this.service.state.context;return e-r[0].timestamp}getMirror(){return this.mirror}play(e=0){var r,n;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(n=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||n.classList.remove("rrweb-paused"),this.emitter.emit(A.Start)}pause(e){var r,n;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(n=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||n.classList.add("rrweb-paused"),this.emitter.emit(A.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(A.Resume)}destroy(){this.pause(),this.config.root.removeChild(this.wrapper),this.emitter.emit(A.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const r=this.config.unpackFn?this.config.unpackFn(e):e;hn(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=tr()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Cs(this.iframe.contentWindow,this.iframe.contentDocument),bt(this.iframe.contentWindow))}rebuildFullSnapshot(e,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const n=[],o=(l,s)=>{this.collectIframeAndAttachDocument(n,l);for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:s,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Xn(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:l,builtNode:s}of n)this.attachDocumentToIframe(l,s),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);const{documentElement:a,head:i}=this.iframe.contentDocument;this.insertStyleRules(a,i),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(A.FullsnapshotRebuilded,e),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,r){var n;const o=Os(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&o.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,jr(a,this.virtualDom.unserializedId)),e.insertBefore(a,r),a.rules.push({source:E.StyleSheetRule,adds:o.map((i,l)=>({rule:i,index:l}))})}else{const a=document.createElement("style");e.insertBefore(a,r);for(let i=0;i<o.length;i++)(n=a.sheet)==null||n.insertRule(o[i],i)}}attachDocumentToIframe(e,r){const n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,o=[],a=(i,l)=>{this.collectIframeAndAttachDocument(o,i);const s=n.getMeta(i);if(s?.type===N.Element&&s?.tagName.toUpperCase()==="HTML"){const{documentElement:c,head:u}=r.contentDocument;this.insertStyleRules(c,u)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(i,{id:l,replayer:this})};Ue(e.node,{doc:r.contentDocument,mirror:n,hackCss:!0,skipChild:!1,afterAppend:a,cache:this.cache}),a(r.contentDocument,e.node.id);for(const{mutationInQueue:i,builtNode:l}of o)this.attachDocumentToIframe(i,l),this.newDocumentQueue=this.newDocumentQueue.filter(s=>s!==i)}collectIframeAndAttachDocument(e,r){if(ke(r,this.mirror)){const n=this.newDocumentQueue.find(o=>o.parentId===this.mirror.getId(r));n&&e.push({mutationInQueue:n,builtNode:r})}}waitForStylesheetLoad(){var e;const r=(e=this.iframe.contentDocument)==null?void 0:e.head;if(r){const n=new Set;let o,a=this.service.state;const i=()=>{a=this.service.state};this.emitter.on(A.Start,i),this.emitter.on(A.Pause,i);const l=()=>{this.emitter.off(A.Start,i),this.emitter.off(A.Pause,i)};r.querySelectorAll('link[rel="stylesheet"]').forEach(s=>{s.sheet||(n.add(s),s.addEventListener("load",()=>{n.delete(s),n.size===0&&o!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(A.LoadStylesheetEnd),o&&clearTimeout(o),l())}))}),n.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(A.LoadStylesheetStart),o=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),o=-1,l()},this.config.loadTimeout))}}preloadAllImages(){return $t(this,null,function*(){this.service.state;const e=()=>{this.service.state};this.emitter.on(A.Start,e),this.emitter.on(A.Pause,e);const r=[];for(const n of this.service.state.context.events)n.type===T.IncrementalSnapshot&&n.data.source===E.CanvasMutation&&(r.push(this.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach(o=>{this.preloadImages(o,n)}));return Promise.all(r)})}preloadImages(e,r){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(r)){const n=document.createElement("canvas"),o=n.getContext("2d"),a=o?.createImageData(n.width,n.height);a?.data,JSON.parse(e.args[0]),o?.putImageData(a,0,0)}}deserializeAndPreloadCanvasEvents(e,r){return $t(this,null,function*(){if(!this.canvasEventMap.has(r)){const n={isUnchanged:!0};if("commands"in e){const o=yield Promise.all(e.commands.map(a=>$t(this,null,function*(){const i=yield Promise.all(a.args.map(be(this.imageMap,null,n)));return Wt(ct({},a),{args:i})})));n.isUnchanged===!1&&this.canvasEventMap.set(r,Wt(ct({},e),{commands:o}))}else{const o=yield Promise.all(e.args.map(be(this.imageMap,null,n)));n.isUnchanged===!1&&this.canvasEventMap.set(r,Wt(ct({},e),{args:o}))}}})}applyIncremental(e,r){var n,o,a;const{data:i}=e;switch(i.source){case E.Mutation:{try{this.applyMutation(i,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,i)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(r){const l=i.positions[i.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:i}}else i.positions.forEach(l=>{const s={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,i)},delay:l.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(s)}),this.timer.addAction({doAction(){},delay:e.delay-((n=i.positions[0])==null?void 0:n.timeOffset)});break;case E.MouseInteraction:{if(i.id===-1)break;const l=new Event(ge(L[i.type])),s=this.mirror.getNode(i.id);if(!s)return this.debugNodeNotFound(i,i.id);this.emitter.emit(A.MouseInteraction,{type:i.type,target:s});const{triggerFocus:c}=this.config;switch(i.type){case L.Blur:"blur"in s&&s.blur();break;case L.Focus:c&&s.focus&&s.focus({preventScroll:!0});break;case L.Click:case L.TouchStart:case L.TouchEnd:case L.MouseDown:case L.MouseUp:r?(i.type===L.TouchStart?this.touchActive=!0:i.type===L.TouchEnd&&(this.touchActive=!1),i.type===L.MouseDown?this.lastMouseDownEvent=[s,l]:i.type===L.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:i.x,y:i.y,id:i.id,debugData:i}):(i.type===L.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(i.x,i.y,i.id,r,i),i.type===L.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):i.type===L.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):i.type===L.TouchEnd?this.mouse.classList.remove("touch-active"):s.dispatchEvent(l));break;case L.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:s.dispatchEvent(l)}break}case E.Scroll:{if(i.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(i.id);if(!l)return this.debugNodeNotFound(i,i.id);l.scrollData=i;break}this.applyScroll(i,r);break}case E.ViewportResize:this.emitter.emit(A.Resize,{width:i.width,height:i.height});break;case E.Input:{if(i.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(i.id);if(!l)return this.debugNodeNotFound(i,i.id);l.inputData=i;break}this.applyInput(i);break}case E.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(i.id):this.mirror.getNode(i.id);if(!l)return this.debugNodeNotFound(i,i.id);const s=l;try{i.currentTime!==void 0&&(s.currentTime=i.currentTime),i.volume!==void 0&&(s.volume=i.volume),i.muted!==void 0&&(s.muted=i.muted),i.type===ye.Pause&&s.pause(),i.type===ye.Play&&s.play(),i.type===ye.RateChange&&(s.playbackRate=i.playbackRate)}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}break}case E.StyleSheetRule:case E.StyleDeclaration:{this.usingVirtualDom?i.styleId?this.constructedStyleMutations.push(i):i.id&&((o=this.virtualDom.mirror.getNode(i.id))==null||o.rules.push(i)):this.applyStyleSheetMutation(i);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(i.id);if(!l)return this.debugNodeNotFound(i,i.id);l.canvasMutations.push({event:e,mutation:i})}else{const l=this.mirror.getNode(i.id);if(!l)return this.debugNodeNotFound(i,i.id);ln({event:e,mutation:i,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{const l=new FontFace(i.family,i.buffer?new Uint8Array(JSON.parse(i.fontSource)):i.fontSource,i.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(l)}catch(l){this.warn(l)}break}case E.Selection:{if(r){this.lastSelectionData=i;break}this.applySelection(i);break}case E.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(i):this.applyAdoptedStyleSheet(i);break}}}applyMutation(e,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,vs(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const c in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[c],d=Gr(u.node,this.virtualDom,this.mirror);d&&(u.node=d)}catch(u){this.warn(u)}const n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(c=>n.getNode(c.id)?!0:(this.warnNodeNotFound(e,c.id),!1)),e.removes.forEach(c=>{var u;const d=n.getNode(c.id);if(!d)return;let h=n.getNode(c.parentId);if(!h)return this.warnNodeNotFound(e,c.parentId);if(c.isShadow&&ve(h)&&(h=h.shadowRoot),n.removeNodeFromMap(d),h)try{h.removeChild(d),this.usingVirtualDom&&d.nodeName==="#text"&&h.nodeName==="STYLE"&&((u=h.rules)==null?void 0:u.length)>0&&(h.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",h,d,e);else throw m}});const o=ct({},this.legacy_missingNodeRetryMap),a=[],i=c=>{let u=null;return c.nextId&&(u=n.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!u},l=c=>{var u,d;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let h=n.getNode(c.parentId);if(!h)return c.node.type===N.Document?this.newDocumentQueue.push(c):a.push(c);c.node.isShadow&&(ve(h)||h.attachShadow({mode:"open"}),h=h.shadowRoot);let m=null,p=null;if(c.previousId&&(m=n.getNode(c.previousId)),c.nextId&&(p=n.getNode(c.nextId)),i(c))return a.push(c);if(c.node.rootId&&!n.getNode(c.node.rootId))return;const v=c.node.rootId?n.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(ke(h,n)){this.attachDocumentToIframe(c,h);return}const b=(g,C)=>{if(!this.usingVirtualDom)for(const M of this.config.plugins||[])M.onBuild&&M.onBuild(g,{id:C,replayer:this})},f=Ue(c.node,{doc:v,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:b});if(c.previousId===-1||c.nextId===-1){o[c.node.id]={node:f,mutation:c};return}const y=n.getMeta(h);if(y&&y.type===N.Element&&y.tagName==="textarea"&&c.node.type===N.Text){const g=Array.isArray(h.childNodes)?h.childNodes:Array.from(h.childNodes);for(const C of g)C.nodeType===h.TEXT_NODE&&h.removeChild(C)}else if(y?.type===N.Document){const g=h;c.node.type===N.DocumentType&&((u=g.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&g.removeChild(g.childNodes[0]),f.nodeName==="HTML"&&g.documentElement&&g.removeChild(g.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?h.insertBefore(f,m.nextSibling):p&&p.parentNode?h.contains(p)?h.insertBefore(f,p):h.insertBefore(f,null):h.appendChild(f),b(f,c.node.id),this.usingVirtualDom&&f.nodeName==="#text"&&h.nodeName==="STYLE"&&((d=h.rules)==null?void 0:d.length)>0&&(h.rules=[]),ke(f,this.mirror)){const g=this.mirror.getId(f),C=this.newDocumentQueue.find(M=>M.parentId===g);C&&(this.attachDocumentToIframe(C,f),this.newDocumentQueue=this.newDocumentQueue.filter(M=>M!==C))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(o,h,f,c)};e.adds.forEach(c=>{l(c)});const s=Date.now();for(;a.length;){const c=nr(a);if(a.length=0,Date.now()-s>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(const u of c)n.getNode(u.value.parentId)?wt(u,d=>{l(d)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(o).length&&Object.assign(this.legacy_missingNodeRetryMap,o),or(e.texts).forEach(c=>{var u;const d=n.getNode(c.id);if(!d)return e.removes.find(h=>h.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);if(d.textContent=c.value,this.usingVirtualDom){const h=d.parentNode;((u=h?.rules)==null?void 0:u.length)>0&&(h.rules=[])}}),e.attributes.forEach(c=>{const u=n.getNode(c.id);if(!u)return e.removes.find(d=>d.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);for(const d in c.attributes)if(typeof d=="string"){const h=c.attributes[d];if(h===null)u.removeAttribute(d);else if(typeof h=="string")try{if(d==="_cssText"&&(u.nodeName==="LINK"||u.nodeName==="STYLE"))try{const m=n.getMeta(u);Object.assign(m.attributes,c.attributes);const p=Ue(m,{doc:u.ownerDocument,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache}),v=u.nextSibling,b=u.parentNode;if(p&&b){b.removeChild(u),b.insertBefore(p,v),n.replace(c.id,p);break}}catch{}u.setAttribute(d,h)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(d==="style"){const m=h,p=u;for(const v in m)if(m[v]===!1)p.style.removeProperty(v);else if(m[v]instanceof Array){const b=m[v];p.style.setProperty(v,b[0],b[1])}else{const b=m[v];p.style.setProperty(v,b)}}}})}applyScroll(e,r){var n,o;const a=this.mirror.getNode(e.id);if(!a)return this.debugNodeNotFound(e,e.id);const i=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(n=this.iframe.contentWindow)==null||n.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"});else if(i?.type===N.Document)(o=a.defaultView)==null||o.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"})}catch{}}applyInput(e){const r=this.mirror.getNode(e.id);if(!r)return this.debugNodeNotFound(e,e.id);try{r.checked=e.isChecked,r.value=e.text}catch{}}applySelection(e){try{const r=new Set,n=e.ranges.map(({start:o,startOffset:a,end:i,endOffset:l})=>{const s=this.mirror.getNode(o),c=this.mirror.getNode(i);if(!s||!c)return;const u=new Range;u.setStart(s,a),u.setEnd(c,l);const d=s.ownerDocument,h=d?.getSelection();return h&&r.add(h),{range:u,selection:h}});r.forEach(o=>o.removeAllRanges()),n.forEach(o=>{var a;return o&&((a=o.selection)==null?void 0:a.addRange(o.range))})}catch{}}applyStyleSheetMutation(e){var r;let n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=((r=this.mirror.getNode(e.id))==null?void 0:r.sheet)||null),n&&(e.source===E.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===E.StyleDeclaration&&this.applyStyleDeclaration(e,n))}applyStyleSheetRule(e,r){var n,o,a,i;if((n=e.adds)==null||n.forEach(({rule:l,index:s})=>{try{if(Array.isArray(s)){const{positions:c,index:u}=Tt(s);Re(r.cssRules,c).insertRule(l,u)}else{const c=s===void 0?void 0:Math.min(s,r.cssRules.length);r?.insertRule(l,c)}}catch{}}),(o=e.removes)==null||o.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:s,index:c}=Tt(l);Re(r.cssRules,s).deleteRule(c||0)}else r?.deleteRule(l)}catch{}}),e.replace)try{(a=r.replace)==null||a.call(r,e.replace)}catch{}if(e.replaceSync)try{(i=r.replaceSync)==null||i.call(r,e.replaceSync)}catch{}}applyStyleDeclaration(e,r){e.set&&Re(r.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Re(r.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var r;const n=this.mirror.getNode(e.id);if(!n)return;(r=e.styles)==null||r.forEach(l=>{var s;let c=null,u=null;if(ve(n)?u=((s=n.ownerDocument)==null?void 0:s.defaultView)||null:n.nodeName==="#document"&&(u=n.defaultView),!!u)try{c=new u.CSSStyleSheet,this.styleMirror.add(c,l.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:l.rules},c)}catch{}});const o=10;let a=0;const i=(l,s)=>{const c=s.map(u=>this.styleMirror.getStyle(u)).filter(u=>u!==null);ve(l)?l.shadowRoot.adoptedStyleSheets=c:l.nodeName==="#document"&&(l.adoptedStyleSheets=c),c.length!==s.length&&a<o&&(setTimeout(()=>i(l,s),0+100*a),a++)};i(n,e.styleIds)}legacy_resolveMissingNode(e,r,n,o){const{previousId:a,nextId:i}=o,l=a&&e[a],s=i&&e[i];if(l){const{node:c,mutation:u}=l;r.insertBefore(c,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,r,c,u)}if(s){const{node:c,mutation:u}=s;r.insertBefore(c,n.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,r,c,u)}}moveAndHover(e,r,n,o,a){const i=this.mirror.getNode(n);if(!i)return this.debugNodeNotFound(a,n);const l=Et(i,this.iframe),s=e*l.absoluteScale+l.x,c=r*l.absoluteScale+l.y;this.mouse.style.left=`${s}px`,this.mouse.style.top=`${c}px`,o||this.drawMouseTail({x:s,y:c}),this.hoverElements(i)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:r,lineWidth:n,strokeStyle:o,duration:a}=this.config.mouseTail===!0?Ut:Object.assign({},Ut,this.config.mouseTail),i=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=n,l.lineCap=r,l.strokeStyle=o,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(s=>l.lineTo(s.x,s.y)),l.stroke())};this.tailPositions.push(e),i(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==e),i()},a/this.speedService.state.context.timer.speed)}hoverElements(e){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(o=>{o.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let n=e;for(;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}isUserInteraction(e){return e.type!==T.IncrementalSnapshot?!1:e.data.source>E.Mutation&&e.data.source<=E.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(A.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,r){this.warn(`Node with id '${r}' not found. `,e)}warnCanvasMutationFailed(e,r){this.warn("Has error on canvas update",r,"canvas mutation:",e)}debugNodeNotFound(e,r){this.debug(`Node with id '${r}' not found. `,e)}warn(...e){!this.config.showWarning||this.config.logger.warn(dn,...e)}debug(...e){!this.config.showDebug||this.config.logger.log(dn,...e)}}const{addCustomEvent:Ks}=Ce,{freezePage:Js}=Ce;return re.EventType=T,re.IncrementalSource=E,re.MouseInteractions=L,re.Replayer=Zs,re.ReplayerEvents=A,re.addCustomEvent=Ks,re.freezePage=Js,re.record=Ce,re.utils=Zn,Object.defineProperty(re,"__esModule",{value:!0}),re}({});-//# sourceMappingURL=rrweb.min.js.map+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR+PERFORMANCE OF THIS SOFTWARE.+***************************************************************************** */function Fn(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,o=t.call(s),n=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)n.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return n}var He;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(He||(He={}));var Ga={type:"xstate.init"};function ss(s){return s===void 0?[]:[].concat(s)}function ze(s){return{type:"xstate.assign",assignment:s}}function Bn(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function Rr(s){return function(e){return s===e}}function ja(s){return typeof s=="string"?{type:s}:s}function Un(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Rr(s)}}function Wn(s,e,t){var r=e,i=!1;return[s.filter(function(o){if(o.type==="xstate.assign"){i=!0;var n=Object.assign({},r);return typeof o.assignment=="function"?n=o.assignment(r,t):Object.keys(o.assignment).forEach(function(a){n[a]=typeof o.assignment[a]=="function"?o.assignment[a](r,t):o.assignment[a]}),r=n,!1}return!0}),r,i]}function Ya(s,e){e===void 0&&(e={});var t=Fn(Wn(ss(s.states[s.initial].entry).map(function(n){return Bn(n,e.actions)}),s.context,Ga),2),r=t[0],i=t[1],o={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Rr(s.initial)},transition:function(n,a){var l,u,c=typeof n=="string"?{value:n,context:s.context}:n,h=c.value,f=c.context,g=ja(a),p=s.states[h];if(p.on){var m=ss(p.on[g.type]);try{for(var d=function(P){var le=typeof Symbol=="function"&&Symbol.iterator,ne=le&&P[le],st=0;if(ne)return ne.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&st>=P.length&&(P=void 0),{value:P&&P[st++],done:!P}}};throw new TypeError(le?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),y=d.next();!y.done;y=d.next()){var S=y.value;if(S===void 0)return Un(h,f);var w=typeof S=="string"?{target:S}:S,v=w.target,x=w.actions,N=x===void 0?[]:x,W=w.cond,B=W===void 0?function(){return!0}:W,H=v===void 0,Q=v!=null?v:h,se=s.states[Q];if(B(f,g)){var ie=Fn(Wn((H?ss(N):[].concat(p.exit,N,se.entry).filter(function(P){return P})).map(function(P){return Bn(P,o._options.actions)}),f,g),3),O=ie[0],Oe=ie[1],De=ie[2],Z=v!=null?v:h;return{value:Z,context:Oe,actions:O,changed:v!==h||O.length>0||De,matches:Rr(Z)}}}}catch(P){l={error:P}}finally{try{y&&!y.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return Un(h,f)}};return o}var zn=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function Ha(s){var e=s.initialState,t=He.NotStarted,r=new Set,i={_machine:s,send:function(o){t===He.Running&&(e=s.transition(e,o),zn(e,ja(o)),r.forEach(function(n){return n(e)}))},subscribe:function(o){return r.add(o),o(e),{unsubscribe:function(){return r.delete(o)}}},start:function(o){if(o){var n=typeof o=="object"?o:{context:s.config.context,value:o};e={value:n.value,actions:[],context:n.context,matches:Rr(n.value)}}return t=He.Running,zn(e,Ga),i},stop:function(){return t=He.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function up(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===I.Meta&&r.timestamp<=e)return s.slice(t)}return s}function cp(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=Ya({id:"player",context:s,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ze({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:ze((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),q(M({},o),{timeOffset:a,baselineTime:o.events[0].timestamp+a})}),play(o){var n;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=o;a.clear();for(const p of l)Ln(p,u);const h=up(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===I.IncrementalSnapshot&&c.data.source===E.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&r.emit(_.PlayBack);const g=new Array;for(const p of h)if(!(f&&f<u&&(p.timestamp<=f||p===c)))if(p.timestamp<u)g.push(p);else{const m=e(p,!1);a.addAction({doAction:()=>{m()},delay:p.delay})}t(g),r.emit(_.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:ze(o=>q(M({},o),{lastPlayedEvent:null})),startLive:ze({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:ze((o,n)=>{const{baselineTime:a,timer:l,events:u}=o;if(n.type==="ADD_EVENT"){const{event:c}=n.payload;Ln(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let p=-1,m=0;for(;m<=h;){const d=Math.floor((m+h)/2);u[d].timestamp<=c.timestamp?m=d+1:h=d-1}p===-1&&(p=m),u.splice(p,0,c)}const f=c.timestamp<a,g=e(c,f);f?g():l.isActive()&&l.addAction({doAction:()=>{g()},delay:c.delay})}return q(M({},o),{events:u})})}});return Ha(i)}function hp(s){const e=Ya({id:"speed",context:s,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:ze({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Ha(e)}const fp=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],Vn=new Map;function Za(s,e){let t=Vn.get(s);return t||(t=new Map,Vn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Re(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await Re(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;const{rr_type:i,index:o}=r;return Za(e,i)[o]}else if("args"in r){const{rr_type:i,args:o}=r,n=window[i];return new n(...await Promise.all(o.map(Re(s,e,t))))}else{if("base64"in r)return Jd(r.base64);if("src"in r){const i=s.get(r.src);if(i)return i;{const o=new Image;return o.src=r.src,s.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(Re(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Re(s,e,t)));return r}}function dp(s,e){try{return e===ve.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const pp=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function mp(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!pp.includes(t))return;const r=Za(s,t);r.includes(e)||r.push(e)}async function gp({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const o=dp(e,t);if(!o)return;if(s.setter){o[s.property]=s.args[0];return}const n=o[s.property],a=await Promise.all(s.args.map(Re(r,o))),l=n.apply(o,a);mp(o,l);const u=!1}catch(o){i(s,o)}}async function yp({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){const o=t.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}const n=e.map(async l=>Promise.all(l.args.map(Re(r,o))));(await Promise.all(n)).forEach((l,u)=>{const c=e[u];try{if(c.setter){o[c.property]=c.args[0];return}const h=o[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(o,c.args)):h.apply(o,l)}catch(h){i(c,h)}})}async function Us({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:o}){try{const n=i.get(s)||e,a="commands"in n?n.commands:[n];if([ve.WebGL,ve.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await gp({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await yp({event:s,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}class wp{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(_.Start,this.start.bind(this)),this.emitter.on(_.SkipStart,this.start.bind(this)),this.emitter.on(_.Pause,this.pause.bind(this)),this.emitter.on(_.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){const o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+o;t.loop&&n!==!1&&(a=a%n),t.currentTime=a}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var g,p,m,d,y;const i=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:o===xe.Play||o!==xe.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(g=a!=null?a:i==null?void 0:i.currentTimeAtLastInteraction)!=null?g:0,lastInteractionTimeOffset:t,playbackRate:(p=n!=null?n:i==null?void 0:i.playbackRate)!=null?p:1,volume:(m=u!=null?u:i==null?void 0:i.volume)!=null?m:1,muted:(d=l!=null?l:i==null?void 0:i.muted)!=null?d:e.getAttribute("muted")===null,loop:(y=c!=null?c:i==null?void 0:i.loop)!=null?y:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:i,volume:o,isPlaying:n}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==o&&(e.volume=o),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),n&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,o=r.getMeta(i);if(!o||!("attributes"in o))return;const n=this.service.state.matches("paused"),a=o.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&n&&i.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let g=0;typeof a.rr_mediaCurrentTime=="number"&&(g=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:g,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function rr(s,e){if(s.nodeName!=="DIALOG"||s instanceof de)return;const t=s,r=t.open,i=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),n=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=o==="modal";if(!(r&&!(i&&o==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),n&&(a?t.showModal():t.show())}}function bp(s,e){if(s.nodeName!=="DIALOG"||s instanceof de)return;const t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const Sp=5*1e3,vp=Va||op,Gn="[replayer]",is={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function jn(s){return s.type==I.IncrementalSnapshot&&(s.data.source==E.TouchMove||s.data.source==E.MouseInteraction&&s.data.type==k.TouchStart)}class Cp{constructor(e,t){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new rt),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",vp()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",on()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",Zn()),b(this,"styleMirror",new xi),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),b(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case I.DomContentLoaded:case I.Load:case I.Custom:continue;case I.FullSnapshot:case I.Meta:case I.Plugin:case I.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case I.DomContentLoaded:case I.Load:break;case I.Custom:u=()=>{this.emitter.emit(_.CustomEvent,a)};break;case I.Meta:u=()=>this.emitter.emit(_.Resize,{width:a.data.width,height:a.data.height});break;case I.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case I.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/Sp),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(_.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(_.Finish))};let g=50;a.type===I.IncrementalSnapshot&&a.data.source===E.MouseMove&&a.data.positions.length&&(g+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,g)}this.emitter.emit(_.EventCast,a)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:is,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(_.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(_.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{Us({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===E.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===E.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Cr(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[l],c=Er(u.node,this.mirror,this.virtualDom.mirror);Cr(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(_.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new lp([],{speed:this.config.speed});this.service=cp({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(_.StateChange,{player:a})}),this.speedService=hp({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(_.StateChange,{speed:a})}),this.mediaManager=new wp({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(a=>a.type===I.Meta),n=this.service.state.context.events.find(a=>a.type===I.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(_.Resize,{width:a,height:l})},0)}n&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(a=this.iframe.contentWindow)==null||a.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(jn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(_.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(_.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(_.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(_.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;jn(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=on()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(ap(this.iframe.contentWindow,this.iframe.contentDocument),vi(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const r=[],i=new Set,o=(l,u)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Yc(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);const{documentElement:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),i.forEach(l=>rr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(_.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=fp(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,Ra(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:E.StyleSheetRule,adds:i.map((n,a)=>({rule:n,index:a}))})}else{const o=document.createElement("style");e.insertBefore(o,t);for(let n=0;n<i.length;n++)(r=o.sheet)==null||r.insertRule(i[n],n)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,n=(a,l)=>{a.nodeName==="DIALOG"&&o.add(a),this.collectIframeAndAttachDocument(i,a);const u=r.getMeta(a);if((u==null?void 0:u.type)===we.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};ht(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);o.forEach(a=>rr(a))}collectIframeAndAttachDocument(e,t){if(Ze(t,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const r=new Set;let i,o=this.service.state;const n=()=>{o=this.service.state};this.emitter.on(_.Start,n),this.emitter.on(_.Pause,n);const a=()=>{this.emitter.off(_.Start,n),this.emitter.off(_.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(_.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(_.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===I.IncrementalSnapshot&&t.data.source===E.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const r=document.createElement("canvas"),i=r.getContext("2d"),o=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async o=>{const n=await Promise.all(o.args.map(Re(this.imageMap,null,r)));return q(M({},o),{args:n})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,q(M({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(Re(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,q(M({},e),{args:i}))}}}applyIncremental(e,t){var r,i,o;const{data:n}=e;switch(n.source){case E.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(t){const a=n.positions[n.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:n}}else n.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,n)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=n.positions[0])==null?void 0:r.timeOffset)});break;case E.MouseInteraction:{if(n.id===-1)break;const a=new Event(Ne(k[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(_.MouseInteraction,{type:n.type,target:l});const{triggerFocus:u}=this.config;switch(n.type){case k.Blur:"blur"in l&&l.blur();break;case k.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case k.Click:case k.TouchStart:case k.TouchEnd:case k.MouseDown:case k.MouseUp:t?(n.type===k.TouchStart?this.touchActive=!0:n.type===k.TouchEnd&&(this.touchActive=!1),n.type===k.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===k.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===k.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===k.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===k.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===k.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case k.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case E.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.scrollData=n;break}this.applyScroll(n,t);break}case E.ViewportResize:this.emitter.emit(_.Resize,{width:n.width,height:n.height});break;case E.Input:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.inputData=n;break}this.applyInput(n);break}case E.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:n});break}case E.StyleSheetRule:case E.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((i=this.virtualDom.mirror.getNode(n.id))==null||i.rules.push(n)):this.applyStyleSheetMutation(n);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.canvasMutations.push({event:e,mutation:n})}else{const a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);Us({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{const a=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(a)}catch(a){this.warn(a)}break}case E.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case E.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,hd(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],h=Ma(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Me(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(g){if(g instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw g}});const i=M({},this.legacy_missingNodeRetryMap),o=[],n=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===we.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(Me(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let g=null,p=null;if(u.previousId&&(g=r.getNode(u.previousId)),u.nextId&&(p=r.getNode(u.nextId)),n(u))return o.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;const m=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ze(f,r)){this.attachDocumentToIframe(u,f);return}const d=(w,v)=>{if(!this.usingVirtualDom){rr(w);for(const x of this.config.plugins||[])x.onBuild&&x.onBuild(w,{id:v,replayer:this})}},y=ht(u.node,{doc:m,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:y,mutation:u};return}const S=r.getMeta(f);if(S&&S.type===we.Element&&u.node.type===we.Text){const w=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(S.tagName==="textarea")for(const v of w)v.nodeType===f.TEXT_NODE&&f.removeChild(v);else if(S.tagName==="style"&&w.length===1)for(const v of w)v.nodeType===f.TEXT_NODE&&!r.hasNode(v)&&(y.textContent=v.textContent,f.removeChild(v))}else if((S==null?void 0:S.type)===we.Document){const w=f;u.node.type===we.DocumentType&&((c=w.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),y.nodeName==="HTML"&&w.documentElement&&w.removeChild(w.documentElement)}if(g&&g.nextSibling&&g.nextSibling.parentNode?f.insertBefore(y,g.nextSibling):p&&p.parentNode?f.contains(p)?f.insertBefore(y,p):f.insertBefore(y,null):f.appendChild(y),d(y,u.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),Ze(y,this.mirror)){const w=this.mirror.getId(y),v=this.newDocumentQueue.find(x=>x.parentId===w);v&&(this.attachDocumentToIframe(v,y),this.newDocumentQueue=this.newDocumentQueue.filter(x=>x!==v))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,y,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;o.length;){const u=Da(o);if(o.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)r.getNode(c.value.parentId)?Ci(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Ta(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(g=>g.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=_r(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const g=h.parentNode;((c=g==null?void 0:g.rules)==null?void 0:c.length)>0&&(g.rules=[])}}),e.attributes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const f in u.attributes)if(typeof f=="string"){const g=u.attributes[f];if(g===null)h.removeAttribute(f),f==="open"&&bp(h,u);else if(typeof g=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=r.getMeta(h),m=ht(q(M({},p),{attributes:M(M({},p.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(p.attributes,u.attributes);const d=h.nextSibling,y=h.parentNode;if(m&&y){y.removeChild(h),y.insertBefore(m,d),r.replace(u.id,m);break}}catch(p){}if(f==="value"&&h.nodeName==="TEXTAREA"){const p=h;p.childNodes.forEach(d=>p.removeChild(d));const m=(c=h.ownerDocument)==null?void 0:c.createTextNode(g);m&&p.appendChild(m)}else h.setAttribute(f,g);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&rr(h,u)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(f==="style"){const p=g,m=h;for(const d in p)if(p[d]===!1)m.style.removeProperty(d);else if(p[d]instanceof Array){const y=p[d];m.style.setProperty(d,y[0],y[1])}else{const y=p[d];m.style.setProperty(d,y)}}}})}applyScroll(e,t){var r,i;const o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);const n=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((n==null?void 0:n.type)===we.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(r){}}applySelection(e){try{const t=new Set,r=e.ranges.map(({start:i,startOffset:o,end:n,endOffset:a})=>{const l=this.mirror.getNode(i),u=this.mirror.getNode(n);if(!l||!u)return;const c=new Range;c.setStart(l,o),c.setEnd(u,a);const h=l.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===E.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===E.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,o,n;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=Fs(l);je(t.cssRules,u).insertRule(a,c)}else{const u=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,u)}}catch(u){}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=Fs(a);je(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(n=t.replaceSync)==null||n.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&je(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&je(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(Me(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:a.rules},u)}catch(h){}});const i=10;let o=0;const n=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Me(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&o<i&&(setTimeout(()=>n(a,l),0+100*o),o++)};n(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){const{previousId:o,nextId:n}=i,a=o&&e[o],l=n&&e[n];if(a){const{node:u,mutation:c}=a;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){const{node:u,mutation:c}=l;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,i,o){const n=this.mirror.getNode(r);if(!n)return this.debugNodeNotFound(o,r);const a=Ii(n,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?is:Object.assign({},is,this.config.mouseTail),n=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),n()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==I.IncrementalSnapshot?!1:e.data.source>E.Mutation&&e.data.source<=E.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(_.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Gn,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Gn,...e)}}const{addCustomEvent:Ep}=Ae,{freezePage:Ip}=Ae,{takeFullSnapshot:xp}=Ae;exports.EventType=I;exports.IncrementalSource=E;exports.MouseInteractions=k;exports.Replayer=Cp;exports.ReplayerEvents=_;exports.addCustomEvent=Ep;exports.canvasMutation=Us;exports.freezePage=Ip;exports.record=Ae;exports.takeFullSnapshot=xp;exports.utils=Rd;+if (typeof module.exports == "object" && typeof exports == "object") {+ var __cp = (to, from, except, desc) => {+ if ((from && typeof from === "object") || typeof from === "function") {+ for (let key of Object.getOwnPropertyNames(from)) {+ if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except)+ Object.defineProperty(to, key, {+ get: () => from[key],+ enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable,+ });+ }+ }+ return to;+ };+ module.exports = __cp(module.exports, exports);+}+return module.exports;+}))+//# sourceMappingURL=rrweb.umd.min.cjs.map